tx · 8cjSCdL9FmkRjwJfKBe3Pxxy8dzePZq1ar8yAu7qMPEp

3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi:  -0.01400000 Waves

2022.03.22 12:31 [1974953] smart account 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi > SELF 0.00000000 Waves

{ "type": 13, "id": "8cjSCdL9FmkRjwJfKBe3Pxxy8dzePZq1ar8yAu7qMPEp", "fee": 1400000, "feeAssetId": null, "timestamp": 1647941482111, "version": 1, "sender": "3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi", "senderPublicKey": "BwVRZtTzoCigEsffCvQ9uo7WvkoBNNGVjX4nat5X5zyQ", "proofs": [ "4EuoMbNhrWgm584a8HSGYQwGDK1ExBi37gSaMhsgkK4ZppfdkjWU2L8QVeFuU54nuB9A8JKT42ZosBsMZoDerCgt" ], "script": "base64:AAIFAAAAAAAAAC8IAhIFCgMICAgSABIDCgEIEgQKAggBEgMKAQESBgoEAQEBARIECgIBARIECgIBCAAAADsAAAAACFBSSUNFTEVUAAAAAAAAD0JAAAAAAAlNVUxUU0NBTEUAAAAAAAAAAAgAAAAAC0VVTEVSTlVNQkVSAAAAAAAQM8TWAAAAAAZzY2FsZTYAAAAAAAAPQkAAAAAADHNjYWxlNkJpZ0ludAkAATYAAAABAAAAAAAAD0JAAAAAAAZzY2FsZTgAAAAAAAX14QAAAAAADHNjYWxlOEJpZ0ludAkAATYAAAABAAAAAAAF9eEAAAAAAAdzY2FsZTEyAAAAAOjUpRAAAAAAAAdzY2FsZTE4CQABNgAAAAEADeC2s6dkAAAAAAAAA1NFUAIAAAACX18BAAAAEmtleU5ldXRyaW5vQWRkcmVzcwAAAAACAAAAHSVzJXNfX2NvbmZpZ19fbmV1dHJpbm9BZGRyZXNzAQAAABJrZXlOZXV0cmlub0Fzc2V0SWQAAAAAAgAAABFuZXV0cmlub19hc3NldF9pZAEAAAAda2V5TGlxdWlkYXRpb25Db250cmFjdEFkZHJlc3MAAA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GVpZ2h0BAAAAAFhCQEAAAAFYXNJbnQAAAABCQAD/AAAAAQFAAAADG1hdGhDb250cmFjdAIAAAAhZ2V0VW5zdGFrZUNvbWlzc2lvbkFtb3VudFJFQURPTkxZCQAETAAAAAIFAAAABmFtb3VudAkABEwAAAACBQAAAAtzdGFydEhlaWdodAkABEwAAAACBQAAAAhoYWxmTGlmZQUAAAADbmlsBQAAAANuaWwDCQAAAAAAAAIFAAAAAWEFAAAAAWEJAAUUAAAAAgUAAAADbmlsCQAEuQAAAAIJAARMAAAAAgIAAAACJWQJAARMAAAAAgkAAaQAAAABBQAAAAFhBQAAAANuaWwFAAAAA1NFUAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAAfJBfZA==", "chainId": 84, "height": 1974953, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GVsWocwMwvgzeNeY1PQYrnSE93bYzxifwFQDkyA6kkWF Next: 8etoW2gbCAj3LtmpzHEAWpvFbxGp9EJJ42z1zCqLrods 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 keyBalanceWavesLockInterval () = "balance_waves_lock_interval"
7373
7474
7575 func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval"
7676
7777
7878 func keyPrice () = "price"
7979
8080
8181 func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP)
8282
8383
8484 func keyHalfLife () = "%s__halfLife"
8585
8686
8787 func keyMinLockAmount () = "%s__minLockAmount"
8888
8989
9090 func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy"
9191
9292
9393 func keyMinNsbtSell () = "min_nsbt_sell"
9494
9595
9696 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
9797
9898
9999 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
100100
101101
102102 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
103103
104104
105105 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), scale8, scale6)
106106
107107
108108 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), scale6, scale8)
109109
110110
111111 func asAnyList (val) = match val {
112112 case valAnyList: List[Any] =>
113113 valAnyList
114114 case _ =>
115115 throw("fail to cast into List[Any]")
116116 }
117117
118118
119119 func asInt (val) = match val {
120120 case valInt: Int =>
121121 valInt
122122 case _ =>
123123 throw("fail to cast into Int")
124124 }
125125
126126
127127 func asString (val) = match val {
128128 case valStr: String =>
129129 valStr
130130 case _ =>
131131 throw("fail to cast into String")
132132 }
133133
134134
135135 func asTuple2Ints (val) = match val {
136136 case v: (Int, Int) =>
137137 v
138138 case _ =>
139139 throw("fail to cast into Tuple2 ints")
140140 }
141141
142142
143143 func asSwapParamsSTRUCT (val) = match val {
144144 case struct: (Int, Int, Int, Int, Int) =>
145145 struct
146146 case _ =>
147147 throw("fail to cast into Int")
148148 }
149149
150150
151151 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
152152
153153
154154 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
155155
156156
157157 let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress()))
158158
159159 let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract()))
160160
161161 let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract()))
162162
163163 let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress())
164164
165165 let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract())
166166
167167 let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract()))
168168
169169 let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract()))
170170
171171 let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
172172
173173 let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
174174
175175 let nsbtAssetIdStr = getStringValue(neutrinoContract, keyBondAssetId())
176176
177177 let nsbtAssetId = fromBase58String(nsbtAssetIdStr)
178178
179179 func minWavesForNsbtBuy () = asInt(invoke(auctionContract, "minWavesAmountNsbtBuySYSREADONLY", nil, nil))
180180
181181
182182 func minNsbtForSell () = asInt(invoke(auctionContract, "minNsbtAmountForSellSYSREADONLY", nil, nil))
183183
184184
185185 @Callable(i)
186186 func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this))
187187 then throw("not authorized")
188188 else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)]
189189
190190
191191
192192 @Callable(i)
193193 func neutrinoStatsREADONLY () = {
194194 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
195195 let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceSYSREADONLY", [0], nil))
196196 let currentPrice = asInt(neutrinoMetrics[0])
197197 let neutrinoLockedBalance = asInt(neutrinoMetrics[1])
198198 let wavesLockedBalance = asInt(neutrinoMetrics[2])
199199 let reservesInWaves = asInt(neutrinoMetrics[3])
200200 let reservesInUsdn = asInt(neutrinoMetrics[4])
201201 let neutrinoSupply = asInt(neutrinoMetrics[5])
202202 let surplus = asInt(neutrinoMetrics[6])
203203 let surplusPercent = asInt(neutrinoMetrics[7])
204204 let BR = asInt(neutrinoMetrics[8])
205205 let nsbtSupply = asInt(neutrinoMetrics[9])
206206 let maxNsbtSupply = asInt(neutrinoMetrics[10])
207207 let nsbt2usdnPrice = asInt(prices[0])
208208 let nsbt2wavesPrice = asInt(prices[1])
209209 let minWaves4NsbtBuy = minWavesForNsbtBuy()
210210 let minNsbtsell = minNsbtForSell()
211211 let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount())
212212 $Tuple2(nil, makeString(["%d%d%d%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))
213213 }
214214
215215
216216
217217 @Callable(i)
218218 func swapInfoREADONLY (userAddressStr) = {
219219 let currentPrice = getIntegerValue(controlContract, keyPrice())
220220 let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount())
221221 let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount())
222222 let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart())
223223 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
224224 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
225225 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
226226 let $t079858146 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStr, 0], nil))
227227 let swapLimitMaxUsdn = $t079858146._1
228228 let swapLimitSpentUsdn = $t079858146._2
229229 let blcks2LmtReset = $t079858146._3
230230 let swapLimitMaxWaves = convertNeutrinoToWaves(swapLimitMaxUsdn, currentPrice)
231231 $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(blcks2LmtReset), toString(swapLimitMaxWaves), toString(swapLimitMaxUsdn), toString(swapLimitSpentUsdn)], SEP))
232232 }
233233
234234
235235
236236 @Callable(i)
237237 func gnsbtInfoREADONLY (userAddressStrOpt,nsbtAmtDiff) = {
238238 let currentPrice = getIntegerValue(controlContract, keyPrice())
239239 let $t090629245 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, 0], nil))
240240 let limitMaxUsdn = $t090629245._1
241241 let limitSpent = $t090629245._2
242242 let blcks2LmtReset = $t090629245._3
243243 let gnsbtAmt = $t090629245._4
244244 let gnsbtAmtTotal = $t090629245._5
245245 let $t092499457 = asSwapParamsSTRUCT(invoke(neutrinoContract, "swapParamsByUserSYSREADONLY", [userAddressStrOpt, nsbtAmtDiff], nil))
246246 let limitMaxUsdnNEW = $t092499457._1
247247 let limitSpentNEW = $t092499457._2
248248 let blcks2LmtResetNEW = $t092499457._3
249249 let gnsbtAmtNEW = $t092499457._4
250250 let gnsbtAmtTotalNEW = $t092499457._5
251251 let limitMaxWaves = convertNeutrinoToWaves(limitMaxUsdn, currentPrice)
252252 let limitMaxWavesNEW = convertNeutrinoToWaves(limitMaxUsdnNEW, currentPrice)
253253 let gnsbtShare = if ((gnsbtAmtTotal != 0))
254254 then fraction((gnsbtAmt * 100), scale12, gnsbtAmtTotal)
255255 else 0
256256 let gnsbtShareNEW = if ((gnsbtAmtTotalNEW != 0))
257257 then fraction((gnsbtAmtNEW * 100), scale12, gnsbtAmtTotalNEW)
258258 else 0
259259 let rewardInfo = asString(invoke(nsbtStakingContract, "unclaimedRewardsREADONLY", [userAddressStrOpt], nil))
260260 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%s", toString(gnsbtAmt), toString(gnsbtAmtNEW), toString(gnsbtShare), toString(gnsbtShareNEW), toString(limitMaxUsdn), toString(limitMaxWaves), toString(limitMaxUsdnNEW), toString(limitMaxWavesNEW), rewardInfo], SEP))
261261 }
262262
263263
264264
265265 @Callable(i)
266266 func buyNsbtREADONLY (wavesPay) = {
267267 let minWavesAmountNsbtBuy = minWavesForNsbtBuy()
268268 if ((minWavesAmountNsbtBuy > wavesPay))
269269 then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected"))
270270 else {
271271 let curveResult = asAnyList(invoke(mathContract, "curveFunctionREADONLY", [wavesPay], nil))
272272 if ((curveResult == curveResult))
273273 then {
274274 let nsbtAmount = asInt(curveResult[0])
275275 if ((0 >= nsbtAmount))
276276 then throw("nsbtAmount <= 0")
277277 else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP))
278278 }
279279 else throw("Strict value is not equal to itself.")
280280 }
281281 }
282282
283283
284284
285285 @Callable(i)
286286 func mergedStakeREADONLY (amount1,height1,amount2,height2) = {
287287 let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
288288 let h = asInt(invoke(mathContract, "mergeStakesREADONLY", [amount1, height1, amount2, height2, halfLife], nil))
289289 if ((h == h))
290290 then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP))
291291 else throw("Strict value is not equal to itself.")
292292 }
293293
294294
295295
296296 @Callable(i)
297297 func unstakeComissionAmountByHeightREADONLY (amount,startHeight) = {
298298 let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
299299 let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil))
300300 if ((a == a))
301301 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
302302 else throw("Strict value is not equal to itself.")
303303 }
304304
305305
306306
307307 @Callable(i)
308308 func unstakeComissionAmountByUserREADONLY (amount,userAddress) = {
309309 let halfLife = getIntOrFail(nsbtStakingContract, keyHalfLife())
310310 let startHeight = valueOrElse(getInteger(nsbtStakingContract, keyLockParamStartBlock(userAddress)), height)
311311 let a = asInt(invoke(mathContract, "getUnstakeComissionAmountREADONLY", [amount, startHeight, halfLife], nil))
312312 if ((a == a))
313313 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
314314 else throw("Strict value is not equal to itself.")
315315 }
316316
317317

github/deemru/w8io/026f985 
42.64 ms