tx · 7zDSZYjBEUtyLh228DZfdU9TP1nj9cZtNrh7mUBKUHzq

3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd:  -0.02400000 Waves

2023.02.27 10:00 [2467783] smart account 3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd > SELF 0.00000000 Waves

{ "type": 13, "id": "7zDSZYjBEUtyLh228DZfdU9TP1nj9cZtNrh7mUBKUHzq", "fee": 2400000, "feeAssetId": null, "timestamp": 1677481295814, "version": 2, "chainId": 84, "sender": "3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd", "senderPublicKey": "CdnTmMHxT68Qa4MtHEnAiUhsdKTi2YkHPGn92ThinVNt", "proofs": [ "31W4qDztB2kJ3Vtcsd74LyUod1dNqkyxzRmTbDBvgBiKgMTT83VuBYwtEes7cuHdDuywwfj5NHWPP4QcxAM5EGBT", "3zJwCQUh1hs8R3CEz8oS8yy5LUaFv5f41GAxxiMSC1VwNnGWWQ1yX9737QVVrUEg9GVNtpqmRNXHEmfCgEZu7rvx", "28s55smSGTvf5RdKnf69mbjNtHTVsu2R84GHcRHSPfi5puoxZQ9ZytnHpH4rJ76BZSbh9Dwxf8aSpETFY3xT63GE" ], "script": "base64:AAIFAAAAAAAAAC4IAhIFCgMIAQESBQoDAQEIEgASABIDCgEIEgASABIAEgASBQoDAQEEEgQKAgEIAAAAbQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AgAAAAABAAAAFmdldEJvb2xCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAAB2FkZHJl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EJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAgAAAAAAAAAAAQAAAAAAAAAAAAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAADCQACWQAAAAEJAAGRAAAAAgUAAAAQcHViS2V5QWRtaW5zTGlzdAAAAAAAAAAAAwAAAAAAAAAAAgAAAAAAAAAAAAkAAGcAAAACBQAAAAVjb3VudAAAAAAAAAAAA1bOOBg=", "height": 2467783, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GQ6jZQ6gyvpcuUq4fzuqm9ZnFAWGFs7rwRwbB7DDYFBr Next: F9p2EZp6KYaGKNkne7XimzcXk67u1Ee3kMrte7TrHvcQ 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 @Verifier(tx)
479479 func verify () = {
480480 let pubKeyAdminsListStr = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], SEP)
481481 let pubKeyAdminsList = split(valueOrElse(getString(controlContract, "%s__multisig"), pubKeyAdminsListStr), SEP)
482482 let count = ((((if (sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(pubKeyAdminsList[0])))
483483 then 1
484484 else 0) + (if (sigVerify(tx.bodyBytes, tx.proofs[1], fromBase58String(pubKeyAdminsList[1])))
485485 then 1
486486 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[2], fromBase58String(pubKeyAdminsList[2])))
487487 then 1
488488 else 0)) + (if (sigVerify(tx.bodyBytes, tx.proofs[3], fromBase58String(pubKeyAdminsList[3])))
489489 then 2
490490 else 0))
491491 (count >= 3)
492492 }
493493

github/deemru/w8io/026f985 
44.52 ms