tx · 245Zgqi48EM9x3hhYngypJJcLpkb8cYBDKYsnNGjVHmB 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves 2021.09.09 23:39 [1696003] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{ "type": 13, "id": "245Zgqi48EM9x3hhYngypJJcLpkb8cYBDKYsnNGjVHmB", "fee": 1000000, "feeAssetId": null, "timestamp": 1631220032965, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "4fT8JagLtS5GQRJcDocARjJnF9p6uMZxmTRuLpcS45txPXByYXuLGbFQjS6wr62yY55zbFqi4SQZXXbTimPjAKWm" ], "script": "base64:AAIFAAAAAAAAA+EIAhIICgYYGBEYAgEaFQoCYTESD2NoZWNrUG9zc2liaWx0eRoPCgJhMhIJcG10QW1vdW50GhgKAmEzEhJtaW5BbW91bnRUb1JlY2VpdmUaEAoCYTQSCmV4Y2hhbmdlcnMaFAoCYTUSDmV4Y2hhbmdlcnNUeXBlGhcKAmE2EhFyb3V0aW5nQXNzZXRzS2V5cxoQCgJhNxIKY29tbWlzc2lvbhoeCgJhOBIYY29tbWlzc2lvblNjYWxlRGVsaW1pdGVyGhMKAmE5Eg1kQXBwMVRva2VuUGF5GhMKAmIxEg1kQXBwMVRva2VuR2V0GhMKAmIyEg1kQXBwMlRva2VuUGF5GhMKAmIzEg1kQXBwMlRva2VuR2V0GhMKAmI0Eg1nZXRGcm9tMVRyYWRlGhoKAmI1EhRnZXRGcm9tMVRyYWRlV2l0aEZlZRoTCgJiNhINZ2V0RnJvbTJUcmFkZRoaCgJiNxIUZ2V0RnJvbTJUcmFkZVdpdGhGZWUaBwoCYjgSAWkaCgoCYjkSBGFyZ3MaFAoCYzESDnJlY2VpdmVBc3NldElkGhEKAmMyEgsk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AAAAAAAAAAABBQAAAAJlOAQAAAACZTkJAQAAAAJjNQAAAAIFAAAAAmU4CQABkQAAAAIFAAAAAmU1AAAAAAAAAAABAwkAAAAAAAACBQAAAAJlNgAAAAAAAAAAAgUAAAACZTkEAAAAAmYxCQEAAAACYzUAAAACBQAAAAJlOQkAAZEAAAACBQAAAAJlNQAAAAAAAAAAAgMJAAAAAAAAAgUAAAACZTYAAAAAAAAAAAMFAAAAAmYxBAAAAAJmMgkBAAAAAmM1AAAAAgUAAAACZjEJAAGRAAAAAgUAAAACZTUAAAAAAAAAAAMJAAACAAAAAQIAAAASTGlzdCBzaXplIGV4Y2VlZCAzBAAAAAJjOQgFAAAAAmU0AAAAAl8xBAAAAAJkMQgFAAAAAmU0AAAAAl8yBAAAAAJkMggFAAAAAmU0AAAAAl8zBAAAAAJmMwkAA/AAAAACBQAAAAR0aGlzBQAAAAJjMQMDCQAAAAAAAAIFAAAAAmM5BQAAAAJjNAkAAGcAAAACBQAAAAJmMwUAAAACYTMHCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAJiOAAAAAZjYWxsZXIFAAAAAmYzBQAAAAJjMQUAAAADbmlsCQAAAgAAAAECAAAAPnJvdXRpbmcgIT0gcm91dGluZ1NpemUgb3IgYW1vdW50VG9SZWNpZXZlIDwgbWluQW1vdW50VG9SZWNlaXZlAAAAANZhrTU=", "height": 1696003, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AFgjdJ8KPYJ1GxHUBzDr46QjQDmadxvV29n1ncVtt4eq Next: 9nRz3prEFDzBQh5ucKzU9hKDdxb8cFGJsRjtacjsum3 Diff:
Old | New | Differences | |
---|---|---|---|
13 | 13 | let o = fraction(l, n, (n + k)) | |
14 | 14 | let p = fraction(o, (h - g), h) | |
15 | 15 | if (true) | |
16 | - | then throw(toString( | |
16 | + | then throw(((((((toString(i) + " ") + toString(j)) + " ") + toString(k)) + " ") + toString(l))) | |
17 | 17 | else if ((p >= c)) | |
18 | 18 | then true | |
19 | 19 | else false |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b,c,d,e,f) = { | |
5 | 5 | let g = 3000 | |
6 | 6 | let h = 1000000 | |
7 | 7 | let i = getIntegerValue(addressFromStringValue(d[0]), f[0]) | |
8 | 8 | let j = getIntegerValue(addressFromStringValue(d[0]), f[1]) | |
9 | 9 | let k = getIntegerValue(addressFromStringValue(d[1]), f[2]) | |
10 | 10 | let l = getIntegerValue(addressFromStringValue(d[1]), f[3]) | |
11 | 11 | let m = fraction(j, b, (b + i)) | |
12 | 12 | let n = fraction(m, (h - g), h) | |
13 | 13 | let o = fraction(l, n, (n + k)) | |
14 | 14 | let p = fraction(o, (h - g), h) | |
15 | 15 | if (true) | |
16 | - | then throw(toString( | |
16 | + | then throw(((((((toString(i) + " ") + toString(j)) + " ") + toString(k)) + " ") + toString(l))) | |
17 | 17 | else if ((p >= c)) | |
18 | 18 | then true | |
19 | 19 | else false | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | @Callable(q) | |
24 | 24 | func routingTrade (d,e,r,f,s,c) = { | |
25 | 25 | let t = $Tuple2(q.payments[0].amount, q.payments[0].assetId) | |
26 | 26 | let b = t._1 | |
27 | 27 | let u = t._2 | |
28 | 28 | if (!(a(b, c, d, e, f))) | |
29 | 29 | then throw("Check transaction possibilty: declined") | |
30 | 30 | else { | |
31 | 31 | let v = size(d) | |
32 | 32 | func w (x,y) = { | |
33 | 33 | let z = x | |
34 | 34 | let A = z._1 | |
35 | 35 | let B = z._2 | |
36 | 36 | let C = z._3 | |
37 | 37 | if ((A == 0)) | |
38 | 38 | then { | |
39 | 39 | let D = addressFromStringValue(y) | |
40 | 40 | let E = invoke(D, "exchange", [r[A]], [AttachedPayment(u, b)]) | |
41 | 41 | if ((E == E)) | |
42 | 42 | then { | |
43 | 43 | let F = E | |
44 | 44 | if ($isInstanceOf(F, "(Int, ByteVector)")) | |
45 | 45 | then { | |
46 | 46 | let E = F | |
47 | 47 | let G = E | |
48 | 48 | let H = G._1 | |
49 | 49 | let I = G._2 | |
50 | 50 | $Tuple3((A + 1), H, I) | |
51 | 51 | } | |
52 | 52 | else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend") | |
53 | 53 | } | |
54 | 54 | else throw("Strict value is not equal to itself.") | |
55 | 55 | } | |
56 | 56 | else if (if ((A > 0)) | |
57 | 57 | then (v > A) | |
58 | 58 | else false) | |
59 | 59 | then { | |
60 | 60 | let D = addressFromStringValue(y) | |
61 | 61 | let J = $Tuple2(C, B) | |
62 | 62 | let K = J._1 | |
63 | 63 | let L = J._2 | |
64 | 64 | let E = invoke(D, "exchange", [r[A]], [AttachedPayment(K, L)]) | |
65 | 65 | if ((E == E)) | |
66 | 66 | then { | |
67 | 67 | let F = E | |
68 | 68 | if ($isInstanceOf(F, "(Int, ByteVector)")) | |
69 | 69 | then { | |
70 | 70 | let E = F | |
71 | 71 | let M = E | |
72 | 72 | let H = M._1 | |
73 | 73 | let I = M._2 | |
74 | 74 | $Tuple3((A + 1), H, I) | |
75 | 75 | } | |
76 | 76 | else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend") | |
77 | 77 | } | |
78 | 78 | else throw("Strict value is not equal to itself.") | |
79 | 79 | } | |
80 | 80 | else x | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | let N = { | |
84 | 84 | let O = d | |
85 | 85 | let P = size(O) | |
86 | 86 | let Q = $Tuple3(0, 0, base58'') | |
87 | 87 | if ((P == 0)) | |
88 | 88 | then Q | |
89 | 89 | else { | |
90 | 90 | let R = w(Q, O[0]) | |
91 | 91 | if ((P == 1)) | |
92 | 92 | then R | |
93 | 93 | else { | |
94 | 94 | let S = w(R, O[1]) | |
95 | 95 | if ((P == 2)) | |
96 | 96 | then S | |
97 | 97 | else { | |
98 | 98 | let T = w(S, O[2]) | |
99 | 99 | if ((P == 3)) | |
100 | 100 | then T | |
101 | 101 | else { | |
102 | 102 | let U = w(T, O[3]) | |
103 | 103 | throw("List size exceed 3") | |
104 | 104 | } | |
105 | 105 | } | |
106 | 106 | } | |
107 | 107 | } | |
108 | 108 | } | |
109 | 109 | let A = N._1 | |
110 | 110 | let B = N._2 | |
111 | 111 | let C = N._3 | |
112 | 112 | let V = assetBalance(this, s) | |
113 | 113 | if (if ((A == v)) | |
114 | 114 | then (V >= c) | |
115 | 115 | else false) | |
116 | 116 | then [ScriptTransfer(q.caller, V, s)] | |
117 | 117 | else throw("routing != routingSize or amountToRecieve < minAmountToReceive") | |
118 | 118 | } | |
119 | 119 | } | |
120 | 120 | ||
121 | 121 |
github/deemru/w8io/026f985 31.85 ms ◑