tx · J1oT2zq5ecigcLuuSDfcrV2XmV7y8ewebrBc1cUtPv1m

3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL:  -0.01000000 Waves

2021.09.12 19:43 [1700092] smart account 3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL > SELF 0.00000000 Waves

{ "type": 13, "id": "J1oT2zq5ecigcLuuSDfcrV2XmV7y8ewebrBc1cUtPv1m", "fee": 1000000, "feeAssetId": null, "timestamp": 1631465020864, "version": 2, "chainId": 84, "sender": "3N6qtbZbSPVcvJ1pk87e9ahdsZTjHN8e5mL", "senderPublicKey": "EYAKsFBespqQveBrfmX29rsehBJrSwQ3B6yN4ADyw8Kx", "proofs": [ "2W5z4LRx8DMn36uhXLSX1t6qhx7CacUVQGqfYv7bbnQdCVgXSwyKZKrbyKB62XpJugorjjWQffH7CfiRinbvXAnP" ], "script": "base64:AAIFAAAAAAAAAA0IAhIJCgcYGBERGAIBAAAACQAAAAAHZGlnaXRzOAAAAAAAAAAACAAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAdzY2FsZTEyAAAAAOjUpRAAAAAAAAVhbHBoYQAAAAAAAAAAMgAAAAALYWxwaGFEaWdpdHMAAAAAAAAAAAIAAAAABGJldGEAAAAAAAK954ABAAAACHNrZXduZXNzAAAAAgAAAAF4AAAAAXkJAABpAAAAAgkAAGkAAAACCQAAZAAAAAIJAABrAAAAAwUAAAAHc2NhbGUxMgUAAAABeAUAAAABeQkAAGsAAAADBQAAAAdzY2FsZTEyBQAAAAF5BQAAAAF4AAAAAAAAAAACAAAAAAAAACcQAQAAAA1pbnZhcmlhbnRDYWxjAAAAAgAAAAF4AAAAAXkEAAAAAnNrCQEAAAAIc2tld25lc3MAAAACBQAAAAF4BQAAAAF5CQAAZAAAAAIJAABrAAAAAwkAAGQAAAACBQAAAAF4BQAAAAF5BQAAAAZzY2FsZTgJAABsAAAABgUAAAACc2sFAAAAB2RpZ2l0czgFAAAABWFscGhhBQAAAAthbHBo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AAAACXzMEAAAAD2Ftb3VudFRvUmVjaWV2ZQkAA/AAAAACBQAAAAR0aGlzBQAAAA5yZWNlaXZlQXNzZXRJZAMDCQAAAAAAAAIFAAAAD2V4Y2hhbmdlQ291bnRlcgUAAAALcm91dGluZ1NpemUJAABnAAAAAgUAAAAPYW1vdW50VG9SZWNpZXZlBQAAABJtaW5BbW91bnRUb1JlY2VpdmUHCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAPYW1vdW50VG9SZWNpZXZlBQAAAA5yZWNlaXZlQXNzZXRJZAUAAAADbmlsCQAAAgAAAAECAAAAPnJvdXRpbmcgIT0gcm91dGluZ1NpemUgb3IgYW1vdW50VG9SZWNpZXZlIDwgbWluQW1vdW50VG9SZWNlaXZlAAAAAJ+dP9k=", "height": 1700092, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6CoGrzaJZUahx98SML7CJY5yK3uZfPXFx43PPhmbJ4tU Next: 3vaq6DDtiEi3KmR3cUeBf33CxsEFBV6ZjcdqoiHMd8EM Diff:
OldNewDifferences
5454 }
5555 else throw("Incorrect exchange type")
5656 if (true)
57- then throw(((toString(z) + " ") + toString(n)))
57+ then throw(((toString(D) + " ") + toString(n)))
5858 else if ((D >= n))
5959 then true
6060 else false
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 8
55
66 let b = 100000000
77
88 let c = 1000000000000
99
1010 let d = 50
1111
1212 let e = 2
1313
1414 let f = 46000000
1515
1616 func g (h,i) = (((fraction(c, h, i) + fraction(c, i, h)) / 2) / 10000)
1717
1818
1919 func j (h,i) = {
2020 let k = g(h, i)
2121 (fraction((h + i), b, pow(k, a, d, e, a, CEILING)) + (2 * fraction(pow(fraction(h, i, b), 0, 5, 1, (a / 2), DOWN), pow((k - f), a, d, e, a, DOWN), b)))
2222 }
2323
2424
2525 func l (m,n,o,p,q,r,s) = {
2626 let t = 3000
2727 let u = 1000000
2828 let v = getIntegerValue(addressFromStringValue(o[0]), q[0])
2929 let w = getIntegerValue(addressFromStringValue(o[0]), q[1])
3030 let x = getIntegerValue(addressFromStringValue(o[1]), q[2])
3131 let y = getIntegerValue(addressFromStringValue(o[1]), q[3])
3232 let z = if ((p[0] == "cpmm"))
3333 then {
3434 let A = fraction(w, m, (m + v))
3535 fraction(A, (u - t), u)
3636 }
3737 else if ((p[0] == "flat"))
3838 then {
3939 let B = j(v, w)
4040 let C = j((v + m), (w - s[0]))
4141 s[0]
4242 }
4343 else throw("Incorrect exchange type")
4444 let D = if ((p[1] == "cpmm"))
4545 then {
4646 let E = fraction(y, z, (z + x))
4747 fraction(E, (u - t), u)
4848 }
4949 else if ((p[1] == "flat"))
5050 then {
5151 let B = j(x, y)
5252 let C = j((x + z), (y - s[1]))
5353 s[1]
5454 }
5555 else throw("Incorrect exchange type")
5656 if (true)
57- then throw(((toString(z) + " ") + toString(n)))
57+ then throw(((toString(D) + " ") + toString(n)))
5858 else if ((D >= n))
5959 then true
6060 else false
6161 }
6262
6363
6464 @Callable(F)
6565 func routingTrade (o,p,r,s,q,G,n) = {
6666 let H = $Tuple2(F.payments[0].amount, F.payments[0].assetId)
6767 let m = H._1
6868 let I = H._2
6969 if (!(l(m, n, o, p, q, r, s)))
7070 then throw("Check transaction possibilty: declined")
7171 else {
7272 let J = size(o)
7373 func K (L,M) = {
7474 let N = L
7575 let O = N._1
7676 let P = N._2
7777 let Q = N._3
7878 if ((O == 0))
7979 then {
8080 let R = addressFromStringValue(M)
8181 let S = if ((p[O] == "cpmm"))
8282 then invoke(R, "exchange", [r[O]], [AttachedPayment(I, m)])
8383 else if ((p[O] == "flat"))
8484 then invoke(R, "exchange", [r[O], s[O]], [AttachedPayment(I, m)])
8585 else throw("Incorrect exchange type")
8686 if ((S == S))
8787 then {
8888 let T = S
8989 if ($isInstanceOf(T, "(Int, ByteVector)"))
9090 then {
9191 let S = T
9292 let U = S
9393 let V = U._1
9494 let W = U._2
9595 $Tuple3((O + 1), V, W)
9696 }
9797 else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
9898 }
9999 else throw("Strict value is not equal to itself.")
100100 }
101101 else if (if ((O > 0))
102102 then (J > O)
103103 else false)
104104 then {
105105 let R = addressFromStringValue(M)
106106 let X = $Tuple2(Q, P)
107107 let Y = X._1
108108 let Z = X._2
109109 let S = if ((p[O] == "cpmm"))
110110 then invoke(R, "exchange", [r[O]], [AttachedPayment(Y, Z)])
111111 else if ((p[O] == "flat"))
112112 then invoke(R, "exchange", [r[O], s[O]], [AttachedPayment(Y, Z)])
113113 else throw("Incorrect exchange type")
114114 if ((S == S))
115115 then {
116116 let T = S
117117 if ($isInstanceOf(T, "(Int, ByteVector)"))
118118 then {
119119 let S = T
120120 let aa = S
121121 let V = aa._1
122122 let W = aa._2
123123 $Tuple3((O + 1), V, W)
124124 }
125125 else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
126126 }
127127 else throw("Strict value is not equal to itself.")
128128 }
129129 else L
130130 }
131131
132132 let ab = {
133133 let ac = o
134134 let ad = size(ac)
135135 let ae = $Tuple3(0, 0, base58'')
136136 if ((ad == 0))
137137 then ae
138138 else {
139139 let af = K(ae, ac[0])
140140 if ((ad == 1))
141141 then af
142142 else {
143143 let ag = K(af, ac[1])
144144 if ((ad == 2))
145145 then ag
146146 else {
147147 let ah = K(ag, ac[2])
148148 if ((ad == 3))
149149 then ah
150150 else {
151151 let ai = K(ah, ac[3])
152152 throw("List size exceed 3")
153153 }
154154 }
155155 }
156156 }
157157 }
158158 let O = ab._1
159159 let P = ab._2
160160 let Q = ab._3
161161 let aj = assetBalance(this, G)
162162 if (if ((O == J))
163163 then (aj >= n)
164164 else false)
165165 then [ScriptTransfer(F.caller, aj, G)]
166166 else throw("routing != routingSize or amountToRecieve < minAmountToReceive")
167167 }
168168 }
169169
170170

github/deemru/w8io/026f985 
41.69 ms