tx · 7AqxHTrjpbx31sV3wREDaHYXswBKCRbXVVsgPWMqjXz6 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves 2021.08.15 12:52 [1659319] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{ "type": 13, "id": "7AqxHTrjpbx31sV3wREDaHYXswBKCRbXVVsgPWMqjXz6", "fee": 1000000, "feeAssetId": null, "timestamp": 1629021124325, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "3DFyh9tQ8SLbmiyxEL7X2fC9vMjr5NR1v6oiWNBqpp9hvfYBDA4EtGZDfF7pp8iY7PBqxk25QJMKTgHMxSHZeFXz" ], "script": "base64:AAIFAAAAAAAAAeEIAhIGCgQYEQIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MTg2OTMaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoJCgJiNRIDaW52Gg0KAmI2Egdyb3V0aW5nGhMKAmI3Eg0kbGlzdDExODExMjE3GhMKAmI4Eg0kc2l6ZTExODExMjE3GhMKAmI5Eg0kYWNjMDExODExMjE3GhMKAmMxEg0kYWNjMTExODExMjE3GhMKAmMyEg0kYWNjMjExODExMjE3GhMKAmMzEg0kYWNjMzExODExMjE3GhMKAmM0Eg0kYWNjNDExODExMjE3GhMKAmM1Eg0kYWNjNTExODExM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AAAAIFAAAAAmI3AAAAAAAAAAABAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAAAgUAAAACYzIEAAAAAmMzCQEAAAACYjEAAAACBQAAAAJjMgkAAZEAAAACBQAAAAJiNwAAAAAAAAAAAgMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAMFAAAAAmMzBAAAAAJjNAkBAAAAAmIxAAAAAgUAAAACYzMJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAMDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAAEBQAAAAJjNAQAAAACYzUJAQAAAAJiMQAAAAIFAAAAAmM0CQABkQAAAAIFAAAAAmI3AAAAAAAAAAAEAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAABQUAAAACYzUEAAAAAmM2CQEAAAACYjEAAAACBQAAAAJjNQkAAZEAAAACBQAAAAJiNwAAAAAAAAAABQkAAAIAAAABAgAAABJMaXN0IHNpemUgZXhjZWVkIDUDCQAAAAAAAAIFAAAAAmI2BQAAAAJhOQQAAAACYzcJAAPwAAAAAgUAAAAEdGhpcwUAAAACYTQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAmExAAAABmNhbGxlcgUAAAACYzcFAAAAAmE0BQAAAANuaWwFAAAAA25pbAAAAADwBlKt", "height": 1659319, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 549rLoUZW7KqvdMf4iayEqUcRiB4L8wEDWJNUe1cwys3 Next: 3Qma41qeDQ4dTtb3mvTmfuSN4tmLYExGQEprt2vGgKz5 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 $t0618693 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
9 | 9 | let pmtAmount = $t0618693._1 | |
10 | 10 | let pmtAssetId = $t0618693._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 | 15 | let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, pmtAmount)]) | |
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 | 23 | let $list11811217 = exchangers | |
24 | 24 | let $size11811217 = size($list11811217) | |
25 | 25 | let $acc011811217 = 0 | |
26 | 26 | if (($size11811217 == 0)) | |
27 | 27 | then $acc011811217 | |
28 | 28 | else { | |
29 | 29 | let $acc111811217 = exchangeFold($acc011811217, $list11811217[0]) | |
30 | 30 | if (($size11811217 == 1)) | |
31 | 31 | then $acc111811217 | |
32 | 32 | else { | |
33 | 33 | let $acc211811217 = exchangeFold($acc111811217, $list11811217[1]) | |
34 | 34 | if (($size11811217 == 2)) | |
35 | 35 | then $acc211811217 | |
36 | 36 | else { | |
37 | 37 | let $acc311811217 = exchangeFold($acc211811217, $list11811217[2]) | |
38 | 38 | if (($size11811217 == 3)) | |
39 | 39 | then $acc311811217 | |
40 | 40 | else { | |
41 | 41 | let $acc411811217 = exchangeFold($acc311811217, $list11811217[3]) | |
42 | 42 | if (($size11811217 == 4)) | |
43 | 43 | then $acc411811217 | |
44 | 44 | else { | |
45 | 45 | let $acc511811217 = exchangeFold($acc411811217, $list11811217[4]) | |
46 | 46 | if (($size11811217 == 5)) | |
47 | 47 | then $acc511811217 | |
48 | 48 | else { | |
49 | 49 | let $acc611811217 = exchangeFold($acc511811217, $list11811217[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) | |
61 | 61 | [ScriptTransfer(i.caller, ammountToRecieve, assetPay)] | |
62 | 62 | } | |
63 | 63 | else nil | |
64 | 64 | } | |
65 | 65 | ||
66 | 66 |
github/deemru/w8io/169f3d6 36.40 ms ◑