tx · CyPK14XfCJ6mfVk3rQs27k6QtnZHFKkoF5XKL7F3vKPe

3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh:  -0.04000000 Waves

2022.08.07 17:56 [2174191] smart account 3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh > SELF 0.00000000 Waves

{ "type": 13, "id": "CyPK14XfCJ6mfVk3rQs27k6QtnZHFKkoF5XKL7F3vKPe", "fee": 4000000, "feeAssetId": null, "timestamp": 1659884190131, "version": 1, "sender": "3NAfzeA3URU6oCV6HvtAiNwqGXsTs87ZpHh", "senderPublicKey": "HiTi1JT7GQRqLNxg4yZhD1mV42y1Mv2AYvRx92JQRbwX", "proofs": [ "3WNEvsNogaK1EkdSYvkihjdBVEXrQtBinBU6Eh9b7u9ny26gfk8pqBD32Ss3WYwEHZj4TeXYdJLU7icTK7NRxT1h" ], "script": "base64:BgIbCAISBQoDCAEBEgUKAwgBARIDCgEIEgQKAggBSwAGRVVMRVI4ANaJz4EBAAVNVUxUNgDAhD0ABk1VTFRYNgkAtgIBAMCEPQAFTVVMVDgAgMLXLwAGTVVMVFg4CQC2AgEAgMLXLwAGTVVMVDEyAICglKWNHQAGTVVMVDE4CQC2AgEAgICQu7rWrfANAANTRVACAl9fAAdXQVZFU0lECQDZBAECBVdBVkVTARJrZXlOZXV0cmlub0Fzc2V0SWQAAhFuZXV0cmlub19hc3NldF9pZAEOa2V5TnNidEFzc2V0SWQAAg1ib25kX2Fzc2V0X2lkAQ5rZXlTdXJmQXNzZXRJZAACDXN1cmZfYXNzZXRfaWQBEGtleUJhbGFuY2VMb2NrZWQAAg1iYWxhbmNlX2xvY2tfARVrZXlXYXZlc0xvY2tlZEJhbGFuY2UACQCsAgIJARBrZXlCYWxhbmNlTG9ja2VkAAIFd2F2ZXMBGGtleU5ldXRyaW5vTG9ja2VkQmFsYW5jZQAJAKwCAgkBEGtleUJhbGFuY2VMb2NrZWQAAghuZXV0cmlubwEVa2V5TWluV2F2ZXNTd2FwQW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cEBRNuc2J0U3Rha2luZ0NvbnRyYWN0AhZuc2J0U3Rha2luZ1NZU1JFQURPTkxZCQDMCAIFFHVzZXJBZGRyZXNzTWFuZGF0b3J5CQDMCAIFCW5ld0Ftb3VudAUDbmlsBQNuaWwEB2Ftb3VudDAJAQVhc0ludAEJAJEDAgUIbnNidERhdGEAAAQLc3RhcnRIZWlnaHQDCQBnAgAABQdhbW91bnQwAP///////////wEJAQVhc0ludAEJAJEDAgUIbnNidERhdGEAAgQOc3RhcnRUaW1lc3RhbXAJAQt0b1RpbWVzdGFtcAEFC3N0YXJ0SGVpZ2h0BA5zdGFydEhlaWdodE5ldwMJAGcCAAAFCW5ld0Ftb3VudAULc3RhcnRIZWlnaHQECGhhbGZMaWZlCQEMZ2V0SW50T3JGYWlsAgUTbnNidFN0YWtpbmdDb250cmFjdAkBC2tleUhhbGZMaWZlAAkBBWFzSW50AQkA/AcEBQxtYXRoQ29udHJhY3QCE21lcmdlU3Rha2VzUkVBRE9OTFkJAMwIAgUHYW1vdW50MAkAzAgCBQtzdGFydEhlaWdodAkAzAgCBQluZXdBbW91bnQJAMwIAgUGaGVpZ2h0CQDMCAIFCGhhbGZMaWZlBQNuaWwFA25pbAQRc3RhcnRUaW1lc3RhbXBOZXcJAQt0b1RpbWVzdGFtcAEFDnN0YXJ0SGVpZ2h0TmV3CQCUCgIFA25pbAkAuQkCCQDMCAICCCVkJWQlZCVkCQDMCAIJAKQDAQULc3RhcnRIZWlnaHQJAMwIAgkApAMBBQ5zdGFydFRpbWVzdGFtcAkAzAgCCQCkAwEFDnN0YXJ0SGVpZ2h0TmV3CQDMCAIJAKQDAQURc3RhcnRUaW1lc3RhbXBOZXcFA25pbAUDU0VQAOMtR1c=", "chainId": 84, "height": 2174191, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4yGBFopN3CMNGQ7pDAkPH3cZ2Ya6Kf3ToW1WtiVHUCcw Next: 2UPWzEthLc4tbnzamUSxx9mR5aWCx1Ftg6Fg4NpfSbR8 Diff:
OldNewDifferences
276276 let gnsbtFromSurfTotal = asInt(surfData[3])
277277 let gnsbtFromNsbtTotalNEW = (gnsbtFromNsbtTotal + gnsbtFromNsbtDiff)
278278 let gnsbtFromSurfTotalNEW = (gnsbtFromSurfTotal + gnsbtFromSurfDiff)
279- let votingPower = fraction(gnsbtAmtFromNsbt, MULT6, (gnsbtFromNsbtTotal + gnsbtFromSurfTotal))
280- let votingPowerNew = fraction(gnsbtAmtFromNsbtNEW, MULT6, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfTotal))
281- let votingPowerMax = fraction((gnsbtAmtFromNsbt + gnsbtAmtFromSurf), MULT6, (gnsbtFromNsbtTotal + gnsbtFromSurfTotal))
282- let votingPowerMaxNew = fraction((gnsbtAmtFromNsbtNEW + gnsbtAmtFromSurfNEW), MULT6, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfTotalNEW))
279+ let votingPower = fraction(gnsbtAmtFromNsbt, MULT8, (gnsbtFromNsbtTotal + gnsbtFromSurfTotal))
280+ let votingPowerNew = fraction(gnsbtAmtFromNsbtNEW, MULT8, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfTotal))
281+ let votingPowerMax = fraction((gnsbtAmtFromNsbt + gnsbtAmtFromSurf), MULT8, (gnsbtFromNsbtTotal + gnsbtFromSurfTotal))
282+ let votingPowerMaxNew = fraction((gnsbtAmtFromNsbtNEW + gnsbtAmtFromSurfNEW), MULT8, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfTotalNEW))
283283 let votingPowerEta = if ((vpEffectiveHeight == 0))
284284 then height
285285 else vpEffectiveHeight
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 gnsbtInfoINTERNAL (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)
234234 let swapParamsTuple = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, 0], nil))
235235 let limitMaxUsdn = swapParamsTuple._1
236236 let limitSpent = swapParamsTuple._2
237237 let blcks2LmtReset = swapParamsTuple._3
238238 let gnsbtAmt = swapParamsTuple._4
239239 let gnsbtAmtTotal = swapParamsTuple._5
240240 let swapParamsTupleNEW = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOrEmpty, gNsbtDiff], nil))
241241 let limitMaxUsdnNEW = swapParamsTupleNEW._1
242242 let limitSpentNEW = swapParamsTupleNEW._2
243243 let blcks2LmtResetNEW = swapParamsTupleNEW._3
244244 let gnsbtAmtNEW = swapParamsTupleNEW._4
245245 let gnsbtAmtTotalNEW = swapParamsTupleNEW._5
246246 let limitMaxWaves = convertNeutrinoToWaves(limitMaxUsdn, currentPrice)
247247 let limitMaxWavesNEW = convertNeutrinoToWaves(limitMaxUsdnNEW, currentPrice)
248248 let nsbtBalance = if ((userAddressStrOrEmpty != ""))
249249 then assetBalance(userAddressOrThis, nsbtAssetId)
250250 else 0
251251 let surfBalance = if ((userAddressStrOrEmpty != ""))
252252 then assetBalance(userAddressOrThis, surfAssetId)
253253 else 0
254254 let nsbtBalanceDiff = if ((additionalNsbtToStakeOrZero >= 0))
255255 then additionalNsbtToStakeOrZero
256256 else {
257257 let nsbtUnstakingData = asAnyList(invoke(nsbtStakingContract, "nsbtUnstakingSYSREADONLY", [userAddressStrOrEmpty, (-1 * additionalNsbtToStakeOrZero)], nil))
258258 let nsbtReceiveAmount = asInt(nsbtUnstakingData[2])
259259 let result = -(nsbtReceiveAmount)
260260 result
261261 }
262262 let nsbtBalanceNew = (nsbtBalance - nsbtBalanceDiff)
263263 let surfBalanceNew = (surfBalance - additionalSurfToStakeOrZero)
264264 let gnsbtData = asAnyList(invoke(gnsbtControllerContract, "gnsbtInfoSYSREADONLY", [userAddressStrOrEmpty, additionalNsbtToStakeOrZero, additionalSurfToStakeOrZero], nil))
265265 let gnsbtUser = asInt(gnsbtData[0])
266266 let gnsbtTotal = asInt(gnsbtData[1])
267267 let nsbtData = asAnyList(gnsbtData[2])
268268 let surfData = asAnyList(gnsbtData[3])
269269 let vpEffectiveHeight = asInt(gnsbtData[4])
270270 let vpEffectiveHeightNEW = asInt(gnsbtData[5])
271271 let gnsbtAmtFromNsbt = asInt(nsbtData[2])
272272 let gnsbtAmtFromSurf = asInt(surfData[2])
273273 let gnsbtAmtFromNsbtNEW = (gnsbtAmtFromNsbt + gnsbtFromNsbtDiff)
274274 let gnsbtAmtFromSurfNEW = (gnsbtAmtFromSurf + gnsbtFromSurfDiff)
275275 let gnsbtFromNsbtTotal = asInt(nsbtData[3])
276276 let gnsbtFromSurfTotal = asInt(surfData[3])
277277 let gnsbtFromNsbtTotalNEW = (gnsbtFromNsbtTotal + gnsbtFromNsbtDiff)
278278 let gnsbtFromSurfTotalNEW = (gnsbtFromSurfTotal + gnsbtFromSurfDiff)
279- let votingPower = fraction(gnsbtAmtFromNsbt, MULT6, (gnsbtFromNsbtTotal + gnsbtFromSurfTotal))
280- let votingPowerNew = fraction(gnsbtAmtFromNsbtNEW, MULT6, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfTotal))
281- let votingPowerMax = fraction((gnsbtAmtFromNsbt + gnsbtAmtFromSurf), MULT6, (gnsbtFromNsbtTotal + gnsbtFromSurfTotal))
282- let votingPowerMaxNew = fraction((gnsbtAmtFromNsbtNEW + gnsbtAmtFromSurfNEW), MULT6, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfTotalNEW))
279+ let votingPower = fraction(gnsbtAmtFromNsbt, MULT8, (gnsbtFromNsbtTotal + gnsbtFromSurfTotal))
280+ let votingPowerNew = fraction(gnsbtAmtFromNsbtNEW, MULT8, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfTotal))
281+ let votingPowerMax = fraction((gnsbtAmtFromNsbt + gnsbtAmtFromSurf), MULT8, (gnsbtFromNsbtTotal + gnsbtFromSurfTotal))
282+ let votingPowerMaxNew = fraction((gnsbtAmtFromNsbtNEW + gnsbtAmtFromSurfNEW), MULT8, (gnsbtFromNsbtTotalNEW + gnsbtFromSurfTotalNEW))
283283 let votingPowerEta = if ((vpEffectiveHeight == 0))
284284 then height
285285 else vpEffectiveHeight
286286 let votingPowerEtaNew = if ((vpEffectiveHeightNEW == 0))
287287 then height
288288 else vpEffectiveHeightNEW
289289 $Tuple2(nil, [0, nsbtBalance, surfBalance, nsbtBalanceNew, surfBalanceNew, gnsbtAmtFromNsbt, gnsbtAmtFromSurf, gnsbtAmtFromNsbtNEW, gnsbtAmtFromSurfNEW, gnsbtFromNsbtTotal, gnsbtFromSurfTotal, gnsbtFromNsbtTotalNEW, gnsbtFromSurfTotalNEW, limitMaxUsdn, limitMaxWaves, limitMaxUsdnNEW, limitMaxWavesNEW, blcks2LmtReset, blcks2LmtResetNEW, votingPower, votingPowerNew, votingPowerMax, votingPowerMaxNew, votingPowerEta, votingPowerEtaNew])
290290 }
291291
292292
293293
294294 @Callable(i)
295295 func gnsbtInfoREADONLY (userAddressStrOrEmpty,additionalNsbtToStakeOrZero,additionalSurfToStakeOrZero) = {
296296 let gnsbtInfoDATA = asAnyList(invoke(this, "gnsbtInfoINTERNAL", [userAddressStrOrEmpty, additionalNsbtToStakeOrZero, additionalSurfToStakeOrZero], nil))
297297 $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(asInt(gnsbtInfoDATA[1])), toString(asInt(gnsbtInfoDATA[2])), toString(asInt(gnsbtInfoDATA[3])), toString(asInt(gnsbtInfoDATA[4])), toString(asInt(gnsbtInfoDATA[5])), toString(asInt(gnsbtInfoDATA[6])), toString(asInt(gnsbtInfoDATA[7])), toString(asInt(gnsbtInfoDATA[8])), toString(asInt(gnsbtInfoDATA[9])), toString(asInt(gnsbtInfoDATA[10])), toString(asInt(gnsbtInfoDATA[11])), toString(asInt(gnsbtInfoDATA[12])), toString(asInt(gnsbtInfoDATA[13])), toString(asInt(gnsbtInfoDATA[14])), toString(asInt(gnsbtInfoDATA[15])), toString(asInt(gnsbtInfoDATA[16])), toString(asInt(gnsbtInfoDATA[17])), toString(asInt(gnsbtInfoDATA[18])), toString(asInt(gnsbtInfoDATA[19])), toString(asInt(gnsbtInfoDATA[20])), toString(asInt(gnsbtInfoDATA[21])), toString(asInt(gnsbtInfoDATA[22])), toString(asInt(gnsbtInfoDATA[23])), toString(asInt(gnsbtInfoDATA[24]))], SEP))
298298 }
299299
300300
301301
302302 @Callable(i)
303303 func rewardInfoREADONLY (userAddressStrOrEmpty) = {
304304 let rewardsData = asAnyList(invoke(gnsbtControllerContract, "gnsbtRewardsSYSREADONLY", [userAddressStrOrEmpty], nil))
305305 $Tuple2(nil, makeString(["%s%s", asString(rewardsData[0]), asString(rewardsData[1])], SEP))
306306 }
307307
308308
309309
310310 @Callable(i)
311311 func mergeNsbtREADONLY (userAddressMandatory,newAmount) = {
312312 let nsbtData = asAnyList(invoke(nsbtStakingContract, "nsbtStakingSYSREADONLY", [userAddressMandatory, newAmount], nil))
313313 let amount0 = asInt(nsbtData[0])
314314 let startHeight = if ((0 >= amount0))
315315 then -1
316316 else asInt(nsbtData[2])
317317 let startTimestamp = toTimestamp(startHeight)
318318 let startHeightNew = if ((0 >= newAmount))
319319 then startHeight
320320 else {
321321 let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
322322 asInt(invoke(mathContract, "mergeStakesREADONLY", [amount0, startHeight, newAmount, height, halfLife], nil))
323323 }
324324 let startTimestampNew = toTimestamp(startHeightNew)
325325 $Tuple2(nil, makeString(["%d%d%d%d", toString(startHeight), toString(startTimestamp), toString(startHeightNew), toString(startTimestampNew)], SEP))
326326 }
327327
328328

github/deemru/w8io/026f985 
40.62 ms