tx · 5m2j4DtUzd7CnkYncT4jzLbPQsUuyawKEo4AHFNqH8Tp
3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves
2021.08.08 17:55 [1649517] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{
"type": 13,
"id": "5m2j4DtUzd7CnkYncT4jzLbPQsUuyawKEo4AHFNqH8Tp",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1628434552491,
"version": 2,
"chainId": 84,
"sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL",
"senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx",
"proofs": [
"4x43N7Kjb2ZY2ZPpfqKveqbjeJcsmYuqeyhJstn8sptVkY6b8xgLkxCd19YiLDtNFyQnnSMYBkNBqZLHLRq2o98H"
],
"script": "base64:AAIFAAAAAAAAAb4IAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoNCgJiNBIHcm91dGluZxoTCgJiNRINJGxpc3QxMjQyMTI3OBoTCgJiNhINJHNpemUxMjQyMTI3OBoTCgJiNxINJGFjYzAxMjQyMTI3OBoTCgJiOBINJGFjYzExMjQyMTI3OBoTCgJiORINJGFjYzIxMjQyMTI3OBoTCgJjMRINJGFjYzMxMjQyMTI3OBoTCgJjMhINJGFjYzQxMjQyMTI3OBoTCgJjMxINJGFjYzUxMjQyMTI3OBoTCgJjNBINJGFjYzYxMjQyMTI3OBo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AAAAAAAAAEAwkAAAAAAAACBQAAAAJiNgAAAAAAAAAABQUAAAACYzMEAAAAAmM0CQEAAAACYjEAAAACBQAAAAJjMwkAAZEAAAACBQAAAAJiNQAAAAAAAAAABQkAAAIAAAABAgAAABJMaXN0IHNpemUgZXhjZWVkIDUDCQAAAAAAAAIFAAAAAmI0BQAAAAJhOQQAAAACYzUJAAPwAAAAAgUAAAAEdGhpcwkAAZEAAAACBQAAAAJhNAkAAGUAAAACBQAAAAJhOQAAAAAAAAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAACYTEAAAAGY2FsbGVyBQAAAAJjNQkAAZEAAAACBQAAAAJhNAkAAGUAAAACBQAAAAJhOQAAAAAAAAAAAQUAAAADbmlsBQAAAANuaWwAAAAAWcNAsg==",
"height": 1649517,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 9qfZffjHD5FhBymKMF7B1z4QBE3YqBPTD8G7G4goTiL9
Next: 5558uDCnSLXMA7tDemRi3hd1NMzyNzNxVRLV8N9ehtXi
Diff:
Old | New | | Differences |
---|
10 | 10 | | let h = f._2 |
---|
11 | 11 | | let i = size(b) |
---|
12 | 12 | | func j (k,l) = if ((i > k)) |
---|
13 | | - | then { |
---|
14 | | - | let m = addressFromStringValue(l) |
---|
15 | | - | let n = invoke(m, "exchange", [1], [AttachedPayment(h, g)]) |
---|
16 | | - | if ((n == n)) |
---|
17 | | - | then (k + 1) |
---|
18 | | - | else throw("Strict value is not equal to itself.") |
---|
19 | | - | } |
---|
| 13 | + | then (k + 1) |
---|
20 | 14 | | else k |
---|
21 | 15 | | |
---|
22 | | - | let o = { |
---|
23 | | - | let p = b |
---|
24 | | - | let q = size(p) |
---|
25 | | - | let r = 0 |
---|
26 | | - | if ((q == 0)) |
---|
27 | | - | then r |
---|
| 16 | + | let m = { |
---|
| 17 | + | let n = b |
---|
| 18 | + | let o = size(n) |
---|
| 19 | + | let p = 0 |
---|
| 20 | + | if ((o == 0)) |
---|
| 21 | + | then p |
---|
28 | 22 | | else { |
---|
29 | | - | let s = j(r, p[0]) |
---|
30 | | - | if ((q == 1)) |
---|
31 | | - | then s |
---|
| 23 | + | let q = j(p, n[0]) |
---|
| 24 | + | if ((o == 1)) |
---|
| 25 | + | then q |
---|
32 | 26 | | else { |
---|
33 | | - | let t = j(s, p[1]) |
---|
34 | | - | if ((q == 2)) |
---|
35 | | - | then t |
---|
| 27 | + | let r = j(q, n[1]) |
---|
| 28 | + | if ((o == 2)) |
---|
| 29 | + | then r |
---|
36 | 30 | | else { |
---|
37 | | - | let u = j(t, p[2]) |
---|
38 | | - | if ((q == 3)) |
---|
39 | | - | then u |
---|
| 31 | + | let s = j(r, n[2]) |
---|
| 32 | + | if ((o == 3)) |
---|
| 33 | + | then s |
---|
40 | 34 | | else { |
---|
41 | | - | let v = j(u, p[3]) |
---|
42 | | - | if ((q == 4)) |
---|
43 | | - | then v |
---|
| 35 | + | let t = j(s, n[3]) |
---|
| 36 | + | if ((o == 4)) |
---|
| 37 | + | then t |
---|
44 | 38 | | else { |
---|
45 | | - | let w = j(v, p[4]) |
---|
46 | | - | if ((q == 5)) |
---|
47 | | - | then w |
---|
| 39 | + | let u = j(t, n[4]) |
---|
| 40 | + | if ((o == 5)) |
---|
| 41 | + | then u |
---|
48 | 42 | | else { |
---|
49 | | - | let x = j(w, p[5]) |
---|
| 43 | + | let v = j(u, n[5]) |
---|
50 | 44 | | throw("List size exceed 5") |
---|
51 | 45 | | } |
---|
52 | 46 | | } |
---|
|
55 | 49 | | } |
---|
56 | 50 | | } |
---|
57 | 51 | | } |
---|
58 | | - | if ((o == i)) |
---|
| 52 | + | if ((m == i)) |
---|
59 | 53 | | then { |
---|
60 | | - | let y = assetBalance(this, d[(i - 1)]) |
---|
61 | | - | [ScriptTransfer(a.caller, y, d[(i - 1)])] |
---|
| 54 | + | let w = assetBalance(this, d[(i - 1)]) |
---|
| 55 | + | [ScriptTransfer(a.caller, w, d[(i - 1)])] |
---|
62 | 56 | | } |
---|
63 | 57 | | else nil |
---|
64 | 58 | | } |
---|
Full:
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 = $Tuple2(a.payments[0].amount, a.payments[0].assetId) |
---|
9 | 9 | | let g = f._1 |
---|
10 | 10 | | let h = f._2 |
---|
11 | 11 | | let i = size(b) |
---|
12 | 12 | | func j (k,l) = if ((i > k)) |
---|
13 | | - | then { |
---|
14 | | - | let m = addressFromStringValue(l) |
---|
15 | | - | let n = invoke(m, "exchange", [1], [AttachedPayment(h, g)]) |
---|
16 | | - | if ((n == n)) |
---|
17 | | - | then (k + 1) |
---|
18 | | - | else throw("Strict value is not equal to itself.") |
---|
19 | | - | } |
---|
| 13 | + | then (k + 1) |
---|
20 | 14 | | else k |
---|
21 | 15 | | |
---|
22 | | - | let o = { |
---|
23 | | - | let p = b |
---|
24 | | - | let q = size(p) |
---|
25 | | - | let r = 0 |
---|
26 | | - | if ((q == 0)) |
---|
27 | | - | then r |
---|
| 16 | + | let m = { |
---|
| 17 | + | let n = b |
---|
| 18 | + | let o = size(n) |
---|
| 19 | + | let p = 0 |
---|
| 20 | + | if ((o == 0)) |
---|
| 21 | + | then p |
---|
28 | 22 | | else { |
---|
29 | | - | let s = j(r, p[0]) |
---|
30 | | - | if ((q == 1)) |
---|
31 | | - | then s |
---|
| 23 | + | let q = j(p, n[0]) |
---|
| 24 | + | if ((o == 1)) |
---|
| 25 | + | then q |
---|
32 | 26 | | else { |
---|
33 | | - | let t = j(s, p[1]) |
---|
34 | | - | if ((q == 2)) |
---|
35 | | - | then t |
---|
| 27 | + | let r = j(q, n[1]) |
---|
| 28 | + | if ((o == 2)) |
---|
| 29 | + | then r |
---|
36 | 30 | | else { |
---|
37 | | - | let u = j(t, p[2]) |
---|
38 | | - | if ((q == 3)) |
---|
39 | | - | then u |
---|
| 31 | + | let s = j(r, n[2]) |
---|
| 32 | + | if ((o == 3)) |
---|
| 33 | + | then s |
---|
40 | 34 | | else { |
---|
41 | | - | let v = j(u, p[3]) |
---|
42 | | - | if ((q == 4)) |
---|
43 | | - | then v |
---|
| 35 | + | let t = j(s, n[3]) |
---|
| 36 | + | if ((o == 4)) |
---|
| 37 | + | then t |
---|
44 | 38 | | else { |
---|
45 | | - | let w = j(v, p[4]) |
---|
46 | | - | if ((q == 5)) |
---|
47 | | - | then w |
---|
| 39 | + | let u = j(t, n[4]) |
---|
| 40 | + | if ((o == 5)) |
---|
| 41 | + | then u |
---|
48 | 42 | | else { |
---|
49 | | - | let x = j(w, p[5]) |
---|
| 43 | + | let v = j(u, n[5]) |
---|
50 | 44 | | throw("List size exceed 5") |
---|
51 | 45 | | } |
---|
52 | 46 | | } |
---|
53 | 47 | | } |
---|
54 | 48 | | } |
---|
55 | 49 | | } |
---|
56 | 50 | | } |
---|
57 | 51 | | } |
---|
58 | | - | if ((o == i)) |
---|
| 52 | + | if ((m == i)) |
---|
59 | 53 | | then { |
---|
60 | | - | let y = assetBalance(this, d[(i - 1)]) |
---|
61 | | - | [ScriptTransfer(a.caller, y, d[(i - 1)])] |
---|
| 54 | + | let w = assetBalance(this, d[(i - 1)]) |
---|
| 55 | + | [ScriptTransfer(a.caller, w, d[(i - 1)])] |
---|
62 | 56 | | } |
---|
63 | 57 | | else nil |
---|
64 | 58 | | } |
---|
65 | 59 | | |
---|
66 | 60 | | |
---|