tx · 7X3LFxdPQt1bxd5JsemCmswSPgD2rUyJy6aBmT426SSi 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves 2021.09.12 19:51 [1700100] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{ "type": 13, "id": "7X3LFxdPQt1bxd5JsemCmswSPgD2rUyJy6aBmT426SSi", "fee": 1000000, "feeAssetId": null, "timestamp": 1631465493895, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "5eYXBePMsEo794Kfsmmn9T8TYHZGz64sT1KRe44PV4TdiMfwbtCu7eAzMLSo4juYuUfCcnx46sdWDacZmiZDbaVu" ], "script": "base64:AAIFAAAAAAAAAA0IAhIJCgcYGBERGAIBAAAACQAAAAAHZGlnaXRzOAAAAAAAAAAACAAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAdzY2FsZTEyAAAAAOjUpRAAAAAAAAVhbHBoYQAAAAAAAAAAMgAAAAALYWxwaGFEaWdpdHMAAAAAAAAAAAIAAAAABGJldGEAAAAAAAK954ABAAAACHNrZXduZXNzAAAAAgAAAAF4AAAAAXkJAABpAAAAAgkAAGkAAAACCQAAZAAAAAIJAABrAAAAAwUAAAAHc2NhbGUxMgUAAAABeAUAAAABeQkAAGsAAAADBQAAAAdzY2FsZTEyBQAAAAF5BQAAAAF4AAAAAAAAAAACAAAAAAAAACcQAQAAAA1pbnZhcmlhbnRDYWxjAAAAAgAAAAF4AAAAAXkEAAAAAnNrCQEAAAAIc2tld25lc3MAAAACBQAAAAF4BQAAAAF5CQAAZAAAAAIJAABrAAAAAwkAAGQAAAACBQAAAAF4BQAAAAF5BQAAAAZzY2FsZTgJAABsAAAABgUAAAACc2sFAAAAB2RpZ2l0czgFAAAABWFscGhhBQAAAAthbHBoYURpZ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AZEAAAACBQAAAA0kbGlzdDYyNjM2MzEyAAAAAAAAAAADCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgMwQAAAAPZXhjaGFuZ2VDb3VudGVyCAUAAAALJHQwNjIxMTYzMTIAAAACXzEEAAAADmFtb3VudHNXaXRoRmVlCAUAAAALJHQwNjIxMTYzMTIAAAACXzIEAAAADGFzc2V0c0lkU2VuZAgFAAAACyR0MDYyMTE2MzEyAAAAAl8zBAAAAA9hbW91bnRUb1JlY2lldmUJAAPwAAAAAgUAAAAEdGhpcwUAAAAOcmVjZWl2ZUFzc2V0SWQDAwkAAAAAAAACBQAAAA9leGNoYW5nZUNvdW50ZXIFAAAAC3JvdXRpbmdTaXplCQAAZwAAAAIFAAAAD2Ftb3VudFRvUmVjaWV2ZQUAAAASbWluQW1vdW50VG9SZWNlaXZlBwkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAD2Ftb3VudFRvUmVjaWV2ZQUAAAAOcmVjZWl2ZUFzc2V0SWQFAAAAA25pbAkAAAIAAAABAgAAAD5yb3V0aW5nICE9IHJvdXRpbmdTaXplIG9yIGFtb3VudFRvUmVjaWV2ZSA8IG1pbkFtb3VudFRvUmVjZWl2ZQAAAABs8yVG", "height": 1700100, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BLpFyCWpUHFNyuwHprZGidX7x6yHV8xhUR8mVANTeTAF Next: 6Fs8rzUuoHKgpMcMxR6uxFxNXzdSQ8fr9Y28V6UgPTkc Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 8 | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = 1000000000000 | |
9 | 9 | ||
10 | 10 | let d = 50 | |
11 | 11 | ||
12 | 12 | let e = 2 | |
13 | 13 | ||
14 | 14 | let f = 46000000 | |
15 | 15 | ||
16 | 16 | func g (h,i) = (((fraction(c, h, i) + fraction(c, i, h)) / 2) / 10000) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func j (h,i) = { | |
20 | 20 | let k = g(h, i) | |
21 | 21 | (fraction((h + i), b, pow(k, a, d, e, a, CEILING)) + (2 * fraction(pow(fraction(h, i, b), 0, 5, 1, (a / 2), DOWN), pow((k - f), a, d, e, a, DOWN), b))) | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func l (m,n,o,p,q,r,s) = { | |
26 | 26 | let t = 3000 | |
27 | 27 | let u = 1000000 | |
28 | 28 | let v = getIntegerValue(addressFromStringValue(o[0]), q[0]) | |
29 | 29 | let w = getIntegerValue(addressFromStringValue(o[0]), q[1]) | |
30 | 30 | let x = getIntegerValue(addressFromStringValue(o[1]), q[2]) | |
31 | 31 | let y = getIntegerValue(addressFromStringValue(o[1]), q[3]) | |
32 | 32 | let z = if ((p[0] == "cpmm")) | |
33 | 33 | then { | |
34 | 34 | let A = fraction(w, m, (m + v)) | |
35 | 35 | fraction(A, (u - t), u) | |
36 | 36 | } | |
37 | 37 | else if ((p[0] == "flat")) | |
38 | 38 | then { | |
39 | 39 | let B = j(v, w) | |
40 | 40 | let C = s[0] | |
41 | 41 | let D = j((v + m), (w - s[0])) | |
42 | 42 | if ((D >= B)) | |
43 | 43 | then C | |
44 | 44 | else throw("Flat contract: invariantNew < invariant") | |
45 | 45 | } | |
46 | 46 | else throw("Incorrect exchange type") | |
47 | 47 | let E = if ((p[1] == "cpmm")) | |
48 | 48 | then { | |
49 | 49 | let F = fraction(y, z, (z + x)) | |
50 | 50 | fraction(F, (u - t), u) | |
51 | 51 | } | |
52 | 52 | else if ((p[1] == "flat")) | |
53 | 53 | then { | |
54 | 54 | let B = j(x, y) | |
55 | 55 | let G = s[1] | |
56 | 56 | let D = j((x + z), (y - G)) | |
57 | 57 | if ((D >= B)) | |
58 | 58 | then G | |
59 | 59 | else throw("Flat contract: invariantNew < invariant") | |
60 | 60 | } | |
61 | 61 | else throw("Incorrect exchange type") | |
62 | 62 | if ((E >= n)) | |
63 | 63 | then true | |
64 | 64 | else false | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | @Callable(H) | |
69 | 69 | func routingTrade (o,p,r,s,q,I,n) = { | |
70 | 70 | let J = $Tuple2(H.payments[0].amount, H.payments[0].assetId) | |
71 | 71 | let m = J._1 | |
72 | 72 | let K = J._2 | |
73 | 73 | if (!(l(m, n, o, p, q, r, s))) | |
74 | 74 | then throw("Check transaction possibilty: declined") | |
75 | 75 | else { | |
76 | 76 | let L = size(o) | |
77 | 77 | func M (N,O) = { | |
78 | 78 | let P = N | |
79 | 79 | let Q = P._1 | |
80 | 80 | let R = P._2 | |
81 | 81 | let S = P._3 | |
82 | 82 | if ((Q == 0)) | |
83 | 83 | then { | |
84 | 84 | let T = addressFromStringValue(O) | |
85 | 85 | let U = if ((p[Q] == "cpmm")) | |
86 | 86 | then invoke(T, "exchange", [r[Q]], [AttachedPayment(K, m)]) | |
87 | 87 | else if ((p[Q] == "flat")) | |
88 | 88 | then invoke(T, "exchange", [r[Q], s[Q]], [AttachedPayment(K, m)]) | |
89 | 89 | else throw("Incorrect exchange type") | |
90 | 90 | if ((U == U)) | |
91 | 91 | then { | |
92 | 92 | let V = U | |
93 | 93 | if ($isInstanceOf(V, "(Int, ByteVector)")) | |
94 | 94 | then { | |
95 | 95 | let U = V | |
96 | 96 | let W = U | |
97 | 97 | let X = W._1 | |
98 | 98 | let Y = W._2 | |
99 | 99 | $Tuple3((Q + 1), X, Y) | |
100 | 100 | } | |
101 | 101 | else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend") | |
102 | 102 | } | |
103 | 103 | else throw("Strict value is not equal to itself.") | |
104 | 104 | } | |
105 | 105 | else if (if ((Q > 0)) | |
106 | 106 | then (L > Q) | |
107 | 107 | else false) | |
108 | 108 | then { | |
109 | 109 | let T = addressFromStringValue(O) | |
110 | 110 | let Z = $Tuple2(S, R) | |
111 | 111 | let aa = Z._1 | |
112 | 112 | let ab = Z._2 | |
113 | 113 | let U = if ((p[Q] == "cpmm")) | |
114 | 114 | then invoke(T, "exchange", [r[Q]], [AttachedPayment(aa, ab)]) | |
115 | 115 | else if ((p[Q] == "flat")) | |
116 | 116 | then invoke(T, "exchange", [r[Q], s[Q]], [AttachedPayment(aa, ab)]) | |
117 | 117 | else throw("Incorrect exchange type") | |
118 | 118 | if ((U == U)) | |
119 | 119 | then { | |
120 | 120 | let V = U | |
121 | 121 | if ($isInstanceOf(V, "(Int, ByteVector)")) | |
122 | 122 | then { | |
123 | 123 | let U = V | |
124 | 124 | let ac = U | |
125 | 125 | let X = ac._1 | |
126 | 126 | let Y = ac._2 | |
127 | 127 | $Tuple3((Q + 1), X, Y) | |
128 | 128 | } | |
129 | 129 | else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend") | |
130 | 130 | } | |
131 | 131 | else throw("Strict value is not equal to itself.") | |
132 | 132 | } | |
133 | 133 | else N | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | let ad = { | |
137 | 137 | let ae = o | |
138 | 138 | let af = size(ae) | |
139 | 139 | let ag = $Tuple3(0, 0, base58'') | |
140 | 140 | if ((af == 0)) | |
141 | 141 | then ag | |
142 | 142 | else { | |
143 | 143 | let ah = M(ag, ae[0]) | |
144 | 144 | if ((af == 1)) | |
145 | 145 | then ah | |
146 | 146 | else { | |
147 | 147 | let ai = M(ah, ae[1]) | |
148 | 148 | if ((af == 2)) | |
149 | 149 | then ai | |
150 | 150 | else { | |
151 | 151 | let aj = M(ai, ae[2]) | |
152 | 152 | if ((af == 3)) | |
153 | 153 | then aj | |
154 | 154 | else { | |
155 | 155 | let ak = M(aj, ae[3]) | |
156 | 156 | throw("List size exceed 3") | |
157 | 157 | } | |
158 | 158 | } | |
159 | 159 | } | |
160 | 160 | } | |
161 | 161 | } | |
162 | 162 | let Q = ad._1 | |
163 | 163 | let R = ad._2 | |
164 | 164 | let S = ad._3 | |
165 | 165 | let al = assetBalance(this, I) | |
166 | 166 | if (if ((Q == L)) | |
167 | 167 | then (al >= n) | |
168 | 168 | else false) | |
169 | 169 | then [ScriptTransfer(H.caller, al, I)] | |
170 | 170 | else throw("routing != routingSize or amountToRecieve < minAmountToReceive") | |
171 | 171 | } | |
172 | 172 | } | |
173 | 173 | ||
174 | 174 |
github/deemru/w8io/026f985 33.88 ms ◑