tx · 3H375oMMa9BAKpJ2fSsprnENPSecmLAiNnwCw1C5bWKh
3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves
2021.08.08 18:34 [1649555] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{
"type": 13,
"id": "3H375oMMa9BAKpJ2fSsprnENPSecmLAiNnwCw1C5bWKh",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1628436864558,
"version": 2,
"chainId": 84,
"sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL",
"senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx",
"proofs": [
"Ggu4L48nS2gf4jZ5dadMsyd8nqv1hZSs3PnMbukeraDpu2m7V2g1NcuaaVSTonSWqHcsgtfYjm9m8LYJNjVsYH2"
],
"script": "base64:AAIFAAAAAAAAAeEIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoJCgJiNRIDaW52Gg0KAmI2Egdyb3V0aW5nGhMKAmI3Eg0kbGlzdDEyOTUxMzMxGhMKAmI4Eg0kc2l6ZTEyOTUxMzMxGhMKAmI5Eg0kYWNjMDEyOTUxMzMxGhMKAmMxEg0kYWNjMTEyOTUxMzMxGhMKAmMyEg0kYWNjMjEyOTUxMzMxGhMKAmMzEg0kYWNjMzEyOTUxMzMxGhMKAmM0Eg0kYWNjNDEyOTUxMz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UAAAACYjgAAAAAAAAAAAEFAAAAAmMxBAAAAAJjMgkBAAAAAmIxAAAAAgUAAAACYzEJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAEDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAACBQAAAAJjMgQAAAACYzMJAQAAAAJiMQAAAAIFAAAAAmMyCQABkQAAAAIFAAAAAmI3AAAAAAAAAAACAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAAAwUAAAACYzMEAAAAAmM0CQEAAAACYjEAAAACBQAAAAJjMwkAAZEAAAACBQAAAAJiNwAAAAAAAAAAAwMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAQFAAAAAmM0BAAAAAJjNQkBAAAAAmIxAAAAAgUAAAACYzQJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAQDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAAFBQAAAAJjNQQAAAACYzYJAQAAAAJiMQAAAAIFAAAAAmM1CQABkQAAAAIFAAAAAmI3AAAAAAAAAAAFCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgNQMJAAAAAAAAAgUAAAACYjYFAAAAAmE5BAAAAAJjNwkAA/AAAAACBQAAAAR0aGlzCQABkQAAAAIFAAAAAmE0CQAAZQAAAAIFAAAAAmE5AAAAAAAAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAJhMQAAAAZjYWxsZXIFAAAAAmM3CQABkQAAAAIFAAAAAmE0CQAAZQAAAAIFAAAAAmE5AAAAAAAAAAABBQAAAANuaWwFAAAAA25pbAAAAADHQEge",
"height": 1649555,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 2PZs79kRQPq5FzNtpCiemAsUbq6HX2mG7QtZWKZRdg2J
Next: 85Ny3KU26QGRmnp1xv13irXXBxvhTAdmA9wUGQMByRmG
Diff:
Old | New | | Differences |
---|
12 | 12 | | func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated)) |
---|
13 | 13 | | then { |
---|
14 | 14 | | let exchangerAddress = addressFromStringValue(exchanger) |
---|
15 | | - | let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(base58'Zq2voms8GifXDmRFEboVJPZatB25KWkCdPQchwVu1nk', 10)]) |
---|
| 15 | + | let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(base58'Zq2voms8GifXDmRFEboVJPZatB25KWkCdPQchwVu1nk', 100000)]) |
---|
16 | 16 | | if ((inv == inv)) |
---|
17 | 17 | | then (accumulated + 1) |
---|
18 | 18 | | else throw("Strict value is not equal to itself.") |
---|
|
20 | 20 | | else accumulated |
---|
21 | 21 | | |
---|
22 | 22 | | let routing = { |
---|
23 | | - | let $list12911327 = exchangers |
---|
24 | | - | let $size12911327 = size($list12911327) |
---|
25 | | - | let $acc012911327 = 0 |
---|
26 | | - | if (($size12911327 == 0)) |
---|
27 | | - | then $acc012911327 |
---|
| 23 | + | let $list12951331 = exchangers |
---|
| 24 | + | let $size12951331 = size($list12951331) |
---|
| 25 | + | let $acc012951331 = 0 |
---|
| 26 | + | if (($size12951331 == 0)) |
---|
| 27 | + | then $acc012951331 |
---|
28 | 28 | | else { |
---|
29 | | - | let $acc112911327 = exchangeFold($acc012911327, $list12911327[0]) |
---|
30 | | - | if (($size12911327 == 1)) |
---|
31 | | - | then $acc112911327 |
---|
| 29 | + | let $acc112951331 = exchangeFold($acc012951331, $list12951331[0]) |
---|
| 30 | + | if (($size12951331 == 1)) |
---|
| 31 | + | then $acc112951331 |
---|
32 | 32 | | else { |
---|
33 | | - | let $acc212911327 = exchangeFold($acc112911327, $list12911327[1]) |
---|
34 | | - | if (($size12911327 == 2)) |
---|
35 | | - | then $acc212911327 |
---|
| 33 | + | let $acc212951331 = exchangeFold($acc112951331, $list12951331[1]) |
---|
| 34 | + | if (($size12951331 == 2)) |
---|
| 35 | + | then $acc212951331 |
---|
36 | 36 | | else { |
---|
37 | | - | let $acc312911327 = exchangeFold($acc212911327, $list12911327[2]) |
---|
38 | | - | if (($size12911327 == 3)) |
---|
39 | | - | then $acc312911327 |
---|
| 37 | + | let $acc312951331 = exchangeFold($acc212951331, $list12951331[2]) |
---|
| 38 | + | if (($size12951331 == 3)) |
---|
| 39 | + | then $acc312951331 |
---|
40 | 40 | | else { |
---|
41 | | - | let $acc412911327 = exchangeFold($acc312911327, $list12911327[3]) |
---|
42 | | - | if (($size12911327 == 4)) |
---|
43 | | - | then $acc412911327 |
---|
| 41 | + | let $acc412951331 = exchangeFold($acc312951331, $list12951331[3]) |
---|
| 42 | + | if (($size12951331 == 4)) |
---|
| 43 | + | then $acc412951331 |
---|
44 | 44 | | else { |
---|
45 | | - | let $acc512911327 = exchangeFold($acc412911327, $list12911327[4]) |
---|
46 | | - | if (($size12911327 == 5)) |
---|
47 | | - | then $acc512911327 |
---|
| 45 | + | let $acc512951331 = exchangeFold($acc412951331, $list12951331[4]) |
---|
| 46 | + | if (($size12951331 == 5)) |
---|
| 47 | + | then $acc512951331 |
---|
48 | 48 | | else { |
---|
49 | | - | let $acc612911327 = exchangeFold($acc512911327, $list12911327[5]) |
---|
| 49 | + | let $acc612951331 = exchangeFold($acc512951331, $list12951331[5]) |
---|
50 | 50 | | throw("List size exceed 5") |
---|
51 | 51 | | } |
---|
52 | 52 | | } |
---|
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 | 13 | | then { |
---|
14 | 14 | | let exchangerAddress = addressFromStringValue(exchanger) |
---|
15 | | - | let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(base58'Zq2voms8GifXDmRFEboVJPZatB25KWkCdPQchwVu1nk', 10)]) |
---|
| 15 | + | let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(base58'Zq2voms8GifXDmRFEboVJPZatB25KWkCdPQchwVu1nk', 100000)]) |
---|
16 | 16 | | if ((inv == inv)) |
---|
17 | 17 | | then (accumulated + 1) |
---|
18 | 18 | | else throw("Strict value is not equal to itself.") |
---|
19 | 19 | | } |
---|
20 | 20 | | else accumulated |
---|
21 | 21 | | |
---|
22 | 22 | | let routing = { |
---|
23 | | - | let $list12911327 = exchangers |
---|
24 | | - | let $size12911327 = size($list12911327) |
---|
25 | | - | let $acc012911327 = 0 |
---|
26 | | - | if (($size12911327 == 0)) |
---|
27 | | - | then $acc012911327 |
---|
| 23 | + | let $list12951331 = exchangers |
---|
| 24 | + | let $size12951331 = size($list12951331) |
---|
| 25 | + | let $acc012951331 = 0 |
---|
| 26 | + | if (($size12951331 == 0)) |
---|
| 27 | + | then $acc012951331 |
---|
28 | 28 | | else { |
---|
29 | | - | let $acc112911327 = exchangeFold($acc012911327, $list12911327[0]) |
---|
30 | | - | if (($size12911327 == 1)) |
---|
31 | | - | then $acc112911327 |
---|
| 29 | + | let $acc112951331 = exchangeFold($acc012951331, $list12951331[0]) |
---|
| 30 | + | if (($size12951331 == 1)) |
---|
| 31 | + | then $acc112951331 |
---|
32 | 32 | | else { |
---|
33 | | - | let $acc212911327 = exchangeFold($acc112911327, $list12911327[1]) |
---|
34 | | - | if (($size12911327 == 2)) |
---|
35 | | - | then $acc212911327 |
---|
| 33 | + | let $acc212951331 = exchangeFold($acc112951331, $list12951331[1]) |
---|
| 34 | + | if (($size12951331 == 2)) |
---|
| 35 | + | then $acc212951331 |
---|
36 | 36 | | else { |
---|
37 | | - | let $acc312911327 = exchangeFold($acc212911327, $list12911327[2]) |
---|
38 | | - | if (($size12911327 == 3)) |
---|
39 | | - | then $acc312911327 |
---|
| 37 | + | let $acc312951331 = exchangeFold($acc212951331, $list12951331[2]) |
---|
| 38 | + | if (($size12951331 == 3)) |
---|
| 39 | + | then $acc312951331 |
---|
40 | 40 | | else { |
---|
41 | | - | let $acc412911327 = exchangeFold($acc312911327, $list12911327[3]) |
---|
42 | | - | if (($size12911327 == 4)) |
---|
43 | | - | then $acc412911327 |
---|
| 41 | + | let $acc412951331 = exchangeFold($acc312951331, $list12951331[3]) |
---|
| 42 | + | if (($size12951331 == 4)) |
---|
| 43 | + | then $acc412951331 |
---|
44 | 44 | | else { |
---|
45 | | - | let $acc512911327 = exchangeFold($acc412911327, $list12911327[4]) |
---|
46 | | - | if (($size12911327 == 5)) |
---|
47 | | - | then $acc512911327 |
---|
| 45 | + | let $acc512951331 = exchangeFold($acc412951331, $list12951331[4]) |
---|
| 46 | + | if (($size12951331 == 5)) |
---|
| 47 | + | then $acc512951331 |
---|
48 | 48 | | else { |
---|
49 | | - | let $acc612911327 = exchangeFold($acc512911327, $list12911327[5]) |
---|
| 49 | + | let $acc612951331 = exchangeFold($acc512951331, $list12951331[5]) |
---|
50 | 50 | | throw("List size exceed 5") |
---|
51 | 51 | | } |
---|
52 | 52 | | } |
---|
53 | 53 | | } |
---|
54 | 54 | | } |
---|
55 | 55 | | } |
---|
56 | 56 | | } |
---|
57 | 57 | | } |
---|
58 | 58 | | if ((routing == routingSize)) |
---|
59 | 59 | | then { |
---|
60 | 60 | | let ammountToRecieve = assetBalance(this, assetPay[(routingSize - 1)]) |
---|
61 | 61 | | [ScriptTransfer(i.caller, ammountToRecieve, assetPay[(routingSize - 1)])] |
---|
62 | 62 | | } |
---|
63 | 63 | | else nil |
---|
64 | 64 | | } |
---|
65 | 65 | | |
---|
66 | 66 | | |
---|