tx · 3nBXWPNz6QUHWjdV1hXaiGmvAL1XhiWZf519u5YLSr7C

3Mzep1R5kHeC1ecKFkWjuhU3Gw4LAdCib9N:  -0.01500000 Waves

2024.02.05 13:10 [2962833] smart account 3Mzep1R5kHeC1ecKFkWjuhU3Gw4LAdCib9N > SELF 0.00000000 Waves

{ "type": 13, "id": "3nBXWPNz6QUHWjdV1hXaiGmvAL1XhiWZf519u5YLSr7C", "fee": 1500000, "feeAssetId": null, "timestamp": 1707127934912, "version": 2, "chainId": 84, "sender": "3Mzep1R5kHeC1ecKFkWjuhU3Gw4LAdCib9N", "senderPublicKey": "41THq9VrFxHEvVGJyz2oMpJQErnSkkqJXpBypSDxa5Mv", "proofs": [ "5K5jHMXZaTVEPcFeSsSR6uC5W6mNVzYk3KS9yWZFWtgDzdktGZ2GHaDXPFNSdWe6Db6v1duMhhsMdNynDzdAdLsU" ], "script": "base64:BwIkCAISAwoBGBIDCgEYEgQKAgIYEgQKAgIYEgQKAgIYEgQKAgIYJwAHY2hhaW5JZAkAyQECCQDKAQIIBQR0aGlzBWJ5dGVzAAEAAQAIY2hhaW5JZFQBAVQACGNoYWluSWRXAQFXAANTRVACAl9fAAVXQVZFUwIFV0FWRVMAEGNvbnRyYWN0RmlsZW5hbWUCFXd4ZGFvX2NhbGN1bGF0b3IucmlkZQAFbXVsdDgAgMLXLwAGbXVsdDE4CQC2AgEAgICQu7rWrfANAA13YXZlc0RlY2ltYWxzAAgADHVzZHREZWNpbWFscwAGAQV0b1gxOAIHb3JpZ1ZhbA1vcmlnU2NhbGVNdWx0CQC8AgMJALYCAQUHb3JpZ1ZhbAUGbXVsdDE4CQC2AgEFDW9yaWdTY2FsZU11bHQBB2Zyb21YMTgCA3ZhbA9yZXN1bHRTY2FsZU11bHQJAKADAQkAvAIDBQN2YWwJALYCAQUPcmVzdWx0U2NhbGVNdWx0BQZtdWx0MTgBB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUB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25pbAUOZmFjdG9yeUFjdGlvbnMJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEFcHJpY2UCD2NhbGxlclB1YmxpY0tleQRhcmdzBA5mYWN0b3J5QWRkcmVzcwgFAWkGY2FsbGVyCQCUCgIFA25pbAgJAQljYWxjUHJpY2UBBQ5mYWN0b3J5QWRkcmVzcwJfMQFpAQpwcmljZURlYnVnAg9jYWxsZXJQdWJsaWNLZXkEYXJncwQOZmFjdG9yeUFkZHJlc3MIBQFpBmNhbGxlcgkAlAoCBQNuaWwICQEJY2FsY1ByaWNlAQUOZmFjdG9yeUFkZHJlc3MCXzIBaQEQZ2V0VHJlYXN1cnlWYWx1ZQIPY2FsbGVyUHVibGljS2V5BGFyZ3MEDmZhY3RvcnlBZGRyZXNzCAUBaQZjYWxsZXIEDXRyZWFzdXJ5VmFsdWUJAQdmcm9tWDE4AgkBEWNhbGNUcmVhc3VyeVZhbHVlAQUOZmFjdG9yeUFkZHJlc3MJAGwGAAoAAAUMdXNkdERlY2ltYWxzAAAAAAUERE9XTgkAlAoCBQNuaWwFDXRyZWFzdXJ5VmFsdWUBAnR4AQZ2ZXJpZnkACQAAAgUHY2hhaW5JZAUIY2hhaW5JZFR17Llk", "height": 2962833, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3iP4L2rBh2y71LUyNFvSW5QSsy2rqEaX6Z7MhRfWvkYS Next: 7bAZBfr61Lvz5pZo9cfvLwWrS6gT64p15xWg9STLpxtE Diff:
OldNewDifferences
367367 }
368368
369369
370-@Callable(aS)
371-func withdraw (aT) = {
372- let aU = addressFromStringValue(aT[0])
373- let aV = parseIntValue(aT[1])
374- let aW = invoke(aS.caller, "transferWaves", [aU.bytes, aV], nil)
375- $Tuple2(nil, aW)
370+func aS (D) = {
371+ let aj = K(D)
372+ let aT = valueOrErrorMessage(getInteger(D, u()), q("invalid current period"))
373+ let aU = valueOrErrorMessage(getInteger(D, y(aT)), q(("invalid treasury value for period " + toString(aT))))
374+ let aR = n(aK(D), pow(10, 0, j, 0, 0, DOWN))
375+ let aV = (aR - aU)
376+ let aW = G(D)
377+ let aX = ai(aj, [toBase58String(aW)])[0]
378+ let aY = if ((aX > toBigInt(0)))
379+ then n(aX, pow(10, 0, j, 0, 0, DOWN))
380+ else s("invalid PWR price")
381+ let A = M(D)
382+ let aZ = valueOrElse(getInteger(I(D), z(A)), 0)
383+ let ba = (R(Q(D)).quantity / 100)
384+ let bb = (aZ + ba)
385+ let bc = T(D, [toBase58String(t)])[0]
386+ let bd = if ((bc > toBigInt(0)))
387+ then n(bc, pow(10, 0, j, 0, 0, DOWN))
388+ else s("invalid factory wx balance")
389+ let be = ai(aj, [toBase58String(t)])[0]
390+ let bf = if ((be > toBigInt(0)))
391+ then n(be, pow(10, 0, j, 0, 0, DOWN))
392+ else s("invalid wx price")
393+ let bg = R(Q(D)).quantity
394+ let bh = (((aY + fraction((bd * 100), bf, bg)) + fraction(max([aV, 0]), 2, (10 * bb))) / 100)
395+ $Tuple2(bh, [["wxDaoPrice", bh], ["pwrPrice", aY], ["factoryAddressWxBalance", bd], ["wxPrice", bf], ["wxdaoQuantity", bg], ["treasuryValueDiff", aV], ["pwrAmount", bb]])
396+ }
397+
398+
399+@Callable(bi)
400+func withdraw (bj) = {
401+ let bk = addressFromStringValue(bj[0])
402+ let bl = parseIntValue(bj[1])
403+ let bm = invoke(bi.caller, "transferWaves", [bk.bytes, bl], nil)
404+ $Tuple2(nil, bm)
376405 }
377406
378407
379408
380-@Callable(aS)
381-func setIntParam (aT) = {
382- let aX = aT[0]
383- let o = parseIntValue(aT[1])
384- let aW = invoke(aS.caller, "integerEntry", [aX, o], nil)
385- $Tuple2(nil, aW)
409+@Callable(bi)
410+func setIntParam (bj) = {
411+ let bn = bj[0]
412+ let o = parseIntValue(bj[1])
413+ let bm = invoke(bi.caller, "integerEntry", [bn, o], nil)
414+ $Tuple2(nil, bm)
386415 }
387416
388417
389418
390-@Callable(aS)
391-func swap (aY,aT) = {
392- let D = aS.caller
393- let aZ = addressFromPublicKey(aY)
394- let ba = if ((size(aS.payments) == 1))
395- then aS.payments[0]
419+@Callable(bi)
420+func swap (bo,bj) = {
421+ let D = bi.caller
422+ let bp = addressFromPublicKey(bo)
423+ let bq = if ((size(bi.payments) == 1))
424+ then bi.payments[0]
396425 else s("1 payment is required")
397- let bb = q("invalid payment asset id")
398- let bc = if ((valueOrErrorMessage(ba.assetId, bb) == Q(D)))
399- then value(ba.assetId)
400- else s(bb)
401- let bd = 100
402- let be = (ba.amount / bd)
426+ let br = q("invalid payment asset id")
427+ let bs = if ((valueOrErrorMessage(bq.assetId, br) == Q(D)))
428+ then value(bq.assetId)
429+ else s(br)
430+ let aY = 100
431+ let bb = (bq.amount / aY)
403432 let aL = split(O(D), d)
404- let bf = assetBalance(D, G(D))
405- if ((bf == bf))
433+ let bt = assetBalance(D, G(D))
434+ if ((bt == bt))
406435 then {
407436 let bg = R(Q(D)).quantity
408437 if ((bg == bg))
413442 let aP = valueOrErrorMessage(indexOf(aL, Y), q("invalid asset balance"))
414443 let aa = R(S).decimals
415444 let Z = n(aM[aP], pow(10, 0, aa, 0, 0, DOWN))
416- let aV = fraction(Z, ba.amount, bg)
417- if ((aV > 0))
418- then $Tuple2((X._1 :+ S), (X._2 :+ aV))
445+ let bl = fraction(Z, bq.amount, bg)
446+ if ((bl > 0))
447+ then $Tuple2((X._1 :+ S), (X._2 :+ bl))
419448 else X
420449 }
421450
422- let bh = {
451+ let bu = {
423452 let ab = aL
424453 let ac = size(ab)
425454 let ad = $Tuple2(nil, nil)
433462
434463 ah(ae(ae(ae(ae(ae(ae(ad, 0), 1), 2), 3), 4), 5), 6)
435464 }
436- if ((bh == bh))
465+ if ((bu == bu))
437466 then {
438- let bi = 0
439- let bj = ([invoke(D, "commitAfterStartWithLockRoundFor", [toString(I(D)), toString(D), toString(aZ), bi, G(D), be], nil)] ++ (if ((size(bh._1) == 0))
467+ let bv = 0
468+ let bw = ([invoke(D, "commitAfterStartWithLockRoundFor", [toString(I(D)), toString(D), toString(bp), bv, G(D), bb], nil)] ++ (if ((size(bu._1) == 0))
440469 then nil
441- else [invoke(D, "transferAssets", [aZ.bytes, bh._1, bh._2], nil)]))
442- $Tuple2([Burn(bc, ba.amount)], bj)
470+ else [invoke(D, "transferAssets", [bp.bytes, bu._1, bu._2], nil)]))
471+ $Tuple2([Burn(bs, bq.amount)], bw)
443472 }
444473 else throw("Strict value is not equal to itself.")
445474 }
450479
451480
452481
453-@Callable(aS)
454-func price (aY,aT) = {
455- let D = aS.caller
456- let aj = K(D)
457- let bk = valueOrErrorMessage(getInteger(D, u()), q("invalid current period"))
458- let bl = valueOrErrorMessage(getInteger(D, y(bk)), q(("invalid treasury value for period " + toString(bk))))
459- let aR = n(aK(D), pow(10, 0, j, 0, 0, DOWN))
460- let bm = (aR - bl)
461- let bn = G(D)
462- let bo = ai(aj, [toBase58String(bn)])[0]
463- let bd = if ((bo > toBigInt(0)))
464- then n(bo, pow(10, 0, j, 0, 0, DOWN))
465- else s("invalid PWR price")
466- let A = M(D)
467- let bp = valueOrElse(getInteger(I(D), z(A)), 0)
468- let bq = (R(Q(D)).quantity / 100)
469- let be = (bp + bq)
470- let br = T(D, [toBase58String(t)])[0]
471- let bs = if ((br > toBigInt(0)))
472- then n(br, pow(10, 0, j, 0, 0, DOWN))
473- else s("invalid factory wx balance")
474- let bt = ai(aj, [toBase58String(t)])[0]
475- let bu = if ((bt > toBigInt(0)))
476- then n(bt, pow(10, 0, j, 0, 0, DOWN))
477- else s("invalid wx price")
478- let bg = R(Q(D)).quantity
479- let ar = (((bd / 100) + fraction(bs, bu, bg)) + fraction(max([bm, 0]), 2, (1000 * be)))
480- $Tuple2(nil, ar)
482+@Callable(bi)
483+func price (bo,bj) = {
484+ let D = bi.caller
485+ $Tuple2(nil, aS(D)._1)
481486 }
482487
483488
484489
485-@Callable(aS)
486-func priceDebug (aY,aT) = {
487- let D = aS.caller
488- let aj = K(D)
489- let bk = valueOrErrorMessage(getInteger(D, u()), q("invalid current period"))
490- let bl = valueOrErrorMessage(getInteger(D, y(bk)), q(("invalid treasury value for period " + toString(bk))))
491- let aR = n(aK(D), pow(10, 0, j, 0, 0, DOWN))
492- let bm = (aR - bl)
493- let bn = G(D)
494- let bo = ai(aj, [toBase58String(bn)])[0]
495- let bd = if ((bo > toBigInt(0)))
496- then n(bo, pow(10, 0, j, 0, 0, DOWN))
497- else s("invalid PWR price")
498- let A = M(D)
499- let bp = valueOrElse(getInteger(I(D), z(A)), 0)
500- let bq = (R(Q(D)).quantity / 100)
501- let be = (bp + bq)
502- let br = T(D, [toBase58String(t)])[0]
503- let bs = if ((br > toBigInt(0)))
504- then n(br, pow(10, 0, j, 0, 0, DOWN))
505- else s("invalid factory wx balance")
506- let bt = ai(aj, [toBase58String(t)])[0]
507- let bu = if ((bt > toBigInt(0)))
508- then n(bt, pow(10, 0, j, 0, 0, DOWN))
509- else s("invalid wx price")
510- let bg = R(Q(D)).quantity
511- let bv = (((bd / 100) + fraction(bs, bu, bg)) + fraction(max([bm, 0]), 2, (1000 * be)))
512- $Tuple2(nil, [["wxDaoPrice", bv], ["pwrPrice", bd], ["factoryAddressWxBalance", bs], ["wxPrice", bu], ["wxdaoQuantity", bg], ["treasuryValueDiff", bm], ["pwrAmount", be]])
490+@Callable(bi)
491+func priceDebug (bo,bj) = {
492+ let D = bi.caller
493+ $Tuple2(nil, aS(D)._2)
513494 }
514495
515496
516497
517-@Callable(aS)
518-func getTreasuryValue (aY,aT) = {
519- let D = aS.caller
498+@Callable(bi)
499+func getTreasuryValue (bo,bj) = {
500+ let D = bi.caller
520501 let aR = n(aK(D), pow(10, 0, j, 0, 0, DOWN))
521502 $Tuple2(nil, aR)
522503 }
523504
524505
525-@Verifier(bw)
526-func bx () = (a == b)
506+@Verifier(bx)
507+func by () = (a == b)
527508
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = take(drop(this.bytes, 1), 1)
55
66 let b = base58'2T'
77
88 let c = base58'2W'
99
1010 let d = "__"
1111
1212 let e = "WAVES"
1313
1414 let f = "wxdao_calculator.ride"
1515
1616 let g = 100000000
1717
1818 let h = toBigInt(1000000000000000000)
1919
2020 let i = 8
2121
2222 let j = 6
2323
2424 func k (l,m) = fraction(toBigInt(l), h, toBigInt(m))
2525
2626
2727 func n (o,p) = toInt(fraction(o, toBigInt(p), h))
2828
2929
3030 func q (r) = ((f + ": ") + r)
3131
3232
3333 func s (r) = throw(q(r))
3434
3535
3636 let t = if ((a == c))
3737 then base58'Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on'
3838 else if ((a == b))
3939 then base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc'
4040 else s("invalid chain id")
4141
4242 func u () = makeString(["%s", "currentPeriod"], d)
4343
4444
4545 func v (w) = makeString(["%s%d", "startHeight", toString(w)], d)
4646
4747
4848 func x () = makeString(["%s", "periodLength"], d)
4949
5050
5151 func y (w) = makeString(["%s%d", "treasuryValue", toString(w)], d)
5252
5353
5454 func z (A) = ("skin_total_" + toString(A))
5555
5656
5757 func B () = "%s__powerConfigAddress"
5858
5959
6060 func C (D) = valueOrErrorMessage({
6161 let E = getString(D, B())
6262 if ($isInstanceOf(E, "String"))
6363 then {
6464 let r = E
6565 addressFromString(r)
6666 }
6767 else if ($isInstanceOf(E, "Unit"))
6868 then unit
6969 else throw("Match error")
7070 }, q("invalid power config address"))
7171
7272
7373 func F () = "powerAssetId"
7474
7575
7676 func G (D) = fromBase58String(valueOrErrorMessage(getString(C(D), F()), q("invalid power asset id")))
7777
7878
7979 func H () = "%s__powerContractAddress"
8080
8181
8282 func I (D) = valueOrErrorMessage({
8383 let E = getString(D, H())
8484 if ($isInstanceOf(E, "String"))
8585 then {
8686 let r = E
8787 addressFromString(r)
8888 }
8989 else if ($isInstanceOf(E, "Unit"))
9090 then unit
9191 else throw("Match error")
9292 }, q("invalid power contract address"))
9393
9494
9595 func J () = "%s__poolsFactoryAddress"
9696
9797
9898 func K (D) = valueOrErrorMessage({
9999 let E = getString(D, J())
100100 if ($isInstanceOf(E, "String"))
101101 then {
102102 let r = E
103103 addressFromString(r)
104104 }
105105 else if ($isInstanceOf(E, "Unit"))
106106 then unit
107107 else throw("Match error")
108108 }, q("invalid pools factory address"))
109109
110110
111111 func L () = "%s__treasuryAddress"
112112
113113
114114 func M (D) = valueOrErrorMessage({
115115 let E = getString(D, L())
116116 if ($isInstanceOf(E, "String"))
117117 then {
118118 let r = E
119119 addressFromString(r)
120120 }
121121 else if ($isInstanceOf(E, "Unit"))
122122 then unit
123123 else throw("Match error")
124124 }, q("invalid treasury address"))
125125
126126
127127 func N () = "%s__assets"
128128
129129
130130 func O (D) = valueOrErrorMessage(getString(D, N()), q("invalid assets"))
131131
132132
133133 func P () = "%s__lpAssetId"
134134
135135
136136 func Q (D) = fromBase58String(valueOrErrorMessage(getString(D, P()), q("invalid lp asset id")))
137137
138138
139139 func R (S) = valueOrErrorMessage(assetInfo(S), q("invalid asset info"))
140140
141141
142142 func T (U,V) = {
143143 func W (X,Y) = {
144144 let Z = if ((Y == e))
145145 then k(wavesBalance(U).available, pow(10, 0, i, 0, 0, DOWN))
146146 else {
147147 let S = fromBase58String(Y)
148148 let aa = R(S).decimals
149149 k(assetBalance(U, S), pow(10, 0, aa, 0, 0, DOWN))
150150 }
151151 (X :+ Z)
152152 }
153153
154154 let ab = V
155155 let ac = size(ab)
156156 let ad = nil
157157 func ae (af,ag) = if ((ag >= ac))
158158 then af
159159 else W(af, ab[ag])
160160
161161 func ah (af,ag) = if ((ag >= ac))
162162 then af
163163 else throw("List size exceeds 10")
164164
165165 ah(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ad, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
166166 }
167167
168168
169169 func ai (aj,V) = if ((a == c))
170170 then {
171171 let ak = "3PKfrupEydU2nZAghVjZAfvCwMBkzuR1F52"
172172 let al = parseBigIntValue({
173173 let am = invoke(aj, "getPrice", [ak], nil)
174174 if ($isInstanceOf(am, "String"))
175175 then am
176176 else throw(($getType(am) + " couldn't be cast to String"))
177177 })
178178 let an = "3PPZWgFNRKHLvM51pwS934C8VZ7d2F4Z58g"
179179 let ao = parseBigIntValue({
180180 let am = invoke(aj, "getPrice", [an], nil)
181181 if ($isInstanceOf(am, "String"))
182182 then am
183183 else throw(($getType(am) + " couldn't be cast to String"))
184184 })
185185 let ap = fraction(al, h, ao)
186186 func W (X,aq) = {
187187 let ar = {
188188 let E = aq
189189 if (("2thsACuHmzDMuNezPM32wg9a3BwUzBWDeSKakgz3cw21" == E))
190190 then {
191191 let as = "3PDi7Qq8pLQYvtKyTfQuqqPUWyhoYbU957t"
192192 let at = parseBigIntValue({
193193 let am = invoke(aj, "getPrice", [as], nil)
194194 if ($isInstanceOf(am, "String"))
195195 then am
196196 else throw(($getType(am) + " couldn't be cast to String"))
197197 })
198198 fraction(at, al, h)
199199 }
200200 else if (("Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on" == E))
201201 then {
202202 let au = "3PFzaH2ghpwANHFgjeva83N1yxzErELx2eh"
203203 let av = parseBigIntValue({
204204 let am = invoke(aj, "getPrice", [au], nil)
205205 if ($isInstanceOf(am, "String"))
206206 then am
207207 else throw(($getType(am) + " couldn't be cast to String"))
208208 })
209209 fraction(av, al, h)
210210 }
211211 else if (("34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ" == E))
212212 then {
213213 let aw = "3PKMVZ7kQeaREajYi8Yc25Ro6mcNw5D6QSa"
214214 let ax = parseBigIntValue({
215215 let am = invoke(aj, "getPrice", [aw], nil)
216216 if ($isInstanceOf(am, "String"))
217217 then am
218218 else throw(($getType(am) + " couldn't be cast to String"))
219219 })
220220 fraction(al, h, ax)
221221 }
222222 else if (("6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ" == E))
223223 then {
224224 let ay = "3P3g3eipfG2NZKKQE8DZXt2E9tRJqii9jcX"
225225 let az = parseBigIntValue({
226226 let am = invoke(aj, "getPrice", [ay], nil)
227227 if ($isInstanceOf(am, "String"))
228228 then am
229229 else throw(($getType(am) + " couldn't be cast to String"))
230230 })
231231 fraction(al, h, az)
232232 }
233233 else if (("HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk" == E))
234234 then {
235235 let aA = "3P94wvu5gA7VhjPgAB3twaeqdwHCwNK2vsn"
236236 let aB = parseBigIntValue({
237237 let am = invoke(aj, "getPrice", [aA], nil)
238238 if ($isInstanceOf(am, "String"))
239239 then am
240240 else throw(($getType(am) + " couldn't be cast to String"))
241241 })
242242 fraction(aB, ap, h)
243243 }
244244 else if (("474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu" == E))
245245 then {
246246 let aC = "3P3XGTN6s292g9iwYhs3TEqJqHiffQYojuE"
247247 let aD = parseBigIntValue({
248248 let am = invoke(aj, "getPrice", [aC], nil)
249249 if ($isInstanceOf(am, "String"))
250250 then am
251251 else throw(($getType(am) + " couldn't be cast to String"))
252252 })
253253 fraction(aD, al, h)
254254 }
255255 else if (("8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS" == E))
256256 then {
257257 let aE = "3PCBWDTA6jrFswd7gQgaE3Xk7gLM5RKofvp"
258258 let aF = parseBigIntValue({
259259 let am = invoke(aj, "getPrice", [aE], nil)
260260 if ($isInstanceOf(am, "String"))
261261 then am
262262 else throw(($getType(am) + " couldn't be cast to String"))
263263 })
264264 fraction(aF, ap, h)
265265 }
266266 else s("invalid asset id")
267267 }
268268 (X :+ ar)
269269 }
270270
271271 let ab = V
272272 let ac = size(ab)
273273 let ad = nil
274274 func ae (af,ag) = if ((ag >= ac))
275275 then af
276276 else W(af, ab[ag])
277277
278278 func ah (af,ag) = if ((ag >= ac))
279279 then af
280280 else throw("List size exceeds 10")
281281
282282 ah(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ad, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
283283 }
284284 else if ((a == b))
285285 then {
286286 func W (X,aq) = {
287287 let ar = {
288288 let E = aq
289289 if (("EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc" == E))
290290 then {
291291 let aG = "3MrULQRLc52GWrJF1tMcAm4M78fPe57o9Kt"
292292 let aH = parseBigIntValue({
293293 let am = invoke(aj, "getPrice", [aG], nil)
294294 if ($isInstanceOf(am, "String"))
295295 then am
296296 else throw(($getType(am) + " couldn't be cast to String"))
297297 })
298298 aH
299299 }
300300 else if (("A7Ksh7fXyqm1KhKAiK3bAB2aiPSitQQF6v1pyu9SS3FR" == E))
301301 then {
302302 let aI = "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA"
303303 let aJ = parseBigIntValue({
304304 let am = invoke(aj, "getPrice", [aI], nil)
305305 if ($isInstanceOf(am, "String"))
306306 then am
307307 else throw(($getType(am) + " couldn't be cast to String"))
308308 })
309309 aJ
310310 }
311311 else if (("8Q6SE2ANebufw8JuPjJVRjZD6drD8ihjNjM8xaGUSfdR" == E))
312312 then {
313313 let ar = toBigInt(100000000)
314314 ar
315315 }
316316 else s("invalid asset id")
317317 }
318318 (X :+ ar)
319319 }
320320
321321 let ab = V
322322 let ac = size(ab)
323323 let ad = nil
324324 func ae (af,ag) = if ((ag >= ac))
325325 then af
326326 else W(af, ab[ag])
327327
328328 func ah (af,ag) = if ((ag >= ac))
329329 then af
330330 else throw("List size exceeds 10")
331331
332332 ah(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ad, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
333333 }
334334 else s("invalid chain id")
335335
336336
337337 func aK (D) = {
338338 let A = M(D)
339339 let aj = K(D)
340340 let aL = split(O(D), d)
341341 let aM = T(A, aL)
342342 let aN = ai(aj, aL)
343343 func aO (X,Y) = {
344344 let S = fromBase58String(Y)
345345 let aP = valueOrErrorMessage(indexOf(aL, Y), q("invalid asset id"))
346346 let Z = aM[aP]
347347 let ar = aN[aP]
348348 let aQ = fraction(Z, ar, h)
349349 (X + aQ)
350350 }
351351
352352 let aR = {
353353 let ab = aL
354354 let ac = size(ab)
355355 let ad = toBigInt(0)
356356 func ae (af,ag) = if ((ag >= ac))
357357 then af
358358 else aO(af, ab[ag])
359359
360360 func ah (af,ag) = if ((ag >= ac))
361361 then af
362362 else throw("List size exceeds 10")
363363
364364 ah(ae(ae(ae(ae(ae(ae(ae(ae(ae(ae(ad, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
365365 }
366366 aR
367367 }
368368
369369
370-@Callable(aS)
371-func withdraw (aT) = {
372- let aU = addressFromStringValue(aT[0])
373- let aV = parseIntValue(aT[1])
374- let aW = invoke(aS.caller, "transferWaves", [aU.bytes, aV], nil)
375- $Tuple2(nil, aW)
370+func aS (D) = {
371+ let aj = K(D)
372+ let aT = valueOrErrorMessage(getInteger(D, u()), q("invalid current period"))
373+ let aU = valueOrErrorMessage(getInteger(D, y(aT)), q(("invalid treasury value for period " + toString(aT))))
374+ let aR = n(aK(D), pow(10, 0, j, 0, 0, DOWN))
375+ let aV = (aR - aU)
376+ let aW = G(D)
377+ let aX = ai(aj, [toBase58String(aW)])[0]
378+ let aY = if ((aX > toBigInt(0)))
379+ then n(aX, pow(10, 0, j, 0, 0, DOWN))
380+ else s("invalid PWR price")
381+ let A = M(D)
382+ let aZ = valueOrElse(getInteger(I(D), z(A)), 0)
383+ let ba = (R(Q(D)).quantity / 100)
384+ let bb = (aZ + ba)
385+ let bc = T(D, [toBase58String(t)])[0]
386+ let bd = if ((bc > toBigInt(0)))
387+ then n(bc, pow(10, 0, j, 0, 0, DOWN))
388+ else s("invalid factory wx balance")
389+ let be = ai(aj, [toBase58String(t)])[0]
390+ let bf = if ((be > toBigInt(0)))
391+ then n(be, pow(10, 0, j, 0, 0, DOWN))
392+ else s("invalid wx price")
393+ let bg = R(Q(D)).quantity
394+ let bh = (((aY + fraction((bd * 100), bf, bg)) + fraction(max([aV, 0]), 2, (10 * bb))) / 100)
395+ $Tuple2(bh, [["wxDaoPrice", bh], ["pwrPrice", aY], ["factoryAddressWxBalance", bd], ["wxPrice", bf], ["wxdaoQuantity", bg], ["treasuryValueDiff", aV], ["pwrAmount", bb]])
396+ }
397+
398+
399+@Callable(bi)
400+func withdraw (bj) = {
401+ let bk = addressFromStringValue(bj[0])
402+ let bl = parseIntValue(bj[1])
403+ let bm = invoke(bi.caller, "transferWaves", [bk.bytes, bl], nil)
404+ $Tuple2(nil, bm)
376405 }
377406
378407
379408
380-@Callable(aS)
381-func setIntParam (aT) = {
382- let aX = aT[0]
383- let o = parseIntValue(aT[1])
384- let aW = invoke(aS.caller, "integerEntry", [aX, o], nil)
385- $Tuple2(nil, aW)
409+@Callable(bi)
410+func setIntParam (bj) = {
411+ let bn = bj[0]
412+ let o = parseIntValue(bj[1])
413+ let bm = invoke(bi.caller, "integerEntry", [bn, o], nil)
414+ $Tuple2(nil, bm)
386415 }
387416
388417
389418
390-@Callable(aS)
391-func swap (aY,aT) = {
392- let D = aS.caller
393- let aZ = addressFromPublicKey(aY)
394- let ba = if ((size(aS.payments) == 1))
395- then aS.payments[0]
419+@Callable(bi)
420+func swap (bo,bj) = {
421+ let D = bi.caller
422+ let bp = addressFromPublicKey(bo)
423+ let bq = if ((size(bi.payments) == 1))
424+ then bi.payments[0]
396425 else s("1 payment is required")
397- let bb = q("invalid payment asset id")
398- let bc = if ((valueOrErrorMessage(ba.assetId, bb) == Q(D)))
399- then value(ba.assetId)
400- else s(bb)
401- let bd = 100
402- let be = (ba.amount / bd)
426+ let br = q("invalid payment asset id")
427+ let bs = if ((valueOrErrorMessage(bq.assetId, br) == Q(D)))
428+ then value(bq.assetId)
429+ else s(br)
430+ let aY = 100
431+ let bb = (bq.amount / aY)
403432 let aL = split(O(D), d)
404- let bf = assetBalance(D, G(D))
405- if ((bf == bf))
433+ let bt = assetBalance(D, G(D))
434+ if ((bt == bt))
406435 then {
407436 let bg = R(Q(D)).quantity
408437 if ((bg == bg))
409438 then {
410439 let aM = T(D, aL)
411440 func W (X,Y) = {
412441 let S = fromBase58String(Y)
413442 let aP = valueOrErrorMessage(indexOf(aL, Y), q("invalid asset balance"))
414443 let aa = R(S).decimals
415444 let Z = n(aM[aP], pow(10, 0, aa, 0, 0, DOWN))
416- let aV = fraction(Z, ba.amount, bg)
417- if ((aV > 0))
418- then $Tuple2((X._1 :+ S), (X._2 :+ aV))
445+ let bl = fraction(Z, bq.amount, bg)
446+ if ((bl > 0))
447+ then $Tuple2((X._1 :+ S), (X._2 :+ bl))
419448 else X
420449 }
421450
422- let bh = {
451+ let bu = {
423452 let ab = aL
424453 let ac = size(ab)
425454 let ad = $Tuple2(nil, nil)
426455 func ae (af,ag) = if ((ag >= ac))
427456 then af
428457 else W(af, ab[ag])
429458
430459 func ah (af,ag) = if ((ag >= ac))
431460 then af
432461 else throw("List size exceeds 6")
433462
434463 ah(ae(ae(ae(ae(ae(ae(ad, 0), 1), 2), 3), 4), 5), 6)
435464 }
436- if ((bh == bh))
465+ if ((bu == bu))
437466 then {
438- let bi = 0
439- let bj = ([invoke(D, "commitAfterStartWithLockRoundFor", [toString(I(D)), toString(D), toString(aZ), bi, G(D), be], nil)] ++ (if ((size(bh._1) == 0))
467+ let bv = 0
468+ let bw = ([invoke(D, "commitAfterStartWithLockRoundFor", [toString(I(D)), toString(D), toString(bp), bv, G(D), bb], nil)] ++ (if ((size(bu._1) == 0))
440469 then nil
441- else [invoke(D, "transferAssets", [aZ.bytes, bh._1, bh._2], nil)]))
442- $Tuple2([Burn(bc, ba.amount)], bj)
470+ else [invoke(D, "transferAssets", [bp.bytes, bu._1, bu._2], nil)]))
471+ $Tuple2([Burn(bs, bq.amount)], bw)
443472 }
444473 else throw("Strict value is not equal to itself.")
445474 }
446475 else throw("Strict value is not equal to itself.")
447476 }
448477 else throw("Strict value is not equal to itself.")
449478 }
450479
451480
452481
453-@Callable(aS)
454-func price (aY,aT) = {
455- let D = aS.caller
456- let aj = K(D)
457- let bk = valueOrErrorMessage(getInteger(D, u()), q("invalid current period"))
458- let bl = valueOrErrorMessage(getInteger(D, y(bk)), q(("invalid treasury value for period " + toString(bk))))
459- let aR = n(aK(D), pow(10, 0, j, 0, 0, DOWN))
460- let bm = (aR - bl)
461- let bn = G(D)
462- let bo = ai(aj, [toBase58String(bn)])[0]
463- let bd = if ((bo > toBigInt(0)))
464- then n(bo, pow(10, 0, j, 0, 0, DOWN))
465- else s("invalid PWR price")
466- let A = M(D)
467- let bp = valueOrElse(getInteger(I(D), z(A)), 0)
468- let bq = (R(Q(D)).quantity / 100)
469- let be = (bp + bq)
470- let br = T(D, [toBase58String(t)])[0]
471- let bs = if ((br > toBigInt(0)))
472- then n(br, pow(10, 0, j, 0, 0, DOWN))
473- else s("invalid factory wx balance")
474- let bt = ai(aj, [toBase58String(t)])[0]
475- let bu = if ((bt > toBigInt(0)))
476- then n(bt, pow(10, 0, j, 0, 0, DOWN))
477- else s("invalid wx price")
478- let bg = R(Q(D)).quantity
479- let ar = (((bd / 100) + fraction(bs, bu, bg)) + fraction(max([bm, 0]), 2, (1000 * be)))
480- $Tuple2(nil, ar)
482+@Callable(bi)
483+func price (bo,bj) = {
484+ let D = bi.caller
485+ $Tuple2(nil, aS(D)._1)
481486 }
482487
483488
484489
485-@Callable(aS)
486-func priceDebug (aY,aT) = {
487- let D = aS.caller
488- let aj = K(D)
489- let bk = valueOrErrorMessage(getInteger(D, u()), q("invalid current period"))
490- let bl = valueOrErrorMessage(getInteger(D, y(bk)), q(("invalid treasury value for period " + toString(bk))))
491- let aR = n(aK(D), pow(10, 0, j, 0, 0, DOWN))
492- let bm = (aR - bl)
493- let bn = G(D)
494- let bo = ai(aj, [toBase58String(bn)])[0]
495- let bd = if ((bo > toBigInt(0)))
496- then n(bo, pow(10, 0, j, 0, 0, DOWN))
497- else s("invalid PWR price")
498- let A = M(D)
499- let bp = valueOrElse(getInteger(I(D), z(A)), 0)
500- let bq = (R(Q(D)).quantity / 100)
501- let be = (bp + bq)
502- let br = T(D, [toBase58String(t)])[0]
503- let bs = if ((br > toBigInt(0)))
504- then n(br, pow(10, 0, j, 0, 0, DOWN))
505- else s("invalid factory wx balance")
506- let bt = ai(aj, [toBase58String(t)])[0]
507- let bu = if ((bt > toBigInt(0)))
508- then n(bt, pow(10, 0, j, 0, 0, DOWN))
509- else s("invalid wx price")
510- let bg = R(Q(D)).quantity
511- let bv = (((bd / 100) + fraction(bs, bu, bg)) + fraction(max([bm, 0]), 2, (1000 * be)))
512- $Tuple2(nil, [["wxDaoPrice", bv], ["pwrPrice", bd], ["factoryAddressWxBalance", bs], ["wxPrice", bu], ["wxdaoQuantity", bg], ["treasuryValueDiff", bm], ["pwrAmount", be]])
490+@Callable(bi)
491+func priceDebug (bo,bj) = {
492+ let D = bi.caller
493+ $Tuple2(nil, aS(D)._2)
513494 }
514495
515496
516497
517-@Callable(aS)
518-func getTreasuryValue (aY,aT) = {
519- let D = aS.caller
498+@Callable(bi)
499+func getTreasuryValue (bo,bj) = {
500+ let D = bi.caller
520501 let aR = n(aK(D), pow(10, 0, j, 0, 0, DOWN))
521502 $Tuple2(nil, aR)
522503 }
523504
524505
525-@Verifier(bw)
526-func bx () = (a == b)
506+@Verifier(bx)
507+func by () = (a == b)
527508

github/deemru/w8io/026f985 
105.34 ms