tx · 9PBbhfajL5RmsDGZeAkpzCQKnexVLNy3wfDmeKtM7Gfm

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.15 13:35 [1659357] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "9PBbhfajL5RmsDGZeAkpzCQKnexVLNy3wfDmeKtM7Gfm", "fee": 1000000, "feeAssetId": null, "timestamp": 1629023735113, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "5MP9d9jgk9hYZTWQyjDT9uZUe3HEUkkN7LBUrWM3DkQKyQyus6MG5Y3MDPcYAg2pZPL4toNBpyqbYaTLnsEMkfEe" ], "script": "base64:AAIFAAAAAAAAAf0IAhIHCgUYERICARoHCgJhMRIBaRoQCgJhMhIKZXhjaGFuZ2VycxoKCgJhMxIEYXJncxoRCgJhNBILYXNzZXRzVG9QYXkaFQoCYTUSD2Fzc2V0VG9Vc2VyU2VuZBoYCgJhNhISbWluQW1vdW50VG9SZWNlaXZlGhEKAmE3Egtyb3V0aW5nU2l6ZRoSCgJhOBIMZXhjaGFuZ2VGb2xkGhEKAmE5EgthY2N1bXVsYXRlZBoPCgJiMRIJZXhjaGFuZ2VyGhYKAmIyEhBleGNoYW5nZXJBZGRyZXNzGhAKAmIzEgokdDA5NzMxMDQ3Gg8KAmI0EglwbXRBbW91bnQaEAoCYjUSCnBtdEFzc2V0SWQaCQoCYjYSA2ludhoNCgJiNxIHcm91dGluZxoTCgJiOBINJGxpc3QxNzk2MTgzMhoTCgJiORINJHNpemUxNzk2MTgzMhoTCgJjMRINJGFjYzAxNzk2MTgzMhoTCgJjMhINJGFjYzExNzk2MTgzMhoTCgJjMxINJGFjYzIxNzk2MTgzMhoTCgJjNBINJGFjYzMxNzk2MTgz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AAAAAAAEAwkAAAAAAAACBQAAAAJiOQAAAAAAAAAABQUAAAACYzYEAAAAAmM3CQEAAAACYTgAAAACBQAAAAJjNgkAAZEAAAACBQAAAAJiOAAAAAAAAAAABQkAAAIAAAABAgAAABJMaXN0IHNpemUgZXhjZWVkIDUDCQAAAAAAAAIFAAAAAmI3BQAAAAJhNwMGCQAAAgAAAAECAAAAATEEAAAAAmM4CQAD8AAAAAIFAAAABHRoaXMFAAAAAmE1CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAJhMQAAAAZjYWxsZXIFAAAAAmM4BQAAAAJhNQUAAAADbmlsBQAAAANuaWwAAAAAcNqzEA==", "height": 1659357, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AvuZwm1y1KSTjuX7DCuzXLk9B1a7RL6QBsyJwos9UjyA Next: G6N6qMWympRgLtpxzywXhkhHsSCcGWDGjGwAeeh8bxr3 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 if (true)
1111 then throw("1")
1212 else {
1313 let exchangerAddress = addressFromStringValue(exchanger)
1414 let $t09731047 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
1515 let pmtAmount = $t09731047._1
1616 let pmtAssetId = $t09731047._2
1717 if ((assetsToPay[0] != pmtAssetId))
1818 then throw("Incorrect payment and assetsToPay array")
1919 else {
2020 let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, pmtAmount)])
2121 if ((inv == inv))
2222 then (accumulated + 1)
2323 else throw("Strict value is not equal to itself.")
2424 }
2525 }
2626 else if (if ((accumulated > 0))
2727 then (routingSize > accumulated)
2828 else false)
2929 then {
3030 let exchangerAddress = addressFromStringValue(exchanger)
3131 let pmtAssetId = assetsToPay[accumulated]
3232 let pmtAmount = assetBalance(this, pmtAssetId)
3333 let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, pmtAmount)])
3434 if ((inv == inv))
3535 then (accumulated + 1)
3636 else throw("Strict value is not equal to itself.")
3737 }
3838 else accumulated
3939
4040 let routing = {
4141 let $list17961832 = exchangers
4242 let $size17961832 = size($list17961832)
4343 let $acc017961832 = 0
4444 if (($size17961832 == 0))
4545 then $acc017961832
4646 else {
4747 let $acc117961832 = exchangeFold($acc017961832, $list17961832[0])
4848 if (($size17961832 == 1))
4949 then $acc117961832
5050 else {
5151 let $acc217961832 = exchangeFold($acc117961832, $list17961832[1])
5252 if (($size17961832 == 2))
5353 then $acc217961832
5454 else {
5555 let $acc317961832 = exchangeFold($acc217961832, $list17961832[2])
5656 if (($size17961832 == 3))
5757 then $acc317961832
5858 else {
5959 let $acc417961832 = exchangeFold($acc317961832, $list17961832[3])
6060 if (($size17961832 == 4))
6161 then $acc417961832
6262 else {
6363 let $acc517961832 = exchangeFold($acc417961832, $list17961832[4])
6464 if (($size17961832 == 5))
6565 then $acc517961832
6666 else {
6767 let $acc617961832 = exchangeFold($acc517961832, $list17961832[5])
6868 throw("List size exceed 5")
6969 }
7070 }
7171 }
7272 }
7373 }
7474 }
7575 }
7676 if ((routing == routingSize))
7777 then if (true)
7878 then throw("1")
7979 else {
8080 let ammountToRecieve = assetBalance(this, assetToUserSend)
8181 [ScriptTransfer(i.caller, ammountToRecieve, assetToUserSend)]
8282 }
8383 else nil
8484 }
8585
8686

github/deemru/w8io/026f985 
23.54 ms