tx · 7PBgbC1b53QzfyYZWAt9xrKrmbfxW54qmCay3kqZKRER

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.18 12:45 [1663614] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "7PBgbC1b53QzfyYZWAt9xrKrmbfxW54qmCay3kqZKRER", "fee": 1000000, "feeAssetId": null, "timestamp": 1629279941542, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "3HjF1erDiiYVYnfKun8ujM4FBACNnLpYYNmQAvYDBenqgudQCootuTyQXbcyuYb1736o8pCUqtevsU89KfAiJq2s" ], "script": "base64:AAIFAAAAAAAAAfwIAhIHCgUYERICARoHCgJhMRIBaRoQCgJhMhIKZXhjaGFuZ2VycxoKCgJhMxIEYXJncxoRCgJhNBILYXNzZXRzVG9QYXkaFQoCYTUSD2Fzc2V0VG9Vc2VyU2VuZBoYCgJhNhISbWluQW1vdW50VG9SZWNlaXZlGhEKAmE3Egtyb3V0aW5nU2l6ZRoSCgJhOBIMZXhjaGFuZ2VGb2xkGhEKAmE5EgthY2N1bXVsYXRlZBoPCgJiMRIJZXhjaGFuZ2VyGhYKAmIyEhBleGNoYW5nZXJBZGRyZXNzGhAKAmIzEgokdDA5ODAxMDU0Gg8KAmI0EglwbXRBbW91bnQaEAoCYjUSCnBtdEFzc2V0SWQaCQoCYjYSA2ludhoNCgJiNxIHcm91dGluZxoTCgJiOBINJGxpc3QxODAzMTgzORoTCgJiORINJHNpemUxODAzMTgzORoTCgJjMRINJGFjYzAxODAzMTgzORoTCgJjMhINJGFjYzExODAzMTgzORoTCgJjMxINJGFjYzIxODAzMTgzORoTCgJjNBINJGFjYzMxODAzMTgzORoTCgJjNRINJGFjYzQxODAzMTgzORoT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AAAgUAAAACYzYJAAGRAAAAAgUAAAACYjgAAAAAAAAAAAUJAAACAAAAAQIAAAASTGlzdCBzaXplIGV4Y2VlZCA1BAAAAAJjOAkAA/AAAAACBQAAAAR0aGlzBQAAAAJhNQMDCQAAAAAAAAIFAAAAAmI3BQAAAAJhNwkAAGcAAAACBQAAAAJjOAUAAAACYTYHCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAJhMQAAAAZjYWxsZXIFAAAAAmM4BQAAAAJhNQUAAAADbmlsCQAAAgAAAAECAAAAPnJvdXRpbmcgIT0gcm91dGluZ1NpemUgb3IgYW1vdW50VG9SZWNpZXZlIDwgbWluQW1vdW50VG9SZWNlaXZlAAAAAIiu9XI=", "height": 1663614, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7vd7uAYCni4sqmubcULm1FaF8rUdHedG693J7CQrEu1R Next: H6NAZNDdryr85MZdYetmrYRfHGyL2AQYJr9CPTm5HBMN Diff:
OldNewDifferences
99 func exchangeFold (accumulated,exchanger) = if ((accumulated == 0))
1010 then {
1111 let exchangerAddress = addressFromStringValue(exchanger)
12- let $t09321006 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
13- let pmtAmount = $t09321006._1
14- let pmtAssetId = $t09321006._2
12+ let $t09801054 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
13+ let pmtAmount = $t09801054._1
14+ let pmtAssetId = $t09801054._2
1515 if ((assetsToPay[0] != pmtAssetId))
1616 then throw("Incorrect payment and assetsToPay array")
1717 else {
3636 else accumulated
3737
3838 let routing = {
39- let $list17551791 = exchangers
40- let $size17551791 = size($list17551791)
41- let $acc017551791 = 0
42- if (($size17551791 == 0))
43- then $acc017551791
39+ let $list18031839 = exchangers
40+ let $size18031839 = size($list18031839)
41+ let $acc018031839 = 0
42+ if (($size18031839 == 0))
43+ then $acc018031839
4444 else {
45- let $acc117551791 = exchangeFold($acc017551791, $list17551791[0])
46- if (($size17551791 == 1))
47- then $acc117551791
45+ let $acc118031839 = exchangeFold($acc018031839, $list18031839[0])
46+ if (($size18031839 == 1))
47+ then $acc118031839
4848 else {
49- let $acc217551791 = exchangeFold($acc117551791, $list17551791[1])
50- if (($size17551791 == 2))
51- then $acc217551791
49+ let $acc218031839 = exchangeFold($acc118031839, $list18031839[1])
50+ if (($size18031839 == 2))
51+ then $acc218031839
5252 else {
53- let $acc317551791 = exchangeFold($acc217551791, $list17551791[2])
54- if (($size17551791 == 3))
55- then $acc317551791
53+ let $acc318031839 = exchangeFold($acc218031839, $list18031839[2])
54+ if (($size18031839 == 3))
55+ then $acc318031839
5656 else {
57- let $acc417551791 = exchangeFold($acc317551791, $list17551791[3])
58- if (($size17551791 == 4))
59- then $acc417551791
57+ let $acc418031839 = exchangeFold($acc318031839, $list18031839[3])
58+ if (($size18031839 == 4))
59+ then $acc418031839
6060 else {
61- let $acc517551791 = exchangeFold($acc417551791, $list17551791[4])
62- if (($size17551791 == 5))
63- then $acc517551791
61+ let $acc518031839 = exchangeFold($acc418031839, $list18031839[4])
62+ if (($size18031839 == 5))
63+ then $acc518031839
6464 else {
65- let $acc617551791 = exchangeFold($acc517551791, $list17551791[5])
65+ let $acc618031839 = exchangeFold($acc518031839, $list18031839[5])
6666 throw("List size exceed 5")
6767 }
6868 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func routingTrade (exchangers,args,assetsToPay,assetToUserSend,minAmountToReceive) = {
88 let routingSize = size(exchangers)
99 func exchangeFold (accumulated,exchanger) = if ((accumulated == 0))
1010 then {
1111 let exchangerAddress = addressFromStringValue(exchanger)
12- let $t09321006 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
13- let pmtAmount = $t09321006._1
14- let pmtAssetId = $t09321006._2
12+ let $t09801054 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
13+ let pmtAmount = $t09801054._1
14+ let pmtAssetId = $t09801054._2
1515 if ((assetsToPay[0] != pmtAssetId))
1616 then throw("Incorrect payment and assetsToPay array")
1717 else {
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 }
2424 else if (if ((accumulated > 0))
2525 then (routingSize > accumulated)
2626 else false)
2727 then {
2828 let exchangerAddress = addressFromStringValue(exchanger)
2929 let pmtAssetId = assetsToPay[accumulated]
3030 let pmtAmount = assetBalance(this, pmtAssetId)
3131 let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, pmtAmount)])
3232 if ((inv == inv))
3333 then (accumulated + 1)
3434 else throw("Strict value is not equal to itself.")
3535 }
3636 else accumulated
3737
3838 let routing = {
39- let $list17551791 = exchangers
40- let $size17551791 = size($list17551791)
41- let $acc017551791 = 0
42- if (($size17551791 == 0))
43- then $acc017551791
39+ let $list18031839 = exchangers
40+ let $size18031839 = size($list18031839)
41+ let $acc018031839 = 0
42+ if (($size18031839 == 0))
43+ then $acc018031839
4444 else {
45- let $acc117551791 = exchangeFold($acc017551791, $list17551791[0])
46- if (($size17551791 == 1))
47- then $acc117551791
45+ let $acc118031839 = exchangeFold($acc018031839, $list18031839[0])
46+ if (($size18031839 == 1))
47+ then $acc118031839
4848 else {
49- let $acc217551791 = exchangeFold($acc117551791, $list17551791[1])
50- if (($size17551791 == 2))
51- then $acc217551791
49+ let $acc218031839 = exchangeFold($acc118031839, $list18031839[1])
50+ if (($size18031839 == 2))
51+ then $acc218031839
5252 else {
53- let $acc317551791 = exchangeFold($acc217551791, $list17551791[2])
54- if (($size17551791 == 3))
55- then $acc317551791
53+ let $acc318031839 = exchangeFold($acc218031839, $list18031839[2])
54+ if (($size18031839 == 3))
55+ then $acc318031839
5656 else {
57- let $acc417551791 = exchangeFold($acc317551791, $list17551791[3])
58- if (($size17551791 == 4))
59- then $acc417551791
57+ let $acc418031839 = exchangeFold($acc318031839, $list18031839[3])
58+ if (($size18031839 == 4))
59+ then $acc418031839
6060 else {
61- let $acc517551791 = exchangeFold($acc417551791, $list17551791[4])
62- if (($size17551791 == 5))
63- then $acc517551791
61+ let $acc518031839 = exchangeFold($acc418031839, $list18031839[4])
62+ if (($size18031839 == 5))
63+ then $acc518031839
6464 else {
65- let $acc617551791 = exchangeFold($acc517551791, $list17551791[5])
65+ let $acc618031839 = exchangeFold($acc518031839, $list18031839[5])
6666 throw("List size exceed 5")
6767 }
6868 }
6969 }
7070 }
7171 }
7272 }
7373 }
7474 let amountToRecieve = assetBalance(this, assetToUserSend)
7575 if (if ((routing == routingSize))
7676 then (amountToRecieve >= minAmountToReceive)
7777 else false)
7878 then [ScriptTransfer(i.caller, amountToRecieve, assetToUserSend)]
7979 else throw("routing != routingSize or amountToRecieve < minAmountToReceive")
8080 }
8181
8282

github/deemru/w8io/026f985 
36.12 ms