tx · GVw4yXH4VMEBYTg1kBiBNzXY1hG1HDuitBue9yLyCCne

3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd:  -0.02500000 Waves

2023.02.13 10:48 [2447554] smart account 3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd > SELF 0.00000000 Waves

{ "type": 13, "id": "GVw4yXH4VMEBYTg1kBiBNzXY1hG1HDuitBue9yLyCCne", "fee": 2500000, "feeAssetId": null, "timestamp": 1676274554494, "version": 2, "chainId": 84, "sender": "3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd", "senderPublicKey": "CdnTmMHxT68Qa4MtHEnAiUhsdKTi2YkHPGn92ThinVNt", "proofs": [ "Pq2RfBHuBEY1uHSF4ajFavW1DBr3P7dZLwae8r733dX2itbsMDVA41HV7VWQWqgcFcphgwP6YUoFq5P4UiYzqMF", "4aAg37XyjawUuhsVc8PXtJNCa87mY7UPnZpDMiAVuEgB8SDwRSE3yqrVWYvuauHmQzQkd2AYRv2S4KPtwX19pE95", "2YYWPZUc57WpFSBRqCX7jkmPJYzsQFnGufaXsw9ZR7Bzi3hEYLDhx7pEk3d1ZE2J8JXL9QHczKJkbM2bJfpZLXm2" ], "script": "base64:AAIFAAAAAAAAADIIAhIFCgMIAQESBQoDAQEIEgASABIDCgEIEgASABIAEgASBQoDAQEEEgQKAgEIEgASAAAAAG0BAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AAAAAAAAAAAAAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQIAAAAAAQAAABZnZXRCb29sQnlBZGRyZXNzQW5kS2V5AAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAdhZGRyZX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", "height": 2447554, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3yv1yzvNv2v8UgV7LVZLb93JpNwj1oWtAJaV9tNYxHf8 Next: B4ESK4enoQqbJZqiZCnguBNqkCtJPRkExzXaQqWjUYxj Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getNumberByKey (key) = valueOrElse(getInteger(this, key), 0)
55
66
77 func getStringByKey (key) = valueOrElse(getString(this, key), "")
88
99
1010 func getBoolByAddressAndKey (address,key) = valueOrElse(getBoolean(address, key), false)
1111
1212
1313 func getStringByAddressAndKey (address,key) = valueOrElse(getString(address, key), "")
1414
1515
1616 func getNumberByAddressAndKey (address,key) = valueOrElse(getInteger(address, key), 0)
1717
1818
1919 func asAnyList (val) = match val {
2020 case valAnyLyst: List[Any] =>
2121 valAnyLyst
2222 case _ =>
2323 throw("fail to cast into List[Any]")
2424 }
2525
2626
2727 func asString (val) = match val {
2828 case valStr: String =>
2929 valStr
3030 case _ =>
3131 throw("fail to cast into String")
3232 }
3333
3434
3535 func asInt (val) = match val {
3636 case valInt: Int =>
3737 valInt
3838 case _ =>
3939 throw("fail to cast into Int")
4040 }
4141
4242
4343 func asBytes (val) = match val {
4444 case valByte: ByteVector =>
4545 valByte
4646 case _ =>
4747 throw("fail to cast into ByteVector")
4848 }
4949
5050
5151 let SEP = "__"
5252
5353 let MULT6 = 1000000
5454
5555 let MULT8 = 100000000
5656
5757 let MULTX10 = toBigInt(10000000000)
5858
5959 let MULTX12 = toBigInt(1000000000000)
6060
6161 let MULTX16 = toBigInt(10000000000000000)
6262
6363 let CANCELED = "canceled"
6464
6565 let NEW = "new"
6666
6767 let FILLED = "filled"
6868
6969 let WAVESID = fromBase58String("WAVES")
7070
7171 let nMetricIdxPrice = 0
7272
7373 let nMetricIdxUsdnLockedBalance = 1
7474
7575 let nMetricIdxWavesLockedBalance = 2
7676
7777 let nMetricIdxReserve = 3
7878
7979 let nMetricIdxReserveInUsdn = 4
8080
8181 let nMetricIdxUsdnSupply = 5
8282
8383 let nMetricIdxSurplus = 6
8484
8585 let nMetricIdxSurplusPercent = 7
8686
8787 let nMetricIdxBR = 8
8888
8989 let nMetricIdxNsbtSupply = 9
9090
9191 let nMetricIdxMaxNsbtSupply = 10
9292
9393 let nMetricIdxSurfSupply = 11
9494
9595 let bFuncIdxSurf = 0
9696
9797 let bFuncIdxWaves = 1
9898
9999 let bFuncIdxUsdn = 2
100100
101101 let bFuncIdxReserveStart = 3
102102
103103 let bFuncIdxSupplyStart = 4
104104
105105 let bFuncIdxBRStart = 5
106106
107107 let bFuncIdxReserveEnd = 6
108108
109109 let bFuncIdxSupplyEnd = 7
110110
111111 let bFuncIdxBREnd = 8
112112
113113 let bFuncIdxRest = 9
114114
115115 let bFuncIdxWavesPrice = 10
116116
117117 let IdxControlCfgNeutrinoDapp = 1
118118
119119 let IdxControlCfgAuctionDapp = 2
120120
121121 let IdxControlCfgRpdDapp = 3
122122
123123 let IdxControlCfgMathDapp = 4
124124
125125 let IdxControlCfgLiquidationDapp = 5
126126
127127 let IdxControlCfgRestDapp = 6
128128
129129 let IdxControlCfgNodeRegistryDapp = 7
130130
131131 let IdxControlCfgNsbtStakingDapp = 8
132132
133133 let IdxControlCfgMediatorDapp = 9
134134
135135 let IdxControlCfgSurfStakingDapp = 10
136136
137137 let IdxControlCfgGnsbtControllerDapp = 11
138138
139139 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
140140
141141
142142 func keyControlAddress () = "%s%s__config__controlAddress"
143143
144144
145145 func keyControlCfg () = "%s__controlConfig"
146146
147147
148148 func readControlCfgOrFail (control) = split(getStringOrFail(control, keyControlCfg()), SEP)
149149
150150
151151 func getContractAddressOrFail (controlCfg,idx) = valueOrErrorMessage(addressFromString(controlCfg[idx]), ("Control cfg doesn't contain address at index " + toString(idx)))
152152
153153
154154 let controlContract = addressFromStringValue(valueOrElse(getString(this, keyControlAddress()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
155155
156156 let controlCfg = readControlCfgOrFail(controlContract)
157157
158158 let mathContract = getContractAddressOrFail(controlCfg, IdxControlCfgMathDapp)
159159
160160 let neutrinoContract = getContractAddressOrFail(controlCfg, IdxControlCfgNeutrinoDapp)
161161
162162 let surfStakingContract = getContractAddressOrFail(controlCfg, IdxControlCfgSurfStakingDapp)
163163
164164 let PriceKey = "price"
165165
166166 let NsbtAssetIdKey = "bond_asset_id"
167167
168168 let NeutrinoAssetIdKey = "neutrino_asset_id"
169169
170170 let SurfAssetIdKey = "surf_asset_id"
171171
172172 let BalanceLockedkKey = "balance_lock_"
173173
174174 let WavesLockedBalanceKey = (BalanceLockedkKey + "waves")
175175
176176 let NeutrinoLockedBalanceKey = (BalanceLockedkKey + "neutrino")
177177
178178 let FirstOrderKey = "order_first"
179179
180180 let MathContractKey = "math_contract"
181181
182182 let MinWavesForNsbtBuyKey = "min_waves_nsbt_buy"
183183
184184 let MinNsbtSellKey = "min_nsbt_sell"
185185
186186 let MinWavesForSurfBuyKey = "min_waves_surf_buy"
187187
188188 let MinUsdnForSurfBuyKey = "min_usdn_surf_buy"
189189
190190 func getRoiByOrderIdKey (orderId) = ("debug_order_roi_" + orderId)
191191
192192
193193 func getOrderPriceKey (orderId) = ("order_price_" + orderId)
194194
195195
196196 func getOrderTotalKey (orderId) = ("order_total_" + orderId)
197197
198198
199199 func getOrderOwnerKey (orderId) = ("order_owner_" + orderId)
200200
201201
202202 func getOrderHeightKey (orderId) = ("order_height_" + orderId)
203203
204204
205205 func getOrderStatusKey (orderId) = ("order_status_" + orderId)
206206
207207
208208 func getOrderFilledTotalKey (orderId) = ("order_filled_total_" + orderId)
209209
210210
211211 func getPrevOrderKey (orderId) = ("order_prev_" + orderId)
212212
213213
214214 func getNextOrderKey (orderId) = ("order_next_" + orderId)
215215
216216
217217 func convertNeutrinoToWaves (amount,price) = fraction(amount, MULT8, price)
218218
219219
220220 func convertWavesToNeutrino (amount,price) = fraction(amount, price, MULT8)
221221
222222
223223 func toX16 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULTX16, toBigInt(origScaleMult))
224224
225225
226226 func fromX16 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULTX16))
227227
228228
229229 let neutrinoAssetId = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
230230
231231 let nsbtAssetId = base58'F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z'
232232
233233 let isBlocked = getBoolByAddressAndKey(controlContract, "is_blocked")
234234
235235 let minWavesAmountNsbtBuy = valueOrElse(getInteger(this, MinWavesForNsbtBuyKey), 1000000000)
236236
237237 let minNsbtSell = valueOrElse(getInteger(this, MinNsbtSellKey), 1000000)
238238
239239 let minWavesAmountSurfBuy = valueOrElse(getInteger(this, MinWavesForSurfBuyKey), 100000000)
240240
241241 let minUsdnAmountSurfBuy = valueOrElse(getInteger(this, MinUsdnForSurfBuyKey), 10000000)
242242
243243 let firstOrder = getStringByKey(FirstOrderKey)
244244
245245 func getOrderPrice (id) = getNumberByKey(getOrderPriceKey(id))
246246
247247
248248 func getOrderTotal (id) = getNumberByKey(getOrderTotalKey(id))
249249
250250
251251 func getOrderOwner (id) = getStringByKey(getOrderOwnerKey(id))
252252
253253
254254 func getOrderStatus (id) = getStringByKey(getOrderStatusKey(id))
255255
256256
257257 func getOrderFilledTotal (id) = getNumberByKey(getOrderFilledTotalKey(id))
258258
259259
260260 func getPrevOrder (id) = getStringByKey(getPrevOrderKey(id))
261261
262262
263263 func getNextOrder (id) = getStringByKey(getNextOrderKey(id))
264264
265265
266266 func getReversePrice (price) = ((MULT6 * MULT6) / price)
267267
268268
269269 func calcNsbt2WavesPriceRaw (spentWavesRaw,receivedNsbtRaw) = fraction(toBigInt(spentWavesRaw), toBigInt((MULT6 * MULT6)), toBigInt(receivedNsbtRaw))
270270
271271
272272 func orderData (orderId,totalWavelets,filledWavelets,owner,status,roi,price,currentPrice) = [StringEntry(getOrderPriceKey(orderId), toString(price)), IntegerEntry(getOrderTotalKey(orderId), totalWavelets), IntegerEntry(getOrderFilledTotalKey(orderId), filledWavelets), StringEntry(getOrderOwnerKey(orderId), owner), IntegerEntry(getOrderHeightKey(orderId), height), StringEntry(getOrderStatusKey(orderId), status), IntegerEntry(("debug_order_currentPrice_" + orderId), currentPrice), IntegerEntry(getRoiByOrderIdKey(orderId), roi)]
273273
274274
275275 func toStr (name,curveResult) = (((((((((((((((((((((((((((((((((((name + "[nsbtAmountRaw=") + toString(asInt(curveResult[0]))) + " usdnPayment=") + toString(asInt(curveResult[1]))) + " wRaw=") + toString(asInt(curveResult[2]))) + " uRaw=") + toString(asInt(curveResult[3]))) + " mRaw=") + toString(asInt(curveResult[4]))) + " sRaw=") + toString(asInt(curveResult[5]))) + " nsbtCurveParam_a=") + toString(asInt(curveResult[6]))) + " nsbtCurveParam_b=") + toString(asInt(curveResult[7]))) + " wReservesInUsdn=") + toString(asInt(curveResult[8]))) + " price=") + toString(asInt(curveResult[9]))) + " multBR=") + toString(asInt(curveResult[10]))) + " multPower=") + toString(asInt(curveResult[11]))) + " multExpInPower=") + asString(curveResult[12])) + " multK=") + asString(curveResult[13])) + " step1=") + asString(curveResult[14])) + " step2=") + asString(curveResult[15])) + " step3=") + toString(asInt(curveResult[16]))) + "]")
276276
277277
278278 func surfData (surfResult) = StringEntry("debug_surfResult", makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(asInt(surfResult[bFuncIdxSurf])), toString(asInt(surfResult[bFuncIdxWaves])), toString(asInt(surfResult[bFuncIdxUsdn])), toString(asInt(surfResult[bFuncIdxReserveStart])), toString(asInt(surfResult[bFuncIdxSupplyStart])), toString(asInt(surfResult[bFuncIdxBRStart])), toString(asInt(surfResult[bFuncIdxReserveEnd])), toString(asInt(surfResult[bFuncIdxSupplyEnd])), toString(asInt(surfResult[bFuncIdxBREnd])), toString(asInt(surfResult[bFuncIdxRest])), toString(asInt(surfResult[bFuncIdxWavesPrice]))], SEP))
279279
280280
281281 @Callable(i)
282282 func constructorV1 (mathContractAddress,minWavesForNsbtBuy,minNsbtSell) = if ((i.caller != this))
283283 then throw("Permission denied")
284284 else [StringEntry(MathContractKey, mathContractAddress), IntegerEntry(MinNsbtSellKey, minNsbtSell), IntegerEntry(MinWavesForNsbtBuyKey, minWavesForNsbtBuy)]
285285
286286
287287
288288 @Callable(i)
289289 func constructorV2 (minWavesForSurfBuyKey,minUsdnForSurfBuyKey,description) = if ((i.caller != this))
290290 then throw("Permission denied")
291291 else {
292292 let issue = Issue("SURF", description, 0, 6, true, unit, 0)
293293 let assetId = calculateAssetId(issue)
294294 [issue, StringEntry(SurfAssetIdKey, toBase58String(assetId)), IntegerEntry(MinWavesForSurfBuyKey, minWavesForSurfBuyKey), IntegerEntry(MinUsdnForSurfBuyKey, minUsdnForSurfBuyKey)]
295295 }
296296
297297
298298
299299 @Callable(i)
300300 func buyNsbt () = {
301301 let pmt = value(i.payments[0])
302302 let pmtAmount = pmt.amount
303303 let wavesPay = pmtAmount
304304 if (isBlocked)
305305 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
306306 else if (isDefined(pmt.assetId))
307307 then throw("can use waves only")
308308 else if ((minWavesAmountNsbtBuy > pmtAmount))
309309 then throw((("min " + toString((minWavesAmountNsbtBuy / MULT8))) + " waves expected"))
310310 else {
311311 let ownerAddress = i.caller
312312 let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
313313 let currentPrice = asInt(neutrinoMetrics[0])
314314 let curveResult = asAnyList(invoke(mathContract, "curveFunctionREADONLY", [wavesPay], nil))
315315 let nsbtAmount = asInt(curveResult[0])
316316 if ((0 >= nsbtAmount))
317317 then throw("nsbtAmount <= 0")
318318 else {
319319 let nsbt2WavesPriceRaw = calcNsbt2WavesPriceRaw(wavesPay, nsbtAmount)
320320 let roi = 0
321321 let amountLeased = invoke(neutrinoContract, "acceptWaves", nil, i.payments)
322322 if ((amountLeased == amountLeased))
323323 then $Tuple2((orderData(toBase58String(i.transactionId), pmtAmount, pmtAmount, toString(ownerAddress), FILLED, roi, nsbt2WavesPriceRaw, currentPrice) ++ [ScriptTransfer(ownerAddress, nsbtAmount, nsbtAssetId), StringEntry("debug_curveResult", toStr("curveResult", curveResult))]), nsbtAmount)
324324 else throw("Strict value is not equal to itself.")
325325 }
326326 }
327327 }
328328
329329
330330
331331 @Callable(i)
332332 func sellNsbt () = if (isBlocked)
333333 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
334334 else {
335335 let pmt = value(i.payments[0])
336336 let pmtAmount = pmt.amount
337337 if ((pmt.assetId != nsbtAssetId))
338338 then throw("can use NSBT only")
339339 else if ((minNsbtSell > pmtAmount))
340340 then throw((("min " + toString((minNsbtSell / MULT6))) + " nsbt expected"))
341341 else {
342342 let newPrice = asInt(asAnyList(invoke(mathContract, "calcContractNsbtPriceSYSREADONLY", [-(pmtAmount)], nil))[0])
343343 if ((MULT6 > newPrice))
344344 then throw((("resulting nsbt price would be < 1 (" + toString(newPrice)) + " usdn)"))
345345 else {
346346 let transf = invoke(neutrinoContract, "transferUsdnToUser", [pmtAmount, toString(i.caller)], nil)
347347 if ((transf == transf))
348348 then $Tuple2(nil, newPrice)
349349 else throw("Strict value is not equal to itself.")
350350 }
351351 }
352352 }
353353
354354
355355
356356 @Callable(i)
357357 func cancelOrder (orderId) = {
358358 let owner = getOrderOwner(orderId)
359359 let amount = (getOrderTotal(orderId) - getOrderFilledTotal(orderId))
360360 let caller = toString(i.caller)
361361 let nextOrder = getNextOrder(orderId)
362362 let prevOrder = getPrevOrder(orderId)
363363 if ((getOrderStatus(orderId) != NEW))
364364 then throw("invalid order status")
365365 else [StringEntry(FirstOrderKey, if ((firstOrder == orderId))
366366 then nextOrder
367367 else firstOrder), StringEntry(getNextOrderKey(prevOrder), nextOrder), StringEntry(getPrevOrderKey(nextOrder), prevOrder), StringEntry(getOrderStatusKey(orderId), CANCELED), ScriptTransfer(i.caller, amount, unit)]
368368 }
369369
370370
371371
372372 @Callable(i)
373373 func minWavesAmountNsbtBuySYSREADONLY () = $Tuple2(nil, minWavesAmountNsbtBuy)
374374
375375
376376
377377 @Callable(i)
378378 func minNsbtAmountForSellSYSREADONLY () = $Tuple2(nil, minNsbtSell)
379379
380380
381381
382382 @Callable(i)
383383 func minWavesAmountSurfBuySYSREADONLY () = $Tuple2(nil, minWavesAmountSurfBuy)
384384
385385
386386
387387 @Callable(i)
388388 func minUsdnAmountSurfBuySYSREADONLY () = $Tuple2(nil, minUsdnAmountSurfBuy)
389389
390390
391391
392392 @Callable(i)
393393 func buySurf (averagePriceWanted,maxTolerancePerc,autoStake) = {
394394 let testAccounts = valueOrElse(getString(this, "testAccounts"), "")
395395 if (if ((testAccounts != ""))
396396 then !(contains(testAccounts, toString(i.caller)))
397397 else false)
398398 then throw("Be patient! Need to test in mainnet before launch.")
399399 else if ((size(i.payments) != 1))
400400 then throw("exactly 1 payment must be attached")
401401 else if ((0 >= averagePriceWanted))
402402 then throw("averagePriceWanted should be positive")
403403 else if ((0 >= maxTolerancePerc))
404404 then throw("maxTolerancePerc should be positive")
405405 else if (isBlocked)
406406 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
407407 else {
408408 let pmt = i.payments[0]
409409 let amt = pmt.amount
410410 let pmtAssetId = valueOrElse(pmt.assetId, WAVESID)
411411 if (if ((pmtAssetId != neutrinoAssetId))
412412 then (pmtAssetId != WAVESID)
413413 else false)
414414 then throw("Unsupported payment asset")
415415 else if (if ((pmtAssetId == neutrinoAssetId))
416416 then (minUsdnAmountSurfBuy > amt)
417417 else false)
418418 then throw((("min " + toString((minUsdnAmountSurfBuy / MULT6))) + " USDN expected"))
419419 else if (if ((pmtAssetId == WAVESID))
420420 then (minWavesAmountSurfBuy > amt)
421421 else false)
422422 then throw((("min " + toString((minWavesAmountSurfBuy / MULT8))) + " WAVES expected"))
423423 else {
424424 let surfResult = asAnyList(invoke(mathContract, "surfFunctionREADONLY", [amt, pmtAssetId], nil))
425425 let spentWaves = asInt(surfResult[bFuncIdxWaves])
426426 let spentUsdn = asInt(surfResult[bFuncIdxUsdn])
427427 let surfAmount = asInt(surfResult[bFuncIdxSurf])
428428 let surfAmountX6 = toBigInt(surfAmount)
429429 let spentActualX18 = if ((pmtAssetId == WAVESID))
430430 then (toBigInt(spentWaves) * MULTX10)
431431 else (toBigInt(spentUsdn) * MULTX12)
432432 if ((spentActualX18 > ((toBigInt((maxTolerancePerc + MULT6)) * toBigInt(averagePriceWanted)) * surfAmountX6)))
433433 then throw((((((("Tolerance " + toString(maxTolerancePerc)) + " exceeded: spent ") + (if ((pmtAssetId == WAVESID))
434434 then (toString(spentWaves) + " WAVES")
435435 else (toString(spentUsdn) + " USDN"))) + " for ") + toString(surfAmount)) + " SURF"))
436436 else {
437437 let rest = asInt(surfResult[bFuncIdxRest])
438438 let transfer = if ((pmtAssetId == WAVESID))
439439 then {
440440 let wavesAmt = invoke(neutrinoContract, "acceptWaves", nil, [AttachedPayment(unit, (amt - rest))])
441441 if ((wavesAmt == wavesAmt))
442442 then if ((rest > 0))
443443 then [ScriptTransfer(i.caller, rest, unit)]
444444 else nil
445445 else throw("Strict value is not equal to itself.")
446446 }
447447 else if ((rest > 0))
448448 then [ScriptTransfer(neutrinoContract, (amt - rest), neutrinoAssetId), ScriptTransfer(i.caller, rest, neutrinoAssetId)]
449449 else [ScriptTransfer(neutrinoContract, (amt - rest), neutrinoAssetId)]
450450 let surfAssetId = asBytes(invoke(this, "issueSurf", [surfAmount, ""], nil))
451451 let surfAction = if (autoStake)
452452 then {
453453 let stakingInv = invoke(surfStakingContract, "stakeByOriginCaller", nil, [AttachedPayment(surfAssetId, surfAmount)])
454454 if ((stakingInv == stakingInv))
455455 then nil
456456 else throw("Strict value is not equal to itself.")
457457 }
458458 else [ScriptTransfer(i.caller, surfAmount, surfAssetId)]
459459 ((transfer ++ [surfData(surfResult)]) ++ surfAction)
460460 }
461461 }
462462 }
463463 }
464464
465465
466466
467467 @Callable(i)
468468 func issueSurf (surfAmount,targetAddress) = {
469469 let surfAssetId = fromBase58String(getStringValue(SurfAssetIdKey))
470470 if ((i.caller == this))
471471 then $Tuple2([Reissue(surfAssetId, surfAmount, true)], surfAssetId)
472472 else if ((i.caller == neutrinoContract))
473473 then $Tuple2([Reissue(surfAssetId, surfAmount, true), ScriptTransfer(addressFromStringValue(targetAddress), surfAmount, surfAssetId)], surfAssetId)
474474 else throw("issueSurf - permission denied")
475475 }
476476
477477
478478
479479 @Callable(i)
480480 func updateReservesAndNeutrinoSupply () = {
481481 func getNumberByKeyInternal (key) = match getInteger(this, key) {
482482 case a: Int =>
483483 a
484484 case _ =>
485485 0
486486 }
487487
488488 let nMetrix = asAnyList(invoke(mathContract, "calcNeutinoMetricsREADONLY", nil, nil))
489489 let idx = getNumberByKeyInternal("updateReservesAndNeutrinoSupplyIdx")
490490 let newIdx = (idx + 1)
491491 [IntegerEntry("updateReservesAndNeutrinoSupplyIdx", newIdx), IntegerEntry("reserve", asInt(nMetrix[3])), IntegerEntry("neutrinoSupply", asInt(nMetrix[5])), IntegerEntry("reservesInUsdn", convertWavesToNeutrino(asInt(nMetrix[3]), asInt(nMetrix[0]))), IntegerEntry("deficit", -(asInt(nMetrix[6])))]
492492 }
493493
494494
495495
496496 @Callable(i)
497497 func wavesBalancesVsPayment () = {
498498 let b = wavesBalance(this)
499499 [IntegerEntry("wavesBalance_available", b.available), IntegerEntry("wavesBalance_regular", b.regular), IntegerEntry("wavesBalance_generating", b.generating), IntegerEntry("wavesBalance_effective", b.effective), IntegerEntry("waves_payment", value(i.payments[0]).amount)]
500500 }
501501
502502
503503 @Verifier(tx)
504504 func verify () = {
505505 let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP)
506506 let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP)
507507 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
508508 then 1
509509 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
510510 then 1
511511 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
512512 then 1
513513 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
514514 then 2
515515 else 0))
516516 (count >= 3)
517517 }
518518

github/deemru/w8io/026f985 
50.67 ms