tx · GN2hXZakTmm845Y69u16E1PsbCbZAmn2YL1JS2PL1JRu

3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh:  -0.04000000 Waves

2022.08.01 07:28 [2164951] smart account 3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh > SELF 0.00000000 Waves

{ "type": 13, "id": "GN2hXZakTmm845Y69u16E1PsbCbZAmn2YL1JS2PL1JRu", "fee": 4000000, "feeAssetId": null, "timestamp": 1659328171244, "version": 1, "sender": "3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh", "senderPublicKey": "HiTi1JT7GQRqLNxg4yZhD1mV42y1Mv2AYvRx92JQRbwX", "proofs": [ "3P9MdczZUxi7PkvYJuvkqH2U3kLZW53fk7PEjMwLG416cxgqxTBsZKm6zEEyaZGjAFYfUMA9DsSBcgaW25jUA1fS" ], "script": "base64:BgIUCAISBQoDCAEBEgMKAQgSBAoCCAFLAAZFVUxFUjgA1onPgQEABU1VTFQ2AMCEPQAGTVVMVFg2CQC2AgEAwIQ9AAVNVUxUOACAwtcvAAZNVUxUWDgJALYCAQCAwtcvAAZNVUxUMTIAgKCUpY0dAAZNVUxUMTgJALYCAQCAgJC7utat8A0AA1NFUAICX18AB1dBVkVTSUQJANkEAQIFV0FWRVMBEmtleU5ldXRyaW5vQXNzZXRJZAACEW5ldXRyaW5vX2Fzc2V0X2lkAQ5rZXlOc2J0QXNzZXRJZAACDWJvbmRfYXNzZXRfaWQBDmtleVN1cmZBc3NldElkAAINc3VyZl9hc3NldF9pZAEQa2V5QmFsYW5jZUxvY2tlZAACDWJhbGFuY2VfbG9ja18BFWtleVdhdmVzTG9ja2VkQmFsYW5jZQAJAKwCAgkBEGtleUJhbGFuY2VMb2NrZWQAAgV3YXZlcwEYa2V5TmV1dHJpbm9Mb2NrZWRCYWxhbmNlAAkArAICCQEQa2V5QmFsYW5jZUxvY2tlZAACCG5ldXRyaW5vARVrZXlNaW5XYXZlc1N3YXBBbW91bnQAAhVtaW5fd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MCAIJAKQDAQUOc3RhcnRUaW1lc3RhbXAJAMwIAgkApAMBBQ5zdGFydEhlaWdodE5ldwkAzAgCCQCkAwEFEXN0YXJ0VGltZXN0YW1wTmV3BQNuaWwFA1NFUAAODs9H", "chainId": 84, "height": 2164951, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3WdtoXxrKN8FJHSFjtMw7JXruf7WvLMMkoebNHmye1ga Next: 6oVJL6mEKq9BtXpRAiSgpeTuBbNbq4BJcs2PMzBW1qcM Diff:
OldNewDifferences
231231 let gnsbtFromNsbtDiff = additionalNsbtToStakeOrZero
232232 let gnsbtFromSurfDiff = asInt(invoke(gnsbtControllerContract, "gnsbtFromSurfSYSREADONLY", [additionalSurfToStakeOrZero], nil))
233233 let gNsbtDiff = (gnsbtFromNsbtDiff + gnsbtFromSurfDiff)
234- let $t063906577 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil))
235- let limitMaxUsdn = $t063906577._1
236- let limitSpent = $t063906577._2
237- let blcks2LmtReset = $t063906577._3
238- let gnsbtAmt = $t063906577._4
239- let gnsbtAmtTotal = $t063906577._5
240- let $t065816791 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, gNsbtDiff], nil))
241- let limitMaxUsdnNEW = $t065816791._1
242- let limitSpentNEW = $t065816791._2
243- let blcks2LmtResetNEW = $t065816791._3
244- let gnsbtAmtNEW = $t065816791._4
245- let gnsbtAmtTotalNEW = $t065816791._5
234+ let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil))
235+ let limitMaxUsdn = swapParamsTuple._1
236+ let limitSpent = swapParamsTuple._2
237+ let blcks2LmtReset = swapParamsTuple._3
238+ let gnsbtAmt = swapParamsTuple._4
239+ let gnsbtAmtTotal = swapParamsTuple._5
240+ let swapParamsTupleNEW = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, gNsbtDiff], nil))
241+ let limitMaxUsdnNEW = swapParamsTupleNEW._1
242+ let limitSpentNEW = swapParamsTupleNEW._2
243+ let blcks2LmtResetNEW = swapParamsTupleNEW._3
244+ let gnsbtAmtNEW = swapParamsTupleNEW._4
245+ let gnsbtAmtTotalNEW = swapParamsTupleNEW._5
246246 let limitMaxWaves = convertNeutrinoToWaves(limitMaxUsdn, currentPrice)
247247 let limitMaxWavesNEW = convertNeutrinoToWaves(limitMaxUsdnNEW, currentPrice)
248- let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty], nil))
249- let gnsbtUser = asInt(gnsbtData[0])
250- let gnsbtTotal = asInt(gnsbtData[1])
251- let nsbtData = asAnyList(gnsbtData[2])
252- let surfData = asAnyList(gnsbtData[3])
253248 let nsbtBalance = if ((userAddressStrOrEmpty != ""))
254249 then assetBalance(userAddressOrThis, nsbtAssetId)
255250 else 0
256251 let surfBalance = if ((userAddressStrOrEmpty != ""))
257252 then assetBalance(userAddressOrThis, surfAssetId)
258253 else 0
259- let nsbtBalanceNew = (nsbtBalance - additionalNsbtToStakeOrZero)
254+ let nsbtBalanceDiff = if ((additionalNsbtToStakeOrZero >= 0))
255+ then additionalNsbtToStakeOrZero
256+ else {
257+ let nsbtUnstakingData = asAnyList(invoke(nsbtStakingContract, "nsbtUnstakingSYSREADONLY", [userAddressStrOrEmpty, (-1 * additionalNsbtToStakeOrZero)], nil))
258+ let nsbtReceiveAmount = asInt(nsbtUnstakingData[2])
259+ let result = -(nsbtReceiveAmount)
260+ result
261+ }
262+ let nsbtBalanceNew = (nsbtBalance - nsbtBalanceDiff)
260263 let surfBalanceNew = (surfBalance - additionalSurfToStakeOrZero)
264+ let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty], nil))
265+ let gnsbtUser = asInt(gnsbtData[0])
266+ let gnsbtTotal = asInt(gnsbtData[1])
267+ let nsbtData = asAnyList(gnsbtData[2])
268+ let surfData = asAnyList(gnsbtData[3])
261269 let gnsbtAmtFromNsbt = asInt(nsbtData[2])
262270 let gnsbtAmtFromSurf = asInt(surfData[2])
263271 let gnsbtAmtFromNsbtNEW = (gnsbtAmtFromNsbt + gnsbtFromNsbtDiff)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let EULER8 = 271828182
55
66 let MULT6 = 1000000
77
88 let MULTX6 = toBigInt(1000000)
99
1010 let MULT8 = 100000000
1111
1212 let MULTX8 = toBigInt(100000000)
1313
1414 let MULT12 = 1000000000000
1515
1616 let MULT18 = toBigInt(1000000000000000000)
1717
1818 let SEP = "__"
1919
2020 let WAVESID = fromBase58String("WAVES")
2121
2222 func keyNeutrinoAssetId () = "neutrino_asset_id"
2323
2424
2525 func keyNsbtAssetId () = "bond_asset_id"
2626
2727
2828 func keySurfAssetId () = "surf_asset_id"
2929
3030
3131 func keyBalanceLocked () = "balance_lock_"
3232
3333
3434 func keyWavesLockedBalance () = (keyBalanceLocked() + "waves")
3535
3636
3737 func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino")
3838
3939
4040 func keyMinWavesSwapAmount () = "min_waves_swap_amount"
4141
4242
4343 func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount"
4444
4545
4646 func keyWavesOutFeePart () = "wavesOut_swap_feePart"
4747
4848
4949 func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart"
5050
5151
5252 func keySwapAmountAParam () = "%s%s__config__swapAParam"
5353
5454
5555 func keySwapAmountBParam () = "%s%s__config__swapBParam"
5656
5757
5858 func keyNsbtLockContract () = "%s__nsbtLockContract"
5959
6060
6161 func keyMathContract () = "%s__mathContract"
6262
6363
6464 func keyBalanceWavesLockInterval () = "balance_waves_lock_interval"
6565
6666
6767 func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval"
6868
6969
7070 func keyPrice () = "price"
7171
7272
7373 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
7474
7575
7676 func keyHalfLife () = "%s__halfLife"
7777
7878
7979 func keyMinLockAmount () = "%s__minLockAmount"
8080
8181
8282 func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy"
8383
8484
8585 func keyMinNsbtSell () = "min_nsbt_sell"
8686
8787
8888 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
8989
9090
9191 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
9292
9393
9494 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
9595
9696
9797 func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price)
9898
9999
100100 func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8)
101101
102102
103103 func asAnyList (val) = match val {
104104 case valAnyList: List[Any] =>
105105 valAnyList
106106 case _ =>
107107 throw("fail to cast into List[Any]")
108108 }
109109
110110
111111 func asInt (val) = match val {
112112 case valInt: Int =>
113113 valInt
114114 case _ =>
115115 throw("fail to cast into Int")
116116 }
117117
118118
119119 func asString (val) = match val {
120120 case valStr: String =>
121121 valStr
122122 case _ =>
123123 throw("fail to cast into String")
124124 }
125125
126126
127127 func asTuple2Ints (val) = match val {
128128 case v: (Int, Int) =>
129129 v
130130 case _ =>
131131 throw("fail to cast into Tuple2 ints")
132132 }
133133
134134
135135 func asSwapParamsSTRUCT (val) = match val {
136136 case struct: (Int, Int, Int, Int, Int) =>
137137 struct
138138 case _ =>
139139 throw("fail to cast into Int")
140140 }
141141
142142
143143 func toTimestamp (start) = if ((0 > start))
144144 then -1
145145 else match blockInfoByHeight(start) {
146146 case block: BlockInfo =>
147147 block.timestamp
148148 case _ =>
149149 -1
150150 }
151151
152152
153153 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
154154
155155
156156 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
157157
158158
159159 let IdxControlCfgNeutrinoDapp = 1
160160
161161 let IdxControlCfgAuctionDapp = 2
162162
163163 let IdxControlCfgRpdDapp = 3
164164
165165 let IdxControlCfgMathDapp = 4
166166
167167 let IdxControlCfgLiquidationDapp = 5
168168
169169 let IdxControlCfgRestDapp = 6
170170
171171 let IdxControlCfgNodeRegistryDapp = 7
172172
173173 let IdxControlCfgNsbtStakingDapp = 8
174174
175175 let IdxControlCfgMediatorDapp = 9
176176
177177 let IdxControlCfgSurfStakingDapp = 10
178178
179179 let IdxControlCfgGnsbtControllerDapp = 11
180180
181181 func keyControlAddress () = "%s%s__config__controlAddress"
182182
183183
184184 func keyControlCfg () = "%s__controlConfig"
185185
186186
187187 func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP)
188188
189189
190190 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
191191
192192
193193 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
194194
195195 let controlCfg = readControlCfgOrFail(controlContract)
196196
197197 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
198198
199199 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
200200
201201 let auctionContract = getContractAddressOrFail(controlCfg, IdxControlCfgAuctionDapp)
202202
203203 let liquidationContract = getContractAddressOrFail(controlCfg, IdxControlCfgLiquidationDapp)
204204
205205 let rpdContract = getContractAddressOrFail(controlCfg, IdxControlCfgRpdDapp)
206206
207207 let nsbtStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgNsbtStakingDapp)
208208
209209 let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp)
210210
211211 let gnsbtControllerContract = getContractAddressOrFail(controlCfg, IdxControlCfgGnsbtControllerDapp)
212212
213213 let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
214214
215215 let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
216216
217217 let nsbtAssetIdStr = getStringValue(neutrinoContract, keyNsbtAssetId())
218218
219219 let nsbtAssetId = fromBase58String(nsbtAssetIdStr)
220220
221221 let surfAssetIdStr = getStringValue(auctionContract, keySurfAssetId())
222222
223223 let surfAssetId = fromBase58String(surfAssetIdStr)
224224
225225 @Callable(i)
226226 func gnsbtInfoREADONLY (userAddressStrOrEmpty,additionalNsbtToStakeOrZero,additionalSurfToStakeOrZero) = {
227227 let userAddressOrThis = if ((userAddressStrOrEmpty != ""))
228228 then addressFromStringValue(userAddressStrOrEmpty)
229229 else this
230230 let currentPrice = getIntegerValue(controlContract, keyPrice())
231231 let gnsbtFromNsbtDiff = additionalNsbtToStakeOrZero
232232 let gnsbtFromSurfDiff = asInt(invoke(gnsbtControllerContract, "gnsbtFromSurfSYSREADONLY", [additionalSurfToStakeOrZero], nil))
233233 let gNsbtDiff = (gnsbtFromNsbtDiff + gnsbtFromSurfDiff)
234- let $t063906577 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil))
235- let limitMaxUsdn = $t063906577._1
236- let limitSpent = $t063906577._2
237- let blcks2LmtReset = $t063906577._3
238- let gnsbtAmt = $t063906577._4
239- let gnsbtAmtTotal = $t063906577._5
240- let $t065816791 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, gNsbtDiff], nil))
241- let limitMaxUsdnNEW = $t065816791._1
242- let limitSpentNEW = $t065816791._2
243- let blcks2LmtResetNEW = $t065816791._3
244- let gnsbtAmtNEW = $t065816791._4
245- let gnsbtAmtTotalNEW = $t065816791._5
234+ let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil))
235+ let limitMaxUsdn = swapParamsTuple._1
236+ let limitSpent = swapParamsTuple._2
237+ let blcks2LmtReset = swapParamsTuple._3
238+ let gnsbtAmt = swapParamsTuple._4
239+ let gnsbtAmtTotal = swapParamsTuple._5
240+ let swapParamsTupleNEW = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, gNsbtDiff], nil))
241+ let limitMaxUsdnNEW = swapParamsTupleNEW._1
242+ let limitSpentNEW = swapParamsTupleNEW._2
243+ let blcks2LmtResetNEW = swapParamsTupleNEW._3
244+ let gnsbtAmtNEW = swapParamsTupleNEW._4
245+ let gnsbtAmtTotalNEW = swapParamsTupleNEW._5
246246 let limitMaxWaves = convertNeutrinoToWaves(limitMaxUsdn, currentPrice)
247247 let limitMaxWavesNEW = convertNeutrinoToWaves(limitMaxUsdnNEW, currentPrice)
248- let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty], nil))
249- let gnsbtUser = asInt(gnsbtData[0])
250- let gnsbtTotal = asInt(gnsbtData[1])
251- let nsbtData = asAnyList(gnsbtData[2])
252- let surfData = asAnyList(gnsbtData[3])
253248 let nsbtBalance = if ((userAddressStrOrEmpty != ""))
254249 then assetBalance(userAddressOrThis, nsbtAssetId)
255250 else 0
256251 let surfBalance = if ((userAddressStrOrEmpty != ""))
257252 then assetBalance(userAddressOrThis, surfAssetId)
258253 else 0
259- let nsbtBalanceNew = (nsbtBalance - additionalNsbtToStakeOrZero)
254+ let nsbtBalanceDiff = if ((additionalNsbtToStakeOrZero >= 0))
255+ then additionalNsbtToStakeOrZero
256+ else {
257+ let nsbtUnstakingData = asAnyList(invoke(nsbtStakingContract, "nsbtUnstakingSYSREADONLY", [userAddressStrOrEmpty, (-1 * additionalNsbtToStakeOrZero)], nil))
258+ let nsbtReceiveAmount = asInt(nsbtUnstakingData[2])
259+ let result = -(nsbtReceiveAmount)
260+ result
261+ }
262+ let nsbtBalanceNew = (nsbtBalance - nsbtBalanceDiff)
260263 let surfBalanceNew = (surfBalance - additionalSurfToStakeOrZero)
264+ let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty], nil))
265+ let gnsbtUser = asInt(gnsbtData[0])
266+ let gnsbtTotal = asInt(gnsbtData[1])
267+ let nsbtData = asAnyList(gnsbtData[2])
268+ let surfData = asAnyList(gnsbtData[3])
261269 let gnsbtAmtFromNsbt = asInt(nsbtData[2])
262270 let gnsbtAmtFromSurf = asInt(surfData[2])
263271 let gnsbtAmtFromNsbtNEW = (gnsbtAmtFromNsbt + gnsbtFromNsbtDiff)
264272 let gnsbtAmtFromSurfNEW = (gnsbtAmtFromSurf + gnsbtFromSurfDiff)
265273 let gnsbtFromNsbtTotal = asInt(nsbtData[3])
266274 let gnsbtFromSurfTotal = asInt(surfData[3])
267275 let gnsbtFromNsbtTotalNEW = (gnsbtFromNsbtTotal + gnsbtFromNsbtDiff)
268276 let gnsbtFromSurfTotalNEW = (gnsbtFromSurfTotal + gnsbtFromSurfDiff)
269277 let votingPower = fraction(gnsbtAmtFromNsbt, MULT6, (gnsbtFromNsbtTotal + gnsbtFromSurfTotal))
270278 let votingPowerNew = fraction(gnsbtAmtFromNsbtNEW, MULT6, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfTotal))
271279 let votingPowerMax = fraction((gnsbtAmtFromNsbt + gnsbtAmtFromSurf), MULT6, (gnsbtFromNsbtTotal + gnsbtFromSurfTotal))
272280 let votingPowreMaxNew = fraction((gnsbtAmtFromNsbtNEW + gnsbtAmtFromSurfNEW), MULT6, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfTotal))
273281 let votingPowerEta = (height + (1440 * 7))
274282 let votingPowerEtaNew = (height + (1440 * 14))
275283 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(nsbtBalance), toString(surfBalance), toString(nsbtBalanceNew), toString(surfBalanceNew), toString(gnsbtAmtFromNsbt), toString(gnsbtAmtFromSurf), toString(gnsbtAmtFromNsbtNEW), toString(gnsbtAmtFromSurfNEW), toString(gnsbtFromNsbtTotal), toString(gnsbtFromSurfTotal), toString(gnsbtFromNsbtTotalNEW), toString(gnsbtFromSurfTotalNEW), toString(limitMaxUsdn), toString(limitMaxWaves), toString(limitMaxUsdnNEW), toString(limitMaxWavesNEW), toString(blcks2LmtReset), toString(blcks2LmtResetNEW), toString(votingPower), toString(votingPowerNew), toString(votingPowerMax), toString(votingPowreMaxNew), toString(votingPowerEta), toString(votingPowerEtaNew)], SEP))
276284 }
277285
278286
279287
280288 @Callable(i)
281289 func rewardInfoREADONLY (userAddressStrOrEmpty) = {
282290 let rewardsData = asAnyList(invoke(gnsbtControllerContract, "gnsbtRewardsSYSREADONLY", [userAddressStrOrEmpty], nil))
283291 $Tuple2(nil, makeString(["%s%s", asString(rewardsData[0]), asString(rewardsData[1])], SEP))
284292 }
285293
286294
287295
288296 @Callable(i)
289297 func mergeNsbtREADONLY (userAddressMandatory,newAmount) = {
290298 let nsbtData = asAnyList(invoke(nsbtStakingContract, "nsbtStakingSYSREADONLY", [userAddressMandatory], nil))
291299 let amount0 = asInt(nsbtData[0])
292300 let startHeight = if ((0 >= amount0))
293301 then -1
294302 else asInt(nsbtData[2])
295303 let startTimestamp = toTimestamp(startHeight)
296304 let startHeightNew = if ((0 >= newAmount))
297305 then startHeight
298306 else {
299307 let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
300308 asInt(invoke(mathContract, "mergeStakesREADONLY", [amount0, startHeight, newAmount, height, halfLife], nil))
301309 }
302310 let startTimestampNew = toTimestamp(startHeightNew)
303311 $Tuple2(nil, makeString(["%d%d%d%d", toString(startHeight), toString(startTimestamp), toString(startHeightNew), toString(startTimestampNew)], SEP))
304312 }
305313
306314

github/deemru/w8io/026f985 
41.32 ms