tx · B46PFEmiRqG5JyfYHtk1FYKyMWdMGteAsZTFdcGgXTL1

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.08 17:44 [1649505] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "B46PFEmiRqG5JyfYHtk1FYKyMWdMGteAsZTFdcGgXTL1", "fee": 1000000, "feeAssetId": null, "timestamp": 1628433902937, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "5yP9NGZK7n8WLxFtonRAFqwmrCtdpjMfLGMKDb75NyGBybg2krPLg6ky7S4giz4nWWjnzdrEpRvLMQ2nFuZXxCj5" ], "script": "base64:AAIFAAAAAAAAAeEIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoJCgJiNRIDaW52Gg0KAmI2Egdyb3V0aW5nGhMKAmI3Eg0kbGlzdDExODYxMjIyGhMKAmI4Eg0kc2l6ZTExODYxMjIyGhMKAmI5Eg0kYWNjMDExODYxMjIyGhMKAmMxEg0kYWNjMTExODYxMjIyGhMKAmMyEg0kYWNjMjExODYxMjIyGhMKAmMzEg0kYWNjMzExODYxMjIyGhMKAmM0Eg0kYWNjNDExODYxMjIyGhMKAmM1Eg0kYWNjN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AACBQAAAAJiOAAAAAAAAAAAAQUAAAACYzEEAAAAAmMyCQEAAAACYjEAAAACBQAAAAJjMQkAAZEAAAACBQAAAAJiNwAAAAAAAAAAAQMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAIFAAAAAmMyBAAAAAJjMwkBAAAAAmIxAAAAAgUAAAACYzIJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAIDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAADBQAAAAJjMwQAAAACYzQJAQAAAAJiMQAAAAIFAAAAAmMzCQABkQAAAAIFAAAAAmI3AAAAAAAAAAADAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAABAUAAAACYzQEAAAAAmM1CQEAAAACYjEAAAACBQAAAAJjNAkAAZEAAAACBQAAAAJiNwAAAAAAAAAABAMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAUFAAAAAmM1BAAAAAJjNgkBAAAAAmIxAAAAAgUAAAACYzUJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAUJAAACAAAAAQIAAAASTGlzdCBzaXplIGV4Y2VlZCA1AwkAAAAAAAACBQAAAAJiNgUAAAACYTkEAAAAAmM3CQAD8AAAAAIFAAAABHRoaXMJAAGRAAAAAgUAAAACYTQA//////////8JAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAmExAAAABmNhbGxlcgUAAAACYzcJAAGRAAAAAgUAAAACYTQA//////////8FAAAAA25pbAUAAAADbmlsAAAAAAlsu3k=", "height": 1649505, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D5DKt4bpA8aSKJzBwRL4m9p2bgzGUnzaiJKwvx5oKjxn Next: 3wMVk55Ay64Mz4Kq9mxwRASYdfbEcF9cnrLjYBeibKD5 Diff:
OldNewDifferences
1010 let pmtAssetId = $t0624699._2
1111 let routingSize = size(exchangers)
1212 if (true)
13- then throw(exchangers[routingSize])
13+ then throw(exchangers[(routingSize - 2)])
1414 else {
1515 func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated))
1616 then {
2323 else accumulated
2424
2525 let routing = {
26- let $list11841220 = exchangers
27- let $size11841220 = size($list11841220)
28- let $acc011841220 = 0
29- if (($size11841220 == 0))
30- then $acc011841220
26+ let $list11861222 = exchangers
27+ let $size11861222 = size($list11861222)
28+ let $acc011861222 = 0
29+ if (($size11861222 == 0))
30+ then $acc011861222
3131 else {
32- let $acc111841220 = exchangeFold($acc011841220, $list11841220[0])
33- if (($size11841220 == 1))
34- then $acc111841220
32+ let $acc111861222 = exchangeFold($acc011861222, $list11861222[0])
33+ if (($size11861222 == 1))
34+ then $acc111861222
3535 else {
36- let $acc211841220 = exchangeFold($acc111841220, $list11841220[1])
37- if (($size11841220 == 2))
38- then $acc211841220
36+ let $acc211861222 = exchangeFold($acc111861222, $list11861222[1])
37+ if (($size11861222 == 2))
38+ then $acc211861222
3939 else {
40- let $acc311841220 = exchangeFold($acc211841220, $list11841220[2])
41- if (($size11841220 == 3))
42- then $acc311841220
40+ let $acc311861222 = exchangeFold($acc211861222, $list11861222[2])
41+ if (($size11861222 == 3))
42+ then $acc311861222
4343 else {
44- let $acc411841220 = exchangeFold($acc311841220, $list11841220[3])
45- if (($size11841220 == 4))
46- then $acc411841220
44+ let $acc411861222 = exchangeFold($acc311861222, $list11861222[3])
45+ if (($size11861222 == 4))
46+ then $acc411861222
4747 else {
48- let $acc511841220 = exchangeFold($acc411841220, $list11841220[4])
49- if (($size11841220 == 5))
50- then $acc511841220
48+ let $acc511861222 = exchangeFold($acc411861222, $list11861222[4])
49+ if (($size11861222 == 5))
50+ then $acc511861222
5151 else {
52- let $acc611841220 = exchangeFold($acc511841220, $list11841220[5])
52+ let $acc611861222 = exchangeFold($acc511861222, $list11861222[5])
5353 throw("List size exceed 5")
5454 }
5555 }
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 if (true)
13- then throw(exchangers[routingSize])
13+ then throw(exchangers[(routingSize - 2)])
1414 else {
1515 func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated))
1616 then {
1717 let exchangerAddress = addressFromStringValue(exchanger)
1818 let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, pmtAmount)])
1919 if ((inv == inv))
2020 then (accumulated + 1)
2121 else throw("Strict value is not equal to itself.")
2222 }
2323 else accumulated
2424
2525 let routing = {
26- let $list11841220 = exchangers
27- let $size11841220 = size($list11841220)
28- let $acc011841220 = 0
29- if (($size11841220 == 0))
30- then $acc011841220
26+ let $list11861222 = exchangers
27+ let $size11861222 = size($list11861222)
28+ let $acc011861222 = 0
29+ if (($size11861222 == 0))
30+ then $acc011861222
3131 else {
32- let $acc111841220 = exchangeFold($acc011841220, $list11841220[0])
33- if (($size11841220 == 1))
34- then $acc111841220
32+ let $acc111861222 = exchangeFold($acc011861222, $list11861222[0])
33+ if (($size11861222 == 1))
34+ then $acc111861222
3535 else {
36- let $acc211841220 = exchangeFold($acc111841220, $list11841220[1])
37- if (($size11841220 == 2))
38- then $acc211841220
36+ let $acc211861222 = exchangeFold($acc111861222, $list11861222[1])
37+ if (($size11861222 == 2))
38+ then $acc211861222
3939 else {
40- let $acc311841220 = exchangeFold($acc211841220, $list11841220[2])
41- if (($size11841220 == 3))
42- then $acc311841220
40+ let $acc311861222 = exchangeFold($acc211861222, $list11861222[2])
41+ if (($size11861222 == 3))
42+ then $acc311861222
4343 else {
44- let $acc411841220 = exchangeFold($acc311841220, $list11841220[3])
45- if (($size11841220 == 4))
46- then $acc411841220
44+ let $acc411861222 = exchangeFold($acc311861222, $list11861222[3])
45+ if (($size11861222 == 4))
46+ then $acc411861222
4747 else {
48- let $acc511841220 = exchangeFold($acc411841220, $list11841220[4])
49- if (($size11841220 == 5))
50- then $acc511841220
48+ let $acc511861222 = exchangeFold($acc411861222, $list11861222[4])
49+ if (($size11861222 == 5))
50+ then $acc511861222
5151 else {
52- let $acc611841220 = exchangeFold($acc511841220, $list11841220[5])
52+ let $acc611861222 = exchangeFold($acc511861222, $list11861222[5])
5353 throw("List size exceed 5")
5454 }
5555 }
5656 }
5757 }
5858 }
5959 }
6060 }
6161 if ((routing == routingSize))
6262 then {
6363 let ammountToRecieve = assetBalance(this, assetPay[-1])
6464 [ScriptTransfer(i.caller, ammountToRecieve, assetPay[-1])]
6565 }
6666 else nil
6767 }
6868 }
6969
7070

github/deemru/w8io/026f985 
38.94 ms