tx · 5Tx9hXk2YhPaxGXQMZV8RWqFsTXJiUTdqbvUcvVxuoyW

3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi:  -0.01400000 Waves

2022.03.10 13:11 [1957710] smart account 3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi > SELF 0.00000000 Waves

{ "type": 13, "id": "5Tx9hXk2YhPaxGXQMZV8RWqFsTXJiUTdqbvUcvVxuoyW", "fee": 1400000, "feeAssetId": null, "timestamp": 1646907171206, "version": 1, "sender": "3Mxd5o7PwH76ZkN8zG4xwDLubEnbkaihKzi", "senderPublicKey": "BwVRZtTzoCigEsffCvQ9uo7WvkoBNNGVjX4nat5X5zyQ", "proofs": [ "66deVrogLtsjGk7MwcNsZwqi2yVF4gkpCtR5ADhxJmGLovZgPVjmexiddxJupQ86YVujqaqQXn5NKrpHAQdCadSx" ], "script": "base64:AAIFAAAAAAAAAC4IAhIFCgMICAgSABIDCgEIEgMKAQgSAwoBARIGCgQBAQEBEgQKAgEBEgQKAgEIAAAAPAAAAAAIUFJJQ0VMRVQAAAAAAAAPQkAAAAAACU1VTFRTQ0FMRQAAAAAAAAAACAAAAAALRVVMRVJOVU1CRVIAAAAAABAzxNYAAAAABnNjYWxlNgAAAAAAAA9CQAAAAAAMc2NhbGU2QmlnSW50CQABNgAAAAEAAAAAAAAPQkAAAAAABnNjYWxlOAAAAAAABfXhAAAAAAAMc2NhbGU4QmlnSW50CQABNgAAAAEAAAAAAAX14QAAAAAAB3NjYWxlMTIAAAAA6NSlEAAAAAAAB3NjYWxlMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwEAAAASa2V5TmV1dHJpbm9BZGRyZXNzAAAAAAIAAAAdJXMlc19fY29uZmlnX19uZXV0cmlub0FkZHJlc3MBAAAAEmtleU5ldXRyaW5vQXNzZXRJZAAAAAACAAAAEW5ldXRyaW5vX2Fzc2V0X2lkAQAAAB1rZXlMaXF1aWRhdGlvbkNvbnRyYWN0QWR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ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAFpAQAAACR1bnN0YWtlQ29taXNzaW9uQW1vdW50QnlVc2VyUkVBRE9OTFkAAAACAAAABmFtb3VudAAAAAt1c2VyQWRkcmVzcwQAAAALc3RhcnRIZWlnaHQJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAATbnNidFN0YWtpbmdDb250cmFjdAkBAAAAFmtleUxvY2tQYXJhbVN0YXJ0QmxvY2sAAAABBQAAAAt1c2VyQWRkcmVzcwUAAAAGaGVpZ2h0BAAAAAFhCQEAAAAFYXNJbnQAAAABCQAD/AAAAAQFAAAADG1hdGhDb250cmFjdAIAAAAdZ2V0VW5zdGFrZUNvbWlzc2lvbkFtb3VudE1BVEgJAARMAAAAAgUAAAAGYW1vdW50CQAETAAAAAIFAAAAC3N0YXJ0SGVpZ2h0BQAAAANuaWwFAAAAA25pbAMJAAAAAAAAAgUAAAABYQUAAAABYQkABRQAAAACBQAAAANuaWwJAAS5AAAAAgkABEwAAAACAgAAAAIlZAkABEwAAAACCQABpAAAAAEFAAAAAWEFAAAAA25pbAUAAAADU0VQCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAABQ9309", "chainId": 84, "height": 1957710, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HnE1Q7LppwJ5sCNnEewKf2cgyQpK9ZC2gtoBJo6DpPeF Next: FUobVWrWarjW3TKUwg7x2vaBevKRCTP16wEYoBj81kXF Diff:
OldNewDifferences
224224 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
225225 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
226226 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
227- let $t081579236 = if ((userAddressStr == ""))
227+ let $t081589237 = if ((userAddressStr == ""))
228228 then $Tuple4(0, 0, 0, 0)
229229 else {
230230 let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
245245 }
246246 else throw("Strict value is not equal to itself.")
247247 }
248- let quickSwapUserSpent = $t081579236._1
249- let blocks2LimitReset = $t081579236._2
250- let maxUsdnLimit = $t081579236._3
251- let maxWavesLimit = $t081579236._4
248+ let quickSwapUserSpent = $t081589237._1
249+ let blocks2LimitReset = $t081589237._2
250+ let maxUsdnLimit = $t081589237._3
251+ let maxWavesLimit = $t081589237._4
252252 $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))
253253 }
254254
313313
314314
315315 @Callable(i)
316-func unstakeComissionAmountREADONLY (amount,startHeight) = {
316+func unstakeComissionAmountByHeightREADONLY (amount,startHeight) = {
317+ let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
318+ if ((a == a))
319+ then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
320+ else throw("Strict value is not equal to itself.")
321+ }
322+
323+
324+
325+@Callable(i)
326+func unstakeComissionAmountByUserREADONLY (amount,userAddress) = {
327+ let startHeight = valueOrElse(getInteger(nsbtStakingContract, keyLockParamStartBlock(userAddress)), height)
317328 let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
318329 if ((a == a))
319330 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
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
9999 func keyLockParamTotalAmount () = makeString(["%s%s", "stats", "activeTotalLocked"], SEP)
100100
101101
102102 func keyMinLockAmount () = "%s__minLockAmount"
103103
104104
105105 func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy"
106106
107107
108108 func keyMinNsbtSell () = "min_nsbt_sell"
109109
110110
111111 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
112112
113113
114114 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
115115
116116
117117 func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], ""))
118118
119119
120120 func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), scale8, scale6)
121121
122122
123123 func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), scale6, scale8)
124124
125125
126126 func asAnyList (val) = match val {
127127 case valAnyList: List[Any] =>
128128 valAnyList
129129 case _ =>
130130 throw("fail to cast into List[Any]")
131131 }
132132
133133
134134 func asInt (val) = match val {
135135 case valInt: Int =>
136136 valInt
137137 case _ =>
138138 throw("fail to cast into Int")
139139 }
140140
141141
142142 func asString (val) = match val {
143143 case valStr: String =>
144144 valStr
145145 case _ =>
146146 throw("fail to cast into String")
147147 }
148148
149149
150150 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
151151
152152
153153 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
154154
155155
156156 let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress()))
157157
158158 let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract()))
159159
160160 let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract()))
161161
162162 let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress())
163163
164164 let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract())
165165
166166 let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract()))
167167
168168 let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract()))
169169
170170 let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId())
171171
172172 let neutrinoAssetId = fromBase58String(neutrinoAssetIdString)
173173
174174 let nsbtAssetIdStr = getStringValue(neutrinoContract, keyBondAssetId())
175175
176176 let nsbtAssetId = fromBase58String(nsbtAssetIdStr)
177177
178178 @Callable(i)
179179 func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this))
180180 then throw("not authorized")
181181 else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)]
182182
183183
184184
185185 @Callable(i)
186186 func neutrinoStatsREADONLY () = {
187187 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
188188 if ((neutrinoMetrics == neutrinoMetrics))
189189 then {
190190 let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH", nil, nil))
191191 if ((prices == prices))
192192 then {
193193 let currentPrice = asInt(neutrinoMetrics[0])
194194 let neutrinoLockedBalance = asInt(neutrinoMetrics[1])
195195 let wavesLockedBalance = asInt(neutrinoMetrics[2])
196196 let reservesInWaves = asInt(neutrinoMetrics[3])
197197 let reservesInUsdn = asInt(neutrinoMetrics[4])
198198 let neutrinoSupply = asInt(neutrinoMetrics[5])
199199 let surplus = asInt(neutrinoMetrics[6])
200200 let surplusPercent = asInt(neutrinoMetrics[7])
201201 let BR = asInt(neutrinoMetrics[8])
202202 let nsbtSupply = asInt(neutrinoMetrics[9])
203203 let maxNsbtSupply = asInt(neutrinoMetrics[10])
204204 let nsbt2usdnPrice = asInt(prices[0])
205205 let nsbt2wavesPrice = asInt(prices[1])
206206 let minWaves4NsbtBuy = getIntOrFail(auctionContract, keyMinWavesForNsbtBuy())
207207 let minNsbtsell = getIntOrFail(auctionContract, keyMinNsbtSell())
208208 let minNsbtLockAmt = getIntOrFail(nsbtStakingContract, keyMinLockAmount())
209209 $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))
210210 }
211211 else throw("Strict value is not equal to itself.")
212212 }
213213 else throw("Strict value is not equal to itself.")
214214 }
215215
216216
217217
218218 @Callable(i)
219219 func swapInfoREADONLY (userAddressStr) = {
220220 let currentPrice = getIntegerValue(controlContract, keyPrice())
221221 let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount())
222222 let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount())
223223 let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart())
224224 let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart())
225225 let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval())
226226 let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval())
227- let $t081579236 = if ((userAddressStr == ""))
227+ let $t081589237 = if ((userAddressStr == ""))
228228 then $Tuple4(0, 0, 0, 0)
229229 else {
230230 let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
231231 let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil))
232232 if ((usdnLmtMax == usdnLmtMax))
233233 then {
234234 let quickSwapResetBlocks = valueOrElse(getInteger(neutrinoContract, keySwapsTimeframe()), 1440)
235235 let lastQuickSwapBlock = valueOrElse(getInteger(neutrinoContract, keyUserLastQuickSwapHeight(userAddressStr)), 0)
236236 let isNewQuickSwapPeriod = ((height - lastQuickSwapBlock) > quickSwapResetBlocks)
237237 let quickSwapUserSpent = if (isNewQuickSwapPeriod)
238238 then 0
239239 else valueOrElse(getInteger(neutrinoContract, keyQuickSwapUserSpentInPeriod(userAddressStr)), 0)
240240 let blcks2LmtReset = if (isNewQuickSwapPeriod)
241241 then 0
242242 else (quickSwapResetBlocks - (height - lastQuickSwapBlock))
243243 let wavesLmtMax = convertNeutrinoToWaves(usdnLmtMax, currentPrice)
244244 $Tuple4(quickSwapUserSpent, blcks2LmtReset, usdnLmtMax, wavesLmtMax)
245245 }
246246 else throw("Strict value is not equal to itself.")
247247 }
248- let quickSwapUserSpent = $t081579236._1
249- let blocks2LimitReset = $t081579236._2
250- let maxUsdnLimit = $t081579236._3
251- let maxWavesLimit = $t081579236._4
248+ let quickSwapUserSpent = $t081589237._1
249+ let blocks2LimitReset = $t081589237._2
250+ let maxUsdnLimit = $t081589237._3
251+ let maxWavesLimit = $t081589237._4
252252 $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))
253253 }
254254
255255
256256
257257 @Callable(i)
258258 func gnsbtInfoREADONLY (userAddressStr) = {
259259 let gnsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0)
260260 let gnsbtTotal = valueOrElse(getInteger(nsbtStakingContract, keyLockParamTotalAmount()), 0)
261261 let gnsbtShare = fraction((gnsbtAmount * 100), scale12, gnsbtTotal)
262262 let claimedTotalInUsdn = 10000
263263 let claimedUsdn = 10000
264264 let claimedWaves = 10000
265265 let unclaimedTotalInUsdn = 10000
266266 let unclaimedUsdn = 10000
267267 let unclaimedWaves = 10000
268268 $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))
269269 }
270270
271271
272272
273273 @Callable(i)
274274 func buyNsbtREADONLY (wavesPay) = {
275275 let minWavesAmountNsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy())
276276 if ((minWavesAmountNsbtBuy > wavesPay))
277277 then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected"))
278278 else {
279279 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil))
280280 if ((neutrinoMetrics == neutrinoMetrics))
281281 then {
282282 let currentPrice = asInt(neutrinoMetrics[0])
283283 let reserve = asInt(neutrinoMetrics[3])
284284 let neutrinoSupply = asInt(neutrinoMetrics[5])
285285 let nsbtSupply = asInt(neutrinoMetrics[9])
286286 let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity
287287 let curveResult = asAnyList(invoke(mathContract, "curveFunctionMATH", [reserve, neutrinoSupply, currentPrice, nsbtSupplyMAX, nsbtSupply, wavesPay], nil))
288288 if ((curveResult == curveResult))
289289 then {
290290 let nsbtAmount = asInt(curveResult[0])
291291 if ((0 >= nsbtAmount))
292292 then throw("nsbtAmount <= 0")
293293 else if ((wavesPay > (nsbtAmount * 9223372)))
294294 then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(wavesPay)) + "/") + toString(nsbtAmount)))
295295 else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP))
296296 }
297297 else throw("Strict value is not equal to itself.")
298298 }
299299 else throw("Strict value is not equal to itself.")
300300 }
301301 }
302302
303303
304304
305305 @Callable(i)
306306 func mergedStakeREADONLY (amount1,height1,amount2,height2) = {
307307 let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil))
308308 if ((h == h))
309309 then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP))
310310 else throw("Strict value is not equal to itself.")
311311 }
312312
313313
314314
315315 @Callable(i)
316-func unstakeComissionAmountREADONLY (amount,startHeight) = {
316+func unstakeComissionAmountByHeightREADONLY (amount,startHeight) = {
317+ let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
318+ if ((a == a))
319+ then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
320+ else throw("Strict value is not equal to itself.")
321+ }
322+
323+
324+
325+@Callable(i)
326+func unstakeComissionAmountByUserREADONLY (amount,userAddress) = {
327+ let startHeight = valueOrElse(getInteger(nsbtStakingContract, keyLockParamStartBlock(userAddress)), height)
317328 let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil))
318329 if ((a == a))
319330 then $Tuple2(nil, makeString(["%d", toString(a)], SEP))
320331 else throw("Strict value is not equal to itself.")
321332 }
322333
323334

github/deemru/w8io/026f985 
44.95 ms