tx · HnE1Q7LppwJ5sCNnEewKf2cgyQpK9ZC2gtoBJo6DpPeF

3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi:  -0.01400000 Waves

2022.03.09 12:29 [1956239] smart account 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi > SELF 0.00000000 Waves

{ "type": 13, "id": "HnE1Q7LppwJ5sCNnEewKf2cgyQpK9ZC2gtoBJo6DpPeF", "fee": 1400000, "feeAssetId": null, "timestamp": 1646818284237, "version": 1, "sender": "3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi", "senderPublicKey": "BwVRZtTzoCigEsffCvQ9uo7WvkoBNNGVjX4nat5X5zyQ", "proofs": [ "EY8mJhFd9jtJMLL2o89oT7ssbiJsvQ3VMRfJVhfVjLTLAZQLDDH83FFpCA3EKD22aiuEhHShwZFD34g3kqbEQiL" ], "script": "base64:AAIFAAAAAAAAACgIAhIFCgMICAgSABIDCgEIEgMKAQgSAwoBARIGCgQBAQEBEgQKAgEBAAAAPAAAAAAIUFJJQ0VMRVQAAAAAAAAPQkAAAAAACU1VTFRTQ0FMRQAAAAAAAAAACAAAAAALRVVMRVJOVU1CRVIAAAAAABAzxNYAAAAABnNjYWxlNgAAAAAAAA9CQAAAAAAMc2NhbGU2QmlnSW50CQABNgAAAAEAAAAAAAAPQkAAAAAABnNjYWxlOAAAAAAABfXhAAAAAAAMc2NhbGU4QmlnSW50CQABNgAAAAEAAAAAAAX14QAAAAAAB3NjYWxlMTIAAAAA6NSlEAAAAAAAB3NjYWxlMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwEAAAASa2V5TmV1dHJpbm9BZGRyZXNzAAAAAAIAAAAdJXMlc19fY29uZmlnX19uZXV0cmlub0FkZHJlc3MBAAAAEmtleU5ldXRyaW5vQXNzZXRJZAAAAAACAAAAEW5ldXRyaW5vX2Fzc2V0X2lkAQAAAB1rZXlMaXF1aWRhdGlvbkNvbnRyYWN0QWRkcmVzc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VsZi4AAAAAUmcndw==", "chainId": 84, "height": 1956239, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 636CdSY99X3LmJrb26DDpuVVQjYk6A66ThE9dSjpiZoF Next: 5Tx9hXk2YhPaxGXQMZV8RWqFsTXJiUTdqbvUcvVxuoyW Diff:
OldNewDifferences
1414 let scale8 = 100000000
1515
1616 let scale8BigInt = toBigInt(100000000)
17+
18+let scale12 = 1000000000000
1719
1820 let scale18 = toBigInt(1000000000000000000)
1921
9294
9395
9496 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
97+
98+
99+func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP)
95100
96101
97102 func keyMinLockAmount () = "%s__minLockAmount"
198203 let maxNsbtSupply = asInt(neutrinoMetrics[10])
199204 let nsbt2usdnPrice = asInt(prices[0])
200205 let nsbt2wavesPrice = asInt(prices[1])
201- let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
202- let minNsbtsell = getIntegerValue(auctionContract, keyMinNsbtSell())
203- $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)], SEP))
206+ let minWaves4NsbtBuy = getIntOrFail(auctionContract, keyMinWavesForNsbtBuy())
207+ let minNsbtsell = getIntOrFail(auctionContract, keyMinNsbtSell())
208+ let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount())
209+ $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))
204210 }
205211 else throw("Strict value is not equal to itself.")
206212 }
218224 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
219225 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
220226 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
221- let $t078948973 = if ((userAddressStr == ""))
227+ let $t081579236 = if ((userAddressStr == ""))
222228 then $Tuple4(0, 0, 0, 0)
223229 else {
224230 let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
239245 }
240246 else throw("Strict value is not equal to itself.")
241247 }
242- let quickSwapUserSpent = $t078948973._1
243- let blocks2LimitReset = $t078948973._2
244- let maxUsdnLimit = $t078948973._3
245- let maxWavesLimit = $t078948973._4
248+ let quickSwapUserSpent = $t081579236._1
249+ let blocks2LimitReset = $t081579236._2
250+ let maxUsdnLimit = $t081579236._3
251+ let maxWavesLimit = $t081579236._4
246252 $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))
247253 }
248254
250256
251257 @Callable(i)
252258 func gnsbtInfoREADONLY (userAddressStr) = {
253- let gnsbtShare = 10000
259+ let gnsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
260+ let gnsbtTotal = valueOrElse(getInteger(nsbtStakingContract, keyLockParamTotalAmount()), 0)
261+ let gnsbtShare = fraction((gnsbtAmount * 100), scale12, gnsbtTotal)
254262 let claimedTotalInUsdn = 10000
255263 let claimedUsdn = 10000
256264 let claimedWaves = 10000
257265 let unclaimedTotalInUsdn = 10000
258266 let unclaimedUsdn = 10000
259267 let unclaimedWaves = 10000
260- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP))
268+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(gnsbtAmount), toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP))
261269 }
262270
263271
295303
296304
297305 @Callable(i)
298-func minStakedAmountREADONLY () = $Tuple2(nil, makeString(["%d", toString(getIntOrFail(nsbtStakingContract, keyMinLockAmount()))], SEP))
299-
300-
301-
302-@Callable(i)
303306 func mergedStakeREADONLY (amount1,height1,amount2,height2) = {
304307 let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil))
305308 if ((h == h))
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)
17+
18+let scale12 = 1000000000000
1719
1820 let scale18 = toBigInt(1000000000000000000)
1921
2022 let SEP = "__"
2123
2224 func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress"
2325
2426
2527 func keyNeutrinoAssetId () = "neutrino_asset_id"
2628
2729
2830 func keyLiquidationContractAddress () = "liquidation_contract"
2931
3032
3133 func keyRPDContract () = "rpd_contract"
3234
3335
3436 func keyAuctionContract () = "auction_contract"
3537
3638
3739 func keyContolContract () = "control_contract"
3840
3941
4042 func keyBondAssetId () = "bond_asset_id"
4143
4244
4345 func keyBalanceLocked () = "balance_lock_"
4446
4547
4648 func keyWavesLockedBalance () = (keyBalanceLocked() + "waves")
4749
4850
4951 func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino")
5052
5153
5254 func keyMinWavesSwapAmount () = "min_waves_swap_amount"
5355
5456
5557 func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount"
5658
5759
5860 func keyWavesOutFeePart () = "wavesOut_swap_feePart"
5961
6062
6163 func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart"
6264
6365
6466 func keyNsbtLockContract () = "%s__nsbtLockContract"
6567
6668
6769 func keyMathContract () = "%s__mathContract"
6870
6971
7072 func keyQuickSwapLimitDuration () = "%s__quickSwapLimitDuration"
7173
7274
7375 func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP)
7476
7577
7678 func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP)
7779
7880
7981 func keyBalanceWavesLockInterval () = "balance_waves_lock_interval"
8082
8183
8284 func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval"
8385
8486
8587 func keySwapsTimeframe () = "swaps_timeframe"
8688
8789
8890 func keyPrice () = "price"
8991
9092
9193 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP)
9294
9395
9496 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
97+
98+
99+func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP)
95100
96101
97102 func keyMinLockAmount () = "%s__minLockAmount"
98103
99104
100105 func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy"
101106
102107
103108 func keyMinNsbtSell () = "min_nsbt_sell"
104109
105110
106111 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
107112
108113
109114 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
110115
111116
112117 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
113118
114119
115120 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), scale8, scale6)
116121
117122
118123 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), scale6, scale8)
119124
120125
121126 func asAnyList (val) = match val {
122127 case valAnyList: List[Any] =>
123128 valAnyList
124129 case _ =>
125130 throw("fail to cast into List[Any]")
126131 }
127132
128133
129134 func asInt (val) = match val {
130135 case valInt: Int =>
131136 valInt
132137 case _ =>
133138 throw("fail to cast into Int")
134139 }
135140
136141
137142 func asString (val) = match val {
138143 case valStr: String =>
139144 valStr
140145 case _ =>
141146 throw("fail to cast into String")
142147 }
143148
144149
145150 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
146151
147152
148153 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
149154
150155
151156 let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress()))
152157
153158 let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract()))
154159
155160 let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract()))
156161
157162 let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress())
158163
159164 let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract())
160165
161166 let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract()))
162167
163168 let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract()))
164169
165170 let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
166171
167172 let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
168173
169174 let nsbtAssetIdStr = getStringValue(neutrinoContract, keyBondAssetId())
170175
171176 let nsbtAssetId = fromBase58String(nsbtAssetIdStr)
172177
173178 @Callable(i)
174179 func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this))
175180 then throw("not authorized")
176181 else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)]
177182
178183
179184
180185 @Callable(i)
181186 func neutrinoStatsREADONLY () = {
182187 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
183188 if ((neutrinoMetrics == neutrinoMetrics))
184189 then {
185190 let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH", nil, nil))
186191 if ((prices == prices))
187192 then {
188193 let currentPrice = asInt(neutrinoMetrics[0])
189194 let neutrinoLockedBalance = asInt(neutrinoMetrics[1])
190195 let wavesLockedBalance = asInt(neutrinoMetrics[2])
191196 let reservesInWaves = asInt(neutrinoMetrics[3])
192197 let reservesInUsdn = asInt(neutrinoMetrics[4])
193198 let neutrinoSupply = asInt(neutrinoMetrics[5])
194199 let surplus = asInt(neutrinoMetrics[6])
195200 let surplusPercent = asInt(neutrinoMetrics[7])
196201 let BR = asInt(neutrinoMetrics[8])
197202 let nsbtSupply = asInt(neutrinoMetrics[9])
198203 let maxNsbtSupply = asInt(neutrinoMetrics[10])
199204 let nsbt2usdnPrice = asInt(prices[0])
200205 let nsbt2wavesPrice = asInt(prices[1])
201- let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
202- let minNsbtsell = getIntegerValue(auctionContract, keyMinNsbtSell())
203- $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)], SEP))
206+ let minWaves4NsbtBuy = getIntOrFail(auctionContract, keyMinWavesForNsbtBuy())
207+ let minNsbtsell = getIntOrFail(auctionContract, keyMinNsbtSell())
208+ let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount())
209+ $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))
204210 }
205211 else throw("Strict value is not equal to itself.")
206212 }
207213 else throw("Strict value is not equal to itself.")
208214 }
209215
210216
211217
212218 @Callable(i)
213219 func swapInfoREADONLY (userAddressStr) = {
214220 let currentPrice = getIntegerValue(controlContract, keyPrice())
215221 let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount())
216222 let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount())
217223 let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart())
218224 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
219225 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
220226 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
221- let $t078948973 = if ((userAddressStr == ""))
227+ let $t081579236 = if ((userAddressStr == ""))
222228 then $Tuple4(0, 0, 0, 0)
223229 else {
224230 let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
225231 let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil))
226232 if ((usdnLmtMax == usdnLmtMax))
227233 then {
228234 let quickSwapResetBlocks = valueOrElse(getInteger(neutrinoContract, keySwapsTimeframe()), 1440)
229235 let lastQuickSwapBlock = valueOrElse(getInteger(neutrinoContract, keyUserLastQuickSwapHeight(userAddressStr)), 0)
230236 let isNewQuickSwapPeriod = ((height - lastQuickSwapBlock) > quickSwapResetBlocks)
231237 let quickSwapUserSpent = if (isNewQuickSwapPeriod)
232238 then 0
233239 else valueOrElse(getInteger(neutrinoContract, keyQuickSwapUserSpentInPeriod(userAddressStr)), 0)
234240 let blcks2LmtReset = if (isNewQuickSwapPeriod)
235241 then 0
236242 else (quickSwapResetBlocks - (height - lastQuickSwapBlock))
237243 let wavesLmtMax = convertNeutrinoToWaves(usdnLmtMax, currentPrice)
238244 $Tuple4(quickSwapUserSpent, blcks2LmtReset, usdnLmtMax, wavesLmtMax)
239245 }
240246 else throw("Strict value is not equal to itself.")
241247 }
242- let quickSwapUserSpent = $t078948973._1
243- let blocks2LimitReset = $t078948973._2
244- let maxUsdnLimit = $t078948973._3
245- let maxWavesLimit = $t078948973._4
248+ let quickSwapUserSpent = $t081579236._1
249+ let blocks2LimitReset = $t081579236._2
250+ let maxUsdnLimit = $t081579236._3
251+ let maxWavesLimit = $t081579236._4
246252 $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))
247253 }
248254
249255
250256
251257 @Callable(i)
252258 func gnsbtInfoREADONLY (userAddressStr) = {
253- let gnsbtShare = 10000
259+ let gnsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
260+ let gnsbtTotal = valueOrElse(getInteger(nsbtStakingContract, keyLockParamTotalAmount()), 0)
261+ let gnsbtShare = fraction((gnsbtAmount * 100), scale12, gnsbtTotal)
254262 let claimedTotalInUsdn = 10000
255263 let claimedUsdn = 10000
256264 let claimedWaves = 10000
257265 let unclaimedTotalInUsdn = 10000
258266 let unclaimedUsdn = 10000
259267 let unclaimedWaves = 10000
260- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP))
268+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(gnsbtAmount), toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP))
261269 }
262270
263271
264272
265273 @Callable(i)
266274 func buyNsbtREADONLY (wavesPay) = {
267275 let minWavesAmountNsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
268276 if ((minWavesAmountNsbtBuy > wavesPay))
269277 then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected"))
270278 else {
271279 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
272280 if ((neutrinoMetrics == neutrinoMetrics))
273281 then {
274282 let currentPrice = asInt(neutrinoMetrics[0])
275283 let reserve = asInt(neutrinoMetrics[3])
276284 let neutrinoSupply = asInt(neutrinoMetrics[5])
277285 let nsbtSupply = asInt(neutrinoMetrics[9])
278286 let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity
279287 let curveResult = asAnyList(invoke(mathContract, "curveFunctionMATH", [reserve, neutrinoSupply, currentPrice, nsbtSupplyMAX, nsbtSupply, wavesPay], nil))
280288 if ((curveResult == curveResult))
281289 then {
282290 let nsbtAmount = asInt(curveResult[0])
283291 if ((0 >= nsbtAmount))
284292 then throw("nsbtAmount <= 0")
285293 else if ((wavesPay > (nsbtAmount * 9223372)))
286294 then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(wavesPay)) + "/") + toString(nsbtAmount)))
287295 else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP))
288296 }
289297 else throw("Strict value is not equal to itself.")
290298 }
291299 else throw("Strict value is not equal to itself.")
292300 }
293301 }
294302
295303
296304
297305 @Callable(i)
298-func minStakedAmountREADONLY () = $Tuple2(nil, makeString(["%d", toString(getIntOrFail(nsbtStakingContract, keyMinLockAmount()))], SEP))
299-
300-
301-
302-@Callable(i)
303306 func mergedStakeREADONLY (amount1,height1,amount2,height2) = {
304307 let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil))
305308 if ((h == h))
306309 then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP))
307310 else throw("Strict value is not equal to itself.")
308311 }
309312
310313
311314
312315 @Callable(i)
313316 func unstakeComissionAmountREADONLY (amount,startHeight) = {
314317 let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
315318 if ((a == a))
316319 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
317320 else throw("Strict value is not equal to itself.")
318321 }
319322
320323

github/deemru/w8io/026f985 
71.02 ms