tx · 5m2j4DtUzd7CnkYncT4jzLbPQsUuyawKEo4AHFNqH8Tp

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.08 17:55 [1649517] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "5m2j4DtUzd7CnkYncT4jzLbPQsUuyawKEo4AHFNqH8Tp", "fee": 1000000, "feeAssetId": null, "timestamp": 1628434552491, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "4x43N7Kjb2ZY2ZPpfqKveqbjeJcsmYuqeyhJstn8sptVkY6b8xgLkxCd19YiLDtNFyQnnSMYBkNBqZLHLRq2o98H" ], "script": "base64:AAIFAAAAAAAAAb4IAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoNCgJiNBIHcm91dGluZxoTCgJiNRINJGxpc3QxMjQyMTI3OBoTCgJiNhINJHNpemUxMjQyMTI3OBoTCgJiNxINJGFjYzAxMjQyMTI3OBoTCgJiOBINJGFjYzExMjQyMTI3OBoTCgJiORINJGFjYzIxMjQyMTI3OBoTCgJjMRINJGFjYzMxMjQyMTI3OBoTCgJjMhINJGFjYzQxMjQyMTI3OBoTCgJjMxINJGFjYzUxMjQyMTI3OBoTCgJjNBINJGFjYzYxMjQyMTI3OBoWCgJjNRIQ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EAwkAAAAAAAACBQAAAAJiNgAAAAAAAAAABQUAAAACYzMEAAAAAmM0CQEAAAACYjEAAAACBQAAAAJjMwkAAZEAAAACBQAAAAJiNQAAAAAAAAAABQkAAAIAAAABAgAAABJMaXN0IHNpemUgZXhjZWVkIDUDCQAAAAAAAAIFAAAAAmI0BQAAAAJhOQQAAAACYzUJAAPwAAAAAgUAAAAEdGhpcwkAAZEAAAACBQAAAAJhNAkAAGUAAAACBQAAAAJhOQAAAAAAAAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAACYTEAAAAGY2FsbGVyBQAAAAJjNQkAAZEAAAACBQAAAAJhNAkAAGUAAAACBQAAAAJhOQAAAAAAAAAAAQUAAAADbmlsBQAAAANuaWwAAAAAWcNAsg==", "height": 1649517, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9qfZffjHD5FhBymKMF7B1z4QBE3YqBPTD8G7G4goTiL9 Next: 5558uDCnSLXMA7tDemRi3hd1NMzyNzNxVRLV8N9ehtXi Diff:
OldNewDifferences
1010 let pmtAssetId = $t0624699._2
1111 let routingSize = size(exchangers)
1212 func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated))
13- then {
14- let exchangerAddress = addressFromStringValue(exchanger)
15- let inv = invoke(exchangerAddress, "exchange", [1], [AttachedPayment(pmtAssetId, pmtAmount)])
16- if ((inv == inv))
17- then (accumulated + 1)
18- else throw("Strict value is not equal to itself.")
19- }
13+ then (accumulated + 1)
2014 else accumulated
2115
2216 let routing = {
23- let $list12221258 = exchangers
24- let $size12221258 = size($list12221258)
25- let $acc012221258 = 0
26- if (($size12221258 == 0))
27- then $acc012221258
17+ let $list12421278 = exchangers
18+ let $size12421278 = size($list12421278)
19+ let $acc012421278 = 0
20+ if (($size12421278 == 0))
21+ then $acc012421278
2822 else {
29- let $acc112221258 = exchangeFold($acc012221258, $list12221258[0])
30- if (($size12221258 == 1))
31- then $acc112221258
23+ let $acc112421278 = exchangeFold($acc012421278, $list12421278[0])
24+ if (($size12421278 == 1))
25+ then $acc112421278
3226 else {
33- let $acc212221258 = exchangeFold($acc112221258, $list12221258[1])
34- if (($size12221258 == 2))
35- then $acc212221258
27+ let $acc212421278 = exchangeFold($acc112421278, $list12421278[1])
28+ if (($size12421278 == 2))
29+ then $acc212421278
3630 else {
37- let $acc312221258 = exchangeFold($acc212221258, $list12221258[2])
38- if (($size12221258 == 3))
39- then $acc312221258
31+ let $acc312421278 = exchangeFold($acc212421278, $list12421278[2])
32+ if (($size12421278 == 3))
33+ then $acc312421278
4034 else {
41- let $acc412221258 = exchangeFold($acc312221258, $list12221258[3])
42- if (($size12221258 == 4))
43- then $acc412221258
35+ let $acc412421278 = exchangeFold($acc312421278, $list12421278[3])
36+ if (($size12421278 == 4))
37+ then $acc412421278
4438 else {
45- let $acc512221258 = exchangeFold($acc412221258, $list12221258[4])
46- if (($size12221258 == 5))
47- then $acc512221258
39+ let $acc512421278 = exchangeFold($acc412421278, $list12421278[4])
40+ if (($size12421278 == 5))
41+ then $acc512421278
4842 else {
49- let $acc612221258 = exchangeFold($acc512221258, $list12221258[5])
43+ let $acc612421278 = exchangeFold($acc512421278, $list12421278[5])
5044 throw("List size exceed 5")
5145 }
5246 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func routingTrade (exchangers,args,assetPay,minAmountToReceive) = {
88 let $t0624699 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
99 let pmtAmount = $t0624699._1
1010 let pmtAssetId = $t0624699._2
1111 let routingSize = size(exchangers)
1212 func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated))
13- then {
14- let exchangerAddress = addressFromStringValue(exchanger)
15- let inv = invoke(exchangerAddress, "exchange", [1], [AttachedPayment(pmtAssetId, pmtAmount)])
16- if ((inv == inv))
17- then (accumulated + 1)
18- else throw("Strict value is not equal to itself.")
19- }
13+ then (accumulated + 1)
2014 else accumulated
2115
2216 let routing = {
23- let $list12221258 = exchangers
24- let $size12221258 = size($list12221258)
25- let $acc012221258 = 0
26- if (($size12221258 == 0))
27- then $acc012221258
17+ let $list12421278 = exchangers
18+ let $size12421278 = size($list12421278)
19+ let $acc012421278 = 0
20+ if (($size12421278 == 0))
21+ then $acc012421278
2822 else {
29- let $acc112221258 = exchangeFold($acc012221258, $list12221258[0])
30- if (($size12221258 == 1))
31- then $acc112221258
23+ let $acc112421278 = exchangeFold($acc012421278, $list12421278[0])
24+ if (($size12421278 == 1))
25+ then $acc112421278
3226 else {
33- let $acc212221258 = exchangeFold($acc112221258, $list12221258[1])
34- if (($size12221258 == 2))
35- then $acc212221258
27+ let $acc212421278 = exchangeFold($acc112421278, $list12421278[1])
28+ if (($size12421278 == 2))
29+ then $acc212421278
3630 else {
37- let $acc312221258 = exchangeFold($acc212221258, $list12221258[2])
38- if (($size12221258 == 3))
39- then $acc312221258
31+ let $acc312421278 = exchangeFold($acc212421278, $list12421278[2])
32+ if (($size12421278 == 3))
33+ then $acc312421278
4034 else {
41- let $acc412221258 = exchangeFold($acc312221258, $list12221258[3])
42- if (($size12221258 == 4))
43- then $acc412221258
35+ let $acc412421278 = exchangeFold($acc312421278, $list12421278[3])
36+ if (($size12421278 == 4))
37+ then $acc412421278
4438 else {
45- let $acc512221258 = exchangeFold($acc412221258, $list12221258[4])
46- if (($size12221258 == 5))
47- then $acc512221258
39+ let $acc512421278 = exchangeFold($acc412421278, $list12421278[4])
40+ if (($size12421278 == 5))
41+ then $acc512421278
4842 else {
49- let $acc612221258 = exchangeFold($acc512221258, $list12221258[5])
43+ let $acc612421278 = exchangeFold($acc512421278, $list12421278[5])
5044 throw("List size exceed 5")
5145 }
5246 }
5347 }
5448 }
5549 }
5650 }
5751 }
5852 if ((routing == routingSize))
5953 then {
6054 let ammountToRecieve = assetBalance(this, assetPay[(routingSize - 1)])
6155 [ScriptTransfer(i.caller, ammountToRecieve, assetPay[(routingSize - 1)])]
6256 }
6357 else nil
6458 }
6559
6660

github/deemru/w8io/026f985 
30.82 ms