tx · 45CNgQ5pyFHg5RY2xRwFQCCfDx32otwFyqcKtoirfWKP

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.08 18:59 [1649581] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "45CNgQ5pyFHg5RY2xRwFQCCfDx32otwFyqcKtoirfWKP", "fee": 1000000, "feeAssetId": null, "timestamp": 1628438402667, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "4BF2FLDh68txN4craNb2jLyxyuPHH5VJ2fMfeNpJLKCB7tYUxjEcPVkEp7DpPpmMhFmhQqeMHPSSnkXJggHRsVXz" ], "script": "base64:AAIFAAAAAAAAAeEIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoJCgJiNRIDaW52Gg0KAmI2Egdyb3V0aW5nGhMKAmI3Eg0kbGlzdDEyNDYxMjgyGhMKAmI4Eg0kc2l6ZTEyNDYxMjgyGhMKAmI5Eg0kYWNjMDEyNDYxMjgyGhMKAmMxEg0kYWNjMTEyNDYxMjgyGhMKAmMyEg0kYWNjMjEyNDYxMjgyGhMKAmMzEg0kYWNjMzEyNDYxMjgyGhMKAmM0Eg0kYWNjNDEyNDYxMjgyGhMKA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AAAmIxAAAAAgUAAAACYzEJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAEDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAACBQAAAAJjMgQAAAACYzMJAQAAAAJiMQAAAAIFAAAAAmMyCQABkQAAAAIFAAAAAmI3AAAAAAAAAAACAwkAAAAAAAACBQAAAAJiOAAAAAAAAAAAAwUAAAACYzMEAAAAAmM0CQEAAAACYjEAAAACBQAAAAJjMwkAAZEAAAACBQAAAAJiNwAAAAAAAAAAAwMJAAAAAAAAAgUAAAACYjgAAAAAAAAAAAQFAAAAAmM0BAAAAAJjNQkBAAAAAmIxAAAAAgUAAAACYzQJAAGRAAAAAgUAAAACYjcAAAAAAAAAAAQDCQAAAAAAAAIFAAAAAmI4AAAAAAAAAAAFBQAAAAJjNQQAAAACYzYJAQAAAAJiMQAAAAIFAAAAAmM1CQABkQAAAAIFAAAAAmI3AAAAAAAAAAAFCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgNQMJAAAAAAAAAgUAAAACYjYFAAAAAmE5BAAAAAJjNwkAA/AAAAACBQAAAAR0aGlzCQABkQAAAAIFAAAAAmE0CQAAZQAAAAIFAAAAAmE5AAAAAAAAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAJhMQAAAAZjYWxsZXIFAAAAAmM3CQABkQAAAAIFAAAAAmE0CQAAZQAAAAIFAAAAAmE5AAAAAAAAAAABBQAAAANuaWwFAAAAA25pbAAAAAAJIk5A", "height": 1649581, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8kKJUoAf8dmfUvFrpsRsZBx7spq5Ar4qagEkhb1KdneE Next: 7J7K9EBfMs6XNaeLgQ4GKWzNwgKhxtGrYHemJ1Fojs8z Diff:
OldNewDifferences
1212 func exchangeFold (accumulated,exchanger) = if ((routingSize > accumulated))
1313 then {
1414 let exchangerAddress = addressFromStringValue(exchanger)
15- let a = match pmtAssetId {
16- case t: ByteVector =>
17- value(fromBase58String(toBase58String(t)))
18- case u: Unit =>
19- u
20- case _ =>
21- throw("Match error")
22- }
23- let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(a, 100000)])
15+ let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, 100000)])
2416 if ((inv == inv))
2517 then (accumulated + 1)
2618 else throw("Strict value is not equal to itself.")
2820 else accumulated
2921
3022 let routing = {
31- let $list14121448 = exchangers
32- let $size14121448 = size($list14121448)
33- let $acc014121448 = 0
34- if (($size14121448 == 0))
35- then $acc014121448
23+ let $list12461282 = exchangers
24+ let $size12461282 = size($list12461282)
25+ let $acc012461282 = 0
26+ if (($size12461282 == 0))
27+ then $acc012461282
3628 else {
37- let $acc114121448 = exchangeFold($acc014121448, $list14121448[0])
38- if (($size14121448 == 1))
39- then $acc114121448
29+ let $acc112461282 = exchangeFold($acc012461282, $list12461282[0])
30+ if (($size12461282 == 1))
31+ then $acc112461282
4032 else {
41- let $acc214121448 = exchangeFold($acc114121448, $list14121448[1])
42- if (($size14121448 == 2))
43- then $acc214121448
33+ let $acc212461282 = exchangeFold($acc112461282, $list12461282[1])
34+ if (($size12461282 == 2))
35+ then $acc212461282
4436 else {
45- let $acc314121448 = exchangeFold($acc214121448, $list14121448[2])
46- if (($size14121448 == 3))
47- then $acc314121448
37+ let $acc312461282 = exchangeFold($acc212461282, $list12461282[2])
38+ if (($size12461282 == 3))
39+ then $acc312461282
4840 else {
49- let $acc414121448 = exchangeFold($acc314121448, $list14121448[3])
50- if (($size14121448 == 4))
51- then $acc414121448
41+ let $acc412461282 = exchangeFold($acc312461282, $list12461282[3])
42+ if (($size12461282 == 4))
43+ then $acc412461282
5244 else {
53- let $acc514121448 = exchangeFold($acc414121448, $list14121448[4])
54- if (($size14121448 == 5))
55- then $acc514121448
45+ let $acc512461282 = exchangeFold($acc412461282, $list12461282[4])
46+ if (($size12461282 == 5))
47+ then $acc512461282
5648 else {
57- let $acc614121448 = exchangeFold($acc514121448, $list14121448[5])
49+ let $acc612461282 = exchangeFold($acc512461282, $list12461282[5])
5850 throw("List size exceed 5")
5951 }
6052 }
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 a = match pmtAssetId {
16- case t: ByteVector =>
17- value(fromBase58String(toBase58String(t)))
18- case u: Unit =>
19- u
20- case _ =>
21- throw("Match error")
22- }
23- let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(a, 100000)])
15+ let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(pmtAssetId, 100000)])
2416 if ((inv == inv))
2517 then (accumulated + 1)
2618 else throw("Strict value is not equal to itself.")
2719 }
2820 else accumulated
2921
3022 let routing = {
31- let $list14121448 = exchangers
32- let $size14121448 = size($list14121448)
33- let $acc014121448 = 0
34- if (($size14121448 == 0))
35- then $acc014121448
23+ let $list12461282 = exchangers
24+ let $size12461282 = size($list12461282)
25+ let $acc012461282 = 0
26+ if (($size12461282 == 0))
27+ then $acc012461282
3628 else {
37- let $acc114121448 = exchangeFold($acc014121448, $list14121448[0])
38- if (($size14121448 == 1))
39- then $acc114121448
29+ let $acc112461282 = exchangeFold($acc012461282, $list12461282[0])
30+ if (($size12461282 == 1))
31+ then $acc112461282
4032 else {
41- let $acc214121448 = exchangeFold($acc114121448, $list14121448[1])
42- if (($size14121448 == 2))
43- then $acc214121448
33+ let $acc212461282 = exchangeFold($acc112461282, $list12461282[1])
34+ if (($size12461282 == 2))
35+ then $acc212461282
4436 else {
45- let $acc314121448 = exchangeFold($acc214121448, $list14121448[2])
46- if (($size14121448 == 3))
47- then $acc314121448
37+ let $acc312461282 = exchangeFold($acc212461282, $list12461282[2])
38+ if (($size12461282 == 3))
39+ then $acc312461282
4840 else {
49- let $acc414121448 = exchangeFold($acc314121448, $list14121448[3])
50- if (($size14121448 == 4))
51- then $acc414121448
41+ let $acc412461282 = exchangeFold($acc312461282, $list12461282[3])
42+ if (($size12461282 == 4))
43+ then $acc412461282
5244 else {
53- let $acc514121448 = exchangeFold($acc414121448, $list14121448[4])
54- if (($size14121448 == 5))
55- then $acc514121448
45+ let $acc512461282 = exchangeFold($acc412461282, $list12461282[4])
46+ if (($size12461282 == 5))
47+ then $acc512461282
5648 else {
57- let $acc614121448 = exchangeFold($acc514121448, $list14121448[5])
49+ let $acc612461282 = exchangeFold($acc512461282, $list12461282[5])
5850 throw("List size exceed 5")
5951 }
6052 }
6153 }
6254 }
6355 }
6456 }
6557 }
6658 if ((routing == routingSize))
6759 then {
6860 let ammountToRecieve = assetBalance(this, assetPay[(routingSize - 1)])
6961 [ScriptTransfer(i.caller, ammountToRecieve, assetPay[(routingSize - 1)])]
7062 }
7163 else nil
7264 }
7365
7466

github/deemru/w8io/026f985 
41.36 ms