tx · 9HbGXYy6qCuQohGBSwGiCJnLMwTkEp1trcLNwoTWcsnz
3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves
2021.08.08 18:49 [1649571] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{
"type": 13,
"id": "9HbGXYy6qCuQohGBSwGiCJnLMwTkEp1trcLNwoTWcsnz",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1628437774643,
"version": 2,
"chainId": 84,
"sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL",
"senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx",
"proofs": [
"4zosapN59jXxbbvENaxMfUtUMs51Pw8DEWheHhSfzWvmP3JDmuUaVx6BpKMgerxUZJn4RQ9LfLp5Carrn9KPJNWw"
],
"script": "base64:AAIFAAAAAAAAAgsIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoHCgJiNRIBYRoNCgJiNhIHJG1hdGNoMBoHCgJiNxIBdBoHCgJiOBIBdRoJCgJiORIDaW52Gg0KAmMxEgdyb3V0aW5nGhMKAmMyEg0kbGlzdDEzNjgxNDA0GhMKAmMzEg0kc2l6ZTEzNjgxNDA0GhMKAmM0Eg0kYWNjMDEzNjgxNDA0GhMKAmM1Eg0kYWNjMTEzNjgxNDA0GhMKAmM2Eg0kYWNjMjEzNjgxND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1649571,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 5pGjXFkyxGep1K38YdPhbKvjEhUDAdXR9fsdUUPwg2hz
Next: 9RP3MsCPgfNRGrnAJijcGx9TRrCg943VaE7Jf2J4zExc
Diff:
Old | New | | Differences |
---|
12 | 12 | | func j (k,l) = if ((i > k)) |
---|
13 | 13 | | then { |
---|
14 | 14 | | let m = addressFromStringValue(l) |
---|
15 | | - | let n = invoke(m, "exchange", [c[k]], [AttachedPayment(unit, 100000)]) |
---|
16 | | - | if ((n == n)) |
---|
| 15 | + | let n = { |
---|
| 16 | + | let o = h |
---|
| 17 | + | if ($isInstanceOf(o, "ByteVector")) |
---|
| 18 | + | then { |
---|
| 19 | + | let p = o |
---|
| 20 | + | p |
---|
| 21 | + | } |
---|
| 22 | + | else if ($isInstanceOf(o, "Unit")) |
---|
| 23 | + | then { |
---|
| 24 | + | let q = o |
---|
| 25 | + | q |
---|
| 26 | + | } |
---|
| 27 | + | else throw("Match error") |
---|
| 28 | + | } |
---|
| 29 | + | let r = invoke(m, "exchange", [c[k]], [AttachedPayment(n, 100000)]) |
---|
| 30 | + | if ((r == r)) |
---|
17 | 31 | | then (k + 1) |
---|
18 | 32 | | else throw("Strict value is not equal to itself.") |
---|
19 | 33 | | } |
---|
20 | 34 | | else k |
---|
21 | 35 | | |
---|
22 | | - | let o = { |
---|
23 | | - | let p = b |
---|
24 | | - | let q = size(p) |
---|
25 | | - | let r = 0 |
---|
26 | | - | if ((q == 0)) |
---|
27 | | - | then r |
---|
| 36 | + | let s = { |
---|
| 37 | + | let t = b |
---|
| 38 | + | let u = size(t) |
---|
| 39 | + | let v = 0 |
---|
| 40 | + | if ((u == 0)) |
---|
| 41 | + | then v |
---|
28 | 42 | | else { |
---|
29 | | - | let s = j(r, p[0]) |
---|
30 | | - | if ((q == 1)) |
---|
31 | | - | then s |
---|
| 43 | + | let w = j(v, t[0]) |
---|
| 44 | + | if ((u == 1)) |
---|
| 45 | + | then w |
---|
32 | 46 | | else { |
---|
33 | | - | let t = j(s, p[1]) |
---|
34 | | - | if ((q == 2)) |
---|
35 | | - | then t |
---|
| 47 | + | let x = j(w, t[1]) |
---|
| 48 | + | if ((u == 2)) |
---|
| 49 | + | then x |
---|
36 | 50 | | else { |
---|
37 | | - | let u = j(t, p[2]) |
---|
38 | | - | if ((q == 3)) |
---|
39 | | - | then u |
---|
| 51 | + | let y = j(x, t[2]) |
---|
| 52 | + | if ((u == 3)) |
---|
| 53 | + | then y |
---|
40 | 54 | | else { |
---|
41 | | - | let v = j(u, p[3]) |
---|
42 | | - | if ((q == 4)) |
---|
43 | | - | then v |
---|
| 55 | + | let z = j(y, t[3]) |
---|
| 56 | + | if ((u == 4)) |
---|
| 57 | + | then z |
---|
44 | 58 | | else { |
---|
45 | | - | let w = j(v, p[4]) |
---|
46 | | - | if ((q == 5)) |
---|
47 | | - | then w |
---|
| 59 | + | let A = j(z, t[4]) |
---|
| 60 | + | if ((u == 5)) |
---|
| 61 | + | then A |
---|
48 | 62 | | else { |
---|
49 | | - | let x = j(w, p[5]) |
---|
| 63 | + | let B = j(A, t[5]) |
---|
50 | 64 | | throw("List size exceed 5") |
---|
51 | 65 | | } |
---|
52 | 66 | | } |
---|
|
55 | 69 | | } |
---|
56 | 70 | | } |
---|
57 | 71 | | } |
---|
58 | | - | if ((o == i)) |
---|
| 72 | + | if ((s == i)) |
---|
59 | 73 | | then { |
---|
60 | | - | let y = assetBalance(this, d[(i - 1)]) |
---|
61 | | - | [ScriptTransfer(a.caller, y, d[(i - 1)])] |
---|
| 74 | + | let C = assetBalance(this, d[(i - 1)]) |
---|
| 75 | + | [ScriptTransfer(a.caller, C, d[(i - 1)])] |
---|
62 | 76 | | } |
---|
63 | 77 | | else nil |
---|
64 | 78 | | } |
---|
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 | 13 | | then { |
---|
14 | 14 | | let m = addressFromStringValue(l) |
---|
15 | | - | let n = invoke(m, "exchange", [c[k]], [AttachedPayment(unit, 100000)]) |
---|
16 | | - | if ((n == n)) |
---|
| 15 | + | let n = { |
---|
| 16 | + | let o = h |
---|
| 17 | + | if ($isInstanceOf(o, "ByteVector")) |
---|
| 18 | + | then { |
---|
| 19 | + | let p = o |
---|
| 20 | + | p |
---|
| 21 | + | } |
---|
| 22 | + | else if ($isInstanceOf(o, "Unit")) |
---|
| 23 | + | then { |
---|
| 24 | + | let q = o |
---|
| 25 | + | q |
---|
| 26 | + | } |
---|
| 27 | + | else throw("Match error") |
---|
| 28 | + | } |
---|
| 29 | + | let r = invoke(m, "exchange", [c[k]], [AttachedPayment(n, 100000)]) |
---|
| 30 | + | if ((r == r)) |
---|
17 | 31 | | then (k + 1) |
---|
18 | 32 | | else throw("Strict value is not equal to itself.") |
---|
19 | 33 | | } |
---|
20 | 34 | | else k |
---|
21 | 35 | | |
---|
22 | | - | let o = { |
---|
23 | | - | let p = b |
---|
24 | | - | let q = size(p) |
---|
25 | | - | let r = 0 |
---|
26 | | - | if ((q == 0)) |
---|
27 | | - | then r |
---|
| 36 | + | let s = { |
---|
| 37 | + | let t = b |
---|
| 38 | + | let u = size(t) |
---|
| 39 | + | let v = 0 |
---|
| 40 | + | if ((u == 0)) |
---|
| 41 | + | then v |
---|
28 | 42 | | else { |
---|
29 | | - | let s = j(r, p[0]) |
---|
30 | | - | if ((q == 1)) |
---|
31 | | - | then s |
---|
| 43 | + | let w = j(v, t[0]) |
---|
| 44 | + | if ((u == 1)) |
---|
| 45 | + | then w |
---|
32 | 46 | | else { |
---|
33 | | - | let t = j(s, p[1]) |
---|
34 | | - | if ((q == 2)) |
---|
35 | | - | then t |
---|
| 47 | + | let x = j(w, t[1]) |
---|
| 48 | + | if ((u == 2)) |
---|
| 49 | + | then x |
---|
36 | 50 | | else { |
---|
37 | | - | let u = j(t, p[2]) |
---|
38 | | - | if ((q == 3)) |
---|
39 | | - | then u |
---|
| 51 | + | let y = j(x, t[2]) |
---|
| 52 | + | if ((u == 3)) |
---|
| 53 | + | then y |
---|
40 | 54 | | else { |
---|
41 | | - | let v = j(u, p[3]) |
---|
42 | | - | if ((q == 4)) |
---|
43 | | - | then v |
---|
| 55 | + | let z = j(y, t[3]) |
---|
| 56 | + | if ((u == 4)) |
---|
| 57 | + | then z |
---|
44 | 58 | | else { |
---|
45 | | - | let w = j(v, p[4]) |
---|
46 | | - | if ((q == 5)) |
---|
47 | | - | then w |
---|
| 59 | + | let A = j(z, t[4]) |
---|
| 60 | + | if ((u == 5)) |
---|
| 61 | + | then A |
---|
48 | 62 | | else { |
---|
49 | | - | let x = j(w, p[5]) |
---|
| 63 | + | let B = j(A, t[5]) |
---|
50 | 64 | | throw("List size exceed 5") |
---|
51 | 65 | | } |
---|
52 | 66 | | } |
---|
53 | 67 | | } |
---|
54 | 68 | | } |
---|
55 | 69 | | } |
---|
56 | 70 | | } |
---|
57 | 71 | | } |
---|
58 | | - | if ((o == i)) |
---|
| 72 | + | if ((s == i)) |
---|
59 | 73 | | then { |
---|
60 | | - | let y = assetBalance(this, d[(i - 1)]) |
---|
61 | | - | [ScriptTransfer(a.caller, y, d[(i - 1)])] |
---|
| 74 | + | let C = assetBalance(this, d[(i - 1)]) |
---|
| 75 | + | [ScriptTransfer(a.caller, C, d[(i - 1)])] |
---|
62 | 76 | | } |
---|
63 | 77 | | else nil |
---|
64 | 78 | | } |
---|
65 | 79 | | |
---|
66 | 80 | | |
---|