tx · FPoomKQthZ4FrBQ9RTjyZLHoEMsyjE3vf85dGwxSod2T

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.08 19:13 [1649591] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "FPoomKQthZ4FrBQ9RTjyZLHoEMsyjE3vf85dGwxSod2T", "fee": 1000000, "feeAssetId": null, "timestamp": 1628439243602, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "3r9REe9raFw49pSa4zDZZJLp7Fatk3LsGp8zPJnS4DxuerssWQ8Zu4KYptHyUpCS1oQnmcoCjuxshK3mb1xNMgn5" ], "script": "base64:AAIFAAAAAAAAAeEIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoJCgJiNRIDaW52Gg0KAmI2Egdyb3V0aW5nGhMKAmI3Eg0kbGlzdDEzNTAxMzg2GhMKAmI4Eg0kc2l6ZTEzNTAxMzg2GhMKAmI5Eg0kYWNjMDEzNTAxMzg2GhMKAmMxEg0kYWNjMTEzNTAxMzg2GhMKAmMyEg0kYWNjMjEzNTAxMzg2GhMKAmMzEg0kYWNjMzEzNTAxMzg2GhMKAmM0Eg0kYWNjNDEzNTAxMzg2GhMKA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AAAmIxAAAAAgUAAAACYzEJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAEDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAACBQAAAAJjMgQAAAACYzMJAQAAAAJiMQAAAAIFAAAAAmMyCQABkQAAAAIFAAAAAmI3AAAAAAAAAAACAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAAAwUAAAACYzMEAAAAAmM0CQEAAAACYjEAAAACBQAAAAJjMwkAAZEAAAACBQAAAAJiNwAAAAAAAAAAAwMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAQFAAAAAmM0BAAAAAJjNQkBAAAAAmIxAAAAAgUAAAACYzQJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAQDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAAFBQAAAAJjNQQAAAACYzYJAQAAAAJiMQAAAAIFAAAAAmM1CQABkQAAAAIFAAAAAmI3AAAAAAAAAAAFCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgNQMJAAAAAAAAAgUAAAACYjYFAAAAAmE5BAAAAAJjNwkAA/AAAAACBQAAAAR0aGlzCQABkQAAAAIFAAAAAmE0CQAAZQAAAAIFAAAAAmE5AAAAAAAAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAJhMQAAAAZjYWxsZXIFAAAAAmM3CQABkQAAAAIFAAAAAmE0CQAAZQAAAAIFAAAAAmE5AAAAAAAAAAABBQAAAANuaWwFAAAAA25pbAAAAADjAYyg", "height": 1649591, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3D6ufQynibbSjWGQYR1pM8LF9QgxuyKLo1KchkJCg4wa Next: 8tWbeEMrCCxGniHLsHaqaoDkhyaZukJfmeVjuMfxjyTD 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)
1515 let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, 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 = {
2323 let $list13501386 = exchangers
2424 let $size13501386 = size($list13501386)
2525 let $acc013501386 = 0
2626 if (($size13501386 == 0))
2727 then $acc013501386
2828 else {
2929 let $acc113501386 = exchangeFold($acc013501386, $list13501386[0])
3030 if (($size13501386 == 1))
3131 then $acc113501386
3232 else {
3333 let $acc213501386 = exchangeFold($acc113501386, $list13501386[1])
3434 if (($size13501386 == 2))
3535 then $acc213501386
3636 else {
3737 let $acc313501386 = exchangeFold($acc213501386, $list13501386[2])
3838 if (($size13501386 == 3))
3939 then $acc313501386
4040 else {
4141 let $acc413501386 = exchangeFold($acc313501386, $list13501386[3])
4242 if (($size13501386 == 4))
4343 then $acc413501386
4444 else {
4545 let $acc513501386 = exchangeFold($acc413501386, $list13501386[4])
4646 if (($size13501386 == 5))
4747 then $acc513501386
4848 else {
4949 let $acc613501386 = exchangeFold($acc513501386, $list13501386[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 
26.67 ms