tx · GxzUM9PnqFpfjjBgzxvGbUCPKDpm3bQpokyWicJ9MRah

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.08 19:15 [1649594] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "GxzUM9PnqFpfjjBgzxvGbUCPKDpm3bQpokyWicJ9MRah", "fee": 1000000, "feeAssetId": null, "timestamp": 1628439346400, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "5teeVZkYQJFujotDZKJ9fP65cCNGqF3JGCJAVYeJWv7hUFwnKTKPr47WGTCoSDbPhUCNbWM9f5cKWm1eeWRZ4jZa" ], "script": "base64:AAIFAAAAAAAAAeEIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoJCgJiNRIDaW52Gg0KAmI2Egdyb3V0aW5nGhMKAmI3Eg0kbGlzdDEzNTAxMzg2GhMKAmI4Eg0kc2l6ZTEzNTAxMzg2GhMKAmI5Eg0kYWNjMDEzNTAxMzg2GhMKAmMxEg0kYWNjMTEzNTAxMzg2GhMKAmMyEg0kYWNjMjEzNTAxMzg2GhMKAmMzEg0kYWNjMzEzNTAxMzg2GhMKAmM0Eg0kYWNjNDEzNTAxMzg2GhM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YjgAAAAAAAAAAAEFAAAAAmMxBAAAAAJjMgkBAAAAAmIxAAAAAgUAAAACYzEJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAEDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAACBQAAAAJjMgQAAAACYzMJAQAAAAJiMQAAAAIFAAAAAmMyCQABkQAAAAIFAAAAAmI3AAAAAAAAAAACAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAAAwUAAAACYzMEAAAAAmM0CQEAAAACYjEAAAACBQAAAAJjMwkAAZEAAAACBQAAAAJiNwAAAAAAAAAAAwMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAQFAAAAAmM0BAAAAAJjNQkBAAAAAmIxAAAAAgUAAAACYzQJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAQDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAAFBQAAAAJjNQQAAAACYzYJAQAAAAJiMQAAAAIFAAAAAmM1CQABkQAAAAIFAAAAAmI3AAAAAAAAAAAFCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgNQMJAAAAAAAAAgUAAAACYjYFAAAAAmE5BAAAAAJjNwkAA/AAAAACBQAAAAR0aGlzCQABkQAAAAIFAAAAAmE0CQAAZQAAAAIFAAAAAmE5AAAAAAAAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAJhMQAAAAZjYWxsZXIFAAAAAmM3CQABkQAAAAIFAAAAAmE0CQAAZQAAAAIFAAAAAmE5AAAAAAAAAAABBQAAAANuaWwFAAAAA25pbAAAAADAX5v0", "height": 1649594, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8tWbeEMrCCxGniHLsHaqaoDkhyaZukJfmeVjuMfxjyTD Next: 4YKnGJZp8uMVsuoTah916McXfpmstMsbKGpcmKaTNQWM Diff:
OldNewDifferences
1212 func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated))
1313 then {
1414 let exchangerAddress = addressFromStringValue(exchanger)
15- let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, 100000)])
15+ let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(base58'Zq2voms8GifXDmRFEboVJPZatB25KWkCdPQchwVu1nk', 100000)])
1616 if ((inv == inv))
1717 then (accumulated + 1)
1818 else throw("Strict value is not equal to itself.")
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)
15- let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, 100000)])
15+ let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(base58'Zq2voms8GifXDmRFEboVJPZatB25KWkCdPQchwVu1nk', 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.47 ms