tx · FGSr975LS85EETM9t5fSqMTrCSqm1CkbfTjD49RhZbqx

3MuAPY3jP4q2AoNYX27B5BU9EoLU77mr7pS:  -0.02000000 Waves

2022.02.24 18:44 [1937933] smart account 3MuAPY3jP4q2AoNYX27B5BU9EoLU77mr7pS > SELF 0.00000000 Waves

{ "type": 13, "id": "FGSr975LS85EETM9t5fSqMTrCSqm1CkbfTjD49RhZbqx", "fee": 2000000, "feeAssetId": null, "timestamp": 1645717532745, "version": 1, "sender": "3MuAPY3jP4q2AoNYX27B5BU9EoLU77mr7pS", "senderPublicKey": "rqCnkHfz5ix6HNKiVvYE3URUtLs6f2nWzt4hpdGGQdm", "proofs": [ "uXLLodcAfKrYCEHsukbd8yV9GdTVne7qdS2ANgE8TEm3k6nKNebiGoXkYAoB5QswSfBMXfVFWA3ejDiraiQ2yMm" ], "script": "base64:AAIFAAAAAAAAACoIAhIFCgMICAgSABIDCgEIEgMKAQgSAwoBARIAEgYKBAEBAQESBAoCAQEAAAA4AAAAAAhQUklDRUxFVAAAAAAAAA9CQAAAAAAJTVVMVFNDQUxFAAAAAAAAAAAIAAAAAAtFVUxFUk5VTUJFUgAAAAAAEDPE1gAAAAAGc2NhbGU2AAAAAAAAD0JAAAAAAAxzY2FsZTZCaWdJbnQJAAE2AAAAAQAAAAAAAA9CQAAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAxzY2FsZThCaWdJbnQJAAE2AAAAAQAAAAAABfXhAAAAAAAHc2NhbGUxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAQAAABJrZXlOZXV0cmlub0FkZHJlc3MAAAAAAgAAAB0lcyVzX19jb25maWdfX25ldXRyaW5vQWRkcmVzcwEAAAASa2V5TmV1dHJpbm9Bc3NldElkAAAAAAIAAAARbmV1dHJpbm9fYXNzZXRfaWQBAAAAHWtleUxpcXVpZGF0aW9uQ29udHJhY3RBZGRyZXNzAAAAAAIAAAAUbGlxdWlkYXRpb25fY29udHJhY3QBAAAADmtle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XRzZWxmLgAAAAFpAQAAAB51bnN0YWtlQ29taXNzaW9uQW1vdW50UkVBRE9OTFkAAAACAAAABmFtb3VudAAAAAtzdGFydEhlaWdodAQAAAABYQkBAAAABWFzSW50AAAAAQkAA/wAAAAEBQAAAAxtYXRoQ29udHJhY3QCAAAAHWdldFVuc3Rha2VDb21pc3Npb25BbW91bnRNQVRICQAETAAAAAIFAAAABmFtb3VudAkABEwAAAACBQAAAAtzdGFydEhlaWdodAUAAAADbmlsBQAAAANuaWwDCQAAAAAAAAIFAAAAAWEFAAAAAWEJAAUUAAAAAgUAAAADbmlsCQAEuQAAAAIJAARMAAAAAgIAAAACJWQJAARMAAAAAgkAAaQAAAABBQAAAAFhBQAAAANuaWwFAAAAA1NFUAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAA0C7ROA==", "chainId": 84, "height": 1937933, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BjQC1wRfmE3xTrYs2ZdEMVZJCUXqpeiBRqVKZ9AHgoVU Next: J67VZ78HLA4xxnUmbaMcSW6x4Zn1wJBqU7VWuQan7v4J Diff:
OldNewDifferences
175175 func neutrinoStatsREADONLY () = {
176176 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
177177 if ((neutrinoMetrics == neutrinoMetrics))
178- then {
179- let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH()", nil, nil))
180- if ((prices == prices))
181- then {
182- let currentPrice = asInt(neutrinoMetrics[1])
183- let neutrinoLockedBalance = asInt(neutrinoMetrics[2])
184- let wavesLockedBalance = asInt(neutrinoMetrics[3])
185- let reservesInWaves = asInt(neutrinoMetrics[4])
186- let reservesInUsdn = asInt(neutrinoMetrics[5])
187- let neutrinoSupply = asInt(neutrinoMetrics[6])
188- let surplus = asInt(neutrinoMetrics[7])
189- let surplusPercent = asInt(neutrinoMetrics[8])
190- let BR = asInt(neutrinoMetrics[9])
191- let nsbtSupply = asInt(neutrinoMetrics[10])
192- let maxNsbtSupply = asInt(neutrinoMetrics[11])
193- let nsbt2usdnPrice = asInt(prices[1])
194- let nsbt2wavesPrice = asInt(prices[2])
195- let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
196- $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)], SEP))
197- }
198- else throw("Strict value is not equal to itself.")
199- }
178+ then if (true)
179+ then throw(toString(asInt(neutrinoMetrics[1])))
180+ else {
181+ let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH()", nil, nil))
182+ if ((prices == prices))
183+ then {
184+ let currentPrice = asInt(neutrinoMetrics[1])
185+ let neutrinoLockedBalance = asInt(neutrinoMetrics[2])
186+ let wavesLockedBalance = asInt(neutrinoMetrics[3])
187+ let reservesInWaves = asInt(neutrinoMetrics[4])
188+ let reservesInUsdn = asInt(neutrinoMetrics[5])
189+ let neutrinoSupply = asInt(neutrinoMetrics[6])
190+ let surplus = asInt(neutrinoMetrics[7])
191+ let surplusPercent = asInt(neutrinoMetrics[8])
192+ let BR = asInt(neutrinoMetrics[9])
193+ let nsbtSupply = asInt(neutrinoMetrics[10])
194+ let maxNsbtSupply = asInt(neutrinoMetrics[11])
195+ let nsbt2usdnPrice = asInt(prices[1])
196+ let nsbt2wavesPrice = asInt(prices[2])
197+ let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
198+ $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)], SEP))
199+ }
200+ else throw("Strict value is not equal to itself.")
201+ }
200202 else throw("Strict value is not equal to itself.")
201203 }
202204
211213 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
212214 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
213215 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
214- let $t076788772 = if ((userAddressStr == ""))
216+ let $t077448838 = if ((userAddressStr == ""))
215217 then $Tuple4(0, 0, 0, 0)
216218 else {
217219 let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
236238 }
237239 else throw("Strict value is not equal to itself.")
238240 }
239- let quickSwapUserSpent = $t076788772._1
240- let blocks2LimitReset = $t076788772._2
241- let maxUsdnLimit = $t076788772._3
242- let maxWavesLimit = $t076788772._4
241+ let quickSwapUserSpent = $t077448838._1
242+ let blocks2LimitReset = $t077448838._2
243+ let maxUsdnLimit = $t077448838._3
244+ let maxWavesLimit = $t077448838._4
243245 $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))
244246 }
245247
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 scale18 = toBigInt(1000000000000000000)
1919
2020 let SEP = "__"
2121
2222 func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress"
2323
2424
2525 func keyNeutrinoAssetId () = "neutrino_asset_id"
2626
2727
2828 func keyLiquidationContractAddress () = "liquidation_contract"
2929
3030
3131 func keyRPDContract () = "rpd_contract"
3232
3333
3434 func keyAuctionContract () = "auction_contract"
3535
3636
3737 func keyContolContract () = "control_contract"
3838
3939
4040 func keyBondAssetId () = "bond_asset_id"
4141
4242
4343 func keyBalanceLocked () = "balance_lock_"
4444
4545
4646 func keyWavesLockedBalance () = (keyBalanceLocked() + "waves")
4747
4848
4949 func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino")
5050
5151
5252 func keyMinWavesSwapAmount () = "min_waves_swap_amount"
5353
5454
5555 func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount"
5656
5757
5858 func keyWavesOutFeePart () = "wavesOut_swap_feePart"
5959
6060
6161 func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart"
6262
6363
6464 func keyNsbtLockContract () = "%s__nsbtLockContract"
6565
6666
6767 func keyMathContract () = "%s__mathContract"
6868
6969
7070 func keyQuickSwapLimitDuration () = "%s__quickSwapLimitDuration"
7171
7272
7373 func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP)
7474
7575
7676 func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP)
7777
7878
7979 func keyBalanceWavesLockInterval () = "balance_waves_lock_interval"
8080
8181
8282 func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval"
8383
8484
8585 func keyPrice () = "price"
8686
8787
8888 func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP)
8989
9090
9191 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
9292
9393
9494 func keyMinLockAmount () = "%s__minLockAmount"
9595
9696
9797 func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy"
9898
9999
100100 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
101101
102102
103103 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
104104
105105
106106 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
107107
108108
109109 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), scale8, scale6)
110110
111111
112112 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), scale6, scale8)
113113
114114
115115 func asAnyList (val) = match val {
116116 case valAnyList: List[Any] =>
117117 valAnyList
118118 case _ =>
119119 throw("fail to cast into List[Any]")
120120 }
121121
122122
123123 func asInt (val) = match val {
124124 case valInt: Int =>
125125 valInt
126126 case _ =>
127127 throw("fail to cast into Int")
128128 }
129129
130130
131131 func asString (val) = match val {
132132 case valStr: String =>
133133 valStr
134134 case _ =>
135135 throw("fail to cast into String")
136136 }
137137
138138
139139 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
140140
141141
142142 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
143143
144144
145145 let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress()))
146146
147147 let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract()))
148148
149149 let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract()))
150150
151151 let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress())
152152
153153 let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract())
154154
155155 let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract()))
156156
157157 let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract()))
158158
159159 let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
160160
161161 let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
162162
163163 let nsbtAssetIdStr = getStringValue(neutrinoContract, keyBondAssetId())
164164
165165 let nsbtAssetId = fromBase58String(nsbtAssetIdStr)
166166
167167 @Callable(i)
168168 func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this))
169169 then throw("not authorized")
170170 else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)]
171171
172172
173173
174174 @Callable(i)
175175 func neutrinoStatsREADONLY () = {
176176 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
177177 if ((neutrinoMetrics == neutrinoMetrics))
178- then {
179- let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH()", nil, nil))
180- if ((prices == prices))
181- then {
182- let currentPrice = asInt(neutrinoMetrics[1])
183- let neutrinoLockedBalance = asInt(neutrinoMetrics[2])
184- let wavesLockedBalance = asInt(neutrinoMetrics[3])
185- let reservesInWaves = asInt(neutrinoMetrics[4])
186- let reservesInUsdn = asInt(neutrinoMetrics[5])
187- let neutrinoSupply = asInt(neutrinoMetrics[6])
188- let surplus = asInt(neutrinoMetrics[7])
189- let surplusPercent = asInt(neutrinoMetrics[8])
190- let BR = asInt(neutrinoMetrics[9])
191- let nsbtSupply = asInt(neutrinoMetrics[10])
192- let maxNsbtSupply = asInt(neutrinoMetrics[11])
193- let nsbt2usdnPrice = asInt(prices[1])
194- let nsbt2wavesPrice = asInt(prices[2])
195- let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
196- $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)], SEP))
197- }
198- else throw("Strict value is not equal to itself.")
199- }
178+ then if (true)
179+ then throw(toString(asInt(neutrinoMetrics[1])))
180+ else {
181+ let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH()", nil, nil))
182+ if ((prices == prices))
183+ then {
184+ let currentPrice = asInt(neutrinoMetrics[1])
185+ let neutrinoLockedBalance = asInt(neutrinoMetrics[2])
186+ let wavesLockedBalance = asInt(neutrinoMetrics[3])
187+ let reservesInWaves = asInt(neutrinoMetrics[4])
188+ let reservesInUsdn = asInt(neutrinoMetrics[5])
189+ let neutrinoSupply = asInt(neutrinoMetrics[6])
190+ let surplus = asInt(neutrinoMetrics[7])
191+ let surplusPercent = asInt(neutrinoMetrics[8])
192+ let BR = asInt(neutrinoMetrics[9])
193+ let nsbtSupply = asInt(neutrinoMetrics[10])
194+ let maxNsbtSupply = asInt(neutrinoMetrics[11])
195+ let nsbt2usdnPrice = asInt(prices[1])
196+ let nsbt2wavesPrice = asInt(prices[2])
197+ let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
198+ $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)], SEP))
199+ }
200+ else throw("Strict value is not equal to itself.")
201+ }
200202 else throw("Strict value is not equal to itself.")
201203 }
202204
203205
204206
205207 @Callable(i)
206208 func swapInfoREADONLY (userAddressStr) = {
207209 let currentPrice = getIntegerValue(controlContract, keyPrice())
208210 let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount())
209211 let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount())
210212 let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart())
211213 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
212214 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
213215 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
214- let $t076788772 = if ((userAddressStr == ""))
216+ let $t077448838 = if ((userAddressStr == ""))
215217 then $Tuple4(0, 0, 0, 0)
216218 else {
217219 let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
218220 if ((userGNsbtAmount == userGNsbtAmount))
219221 then {
220222 let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil))
221223 if ((usdnLmtMax == usdnLmtMax))
222224 then {
223225 let quickSwapResetBlocks = getIntegerValue(neutrinoContract, keyQuickSwapLimitDuration())
224226 let lastQuickSwapBlock = valueOrElse(getInteger(neutrinoContract, keyUserLastQuickSwapHeight(userAddressStr)), 0)
225227 let isNewQuickSwapPeriod = ((height - lastQuickSwapBlock) > quickSwapResetBlocks)
226228 let quickSwapUserSpent = if (isNewQuickSwapPeriod)
227229 then 0
228230 else valueOrElse(getInteger(neutrinoContract, keyQuickSwapUserSpentInPeriod(userAddressStr)), 0)
229231 let blcks2LmtReset = if (isNewQuickSwapPeriod)
230232 then 0
231233 else (quickSwapResetBlocks - (height - lastQuickSwapBlock))
232234 let wavesLmtMax = convertNeutrinoToWaves(usdnLmtMax, currentPrice)
233235 $Tuple4(quickSwapUserSpent, blcks2LmtReset, usdnLmtMax, wavesLmtMax)
234236 }
235237 else throw("Strict value is not equal to itself.")
236238 }
237239 else throw("Strict value is not equal to itself.")
238240 }
239- let quickSwapUserSpent = $t076788772._1
240- let blocks2LimitReset = $t076788772._2
241- let maxUsdnLimit = $t076788772._3
242- let maxWavesLimit = $t076788772._4
241+ let quickSwapUserSpent = $t077448838._1
242+ let blocks2LimitReset = $t077448838._2
243+ let maxUsdnLimit = $t077448838._3
244+ let maxWavesLimit = $t077448838._4
243245 $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))
244246 }
245247
246248
247249
248250 @Callable(i)
249251 func gnsbtInfoREADONLY (userAddressStr) = {
250252 let gnsbtShare = 10000
251253 let claimedTotalInUsdn = 10000
252254 let claimedUsdn = 10000
253255 let claimedWaves = 10000
254256 let unclaimedTotalInUsdn = 10000
255257 let unclaimedUsdn = 10000
256258 let unclaimedWaves = 10000
257259 $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))
258260 }
259261
260262
261263
262264 @Callable(i)
263265 func buyNsbtREADONLY (wavesPay) = {
264266 let minWavesAmountNsbtBuy = valueOrElse(getInteger(auctionContract, keyMinWavesForNsbtBuy()), 10)
265267 if (((minWavesAmountNsbtBuy * scale8) > wavesPay))
266268 then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected"))
267269 else {
268270 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
269271 if ((neutrinoMetrics == neutrinoMetrics))
270272 then {
271273 let currentPrice = asInt(neutrinoMetrics[1])
272274 let reserve = asInt(neutrinoMetrics[4])
273275 let neutrinoSupply = asInt(neutrinoMetrics[6])
274276 let nsbtSupply = asInt(neutrinoMetrics[10])
275277 let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity
276278 let curveResult = asAnyList(invoke(mathContract, "curveFunctionMATH", [reserve, neutrinoSupply, currentPrice, nsbtSupplyMAX, nsbtSupply, wavesPay], nil))
277279 if ((curveResult == curveResult))
278280 then {
279281 let nsbtAmount = asInt(curveResult[1])
280282 if ((0 >= nsbtAmount))
281283 then throw("nsbtAmount <= 0")
282284 else if ((wavesPay > (nsbtAmount * 9223372)))
283285 then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(wavesPay)) + "/") + toString(nsbtAmount)))
284286 else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP))
285287 }
286288 else throw("Strict value is not equal to itself.")
287289 }
288290 else throw("Strict value is not equal to itself.")
289291 }
290292 }
291293
292294
293295
294296 @Callable(i)
295297 func minStakedAmountREADONLY () = $Tuple2(nil, makeString(["%d", toString(getIntOrFail(nsbtStakingContract, keyMinLockAmount()))], SEP))
296298
297299
298300
299301 @Callable(i)
300302 func mergedStakeREADONLY (amount1,height1,amount2,height2) = {
301303 let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil))
302304 if ((h == h))
303305 then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP))
304306 else throw("Strict value is not equal to itself.")
305307 }
306308
307309
308310
309311 @Callable(i)
310312 func unstakeComissionAmountREADONLY (amount,startHeight) = {
311313 let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
312314 if ((a == a))
313315 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
314316 else throw("Strict value is not equal to itself.")
315317 }
316318
317319

github/deemru/w8io/026f985 
41.86 ms