tx · 5w6yB7atnfi4C8gKGUUazXp8BHxm4Rf42kWZnHFkScM1

3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi:  -0.01400000 Waves

2022.03.16 11:20 [1966278] smart account 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi > SELF 0.00000000 Waves

{ "type": 13, "id": "5w6yB7atnfi4C8gKGUUazXp8BHxm4Rf42kWZnHFkScM1", "fee": 1400000, "feeAssetId": null, "timestamp": 1647418829889, "version": 1, "sender": "3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi", "senderPublicKey": "BwVRZtTzoCigEsffCvQ9uo7WvkoBNNGVjX4nat5X5zyQ", "proofs": [ "5KehVQfxNpDs6bqCeAZvw8GdZ2k1GniWeYgn3JoGzZStcjLbvTLPdNStXBqWAauN28T747ym4x11wBMzbvVUq1Ro" ], "script": "base64:AAIFAAAAAAAAAC8IAhIFCgMICAgSABIDCgEIEgQKAggBEgMKAQESBgoEAQEBARIECgIBARIECgIBCAAAAD0AAAAACFBSSUNFTEVUAAAAAAAAD0JAAAAAAAlNVUxUU0NBTEUAAAAAAAAAAAgAAAAAC0VVTEVSTlVNQkVSAAAAAAAQM8TWAAAAAAZzY2FsZTYAAAAAAAAPQkAAAAAADHNjYWxlNkJpZ0ludAkAATYAAAABAAAAAAAAD0JAAAAAAAZzY2FsZTgAAAAAAAX14QAAAAAADHNjYWxlOEJpZ0ludAkAATYAAAABAAAAAAAF9eEAAAAAAAdzY2FsZTEyAAAAAOjUpRAAAAAAAAdzY2FsZTE4CQABNgAAAAEADeC2s6dkAAAAAAAAA1NFUAIAAAACX18BAAAAEmtleU5ldXRyaW5vQWRkcmVzcwAAAAACAAAAHSVzJXNfX2NvbmZpZ19fbmV1dHJpbm9BZGRyZXNzAQAAABJrZXlOZXV0cmlub0Fzc2V0SWQAAAAAAgAAABFuZXV0cmlub19hc3NldF9pZAEAAAAda2V5TGlxdWlkYXRpb25Db250cmFjdEFkZHJlc3MAAAAAAgAA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AAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAFpAQAAACR1bnN0YWtlQ29taXNzaW9uQW1vdW50QnlVc2VyUkVBRE9OTFkAAAACAAAABmFtb3VudAAAAAt1c2VyQWRkcmVzcwQAAAAIaGFsZkxpZmUJAQAAAAxnZXRJbnRPckZhaWwAAAACBQAAABNuc2J0U3Rha2luZ0NvbnRyYWN0CQEAAAALa2V5SGFsZkxpZmUAAAAABAAAAAtzdGFydEhlaWdodAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAABNuc2J0U3Rha2luZ0NvbnRyYWN0CQEAAAAWa2V5TG9ja1BhcmFtU3RhcnRCbG9jawAAAAEFAAAAC3VzZXJBZGRyZXNzBQAAAAZoZWlnaHQEAAAAAWEJAQAAAAVhc0ludAAAAAEJAAP8AAAABAUAAAAMbWF0aENvbnRyYWN0AgAAACFnZXRVbnN0YWtlQ29taXNzaW9uQW1vdW50UkVBRE9OTFkJAARMAAAAAgUAAAAGYW1vdW50CQAETAAAAAIFAAAAC3N0YXJ0SGVpZ2h0CQAETAAAAAIFAAAACGhhbGZMaWZlBQAAAANuaWwFAAAAA25pbAMJAAAAAAAAAgUAAAABYQUAAAABYQkABRQAAAACBQAAAANuaWwJAAS5AAAAAgkABEwAAAACAgAAAAIlZAkABEwAAAACCQABpAAAAAEFAAAAAWEFAAAAA25pbAUAAAADU0VQCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAADrYN1Z", "chainId": 84, "height": 1966278, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FUobVWrWarjW3TKUwg7x2vaBevKRCTP16wEYoBj81kXF Next: G8CTqEpwfL75GH2F9X1nqLzry9UMFnbXMb8MwVZWEU3q Diff:
OldNewDifferences
9696 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
9797
9898
99+func keyHalfLife () = "%s__halfLife"
100+
101+
99102 func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP)
100103
101104
184187
185188 @Callable(i)
186189 func neutrinoStatsREADONLY () = {
187- let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
190+ let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
188191 if ((neutrinoMetrics == neutrinoMetrics))
189192 then {
190- let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH", nil, nil))
193+ let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceREADONLY", nil, nil))
191194 if ((prices == prices))
192195 then {
193196 let currentPrice = asInt(neutrinoMetrics[0])
224227 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
225228 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
226229 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
227- let $t081589237 = if ((userAddressStr == ""))
230+ let $t082019284 = if ((userAddressStr == ""))
228231 then $Tuple4(0, 0, 0, 0)
229232 else {
230233 let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
231- let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil))
234+ let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [userGNsbtAmount], nil))
232235 if ((usdnLmtMax == usdnLmtMax))
233236 then {
234237 let quickSwapResetBlocks = valueOrElse(getInteger(neutrinoContract, keySwapsTimeframe()), 1440)
245248 }
246249 else throw("Strict value is not equal to itself.")
247250 }
248- let quickSwapUserSpent = $t081589237._1
249- let blocks2LimitReset = $t081589237._2
250- let maxUsdnLimit = $t081589237._3
251- let maxWavesLimit = $t081589237._4
251+ let quickSwapUserSpent = $t082019284._1
252+ let blocks2LimitReset = $t082019284._2
253+ let maxUsdnLimit = $t082019284._3
254+ let maxWavesLimit = $t082019284._4
252255 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(minWavesSwapAmt), toString(minUsdnSwapAmt), toString(waves2UsdnFee), toString(usdn2WavesFee), toString(usdnSwapDelayDuration), toString(wavesSwapDelayDuration), toString(blocks2LimitReset), toString(maxWavesLimit), toString(maxUsdnLimit), toString(quickSwapUserSpent)], SEP))
253256 }
254257
270273 let maxWavesLimit = 10000000000
271274 let maxUsdnLimitNew = 1100000000
272275 let maxWavesLimitNew = 11000000000
273- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(gnsbtAmount), toString(gnsbtAmountNew), toString(gnsbtShare), toString(gnsbtShareNew), toString(maxUsdnLimit), toString(maxWavesLimit), toString(maxUsdnLimitNew), toString(maxWavesLimitNew)], SEP))
276+ let rewardInfo = asString(invoke(nsbtStakingContract, "unclaimedRewardsREADONLY", [userAddressStrOrEmpty], nil))
277+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%s", toString(gnsbtAmount), toString(gnsbtAmountNew), toString(gnsbtShare), toString(gnsbtShareNew), toString(maxUsdnLimit), toString(maxWavesLimit), toString(maxUsdnLimitNew), toString(maxWavesLimitNew), rewardInfo], SEP))
274278 }
275279
276280
281285 if ((minWavesAmountNsbtBuy > wavesPay))
282286 then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected"))
283287 else {
284- let curveResult = asAnyList(invoke(mathContract, "curveFunctionMATH", [wavesPay], nil))
288+ let curveResult = asAnyList(invoke(mathContract, "curveFunctionREADONLY", [wavesPay], nil))
285289 if ((curveResult == curveResult))
286290 then {
287291 let nsbtAmount = asInt(curveResult[0])
299303
300304 @Callable(i)
301305 func mergedStakeREADONLY (amount1,height1,amount2,height2) = {
302- let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil))
306+ let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
307+ let h = asInt(invoke(mathContract, "mergeStakesREADONLY", [amount1, height1, amount2, height2], nil))
303308 if ((h == h))
304309 then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP))
305310 else throw("Strict value is not equal to itself.")
309314
310315 @Callable(i)
311316 func unstakeComissionAmountByHeightREADONLY (amount,startHeight) = {
312- let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
317+ let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
318+ let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil))
313319 if ((a == a))
314320 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
315321 else throw("Strict value is not equal to itself.")
319325
320326 @Callable(i)
321327 func unstakeComissionAmountByUserREADONLY (amount,userAddress) = {
328+ let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
322329 let startHeight = valueOrElse(getInteger(nsbtStakingContract, keyLockParamStartBlock(userAddress)), height)
323- let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
330+ let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil))
324331 if ((a == a))
325332 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
326333 else throw("Strict value is not equal to itself.")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let PRICELET = 1000000
55
66 let MULTSCALE = 8
77
88 let EULERNUMBER = 271828182
99
1010 let scale6 = 1000000
1111
1212 let scale6BigInt = toBigInt(1000000)
1313
1414 let scale8 = 100000000
1515
1616 let scale8BigInt = toBigInt(100000000)
1717
1818 let scale12 = 1000000000000
1919
2020 let scale18 = toBigInt(1000000000000000000)
2121
2222 let SEP = "__"
2323
2424 func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress"
2525
2626
2727 func keyNeutrinoAssetId () = "neutrino_asset_id"
2828
2929
3030 func keyLiquidationContractAddress () = "liquidation_contract"
3131
3232
3333 func keyRPDContract () = "rpd_contract"
3434
3535
3636 func keyAuctionContract () = "auction_contract"
3737
3838
3939 func keyContolContract () = "control_contract"
4040
4141
4242 func keyBondAssetId () = "bond_asset_id"
4343
4444
4545 func keyBalanceLocked () = "balance_lock_"
4646
4747
4848 func keyWavesLockedBalance () = (keyBalanceLocked() + "waves")
4949
5050
5151 func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino")
5252
5353
5454 func keyMinWavesSwapAmount () = "min_waves_swap_amount"
5555
5656
5757 func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount"
5858
5959
6060 func keyWavesOutFeePart () = "wavesOut_swap_feePart"
6161
6262
6363 func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart"
6464
6565
6666 func keyNsbtLockContract () = "%s__nsbtLockContract"
6767
6868
6969 func keyMathContract () = "%s__mathContract"
7070
7171
7272 func keyQuickSwapLimitDuration () = "%s__quickSwapLimitDuration"
7373
7474
7575 func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP)
7676
7777
7878 func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP)
7979
8080
8181 func keyBalanceWavesLockInterval () = "balance_waves_lock_interval"
8282
8383
8484 func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval"
8585
8686
8787 func keySwapsTimeframe () = "swaps_timeframe"
8888
8989
9090 func keyPrice () = "price"
9191
9292
9393 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP)
9494
9595
9696 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
9797
9898
99+func keyHalfLife () = "%s__halfLife"
100+
101+
99102 func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP)
100103
101104
102105 func keyMinLockAmount () = "%s__minLockAmount"
103106
104107
105108 func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy"
106109
107110
108111 func keyMinNsbtSell () = "min_nsbt_sell"
109112
110113
111114 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
112115
113116
114117 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
115118
116119
117120 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
118121
119122
120123 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), scale8, scale6)
121124
122125
123126 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), scale6, scale8)
124127
125128
126129 func asAnyList (val) = match val {
127130 case valAnyList: List[Any] =>
128131 valAnyList
129132 case _ =>
130133 throw("fail to cast into List[Any]")
131134 }
132135
133136
134137 func asInt (val) = match val {
135138 case valInt: Int =>
136139 valInt
137140 case _ =>
138141 throw("fail to cast into Int")
139142 }
140143
141144
142145 func asString (val) = match val {
143146 case valStr: String =>
144147 valStr
145148 case _ =>
146149 throw("fail to cast into String")
147150 }
148151
149152
150153 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
151154
152155
153156 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
154157
155158
156159 let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress()))
157160
158161 let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract()))
159162
160163 let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract()))
161164
162165 let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress())
163166
164167 let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract())
165168
166169 let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract()))
167170
168171 let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract()))
169172
170173 let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
171174
172175 let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
173176
174177 let nsbtAssetIdStr = getStringValue(neutrinoContract, keyBondAssetId())
175178
176179 let nsbtAssetId = fromBase58String(nsbtAssetIdStr)
177180
178181 @Callable(i)
179182 func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this))
180183 then throw("not authorized")
181184 else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)]
182185
183186
184187
185188 @Callable(i)
186189 func neutrinoStatsREADONLY () = {
187- let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
190+ let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
188191 if ((neutrinoMetrics == neutrinoMetrics))
189192 then {
190- let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH", nil, nil))
193+ let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceREADONLY", nil, nil))
191194 if ((prices == prices))
192195 then {
193196 let currentPrice = asInt(neutrinoMetrics[0])
194197 let neutrinoLockedBalance = asInt(neutrinoMetrics[1])
195198 let wavesLockedBalance = asInt(neutrinoMetrics[2])
196199 let reservesInWaves = asInt(neutrinoMetrics[3])
197200 let reservesInUsdn = asInt(neutrinoMetrics[4])
198201 let neutrinoSupply = asInt(neutrinoMetrics[5])
199202 let surplus = asInt(neutrinoMetrics[6])
200203 let surplusPercent = asInt(neutrinoMetrics[7])
201204 let BR = asInt(neutrinoMetrics[8])
202205 let nsbtSupply = asInt(neutrinoMetrics[9])
203206 let maxNsbtSupply = asInt(neutrinoMetrics[10])
204207 let nsbt2usdnPrice = asInt(prices[0])
205208 let nsbt2wavesPrice = asInt(prices[1])
206209 let minWaves4NsbtBuy = getIntOrFail(auctionContract, keyMinWavesForNsbtBuy())
207210 let minNsbtsell = getIntOrFail(auctionContract, keyMinNsbtSell())
208211 let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount())
209212 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(neutrinoLockedBalance), toString(wavesLockedBalance), toString(reservesInWaves), toString(reservesInUsdn), toString(neutrinoSupply), toString(surplus), toString(surplusPercent), toString(BR), toString(nsbtSupply), toString(maxNsbtSupply), toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), toString(minWaves4NsbtBuy), toString(minNsbtsell), toString(minNsbtLockAmt)], SEP))
210213 }
211214 else throw("Strict value is not equal to itself.")
212215 }
213216 else throw("Strict value is not equal to itself.")
214217 }
215218
216219
217220
218221 @Callable(i)
219222 func swapInfoREADONLY (userAddressStr) = {
220223 let currentPrice = getIntegerValue(controlContract, keyPrice())
221224 let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount())
222225 let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount())
223226 let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart())
224227 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
225228 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
226229 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
227- let $t081589237 = if ((userAddressStr == ""))
230+ let $t082019284 = if ((userAddressStr == ""))
228231 then $Tuple4(0, 0, 0, 0)
229232 else {
230233 let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
231- let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil))
234+ let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitREADONLY", [userGNsbtAmount], nil))
232235 if ((usdnLmtMax == usdnLmtMax))
233236 then {
234237 let quickSwapResetBlocks = valueOrElse(getInteger(neutrinoContract, keySwapsTimeframe()), 1440)
235238 let lastQuickSwapBlock = valueOrElse(getInteger(neutrinoContract, keyUserLastQuickSwapHeight(userAddressStr)), 0)
236239 let isNewQuickSwapPeriod = ((height - lastQuickSwapBlock) > quickSwapResetBlocks)
237240 let quickSwapUserSpent = if (isNewQuickSwapPeriod)
238241 then 0
239242 else valueOrElse(getInteger(neutrinoContract, keyQuickSwapUserSpentInPeriod(userAddressStr)), 0)
240243 let blcks2LmtReset = if (isNewQuickSwapPeriod)
241244 then 0
242245 else (quickSwapResetBlocks - (height - lastQuickSwapBlock))
243246 let wavesLmtMax = convertNeutrinoToWaves(usdnLmtMax, currentPrice)
244247 $Tuple4(quickSwapUserSpent, blcks2LmtReset, usdnLmtMax, wavesLmtMax)
245248 }
246249 else throw("Strict value is not equal to itself.")
247250 }
248- let quickSwapUserSpent = $t081589237._1
249- let blocks2LimitReset = $t081589237._2
250- let maxUsdnLimit = $t081589237._3
251- let maxWavesLimit = $t081589237._4
251+ let quickSwapUserSpent = $t082019284._1
252+ let blocks2LimitReset = $t082019284._2
253+ let maxUsdnLimit = $t082019284._3
254+ let maxWavesLimit = $t082019284._4
252255 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(minWavesSwapAmt), toString(minUsdnSwapAmt), toString(waves2UsdnFee), toString(usdn2WavesFee), toString(usdnSwapDelayDuration), toString(wavesSwapDelayDuration), toString(blocks2LimitReset), toString(maxWavesLimit), toString(maxUsdnLimit), toString(quickSwapUserSpent)], SEP))
253256 }
254257
255258
256259
257260 @Callable(i)
258261 func gnsbtInfoREADONLY (userAddressStrOrEmpty,additionalNsbtAmountOrZero) = {
259262 let gnsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStrOrEmpty)), 0)
260263 let gnsbtTotal = valueOrElse(getInteger(nsbtStakingContract, keyLockParamTotalAmount()), 0)
261264 let gnsbtAmountNew = (gnsbtAmount + additionalNsbtAmountOrZero)
262265 let gnsbtTotalNew = (gnsbtTotal + additionalNsbtAmountOrZero)
263266 let gnsbtShare = if ((gnsbtTotal != 0))
264267 then fraction((gnsbtAmount * 100), scale12, gnsbtTotal)
265268 else 0
266269 let gnsbtShareNew = if ((gnsbtTotalNew != 0))
267270 then fraction((gnsbtAmountNew * 100), scale12, gnsbtTotalNew)
268271 else 0
269272 let maxUsdnLimit = 1000000000
270273 let maxWavesLimit = 10000000000
271274 let maxUsdnLimitNew = 1100000000
272275 let maxWavesLimitNew = 11000000000
273- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(gnsbtAmount), toString(gnsbtAmountNew), toString(gnsbtShare), toString(gnsbtShareNew), toString(maxUsdnLimit), toString(maxWavesLimit), toString(maxUsdnLimitNew), toString(maxWavesLimitNew)], SEP))
276+ let rewardInfo = asString(invoke(nsbtStakingContract, "unclaimedRewardsREADONLY", [userAddressStrOrEmpty], nil))
277+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%s", toString(gnsbtAmount), toString(gnsbtAmountNew), toString(gnsbtShare), toString(gnsbtShareNew), toString(maxUsdnLimit), toString(maxWavesLimit), toString(maxUsdnLimitNew), toString(maxWavesLimitNew), rewardInfo], SEP))
274278 }
275279
276280
277281
278282 @Callable(i)
279283 func buyNsbtREADONLY (wavesPay) = {
280284 let minWavesAmountNsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
281285 if ((minWavesAmountNsbtBuy > wavesPay))
282286 then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected"))
283287 else {
284- let curveResult = asAnyList(invoke(mathContract, "curveFunctionMATH", [wavesPay], nil))
288+ let curveResult = asAnyList(invoke(mathContract, "curveFunctionREADONLY", [wavesPay], nil))
285289 if ((curveResult == curveResult))
286290 then {
287291 let nsbtAmount = asInt(curveResult[0])
288292 if ((0 >= nsbtAmount))
289293 then throw("nsbtAmount <= 0")
290294 else if ((wavesPay > (nsbtAmount * 9223372)))
291295 then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(wavesPay)) + "/") + toString(nsbtAmount)))
292296 else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP))
293297 }
294298 else throw("Strict value is not equal to itself.")
295299 }
296300 }
297301
298302
299303
300304 @Callable(i)
301305 func mergedStakeREADONLY (amount1,height1,amount2,height2) = {
302- let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil))
306+ let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
307+ let h = asInt(invoke(mathContract, "mergeStakesREADONLY", [amount1, height1, amount2, height2], nil))
303308 if ((h == h))
304309 then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP))
305310 else throw("Strict value is not equal to itself.")
306311 }
307312
308313
309314
310315 @Callable(i)
311316 func unstakeComissionAmountByHeightREADONLY (amount,startHeight) = {
312- let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
317+ let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
318+ let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil))
313319 if ((a == a))
314320 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
315321 else throw("Strict value is not equal to itself.")
316322 }
317323
318324
319325
320326 @Callable(i)
321327 func unstakeComissionAmountByUserREADONLY (amount,userAddress) = {
328+ let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
322329 let startHeight = valueOrElse(getInteger(nsbtStakingContract, keyLockParamStartBlock(userAddress)), height)
323- let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
330+ let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil))
324331 if ((a == a))
325332 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
326333 else throw("Strict value is not equal to itself.")
327334 }
328335
329336

github/deemru/w8io/026f985 
56.75 ms