tx · 5P6aTYNSWLn5uR8Kfe2bFgf3t8qgtJMmgaixhRfNCX7w 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves 2021.09.12 19:29 [1700076] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{ "type": 13, "id": "5P6aTYNSWLn5uR8Kfe2bFgf3t8qgtJMmgaixhRfNCX7w", "fee": 1000000, "feeAssetId": null, "timestamp": 1631464233900, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "39tXbPkKdvD3LiZ9zgdEQ1ZTdUyaxqLkmQ9TvYQxoR7JDGBKrYdModTJKeGJzasbFBBoo6ZXy4mZNBFJ8aaAH6Qm" ], "script": "base64:AAIFAAAAAAAAAA0IAhIJCgcYGBERGAIBAAAACQAAAAAHZGlnaXRzOAAAAAAAAAAACAAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAdzY2FsZTEyAAAAAOjUpRAAAAAAAAVhbHBoYQAAAAAAAAAAMgAAAAALYWxwaGFEaWdpdHMAAAAAAAAAAAIAAAAABGJldGEAAAAAAAK954ABAAAACHNrZXduZXNzAAAAAgAAAAF4AAAAAXkJAABpAAAAAgkAAGkAAAACCQAAZAAAAAIJAABrAAAAAwUAAAAHc2NhbGUxMgUAAAABeAUAAAABeQkAAGsAAAADBQAAAAdzY2FsZTEyBQAAAAF5BQAAAAF4AAAAAAAAAAACAAAAAAAAACcQAQAAAA1pbnZhcmlhbnRDYWxjAAAAAgAAAAF4AAAAAXkEAAAAAnNrCQEAAAAIc2tld25lc3MAAAACBQAAAAF4BQAAAAF5CQAAZAAAAAIJAABrAAAAAwkAAGQAAAACBQAAAAF4BQAAAAF5BQAAAAZzY2FsZTgJAABsAAAABgUAAAACc2sFAAAAB2RpZ2l0czgFAAAABWFsc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RUb1JlY2lldmUJAAPwAAAAAgUAAAAEdGhpcwUAAAAOcmVjZWl2ZUFzc2V0SWQDAwkAAAAAAAACBQAAAA9leGNoYW5nZUNvdW50ZXIFAAAAC3JvdXRpbmdTaXplCQAAZwAAAAIFAAAAD2Ftb3VudFRvUmVjaWV2ZQUAAAASbWluQW1vdW50VG9SZWNlaXZlBwkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAD2Ftb3VudFRvUmVjaWV2ZQUAAAAOcmVjZWl2ZUFzc2V0SWQFAAAAA25pbAkAAAIAAAABAgAAAD5yb3V0aW5nICE9IHJvdXRpbmdTaXplIG9yIGFtb3VudFRvUmVjaWV2ZSA8IG1pbkFtb3VudFRvUmVjZWl2ZQAAAADwc2eq", "height": 1700076, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EoLSyHsy6moCym4RV4mYKg7iTAZCuhgXRVzQYzRvsJBZ Next: 71YJEweK67rjxvvDYer71kh5dJn9obugja5EL5Y9MFZK Diff:
Old | New | Differences | |
---|---|---|---|
53 | 53 | s[1] | |
54 | 54 | } | |
55 | 55 | else throw("Incorrect exchange type") | |
56 | - | if ((D >= n)) | |
57 | - | then true | |
58 | - | else false | |
56 | + | if (true) | |
57 | + | then throw(toString(D)) | |
58 | + | else if ((D >= n)) | |
59 | + | then true | |
60 | + | else false | |
59 | 61 | } | |
60 | 62 | ||
61 | 63 |
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 = j((v + m), (w - s[0])) | |
41 | 41 | s[0] | |
42 | 42 | } | |
43 | 43 | else throw("Incorrect exchange type") | |
44 | 44 | let D = if ((p[1] == "cpmm")) | |
45 | 45 | then { | |
46 | 46 | let E = fraction(y, z, (z + x)) | |
47 | 47 | fraction(E, (u - t), u) | |
48 | 48 | } | |
49 | 49 | else if ((p[1] == "flat")) | |
50 | 50 | then { | |
51 | 51 | let B = j(x, y) | |
52 | 52 | let C = j((x + z), (y - s[1])) | |
53 | 53 | s[1] | |
54 | 54 | } | |
55 | 55 | else throw("Incorrect exchange type") | |
56 | - | if ((D >= n)) | |
57 | - | then true | |
58 | - | else false | |
56 | + | if (true) | |
57 | + | then throw(toString(D)) | |
58 | + | else if ((D >= n)) | |
59 | + | then true | |
60 | + | else false | |
59 | 61 | } | |
60 | 62 | ||
61 | 63 | ||
62 | 64 | @Callable(F) | |
63 | 65 | func routingTrade (o,p,r,s,q,G,n) = { | |
64 | 66 | let H = $Tuple2(F.payments[0].amount, F.payments[0].assetId) | |
65 | 67 | let m = H._1 | |
66 | 68 | let I = H._2 | |
67 | 69 | if (!(l(m, n, o, p, q, r, s))) | |
68 | 70 | then throw("Check transaction possibilty: declined") | |
69 | 71 | else { | |
70 | 72 | let J = size(o) | |
71 | 73 | func K (L,M) = { | |
72 | 74 | let N = L | |
73 | 75 | let O = N._1 | |
74 | 76 | let P = N._2 | |
75 | 77 | let Q = N._3 | |
76 | 78 | if ((O == 0)) | |
77 | 79 | then { | |
78 | 80 | let R = addressFromStringValue(M) | |
79 | 81 | let S = if ((p[O] == "cpmm")) | |
80 | 82 | then invoke(R, "exchange", [r[O]], [AttachedPayment(I, m)]) | |
81 | 83 | else if ((p[O] == "flat")) | |
82 | 84 | then invoke(R, "exchange", [r[O], s[O]], [AttachedPayment(I, m)]) | |
83 | 85 | else throw("Incorrect exchange type") | |
84 | 86 | if ((S == S)) | |
85 | 87 | then { | |
86 | 88 | let T = S | |
87 | 89 | if ($isInstanceOf(T, "(Int, ByteVector)")) | |
88 | 90 | then { | |
89 | 91 | let S = T | |
90 | 92 | let U = S | |
91 | 93 | let V = U._1 | |
92 | 94 | let W = U._2 | |
93 | 95 | $Tuple3((O + 1), V, W) | |
94 | 96 | } | |
95 | 97 | else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend") | |
96 | 98 | } | |
97 | 99 | else throw("Strict value is not equal to itself.") | |
98 | 100 | } | |
99 | 101 | else if (if ((O > 0)) | |
100 | 102 | then (J > O) | |
101 | 103 | else false) | |
102 | 104 | then { | |
103 | 105 | let R = addressFromStringValue(M) | |
104 | 106 | let X = $Tuple2(Q, P) | |
105 | 107 | let Y = X._1 | |
106 | 108 | let Z = X._2 | |
107 | 109 | let S = if ((p[O] == "cpmm")) | |
108 | 110 | then invoke(R, "exchange", [r[O]], [AttachedPayment(Y, Z)]) | |
109 | 111 | else if ((p[O] == "flat")) | |
110 | 112 | then invoke(R, "exchange", [r[O], s[O]], [AttachedPayment(Y, Z)]) | |
111 | 113 | else throw("Incorrect exchange type") | |
112 | 114 | if ((S == S)) | |
113 | 115 | then { | |
114 | 116 | let T = S | |
115 | 117 | if ($isInstanceOf(T, "(Int, ByteVector)")) | |
116 | 118 | then { | |
117 | 119 | let S = T | |
118 | 120 | let aa = S | |
119 | 121 | let V = aa._1 | |
120 | 122 | let W = aa._2 | |
121 | 123 | $Tuple3((O + 1), V, W) | |
122 | 124 | } | |
123 | 125 | else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend") | |
124 | 126 | } | |
125 | 127 | else throw("Strict value is not equal to itself.") | |
126 | 128 | } | |
127 | 129 | else L | |
128 | 130 | } | |
129 | 131 | ||
130 | 132 | let ab = { | |
131 | 133 | let ac = o | |
132 | 134 | let ad = size(ac) | |
133 | 135 | let ae = $Tuple3(0, 0, base58'') | |
134 | 136 | if ((ad == 0)) | |
135 | 137 | then ae | |
136 | 138 | else { | |
137 | 139 | let af = K(ae, ac[0]) | |
138 | 140 | if ((ad == 1)) | |
139 | 141 | then af | |
140 | 142 | else { | |
141 | 143 | let ag = K(af, ac[1]) | |
142 | 144 | if ((ad == 2)) | |
143 | 145 | then ag | |
144 | 146 | else { | |
145 | 147 | let ah = K(ag, ac[2]) | |
146 | 148 | if ((ad == 3)) | |
147 | 149 | then ah | |
148 | 150 | else { | |
149 | 151 | let ai = K(ah, ac[3]) | |
150 | 152 | throw("List size exceed 3") | |
151 | 153 | } | |
152 | 154 | } | |
153 | 155 | } | |
154 | 156 | } | |
155 | 157 | } | |
156 | 158 | let O = ab._1 | |
157 | 159 | let P = ab._2 | |
158 | 160 | let Q = ab._3 | |
159 | 161 | let aj = assetBalance(this, G) | |
160 | 162 | if (if ((O == J)) | |
161 | 163 | then (aj >= n) | |
162 | 164 | else false) | |
163 | 165 | then [ScriptTransfer(F.caller, aj, G)] | |
164 | 166 | else throw("routing != routingSize or amountToRecieve < minAmountToReceive") | |
165 | 167 | } | |
166 | 168 | } | |
167 | 169 | ||
168 | 170 |
github/deemru/w8io/026f985 32.32 ms ◑