tx · 6373jjyRUYTgxBaBVtwzRSkzNuc6BxbTnUMUf5BVEYCY

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04100000 Waves

2023.10.16 12:14 [2800980] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "6373jjyRUYTgxBaBVtwzRSkzNuc6BxbTnUMUf5BVEYCY", "fee": 4100000, "feeAssetId": null, "timestamp": 1697447680401, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "ues6CZ3et91Zz3dtFAJsi3MoaE12T49jCPkNy4tRSHU5fgPVsWYUgoCWvDykCera7bs2JWGk1vPdMQzEvYDq3LS" ], "script": "base64:BgKkLQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIKYW1wSW5pdGlhbCIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzS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exity": 0 } View: original | compacted Prev: AwPmbhGtW4dtRJdkSzByyHGoNBCZoKqfKuoKSSEvckqR Next: 4qZofDJBLEPkMoXc1kvDN1rwSUvG7BCAEWSqeZVXrG5h Diff:
OldNewDifferences
2323
2424 let k = "WAVES"
2525
26-let l = "100"
26+let l = 50
2727
28-let m = "1"
28+let m = "100"
2929
30-let n = "__"
30+let n = "1"
3131
32-let o = ""
32+let o = "__"
3333
34-let p = 1
34+let p = ""
3535
36-let q = 2
36+let q = 1
3737
38-let r = 3
38+let r = 2
3939
40-let s = 4
40+let s = 3
4141
42-let t = 1
42+let t = 4
4343
44-let u = 2
44+let u = 1
4545
46-let v = 3
46+let v = 2
4747
48-let w = 4
48+let w = 3
4949
50-let x = 5
50+let x = 4
5151
52-let y = 6
52+let y = 5
5353
54-let z = 7
54+let z = 6
5555
56-let A = 8
56+let A = 7
5757
58-let B = 9
58+let B = 8
5959
60-let C = 1
60+let C = 9
6161
62-let D = 6
62+let D = 1
6363
64-let E = 7
64+let E = 6
6565
66-let F = 10
66+let F = 7
6767
68-let G = fraction(10, a, 10000)
68+let G = 10
6969
70-func H (I,J) = fraction(toBigInt(I), c, toBigInt(J))
70+let H = fraction(10, a, 10000)
71+
72+func I (J,K) = fraction(toBigInt(J), c, toBigInt(K))
7173
7274
73-func K (I,J) = fraction(I, c, J)
75+func L (J,K) = fraction(J, c, K)
7476
7577
76-func L (M,N) = toInt(fraction(M, toBigInt(N), c))
78+func M (N,O) = toInt(fraction(N, toBigInt(O), c))
7779
7880
79-func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P))
81+func P (N,O,Q) = toInt(fraction(N, toBigInt(O), c, Q))
8082
8183
82-func Q (I,J) = fraction(I, c, toBigInt(J))
84+func R (J,K) = fraction(J, c, toBigInt(K))
8385
8486
85-func R (M,N) = fraction(M, toBigInt(N), c)
87+func S (N,O) = fraction(N, toBigInt(O), c)
8688
8789
88-func S (T,U,V) = fraction(T, U, V)
90+func T (U,V,W) = fraction(U, V, W)
8991
9092
91-func W (M) = if ((d > M))
92- then -(M)
93- else M
93+func X (N) = if ((d > N))
94+ then -(N)
95+ else N
9496
9597
96-func X (M) = if ((d > M))
97- then -(M)
98- else M
98+func Y (N) = if ((d > N))
99+ then -(N)
100+ else N
99101
100102
101-func Y () = "%s__factoryContract"
103+func Z () = "%s__factoryContract"
102104
103105
104-func Z () = "%s__managerPublicKey"
106+func aa () = "%s__managerPublicKey"
105107
106108
107-func aa () = "%s__managerVaultAddress"
109+func ab () = "%s__managerVaultAddress"
108110
109111
110-func ab () = "%s%s__price__last"
112+func ac () = "%s%s__price__last"
111113
112114
113-func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n)
115+func ad (ae,af) = makeString(["%s%s%d%d__price__history", toString(ae), toString(af)], o)
114116
115117
116-func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah)
118+func ag (ah,ai) = ((("%s%s%s__P__" + ah) + "__") + ai)
117119
118120
119-func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah)
121+func aj (ah,ai) = ((("%s%s%s__G__" + ah) + "__") + ai)
120122
121123
122-func aj () = "%s__amountAsset"
124+func ak () = "%s__amountAsset"
123125
124126
125-func ak () = "%s__priceAsset"
127+func al () = "%s__priceAsset"
126128
127129
128-func al () = makeString(["%s%s", "amp", toString(this)], n)
130+func am () = "%s__amp"
129131
130132
131-let am = "%s__fee"
132-
133-let an = valueOrElse(getInteger(this, am), G)
134-
135-let ao = makeString(["%s", "dLp"], n)
136-
137-let ap = makeString(["%s", "dLpRefreshedHeight"], n)
138-
139-let aq = makeString(["%s", "refreshDLpDelay"], n)
140-
141-let ar = 30
142-
143-let as = valueOrElse(getInteger(this, aq), ar)
144-
145-func at () = "%s__factoryConfig"
133+func an (ao) = ("%s%d__amp__" + toString(ao))
146134
147135
148-func au () = "%s%s__matcher__publicKey"
136+func ap () = "%s__changeAmpLastCall"
149137
150138
151-func av (aw,ax) = (((("%d%d%s__" + aw) + "__") + ax) + "__config")
139+let aq = "%s__fee"
140+
141+let ar = valueOrElse(getInteger(this, aq), H)
142+
143+let as = makeString(["%s", "dLp"], o)
144+
145+let at = makeString(["%s", "dLpRefreshedHeight"], o)
146+
147+let au = makeString(["%s", "refreshDLpDelay"], o)
148+
149+let av = 30
150+
151+let aw = valueOrElse(getInteger(this, au), av)
152+
153+func ax () = "%s__factoryConfig"
152154
153155
154-func ay (az) = ("%s%s%s__mappings__baseAsset2internalId__" + az)
156+func ay () = "%s%s__matcher__publicKey"
155157
156158
157-func aA () = "%s__shutdown"
159+func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
158160
159161
160-func aB () = "%s__allowedLpStableScriptHash"
162+func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
161163
162164
163-func aC () = "%s__feeCollectorAddress"
165+func aE () = "%s__shutdown"
164166
165167
166-func aD (aE) = ("%s%s__skipOrderValidation__" + aE)
168+func aF () = "%s__allowedLpStableScriptHash"
167169
168170
169-func aF (aG,aH,aI,aJ) = throw((((((((("order validation failed: orderValid=" + toString(aG)) + " (") + aH) + ")") + " senderValid=") + toString(aI)) + " matcherValid=") + toString(aJ)))
171+func aG () = "%s__feeCollectorAddress"
170172
171173
172-func aK (aL) = {
173- let aM = addressFromString(aL)
174- if ($isInstanceOf(aM, "Address"))
174+func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
175+
176+
177+func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
178+
179+
180+func aO (aP) = {
181+ let aQ = addressFromString(aP)
182+ if ($isInstanceOf(aQ, "Address"))
175183 then {
176- let aN = aM
177- aN
184+ let aR = aQ
185+ aR
178186 }
179187 else this
180188 }
181189
182190
183-func aO () = {
184- let aP = {
185- let aM = getString(Y())
186- if ($isInstanceOf(aM, "String"))
191+func aS () = {
192+ let aT = {
193+ let aQ = getString(Z())
194+ if ($isInstanceOf(aQ, "String"))
187195 then {
188- let aQ = aM
189- aK(aQ)
196+ let aU = aQ
197+ aO(aU)
190198 }
191199 else this
192200 }
193- let aM = getString(aP, aa())
194- if ($isInstanceOf(aM, "String"))
201+ let aQ = getString(aT, ab())
202+ if ($isInstanceOf(aQ, "String"))
195203 then {
196- let aR = aM
197- aK(aR)
204+ let aV = aQ
205+ aO(aV)
198206 }
199207 else this
200208 }
201209
202210
203-func aS (aT,aU) = valueOrErrorMessage(getString(aT, aU), makeString(["mandatory ", toString(aT), ".", aU, " not defined"], ""))
211+func aW (aX,aY) = valueOrErrorMessage(getString(aX, aY), makeString(["mandatory ", toString(aX), ".", aY, " not defined"], ""))
204212
205213
206-func aV (aT,aU) = valueOrErrorMessage(getInteger(aT, aU), makeString(["mandatory ", toString(aT), ".", aU, " not defined"], ""))
214+func aZ (aX,aY) = valueOrErrorMessage(getInteger(aX, aY), makeString(["mandatory ", toString(aX), ".", aY, " not defined"], ""))
207215
208216
209-func aW (aX) = throw(makeString(["lp_stable.ride:", aX], " "))
217+func ba (bb) = throw(makeString(["lp_stable.ride:", bb], " "))
210218
211219
212-func aY (aX) = makeString(["lp_stable.ride:", aX], " ")
220+func bc (bb) = makeString(["lp_stable.ride:", bb], " ")
213221
214222
215-let aQ = addressFromStringValue(aS(this, Y()))
223+let aU = addressFromStringValue(aW(this, Z()))
216224
217-let aZ = {
218- let ba = invoke(aQ, "getInFeeREADONLY", [toString(this)], nil)
219- if ($isInstanceOf(ba, "Int"))
220- then ba
221- else throw(($getType(ba) + " couldn't be cast to Int"))
225+let bd = {
226+ let be = invoke(aU, "getInFeeREADONLY", [toString(this)], nil)
227+ if ($isInstanceOf(be, "Int"))
228+ then be
229+ else throw(($getType(be) + " couldn't be cast to Int"))
222230 }
223231
224-let bb = {
225- let ba = invoke(aQ, "getOutFeeREADONLY", [toString(this)], nil)
226- if ($isInstanceOf(ba, "Int"))
227- then ba
228- else throw(($getType(ba) + " couldn't be cast to Int"))
232+let bf = {
233+ let be = invoke(aU, "getOutFeeREADONLY", [toString(this)], nil)
234+ if ($isInstanceOf(be, "Int"))
235+ then be
236+ else throw(($getType(be) + " couldn't be cast to Int"))
229237 }
230238
231-let bc = aS(aQ, al())
239+let bg = aW(this, am())
232240
233-func bd () = valueOrElse(getBoolean(aQ, aA()), false)
241+func bh () = valueOrElse(getBoolean(aU, aE()), false)
234242
235243
236-func be () = fromBase58String(aS(aQ, au()))
244+func bi () = fromBase58String(aW(aU, ay()))
237245
238246
239-let bf = addressFromStringValue(aS(aQ, aC()))
247+let bj = addressFromStringValue(aW(aU, aG()))
240248
241-func bg () = {
242- let bh = aS(this, aj())
243- let bi = aS(this, ak())
244- let bj = aV(aQ, ay(bi))
245- let aw = aV(aQ, ay(bh))
246- split(aS(aQ, av(toString(aw), toString(bj))), n)
249+func bk () = {
250+ let bl = aW(this, ak())
251+ let bm = aW(this, al())
252+ let bn = aZ(aU, aC(bm))
253+ let aA = aZ(aU, aC(bl))
254+ split(aW(aU, az(toString(aA), toString(bn))), o)
247255 }
248256
249257
250-func bk (bl) = if ((bl == k))
258+func bo (bp) = if ((bp == k))
251259 then unit
252- else fromBase58String(bl)
260+ else fromBase58String(bp)
253261
254262
255-func bm (bl) = if ((bl == unit))
263+func bq (bp) = if ((bp == unit))
256264 then k
257- else toBase58String(value(bl))
265+ else toBase58String(value(bp))
258266
259267
260-func bn (bo) = $Tuple7(addressFromStringValue(bo[t]), parseIntValue(bo[u]), fromBase58String(bo[v]), bk(bo[w]), bk(bo[x]), parseIntValue(bo[y]), parseIntValue(bo[z]))
268+func br (bs) = $Tuple7(addressFromStringValue(bs[u]), parseIntValue(bs[v]), fromBase58String(bs[w]), bo(bs[x]), bo(bs[y]), parseIntValue(bs[z]), parseIntValue(bs[A]))
261269
262270
263-let bp = bn(bg())
271+let bt = br(bk())
264272
265-let bq = bp
273+let bu = bt
266274
267-let br = bq._1
275+let bv = bu._1
268276
269-let bs = bq._2
277+let bw = bu._2
270278
271-let bt = bq._3
279+let bx = bu._3
272280
273-let bu = bq._4
281+let by = bu._4
274282
275-let bv = bq._5
283+let bz = bu._5
276284
277-let bw = bq._6
285+let bA = bu._6
278286
279-let bx = bq._7
287+let bB = bu._7
280288
281-func by () = split(aS(aQ, at()), n)
289+func bC () = split(aW(aU, ax()), o)
282290
283291
284-let bz = by()
292+let bD = bC()
285293
286-let bA = valueOrErrorMessage(addressFromString(bz[C]), "Invalid staking contract address")
294+let bE = valueOrErrorMessage(addressFromString(bD[D]), "Invalid staking contract address")
287295
288-let bB = valueOrErrorMessage(addressFromString(bz[E]), "Invalid slipage contract address")
296+let bF = valueOrErrorMessage(addressFromString(bD[F]), "Invalid slipage contract address")
289297
290-let bC = valueOrErrorMessage(addressFromString(bz[F]), "Invalid gwx contract address")
298+let bG = valueOrErrorMessage(addressFromString(bD[G]), "Invalid gwx contract address")
291299
292-let bD = valueOrErrorMessage(addressFromString(bz[D]), "Invalid gwx contract address")
300+let bH = valueOrErrorMessage(addressFromString(bD[E]), "Invalid gwx contract address")
293301
294-func bE (bF,bG,bH,bI,bJ,bK,bL,bM,bN,bO) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN), toString(bO)], n)
302+func bI (bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN), toString(bO), toString(bP), toString(bQ), toString(bR), toString(bS)], o)
295303
296304
297-func bP (bQ,bR,bS,bI,bL,bM) = makeString(["%d%d%d%d%d%d", toString(bQ), toString(bR), toString(bS), toString(bI), toString(bL), toString(bM)], n)
305+func bT (bU,bV,bW,bM,bP,bQ) = makeString(["%d%d%d%d%d%d", toString(bU), toString(bV), toString(bW), toString(bM), toString(bP), toString(bQ)], o)
298306
299307
300-func bT (bU) = if ((bU == "WAVES"))
308+func bX (bY) = if ((bY == "WAVES"))
301309 then wavesBalance(this).available
302- else assetBalance(this, fromBase58String(bU))
310+ else assetBalance(this, fromBase58String(bY))
303311
304312
305-func bV (bW,bX) = fraction(bW, c, bX)
313+func bZ (ca,cb) = fraction(ca, c, cb)
306314
307315
308-func bY (bW,bX,P) = fraction(bW, c, bX, P)
316+func cc (ca,cb,Q) = fraction(ca, c, cb, Q)
309317
310318
311-func bZ (ca,cb,cc) = {
312- let cd = fraction((ca - cb), b, cb)
313- let ce = ((cc - W(cd)) > d)
314- if (!(ce))
315- then throw(("Big slpg: " + toString(cd)))
316- else $Tuple2(ce, min([ca, cb]))
319+func cd (ce,cf,cg) = {
320+ let ch = fraction((ce - cf), b, cf)
321+ let ci = ((cg - X(ch)) > d)
322+ if (!(ci))
323+ then throw(("Big slpg: " + toString(ch)))
324+ else $Tuple2(ci, min([ce, cf]))
317325 }
318326
319327
320-func cf (cg,ch,ci) = {
321- let cd = fraction(ch, b, cg)
322- let cj = (ci > cd)
323- if (if (cj)
328+func cj (ck,cl,cm) = {
329+ let ch = fraction(cl, b, ck)
330+ let cn = (cm > ch)
331+ if (if (cn)
324332 then true
325- else (ch > cg))
326- then throw(((((((toString(ch) + " ") + toString(cg)) + " ") + toString(cd)) + " ") + toString(ci)))
327- else cj
333+ else (cl > ck))
334+ then throw(((((((toString(cl) + " ") + toString(ck)) + " ") + toString(ch)) + " ") + toString(cm)))
335+ else cn
328336 }
329337
330338
331-func ck (cl,cm,cn,co) = {
332- let cp = H(cn, cl)
333- let cq = H(co, cm)
334- bV(cq, cp)
339+func co (cp,cq,cr,cs) = {
340+ let ct = I(cr, cp)
341+ let cu = I(cs, cq)
342+ bZ(cu, ct)
335343 }
336344
337345
338-func cr (cn,co,cs) = {
339- let ct = bw
340- let cu = bx
341- let cv = ck(ct, cu, cn, co)
342- let bX = H(cn, ct)
343- let bW = H(co, cu)
344- let cw = H(cs, a)
345- let cx = bV(bX, cw)
346- let cy = bV(bW, cw)
347-[cv, cx, cy]
346+func cv (cr,cs,cw) = {
347+ let cx = bA
348+ let cy = bB
349+ let cz = co(cx, cy, cr, cs)
350+ let cb = I(cr, cx)
351+ let ca = I(cs, cy)
352+ let cA = I(cw, a)
353+ let cB = bZ(cb, cA)
354+ let cC = bZ(ca, cA)
355+[cz, cB, cC]
348356 }
349357
350358
351-func cz (cn,co,cs) = {
352- let cA = cr(cn, co, cs)
353-[L(cA[0], a), L(cA[1], a), L(cA[2], a)]
359+func cD (cr,cs,cw) = {
360+ let cE = cv(cr, cs, cw)
361+[M(cE[0], a), M(cE[1], a), M(cE[2], a)]
354362 }
355363
356364
357-func cB (cC,an) = {
358- let cD = if ((an == 0))
365+func cF (cG,ar) = {
366+ let cH = if ((ar == 0))
359367 then 0
360- else fraction(cC, an, a)
361- $Tuple2((cC - cD), cD)
368+ else fraction(cG, ar, a)
369+ $Tuple2((cG - cH), cH)
362370 }
363371
364372
365-func cE (cF) = {
366- let cG = cF[0]
367- let cH = cF[1]
368- let aR = (cG + cH)
369- if ((aR == e))
373+func cI (cJ) = {
374+ let cK = cJ[0]
375+ let cL = cJ[1]
376+ let aV = (cK + cL)
377+ if ((aV == e))
370378 then e
371379 else {
372- let aN = parseIntValue(bc)
373- let cI = (aN * 2)
374- let cA = fraction(cG, cH, f)
375- let cJ = fraction(cA, i, f)
376- let cK = fraction(toBigInt(cI), aR, f)
377- let cL = toBigInt((cI - 1))
378- func cM (cN) = {
379- let cO = fraction(cN, cN, f)
380- let cP = fraction(cO, cN, f)
381- let cQ = fraction(cP, f, cJ)
382- fraction((cK + fraction(cQ, g, f)), cN, (fraction(cL, cN, f) + fraction(h, cQ, f)))
380+ let aR = parseIntValue(bg)
381+ let cM = (aR * 2)
382+ let cE = fraction(cK, cL, f)
383+ let cN = fraction(cE, i, f)
384+ let cO = fraction(toBigInt(cM), aV, f)
385+ let cP = toBigInt((cM - 1))
386+ func cQ (cR) = {
387+ let cS = fraction(cR, cR, f)
388+ let cT = fraction(cS, cR, f)
389+ let cU = fraction(cT, f, cN)
390+ fraction((cO + fraction(cU, g, f)), cR, (fraction(cP, cR, f) + fraction(h, cU, f)))
383391 }
384392
385- func cR (cS,cT) = if (cS._2)
386- then cS
393+ func cV (cW,cX) = if (cW._2)
394+ then cW
387395 else {
388- let cN = cS._1
389- let cU = cM(cN)
390- let cV = (cU - value(cN))
391- let cW = if ((e > cV))
392- then -(cV)
393- else cV
394- if ((f >= cW))
395- then $Tuple2(cU, true)
396- else $Tuple2(cU, false)
396+ let cR = cW._1
397+ let cY = cQ(cR)
398+ let cZ = (cY - value(cR))
399+ let da = if ((e > cZ))
400+ then -(cZ)
401+ else cZ
402+ if ((f >= da))
403+ then $Tuple2(cY, true)
404+ else $Tuple2(cY, false)
397405 }
398406
399- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
400- let cY = {
401- let cZ = cX
402- let da = size(cZ)
403- let db = $Tuple2(aR, false)
404- func dc (dd,de) = if ((de >= da))
405- then dd
406- else cR(dd, cZ[de])
407+ let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
408+ let dc = {
409+ let dd = db
410+ let de = size(dd)
411+ let df = $Tuple2(aV, false)
412+ func dg (dh,di) = if ((di >= de))
413+ then dh
414+ else cV(dh, dd[di])
407415
408- func df (dd,de) = if ((de >= da))
409- then dd
416+ func dj (dh,di) = if ((di >= de))
417+ then dh
410418 else throw("List size exceeds 17")
411419
412- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
420+ dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
413421 }
414- let cN = cY._1
415- let dg = cY._2
416- if (dg)
417- then cN
418- else throw(("D calculation error, D = " + toString(cN)))
422+ let cR = dc._1
423+ let dk = dc._2
424+ if (dk)
425+ then cR
426+ else throw(("D calculation error, D = " + toString(cR)))
419427 }
420428 }
421429
422430
423-func dh (di,dj,dk,dl) = {
424- let dm = bt
425- let dn = toBase58String(value(bu))
426- let do = toBase58String(value(bv))
427- let dp = bw
431+func dl (dm,dn,do,dp) = {
428432 let dq = bx
429- let dr = toString(bs)
430- let ds = valueOrErrorMessage(assetInfo(dm), "Wrong LP id").quantity
431- if ((toBase58String(dm) != dj))
433+ let dr = toBase58String(value(by))
434+ let ds = toBase58String(value(bz))
435+ let dt = bA
436+ let du = bB
437+ let dv = toString(bw)
438+ let dw = valueOrErrorMessage(assetInfo(dq), "Wrong LP id").quantity
439+ if ((toBase58String(dq) != dn))
432440 then throw("Wrong pmt asset")
433441 else {
434- let dt = bT(dn)
435- let du = H(dt, dp)
436- let dv = bT(do)
437- let dw = H(dv, dq)
438- let dx = bV(dw, du)
439- let dy = L(dx, a)
440- let dz = H(dk, a)
441- let dA = H(ds, a)
442- let dB = fraction(du, dz, dA)
443- let dC = fraction(dw, dz, dA)
444- let dD = O(dB, dp, FLOOR)
445- let dE = O(dC, dq, FLOOR)
446- let dF = if ((di == ""))
442+ let dx = bX(dr)
443+ let dy = I(dx, dt)
444+ let dz = bX(ds)
445+ let dA = I(dz, du)
446+ let dB = bZ(dA, dy)
447+ let dC = M(dB, a)
448+ let dD = I(do, a)
449+ let dE = I(dw, a)
450+ let dF = fraction(dy, dD, dE)
451+ let dG = fraction(dA, dD, dE)
452+ let dH = P(dF, dt, FLOOR)
453+ let dI = P(dG, du, FLOOR)
454+ let dJ = if ((dm == ""))
447455 then nil
448- else [ScriptTransfer(dl, dD, if ((dn == "WAVES"))
456+ else [ScriptTransfer(dp, dH, if ((dr == "WAVES"))
449457 then unit
450- else fromBase58String(dn)), ScriptTransfer(dl, dE, if ((do == "WAVES"))
458+ else fromBase58String(dr)), ScriptTransfer(dp, dI, if ((ds == "WAVES"))
451459 then unit
452- else fromBase58String(do)), StringEntry(ai(toString(dl), di), bP(dD, dE, dk, dy, height, lastBlock.timestamp)), IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy)]
453- $Tuple10(dD, dE, dn, do, dt, dv, ds, dx, dr, dF)
460+ else fromBase58String(ds)), StringEntry(aj(toString(dp), dm), bT(dH, dI, do, dC, height, lastBlock.timestamp)), IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC)]
461+ $Tuple10(dH, dI, dr, ds, dx, dz, dw, dB, dv, dJ)
454462 }
455463 }
456464
457465
458-func dG (di,cc,dH,dI,dJ,dK,dl,dL,dM,dN,dO,dP,dQ) = {
459- let dm = bt
460- let dR = toBase58String(value(bu))
461- let dS = toBase58String(value(bv))
462- let dT = bw
463- let dU = bx
464- let dr = toString(bs)
465- let dV = valueOrErrorMessage(assetInfo(dm), "Wr lp as").quantity
466- let dt = if (dL)
467- then bT(dR)
468- else if (if (dN)
469- then (dQ == dR)
466+func dK (dm,cg,dL,dM,dN,dO,dp,dP,dQ,dR,dS,dT,dU) = {
467+ let dq = bx
468+ let dV = toBase58String(value(by))
469+ let dW = toBase58String(value(bz))
470+ let dX = bA
471+ let dY = bB
472+ let dv = toString(bw)
473+ let dZ = valueOrErrorMessage(assetInfo(dq), "Wr lp as").quantity
474+ let dx = if (dP)
475+ then bX(dV)
476+ else if (if (dR)
477+ then (dU == dV)
470478 else false)
471- then (bT(dR) - dP)
472- else if (dN)
473- then bT(dR)
474- else (bT(dR) - dH)
475- let dv = if (dL)
476- then bT(dS)
477- else if (if (dN)
478- then (dQ == dS)
479+ then (bX(dV) - dT)
480+ else if (dR)
481+ then bX(dV)
482+ else (bX(dV) - dL)
483+ let dz = if (dP)
484+ then bX(dW)
485+ else if (if (dR)
486+ then (dU == dW)
479487 else false)
480- then (bT(dS) - dP)
481- else if (dN)
482- then bT(dS)
483- else (bT(dS) - dJ)
484- let dW = H(dH, dT)
485- let dX = H(dJ, dU)
486- let dY = bV(dX, dW)
487- let du = H(dt, dT)
488- let dw = H(dv, dU)
489- let ch = cE([du, dw])
490- let dZ = if ((dV == 0))
488+ then (bX(dW) - dT)
489+ else if (dR)
490+ then bX(dW)
491+ else (bX(dW) - dN)
492+ let ea = I(dL, dX)
493+ let eb = I(dN, dY)
494+ let ec = bZ(eb, ea)
495+ let dy = I(dx, dX)
496+ let dA = I(dz, dY)
497+ let cl = cI([dy, dA])
498+ let ed = if ((dZ == 0))
491499 then {
492- let cg = cE([(du + dW), (dw + dX)])
493- let ea = if ((cg > ch))
500+ let ck = cI([(dy + ea), (dA + eb)])
501+ let ee = if ((ck > cl))
494502 then true
495503 else throw("D1 should be greater than D0")
496- if ((ea == ea))
504+ if ((ee == ee))
497505 then {
498- let dx = d
499- let eb = d
500- let cw = cg
501- $Tuple5(L(cw, a), L(dW, dT), L(dX, dU), bV((dw + dX), (du + dW)), eb)
506+ let dB = d
507+ let ef = d
508+ let cA = ck
509+ $Tuple5(M(cA, a), M(ea, dX), M(eb, dY), bZ((dA + eb), (dy + ea)), ef)
502510 }
503511 else throw("Strict value is not equal to itself.")
504512 }
505513 else {
506- let dx = bV(dw, du)
507- let ec = fraction(W((dx - dY)), c, dx)
508- let eb = H(cc, a)
509- if (if (if (dO)
510- then (dx != d)
514+ let dB = bZ(dA, dy)
515+ let eg = fraction(X((dB - ec)), c, dB)
516+ let ef = I(cg, a)
517+ if (if (if (dS)
518+ then (dB != d)
511519 else false)
512- then (ec > eb)
520+ then (eg > ef)
513521 else false)
514- then throw(((("Price slippage " + toString(ec)) + " > ") + toString(eb)))
522+ then throw(((("Price slippage " + toString(eg)) + " > ") + toString(ef)))
515523 else {
516- let ed = H(dV, a)
517- let ee = fraction(dW, bY(dw, du, CEILING), c, CEILING)
518- let ef = fraction(dX, c, bY(dw, du, FLOOR), CEILING)
519- let eg = if ((ee > dX))
520- then $Tuple2(ef, dX)
521- else $Tuple2(dW, ee)
522- let eh = eg._1
523- let ei = eg._2
524- let cg = cE([(du + eh), (dw + ei)])
525- let ea = if ((cg > ch))
524+ let eh = I(dZ, a)
525+ let ei = fraction(ea, cc(dA, dy, CEILING), c, CEILING)
526+ let ej = fraction(eb, c, cc(dA, dy, FLOOR), CEILING)
527+ let ek = if ((ei > eb))
528+ then $Tuple2(ej, eb)
529+ else $Tuple2(ea, ei)
530+ let el = ek._1
531+ let em = ek._2
532+ let ck = cI([(dy + el), (dA + em)])
533+ let ee = if ((ck > cl))
526534 then true
527535 else throw("D1 should be greater than D0")
528- if ((ea == ea))
536+ if ((ee == ee))
529537 then {
530- let cw = fraction(ed, (cg - ch), ch)
531- $Tuple5(O(cw, a, FLOOR), O(eh, dT, CEILING), O(ei, dU, CEILING), dx, eb)
538+ let cA = fraction(eh, (ck - cl), cl)
539+ $Tuple5(P(cA, a, FLOOR), P(el, dX, CEILING), P(em, dY, CEILING), dB, ef)
532540 }
533541 else throw("Strict value is not equal to itself.")
534542 }
535543 }
536- let ej = dZ._1
537- let ek = dZ._2
538- let el = dZ._3
539- let dy = L(dZ._4, a)
540- let em = L(dZ._5, a)
541- if ((0 >= ej))
544+ let en = ed._1
545+ let eo = ed._2
546+ let ep = ed._3
547+ let dC = M(ed._4, a)
548+ let eq = M(ed._5, a)
549+ if ((0 >= en))
542550 then throw("LP <= 0")
543551 else {
544- let en = if (!(dM))
552+ let er = if (!(dQ))
545553 then 0
546- else ej
547- let eo = (dH - ek)
548- let ep = (dJ - el)
549- let eq = if (if (dN)
550- then (dQ == dR)
554+ else en
555+ let es = (dL - eo)
556+ let et = (dN - ep)
557+ let eu = if (if (dR)
558+ then (dU == dV)
551559 else false)
552- then $Tuple2(dP, 0)
553- else if (if (dN)
554- then (dQ == dS)
560+ then $Tuple2(dT, 0)
561+ else if (if (dR)
562+ then (dU == dW)
555563 else false)
556- then $Tuple2(0, dP)
557- else $Tuple2(ek, el)
558- let er = eq._1
559- let es = eq._2
560- let et = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, di), bE(er, es, en, dy, cc, em, height, lastBlock.timestamp, eo, ep))]
561- $Tuple13(ej, en, dy, dt, dv, dV, dm, dr, et, eo, ep, dI, dK)
564+ then $Tuple2(0, dT)
565+ else $Tuple2(eo, ep)
566+ let ev = eu._1
567+ let ew = eu._2
568+ let ex = [IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC), StringEntry(ag(dp, dm), bI(ev, ew, er, dC, cg, eq, height, lastBlock.timestamp, es, et))]
569+ $Tuple13(en, er, dC, dx, dz, dZ, dq, dv, ex, es, et, dM, dO)
562570 }
563571 }
564572
565573
566-func eu (cF,cT,ev) = {
567- let ew = g
568- let ex = cF[if ((cT == 0))
574+func ey (cJ,cX,ez) = {
575+ let eA = g
576+ let eB = cJ[if ((cX == 0))
569577 then 1
570578 else 0]
571- let ey = parseBigIntValue(l)
572- let aN = (parseBigIntValue(bc) * ey)
573- let aR = ex
574- let cI = (aN * ew)
575- let ez = (((((ev * ev) / (ex * ew)) * ev) * ey) / (cI * ew))
576- let eA = ((aR + ((ev * ey) / cI)) - ev)
577- func cR (cS,eB) = {
578- let eC = cS
579- let eD = eC._1
580- let dg = eC._2
581- if ((dg != unit))
582- then cS
579+ let eC = parseBigIntValue(m)
580+ let aR = (parseBigIntValue(bg) * eC)
581+ let aV = eB
582+ let cM = (aR * eA)
583+ let eD = (((((ez * ez) / (eB * eA)) * ez) * eC) / (cM * eA))
584+ let eE = ((aV + ((ez * eC) / cM)) - ez)
585+ func cV (cW,eF) = {
586+ let eG = cW
587+ let eH = eG._1
588+ let dk = eG._2
589+ if ((dk != unit))
590+ then cW
583591 else {
584- let eE = (((eD * eD) + ez) / ((g * eD) + eA))
585- let eF = X((eE - value(eD)))
586- if ((f >= eF))
587- then $Tuple2(eE, eB)
588- else $Tuple2(eE, unit)
592+ let eI = (((eH * eH) + eD) / ((g * eH) + eE))
593+ let eJ = Y((eI - value(eH)))
594+ if ((f >= eJ))
595+ then $Tuple2(eI, eF)
596+ else $Tuple2(eI, unit)
589597 }
590598 }
591599
592- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
593- let eG = {
594- let cZ = cX
595- let da = size(cZ)
596- let db = $Tuple2(ev, unit)
597- func dc (dd,de) = if ((de >= da))
598- then dd
599- else cR(dd, cZ[de])
600+ let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
601+ let eK = {
602+ let dd = db
603+ let de = size(dd)
604+ let df = $Tuple2(ez, unit)
605+ func dg (dh,di) = if ((di >= de))
606+ then dh
607+ else cV(dh, dd[di])
600608
601- func df (dd,de) = if ((de >= da))
602- then dd
609+ func dj (dh,di) = if ((di >= de))
610+ then dh
603611 else throw("List size exceeds 15")
604612
605- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
613+ dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
606614 }
607- let eD = eG._1
608- let dg = eG._2
609- if ((dg != unit))
610- then eD
611- else throw(("Y calculation error, Y = " + toString(eD)))
615+ let eH = eK._1
616+ let dk = eK._2
617+ if ((dk != unit))
618+ then eH
619+ else throw(("Y calculation error, Y = " + toString(eH)))
612620 }
613621
614622
615-func eH (eI,eJ,eK) = {
616- let eL = fraction(cE([K(eI, toBigInt(bw)), K(eJ, toBigInt(bx))]), c, eK)
617- if ((eK == e))
623+func eL (eM,eN,eO) = {
624+ let eP = fraction(cI([L(eM, toBigInt(bA)), L(eN, toBigInt(bB))]), c, eO)
625+ if ((eO == e))
618626 then e
619- else eL
627+ else eP
620628 }
621629
622630
623-func eM (eN,eO,eP) = {
624- let eQ = (toBigInt(bT(bm(bu))) - eN)
625- let eR = (toBigInt(bT(bm(bv))) - eO)
626- let eS = (toBigInt(value(assetInfo(bt)).quantity) - eP)
627- let eT = eH(eQ, eR, eS)
628- eT
631+func eQ (eR,eS,eT) = {
632+ let eU = (toBigInt(bX(bq(by))) - eR)
633+ let eV = (toBigInt(bX(bq(bz))) - eS)
634+ let eW = (toBigInt(value(assetInfo(bx)).quantity) - eT)
635+ let eX = eL(eU, eV, eW)
636+ eX
629637 }
630638
631639
632-func eU (eV,eW,eP) = {
633- let eQ = (bT(bm(bu)) + eV)
634- let eR = (bT(bm(bv)) + eW)
635- let eS = (value(assetInfo(bt)).quantity + eP)
636- let eL = eH(toBigInt(eQ), toBigInt(eR), toBigInt(eS))
637- let eX = [IntegerEntry(ap, height), StringEntry(ao, toString(eL))]
638- $Tuple2(eX, eL)
640+func eY (eZ,fa,eT) = {
641+ let eU = (bX(bq(by)) + eZ)
642+ let eV = (bX(bq(bz)) + fa)
643+ let eW = (value(assetInfo(bx)).quantity + eT)
644+ let eP = eL(toBigInt(eU), toBigInt(eV), toBigInt(eW))
645+ let fb = [IntegerEntry(at, height), StringEntry(as, toString(eP))]
646+ $Tuple2(fb, eP)
639647 }
640648
641649
642-func eY (eZ,eL) = if ((eL >= eZ))
650+func fc (fd,eP) = if ((eP >= fd))
643651 then true
644- else aW("updated DLp lower than current DLp")
652+ else ba("updated DLp lower than current DLp")
645653
646654
647-func fa (fb) = {
648- let eQ = bT(bm(bu))
649- let eR = bT(bm(bv))
650- let fc = fb.amount
651- let fd = fraction(fb.amount, fb.price, a, FLOOR)
652- let fe = if ((fb.orderType == Buy))
653- then $Tuple2(fc, -(fd))
654- else $Tuple2(-(fc), fd)
655- let eV = fe._1
656- let eW = fe._2
657- if (if (if (bd())
655+func fe (ff) = {
656+ let eU = bX(bq(by))
657+ let eV = bX(bq(bz))
658+ let fg = ff.amount
659+ let fh = fraction(ff.amount, ff.price, a, FLOOR)
660+ let fi = if ((ff.orderType == Buy))
661+ then $Tuple2(fg, -(fh))
662+ else $Tuple2(-(fg), fh)
663+ let eZ = fi._1
664+ let fa = fi._2
665+ if (if (if (bh())
658666 then true
659- else (bs == r))
667+ else (bw == s))
660668 then true
661- else (bs == s))
669+ else (bw == t))
662670 then throw("Admin blocked")
663- else if (if ((fb.assetPair.amountAsset != bu))
671+ else if (if ((ff.assetPair.amountAsset != by))
664672 then true
665- else (fb.assetPair.priceAsset != bv))
673+ else (ff.assetPair.priceAsset != bz))
666674 then throw("Wr assets")
667675 else {
668- let ff = parseBigIntValue(valueOrElse(getString(this, ao), "0"))
669- let fg = eU(eV, eW, 0)
670- let fh = fg._1
671- let fi = fg._2
672- let fj = (fi >= ff)
673- let fk = makeString(["dLp=", toString(ff), " dLpNew=", toString(fi), " amountAssetBalance=", toString(eQ), " priceAssetBalance=", toString(eR), " amountAssetBalanceDelta=", toString(eV), " priceAssetBalanceDelta=", toString(eW), " height=", toString(height)], "")
674- $Tuple2(fj, fk)
676+ let fj = parseBigIntValue(valueOrElse(getString(this, as), "0"))
677+ let fk = eY(eZ, fa, 0)
678+ let fl = fk._1
679+ let fm = fk._2
680+ let fn = (fm >= fj)
681+ let fo = makeString(["dLp=", toString(fj), " dLpNew=", toString(fm), " amountAssetBalance=", toString(eU), " priceAssetBalance=", toString(eV), " amountAssetBalanceDelta=", toString(eZ), " priceAssetBalanceDelta=", toString(fa), " height=", toString(height)], "")
682+ $Tuple2(fn, fo)
675683 }
676684 }
677685
678686
679-func fl (cT) = if ((size(cT.payments) != 1))
687+func fp (cX) = if ((size(cX.payments) != 1))
680688 then throw("1 pmnt exp")
681689 else {
682- let fm = value(cT.payments[0])
683- let dj = value(fm.assetId)
684- let dP = fm.amount
685- let dZ = dh(toBase58String(cT.transactionId), toBase58String(dj), dP, cT.caller)
686- let dD = dZ._1
687- let dE = dZ._2
688- let dr = parseIntValue(dZ._9)
689- let dF = dZ._10
690- if (if (bd())
690+ let fq = value(cX.payments[0])
691+ let dn = value(fq.assetId)
692+ let dT = fq.amount
693+ let ed = dl(toBase58String(cX.transactionId), toBase58String(dn), dT, cX.caller)
694+ let dH = ed._1
695+ let dI = ed._2
696+ let dv = parseIntValue(ed._9)
697+ let dJ = ed._10
698+ if (if (bh())
691699 then true
692- else (dr == s))
693- then throw(("Admin blocked: " + toString(dr)))
694- else $Tuple5(dD, dE, dP, dj, dF)
700+ else (dv == t))
701+ then throw(("Admin blocked: " + toString(dv)))
702+ else $Tuple5(dH, dI, dT, dn, dJ)
695703 }
696704
697705
698-func fn (fo,ah,fp,fq,cc,dM,dN,dO,dP,dQ) = {
699- let dZ = dG(ah, cc, value(fp).amount, value(fp).assetId, value(fq).amount, value(fq).assetId, fo, (ah == ""), dM, dN, dO, dP, dQ)
700- let dr = parseIntValue(dZ._8)
701- if (if (if (bd())
706+func fr (fs,ai,ft,fu,cg,dQ,dR,dS,dT,dU) = {
707+ let ed = dK(ai, cg, value(ft).amount, value(ft).assetId, value(fu).amount, value(fu).assetId, fs, (ai == ""), dQ, dR, dS, dT, dU)
708+ let dv = parseIntValue(ed._8)
709+ if (if (if (bh())
702710 then true
703- else (dr == q))
711+ else (dv == r))
704712 then true
705- else (dr == s))
706- then throw(("Blocked:" + toString(dr)))
707- else dZ
713+ else (dv == t))
714+ then throw(("Blocked:" + toString(dv)))
715+ else ed
708716 }
709717
710718
711-func fr (fs,dj,dl,ah,ft) = {
712- let dn = toBase58String(value(bu))
713- let do = toBase58String(value(bv))
714- let dm = bt
715- let dT = bw
716- let dU = bx
717- let eS = toBigInt(valueOrErrorMessage(assetInfo(dm), "invalid lp asset").quantity)
718- let fu = if ((eS > e))
719+func fv (fw,dn,dp,ai,fx) = {
720+ let dr = toBase58String(value(by))
721+ let ds = toBase58String(value(bz))
722+ let dq = bx
723+ let dX = bA
724+ let dY = bB
725+ let eW = toBigInt(valueOrErrorMessage(assetInfo(dq), "invalid lp asset").quantity)
726+ let fy = if ((eW > e))
719727 then true
720728 else throw("initial deposit requires all coins")
721- if ((fu == fu))
729+ if ((fy == fy))
722730 then {
723- let dt = bT(dn)
724- let dv = bT(do)
725- let fv = if ((ah == ""))
726- then $Tuple2(dt, dv)
727- else if ((dj == dn))
728- then if ((fs > dt))
731+ let dx = bX(dr)
732+ let dz = bX(ds)
733+ let fz = if ((ai == ""))
734+ then $Tuple2(dx, dz)
735+ else if ((dn == dr))
736+ then if ((fw > dx))
729737 then throw("invalid payment amount")
730- else $Tuple2((dt - fs), dv)
731- else if ((dj == do))
732- then if ((fs > dv))
738+ else $Tuple2((dx - fw), dz)
739+ else if ((dn == ds))
740+ then if ((fw > dz))
733741 then throw("invalid payment amount")
734- else $Tuple2(dt, (dv - fs))
742+ else $Tuple2(dx, (dz - fw))
735743 else throw("wrong pmtAssetId")
736- let fw = fv._1
737- let fx = fv._2
738- let fy = if ((dj == dn))
739- then $Tuple2(fs, 0)
740- else if ((dj == do))
741- then $Tuple2(0, fs)
744+ let fA = fz._1
745+ let fB = fz._2
746+ let fC = if ((dn == dr))
747+ then $Tuple2(fw, 0)
748+ else if ((dn == ds))
749+ then $Tuple2(0, fw)
742750 else throw("invalid payment")
743- let fz = fy._1
744- let fA = fy._2
745- let fB = if (ft)
746- then $Tuple3(cB(fz, aZ)._1, cB(fA, aZ)._1, cB(fs, aZ)._2)
747- else $Tuple3(fz, fA, 0)
748- let fC = fB._1
749- let fD = fB._2
750- let cD = fB._3
751- let fE = (fw + fC)
752- let fF = (fx + fD)
753- let ch = cE([H(fw, bw), H(fx, bx)])
754- let cg = cE([H(fE, bw), H(fF, bx)])
755- let ea = if ((cg > ch))
751+ let fD = fC._1
752+ let fE = fC._2
753+ let fF = if (fx)
754+ then $Tuple3(cF(fD, bd)._1, cF(fE, bd)._1, cF(fw, bd)._2)
755+ else $Tuple3(fD, fE, 0)
756+ let fG = fF._1
757+ let fH = fF._2
758+ let cH = fF._3
759+ let fI = (fA + fG)
760+ let fJ = (fB + fH)
761+ let cl = cI([I(fA, bA), I(fB, bB)])
762+ let ck = cI([I(fI, bA), I(fJ, bB)])
763+ let ee = if ((ck > cl))
756764 then true
757765 else throw()
758- if ((ea == ea))
766+ if ((ee == ee))
759767 then {
760- let fG = fraction(eS, (cg - ch), ch, FLOOR)
761- let dy = L(bV(H(fF, dU), H(fE, dT)), a)
762- let et = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, ah), bE(fz, fA, toInt(fG), dy, 0, 0, height, lastBlock.timestamp, 0, 0))]
763- let fH = fraction(fx, a, fw)
764- let fI = fraction(fs, a, (fH + a))
765- let fJ = (fs - fI)
766- let fK = fraction(eS, toBigInt(fJ), toBigInt(fx))
767- let fL = toInt(fraction((fG - fK), b, fK))
768- $Tuple4(toInt(fG), et, cD, fL)
768+ let fK = fraction(eW, (ck - cl), cl, FLOOR)
769+ let dC = M(bZ(I(fJ, dY), I(fI, dX)), a)
770+ let ex = [IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC), StringEntry(ag(dp, ai), bI(fD, fE, toInt(fK), dC, 0, 0, height, lastBlock.timestamp, 0, 0))]
771+ let fL = fraction(fB, a, fA)
772+ let fM = fraction(fw, a, (fL + a))
773+ let fN = (fw - fM)
774+ let fO = fraction(eW, toBigInt(fN), toBigInt(fB))
775+ let fP = toInt(fraction((fK - fO), b, fO))
776+ $Tuple4(toInt(fK), ex, cH, fP)
769777 }
770778 else throw("Strict value is not equal to itself.")
771779 }
773781 }
774782
775783
776-func fM (fN,fO,fP,fo,fQ,fR) = {
777- let dm = toBase58String(value(bt))
778- let dn = toBase58String(value(bu))
779- let do = toBase58String(value(bv))
780- let fS = bw
781- let fT = bx
782- let fU = bs
783- let dl = if ((fo == bD))
784- then fQ
785- else fo
786- let fm = value(fP[0])
787- let dj = value(fm.assetId)
788- let dP = fm.amount
789- let eT = eM(e, e, e)
790- if ((eT == eT))
784+func fQ (fR,fS,fT,fs,fU,fV) = {
785+ let dq = toBase58String(value(bx))
786+ let dr = toBase58String(value(by))
787+ let ds = toBase58String(value(bz))
788+ let fW = bA
789+ let fX = bB
790+ let fY = bw
791+ let dp = if ((fs == bH))
792+ then fU
793+ else fs
794+ let fq = value(fT[0])
795+ let dn = value(fq.assetId)
796+ let dT = fq.amount
797+ let eX = eQ(e, e, e)
798+ if ((eX == eX))
791799 then {
792- let di = toBase58String(fR)
793- if ((dm != toBase58String(dj)))
800+ let dm = toBase58String(fV)
801+ if ((dq != toBase58String(dn)))
794802 then throw("Wrong LP")
795803 else {
796- let dt = bT(dn)
797- let dv = bT(do)
798- let fV = {
799- let ba = invoke(this, "getOneTknV2READONLY", [fN, dP], nil)
800- if ($isInstanceOf(ba, "(Int, Int)"))
801- then ba
802- else throw(($getType(ba) + " couldn't be cast to (Int, Int)"))
804+ let dx = bX(dr)
805+ let dz = bX(ds)
806+ let fZ = {
807+ let be = invoke(this, "getOneTknV2READONLY", [fR, dT], nil)
808+ if ($isInstanceOf(be, "(Int, Int)"))
809+ then be
810+ else throw(($getType(be) + " couldn't be cast to (Int, Int)"))
803811 }
804- if ((fV == fV))
812+ if ((fZ == fZ))
805813 then {
806- let cD = fV._2
807- let fW = fV._1
808- let fX = if (if ((fO > 0))
809- then (fO > fW)
814+ let cH = fZ._2
815+ let ga = fZ._1
816+ let gb = if (if ((fS > 0))
817+ then (fS > ga)
810818 else false)
811- then aW(makeString(["amount to receive is less than ", toString(fO)], ""))
812- else fW
813- let fY = if ((fN == dn))
814- then $Tuple4(fX, 0, ((dt - fX) - cD), dv)
815- else if ((fN == do))
816- then $Tuple4(0, fX, dt, ((dv - fX) - cD))
819+ then ba(makeString(["amount to receive is less than ", toString(fS)], ""))
820+ else ga
821+ let gc = if ((fR == dr))
822+ then $Tuple4(gb, 0, ((dx - gb) - cH), dz)
823+ else if ((fR == ds))
824+ then $Tuple4(0, gb, dx, ((dz - gb) - cH))
817825 else throw("invalid out asset id")
818- let fZ = fY._1
819- let ga = fY._2
820- let fE = fY._3
821- let fF = fY._4
822- let gb = bV(H(fF, fT), H(fE, fS))
823- let gc = L(gb, a)
824- let gd = if ((fN == "WAVES"))
826+ let gd = gc._1
827+ let ge = gc._2
828+ let fI = gc._3
829+ let fJ = gc._4
830+ let gf = bZ(I(fJ, fX), I(fI, fW))
831+ let gg = M(gf, a)
832+ let gh = if ((fR == "WAVES"))
825833 then unit
826- else fromBase58String(fN)
827- let ge = if ((cD > 0))
828- then [ScriptTransfer(bf, cD, gd)]
834+ else fromBase58String(fR)
835+ let gi = if ((cH > 0))
836+ then [ScriptTransfer(bj, cH, gh)]
829837 else nil
830- let dF = ([ScriptTransfer(dl, fX, gd), StringEntry(ai(toString(dl), di), bP(fZ, ga, dP, gc, height, lastBlock.timestamp)), IntegerEntry(ab(), gc), IntegerEntry(ac(height, lastBlock.timestamp), gc)] ++ ge)
831- if ((dF == dF))
838+ let dJ = ([ScriptTransfer(dp, gb, gh), StringEntry(aj(toString(dp), dm), bT(gd, ge, dT, gg, height, lastBlock.timestamp)), IntegerEntry(ac(), gg), IntegerEntry(ad(height, lastBlock.timestamp), gg)] ++ gi)
839+ if ((dJ == dJ))
832840 then {
833- let gf = invoke(aQ, "burn", [dP], [AttachedPayment(dj, dP)])
834- if ((gf == gf))
841+ let gj = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
842+ if ((gj == gj))
835843 then {
836- let gg = {
837- let gh = if ((this == bf))
844+ let gk = {
845+ let gl = if ((this == bj))
838846 then 0
839- else cD
840- let gi = if ((bk(fN) == bu))
847+ else cH
848+ let gm = if ((bo(fR) == by))
841849 then true
842850 else false
843- if (gi)
844- then $Tuple2(-((fW + gh)), 0)
845- else $Tuple2(0, -((fW + gh)))
851+ if (gm)
852+ then $Tuple2(-((ga + gl)), 0)
853+ else $Tuple2(0, -((ga + gl)))
846854 }
847- let eV = gg._1
848- let eW = gg._2
849- let gj = eU(eV, eW, 0)
850- let gk = gj._1
851- let eL = gj._2
852- let gl = eY(eT, eL)
853- if ((gl == gl))
854- then $Tuple2((dF ++ gk), fX)
855+ let eZ = gk._1
856+ let fa = gk._2
857+ let gn = eY(eZ, fa, 0)
858+ let go = gn._1
859+ let eP = gn._2
860+ let gp = fc(eX, eP)
861+ if ((gp == gp))
862+ then $Tuple2((dJ ++ go), gb)
855863 else throw("Strict value is not equal to itself.")
856864 }
857865 else throw("Strict value is not equal to itself.")
865873 }
866874
867875
868-func gm () = {
869- let gn = aO()
870- let aM = getString(gn, Z())
871- if ($isInstanceOf(aM, "String"))
876+func gq () = {
877+ let gr = aS()
878+ let aQ = getString(gr, aa())
879+ if ($isInstanceOf(aQ, "String"))
872880 then {
873- let aR = aM
874- fromBase58String(aR)
881+ let aV = aQ
882+ fromBase58String(aV)
875883 }
876- else if ($isInstanceOf(aM, "Unit"))
884+ else if ($isInstanceOf(aQ, "Unit"))
877885 then unit
878886 else throw("Match error")
879887 }
880888
881889
882-let go = throw("Permission denied")
890+let gs = throw("Permission denied")
883891
884-func gp (cT) = {
885- let aM = gm()
886- if ($isInstanceOf(aM, "ByteVector"))
892+func gt (cX) = {
893+ let aQ = gq()
894+ if ($isInstanceOf(aQ, "ByteVector"))
887895 then {
888- let gq = aM
889- (cT.callerPublicKey == gq)
896+ let gu = aQ
897+ (cX.callerPublicKey == gu)
890898 }
891- else if ($isInstanceOf(aM, "Unit"))
892- then (cT.caller == this)
899+ else if ($isInstanceOf(aQ, "Unit"))
900+ then (cX.caller == this)
893901 else throw("Match error")
894902 }
895903
896904
897-func gr (cT) = {
898- let aM = gm()
899- if ($isInstanceOf(aM, "ByteVector"))
905+func gv (cX) = {
906+ let aQ = gq()
907+ if ($isInstanceOf(aQ, "ByteVector"))
900908 then {
901- let gq = aM
902- if ((cT.callerPublicKey == gq))
909+ let gu = aQ
910+ if ((cX.callerPublicKey == gu))
903911 then true
904- else go
912+ else gs
905913 }
906- else if ($isInstanceOf(aM, "Unit"))
907- then if ((cT.caller == this))
914+ else if ($isInstanceOf(aQ, "Unit"))
915+ then if ((cX.caller == this))
908916 then true
909- else go
917+ else gs
910918 else throw("Match error")
911919 }
912920
913921
914-func gs (gt,ev,gu) = {
915- let bo = bg()
916- let dn = bo[w]
917- let do = bo[x]
918- let ew = g
919- let ey = parseBigIntValue(l)
920- let aN = (parseBigIntValue(bc) * ey)
921- let cF = if ((gt == false))
922- then [(toBigInt(bT(dn)) + gu), toBigInt(bT(do))]
923- else [(toBigInt(bT(do)) + gu), toBigInt(bT(dn))]
924- let ex = cF[0]
925- let aR = ex
926- let cI = (aN * ew)
927- let ez = (((((ev * ev) / (ex * ew)) * ev) * ey) / (cI * ew))
928- let eA = ((aR + ((ev * ey) / cI)) - ev)
929- func cR (cS,eB) = {
930- let gv = cS
931- let eD = gv._1
932- let dg = gv._2
933- if ((dg != unit))
934- then cS
922+func gw (gx,ez,gy) = {
923+ let bs = bk()
924+ let dr = bs[x]
925+ let ds = bs[y]
926+ let eA = g
927+ let eC = parseBigIntValue(m)
928+ let aR = (parseBigIntValue(bg) * eC)
929+ let cJ = if ((gx == false))
930+ then [(toBigInt(bX(dr)) + gy), toBigInt(bX(ds))]
931+ else [(toBigInt(bX(ds)) + gy), toBigInt(bX(dr))]
932+ let eB = cJ[0]
933+ let aV = eB
934+ let cM = (aR * eA)
935+ let eD = (((((ez * ez) / (eB * eA)) * ez) * eC) / (cM * eA))
936+ let eE = ((aV + ((ez * eC) / cM)) - ez)
937+ func cV (cW,eF) = {
938+ let gz = cW
939+ let eH = gz._1
940+ let dk = gz._2
941+ if ((dk != unit))
942+ then cW
935943 else {
936- let eE = (((eD * eD) + ez) / ((g * eD) + eA))
937- let eF = X((eE - value(eD)))
938- if ((f >= eF))
939- then $Tuple2(eE, eB)
940- else $Tuple2(eE, unit)
944+ let eI = (((eH * eH) + eD) / ((g * eH) + eE))
945+ let eJ = Y((eI - value(eH)))
946+ if ((f >= eJ))
947+ then $Tuple2(eI, eF)
948+ else $Tuple2(eI, unit)
941949 }
942950 }
943951
944- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
945- let gw = {
946- let cZ = cX
947- let da = size(cZ)
948- let db = $Tuple2(ev, unit)
949- func dc (dd,de) = if ((de >= da))
950- then dd
951- else cR(dd, cZ[de])
952+ let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
953+ let gA = {
954+ let dd = db
955+ let de = size(dd)
956+ let df = $Tuple2(ez, unit)
957+ func dg (dh,di) = if ((di >= de))
958+ then dh
959+ else cV(dh, dd[di])
952960
953- func df (dd,de) = if ((de >= da))
954- then dd
961+ func dj (dh,di) = if ((di >= de))
962+ then dh
955963 else throw("List size exceeds 15")
956964
957- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
965+ dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
958966 }
959- let eD = gw._1
960- let dg = gw._2
961- if ((dg != unit))
962- then eD
963- else throw(("Y calculation error, Y = " + toString(eD)))
967+ let eH = gA._1
968+ let dk = gA._2
969+ if ((dk != unit))
970+ then eH
971+ else throw(("Y calculation error, Y = " + toString(eH)))
964972 }
965973
966974
967-func gx () = valueOrElse(getBoolean(aQ, aD(toString(this))), false)
975+func gB () = valueOrElse(getBoolean(aU, aH(toString(this))), false)
968976
969977
970-@Callable(cT)
971-func calculateAmountOutForSwapREADONLY (gy,gt,gz) = {
972- let gA = if ((gt == false))
978+@Callable(cX)
979+func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
980+ let gE = if ((gx == false))
973981 then {
974- let gB = aS(this, ak())
975- let gu = (toBigInt(bT(aS(this, aj()))) + toBigInt(gy))
976- $Tuple2(gB, gu)
982+ let gF = aW(this, al())
983+ let gy = (toBigInt(bX(aW(this, ak()))) + toBigInt(gC))
984+ $Tuple2(gF, gy)
977985 }
978986 else {
979- let gB = aS(this, aj())
980- let gu = (toBigInt(bT(aS(this, ak()))) + toBigInt(gy))
981- $Tuple2(gB, gu)
987+ let gF = aW(this, ak())
988+ let gy = (toBigInt(bX(aW(this, al()))) + toBigInt(gC))
989+ $Tuple2(gF, gy)
982990 }
983- let gB = gA._1
984- let gu = gA._2
985- let bo = bg()
986- let dn = bo[w]
987- let do = bo[x]
988- let cF = [toBigInt(bT(dn)), toBigInt(bT(do))]
989- let ev = cE(cF)
990- let eD = gs(gt, ev, toBigInt(gy))
991- let gC = ((toBigInt(bT(gB)) - eD) - toBigInt(1))
992- let gD = max([0, toInt(gC)])
993- let gE = if ((gt == false))
994- then [((toBigInt(bT(dn)) + toBigInt(gy)) + toBigInt(gz)), (toBigInt(bT(do)) - gC)]
995- else [(toBigInt(bT(dn)) - gC), ((toBigInt(bT(do)) + toBigInt(gy)) + toBigInt(gz))]
996- let gF = cE(gE)
997- let ea = if ((gF >= ev))
991+ let gF = gE._1
992+ let gy = gE._2
993+ let bs = bk()
994+ let dr = bs[x]
995+ let ds = bs[y]
996+ let cJ = [toBigInt(bX(dr)), toBigInt(bX(ds))]
997+ let ez = cI(cJ)
998+ let eH = gw(gx, ez, toBigInt(gC))
999+ let gG = ((toBigInt(bX(gF)) - eH) - toBigInt(1))
1000+ let gH = max([0, toInt(gG)])
1001+ let gI = if ((gx == false))
1002+ then [((toBigInt(bX(dr)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bX(ds)) - gG)]
1003+ else [(toBigInt(bX(dr)) - gG), ((toBigInt(bX(ds)) + toBigInt(gC)) + toBigInt(gD))]
1004+ let gJ = cI(gI)
1005+ let ee = if ((gJ >= ez))
9981006 then true
999- else throw(makeString(["new D is fewer error", toString(ev), toString(gF)], "__"))
1000- if ((ea == ea))
1001- then $Tuple2(nil, gD)
1007+ else throw(makeString(["new D is fewer error", toString(ez), toString(gJ)], "__"))
1008+ if ((ee == ee))
1009+ then $Tuple2(nil, gH)
10021010 else throw("Strict value is not equal to itself.")
10031011 }
10041012
10051013
10061014
1007-@Callable(cT)
1008-func calculateAmountOutForSwapAndSendTokens (gy,gt,gG,gH,gz) = {
1009- let gI = {
1010- let ba = invoke(aQ, "getSwapContractREADONLY", nil, nil)
1011- if ($isInstanceOf(ba, "String"))
1012- then ba
1013- else throw(($getType(ba) + " couldn't be cast to String"))
1015+@Callable(cX)
1016+func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1017+ let gM = {
1018+ let be = invoke(aU, "getSwapContractREADONLY", nil, nil)
1019+ if ($isInstanceOf(be, "String"))
1020+ then be
1021+ else throw(($getType(be) + " couldn't be cast to String"))
10141022 }
1015- let gJ = {
1016- let ba = invoke(aQ, "isPoolSwapDisabledREADONLY", [toString(this)], nil)
1017- if ($isInstanceOf(ba, "Boolean"))
1018- then ba
1019- else throw(($getType(ba) + " couldn't be cast to Boolean"))
1023+ let gN = {
1024+ let be = invoke(aU, "isPoolSwapDisabledREADONLY", [toString(this)], nil)
1025+ if ($isInstanceOf(be, "Boolean"))
1026+ then be
1027+ else throw(($getType(be) + " couldn't be cast to Boolean"))
10201028 }
1021- let gK = if (if (bd())
1029+ let gO = if (if (bh())
10221030 then true
1023- else (bs == s))
1031+ else (bw == t))
10241032 then true
1025- else gJ
1026- let gL = [if (if (!(gK))
1033+ else gN
1034+ let gP = [if (if (!(gO))
10271035 then true
1028- else gp(cT))
1036+ else gt(cX))
10291037 then true
1030- else aW("swap operation is blocked by admin"), if ((value(cT.payments[0]).amount >= gy))
1038+ else ba("swap operation is blocked by admin"), if ((value(cX.payments[0]).amount >= gC))
10311039 then true
1032- else aW("Wrong amount"), if ((cT.caller == addressFromStringValue(gI)))
1040+ else ba("Wrong amount"), if ((cX.caller == addressFromStringValue(gM)))
10331041 then true
1034- else aW("Permission denied")]
1035- if ((gL == gL))
1042+ else ba("Permission denied")]
1043+ if ((gP == gP))
10361044 then {
1037- let fm = value(cT.payments[0])
1038- let gM = bm(fm.assetId)
1039- let gN = if ((gt == false))
1045+ let fq = value(cX.payments[0])
1046+ let gQ = bq(fq.assetId)
1047+ let gR = if ((gx == false))
10401048 then {
1041- let gB = aS(this, ak())
1042- let gu = (bT(gM) - value(cT.payments[0]).amount)
1043- $Tuple2(gB, gu)
1049+ let gF = aW(this, al())
1050+ let gy = (bX(gQ) - value(cX.payments[0]).amount)
1051+ $Tuple2(gF, gy)
10441052 }
10451053 else {
1046- let gB = aS(this, aj())
1047- let gu = (bT(gM) - value(cT.payments[0]).amount)
1048- $Tuple2(gB, gu)
1054+ let gF = aW(this, ak())
1055+ let gy = (bX(gQ) - value(cX.payments[0]).amount)
1056+ $Tuple2(gF, gy)
10491057 }
1050- let gB = gN._1
1051- let gu = gN._2
1052- let bo = bg()
1053- let dn = bo[w]
1054- let do = bo[x]
1055- let cF = if ((gt == false))
1056- then [(toBigInt(bT(dn)) - toBigInt(value(cT.payments[0]).amount)), toBigInt(bT(do))]
1057- else [toBigInt(bT(dn)), (toBigInt(bT(do)) - toBigInt(value(cT.payments[0]).amount))]
1058- let ev = cE(cF)
1059- let eD = gs(gt, ev, toBigInt(0))
1060- let gC = ((toBigInt(bT(gB)) - eD) - toBigInt(1))
1061- let gD = max([0, toInt(gC)])
1062- let gO = if ((gD >= gG))
1058+ let gF = gR._1
1059+ let gy = gR._2
1060+ let bs = bk()
1061+ let dr = bs[x]
1062+ let ds = bs[y]
1063+ let cJ = if ((gx == false))
1064+ then [(toBigInt(bX(dr)) - toBigInt(value(cX.payments[0]).amount)), toBigInt(bX(ds))]
1065+ else [toBigInt(bX(dr)), (toBigInt(bX(ds)) - toBigInt(value(cX.payments[0]).amount))]
1066+ let ez = cI(cJ)
1067+ let eH = gw(gx, ez, toBigInt(0))
1068+ let gG = ((toBigInt(bX(gF)) - eH) - toBigInt(1))
1069+ let gH = max([0, toInt(gG)])
1070+ let gS = if ((gH >= gK))
10631071 then true
10641072 else throw("Exchange result is fewer coins than expected")
1065- if ((gO == gO))
1073+ if ((gS == gS))
10661074 then {
1067- let gE = if ((gt == false))
1068- then [(toBigInt(bT(dn)) + toBigInt(gz)), (toBigInt(bT(do)) - gC)]
1069- else [(toBigInt(bT(dn)) - gC), (toBigInt(bT(do)) + toBigInt(gz))]
1070- let gF = cE(gE)
1071- let ea = if ((gF >= ev))
1075+ let gI = if ((gx == false))
1076+ then [(toBigInt(bX(dr)) + toBigInt(gD)), (toBigInt(bX(ds)) - gG)]
1077+ else [(toBigInt(bX(dr)) - gG), (toBigInt(bX(ds)) + toBigInt(gD))]
1078+ let gJ = cI(gI)
1079+ let ee = if ((gJ >= ez))
10721080 then true
10731081 else throw("new D is fewer error")
1074- if ((ea == ea))
1082+ if ((ee == ee))
10751083 then {
1076- let eV = if (gt)
1077- then -(gD)
1078- else gz
1079- let eW = if (gt)
1080- then gz
1081- else -(gD)
1082- let gk = eU(eV, eW, 0)._1
1083- if ((gk == gk))
1084- then $Tuple2([ScriptTransfer(addressFromStringValue(gH), gD, bk(gB))], gD)
1084+ let eZ = if (gx)
1085+ then -(gH)
1086+ else gD
1087+ let fa = if (gx)
1088+ then gD
1089+ else -(gH)
1090+ let go = eY(eZ, fa, 0)._1
1091+ if ((go == go))
1092+ then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bo(gF))], gH)
10851093 else throw("Strict value is not equal to itself.")
10861094 }
10871095 else throw("Strict value is not equal to itself.")
10931101
10941102
10951103
1096-@Callable(cT)
1097-func constructor (Y) = {
1098- let ez = gr(cT)
1099- if ((ez == ez))
1100- then [StringEntry(Y(), Y)]
1104+@Callable(cX)
1105+func constructor (Z) = {
1106+ let eD = gv(cX)
1107+ if ((eD == eD))
1108+ then [StringEntry(Z(), Z)]
11011109 else throw("Strict value is not equal to itself.")
11021110 }
11031111
11041112
11051113
1106-@Callable(cT)
1107-func put (gP,gQ) = {
1108- let gR = by()
1109- let gS = valueOrErrorMessage(addressFromString(gR[C]), "Wr st addr")
1110- let gT = valueOrErrorMessage(addressFromString(gR[E]), "Wr sl addr")
1111- if ((0 > gP))
1114+@Callable(cX)
1115+func put (gT,gU) = {
1116+ let gV = bC()
1117+ let gW = valueOrErrorMessage(addressFromString(gV[D]), "Wr st addr")
1118+ let gX = valueOrErrorMessage(addressFromString(gV[F]), "Wr sl addr")
1119+ if ((0 > gT))
11121120 then throw("Wrong slippage")
1113- else if ((size(cT.payments) != 2))
1121+ else if ((size(cX.payments) != 2))
11141122 then throw("2 pmnts expd")
11151123 else {
1116- let gU = toBigInt(value(cT.payments[0]).amount)
1117- let gV = toBigInt(value(cT.payments[1]).amount)
1118- let eQ = (toBigInt(bT(bm(bu))) - gU)
1119- if ((eQ == eQ))
1124+ let gY = toBigInt(value(cX.payments[0]).amount)
1125+ let gZ = toBigInt(value(cX.payments[1]).amount)
1126+ let eU = (toBigInt(bX(bq(by))) - gY)
1127+ if ((eU == eU))
11201128 then {
1121- let eR = (toBigInt(bT(bm(bv))) - gV)
1122- if ((eR == eR))
1129+ let eV = (toBigInt(bX(bq(bz))) - gZ)
1130+ if ((eV == eV))
11231131 then {
1124- let eS = toBigInt(value(assetInfo(bt)).quantity)
1125- if ((eS == eS))
1132+ let eW = toBigInt(value(assetInfo(bx)).quantity)
1133+ if ((eW == eW))
11261134 then {
1127- let eT = eM(gU, gV, toBigInt(0))
1128- if ((eT == eT))
1135+ let eX = eQ(gY, gZ, toBigInt(0))
1136+ if ((eX == eX))
11291137 then {
1130- let gW = fn(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], gP, true, false, true, 0, "")
1131- let en = gW._2
1132- let gX = gW._7
1133- let dF = gW._9
1134- let eo = gW._10
1135- let ep = gW._11
1136- let dn = gW._12
1137- let do = gW._13
1138- let dZ = invoke(aQ, "emit", [en], nil)
1139- if ((dZ == dZ))
1138+ let ha = fr(toString(cX.caller), toBase58String(cX.transactionId), AttachedPayment(value(cX.payments[0]).assetId, value(cX.payments[0]).amount), cX.payments[1], gT, true, false, true, 0, "")
1139+ let er = ha._2
1140+ let hb = ha._7
1141+ let dJ = ha._9
1142+ let es = ha._10
1143+ let et = ha._11
1144+ let dr = ha._12
1145+ let ds = ha._13
1146+ let ed = invoke(aU, "emit", [er], nil)
1147+ if ((ed == ed))
11401148 then {
1141- let gY = {
1142- let aM = dZ
1143- if ($isInstanceOf(aM, "Address"))
1149+ let hc = {
1150+ let aQ = ed
1151+ if ($isInstanceOf(aQ, "Address"))
11441152 then {
1145- let gZ = aM
1146- invoke(gZ, "emit", [en], nil)
1153+ let hd = aQ
1154+ invoke(hd, "emit", [er], nil)
11471155 }
11481156 else unit
11491157 }
1150- if ((gY == gY))
1158+ if ((hc == hc))
11511159 then {
1152- let ha = if ((eo > 0))
1153- then invoke(gT, "put", nil, [AttachedPayment(dn, eo)])
1160+ let he = if ((es > 0))
1161+ then invoke(gX, "put", nil, [AttachedPayment(dr, es)])
11541162 else nil
1155- if ((ha == ha))
1163+ if ((he == he))
11561164 then {
1157- let hb = if ((ep > 0))
1158- then invoke(gT, "put", nil, [AttachedPayment(do, ep)])
1165+ let hf = if ((et > 0))
1166+ then invoke(gX, "put", nil, [AttachedPayment(ds, et)])
11591167 else nil
1160- if ((hb == hb))
1168+ if ((hf == hf))
11611169 then {
1162- let hc = if (gQ)
1170+ let hg = if (gU)
11631171 then {
1164- let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, en)])
1165- if ((hd == hd))
1172+ let hh = invoke(gW, "stake", nil, [AttachedPayment(hb, er)])
1173+ if ((hh == hh))
11661174 then nil
11671175 else throw("Strict value is not equal to itself.")
11681176 }
1169- else [ScriptTransfer(cT.caller, en, gX)]
1170- let he = eU(0, 0, 0)
1171- let gk = he._1
1172- let eL = he._2
1173- let hf = if ((eL >= eT))
1177+ else [ScriptTransfer(cX.caller, er, hb)]
1178+ let hi = eY(0, 0, 0)
1179+ let go = hi._1
1180+ let eP = hi._2
1181+ let hj = if ((eP >= eX))
11741182 then true
1175- else aW(makeString(["updated DLp lower than current DLp", toString(eQ), toString(eR), toString(eS), toString(eT), toString(eL), toString(eo), toString(ep)], " "))
1176- if ((hf == hf))
1183+ else ba(makeString(["updated DLp lower than current DLp", toString(eU), toString(eV), toString(eW), toString(eX), toString(eP), toString(es), toString(et)], " "))
1184+ if ((hj == hj))
11771185 then {
1178- let hg = value(assetInfo(bt)).quantity
1179- if ((hg == hg))
1180- then ((dF ++ hc) ++ gk)
1186+ let hk = value(assetInfo(bx)).quantity
1187+ if ((hk == hk))
1188+ then ((dJ ++ hg) ++ go)
11811189 else throw("Strict value is not equal to itself.")
11821190 }
11831191 else throw("Strict value is not equal to itself.")
12021210
12031211
12041212
1205-@Callable(cT)
1206-func putOneTknV2 (fO,gQ) = {
1207- let hh = {
1208- let ba = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1209- if ($isInstanceOf(ba, "Boolean"))
1210- then ba
1211- else throw(($getType(ba) + " couldn't be cast to Boolean"))
1213+@Callable(cX)
1214+func putOneTknV2 (fS,gU) = {
1215+ let hl = {
1216+ let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1217+ if ($isInstanceOf(be, "Boolean"))
1218+ then be
1219+ else throw(($getType(be) + " couldn't be cast to Boolean"))
12121220 }
1213- let hi = if (if (if (bd())
1221+ let hm = if (if (if (bh())
12141222 then true
1215- else (bs == q))
1223+ else (bw == r))
12161224 then true
1217- else (bs == s))
1225+ else (bw == t))
12181226 then true
1219- else hh
1220- let gL = [if (if (!(hi))
1227+ else hl
1228+ let gP = [if (if (!(hm))
12211229 then true
1222- else gp(cT))
1230+ else gt(cX))
12231231 then true
1224- else aW("put operation is blocked by admin"), if ((size(cT.payments) == 1))
1232+ else ba("put operation is blocked by admin"), if ((size(cX.payments) == 1))
12251233 then true
1226- else aW("exactly 1 payment are expected")]
1227- if ((gL == gL))
1234+ else ba("exactly 1 payment are expected")]
1235+ if ((gP == gP))
12281236 then {
1229- let dn = toBase58String(value(bu))
1230- let do = toBase58String(value(bv))
1231- let dm = bt
1232- let fS = bw
1233- let fT = bx
1234- let dl = if ((cT.caller == this))
1235- then cT.originCaller
1236- else cT.caller
1237- let fm = value(cT.payments[0])
1238- let dj = toBase58String(value(fm.assetId))
1239- let dP = fm.amount
1240- let eT = if ((fm.assetId == bu))
1241- then eM(toBigInt(dP), toBigInt(0), toBigInt(0))
1242- else eM(toBigInt(0), toBigInt(dP), toBigInt(0))
1243- if ((eT == eT))
1237+ let dr = toBase58String(value(by))
1238+ let ds = toBase58String(value(bz))
1239+ let dq = bx
1240+ let fW = bA
1241+ let fX = bB
1242+ let dp = if ((cX.caller == this))
1243+ then cX.originCaller
1244+ else cX.caller
1245+ let fq = value(cX.payments[0])
1246+ let dn = toBase58String(value(fq.assetId))
1247+ let dT = fq.amount
1248+ let eX = if ((fq.assetId == by))
1249+ then eQ(toBigInt(dT), toBigInt(0), toBigInt(0))
1250+ else eQ(toBigInt(0), toBigInt(dT), toBigInt(0))
1251+ if ((eX == eX))
12441252 then {
1245- let hj = fr(dP, dj, toString(dl), toBase58String(cT.transactionId), true)
1246- if ((hj == hj))
1253+ let hn = fv(dT, dn, toString(dp), toBase58String(cX.transactionId), true)
1254+ if ((hn == hn))
12471255 then {
1248- let cD = hj._3
1249- let dF = hj._2
1250- let hk = hj._1
1251- let en = if (if ((fO > 0))
1252- then (fO > hk)
1256+ let cH = hn._3
1257+ let dJ = hn._2
1258+ let ho = hn._1
1259+ let er = if (if ((fS > 0))
1260+ then (fS > ho)
12531261 else false)
1254- then aW(makeString(["amount to receive is less than ", toString(fO)], ""))
1255- else hk
1256- let gW = invoke(aQ, "emit", [en], nil)
1257- if ((gW == gW))
1262+ then ba(makeString(["amount to receive is less than ", toString(fS)], ""))
1263+ else ho
1264+ let ha = invoke(aU, "emit", [er], nil)
1265+ if ((ha == ha))
12581266 then {
1259- let gY = {
1260- let aM = gW
1261- if ($isInstanceOf(aM, "Address"))
1267+ let hc = {
1268+ let aQ = ha
1269+ if ($isInstanceOf(aQ, "Address"))
12621270 then {
1263- let gZ = aM
1264- invoke(gZ, "emit", [en], nil)
1271+ let hd = aQ
1272+ invoke(hd, "emit", [er], nil)
12651273 }
12661274 else unit
12671275 }
1268- if ((gY == gY))
1276+ if ((hc == hc))
12691277 then {
1270- let hc = if (gQ)
1278+ let hg = if (gU)
12711279 then {
1272- let hd = invoke(bA, "stakeFor", [toString(cT.caller)], [AttachedPayment(dm, en)])
1273- if ((hd == hd))
1280+ let hh = invoke(bE, "stakeFor", [toString(cX.caller)], [AttachedPayment(dq, er)])
1281+ if ((hh == hh))
12741282 then nil
12751283 else throw("Strict value is not equal to itself.")
12761284 }
1277- else [ScriptTransfer(cT.caller, en, dm)]
1278- let ge = if ((cD > 0))
1279- then [ScriptTransfer(bf, cD, fromBase58String(dj))]
1285+ else [ScriptTransfer(cX.caller, er, dq)]
1286+ let gi = if ((cH > 0))
1287+ then [ScriptTransfer(bj, cH, fromBase58String(dn))]
12801288 else nil
1281- let hl = if ((this == bf))
1289+ let hp = if ((this == bj))
12821290 then $Tuple2(0, 0)
12831291 else {
1284- let hm = if ((fm.assetId == bu))
1292+ let hq = if ((fq.assetId == by))
12851293 then true
12861294 else false
1287- if (hm)
1288- then $Tuple2(-(cD), 0)
1289- else $Tuple2(0, -(cD))
1295+ if (hq)
1296+ then $Tuple2(-(cH), 0)
1297+ else $Tuple2(0, -(cH))
12901298 }
1291- let eV = hl._1
1292- let eW = hl._2
1293- let hn = eU(eV, eW, 0)
1294- let gk = hn._1
1295- let eL = hn._2
1296- let gl = eY(eT, eL)
1297- if ((gl == gl))
1298- then $Tuple2((((dF ++ hc) ++ ge) ++ gk), en)
1299+ let eZ = hp._1
1300+ let fa = hp._2
1301+ let hr = eY(eZ, fa, 0)
1302+ let go = hr._1
1303+ let eP = hr._2
1304+ let gp = fc(eX, eP)
1305+ if ((gp == gp))
1306+ then $Tuple2((((dJ ++ hg) ++ gi) ++ go), er)
12991307 else throw("Strict value is not equal to itself.")
13001308 }
13011309 else throw("Strict value is not equal to itself.")
13111319
13121320
13131321
1314-@Callable(cT)
1315-func putForFree (ho) = if ((0 > ho))
1322+@Callable(cX)
1323+func putForFree (hs) = if ((0 > hs))
13161324 then throw("Wrong slpg")
1317- else if ((size(cT.payments) != 2))
1325+ else if ((size(cX.payments) != 2))
13181326 then throw("2 pmnts expd")
13191327 else {
1320- let hp = fn(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], ho, false, false, true, 0, "")
1321- let dF = hp._9
1322- let gU = toBigInt(value(cT.payments[0]).amount)
1323- let gV = toBigInt(value(cT.payments[1]).amount)
1324- let eT = eM(gU, gV, toBigInt(0))
1325- if ((eT == eT))
1328+ let ht = fr(toString(cX.caller), toBase58String(cX.transactionId), AttachedPayment(value(cX.payments[0]).assetId, value(cX.payments[0]).amount), cX.payments[1], hs, false, false, true, 0, "")
1329+ let dJ = ht._9
1330+ let gY = toBigInt(value(cX.payments[0]).amount)
1331+ let gZ = toBigInt(value(cX.payments[1]).amount)
1332+ let eX = eQ(gY, gZ, toBigInt(0))
1333+ if ((eX == eX))
13261334 then {
1327- let hq = eU(0, 0, 0)
1328- let gk = hq._1
1329- let eL = hq._2
1330- let gl = eY(eT, eL)
1331- if ((gl == gl))
1332- then (dF ++ gk)
1335+ let hu = eY(0, 0, 0)
1336+ let go = hu._1
1337+ let eP = hu._2
1338+ let gp = fc(eX, eP)
1339+ if ((gp == gp))
1340+ then (dJ ++ go)
13331341 else throw("Strict value is not equal to itself.")
13341342 }
13351343 else throw("Strict value is not equal to itself.")
13371345
13381346
13391347
1340-@Callable(cT)
1348+@Callable(cX)
13411349 func get () = {
1342- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1343- if ((eT == eT))
1350+ let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1351+ if ((eX == eX))
13441352 then {
1345- let dZ = fl(cT)
1346- let hr = dZ._1
1347- let dE = dZ._2
1348- let dP = dZ._3
1349- let dj = dZ._4
1350- let dF = dZ._5
1351- let eA = invoke(aQ, "burn", [dP], [AttachedPayment(dj, dP)])
1352- if ((eA == eA))
1353+ let ed = fp(cX)
1354+ let hv = ed._1
1355+ let dI = ed._2
1356+ let dT = ed._3
1357+ let dn = ed._4
1358+ let dJ = ed._5
1359+ let eE = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
1360+ if ((eE == eE))
13531361 then {
1354- let hs = eU(-(hr), -(dE), 0)
1355- let gk = hs._1
1356- let eL = hs._2
1357- let gl = eY(eT, eL)
1358- if ((gl == gl))
1359- then (dF ++ gk)
1362+ let hw = eY(-(hv), -(dI), 0)
1363+ let go = hw._1
1364+ let eP = hw._2
1365+ let gp = fc(eX, eP)
1366+ if ((gp == gp))
1367+ then (dJ ++ go)
13601368 else throw("Strict value is not equal to itself.")
13611369 }
13621370 else throw("Strict value is not equal to itself.")
13661374
13671375
13681376
1369-@Callable(cT)
1370-func getOneTknV2 (fN,fO) = {
1371- let hh = {
1372- let ba = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1373- if ($isInstanceOf(ba, "Boolean"))
1374- then ba
1375- else throw(($getType(ba) + " couldn't be cast to Boolean"))
1377+@Callable(cX)
1378+func getOneTknV2 (fR,fS) = {
1379+ let hl = {
1380+ let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1381+ if ($isInstanceOf(be, "Boolean"))
1382+ then be
1383+ else throw(($getType(be) + " couldn't be cast to Boolean"))
13761384 }
1377- let ht = if (if (bd())
1385+ let hx = if (if (bh())
13781386 then true
1379- else (bs == s))
1387+ else (bw == t))
13801388 then true
1381- else hh
1382- let gL = [if (if (!(ht))
1389+ else hl
1390+ let gP = [if (if (!(hx))
13831391 then true
1384- else gp(cT))
1392+ else gt(cX))
13851393 then true
1386- else aW("get operation is blocked by admin"), if ((size(cT.payments) == 1))
1394+ else ba("get operation is blocked by admin"), if ((size(cX.payments) == 1))
13871395 then true
1388- else aW("exactly 1 payment are expected")]
1389- if ((gL == gL))
1396+ else ba("exactly 1 payment are expected")]
1397+ if ((gP == gP))
13901398 then {
1391- let hu = fM(fN, fO, cT.payments, cT.caller, cT.originCaller, cT.transactionId)
1392- let dF = hu._1
1393- let fX = hu._2
1394- $Tuple2(dF, fX)
1399+ let hy = fQ(fR, fS, cX.payments, cX.caller, cX.originCaller, cX.transactionId)
1400+ let dJ = hy._1
1401+ let gb = hy._2
1402+ $Tuple2(dJ, gb)
13951403 }
13961404 else throw("Strict value is not equal to itself.")
13971405 }
13981406
13991407
14001408
1401-@Callable(cT)
1409+@Callable(cX)
14021410 func refreshDLp () = {
1403- let hv = valueOrElse(getInteger(ap), 0)
1404- let hw = if (((height - hv) >= as))
1411+ let hz = valueOrElse(getInteger(at), 0)
1412+ let hA = if (((height - hz) >= aw))
14051413 then unit
1406- else aW(makeString([toString(as), " blocks have not passed since the previous call"], ""))
1407- if ((hw == hw))
1414+ else ba(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1415+ if ((hA == hA))
14081416 then {
1409- let ff = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ao), "0")), aY("invalid dLp"))
1410- let hx = eU(0, 0, 0)
1411- let hy = hx._1
1412- let eL = hx._2
1413- let eX = if ((ff != eL))
1414- then hy
1415- else aW("nothing to refresh")
1416- $Tuple2(eX, toString(eL))
1417+ let fj = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), bc("invalid dLp"))
1418+ let hB = eY(0, 0, 0)
1419+ let hC = hB._1
1420+ let eP = hB._2
1421+ let fb = if ((fj != eP))
1422+ then hC
1423+ else ba("nothing to refresh")
1424+ $Tuple2(fb, toString(eP))
14171425 }
14181426 else throw("Strict value is not equal to itself.")
14191427 }
14201428
14211429
14221430
1423-@Callable(cT)
1424-func getOneTknV2READONLY (fN,hz) = {
1425- let dn = toBase58String(value(bu))
1426- let do = toBase58String(value(bv))
1427- let dm = toBase58String(value(bt))
1428- let cF = [toBigInt(bT(dn)), toBigInt(bT(do))]
1429- let eK = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dm)), "invalid lp asset").quantity)
1430- let ch = cE(cF)
1431- let cg = (ch - fraction(toBigInt(hz), ch, eK))
1432- let hA = if ((fN == dn))
1431+@Callable(cX)
1432+func getOneTknV2READONLY (fR,hD) = {
1433+ let dr = toBase58String(value(by))
1434+ let ds = toBase58String(value(bz))
1435+ let dq = toBase58String(value(bx))
1436+ let cJ = [toBigInt(bX(dr)), toBigInt(bX(ds))]
1437+ let eO = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dq)), "invalid lp asset").quantity)
1438+ let cl = cI(cJ)
1439+ let ck = (cl - fraction(toBigInt(hD), cl, eO))
1440+ let hE = if ((fR == dr))
14331441 then 0
1434- else if ((fN == do))
1442+ else if ((fR == ds))
14351443 then 1
14361444 else throw("invalid out asset id")
1437- let hB = eu(cF, hA, cg)
1438- let gC = (cF[hA] - hB)
1439- let gD = max([0, toInt((gC - f))])
1440- let hC = cB(gD, bb)
1441- let fW = hC._1
1442- let cD = hC._2
1443- $Tuple2(nil, $Tuple2(fW, cD))
1445+ let hF = ey(cJ, hE, ck)
1446+ let gG = (cJ[hE] - hF)
1447+ let gH = max([0, toInt((gG - f))])
1448+ let hG = cF(gH, bf)
1449+ let ga = hG._1
1450+ let cH = hG._2
1451+ $Tuple2(nil, $Tuple2(ga, cH))
14441452 }
14451453
14461454
14471455
1448-@Callable(cT)
1449-func getOneTknV2WithBonusREADONLY (fN,hz) = {
1450- let dn = toBase58String(value(bu))
1451- let do = toBase58String(value(bv))
1452- let dm = toBase58String(value(bt))
1453- let dt = bT(dn)
1454- let dv = bT(do)
1455- let hD = {
1456- let ba = invoke(this, "getOneTknV2READONLY", [fN, hz], nil)
1457- if ($isInstanceOf(ba, "(Int, Int)"))
1458- then ba
1459- else throw(($getType(ba) + " couldn't be cast to (Int, Int)"))
1456+@Callable(cX)
1457+func getOneTknV2WithBonusREADONLY (fR,hD) = {
1458+ let dr = toBase58String(value(by))
1459+ let ds = toBase58String(value(bz))
1460+ let dq = toBase58String(value(bx))
1461+ let dx = bX(dr)
1462+ let dz = bX(ds)
1463+ let hH = {
1464+ let be = invoke(this, "getOneTknV2READONLY", [fR, hD], nil)
1465+ if ($isInstanceOf(be, "(Int, Int)"))
1466+ then be
1467+ else throw(($getType(be) + " couldn't be cast to (Int, Int)"))
14601468 }
1461- let fW = hD._1
1462- let cD = hD._2
1463- let dZ = dh("", dm, hz, this)
1464- let dD = dZ._1
1465- let dE = dZ._2
1466- let hE = (dD + dE)
1467- let fL = if ((hE == 0))
1468- then if ((fW == 0))
1469+ let ga = hH._1
1470+ let cH = hH._2
1471+ let ed = dl("", dq, hD, this)
1472+ let dH = ed._1
1473+ let dI = ed._2
1474+ let hI = (dH + dI)
1475+ let fP = if ((hI == 0))
1476+ then if ((ga == 0))
14691477 then 0
14701478 else throw("bonus calculation error")
1471- else fraction((fW - hE), a, hE)
1472- $Tuple2(nil, $Tuple3(fW, cD, fL))
1479+ else fraction((ga - hI), a, hI)
1480+ $Tuple2(nil, $Tuple3(ga, cH, fP))
14731481 }
14741482
14751483
14761484
1477-@Callable(cT)
1478-func getNoLess (hF,hG) = {
1479- let dZ = fl(cT)
1480- let dD = dZ._1
1481- let dE = dZ._2
1482- let dP = dZ._3
1483- let dj = dZ._4
1484- let dF = dZ._5
1485- if ((hF > dD))
1486- then throw(((("Failed: " + toString(dD)) + " < ") + toString(hF)))
1487- else if ((hG > dE))
1488- then throw(((("Failed: " + toString(dE)) + " < ") + toString(hG)))
1485+@Callable(cX)
1486+func getNoLess (hJ,hK) = {
1487+ let ed = fp(cX)
1488+ let dH = ed._1
1489+ let dI = ed._2
1490+ let dT = ed._3
1491+ let dn = ed._4
1492+ let dJ = ed._5
1493+ if ((hJ > dH))
1494+ then throw(((("Failed: " + toString(dH)) + " < ") + toString(hJ)))
1495+ else if ((hK > dI))
1496+ then throw(((("Failed: " + toString(dI)) + " < ") + toString(hK)))
14891497 else {
1490- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1491- if ((eT == eT))
1498+ let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1499+ if ((eX == eX))
14921500 then {
1493- let hH = invoke(aQ, "burn", [dP], [AttachedPayment(dj, dP)])
1494- if ((hH == hH))
1501+ let hL = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
1502+ if ((hL == hL))
14951503 then {
1496- let hI = eU(-(dD), -(dE), 0)
1497- let gk = hI._1
1498- let eL = hI._2
1499- let gl = eY(eT, eL)
1500- if ((gl == gl))
1501- then (dF ++ gk)
1504+ let hM = eY(-(dH), -(dI), 0)
1505+ let go = hM._1
1506+ let eP = hM._2
1507+ let gp = fc(eX, eP)
1508+ if ((gp == gp))
1509+ then (dJ ++ go)
15021510 else throw("Strict value is not equal to itself.")
15031511 }
15041512 else throw("Strict value is not equal to itself.")
15091517
15101518
15111519
1512-@Callable(cT)
1513-func unstakeAndGet (cC) = {
1514- let hJ = if ((size(cT.payments) != 0))
1520+@Callable(cX)
1521+func unstakeAndGet (cG) = {
1522+ let hN = if ((size(cX.payments) != 0))
15151523 then throw("No pmnts expd")
15161524 else true
1517- if ((hJ == hJ))
1525+ if ((hN == hN))
15181526 then {
1519- let hK = by()
1520- let gX = bt
1521- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1522- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1523- if ((eT == eT))
1527+ let hO = bC()
1528+ let hb = bx
1529+ let hP = valueOrErrorMessage(addressFromString(hO[D]), "Wr st addr")
1530+ let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1531+ if ((eX == eX))
15241532 then {
1525- let hM = invoke(hL, "unstake", [toBase58String(gX), cC], nil)
1526- if ((hM == hM))
1533+ let hQ = invoke(hP, "unstake", [toBase58String(hb), cG], nil)
1534+ if ((hQ == hQ))
15271535 then {
1528- let dZ = dh(toBase58String(cT.transactionId), toBase58String(gX), cC, cT.caller)
1529- let dD = dZ._1
1530- let dE = dZ._2
1531- let dr = parseIntValue(dZ._9)
1532- let dF = dZ._10
1533- let hN = if (if (bd())
1536+ let ed = dl(toBase58String(cX.transactionId), toBase58String(hb), cG, cX.caller)
1537+ let dH = ed._1
1538+ let dI = ed._2
1539+ let dv = parseIntValue(ed._9)
1540+ let dJ = ed._10
1541+ let hR = if (if (bh())
15341542 then true
1535- else (dr == s))
1536- then throw(("Blocked: " + toString(dr)))
1543+ else (dv == t))
1544+ then throw(("Blocked: " + toString(dv)))
15371545 else true
1538- if ((hN == hN))
1546+ if ((hR == hR))
15391547 then {
1540- let hO = invoke(aQ, "burn", [cC], [AttachedPayment(gX, cC)])
1541- if ((hO == hO))
1548+ let hS = invoke(aU, "burn", [cG], [AttachedPayment(hb, cG)])
1549+ if ((hS == hS))
15421550 then {
1543- let hP = eU(-(dD), -(dE), 0)
1544- let gk = hP._1
1545- let eL = hP._2
1546- let gl = eY(eT, eL)
1547- if ((gl == gl))
1548- then (dF ++ gk)
1551+ let hT = eY(-(dH), -(dI), 0)
1552+ let go = hT._1
1553+ let eP = hT._2
1554+ let gp = fc(eX, eP)
1555+ if ((gp == gp))
1556+ then (dJ ++ go)
15491557 else throw("Strict value is not equal to itself.")
15501558 }
15511559 else throw("Strict value is not equal to itself.")
15611569
15621570
15631571
1564-@Callable(cT)
1565-func unstakeAndGetNoLess (hQ,hR,hG) = {
1566- let ht = if (bd())
1572+@Callable(cX)
1573+func unstakeAndGetNoLess (hU,hV,hK) = {
1574+ let hx = if (bh())
15671575 then true
1568- else (bs == s)
1569- let gL = [if (!(ht))
1576+ else (bw == t)
1577+ let gP = [if (!(hx))
15701578 then true
1571- else throw("get operation is blocked by admin"), if ((size(cT.payments) == 0))
1579+ else throw("get operation is blocked by admin"), if ((size(cX.payments) == 0))
15721580 then true
15731581 else throw("no payments are expected")]
1574- if ((gL == gL))
1582+ if ((gP == gP))
15751583 then {
1576- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1577- if ((eT == eT))
1584+ let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1585+ if ((eX == eX))
15781586 then {
1579- let hM = invoke(bA, "unstake", [toBase58String(bt), hQ], nil)
1580- if ((hM == hM))
1587+ let hQ = invoke(bE, "unstake", [toBase58String(bx), hU], nil)
1588+ if ((hQ == hQ))
15811589 then {
1582- let hS = dh(toBase58String(cT.transactionId), toBase58String(bt), hQ, cT.caller)
1583- let dD = hS._1
1584- let dE = hS._2
1585- let dF = hS._10
1586- let hT = [if ((dD >= hR))
1590+ let hW = dl(toBase58String(cX.transactionId), toBase58String(bx), hU, cX.caller)
1591+ let dH = hW._1
1592+ let dI = hW._2
1593+ let dJ = hW._10
1594+ let hX = [if ((dH >= hV))
15871595 then true
1588- else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dE >= hG))
1596+ else throw(makeString(["amount asset amount to receive is less than ", toString(hV)], "")), if ((dI >= hK))
15891597 then true
1590- else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1591- if ((hT == hT))
1598+ else throw(makeString(["price asset amount to receive is less than ", toString(hK)], ""))]
1599+ if ((hX == hX))
15921600 then {
1593- let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bt, hQ)])
1594- if ((hH == hH))
1601+ let hL = invoke(aU, "burn", [hU], [AttachedPayment(bx, hU)])
1602+ if ((hL == hL))
15951603 then {
1596- let hU = eU(-(dD), -(dE), 0)
1597- let gk = hU._1
1598- let eL = hU._2
1599- let gl = eY(eT, eL)
1600- if ((gl == gl))
1601- then (dF ++ gk)
1604+ let hY = eY(-(dH), -(dI), 0)
1605+ let go = hY._1
1606+ let eP = hY._2
1607+ let gp = fc(eX, eP)
1608+ if ((gp == gp))
1609+ then (dJ ++ go)
16021610 else throw("Strict value is not equal to itself.")
16031611 }
16041612 else throw("Strict value is not equal to itself.")
16141622
16151623
16161624
1617-@Callable(cT)
1618-func unstakeAndGetOneTknV2 (hQ,fN,fO) = {
1619- let hh = {
1620- let ba = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1621- if ($isInstanceOf(ba, "Boolean"))
1622- then ba
1623- else throw(($getType(ba) + " couldn't be cast to Boolean"))
1625+@Callable(cX)
1626+func unstakeAndGetOneTknV2 (hU,fR,fS) = {
1627+ let hl = {
1628+ let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1629+ if ($isInstanceOf(be, "Boolean"))
1630+ then be
1631+ else throw(($getType(be) + " couldn't be cast to Boolean"))
16241632 }
1625- let ht = if (if (bd())
1633+ let hx = if (if (bh())
16261634 then true
1627- else (bs == s))
1635+ else (bw == t))
16281636 then true
1629- else hh
1630- let gL = [if (if (!(ht))
1637+ else hl
1638+ let gP = [if (if (!(hx))
16311639 then true
1632- else gp(cT))
1640+ else gt(cX))
16331641 then true
1634- else aW("get operation is blocked by admin"), if ((size(cT.payments) == 0))
1642+ else ba("get operation is blocked by admin"), if ((size(cX.payments) == 0))
16351643 then true
1636- else aW("no payments are expected")]
1637- if ((gL == gL))
1644+ else ba("no payments are expected")]
1645+ if ((gP == gP))
16381646 then {
1639- let hK = by()
1640- let gX = bt
1641- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1642- let dl = cT.caller
1643- let hV = this
1644- let hM = invoke(hL, "unstakeINTERNAL", [gX, hQ, dl.bytes, hV.bytes], nil)
1645- if ((hM == hM))
1647+ let hO = bC()
1648+ let hb = bx
1649+ let hP = valueOrErrorMessage(addressFromString(hO[D]), "Wr st addr")
1650+ let dp = cX.caller
1651+ let hZ = this
1652+ let hQ = invoke(hP, "unstakeINTERNAL", [hb, hU, dp.bytes, hZ.bytes], nil)
1653+ if ((hQ == hQ))
16461654 then {
1647- let hW = fM(fN, fO, [AttachedPayment(gX, hQ)], cT.caller, cT.originCaller, cT.transactionId)
1648- let dF = hW._1
1649- let fX = hW._2
1650- $Tuple2(dF, fX)
1655+ let ia = fQ(fR, fS, [AttachedPayment(hb, hU)], cX.caller, cX.originCaller, cX.transactionId)
1656+ let dJ = ia._1
1657+ let gb = ia._2
1658+ $Tuple2(dJ, gb)
16511659 }
16521660 else throw("Strict value is not equal to itself.")
16531661 }
16561664
16571665
16581666
1659-@Callable(cT)
1660-func putOneTknV2WithBonusREADONLY (hX,hY) = {
1661- let hZ = fr(hX, hY, "", "", true)
1662- let fG = hZ._1
1663- let dF = hZ._2
1664- let cD = hZ._3
1665- let fL = hZ._4
1666- $Tuple2(nil, $Tuple3(fG, cD, fL))
1667+@Callable(cX)
1668+func putOneTknV2WithBonusREADONLY (ib,ic) = {
1669+ let id = fv(ib, ic, "", "", true)
1670+ let fK = id._1
1671+ let dJ = id._2
1672+ let cH = id._3
1673+ let fP = id._4
1674+ $Tuple2(nil, $Tuple3(fK, cH, fP))
16671675 }
16681676
16691677
16701678
1671-@Callable(cT)
1672-func putOneTknV2WithoutTakeFeeREADONLY (hX,hY) = {
1673- let ia = fr(hX, hY, "", "", false)
1674- let fG = ia._1
1675- let dF = ia._2
1676- let cD = ia._3
1677- let fL = ia._4
1678- $Tuple2(nil, $Tuple3(fG, cD, fL))
1679+@Callable(cX)
1680+func putOneTknV2WithoutTakeFeeREADONLY (ib,ic) = {
1681+ let ie = fv(ib, ic, "", "", false)
1682+ let fK = ie._1
1683+ let dJ = ie._2
1684+ let cH = ie._3
1685+ let fP = ie._4
1686+ $Tuple2(nil, $Tuple3(fK, cH, fP))
16791687 }
16801688
16811689
16821690
1683-@Callable(cT)
1684-func activate (ib,ic) = if ((toString(cT.caller) != toString(aQ)))
1691+@Callable(cX)
1692+func activate (if,ig) = if ((toString(cX.caller) != toString(aU)))
16851693 then throw("denied")
1686- else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
1694+ else $Tuple2([StringEntry(ak(), if), StringEntry(al(), ig), StringEntry(am(), toString(l)), StringEntry(an(height), toString(l))], "success")
16871695
16881696
16891697
1690-@Callable(cT)
1691-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bg())
1698+@Callable(cX)
1699+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bk())
16921700
16931701
16941702
1695-@Callable(cT)
1696-func getAccBalanceWrapperREADONLY (bU) = $Tuple2(nil, bT(bU))
1703+@Callable(cX)
1704+func getAccBalanceWrapperREADONLY (bY) = $Tuple2(nil, bX(bY))
16971705
16981706
16991707
1700-@Callable(cT)
1701-func calcPricesWrapperREADONLY (cn,co,cs) = {
1702- let id = cr(cn, co, cs)
1703- $Tuple2(nil, [toString(id[0]), toString(id[1]), toString(id[2])])
1708+@Callable(cX)
1709+func calcPricesWrapperREADONLY (cr,cs,cw) = {
1710+ let ih = cv(cr, cs, cw)
1711+ $Tuple2(nil, [toString(ih[0]), toString(ih[1]), toString(ih[2])])
17041712 }
17051713
17061714
17071715
1708-@Callable(cT)
1709-func fromX18WrapperREADONLY (M,ie) = $Tuple2(nil, L(parseBigIntValue(M), ie))
1716+@Callable(cX)
1717+func fromX18WrapperREADONLY (N,ii) = $Tuple2(nil, M(parseBigIntValue(N), ii))
17101718
17111719
17121720
1713-@Callable(cT)
1714-func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
1721+@Callable(cX)
1722+func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K)))
17151723
17161724
17171725
1718-@Callable(cT)
1719-func calcPriceBigIntWrapperREADONLY (bW,bX) = $Tuple2(nil, toString(bV(parseBigIntValue(bW), parseBigIntValue(bX))))
1726+@Callable(cX)
1727+func calcPriceBigIntWrapperREADONLY (ca,cb) = $Tuple2(nil, toString(bZ(parseBigIntValue(ca), parseBigIntValue(cb))))
17201728
17211729
17221730
1723-@Callable(cT)
1724-func estimatePutOperationWrapperREADONLY (di,cc,dH,dI,dJ,dK,if,dL,dM) = $Tuple2(nil, dG(di, cc, dH, dI, dJ, dK, if, dL, dM, true, false, 0, ""))
1731+@Callable(cX)
1732+func estimatePutOperationWrapperREADONLY (dm,cg,dL,dM,dN,dO,ij,dP,dQ) = $Tuple2(nil, dK(dm, cg, dL, dM, dN, dO, ij, dP, dQ, true, false, 0, ""))
17251733
17261734
17271735
1728-@Callable(cT)
1729-func estimateGetOperationWrapperREADONLY (di,ig,dk,if) = {
1730- let dZ = dh(di, ig, dk, addressFromStringValue(if))
1731- $Tuple2(nil, $Tuple10(dZ._1, dZ._2, dZ._3, dZ._4, dZ._5, dZ._6, dZ._7, toString(dZ._8), dZ._9, dZ._10))
1736+@Callable(cX)
1737+func estimateGetOperationWrapperREADONLY (dm,ik,do,ij) = {
1738+ let ed = dl(dm, ik, do, addressFromStringValue(ij))
1739+ $Tuple2(nil, $Tuple10(ed._1, ed._2, ed._3, ed._4, ed._5, ed._6, ed._7, toString(ed._8), ed._9, ed._10))
17321740 }
17331741
17341742
17351743
1736-@Callable(cT)
1744+@Callable(cX)
17371745 func changeAmp () = {
1738- let ih = invoke(aQ, "changeAmp", [toString(this)], nil)
1739- if ((ih == ih))
1740- then nil
1746+ let il = invoke(aU, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1747+ let im = {
1748+ let aQ = il
1749+ if ($isInstanceOf(aQ, "List[Any]"))
1750+ then {
1751+ let in = aQ
1752+ $Tuple3({
1753+ let be = in[0]
1754+ if ($isInstanceOf(be, "Int"))
1755+ then be
1756+ else throw(($getType(be) + " couldn't be cast to Int"))
1757+ }, {
1758+ let be = in[1]
1759+ if ($isInstanceOf(be, "Int"))
1760+ then be
1761+ else throw(($getType(be) + " couldn't be cast to Int"))
1762+ }, {
1763+ let be = in[2]
1764+ if ($isInstanceOf(be, "Int"))
1765+ then be
1766+ else throw(($getType(be) + " couldn't be cast to Int"))
1767+ })
1768+ }
1769+ else ba("invalid entry type")
1770+ }
1771+ let io = im._1
1772+ let ip = im._2
1773+ let iq = im._3
1774+ let ir = parseIntValue(getStringValue(am()))
1775+ let is = (ir + ip)
1776+ let it = if ((0 > ip))
1777+ then if ((iq > is))
1778+ then iq
1779+ else is
1780+ else if ((is > iq))
1781+ then iq
1782+ else is
1783+ let iu = valueOrElse(getInteger(ap()), 0)
1784+ let iv = (iu + io)
1785+ let gP = [if ((height > iv))
1786+ then true
1787+ else ba("try again in few blocks"), if ((ir != it))
1788+ then true
1789+ else ba("already reached target")]
1790+ if ((gP == gP))
1791+ then [IntegerEntry(ap(), height), StringEntry(am(), toString(it)), StringEntry(an(height), toString(it))]
17411792 else throw("Strict value is not equal to itself.")
17421793 }
17431794
17441795
1745-@Verifier(ii)
1746-func ij () = {
1747- let ik = {
1748- let aM = gm()
1749- if ($isInstanceOf(aM, "ByteVector"))
1796+@Verifier(iw)
1797+func ix () = {
1798+ let iy = {
1799+ let aQ = gq()
1800+ if ($isInstanceOf(aQ, "ByteVector"))
17501801 then {
1751- let gq = aM
1752- gq
1802+ let gu = aQ
1803+ gu
17531804 }
1754- else if ($isInstanceOf(aM, "Unit"))
1755- then ii.senderPublicKey
1805+ else if ($isInstanceOf(aQ, "Unit"))
1806+ then iw.senderPublicKey
17561807 else throw("Match error")
17571808 }
1758- let aM = ii
1759- if ($isInstanceOf(aM, "Order"))
1809+ let aQ = iw
1810+ if ($isInstanceOf(aQ, "Order"))
17601811 then {
1761- let fb = aM
1762- let il = be()
1763- let im = if (gx())
1812+ let ff = aQ
1813+ let iz = bi()
1814+ let iA = if (gB())
17641815 then $Tuple2(true, "")
1765- else fa(fb)
1766- let aG = im._1
1767- let aH = im._2
1768- let aI = sigVerify(fb.bodyBytes, fb.proofs[0], fb.senderPublicKey)
1769- let aJ = sigVerify(fb.bodyBytes, fb.proofs[1], il)
1770- if (if (if (aG)
1771- then aI
1816+ else fe(ff)
1817+ let aK = iA._1
1818+ let aL = iA._2
1819+ let aM = sigVerify(ff.bodyBytes, ff.proofs[0], ff.senderPublicKey)
1820+ let aN = sigVerify(ff.bodyBytes, ff.proofs[1], iz)
1821+ if (if (if (aK)
1822+ then aM
17721823 else false)
1773- then aJ
1824+ then aN
17741825 else false)
17751826 then true
1776- else aF(aG, aH, aI, aJ)
1827+ else aJ(aK, aL, aM, aN)
17771828 }
1778- else if ($isInstanceOf(aM, "SetScriptTransaction"))
1829+ else if ($isInstanceOf(aQ, "SetScriptTransaction"))
17791830 then {
1780- let aR = aM
1781- if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
1831+ let aV = aQ
1832+ if (sigVerify(iw.bodyBytes, iw.proofs[0], iy))
17821833 then true
17831834 else {
1784- let in = blake2b256(value(aR.script))
1785- let io = fromBase64String(value(getString(aQ, aB())))
1786- let ip = scriptHash(this)
1787- if ((io == in))
1788- then (ip != in)
1835+ let iB = blake2b256(value(aV.script))
1836+ let iC = fromBase64String(value(getString(aU, aF())))
1837+ let iD = scriptHash(this)
1838+ if ((iC == iB))
1839+ then (iD != iB)
17891840 else false
17901841 }
17911842 }
1792- else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
1843+ else sigVerify(iw.bodyBytes, iw.proofs[0], iy)
17931844 }
17941845
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = toBigInt(100000000)
77
88 let c = toBigInt(1000000000000000000)
99
1010 let d = toBigInt(0)
1111
1212 let e = toBigInt(0)
1313
1414 let f = toBigInt(1)
1515
1616 let g = toBigInt(2)
1717
1818 let h = toBigInt(3)
1919
2020 let i = toBigInt(4)
2121
2222 let j = toBigInt((a - ((a * 1) / a)))
2323
2424 let k = "WAVES"
2525
26-let l = "100"
26+let l = 50
2727
28-let m = "1"
28+let m = "100"
2929
30-let n = "__"
30+let n = "1"
3131
32-let o = ""
32+let o = "__"
3333
34-let p = 1
34+let p = ""
3535
36-let q = 2
36+let q = 1
3737
38-let r = 3
38+let r = 2
3939
40-let s = 4
40+let s = 3
4141
42-let t = 1
42+let t = 4
4343
44-let u = 2
44+let u = 1
4545
46-let v = 3
46+let v = 2
4747
48-let w = 4
48+let w = 3
4949
50-let x = 5
50+let x = 4
5151
52-let y = 6
52+let y = 5
5353
54-let z = 7
54+let z = 6
5555
56-let A = 8
56+let A = 7
5757
58-let B = 9
58+let B = 8
5959
60-let C = 1
60+let C = 9
6161
62-let D = 6
62+let D = 1
6363
64-let E = 7
64+let E = 6
6565
66-let F = 10
66+let F = 7
6767
68-let G = fraction(10, a, 10000)
68+let G = 10
6969
70-func H (I,J) = fraction(toBigInt(I), c, toBigInt(J))
70+let H = fraction(10, a, 10000)
71+
72+func I (J,K) = fraction(toBigInt(J), c, toBigInt(K))
7173
7274
73-func K (I,J) = fraction(I, c, J)
75+func L (J,K) = fraction(J, c, K)
7476
7577
76-func L (M,N) = toInt(fraction(M, toBigInt(N), c))
78+func M (N,O) = toInt(fraction(N, toBigInt(O), c))
7779
7880
79-func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P))
81+func P (N,O,Q) = toInt(fraction(N, toBigInt(O), c, Q))
8082
8183
82-func Q (I,J) = fraction(I, c, toBigInt(J))
84+func R (J,K) = fraction(J, c, toBigInt(K))
8385
8486
85-func R (M,N) = fraction(M, toBigInt(N), c)
87+func S (N,O) = fraction(N, toBigInt(O), c)
8688
8789
88-func S (T,U,V) = fraction(T, U, V)
90+func T (U,V,W) = fraction(U, V, W)
8991
9092
91-func W (M) = if ((d > M))
92- then -(M)
93- else M
93+func X (N) = if ((d > N))
94+ then -(N)
95+ else N
9496
9597
96-func X (M) = if ((d > M))
97- then -(M)
98- else M
98+func Y (N) = if ((d > N))
99+ then -(N)
100+ else N
99101
100102
101-func Y () = "%s__factoryContract"
103+func Z () = "%s__factoryContract"
102104
103105
104-func Z () = "%s__managerPublicKey"
106+func aa () = "%s__managerPublicKey"
105107
106108
107-func aa () = "%s__managerVaultAddress"
109+func ab () = "%s__managerVaultAddress"
108110
109111
110-func ab () = "%s%s__price__last"
112+func ac () = "%s%s__price__last"
111113
112114
113-func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n)
115+func ad (ae,af) = makeString(["%s%s%d%d__price__history", toString(ae), toString(af)], o)
114116
115117
116-func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah)
118+func ag (ah,ai) = ((("%s%s%s__P__" + ah) + "__") + ai)
117119
118120
119-func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah)
121+func aj (ah,ai) = ((("%s%s%s__G__" + ah) + "__") + ai)
120122
121123
122-func aj () = "%s__amountAsset"
124+func ak () = "%s__amountAsset"
123125
124126
125-func ak () = "%s__priceAsset"
127+func al () = "%s__priceAsset"
126128
127129
128-func al () = makeString(["%s%s", "amp", toString(this)], n)
130+func am () = "%s__amp"
129131
130132
131-let am = "%s__fee"
132-
133-let an = valueOrElse(getInteger(this, am), G)
134-
135-let ao = makeString(["%s", "dLp"], n)
136-
137-let ap = makeString(["%s", "dLpRefreshedHeight"], n)
138-
139-let aq = makeString(["%s", "refreshDLpDelay"], n)
140-
141-let ar = 30
142-
143-let as = valueOrElse(getInteger(this, aq), ar)
144-
145-func at () = "%s__factoryConfig"
133+func an (ao) = ("%s%d__amp__" + toString(ao))
146134
147135
148-func au () = "%s%s__matcher__publicKey"
136+func ap () = "%s__changeAmpLastCall"
149137
150138
151-func av (aw,ax) = (((("%d%d%s__" + aw) + "__") + ax) + "__config")
139+let aq = "%s__fee"
140+
141+let ar = valueOrElse(getInteger(this, aq), H)
142+
143+let as = makeString(["%s", "dLp"], o)
144+
145+let at = makeString(["%s", "dLpRefreshedHeight"], o)
146+
147+let au = makeString(["%s", "refreshDLpDelay"], o)
148+
149+let av = 30
150+
151+let aw = valueOrElse(getInteger(this, au), av)
152+
153+func ax () = "%s__factoryConfig"
152154
153155
154-func ay (az) = ("%s%s%s__mappings__baseAsset2internalId__" + az)
156+func ay () = "%s%s__matcher__publicKey"
155157
156158
157-func aA () = "%s__shutdown"
159+func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
158160
159161
160-func aB () = "%s__allowedLpStableScriptHash"
162+func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
161163
162164
163-func aC () = "%s__feeCollectorAddress"
165+func aE () = "%s__shutdown"
164166
165167
166-func aD (aE) = ("%s%s__skipOrderValidation__" + aE)
168+func aF () = "%s__allowedLpStableScriptHash"
167169
168170
169-func aF (aG,aH,aI,aJ) = throw((((((((("order validation failed: orderValid=" + toString(aG)) + " (") + aH) + ")") + " senderValid=") + toString(aI)) + " matcherValid=") + toString(aJ)))
171+func aG () = "%s__feeCollectorAddress"
170172
171173
172-func aK (aL) = {
173- let aM = addressFromString(aL)
174- if ($isInstanceOf(aM, "Address"))
174+func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
175+
176+
177+func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
178+
179+
180+func aO (aP) = {
181+ let aQ = addressFromString(aP)
182+ if ($isInstanceOf(aQ, "Address"))
175183 then {
176- let aN = aM
177- aN
184+ let aR = aQ
185+ aR
178186 }
179187 else this
180188 }
181189
182190
183-func aO () = {
184- let aP = {
185- let aM = getString(Y())
186- if ($isInstanceOf(aM, "String"))
191+func aS () = {
192+ let aT = {
193+ let aQ = getString(Z())
194+ if ($isInstanceOf(aQ, "String"))
187195 then {
188- let aQ = aM
189- aK(aQ)
196+ let aU = aQ
197+ aO(aU)
190198 }
191199 else this
192200 }
193- let aM = getString(aP, aa())
194- if ($isInstanceOf(aM, "String"))
201+ let aQ = getString(aT, ab())
202+ if ($isInstanceOf(aQ, "String"))
195203 then {
196- let aR = aM
197- aK(aR)
204+ let aV = aQ
205+ aO(aV)
198206 }
199207 else this
200208 }
201209
202210
203-func aS (aT,aU) = valueOrErrorMessage(getString(aT, aU), makeString(["mandatory ", toString(aT), ".", aU, " not defined"], ""))
211+func aW (aX,aY) = valueOrErrorMessage(getString(aX, aY), makeString(["mandatory ", toString(aX), ".", aY, " not defined"], ""))
204212
205213
206-func aV (aT,aU) = valueOrErrorMessage(getInteger(aT, aU), makeString(["mandatory ", toString(aT), ".", aU, " not defined"], ""))
214+func aZ (aX,aY) = valueOrErrorMessage(getInteger(aX, aY), makeString(["mandatory ", toString(aX), ".", aY, " not defined"], ""))
207215
208216
209-func aW (aX) = throw(makeString(["lp_stable.ride:", aX], " "))
217+func ba (bb) = throw(makeString(["lp_stable.ride:", bb], " "))
210218
211219
212-func aY (aX) = makeString(["lp_stable.ride:", aX], " ")
220+func bc (bb) = makeString(["lp_stable.ride:", bb], " ")
213221
214222
215-let aQ = addressFromStringValue(aS(this, Y()))
223+let aU = addressFromStringValue(aW(this, Z()))
216224
217-let aZ = {
218- let ba = invoke(aQ, "getInFeeREADONLY", [toString(this)], nil)
219- if ($isInstanceOf(ba, "Int"))
220- then ba
221- else throw(($getType(ba) + " couldn't be cast to Int"))
225+let bd = {
226+ let be = invoke(aU, "getInFeeREADONLY", [toString(this)], nil)
227+ if ($isInstanceOf(be, "Int"))
228+ then be
229+ else throw(($getType(be) + " couldn't be cast to Int"))
222230 }
223231
224-let bb = {
225- let ba = invoke(aQ, "getOutFeeREADONLY", [toString(this)], nil)
226- if ($isInstanceOf(ba, "Int"))
227- then ba
228- else throw(($getType(ba) + " couldn't be cast to Int"))
232+let bf = {
233+ let be = invoke(aU, "getOutFeeREADONLY", [toString(this)], nil)
234+ if ($isInstanceOf(be, "Int"))
235+ then be
236+ else throw(($getType(be) + " couldn't be cast to Int"))
229237 }
230238
231-let bc = aS(aQ, al())
239+let bg = aW(this, am())
232240
233-func bd () = valueOrElse(getBoolean(aQ, aA()), false)
241+func bh () = valueOrElse(getBoolean(aU, aE()), false)
234242
235243
236-func be () = fromBase58String(aS(aQ, au()))
244+func bi () = fromBase58String(aW(aU, ay()))
237245
238246
239-let bf = addressFromStringValue(aS(aQ, aC()))
247+let bj = addressFromStringValue(aW(aU, aG()))
240248
241-func bg () = {
242- let bh = aS(this, aj())
243- let bi = aS(this, ak())
244- let bj = aV(aQ, ay(bi))
245- let aw = aV(aQ, ay(bh))
246- split(aS(aQ, av(toString(aw), toString(bj))), n)
249+func bk () = {
250+ let bl = aW(this, ak())
251+ let bm = aW(this, al())
252+ let bn = aZ(aU, aC(bm))
253+ let aA = aZ(aU, aC(bl))
254+ split(aW(aU, az(toString(aA), toString(bn))), o)
247255 }
248256
249257
250-func bk (bl) = if ((bl == k))
258+func bo (bp) = if ((bp == k))
251259 then unit
252- else fromBase58String(bl)
260+ else fromBase58String(bp)
253261
254262
255-func bm (bl) = if ((bl == unit))
263+func bq (bp) = if ((bp == unit))
256264 then k
257- else toBase58String(value(bl))
265+ else toBase58String(value(bp))
258266
259267
260-func bn (bo) = $Tuple7(addressFromStringValue(bo[t]), parseIntValue(bo[u]), fromBase58String(bo[v]), bk(bo[w]), bk(bo[x]), parseIntValue(bo[y]), parseIntValue(bo[z]))
268+func br (bs) = $Tuple7(addressFromStringValue(bs[u]), parseIntValue(bs[v]), fromBase58String(bs[w]), bo(bs[x]), bo(bs[y]), parseIntValue(bs[z]), parseIntValue(bs[A]))
261269
262270
263-let bp = bn(bg())
271+let bt = br(bk())
264272
265-let bq = bp
273+let bu = bt
266274
267-let br = bq._1
275+let bv = bu._1
268276
269-let bs = bq._2
277+let bw = bu._2
270278
271-let bt = bq._3
279+let bx = bu._3
272280
273-let bu = bq._4
281+let by = bu._4
274282
275-let bv = bq._5
283+let bz = bu._5
276284
277-let bw = bq._6
285+let bA = bu._6
278286
279-let bx = bq._7
287+let bB = bu._7
280288
281-func by () = split(aS(aQ, at()), n)
289+func bC () = split(aW(aU, ax()), o)
282290
283291
284-let bz = by()
292+let bD = bC()
285293
286-let bA = valueOrErrorMessage(addressFromString(bz[C]), "Invalid staking contract address")
294+let bE = valueOrErrorMessage(addressFromString(bD[D]), "Invalid staking contract address")
287295
288-let bB = valueOrErrorMessage(addressFromString(bz[E]), "Invalid slipage contract address")
296+let bF = valueOrErrorMessage(addressFromString(bD[F]), "Invalid slipage contract address")
289297
290-let bC = valueOrErrorMessage(addressFromString(bz[F]), "Invalid gwx contract address")
298+let bG = valueOrErrorMessage(addressFromString(bD[G]), "Invalid gwx contract address")
291299
292-let bD = valueOrErrorMessage(addressFromString(bz[D]), "Invalid gwx contract address")
300+let bH = valueOrErrorMessage(addressFromString(bD[E]), "Invalid gwx contract address")
293301
294-func bE (bF,bG,bH,bI,bJ,bK,bL,bM,bN,bO) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN), toString(bO)], n)
302+func bI (bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN), toString(bO), toString(bP), toString(bQ), toString(bR), toString(bS)], o)
295303
296304
297-func bP (bQ,bR,bS,bI,bL,bM) = makeString(["%d%d%d%d%d%d", toString(bQ), toString(bR), toString(bS), toString(bI), toString(bL), toString(bM)], n)
305+func bT (bU,bV,bW,bM,bP,bQ) = makeString(["%d%d%d%d%d%d", toString(bU), toString(bV), toString(bW), toString(bM), toString(bP), toString(bQ)], o)
298306
299307
300-func bT (bU) = if ((bU == "WAVES"))
308+func bX (bY) = if ((bY == "WAVES"))
301309 then wavesBalance(this).available
302- else assetBalance(this, fromBase58String(bU))
310+ else assetBalance(this, fromBase58String(bY))
303311
304312
305-func bV (bW,bX) = fraction(bW, c, bX)
313+func bZ (ca,cb) = fraction(ca, c, cb)
306314
307315
308-func bY (bW,bX,P) = fraction(bW, c, bX, P)
316+func cc (ca,cb,Q) = fraction(ca, c, cb, Q)
309317
310318
311-func bZ (ca,cb,cc) = {
312- let cd = fraction((ca - cb), b, cb)
313- let ce = ((cc - W(cd)) > d)
314- if (!(ce))
315- then throw(("Big slpg: " + toString(cd)))
316- else $Tuple2(ce, min([ca, cb]))
319+func cd (ce,cf,cg) = {
320+ let ch = fraction((ce - cf), b, cf)
321+ let ci = ((cg - X(ch)) > d)
322+ if (!(ci))
323+ then throw(("Big slpg: " + toString(ch)))
324+ else $Tuple2(ci, min([ce, cf]))
317325 }
318326
319327
320-func cf (cg,ch,ci) = {
321- let cd = fraction(ch, b, cg)
322- let cj = (ci > cd)
323- if (if (cj)
328+func cj (ck,cl,cm) = {
329+ let ch = fraction(cl, b, ck)
330+ let cn = (cm > ch)
331+ if (if (cn)
324332 then true
325- else (ch > cg))
326- then throw(((((((toString(ch) + " ") + toString(cg)) + " ") + toString(cd)) + " ") + toString(ci)))
327- else cj
333+ else (cl > ck))
334+ then throw(((((((toString(cl) + " ") + toString(ck)) + " ") + toString(ch)) + " ") + toString(cm)))
335+ else cn
328336 }
329337
330338
331-func ck (cl,cm,cn,co) = {
332- let cp = H(cn, cl)
333- let cq = H(co, cm)
334- bV(cq, cp)
339+func co (cp,cq,cr,cs) = {
340+ let ct = I(cr, cp)
341+ let cu = I(cs, cq)
342+ bZ(cu, ct)
335343 }
336344
337345
338-func cr (cn,co,cs) = {
339- let ct = bw
340- let cu = bx
341- let cv = ck(ct, cu, cn, co)
342- let bX = H(cn, ct)
343- let bW = H(co, cu)
344- let cw = H(cs, a)
345- let cx = bV(bX, cw)
346- let cy = bV(bW, cw)
347-[cv, cx, cy]
346+func cv (cr,cs,cw) = {
347+ let cx = bA
348+ let cy = bB
349+ let cz = co(cx, cy, cr, cs)
350+ let cb = I(cr, cx)
351+ let ca = I(cs, cy)
352+ let cA = I(cw, a)
353+ let cB = bZ(cb, cA)
354+ let cC = bZ(ca, cA)
355+[cz, cB, cC]
348356 }
349357
350358
351-func cz (cn,co,cs) = {
352- let cA = cr(cn, co, cs)
353-[L(cA[0], a), L(cA[1], a), L(cA[2], a)]
359+func cD (cr,cs,cw) = {
360+ let cE = cv(cr, cs, cw)
361+[M(cE[0], a), M(cE[1], a), M(cE[2], a)]
354362 }
355363
356364
357-func cB (cC,an) = {
358- let cD = if ((an == 0))
365+func cF (cG,ar) = {
366+ let cH = if ((ar == 0))
359367 then 0
360- else fraction(cC, an, a)
361- $Tuple2((cC - cD), cD)
368+ else fraction(cG, ar, a)
369+ $Tuple2((cG - cH), cH)
362370 }
363371
364372
365-func cE (cF) = {
366- let cG = cF[0]
367- let cH = cF[1]
368- let aR = (cG + cH)
369- if ((aR == e))
373+func cI (cJ) = {
374+ let cK = cJ[0]
375+ let cL = cJ[1]
376+ let aV = (cK + cL)
377+ if ((aV == e))
370378 then e
371379 else {
372- let aN = parseIntValue(bc)
373- let cI = (aN * 2)
374- let cA = fraction(cG, cH, f)
375- let cJ = fraction(cA, i, f)
376- let cK = fraction(toBigInt(cI), aR, f)
377- let cL = toBigInt((cI - 1))
378- func cM (cN) = {
379- let cO = fraction(cN, cN, f)
380- let cP = fraction(cO, cN, f)
381- let cQ = fraction(cP, f, cJ)
382- fraction((cK + fraction(cQ, g, f)), cN, (fraction(cL, cN, f) + fraction(h, cQ, f)))
380+ let aR = parseIntValue(bg)
381+ let cM = (aR * 2)
382+ let cE = fraction(cK, cL, f)
383+ let cN = fraction(cE, i, f)
384+ let cO = fraction(toBigInt(cM), aV, f)
385+ let cP = toBigInt((cM - 1))
386+ func cQ (cR) = {
387+ let cS = fraction(cR, cR, f)
388+ let cT = fraction(cS, cR, f)
389+ let cU = fraction(cT, f, cN)
390+ fraction((cO + fraction(cU, g, f)), cR, (fraction(cP, cR, f) + fraction(h, cU, f)))
383391 }
384392
385- func cR (cS,cT) = if (cS._2)
386- then cS
393+ func cV (cW,cX) = if (cW._2)
394+ then cW
387395 else {
388- let cN = cS._1
389- let cU = cM(cN)
390- let cV = (cU - value(cN))
391- let cW = if ((e > cV))
392- then -(cV)
393- else cV
394- if ((f >= cW))
395- then $Tuple2(cU, true)
396- else $Tuple2(cU, false)
396+ let cR = cW._1
397+ let cY = cQ(cR)
398+ let cZ = (cY - value(cR))
399+ let da = if ((e > cZ))
400+ then -(cZ)
401+ else cZ
402+ if ((f >= da))
403+ then $Tuple2(cY, true)
404+ else $Tuple2(cY, false)
397405 }
398406
399- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
400- let cY = {
401- let cZ = cX
402- let da = size(cZ)
403- let db = $Tuple2(aR, false)
404- func dc (dd,de) = if ((de >= da))
405- then dd
406- else cR(dd, cZ[de])
407+ let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
408+ let dc = {
409+ let dd = db
410+ let de = size(dd)
411+ let df = $Tuple2(aV, false)
412+ func dg (dh,di) = if ((di >= de))
413+ then dh
414+ else cV(dh, dd[di])
407415
408- func df (dd,de) = if ((de >= da))
409- then dd
416+ func dj (dh,di) = if ((di >= de))
417+ then dh
410418 else throw("List size exceeds 17")
411419
412- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
420+ dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
413421 }
414- let cN = cY._1
415- let dg = cY._2
416- if (dg)
417- then cN
418- else throw(("D calculation error, D = " + toString(cN)))
422+ let cR = dc._1
423+ let dk = dc._2
424+ if (dk)
425+ then cR
426+ else throw(("D calculation error, D = " + toString(cR)))
419427 }
420428 }
421429
422430
423-func dh (di,dj,dk,dl) = {
424- let dm = bt
425- let dn = toBase58String(value(bu))
426- let do = toBase58String(value(bv))
427- let dp = bw
431+func dl (dm,dn,do,dp) = {
428432 let dq = bx
429- let dr = toString(bs)
430- let ds = valueOrErrorMessage(assetInfo(dm), "Wrong LP id").quantity
431- if ((toBase58String(dm) != dj))
433+ let dr = toBase58String(value(by))
434+ let ds = toBase58String(value(bz))
435+ let dt = bA
436+ let du = bB
437+ let dv = toString(bw)
438+ let dw = valueOrErrorMessage(assetInfo(dq), "Wrong LP id").quantity
439+ if ((toBase58String(dq) != dn))
432440 then throw("Wrong pmt asset")
433441 else {
434- let dt = bT(dn)
435- let du = H(dt, dp)
436- let dv = bT(do)
437- let dw = H(dv, dq)
438- let dx = bV(dw, du)
439- let dy = L(dx, a)
440- let dz = H(dk, a)
441- let dA = H(ds, a)
442- let dB = fraction(du, dz, dA)
443- let dC = fraction(dw, dz, dA)
444- let dD = O(dB, dp, FLOOR)
445- let dE = O(dC, dq, FLOOR)
446- let dF = if ((di == ""))
442+ let dx = bX(dr)
443+ let dy = I(dx, dt)
444+ let dz = bX(ds)
445+ let dA = I(dz, du)
446+ let dB = bZ(dA, dy)
447+ let dC = M(dB, a)
448+ let dD = I(do, a)
449+ let dE = I(dw, a)
450+ let dF = fraction(dy, dD, dE)
451+ let dG = fraction(dA, dD, dE)
452+ let dH = P(dF, dt, FLOOR)
453+ let dI = P(dG, du, FLOOR)
454+ let dJ = if ((dm == ""))
447455 then nil
448- else [ScriptTransfer(dl, dD, if ((dn == "WAVES"))
456+ else [ScriptTransfer(dp, dH, if ((dr == "WAVES"))
449457 then unit
450- else fromBase58String(dn)), ScriptTransfer(dl, dE, if ((do == "WAVES"))
458+ else fromBase58String(dr)), ScriptTransfer(dp, dI, if ((ds == "WAVES"))
451459 then unit
452- else fromBase58String(do)), StringEntry(ai(toString(dl), di), bP(dD, dE, dk, dy, height, lastBlock.timestamp)), IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy)]
453- $Tuple10(dD, dE, dn, do, dt, dv, ds, dx, dr, dF)
460+ else fromBase58String(ds)), StringEntry(aj(toString(dp), dm), bT(dH, dI, do, dC, height, lastBlock.timestamp)), IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC)]
461+ $Tuple10(dH, dI, dr, ds, dx, dz, dw, dB, dv, dJ)
454462 }
455463 }
456464
457465
458-func dG (di,cc,dH,dI,dJ,dK,dl,dL,dM,dN,dO,dP,dQ) = {
459- let dm = bt
460- let dR = toBase58String(value(bu))
461- let dS = toBase58String(value(bv))
462- let dT = bw
463- let dU = bx
464- let dr = toString(bs)
465- let dV = valueOrErrorMessage(assetInfo(dm), "Wr lp as").quantity
466- let dt = if (dL)
467- then bT(dR)
468- else if (if (dN)
469- then (dQ == dR)
466+func dK (dm,cg,dL,dM,dN,dO,dp,dP,dQ,dR,dS,dT,dU) = {
467+ let dq = bx
468+ let dV = toBase58String(value(by))
469+ let dW = toBase58String(value(bz))
470+ let dX = bA
471+ let dY = bB
472+ let dv = toString(bw)
473+ let dZ = valueOrErrorMessage(assetInfo(dq), "Wr lp as").quantity
474+ let dx = if (dP)
475+ then bX(dV)
476+ else if (if (dR)
477+ then (dU == dV)
470478 else false)
471- then (bT(dR) - dP)
472- else if (dN)
473- then bT(dR)
474- else (bT(dR) - dH)
475- let dv = if (dL)
476- then bT(dS)
477- else if (if (dN)
478- then (dQ == dS)
479+ then (bX(dV) - dT)
480+ else if (dR)
481+ then bX(dV)
482+ else (bX(dV) - dL)
483+ let dz = if (dP)
484+ then bX(dW)
485+ else if (if (dR)
486+ then (dU == dW)
479487 else false)
480- then (bT(dS) - dP)
481- else if (dN)
482- then bT(dS)
483- else (bT(dS) - dJ)
484- let dW = H(dH, dT)
485- let dX = H(dJ, dU)
486- let dY = bV(dX, dW)
487- let du = H(dt, dT)
488- let dw = H(dv, dU)
489- let ch = cE([du, dw])
490- let dZ = if ((dV == 0))
488+ then (bX(dW) - dT)
489+ else if (dR)
490+ then bX(dW)
491+ else (bX(dW) - dN)
492+ let ea = I(dL, dX)
493+ let eb = I(dN, dY)
494+ let ec = bZ(eb, ea)
495+ let dy = I(dx, dX)
496+ let dA = I(dz, dY)
497+ let cl = cI([dy, dA])
498+ let ed = if ((dZ == 0))
491499 then {
492- let cg = cE([(du + dW), (dw + dX)])
493- let ea = if ((cg > ch))
500+ let ck = cI([(dy + ea), (dA + eb)])
501+ let ee = if ((ck > cl))
494502 then true
495503 else throw("D1 should be greater than D0")
496- if ((ea == ea))
504+ if ((ee == ee))
497505 then {
498- let dx = d
499- let eb = d
500- let cw = cg
501- $Tuple5(L(cw, a), L(dW, dT), L(dX, dU), bV((dw + dX), (du + dW)), eb)
506+ let dB = d
507+ let ef = d
508+ let cA = ck
509+ $Tuple5(M(cA, a), M(ea, dX), M(eb, dY), bZ((dA + eb), (dy + ea)), ef)
502510 }
503511 else throw("Strict value is not equal to itself.")
504512 }
505513 else {
506- let dx = bV(dw, du)
507- let ec = fraction(W((dx - dY)), c, dx)
508- let eb = H(cc, a)
509- if (if (if (dO)
510- then (dx != d)
514+ let dB = bZ(dA, dy)
515+ let eg = fraction(X((dB - ec)), c, dB)
516+ let ef = I(cg, a)
517+ if (if (if (dS)
518+ then (dB != d)
511519 else false)
512- then (ec > eb)
520+ then (eg > ef)
513521 else false)
514- then throw(((("Price slippage " + toString(ec)) + " > ") + toString(eb)))
522+ then throw(((("Price slippage " + toString(eg)) + " > ") + toString(ef)))
515523 else {
516- let ed = H(dV, a)
517- let ee = fraction(dW, bY(dw, du, CEILING), c, CEILING)
518- let ef = fraction(dX, c, bY(dw, du, FLOOR), CEILING)
519- let eg = if ((ee > dX))
520- then $Tuple2(ef, dX)
521- else $Tuple2(dW, ee)
522- let eh = eg._1
523- let ei = eg._2
524- let cg = cE([(du + eh), (dw + ei)])
525- let ea = if ((cg > ch))
524+ let eh = I(dZ, a)
525+ let ei = fraction(ea, cc(dA, dy, CEILING), c, CEILING)
526+ let ej = fraction(eb, c, cc(dA, dy, FLOOR), CEILING)
527+ let ek = if ((ei > eb))
528+ then $Tuple2(ej, eb)
529+ else $Tuple2(ea, ei)
530+ let el = ek._1
531+ let em = ek._2
532+ let ck = cI([(dy + el), (dA + em)])
533+ let ee = if ((ck > cl))
526534 then true
527535 else throw("D1 should be greater than D0")
528- if ((ea == ea))
536+ if ((ee == ee))
529537 then {
530- let cw = fraction(ed, (cg - ch), ch)
531- $Tuple5(O(cw, a, FLOOR), O(eh, dT, CEILING), O(ei, dU, CEILING), dx, eb)
538+ let cA = fraction(eh, (ck - cl), cl)
539+ $Tuple5(P(cA, a, FLOOR), P(el, dX, CEILING), P(em, dY, CEILING), dB, ef)
532540 }
533541 else throw("Strict value is not equal to itself.")
534542 }
535543 }
536- let ej = dZ._1
537- let ek = dZ._2
538- let el = dZ._3
539- let dy = L(dZ._4, a)
540- let em = L(dZ._5, a)
541- if ((0 >= ej))
544+ let en = ed._1
545+ let eo = ed._2
546+ let ep = ed._3
547+ let dC = M(ed._4, a)
548+ let eq = M(ed._5, a)
549+ if ((0 >= en))
542550 then throw("LP <= 0")
543551 else {
544- let en = if (!(dM))
552+ let er = if (!(dQ))
545553 then 0
546- else ej
547- let eo = (dH - ek)
548- let ep = (dJ - el)
549- let eq = if (if (dN)
550- then (dQ == dR)
554+ else en
555+ let es = (dL - eo)
556+ let et = (dN - ep)
557+ let eu = if (if (dR)
558+ then (dU == dV)
551559 else false)
552- then $Tuple2(dP, 0)
553- else if (if (dN)
554- then (dQ == dS)
560+ then $Tuple2(dT, 0)
561+ else if (if (dR)
562+ then (dU == dW)
555563 else false)
556- then $Tuple2(0, dP)
557- else $Tuple2(ek, el)
558- let er = eq._1
559- let es = eq._2
560- let et = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, di), bE(er, es, en, dy, cc, em, height, lastBlock.timestamp, eo, ep))]
561- $Tuple13(ej, en, dy, dt, dv, dV, dm, dr, et, eo, ep, dI, dK)
564+ then $Tuple2(0, dT)
565+ else $Tuple2(eo, ep)
566+ let ev = eu._1
567+ let ew = eu._2
568+ let ex = [IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC), StringEntry(ag(dp, dm), bI(ev, ew, er, dC, cg, eq, height, lastBlock.timestamp, es, et))]
569+ $Tuple13(en, er, dC, dx, dz, dZ, dq, dv, ex, es, et, dM, dO)
562570 }
563571 }
564572
565573
566-func eu (cF,cT,ev) = {
567- let ew = g
568- let ex = cF[if ((cT == 0))
574+func ey (cJ,cX,ez) = {
575+ let eA = g
576+ let eB = cJ[if ((cX == 0))
569577 then 1
570578 else 0]
571- let ey = parseBigIntValue(l)
572- let aN = (parseBigIntValue(bc) * ey)
573- let aR = ex
574- let cI = (aN * ew)
575- let ez = (((((ev * ev) / (ex * ew)) * ev) * ey) / (cI * ew))
576- let eA = ((aR + ((ev * ey) / cI)) - ev)
577- func cR (cS,eB) = {
578- let eC = cS
579- let eD = eC._1
580- let dg = eC._2
581- if ((dg != unit))
582- then cS
579+ let eC = parseBigIntValue(m)
580+ let aR = (parseBigIntValue(bg) * eC)
581+ let aV = eB
582+ let cM = (aR * eA)
583+ let eD = (((((ez * ez) / (eB * eA)) * ez) * eC) / (cM * eA))
584+ let eE = ((aV + ((ez * eC) / cM)) - ez)
585+ func cV (cW,eF) = {
586+ let eG = cW
587+ let eH = eG._1
588+ let dk = eG._2
589+ if ((dk != unit))
590+ then cW
583591 else {
584- let eE = (((eD * eD) + ez) / ((g * eD) + eA))
585- let eF = X((eE - value(eD)))
586- if ((f >= eF))
587- then $Tuple2(eE, eB)
588- else $Tuple2(eE, unit)
592+ let eI = (((eH * eH) + eD) / ((g * eH) + eE))
593+ let eJ = Y((eI - value(eH)))
594+ if ((f >= eJ))
595+ then $Tuple2(eI, eF)
596+ else $Tuple2(eI, unit)
589597 }
590598 }
591599
592- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
593- let eG = {
594- let cZ = cX
595- let da = size(cZ)
596- let db = $Tuple2(ev, unit)
597- func dc (dd,de) = if ((de >= da))
598- then dd
599- else cR(dd, cZ[de])
600+ let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
601+ let eK = {
602+ let dd = db
603+ let de = size(dd)
604+ let df = $Tuple2(ez, unit)
605+ func dg (dh,di) = if ((di >= de))
606+ then dh
607+ else cV(dh, dd[di])
600608
601- func df (dd,de) = if ((de >= da))
602- then dd
609+ func dj (dh,di) = if ((di >= de))
610+ then dh
603611 else throw("List size exceeds 15")
604612
605- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
613+ dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
606614 }
607- let eD = eG._1
608- let dg = eG._2
609- if ((dg != unit))
610- then eD
611- else throw(("Y calculation error, Y = " + toString(eD)))
615+ let eH = eK._1
616+ let dk = eK._2
617+ if ((dk != unit))
618+ then eH
619+ else throw(("Y calculation error, Y = " + toString(eH)))
612620 }
613621
614622
615-func eH (eI,eJ,eK) = {
616- let eL = fraction(cE([K(eI, toBigInt(bw)), K(eJ, toBigInt(bx))]), c, eK)
617- if ((eK == e))
623+func eL (eM,eN,eO) = {
624+ let eP = fraction(cI([L(eM, toBigInt(bA)), L(eN, toBigInt(bB))]), c, eO)
625+ if ((eO == e))
618626 then e
619- else eL
627+ else eP
620628 }
621629
622630
623-func eM (eN,eO,eP) = {
624- let eQ = (toBigInt(bT(bm(bu))) - eN)
625- let eR = (toBigInt(bT(bm(bv))) - eO)
626- let eS = (toBigInt(value(assetInfo(bt)).quantity) - eP)
627- let eT = eH(eQ, eR, eS)
628- eT
631+func eQ (eR,eS,eT) = {
632+ let eU = (toBigInt(bX(bq(by))) - eR)
633+ let eV = (toBigInt(bX(bq(bz))) - eS)
634+ let eW = (toBigInt(value(assetInfo(bx)).quantity) - eT)
635+ let eX = eL(eU, eV, eW)
636+ eX
629637 }
630638
631639
632-func eU (eV,eW,eP) = {
633- let eQ = (bT(bm(bu)) + eV)
634- let eR = (bT(bm(bv)) + eW)
635- let eS = (value(assetInfo(bt)).quantity + eP)
636- let eL = eH(toBigInt(eQ), toBigInt(eR), toBigInt(eS))
637- let eX = [IntegerEntry(ap, height), StringEntry(ao, toString(eL))]
638- $Tuple2(eX, eL)
640+func eY (eZ,fa,eT) = {
641+ let eU = (bX(bq(by)) + eZ)
642+ let eV = (bX(bq(bz)) + fa)
643+ let eW = (value(assetInfo(bx)).quantity + eT)
644+ let eP = eL(toBigInt(eU), toBigInt(eV), toBigInt(eW))
645+ let fb = [IntegerEntry(at, height), StringEntry(as, toString(eP))]
646+ $Tuple2(fb, eP)
639647 }
640648
641649
642-func eY (eZ,eL) = if ((eL >= eZ))
650+func fc (fd,eP) = if ((eP >= fd))
643651 then true
644- else aW("updated DLp lower than current DLp")
652+ else ba("updated DLp lower than current DLp")
645653
646654
647-func fa (fb) = {
648- let eQ = bT(bm(bu))
649- let eR = bT(bm(bv))
650- let fc = fb.amount
651- let fd = fraction(fb.amount, fb.price, a, FLOOR)
652- let fe = if ((fb.orderType == Buy))
653- then $Tuple2(fc, -(fd))
654- else $Tuple2(-(fc), fd)
655- let eV = fe._1
656- let eW = fe._2
657- if (if (if (bd())
655+func fe (ff) = {
656+ let eU = bX(bq(by))
657+ let eV = bX(bq(bz))
658+ let fg = ff.amount
659+ let fh = fraction(ff.amount, ff.price, a, FLOOR)
660+ let fi = if ((ff.orderType == Buy))
661+ then $Tuple2(fg, -(fh))
662+ else $Tuple2(-(fg), fh)
663+ let eZ = fi._1
664+ let fa = fi._2
665+ if (if (if (bh())
658666 then true
659- else (bs == r))
667+ else (bw == s))
660668 then true
661- else (bs == s))
669+ else (bw == t))
662670 then throw("Admin blocked")
663- else if (if ((fb.assetPair.amountAsset != bu))
671+ else if (if ((ff.assetPair.amountAsset != by))
664672 then true
665- else (fb.assetPair.priceAsset != bv))
673+ else (ff.assetPair.priceAsset != bz))
666674 then throw("Wr assets")
667675 else {
668- let ff = parseBigIntValue(valueOrElse(getString(this, ao), "0"))
669- let fg = eU(eV, eW, 0)
670- let fh = fg._1
671- let fi = fg._2
672- let fj = (fi >= ff)
673- let fk = makeString(["dLp=", toString(ff), " dLpNew=", toString(fi), " amountAssetBalance=", toString(eQ), " priceAssetBalance=", toString(eR), " amountAssetBalanceDelta=", toString(eV), " priceAssetBalanceDelta=", toString(eW), " height=", toString(height)], "")
674- $Tuple2(fj, fk)
676+ let fj = parseBigIntValue(valueOrElse(getString(this, as), "0"))
677+ let fk = eY(eZ, fa, 0)
678+ let fl = fk._1
679+ let fm = fk._2
680+ let fn = (fm >= fj)
681+ let fo = makeString(["dLp=", toString(fj), " dLpNew=", toString(fm), " amountAssetBalance=", toString(eU), " priceAssetBalance=", toString(eV), " amountAssetBalanceDelta=", toString(eZ), " priceAssetBalanceDelta=", toString(fa), " height=", toString(height)], "")
682+ $Tuple2(fn, fo)
675683 }
676684 }
677685
678686
679-func fl (cT) = if ((size(cT.payments) != 1))
687+func fp (cX) = if ((size(cX.payments) != 1))
680688 then throw("1 pmnt exp")
681689 else {
682- let fm = value(cT.payments[0])
683- let dj = value(fm.assetId)
684- let dP = fm.amount
685- let dZ = dh(toBase58String(cT.transactionId), toBase58String(dj), dP, cT.caller)
686- let dD = dZ._1
687- let dE = dZ._2
688- let dr = parseIntValue(dZ._9)
689- let dF = dZ._10
690- if (if (bd())
690+ let fq = value(cX.payments[0])
691+ let dn = value(fq.assetId)
692+ let dT = fq.amount
693+ let ed = dl(toBase58String(cX.transactionId), toBase58String(dn), dT, cX.caller)
694+ let dH = ed._1
695+ let dI = ed._2
696+ let dv = parseIntValue(ed._9)
697+ let dJ = ed._10
698+ if (if (bh())
691699 then true
692- else (dr == s))
693- then throw(("Admin blocked: " + toString(dr)))
694- else $Tuple5(dD, dE, dP, dj, dF)
700+ else (dv == t))
701+ then throw(("Admin blocked: " + toString(dv)))
702+ else $Tuple5(dH, dI, dT, dn, dJ)
695703 }
696704
697705
698-func fn (fo,ah,fp,fq,cc,dM,dN,dO,dP,dQ) = {
699- let dZ = dG(ah, cc, value(fp).amount, value(fp).assetId, value(fq).amount, value(fq).assetId, fo, (ah == ""), dM, dN, dO, dP, dQ)
700- let dr = parseIntValue(dZ._8)
701- if (if (if (bd())
706+func fr (fs,ai,ft,fu,cg,dQ,dR,dS,dT,dU) = {
707+ let ed = dK(ai, cg, value(ft).amount, value(ft).assetId, value(fu).amount, value(fu).assetId, fs, (ai == ""), dQ, dR, dS, dT, dU)
708+ let dv = parseIntValue(ed._8)
709+ if (if (if (bh())
702710 then true
703- else (dr == q))
711+ else (dv == r))
704712 then true
705- else (dr == s))
706- then throw(("Blocked:" + toString(dr)))
707- else dZ
713+ else (dv == t))
714+ then throw(("Blocked:" + toString(dv)))
715+ else ed
708716 }
709717
710718
711-func fr (fs,dj,dl,ah,ft) = {
712- let dn = toBase58String(value(bu))
713- let do = toBase58String(value(bv))
714- let dm = bt
715- let dT = bw
716- let dU = bx
717- let eS = toBigInt(valueOrErrorMessage(assetInfo(dm), "invalid lp asset").quantity)
718- let fu = if ((eS > e))
719+func fv (fw,dn,dp,ai,fx) = {
720+ let dr = toBase58String(value(by))
721+ let ds = toBase58String(value(bz))
722+ let dq = bx
723+ let dX = bA
724+ let dY = bB
725+ let eW = toBigInt(valueOrErrorMessage(assetInfo(dq), "invalid lp asset").quantity)
726+ let fy = if ((eW > e))
719727 then true
720728 else throw("initial deposit requires all coins")
721- if ((fu == fu))
729+ if ((fy == fy))
722730 then {
723- let dt = bT(dn)
724- let dv = bT(do)
725- let fv = if ((ah == ""))
726- then $Tuple2(dt, dv)
727- else if ((dj == dn))
728- then if ((fs > dt))
731+ let dx = bX(dr)
732+ let dz = bX(ds)
733+ let fz = if ((ai == ""))
734+ then $Tuple2(dx, dz)
735+ else if ((dn == dr))
736+ then if ((fw > dx))
729737 then throw("invalid payment amount")
730- else $Tuple2((dt - fs), dv)
731- else if ((dj == do))
732- then if ((fs > dv))
738+ else $Tuple2((dx - fw), dz)
739+ else if ((dn == ds))
740+ then if ((fw > dz))
733741 then throw("invalid payment amount")
734- else $Tuple2(dt, (dv - fs))
742+ else $Tuple2(dx, (dz - fw))
735743 else throw("wrong pmtAssetId")
736- let fw = fv._1
737- let fx = fv._2
738- let fy = if ((dj == dn))
739- then $Tuple2(fs, 0)
740- else if ((dj == do))
741- then $Tuple2(0, fs)
744+ let fA = fz._1
745+ let fB = fz._2
746+ let fC = if ((dn == dr))
747+ then $Tuple2(fw, 0)
748+ else if ((dn == ds))
749+ then $Tuple2(0, fw)
742750 else throw("invalid payment")
743- let fz = fy._1
744- let fA = fy._2
745- let fB = if (ft)
746- then $Tuple3(cB(fz, aZ)._1, cB(fA, aZ)._1, cB(fs, aZ)._2)
747- else $Tuple3(fz, fA, 0)
748- let fC = fB._1
749- let fD = fB._2
750- let cD = fB._3
751- let fE = (fw + fC)
752- let fF = (fx + fD)
753- let ch = cE([H(fw, bw), H(fx, bx)])
754- let cg = cE([H(fE, bw), H(fF, bx)])
755- let ea = if ((cg > ch))
751+ let fD = fC._1
752+ let fE = fC._2
753+ let fF = if (fx)
754+ then $Tuple3(cF(fD, bd)._1, cF(fE, bd)._1, cF(fw, bd)._2)
755+ else $Tuple3(fD, fE, 0)
756+ let fG = fF._1
757+ let fH = fF._2
758+ let cH = fF._3
759+ let fI = (fA + fG)
760+ let fJ = (fB + fH)
761+ let cl = cI([I(fA, bA), I(fB, bB)])
762+ let ck = cI([I(fI, bA), I(fJ, bB)])
763+ let ee = if ((ck > cl))
756764 then true
757765 else throw()
758- if ((ea == ea))
766+ if ((ee == ee))
759767 then {
760- let fG = fraction(eS, (cg - ch), ch, FLOOR)
761- let dy = L(bV(H(fF, dU), H(fE, dT)), a)
762- let et = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, ah), bE(fz, fA, toInt(fG), dy, 0, 0, height, lastBlock.timestamp, 0, 0))]
763- let fH = fraction(fx, a, fw)
764- let fI = fraction(fs, a, (fH + a))
765- let fJ = (fs - fI)
766- let fK = fraction(eS, toBigInt(fJ), toBigInt(fx))
767- let fL = toInt(fraction((fG - fK), b, fK))
768- $Tuple4(toInt(fG), et, cD, fL)
768+ let fK = fraction(eW, (ck - cl), cl, FLOOR)
769+ let dC = M(bZ(I(fJ, dY), I(fI, dX)), a)
770+ let ex = [IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC), StringEntry(ag(dp, ai), bI(fD, fE, toInt(fK), dC, 0, 0, height, lastBlock.timestamp, 0, 0))]
771+ let fL = fraction(fB, a, fA)
772+ let fM = fraction(fw, a, (fL + a))
773+ let fN = (fw - fM)
774+ let fO = fraction(eW, toBigInt(fN), toBigInt(fB))
775+ let fP = toInt(fraction((fK - fO), b, fO))
776+ $Tuple4(toInt(fK), ex, cH, fP)
769777 }
770778 else throw("Strict value is not equal to itself.")
771779 }
772780 else throw("Strict value is not equal to itself.")
773781 }
774782
775783
776-func fM (fN,fO,fP,fo,fQ,fR) = {
777- let dm = toBase58String(value(bt))
778- let dn = toBase58String(value(bu))
779- let do = toBase58String(value(bv))
780- let fS = bw
781- let fT = bx
782- let fU = bs
783- let dl = if ((fo == bD))
784- then fQ
785- else fo
786- let fm = value(fP[0])
787- let dj = value(fm.assetId)
788- let dP = fm.amount
789- let eT = eM(e, e, e)
790- if ((eT == eT))
784+func fQ (fR,fS,fT,fs,fU,fV) = {
785+ let dq = toBase58String(value(bx))
786+ let dr = toBase58String(value(by))
787+ let ds = toBase58String(value(bz))
788+ let fW = bA
789+ let fX = bB
790+ let fY = bw
791+ let dp = if ((fs == bH))
792+ then fU
793+ else fs
794+ let fq = value(fT[0])
795+ let dn = value(fq.assetId)
796+ let dT = fq.amount
797+ let eX = eQ(e, e, e)
798+ if ((eX == eX))
791799 then {
792- let di = toBase58String(fR)
793- if ((dm != toBase58String(dj)))
800+ let dm = toBase58String(fV)
801+ if ((dq != toBase58String(dn)))
794802 then throw("Wrong LP")
795803 else {
796- let dt = bT(dn)
797- let dv = bT(do)
798- let fV = {
799- let ba = invoke(this, "getOneTknV2READONLY", [fN, dP], nil)
800- if ($isInstanceOf(ba, "(Int, Int)"))
801- then ba
802- else throw(($getType(ba) + " couldn't be cast to (Int, Int)"))
804+ let dx = bX(dr)
805+ let dz = bX(ds)
806+ let fZ = {
807+ let be = invoke(this, "getOneTknV2READONLY", [fR, dT], nil)
808+ if ($isInstanceOf(be, "(Int, Int)"))
809+ then be
810+ else throw(($getType(be) + " couldn't be cast to (Int, Int)"))
803811 }
804- if ((fV == fV))
812+ if ((fZ == fZ))
805813 then {
806- let cD = fV._2
807- let fW = fV._1
808- let fX = if (if ((fO > 0))
809- then (fO > fW)
814+ let cH = fZ._2
815+ let ga = fZ._1
816+ let gb = if (if ((fS > 0))
817+ then (fS > ga)
810818 else false)
811- then aW(makeString(["amount to receive is less than ", toString(fO)], ""))
812- else fW
813- let fY = if ((fN == dn))
814- then $Tuple4(fX, 0, ((dt - fX) - cD), dv)
815- else if ((fN == do))
816- then $Tuple4(0, fX, dt, ((dv - fX) - cD))
819+ then ba(makeString(["amount to receive is less than ", toString(fS)], ""))
820+ else ga
821+ let gc = if ((fR == dr))
822+ then $Tuple4(gb, 0, ((dx - gb) - cH), dz)
823+ else if ((fR == ds))
824+ then $Tuple4(0, gb, dx, ((dz - gb) - cH))
817825 else throw("invalid out asset id")
818- let fZ = fY._1
819- let ga = fY._2
820- let fE = fY._3
821- let fF = fY._4
822- let gb = bV(H(fF, fT), H(fE, fS))
823- let gc = L(gb, a)
824- let gd = if ((fN == "WAVES"))
826+ let gd = gc._1
827+ let ge = gc._2
828+ let fI = gc._3
829+ let fJ = gc._4
830+ let gf = bZ(I(fJ, fX), I(fI, fW))
831+ let gg = M(gf, a)
832+ let gh = if ((fR == "WAVES"))
825833 then unit
826- else fromBase58String(fN)
827- let ge = if ((cD > 0))
828- then [ScriptTransfer(bf, cD, gd)]
834+ else fromBase58String(fR)
835+ let gi = if ((cH > 0))
836+ then [ScriptTransfer(bj, cH, gh)]
829837 else nil
830- let dF = ([ScriptTransfer(dl, fX, gd), StringEntry(ai(toString(dl), di), bP(fZ, ga, dP, gc, height, lastBlock.timestamp)), IntegerEntry(ab(), gc), IntegerEntry(ac(height, lastBlock.timestamp), gc)] ++ ge)
831- if ((dF == dF))
838+ let dJ = ([ScriptTransfer(dp, gb, gh), StringEntry(aj(toString(dp), dm), bT(gd, ge, dT, gg, height, lastBlock.timestamp)), IntegerEntry(ac(), gg), IntegerEntry(ad(height, lastBlock.timestamp), gg)] ++ gi)
839+ if ((dJ == dJ))
832840 then {
833- let gf = invoke(aQ, "burn", [dP], [AttachedPayment(dj, dP)])
834- if ((gf == gf))
841+ let gj = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
842+ if ((gj == gj))
835843 then {
836- let gg = {
837- let gh = if ((this == bf))
844+ let gk = {
845+ let gl = if ((this == bj))
838846 then 0
839- else cD
840- let gi = if ((bk(fN) == bu))
847+ else cH
848+ let gm = if ((bo(fR) == by))
841849 then true
842850 else false
843- if (gi)
844- then $Tuple2(-((fW + gh)), 0)
845- else $Tuple2(0, -((fW + gh)))
851+ if (gm)
852+ then $Tuple2(-((ga + gl)), 0)
853+ else $Tuple2(0, -((ga + gl)))
846854 }
847- let eV = gg._1
848- let eW = gg._2
849- let gj = eU(eV, eW, 0)
850- let gk = gj._1
851- let eL = gj._2
852- let gl = eY(eT, eL)
853- if ((gl == gl))
854- then $Tuple2((dF ++ gk), fX)
855+ let eZ = gk._1
856+ let fa = gk._2
857+ let gn = eY(eZ, fa, 0)
858+ let go = gn._1
859+ let eP = gn._2
860+ let gp = fc(eX, eP)
861+ if ((gp == gp))
862+ then $Tuple2((dJ ++ go), gb)
855863 else throw("Strict value is not equal to itself.")
856864 }
857865 else throw("Strict value is not equal to itself.")
858866 }
859867 else throw("Strict value is not equal to itself.")
860868 }
861869 else throw("Strict value is not equal to itself.")
862870 }
863871 }
864872 else throw("Strict value is not equal to itself.")
865873 }
866874
867875
868-func gm () = {
869- let gn = aO()
870- let aM = getString(gn, Z())
871- if ($isInstanceOf(aM, "String"))
876+func gq () = {
877+ let gr = aS()
878+ let aQ = getString(gr, aa())
879+ if ($isInstanceOf(aQ, "String"))
872880 then {
873- let aR = aM
874- fromBase58String(aR)
881+ let aV = aQ
882+ fromBase58String(aV)
875883 }
876- else if ($isInstanceOf(aM, "Unit"))
884+ else if ($isInstanceOf(aQ, "Unit"))
877885 then unit
878886 else throw("Match error")
879887 }
880888
881889
882-let go = throw("Permission denied")
890+let gs = throw("Permission denied")
883891
884-func gp (cT) = {
885- let aM = gm()
886- if ($isInstanceOf(aM, "ByteVector"))
892+func gt (cX) = {
893+ let aQ = gq()
894+ if ($isInstanceOf(aQ, "ByteVector"))
887895 then {
888- let gq = aM
889- (cT.callerPublicKey == gq)
896+ let gu = aQ
897+ (cX.callerPublicKey == gu)
890898 }
891- else if ($isInstanceOf(aM, "Unit"))
892- then (cT.caller == this)
899+ else if ($isInstanceOf(aQ, "Unit"))
900+ then (cX.caller == this)
893901 else throw("Match error")
894902 }
895903
896904
897-func gr (cT) = {
898- let aM = gm()
899- if ($isInstanceOf(aM, "ByteVector"))
905+func gv (cX) = {
906+ let aQ = gq()
907+ if ($isInstanceOf(aQ, "ByteVector"))
900908 then {
901- let gq = aM
902- if ((cT.callerPublicKey == gq))
909+ let gu = aQ
910+ if ((cX.callerPublicKey == gu))
903911 then true
904- else go
912+ else gs
905913 }
906- else if ($isInstanceOf(aM, "Unit"))
907- then if ((cT.caller == this))
914+ else if ($isInstanceOf(aQ, "Unit"))
915+ then if ((cX.caller == this))
908916 then true
909- else go
917+ else gs
910918 else throw("Match error")
911919 }
912920
913921
914-func gs (gt,ev,gu) = {
915- let bo = bg()
916- let dn = bo[w]
917- let do = bo[x]
918- let ew = g
919- let ey = parseBigIntValue(l)
920- let aN = (parseBigIntValue(bc) * ey)
921- let cF = if ((gt == false))
922- then [(toBigInt(bT(dn)) + gu), toBigInt(bT(do))]
923- else [(toBigInt(bT(do)) + gu), toBigInt(bT(dn))]
924- let ex = cF[0]
925- let aR = ex
926- let cI = (aN * ew)
927- let ez = (((((ev * ev) / (ex * ew)) * ev) * ey) / (cI * ew))
928- let eA = ((aR + ((ev * ey) / cI)) - ev)
929- func cR (cS,eB) = {
930- let gv = cS
931- let eD = gv._1
932- let dg = gv._2
933- if ((dg != unit))
934- then cS
922+func gw (gx,ez,gy) = {
923+ let bs = bk()
924+ let dr = bs[x]
925+ let ds = bs[y]
926+ let eA = g
927+ let eC = parseBigIntValue(m)
928+ let aR = (parseBigIntValue(bg) * eC)
929+ let cJ = if ((gx == false))
930+ then [(toBigInt(bX(dr)) + gy), toBigInt(bX(ds))]
931+ else [(toBigInt(bX(ds)) + gy), toBigInt(bX(dr))]
932+ let eB = cJ[0]
933+ let aV = eB
934+ let cM = (aR * eA)
935+ let eD = (((((ez * ez) / (eB * eA)) * ez) * eC) / (cM * eA))
936+ let eE = ((aV + ((ez * eC) / cM)) - ez)
937+ func cV (cW,eF) = {
938+ let gz = cW
939+ let eH = gz._1
940+ let dk = gz._2
941+ if ((dk != unit))
942+ then cW
935943 else {
936- let eE = (((eD * eD) + ez) / ((g * eD) + eA))
937- let eF = X((eE - value(eD)))
938- if ((f >= eF))
939- then $Tuple2(eE, eB)
940- else $Tuple2(eE, unit)
944+ let eI = (((eH * eH) + eD) / ((g * eH) + eE))
945+ let eJ = Y((eI - value(eH)))
946+ if ((f >= eJ))
947+ then $Tuple2(eI, eF)
948+ else $Tuple2(eI, unit)
941949 }
942950 }
943951
944- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
945- let gw = {
946- let cZ = cX
947- let da = size(cZ)
948- let db = $Tuple2(ev, unit)
949- func dc (dd,de) = if ((de >= da))
950- then dd
951- else cR(dd, cZ[de])
952+ let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
953+ let gA = {
954+ let dd = db
955+ let de = size(dd)
956+ let df = $Tuple2(ez, unit)
957+ func dg (dh,di) = if ((di >= de))
958+ then dh
959+ else cV(dh, dd[di])
952960
953- func df (dd,de) = if ((de >= da))
954- then dd
961+ func dj (dh,di) = if ((di >= de))
962+ then dh
955963 else throw("List size exceeds 15")
956964
957- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
965+ dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
958966 }
959- let eD = gw._1
960- let dg = gw._2
961- if ((dg != unit))
962- then eD
963- else throw(("Y calculation error, Y = " + toString(eD)))
967+ let eH = gA._1
968+ let dk = gA._2
969+ if ((dk != unit))
970+ then eH
971+ else throw(("Y calculation error, Y = " + toString(eH)))
964972 }
965973
966974
967-func gx () = valueOrElse(getBoolean(aQ, aD(toString(this))), false)
975+func gB () = valueOrElse(getBoolean(aU, aH(toString(this))), false)
968976
969977
970-@Callable(cT)
971-func calculateAmountOutForSwapREADONLY (gy,gt,gz) = {
972- let gA = if ((gt == false))
978+@Callable(cX)
979+func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
980+ let gE = if ((gx == false))
973981 then {
974- let gB = aS(this, ak())
975- let gu = (toBigInt(bT(aS(this, aj()))) + toBigInt(gy))
976- $Tuple2(gB, gu)
982+ let gF = aW(this, al())
983+ let gy = (toBigInt(bX(aW(this, ak()))) + toBigInt(gC))
984+ $Tuple2(gF, gy)
977985 }
978986 else {
979- let gB = aS(this, aj())
980- let gu = (toBigInt(bT(aS(this, ak()))) + toBigInt(gy))
981- $Tuple2(gB, gu)
987+ let gF = aW(this, ak())
988+ let gy = (toBigInt(bX(aW(this, al()))) + toBigInt(gC))
989+ $Tuple2(gF, gy)
982990 }
983- let gB = gA._1
984- let gu = gA._2
985- let bo = bg()
986- let dn = bo[w]
987- let do = bo[x]
988- let cF = [toBigInt(bT(dn)), toBigInt(bT(do))]
989- let ev = cE(cF)
990- let eD = gs(gt, ev, toBigInt(gy))
991- let gC = ((toBigInt(bT(gB)) - eD) - toBigInt(1))
992- let gD = max([0, toInt(gC)])
993- let gE = if ((gt == false))
994- then [((toBigInt(bT(dn)) + toBigInt(gy)) + toBigInt(gz)), (toBigInt(bT(do)) - gC)]
995- else [(toBigInt(bT(dn)) - gC), ((toBigInt(bT(do)) + toBigInt(gy)) + toBigInt(gz))]
996- let gF = cE(gE)
997- let ea = if ((gF >= ev))
991+ let gF = gE._1
992+ let gy = gE._2
993+ let bs = bk()
994+ let dr = bs[x]
995+ let ds = bs[y]
996+ let cJ = [toBigInt(bX(dr)), toBigInt(bX(ds))]
997+ let ez = cI(cJ)
998+ let eH = gw(gx, ez, toBigInt(gC))
999+ let gG = ((toBigInt(bX(gF)) - eH) - toBigInt(1))
1000+ let gH = max([0, toInt(gG)])
1001+ let gI = if ((gx == false))
1002+ then [((toBigInt(bX(dr)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bX(ds)) - gG)]
1003+ else [(toBigInt(bX(dr)) - gG), ((toBigInt(bX(ds)) + toBigInt(gC)) + toBigInt(gD))]
1004+ let gJ = cI(gI)
1005+ let ee = if ((gJ >= ez))
9981006 then true
999- else throw(makeString(["new D is fewer error", toString(ev), toString(gF)], "__"))
1000- if ((ea == ea))
1001- then $Tuple2(nil, gD)
1007+ else throw(makeString(["new D is fewer error", toString(ez), toString(gJ)], "__"))
1008+ if ((ee == ee))
1009+ then $Tuple2(nil, gH)
10021010 else throw("Strict value is not equal to itself.")
10031011 }
10041012
10051013
10061014
1007-@Callable(cT)
1008-func calculateAmountOutForSwapAndSendTokens (gy,gt,gG,gH,gz) = {
1009- let gI = {
1010- let ba = invoke(aQ, "getSwapContractREADONLY", nil, nil)
1011- if ($isInstanceOf(ba, "String"))
1012- then ba
1013- else throw(($getType(ba) + " couldn't be cast to String"))
1015+@Callable(cX)
1016+func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1017+ let gM = {
1018+ let be = invoke(aU, "getSwapContractREADONLY", nil, nil)
1019+ if ($isInstanceOf(be, "String"))
1020+ then be
1021+ else throw(($getType(be) + " couldn't be cast to String"))
10141022 }
1015- let gJ = {
1016- let ba = invoke(aQ, "isPoolSwapDisabledREADONLY", [toString(this)], nil)
1017- if ($isInstanceOf(ba, "Boolean"))
1018- then ba
1019- else throw(($getType(ba) + " couldn't be cast to Boolean"))
1023+ let gN = {
1024+ let be = invoke(aU, "isPoolSwapDisabledREADONLY", [toString(this)], nil)
1025+ if ($isInstanceOf(be, "Boolean"))
1026+ then be
1027+ else throw(($getType(be) + " couldn't be cast to Boolean"))
10201028 }
1021- let gK = if (if (bd())
1029+ let gO = if (if (bh())
10221030 then true
1023- else (bs == s))
1031+ else (bw == t))
10241032 then true
1025- else gJ
1026- let gL = [if (if (!(gK))
1033+ else gN
1034+ let gP = [if (if (!(gO))
10271035 then true
1028- else gp(cT))
1036+ else gt(cX))
10291037 then true
1030- else aW("swap operation is blocked by admin"), if ((value(cT.payments[0]).amount >= gy))
1038+ else ba("swap operation is blocked by admin"), if ((value(cX.payments[0]).amount >= gC))
10311039 then true
1032- else aW("Wrong amount"), if ((cT.caller == addressFromStringValue(gI)))
1040+ else ba("Wrong amount"), if ((cX.caller == addressFromStringValue(gM)))
10331041 then true
1034- else aW("Permission denied")]
1035- if ((gL == gL))
1042+ else ba("Permission denied")]
1043+ if ((gP == gP))
10361044 then {
1037- let fm = value(cT.payments[0])
1038- let gM = bm(fm.assetId)
1039- let gN = if ((gt == false))
1045+ let fq = value(cX.payments[0])
1046+ let gQ = bq(fq.assetId)
1047+ let gR = if ((gx == false))
10401048 then {
1041- let gB = aS(this, ak())
1042- let gu = (bT(gM) - value(cT.payments[0]).amount)
1043- $Tuple2(gB, gu)
1049+ let gF = aW(this, al())
1050+ let gy = (bX(gQ) - value(cX.payments[0]).amount)
1051+ $Tuple2(gF, gy)
10441052 }
10451053 else {
1046- let gB = aS(this, aj())
1047- let gu = (bT(gM) - value(cT.payments[0]).amount)
1048- $Tuple2(gB, gu)
1054+ let gF = aW(this, ak())
1055+ let gy = (bX(gQ) - value(cX.payments[0]).amount)
1056+ $Tuple2(gF, gy)
10491057 }
1050- let gB = gN._1
1051- let gu = gN._2
1052- let bo = bg()
1053- let dn = bo[w]
1054- let do = bo[x]
1055- let cF = if ((gt == false))
1056- then [(toBigInt(bT(dn)) - toBigInt(value(cT.payments[0]).amount)), toBigInt(bT(do))]
1057- else [toBigInt(bT(dn)), (toBigInt(bT(do)) - toBigInt(value(cT.payments[0]).amount))]
1058- let ev = cE(cF)
1059- let eD = gs(gt, ev, toBigInt(0))
1060- let gC = ((toBigInt(bT(gB)) - eD) - toBigInt(1))
1061- let gD = max([0, toInt(gC)])
1062- let gO = if ((gD >= gG))
1058+ let gF = gR._1
1059+ let gy = gR._2
1060+ let bs = bk()
1061+ let dr = bs[x]
1062+ let ds = bs[y]
1063+ let cJ = if ((gx == false))
1064+ then [(toBigInt(bX(dr)) - toBigInt(value(cX.payments[0]).amount)), toBigInt(bX(ds))]
1065+ else [toBigInt(bX(dr)), (toBigInt(bX(ds)) - toBigInt(value(cX.payments[0]).amount))]
1066+ let ez = cI(cJ)
1067+ let eH = gw(gx, ez, toBigInt(0))
1068+ let gG = ((toBigInt(bX(gF)) - eH) - toBigInt(1))
1069+ let gH = max([0, toInt(gG)])
1070+ let gS = if ((gH >= gK))
10631071 then true
10641072 else throw("Exchange result is fewer coins than expected")
1065- if ((gO == gO))
1073+ if ((gS == gS))
10661074 then {
1067- let gE = if ((gt == false))
1068- then [(toBigInt(bT(dn)) + toBigInt(gz)), (toBigInt(bT(do)) - gC)]
1069- else [(toBigInt(bT(dn)) - gC), (toBigInt(bT(do)) + toBigInt(gz))]
1070- let gF = cE(gE)
1071- let ea = if ((gF >= ev))
1075+ let gI = if ((gx == false))
1076+ then [(toBigInt(bX(dr)) + toBigInt(gD)), (toBigInt(bX(ds)) - gG)]
1077+ else [(toBigInt(bX(dr)) - gG), (toBigInt(bX(ds)) + toBigInt(gD))]
1078+ let gJ = cI(gI)
1079+ let ee = if ((gJ >= ez))
10721080 then true
10731081 else throw("new D is fewer error")
1074- if ((ea == ea))
1082+ if ((ee == ee))
10751083 then {
1076- let eV = if (gt)
1077- then -(gD)
1078- else gz
1079- let eW = if (gt)
1080- then gz
1081- else -(gD)
1082- let gk = eU(eV, eW, 0)._1
1083- if ((gk == gk))
1084- then $Tuple2([ScriptTransfer(addressFromStringValue(gH), gD, bk(gB))], gD)
1084+ let eZ = if (gx)
1085+ then -(gH)
1086+ else gD
1087+ let fa = if (gx)
1088+ then gD
1089+ else -(gH)
1090+ let go = eY(eZ, fa, 0)._1
1091+ if ((go == go))
1092+ then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bo(gF))], gH)
10851093 else throw("Strict value is not equal to itself.")
10861094 }
10871095 else throw("Strict value is not equal to itself.")
10881096 }
10891097 else throw("Strict value is not equal to itself.")
10901098 }
10911099 else throw("Strict value is not equal to itself.")
10921100 }
10931101
10941102
10951103
1096-@Callable(cT)
1097-func constructor (Y) = {
1098- let ez = gr(cT)
1099- if ((ez == ez))
1100- then [StringEntry(Y(), Y)]
1104+@Callable(cX)
1105+func constructor (Z) = {
1106+ let eD = gv(cX)
1107+ if ((eD == eD))
1108+ then [StringEntry(Z(), Z)]
11011109 else throw("Strict value is not equal to itself.")
11021110 }
11031111
11041112
11051113
1106-@Callable(cT)
1107-func put (gP,gQ) = {
1108- let gR = by()
1109- let gS = valueOrErrorMessage(addressFromString(gR[C]), "Wr st addr")
1110- let gT = valueOrErrorMessage(addressFromString(gR[E]), "Wr sl addr")
1111- if ((0 > gP))
1114+@Callable(cX)
1115+func put (gT,gU) = {
1116+ let gV = bC()
1117+ let gW = valueOrErrorMessage(addressFromString(gV[D]), "Wr st addr")
1118+ let gX = valueOrErrorMessage(addressFromString(gV[F]), "Wr sl addr")
1119+ if ((0 > gT))
11121120 then throw("Wrong slippage")
1113- else if ((size(cT.payments) != 2))
1121+ else if ((size(cX.payments) != 2))
11141122 then throw("2 pmnts expd")
11151123 else {
1116- let gU = toBigInt(value(cT.payments[0]).amount)
1117- let gV = toBigInt(value(cT.payments[1]).amount)
1118- let eQ = (toBigInt(bT(bm(bu))) - gU)
1119- if ((eQ == eQ))
1124+ let gY = toBigInt(value(cX.payments[0]).amount)
1125+ let gZ = toBigInt(value(cX.payments[1]).amount)
1126+ let eU = (toBigInt(bX(bq(by))) - gY)
1127+ if ((eU == eU))
11201128 then {
1121- let eR = (toBigInt(bT(bm(bv))) - gV)
1122- if ((eR == eR))
1129+ let eV = (toBigInt(bX(bq(bz))) - gZ)
1130+ if ((eV == eV))
11231131 then {
1124- let eS = toBigInt(value(assetInfo(bt)).quantity)
1125- if ((eS == eS))
1132+ let eW = toBigInt(value(assetInfo(bx)).quantity)
1133+ if ((eW == eW))
11261134 then {
1127- let eT = eM(gU, gV, toBigInt(0))
1128- if ((eT == eT))
1135+ let eX = eQ(gY, gZ, toBigInt(0))
1136+ if ((eX == eX))
11291137 then {
1130- let gW = fn(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], gP, true, false, true, 0, "")
1131- let en = gW._2
1132- let gX = gW._7
1133- let dF = gW._9
1134- let eo = gW._10
1135- let ep = gW._11
1136- let dn = gW._12
1137- let do = gW._13
1138- let dZ = invoke(aQ, "emit", [en], nil)
1139- if ((dZ == dZ))
1138+ let ha = fr(toString(cX.caller), toBase58String(cX.transactionId), AttachedPayment(value(cX.payments[0]).assetId, value(cX.payments[0]).amount), cX.payments[1], gT, true, false, true, 0, "")
1139+ let er = ha._2
1140+ let hb = ha._7
1141+ let dJ = ha._9
1142+ let es = ha._10
1143+ let et = ha._11
1144+ let dr = ha._12
1145+ let ds = ha._13
1146+ let ed = invoke(aU, "emit", [er], nil)
1147+ if ((ed == ed))
11401148 then {
1141- let gY = {
1142- let aM = dZ
1143- if ($isInstanceOf(aM, "Address"))
1149+ let hc = {
1150+ let aQ = ed
1151+ if ($isInstanceOf(aQ, "Address"))
11441152 then {
1145- let gZ = aM
1146- invoke(gZ, "emit", [en], nil)
1153+ let hd = aQ
1154+ invoke(hd, "emit", [er], nil)
11471155 }
11481156 else unit
11491157 }
1150- if ((gY == gY))
1158+ if ((hc == hc))
11511159 then {
1152- let ha = if ((eo > 0))
1153- then invoke(gT, "put", nil, [AttachedPayment(dn, eo)])
1160+ let he = if ((es > 0))
1161+ then invoke(gX, "put", nil, [AttachedPayment(dr, es)])
11541162 else nil
1155- if ((ha == ha))
1163+ if ((he == he))
11561164 then {
1157- let hb = if ((ep > 0))
1158- then invoke(gT, "put", nil, [AttachedPayment(do, ep)])
1165+ let hf = if ((et > 0))
1166+ then invoke(gX, "put", nil, [AttachedPayment(ds, et)])
11591167 else nil
1160- if ((hb == hb))
1168+ if ((hf == hf))
11611169 then {
1162- let hc = if (gQ)
1170+ let hg = if (gU)
11631171 then {
1164- let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, en)])
1165- if ((hd == hd))
1172+ let hh = invoke(gW, "stake", nil, [AttachedPayment(hb, er)])
1173+ if ((hh == hh))
11661174 then nil
11671175 else throw("Strict value is not equal to itself.")
11681176 }
1169- else [ScriptTransfer(cT.caller, en, gX)]
1170- let he = eU(0, 0, 0)
1171- let gk = he._1
1172- let eL = he._2
1173- let hf = if ((eL >= eT))
1177+ else [ScriptTransfer(cX.caller, er, hb)]
1178+ let hi = eY(0, 0, 0)
1179+ let go = hi._1
1180+ let eP = hi._2
1181+ let hj = if ((eP >= eX))
11741182 then true
1175- else aW(makeString(["updated DLp lower than current DLp", toString(eQ), toString(eR), toString(eS), toString(eT), toString(eL), toString(eo), toString(ep)], " "))
1176- if ((hf == hf))
1183+ else ba(makeString(["updated DLp lower than current DLp", toString(eU), toString(eV), toString(eW), toString(eX), toString(eP), toString(es), toString(et)], " "))
1184+ if ((hj == hj))
11771185 then {
1178- let hg = value(assetInfo(bt)).quantity
1179- if ((hg == hg))
1180- then ((dF ++ hc) ++ gk)
1186+ let hk = value(assetInfo(bx)).quantity
1187+ if ((hk == hk))
1188+ then ((dJ ++ hg) ++ go)
11811189 else throw("Strict value is not equal to itself.")
11821190 }
11831191 else throw("Strict value is not equal to itself.")
11841192 }
11851193 else throw("Strict value is not equal to itself.")
11861194 }
11871195 else throw("Strict value is not equal to itself.")
11881196 }
11891197 else throw("Strict value is not equal to itself.")
11901198 }
11911199 else throw("Strict value is not equal to itself.")
11921200 }
11931201 else throw("Strict value is not equal to itself.")
11941202 }
11951203 else throw("Strict value is not equal to itself.")
11961204 }
11971205 else throw("Strict value is not equal to itself.")
11981206 }
11991207 else throw("Strict value is not equal to itself.")
12001208 }
12011209 }
12021210
12031211
12041212
1205-@Callable(cT)
1206-func putOneTknV2 (fO,gQ) = {
1207- let hh = {
1208- let ba = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1209- if ($isInstanceOf(ba, "Boolean"))
1210- then ba
1211- else throw(($getType(ba) + " couldn't be cast to Boolean"))
1213+@Callable(cX)
1214+func putOneTknV2 (fS,gU) = {
1215+ let hl = {
1216+ let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1217+ if ($isInstanceOf(be, "Boolean"))
1218+ then be
1219+ else throw(($getType(be) + " couldn't be cast to Boolean"))
12121220 }
1213- let hi = if (if (if (bd())
1221+ let hm = if (if (if (bh())
12141222 then true
1215- else (bs == q))
1223+ else (bw == r))
12161224 then true
1217- else (bs == s))
1225+ else (bw == t))
12181226 then true
1219- else hh
1220- let gL = [if (if (!(hi))
1227+ else hl
1228+ let gP = [if (if (!(hm))
12211229 then true
1222- else gp(cT))
1230+ else gt(cX))
12231231 then true
1224- else aW("put operation is blocked by admin"), if ((size(cT.payments) == 1))
1232+ else ba("put operation is blocked by admin"), if ((size(cX.payments) == 1))
12251233 then true
1226- else aW("exactly 1 payment are expected")]
1227- if ((gL == gL))
1234+ else ba("exactly 1 payment are expected")]
1235+ if ((gP == gP))
12281236 then {
1229- let dn = toBase58String(value(bu))
1230- let do = toBase58String(value(bv))
1231- let dm = bt
1232- let fS = bw
1233- let fT = bx
1234- let dl = if ((cT.caller == this))
1235- then cT.originCaller
1236- else cT.caller
1237- let fm = value(cT.payments[0])
1238- let dj = toBase58String(value(fm.assetId))
1239- let dP = fm.amount
1240- let eT = if ((fm.assetId == bu))
1241- then eM(toBigInt(dP), toBigInt(0), toBigInt(0))
1242- else eM(toBigInt(0), toBigInt(dP), toBigInt(0))
1243- if ((eT == eT))
1237+ let dr = toBase58String(value(by))
1238+ let ds = toBase58String(value(bz))
1239+ let dq = bx
1240+ let fW = bA
1241+ let fX = bB
1242+ let dp = if ((cX.caller == this))
1243+ then cX.originCaller
1244+ else cX.caller
1245+ let fq = value(cX.payments[0])
1246+ let dn = toBase58String(value(fq.assetId))
1247+ let dT = fq.amount
1248+ let eX = if ((fq.assetId == by))
1249+ then eQ(toBigInt(dT), toBigInt(0), toBigInt(0))
1250+ else eQ(toBigInt(0), toBigInt(dT), toBigInt(0))
1251+ if ((eX == eX))
12441252 then {
1245- let hj = fr(dP, dj, toString(dl), toBase58String(cT.transactionId), true)
1246- if ((hj == hj))
1253+ let hn = fv(dT, dn, toString(dp), toBase58String(cX.transactionId), true)
1254+ if ((hn == hn))
12471255 then {
1248- let cD = hj._3
1249- let dF = hj._2
1250- let hk = hj._1
1251- let en = if (if ((fO > 0))
1252- then (fO > hk)
1256+ let cH = hn._3
1257+ let dJ = hn._2
1258+ let ho = hn._1
1259+ let er = if (if ((fS > 0))
1260+ then (fS > ho)
12531261 else false)
1254- then aW(makeString(["amount to receive is less than ", toString(fO)], ""))
1255- else hk
1256- let gW = invoke(aQ, "emit", [en], nil)
1257- if ((gW == gW))
1262+ then ba(makeString(["amount to receive is less than ", toString(fS)], ""))
1263+ else ho
1264+ let ha = invoke(aU, "emit", [er], nil)
1265+ if ((ha == ha))
12581266 then {
1259- let gY = {
1260- let aM = gW
1261- if ($isInstanceOf(aM, "Address"))
1267+ let hc = {
1268+ let aQ = ha
1269+ if ($isInstanceOf(aQ, "Address"))
12621270 then {
1263- let gZ = aM
1264- invoke(gZ, "emit", [en], nil)
1271+ let hd = aQ
1272+ invoke(hd, "emit", [er], nil)
12651273 }
12661274 else unit
12671275 }
1268- if ((gY == gY))
1276+ if ((hc == hc))
12691277 then {
1270- let hc = if (gQ)
1278+ let hg = if (gU)
12711279 then {
1272- let hd = invoke(bA, "stakeFor", [toString(cT.caller)], [AttachedPayment(dm, en)])
1273- if ((hd == hd))
1280+ let hh = invoke(bE, "stakeFor", [toString(cX.caller)], [AttachedPayment(dq, er)])
1281+ if ((hh == hh))
12741282 then nil
12751283 else throw("Strict value is not equal to itself.")
12761284 }
1277- else [ScriptTransfer(cT.caller, en, dm)]
1278- let ge = if ((cD > 0))
1279- then [ScriptTransfer(bf, cD, fromBase58String(dj))]
1285+ else [ScriptTransfer(cX.caller, er, dq)]
1286+ let gi = if ((cH > 0))
1287+ then [ScriptTransfer(bj, cH, fromBase58String(dn))]
12801288 else nil
1281- let hl = if ((this == bf))
1289+ let hp = if ((this == bj))
12821290 then $Tuple2(0, 0)
12831291 else {
1284- let hm = if ((fm.assetId == bu))
1292+ let hq = if ((fq.assetId == by))
12851293 then true
12861294 else false
1287- if (hm)
1288- then $Tuple2(-(cD), 0)
1289- else $Tuple2(0, -(cD))
1295+ if (hq)
1296+ then $Tuple2(-(cH), 0)
1297+ else $Tuple2(0, -(cH))
12901298 }
1291- let eV = hl._1
1292- let eW = hl._2
1293- let hn = eU(eV, eW, 0)
1294- let gk = hn._1
1295- let eL = hn._2
1296- let gl = eY(eT, eL)
1297- if ((gl == gl))
1298- then $Tuple2((((dF ++ hc) ++ ge) ++ gk), en)
1299+ let eZ = hp._1
1300+ let fa = hp._2
1301+ let hr = eY(eZ, fa, 0)
1302+ let go = hr._1
1303+ let eP = hr._2
1304+ let gp = fc(eX, eP)
1305+ if ((gp == gp))
1306+ then $Tuple2((((dJ ++ hg) ++ gi) ++ go), er)
12991307 else throw("Strict value is not equal to itself.")
13001308 }
13011309 else throw("Strict value is not equal to itself.")
13021310 }
13031311 else throw("Strict value is not equal to itself.")
13041312 }
13051313 else throw("Strict value is not equal to itself.")
13061314 }
13071315 else throw("Strict value is not equal to itself.")
13081316 }
13091317 else throw("Strict value is not equal to itself.")
13101318 }
13111319
13121320
13131321
1314-@Callable(cT)
1315-func putForFree (ho) = if ((0 > ho))
1322+@Callable(cX)
1323+func putForFree (hs) = if ((0 > hs))
13161324 then throw("Wrong slpg")
1317- else if ((size(cT.payments) != 2))
1325+ else if ((size(cX.payments) != 2))
13181326 then throw("2 pmnts expd")
13191327 else {
1320- let hp = fn(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], ho, false, false, true, 0, "")
1321- let dF = hp._9
1322- let gU = toBigInt(value(cT.payments[0]).amount)
1323- let gV = toBigInt(value(cT.payments[1]).amount)
1324- let eT = eM(gU, gV, toBigInt(0))
1325- if ((eT == eT))
1328+ let ht = fr(toString(cX.caller), toBase58String(cX.transactionId), AttachedPayment(value(cX.payments[0]).assetId, value(cX.payments[0]).amount), cX.payments[1], hs, false, false, true, 0, "")
1329+ let dJ = ht._9
1330+ let gY = toBigInt(value(cX.payments[0]).amount)
1331+ let gZ = toBigInt(value(cX.payments[1]).amount)
1332+ let eX = eQ(gY, gZ, toBigInt(0))
1333+ if ((eX == eX))
13261334 then {
1327- let hq = eU(0, 0, 0)
1328- let gk = hq._1
1329- let eL = hq._2
1330- let gl = eY(eT, eL)
1331- if ((gl == gl))
1332- then (dF ++ gk)
1335+ let hu = eY(0, 0, 0)
1336+ let go = hu._1
1337+ let eP = hu._2
1338+ let gp = fc(eX, eP)
1339+ if ((gp == gp))
1340+ then (dJ ++ go)
13331341 else throw("Strict value is not equal to itself.")
13341342 }
13351343 else throw("Strict value is not equal to itself.")
13361344 }
13371345
13381346
13391347
1340-@Callable(cT)
1348+@Callable(cX)
13411349 func get () = {
1342- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1343- if ((eT == eT))
1350+ let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1351+ if ((eX == eX))
13441352 then {
1345- let dZ = fl(cT)
1346- let hr = dZ._1
1347- let dE = dZ._2
1348- let dP = dZ._3
1349- let dj = dZ._4
1350- let dF = dZ._5
1351- let eA = invoke(aQ, "burn", [dP], [AttachedPayment(dj, dP)])
1352- if ((eA == eA))
1353+ let ed = fp(cX)
1354+ let hv = ed._1
1355+ let dI = ed._2
1356+ let dT = ed._3
1357+ let dn = ed._4
1358+ let dJ = ed._5
1359+ let eE = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
1360+ if ((eE == eE))
13531361 then {
1354- let hs = eU(-(hr), -(dE), 0)
1355- let gk = hs._1
1356- let eL = hs._2
1357- let gl = eY(eT, eL)
1358- if ((gl == gl))
1359- then (dF ++ gk)
1362+ let hw = eY(-(hv), -(dI), 0)
1363+ let go = hw._1
1364+ let eP = hw._2
1365+ let gp = fc(eX, eP)
1366+ if ((gp == gp))
1367+ then (dJ ++ go)
13601368 else throw("Strict value is not equal to itself.")
13611369 }
13621370 else throw("Strict value is not equal to itself.")
13631371 }
13641372 else throw("Strict value is not equal to itself.")
13651373 }
13661374
13671375
13681376
1369-@Callable(cT)
1370-func getOneTknV2 (fN,fO) = {
1371- let hh = {
1372- let ba = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1373- if ($isInstanceOf(ba, "Boolean"))
1374- then ba
1375- else throw(($getType(ba) + " couldn't be cast to Boolean"))
1377+@Callable(cX)
1378+func getOneTknV2 (fR,fS) = {
1379+ let hl = {
1380+ let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1381+ if ($isInstanceOf(be, "Boolean"))
1382+ then be
1383+ else throw(($getType(be) + " couldn't be cast to Boolean"))
13761384 }
1377- let ht = if (if (bd())
1385+ let hx = if (if (bh())
13781386 then true
1379- else (bs == s))
1387+ else (bw == t))
13801388 then true
1381- else hh
1382- let gL = [if (if (!(ht))
1389+ else hl
1390+ let gP = [if (if (!(hx))
13831391 then true
1384- else gp(cT))
1392+ else gt(cX))
13851393 then true
1386- else aW("get operation is blocked by admin"), if ((size(cT.payments) == 1))
1394+ else ba("get operation is blocked by admin"), if ((size(cX.payments) == 1))
13871395 then true
1388- else aW("exactly 1 payment are expected")]
1389- if ((gL == gL))
1396+ else ba("exactly 1 payment are expected")]
1397+ if ((gP == gP))
13901398 then {
1391- let hu = fM(fN, fO, cT.payments, cT.caller, cT.originCaller, cT.transactionId)
1392- let dF = hu._1
1393- let fX = hu._2
1394- $Tuple2(dF, fX)
1399+ let hy = fQ(fR, fS, cX.payments, cX.caller, cX.originCaller, cX.transactionId)
1400+ let dJ = hy._1
1401+ let gb = hy._2
1402+ $Tuple2(dJ, gb)
13951403 }
13961404 else throw("Strict value is not equal to itself.")
13971405 }
13981406
13991407
14001408
1401-@Callable(cT)
1409+@Callable(cX)
14021410 func refreshDLp () = {
1403- let hv = valueOrElse(getInteger(ap), 0)
1404- let hw = if (((height - hv) >= as))
1411+ let hz = valueOrElse(getInteger(at), 0)
1412+ let hA = if (((height - hz) >= aw))
14051413 then unit
1406- else aW(makeString([toString(as), " blocks have not passed since the previous call"], ""))
1407- if ((hw == hw))
1414+ else ba(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1415+ if ((hA == hA))
14081416 then {
1409- let ff = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ao), "0")), aY("invalid dLp"))
1410- let hx = eU(0, 0, 0)
1411- let hy = hx._1
1412- let eL = hx._2
1413- let eX = if ((ff != eL))
1414- then hy
1415- else aW("nothing to refresh")
1416- $Tuple2(eX, toString(eL))
1417+ let fj = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), bc("invalid dLp"))
1418+ let hB = eY(0, 0, 0)
1419+ let hC = hB._1
1420+ let eP = hB._2
1421+ let fb = if ((fj != eP))
1422+ then hC
1423+ else ba("nothing to refresh")
1424+ $Tuple2(fb, toString(eP))
14171425 }
14181426 else throw("Strict value is not equal to itself.")
14191427 }
14201428
14211429
14221430
1423-@Callable(cT)
1424-func getOneTknV2READONLY (fN,hz) = {
1425- let dn = toBase58String(value(bu))
1426- let do = toBase58String(value(bv))
1427- let dm = toBase58String(value(bt))
1428- let cF = [toBigInt(bT(dn)), toBigInt(bT(do))]
1429- let eK = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dm)), "invalid lp asset").quantity)
1430- let ch = cE(cF)
1431- let cg = (ch - fraction(toBigInt(hz), ch, eK))
1432- let hA = if ((fN == dn))
1431+@Callable(cX)
1432+func getOneTknV2READONLY (fR,hD) = {
1433+ let dr = toBase58String(value(by))
1434+ let ds = toBase58String(value(bz))
1435+ let dq = toBase58String(value(bx))
1436+ let cJ = [toBigInt(bX(dr)), toBigInt(bX(ds))]
1437+ let eO = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dq)), "invalid lp asset").quantity)
1438+ let cl = cI(cJ)
1439+ let ck = (cl - fraction(toBigInt(hD), cl, eO))
1440+ let hE = if ((fR == dr))
14331441 then 0
1434- else if ((fN == do))
1442+ else if ((fR == ds))
14351443 then 1
14361444 else throw("invalid out asset id")
1437- let hB = eu(cF, hA, cg)
1438- let gC = (cF[hA] - hB)
1439- let gD = max([0, toInt((gC - f))])
1440- let hC = cB(gD, bb)
1441- let fW = hC._1
1442- let cD = hC._2
1443- $Tuple2(nil, $Tuple2(fW, cD))
1445+ let hF = ey(cJ, hE, ck)
1446+ let gG = (cJ[hE] - hF)
1447+ let gH = max([0, toInt((gG - f))])
1448+ let hG = cF(gH, bf)
1449+ let ga = hG._1
1450+ let cH = hG._2
1451+ $Tuple2(nil, $Tuple2(ga, cH))
14441452 }
14451453
14461454
14471455
1448-@Callable(cT)
1449-func getOneTknV2WithBonusREADONLY (fN,hz) = {
1450- let dn = toBase58String(value(bu))
1451- let do = toBase58String(value(bv))
1452- let dm = toBase58String(value(bt))
1453- let dt = bT(dn)
1454- let dv = bT(do)
1455- let hD = {
1456- let ba = invoke(this, "getOneTknV2READONLY", [fN, hz], nil)
1457- if ($isInstanceOf(ba, "(Int, Int)"))
1458- then ba
1459- else throw(($getType(ba) + " couldn't be cast to (Int, Int)"))
1456+@Callable(cX)
1457+func getOneTknV2WithBonusREADONLY (fR,hD) = {
1458+ let dr = toBase58String(value(by))
1459+ let ds = toBase58String(value(bz))
1460+ let dq = toBase58String(value(bx))
1461+ let dx = bX(dr)
1462+ let dz = bX(ds)
1463+ let hH = {
1464+ let be = invoke(this, "getOneTknV2READONLY", [fR, hD], nil)
1465+ if ($isInstanceOf(be, "(Int, Int)"))
1466+ then be
1467+ else throw(($getType(be) + " couldn't be cast to (Int, Int)"))
14601468 }
1461- let fW = hD._1
1462- let cD = hD._2
1463- let dZ = dh("", dm, hz, this)
1464- let dD = dZ._1
1465- let dE = dZ._2
1466- let hE = (dD + dE)
1467- let fL = if ((hE == 0))
1468- then if ((fW == 0))
1469+ let ga = hH._1
1470+ let cH = hH._2
1471+ let ed = dl("", dq, hD, this)
1472+ let dH = ed._1
1473+ let dI = ed._2
1474+ let hI = (dH + dI)
1475+ let fP = if ((hI == 0))
1476+ then if ((ga == 0))
14691477 then 0
14701478 else throw("bonus calculation error")
1471- else fraction((fW - hE), a, hE)
1472- $Tuple2(nil, $Tuple3(fW, cD, fL))
1479+ else fraction((ga - hI), a, hI)
1480+ $Tuple2(nil, $Tuple3(ga, cH, fP))
14731481 }
14741482
14751483
14761484
1477-@Callable(cT)
1478-func getNoLess (hF,hG) = {
1479- let dZ = fl(cT)
1480- let dD = dZ._1
1481- let dE = dZ._2
1482- let dP = dZ._3
1483- let dj = dZ._4
1484- let dF = dZ._5
1485- if ((hF > dD))
1486- then throw(((("Failed: " + toString(dD)) + " < ") + toString(hF)))
1487- else if ((hG > dE))
1488- then throw(((("Failed: " + toString(dE)) + " < ") + toString(hG)))
1485+@Callable(cX)
1486+func getNoLess (hJ,hK) = {
1487+ let ed = fp(cX)
1488+ let dH = ed._1
1489+ let dI = ed._2
1490+ let dT = ed._3
1491+ let dn = ed._4
1492+ let dJ = ed._5
1493+ if ((hJ > dH))
1494+ then throw(((("Failed: " + toString(dH)) + " < ") + toString(hJ)))
1495+ else if ((hK > dI))
1496+ then throw(((("Failed: " + toString(dI)) + " < ") + toString(hK)))
14891497 else {
1490- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1491- if ((eT == eT))
1498+ let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1499+ if ((eX == eX))
14921500 then {
1493- let hH = invoke(aQ, "burn", [dP], [AttachedPayment(dj, dP)])
1494- if ((hH == hH))
1501+ let hL = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
1502+ if ((hL == hL))
14951503 then {
1496- let hI = eU(-(dD), -(dE), 0)
1497- let gk = hI._1
1498- let eL = hI._2
1499- let gl = eY(eT, eL)
1500- if ((gl == gl))
1501- then (dF ++ gk)
1504+ let hM = eY(-(dH), -(dI), 0)
1505+ let go = hM._1
1506+ let eP = hM._2
1507+ let gp = fc(eX, eP)
1508+ if ((gp == gp))
1509+ then (dJ ++ go)
15021510 else throw("Strict value is not equal to itself.")
15031511 }
15041512 else throw("Strict value is not equal to itself.")
15051513 }
15061514 else throw("Strict value is not equal to itself.")
15071515 }
15081516 }
15091517
15101518
15111519
1512-@Callable(cT)
1513-func unstakeAndGet (cC) = {
1514- let hJ = if ((size(cT.payments) != 0))
1520+@Callable(cX)
1521+func unstakeAndGet (cG) = {
1522+ let hN = if ((size(cX.payments) != 0))
15151523 then throw("No pmnts expd")
15161524 else true
1517- if ((hJ == hJ))
1525+ if ((hN == hN))
15181526 then {
1519- let hK = by()
1520- let gX = bt
1521- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1522- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1523- if ((eT == eT))
1527+ let hO = bC()
1528+ let hb = bx
1529+ let hP = valueOrErrorMessage(addressFromString(hO[D]), "Wr st addr")
1530+ let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1531+ if ((eX == eX))
15241532 then {
1525- let hM = invoke(hL, "unstake", [toBase58String(gX), cC], nil)
1526- if ((hM == hM))
1533+ let hQ = invoke(hP, "unstake", [toBase58String(hb), cG], nil)
1534+ if ((hQ == hQ))
15271535 then {
1528- let dZ = dh(toBase58String(cT.transactionId), toBase58String(gX), cC, cT.caller)
1529- let dD = dZ._1
1530- let dE = dZ._2
1531- let dr = parseIntValue(dZ._9)
1532- let dF = dZ._10
1533- let hN = if (if (bd())
1536+ let ed = dl(toBase58String(cX.transactionId), toBase58String(hb), cG, cX.caller)
1537+ let dH = ed._1
1538+ let dI = ed._2
1539+ let dv = parseIntValue(ed._9)
1540+ let dJ = ed._10
1541+ let hR = if (if (bh())
15341542 then true
1535- else (dr == s))
1536- then throw(("Blocked: " + toString(dr)))
1543+ else (dv == t))
1544+ then throw(("Blocked: " + toString(dv)))
15371545 else true
1538- if ((hN == hN))
1546+ if ((hR == hR))
15391547 then {
1540- let hO = invoke(aQ, "burn", [cC], [AttachedPayment(gX, cC)])
1541- if ((hO == hO))
1548+ let hS = invoke(aU, "burn", [cG], [AttachedPayment(hb, cG)])
1549+ if ((hS == hS))
15421550 then {
1543- let hP = eU(-(dD), -(dE), 0)
1544- let gk = hP._1
1545- let eL = hP._2
1546- let gl = eY(eT, eL)
1547- if ((gl == gl))
1548- then (dF ++ gk)
1551+ let hT = eY(-(dH), -(dI), 0)
1552+ let go = hT._1
1553+ let eP = hT._2
1554+ let gp = fc(eX, eP)
1555+ if ((gp == gp))
1556+ then (dJ ++ go)
15491557 else throw("Strict value is not equal to itself.")
15501558 }
15511559 else throw("Strict value is not equal to itself.")
15521560 }
15531561 else throw("Strict value is not equal to itself.")
15541562 }
15551563 else throw("Strict value is not equal to itself.")
15561564 }
15571565 else throw("Strict value is not equal to itself.")
15581566 }
15591567 else throw("Strict value is not equal to itself.")
15601568 }
15611569
15621570
15631571
1564-@Callable(cT)
1565-func unstakeAndGetNoLess (hQ,hR,hG) = {
1566- let ht = if (bd())
1572+@Callable(cX)
1573+func unstakeAndGetNoLess (hU,hV,hK) = {
1574+ let hx = if (bh())
15671575 then true
1568- else (bs == s)
1569- let gL = [if (!(ht))
1576+ else (bw == t)
1577+ let gP = [if (!(hx))
15701578 then true
1571- else throw("get operation is blocked by admin"), if ((size(cT.payments) == 0))
1579+ else throw("get operation is blocked by admin"), if ((size(cX.payments) == 0))
15721580 then true
15731581 else throw("no payments are expected")]
1574- if ((gL == gL))
1582+ if ((gP == gP))
15751583 then {
1576- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1577- if ((eT == eT))
1584+ let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1585+ if ((eX == eX))
15781586 then {
1579- let hM = invoke(bA, "unstake", [toBase58String(bt), hQ], nil)
1580- if ((hM == hM))
1587+ let hQ = invoke(bE, "unstake", [toBase58String(bx), hU], nil)
1588+ if ((hQ == hQ))
15811589 then {
1582- let hS = dh(toBase58String(cT.transactionId), toBase58String(bt), hQ, cT.caller)
1583- let dD = hS._1
1584- let dE = hS._2
1585- let dF = hS._10
1586- let hT = [if ((dD >= hR))
1590+ let hW = dl(toBase58String(cX.transactionId), toBase58String(bx), hU, cX.caller)
1591+ let dH = hW._1
1592+ let dI = hW._2
1593+ let dJ = hW._10
1594+ let hX = [if ((dH >= hV))
15871595 then true
1588- else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dE >= hG))
1596+ else throw(makeString(["amount asset amount to receive is less than ", toString(hV)], "")), if ((dI >= hK))
15891597 then true
1590- else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1591- if ((hT == hT))
1598+ else throw(makeString(["price asset amount to receive is less than ", toString(hK)], ""))]
1599+ if ((hX == hX))
15921600 then {
1593- let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bt, hQ)])
1594- if ((hH == hH))
1601+ let hL = invoke(aU, "burn", [hU], [AttachedPayment(bx, hU)])
1602+ if ((hL == hL))
15951603 then {
1596- let hU = eU(-(dD), -(dE), 0)
1597- let gk = hU._1
1598- let eL = hU._2
1599- let gl = eY(eT, eL)
1600- if ((gl == gl))
1601- then (dF ++ gk)
1604+ let hY = eY(-(dH), -(dI), 0)
1605+ let go = hY._1
1606+ let eP = hY._2
1607+ let gp = fc(eX, eP)
1608+ if ((gp == gp))
1609+ then (dJ ++ go)
16021610 else throw("Strict value is not equal to itself.")
16031611 }
16041612 else throw("Strict value is not equal to itself.")
16051613 }
16061614 else throw("Strict value is not equal to itself.")
16071615 }
16081616 else throw("Strict value is not equal to itself.")
16091617 }
16101618 else throw("Strict value is not equal to itself.")
16111619 }
16121620 else throw("Strict value is not equal to itself.")
16131621 }
16141622
16151623
16161624
1617-@Callable(cT)
1618-func unstakeAndGetOneTknV2 (hQ,fN,fO) = {
1619- let hh = {
1620- let ba = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1621- if ($isInstanceOf(ba, "Boolean"))
1622- then ba
1623- else throw(($getType(ba) + " couldn't be cast to Boolean"))
1625+@Callable(cX)
1626+func unstakeAndGetOneTknV2 (hU,fR,fS) = {
1627+ let hl = {
1628+ let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1629+ if ($isInstanceOf(be, "Boolean"))
1630+ then be
1631+ else throw(($getType(be) + " couldn't be cast to Boolean"))
16241632 }
1625- let ht = if (if (bd())
1633+ let hx = if (if (bh())
16261634 then true
1627- else (bs == s))
1635+ else (bw == t))
16281636 then true
1629- else hh
1630- let gL = [if (if (!(ht))
1637+ else hl
1638+ let gP = [if (if (!(hx))
16311639 then true
1632- else gp(cT))
1640+ else gt(cX))
16331641 then true
1634- else aW("get operation is blocked by admin"), if ((size(cT.payments) == 0))
1642+ else ba("get operation is blocked by admin"), if ((size(cX.payments) == 0))
16351643 then true
1636- else aW("no payments are expected")]
1637- if ((gL == gL))
1644+ else ba("no payments are expected")]
1645+ if ((gP == gP))
16381646 then {
1639- let hK = by()
1640- let gX = bt
1641- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1642- let dl = cT.caller
1643- let hV = this
1644- let hM = invoke(hL, "unstakeINTERNAL", [gX, hQ, dl.bytes, hV.bytes], nil)
1645- if ((hM == hM))
1647+ let hO = bC()
1648+ let hb = bx
1649+ let hP = valueOrErrorMessage(addressFromString(hO[D]), "Wr st addr")
1650+ let dp = cX.caller
1651+ let hZ = this
1652+ let hQ = invoke(hP, "unstakeINTERNAL", [hb, hU, dp.bytes, hZ.bytes], nil)
1653+ if ((hQ == hQ))
16461654 then {
1647- let hW = fM(fN, fO, [AttachedPayment(gX, hQ)], cT.caller, cT.originCaller, cT.transactionId)
1648- let dF = hW._1
1649- let fX = hW._2
1650- $Tuple2(dF, fX)
1655+ let ia = fQ(fR, fS, [AttachedPayment(hb, hU)], cX.caller, cX.originCaller, cX.transactionId)
1656+ let dJ = ia._1
1657+ let gb = ia._2
1658+ $Tuple2(dJ, gb)
16511659 }
16521660 else throw("Strict value is not equal to itself.")
16531661 }
16541662 else throw("Strict value is not equal to itself.")
16551663 }
16561664
16571665
16581666
1659-@Callable(cT)
1660-func putOneTknV2WithBonusREADONLY (hX,hY) = {
1661- let hZ = fr(hX, hY, "", "", true)
1662- let fG = hZ._1
1663- let dF = hZ._2
1664- let cD = hZ._3
1665- let fL = hZ._4
1666- $Tuple2(nil, $Tuple3(fG, cD, fL))
1667+@Callable(cX)
1668+func putOneTknV2WithBonusREADONLY (ib,ic) = {
1669+ let id = fv(ib, ic, "", "", true)
1670+ let fK = id._1
1671+ let dJ = id._2
1672+ let cH = id._3
1673+ let fP = id._4
1674+ $Tuple2(nil, $Tuple3(fK, cH, fP))
16671675 }
16681676
16691677
16701678
1671-@Callable(cT)
1672-func putOneTknV2WithoutTakeFeeREADONLY (hX,hY) = {
1673- let ia = fr(hX, hY, "", "", false)
1674- let fG = ia._1
1675- let dF = ia._2
1676- let cD = ia._3
1677- let fL = ia._4
1678- $Tuple2(nil, $Tuple3(fG, cD, fL))
1679+@Callable(cX)
1680+func putOneTknV2WithoutTakeFeeREADONLY (ib,ic) = {
1681+ let ie = fv(ib, ic, "", "", false)
1682+ let fK = ie._1
1683+ let dJ = ie._2
1684+ let cH = ie._3
1685+ let fP = ie._4
1686+ $Tuple2(nil, $Tuple3(fK, cH, fP))
16791687 }
16801688
16811689
16821690
1683-@Callable(cT)
1684-func activate (ib,ic) = if ((toString(cT.caller) != toString(aQ)))
1691+@Callable(cX)
1692+func activate (if,ig) = if ((toString(cX.caller) != toString(aU)))
16851693 then throw("denied")
1686- else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
1694+ else $Tuple2([StringEntry(ak(), if), StringEntry(al(), ig), StringEntry(am(), toString(l)), StringEntry(an(height), toString(l))], "success")
16871695
16881696
16891697
1690-@Callable(cT)
1691-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bg())
1698+@Callable(cX)
1699+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bk())
16921700
16931701
16941702
1695-@Callable(cT)
1696-func getAccBalanceWrapperREADONLY (bU) = $Tuple2(nil, bT(bU))
1703+@Callable(cX)
1704+func getAccBalanceWrapperREADONLY (bY) = $Tuple2(nil, bX(bY))
16971705
16981706
16991707
1700-@Callable(cT)
1701-func calcPricesWrapperREADONLY (cn,co,cs) = {
1702- let id = cr(cn, co, cs)
1703- $Tuple2(nil, [toString(id[0]), toString(id[1]), toString(id[2])])
1708+@Callable(cX)
1709+func calcPricesWrapperREADONLY (cr,cs,cw) = {
1710+ let ih = cv(cr, cs, cw)
1711+ $Tuple2(nil, [toString(ih[0]), toString(ih[1]), toString(ih[2])])
17041712 }
17051713
17061714
17071715
1708-@Callable(cT)
1709-func fromX18WrapperREADONLY (M,ie) = $Tuple2(nil, L(parseBigIntValue(M), ie))
1716+@Callable(cX)
1717+func fromX18WrapperREADONLY (N,ii) = $Tuple2(nil, M(parseBigIntValue(N), ii))
17101718
17111719
17121720
1713-@Callable(cT)
1714-func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
1721+@Callable(cX)
1722+func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K)))
17151723
17161724
17171725
1718-@Callable(cT)
1719-func calcPriceBigIntWrapperREADONLY (bW,bX) = $Tuple2(nil, toString(bV(parseBigIntValue(bW), parseBigIntValue(bX))))
1726+@Callable(cX)
1727+func calcPriceBigIntWrapperREADONLY (ca,cb) = $Tuple2(nil, toString(bZ(parseBigIntValue(ca), parseBigIntValue(cb))))
17201728
17211729
17221730
1723-@Callable(cT)
1724-func estimatePutOperationWrapperREADONLY (di,cc,dH,dI,dJ,dK,if,dL,dM) = $Tuple2(nil, dG(di, cc, dH, dI, dJ, dK, if, dL, dM, true, false, 0, ""))
1731+@Callable(cX)
1732+func estimatePutOperationWrapperREADONLY (dm,cg,dL,dM,dN,dO,ij,dP,dQ) = $Tuple2(nil, dK(dm, cg, dL, dM, dN, dO, ij, dP, dQ, true, false, 0, ""))
17251733
17261734
17271735
1728-@Callable(cT)
1729-func estimateGetOperationWrapperREADONLY (di,ig,dk,if) = {
1730- let dZ = dh(di, ig, dk, addressFromStringValue(if))
1731- $Tuple2(nil, $Tuple10(dZ._1, dZ._2, dZ._3, dZ._4, dZ._5, dZ._6, dZ._7, toString(dZ._8), dZ._9, dZ._10))
1736+@Callable(cX)
1737+func estimateGetOperationWrapperREADONLY (dm,ik,do,ij) = {
1738+ let ed = dl(dm, ik, do, addressFromStringValue(ij))
1739+ $Tuple2(nil, $Tuple10(ed._1, ed._2, ed._3, ed._4, ed._5, ed._6, ed._7, toString(ed._8), ed._9, ed._10))
17321740 }
17331741
17341742
17351743
1736-@Callable(cT)
1744+@Callable(cX)
17371745 func changeAmp () = {
1738- let ih = invoke(aQ, "changeAmp", [toString(this)], nil)
1739- if ((ih == ih))
1740- then nil
1746+ let il = invoke(aU, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1747+ let im = {
1748+ let aQ = il
1749+ if ($isInstanceOf(aQ, "List[Any]"))
1750+ then {
1751+ let in = aQ
1752+ $Tuple3({
1753+ let be = in[0]
1754+ if ($isInstanceOf(be, "Int"))
1755+ then be
1756+ else throw(($getType(be) + " couldn't be cast to Int"))
1757+ }, {
1758+ let be = in[1]
1759+ if ($isInstanceOf(be, "Int"))
1760+ then be
1761+ else throw(($getType(be) + " couldn't be cast to Int"))
1762+ }, {
1763+ let be = in[2]
1764+ if ($isInstanceOf(be, "Int"))
1765+ then be
1766+ else throw(($getType(be) + " couldn't be cast to Int"))
1767+ })
1768+ }
1769+ else ba("invalid entry type")
1770+ }
1771+ let io = im._1
1772+ let ip = im._2
1773+ let iq = im._3
1774+ let ir = parseIntValue(getStringValue(am()))
1775+ let is = (ir + ip)
1776+ let it = if ((0 > ip))
1777+ then if ((iq > is))
1778+ then iq
1779+ else is
1780+ else if ((is > iq))
1781+ then iq
1782+ else is
1783+ let iu = valueOrElse(getInteger(ap()), 0)
1784+ let iv = (iu + io)
1785+ let gP = [if ((height > iv))
1786+ then true
1787+ else ba("try again in few blocks"), if ((ir != it))
1788+ then true
1789+ else ba("already reached target")]
1790+ if ((gP == gP))
1791+ then [IntegerEntry(ap(), height), StringEntry(am(), toString(it)), StringEntry(an(height), toString(it))]
17411792 else throw("Strict value is not equal to itself.")
17421793 }
17431794
17441795
1745-@Verifier(ii)
1746-func ij () = {
1747- let ik = {
1748- let aM = gm()
1749- if ($isInstanceOf(aM, "ByteVector"))
1796+@Verifier(iw)
1797+func ix () = {
1798+ let iy = {
1799+ let aQ = gq()
1800+ if ($isInstanceOf(aQ, "ByteVector"))
17501801 then {
1751- let gq = aM
1752- gq
1802+ let gu = aQ
1803+ gu
17531804 }
1754- else if ($isInstanceOf(aM, "Unit"))
1755- then ii.senderPublicKey
1805+ else if ($isInstanceOf(aQ, "Unit"))
1806+ then iw.senderPublicKey
17561807 else throw("Match error")
17571808 }
1758- let aM = ii
1759- if ($isInstanceOf(aM, "Order"))
1809+ let aQ = iw
1810+ if ($isInstanceOf(aQ, "Order"))
17601811 then {
1761- let fb = aM
1762- let il = be()
1763- let im = if (gx())
1812+ let ff = aQ
1813+ let iz = bi()
1814+ let iA = if (gB())
17641815 then $Tuple2(true, "")
1765- else fa(fb)
1766- let aG = im._1
1767- let aH = im._2
1768- let aI = sigVerify(fb.bodyBytes, fb.proofs[0], fb.senderPublicKey)
1769- let aJ = sigVerify(fb.bodyBytes, fb.proofs[1], il)
1770- if (if (if (aG)
1771- then aI
1816+ else fe(ff)
1817+ let aK = iA._1
1818+ let aL = iA._2
1819+ let aM = sigVerify(ff.bodyBytes, ff.proofs[0], ff.senderPublicKey)
1820+ let aN = sigVerify(ff.bodyBytes, ff.proofs[1], iz)
1821+ if (if (if (aK)
1822+ then aM
17721823 else false)
1773- then aJ
1824+ then aN
17741825 else false)
17751826 then true
1776- else aF(aG, aH, aI, aJ)
1827+ else aJ(aK, aL, aM, aN)
17771828 }
1778- else if ($isInstanceOf(aM, "SetScriptTransaction"))
1829+ else if ($isInstanceOf(aQ, "SetScriptTransaction"))
17791830 then {
1780- let aR = aM
1781- if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
1831+ let aV = aQ
1832+ if (sigVerify(iw.bodyBytes, iw.proofs[0], iy))
17821833 then true
17831834 else {
1784- let in = blake2b256(value(aR.script))
1785- let io = fromBase64String(value(getString(aQ, aB())))
1786- let ip = scriptHash(this)
1787- if ((io == in))
1788- then (ip != in)
1835+ let iB = blake2b256(value(aV.script))
1836+ let iC = fromBase64String(value(getString(aU, aF())))
1837+ let iD = scriptHash(this)
1838+ if ((iC == iB))
1839+ then (iD != iB)
17891840 else false
17901841 }
17911842 }
1792- else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
1843+ else sigVerify(iw.bodyBytes, iw.proofs[0], iy)
17931844 }
17941845

github/deemru/w8io/169f3d6 
781.11 ms