tx · FPoomKQthZ4FrBQ9RTjyZLHoEMsyjE3vf85dGwxSod2T 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL: -0.01000000 Waves 2021.08.08 19:13 [1649591] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves
{ "type": 13, "id": "FPoomKQthZ4FrBQ9RTjyZLHoEMsyjE3vf85dGwxSod2T", "fee": 1000000, "feeAssetId": null, "timestamp": 1628439243602, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "3r9REe9raFw49pSa4zDZZJLp7Fatk3LsGp8zPJnS4DxuerssWQ8Zu4KYptHyUpCS1oQnmcoCjuxshK3mb1xNMgn5" ], "script": "base64:AAIFAAAAAAAAAeEIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoJCgJiNRIDaW52Gg0KAmI2Egdyb3V0aW5nGhMKAmI3Eg0kbGlzdDEzNTAxMzg2GhMKAmI4Eg0kc2l6ZTEzNTAxMzg2GhMKAmI5Eg0kYWNjMDEzNTAxMzg2GhMKAmMxEg0kYWNjMTEzNTAxMzg2GhMKAmMyEg0kYWNjMjEzNTAxMzg2GhMKAmMzEg0kYWNjMzEzNTAxMzg2GhMKAmM0Eg0kYWNjNDEzNTAxMzg2GhMKAm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AAmIxAAAAAgUAAAACYzEJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAEDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAACBQAAAAJjMgQAAAACYzMJAQAAAAJiMQAAAAIFAAAAAmMyCQABkQAAAAIFAAAAAmI3AAAAAAAAAAACAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAAAwUAAAACYzMEAAAAAmM0CQEAAAACYjEAAAACBQAAAAJjMwkAAZEAAAACBQAAAAJiNwAAAAAAAAAAAwMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAQFAAAAAmM0BAAAAAJjNQkBAAAAAmIxAAAAAgUAAAACYzQJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAQDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAAFBQAAAAJjNQQAAAACYzYJAQAAAAJiMQAAAAIFAAAAAmM1CQABkQAAAAIFAAAAAmI3AAAAAAAAAAAFCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgNQMJAAAAAAAAAgUAAAACYjYFAAAAAmE5BAAAAAJjNwkAA/AAAAACBQAAAAR0aGlzCQABkQAAAAIFAAAAAmE0CQAAZQAAAAIFAAAAAmE5AAAAAAAAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAJhMQAAAAZjYWxsZXIFAAAAAmM3CQABkQAAAAIFAAAAAmE0CQAAZQAAAAIFAAAAAmE5AAAAAAAAAAABBQAAAANuaWwFAAAAA25pbAAAAADjAYyg", "height": 1649591, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3D6ufQynibbSjWGQYR1pM8LF9QgxuyKLo1KchkJCg4wa Next: 8tWbeEMrCCxGniHLsHaqaoDkhyaZukJfmeVjuMfxjyTD 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 | 15 | let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, 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 | 23 | let $list13501386 = exchangers | |
24 | 24 | let $size13501386 = size($list13501386) | |
25 | 25 | let $acc013501386 = 0 | |
26 | 26 | if (($size13501386 == 0)) | |
27 | 27 | then $acc013501386 | |
28 | 28 | else { | |
29 | 29 | let $acc113501386 = exchangeFold($acc013501386, $list13501386[0]) | |
30 | 30 | if (($size13501386 == 1)) | |
31 | 31 | then $acc113501386 | |
32 | 32 | else { | |
33 | 33 | let $acc213501386 = exchangeFold($acc113501386, $list13501386[1]) | |
34 | 34 | if (($size13501386 == 2)) | |
35 | 35 | then $acc213501386 | |
36 | 36 | else { | |
37 | 37 | let $acc313501386 = exchangeFold($acc213501386, $list13501386[2]) | |
38 | 38 | if (($size13501386 == 3)) | |
39 | 39 | then $acc313501386 | |
40 | 40 | else { | |
41 | 41 | let $acc413501386 = exchangeFold($acc313501386, $list13501386[3]) | |
42 | 42 | if (($size13501386 == 4)) | |
43 | 43 | then $acc413501386 | |
44 | 44 | else { | |
45 | 45 | let $acc513501386 = exchangeFold($acc413501386, $list13501386[4]) | |
46 | 46 | if (($size13501386 == 5)) | |
47 | 47 | then $acc513501386 | |
48 | 48 | else { | |
49 | 49 | let $acc613501386 = exchangeFold($acc513501386, $list13501386[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 |
github/deemru/w8io/026f985 19.71 ms ◑