tx · AGf5gH31wVmghTYnEYRiYE8sxUGvwXCudkWSEQALvWqj

3MqDf9VgoL9eqrCPx8F74Au6xBpvdTm9UP8:  -0.14000000 Waves

2022.06.02 14:17 [2078639] smart account 3MqDf9VgoL9eqrCPx8F74Au6xBpvdTm9UP8 > SELF 0.00000000 Waves

{ "type": 13, "id": "AGf5gH31wVmghTYnEYRiYE8sxUGvwXCudkWSEQALvWqj", "fee": 14000000, "feeAssetId": null, "timestamp": 1654168626410, "version": 2, "chainId": 84, "sender": "3MqDf9VgoL9eqrCPx8F74Au6xBpvdTm9UP8", "senderPublicKey": "4ja2PX5eqM576zv9KGzu5Qe7M92Z3jbuSmkLPdGjK4ue", "proofs": [ "3osEDSHDcgmXiDq5t997vRYKsgS1ZSTw5e8iRBozkoyt7BR2oTYHNyPH6DBok93BF5jXCUwT5o2u674eXwpMhE6o", "3CiHhTi8YU3AmcTRcthEASrZ6SUn4hk1jm314WmXxJ8C52sHfGp8jphcYW6CKynQU3q196cVCy8AV1UAeenk3yhw" ], "script": "base64:AAIFAAAAAAAAABAIAhIICgYYGBERGAESABIAAAAAJQAAAAAHa0FjdGl2ZQIAAAAGYWN0aXZlAAAAAAZrQ2F1c2UCAAAADnNodXRkb3duX2NhdXNlAAAAAA1rUG9vbEluT3JhY2xlAgAAAAVwb29sXwAAAAAOa1VzZXJTd29wSW5Hb3YCAAAADF9TV09QX2Ftb3VudAAAAAAKa0Rpc2NvdW50cwIAAAAJZGlzY291bnRzAAAAAA9rRGlzY291bnRWYWx1ZXMCAAAAD2Rpc2NvdW50X3ZhbHVlcwAAAAALa1JvdXRpbmdGZWUCAAAAC3JvdXRpbmdfZmVlAAAAAA1rQWRtaW5QdWJLZXkxAgAAAAthZG1pbl9wdWJfMQAAAAANa0FkbWluUHViS2V5MgIAAAALYWRtaW5fcHViXzIAAAAADWtBZG1pblB1YktleTMCAAAAC2FkbWluX3B1Yl8zAAAAABBrTW9uZXlCb3hBZGRyZXNzAgAAABFtb25leV9ib3hf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AAAAAAAAAAAAJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAEmFkbWluUHViS2V5MVNpZ25lZAUAAAASYWRtaW5QdWJLZXkyU2lnbmVkBQAAABJhZG1pblB1YktleTNTaWduZWQAAAAAAAAAAAIEAAAAByRtYXRjaDAFAAAAAnR4BQAAABNtdWx0aVNpZ25lZEJ5QWRtaW5zm9b11w==", "height": 2078639, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BNksmBfsvFo3wKhqhpG7cR2v3R84wAddhAmrLbQo9QCR Next: 3RmRwRySRNKjzx8kLkRPiDrmVe3woY2LPiJPRsnkcGFH Diff:
OldNewDifferences
55
66 let b = "shutdown_cause"
77
8-let c = "routing_fee"
8+let c = "pool_"
99
10-let d = "admin_pub_1"
10+let d = "_SWOP_amount"
1111
12-let e = "admin_pub_2"
12+let e = "discounts"
1313
14-let f = "admin_pub_3"
14+let f = "discount_values"
1515
16-let g = "money_box_address"
16+let g = "routing_fee"
1717
18-let h = "pool_"
18+let h = "admin_pub_1"
1919
20-let i = 8
20+let i = "admin_pub_2"
2121
22-let j = 100000000
22+let j = "admin_pub_3"
2323
24-let k = 10000000000000000
24+let k = "money_box_address"
2525
26-let l = 50
26+let l = "governance_address"
2727
28-let m = 2
28+let m = "commission"
2929
30-let n = 4600000000000000
30+let n = 8
3131
32-let o = 3000
32+let o = 100000000
3333
34-let p = 1000000
34+let p = 10000000000000000
3535
36-let q = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
36+let q = 50
3737
38-func r (s) = {
39- let t = getString(q, s)
40- if ($isInstanceOf(t, "String"))
38+let r = 2
39+
40+let s = 4600000000000000
41+
42+let t = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
43+
44+func u (v) = {
45+ let w = getString(t, v)
46+ if ($isInstanceOf(w, "String"))
4147 then {
42- let u = t
43- fromBase58String(u)
48+ let x = w
49+ fromBase58String(x)
4450 }
4551 else {
46- let v = t
47- throw((s + "is empty"))
52+ let y = w
53+ throw((v + "is empty"))
4854 }
4955 }
5056
5157
52-let w = r(d)
58+let z = u(h)
5359
54-let x = r(e)
60+let A = u(i)
5561
56-let y = r(f)
62+let B = u(j)
5763
58-let z = Address(r(g))
64+let C = Address(u(k))
5965
60-let A = valueOrElse(getBoolean(this, a), true)
66+let D = Address(u(l))
6167
62-let B = valueOrErrorMessage(getInteger(q, c), "routing_fee is empty")
68+let E = valueOrElse(getBoolean(this, a), true)
6369
64-let C = 1000000
70+let F = valueOrErrorMessage(getInteger(t, g), "routing_fee is empty")
6571
66-func D () = if (A)
72+let G = 1000000
73+
74+func H () = if (E)
6775 then unit
6876 else throw("DApp is inactive at this moment")
6977
7078
71-func E (F) = if (containsElement([w, x, y], F.callerPublicKey))
79+func I (J) = if (containsElement([z, A, B], J.callerPublicKey))
7280 then unit
7381 else throw("Only admin can call this function")
7482
7583
76-func G () = throw("DApp is already active")
84+func K () = throw("DApp is already active")
7785
7886
79-func H (I) = [BooleanEntry(a, false), StringEntry(b, I)]
87+func L (M) = [BooleanEntry(a, false), StringEntry(b, M)]
8088
8189
82-func J (K,L) = ((fraction(k, K, L) + fraction(k, L, K)) / 2)
90+func N (O,P) = ((fraction(p, O, P) + fraction(p, P, O)) / 2)
8391
8492
85-func M (K,L) = {
86- let N = J(K, L)
87- (fraction((K + L), k, pow(N, i, l, m, i, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(K), toBigInt(L), toBigInt(j)), 0, toBigInt(5), 1, (i / 2), DOWN)), pow((N - n), i, l, m, i, DOWN), j)))
93+func Q (O,P) = {
94+ let R = N(O, P)
95+ (fraction((O + P), p, pow(R, n, q, r, n, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(O), toBigInt(P), toBigInt(o)), 0, toBigInt(5), 1, (n / 2), DOWN)), pow((R - s), n, q, r, n, DOWN), o)))
8896 }
8997
9098
91-func O (P,Q,R,S,T,U,V) = {
92- let W = getIntegerValue(addressFromStringValue(R[0]), T[0])
93- let X = getIntegerValue(addressFromStringValue(R[0]), T[1])
94- let Y = getIntegerValue(addressFromStringValue(R[1]), T[2])
95- let Z = getIntegerValue(addressFromStringValue(R[1]), T[3])
96- let aa = if ((S[0] == "cpmm"))
99+func S (T) = {
100+ let U = valueOrElse(getInteger(D, (toString(T) + d)), 0)
101+ let V = split(getStringValue(t, f), ",")
102+ let W = split(getStringValue(t, e), ",")
103+ if (if ((U >= parseIntValue(V[0])))
104+ then (parseIntValue(V[1]) > U)
105+ else false)
106+ then (G - parseIntValue(W[0]))
107+ else if (if ((U >= parseIntValue(V[1])))
108+ then (parseIntValue(V[2]) > U)
109+ else false)
110+ then (G - parseIntValue(W[1]))
111+ else if (if ((U >= parseIntValue(V[2])))
112+ then (parseIntValue(V[3]) > U)
113+ else false)
114+ then (G - parseIntValue(W[2]))
115+ else if (if ((U >= parseIntValue(V[3])))
116+ then (parseIntValue(V[4]) > U)
117+ else false)
118+ then (G - parseIntValue(W[3]))
119+ else if ((U >= parseIntValue(V[4])))
120+ then (G - parseIntValue(W[4]))
121+ else G
122+ }
123+
124+
125+func X (Y,Z,aa,ab,ac,ad,ae,af) = {
126+ let ag = getIntegerValue(addressFromStringValue(ab[0]), ad[0])
127+ let ah = getIntegerValue(addressFromStringValue(ab[0]), ad[1])
128+ let ai = getIntegerValue(addressFromStringValue(ab[1]), ad[2])
129+ let aj = getIntegerValue(addressFromStringValue(ab[1]), ad[3])
130+ let ak = S(Y)
131+ let al = if ((ac[0] == "cpmm"))
97132 then {
98- let ab = fraction(X, P, (P + W))
99- fraction(ab, (p - o), p)
133+ let am = getIntegerValue(addressFromStringValue(ab[0]), m)
134+ let an = fraction(ah, Z, (Z + ag))
135+ fraction(an, (G - fraction(am, ak, G)), G)
100136 }
101- else if ((S[0] == "flat"))
137+ else if ((ac[0] == "flat"))
102138 then {
103- let ac = M(W, X)
104- let ad = V[0]
105- let ae = M((W + P), (X - ad))
106- if ((ae >= ac))
107- then ad
139+ let ao = Q(ag, ah)
140+ let ap = af[0]
141+ let aq = Q((ag + Z), (ah - ap))
142+ if ((aq >= ao))
143+ then ap
108144 else throw("Flat contract: invariantNew < invariant")
109145 }
110146 else throw("Incorrect exchange type")
111- let af = if ((S[1] == "cpmm"))
147+ let ar = if ((ac[1] == "cpmm"))
112148 then {
113- let ag = fraction(Z, aa, (aa + Y))
114- fraction(ag, (p - o), p)
149+ let as = fraction(aj, al, (al + ai))
150+ let am = getIntegerValue(addressFromStringValue(ab[0]), m)
151+ fraction(as, (G - fraction(am, ak, G)), G)
115152 }
116- else if ((S[1] == "flat"))
153+ else if ((ac[1] == "flat"))
117154 then {
118- let ac = M(Y, Z)
119- let ah = V[1]
120- let ae = M((Y + aa), (Z - ah))
121- if ((ae >= ac))
122- then ah
155+ let ao = Q(ai, aj)
156+ let at = af[1]
157+ let aq = Q((ai + al), (aj - at))
158+ if ((aq >= ao))
159+ then at
123160 else throw("Flat contract: invariantNew < invariant")
124161 }
125162 else throw("Incorrect exchange type")
126- (af >= Q)
163+ (ar >= aa)
127164 }
128165
129166
130-@Callable(F)
131-func routingTrade (R,S,U,V,T,Q) = valueOrElse(D(), {
132- let ai = $Tuple2(F.payments[0].amount, F.payments[0].assetId)
133- let P = ai._1
134- let aj = ai._2
135- if (!(O(P, Q, R, S, T, U, V)))
167+@Callable(J)
168+func routingTrade (ab,ac,ae,af,ad,aa) = valueOrElse(H(), {
169+ let au = $Tuple2(J.payments[0].amount, J.payments[0].assetId)
170+ let Z = au._1
171+ let av = au._2
172+ if (!(X(J.caller, Z, aa, ab, ac, ad, ae, af)))
136173 then throw("Check transaction possibilty: declined")
137- else if (if (!(isDefined(getString(q, (h + R[0])))))
174+ else if (if (!(isDefined(getString(t, (c + ab[0])))))
138175 then true
139- else !(isDefined(getString(q, (h + R[1])))))
176+ else !(isDefined(getString(t, (c + ab[1])))))
140177 then throw("Pool is not in oracle")
141178 else {
142- let ak = size(R)
143- func al (am,an) = {
144- let ao = am
145- let ap = ao._1
146- let aq = ao._2
147- let ar = ao._3
148- let as = if ((ap == 0))
149- then $Tuple2(aj, P)
150- else $Tuple2(ar, aq)
151- let at = as._1
152- let au = as._2
153- if (((if ((ap >= 0))
154- then (ak > ap)
179+ let aw = size(ab)
180+ func ax (ay,az) = {
181+ let aA = ay
182+ let aB = aA._1
183+ let aC = aA._2
184+ let aD = aA._3
185+ let aE = if ((aB == 0))
186+ then $Tuple2(av, Z)
187+ else $Tuple2(aD, aC)
188+ let aF = aE._1
189+ let aG = aE._2
190+ if (((if ((aB >= 0))
191+ then (aw > aB)
155192 else false) == true))
156193 then {
157- let av = addressFromStringValue(an)
158- let aw = if ((S[ap] == "cpmm"))
159- then invoke(av, "exchange", [U[ap]], [AttachedPayment(at, au)])
160- else if ((S[ap] == "flat"))
161- then invoke(av, "exchange", [U[ap], V[ap]], [AttachedPayment(at, au)])
194+ let aH = addressFromStringValue(az)
195+ let aI = if ((ac[aB] == "cpmm"))
196+ then invoke(aH, "exchange", [ae[aB]], [AttachedPayment(aF, aG)])
197+ else if ((ac[aB] == "flat"))
198+ then invoke(aH, "exchange", [ae[aB], af[aB]], [AttachedPayment(aF, aG)])
162199 else throw("Incorrect exchange type")
163- if ((aw == aw))
200+ if ((aI == aI))
164201 then {
165- let t = aw
166- if ($isInstanceOf(t, "(Int, ByteVector)"))
202+ let w = aI
203+ if (if ($isInstanceOf(w, "(Int, Unit)"))
204+ then true
205+ else $isInstanceOf(w, "(Int, ByteVector)"))
167206 then {
168- let aw = t
169- let ax = aw
170- let ay = ax._1
171- let az = ax._2
172- $Tuple3((ap + 1), ay, az)
207+ let aI = w
208+ let aJ = aI
209+ let aK = aJ._1
210+ let aL = aJ._2
211+ $Tuple3((aB + 1), aK, aL)
173212 }
174213 else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
175214 }
176215 else throw("Strict value is not equal to itself.")
177216 }
178- else am
217+ else ay
179218 }
180219
181- let aA = {
182- let aB = R
183- let aC = size(aB)
184- let aD = $Tuple3(0, 0, base58'')
185- func aE (aF,aG) = if ((aG >= aC))
186- then aF
187- else al(aF, aB[aG])
220+ let aM = {
221+ let aN = ab
222+ let aO = size(aN)
223+ let aP = $Tuple3(0, 0, base58'')
224+ func aQ (aR,aS) = if ((aS >= aO))
225+ then aR
226+ else ax(aR, aN[aS])
188227
189- func aH (aF,aG) = if ((aG >= aC))
190- then aF
228+ func aT (aR,aS) = if ((aS >= aO))
229+ then aR
191230 else throw("List size exceeds 3")
192231
193- aH(aE(aE(aE(aD, 0), 1), 2), 3)
232+ aT(aQ(aQ(aQ(aP, 0), 1), 2), 3)
194233 }
195- let ap = aA._1
196- let aI = aA._2
197- let az = aA._3
198- let ay = fraction(aI, (C - B), C)
199- if (if ((ap == ak))
200- then (ay >= Q)
234+ let aB = aM._1
235+ let aU = aM._2
236+ let aL = aM._3
237+ let aK = fraction(aU, (G - F), G)
238+ if (if ((aB == aw))
239+ then (aK >= aa)
201240 else false)
202- then [ScriptTransfer(F.caller, ay, az), ScriptTransfer(z, (aI - ay), az)]
241+ then [ScriptTransfer(J.caller, aK, aL), ScriptTransfer(C, (aU - aK), aL)]
203242 else throw("routing != routingSize or amountToRecieve < minAmountToReceive")
204243 }
205244 })
206245
207246
208247
209-@Callable(F)
210-func shutdown () = valueOrElse(E(F), if (!(A))
248+@Callable(J)
249+func shutdown () = valueOrElse(I(J), if (!(E))
211250 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified")))
212- else H("Paused by admin"))
251+ else L("Paused by admin"))
213252
214253
215254
216-@Callable(F)
217-func activate () = valueOrElse(E(F), if (A)
218- then G()
255+@Callable(J)
256+func activate () = valueOrElse(I(J), if (E)
257+ then K()
219258 else [BooleanEntry(a, true), DeleteEntry(b)])
220259
221260
222-@Verifier(aJ)
223-func aK () = {
224- let aL = {
225- let aM = if (sigVerify(aJ.bodyBytes, aJ.proofs[0], w))
261+@Verifier(aV)
262+func aW () = {
263+ let aX = {
264+ let aY = if (sigVerify(aV.bodyBytes, aV.proofs[0], z))
226265 then 1
227266 else 0
228- let aN = if (sigVerify(aJ.bodyBytes, aJ.proofs[1], x))
267+ let aZ = if (sigVerify(aV.bodyBytes, aV.proofs[1], A))
229268 then 1
230269 else 0
231- let aO = if (sigVerify(aJ.bodyBytes, aJ.proofs[2], y))
270+ let ba = if (sigVerify(aV.bodyBytes, aV.proofs[2], B))
232271 then 1
233272 else 0
234- (((aM + aN) + aO) >= 2)
273+ (((aY + aZ) + ba) >= 2)
235274 }
236- let t = aJ
237- aL
275+ let w = aV
276+ aX
238277 }
239278
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "active"
55
66 let b = "shutdown_cause"
77
8-let c = "routing_fee"
8+let c = "pool_"
99
10-let d = "admin_pub_1"
10+let d = "_SWOP_amount"
1111
12-let e = "admin_pub_2"
12+let e = "discounts"
1313
14-let f = "admin_pub_3"
14+let f = "discount_values"
1515
16-let g = "money_box_address"
16+let g = "routing_fee"
1717
18-let h = "pool_"
18+let h = "admin_pub_1"
1919
20-let i = 8
20+let i = "admin_pub_2"
2121
22-let j = 100000000
22+let j = "admin_pub_3"
2323
24-let k = 10000000000000000
24+let k = "money_box_address"
2525
26-let l = 50
26+let l = "governance_address"
2727
28-let m = 2
28+let m = "commission"
2929
30-let n = 4600000000000000
30+let n = 8
3131
32-let o = 3000
32+let o = 100000000
3333
34-let p = 1000000
34+let p = 10000000000000000
3535
36-let q = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
36+let q = 50
3737
38-func r (s) = {
39- let t = getString(q, s)
40- if ($isInstanceOf(t, "String"))
38+let r = 2
39+
40+let s = 4600000000000000
41+
42+let t = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
43+
44+func u (v) = {
45+ let w = getString(t, v)
46+ if ($isInstanceOf(w, "String"))
4147 then {
42- let u = t
43- fromBase58String(u)
48+ let x = w
49+ fromBase58String(x)
4450 }
4551 else {
46- let v = t
47- throw((s + "is empty"))
52+ let y = w
53+ throw((v + "is empty"))
4854 }
4955 }
5056
5157
52-let w = r(d)
58+let z = u(h)
5359
54-let x = r(e)
60+let A = u(i)
5561
56-let y = r(f)
62+let B = u(j)
5763
58-let z = Address(r(g))
64+let C = Address(u(k))
5965
60-let A = valueOrElse(getBoolean(this, a), true)
66+let D = Address(u(l))
6167
62-let B = valueOrErrorMessage(getInteger(q, c), "routing_fee is empty")
68+let E = valueOrElse(getBoolean(this, a), true)
6369
64-let C = 1000000
70+let F = valueOrErrorMessage(getInteger(t, g), "routing_fee is empty")
6571
66-func D () = if (A)
72+let G = 1000000
73+
74+func H () = if (E)
6775 then unit
6876 else throw("DApp is inactive at this moment")
6977
7078
71-func E (F) = if (containsElement([w, x, y], F.callerPublicKey))
79+func I (J) = if (containsElement([z, A, B], J.callerPublicKey))
7280 then unit
7381 else throw("Only admin can call this function")
7482
7583
76-func G () = throw("DApp is already active")
84+func K () = throw("DApp is already active")
7785
7886
79-func H (I) = [BooleanEntry(a, false), StringEntry(b, I)]
87+func L (M) = [BooleanEntry(a, false), StringEntry(b, M)]
8088
8189
82-func J (K,L) = ((fraction(k, K, L) + fraction(k, L, K)) / 2)
90+func N (O,P) = ((fraction(p, O, P) + fraction(p, P, O)) / 2)
8391
8492
85-func M (K,L) = {
86- let N = J(K, L)
87- (fraction((K + L), k, pow(N, i, l, m, i, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(K), toBigInt(L), toBigInt(j)), 0, toBigInt(5), 1, (i / 2), DOWN)), pow((N - n), i, l, m, i, DOWN), j)))
93+func Q (O,P) = {
94+ let R = N(O, P)
95+ (fraction((O + P), p, pow(R, n, q, r, n, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(O), toBigInt(P), toBigInt(o)), 0, toBigInt(5), 1, (n / 2), DOWN)), pow((R - s), n, q, r, n, DOWN), o)))
8896 }
8997
9098
91-func O (P,Q,R,S,T,U,V) = {
92- let W = getIntegerValue(addressFromStringValue(R[0]), T[0])
93- let X = getIntegerValue(addressFromStringValue(R[0]), T[1])
94- let Y = getIntegerValue(addressFromStringValue(R[1]), T[2])
95- let Z = getIntegerValue(addressFromStringValue(R[1]), T[3])
96- let aa = if ((S[0] == "cpmm"))
99+func S (T) = {
100+ let U = valueOrElse(getInteger(D, (toString(T) + d)), 0)
101+ let V = split(getStringValue(t, f), ",")
102+ let W = split(getStringValue(t, e), ",")
103+ if (if ((U >= parseIntValue(V[0])))
104+ then (parseIntValue(V[1]) > U)
105+ else false)
106+ then (G - parseIntValue(W[0]))
107+ else if (if ((U >= parseIntValue(V[1])))
108+ then (parseIntValue(V[2]) > U)
109+ else false)
110+ then (G - parseIntValue(W[1]))
111+ else if (if ((U >= parseIntValue(V[2])))
112+ then (parseIntValue(V[3]) > U)
113+ else false)
114+ then (G - parseIntValue(W[2]))
115+ else if (if ((U >= parseIntValue(V[3])))
116+ then (parseIntValue(V[4]) > U)
117+ else false)
118+ then (G - parseIntValue(W[3]))
119+ else if ((U >= parseIntValue(V[4])))
120+ then (G - parseIntValue(W[4]))
121+ else G
122+ }
123+
124+
125+func X (Y,Z,aa,ab,ac,ad,ae,af) = {
126+ let ag = getIntegerValue(addressFromStringValue(ab[0]), ad[0])
127+ let ah = getIntegerValue(addressFromStringValue(ab[0]), ad[1])
128+ let ai = getIntegerValue(addressFromStringValue(ab[1]), ad[2])
129+ let aj = getIntegerValue(addressFromStringValue(ab[1]), ad[3])
130+ let ak = S(Y)
131+ let al = if ((ac[0] == "cpmm"))
97132 then {
98- let ab = fraction(X, P, (P + W))
99- fraction(ab, (p - o), p)
133+ let am = getIntegerValue(addressFromStringValue(ab[0]), m)
134+ let an = fraction(ah, Z, (Z + ag))
135+ fraction(an, (G - fraction(am, ak, G)), G)
100136 }
101- else if ((S[0] == "flat"))
137+ else if ((ac[0] == "flat"))
102138 then {
103- let ac = M(W, X)
104- let ad = V[0]
105- let ae = M((W + P), (X - ad))
106- if ((ae >= ac))
107- then ad
139+ let ao = Q(ag, ah)
140+ let ap = af[0]
141+ let aq = Q((ag + Z), (ah - ap))
142+ if ((aq >= ao))
143+ then ap
108144 else throw("Flat contract: invariantNew < invariant")
109145 }
110146 else throw("Incorrect exchange type")
111- let af = if ((S[1] == "cpmm"))
147+ let ar = if ((ac[1] == "cpmm"))
112148 then {
113- let ag = fraction(Z, aa, (aa + Y))
114- fraction(ag, (p - o), p)
149+ let as = fraction(aj, al, (al + ai))
150+ let am = getIntegerValue(addressFromStringValue(ab[0]), m)
151+ fraction(as, (G - fraction(am, ak, G)), G)
115152 }
116- else if ((S[1] == "flat"))
153+ else if ((ac[1] == "flat"))
117154 then {
118- let ac = M(Y, Z)
119- let ah = V[1]
120- let ae = M((Y + aa), (Z - ah))
121- if ((ae >= ac))
122- then ah
155+ let ao = Q(ai, aj)
156+ let at = af[1]
157+ let aq = Q((ai + al), (aj - at))
158+ if ((aq >= ao))
159+ then at
123160 else throw("Flat contract: invariantNew < invariant")
124161 }
125162 else throw("Incorrect exchange type")
126- (af >= Q)
163+ (ar >= aa)
127164 }
128165
129166
130-@Callable(F)
131-func routingTrade (R,S,U,V,T,Q) = valueOrElse(D(), {
132- let ai = $Tuple2(F.payments[0].amount, F.payments[0].assetId)
133- let P = ai._1
134- let aj = ai._2
135- if (!(O(P, Q, R, S, T, U, V)))
167+@Callable(J)
168+func routingTrade (ab,ac,ae,af,ad,aa) = valueOrElse(H(), {
169+ let au = $Tuple2(J.payments[0].amount, J.payments[0].assetId)
170+ let Z = au._1
171+ let av = au._2
172+ if (!(X(J.caller, Z, aa, ab, ac, ad, ae, af)))
136173 then throw("Check transaction possibilty: declined")
137- else if (if (!(isDefined(getString(q, (h + R[0])))))
174+ else if (if (!(isDefined(getString(t, (c + ab[0])))))
138175 then true
139- else !(isDefined(getString(q, (h + R[1])))))
176+ else !(isDefined(getString(t, (c + ab[1])))))
140177 then throw("Pool is not in oracle")
141178 else {
142- let ak = size(R)
143- func al (am,an) = {
144- let ao = am
145- let ap = ao._1
146- let aq = ao._2
147- let ar = ao._3
148- let as = if ((ap == 0))
149- then $Tuple2(aj, P)
150- else $Tuple2(ar, aq)
151- let at = as._1
152- let au = as._2
153- if (((if ((ap >= 0))
154- then (ak > ap)
179+ let aw = size(ab)
180+ func ax (ay,az) = {
181+ let aA = ay
182+ let aB = aA._1
183+ let aC = aA._2
184+ let aD = aA._3
185+ let aE = if ((aB == 0))
186+ then $Tuple2(av, Z)
187+ else $Tuple2(aD, aC)
188+ let aF = aE._1
189+ let aG = aE._2
190+ if (((if ((aB >= 0))
191+ then (aw > aB)
155192 else false) == true))
156193 then {
157- let av = addressFromStringValue(an)
158- let aw = if ((S[ap] == "cpmm"))
159- then invoke(av, "exchange", [U[ap]], [AttachedPayment(at, au)])
160- else if ((S[ap] == "flat"))
161- then invoke(av, "exchange", [U[ap], V[ap]], [AttachedPayment(at, au)])
194+ let aH = addressFromStringValue(az)
195+ let aI = if ((ac[aB] == "cpmm"))
196+ then invoke(aH, "exchange", [ae[aB]], [AttachedPayment(aF, aG)])
197+ else if ((ac[aB] == "flat"))
198+ then invoke(aH, "exchange", [ae[aB], af[aB]], [AttachedPayment(aF, aG)])
162199 else throw("Incorrect exchange type")
163- if ((aw == aw))
200+ if ((aI == aI))
164201 then {
165- let t = aw
166- if ($isInstanceOf(t, "(Int, ByteVector)"))
202+ let w = aI
203+ if (if ($isInstanceOf(w, "(Int, Unit)"))
204+ then true
205+ else $isInstanceOf(w, "(Int, ByteVector)"))
167206 then {
168- let aw = t
169- let ax = aw
170- let ay = ax._1
171- let az = ax._2
172- $Tuple3((ap + 1), ay, az)
207+ let aI = w
208+ let aJ = aI
209+ let aK = aJ._1
210+ let aL = aJ._2
211+ $Tuple3((aB + 1), aK, aL)
173212 }
174213 else throw("Incorrect invoke result: expected amountWithFee and assetsIdSend")
175214 }
176215 else throw("Strict value is not equal to itself.")
177216 }
178- else am
217+ else ay
179218 }
180219
181- let aA = {
182- let aB = R
183- let aC = size(aB)
184- let aD = $Tuple3(0, 0, base58'')
185- func aE (aF,aG) = if ((aG >= aC))
186- then aF
187- else al(aF, aB[aG])
220+ let aM = {
221+ let aN = ab
222+ let aO = size(aN)
223+ let aP = $Tuple3(0, 0, base58'')
224+ func aQ (aR,aS) = if ((aS >= aO))
225+ then aR
226+ else ax(aR, aN[aS])
188227
189- func aH (aF,aG) = if ((aG >= aC))
190- then aF
228+ func aT (aR,aS) = if ((aS >= aO))
229+ then aR
191230 else throw("List size exceeds 3")
192231
193- aH(aE(aE(aE(aD, 0), 1), 2), 3)
232+ aT(aQ(aQ(aQ(aP, 0), 1), 2), 3)
194233 }
195- let ap = aA._1
196- let aI = aA._2
197- let az = aA._3
198- let ay = fraction(aI, (C - B), C)
199- if (if ((ap == ak))
200- then (ay >= Q)
234+ let aB = aM._1
235+ let aU = aM._2
236+ let aL = aM._3
237+ let aK = fraction(aU, (G - F), G)
238+ if (if ((aB == aw))
239+ then (aK >= aa)
201240 else false)
202- then [ScriptTransfer(F.caller, ay, az), ScriptTransfer(z, (aI - ay), az)]
241+ then [ScriptTransfer(J.caller, aK, aL), ScriptTransfer(C, (aU - aK), aL)]
203242 else throw("routing != routingSize or amountToRecieve < minAmountToReceive")
204243 }
205244 })
206245
207246
208247
209-@Callable(F)
210-func shutdown () = valueOrElse(E(F), if (!(A))
248+@Callable(J)
249+func shutdown () = valueOrElse(I(J), if (!(E))
211250 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified")))
212- else H("Paused by admin"))
251+ else L("Paused by admin"))
213252
214253
215254
216-@Callable(F)
217-func activate () = valueOrElse(E(F), if (A)
218- then G()
255+@Callable(J)
256+func activate () = valueOrElse(I(J), if (E)
257+ then K()
219258 else [BooleanEntry(a, true), DeleteEntry(b)])
220259
221260
222-@Verifier(aJ)
223-func aK () = {
224- let aL = {
225- let aM = if (sigVerify(aJ.bodyBytes, aJ.proofs[0], w))
261+@Verifier(aV)
262+func aW () = {
263+ let aX = {
264+ let aY = if (sigVerify(aV.bodyBytes, aV.proofs[0], z))
226265 then 1
227266 else 0
228- let aN = if (sigVerify(aJ.bodyBytes, aJ.proofs[1], x))
267+ let aZ = if (sigVerify(aV.bodyBytes, aV.proofs[1], A))
229268 then 1
230269 else 0
231- let aO = if (sigVerify(aJ.bodyBytes, aJ.proofs[2], y))
270+ let ba = if (sigVerify(aV.bodyBytes, aV.proofs[2], B))
232271 then 1
233272 else 0
234- (((aM + aN) + aO) >= 2)
273+ (((aY + aZ) + ba) >= 2)
235274 }
236- let t = aJ
237- aL
275+ let w = aV
276+ aX
238277 }
239278

github/deemru/w8io/169f3d6 
96.08 ms