tx · yUDjTK8Mxo6qXqBVphvznrfopTtYhCcAr7vuTir4cWQ 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves 2021.08.31 23:57 [1683027] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{ "type": 13, "id": "yUDjTK8Mxo6qXqBVphvznrfopTtYhCcAr7vuTir4cWQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1630443478742, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "4tTTHHfHtYUcGNLGvg3ovt3uw3WGPkxfo7wMnftvsuojKswJvZZqdkkUwPYwWv8bixYZvbQCbWR26Ywtev7Rmp5j" ], "script": "base64:AAIFAAAAAAAAAoQIAhIGCgQYEQIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGhQKAmE0Eg5yZWNlaXZlQXNzZXRJZBoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGhEKAmE2Egtyb3V0aW5nU2l6ZRoSCgJhNxIMZXhjaGFuZ2VGb2xkGhEKAmE4EgthY2N1bXVsYXRlZBoPCgJhORIJZXhjaGFuZ2VyGg8KAmIxEgkkdDA5MzU5OTgaFQoCYjISD2V4Y2hhbmdlQ291bnRlchoUCgJiMxIOYW1vdW50c1dpdGhGZWUaEgoCYjQSDGFzc2V0c0lkU2VuZBoWCgJiNRIQZXhjaGFuZ2VyQWRkcmVzcxoRCgJiNhILJHQwMTExODExOTIaDwoCYjcSCXBtdEFtb3VudBoQCgJiOBIKcG10QXNzZXRJZBoJCgJiORIDaW52Gg0KAmMxEgckbWF0Y2gwGhEKAmMyEgskdDAxNDIwMTQ1OBoTCgJjMxINYW1vdW50V2l0aEZlZRoRCgJjNBILYXNzZXRJZFNlbmQaEQoCYzUSCy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AAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAACYTEAAAAGY2FsbGVyBQAAAAJkNgUAAAACYTQFAAAAA25pbAkAAAIAAAABAgAAAD5yb3V0aW5nICE9IHJvdXRpbmdTaXplIG9yIGFtb3VudFRvUmVjaWV2ZSA8IG1pbkFtb3VudFRvUmVjZWl2ZQAAAAD6xIl/", "height": 1683027, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 92LQnViqFimBstBSHFmNpj1Ck87neh2RQNus9pgfXVWy Next: A1ZDU2ANYWTXDxtW17in4oXu7pqJwECmePUDonYE9fF3 Diff:
Old | New | Differences | |
---|---|---|---|
33 | 33 | } | |
34 | 34 | else throw("Strict value is not equal to itself.") | |
35 | 35 | } | |
36 | - | else if ((k | |
36 | + | else if ((k == 1)) | |
37 | 37 | then throw(((((toString(k) + " ") + toBase58String(m)) + " ") + toString(l))) | |
38 | 38 | else if (if ((k > 0)) | |
39 | 39 | then (f > k) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | 7 | func routingTrade (b,c,d,e) = { | |
8 | 8 | let f = size(b) | |
9 | 9 | func g (h,i) = { | |
10 | 10 | let j = h | |
11 | 11 | let k = j._1 | |
12 | 12 | let l = j._2 | |
13 | 13 | let m = j._3 | |
14 | 14 | if ((k == 0)) | |
15 | 15 | then { | |
16 | 16 | let n = addressFromStringValue(i) | |
17 | 17 | let o = $Tuple2(a.payments[0].amount, a.payments[0].assetId) | |
18 | 18 | let p = o._1 | |
19 | 19 | let q = o._2 | |
20 | 20 | let r = invoke(n, "exchange", [c[k]], [AttachedPayment(q, p)]) | |
21 | 21 | if ((r == r)) | |
22 | 22 | then { | |
23 | 23 | let s = r | |
24 | 24 | if ($isInstanceOf(s, "(Int, ByteVector)")) | |
25 | 25 | then { | |
26 | 26 | let r = s | |
27 | 27 | let t = r | |
28 | 28 | let u = t._1 | |
29 | 29 | let v = t._2 | |
30 | 30 | $Tuple3((k + 1), u, v) | |
31 | 31 | } | |
32 | 32 | else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend") | |
33 | 33 | } | |
34 | 34 | else throw("Strict value is not equal to itself.") | |
35 | 35 | } | |
36 | - | else if ((k | |
36 | + | else if ((k == 1)) | |
37 | 37 | then throw(((((toString(k) + " ") + toBase58String(m)) + " ") + toString(l))) | |
38 | 38 | else if (if ((k > 0)) | |
39 | 39 | then (f > k) | |
40 | 40 | else false) | |
41 | 41 | then { | |
42 | 42 | let n = addressFromStringValue(i) | |
43 | 43 | let w = $Tuple2(m, l) | |
44 | 44 | let q = w._1 | |
45 | 45 | let p = w._2 | |
46 | 46 | let r = invoke(n, "exchange", [c[k]], [AttachedPayment(q, p)]) | |
47 | 47 | if ((r == r)) | |
48 | 48 | then { | |
49 | 49 | let s = r | |
50 | 50 | if ($isInstanceOf(s, "(Int, ByteVector)")) | |
51 | 51 | then { | |
52 | 52 | let r = s | |
53 | 53 | let x = r | |
54 | 54 | let u = x._1 | |
55 | 55 | let v = x._2 | |
56 | 56 | $Tuple3((k + 1), u, v) | |
57 | 57 | } | |
58 | 58 | else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend") | |
59 | 59 | } | |
60 | 60 | else throw("Strict value is not equal to itself.") | |
61 | 61 | } | |
62 | 62 | else h | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | let y = { | |
66 | 66 | let z = b | |
67 | 67 | let A = size(z) | |
68 | 68 | let B = $Tuple3(0, 0, base58'') | |
69 | 69 | if ((A == 0)) | |
70 | 70 | then B | |
71 | 71 | else { | |
72 | 72 | let C = g(B, z[0]) | |
73 | 73 | if ((A == 1)) | |
74 | 74 | then C | |
75 | 75 | else { | |
76 | 76 | let D = g(C, z[1]) | |
77 | 77 | if ((A == 2)) | |
78 | 78 | then D | |
79 | 79 | else { | |
80 | 80 | let E = g(D, z[2]) | |
81 | 81 | if ((A == 3)) | |
82 | 82 | then E | |
83 | 83 | else { | |
84 | 84 | let F = g(E, z[3]) | |
85 | 85 | throw("List size exceed 3") | |
86 | 86 | } | |
87 | 87 | } | |
88 | 88 | } | |
89 | 89 | } | |
90 | 90 | } | |
91 | 91 | let k = y._1 | |
92 | 92 | let l = y._2 | |
93 | 93 | let m = y._3 | |
94 | 94 | let G = assetBalance(this, d) | |
95 | 95 | if (if ((k == f)) | |
96 | 96 | then (G >= e) | |
97 | 97 | else false) | |
98 | 98 | then [ScriptTransfer(a.caller, G, d)] | |
99 | 99 | else throw("routing != routingSize or amountToRecieve < minAmountToReceive") | |
100 | 100 | } | |
101 | 101 | ||
102 | 102 |
github/deemru/w8io/026f985 22.22 ms ◑