tx · 2Z2SgHS6pDspCAmDguJ14fuomG936f66N9ovpAFpnLEF

3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd:  -0.04000000 Waves

2022.08.09 19:47 [2177184] smart account 3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd > SELF 0.00000000 Waves

{ "type": 13, "id": "2Z2SgHS6pDspCAmDguJ14fuomG936f66N9ovpAFpnLEF", "fee": 4000000, "feeAssetId": null, "timestamp": 1660063676460, "version": 1, "sender": "3N5NAftzfcw3gAt8nc35bNr9UdPTVgC81fd", "senderPublicKey": "CdnTmMHxT68Qa4MtHEnAiUhsdKTi2YkHPGn92ThinVNt", "proofs": [ "5iRLsfXuVKjmJxXHAJcyNh8DyJkHm3M2RGBNSPDUXJDARmSgfvUyDKs2WNxKXJAK4N43i9kG81vA1GKapoWbQ7wP", "3eFwYXC4g7qZpU8n5TiaRmqshePyV9UCRwB2BkPotMcAD1sqXkymDKNtTND8DBNCLHBv6WftD5h1DKLoszYimuRx", "5cJhY8v1hjCH4svGqz2QqAGcnNYkvpbhJgLMZCi7TtdzU95uppeubAYE6Yb8YvMjHmgtRRJe86UUogUEwpQSZwAu" ], "script": "base64:AAIFAAAAAAAAADEIAhIFCgMIAQESBQoDAQEIEgASABIDCgEIEgASABIAEgASBQoDAQEEEgMKAQESABIAAAAAbQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkAAAAAAAAAAAABAAAADmdldFN0cmluZ0J5S2V5AAAAAQAAAANrZXkJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AgAAAAABAAAAFmdldEJvb2xCeUFkZHJlc3NBbmRLZXkAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQcBA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9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAEAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAIAAAAAAAAAAAEAAAAAAAAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAwkAAlkAAAABCQABkQAAAAIFAAAAEHB1YktleUFkbWluc0xpc3QAAAAAAAAAAAMAAAAAAAAAAAIAAAAAAAAAAAAJAABnAAAAAgUAAAAFY291bnQAAAAAAAAAAAMVF031", "chainId": 84, "height": 2177184, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4hGF58kqxdwBsuwC3cP9gXh68bPAgRLzyENxw5wJK4SD Next: B1ERuQyd6dbVkUuRuUWj2Ly9G1SiD7yoLkkgrxr2yM7 Diff:
OldNewDifferences
298298
299299
300300 @Callable(bH)
301-func constructorV2 (bK,bL) = if ((bH.caller != this))
301+func constructorV2 (bK,bL,bM) = if ((bH.caller != this))
302302 then throw("Permission denied")
303303 else {
304- let bM = Issue("SURF", "Smart Utility Recapitalization Feature token", 0, 6, true, unit, 0)
305- let bN = calculateAssetId(bM)
306-[bM, StringEntry(ay, toBase58String(bN)), IntegerEntry(aG, bK), IntegerEntry(aH, bL)]
304+ let bN = Issue("SURF", bM, 0, 6, true, unit, 0)
305+ let bO = calculateAssetId(bN)
306+[bN, StringEntry(ay, toBase58String(bO)), IntegerEntry(aG, bK), IntegerEntry(aH, bL)]
307307 }
308308
309309
310310
311311 @Callable(bH)
312312 func buyNsbt () = {
313- let bO = value(bH.payments[0])
314- let bP = bO.amount
315- let bQ = bP
313+ let bP = value(bH.payments[0])
314+ let bQ = bP.amount
315+ let bR = bQ
316316 if (bd)
317317 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
318- else if (isDefined(bO.assetId))
318+ else if (isDefined(bP.assetId))
319319 then throw("can use waves only")
320- else if ((be > bP))
320+ else if ((be > bQ))
321321 then throw((("min " + toString((be / t))) + " waves expected"))
322322 else {
323- let bR = bH.caller
324- let bS = h(invoke(as, "calcNeutinoMetricsREADONLY", nil, nil))
325- let bB = n(bS[0])
326- let bE = h(invoke(as, "curveFunctionREADONLY", [bQ], nil))
327- let bT = n(bE[0])
328- if ((0 >= bT))
323+ let bS = bH.caller
324+ let bT = h(invoke(as, "calcNeutinoMetricsREADONLY", nil, nil))
325+ let bB = n(bT[0])
326+ let bE = h(invoke(as, "curveFunctionREADONLY", [bR], nil))
327+ let bU = n(bE[0])
328+ if ((0 >= bU))
329329 then throw("nsbtAmount <= 0")
330330 else {
331- let bU = bs(bQ, bT)
331+ let bV = bs(bR, bU)
332332 let bA = 0
333- let bV = invoke(at, "acceptWaves", nil, bH.payments)
334- if ((bV == bV))
335- then $Tuple2((bv(toBase58String(bH.transactionId), bP, bP, toString(bR), z, bA, bU, bB) ++ [ScriptTransfer(bR, bT, bc), StringEntry("debug_curveResult", bC("curveResult", bE))]), bT)
333+ let bW = invoke(at, "acceptWaves", nil, bH.payments)
334+ if ((bW == bW))
335+ then $Tuple2((bv(toBase58String(bH.transactionId), bQ, bQ, toString(bS), z, bA, bV, bB) ++ [ScriptTransfer(bS, bU, bc), StringEntry("debug_curveResult", bC("curveResult", bE))]), bU)
336336 else throw("Strict value is not equal to itself.")
337337 }
338338 }
344344 func sellNsbt () = if (bd)
345345 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
346346 else {
347- let bO = value(bH.payments[0])
348- let bP = bO.amount
349- if ((bO.assetId != bc))
347+ let bP = value(bH.payments[0])
348+ let bQ = bP.amount
349+ if ((bP.assetId != bc))
350350 then throw("can use NSBT only")
351- else if ((bf > bP))
351+ else if ((bf > bQ))
352352 then throw((("min " + toString((bf / s))) + " nsbt expected"))
353353 else {
354- let bW = n(h(invoke(as, "calcContractNsbtPriceSYSREADONLY", [-(bP)], nil))[0])
355- if ((s > bW))
356- then throw((("resulting nsbt price would be < 1 (" + toString(bW)) + " usdn)"))
354+ let bX = n(h(invoke(as, "calcContractNsbtPriceSYSREADONLY", [-(bQ)], nil))[0])
355+ if ((s > bX))
356+ then throw((("resulting nsbt price would be < 1 (" + toString(bX)) + " usdn)"))
357357 else {
358- let bX = invoke(at, "transferUsdnToUser", [bP, toString(bH.caller)], nil)
359- if ((bX == bX))
360- then $Tuple2(nil, bW)
358+ let bY = invoke(at, "transferUsdnToUser", [bQ, toString(bH.caller)], nil)
359+ if ((bY == bY))
360+ then $Tuple2(nil, bX)
361361 else throw("Strict value is not equal to itself.")
362362 }
363363 }
369369 func cancelOrder (aJ) = {
370370 let by = bm(aJ)
371371 let aT = (bl(aJ) - bo(aJ))
372- let bY = toString(bH.caller)
373- let bZ = bq(aJ)
374- let ca = bp(aJ)
372+ let bZ = toString(bH.caller)
373+ let ca = bq(aJ)
374+ let cb = bp(aJ)
375375 if ((bn(aJ) != y))
376376 then throw("invalid order status")
377377 else [StringEntry(aC, if ((bi == aJ))
378- then bZ
379- else bi), StringEntry(aR(ca), bZ), StringEntry(aQ(bZ), ca), StringEntry(aO(aJ), x), ScriptTransfer(bH.caller, aT, unit)]
378+ then ca
379+ else bi), StringEntry(aR(cb), ca), StringEntry(aQ(ca), cb), StringEntry(aO(aJ), x), ScriptTransfer(bH.caller, aT, unit)]
380380 }
381381
382382
402402
403403
404404 @Callable(bH)
405-func buySurf (cb,cc,cd) = if ((size(bH.payments) != 1))
406- then throw("exactly 1 payment must be attached")
407- else if ((0 >= cb))
408- then throw("averagePriceWanted should be positive")
409- else if ((0 >= cc))
410- then throw("maxTolerancePerc should be positive")
411- else {
412- let bO = bH.payments[0]
413- let ce = bO.amount
414- let cf = valueOrElse(bO.assetId, A)
415- if (if ((cf != bb))
416- then (cf != A)
417- else false)
418- then throw("Unsupported payment asset")
419- else if (if ((cf == bb))
420- then (bh > ce)
421- else false)
422- then throw((("min " + toString((bh / s))) + " USDN expected"))
423- else if (if ((cf == A))
424- then (bg > ce)
425- else false)
426- then throw((("min " + toString((bg / t))) + " WAVES expected"))
427- else {
428- let bG = h(invoke(as, "surfFunctionREADONLY", [ce, cf], nil))
429- let cg = n(bG[O])
430- let ch = n(bG[P])
431- let ci = n(bG[N])
432- let cj = toBigInt(ci)
433- let ck = if ((cf == A))
434- then (toBigInt(cg) * u)
435- else (toBigInt(ch) * v)
436- if ((ck > ((toBigInt((cc + s)) * toBigInt(cb)) * cj)))
437- then throw((((((("Tolerance " + toString(cc)) + " exceeded: spent ") + (if ((cf == A))
438- then (toString(cg) + " WAVES")
439- else (toString(ch) + " USDN"))) + " for ") + toString(ci)) + " SURF"))
440- else {
441- let cl = n(bG[W])
442- let cm = if ((cf == A))
443- then {
444- let cn = invoke(at, "acceptWaves", nil, [AttachedPayment(unit, (ce - cl))])
445- if ((cn == cn))
446- then if ((cl > 0))
447- then [ScriptTransfer(bH.caller, cl, unit)]
448- else nil
449- else throw("Strict value is not equal to itself.")
450- }
451- else if ((cl > 0))
452- then [ScriptTransfer(at, (ce - cl), bb), ScriptTransfer(bH.caller, cl, bb)]
453- else [ScriptTransfer(at, (ce - cl), bb)]
454- let co = p(invoke(this, "issueSurf", [ci], nil))
455- let cp = if (cd)
456- then {
457- let cq = invoke(au, "stakeByOriginCaller", nil, [AttachedPayment(co, ci)])
458- if ((cq == cq))
459- then nil
460- else throw("Strict value is not equal to itself.")
461- }
462- else [ScriptTransfer(bH.caller, ci, co)]
463- ((cm ++ [bF(bG)]) ++ cp)
464- }
465- }
466- }
405+func buySurf (cc,cd,ce) = {
406+ let cf = valueOrElse(getString(this, "testAccounts"), "")
407+ if (if ((cf != ""))
408+ then !(contains(cf, toString(bH.caller)))
409+ else false)
410+ then throw("Be patient! Need to test in mainnet before launch.")
411+ else if ((size(bH.payments) != 1))
412+ then throw("exactly 1 payment must be attached")
413+ else if ((0 >= cc))
414+ then throw("averagePriceWanted should be positive")
415+ else if ((0 >= cd))
416+ then throw("maxTolerancePerc should be positive")
417+ else if (bd)
418+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
419+ else {
420+ let bP = bH.payments[0]
421+ let cg = bP.amount
422+ let ch = valueOrElse(bP.assetId, A)
423+ if (if ((ch != bb))
424+ then (ch != A)
425+ else false)
426+ then throw("Unsupported payment asset")
427+ else if (if ((ch == bb))
428+ then (bh > cg)
429+ else false)
430+ then throw((("min " + toString((bh / s))) + " USDN expected"))
431+ else if (if ((ch == A))
432+ then (bg > cg)
433+ else false)
434+ then throw((("min " + toString((bg / t))) + " WAVES expected"))
435+ else {
436+ let bG = h(invoke(as, "surfFunctionREADONLY", [cg, ch], nil))
437+ let ci = n(bG[O])
438+ let cj = n(bG[P])
439+ let ck = n(bG[N])
440+ let cl = toBigInt(ck)
441+ let cm = if ((ch == A))
442+ then (toBigInt(ci) * u)
443+ else (toBigInt(cj) * v)
444+ if ((cm > ((toBigInt((cd + s)) * toBigInt(cc)) * cl)))
445+ then throw((((((("Tolerance " + toString(cd)) + " exceeded: spent ") + (if ((ch == A))
446+ then (toString(ci) + " WAVES")
447+ else (toString(cj) + " USDN"))) + " for ") + toString(ck)) + " SURF"))
448+ else {
449+ let cn = n(bG[W])
450+ let co = if ((ch == A))
451+ then {
452+ let cp = invoke(at, "acceptWaves", nil, [AttachedPayment(unit, (cg - cn))])
453+ if ((cp == cp))
454+ then if ((cn > 0))
455+ then [ScriptTransfer(bH.caller, cn, unit)]
456+ else nil
457+ else throw("Strict value is not equal to itself.")
458+ }
459+ else if ((cn > 0))
460+ then [ScriptTransfer(at, (cg - cn), bb), ScriptTransfer(bH.caller, cn, bb)]
461+ else [ScriptTransfer(at, (cg - cn), bb)]
462+ let cq = p(invoke(this, "issueSurf", [ck], nil))
463+ let cr = if (ce)
464+ then {
465+ let cs = invoke(au, "stakeByOriginCaller", nil, [AttachedPayment(cq, ck)])
466+ if ((cs == cs))
467+ then nil
468+ else throw("Strict value is not equal to itself.")
469+ }
470+ else [ScriptTransfer(bH.caller, ck, cq)]
471+ ((co ++ [bF(bG)]) ++ cr)
472+ }
473+ }
474+ }
475+ }
467476
468477
469478
470479 @Callable(bH)
471-func issueSurf (ci) = {
472- let co = fromBase58String(getStringValue(ay))
480+func issueSurf (ck) = {
481+ let cq = fromBase58String(getStringValue(ay))
473482 if ((bH.caller != this))
474483 then throw("issueSurf - permission denied")
475- else $Tuple2([Reissue(co, ci, true)], co)
484+ else $Tuple2([Reissue(cq, ck, true)], cq)
476485 }
477486
478487
479488
480489 @Callable(bH)
481490 func updateReservesAndNeutrinoSupply () = {
482- func cr (b) = {
491+ func ct (b) = {
483492 let j = getInteger(this, b)
484493 if ($isInstanceOf(j, "Int"))
485494 then {
486- let cs = j
487- cs
495+ let cu = j
496+ cu
488497 }
489498 else 0
490499 }
491500
492- let ct = h(invoke(as, "calcNeutinoMetricsREADONLY", nil, nil))
493- let aq = cr("updateReservesAndNeutrinoSupplyIdx")
494- let cu = (aq + 1)
495-[IntegerEntry("updateReservesAndNeutrinoSupplyIdx", cu), IntegerEntry("reserve", n(ct[3])), IntegerEntry("neutrinoSupply", n(ct[5])), IntegerEntry("reservesInUsdn", aV(n(ct[3]), n(ct[0]))), IntegerEntry("deficit", -(n(ct[6])))]
501+ let cv = h(invoke(as, "calcNeutinoMetricsREADONLY", nil, nil))
502+ let aq = ct("updateReservesAndNeutrinoSupplyIdx")
503+ let cw = (aq + 1)
504+[IntegerEntry("updateReservesAndNeutrinoSupplyIdx", cw), IntegerEntry("reserve", n(cv[3])), IntegerEntry("neutrinoSupply", n(cv[5])), IntegerEntry("reservesInUsdn", aV(n(cv[3]), n(cv[0]))), IntegerEntry("deficit", -(n(cv[6])))]
496505 }
497506
498507
499508
500509 @Callable(bH)
501510 func wavesBalancesVsPayment () = {
502- let cv = wavesBalance(this)
503-[IntegerEntry("wavesBalance_available", cv.available), IntegerEntry("wavesBalance_regular", cv.regular), IntegerEntry("wavesBalance_generating", cv.generating), IntegerEntry("wavesBalance_effective", cv.effective), IntegerEntry("waves_payment", value(bH.payments[0]).amount)]
511+ let cx = wavesBalance(this)
512+[IntegerEntry("wavesBalance_available", cx.available), IntegerEntry("wavesBalance_regular", cx.regular), IntegerEntry("wavesBalance_generating", cx.generating), IntegerEntry("wavesBalance_effective", cx.effective), IntegerEntry("waves_payment", value(bH.payments[0]).amount)]
504513 }
505514
506515
507-@Verifier(cw)
508-func cx () = {
509- let cy = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], r)
510- let cz = split(valueOrElse(getString(ar, "%s__multisig"), cy), r)
511- let cA = ((((if (sigVerify(cw.bodyBytes, cw.proofs[0], fromBase58String(cz[0])))
516+@Verifier(cy)
517+func cz () = {
518+ let cA = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], r)
519+ let cB = split(valueOrElse(getString(ar, "%s__multisig"), cA), r)
520+ let cC = ((((if (sigVerify(cy.bodyBytes, cy.proofs[0], fromBase58String(cB[0])))
512521 then 1
513- else 0) + (if (sigVerify(cw.bodyBytes, cw.proofs[1], fromBase58String(cz[1])))
522+ else 0) + (if (sigVerify(cy.bodyBytes, cy.proofs[1], fromBase58String(cB[1])))
514523 then 1
515- else 0)) + (if (sigVerify(cw.bodyBytes, cw.proofs[2], fromBase58String(cz[2])))
524+ else 0)) + (if (sigVerify(cy.bodyBytes, cy.proofs[2], fromBase58String(cB[2])))
516525 then 1
517- else 0)) + (if (sigVerify(cw.bodyBytes, cw.proofs[3], fromBase58String(cz[3])))
526+ else 0)) + (if (sigVerify(cy.bodyBytes, cy.proofs[3], fromBase58String(cB[3])))
518527 then 2
519528 else 0))
520- (cA >= 3)
529+ (cC >= 3)
521530 }
522531
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b) = valueOrElse(getInteger(this, b), 0)
55
66
77 func c (b) = valueOrElse(getString(this, b), "")
88
99
1010 func d (e,b) = valueOrElse(getBoolean(e, b), false)
1111
1212
1313 func f (e,b) = valueOrElse(getString(e, b), "")
1414
1515
1616 func g (e,b) = valueOrElse(getInteger(e, b), 0)
1717
1818
1919 func h (i) = {
2020 let j = i
2121 if ($isInstanceOf(j, "List[Any]"))
2222 then {
2323 let k = j
2424 k
2525 }
2626 else throw("fail to cast into List[Any]")
2727 }
2828
2929
3030 func l (i) = {
3131 let j = i
3232 if ($isInstanceOf(j, "String"))
3333 then {
3434 let m = j
3535 m
3636 }
3737 else throw("fail to cast into String")
3838 }
3939
4040
4141 func n (i) = {
4242 let j = i
4343 if ($isInstanceOf(j, "Int"))
4444 then {
4545 let o = j
4646 o
4747 }
4848 else throw("fail to cast into Int")
4949 }
5050
5151
5252 func p (i) = {
5353 let j = i
5454 if ($isInstanceOf(j, "ByteVector"))
5555 then {
5656 let q = j
5757 q
5858 }
5959 else throw("fail to cast into Int")
6060 }
6161
6262
6363 let r = "__"
6464
6565 let s = 1000000
6666
6767 let t = 100000000
6868
6969 let u = toBigInt(10000000000)
7070
7171 let v = toBigInt(1000000000000)
7272
7373 let w = toBigInt(10000000000000000)
7474
7575 let x = "canceled"
7676
7777 let y = "new"
7878
7979 let z = "filled"
8080
8181 let A = fromBase58String("WAVES")
8282
8383 let B = 0
8484
8585 let C = 1
8686
8787 let D = 2
8888
8989 let E = 3
9090
9191 let F = 4
9292
9393 let G = 5
9494
9595 let H = 6
9696
9797 let I = 7
9898
9999 let J = 8
100100
101101 let K = 9
102102
103103 let L = 10
104104
105105 let M = 11
106106
107107 let N = 0
108108
109109 let O = 1
110110
111111 let P = 2
112112
113113 let Q = 3
114114
115115 let R = 4
116116
117117 let S = 5
118118
119119 let T = 6
120120
121121 let U = 7
122122
123123 let V = 8
124124
125125 let W = 9
126126
127127 let X = 10
128128
129129 let Y = 1
130130
131131 let Z = 2
132132
133133 let aa = 3
134134
135135 let ab = 4
136136
137137 let ac = 5
138138
139139 let ad = 6
140140
141141 let ae = 7
142142
143143 let af = 8
144144
145145 let ag = 9
146146
147147 let ah = 10
148148
149149 let ai = 11
150150
151151 func aj (e,b) = valueOrErrorMessage(getString(e, b), (((("mandatory " + toString(e)) + ".") + b) + " is not defined"))
152152
153153
154154 func ak () = "%s%s__config__controlAddress"
155155
156156
157157 func al () = "%s__controlConfig"
158158
159159
160160 func am (an) = split(aj(an, al()), r)
161161
162162
163163 func ao (ap,aq) = valueOrErrorMessage(addressFromString(ap[aq]), ("Control cfg doesn't contain address at index " + toString(aq)))
164164
165165
166166 let ar = addressFromStringValue(valueOrElse(getString(this, ak()), "3N4NS7d4Jo9a6F14LiFUKKYVdUkkf2eP4Zx"))
167167
168168 let ap = am(ar)
169169
170170 let as = ao(ap, ab)
171171
172172 let at = ao(ap, Y)
173173
174174 let au = ao(ap, ah)
175175
176176 let av = "price"
177177
178178 let aw = "bond_asset_id"
179179
180180 let ax = "neutrino_asset_id"
181181
182182 let ay = "surf_asset_id"
183183
184184 let az = "balance_lock_"
185185
186186 let aA = (az + "waves")
187187
188188 let aB = (az + "neutrino")
189189
190190 let aC = "order_first"
191191
192192 let aD = "math_contract"
193193
194194 let aE = "min_waves_nsbt_buy"
195195
196196 let aF = "min_nsbt_sell"
197197
198198 let aG = "min_waves_surf_buy"
199199
200200 let aH = "min_usdn_surf_buy"
201201
202202 func aI (aJ) = ("debug_order_roi_" + aJ)
203203
204204
205205 func aK (aJ) = ("order_price_" + aJ)
206206
207207
208208 func aL (aJ) = ("order_total_" + aJ)
209209
210210
211211 func aM (aJ) = ("order_owner_" + aJ)
212212
213213
214214 func aN (aJ) = ("order_height_" + aJ)
215215
216216
217217 func aO (aJ) = ("order_status_" + aJ)
218218
219219
220220 func aP (aJ) = ("order_filled_total_" + aJ)
221221
222222
223223 func aQ (aJ) = ("order_prev_" + aJ)
224224
225225
226226 func aR (aJ) = ("order_next_" + aJ)
227227
228228
229229 func aS (aT,aU) = fraction(aT, t, aU)
230230
231231
232232 func aV (aT,aU) = fraction(aT, aU, t)
233233
234234
235235 func aW (aX,aY) = fraction(toBigInt(aX), w, toBigInt(aY))
236236
237237
238238 func aZ (i,ba) = toInt(fraction(i, toBigInt(ba), w))
239239
240240
241241 let bb = base58'HezsdQuRDtzksAYUy97gfhKy7Z1NW2uXYSHA3bgqenNZ'
242242
243243 let bc = base58'F3iaxzruFeKujfVfYSZEkejpjh67wmRfPCRHiNmWKp3Z'
244244
245245 let bd = d(ar, "is_blocked")
246246
247247 let be = valueOrElse(getInteger(this, aE), 1000000000)
248248
249249 let bf = valueOrElse(getInteger(this, aF), 1000000)
250250
251251 let bg = valueOrElse(getInteger(this, aG), 100000000)
252252
253253 let bh = valueOrElse(getInteger(this, aH), 10000000)
254254
255255 let bi = c(aC)
256256
257257 func bj (bk) = a(aK(bk))
258258
259259
260260 func bl (bk) = a(aL(bk))
261261
262262
263263 func bm (bk) = c(aM(bk))
264264
265265
266266 func bn (bk) = c(aO(bk))
267267
268268
269269 func bo (bk) = a(aP(bk))
270270
271271
272272 func bp (bk) = c(aQ(bk))
273273
274274
275275 func bq (bk) = c(aR(bk))
276276
277277
278278 func br (aU) = ((s * s) / aU)
279279
280280
281281 func bs (bt,bu) = fraction(toBigInt(bt), toBigInt((s * s)), toBigInt(bu))
282282
283283
284284 func bv (aJ,bw,bx,by,bz,bA,aU,bB) = [StringEntry(aK(aJ), toString(aU)), IntegerEntry(aL(aJ), bw), IntegerEntry(aP(aJ), bx), StringEntry(aM(aJ), by), IntegerEntry(aN(aJ), height), StringEntry(aO(aJ), bz), IntegerEntry(("debug_order_currentPrice_" + aJ), bB), IntegerEntry(aI(aJ), bA)]
285285
286286
287287 func bC (bD,bE) = (((((((((((((((((((((((((((((((((((bD + "[nsbtAmountRaw=") + toString(n(bE[0]))) + " usdnPayment=") + toString(n(bE[1]))) + " wRaw=") + toString(n(bE[2]))) + " uRaw=") + toString(n(bE[3]))) + " mRaw=") + toString(n(bE[4]))) + " sRaw=") + toString(n(bE[5]))) + " nsbtCurveParam_a=") + toString(n(bE[6]))) + " nsbtCurveParam_b=") + toString(n(bE[7]))) + " wReservesInUsdn=") + toString(n(bE[8]))) + " price=") + toString(n(bE[9]))) + " multBR=") + toString(n(bE[10]))) + " multPower=") + toString(n(bE[11]))) + " multExpInPower=") + l(bE[12])) + " multK=") + l(bE[13])) + " step1=") + l(bE[14])) + " step2=") + l(bE[15])) + " step3=") + toString(n(bE[16]))) + "]")
288288
289289
290290 func bF (bG) = StringEntry("debug_surfResult", makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(n(bG[N])), toString(n(bG[O])), toString(n(bG[P])), toString(n(bG[Q])), toString(n(bG[R])), toString(n(bG[S])), toString(n(bG[T])), toString(n(bG[U])), toString(n(bG[V])), toString(n(bG[W])), toString(n(bG[X]))], r))
291291
292292
293293 @Callable(bH)
294294 func constructor (bI,bJ,bf) = if ((bH.caller != this))
295295 then throw("Permission denied")
296296 else [StringEntry(aD, bI), IntegerEntry(aF, bf), IntegerEntry(aE, bJ)]
297297
298298
299299
300300 @Callable(bH)
301-func constructorV2 (bK,bL) = if ((bH.caller != this))
301+func constructorV2 (bK,bL,bM) = if ((bH.caller != this))
302302 then throw("Permission denied")
303303 else {
304- let bM = Issue("SURF", "Smart Utility Recapitalization Feature token", 0, 6, true, unit, 0)
305- let bN = calculateAssetId(bM)
306-[bM, StringEntry(ay, toBase58String(bN)), IntegerEntry(aG, bK), IntegerEntry(aH, bL)]
304+ let bN = Issue("SURF", bM, 0, 6, true, unit, 0)
305+ let bO = calculateAssetId(bN)
306+[bN, StringEntry(ay, toBase58String(bO)), IntegerEntry(aG, bK), IntegerEntry(aH, bL)]
307307 }
308308
309309
310310
311311 @Callable(bH)
312312 func buyNsbt () = {
313- let bO = value(bH.payments[0])
314- let bP = bO.amount
315- let bQ = bP
313+ let bP = value(bH.payments[0])
314+ let bQ = bP.amount
315+ let bR = bQ
316316 if (bd)
317317 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
318- else if (isDefined(bO.assetId))
318+ else if (isDefined(bP.assetId))
319319 then throw("can use waves only")
320- else if ((be > bP))
320+ else if ((be > bQ))
321321 then throw((("min " + toString((be / t))) + " waves expected"))
322322 else {
323- let bR = bH.caller
324- let bS = h(invoke(as, "calcNeutinoMetricsREADONLY", nil, nil))
325- let bB = n(bS[0])
326- let bE = h(invoke(as, "curveFunctionREADONLY", [bQ], nil))
327- let bT = n(bE[0])
328- if ((0 >= bT))
323+ let bS = bH.caller
324+ let bT = h(invoke(as, "calcNeutinoMetricsREADONLY", nil, nil))
325+ let bB = n(bT[0])
326+ let bE = h(invoke(as, "curveFunctionREADONLY", [bR], nil))
327+ let bU = n(bE[0])
328+ if ((0 >= bU))
329329 then throw("nsbtAmount <= 0")
330330 else {
331- let bU = bs(bQ, bT)
331+ let bV = bs(bR, bU)
332332 let bA = 0
333- let bV = invoke(at, "acceptWaves", nil, bH.payments)
334- if ((bV == bV))
335- then $Tuple2((bv(toBase58String(bH.transactionId), bP, bP, toString(bR), z, bA, bU, bB) ++ [ScriptTransfer(bR, bT, bc), StringEntry("debug_curveResult", bC("curveResult", bE))]), bT)
333+ let bW = invoke(at, "acceptWaves", nil, bH.payments)
334+ if ((bW == bW))
335+ then $Tuple2((bv(toBase58String(bH.transactionId), bQ, bQ, toString(bS), z, bA, bV, bB) ++ [ScriptTransfer(bS, bU, bc), StringEntry("debug_curveResult", bC("curveResult", bE))]), bU)
336336 else throw("Strict value is not equal to itself.")
337337 }
338338 }
339339 }
340340
341341
342342
343343 @Callable(bH)
344344 func sellNsbt () = if (bd)
345345 then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
346346 else {
347- let bO = value(bH.payments[0])
348- let bP = bO.amount
349- if ((bO.assetId != bc))
347+ let bP = value(bH.payments[0])
348+ let bQ = bP.amount
349+ if ((bP.assetId != bc))
350350 then throw("can use NSBT only")
351- else if ((bf > bP))
351+ else if ((bf > bQ))
352352 then throw((("min " + toString((bf / s))) + " nsbt expected"))
353353 else {
354- let bW = n(h(invoke(as, "calcContractNsbtPriceSYSREADONLY", [-(bP)], nil))[0])
355- if ((s > bW))
356- then throw((("resulting nsbt price would be < 1 (" + toString(bW)) + " usdn)"))
354+ let bX = n(h(invoke(as, "calcContractNsbtPriceSYSREADONLY", [-(bQ)], nil))[0])
355+ if ((s > bX))
356+ then throw((("resulting nsbt price would be < 1 (" + toString(bX)) + " usdn)"))
357357 else {
358- let bX = invoke(at, "transferUsdnToUser", [bP, toString(bH.caller)], nil)
359- if ((bX == bX))
360- then $Tuple2(nil, bW)
358+ let bY = invoke(at, "transferUsdnToUser", [bQ, toString(bH.caller)], nil)
359+ if ((bY == bY))
360+ then $Tuple2(nil, bX)
361361 else throw("Strict value is not equal to itself.")
362362 }
363363 }
364364 }
365365
366366
367367
368368 @Callable(bH)
369369 func cancelOrder (aJ) = {
370370 let by = bm(aJ)
371371 let aT = (bl(aJ) - bo(aJ))
372- let bY = toString(bH.caller)
373- let bZ = bq(aJ)
374- let ca = bp(aJ)
372+ let bZ = toString(bH.caller)
373+ let ca = bq(aJ)
374+ let cb = bp(aJ)
375375 if ((bn(aJ) != y))
376376 then throw("invalid order status")
377377 else [StringEntry(aC, if ((bi == aJ))
378- then bZ
379- else bi), StringEntry(aR(ca), bZ), StringEntry(aQ(bZ), ca), StringEntry(aO(aJ), x), ScriptTransfer(bH.caller, aT, unit)]
378+ then ca
379+ else bi), StringEntry(aR(cb), ca), StringEntry(aQ(ca), cb), StringEntry(aO(aJ), x), ScriptTransfer(bH.caller, aT, unit)]
380380 }
381381
382382
383383
384384 @Callable(bH)
385385 func minWavesAmountNsbtBuySYSREADONLY () = $Tuple2(nil, be)
386386
387387
388388
389389 @Callable(bH)
390390 func minNsbtAmountForSellSYSREADONLY () = $Tuple2(nil, bf)
391391
392392
393393
394394 @Callable(bH)
395395 func minWavesAmountSurfBuySYSREADONLY () = $Tuple2(nil, bg)
396396
397397
398398
399399 @Callable(bH)
400400 func minUsdnAmountSurfBuySYSREADONLY () = $Tuple2(nil, bh)
401401
402402
403403
404404 @Callable(bH)
405-func buySurf (cb,cc,cd) = if ((size(bH.payments) != 1))
406- then throw("exactly 1 payment must be attached")
407- else if ((0 >= cb))
408- then throw("averagePriceWanted should be positive")
409- else if ((0 >= cc))
410- then throw("maxTolerancePerc should be positive")
411- else {
412- let bO = bH.payments[0]
413- let ce = bO.amount
414- let cf = valueOrElse(bO.assetId, A)
415- if (if ((cf != bb))
416- then (cf != A)
417- else false)
418- then throw("Unsupported payment asset")
419- else if (if ((cf == bb))
420- then (bh > ce)
421- else false)
422- then throw((("min " + toString((bh / s))) + " USDN expected"))
423- else if (if ((cf == A))
424- then (bg > ce)
425- else false)
426- then throw((("min " + toString((bg / t))) + " WAVES expected"))
427- else {
428- let bG = h(invoke(as, "surfFunctionREADONLY", [ce, cf], nil))
429- let cg = n(bG[O])
430- let ch = n(bG[P])
431- let ci = n(bG[N])
432- let cj = toBigInt(ci)
433- let ck = if ((cf == A))
434- then (toBigInt(cg) * u)
435- else (toBigInt(ch) * v)
436- if ((ck > ((toBigInt((cc + s)) * toBigInt(cb)) * cj)))
437- then throw((((((("Tolerance " + toString(cc)) + " exceeded: spent ") + (if ((cf == A))
438- then (toString(cg) + " WAVES")
439- else (toString(ch) + " USDN"))) + " for ") + toString(ci)) + " SURF"))
440- else {
441- let cl = n(bG[W])
442- let cm = if ((cf == A))
443- then {
444- let cn = invoke(at, "acceptWaves", nil, [AttachedPayment(unit, (ce - cl))])
445- if ((cn == cn))
446- then if ((cl > 0))
447- then [ScriptTransfer(bH.caller, cl, unit)]
448- else nil
449- else throw("Strict value is not equal to itself.")
450- }
451- else if ((cl > 0))
452- then [ScriptTransfer(at, (ce - cl), bb), ScriptTransfer(bH.caller, cl, bb)]
453- else [ScriptTransfer(at, (ce - cl), bb)]
454- let co = p(invoke(this, "issueSurf", [ci], nil))
455- let cp = if (cd)
456- then {
457- let cq = invoke(au, "stakeByOriginCaller", nil, [AttachedPayment(co, ci)])
458- if ((cq == cq))
459- then nil
460- else throw("Strict value is not equal to itself.")
461- }
462- else [ScriptTransfer(bH.caller, ci, co)]
463- ((cm ++ [bF(bG)]) ++ cp)
464- }
465- }
466- }
405+func buySurf (cc,cd,ce) = {
406+ let cf = valueOrElse(getString(this, "testAccounts"), "")
407+ if (if ((cf != ""))
408+ then !(contains(cf, toString(bH.caller)))
409+ else false)
410+ then throw("Be patient! Need to test in mainnet before launch.")
411+ else if ((size(bH.payments) != 1))
412+ then throw("exactly 1 payment must be attached")
413+ else if ((0 >= cc))
414+ then throw("averagePriceWanted should be positive")
415+ else if ((0 >= cd))
416+ then throw("maxTolerancePerc should be positive")
417+ else if (bd)
418+ then throw("contract is blocked by EMERGENCY SHUTDOWN actions until reactivation by emergency oracles")
419+ else {
420+ let bP = bH.payments[0]
421+ let cg = bP.amount
422+ let ch = valueOrElse(bP.assetId, A)
423+ if (if ((ch != bb))
424+ then (ch != A)
425+ else false)
426+ then throw("Unsupported payment asset")
427+ else if (if ((ch == bb))
428+ then (bh > cg)
429+ else false)
430+ then throw((("min " + toString((bh / s))) + " USDN expected"))
431+ else if (if ((ch == A))
432+ then (bg > cg)
433+ else false)
434+ then throw((("min " + toString((bg / t))) + " WAVES expected"))
435+ else {
436+ let bG = h(invoke(as, "surfFunctionREADONLY", [cg, ch], nil))
437+ let ci = n(bG[O])
438+ let cj = n(bG[P])
439+ let ck = n(bG[N])
440+ let cl = toBigInt(ck)
441+ let cm = if ((ch == A))
442+ then (toBigInt(ci) * u)
443+ else (toBigInt(cj) * v)
444+ if ((cm > ((toBigInt((cd + s)) * toBigInt(cc)) * cl)))
445+ then throw((((((("Tolerance " + toString(cd)) + " exceeded: spent ") + (if ((ch == A))
446+ then (toString(ci) + " WAVES")
447+ else (toString(cj) + " USDN"))) + " for ") + toString(ck)) + " SURF"))
448+ else {
449+ let cn = n(bG[W])
450+ let co = if ((ch == A))
451+ then {
452+ let cp = invoke(at, "acceptWaves", nil, [AttachedPayment(unit, (cg - cn))])
453+ if ((cp == cp))
454+ then if ((cn > 0))
455+ then [ScriptTransfer(bH.caller, cn, unit)]
456+ else nil
457+ else throw("Strict value is not equal to itself.")
458+ }
459+ else if ((cn > 0))
460+ then [ScriptTransfer(at, (cg - cn), bb), ScriptTransfer(bH.caller, cn, bb)]
461+ else [ScriptTransfer(at, (cg - cn), bb)]
462+ let cq = p(invoke(this, "issueSurf", [ck], nil))
463+ let cr = if (ce)
464+ then {
465+ let cs = invoke(au, "stakeByOriginCaller", nil, [AttachedPayment(cq, ck)])
466+ if ((cs == cs))
467+ then nil
468+ else throw("Strict value is not equal to itself.")
469+ }
470+ else [ScriptTransfer(bH.caller, ck, cq)]
471+ ((co ++ [bF(bG)]) ++ cr)
472+ }
473+ }
474+ }
475+ }
467476
468477
469478
470479 @Callable(bH)
471-func issueSurf (ci) = {
472- let co = fromBase58String(getStringValue(ay))
480+func issueSurf (ck) = {
481+ let cq = fromBase58String(getStringValue(ay))
473482 if ((bH.caller != this))
474483 then throw("issueSurf - permission denied")
475- else $Tuple2([Reissue(co, ci, true)], co)
484+ else $Tuple2([Reissue(cq, ck, true)], cq)
476485 }
477486
478487
479488
480489 @Callable(bH)
481490 func updateReservesAndNeutrinoSupply () = {
482- func cr (b) = {
491+ func ct (b) = {
483492 let j = getInteger(this, b)
484493 if ($isInstanceOf(j, "Int"))
485494 then {
486- let cs = j
487- cs
495+ let cu = j
496+ cu
488497 }
489498 else 0
490499 }
491500
492- let ct = h(invoke(as, "calcNeutinoMetricsREADONLY", nil, nil))
493- let aq = cr("updateReservesAndNeutrinoSupplyIdx")
494- let cu = (aq + 1)
495-[IntegerEntry("updateReservesAndNeutrinoSupplyIdx", cu), IntegerEntry("reserve", n(ct[3])), IntegerEntry("neutrinoSupply", n(ct[5])), IntegerEntry("reservesInUsdn", aV(n(ct[3]), n(ct[0]))), IntegerEntry("deficit", -(n(ct[6])))]
501+ let cv = h(invoke(as, "calcNeutinoMetricsREADONLY", nil, nil))
502+ let aq = ct("updateReservesAndNeutrinoSupplyIdx")
503+ let cw = (aq + 1)
504+[IntegerEntry("updateReservesAndNeutrinoSupplyIdx", cw), IntegerEntry("reserve", n(cv[3])), IntegerEntry("neutrinoSupply", n(cv[5])), IntegerEntry("reservesInUsdn", aV(n(cv[3]), n(cv[0]))), IntegerEntry("deficit", -(n(cv[6])))]
496505 }
497506
498507
499508
500509 @Callable(bH)
501510 func wavesBalancesVsPayment () = {
502- let cv = wavesBalance(this)
503-[IntegerEntry("wavesBalance_available", cv.available), IntegerEntry("wavesBalance_regular", cv.regular), IntegerEntry("wavesBalance_generating", cv.generating), IntegerEntry("wavesBalance_effective", cv.effective), IntegerEntry("waves_payment", value(bH.payments[0]).amount)]
511+ let cx = wavesBalance(this)
512+[IntegerEntry("wavesBalance_available", cx.available), IntegerEntry("wavesBalance_regular", cx.regular), IntegerEntry("wavesBalance_generating", cx.generating), IntegerEntry("wavesBalance_effective", cx.effective), IntegerEntry("waves_payment", value(bH.payments[0]).amount)]
504513 }
505514
506515
507-@Verifier(cw)
508-func cx () = {
509- let cy = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], r)
510- let cz = split(valueOrElse(getString(ar, "%s__multisig"), cy), r)
511- let cA = ((((if (sigVerify(cw.bodyBytes, cw.proofs[0], fromBase58String(cz[0])))
516+@Verifier(cy)
517+func cz () = {
518+ let cA = makeString(["ExtEEK19nmKj9mCpnWyvEEJFYATLMcVEMvohhUHkyHNm", "Ev5py5FfBQX9cZpYKnfQrTB49Byf8QmpZWeDVRim4yV7", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR", "DUuuLjXu98nBwZc7fqwCTjtA3nnRwgTbkMSr5SU2NmDR"], r)
519+ let cB = split(valueOrElse(getString(ar, "%s__multisig"), cA), r)
520+ let cC = ((((if (sigVerify(cy.bodyBytes, cy.proofs[0], fromBase58String(cB[0])))
512521 then 1
513- else 0) + (if (sigVerify(cw.bodyBytes, cw.proofs[1], fromBase58String(cz[1])))
522+ else 0) + (if (sigVerify(cy.bodyBytes, cy.proofs[1], fromBase58String(cB[1])))
514523 then 1
515- else 0)) + (if (sigVerify(cw.bodyBytes, cw.proofs[2], fromBase58String(cz[2])))
524+ else 0)) + (if (sigVerify(cy.bodyBytes, cy.proofs[2], fromBase58String(cB[2])))
516525 then 1
517- else 0)) + (if (sigVerify(cw.bodyBytes, cw.proofs[3], fromBase58String(cz[3])))
526+ else 0)) + (if (sigVerify(cy.bodyBytes, cy.proofs[3], fromBase58String(cB[3])))
518527 then 2
519528 else 0))
520- (cA >= 3)
529+ (cC >= 3)
521530 }
522531

github/deemru/w8io/026f985 
94.30 ms