tx · 5558uDCnSLXMA7tDemRi3hd1NMzyNzNxVRLV8N9ehtXi
3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves
2021.08.08 18:25 [1649547] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{
"type": 13,
"id": "5558uDCnSLXMA7tDemRi3hd1NMzyNzNxVRLV8N9ehtXi",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1628436397079,
"version": 2,
"chainId": 84,
"sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL",
"senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx",
"proofs": [
"5uvgrN2qQ2414CcygYY82Ghc8GhBMx4xMuKnKWCQSgvbtu2h4XRBGAMSubHBuASXKGn3vocYPweZ6qb14QB6xxdx"
],
"script": "base64:AAIFAAAAAAAAAdYIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoNCgJiNRIHcm91dGluZxoTCgJiNhINJGxpc3QxMjU2MTI5MhoTCgJiNxINJHNpemUxMjU2MTI5MhoTCgJiOBINJGFjYzAxMjU2MTI5MhoTCgJiORINJGFjYzExMjU2MTI5MhoTCgJjMRINJGFjYzIxMjU2MTI5MhoTCgJjMhINJGFjYzMxMjU2MTI5MhoTCgJjMxINJGFjYzQxMjU2MTI5MhoTCgJjNBINJGFjYzUxMjU2MTI5MhoT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YAAAAAAAAAAAMDCQAAAAAAAAIFAAAAAmI3AAAAAAAAAAAEBQAAAAJjMwQAAAACYzQJAQAAAAJiMQAAAAIFAAAAAmMzCQABkQAAAAIFAAAAAmI2AAAAAAAAAAAEAwkAAAAAAAACBQAAAAJiNwAAAAAAAAAABQUAAAACYzQEAAAAAmM1CQEAAAACYjEAAAACBQAAAAJjNAkAAZEAAAACBQAAAAJiNgAAAAAAAAAABQkAAAIAAAABAgAAABJMaXN0IHNpemUgZXhjZWVkIDUDCQAAAAAAAAIFAAAAAmI1BQAAAAJhOQQAAAACYzYJAAPwAAAAAgUAAAAEdGhpcwkAAZEAAAACBQAAAAJhNAkAAGUAAAACBQAAAAJhOQAAAAAAAAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAACYTEAAAAGY2FsbGVyBQAAAAJjNgkAAZEAAAACBQAAAAJhNAkAAGUAAAACBQAAAAJhOQAAAAAAAAAAAQUAAAADbmlsBQAAAANuaWwAAAAA1UNdYQ==",
"height": 1649547,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 5m2j4DtUzd7CnkYncT4jzLbPQsUuyawKEo4AHFNqH8Tp
Next: 7Uu3Mxv2sBHuWMnNjR6ZKqnmXT8nyCmoXEmckk6YTeMC
Diff:
Old | New | | Differences |
---|
10 | 10 | | let pmtAssetId = $t0624699._2 |
---|
11 | 11 | | let routingSize = size(exchangers) |
---|
12 | 12 | | func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated)) |
---|
13 | | - | then (accumulated + 1) |
---|
| 13 | + | then { |
---|
| 14 | + | let exchangerAddress = addressFromStringValue(exchanger) |
---|
| 15 | + | if (true) |
---|
| 16 | + | then throw(toString(exchangerAddress)) |
---|
| 17 | + | else (accumulated + 1) |
---|
| 18 | + | } |
---|
14 | 19 | | else accumulated |
---|
15 | 20 | | |
---|
16 | 21 | | let routing = { |
---|
17 | | - | let $list12421278 = exchangers |
---|
18 | | - | let $size12421278 = size($list12421278) |
---|
19 | | - | let $acc012421278 = 0 |
---|
20 | | - | if (($size12421278 == 0)) |
---|
21 | | - | then $acc012421278 |
---|
| 22 | + | let $list12561292 = exchangers |
---|
| 23 | + | let $size12561292 = size($list12561292) |
---|
| 24 | + | let $acc012561292 = 0 |
---|
| 25 | + | if (($size12561292 == 0)) |
---|
| 26 | + | then $acc012561292 |
---|
22 | 27 | | else { |
---|
23 | | - | let $acc112421278 = exchangeFold($acc012421278, $list12421278[0]) |
---|
24 | | - | if (($size12421278 == 1)) |
---|
25 | | - | then $acc112421278 |
---|
| 28 | + | let $acc112561292 = exchangeFold($acc012561292, $list12561292[0]) |
---|
| 29 | + | if (($size12561292 == 1)) |
---|
| 30 | + | then $acc112561292 |
---|
26 | 31 | | else { |
---|
27 | | - | let $acc212421278 = exchangeFold($acc112421278, $list12421278[1]) |
---|
28 | | - | if (($size12421278 == 2)) |
---|
29 | | - | then $acc212421278 |
---|
| 32 | + | let $acc212561292 = exchangeFold($acc112561292, $list12561292[1]) |
---|
| 33 | + | if (($size12561292 == 2)) |
---|
| 34 | + | then $acc212561292 |
---|
30 | 35 | | else { |
---|
31 | | - | let $acc312421278 = exchangeFold($acc212421278, $list12421278[2]) |
---|
32 | | - | if (($size12421278 == 3)) |
---|
33 | | - | then $acc312421278 |
---|
| 36 | + | let $acc312561292 = exchangeFold($acc212561292, $list12561292[2]) |
---|
| 37 | + | if (($size12561292 == 3)) |
---|
| 38 | + | then $acc312561292 |
---|
34 | 39 | | else { |
---|
35 | | - | let $acc412421278 = exchangeFold($acc312421278, $list12421278[3]) |
---|
36 | | - | if (($size12421278 == 4)) |
---|
37 | | - | then $acc412421278 |
---|
| 40 | + | let $acc412561292 = exchangeFold($acc312561292, $list12561292[3]) |
---|
| 41 | + | if (($size12561292 == 4)) |
---|
| 42 | + | then $acc412561292 |
---|
38 | 43 | | else { |
---|
39 | | - | let $acc512421278 = exchangeFold($acc412421278, $list12421278[4]) |
---|
40 | | - | if (($size12421278 == 5)) |
---|
41 | | - | then $acc512421278 |
---|
| 44 | + | let $acc512561292 = exchangeFold($acc412561292, $list12561292[4]) |
---|
| 45 | + | if (($size12561292 == 5)) |
---|
| 46 | + | then $acc512561292 |
---|
42 | 47 | | else { |
---|
43 | | - | let $acc612421278 = exchangeFold($acc512421278, $list12421278[5]) |
---|
| 48 | + | let $acc612561292 = exchangeFold($acc512561292, $list12561292[5]) |
---|
44 | 49 | | throw("List size exceed 5") |
---|
45 | 50 | | } |
---|
46 | 51 | | } |
---|
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(i) |
---|
7 | 7 | | func routingTrade (exchangers,args,assetPay,minAmountToReceive) = { |
---|
8 | 8 | | let $t0624699 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) |
---|
9 | 9 | | let pmtAmount = $t0624699._1 |
---|
10 | 10 | | let pmtAssetId = $t0624699._2 |
---|
11 | 11 | | let routingSize = size(exchangers) |
---|
12 | 12 | | func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated)) |
---|
13 | | - | then (accumulated + 1) |
---|
| 13 | + | then { |
---|
| 14 | + | let exchangerAddress = addressFromStringValue(exchanger) |
---|
| 15 | + | if (true) |
---|
| 16 | + | then throw(toString(exchangerAddress)) |
---|
| 17 | + | else (accumulated + 1) |
---|
| 18 | + | } |
---|
14 | 19 | | else accumulated |
---|
15 | 20 | | |
---|
16 | 21 | | let routing = { |
---|
17 | | - | let $list12421278 = exchangers |
---|
18 | | - | let $size12421278 = size($list12421278) |
---|
19 | | - | let $acc012421278 = 0 |
---|
20 | | - | if (($size12421278 == 0)) |
---|
21 | | - | then $acc012421278 |
---|
| 22 | + | let $list12561292 = exchangers |
---|
| 23 | + | let $size12561292 = size($list12561292) |
---|
| 24 | + | let $acc012561292 = 0 |
---|
| 25 | + | if (($size12561292 == 0)) |
---|
| 26 | + | then $acc012561292 |
---|
22 | 27 | | else { |
---|
23 | | - | let $acc112421278 = exchangeFold($acc012421278, $list12421278[0]) |
---|
24 | | - | if (($size12421278 == 1)) |
---|
25 | | - | then $acc112421278 |
---|
| 28 | + | let $acc112561292 = exchangeFold($acc012561292, $list12561292[0]) |
---|
| 29 | + | if (($size12561292 == 1)) |
---|
| 30 | + | then $acc112561292 |
---|
26 | 31 | | else { |
---|
27 | | - | let $acc212421278 = exchangeFold($acc112421278, $list12421278[1]) |
---|
28 | | - | if (($size12421278 == 2)) |
---|
29 | | - | then $acc212421278 |
---|
| 32 | + | let $acc212561292 = exchangeFold($acc112561292, $list12561292[1]) |
---|
| 33 | + | if (($size12561292 == 2)) |
---|
| 34 | + | then $acc212561292 |
---|
30 | 35 | | else { |
---|
31 | | - | let $acc312421278 = exchangeFold($acc212421278, $list12421278[2]) |
---|
32 | | - | if (($size12421278 == 3)) |
---|
33 | | - | then $acc312421278 |
---|
| 36 | + | let $acc312561292 = exchangeFold($acc212561292, $list12561292[2]) |
---|
| 37 | + | if (($size12561292 == 3)) |
---|
| 38 | + | then $acc312561292 |
---|
34 | 39 | | else { |
---|
35 | | - | let $acc412421278 = exchangeFold($acc312421278, $list12421278[3]) |
---|
36 | | - | if (($size12421278 == 4)) |
---|
37 | | - | then $acc412421278 |
---|
| 40 | + | let $acc412561292 = exchangeFold($acc312561292, $list12561292[3]) |
---|
| 41 | + | if (($size12561292 == 4)) |
---|
| 42 | + | then $acc412561292 |
---|
38 | 43 | | else { |
---|
39 | | - | let $acc512421278 = exchangeFold($acc412421278, $list12421278[4]) |
---|
40 | | - | if (($size12421278 == 5)) |
---|
41 | | - | then $acc512421278 |
---|
| 44 | + | let $acc512561292 = exchangeFold($acc412561292, $list12561292[4]) |
---|
| 45 | + | if (($size12561292 == 5)) |
---|
| 46 | + | then $acc512561292 |
---|
42 | 47 | | else { |
---|
43 | | - | let $acc612421278 = exchangeFold($acc512421278, $list12421278[5]) |
---|
| 48 | + | let $acc612561292 = exchangeFold($acc512561292, $list12561292[5]) |
---|
44 | 49 | | throw("List size exceed 5") |
---|
45 | 50 | | } |
---|
46 | 51 | | } |
---|
47 | 52 | | } |
---|
48 | 53 | | } |
---|
49 | 54 | | } |
---|
50 | 55 | | } |
---|
51 | 56 | | } |
---|
52 | 57 | | if ((routing == routingSize)) |
---|
53 | 58 | | then { |
---|
54 | 59 | | let ammountToRecieve = assetBalance(this, assetPay[(routingSize - 1)]) |
---|
55 | 60 | | [ScriptTransfer(i.caller, ammountToRecieve, assetPay[(routingSize - 1)])] |
---|
56 | 61 | | } |
---|
57 | 62 | | else nil |
---|
58 | 63 | | } |
---|
59 | 64 | | |
---|
60 | 65 | | |
---|