tx · GZpte7Lf3J7JELzS9cexNLeiR6jQLrti7GtArmS3y4yW

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.08 17:42 [1649502] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "GZpte7Lf3J7JELzS9cexNLeiR6jQLrti7GtArmS3y4yW", "fee": 1000000, "feeAssetId": null, "timestamp": 1628433774873, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "2dNJn17hgFy1qb2xRj6aHjJhduQWy2vCjkdHDWsmbfAvJ2RCqiXPM68xSjG4rAFM7fZurKBrpVbE64V1vPt8i6hG" ], "script": "base64:AAIFAAAAAAAAAeEIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoJCgJiNRIDaW52Gg0KAmI2Egdyb3V0aW5nGhMKAmI3Eg0kbGlzdDEyMDExMjM3GhMKAmI4Eg0kc2l6ZTEyMDExMjM3GhMKAmI5Eg0kYWNjMDEyMDExMjM3GhMKAmMxEg0kYWNjMTEyMDExMjM3GhMKAmMyEg0kYWNjMjEyMDExMjM3GhMKAmMzEg0kYWNjMzEyMDExMjM3GhMKAmM0Eg0kYWNjNDEyMDExMjM3GhMKAmM1Eg0kYW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AAAAAAADCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAABBQAAAAJjMQQAAAACYzIJAQAAAAJiMQAAAAIFAAAAAmMxCQABkQAAAAIFAAAAAmI3AAAAAAAAAAABAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAAAgUAAAACYzIEAAAAAmMzCQEAAAACYjEAAAACBQAAAAJjMgkAAZEAAAACBQAAAAJiNwAAAAAAAAAAAgMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAMFAAAAAmMzBAAAAAJjNAkBAAAAAmIxAAAAAgUAAAACYzMJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAMDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAAEBQAAAAJjNAQAAAACYzUJAQAAAAJiMQAAAAIFAAAAAmM0CQABkQAAAAIFAAAAAmI3AAAAAAAAAAAEAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAABQUAAAACYzUEAAAAAmM2CQEAAAACYjEAAAACBQAAAAJjNQkAAZEAAAACBQAAAAJiNwAAAAAAAAAABQkAAAIAAAABAgAAABJMaXN0IHNpemUgZXhjZWVkIDUDCQAAAAAAAAIFAAAAAmI2BQAAAAJhOQQAAAACYzcJAAPwAAAAAgUAAAAEdGhpcwkAAZEAAAACBQAAAAJhNAD//////////wkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAACYTEAAAAGY2FsbGVyBQAAAAJjNwkAAZEAAAACBQAAAAJhNAD//////////wUAAAADbmlsBQAAAANuaWwAAAAAbqGUXg==", "height": 1649502, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3GAwaJcqYE9AZNyssAeh9NaRkoLsSHAfuUqdepJ6YB6K Next: DoAtrZSU4xbGizNegdmeYh1yGbnTrEkMukqJqKgsQnkb Diff:
OldNewDifferences
1010 let pmtAssetId = $t0624699._2
1111 let routingSize = size(exchangers)
1212 if (true)
13- then throw(toBase58String(assetPay[-1]))
13+ then throw(toBase58String(assetPay[(routingSize - 1)]))
1414 else {
1515 func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated))
1616 then {
2323 else accumulated
2424
2525 let routing = {
26- let $list11901226 = exchangers
27- let $size11901226 = size($list11901226)
28- let $acc011901226 = 0
29- if (($size11901226 == 0))
30- then $acc011901226
26+ let $list12011237 = exchangers
27+ let $size12011237 = size($list12011237)
28+ let $acc012011237 = 0
29+ if (($size12011237 == 0))
30+ then $acc012011237
3131 else {
32- let $acc111901226 = exchangeFold($acc011901226, $list11901226[0])
33- if (($size11901226 == 1))
34- then $acc111901226
32+ let $acc112011237 = exchangeFold($acc012011237, $list12011237[0])
33+ if (($size12011237 == 1))
34+ then $acc112011237
3535 else {
36- let $acc211901226 = exchangeFold($acc111901226, $list11901226[1])
37- if (($size11901226 == 2))
38- then $acc211901226
36+ let $acc212011237 = exchangeFold($acc112011237, $list12011237[1])
37+ if (($size12011237 == 2))
38+ then $acc212011237
3939 else {
40- let $acc311901226 = exchangeFold($acc211901226, $list11901226[2])
41- if (($size11901226 == 3))
42- then $acc311901226
40+ let $acc312011237 = exchangeFold($acc212011237, $list12011237[2])
41+ if (($size12011237 == 3))
42+ then $acc312011237
4343 else {
44- let $acc411901226 = exchangeFold($acc311901226, $list11901226[3])
45- if (($size11901226 == 4))
46- then $acc411901226
44+ let $acc412011237 = exchangeFold($acc312011237, $list12011237[3])
45+ if (($size12011237 == 4))
46+ then $acc412011237
4747 else {
48- let $acc511901226 = exchangeFold($acc411901226, $list11901226[4])
49- if (($size11901226 == 5))
50- then $acc511901226
48+ let $acc512011237 = exchangeFold($acc412011237, $list12011237[4])
49+ if (($size12011237 == 5))
50+ then $acc512011237
5151 else {
52- let $acc611901226 = exchangeFold($acc511901226, $list11901226[5])
52+ let $acc612011237 = exchangeFold($acc512011237, $list12011237[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(toBase58String(assetPay[-1]))
13+ then throw(toBase58String(assetPay[(routingSize - 1)]))
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 $list11901226 = exchangers
27- let $size11901226 = size($list11901226)
28- let $acc011901226 = 0
29- if (($size11901226 == 0))
30- then $acc011901226
26+ let $list12011237 = exchangers
27+ let $size12011237 = size($list12011237)
28+ let $acc012011237 = 0
29+ if (($size12011237 == 0))
30+ then $acc012011237
3131 else {
32- let $acc111901226 = exchangeFold($acc011901226, $list11901226[0])
33- if (($size11901226 == 1))
34- then $acc111901226
32+ let $acc112011237 = exchangeFold($acc012011237, $list12011237[0])
33+ if (($size12011237 == 1))
34+ then $acc112011237
3535 else {
36- let $acc211901226 = exchangeFold($acc111901226, $list11901226[1])
37- if (($size11901226 == 2))
38- then $acc211901226
36+ let $acc212011237 = exchangeFold($acc112011237, $list12011237[1])
37+ if (($size12011237 == 2))
38+ then $acc212011237
3939 else {
40- let $acc311901226 = exchangeFold($acc211901226, $list11901226[2])
41- if (($size11901226 == 3))
42- then $acc311901226
40+ let $acc312011237 = exchangeFold($acc212011237, $list12011237[2])
41+ if (($size12011237 == 3))
42+ then $acc312011237
4343 else {
44- let $acc411901226 = exchangeFold($acc311901226, $list11901226[3])
45- if (($size11901226 == 4))
46- then $acc411901226
44+ let $acc412011237 = exchangeFold($acc312011237, $list12011237[3])
45+ if (($size12011237 == 4))
46+ then $acc412011237
4747 else {
48- let $acc511901226 = exchangeFold($acc411901226, $list11901226[4])
49- if (($size11901226 == 5))
50- then $acc511901226
48+ let $acc512011237 = exchangeFold($acc412011237, $list12011237[4])
49+ if (($size12011237 == 5))
50+ then $acc512011237
5151 else {
52- let $acc611901226 = exchangeFold($acc511901226, $list11901226[5])
52+ let $acc612011237 = exchangeFold($acc512011237, $list12011237[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 
45.44 ms