tx · 5pGjXFkyxGep1K38YdPhbKvjEhUDAdXR9fsdUUPwg2hz

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.08 18:47 [1649570] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "5pGjXFkyxGep1K38YdPhbKvjEhUDAdXR9fsdUUPwg2hz", "fee": 1000000, "feeAssetId": null, "timestamp": 1628437645193, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "2x9VzGnr2RrQqWyzcn8Zku2EH5jkywUThmKTyJAsqNkRr5aJYsYbtfJczqivtBt9WcjezJ1eFevuCvnUxQhfbAFh" ], "script": "base64:AAIFAAAAAAAAAeEIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoJCgJiNRIDaW52Gg0KAmI2Egdyb3V0aW5nGhMKAmI3Eg0kbGlzdDEyNDcxMjgzGhMKAmI4Eg0kc2l6ZTEyNDcxMjgzGhMKAmI5Eg0kYWNjMDEyNDcxMjgzGhMKAmMxEg0kYWNjMTEyNDcxMjgzGhMKAmMyEg0kYWNjMjEyNDcxMjgzGhMKAmMzEg0kYWNjMzEyNDcxMjgzGhMKAmM0Eg0kYWNjNDEyNDcxMjgzGhMK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QEAAAACYjEAAAACBQAAAAJjMQkAAZEAAAACBQAAAAJiNwAAAAAAAAAAAQMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAIFAAAAAmMyBAAAAAJjMwkBAAAAAmIxAAAAAgUAAAACYzIJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAIDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAADBQAAAAJjMwQAAAACYzQJAQAAAAJiMQAAAAIFAAAAAmMzCQABkQAAAAIFAAAAAmI3AAAAAAAAAAADAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAABAUAAAACYzQEAAAAAmM1CQEAAAACYjEAAAACBQAAAAJjNAkAAZEAAAACBQAAAAJiNwAAAAAAAAAABAMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAUFAAAAAmM1BAAAAAJjNgkBAAAAAmIxAAAAAgUAAAACYzUJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAUJAAACAAAAAQIAAAASTGlzdCBzaXplIGV4Y2VlZCA1AwkAAAAAAAACBQAAAAJiNgUAAAACYTkEAAAAAmM3CQAD8AAAAAIFAAAABHRoaXMJAAGRAAAAAgUAAAACYTQJAABlAAAAAgUAAAACYTkAAAAAAAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAmExAAAABmNhbGxlcgUAAAACYzcJAAGRAAAAAgUAAAACYTQJAABlAAAAAgUAAAACYTkAAAAAAAAAAAEFAAAAA25pbAUAAAADbmlsAAAAAF4srVg=", "height": 1649570, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2LrwAquKhX25BAf2g2GnxJ4V62K3dYta23wQrD8BBM1m Next: 9HbGXYy6qCuQohGBSwGiCJnLMwTkEp1trcLNwoTWcsnz Diff:
OldNewDifferences
1212 func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated))
1313 then {
1414 let exchangerAddress = addressFromStringValue(exchanger)
15- let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(base58'Zq2voms8GifXDmRFEboVJPZatB25KWkCdPQchwVu1nk', 100000)])
15+ let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(unit, 100000)])
1616 if ((inv == inv))
1717 then (accumulated + 1)
1818 else throw("Strict value is not equal to itself.")
2020 else accumulated
2121
2222 let routing = {
23- let $list12951331 = exchangers
24- let $size12951331 = size($list12951331)
25- let $acc012951331 = 0
26- if (($size12951331 == 0))
27- then $acc012951331
23+ let $list12471283 = exchangers
24+ let $size12471283 = size($list12471283)
25+ let $acc012471283 = 0
26+ if (($size12471283 == 0))
27+ then $acc012471283
2828 else {
29- let $acc112951331 = exchangeFold($acc012951331, $list12951331[0])
30- if (($size12951331 == 1))
31- then $acc112951331
29+ let $acc112471283 = exchangeFold($acc012471283, $list12471283[0])
30+ if (($size12471283 == 1))
31+ then $acc112471283
3232 else {
33- let $acc212951331 = exchangeFold($acc112951331, $list12951331[1])
34- if (($size12951331 == 2))
35- then $acc212951331
33+ let $acc212471283 = exchangeFold($acc112471283, $list12471283[1])
34+ if (($size12471283 == 2))
35+ then $acc212471283
3636 else {
37- let $acc312951331 = exchangeFold($acc212951331, $list12951331[2])
38- if (($size12951331 == 3))
39- then $acc312951331
37+ let $acc312471283 = exchangeFold($acc212471283, $list12471283[2])
38+ if (($size12471283 == 3))
39+ then $acc312471283
4040 else {
41- let $acc412951331 = exchangeFold($acc312951331, $list12951331[3])
42- if (($size12951331 == 4))
43- then $acc412951331
41+ let $acc412471283 = exchangeFold($acc312471283, $list12471283[3])
42+ if (($size12471283 == 4))
43+ then $acc412471283
4444 else {
45- let $acc512951331 = exchangeFold($acc412951331, $list12951331[4])
46- if (($size12951331 == 5))
47- then $acc512951331
45+ let $acc512471283 = exchangeFold($acc412471283, $list12471283[4])
46+ if (($size12471283 == 5))
47+ then $acc512471283
4848 else {
49- let $acc612951331 = exchangeFold($acc512951331, $list12951331[5])
49+ let $acc612471283 = exchangeFold($acc512471283, $list12471283[5])
5050 throw("List size exceed 5")
5151 }
5252 }
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))
1313 then {
1414 let exchangerAddress = addressFromStringValue(exchanger)
15- let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(base58'Zq2voms8GifXDmRFEboVJPZatB25KWkCdPQchwVu1nk', 100000)])
15+ let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(unit, 100000)])
1616 if ((inv == inv))
1717 then (accumulated + 1)
1818 else throw("Strict value is not equal to itself.")
1919 }
2020 else accumulated
2121
2222 let routing = {
23- let $list12951331 = exchangers
24- let $size12951331 = size($list12951331)
25- let $acc012951331 = 0
26- if (($size12951331 == 0))
27- then $acc012951331
23+ let $list12471283 = exchangers
24+ let $size12471283 = size($list12471283)
25+ let $acc012471283 = 0
26+ if (($size12471283 == 0))
27+ then $acc012471283
2828 else {
29- let $acc112951331 = exchangeFold($acc012951331, $list12951331[0])
30- if (($size12951331 == 1))
31- then $acc112951331
29+ let $acc112471283 = exchangeFold($acc012471283, $list12471283[0])
30+ if (($size12471283 == 1))
31+ then $acc112471283
3232 else {
33- let $acc212951331 = exchangeFold($acc112951331, $list12951331[1])
34- if (($size12951331 == 2))
35- then $acc212951331
33+ let $acc212471283 = exchangeFold($acc112471283, $list12471283[1])
34+ if (($size12471283 == 2))
35+ then $acc212471283
3636 else {
37- let $acc312951331 = exchangeFold($acc212951331, $list12951331[2])
38- if (($size12951331 == 3))
39- then $acc312951331
37+ let $acc312471283 = exchangeFold($acc212471283, $list12471283[2])
38+ if (($size12471283 == 3))
39+ then $acc312471283
4040 else {
41- let $acc412951331 = exchangeFold($acc312951331, $list12951331[3])
42- if (($size12951331 == 4))
43- then $acc412951331
41+ let $acc412471283 = exchangeFold($acc312471283, $list12471283[3])
42+ if (($size12471283 == 4))
43+ then $acc412471283
4444 else {
45- let $acc512951331 = exchangeFold($acc412951331, $list12951331[4])
46- if (($size12951331 == 5))
47- then $acc512951331
45+ let $acc512471283 = exchangeFold($acc412471283, $list12471283[4])
46+ if (($size12471283 == 5))
47+ then $acc512471283
4848 else {
49- let $acc612951331 = exchangeFold($acc512951331, $list12951331[5])
49+ let $acc612471283 = exchangeFold($acc512471283, $list12471283[5])
5050 throw("List size exceed 5")
5151 }
5252 }
5353 }
5454 }
5555 }
5656 }
5757 }
5858 if ((routing == routingSize))
5959 then {
6060 let ammountToRecieve = assetBalance(this, assetPay[(routingSize - 1)])
6161 [ScriptTransfer(i.caller, ammountToRecieve, assetPay[(routingSize - 1)])]
6262 }
6363 else nil
6464 }
6565
6666

github/deemru/w8io/026f985 
33.34 ms