tx · 8kKJUoAf8dmfUvFrpsRsZBx7spq5Ar4qagEkhb1KdneE

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

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

{ "type": 13, "id": "8kKJUoAf8dmfUvFrpsRsZBx7spq5Ar4qagEkhb1KdneE", "fee": 1000000, "feeAssetId": null, "timestamp": 1628438368647, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "xQKAz5QL3rVnhqS77DoLBVZUX1dHznguNJpNUkd2k15fASvDZkwMjy5oLWZZbENFwzq6gqWcYxzuFjr3MSbTykY" ], "script": "base64:AAIFAAAAAAAAAgsIAhIGCgQYERIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGg4KAmE0Eghhc3NldFBheRoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGg8KAmE2EgkkdDA2MjQ2OTkaDwoCYTcSCXBtdEFtb3VudBoQCgJhOBIKcG10QXNzZXRJZBoRCgJhORILcm91dGluZ1NpemUaEgoCYjESDGV4Y2hhbmdlRm9sZBoRCgJiMhILYWNjdW11bGF0ZWQaDwoCYjMSCWV4Y2hhbmdlchoWCgJiNBIQZXhjaGFuZ2VyQWRkcmVzcxoHCgJiNRIBYRoNCgJiNhIHJG1hdGNoMBoHCgJiNxIBdBoHCgJiOBIBdRoJCgJiORIDaW52Gg0KAmMxEgdyb3V0aW5nGhMKAmMyEg0kbGlzdDE0MTIxNDQ4GhMKAmMzEg0kc2l6ZTE0MTIxNDQ4GhMKAmM0Eg0kYWNjMDE0MTIxNDQ4GhMKAmM1Eg0kYWNjMTE0MTIxNDQ4GhMKAmM2Eg0kYWNjMjE0MTIxNDQ4GhMK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mE5AAAAAAAAAAABBQAAAANuaWwFAAAAA25pbAAAAABcIZyT", "height": 1649581, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9RP3MsCPgfNRGrnAJijcGx9TRrCg943VaE7Jf2J4zExc Next: 45CNgQ5pyFHg5RY2xRwFQCCfDx32otwFyqcKtoirfWKP Diff:
OldNewDifferences
1414 let exchangerAddress = addressFromStringValue(exchanger)
1515 let a = match pmtAssetId {
1616 case t: ByteVector =>
17- t
17+ value(fromBase58String(toBase58String(t)))
1818 case u: Unit =>
1919 u
2020 case _ =>
2828 else accumulated
2929
3030 let routing = {
31- let $list13681404 = exchangers
32- let $size13681404 = size($list13681404)
33- let $acc013681404 = 0
34- if (($size13681404 == 0))
35- then $acc013681404
31+ let $list14121448 = exchangers
32+ let $size14121448 = size($list14121448)
33+ let $acc014121448 = 0
34+ if (($size14121448 == 0))
35+ then $acc014121448
3636 else {
37- let $acc113681404 = exchangeFold($acc013681404, $list13681404[0])
38- if (($size13681404 == 1))
39- then $acc113681404
37+ let $acc114121448 = exchangeFold($acc014121448, $list14121448[0])
38+ if (($size14121448 == 1))
39+ then $acc114121448
4040 else {
41- let $acc213681404 = exchangeFold($acc113681404, $list13681404[1])
42- if (($size13681404 == 2))
43- then $acc213681404
41+ let $acc214121448 = exchangeFold($acc114121448, $list14121448[1])
42+ if (($size14121448 == 2))
43+ then $acc214121448
4444 else {
45- let $acc313681404 = exchangeFold($acc213681404, $list13681404[2])
46- if (($size13681404 == 3))
47- then $acc313681404
45+ let $acc314121448 = exchangeFold($acc214121448, $list14121448[2])
46+ if (($size14121448 == 3))
47+ then $acc314121448
4848 else {
49- let $acc413681404 = exchangeFold($acc313681404, $list13681404[3])
50- if (($size13681404 == 4))
51- then $acc413681404
49+ let $acc414121448 = exchangeFold($acc314121448, $list14121448[3])
50+ if (($size14121448 == 4))
51+ then $acc414121448
5252 else {
53- let $acc513681404 = exchangeFold($acc413681404, $list13681404[4])
54- if (($size13681404 == 5))
55- then $acc513681404
53+ let $acc514121448 = exchangeFold($acc414121448, $list14121448[4])
54+ if (($size14121448 == 5))
55+ then $acc514121448
5656 else {
57- let $acc613681404 = exchangeFold($acc513681404, $list13681404[5])
57+ let $acc614121448 = exchangeFold($acc514121448, $list14121448[5])
5858 throw("List size exceed 5")
5959 }
6060 }
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 a = match pmtAssetId {
1616 case t: ByteVector =>
17- t
17+ value(fromBase58String(toBase58String(t)))
1818 case u: Unit =>
1919 u
2020 case _ =>
2121 throw("Match error")
2222 }
2323 let inv = invoke(exchangerAddress, "exchange", [args[accumulated]], [AttachedPayment(a, 100000)])
2424 if ((inv == inv))
2525 then (accumulated + 1)
2626 else throw("Strict value is not equal to itself.")
2727 }
2828 else accumulated
2929
3030 let routing = {
31- let $list13681404 = exchangers
32- let $size13681404 = size($list13681404)
33- let $acc013681404 = 0
34- if (($size13681404 == 0))
35- then $acc013681404
31+ let $list14121448 = exchangers
32+ let $size14121448 = size($list14121448)
33+ let $acc014121448 = 0
34+ if (($size14121448 == 0))
35+ then $acc014121448
3636 else {
37- let $acc113681404 = exchangeFold($acc013681404, $list13681404[0])
38- if (($size13681404 == 1))
39- then $acc113681404
37+ let $acc114121448 = exchangeFold($acc014121448, $list14121448[0])
38+ if (($size14121448 == 1))
39+ then $acc114121448
4040 else {
41- let $acc213681404 = exchangeFold($acc113681404, $list13681404[1])
42- if (($size13681404 == 2))
43- then $acc213681404
41+ let $acc214121448 = exchangeFold($acc114121448, $list14121448[1])
42+ if (($size14121448 == 2))
43+ then $acc214121448
4444 else {
45- let $acc313681404 = exchangeFold($acc213681404, $list13681404[2])
46- if (($size13681404 == 3))
47- then $acc313681404
45+ let $acc314121448 = exchangeFold($acc214121448, $list14121448[2])
46+ if (($size14121448 == 3))
47+ then $acc314121448
4848 else {
49- let $acc413681404 = exchangeFold($acc313681404, $list13681404[3])
50- if (($size13681404 == 4))
51- then $acc413681404
49+ let $acc414121448 = exchangeFold($acc314121448, $list14121448[3])
50+ if (($size14121448 == 4))
51+ then $acc414121448
5252 else {
53- let $acc513681404 = exchangeFold($acc413681404, $list13681404[4])
54- if (($size13681404 == 5))
55- then $acc513681404
53+ let $acc514121448 = exchangeFold($acc414121448, $list14121448[4])
54+ if (($size14121448 == 5))
55+ then $acc514121448
5656 else {
57- let $acc613681404 = exchangeFold($acc513681404, $list13681404[5])
57+ let $acc614121448 = exchangeFold($acc514121448, $list14121448[5])
5858 throw("List size exceed 5")
5959 }
6060 }
6161 }
6262 }
6363 }
6464 }
6565 }
6666 if ((routing == routingSize))
6767 then {
6868 let ammountToRecieve = assetBalance(this, assetPay[(routingSize - 1)])
6969 [ScriptTransfer(i.caller, ammountToRecieve, assetPay[(routingSize - 1)])]
7070 }
7171 else nil
7272 }
7373
7474

github/deemru/w8io/026f985 
40.96 ms