tx · Eex18D8BYFBPnqRLQKrg5yMj4Wow2uSkap5XsGFEsLK6

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.08.31 23:47 [1683018] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "Eex18D8BYFBPnqRLQKrg5yMj4Wow2uSkap5XsGFEsLK6", "fee": 1000000, "feeAssetId": null, "timestamp": 1630442891959, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "2vAcKjsuiQiCeVgYdzNXavVhKUKBtTiN27edP1hVBzqm3dsoQH9mxTFMr2uUBnB2FLBjrTwXXdyCpY9izVzWzd8" ], "script": "base64:AAIFAAAAAAAAAoQIAhIGCgQYEQIBGgcKAmExEgFpGhAKAmEyEgpleGNoYW5nZXJzGgoKAmEzEgRhcmdzGhQKAmE0Eg5yZWNlaXZlQXNzZXRJZBoYCgJhNRISbWluQW1vdW50VG9SZWNlaXZlGhEKAmE2Egtyb3V0aW5nU2l6ZRoSCgJhNxIMZXhjaGFuZ2VGb2xkGhEKAmE4EgthY2N1bXVsYXRlZBoPCgJhORIJZXhjaGFuZ2VyGg8KAmIxEgkkdDA5MzU5OTgaFQoCYjISD2V4Y2hhbmdlQ291bnRlchoUCgJiMxIOYW1vdW50c1dpdGhGZWUaEgoCYjQSDGFzc2V0c0lkU2VuZBoWCgJiNRIQZXhjaGFuZ2VyQWRkcmVzcxoRCgJiNhILJHQwMTExODExOTIaDwoCYjcSCXBtdEFtb3VudBoQCgJiOBIKcG10QXNzZXRJZBoJCgJiORIDaW52Gg0KAmMxEgckbWF0Y2gwGhEKAmMyEgskdDAxNDIwMTQ1OBoTCgJjMxINYW1vdW50V2l0aEZlZRoRCgJjNBILYXNzZXRJZFNlbmQaEQoCYzUS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1JlY2VpdmUAAAAANdmH4g==", "height": 1683018, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Etm5MQN1TzsssDx3HaSNwdHysxHzgFXEhZNvUD4ysCCG Next: CqQyoaBgcUWSLSt3WHWNGEgCK2vf4qhu17BwAtZJeQ24 Diff:
OldNewDifferences
3636 else if (if ((k > 0))
3737 then (f > k)
3838 else false)
39- then throw(((toBase58String(m) + " ") + toString(l)))
39+ then {
40+ let n = addressFromStringValue(i)
41+ let w = $Tuple2(m, l)
42+ let q = w._1
43+ let p = w._2
44+ let r = invoke(n, "exchange", [c[k]], [AttachedPayment(q, p)])
45+ if ((r == r))
46+ then {
47+ let s = r
48+ if ($isInstanceOf(s, "(Int, ByteVector)"))
49+ then {
50+ let r = s
51+ let x = r
52+ let u = x._1
53+ let v = x._2
54+ $Tuple3((k + 1), u, v)
55+ }
56+ else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
57+ }
58+ else throw("Strict value is not equal to itself.")
59+ }
4060 else h
4161 }
4262
43- let w = {
44- let x = b
45- let y = size(x)
46- let z = $Tuple3(0, 0, base58'')
47- if ((y == 0))
48- then z
63+ let y = {
64+ let z = b
65+ let A = size(z)
66+ let B = $Tuple3(0, 0, base58'')
67+ if ((A == 0))
68+ then B
4969 else {
50- let A = g(z, x[0])
51- if ((y == 1))
52- then A
70+ let C = g(B, z[0])
71+ if ((A == 1))
72+ then C
5373 else {
54- let B = g(A, x[1])
55- if ((y == 2))
56- then B
74+ let D = g(C, z[1])
75+ if ((A == 2))
76+ then D
5777 else {
58- let C = g(B, x[2])
59- if ((y == 3))
60- then C
78+ let E = g(D, z[2])
79+ if ((A == 3))
80+ then E
6181 else {
62- let D = g(C, x[3])
82+ let F = g(E, z[3])
6383 throw("List size exceed 3")
6484 }
6585 }
6686 }
6787 }
6888 }
69- let k = w._1
70- let l = w._2
71- let m = w._3
72- let E = assetBalance(this, d)
89+ let k = y._1
90+ let l = y._2
91+ let m = y._3
92+ let G = assetBalance(this, d)
7393 if (if ((k == f))
74- then (E >= e)
94+ then (G >= e)
7595 else false)
76- then [ScriptTransfer(a.caller, E, d)]
96+ then [ScriptTransfer(a.caller, G, d)]
7797 else throw("routing != routingSize or amountToRecieve < minAmountToReceive")
7898 }
7999
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 }
3636 else if (if ((k > 0))
3737 then (f > k)
3838 else false)
39- then throw(((toBase58String(m) + " ") + toString(l)))
39+ then {
40+ let n = addressFromStringValue(i)
41+ let w = $Tuple2(m, l)
42+ let q = w._1
43+ let p = w._2
44+ let r = invoke(n, "exchange", [c[k]], [AttachedPayment(q, p)])
45+ if ((r == r))
46+ then {
47+ let s = r
48+ if ($isInstanceOf(s, "(Int, ByteVector)"))
49+ then {
50+ let r = s
51+ let x = r
52+ let u = x._1
53+ let v = x._2
54+ $Tuple3((k + 1), u, v)
55+ }
56+ else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
57+ }
58+ else throw("Strict value is not equal to itself.")
59+ }
4060 else h
4161 }
4262
43- let w = {
44- let x = b
45- let y = size(x)
46- let z = $Tuple3(0, 0, base58'')
47- if ((y == 0))
48- then z
63+ let y = {
64+ let z = b
65+ let A = size(z)
66+ let B = $Tuple3(0, 0, base58'')
67+ if ((A == 0))
68+ then B
4969 else {
50- let A = g(z, x[0])
51- if ((y == 1))
52- then A
70+ let C = g(B, z[0])
71+ if ((A == 1))
72+ then C
5373 else {
54- let B = g(A, x[1])
55- if ((y == 2))
56- then B
74+ let D = g(C, z[1])
75+ if ((A == 2))
76+ then D
5777 else {
58- let C = g(B, x[2])
59- if ((y == 3))
60- then C
78+ let E = g(D, z[2])
79+ if ((A == 3))
80+ then E
6181 else {
62- let D = g(C, x[3])
82+ let F = g(E, z[3])
6383 throw("List size exceed 3")
6484 }
6585 }
6686 }
6787 }
6888 }
69- let k = w._1
70- let l = w._2
71- let m = w._3
72- let E = assetBalance(this, d)
89+ let k = y._1
90+ let l = y._2
91+ let m = y._3
92+ let G = assetBalance(this, d)
7393 if (if ((k == f))
74- then (E >= e)
94+ then (G >= e)
7595 else false)
76- then [ScriptTransfer(a.caller, E, d)]
96+ then [ScriptTransfer(a.caller, G, d)]
7797 else throw("routing != routingSize or amountToRecieve < minAmountToReceive")
7898 }
7999
80100

github/deemru/w8io/169f3d6 
137.33 ms