tx · 8DJxVc5323yCZgvFKWrnBybmMb23Cr8fVDR7A2ZBiprq 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves 2021.08.15 13:37 [1659360] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{ "type": 13, "id": "8DJxVc5323yCZgvFKWrnBybmMb23Cr8fVDR7A2ZBiprq", "fee": 1000000, "feeAssetId": null, "timestamp": 1629023870291, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "4baHqzHNtejDe13PborfrrrfZcbdHwwyx8cWNzXaFsGUhCE3M2WHXNTqVMdP9Li6uX4sBGbNNozTUF1rNTAW7b6w" ], "script": "base64:AAIFAAAAAAAAAf0IAhIHCgUYERICARoHCgJhMRIBaRoQCgJhMhIKZXhjaGFuZ2VycxoKCgJhMxIEYXJncxoRCgJhNBILYXNzZXRzVG9QYXkaFQoCYTUSD2Fzc2V0VG9Vc2VyU2VuZBoYCgJhNhISbWluQW1vdW50VG9SZWNlaXZlGhEKAmE3Egtyb3V0aW5nU2l6ZRoSCgJhOBIMZXhjaGFuZ2VGb2xkGhEKAmE5EgthY2N1bXVsYXRlZBoPCgJiMRIJZXhjaGFuZ2VyGhYKAmIyEhBleGNoYW5nZXJBZGRyZXNzGhAKAmIzEgokdDA5ODQxMDU4Gg8KAmI0EglwbXRBbW91bnQaEAoCYjUSCnBtdEFzc2V0SWQaCQoCYjYSA2ludhoNCgJiNxIHcm91dGluZxoTCgJiOBINJGxpc3QxODA3MTg0MxoTCgJiORINJHNpemUxODA3MTg0MxoTCgJjMRINJGFjYzAxODA3MTg0MxoTCgJjMhINJGFjYzExODA3MTg0MxoTCgJjMxINJGFjYzIxODA3MTg0MxoTCgJjNBINJGFjYzMxODA3MTg0MxoTCgJjNRINJGFjYz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AwkAAAAAAAACBQAAAAJiOQAAAAAAAAAABQUAAAACYzYEAAAAAmM3CQEAAAACYTgAAAACBQAAAAJjNgkAAZEAAAACBQAAAAJiOAAAAAAAAAAABQkAAAIAAAABAgAAABJMaXN0IHNpemUgZXhjZWVkIDUDCQAAAAAAAAIFAAAAAmI3BQAAAAJhNwMGCQAAAgAAAAECAAAAATEEAAAAAmM4CQAD8AAAAAIFAAAABHRoaXMFAAAAAmE1CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAJhMQAAAAZjYWxsZXIFAAAAAmM4BQAAAAJhNQUAAAADbmlsBQAAAANuaWwAAAAAqtvOqQ==", "height": 1659360, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G6N6qMWympRgLtpxzywXhkhHsSCcGWDGjGwAeeh8bxr3 Next: CQfUzppQx18V1ZvAZZGZJFWtFVQh65jpniwwoqhDNgGh Diff:
Old | New | Differences | |
---|---|---|---|
6 | 6 | @Callable(a) | |
7 | 7 | func routingTrade (b,c,d,e,f) = { | |
8 | 8 | let g = size(b) | |
9 | - | func h (i,j) = if ((i == 0)) | |
10 | - | then { | |
11 | - | let k = addressFromStringValue(j) | |
12 | - | let l = $Tuple2(a.payments[0].amount, a.payments[0].assetId) | |
13 | - | let m = l._1 | |
14 | - | let n = l._2 | |
15 | - | if ((d[0] != n)) | |
16 | - | then throw("Incorrect payment and assetsToPay array") | |
17 | - | else { | |
18 | - | let o = invoke(k, "exchange", [c[i]], [AttachedPayment(n, m)]) | |
19 | - | if ((o == o)) | |
20 | - | then (i + 1) | |
21 | - | else throw("Strict value is not equal to itself.") | |
9 | + | if (true) | |
10 | + | then throw(toString(g)) | |
11 | + | else { | |
12 | + | func h (i,j) = if ((i == 0)) | |
13 | + | then { | |
14 | + | let k = addressFromStringValue(j) | |
15 | + | let l = $Tuple2(a.payments[0].amount, a.payments[0].assetId) | |
16 | + | let m = l._1 | |
17 | + | let n = l._2 | |
18 | + | if ((d[0] != n)) | |
19 | + | then throw("Incorrect payment and assetsToPay array") | |
20 | + | else { | |
21 | + | let o = invoke(k, "exchange", [c[i]], [AttachedPayment(n, m)]) | |
22 | + | if ((o == o)) | |
23 | + | then (i + 1) | |
24 | + | else throw("Strict value is not equal to itself.") | |
25 | + | } | |
22 | 26 | } | |
23 | - | } | |
24 | - | else if (if ((i > 0)) | |
25 | - | then (g > i) | |
26 | - | else false) | |
27 | - | then { | |
28 | - | let k = addressFromStringValue(j) | |
29 | - | let n = d[i] | |
30 | - | let m = assetBalance(this, n) | |
31 | - | let o = invoke(k, "exchange", [c[i]], [AttachedPayment(n, m)]) | |
32 | - | if ((o == o)) | |
33 | - | then (i + 1) | |
34 | - | else throw("Strict value is not equal to itself.") | |
35 | - | } | |
36 | - | else i | |
27 | + | else if (if ((i > 0)) | |
28 | + | then (g > i) | |
29 | + | else false) | |
30 | + | then { | |
31 | + | let k = addressFromStringValue(j) | |
32 | + | let n = d[i] | |
33 | + | let m = assetBalance(this, n) | |
34 | + | let o = invoke(k, "exchange", [c[i]], [AttachedPayment(n, m)]) | |
35 | + | if ((o == o)) | |
36 | + | then (i + 1) | |
37 | + | else throw("Strict value is not equal to itself.") | |
38 | + | } | |
39 | + | else i | |
37 | 40 | ||
38 | - | let p = { | |
39 | - | let q = b | |
40 | - | let r = size(q) | |
41 | - | let s = 0 | |
42 | - | if ((r == 0)) | |
43 | - | then s | |
44 | - | else { | |
45 | - | let t = h(s, q[0]) | |
46 | - | if ((r == 1)) | |
47 | - | then t | |
41 | + | let p = { | |
42 | + | let q = b | |
43 | + | let r = size(q) | |
44 | + | let s = 0 | |
45 | + | if ((r == 0)) | |
46 | + | then s | |
48 | 47 | else { | |
49 | - | let | |
50 | - | if ((r == | |
51 | - | then | |
48 | + | let t = h(s, q[0]) | |
49 | + | if ((r == 1)) | |
50 | + | then t | |
52 | 51 | else { | |
53 | - | let | |
54 | - | if ((r == | |
55 | - | then | |
52 | + | let u = h(t, q[1]) | |
53 | + | if ((r == 2)) | |
54 | + | then u | |
56 | 55 | else { | |
57 | - | let | |
58 | - | if ((r == | |
59 | - | then | |
56 | + | let v = h(u, q[2]) | |
57 | + | if ((r == 3)) | |
58 | + | then v | |
60 | 59 | else { | |
61 | - | let | |
62 | - | if ((r == | |
63 | - | then | |
60 | + | let w = h(v, q[3]) | |
61 | + | if ((r == 4)) | |
62 | + | then w | |
64 | 63 | else { | |
65 | - | let y = h(x, q[5]) | |
66 | - | throw("List size exceed 5") | |
64 | + | let x = h(w, q[4]) | |
65 | + | if ((r == 5)) | |
66 | + | then x | |
67 | + | else { | |
68 | + | let y = h(x, q[5]) | |
69 | + | throw("List size exceed 5") | |
70 | + | } | |
67 | 71 | } | |
68 | 72 | } | |
69 | 73 | } | |
70 | 74 | } | |
71 | 75 | } | |
72 | 76 | } | |
73 | - | } | |
74 | - | if ((p == g)) | |
75 | - | then if (true) | |
76 | - | then throw("1") | |
77 | - | else { | |
78 | - | let z = assetBalance(this, e) | |
77 | + | if ((p == g)) | |
78 | + | then if (true) | |
79 | + | then throw("1") | |
80 | + | else { | |
81 | + | let z = assetBalance(this, e) | |
79 | 82 | [ScriptTransfer(a.caller, z, e)] | |
80 | - | } | |
81 | - | else nil | |
83 | + | } | |
84 | + | else nil | |
85 | + | } | |
82 | 86 | } | |
83 | 87 | ||
84 | 88 |
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,f) = { | |
8 | 8 | let g = size(b) | |
9 | - | func h (i,j) = if ((i == 0)) | |
10 | - | then { | |
11 | - | let k = addressFromStringValue(j) | |
12 | - | let l = $Tuple2(a.payments[0].amount, a.payments[0].assetId) | |
13 | - | let m = l._1 | |
14 | - | let n = l._2 | |
15 | - | if ((d[0] != n)) | |
16 | - | then throw("Incorrect payment and assetsToPay array") | |
17 | - | else { | |
18 | - | let o = invoke(k, "exchange", [c[i]], [AttachedPayment(n, m)]) | |
19 | - | if ((o == o)) | |
20 | - | then (i + 1) | |
21 | - | else throw("Strict value is not equal to itself.") | |
9 | + | if (true) | |
10 | + | then throw(toString(g)) | |
11 | + | else { | |
12 | + | func h (i,j) = if ((i == 0)) | |
13 | + | then { | |
14 | + | let k = addressFromStringValue(j) | |
15 | + | let l = $Tuple2(a.payments[0].amount, a.payments[0].assetId) | |
16 | + | let m = l._1 | |
17 | + | let n = l._2 | |
18 | + | if ((d[0] != n)) | |
19 | + | then throw("Incorrect payment and assetsToPay array") | |
20 | + | else { | |
21 | + | let o = invoke(k, "exchange", [c[i]], [AttachedPayment(n, m)]) | |
22 | + | if ((o == o)) | |
23 | + | then (i + 1) | |
24 | + | else throw("Strict value is not equal to itself.") | |
25 | + | } | |
22 | 26 | } | |
23 | - | } | |
24 | - | else if (if ((i > 0)) | |
25 | - | then (g > i) | |
26 | - | else false) | |
27 | - | then { | |
28 | - | let k = addressFromStringValue(j) | |
29 | - | let n = d[i] | |
30 | - | let m = assetBalance(this, n) | |
31 | - | let o = invoke(k, "exchange", [c[i]], [AttachedPayment(n, m)]) | |
32 | - | if ((o == o)) | |
33 | - | then (i + 1) | |
34 | - | else throw("Strict value is not equal to itself.") | |
35 | - | } | |
36 | - | else i | |
27 | + | else if (if ((i > 0)) | |
28 | + | then (g > i) | |
29 | + | else false) | |
30 | + | then { | |
31 | + | let k = addressFromStringValue(j) | |
32 | + | let n = d[i] | |
33 | + | let m = assetBalance(this, n) | |
34 | + | let o = invoke(k, "exchange", [c[i]], [AttachedPayment(n, m)]) | |
35 | + | if ((o == o)) | |
36 | + | then (i + 1) | |
37 | + | else throw("Strict value is not equal to itself.") | |
38 | + | } | |
39 | + | else i | |
37 | 40 | ||
38 | - | let p = { | |
39 | - | let q = b | |
40 | - | let r = size(q) | |
41 | - | let s = 0 | |
42 | - | if ((r == 0)) | |
43 | - | then s | |
44 | - | else { | |
45 | - | let t = h(s, q[0]) | |
46 | - | if ((r == 1)) | |
47 | - | then t | |
41 | + | let p = { | |
42 | + | let q = b | |
43 | + | let r = size(q) | |
44 | + | let s = 0 | |
45 | + | if ((r == 0)) | |
46 | + | then s | |
48 | 47 | else { | |
49 | - | let | |
50 | - | if ((r == | |
51 | - | then | |
48 | + | let t = h(s, q[0]) | |
49 | + | if ((r == 1)) | |
50 | + | then t | |
52 | 51 | else { | |
53 | - | let | |
54 | - | if ((r == | |
55 | - | then | |
52 | + | let u = h(t, q[1]) | |
53 | + | if ((r == 2)) | |
54 | + | then u | |
56 | 55 | else { | |
57 | - | let | |
58 | - | if ((r == | |
59 | - | then | |
56 | + | let v = h(u, q[2]) | |
57 | + | if ((r == 3)) | |
58 | + | then v | |
60 | 59 | else { | |
61 | - | let | |
62 | - | if ((r == | |
63 | - | then | |
60 | + | let w = h(v, q[3]) | |
61 | + | if ((r == 4)) | |
62 | + | then w | |
64 | 63 | else { | |
65 | - | let y = h(x, q[5]) | |
66 | - | throw("List size exceed 5") | |
64 | + | let x = h(w, q[4]) | |
65 | + | if ((r == 5)) | |
66 | + | then x | |
67 | + | else { | |
68 | + | let y = h(x, q[5]) | |
69 | + | throw("List size exceed 5") | |
70 | + | } | |
67 | 71 | } | |
68 | 72 | } | |
69 | 73 | } | |
70 | 74 | } | |
71 | 75 | } | |
72 | 76 | } | |
73 | - | } | |
74 | - | if ((p == g)) | |
75 | - | then if (true) | |
76 | - | then throw("1") | |
77 | - | else { | |
78 | - | let z = assetBalance(this, e) | |
77 | + | if ((p == g)) | |
78 | + | then if (true) | |
79 | + | then throw("1") | |
80 | + | else { | |
81 | + | let z = assetBalance(this, e) | |
79 | 82 | [ScriptTransfer(a.caller, z, e)] | |
80 | - | } | |
81 | - | else nil | |
83 | + | } | |
84 | + | else nil | |
85 | + | } | |
82 | 86 | } | |
83 | 87 | ||
84 | 88 |
github/deemru/w8io/026f985 39.78 ms ◑