tx · yUDjTK8Mxo6qXqBVphvznrfopTtYhCcAr7vuTir4cWQ

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.31 23:57 [1683027] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "yUDjTK8Mxo6qXqBVphvznrfopTtYhCcAr7vuTir4cWQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1630443478742, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "4tTTHHfHtYUcGNLGvg3ovt3uw3WGPkxfo7wMnftvsuojKswJvZZqdkkUwPYwWv8bixYZvbQCbWR26Ywtev7Rmp5j" ], "script": "base64:AAIFAAAAAAAAAoQIAhIGCgQYEQIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGhQKAmE0Eg5yZWNlaXZlQXNzZXRJZBoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGhEKAmE2Egtyb3V0aW5nU2l6ZRoSCgJhNxIMZXhjaGFuZ2VGb2xkGhEKAmE4EgthY2N1bXVsYXRlZBoPCgJhORIJZXhjaGFuZ2VyGg8KAmIxEgkkdDA5MzU5OTgaFQoCYjISD2V4Y2hhbmdlQ291bnRlchoUCgJiMxIOYW1vdW50c1dpdGhGZWUaEgoCYjQSDGFzc2V0c0lkU2VuZBoWCgJiNRIQZXhjaGFuZ2VyQWRkcmVzcxoRCgJiNhILJHQwMTExODExOTIaDwoCYjcSCXBtdEFtb3VudBoQCgJiOBIKcG10QXNzZXRJZBoJCgJiORIDaW52Gg0KAmMxEgckbWF0Y2gwGhEKAmMyEgskdDAxNDIwMTQ1OBoTCgJjMxINYW1vdW50V2l0aEZlZRoRCgJjNBILYXNzZXRJZFNlbmQaEQoCYzUSC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AAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAACYTEAAAAGY2FsbGVyBQAAAAJkNgUAAAACYTQFAAAAA25pbAkAAAIAAAABAgAAAD5yb3V0aW5nICE9IHJvdXRpbmdTaXplIG9yIGFtb3VudFRvUmVjaWV2ZSA8IG1pbkFtb3VudFRvUmVjZWl2ZQAAAAD6xIl/", "height": 1683027, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 92LQnViqFimBstBSHFmNpj1Ck87neh2RQNus9pgfXVWy Next: A1ZDU2ANYWTXDxtW17in4oXu7pqJwECmePUDonYE9fF3 Diff:
OldNewDifferences
3333 }
3434 else throw("Strict value is not equal to itself.")
3535 }
36- else if ((k > 1))
36+ else if ((k == 1))
3737 then throw(((((toString(k) + " ") + toBase58String(m)) + " ") + toString(l)))
3838 else if (if ((k > 0))
3939 then (f > k)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
77 func routingTrade (b,c,d,e) = {
88 let f = size(b)
99 func g (h,i) = {
1010 let j = h
1111 let k = j._1
1212 let l = j._2
1313 let m = j._3
1414 if ((k == 0))
1515 then {
1616 let n = addressFromStringValue(i)
1717 let o = $Tuple2(a.payments[0].amount, a.payments[0].assetId)
1818 let p = o._1
1919 let q = o._2
2020 let r = invoke(n, "exchange", [c[k]], [AttachedPayment(q, p)])
2121 if ((r == r))
2222 then {
2323 let s = r
2424 if ($isInstanceOf(s, "(Int, ByteVector)"))
2525 then {
2626 let r = s
2727 let t = r
2828 let u = t._1
2929 let v = t._2
3030 $Tuple3((k + 1), u, v)
3131 }
3232 else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
3333 }
3434 else throw("Strict value is not equal to itself.")
3535 }
36- else if ((k > 1))
36+ else if ((k == 1))
3737 then throw(((((toString(k) + " ") + toBase58String(m)) + " ") + toString(l)))
3838 else if (if ((k > 0))
3939 then (f > k)
4040 else false)
4141 then {
4242 let n = addressFromStringValue(i)
4343 let w = $Tuple2(m, l)
4444 let q = w._1
4545 let p = w._2
4646 let r = invoke(n, "exchange", [c[k]], [AttachedPayment(q, p)])
4747 if ((r == r))
4848 then {
4949 let s = r
5050 if ($isInstanceOf(s, "(Int, ByteVector)"))
5151 then {
5252 let r = s
5353 let x = r
5454 let u = x._1
5555 let v = x._2
5656 $Tuple3((k + 1), u, v)
5757 }
5858 else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
5959 }
6060 else throw("Strict value is not equal to itself.")
6161 }
6262 else h
6363 }
6464
6565 let y = {
6666 let z = b
6767 let A = size(z)
6868 let B = $Tuple3(0, 0, base58'')
6969 if ((A == 0))
7070 then B
7171 else {
7272 let C = g(B, z[0])
7373 if ((A == 1))
7474 then C
7575 else {
7676 let D = g(C, z[1])
7777 if ((A == 2))
7878 then D
7979 else {
8080 let E = g(D, z[2])
8181 if ((A == 3))
8282 then E
8383 else {
8484 let F = g(E, z[3])
8585 throw("List size exceed 3")
8686 }
8787 }
8888 }
8989 }
9090 }
9191 let k = y._1
9292 let l = y._2
9393 let m = y._3
9494 let G = assetBalance(this, d)
9595 if (if ((k == f))
9696 then (G >= e)
9797 else false)
9898 then [ScriptTransfer(a.caller, G, d)]
9999 else throw("routing != routingSize or amountToRecieve < minAmountToReceive")
100100 }
101101
102102

github/deemru/w8io/026f985 
22.22 ms