tx · Etcr5RSDHKjb4BAfvjFkpsDVBczA29RRiznZomszwXYz

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.03700000 Waves

2023.02.09 15:50 [2442108] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "Etcr5RSDHKjb4BAfvjFkpsDVBczA29RRiznZomszwXYz", "fee": 3700000, "feeAssetId": null, "timestamp": 1675947016267, "version": 1, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "8NpzCJ9rhWDSSaZHuo2kd9xc5q9xUAGhPRGTHy1vvR44QhAkwPUEb6Xs3ywP69STaaAwuLz7MYJXxBD3wf9RiHe" ], "script": "base64:BgKJKQgCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHhJUHJpY2VBc0lkI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0 } View: original | compacted Prev: 5N6Nupq41km5BSEUTFgE2kbGessS7ZnNh5CR5ZiqoXJM Next: 3YdpRDwmRZgvUagbDG6SzXJgjkXvYsFqQYvvErrY4N9N Diff:
OldNewDifferences
1515
1616 let g = toBigInt(2)
1717
18-let h = toBigInt((a - ((a * 1) / a)))
18+let h = toBigInt(3)
1919
20-let i = "WAVES"
20+let i = toBigInt(4)
2121
22-let j = "100"
22+let j = toBigInt((a - ((a * 1) / a)))
2323
24-let k = "1"
24+let k = "WAVES"
2525
26-let l = "__"
26+let l = "100"
2727
28-let m = ""
28+let m = "1"
2929
30-let n = 1
30+let n = "__"
3131
32-let o = 2
32+let o = ""
3333
34-let p = 3
34+let p = 1
3535
36-let q = 4
36+let q = 2
3737
38-let r = 1
38+let r = 3
3939
40-let s = 2
40+let s = 4
4141
42-let t = 3
42+let t = 1
4343
44-let u = 4
44+let u = 2
4545
46-let v = 5
46+let v = 3
4747
48-let w = 6
48+let w = 4
4949
50-let x = 7
50+let x = 5
5151
52-let y = 8
52+let y = 6
5353
54-let z = 9
54+let z = 7
5555
56-let A = 1
56+let A = 8
5757
58-let B = 6
58+let B = 9
5959
60-let C = 7
60+let C = 1
6161
62-let D = 10
62+let D = 6
6363
64-let E = fraction(10, a, 10000)
64+let E = 7
6565
66-func F (G,H) = fraction(toBigInt(G), c, toBigInt(H))
66+let F = 10
67+
68+let G = fraction(10, a, 10000)
69+
70+func H (I,J) = fraction(toBigInt(I), c, toBigInt(J))
6771
6872
69-func I (J,K) = toInt(fraction(J, toBigInt(K), c))
73+func K (I,J) = fraction(I, c, J)
7074
7175
72-func L (M,N,O) = fraction(M, N, O)
76+func L (M,N) = toInt(fraction(M, toBigInt(N), c))
7377
7478
75-func P (J) = if ((d > J))
76- then -(J)
77- else J
79+func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P))
7880
7981
80-func Q (J) = if ((d > J))
81- then -(J)
82- else J
82+func Q (I,J) = fraction(I, c, toBigInt(J))
8383
8484
85-func R () = "%s__factoryContract"
85+func R (M,N) = fraction(M, toBigInt(N), c)
8686
8787
88-func S () = "%s__managerPublicKey"
88+func S (T,U,V) = fraction(T, U, V)
8989
9090
91-func T () = "%s__pendingManagerPublicKey"
91+func W (M) = if ((d > M))
92+ then -(M)
93+ else M
9294
9395
94-func U () = "%s%s__price__last"
96+func X (M) = if ((d > M))
97+ then -(M)
98+ else M
9599
96100
97-func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], l)
101+func Y () = "%s__factoryContract"
98102
99103
100-func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
104+func Z () = "%s__managerPublicKey"
101105
102106
103-func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
107+func aa () = "%s__pendingManagerPublicKey"
104108
105109
106-func ac () = "%s__amountAsset"
110+func ab () = "%s%s__price__last"
107111
108112
109-func ad () = "%s__priceAsset"
113+func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n)
110114
111115
112-func ae () = "%s__amp"
116+func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah)
113117
114118
115-func af () = "%s__addonAddr"
119+func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah)
116120
117121
118-func ag () = "%s__swapContract"
122+func aj () = "%s__amountAsset"
119123
120124
121-func ah () = "%s__factoryConfig"
125+func ak () = "%s__priceAsset"
122126
123127
124-func ai () = "%s%s__matcher__publicKey"
128+func al () = "%s__amp"
125129
126130
127-func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config")
131+func am () = "%s__addonAddr"
128132
129133
130-func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an)
134+let an = "%s__fee"
135+
136+let ao = valueOrElse(getInteger(this, an), G)
137+
138+let ap = makeString(["%s", "dLp"], n)
139+
140+let aq = makeString(["%s", "dLpRefreshedHeight"], n)
141+
142+let ar = makeString(["%s", "refreshDLpDelay"], n)
143+
144+let as = 30
145+
146+let at = valueOrElse(getInteger(this, ar), as)
147+
148+func au () = "%s__factoryConfig"
131149
132150
133-func ao () = "%s__shutdown"
151+func av () = "%s%s__matcher__publicKey"
134152
135153
136-func ap () = "%s__allowedLpStableScriptHash"
154+func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
137155
138156
139-func aq () = "%s__feeCollectorAddress"
157+func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
140158
141159
142-func ar (as,at,au) = throw(((((("Failed: ordValid=" + toString(as)) + " sndrValid=") + toString(at)) + " mtchrValid=") + toString(au)))
160+func aB () = "%s__shutdown"
143161
144162
145-func av (J) = {
146- let aw = J
147- if ($isInstanceOf(aw, "String"))
148- then {
149- let ax = aw
150- ax
151- }
152- else throw("fail cast to String")
163+func aC () = "%s__allowedLpStableScriptHash"
164+
165+
166+func aD () = "%s__feeCollectorAddress"
167+
168+
169+func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI)))
170+
171+
172+func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
173+
174+
175+func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
176+
177+
178+func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
179+
180+
181+func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
182+
183+
184+let aQ = addressFromStringValue(aJ(this, Y()))
185+
186+let aR = {
187+ let aS = invoke(aQ, "getInFeeREADONLY", [toString(this)], nil)
188+ if ($isInstanceOf(aS, "Int"))
189+ then aS
190+ else throw(($getType(aS) + " couldn't be cast to Int"))
191+ }
192+
193+let aT = {
194+ let aS = invoke(aQ, "getOutFeeREADONLY", [toString(this)], nil)
195+ if ($isInstanceOf(aS, "Int"))
196+ then aS
197+ else throw(($getType(aS) + " couldn't be cast to Int"))
198+ }
199+
200+let aU = aJ(this, al())
201+
202+func aV () = valueOrElse(getBoolean(aQ, aB()), false)
203+
204+
205+func aW () = fromBase58String(aJ(aQ, av()))
206+
207+
208+let aX = addressFromStringValue(aJ(aQ, aD()))
209+
210+func aY () = {
211+ let aZ = aJ(this, aj())
212+ let ba = aJ(this, ak())
213+ let bb = aM(aQ, az(ba))
214+ let ax = aM(aQ, az(aZ))
215+ split(aJ(aQ, aw(toString(ax), toString(bb))), n)
153216 }
154217
155218
156-func ay (az,aA) = valueOrErrorMessage(getString(az, aA), makeString(["mandatory ", toString(az), ".", aA, " not defined"], ""))
219+func bc (bd) = if ((bd == k))
220+ then unit
221+ else fromBase58String(bd)
157222
158223
159-func aB (az,aA) = valueOrErrorMessage(getInteger(az, aA), makeString(["mandatory ", toString(az), ".", aA, " not defined"], ""))
224+func be (bd) = if ((bd == unit))
225+ then k
226+ else toBase58String(value(bd))
160227
161228
162-func aC (aD) = throw(makeString(["lp_stable.ride:", aD], " "))
229+func bf (bg) = $Tuple9(addressFromStringValue(bg[t]), parseIntValue(bg[u]), fromBase58String(bg[v]), bc(bg[w]), bc(bg[x]), parseIntValue(bg[y]), parseIntValue(bg[z]), fromBase58String(bg[A]), fromBase58String(bg[B]))
163230
164231
165-let aE = addressFromStringValue(ay(this, R()))
232+let bh = bf(aY())
166233
167-let aF = {
168- let aG = invoke(aE, "getInFeeREADONLY", [toString(this)], nil)
169- if ($isInstanceOf(aG, "Int"))
170- then aG
171- else throw(($getType(aG) + " couldn't be cast to Int"))
172- }
234+let bi = bh
173235
174-let aH = {
175- let aG = invoke(aE, "getOutFeeREADONLY", [toString(this)], nil)
176- if ($isInstanceOf(aG, "Int"))
177- then aG
178- else throw(($getType(aG) + " couldn't be cast to Int"))
179- }
236+let bj = bi._1
180237
181-let aI = ay(this, ae())
238+let bk = bi._2
182239
183-func aJ () = valueOrElse(getBoolean(aE, ao()), false)
240+let bl = bi._3
241+
242+let bm = bi._4
243+
244+let bn = bi._5
245+
246+let bo = bi._6
247+
248+let bp = bi._7
249+
250+let bq = bi._8
251+
252+let br = bi._9
253+
254+func bs () = split(aJ(aQ, au()), n)
184255
185256
186-func aK () = fromBase58String(ay(aE, ai()))
257+let bt = bs()
258+
259+let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
260+
261+let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
262+
263+let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
264+
265+let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
266+
267+func by (bz,bA,bB,bC,bD,bE,bF,bG,bH,bI) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI)], n)
187268
188269
189-let aL = addressFromStringValue(ay(aE, aq()))
270+func bJ (bK,bL,bM,bC,bF,bG) = makeString(["%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bC), toString(bF), toString(bG)], n)
190271
191-func aM () = {
192- let aN = ay(this, ac())
193- let aO = ay(this, ad())
194- let aP = aB(aE, am(aO))
195- let ak = aB(aE, am(aN))
196- split(ay(aE, aj(toString(ak), toString(aP))), l)
272+
273+func bN (bO) = if ((bO == "WAVES"))
274+ then wavesBalance(this).available
275+ else assetBalance(this, fromBase58String(bO))
276+
277+
278+func bP (bQ,bR) = fraction(bQ, c, bR)
279+
280+
281+func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
282+
283+
284+func bT (bU,bV,bW) = {
285+ let bX = fraction((bU - bV), b, bV)
286+ let bY = ((bW - W(bX)) > d)
287+ if (!(bY))
288+ then throw(("Big slpg: " + toString(bX)))
289+ else $Tuple2(bY, min([bU, bV]))
197290 }
198291
199292
200-func aQ (aR) = if ((aR == i))
201- then unit
202- else fromBase58String(aR)
203-
204-
205-func aS (aR) = if ((aR == unit))
206- then i
207- else toBase58String(value(aR))
208-
209-
210-func aT (aU) = $Tuple7(addressFromStringValue(aU[r]), parseIntValue(aU[s]), fromBase58String(aU[t]), aQ(aU[u]), aQ(aU[v]), parseIntValue(aU[w]), parseIntValue(aU[x]))
211-
212-
213-let aV = aT(aM())
214-
215-let aW = aV
216-
217-let aX = aW._1
218-
219-let aY = aW._2
220-
221-let aZ = aW._3
222-
223-let ba = aW._4
224-
225-let bb = aW._5
226-
227-let bc = aW._6
228-
229-let bd = aW._7
230-
231-func be () = split(ay(aE, ah()), l)
232-
233-
234-let bf = be()
235-
236-let bg = valueOrErrorMessage(addressFromString(bf[A]), "Invalid staking contract address")
237-
238-let bh = valueOrErrorMessage(addressFromString(bf[C]), "Invalid slipage contract address")
239-
240-let bi = valueOrErrorMessage(addressFromString(bf[D]), "Invalid gwx contract address")
241-
242-let bj = valueOrErrorMessage(addressFromString(bf[B]), "Invalid gwx contract address")
243-
244-func bk (bl,bm,bn,bo,bp,bq,br,bs,bt,bu) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt), toString(bu)], l)
245-
246-
247-func bv (bw,bx,by,bo,br,bs) = makeString(["%d%d%d%d%d%d", toString(bw), toString(bx), toString(by), toString(bo), toString(br), toString(bs)], l)
248-
249-
250-func bz (bA) = if ((bA == "WAVES"))
251- then wavesBalance(this).available
252- else assetBalance(this, fromBase58String(bA))
253-
254-
255-func bB (bC,bD) = fraction(bC, c, bD)
256-
257-
258-func bE (bF,bG,bH) = {
259- let bI = fraction((bF - bG), b, bG)
260- let bJ = ((bH - P(bI)) > d)
261- if (!(bJ))
262- then throw(("Big slpg: " + toString(bI)))
263- else $Tuple2(bJ, min([bF, bG]))
293+func bZ (ca,cb,cc) = {
294+ let bX = fraction(cb, b, ca)
295+ let cd = (cc > bX)
296+ if (if (cd)
297+ then true
298+ else (cb > ca))
299+ then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300+ else cd
264301 }
265302
266303
267-func bK (bL,bM,bN) = {
268- let bI = fraction(bM, b, bL)
269- let bO = (bN > bI)
270- if (if (bO)
271- then true
272- else (bM > bL))
273- then throw(((((((toString(bM) + " ") + toString(bL)) + " ") + toString(bI)) + " ") + toString(bN)))
274- else bO
304+func ce (cf,cg,ch,ci) = {
305+ let cj = H(ch, cf)
306+ let ck = H(ci, cg)
307+ bP(ck, cj)
275308 }
276309
277310
278-func bP (bQ,bR,bS,bT) = {
279- let bU = F(bS, bQ)
280- let bV = F(bT, bR)
281- bB(bV, bU)
311+func cl (ch,ci,cm) = {
312+ let cn = bo
313+ let co = bp
314+ let cp = ce(cn, co, ch, ci)
315+ let bR = H(ch, cn)
316+ let bQ = H(ci, co)
317+ let cq = H(cm, a)
318+ let cr = bP(bR, cq)
319+ let cs = bP(bQ, cq)
320+[cp, cr, cs]
282321 }
283322
284323
285-func bW (bS,bT,bX) = {
286- let bY = aM()
287- let bZ = parseIntValue(bY[w])
288- let ca = parseIntValue(bY[x])
289- let cb = bP(bZ, ca, bS, bT)
290- let bD = F(bS, bZ)
291- let bC = F(bT, ca)
292- let cc = F(bX, a)
293- let cd = bB(bD, cc)
294- let ce = bB(bC, cc)
295-[cb, cd, ce]
324+func ct (ch,ci,cm) = {
325+ let cu = cl(ch, ci, cm)
326+[L(cu[0], a), L(cu[1], a), L(cu[2], a)]
296327 }
297328
298329
299-func cf (bS,bT,bX) = {
300- let cg = bW(bS, bT, bX)
301-[I(cg[0], a), I(cg[1], a), I(cg[2], a)]
330+func cv (cw,ao) = {
331+ let cx = if ((ao == 0))
332+ then 0
333+ else fraction(cw, ao, a)
334+ $Tuple2((cw - cx), cx)
302335 }
303336
304337
305-func ch (ci,cj) = {
306- let ck = if ((cj == 0))
307- then 0
308- else fraction(ci, cj, a)
309- $Tuple2((ci - ck), ck)
310- }
338+func cy (cz) = {
339+ let cA = cz[0]
340+ let cB = cz[1]
341+ let cC = (cA + cB)
342+ if ((cC == e))
343+ then e
344+ else {
345+ let cD = parseIntValue(aU)
346+ let cE = (cD * 2)
347+ let cu = fraction(cA, cB, f)
348+ let cF = fraction(cu, i, f)
349+ let cG = fraction(toBigInt(cE), cC, f)
350+ let cH = toBigInt((cE - 1))
351+ func cI (cJ) = {
352+ let cK = fraction(cJ, cJ, f)
353+ let cL = fraction(cK, cJ, f)
354+ let cM = fraction(cL, f, cF)
355+ fraction((cG + fraction(cM, g, f)), cJ, (fraction(cH, cJ, f) + fraction(h, cM, f)))
356+ }
311357
358+ func cN (cO,cP) = if (cO._2)
359+ then cO
360+ else {
361+ let cJ = cO._1
362+ let cQ = cI(cJ)
363+ let cR = (cQ - value(cJ))
364+ let cS = if ((e > cR))
365+ then -(cR)
366+ else cR
367+ if ((f >= cS))
368+ then $Tuple2(cQ, true)
369+ else $Tuple2(cQ, false)
370+ }
312371
313-func cl (cm,cn,co,cp) = {
314- let bY = aM()
315- let cq = bY[t]
316- let cr = bY[u]
317- let cs = bY[v]
318- let ct = parseIntValue(bY[w])
319- let cu = parseIntValue(bY[x])
320- let cv = bY[s]
321- let cw = valueOrErrorMessage(assetInfo(fromBase58String(cq)), "Wrong LP id").quantity
322- if ((cq != cn))
323- then throw("Wrong pmt asset")
324- else {
325- let cx = bz(cr)
326- let cy = F(cx, ct)
327- let cz = bz(cs)
328- let cA = F(cz, cu)
329- let cB = bB(cA, cy)
330- let cC = I(cB, a)
331- let cD = F(co, a)
332- let cE = F(cw, a)
333- let cF = fraction(cy, cD, cE)
334- let cG = fraction(cA, cD, cE)
335- let cH = I(cF, ct)
336- let cI = I(cG, cu)
337- let cJ = if ((cm == ""))
338- then nil
339- else [ScriptTransfer(cp, cH, if ((cr == "WAVES"))
340- then unit
341- else fromBase58String(cr)), ScriptTransfer(cp, cI, if ((cs == "WAVES"))
342- then unit
343- else fromBase58String(cs)), StringEntry(ab(toString(cp), cm), bv(cH, cI, co, cC, height, lastBlock.timestamp)), IntegerEntry(U(), cC), IntegerEntry(V(height, lastBlock.timestamp), cC)]
344- $Tuple10(cH, cI, cr, cs, cx, cz, cw, cB, cv, cJ)
372+ let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
373+ let cU = {
374+ let cV = cT
375+ let cW = size(cV)
376+ let cX = $Tuple2(cC, false)
377+ func cY (cZ,da) = if ((da >= cW))
378+ then cZ
379+ else cN(cZ, cV[da])
380+
381+ func db (cZ,da) = if ((da >= cW))
382+ then cZ
383+ else throw("List size exceeds 15")
384+
385+ db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
386+ }
387+ let cJ = cU._1
388+ let dc = cU._2
389+ if (dc)
390+ then cJ
391+ else throw(("D calculation error, D = " + toString(cJ)))
345392 }
346393 }
347394
348395
349-func cK (cm,bH,cL,cM,cN,cO,cp,cP,cQ,cR,cS,cT,cU) = {
350- let bY = aM()
351- let cq = fromBase58String(bY[t])
352- let cV = bY[u]
353- let cW = bY[v]
354- let cX = bY[y]
355- let cY = bY[z]
356- let cZ = parseIntValue(bY[w])
357- let da = parseIntValue(bY[x])
358- let cv = bY[s]
359- let db = valueOrErrorMessage(assetInfo(cq), "Wr lp as").quantity
360- let cx = if (cP)
361- then bz(cV)
362- else if (if (cR)
363- then (cU == cV)
364- else false)
365- then (bz(cV) - cT)
366- else if (cR)
367- then bz(cV)
368- else (bz(cV) - cL)
369- let cz = if (cP)
370- then bz(cW)
371- else if (if (cR)
372- then (cU == cW)
373- else false)
374- then (bz(cW) - cT)
375- else if (cR)
376- then bz(cW)
377- else (bz(cW) - cN)
378- let dc = F(cL, cZ)
379- let dd = F(cN, da)
380- let de = bB(dd, dc)
381- let cy = F(cx, cZ)
382- let cA = F(cz, da)
383- let df = if ((db == 0))
384- then {
385- let cB = d
386- let dg = d
387- let cc = pow((dc * dd), 0, toBigInt(5), 1, 0, DOWN)
388- $Tuple5(I(cc, a), I(dc, cZ), I(dd, da), bB((cA + dd), (cy + dc)), dg)
389- }
396+func dd (de,df,dg,dh) = {
397+ let di = bl
398+ let dj = toBase58String(value(bm))
399+ let dk = toBase58String(value(bn))
400+ let dl = bo
401+ let dm = bp
402+ let dn = toString(bk)
403+ let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity
404+ if ((toBase58String(di) != df))
405+ then throw("Wrong pmt asset")
390406 else {
391- let cB = bB(cA, cy)
392- let dh = fraction(P((cB - de)), c, cB)
393- let dg = F(bH, a)
394- if (if (if (cS)
395- then (cB != d)
396- else false)
397- then (dh > dg)
398- else false)
399- then throw(((("Price slippage " + toString(dh)) + " > ") + toString(dg)))
400- else {
401- let di = F(db, a)
402- let dj = fraction(dc, cB, c)
403- let dk = fraction(dd, c, cB)
404- let dl = if ((dj > dd))
405- then $Tuple2(dk, dd)
406- else $Tuple2(dc, dj)
407- let dm = dl._1
408- let dn = dl._2
409- let cc = fraction(di, dn, cA)
410- $Tuple5(I(cc, a), I(dm, cZ), I(dn, da), cB, dg)
411- }
412- }
413- let do = df._1
414- let dp = df._2
415- let dq = df._3
416- let cC = I(df._4, a)
417- let dr = I(df._5, a)
418- if ((0 >= do))
419- then throw("LP <= 0")
420- else {
421- let ds = if (!(cQ))
422- then 0
423- else do
424- let dt = (cL - dp)
425- let du = (cN - dq)
426- let dv = if (if (cR)
427- then (cU == cV)
428- else false)
429- then $Tuple2(cT, 0)
430- else if (if (cR)
431- then (cU == cW)
432- else false)
433- then $Tuple2(0, cT)
434- else $Tuple2(dp, dq)
435- let dw = dv._1
436- let dx = dv._2
437- let dy = [IntegerEntry(U(), cC), IntegerEntry(V(height, lastBlock.timestamp), cC), StringEntry(Y(cp, cm), bk(dw, dx, ds, cC, bH, dr, height, lastBlock.timestamp, dt, du))]
438- $Tuple13(do, ds, cC, cx, cz, db, cq, cv, dy, dt, du, cM, cO)
407+ let dp = bN(dj)
408+ let dq = H(dp, dl)
409+ let dr = bN(dk)
410+ let ds = H(dr, dm)
411+ let dt = bP(ds, dq)
412+ let du = L(dt, a)
413+ let dv = H(dg, a)
414+ let dw = H(do, a)
415+ let dx = fraction(dq, dv, dw)
416+ let dy = fraction(ds, dv, dw)
417+ let dz = O(dx, dl, FLOOR)
418+ let dA = O(dy, dm, FLOOR)
419+ let dB = if ((de == ""))
420+ then nil
421+ else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
422+ then unit
423+ else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
424+ then unit
425+ else fromBase58String(dk)), StringEntry(ai(toString(dh), de), bJ(dz, dA, dg, du, height, lastBlock.timestamp)), IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du)]
426+ $Tuple10(dz, dA, dj, dk, dp, dr, do, dt, dn, dB)
439427 }
440428 }
441429
442430
443-func dz (dA) = {
444- let bY = aM()
445- let dB = bY[u]
446- let dC = bY[v]
447- let cv = parseIntValue(bY[s])
448- let bZ = parseIntValue(bY[w])
449- let ca = parseIntValue(bY[x])
450- let dD = bz(dB)
451- let dE = bz(dC)
452- let cB = if ((dA.orderType == Buy))
453- then bP(bZ, ca, (dD + dA.amount), dE)
454- else bP(bZ, ca, (dD - dA.amount), dE)
455- let cC = I(cB, a)
456- if (if (if (aJ())
457- then true
458- else (cv == p))
459- then true
460- else (cv == q))
461- then throw("Admin blocked")
431+func dC (de,bW,dD,dE,dF,dG,dh,dH,dI,dJ,dK,dL,dM) = {
432+ let di = bl
433+ let dN = toBase58String(value(bm))
434+ let dO = toBase58String(value(bn))
435+ let dP = bq
436+ let dQ = br
437+ let dR = bo
438+ let dS = bp
439+ let dn = toString(bk)
440+ let dT = valueOrErrorMessage(assetInfo(di), "Wr lp as").quantity
441+ let dp = if (dH)
442+ then bN(dN)
443+ else if (if (dJ)
444+ then (dM == dN)
445+ else false)
446+ then (bN(dN) - dL)
447+ else if (dJ)
448+ then bN(dN)
449+ else (bN(dN) - dD)
450+ let dr = if (dH)
451+ then bN(dO)
452+ else if (if (dJ)
453+ then (dM == dO)
454+ else false)
455+ then (bN(dO) - dL)
456+ else if (dJ)
457+ then bN(dO)
458+ else (bN(dO) - dF)
459+ let dU = H(dD, dR)
460+ let dV = H(dF, dS)
461+ let dW = bP(dV, dU)
462+ let dq = H(dp, dR)
463+ let ds = H(dr, dS)
464+ let cb = cy([dq, ds])
465+ let dX = if ((dT == 0))
466+ then {
467+ let ca = cy([(dq + dU), (ds + dV)])
468+ let dY = if ((ca > cb))
469+ then true
470+ else throw("D1 should be greater than D0")
471+ if ((dY == dY))
472+ then {
473+ let dt = d
474+ let dZ = d
475+ let cq = ca
476+ $Tuple5(L(cq, a), L(dU, dR), L(dV, dS), bP((ds + dV), (dq + dU)), dZ)
477+ }
478+ else throw("Strict value is not equal to itself.")
479+ }
462480 else {
463- let dF = dA.assetPair.amountAsset
464- let dG = if ((dF == unit))
465- then "WAVES"
466- else toBase58String(value(dF))
467- let dH = dA.assetPair.priceAsset
468- let dI = if ((dH == unit))
469- then "WAVES"
470- else toBase58String(value(dH))
471- if (if ((dG != dB))
472- then true
473- else (dI != dC))
474- then throw("Wr assets")
481+ let dt = bP(ds, dq)
482+ let ea = fraction(W((dt - dW)), c, dt)
483+ let dZ = H(bW, a)
484+ if (if (if (dK)
485+ then (dt != d)
486+ else false)
487+ then (ea > dZ)
488+ else false)
489+ then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
475490 else {
476- let dJ = dA.price
477- let da = fraction(a, ca, bZ)
478- let dK = L(dJ, a, da)
479- let dL = if ((dA.orderType == Buy))
480- then (cC >= dK)
481- else (dK >= cC)
482- true
491+ let eb = H(dT, a)
492+ let ec = fraction(dU, bS(ds, dq, CEILING), c, CEILING)
493+ let ed = fraction(dV, c, bS(ds, dq, FLOOR), CEILING)
494+ let ee = if ((ec > dV))
495+ then $Tuple2(ed, dV)
496+ else $Tuple2(dU, ec)
497+ let ef = ee._1
498+ let eg = ee._2
499+ let ca = cy([(dq + ef), (ds + eg)])
500+ let dY = if ((ca > cb))
501+ then true
502+ else throw("D1 should be greater than D0")
503+ if ((dY == dY))
504+ then {
505+ let cq = fraction(eb, (ca - cb), cb)
506+ $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ)
507+ }
508+ else throw("Strict value is not equal to itself.")
483509 }
510+ }
511+ let eh = dX._1
512+ let ei = dX._2
513+ let ej = dX._3
514+ let du = L(dX._4, a)
515+ let ek = L(dX._5, a)
516+ if ((0 >= eh))
517+ then throw("LP <= 0")
518+ else {
519+ let el = if (!(dI))
520+ then 0
521+ else eh
522+ let em = (dD - ei)
523+ let en = (dF - ej)
524+ let eo = if (if (dJ)
525+ then (dM == dN)
526+ else false)
527+ then $Tuple2(dL, 0)
528+ else if (if (dJ)
529+ then (dM == dO)
530+ else false)
531+ then $Tuple2(0, dL)
532+ else $Tuple2(ei, ej)
533+ let ep = eo._1
534+ let eq = eo._2
535+ let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, de), by(ep, eq, el, du, bW, ek, height, lastBlock.timestamp, em, en))]
536+ $Tuple13(eh, el, du, dp, dr, dT, di, dn, er, em, en, dE, dG)
484537 }
485538 }
486539
487540
488-func dM (dN) = if ((size(dN.payments) != 1))
541+func es (cz,cP,et) = {
542+ let eu = g
543+ let ev = cz[if ((cP == 0))
544+ then 1
545+ else 0]
546+ let ew = parseBigIntValue(l)
547+ let cD = (parseBigIntValue(aU) * ew)
548+ let cC = ev
549+ let cE = (cD * eu)
550+ let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
551+ let ey = ((cC + ((et * ew) / cE)) - et)
552+ func cN (cO,ez) = {
553+ let eA = cO
554+ let eB = eA._1
555+ let dc = eA._2
556+ if ((dc != unit))
557+ then cO
558+ else {
559+ let eC = (((eB * eB) + ex) / ((g * eB) + ey))
560+ let eD = X((eC - value(eB)))
561+ if ((f >= eD))
562+ then $Tuple2(eC, ez)
563+ else $Tuple2(eC, unit)
564+ }
565+ }
566+
567+ let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568+ let eE = {
569+ let cV = cT
570+ let cW = size(cV)
571+ let cX = $Tuple2(et, unit)
572+ func cY (cZ,da) = if ((da >= cW))
573+ then cZ
574+ else cN(cZ, cV[da])
575+
576+ func db (cZ,da) = if ((da >= cW))
577+ then cZ
578+ else throw("List size exceeds 15")
579+
580+ db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581+ }
582+ let eB = eE._1
583+ let dc = eE._2
584+ if ((dc != unit))
585+ then eB
586+ else throw(("Y calculation error, Y = " + toString(eB)))
587+ }
588+
589+
590+func eF (eG,eH,eI) = {
591+ let eJ = fraction(cy([K(eG, toBigInt(bo)), K(eH, toBigInt(bp))]), c, eI)
592+ if ((eI == e))
593+ then e
594+ else eJ
595+ }
596+
597+
598+func eK (eL,eM,eN) = {
599+ let eO = (toBigInt(bN(be(bm))) - eL)
600+ let eP = (toBigInt(bN(be(bn))) - eM)
601+ let eQ = (toBigInt(value(assetInfo(bl)).quantity) - eN)
602+ let eR = eF(eO, eP, eQ)
603+ eR
604+ }
605+
606+
607+func eS (eT,eU,eN) = {
608+ let eO = (bN(be(bm)) + eT)
609+ let eP = (bN(be(bn)) + eU)
610+ let eQ = (value(assetInfo(bl)).quantity + eN)
611+ let eJ = eF(toBigInt(eO), toBigInt(eP), toBigInt(eQ))
612+ let eV = [IntegerEntry(aq, height), StringEntry(ap, toString(eJ))]
613+ $Tuple2(eV, eJ)
614+ }
615+
616+
617+func eW (eX,eJ) = if ((eJ >= eX))
618+ then true
619+ else aN("updated DLp lower than current DLp")
620+
621+
622+func eY (eZ) = {
623+ let eO = bN(be(bm))
624+ let eP = bN(be(bn))
625+ let fa = eZ.amount
626+ let fb = fraction(eZ.amount, eZ.price, a, FLOOR)
627+ let fc = if ((eZ.orderType == Buy))
628+ then $Tuple2(fa, -(fb))
629+ else $Tuple2(-(fa), fb)
630+ let eT = fc._1
631+ let eU = fc._2
632+ if (if (if (aV())
633+ then true
634+ else (bk == r))
635+ then true
636+ else (bk == s))
637+ then throw("Admin blocked")
638+ else if (if ((eZ.assetPair.amountAsset != bm))
639+ then true
640+ else (eZ.assetPair.priceAsset != bn))
641+ then throw("Wr assets")
642+ else {
643+ let fd = parseBigIntValue(valueOrElse(getString(this, ap), "0"))
644+ let fe = eS(eT, eU, 0)
645+ let ff = fe._1
646+ let fg = fe._2
647+ let fh = (fg >= fd)
648+ let fi = makeString(["dLp=", toString(fd), " dLpNew=", toString(fg), " amountAssetBalance=", toString(eO), " priceAssetBalance=", toString(eP), " amountAssetBalanceDelta=", toString(eT), " priceAssetBalanceDelta=", toString(eU), " height=", toString(height)], "")
649+ $Tuple2(fh, fi)
650+ }
651+ }
652+
653+
654+func fj (cP) = if ((size(cP.payments) != 1))
489655 then throw("1 pmnt exp")
490656 else {
491- let dO = value(dN.payments[0])
492- let cn = value(dO.assetId)
493- let cT = dO.amount
494- let df = cl(toBase58String(dN.transactionId), toBase58String(cn), cT, dN.caller)
495- let cH = df._1
496- let cI = df._2
497- let cv = parseIntValue(df._9)
498- let cJ = df._10
499- if (if (aJ())
657+ let fk = value(cP.payments[0])
658+ let df = value(fk.assetId)
659+ let dL = fk.amount
660+ let dX = dd(toBase58String(cP.transactionId), toBase58String(df), dL, cP.caller)
661+ let dz = dX._1
662+ let dA = dX._2
663+ let dn = parseIntValue(dX._9)
664+ let dB = dX._10
665+ if (if (aV())
500666 then true
501- else (cv == q))
502- then throw(("Admin blocked: " + toString(cv)))
503- else $Tuple5(cH, cI, cT, cn, cJ)
667+ else (dn == s))
668+ then throw(("Admin blocked: " + toString(dn)))
669+ else $Tuple5(dz, dA, dL, df, dB)
504670 }
505671
506672
507-func dP (dQ,aa,dR,dS,bH,cQ,cR,cS,cT,cU) = {
508- let df = cK(aa, bH, value(dR).amount, value(dR).assetId, value(dS).amount, value(dS).assetId, dQ, (aa == ""), cQ, cR, cS, cT, cU)
509- let cv = parseIntValue(df._8)
510- if (if (if (aJ())
673+func fl (fm,ah,fn,fo,bW,dI,dJ,dK,dL,dM) = {
674+ let dX = dC(ah, bW, value(fn).amount, value(fn).assetId, value(fo).amount, value(fo).assetId, fm, (ah == ""), dI, dJ, dK, dL, dM)
675+ let dn = parseIntValue(dX._8)
676+ if (if (if (aV())
511677 then true
512- else (cv == o))
678+ else (dn == q))
513679 then true
514- else (cv == q))
515- then throw(("Blocked:" + toString(cv)))
516- else df
680+ else (dn == s))
681+ then throw(("Blocked:" + toString(dn)))
682+ else dX
517683 }
518684
519685
520-func dT (dU) = {
521- let dV = g
522- let dW = dU[0]
523- let dX = dU[1]
524- let dY = parseBigIntValue(j)
525- let dZ = (parseBigIntValue(aI) * dY)
526- let ea = (dW + dX)
527- if ((ea == e))
528- then e
529- else {
530- let eb = (dZ * dV)
531- let ec = (((dW * dX) * dV) * dV)
532- let ed = ((eb * ea) / dY)
533- let ee = (eb - dY)
534- let ef = (dV + f)
535- func eg (eh,ei) = {
536- let ej = eh
537- let ek = ej._1
538- let el = ej._2
539- if ((el != unit))
540- then eh
541- else {
542- let em = (((ek * ek) * ek) / ec)
543- let en = (((ed + (em * dV)) * ek) / (((ee * ek) / dY) + (ef * em)))
544- let eo = Q((en - value(ek)))
545- if ((f >= eo))
546- then $Tuple2(en, ei)
547- else $Tuple2(en, unit)
548- }
549- }
550-
551- let ep = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
552- let eq = {
553- let er = ep
554- let es = size(er)
555- let et = $Tuple2(ea, unit)
556- func eu (ev,ew) = if ((ew >= es))
557- then ev
558- else eg(ev, er[ew])
559-
560- func ex (ev,ew) = if ((ew >= es))
561- then ev
562- else throw("List size exceeds 25")
563-
564- ex(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(et, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25)
565- }
566- let ek = eq._1
567- let el = eq._2
568- if ((el != unit))
569- then ek
570- else throw(("D calculation error, D = " + toString(ek)))
571- }
572- }
573-
574-
575-func ey (dU,dN,ez) = {
576- let dV = g
577- let eA = dU[if ((dN == 0))
578- then 1
579- else 0]
580- let dY = parseBigIntValue(j)
581- let dZ = (parseBigIntValue(aI) * dY)
582- let ea = eA
583- let eb = (dZ * dV)
584- let eB = (((((ez * ez) / (eA * dV)) * ez) * dY) / (eb * dV))
585- let eC = ((ea + ((ez * dY) / eb)) - ez)
586- func eg (eh,ei) = {
587- let eD = eh
588- let eE = eD._1
589- let el = eD._2
590- if ((el != unit))
591- then eh
592- else {
593- let eF = (((eE * eE) + eB) / ((g * eE) + eC))
594- let eG = Q((eF - value(eE)))
595- if ((f >= eG))
596- then $Tuple2(eF, ei)
597- else $Tuple2(eF, unit)
598- }
599- }
600-
601- let ep = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
602- let eH = {
603- let er = ep
604- let es = size(er)
605- let et = $Tuple2(ez, unit)
606- func eu (ev,ew) = if ((ew >= es))
607- then ev
608- else eg(ev, er[ew])
609-
610- func ex (ev,ew) = if ((ew >= es))
611- then ev
612- else throw("List size exceeds 15")
613-
614- ex(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(et, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
615- }
616- let eE = eH._1
617- let el = eH._2
618- if ((el != unit))
619- then eE
620- else throw(("Y calculation error, Y = " + toString(eE)))
621- }
622-
623-
624-func eI (eJ,cn,cp,aa,eK) = {
625- let aU = aM()
626- let cr = aU[u]
627- let cs = aU[v]
628- let cq = aU[t]
629- let cZ = parseIntValue(aU[w])
630- let da = parseIntValue(aU[x])
631- let eL = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cq)), "invalid lp asset").quantity)
632- let eM = if ((eL > e))
686+func fp (fq,df,dh,ah,fr) = {
687+ let dj = toBase58String(value(bm))
688+ let dk = toBase58String(value(bn))
689+ let di = bl
690+ let dR = bo
691+ let dS = bp
692+ let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity)
693+ let fs = if ((eQ > e))
633694 then true
634695 else throw("initial deposit requires all coins")
635- if ((eM == eM))
696+ if ((fs == fs))
636697 then {
637- let cx = bz(cr)
638- let cz = bz(cs)
639- let eN = if ((aa == ""))
640- then $Tuple2(cx, cz)
641- else if ((cn == cr))
642- then if ((eJ > cx))
698+ let dp = bN(dj)
699+ let dr = bN(dk)
700+ let ft = if ((ah == ""))
701+ then $Tuple2(dp, dr)
702+ else if ((df == dj))
703+ then if ((fq > dp))
643704 then throw("invalid payment amount")
644- else $Tuple2((cx - eJ), cz)
645- else if ((cn == cs))
646- then if ((eJ > cz))
705+ else $Tuple2((dp - fq), dr)
706+ else if ((df == dk))
707+ then if ((fq > dr))
647708 then throw("invalid payment amount")
648- else $Tuple2(cx, (cz - eJ))
709+ else $Tuple2(dp, (dr - fq))
649710 else throw("wrong pmtAssetId")
650- let eO = eN._1
651- let eP = eN._2
652- let eQ = if ((cn == cr))
653- then $Tuple2(eJ, 0)
654- else if ((cn == cs))
655- then $Tuple2(0, eJ)
711+ let fu = ft._1
712+ let fv = ft._2
713+ let fw = if ((df == dj))
714+ then $Tuple2(fq, 0)
715+ else if ((df == dk))
716+ then $Tuple2(0, fq)
656717 else throw("invalid payment")
657- let eR = eQ._1
658- let eS = eQ._2
659- let eT = if (eK)
660- then $Tuple3(ch(eR, aF)._1, ch(eS, aF)._1, ch(eJ, aF)._2)
661- else $Tuple3(eR, eS, 0)
662- let eU = eT._1
663- let eV = eT._2
664- let ck = eT._3
665- let eW = (eO + eU)
666- let eX = (eP + eV)
667- let bM = dT([toBigInt(eO), toBigInt(eP)])
668- let bL = dT([toBigInt(eW), toBigInt(eX)])
669- let eY = if ((bL > bM))
718+ let fx = fw._1
719+ let fy = fw._2
720+ let fz = if (fr)
721+ then $Tuple3(cv(fx, aR)._1, cv(fy, aR)._1, cv(fq, aR)._2)
722+ else $Tuple3(fx, fy, 0)
723+ let fA = fz._1
724+ let fB = fz._2
725+ let cx = fz._3
726+ let fC = (fu + fA)
727+ let fD = (fv + fB)
728+ let cb = cy([H(fu, bo), H(fv, bp)])
729+ let ca = cy([H(fC, bo), H(fD, bp)])
730+ let dY = if ((ca > cb))
670731 then true
671732 else throw()
672- if ((eY == eY))
733+ if ((dY == dY))
673734 then {
674- let eZ = fraction(eL, (bL - bM), bM)
675- let cC = I(bB(F(eX, da), F(eW, cZ)), a)
676- let dy = [IntegerEntry(U(), cC), IntegerEntry(V(height, lastBlock.timestamp), cC), StringEntry(Y(cp, aa), bk(eR, eS, toInt(eZ), cC, 0, 0, height, lastBlock.timestamp, 0, 0))]
677- let fa = fraction(eP, a, eO)
678- let fb = fraction(eJ, a, (fa + a))
679- let fc = (eJ - fb)
680- let fd = fraction(eL, toBigInt(fc), toBigInt(eP))
681- let fe = toInt(fraction((eZ - fd), b, fd))
682- $Tuple4(toInt(eZ), dy, ck, fe)
735+ let fE = fraction(eQ, (ca - cb), cb, FLOOR)
736+ let du = L(bP(H(fD, dS), H(fC, dR)), a)
737+ let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, ah), by(fx, fy, toInt(fE), du, 0, 0, height, lastBlock.timestamp, 0, 0))]
738+ let fF = fraction(fv, a, fu)
739+ let fG = fraction(fq, a, (fF + a))
740+ let fH = (fq - fG)
741+ let fI = fraction(eQ, toBigInt(fH), toBigInt(fv))
742+ let fJ = toInt(fraction((fE - fI), b, fI))
743+ $Tuple4(toInt(fE), er, cx, fJ)
683744 }
684745 else throw("Strict value is not equal to itself.")
685746 }
687748 }
688749
689750
690-func ff (fg,fh,fi,dQ,fj,fk) = {
691- let aU = aM()
692- let cq = aU[t]
693- let cr = aU[u]
694- let cs = aU[v]
695- let fl = parseIntValue(aU[w])
696- let fm = parseIntValue(aU[x])
697- let fn = aU[s]
698- let cp = if ((dQ == bj))
699- then fj
700- else dQ
701- let dO = value(fi[0])
702- let cn = value(dO.assetId)
703- let cT = dO.amount
704- let cm = toBase58String(fk)
705- if ((cq != toBase58String(cn)))
706- then throw("Wrong LP")
707- else {
708- let cx = bz(cr)
709- let cz = bz(cs)
710- let fo = {
711- let aG = invoke(this, "getOneTknV2READONLY", [fg, cT], nil)
712- if ($isInstanceOf(aG, "(Int, Int)"))
713- then aG
714- else throw(($getType(aG) + " couldn't be cast to (Int, Int)"))
715- }
716- if ((fo == fo))
717- then {
718- let ck = fo._2
719- let fp = fo._1
720- let fq = if (if ((fh > 0))
721- then (fh > fp)
722- else false)
723- then aC(makeString(["amount to receive is less than ", toString(fh)], ""))
724- else fp
725- let fr = if ((fg == cr))
726- then $Tuple4(fq, 0, ((cx - fq) - ck), cz)
727- else if ((fg == cs))
728- then $Tuple4(0, fq, cx, ((cz - fq) - ck))
729- else throw("invalid out asset id")
730- let fs = fr._1
731- let ft = fr._2
732- let eW = fr._3
733- let eX = fr._4
734- let fu = bB(F(eX, fm), F(eW, fl))
735- let fv = I(fu, a)
736- let fw = if ((fg == "WAVES"))
737- then unit
738- else fromBase58String(fg)
739- let fx = if ((ck > 0))
740- then [ScriptTransfer(aL, ck, fw)]
741- else nil
742- let cJ = ([ScriptTransfer(cp, fq, fw), StringEntry(ab(toString(cp), cm), bv(fs, ft, cT, fv, height, lastBlock.timestamp)), IntegerEntry(U(), fv), IntegerEntry(V(height, lastBlock.timestamp), fv)] ++ fx)
743- if ((cJ == cJ))
751+func fK (fL,fM,fN,fm,fO,fP) = {
752+ let di = toBase58String(value(bl))
753+ let dj = toBase58String(value(bm))
754+ let dk = toBase58String(value(bn))
755+ let fQ = bo
756+ let fR = bp
757+ let fS = bk
758+ let dh = if ((fm == bx))
759+ then fO
760+ else fm
761+ let fk = value(fN[0])
762+ let df = value(fk.assetId)
763+ let dL = fk.amount
764+ let eR = eK(e, e, e)
765+ if ((eR == eR))
766+ then {
767+ let de = toBase58String(fP)
768+ if ((di != toBase58String(df)))
769+ then throw("Wrong LP")
770+ else {
771+ let dp = bN(dj)
772+ let dr = bN(dk)
773+ let fT = {
774+ let aS = invoke(this, "getOneTknV2READONLY", [fL, dL], nil)
775+ if ($isInstanceOf(aS, "(Int, Int)"))
776+ then aS
777+ else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
778+ }
779+ if ((fT == fT))
744780 then {
745- let fy = invoke(aE, "burn", [cT], [AttachedPayment(cn, cT)])
746- if ((fy == fy))
747- then $Tuple2(cJ, fq)
781+ let cx = fT._2
782+ let fU = fT._1
783+ let fV = if (if ((fM > 0))
784+ then (fM > fU)
785+ else false)
786+ then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
787+ else fU
788+ let fW = if ((fL == dj))
789+ then $Tuple4(fV, 0, ((dp - fV) - cx), dr)
790+ else if ((fL == dk))
791+ then $Tuple4(0, fV, dp, ((dr - fV) - cx))
792+ else throw("invalid out asset id")
793+ let fX = fW._1
794+ let fY = fW._2
795+ let fC = fW._3
796+ let fD = fW._4
797+ let fZ = bP(H(fD, fR), H(fC, fQ))
798+ let ga = L(fZ, a)
799+ let gb = if ((fL == "WAVES"))
800+ then unit
801+ else fromBase58String(fL)
802+ let gc = if ((cx > 0))
803+ then [ScriptTransfer(aX, cx, gb)]
804+ else nil
805+ let dB = ([ScriptTransfer(dh, fV, gb), StringEntry(ai(toString(dh), de), bJ(fX, fY, dL, ga, height, lastBlock.timestamp)), IntegerEntry(ab(), ga), IntegerEntry(ac(height, lastBlock.timestamp), ga)] ++ gc)
806+ if ((dB == dB))
807+ then {
808+ let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809+ if ((gd == gd))
810+ then {
811+ let ge = {
812+ let gf = if ((this == aX))
813+ then 0
814+ else cx
815+ let gg = if ((bc(fL) == bm))
816+ then true
817+ else false
818+ if (gg)
819+ then $Tuple2(-((fU + gf)), 0)
820+ else $Tuple2(0, -((fU + gf)))
821+ }
822+ let eT = ge._1
823+ let eU = ge._2
824+ let gh = eS(eT, eU, 0)
825+ let gi = gh._1
826+ let eJ = gh._2
827+ let gj = eW(eR, eJ)
828+ if ((gj == gj))
829+ then $Tuple2((dB ++ gi), fV)
830+ else throw("Strict value is not equal to itself.")
831+ }
832+ else throw("Strict value is not equal to itself.")
833+ }
748834 else throw("Strict value is not equal to itself.")
749835 }
750836 else throw("Strict value is not equal to itself.")
751837 }
752- else throw("Strict value is not equal to itself.")
753838 }
839+ else throw("Strict value is not equal to itself.")
754840 }
755841
756842
757-func fz () = {
758- let aw = getString(S())
759- if ($isInstanceOf(aw, "String"))
843+func gk () = {
844+ let gl = getString(Z())
845+ if ($isInstanceOf(gl, "String"))
760846 then {
761- let ea = aw
762- fromBase58String(ea)
847+ let cC = gl
848+ fromBase58String(cC)
763849 }
764- else if ($isInstanceOf(aw, "Unit"))
850+ else if ($isInstanceOf(gl, "Unit"))
765851 then unit
766852 else throw("Match error")
767853 }
768854
769855
770-func fA () = {
771- let aw = getString(T())
772- if ($isInstanceOf(aw, "String"))
856+func gm () = {
857+ let gl = getString(aa())
858+ if ($isInstanceOf(gl, "String"))
773859 then {
774- let ea = aw
775- fromBase58String(ea)
860+ let cC = gl
861+ fromBase58String(cC)
776862 }
777- else if ($isInstanceOf(aw, "Unit"))
863+ else if ($isInstanceOf(gl, "Unit"))
778864 then unit
779865 else throw("Match error")
780866 }
781867
782868
783-let fB = throw("Permission denied")
869+let gn = throw("Permission denied")
784870
785-func fC (dN) = {
786- let aw = fz()
787- if ($isInstanceOf(aw, "ByteVector"))
871+func go (cP) = {
872+ let gl = gk()
873+ if ($isInstanceOf(gl, "ByteVector"))
788874 then {
789- let fD = aw
790- (dN.callerPublicKey == fD)
875+ let gp = gl
876+ (cP.callerPublicKey == gp)
791877 }
792- else if ($isInstanceOf(aw, "Unit"))
793- then (dN.caller == this)
878+ else if ($isInstanceOf(gl, "Unit"))
879+ then (cP.caller == this)
794880 else throw("Match error")
795881 }
796882
797883
798-func fE (dN) = {
799- let aw = fz()
800- if ($isInstanceOf(aw, "ByteVector"))
884+func gq (cP) = {
885+ let gl = gk()
886+ if ($isInstanceOf(gl, "ByteVector"))
801887 then {
802- let fD = aw
803- if ((dN.callerPublicKey == fD))
888+ let gp = gl
889+ if ((cP.callerPublicKey == gp))
804890 then true
805- else fB
891+ else gn
806892 }
807- else if ($isInstanceOf(aw, "Unit"))
808- then if ((dN.caller == this))
893+ else if ($isInstanceOf(gl, "Unit"))
894+ then if ((cP.caller == this))
809895 then true
810- else fB
896+ else gn
811897 else throw("Match error")
812898 }
813899
814900
815-func fF (fG,ez,fH) = {
816- let aU = aM()
817- let cr = aU[u]
818- let cs = aU[v]
819- let dV = g
820- let dY = parseBigIntValue(j)
821- let dZ = (parseBigIntValue(aI) * dY)
822- let dU = if ((fG == false))
823- then [(toBigInt(bz(cr)) + fH), toBigInt(bz(cs))]
824- else [(toBigInt(bz(cs)) + fH), toBigInt(bz(cr))]
825- let eA = dU[0]
826- let ea = eA
827- let eb = (dZ * dV)
828- let eB = (((((ez * ez) / (eA * dV)) * ez) * dY) / (eb * dV))
829- let eC = ((ea + ((ez * dY) / eb)) - ez)
830- func eg (eh,ei) = {
831- let fI = eh
832- let eE = fI._1
833- let el = fI._2
834- if ((el != unit))
835- then eh
836- else {
837- let eF = (((eE * eE) + eB) / ((g * eE) + eC))
838- let eG = Q((eF - value(eE)))
839- if ((f >= eG))
840- then $Tuple2(eF, ei)
841- else $Tuple2(eF, unit)
842- }
843- }
844-
845- let ep = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
846- let fJ = {
847- let er = ep
848- let es = size(er)
849- let et = $Tuple2(ez, unit)
850- func eu (ev,ew) = if ((ew >= es))
851- then ev
852- else eg(ev, er[ew])
853-
854- func ex (ev,ew) = if ((ew >= es))
855- then ev
856- else throw("List size exceeds 15")
857-
858- ex(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(et, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
859- }
860- let eE = fJ._1
861- let el = fJ._2
862- if ((el != unit))
863- then eE
864- else throw(("Y calculation error, Y = " + toString(eE)))
865- }
866-
867-
868-@Callable(dN)
869-func calculateAmountOutForSwapREADONLY (fK,fG) = {
870- let fL = if ((fG == false))
871- then {
872- let fM = ay(this, ad())
873- let fH = (toBigInt(bz(ay(this, ac()))) + toBigInt(fK))
874- $Tuple2(fM, fH)
875- }
876- else {
877- let fM = ay(this, ac())
878- let fH = (toBigInt(bz(ay(this, ad()))) + toBigInt(fK))
879- $Tuple2(fM, fH)
880- }
881- let fM = fL._1
882- let fH = fL._2
883- let aU = aM()
884- let cr = aU[u]
885- let cs = aU[v]
886- let dU = [toBigInt(bz(cr)), toBigInt(bz(cs))]
887- let ez = dT(dU)
888- let eE = fF(fG, ez, toBigInt(fK))
889- let fN = ((toBigInt(bz(fM)) - eE) - toBigInt(1))
890- let fO = max([0, toInt(fN)])
891- let fP = if ((fG == false))
892- then [(toBigInt(bz(cr)) + toBigInt(fK)), (toBigInt(bz(cs)) - fN)]
893- else [(toBigInt(bz(cr)) - fN), (toBigInt(bz(cs)) + toBigInt(fK))]
894- let fQ = dT(fP)
895- let eY = if ((fQ >= ez))
896- then true
897- else throw(makeString(["new D is fewer error", toString(ez), toString(fQ)], "__"))
898- if ((eY == eY))
899- then $Tuple2(nil, fO)
901+@Callable(cP)
902+func constructor (Y) = {
903+ let ex = gq(cP)
904+ if ((ex == ex))
905+ then [StringEntry(Y(), Y)]
900906 else throw("Strict value is not equal to itself.")
901907 }
902908
903909
904910
905-@Callable(dN)
906-func calculateAmountOutForSwapAndSendTokens (fK,fG,fR,fS) = {
907- let fT = [if ((value(dN.payments[0]).amount >= fK))
908- then true
909- else aC("Wrong amount"), if ((dN.caller == addressFromStringValue(ay(this, ag()))))
910- then true
911- else aC("Permission denied")]
912- if ((fT == fT))
911+@Callable(cP)
912+func setManager (gr) = {
913+ let ex = gq(cP)
914+ if ((ex == ex))
913915 then {
914- let dO = value(dN.payments[0])
915- let fU = if ((dO.assetId == unit))
916- then toBase58String(toBytes("WAVES"))
917- else toBase58String(value(dO.assetId))
918- let fV = if ((fG == false))
919- then {
920- let fM = ay(this, ad())
921- let fH = (bz(fU) - value(dN.payments[0]).amount)
922- $Tuple2(fM, fH)
923- }
924- else {
925- let fM = ay(this, ac())
926- let fH = (bz(fU) - value(dN.payments[0]).amount)
927- $Tuple2(fM, fH)
928- }
929- let fM = fV._1
930- let fH = fV._2
931- let aU = aM()
932- let cr = aU[u]
933- let cs = aU[v]
934- let dU = if ((fG == false))
935- then [(toBigInt(bz(cr)) - toBigInt(value(dN.payments[0]).amount)), toBigInt(bz(cs))]
936- else [toBigInt(bz(cr)), (toBigInt(bz(cs)) - toBigInt(value(dN.payments[0]).amount))]
937- let ez = dT(dU)
938- let eE = fF(fG, ez, toBigInt(0))
939- let fN = ((toBigInt(bz(fM)) - eE) - toBigInt(1))
940- let fO = max([0, toInt(fN)])
941- let fW = if ((fO >= fR))
942- then true
943- else throw("Exchange result is fewer coins than expected")
944- if ((fW == fW))
945- then {
946- let fP = if ((fG == false))
947- then [toBigInt(bz(cr)), (toBigInt(bz(cs)) - fN)]
948- else [(toBigInt(bz(cr)) - fN), toBigInt(bz(cs))]
949- let fQ = dT(fP)
950- let eY = if ((fQ >= ez))
951- then true
952- else throw("new D is fewer error")
953- if ((eY == eY))
954- then [ScriptTransfer(addressFromStringValue(fS), fO, if ((fU == "WAVES"))
955- then unit
956- else fromBase58String(fM))]
957- else throw("Strict value is not equal to itself.")
958- }
916+ let gs = fromBase58String(gr)
917+ if ((gs == gs))
918+ then [StringEntry(aa(), gr)]
959919 else throw("Strict value is not equal to itself.")
960920 }
961921 else throw("Strict value is not equal to itself.")
963923
964924
965925
966-@Callable(dN)
967-func constructor (R) = {
968- let eB = fE(dN)
969- if ((eB == eB))
970- then [StringEntry(R(), R)]
971- else throw("Strict value is not equal to itself.")
972- }
973-
974-
975-
976-@Callable(dN)
977-func setManager (fX) = {
978- let eB = fE(dN)
979- if ((eB == eB))
926+@Callable(cP)
927+func confirmManager () = {
928+ let cu = gm()
929+ let gt = if (isDefined(cu))
930+ then true
931+ else throw("No pending manager")
932+ if ((gt == gt))
980933 then {
981- let fY = fromBase58String(fX)
982- if ((fY == fY))
983- then [StringEntry(T(), fX)]
934+ let gu = if ((cP.callerPublicKey == value(cu)))
935+ then true
936+ else throw("You are not pending manager")
937+ if ((gu == gu))
938+ then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
984939 else throw("Strict value is not equal to itself.")
985940 }
986941 else throw("Strict value is not equal to itself.")
988943
989944
990945
991-@Callable(dN)
992-func confirmManager () = {
993- let cg = fA()
994- let fZ = if (isDefined(cg))
995- then true
996- else throw("No pending manager")
997- if ((fZ == fZ))
998- then {
999- let ga = if ((dN.callerPublicKey == value(cg)))
1000- then true
1001- else throw("You are not pending manager")
1002- if ((ga == ga))
1003- then [StringEntry(S(), toBase58String(value(cg))), DeleteEntry(T())]
1004- else throw("Strict value is not equal to itself.")
1005- }
1006- else throw("Strict value is not equal to itself.")
1007- }
1008-
1009-
1010-
1011-@Callable(dN)
1012-func put (gb,gc) = {
1013- let gd = be()
1014- let ge = valueOrErrorMessage(addressFromString(gd[A]), "Wr st addr")
1015- let gf = valueOrErrorMessage(addressFromString(gd[C]), "Wr sl addr")
1016- if ((0 > gb))
946+@Callable(cP)
947+func put (gv,gw) = {
948+ let gx = bs()
949+ let gy = valueOrErrorMessage(addressFromString(gx[C]), "Wr st addr")
950+ let gz = valueOrErrorMessage(addressFromString(gx[E]), "Wr sl addr")
951+ if ((0 > gv))
1017952 then throw("Wrong slippage")
1018- else if ((size(dN.payments) != 2))
953+ else if ((size(cP.payments) != 2))
1019954 then throw("2 pmnts expd")
1020955 else {
1021- let gg = dP(toString(dN.caller), toBase58String(dN.transactionId), AttachedPayment(value(dN.payments[0]).assetId, value(dN.payments[0]).amount), dN.payments[1], gb, true, false, true, 0, "")
1022- let ds = gg._2
1023- let gh = gg._7
1024- let cJ = gg._9
1025- let dt = gg._10
1026- let du = gg._11
1027- let cr = gg._12
1028- let cs = gg._13
1029- let df = invoke(aE, "emit", [ds], nil)
1030- if ((df == df))
956+ let gA = toBigInt(value(cP.payments[0]).amount)
957+ let gB = toBigInt(value(cP.payments[1]).amount)
958+ let eO = (toBigInt(bN(be(bm))) - gA)
959+ if ((eO == eO))
1031960 then {
1032- let gi = {
1033- let aw = df
1034- if ($isInstanceOf(aw, "Address"))
1035- then {
1036- let gj = aw
1037- invoke(gj, "emit", [ds], nil)
1038- }
1039- else unit
1040- }
1041- if ((gi == gi))
961+ let eP = (toBigInt(bN(be(bn))) - gB)
962+ if ((eP == eP))
1042963 then {
1043- let gk = if ((dt > 0))
1044- then invoke(gf, "put", nil, [AttachedPayment(cr, dt)])
1045- else nil
1046- if ((gk == gk))
964+ let eQ = toBigInt(value(assetInfo(bl)).quantity)
965+ if ((eQ == eQ))
1047966 then {
1048- let gl = if ((du > 0))
1049- then invoke(gf, "put", nil, [AttachedPayment(cs, du)])
1050- else nil
1051- if ((gl == gl))
967+ let eR = eK(gA, gB, toBigInt(0))
968+ if ((eR == eR))
1052969 then {
1053- let gm = if (gc)
970+ let gC = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gv, true, false, true, 0, "")
971+ let el = gC._2
972+ let gD = gC._7
973+ let dB = gC._9
974+ let em = gC._10
975+ let en = gC._11
976+ let dj = gC._12
977+ let dk = gC._13
978+ let dX = invoke(aQ, "emit", [el], nil)
979+ if ((dX == dX))
1054980 then {
1055- let gn = invoke(ge, "stake", nil, [AttachedPayment(gh, ds)])
1056- if ((gn == gn))
1057- then nil
981+ let gE = {
982+ let gl = dX
983+ if ($isInstanceOf(gl, "Address"))
984+ then {
985+ let gF = gl
986+ invoke(gF, "emit", [el], nil)
987+ }
988+ else unit
989+ }
990+ if ((gE == gE))
991+ then {
992+ let gG = if ((em > 0))
993+ then invoke(gz, "put", nil, [AttachedPayment(dj, em)])
994+ else nil
995+ if ((gG == gG))
996+ then {
997+ let gH = if ((en > 0))
998+ then invoke(gz, "put", nil, [AttachedPayment(dk, en)])
999+ else nil
1000+ if ((gH == gH))
1001+ then {
1002+ let gI = if (gw)
1003+ then {
1004+ let gJ = invoke(gy, "stake", nil, [AttachedPayment(gD, el)])
1005+ if ((gJ == gJ))
1006+ then nil
1007+ else throw("Strict value is not equal to itself.")
1008+ }
1009+ else [ScriptTransfer(cP.caller, el, gD)]
1010+ let gK = eS(0, 0, 0)
1011+ let gi = gK._1
1012+ let eJ = gK._2
1013+ let gL = if ((eJ >= eR))
1014+ then true
1015+ else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " "))
1016+ if ((gL == gL))
1017+ then {
1018+ let gM = value(assetInfo(bl)).quantity
1019+ if ((gM == gM))
1020+ then ((dB ++ gI) ++ gi)
1021+ else throw("Strict value is not equal to itself.")
1022+ }
1023+ else throw("Strict value is not equal to itself.")
1024+ }
1025+ else throw("Strict value is not equal to itself.")
1026+ }
1027+ else throw("Strict value is not equal to itself.")
1028+ }
10581029 else throw("Strict value is not equal to itself.")
10591030 }
1060- else [ScriptTransfer(dN.caller, ds, gh)]
1061- (cJ ++ gm)
1031+ else throw("Strict value is not equal to itself.")
10621032 }
10631033 else throw("Strict value is not equal to itself.")
10641034 }
10721042
10731043
10741044
1075-@Callable(dN)
1076-func putOneTknV2 (fh,gc) = {
1077- let go = {
1078- let aG = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1079- if ($isInstanceOf(aG, "Boolean"))
1080- then aG
1081- else throw(($getType(aG) + " couldn't be cast to Boolean"))
1045+@Callable(cP)
1046+func putOneTknV2 (fM,gw) = {
1047+ let gN = {
1048+ let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1049+ if ($isInstanceOf(aS, "Boolean"))
1050+ then aS
1051+ else throw(($getType(aS) + " couldn't be cast to Boolean"))
10821052 }
1083- let gp = if (if (if (aJ())
1053+ let gO = if (if (if (aV())
10841054 then true
1085- else (aY == o))
1055+ else (bk == q))
10861056 then true
1087- else (aY == q))
1057+ else (bk == s))
10881058 then true
1089- else go
1090- let fT = [if (if (!(gp))
1059+ else gN
1060+ let gP = [if (if (!(gO))
10911061 then true
1092- else fC(dN))
1062+ else go(cP))
10931063 then true
1094- else aC("put operation is blocked by admin"), if ((size(dN.payments) == 1))
1064+ else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
10951065 then true
1096- else aC("exactly 1 payment are expected")]
1097- if ((fT == fT))
1066+ else aN("exactly 1 payment are expected")]
1067+ if ((gP == gP))
10981068 then {
1099- let aU = aM()
1100- let cr = aU[u]
1101- let cs = aU[v]
1102- let cq = fromBase58String(aU[t])
1103- let fl = parseIntValue(aU[w])
1104- let fm = parseIntValue(aU[x])
1105- let cp = if ((dN.caller == this))
1106- then dN.originCaller
1107- else dN.caller
1108- let dO = value(dN.payments[0])
1109- let cn = toBase58String(value(dO.assetId))
1110- let cT = dO.amount
1111- let gq = eI(cT, cn, toString(cp), toBase58String(dN.transactionId), true)
1112- if ((gq == gq))
1069+ let dj = toBase58String(value(bm))
1070+ let dk = toBase58String(value(bn))
1071+ let di = bl
1072+ let fQ = bo
1073+ let fR = bp
1074+ let dh = if ((cP.caller == this))
1075+ then cP.originCaller
1076+ else cP.caller
1077+ let fk = value(cP.payments[0])
1078+ let df = toBase58String(value(fk.assetId))
1079+ let dL = fk.amount
1080+ let eR = if ((fk.assetId == bm))
1081+ then eK(toBigInt(dL), toBigInt(0), toBigInt(0))
1082+ else eK(toBigInt(0), toBigInt(dL), toBigInt(0))
1083+ if ((eR == eR))
11131084 then {
1114- let ck = gq._3
1115- let cJ = gq._2
1116- let gr = gq._1
1117- let ds = if (if ((fh > 0))
1118- then (fh > gr)
1119- else false)
1120- then aC(makeString(["amount to receive is less than ", toString(fh)], ""))
1121- else gr
1122- let gg = invoke(aE, "emit", [ds], nil)
1123- if ((gg == gg))
1085+ let gQ = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1086+ if ((gQ == gQ))
11241087 then {
1125- let gi = {
1126- let aw = gg
1127- if ($isInstanceOf(aw, "Address"))
1128- then {
1129- let gj = aw
1130- invoke(gj, "emit", [ds], nil)
1088+ let cx = gQ._3
1089+ let dB = gQ._2
1090+ let gR = gQ._1
1091+ let el = if (if ((fM > 0))
1092+ then (fM > gR)
1093+ else false)
1094+ then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
1095+ else gR
1096+ let gC = invoke(aQ, "emit", [el], nil)
1097+ if ((gC == gC))
1098+ then {
1099+ let gE = {
1100+ let gl = gC
1101+ if ($isInstanceOf(gl, "Address"))
1102+ then {
1103+ let gF = gl
1104+ invoke(gF, "emit", [el], nil)
1105+ }
1106+ else unit
11311107 }
1132- else unit
1133- }
1134- if ((gi == gi))
1135- then {
1136- let gm = if (gc)
1108+ if ((gE == gE))
11371109 then {
1138- let gn = invoke(bg, "stake", nil, [AttachedPayment(cq, ds)])
1139- if ((gn == gn))
1140- then nil
1110+ let gI = if (gw)
1111+ then {
1112+ let gJ = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1113+ if ((gJ == gJ))
1114+ then nil
1115+ else throw("Strict value is not equal to itself.")
1116+ }
1117+ else [ScriptTransfer(cP.caller, el, di)]
1118+ let gc = if ((cx > 0))
1119+ then [ScriptTransfer(aX, cx, fromBase58String(df))]
1120+ else nil
1121+ let gS = if ((this == aX))
1122+ then $Tuple2(0, 0)
1123+ else {
1124+ let gT = if ((fk.assetId == bm))
1125+ then true
1126+ else false
1127+ if (gT)
1128+ then $Tuple2(-(cx), 0)
1129+ else $Tuple2(0, -(cx))
1130+ }
1131+ let eT = gS._1
1132+ let eU = gS._2
1133+ let gU = eS(eT, eU, 0)
1134+ let gi = gU._1
1135+ let eJ = gU._2
1136+ let gj = eW(eR, eJ)
1137+ if ((gj == gj))
1138+ then $Tuple2((((dB ++ gI) ++ gc) ++ gi), el)
11411139 else throw("Strict value is not equal to itself.")
11421140 }
1143- else [ScriptTransfer(dN.caller, ds, cq)]
1144- let fx = if ((ck > 0))
1145- then [ScriptTransfer(aL, ck, fromBase58String(cn))]
1146- else nil
1147- $Tuple2(((cJ ++ gm) ++ fx), ds)
1141+ else throw("Strict value is not equal to itself.")
11481142 }
11491143 else throw("Strict value is not equal to itself.")
11501144 }
11571151
11581152
11591153
1160-@Callable(dN)
1161-func putForFree (gs) = if ((0 > gs))
1154+@Callable(cP)
1155+func putForFree (gV) = if ((0 > gV))
11621156 then throw("Wrong slpg")
1163- else if ((size(dN.payments) != 2))
1157+ else if ((size(cP.payments) != 2))
11641158 then throw("2 pmnts expd")
11651159 else {
1166- let gt = dP(toString(dN.caller), toBase58String(dN.transactionId), AttachedPayment(value(dN.payments[0]).assetId, value(dN.payments[0]).amount), dN.payments[1], gs, false, false, true, 0, "")
1167- gt._9
1160+ let gW = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gV, false, false, true, 0, "")
1161+ let dB = gW._9
1162+ let gA = toBigInt(value(cP.payments[0]).amount)
1163+ let gB = toBigInt(value(cP.payments[1]).amount)
1164+ let eR = eK(gA, gB, toBigInt(0))
1165+ if ((eR == eR))
1166+ then {
1167+ let gX = eS(0, 0, 0)
1168+ let gi = gX._1
1169+ let eJ = gX._2
1170+ let gj = eW(eR, eJ)
1171+ if ((gj == gj))
1172+ then (dB ++ gi)
1173+ else throw("Strict value is not equal to itself.")
1174+ }
1175+ else throw("Strict value is not equal to itself.")
11681176 }
11691177
11701178
11711179
1172-@Callable(dN)
1180+@Callable(cP)
11731181 func get () = {
1174- let df = dM(dN)
1175- let gu = df._1
1176- let cI = df._2
1177- let cT = df._3
1178- let cn = df._4
1179- let cJ = df._5
1180- let eC = invoke(aE, "burn", [cT], [AttachedPayment(cn, cT)])
1181- if ((eC == eC))
1182- then cJ
1183- else throw("Strict value is not equal to itself.")
1184- }
1185-
1186-
1187-
1188-@Callable(dN)
1189-func getOneTknV2 (fg,fh) = {
1190- let go = {
1191- let aG = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1192- if ($isInstanceOf(aG, "Boolean"))
1193- then aG
1194- else throw(($getType(aG) + " couldn't be cast to Boolean"))
1195- }
1196- let gv = if (if (aJ())
1197- then true
1198- else (aY == q))
1199- then true
1200- else go
1201- let fT = [if (if (!(gv))
1202- then true
1203- else fC(dN))
1204- then true
1205- else aC("get operation is blocked by admin"), if ((size(dN.payments) == 1))
1206- then true
1207- else aC("exactly 1 payment are expected")]
1208- if ((fT == fT))
1182+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1183+ if ((eR == eR))
12091184 then {
1210- let gw = ff(fg, fh, dN.payments, dN.caller, dN.originCaller, dN.transactionId)
1211- let cJ = gw._1
1212- let fq = gw._2
1213- $Tuple2(cJ, fq)
1185+ let dX = fj(cP)
1186+ let gY = dX._1
1187+ let dA = dX._2
1188+ let dL = dX._3
1189+ let df = dX._4
1190+ let dB = dX._5
1191+ let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1192+ if ((ey == ey))
1193+ then {
1194+ let gZ = eS(-(gY), -(dA), 0)
1195+ let gi = gZ._1
1196+ let eJ = gZ._2
1197+ let gj = eW(eR, eJ)
1198+ if ((gj == gj))
1199+ then (dB ++ gi)
1200+ else throw("Strict value is not equal to itself.")
1201+ }
1202+ else throw("Strict value is not equal to itself.")
12141203 }
12151204 else throw("Strict value is not equal to itself.")
12161205 }
12171206
12181207
12191208
1220-@Callable(dN)
1221-func getOneTknV2READONLY (fg,gx) = {
1222- let aU = aM()
1223- let cr = aU[u]
1224- let cs = aU[v]
1225- let cq = aU[t]
1226- let dU = [toBigInt(bz(cr)), toBigInt(bz(cs))]
1227- let gy = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cq)), "invalid lp asset").quantity)
1228- let bM = dT(dU)
1229- let bL = (bM - fraction(toBigInt(gx), bM, gy))
1230- let gz = if ((fg == cr))
1231- then 0
1232- else if ((fg == cs))
1233- then 1
1234- else throw("invalid out asset id")
1235- let gA = ey(dU, gz, bL)
1236- let fN = (dU[gz] - gA)
1237- let fO = max([0, toInt((fN - f))])
1238- let gB = ch(fO, aH)
1239- let fp = gB._1
1240- let ck = gB._2
1241- $Tuple2(nil, $Tuple2(fp, ck))
1209+@Callable(cP)
1210+func getOneTknV2 (fL,fM) = {
1211+ let gN = {
1212+ let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1213+ if ($isInstanceOf(aS, "Boolean"))
1214+ then aS
1215+ else throw(($getType(aS) + " couldn't be cast to Boolean"))
1216+ }
1217+ let ha = if (if (aV())
1218+ then true
1219+ else (bk == s))
1220+ then true
1221+ else gN
1222+ let gP = [if (if (!(ha))
1223+ then true
1224+ else go(cP))
1225+ then true
1226+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
1227+ then true
1228+ else aN("exactly 1 payment are expected")]
1229+ if ((gP == gP))
1230+ then {
1231+ let hb = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId)
1232+ let dB = hb._1
1233+ let fV = hb._2
1234+ $Tuple2(dB, fV)
1235+ }
1236+ else throw("Strict value is not equal to itself.")
12421237 }
12431238
12441239
12451240
1246-@Callable(dN)
1247-func getOneTknV2WithBonusREADONLY (fg,gx) = {
1248- let aU = aM()
1249- let cr = aU[u]
1250- let cs = aU[v]
1251- let cq = aU[t]
1252- let cx = bz(cr)
1253- let cz = bz(cs)
1254- let gC = {
1255- let aG = invoke(this, "getOneTknV2READONLY", [fg, gx], nil)
1256- if ($isInstanceOf(aG, "(Int, Int)"))
1257- then aG
1258- else throw(($getType(aG) + " couldn't be cast to (Int, Int)"))
1259- }
1260- let fp = gC._1
1261- let ck = gC._2
1262- let df = cl("", cq, gx, this)
1263- let cH = df._1
1264- let cI = df._2
1265- let gD = (cH + cI)
1266- let fe = if ((gD == 0))
1267- then if ((fp == 0))
1268- then 0
1269- else throw("bonus calculation error")
1270- else fraction((fp - gD), a, gD)
1271- $Tuple2(nil, $Tuple3(fp, ck, fe))
1241+@Callable(cP)
1242+func refreshDLp () = {
1243+ let hc = valueOrElse(getInteger(aq), 0)
1244+ let hd = if (((height - hc) >= at))
1245+ then unit
1246+ else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1247+ if ((hd == hd))
1248+ then {
1249+ let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp"))
1250+ let he = eS(0, 0, 0)
1251+ let hf = he._1
1252+ let eJ = he._2
1253+ let eV = if ((fd != eJ))
1254+ then hf
1255+ else aN("nothing to refresh")
1256+ $Tuple2(eV, toString(eJ))
1257+ }
1258+ else throw("Strict value is not equal to itself.")
12721259 }
12731260
12741261
12751262
1276-@Callable(dN)
1277-func getNoLess (gE,gF) = {
1278- let df = dM(dN)
1279- let cH = df._1
1280- let cI = df._2
1281- let cT = df._3
1282- let cn = df._4
1283- let cJ = df._5
1284- if ((gE > cH))
1285- then throw(((("Failed: " + toString(cH)) + " < ") + toString(gE)))
1286- else if ((gF > cI))
1287- then throw(((("Failed: " + toString(cI)) + " < ") + toString(gF)))
1263+@Callable(cP)
1264+func getOneTknV2READONLY (fL,hg) = {
1265+ let dj = toBase58String(value(bm))
1266+ let dk = toBase58String(value(bn))
1267+ let di = toBase58String(value(bl))
1268+ let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1269+ let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1270+ let cb = cy(cz)
1271+ let ca = (cb - fraction(toBigInt(hg), cb, eI))
1272+ let hh = if ((fL == dj))
1273+ then 0
1274+ else if ((fL == dk))
1275+ then 1
1276+ else throw("invalid out asset id")
1277+ let hi = es(cz, hh, ca)
1278+ let hj = (cz[hh] - hi)
1279+ let hk = max([0, toInt((hj - f))])
1280+ let hl = cv(hk, aT)
1281+ let fU = hl._1
1282+ let cx = hl._2
1283+ $Tuple2(nil, $Tuple2(fU, cx))
1284+ }
1285+
1286+
1287+
1288+@Callable(cP)
1289+func getOneTknV2WithBonusREADONLY (fL,hg) = {
1290+ let dj = toBase58String(value(bm))
1291+ let dk = toBase58String(value(bn))
1292+ let di = toBase58String(value(bl))
1293+ let dp = bN(dj)
1294+ let dr = bN(dk)
1295+ let hm = {
1296+ let aS = invoke(this, "getOneTknV2READONLY", [fL, hg], nil)
1297+ if ($isInstanceOf(aS, "(Int, Int)"))
1298+ then aS
1299+ else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
1300+ }
1301+ let fU = hm._1
1302+ let cx = hm._2
1303+ let dX = dd("", di, hg, this)
1304+ let dz = dX._1
1305+ let dA = dX._2
1306+ let hn = (dz + dA)
1307+ let fJ = if ((hn == 0))
1308+ then if ((fU == 0))
1309+ then 0
1310+ else throw("bonus calculation error")
1311+ else fraction((fU - hn), a, hn)
1312+ $Tuple2(nil, $Tuple3(fU, cx, fJ))
1313+ }
1314+
1315+
1316+
1317+@Callable(cP)
1318+func getNoLess (ho,hp) = {
1319+ let dX = fj(cP)
1320+ let dz = dX._1
1321+ let dA = dX._2
1322+ let dL = dX._3
1323+ let df = dX._4
1324+ let dB = dX._5
1325+ if ((ho > dz))
1326+ then throw(((("Failed: " + toString(dz)) + " < ") + toString(ho)))
1327+ else if ((hp > dA))
1328+ then throw(((("Failed: " + toString(dA)) + " < ") + toString(hp)))
12881329 else {
1289- let gG = invoke(aE, "burn", [cT], [AttachedPayment(cn, cT)])
1290- if ((gG == gG))
1291- then cJ
1330+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1331+ if ((eR == eR))
1332+ then {
1333+ let hq = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1334+ if ((hq == hq))
1335+ then {
1336+ let hr = eS(-(dz), -(dA), 0)
1337+ let gi = hr._1
1338+ let eJ = hr._2
1339+ let gj = eW(eR, eJ)
1340+ if ((gj == gj))
1341+ then (dB ++ gi)
1342+ else throw("Strict value is not equal to itself.")
1343+ }
1344+ else throw("Strict value is not equal to itself.")
1345+ }
12921346 else throw("Strict value is not equal to itself.")
12931347 }
12941348 }
12951349
12961350
12971351
1298-@Callable(dN)
1299-func unstakeAndGet (ci) = {
1300- let gH = if ((size(dN.payments) != 0))
1352+@Callable(cP)
1353+func unstakeAndGet (cw) = {
1354+ let hs = if ((size(cP.payments) != 0))
13011355 then throw("No pmnts expd")
13021356 else true
1303- if ((gH == gH))
1357+ if ((hs == hs))
13041358 then {
1305- let bY = aM()
1306- let gI = be()
1307- let gh = fromBase58String(bY[t])
1308- let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1309- let gK = invoke(gJ, "unstake", [toBase58String(gh), ci], nil)
1310- if ((gK == gK))
1359+ let ht = bs()
1360+ let gD = bl
1361+ let hu = valueOrErrorMessage(addressFromString(ht[C]), "Wr st addr")
1362+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1363+ if ((eR == eR))
13111364 then {
1312- let df = cl(toBase58String(dN.transactionId), toBase58String(gh), ci, dN.caller)
1313- let cv = parseIntValue(df._9)
1314- let cJ = df._10
1315- let gL = if (if (aJ())
1316- then true
1317- else (cv == q))
1318- then throw(("Blocked: " + toString(cv)))
1319- else true
1320- if ((gL == gL))
1365+ let hv = invoke(hu, "unstake", [toBase58String(gD), cw], nil)
1366+ if ((hv == hv))
13211367 then {
1322- let gM = invoke(aE, "burn", [ci], [AttachedPayment(gh, ci)])
1323- if ((gM == gM))
1324- then cJ
1368+ let dX = dd(toBase58String(cP.transactionId), toBase58String(gD), cw, cP.caller)
1369+ let dz = dX._1
1370+ let dA = dX._2
1371+ let dn = parseIntValue(dX._9)
1372+ let dB = dX._10
1373+ let hw = if (if (aV())
1374+ then true
1375+ else (dn == s))
1376+ then throw(("Blocked: " + toString(dn)))
1377+ else true
1378+ if ((hw == hw))
1379+ then {
1380+ let hx = invoke(aQ, "burn", [cw], [AttachedPayment(gD, cw)])
1381+ if ((hx == hx))
1382+ then {
1383+ let hy = eS(-(dz), -(dA), 0)
1384+ let gi = hy._1
1385+ let eJ = hy._2
1386+ let gj = eW(eR, eJ)
1387+ if ((gj == gj))
1388+ then (dB ++ gi)
1389+ else throw("Strict value is not equal to itself.")
1390+ }
1391+ else throw("Strict value is not equal to itself.")
1392+ }
13251393 else throw("Strict value is not equal to itself.")
13261394 }
13271395 else throw("Strict value is not equal to itself.")
13331401
13341402
13351403
1336-@Callable(dN)
1337-func unstakeAndGetNoLess (gN,gO,gF) = {
1338- let gv = if (aJ())
1404+@Callable(cP)
1405+func unstakeAndGetNoLess (hz,hA,hp) = {
1406+ let ha = if (aV())
13391407 then true
1340- else (aY == q)
1341- let fT = [if (!(gv))
1408+ else (bk == s)
1409+ let gP = [if (!(ha))
13421410 then true
1343- else throw("get operation is blocked by admin"), if ((size(dN.payments) == 0))
1411+ else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
13441412 then true
13451413 else throw("no payments are expected")]
1346- if ((fT == fT))
1414+ if ((gP == gP))
13471415 then {
1348- let gK = invoke(bg, "unstake", [toBase58String(aZ), gN], nil)
1349- if ((gK == gK))
1416+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1417+ if ((eR == eR))
13501418 then {
1351- let gP = cl(toBase58String(dN.transactionId), toBase58String(aZ), gN, dN.caller)
1352- let cH = gP._1
1353- let cI = gP._2
1354- let cJ = gP._10
1355- let gQ = [if ((cH >= gO))
1356- then true
1357- else throw(makeString(["amount asset amount to receive is less than ", toString(gO)], "")), if ((cI >= gF))
1358- then true
1359- else throw(makeString(["price asset amount to receive is less than ", toString(gF)], ""))]
1360- if ((gQ == gQ))
1419+ let hv = invoke(bu, "unstake", [toBase58String(bl), hz], nil)
1420+ if ((hv == hv))
13611421 then {
1362- let gG = invoke(aE, "burn", [gN], [AttachedPayment(aZ, gN)])
1363- if ((gG == gG))
1364- then cJ
1422+ let hB = dd(toBase58String(cP.transactionId), toBase58String(bl), hz, cP.caller)
1423+ let dz = hB._1
1424+ let dA = hB._2
1425+ let dB = hB._10
1426+ let hC = [if ((dz >= hA))
1427+ then true
1428+ else throw(makeString(["amount asset amount to receive is less than ", toString(hA)], "")), if ((dA >= hp))
1429+ then true
1430+ else throw(makeString(["price asset amount to receive is less than ", toString(hp)], ""))]
1431+ if ((hC == hC))
1432+ then {
1433+ let hq = invoke(aQ, "burn", [hz], [AttachedPayment(bl, hz)])
1434+ if ((hq == hq))
1435+ then {
1436+ let hD = eS(-(dz), -(dA), 0)
1437+ let gi = hD._1
1438+ let eJ = hD._2
1439+ let gj = eW(eR, eJ)
1440+ if ((gj == gj))
1441+ then (dB ++ gi)
1442+ else throw("Strict value is not equal to itself.")
1443+ }
1444+ else throw("Strict value is not equal to itself.")
1445+ }
13651446 else throw("Strict value is not equal to itself.")
13661447 }
13671448 else throw("Strict value is not equal to itself.")
13731454
13741455
13751456
1376-@Callable(dN)
1377-func unstakeAndGetOneTknV2 (gN,fg,fh) = {
1378- let go = {
1379- let aG = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1380- if ($isInstanceOf(aG, "Boolean"))
1381- then aG
1382- else throw(($getType(aG) + " couldn't be cast to Boolean"))
1457+@Callable(cP)
1458+func unstakeAndGetOneTknV2 (hz,fL,fM) = {
1459+ let gN = {
1460+ let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1461+ if ($isInstanceOf(aS, "Boolean"))
1462+ then aS
1463+ else throw(($getType(aS) + " couldn't be cast to Boolean"))
13831464 }
1384- let gv = if (if (aJ())
1465+ let ha = if (if (aV())
13851466 then true
1386- else (aY == q))
1467+ else (bk == s))
13871468 then true
1388- else go
1389- let fT = [if (if (!(gv))
1469+ else gN
1470+ let gP = [if (if (!(ha))
13901471 then true
1391- else fC(dN))
1472+ else go(cP))
13921473 then true
1393- else aC("get operation is blocked by admin"), if ((size(dN.payments) == 0))
1474+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
13941475 then true
1395- else aC("no payments are expected")]
1396- if ((fT == fT))
1476+ else aN("no payments are expected")]
1477+ if ((gP == gP))
13971478 then {
1398- let bY = aM()
1399- let gI = be()
1400- let gh = fromBase58String(bY[t])
1401- let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1402- let gK = invoke(gJ, "unstake", [toBase58String(gh), gN], nil)
1403- if ((gK == gK))
1479+ let ht = bs()
1480+ let gD = bl
1481+ let hu = valueOrErrorMessage(addressFromString(ht[C]), "Wr st addr")
1482+ let hv = invoke(hu, "unstake", [toBase58String(gD), hz], nil)
1483+ if ((hv == hv))
14041484 then {
1405- let gR = ff(fg, fh, [AttachedPayment(gh, gN)], dN.caller, dN.originCaller, dN.transactionId)
1406- let cJ = gR._1
1407- let fq = gR._2
1408- $Tuple2(cJ, fq)
1485+ let hE = fK(fL, fM, [AttachedPayment(gD, hz)], cP.caller, cP.originCaller, cP.transactionId)
1486+ let dB = hE._1
1487+ let fV = hE._2
1488+ $Tuple2(dB, fV)
14091489 }
14101490 else throw("Strict value is not equal to itself.")
14111491 }
14141494
14151495
14161496
1417-@Callable(dN)
1418-func putOneTknV2WithBonusREADONLY (gS,gT) = {
1419- let aU = aM()
1420- let cr = aU[u]
1421- let cs = aU[v]
1422- let cq = aU[t]
1423- let gU = eI(gS, gT, "", "", true)
1424- let eZ = gU._1
1425- let cJ = gU._2
1426- let ck = gU._3
1427- let fe = gU._4
1428- $Tuple2(nil, $Tuple3(eZ, ck, fe))
1497+@Callable(cP)
1498+func putOneTknV2WithBonusREADONLY (hF,hG) = {
1499+ let hH = fp(hF, hG, "", "", true)
1500+ let fE = hH._1
1501+ let dB = hH._2
1502+ let cx = hH._3
1503+ let fJ = hH._4
1504+ $Tuple2(nil, $Tuple3(fE, cx, fJ))
14291505 }
14301506
14311507
14321508
1433-@Callable(dN)
1434-func putOneTknV2WithoutTakeFeeREADONLY (gS,gT) = {
1435- let aU = aM()
1436- let cr = aU[u]
1437- let cs = aU[v]
1438- let cq = aU[t]
1439- let gV = eI(gS, gT, "", "", false)
1440- let eZ = gV._1
1441- let cJ = gV._2
1442- let ck = gV._3
1443- let fe = gV._4
1444- $Tuple2(nil, $Tuple3(eZ, ck, fe))
1509+@Callable(cP)
1510+func putOneTknV2WithoutTakeFeeREADONLY (hF,hG) = {
1511+ let hI = fp(hF, hG, "", "", false)
1512+ let fE = hI._1
1513+ let dB = hI._2
1514+ let cx = hI._3
1515+ let fJ = hI._4
1516+ $Tuple2(nil, $Tuple3(fE, cx, fJ))
14451517 }
14461518
14471519
14481520
1449-@Callable(dN)
1450-func activate (gW,gX) = if ((toString(dN.caller) != toString(aE)))
1521+@Callable(cP)
1522+func activate (hJ,hK) = if ((toString(cP.caller) != toString(aQ)))
14511523 then throw("denied")
1452- else $Tuple2([StringEntry(ac(), gW), StringEntry(ad(), gX)], "success")
1524+ else $Tuple2([StringEntry(aj(), hJ), StringEntry(ak(), hK)], "success")
14531525
14541526
14551527
1456-@Callable(dN)
1457-func setS (gY,gL) = if ((toString(dN.caller) != ay(this, af())))
1458- then fB
1459- else [StringEntry(gY, gL)]
1528+@Callable(cP)
1529+func setS (hL,hw) = if ((toString(cP.caller) != aJ(this, am())))
1530+ then gn
1531+ else [StringEntry(hL, hw)]
14601532
14611533
14621534
1463-@Callable(dN)
1464-func setI (gY,gL) = if ((toString(dN.caller) != ay(this, af())))
1465- then fB
1466- else [IntegerEntry(gY, gL)]
1535+@Callable(cP)
1536+func setI (hL,hw) = if ((toString(cP.caller) != aJ(this, am())))
1537+ then gn
1538+ else [IntegerEntry(hL, hw)]
14671539
14681540
14691541
1470-@Callable(dN)
1471-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aM())
1542+@Callable(cP)
1543+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
14721544
14731545
14741546
1475-@Callable(dN)
1476-func getAccBalanceWrapperREADONLY (bA) = $Tuple2(nil, bz(bA))
1547+@Callable(cP)
1548+func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
14771549
14781550
14791551
1480-@Callable(dN)
1481-func calcPricesWrapperREADONLY (bS,bT,bX) = {
1482- let gZ = bW(bS, bT, bX)
1483- $Tuple2(nil, [toString(gZ[0]), toString(gZ[1]), toString(gZ[2])])
1552+@Callable(cP)
1553+func calcPricesWrapperREADONLY (ch,ci,cm) = {
1554+ let hM = cl(ch, ci, cm)
1555+ $Tuple2(nil, [toString(hM[0]), toString(hM[1]), toString(hM[2])])
14841556 }
14851557
14861558
14871559
1488-@Callable(dN)
1489-func fromX18WrapperREADONLY (J,ha) = $Tuple2(nil, I(parseBigIntValue(J), ha))
1560+@Callable(cP)
1561+func fromX18WrapperREADONLY (M,hN) = $Tuple2(nil, L(parseBigIntValue(M), hN))
14901562
14911563
14921564
1493-@Callable(dN)
1494-func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H)))
1565+@Callable(cP)
1566+func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
14951567
14961568
14971569
1498-@Callable(dN)
1499-func calcPriceBigIntWrapperREADONLY (bC,bD) = $Tuple2(nil, toString(bB(parseBigIntValue(bC), parseBigIntValue(bD))))
1570+@Callable(cP)
1571+func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
15001572
15011573
15021574
1503-@Callable(dN)
1504-func estimatePutOperationWrapperREADONLY (cm,bH,cL,cM,cN,cO,hb,cP,cQ) = $Tuple2(nil, cK(cm, bH, cL, cM, cN, cO, hb, cP, cQ, true, false, 0, ""))
1575+@Callable(cP)
1576+func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,hO,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, hO, dH, dI, true, false, 0, ""))
15051577
15061578
15071579
1508-@Callable(dN)
1509-func estimateGetOperationWrapperREADONLY (cm,hc,co,hb) = {
1510- let df = cl(cm, hc, co, addressFromStringValue(hb))
1511- $Tuple2(nil, $Tuple10(df._1, df._2, df._3, df._4, df._5, df._6, df._7, toString(df._8), df._9, df._10))
1580+@Callable(cP)
1581+func estimateGetOperationWrapperREADONLY (de,hP,dg,hO) = {
1582+ let dX = dd(de, hP, dg, addressFromStringValue(hO))
1583+ $Tuple2(nil, $Tuple10(dX._1, dX._2, dX._3, dX._4, dX._5, dX._6, dX._7, toString(dX._8), dX._9, dX._10))
15121584 }
15131585
15141586
1515-@Verifier(hd)
1516-func he () = {
1517- let hf = {
1518- let aw = fz()
1519- if ($isInstanceOf(aw, "ByteVector"))
1587+@Verifier(hQ)
1588+func hR () = {
1589+ let hS = {
1590+ let gl = gk()
1591+ if ($isInstanceOf(gl, "ByteVector"))
15201592 then {
1521- let fD = aw
1522- fD
1593+ let gp = gl
1594+ gp
15231595 }
1524- else if ($isInstanceOf(aw, "Unit"))
1525- then hd.senderPublicKey
1596+ else if ($isInstanceOf(gl, "Unit"))
1597+ then hQ.senderPublicKey
15261598 else throw("Match error")
15271599 }
1528- let aw = hd
1529- if ($isInstanceOf(aw, "Order"))
1600+ let gl = hQ
1601+ if ($isInstanceOf(gl, "Order"))
15301602 then {
1531- let dA = aw
1532- let hg = aK()
1533- let hh = dz(dA)
1534- let hi = sigVerify(dA.bodyBytes, dA.proofs[0], dA.senderPublicKey)
1535- let hj = sigVerify(dA.bodyBytes, dA.proofs[1], hg)
1536- if (if (if (hh)
1537- then hi
1603+ let eZ = gl
1604+ let hT = aW()
1605+ let hU = eY(eZ)
1606+ let aF = hU._1
1607+ let aG = hU._2
1608+ let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey)
1609+ let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], hT)
1610+ if (if (if (aF)
1611+ then aH
15381612 else false)
1539- then hj
1613+ then aI
15401614 else false)
15411615 then true
1542- else ar(hh, hi, hj)
1616+ else aE(aF, aG, aH, aI)
15431617 }
1544- else if ($isInstanceOf(aw, "SetScriptTransaction"))
1618+ else if ($isInstanceOf(gl, "SetScriptTransaction"))
15451619 then {
1546- let ea = aw
1547- let hk = blake2b256(value(ea.script))
1548- let hl = fromBase64String(value(getString(aE, ap())))
1549- let hm = scriptHash(this)
1550- if (if ((hl == hk))
1551- then (hm != hk)
1552- else false)
1620+ let cC = gl
1621+ if (sigVerify(hQ.bodyBytes, hQ.proofs[0], hS))
15531622 then true
1554- else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
1623+ else {
1624+ let hV = blake2b256(value(cC.script))
1625+ let hW = fromBase64String(value(getString(aQ, aC())))
1626+ let hX = scriptHash(this)
1627+ if ((hW == hV))
1628+ then (hX != hV)
1629+ else false
1630+ }
15551631 }
1556- else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
1632+ else sigVerify(hQ.bodyBytes, hQ.proofs[0], hS)
15571633 }
15581634
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
18-let h = toBigInt((a - ((a * 1) / a)))
18+let h = toBigInt(3)
1919
20-let i = "WAVES"
20+let i = toBigInt(4)
2121
22-let j = "100"
22+let j = toBigInt((a - ((a * 1) / a)))
2323
24-let k = "1"
24+let k = "WAVES"
2525
26-let l = "__"
26+let l = "100"
2727
28-let m = ""
28+let m = "1"
2929
30-let n = 1
30+let n = "__"
3131
32-let o = 2
32+let o = ""
3333
34-let p = 3
34+let p = 1
3535
36-let q = 4
36+let q = 2
3737
38-let r = 1
38+let r = 3
3939
40-let s = 2
40+let s = 4
4141
42-let t = 3
42+let t = 1
4343
44-let u = 4
44+let u = 2
4545
46-let v = 5
46+let v = 3
4747
48-let w = 6
48+let w = 4
4949
50-let x = 7
50+let x = 5
5151
52-let y = 8
52+let y = 6
5353
54-let z = 9
54+let z = 7
5555
56-let A = 1
56+let A = 8
5757
58-let B = 6
58+let B = 9
5959
60-let C = 7
60+let C = 1
6161
62-let D = 10
62+let D = 6
6363
64-let E = fraction(10, a, 10000)
64+let E = 7
6565
66-func F (G,H) = fraction(toBigInt(G), c, toBigInt(H))
66+let F = 10
67+
68+let G = fraction(10, a, 10000)
69+
70+func H (I,J) = fraction(toBigInt(I), c, toBigInt(J))
6771
6872
69-func I (J,K) = toInt(fraction(J, toBigInt(K), c))
73+func K (I,J) = fraction(I, c, J)
7074
7175
72-func L (M,N,O) = fraction(M, N, O)
76+func L (M,N) = toInt(fraction(M, toBigInt(N), c))
7377
7478
75-func P (J) = if ((d > J))
76- then -(J)
77- else J
79+func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P))
7880
7981
80-func Q (J) = if ((d > J))
81- then -(J)
82- else J
82+func Q (I,J) = fraction(I, c, toBigInt(J))
8383
8484
85-func R () = "%s__factoryContract"
85+func R (M,N) = fraction(M, toBigInt(N), c)
8686
8787
88-func S () = "%s__managerPublicKey"
88+func S (T,U,V) = fraction(T, U, V)
8989
9090
91-func T () = "%s__pendingManagerPublicKey"
91+func W (M) = if ((d > M))
92+ then -(M)
93+ else M
9294
9395
94-func U () = "%s%s__price__last"
96+func X (M) = if ((d > M))
97+ then -(M)
98+ else M
9599
96100
97-func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], l)
101+func Y () = "%s__factoryContract"
98102
99103
100-func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
104+func Z () = "%s__managerPublicKey"
101105
102106
103-func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
107+func aa () = "%s__pendingManagerPublicKey"
104108
105109
106-func ac () = "%s__amountAsset"
110+func ab () = "%s%s__price__last"
107111
108112
109-func ad () = "%s__priceAsset"
113+func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n)
110114
111115
112-func ae () = "%s__amp"
116+func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah)
113117
114118
115-func af () = "%s__addonAddr"
119+func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah)
116120
117121
118-func ag () = "%s__swapContract"
122+func aj () = "%s__amountAsset"
119123
120124
121-func ah () = "%s__factoryConfig"
125+func ak () = "%s__priceAsset"
122126
123127
124-func ai () = "%s%s__matcher__publicKey"
128+func al () = "%s__amp"
125129
126130
127-func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config")
131+func am () = "%s__addonAddr"
128132
129133
130-func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an)
134+let an = "%s__fee"
135+
136+let ao = valueOrElse(getInteger(this, an), G)
137+
138+let ap = makeString(["%s", "dLp"], n)
139+
140+let aq = makeString(["%s", "dLpRefreshedHeight"], n)
141+
142+let ar = makeString(["%s", "refreshDLpDelay"], n)
143+
144+let as = 30
145+
146+let at = valueOrElse(getInteger(this, ar), as)
147+
148+func au () = "%s__factoryConfig"
131149
132150
133-func ao () = "%s__shutdown"
151+func av () = "%s%s__matcher__publicKey"
134152
135153
136-func ap () = "%s__allowedLpStableScriptHash"
154+func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
137155
138156
139-func aq () = "%s__feeCollectorAddress"
157+func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
140158
141159
142-func ar (as,at,au) = throw(((((("Failed: ordValid=" + toString(as)) + " sndrValid=") + toString(at)) + " mtchrValid=") + toString(au)))
160+func aB () = "%s__shutdown"
143161
144162
145-func av (J) = {
146- let aw = J
147- if ($isInstanceOf(aw, "String"))
148- then {
149- let ax = aw
150- ax
151- }
152- else throw("fail cast to String")
163+func aC () = "%s__allowedLpStableScriptHash"
164+
165+
166+func aD () = "%s__feeCollectorAddress"
167+
168+
169+func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI)))
170+
171+
172+func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
173+
174+
175+func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
176+
177+
178+func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
179+
180+
181+func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
182+
183+
184+let aQ = addressFromStringValue(aJ(this, Y()))
185+
186+let aR = {
187+ let aS = invoke(aQ, "getInFeeREADONLY", [toString(this)], nil)
188+ if ($isInstanceOf(aS, "Int"))
189+ then aS
190+ else throw(($getType(aS) + " couldn't be cast to Int"))
191+ }
192+
193+let aT = {
194+ let aS = invoke(aQ, "getOutFeeREADONLY", [toString(this)], nil)
195+ if ($isInstanceOf(aS, "Int"))
196+ then aS
197+ else throw(($getType(aS) + " couldn't be cast to Int"))
198+ }
199+
200+let aU = aJ(this, al())
201+
202+func aV () = valueOrElse(getBoolean(aQ, aB()), false)
203+
204+
205+func aW () = fromBase58String(aJ(aQ, av()))
206+
207+
208+let aX = addressFromStringValue(aJ(aQ, aD()))
209+
210+func aY () = {
211+ let aZ = aJ(this, aj())
212+ let ba = aJ(this, ak())
213+ let bb = aM(aQ, az(ba))
214+ let ax = aM(aQ, az(aZ))
215+ split(aJ(aQ, aw(toString(ax), toString(bb))), n)
153216 }
154217
155218
156-func ay (az,aA) = valueOrErrorMessage(getString(az, aA), makeString(["mandatory ", toString(az), ".", aA, " not defined"], ""))
219+func bc (bd) = if ((bd == k))
220+ then unit
221+ else fromBase58String(bd)
157222
158223
159-func aB (az,aA) = valueOrErrorMessage(getInteger(az, aA), makeString(["mandatory ", toString(az), ".", aA, " not defined"], ""))
224+func be (bd) = if ((bd == unit))
225+ then k
226+ else toBase58String(value(bd))
160227
161228
162-func aC (aD) = throw(makeString(["lp_stable.ride:", aD], " "))
229+func bf (bg) = $Tuple9(addressFromStringValue(bg[t]), parseIntValue(bg[u]), fromBase58String(bg[v]), bc(bg[w]), bc(bg[x]), parseIntValue(bg[y]), parseIntValue(bg[z]), fromBase58String(bg[A]), fromBase58String(bg[B]))
163230
164231
165-let aE = addressFromStringValue(ay(this, R()))
232+let bh = bf(aY())
166233
167-let aF = {
168- let aG = invoke(aE, "getInFeeREADONLY", [toString(this)], nil)
169- if ($isInstanceOf(aG, "Int"))
170- then aG
171- else throw(($getType(aG) + " couldn't be cast to Int"))
172- }
234+let bi = bh
173235
174-let aH = {
175- let aG = invoke(aE, "getOutFeeREADONLY", [toString(this)], nil)
176- if ($isInstanceOf(aG, "Int"))
177- then aG
178- else throw(($getType(aG) + " couldn't be cast to Int"))
179- }
236+let bj = bi._1
180237
181-let aI = ay(this, ae())
238+let bk = bi._2
182239
183-func aJ () = valueOrElse(getBoolean(aE, ao()), false)
240+let bl = bi._3
241+
242+let bm = bi._4
243+
244+let bn = bi._5
245+
246+let bo = bi._6
247+
248+let bp = bi._7
249+
250+let bq = bi._8
251+
252+let br = bi._9
253+
254+func bs () = split(aJ(aQ, au()), n)
184255
185256
186-func aK () = fromBase58String(ay(aE, ai()))
257+let bt = bs()
258+
259+let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
260+
261+let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
262+
263+let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
264+
265+let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
266+
267+func by (bz,bA,bB,bC,bD,bE,bF,bG,bH,bI) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI)], n)
187268
188269
189-let aL = addressFromStringValue(ay(aE, aq()))
270+func bJ (bK,bL,bM,bC,bF,bG) = makeString(["%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bC), toString(bF), toString(bG)], n)
190271
191-func aM () = {
192- let aN = ay(this, ac())
193- let aO = ay(this, ad())
194- let aP = aB(aE, am(aO))
195- let ak = aB(aE, am(aN))
196- split(ay(aE, aj(toString(ak), toString(aP))), l)
272+
273+func bN (bO) = if ((bO == "WAVES"))
274+ then wavesBalance(this).available
275+ else assetBalance(this, fromBase58String(bO))
276+
277+
278+func bP (bQ,bR) = fraction(bQ, c, bR)
279+
280+
281+func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
282+
283+
284+func bT (bU,bV,bW) = {
285+ let bX = fraction((bU - bV), b, bV)
286+ let bY = ((bW - W(bX)) > d)
287+ if (!(bY))
288+ then throw(("Big slpg: " + toString(bX)))
289+ else $Tuple2(bY, min([bU, bV]))
197290 }
198291
199292
200-func aQ (aR) = if ((aR == i))
201- then unit
202- else fromBase58String(aR)
203-
204-
205-func aS (aR) = if ((aR == unit))
206- then i
207- else toBase58String(value(aR))
208-
209-
210-func aT (aU) = $Tuple7(addressFromStringValue(aU[r]), parseIntValue(aU[s]), fromBase58String(aU[t]), aQ(aU[u]), aQ(aU[v]), parseIntValue(aU[w]), parseIntValue(aU[x]))
211-
212-
213-let aV = aT(aM())
214-
215-let aW = aV
216-
217-let aX = aW._1
218-
219-let aY = aW._2
220-
221-let aZ = aW._3
222-
223-let ba = aW._4
224-
225-let bb = aW._5
226-
227-let bc = aW._6
228-
229-let bd = aW._7
230-
231-func be () = split(ay(aE, ah()), l)
232-
233-
234-let bf = be()
235-
236-let bg = valueOrErrorMessage(addressFromString(bf[A]), "Invalid staking contract address")
237-
238-let bh = valueOrErrorMessage(addressFromString(bf[C]), "Invalid slipage contract address")
239-
240-let bi = valueOrErrorMessage(addressFromString(bf[D]), "Invalid gwx contract address")
241-
242-let bj = valueOrErrorMessage(addressFromString(bf[B]), "Invalid gwx contract address")
243-
244-func bk (bl,bm,bn,bo,bp,bq,br,bs,bt,bu) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt), toString(bu)], l)
245-
246-
247-func bv (bw,bx,by,bo,br,bs) = makeString(["%d%d%d%d%d%d", toString(bw), toString(bx), toString(by), toString(bo), toString(br), toString(bs)], l)
248-
249-
250-func bz (bA) = if ((bA == "WAVES"))
251- then wavesBalance(this).available
252- else assetBalance(this, fromBase58String(bA))
253-
254-
255-func bB (bC,bD) = fraction(bC, c, bD)
256-
257-
258-func bE (bF,bG,bH) = {
259- let bI = fraction((bF - bG), b, bG)
260- let bJ = ((bH - P(bI)) > d)
261- if (!(bJ))
262- then throw(("Big slpg: " + toString(bI)))
263- else $Tuple2(bJ, min([bF, bG]))
293+func bZ (ca,cb,cc) = {
294+ let bX = fraction(cb, b, ca)
295+ let cd = (cc > bX)
296+ if (if (cd)
297+ then true
298+ else (cb > ca))
299+ then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300+ else cd
264301 }
265302
266303
267-func bK (bL,bM,bN) = {
268- let bI = fraction(bM, b, bL)
269- let bO = (bN > bI)
270- if (if (bO)
271- then true
272- else (bM > bL))
273- then throw(((((((toString(bM) + " ") + toString(bL)) + " ") + toString(bI)) + " ") + toString(bN)))
274- else bO
304+func ce (cf,cg,ch,ci) = {
305+ let cj = H(ch, cf)
306+ let ck = H(ci, cg)
307+ bP(ck, cj)
275308 }
276309
277310
278-func bP (bQ,bR,bS,bT) = {
279- let bU = F(bS, bQ)
280- let bV = F(bT, bR)
281- bB(bV, bU)
311+func cl (ch,ci,cm) = {
312+ let cn = bo
313+ let co = bp
314+ let cp = ce(cn, co, ch, ci)
315+ let bR = H(ch, cn)
316+ let bQ = H(ci, co)
317+ let cq = H(cm, a)
318+ let cr = bP(bR, cq)
319+ let cs = bP(bQ, cq)
320+[cp, cr, cs]
282321 }
283322
284323
285-func bW (bS,bT,bX) = {
286- let bY = aM()
287- let bZ = parseIntValue(bY[w])
288- let ca = parseIntValue(bY[x])
289- let cb = bP(bZ, ca, bS, bT)
290- let bD = F(bS, bZ)
291- let bC = F(bT, ca)
292- let cc = F(bX, a)
293- let cd = bB(bD, cc)
294- let ce = bB(bC, cc)
295-[cb, cd, ce]
324+func ct (ch,ci,cm) = {
325+ let cu = cl(ch, ci, cm)
326+[L(cu[0], a), L(cu[1], a), L(cu[2], a)]
296327 }
297328
298329
299-func cf (bS,bT,bX) = {
300- let cg = bW(bS, bT, bX)
301-[I(cg[0], a), I(cg[1], a), I(cg[2], a)]
330+func cv (cw,ao) = {
331+ let cx = if ((ao == 0))
332+ then 0
333+ else fraction(cw, ao, a)
334+ $Tuple2((cw - cx), cx)
302335 }
303336
304337
305-func ch (ci,cj) = {
306- let ck = if ((cj == 0))
307- then 0
308- else fraction(ci, cj, a)
309- $Tuple2((ci - ck), ck)
310- }
338+func cy (cz) = {
339+ let cA = cz[0]
340+ let cB = cz[1]
341+ let cC = (cA + cB)
342+ if ((cC == e))
343+ then e
344+ else {
345+ let cD = parseIntValue(aU)
346+ let cE = (cD * 2)
347+ let cu = fraction(cA, cB, f)
348+ let cF = fraction(cu, i, f)
349+ let cG = fraction(toBigInt(cE), cC, f)
350+ let cH = toBigInt((cE - 1))
351+ func cI (cJ) = {
352+ let cK = fraction(cJ, cJ, f)
353+ let cL = fraction(cK, cJ, f)
354+ let cM = fraction(cL, f, cF)
355+ fraction((cG + fraction(cM, g, f)), cJ, (fraction(cH, cJ, f) + fraction(h, cM, f)))
356+ }
311357
358+ func cN (cO,cP) = if (cO._2)
359+ then cO
360+ else {
361+ let cJ = cO._1
362+ let cQ = cI(cJ)
363+ let cR = (cQ - value(cJ))
364+ let cS = if ((e > cR))
365+ then -(cR)
366+ else cR
367+ if ((f >= cS))
368+ then $Tuple2(cQ, true)
369+ else $Tuple2(cQ, false)
370+ }
312371
313-func cl (cm,cn,co,cp) = {
314- let bY = aM()
315- let cq = bY[t]
316- let cr = bY[u]
317- let cs = bY[v]
318- let ct = parseIntValue(bY[w])
319- let cu = parseIntValue(bY[x])
320- let cv = bY[s]
321- let cw = valueOrErrorMessage(assetInfo(fromBase58String(cq)), "Wrong LP id").quantity
322- if ((cq != cn))
323- then throw("Wrong pmt asset")
324- else {
325- let cx = bz(cr)
326- let cy = F(cx, ct)
327- let cz = bz(cs)
328- let cA = F(cz, cu)
329- let cB = bB(cA, cy)
330- let cC = I(cB, a)
331- let cD = F(co, a)
332- let cE = F(cw, a)
333- let cF = fraction(cy, cD, cE)
334- let cG = fraction(cA, cD, cE)
335- let cH = I(cF, ct)
336- let cI = I(cG, cu)
337- let cJ = if ((cm == ""))
338- then nil
339- else [ScriptTransfer(cp, cH, if ((cr == "WAVES"))
340- then unit
341- else fromBase58String(cr)), ScriptTransfer(cp, cI, if ((cs == "WAVES"))
342- then unit
343- else fromBase58String(cs)), StringEntry(ab(toString(cp), cm), bv(cH, cI, co, cC, height, lastBlock.timestamp)), IntegerEntry(U(), cC), IntegerEntry(V(height, lastBlock.timestamp), cC)]
344- $Tuple10(cH, cI, cr, cs, cx, cz, cw, cB, cv, cJ)
372+ let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
373+ let cU = {
374+ let cV = cT
375+ let cW = size(cV)
376+ let cX = $Tuple2(cC, false)
377+ func cY (cZ,da) = if ((da >= cW))
378+ then cZ
379+ else cN(cZ, cV[da])
380+
381+ func db (cZ,da) = if ((da >= cW))
382+ then cZ
383+ else throw("List size exceeds 15")
384+
385+ db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
386+ }
387+ let cJ = cU._1
388+ let dc = cU._2
389+ if (dc)
390+ then cJ
391+ else throw(("D calculation error, D = " + toString(cJ)))
345392 }
346393 }
347394
348395
349-func cK (cm,bH,cL,cM,cN,cO,cp,cP,cQ,cR,cS,cT,cU) = {
350- let bY = aM()
351- let cq = fromBase58String(bY[t])
352- let cV = bY[u]
353- let cW = bY[v]
354- let cX = bY[y]
355- let cY = bY[z]
356- let cZ = parseIntValue(bY[w])
357- let da = parseIntValue(bY[x])
358- let cv = bY[s]
359- let db = valueOrErrorMessage(assetInfo(cq), "Wr lp as").quantity
360- let cx = if (cP)
361- then bz(cV)
362- else if (if (cR)
363- then (cU == cV)
364- else false)
365- then (bz(cV) - cT)
366- else if (cR)
367- then bz(cV)
368- else (bz(cV) - cL)
369- let cz = if (cP)
370- then bz(cW)
371- else if (if (cR)
372- then (cU == cW)
373- else false)
374- then (bz(cW) - cT)
375- else if (cR)
376- then bz(cW)
377- else (bz(cW) - cN)
378- let dc = F(cL, cZ)
379- let dd = F(cN, da)
380- let de = bB(dd, dc)
381- let cy = F(cx, cZ)
382- let cA = F(cz, da)
383- let df = if ((db == 0))
384- then {
385- let cB = d
386- let dg = d
387- let cc = pow((dc * dd), 0, toBigInt(5), 1, 0, DOWN)
388- $Tuple5(I(cc, a), I(dc, cZ), I(dd, da), bB((cA + dd), (cy + dc)), dg)
389- }
396+func dd (de,df,dg,dh) = {
397+ let di = bl
398+ let dj = toBase58String(value(bm))
399+ let dk = toBase58String(value(bn))
400+ let dl = bo
401+ let dm = bp
402+ let dn = toString(bk)
403+ let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity
404+ if ((toBase58String(di) != df))
405+ then throw("Wrong pmt asset")
390406 else {
391- let cB = bB(cA, cy)
392- let dh = fraction(P((cB - de)), c, cB)
393- let dg = F(bH, a)
394- if (if (if (cS)
395- then (cB != d)
396- else false)
397- then (dh > dg)
398- else false)
399- then throw(((("Price slippage " + toString(dh)) + " > ") + toString(dg)))
400- else {
401- let di = F(db, a)
402- let dj = fraction(dc, cB, c)
403- let dk = fraction(dd, c, cB)
404- let dl = if ((dj > dd))
405- then $Tuple2(dk, dd)
406- else $Tuple2(dc, dj)
407- let dm = dl._1
408- let dn = dl._2
409- let cc = fraction(di, dn, cA)
410- $Tuple5(I(cc, a), I(dm, cZ), I(dn, da), cB, dg)
411- }
412- }
413- let do = df._1
414- let dp = df._2
415- let dq = df._3
416- let cC = I(df._4, a)
417- let dr = I(df._5, a)
418- if ((0 >= do))
419- then throw("LP <= 0")
420- else {
421- let ds = if (!(cQ))
422- then 0
423- else do
424- let dt = (cL - dp)
425- let du = (cN - dq)
426- let dv = if (if (cR)
427- then (cU == cV)
428- else false)
429- then $Tuple2(cT, 0)
430- else if (if (cR)
431- then (cU == cW)
432- else false)
433- then $Tuple2(0, cT)
434- else $Tuple2(dp, dq)
435- let dw = dv._1
436- let dx = dv._2
437- let dy = [IntegerEntry(U(), cC), IntegerEntry(V(height, lastBlock.timestamp), cC), StringEntry(Y(cp, cm), bk(dw, dx, ds, cC, bH, dr, height, lastBlock.timestamp, dt, du))]
438- $Tuple13(do, ds, cC, cx, cz, db, cq, cv, dy, dt, du, cM, cO)
407+ let dp = bN(dj)
408+ let dq = H(dp, dl)
409+ let dr = bN(dk)
410+ let ds = H(dr, dm)
411+ let dt = bP(ds, dq)
412+ let du = L(dt, a)
413+ let dv = H(dg, a)
414+ let dw = H(do, a)
415+ let dx = fraction(dq, dv, dw)
416+ let dy = fraction(ds, dv, dw)
417+ let dz = O(dx, dl, FLOOR)
418+ let dA = O(dy, dm, FLOOR)
419+ let dB = if ((de == ""))
420+ then nil
421+ else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
422+ then unit
423+ else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
424+ then unit
425+ else fromBase58String(dk)), StringEntry(ai(toString(dh), de), bJ(dz, dA, dg, du, height, lastBlock.timestamp)), IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du)]
426+ $Tuple10(dz, dA, dj, dk, dp, dr, do, dt, dn, dB)
439427 }
440428 }
441429
442430
443-func dz (dA) = {
444- let bY = aM()
445- let dB = bY[u]
446- let dC = bY[v]
447- let cv = parseIntValue(bY[s])
448- let bZ = parseIntValue(bY[w])
449- let ca = parseIntValue(bY[x])
450- let dD = bz(dB)
451- let dE = bz(dC)
452- let cB = if ((dA.orderType == Buy))
453- then bP(bZ, ca, (dD + dA.amount), dE)
454- else bP(bZ, ca, (dD - dA.amount), dE)
455- let cC = I(cB, a)
456- if (if (if (aJ())
457- then true
458- else (cv == p))
459- then true
460- else (cv == q))
461- then throw("Admin blocked")
431+func dC (de,bW,dD,dE,dF,dG,dh,dH,dI,dJ,dK,dL,dM) = {
432+ let di = bl
433+ let dN = toBase58String(value(bm))
434+ let dO = toBase58String(value(bn))
435+ let dP = bq
436+ let dQ = br
437+ let dR = bo
438+ let dS = bp
439+ let dn = toString(bk)
440+ let dT = valueOrErrorMessage(assetInfo(di), "Wr lp as").quantity
441+ let dp = if (dH)
442+ then bN(dN)
443+ else if (if (dJ)
444+ then (dM == dN)
445+ else false)
446+ then (bN(dN) - dL)
447+ else if (dJ)
448+ then bN(dN)
449+ else (bN(dN) - dD)
450+ let dr = if (dH)
451+ then bN(dO)
452+ else if (if (dJ)
453+ then (dM == dO)
454+ else false)
455+ then (bN(dO) - dL)
456+ else if (dJ)
457+ then bN(dO)
458+ else (bN(dO) - dF)
459+ let dU = H(dD, dR)
460+ let dV = H(dF, dS)
461+ let dW = bP(dV, dU)
462+ let dq = H(dp, dR)
463+ let ds = H(dr, dS)
464+ let cb = cy([dq, ds])
465+ let dX = if ((dT == 0))
466+ then {
467+ let ca = cy([(dq + dU), (ds + dV)])
468+ let dY = if ((ca > cb))
469+ then true
470+ else throw("D1 should be greater than D0")
471+ if ((dY == dY))
472+ then {
473+ let dt = d
474+ let dZ = d
475+ let cq = ca
476+ $Tuple5(L(cq, a), L(dU, dR), L(dV, dS), bP((ds + dV), (dq + dU)), dZ)
477+ }
478+ else throw("Strict value is not equal to itself.")
479+ }
462480 else {
463- let dF = dA.assetPair.amountAsset
464- let dG = if ((dF == unit))
465- then "WAVES"
466- else toBase58String(value(dF))
467- let dH = dA.assetPair.priceAsset
468- let dI = if ((dH == unit))
469- then "WAVES"
470- else toBase58String(value(dH))
471- if (if ((dG != dB))
472- then true
473- else (dI != dC))
474- then throw("Wr assets")
481+ let dt = bP(ds, dq)
482+ let ea = fraction(W((dt - dW)), c, dt)
483+ let dZ = H(bW, a)
484+ if (if (if (dK)
485+ then (dt != d)
486+ else false)
487+ then (ea > dZ)
488+ else false)
489+ then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
475490 else {
476- let dJ = dA.price
477- let da = fraction(a, ca, bZ)
478- let dK = L(dJ, a, da)
479- let dL = if ((dA.orderType == Buy))
480- then (cC >= dK)
481- else (dK >= cC)
482- true
491+ let eb = H(dT, a)
492+ let ec = fraction(dU, bS(ds, dq, CEILING), c, CEILING)
493+ let ed = fraction(dV, c, bS(ds, dq, FLOOR), CEILING)
494+ let ee = if ((ec > dV))
495+ then $Tuple2(ed, dV)
496+ else $Tuple2(dU, ec)
497+ let ef = ee._1
498+ let eg = ee._2
499+ let ca = cy([(dq + ef), (ds + eg)])
500+ let dY = if ((ca > cb))
501+ then true
502+ else throw("D1 should be greater than D0")
503+ if ((dY == dY))
504+ then {
505+ let cq = fraction(eb, (ca - cb), cb)
506+ $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ)
507+ }
508+ else throw("Strict value is not equal to itself.")
483509 }
510+ }
511+ let eh = dX._1
512+ let ei = dX._2
513+ let ej = dX._3
514+ let du = L(dX._4, a)
515+ let ek = L(dX._5, a)
516+ if ((0 >= eh))
517+ then throw("LP <= 0")
518+ else {
519+ let el = if (!(dI))
520+ then 0
521+ else eh
522+ let em = (dD - ei)
523+ let en = (dF - ej)
524+ let eo = if (if (dJ)
525+ then (dM == dN)
526+ else false)
527+ then $Tuple2(dL, 0)
528+ else if (if (dJ)
529+ then (dM == dO)
530+ else false)
531+ then $Tuple2(0, dL)
532+ else $Tuple2(ei, ej)
533+ let ep = eo._1
534+ let eq = eo._2
535+ let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, de), by(ep, eq, el, du, bW, ek, height, lastBlock.timestamp, em, en))]
536+ $Tuple13(eh, el, du, dp, dr, dT, di, dn, er, em, en, dE, dG)
484537 }
485538 }
486539
487540
488-func dM (dN) = if ((size(dN.payments) != 1))
541+func es (cz,cP,et) = {
542+ let eu = g
543+ let ev = cz[if ((cP == 0))
544+ then 1
545+ else 0]
546+ let ew = parseBigIntValue(l)
547+ let cD = (parseBigIntValue(aU) * ew)
548+ let cC = ev
549+ let cE = (cD * eu)
550+ let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
551+ let ey = ((cC + ((et * ew) / cE)) - et)
552+ func cN (cO,ez) = {
553+ let eA = cO
554+ let eB = eA._1
555+ let dc = eA._2
556+ if ((dc != unit))
557+ then cO
558+ else {
559+ let eC = (((eB * eB) + ex) / ((g * eB) + ey))
560+ let eD = X((eC - value(eB)))
561+ if ((f >= eD))
562+ then $Tuple2(eC, ez)
563+ else $Tuple2(eC, unit)
564+ }
565+ }
566+
567+ let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568+ let eE = {
569+ let cV = cT
570+ let cW = size(cV)
571+ let cX = $Tuple2(et, unit)
572+ func cY (cZ,da) = if ((da >= cW))
573+ then cZ
574+ else cN(cZ, cV[da])
575+
576+ func db (cZ,da) = if ((da >= cW))
577+ then cZ
578+ else throw("List size exceeds 15")
579+
580+ db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581+ }
582+ let eB = eE._1
583+ let dc = eE._2
584+ if ((dc != unit))
585+ then eB
586+ else throw(("Y calculation error, Y = " + toString(eB)))
587+ }
588+
589+
590+func eF (eG,eH,eI) = {
591+ let eJ = fraction(cy([K(eG, toBigInt(bo)), K(eH, toBigInt(bp))]), c, eI)
592+ if ((eI == e))
593+ then e
594+ else eJ
595+ }
596+
597+
598+func eK (eL,eM,eN) = {
599+ let eO = (toBigInt(bN(be(bm))) - eL)
600+ let eP = (toBigInt(bN(be(bn))) - eM)
601+ let eQ = (toBigInt(value(assetInfo(bl)).quantity) - eN)
602+ let eR = eF(eO, eP, eQ)
603+ eR
604+ }
605+
606+
607+func eS (eT,eU,eN) = {
608+ let eO = (bN(be(bm)) + eT)
609+ let eP = (bN(be(bn)) + eU)
610+ let eQ = (value(assetInfo(bl)).quantity + eN)
611+ let eJ = eF(toBigInt(eO), toBigInt(eP), toBigInt(eQ))
612+ let eV = [IntegerEntry(aq, height), StringEntry(ap, toString(eJ))]
613+ $Tuple2(eV, eJ)
614+ }
615+
616+
617+func eW (eX,eJ) = if ((eJ >= eX))
618+ then true
619+ else aN("updated DLp lower than current DLp")
620+
621+
622+func eY (eZ) = {
623+ let eO = bN(be(bm))
624+ let eP = bN(be(bn))
625+ let fa = eZ.amount
626+ let fb = fraction(eZ.amount, eZ.price, a, FLOOR)
627+ let fc = if ((eZ.orderType == Buy))
628+ then $Tuple2(fa, -(fb))
629+ else $Tuple2(-(fa), fb)
630+ let eT = fc._1
631+ let eU = fc._2
632+ if (if (if (aV())
633+ then true
634+ else (bk == r))
635+ then true
636+ else (bk == s))
637+ then throw("Admin blocked")
638+ else if (if ((eZ.assetPair.amountAsset != bm))
639+ then true
640+ else (eZ.assetPair.priceAsset != bn))
641+ then throw("Wr assets")
642+ else {
643+ let fd = parseBigIntValue(valueOrElse(getString(this, ap), "0"))
644+ let fe = eS(eT, eU, 0)
645+ let ff = fe._1
646+ let fg = fe._2
647+ let fh = (fg >= fd)
648+ let fi = makeString(["dLp=", toString(fd), " dLpNew=", toString(fg), " amountAssetBalance=", toString(eO), " priceAssetBalance=", toString(eP), " amountAssetBalanceDelta=", toString(eT), " priceAssetBalanceDelta=", toString(eU), " height=", toString(height)], "")
649+ $Tuple2(fh, fi)
650+ }
651+ }
652+
653+
654+func fj (cP) = if ((size(cP.payments) != 1))
489655 then throw("1 pmnt exp")
490656 else {
491- let dO = value(dN.payments[0])
492- let cn = value(dO.assetId)
493- let cT = dO.amount
494- let df = cl(toBase58String(dN.transactionId), toBase58String(cn), cT, dN.caller)
495- let cH = df._1
496- let cI = df._2
497- let cv = parseIntValue(df._9)
498- let cJ = df._10
499- if (if (aJ())
657+ let fk = value(cP.payments[0])
658+ let df = value(fk.assetId)
659+ let dL = fk.amount
660+ let dX = dd(toBase58String(cP.transactionId), toBase58String(df), dL, cP.caller)
661+ let dz = dX._1
662+ let dA = dX._2
663+ let dn = parseIntValue(dX._9)
664+ let dB = dX._10
665+ if (if (aV())
500666 then true
501- else (cv == q))
502- then throw(("Admin blocked: " + toString(cv)))
503- else $Tuple5(cH, cI, cT, cn, cJ)
667+ else (dn == s))
668+ then throw(("Admin blocked: " + toString(dn)))
669+ else $Tuple5(dz, dA, dL, df, dB)
504670 }
505671
506672
507-func dP (dQ,aa,dR,dS,bH,cQ,cR,cS,cT,cU) = {
508- let df = cK(aa, bH, value(dR).amount, value(dR).assetId, value(dS).amount, value(dS).assetId, dQ, (aa == ""), cQ, cR, cS, cT, cU)
509- let cv = parseIntValue(df._8)
510- if (if (if (aJ())
673+func fl (fm,ah,fn,fo,bW,dI,dJ,dK,dL,dM) = {
674+ let dX = dC(ah, bW, value(fn).amount, value(fn).assetId, value(fo).amount, value(fo).assetId, fm, (ah == ""), dI, dJ, dK, dL, dM)
675+ let dn = parseIntValue(dX._8)
676+ if (if (if (aV())
511677 then true
512- else (cv == o))
678+ else (dn == q))
513679 then true
514- else (cv == q))
515- then throw(("Blocked:" + toString(cv)))
516- else df
680+ else (dn == s))
681+ then throw(("Blocked:" + toString(dn)))
682+ else dX
517683 }
518684
519685
520-func dT (dU) = {
521- let dV = g
522- let dW = dU[0]
523- let dX = dU[1]
524- let dY = parseBigIntValue(j)
525- let dZ = (parseBigIntValue(aI) * dY)
526- let ea = (dW + dX)
527- if ((ea == e))
528- then e
529- else {
530- let eb = (dZ * dV)
531- let ec = (((dW * dX) * dV) * dV)
532- let ed = ((eb * ea) / dY)
533- let ee = (eb - dY)
534- let ef = (dV + f)
535- func eg (eh,ei) = {
536- let ej = eh
537- let ek = ej._1
538- let el = ej._2
539- if ((el != unit))
540- then eh
541- else {
542- let em = (((ek * ek) * ek) / ec)
543- let en = (((ed + (em * dV)) * ek) / (((ee * ek) / dY) + (ef * em)))
544- let eo = Q((en - value(ek)))
545- if ((f >= eo))
546- then $Tuple2(en, ei)
547- else $Tuple2(en, unit)
548- }
549- }
550-
551- let ep = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
552- let eq = {
553- let er = ep
554- let es = size(er)
555- let et = $Tuple2(ea, unit)
556- func eu (ev,ew) = if ((ew >= es))
557- then ev
558- else eg(ev, er[ew])
559-
560- func ex (ev,ew) = if ((ew >= es))
561- then ev
562- else throw("List size exceeds 25")
563-
564- ex(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(et, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25)
565- }
566- let ek = eq._1
567- let el = eq._2
568- if ((el != unit))
569- then ek
570- else throw(("D calculation error, D = " + toString(ek)))
571- }
572- }
573-
574-
575-func ey (dU,dN,ez) = {
576- let dV = g
577- let eA = dU[if ((dN == 0))
578- then 1
579- else 0]
580- let dY = parseBigIntValue(j)
581- let dZ = (parseBigIntValue(aI) * dY)
582- let ea = eA
583- let eb = (dZ * dV)
584- let eB = (((((ez * ez) / (eA * dV)) * ez) * dY) / (eb * dV))
585- let eC = ((ea + ((ez * dY) / eb)) - ez)
586- func eg (eh,ei) = {
587- let eD = eh
588- let eE = eD._1
589- let el = eD._2
590- if ((el != unit))
591- then eh
592- else {
593- let eF = (((eE * eE) + eB) / ((g * eE) + eC))
594- let eG = Q((eF - value(eE)))
595- if ((f >= eG))
596- then $Tuple2(eF, ei)
597- else $Tuple2(eF, unit)
598- }
599- }
600-
601- let ep = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
602- let eH = {
603- let er = ep
604- let es = size(er)
605- let et = $Tuple2(ez, unit)
606- func eu (ev,ew) = if ((ew >= es))
607- then ev
608- else eg(ev, er[ew])
609-
610- func ex (ev,ew) = if ((ew >= es))
611- then ev
612- else throw("List size exceeds 15")
613-
614- ex(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(et, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
615- }
616- let eE = eH._1
617- let el = eH._2
618- if ((el != unit))
619- then eE
620- else throw(("Y calculation error, Y = " + toString(eE)))
621- }
622-
623-
624-func eI (eJ,cn,cp,aa,eK) = {
625- let aU = aM()
626- let cr = aU[u]
627- let cs = aU[v]
628- let cq = aU[t]
629- let cZ = parseIntValue(aU[w])
630- let da = parseIntValue(aU[x])
631- let eL = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cq)), "invalid lp asset").quantity)
632- let eM = if ((eL > e))
686+func fp (fq,df,dh,ah,fr) = {
687+ let dj = toBase58String(value(bm))
688+ let dk = toBase58String(value(bn))
689+ let di = bl
690+ let dR = bo
691+ let dS = bp
692+ let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity)
693+ let fs = if ((eQ > e))
633694 then true
634695 else throw("initial deposit requires all coins")
635- if ((eM == eM))
696+ if ((fs == fs))
636697 then {
637- let cx = bz(cr)
638- let cz = bz(cs)
639- let eN = if ((aa == ""))
640- then $Tuple2(cx, cz)
641- else if ((cn == cr))
642- then if ((eJ > cx))
698+ let dp = bN(dj)
699+ let dr = bN(dk)
700+ let ft = if ((ah == ""))
701+ then $Tuple2(dp, dr)
702+ else if ((df == dj))
703+ then if ((fq > dp))
643704 then throw("invalid payment amount")
644- else $Tuple2((cx - eJ), cz)
645- else if ((cn == cs))
646- then if ((eJ > cz))
705+ else $Tuple2((dp - fq), dr)
706+ else if ((df == dk))
707+ then if ((fq > dr))
647708 then throw("invalid payment amount")
648- else $Tuple2(cx, (cz - eJ))
709+ else $Tuple2(dp, (dr - fq))
649710 else throw("wrong pmtAssetId")
650- let eO = eN._1
651- let eP = eN._2
652- let eQ = if ((cn == cr))
653- then $Tuple2(eJ, 0)
654- else if ((cn == cs))
655- then $Tuple2(0, eJ)
711+ let fu = ft._1
712+ let fv = ft._2
713+ let fw = if ((df == dj))
714+ then $Tuple2(fq, 0)
715+ else if ((df == dk))
716+ then $Tuple2(0, fq)
656717 else throw("invalid payment")
657- let eR = eQ._1
658- let eS = eQ._2
659- let eT = if (eK)
660- then $Tuple3(ch(eR, aF)._1, ch(eS, aF)._1, ch(eJ, aF)._2)
661- else $Tuple3(eR, eS, 0)
662- let eU = eT._1
663- let eV = eT._2
664- let ck = eT._3
665- let eW = (eO + eU)
666- let eX = (eP + eV)
667- let bM = dT([toBigInt(eO), toBigInt(eP)])
668- let bL = dT([toBigInt(eW), toBigInt(eX)])
669- let eY = if ((bL > bM))
718+ let fx = fw._1
719+ let fy = fw._2
720+ let fz = if (fr)
721+ then $Tuple3(cv(fx, aR)._1, cv(fy, aR)._1, cv(fq, aR)._2)
722+ else $Tuple3(fx, fy, 0)
723+ let fA = fz._1
724+ let fB = fz._2
725+ let cx = fz._3
726+ let fC = (fu + fA)
727+ let fD = (fv + fB)
728+ let cb = cy([H(fu, bo), H(fv, bp)])
729+ let ca = cy([H(fC, bo), H(fD, bp)])
730+ let dY = if ((ca > cb))
670731 then true
671732 else throw()
672- if ((eY == eY))
733+ if ((dY == dY))
673734 then {
674- let eZ = fraction(eL, (bL - bM), bM)
675- let cC = I(bB(F(eX, da), F(eW, cZ)), a)
676- let dy = [IntegerEntry(U(), cC), IntegerEntry(V(height, lastBlock.timestamp), cC), StringEntry(Y(cp, aa), bk(eR, eS, toInt(eZ), cC, 0, 0, height, lastBlock.timestamp, 0, 0))]
677- let fa = fraction(eP, a, eO)
678- let fb = fraction(eJ, a, (fa + a))
679- let fc = (eJ - fb)
680- let fd = fraction(eL, toBigInt(fc), toBigInt(eP))
681- let fe = toInt(fraction((eZ - fd), b, fd))
682- $Tuple4(toInt(eZ), dy, ck, fe)
735+ let fE = fraction(eQ, (ca - cb), cb, FLOOR)
736+ let du = L(bP(H(fD, dS), H(fC, dR)), a)
737+ let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, ah), by(fx, fy, toInt(fE), du, 0, 0, height, lastBlock.timestamp, 0, 0))]
738+ let fF = fraction(fv, a, fu)
739+ let fG = fraction(fq, a, (fF + a))
740+ let fH = (fq - fG)
741+ let fI = fraction(eQ, toBigInt(fH), toBigInt(fv))
742+ let fJ = toInt(fraction((fE - fI), b, fI))
743+ $Tuple4(toInt(fE), er, cx, fJ)
683744 }
684745 else throw("Strict value is not equal to itself.")
685746 }
686747 else throw("Strict value is not equal to itself.")
687748 }
688749
689750
690-func ff (fg,fh,fi,dQ,fj,fk) = {
691- let aU = aM()
692- let cq = aU[t]
693- let cr = aU[u]
694- let cs = aU[v]
695- let fl = parseIntValue(aU[w])
696- let fm = parseIntValue(aU[x])
697- let fn = aU[s]
698- let cp = if ((dQ == bj))
699- then fj
700- else dQ
701- let dO = value(fi[0])
702- let cn = value(dO.assetId)
703- let cT = dO.amount
704- let cm = toBase58String(fk)
705- if ((cq != toBase58String(cn)))
706- then throw("Wrong LP")
707- else {
708- let cx = bz(cr)
709- let cz = bz(cs)
710- let fo = {
711- let aG = invoke(this, "getOneTknV2READONLY", [fg, cT], nil)
712- if ($isInstanceOf(aG, "(Int, Int)"))
713- then aG
714- else throw(($getType(aG) + " couldn't be cast to (Int, Int)"))
715- }
716- if ((fo == fo))
717- then {
718- let ck = fo._2
719- let fp = fo._1
720- let fq = if (if ((fh > 0))
721- then (fh > fp)
722- else false)
723- then aC(makeString(["amount to receive is less than ", toString(fh)], ""))
724- else fp
725- let fr = if ((fg == cr))
726- then $Tuple4(fq, 0, ((cx - fq) - ck), cz)
727- else if ((fg == cs))
728- then $Tuple4(0, fq, cx, ((cz - fq) - ck))
729- else throw("invalid out asset id")
730- let fs = fr._1
731- let ft = fr._2
732- let eW = fr._3
733- let eX = fr._4
734- let fu = bB(F(eX, fm), F(eW, fl))
735- let fv = I(fu, a)
736- let fw = if ((fg == "WAVES"))
737- then unit
738- else fromBase58String(fg)
739- let fx = if ((ck > 0))
740- then [ScriptTransfer(aL, ck, fw)]
741- else nil
742- let cJ = ([ScriptTransfer(cp, fq, fw), StringEntry(ab(toString(cp), cm), bv(fs, ft, cT, fv, height, lastBlock.timestamp)), IntegerEntry(U(), fv), IntegerEntry(V(height, lastBlock.timestamp), fv)] ++ fx)
743- if ((cJ == cJ))
751+func fK (fL,fM,fN,fm,fO,fP) = {
752+ let di = toBase58String(value(bl))
753+ let dj = toBase58String(value(bm))
754+ let dk = toBase58String(value(bn))
755+ let fQ = bo
756+ let fR = bp
757+ let fS = bk
758+ let dh = if ((fm == bx))
759+ then fO
760+ else fm
761+ let fk = value(fN[0])
762+ let df = value(fk.assetId)
763+ let dL = fk.amount
764+ let eR = eK(e, e, e)
765+ if ((eR == eR))
766+ then {
767+ let de = toBase58String(fP)
768+ if ((di != toBase58String(df)))
769+ then throw("Wrong LP")
770+ else {
771+ let dp = bN(dj)
772+ let dr = bN(dk)
773+ let fT = {
774+ let aS = invoke(this, "getOneTknV2READONLY", [fL, dL], nil)
775+ if ($isInstanceOf(aS, "(Int, Int)"))
776+ then aS
777+ else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
778+ }
779+ if ((fT == fT))
744780 then {
745- let fy = invoke(aE, "burn", [cT], [AttachedPayment(cn, cT)])
746- if ((fy == fy))
747- then $Tuple2(cJ, fq)
781+ let cx = fT._2
782+ let fU = fT._1
783+ let fV = if (if ((fM > 0))
784+ then (fM > fU)
785+ else false)
786+ then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
787+ else fU
788+ let fW = if ((fL == dj))
789+ then $Tuple4(fV, 0, ((dp - fV) - cx), dr)
790+ else if ((fL == dk))
791+ then $Tuple4(0, fV, dp, ((dr - fV) - cx))
792+ else throw("invalid out asset id")
793+ let fX = fW._1
794+ let fY = fW._2
795+ let fC = fW._3
796+ let fD = fW._4
797+ let fZ = bP(H(fD, fR), H(fC, fQ))
798+ let ga = L(fZ, a)
799+ let gb = if ((fL == "WAVES"))
800+ then unit
801+ else fromBase58String(fL)
802+ let gc = if ((cx > 0))
803+ then [ScriptTransfer(aX, cx, gb)]
804+ else nil
805+ let dB = ([ScriptTransfer(dh, fV, gb), StringEntry(ai(toString(dh), de), bJ(fX, fY, dL, ga, height, lastBlock.timestamp)), IntegerEntry(ab(), ga), IntegerEntry(ac(height, lastBlock.timestamp), ga)] ++ gc)
806+ if ((dB == dB))
807+ then {
808+ let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809+ if ((gd == gd))
810+ then {
811+ let ge = {
812+ let gf = if ((this == aX))
813+ then 0
814+ else cx
815+ let gg = if ((bc(fL) == bm))
816+ then true
817+ else false
818+ if (gg)
819+ then $Tuple2(-((fU + gf)), 0)
820+ else $Tuple2(0, -((fU + gf)))
821+ }
822+ let eT = ge._1
823+ let eU = ge._2
824+ let gh = eS(eT, eU, 0)
825+ let gi = gh._1
826+ let eJ = gh._2
827+ let gj = eW(eR, eJ)
828+ if ((gj == gj))
829+ then $Tuple2((dB ++ gi), fV)
830+ else throw("Strict value is not equal to itself.")
831+ }
832+ else throw("Strict value is not equal to itself.")
833+ }
748834 else throw("Strict value is not equal to itself.")
749835 }
750836 else throw("Strict value is not equal to itself.")
751837 }
752- else throw("Strict value is not equal to itself.")
753838 }
839+ else throw("Strict value is not equal to itself.")
754840 }
755841
756842
757-func fz () = {
758- let aw = getString(S())
759- if ($isInstanceOf(aw, "String"))
843+func gk () = {
844+ let gl = getString(Z())
845+ if ($isInstanceOf(gl, "String"))
760846 then {
761- let ea = aw
762- fromBase58String(ea)
847+ let cC = gl
848+ fromBase58String(cC)
763849 }
764- else if ($isInstanceOf(aw, "Unit"))
850+ else if ($isInstanceOf(gl, "Unit"))
765851 then unit
766852 else throw("Match error")
767853 }
768854
769855
770-func fA () = {
771- let aw = getString(T())
772- if ($isInstanceOf(aw, "String"))
856+func gm () = {
857+ let gl = getString(aa())
858+ if ($isInstanceOf(gl, "String"))
773859 then {
774- let ea = aw
775- fromBase58String(ea)
860+ let cC = gl
861+ fromBase58String(cC)
776862 }
777- else if ($isInstanceOf(aw, "Unit"))
863+ else if ($isInstanceOf(gl, "Unit"))
778864 then unit
779865 else throw("Match error")
780866 }
781867
782868
783-let fB = throw("Permission denied")
869+let gn = throw("Permission denied")
784870
785-func fC (dN) = {
786- let aw = fz()
787- if ($isInstanceOf(aw, "ByteVector"))
871+func go (cP) = {
872+ let gl = gk()
873+ if ($isInstanceOf(gl, "ByteVector"))
788874 then {
789- let fD = aw
790- (dN.callerPublicKey == fD)
875+ let gp = gl
876+ (cP.callerPublicKey == gp)
791877 }
792- else if ($isInstanceOf(aw, "Unit"))
793- then (dN.caller == this)
878+ else if ($isInstanceOf(gl, "Unit"))
879+ then (cP.caller == this)
794880 else throw("Match error")
795881 }
796882
797883
798-func fE (dN) = {
799- let aw = fz()
800- if ($isInstanceOf(aw, "ByteVector"))
884+func gq (cP) = {
885+ let gl = gk()
886+ if ($isInstanceOf(gl, "ByteVector"))
801887 then {
802- let fD = aw
803- if ((dN.callerPublicKey == fD))
888+ let gp = gl
889+ if ((cP.callerPublicKey == gp))
804890 then true
805- else fB
891+ else gn
806892 }
807- else if ($isInstanceOf(aw, "Unit"))
808- then if ((dN.caller == this))
893+ else if ($isInstanceOf(gl, "Unit"))
894+ then if ((cP.caller == this))
809895 then true
810- else fB
896+ else gn
811897 else throw("Match error")
812898 }
813899
814900
815-func fF (fG,ez,fH) = {
816- let aU = aM()
817- let cr = aU[u]
818- let cs = aU[v]
819- let dV = g
820- let dY = parseBigIntValue(j)
821- let dZ = (parseBigIntValue(aI) * dY)
822- let dU = if ((fG == false))
823- then [(toBigInt(bz(cr)) + fH), toBigInt(bz(cs))]
824- else [(toBigInt(bz(cs)) + fH), toBigInt(bz(cr))]
825- let eA = dU[0]
826- let ea = eA
827- let eb = (dZ * dV)
828- let eB = (((((ez * ez) / (eA * dV)) * ez) * dY) / (eb * dV))
829- let eC = ((ea + ((ez * dY) / eb)) - ez)
830- func eg (eh,ei) = {
831- let fI = eh
832- let eE = fI._1
833- let el = fI._2
834- if ((el != unit))
835- then eh
836- else {
837- let eF = (((eE * eE) + eB) / ((g * eE) + eC))
838- let eG = Q((eF - value(eE)))
839- if ((f >= eG))
840- then $Tuple2(eF, ei)
841- else $Tuple2(eF, unit)
842- }
843- }
844-
845- let ep = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
846- let fJ = {
847- let er = ep
848- let es = size(er)
849- let et = $Tuple2(ez, unit)
850- func eu (ev,ew) = if ((ew >= es))
851- then ev
852- else eg(ev, er[ew])
853-
854- func ex (ev,ew) = if ((ew >= es))
855- then ev
856- else throw("List size exceeds 15")
857-
858- ex(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(eu(et, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
859- }
860- let eE = fJ._1
861- let el = fJ._2
862- if ((el != unit))
863- then eE
864- else throw(("Y calculation error, Y = " + toString(eE)))
865- }
866-
867-
868-@Callable(dN)
869-func calculateAmountOutForSwapREADONLY (fK,fG) = {
870- let fL = if ((fG == false))
871- then {
872- let fM = ay(this, ad())
873- let fH = (toBigInt(bz(ay(this, ac()))) + toBigInt(fK))
874- $Tuple2(fM, fH)
875- }
876- else {
877- let fM = ay(this, ac())
878- let fH = (toBigInt(bz(ay(this, ad()))) + toBigInt(fK))
879- $Tuple2(fM, fH)
880- }
881- let fM = fL._1
882- let fH = fL._2
883- let aU = aM()
884- let cr = aU[u]
885- let cs = aU[v]
886- let dU = [toBigInt(bz(cr)), toBigInt(bz(cs))]
887- let ez = dT(dU)
888- let eE = fF(fG, ez, toBigInt(fK))
889- let fN = ((toBigInt(bz(fM)) - eE) - toBigInt(1))
890- let fO = max([0, toInt(fN)])
891- let fP = if ((fG == false))
892- then [(toBigInt(bz(cr)) + toBigInt(fK)), (toBigInt(bz(cs)) - fN)]
893- else [(toBigInt(bz(cr)) - fN), (toBigInt(bz(cs)) + toBigInt(fK))]
894- let fQ = dT(fP)
895- let eY = if ((fQ >= ez))
896- then true
897- else throw(makeString(["new D is fewer error", toString(ez), toString(fQ)], "__"))
898- if ((eY == eY))
899- then $Tuple2(nil, fO)
901+@Callable(cP)
902+func constructor (Y) = {
903+ let ex = gq(cP)
904+ if ((ex == ex))
905+ then [StringEntry(Y(), Y)]
900906 else throw("Strict value is not equal to itself.")
901907 }
902908
903909
904910
905-@Callable(dN)
906-func calculateAmountOutForSwapAndSendTokens (fK,fG,fR,fS) = {
907- let fT = [if ((value(dN.payments[0]).amount >= fK))
908- then true
909- else aC("Wrong amount"), if ((dN.caller == addressFromStringValue(ay(this, ag()))))
910- then true
911- else aC("Permission denied")]
912- if ((fT == fT))
911+@Callable(cP)
912+func setManager (gr) = {
913+ let ex = gq(cP)
914+ if ((ex == ex))
913915 then {
914- let dO = value(dN.payments[0])
915- let fU = if ((dO.assetId == unit))
916- then toBase58String(toBytes("WAVES"))
917- else toBase58String(value(dO.assetId))
918- let fV = if ((fG == false))
919- then {
920- let fM = ay(this, ad())
921- let fH = (bz(fU) - value(dN.payments[0]).amount)
922- $Tuple2(fM, fH)
923- }
924- else {
925- let fM = ay(this, ac())
926- let fH = (bz(fU) - value(dN.payments[0]).amount)
927- $Tuple2(fM, fH)
928- }
929- let fM = fV._1
930- let fH = fV._2
931- let aU = aM()
932- let cr = aU[u]
933- let cs = aU[v]
934- let dU = if ((fG == false))
935- then [(toBigInt(bz(cr)) - toBigInt(value(dN.payments[0]).amount)), toBigInt(bz(cs))]
936- else [toBigInt(bz(cr)), (toBigInt(bz(cs)) - toBigInt(value(dN.payments[0]).amount))]
937- let ez = dT(dU)
938- let eE = fF(fG, ez, toBigInt(0))
939- let fN = ((toBigInt(bz(fM)) - eE) - toBigInt(1))
940- let fO = max([0, toInt(fN)])
941- let fW = if ((fO >= fR))
942- then true
943- else throw("Exchange result is fewer coins than expected")
944- if ((fW == fW))
945- then {
946- let fP = if ((fG == false))
947- then [toBigInt(bz(cr)), (toBigInt(bz(cs)) - fN)]
948- else [(toBigInt(bz(cr)) - fN), toBigInt(bz(cs))]
949- let fQ = dT(fP)
950- let eY = if ((fQ >= ez))
951- then true
952- else throw("new D is fewer error")
953- if ((eY == eY))
954- then [ScriptTransfer(addressFromStringValue(fS), fO, if ((fU == "WAVES"))
955- then unit
956- else fromBase58String(fM))]
957- else throw("Strict value is not equal to itself.")
958- }
916+ let gs = fromBase58String(gr)
917+ if ((gs == gs))
918+ then [StringEntry(aa(), gr)]
959919 else throw("Strict value is not equal to itself.")
960920 }
961921 else throw("Strict value is not equal to itself.")
962922 }
963923
964924
965925
966-@Callable(dN)
967-func constructor (R) = {
968- let eB = fE(dN)
969- if ((eB == eB))
970- then [StringEntry(R(), R)]
971- else throw("Strict value is not equal to itself.")
972- }
973-
974-
975-
976-@Callable(dN)
977-func setManager (fX) = {
978- let eB = fE(dN)
979- if ((eB == eB))
926+@Callable(cP)
927+func confirmManager () = {
928+ let cu = gm()
929+ let gt = if (isDefined(cu))
930+ then true
931+ else throw("No pending manager")
932+ if ((gt == gt))
980933 then {
981- let fY = fromBase58String(fX)
982- if ((fY == fY))
983- then [StringEntry(T(), fX)]
934+ let gu = if ((cP.callerPublicKey == value(cu)))
935+ then true
936+ else throw("You are not pending manager")
937+ if ((gu == gu))
938+ then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
984939 else throw("Strict value is not equal to itself.")
985940 }
986941 else throw("Strict value is not equal to itself.")
987942 }
988943
989944
990945
991-@Callable(dN)
992-func confirmManager () = {
993- let cg = fA()
994- let fZ = if (isDefined(cg))
995- then true
996- else throw("No pending manager")
997- if ((fZ == fZ))
998- then {
999- let ga = if ((dN.callerPublicKey == value(cg)))
1000- then true
1001- else throw("You are not pending manager")
1002- if ((ga == ga))
1003- then [StringEntry(S(), toBase58String(value(cg))), DeleteEntry(T())]
1004- else throw("Strict value is not equal to itself.")
1005- }
1006- else throw("Strict value is not equal to itself.")
1007- }
1008-
1009-
1010-
1011-@Callable(dN)
1012-func put (gb,gc) = {
1013- let gd = be()
1014- let ge = valueOrErrorMessage(addressFromString(gd[A]), "Wr st addr")
1015- let gf = valueOrErrorMessage(addressFromString(gd[C]), "Wr sl addr")
1016- if ((0 > gb))
946+@Callable(cP)
947+func put (gv,gw) = {
948+ let gx = bs()
949+ let gy = valueOrErrorMessage(addressFromString(gx[C]), "Wr st addr")
950+ let gz = valueOrErrorMessage(addressFromString(gx[E]), "Wr sl addr")
951+ if ((0 > gv))
1017952 then throw("Wrong slippage")
1018- else if ((size(dN.payments) != 2))
953+ else if ((size(cP.payments) != 2))
1019954 then throw("2 pmnts expd")
1020955 else {
1021- let gg = dP(toString(dN.caller), toBase58String(dN.transactionId), AttachedPayment(value(dN.payments[0]).assetId, value(dN.payments[0]).amount), dN.payments[1], gb, true, false, true, 0, "")
1022- let ds = gg._2
1023- let gh = gg._7
1024- let cJ = gg._9
1025- let dt = gg._10
1026- let du = gg._11
1027- let cr = gg._12
1028- let cs = gg._13
1029- let df = invoke(aE, "emit", [ds], nil)
1030- if ((df == df))
956+ let gA = toBigInt(value(cP.payments[0]).amount)
957+ let gB = toBigInt(value(cP.payments[1]).amount)
958+ let eO = (toBigInt(bN(be(bm))) - gA)
959+ if ((eO == eO))
1031960 then {
1032- let gi = {
1033- let aw = df
1034- if ($isInstanceOf(aw, "Address"))
1035- then {
1036- let gj = aw
1037- invoke(gj, "emit", [ds], nil)
1038- }
1039- else unit
1040- }
1041- if ((gi == gi))
961+ let eP = (toBigInt(bN(be(bn))) - gB)
962+ if ((eP == eP))
1042963 then {
1043- let gk = if ((dt > 0))
1044- then invoke(gf, "put", nil, [AttachedPayment(cr, dt)])
1045- else nil
1046- if ((gk == gk))
964+ let eQ = toBigInt(value(assetInfo(bl)).quantity)
965+ if ((eQ == eQ))
1047966 then {
1048- let gl = if ((du > 0))
1049- then invoke(gf, "put", nil, [AttachedPayment(cs, du)])
1050- else nil
1051- if ((gl == gl))
967+ let eR = eK(gA, gB, toBigInt(0))
968+ if ((eR == eR))
1052969 then {
1053- let gm = if (gc)
970+ let gC = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gv, true, false, true, 0, "")
971+ let el = gC._2
972+ let gD = gC._7
973+ let dB = gC._9
974+ let em = gC._10
975+ let en = gC._11
976+ let dj = gC._12
977+ let dk = gC._13
978+ let dX = invoke(aQ, "emit", [el], nil)
979+ if ((dX == dX))
1054980 then {
1055- let gn = invoke(ge, "stake", nil, [AttachedPayment(gh, ds)])
1056- if ((gn == gn))
1057- then nil
981+ let gE = {
982+ let gl = dX
983+ if ($isInstanceOf(gl, "Address"))
984+ then {
985+ let gF = gl
986+ invoke(gF, "emit", [el], nil)
987+ }
988+ else unit
989+ }
990+ if ((gE == gE))
991+ then {
992+ let gG = if ((em > 0))
993+ then invoke(gz, "put", nil, [AttachedPayment(dj, em)])
994+ else nil
995+ if ((gG == gG))
996+ then {
997+ let gH = if ((en > 0))
998+ then invoke(gz, "put", nil, [AttachedPayment(dk, en)])
999+ else nil
1000+ if ((gH == gH))
1001+ then {
1002+ let gI = if (gw)
1003+ then {
1004+ let gJ = invoke(gy, "stake", nil, [AttachedPayment(gD, el)])
1005+ if ((gJ == gJ))
1006+ then nil
1007+ else throw("Strict value is not equal to itself.")
1008+ }
1009+ else [ScriptTransfer(cP.caller, el, gD)]
1010+ let gK = eS(0, 0, 0)
1011+ let gi = gK._1
1012+ let eJ = gK._2
1013+ let gL = if ((eJ >= eR))
1014+ then true
1015+ else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " "))
1016+ if ((gL == gL))
1017+ then {
1018+ let gM = value(assetInfo(bl)).quantity
1019+ if ((gM == gM))
1020+ then ((dB ++ gI) ++ gi)
1021+ else throw("Strict value is not equal to itself.")
1022+ }
1023+ else throw("Strict value is not equal to itself.")
1024+ }
1025+ else throw("Strict value is not equal to itself.")
1026+ }
1027+ else throw("Strict value is not equal to itself.")
1028+ }
10581029 else throw("Strict value is not equal to itself.")
10591030 }
1060- else [ScriptTransfer(dN.caller, ds, gh)]
1061- (cJ ++ gm)
1031+ else throw("Strict value is not equal to itself.")
10621032 }
10631033 else throw("Strict value is not equal to itself.")
10641034 }
10651035 else throw("Strict value is not equal to itself.")
10661036 }
10671037 else throw("Strict value is not equal to itself.")
10681038 }
10691039 else throw("Strict value is not equal to itself.")
10701040 }
10711041 }
10721042
10731043
10741044
1075-@Callable(dN)
1076-func putOneTknV2 (fh,gc) = {
1077- let go = {
1078- let aG = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1079- if ($isInstanceOf(aG, "Boolean"))
1080- then aG
1081- else throw(($getType(aG) + " couldn't be cast to Boolean"))
1045+@Callable(cP)
1046+func putOneTknV2 (fM,gw) = {
1047+ let gN = {
1048+ let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1049+ if ($isInstanceOf(aS, "Boolean"))
1050+ then aS
1051+ else throw(($getType(aS) + " couldn't be cast to Boolean"))
10821052 }
1083- let gp = if (if (if (aJ())
1053+ let gO = if (if (if (aV())
10841054 then true
1085- else (aY == o))
1055+ else (bk == q))
10861056 then true
1087- else (aY == q))
1057+ else (bk == s))
10881058 then true
1089- else go
1090- let fT = [if (if (!(gp))
1059+ else gN
1060+ let gP = [if (if (!(gO))
10911061 then true
1092- else fC(dN))
1062+ else go(cP))
10931063 then true
1094- else aC("put operation is blocked by admin"), if ((size(dN.payments) == 1))
1064+ else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
10951065 then true
1096- else aC("exactly 1 payment are expected")]
1097- if ((fT == fT))
1066+ else aN("exactly 1 payment are expected")]
1067+ if ((gP == gP))
10981068 then {
1099- let aU = aM()
1100- let cr = aU[u]
1101- let cs = aU[v]
1102- let cq = fromBase58String(aU[t])
1103- let fl = parseIntValue(aU[w])
1104- let fm = parseIntValue(aU[x])
1105- let cp = if ((dN.caller == this))
1106- then dN.originCaller
1107- else dN.caller
1108- let dO = value(dN.payments[0])
1109- let cn = toBase58String(value(dO.assetId))
1110- let cT = dO.amount
1111- let gq = eI(cT, cn, toString(cp), toBase58String(dN.transactionId), true)
1112- if ((gq == gq))
1069+ let dj = toBase58String(value(bm))
1070+ let dk = toBase58String(value(bn))
1071+ let di = bl
1072+ let fQ = bo
1073+ let fR = bp
1074+ let dh = if ((cP.caller == this))
1075+ then cP.originCaller
1076+ else cP.caller
1077+ let fk = value(cP.payments[0])
1078+ let df = toBase58String(value(fk.assetId))
1079+ let dL = fk.amount
1080+ let eR = if ((fk.assetId == bm))
1081+ then eK(toBigInt(dL), toBigInt(0), toBigInt(0))
1082+ else eK(toBigInt(0), toBigInt(dL), toBigInt(0))
1083+ if ((eR == eR))
11131084 then {
1114- let ck = gq._3
1115- let cJ = gq._2
1116- let gr = gq._1
1117- let ds = if (if ((fh > 0))
1118- then (fh > gr)
1119- else false)
1120- then aC(makeString(["amount to receive is less than ", toString(fh)], ""))
1121- else gr
1122- let gg = invoke(aE, "emit", [ds], nil)
1123- if ((gg == gg))
1085+ let gQ = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1086+ if ((gQ == gQ))
11241087 then {
1125- let gi = {
1126- let aw = gg
1127- if ($isInstanceOf(aw, "Address"))
1128- then {
1129- let gj = aw
1130- invoke(gj, "emit", [ds], nil)
1088+ let cx = gQ._3
1089+ let dB = gQ._2
1090+ let gR = gQ._1
1091+ let el = if (if ((fM > 0))
1092+ then (fM > gR)
1093+ else false)
1094+ then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
1095+ else gR
1096+ let gC = invoke(aQ, "emit", [el], nil)
1097+ if ((gC == gC))
1098+ then {
1099+ let gE = {
1100+ let gl = gC
1101+ if ($isInstanceOf(gl, "Address"))
1102+ then {
1103+ let gF = gl
1104+ invoke(gF, "emit", [el], nil)
1105+ }
1106+ else unit
11311107 }
1132- else unit
1133- }
1134- if ((gi == gi))
1135- then {
1136- let gm = if (gc)
1108+ if ((gE == gE))
11371109 then {
1138- let gn = invoke(bg, "stake", nil, [AttachedPayment(cq, ds)])
1139- if ((gn == gn))
1140- then nil
1110+ let gI = if (gw)
1111+ then {
1112+ let gJ = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1113+ if ((gJ == gJ))
1114+ then nil
1115+ else throw("Strict value is not equal to itself.")
1116+ }
1117+ else [ScriptTransfer(cP.caller, el, di)]
1118+ let gc = if ((cx > 0))
1119+ then [ScriptTransfer(aX, cx, fromBase58String(df))]
1120+ else nil
1121+ let gS = if ((this == aX))
1122+ then $Tuple2(0, 0)
1123+ else {
1124+ let gT = if ((fk.assetId == bm))
1125+ then true
1126+ else false
1127+ if (gT)
1128+ then $Tuple2(-(cx), 0)
1129+ else $Tuple2(0, -(cx))
1130+ }
1131+ let eT = gS._1
1132+ let eU = gS._2
1133+ let gU = eS(eT, eU, 0)
1134+ let gi = gU._1
1135+ let eJ = gU._2
1136+ let gj = eW(eR, eJ)
1137+ if ((gj == gj))
1138+ then $Tuple2((((dB ++ gI) ++ gc) ++ gi), el)
11411139 else throw("Strict value is not equal to itself.")
11421140 }
1143- else [ScriptTransfer(dN.caller, ds, cq)]
1144- let fx = if ((ck > 0))
1145- then [ScriptTransfer(aL, ck, fromBase58String(cn))]
1146- else nil
1147- $Tuple2(((cJ ++ gm) ++ fx), ds)
1141+ else throw("Strict value is not equal to itself.")
11481142 }
11491143 else throw("Strict value is not equal to itself.")
11501144 }
11511145 else throw("Strict value is not equal to itself.")
11521146 }
11531147 else throw("Strict value is not equal to itself.")
11541148 }
11551149 else throw("Strict value is not equal to itself.")
11561150 }
11571151
11581152
11591153
1160-@Callable(dN)
1161-func putForFree (gs) = if ((0 > gs))
1154+@Callable(cP)
1155+func putForFree (gV) = if ((0 > gV))
11621156 then throw("Wrong slpg")
1163- else if ((size(dN.payments) != 2))
1157+ else if ((size(cP.payments) != 2))
11641158 then throw("2 pmnts expd")
11651159 else {
1166- let gt = dP(toString(dN.caller), toBase58String(dN.transactionId), AttachedPayment(value(dN.payments[0]).assetId, value(dN.payments[0]).amount), dN.payments[1], gs, false, false, true, 0, "")
1167- gt._9
1160+ let gW = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gV, false, false, true, 0, "")
1161+ let dB = gW._9
1162+ let gA = toBigInt(value(cP.payments[0]).amount)
1163+ let gB = toBigInt(value(cP.payments[1]).amount)
1164+ let eR = eK(gA, gB, toBigInt(0))
1165+ if ((eR == eR))
1166+ then {
1167+ let gX = eS(0, 0, 0)
1168+ let gi = gX._1
1169+ let eJ = gX._2
1170+ let gj = eW(eR, eJ)
1171+ if ((gj == gj))
1172+ then (dB ++ gi)
1173+ else throw("Strict value is not equal to itself.")
1174+ }
1175+ else throw("Strict value is not equal to itself.")
11681176 }
11691177
11701178
11711179
1172-@Callable(dN)
1180+@Callable(cP)
11731181 func get () = {
1174- let df = dM(dN)
1175- let gu = df._1
1176- let cI = df._2
1177- let cT = df._3
1178- let cn = df._4
1179- let cJ = df._5
1180- let eC = invoke(aE, "burn", [cT], [AttachedPayment(cn, cT)])
1181- if ((eC == eC))
1182- then cJ
1183- else throw("Strict value is not equal to itself.")
1184- }
1185-
1186-
1187-
1188-@Callable(dN)
1189-func getOneTknV2 (fg,fh) = {
1190- let go = {
1191- let aG = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1192- if ($isInstanceOf(aG, "Boolean"))
1193- then aG
1194- else throw(($getType(aG) + " couldn't be cast to Boolean"))
1195- }
1196- let gv = if (if (aJ())
1197- then true
1198- else (aY == q))
1199- then true
1200- else go
1201- let fT = [if (if (!(gv))
1202- then true
1203- else fC(dN))
1204- then true
1205- else aC("get operation is blocked by admin"), if ((size(dN.payments) == 1))
1206- then true
1207- else aC("exactly 1 payment are expected")]
1208- if ((fT == fT))
1182+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1183+ if ((eR == eR))
12091184 then {
1210- let gw = ff(fg, fh, dN.payments, dN.caller, dN.originCaller, dN.transactionId)
1211- let cJ = gw._1
1212- let fq = gw._2
1213- $Tuple2(cJ, fq)
1185+ let dX = fj(cP)
1186+ let gY = dX._1
1187+ let dA = dX._2
1188+ let dL = dX._3
1189+ let df = dX._4
1190+ let dB = dX._5
1191+ let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1192+ if ((ey == ey))
1193+ then {
1194+ let gZ = eS(-(gY), -(dA), 0)
1195+ let gi = gZ._1
1196+ let eJ = gZ._2
1197+ let gj = eW(eR, eJ)
1198+ if ((gj == gj))
1199+ then (dB ++ gi)
1200+ else throw("Strict value is not equal to itself.")
1201+ }
1202+ else throw("Strict value is not equal to itself.")
12141203 }
12151204 else throw("Strict value is not equal to itself.")
12161205 }
12171206
12181207
12191208
1220-@Callable(dN)
1221-func getOneTknV2READONLY (fg,gx) = {
1222- let aU = aM()
1223- let cr = aU[u]
1224- let cs = aU[v]
1225- let cq = aU[t]
1226- let dU = [toBigInt(bz(cr)), toBigInt(bz(cs))]
1227- let gy = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cq)), "invalid lp asset").quantity)
1228- let bM = dT(dU)
1229- let bL = (bM - fraction(toBigInt(gx), bM, gy))
1230- let gz = if ((fg == cr))
1231- then 0
1232- else if ((fg == cs))
1233- then 1
1234- else throw("invalid out asset id")
1235- let gA = ey(dU, gz, bL)
1236- let fN = (dU[gz] - gA)
1237- let fO = max([0, toInt((fN - f))])
1238- let gB = ch(fO, aH)
1239- let fp = gB._1
1240- let ck = gB._2
1241- $Tuple2(nil, $Tuple2(fp, ck))
1209+@Callable(cP)
1210+func getOneTknV2 (fL,fM) = {
1211+ let gN = {
1212+ let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1213+ if ($isInstanceOf(aS, "Boolean"))
1214+ then aS
1215+ else throw(($getType(aS) + " couldn't be cast to Boolean"))
1216+ }
1217+ let ha = if (if (aV())
1218+ then true
1219+ else (bk == s))
1220+ then true
1221+ else gN
1222+ let gP = [if (if (!(ha))
1223+ then true
1224+ else go(cP))
1225+ then true
1226+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
1227+ then true
1228+ else aN("exactly 1 payment are expected")]
1229+ if ((gP == gP))
1230+ then {
1231+ let hb = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId)
1232+ let dB = hb._1
1233+ let fV = hb._2
1234+ $Tuple2(dB, fV)
1235+ }
1236+ else throw("Strict value is not equal to itself.")
12421237 }
12431238
12441239
12451240
1246-@Callable(dN)
1247-func getOneTknV2WithBonusREADONLY (fg,gx) = {
1248- let aU = aM()
1249- let cr = aU[u]
1250- let cs = aU[v]
1251- let cq = aU[t]
1252- let cx = bz(cr)
1253- let cz = bz(cs)
1254- let gC = {
1255- let aG = invoke(this, "getOneTknV2READONLY", [fg, gx], nil)
1256- if ($isInstanceOf(aG, "(Int, Int)"))
1257- then aG
1258- else throw(($getType(aG) + " couldn't be cast to (Int, Int)"))
1259- }
1260- let fp = gC._1
1261- let ck = gC._2
1262- let df = cl("", cq, gx, this)
1263- let cH = df._1
1264- let cI = df._2
1265- let gD = (cH + cI)
1266- let fe = if ((gD == 0))
1267- then if ((fp == 0))
1268- then 0
1269- else throw("bonus calculation error")
1270- else fraction((fp - gD), a, gD)
1271- $Tuple2(nil, $Tuple3(fp, ck, fe))
1241+@Callable(cP)
1242+func refreshDLp () = {
1243+ let hc = valueOrElse(getInteger(aq), 0)
1244+ let hd = if (((height - hc) >= at))
1245+ then unit
1246+ else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1247+ if ((hd == hd))
1248+ then {
1249+ let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp"))
1250+ let he = eS(0, 0, 0)
1251+ let hf = he._1
1252+ let eJ = he._2
1253+ let eV = if ((fd != eJ))
1254+ then hf
1255+ else aN("nothing to refresh")
1256+ $Tuple2(eV, toString(eJ))
1257+ }
1258+ else throw("Strict value is not equal to itself.")
12721259 }
12731260
12741261
12751262
1276-@Callable(dN)
1277-func getNoLess (gE,gF) = {
1278- let df = dM(dN)
1279- let cH = df._1
1280- let cI = df._2
1281- let cT = df._3
1282- let cn = df._4
1283- let cJ = df._5
1284- if ((gE > cH))
1285- then throw(((("Failed: " + toString(cH)) + " < ") + toString(gE)))
1286- else if ((gF > cI))
1287- then throw(((("Failed: " + toString(cI)) + " < ") + toString(gF)))
1263+@Callable(cP)
1264+func getOneTknV2READONLY (fL,hg) = {
1265+ let dj = toBase58String(value(bm))
1266+ let dk = toBase58String(value(bn))
1267+ let di = toBase58String(value(bl))
1268+ let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1269+ let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1270+ let cb = cy(cz)
1271+ let ca = (cb - fraction(toBigInt(hg), cb, eI))
1272+ let hh = if ((fL == dj))
1273+ then 0
1274+ else if ((fL == dk))
1275+ then 1
1276+ else throw("invalid out asset id")
1277+ let hi = es(cz, hh, ca)
1278+ let hj = (cz[hh] - hi)
1279+ let hk = max([0, toInt((hj - f))])
1280+ let hl = cv(hk, aT)
1281+ let fU = hl._1
1282+ let cx = hl._2
1283+ $Tuple2(nil, $Tuple2(fU, cx))
1284+ }
1285+
1286+
1287+
1288+@Callable(cP)
1289+func getOneTknV2WithBonusREADONLY (fL,hg) = {
1290+ let dj = toBase58String(value(bm))
1291+ let dk = toBase58String(value(bn))
1292+ let di = toBase58String(value(bl))
1293+ let dp = bN(dj)
1294+ let dr = bN(dk)
1295+ let hm = {
1296+ let aS = invoke(this, "getOneTknV2READONLY", [fL, hg], nil)
1297+ if ($isInstanceOf(aS, "(Int, Int)"))
1298+ then aS
1299+ else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
1300+ }
1301+ let fU = hm._1
1302+ let cx = hm._2
1303+ let dX = dd("", di, hg, this)
1304+ let dz = dX._1
1305+ let dA = dX._2
1306+ let hn = (dz + dA)
1307+ let fJ = if ((hn == 0))
1308+ then if ((fU == 0))
1309+ then 0
1310+ else throw("bonus calculation error")
1311+ else fraction((fU - hn), a, hn)
1312+ $Tuple2(nil, $Tuple3(fU, cx, fJ))
1313+ }
1314+
1315+
1316+
1317+@Callable(cP)
1318+func getNoLess (ho,hp) = {
1319+ let dX = fj(cP)
1320+ let dz = dX._1
1321+ let dA = dX._2
1322+ let dL = dX._3
1323+ let df = dX._4
1324+ let dB = dX._5
1325+ if ((ho > dz))
1326+ then throw(((("Failed: " + toString(dz)) + " < ") + toString(ho)))
1327+ else if ((hp > dA))
1328+ then throw(((("Failed: " + toString(dA)) + " < ") + toString(hp)))
12881329 else {
1289- let gG = invoke(aE, "burn", [cT], [AttachedPayment(cn, cT)])
1290- if ((gG == gG))
1291- then cJ
1330+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1331+ if ((eR == eR))
1332+ then {
1333+ let hq = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1334+ if ((hq == hq))
1335+ then {
1336+ let hr = eS(-(dz), -(dA), 0)
1337+ let gi = hr._1
1338+ let eJ = hr._2
1339+ let gj = eW(eR, eJ)
1340+ if ((gj == gj))
1341+ then (dB ++ gi)
1342+ else throw("Strict value is not equal to itself.")
1343+ }
1344+ else throw("Strict value is not equal to itself.")
1345+ }
12921346 else throw("Strict value is not equal to itself.")
12931347 }
12941348 }
12951349
12961350
12971351
1298-@Callable(dN)
1299-func unstakeAndGet (ci) = {
1300- let gH = if ((size(dN.payments) != 0))
1352+@Callable(cP)
1353+func unstakeAndGet (cw) = {
1354+ let hs = if ((size(cP.payments) != 0))
13011355 then throw("No pmnts expd")
13021356 else true
1303- if ((gH == gH))
1357+ if ((hs == hs))
13041358 then {
1305- let bY = aM()
1306- let gI = be()
1307- let gh = fromBase58String(bY[t])
1308- let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1309- let gK = invoke(gJ, "unstake", [toBase58String(gh), ci], nil)
1310- if ((gK == gK))
1359+ let ht = bs()
1360+ let gD = bl
1361+ let hu = valueOrErrorMessage(addressFromString(ht[C]), "Wr st addr")
1362+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1363+ if ((eR == eR))
13111364 then {
1312- let df = cl(toBase58String(dN.transactionId), toBase58String(gh), ci, dN.caller)
1313- let cv = parseIntValue(df._9)
1314- let cJ = df._10
1315- let gL = if (if (aJ())
1316- then true
1317- else (cv == q))
1318- then throw(("Blocked: " + toString(cv)))
1319- else true
1320- if ((gL == gL))
1365+ let hv = invoke(hu, "unstake", [toBase58String(gD), cw], nil)
1366+ if ((hv == hv))
13211367 then {
1322- let gM = invoke(aE, "burn", [ci], [AttachedPayment(gh, ci)])
1323- if ((gM == gM))
1324- then cJ
1368+ let dX = dd(toBase58String(cP.transactionId), toBase58String(gD), cw, cP.caller)
1369+ let dz = dX._1
1370+ let dA = dX._2
1371+ let dn = parseIntValue(dX._9)
1372+ let dB = dX._10
1373+ let hw = if (if (aV())
1374+ then true
1375+ else (dn == s))
1376+ then throw(("Blocked: " + toString(dn)))
1377+ else true
1378+ if ((hw == hw))
1379+ then {
1380+ let hx = invoke(aQ, "burn", [cw], [AttachedPayment(gD, cw)])
1381+ if ((hx == hx))
1382+ then {
1383+ let hy = eS(-(dz), -(dA), 0)
1384+ let gi = hy._1
1385+ let eJ = hy._2
1386+ let gj = eW(eR, eJ)
1387+ if ((gj == gj))
1388+ then (dB ++ gi)
1389+ else throw("Strict value is not equal to itself.")
1390+ }
1391+ else throw("Strict value is not equal to itself.")
1392+ }
13251393 else throw("Strict value is not equal to itself.")
13261394 }
13271395 else throw("Strict value is not equal to itself.")
13281396 }
13291397 else throw("Strict value is not equal to itself.")
13301398 }
13311399 else throw("Strict value is not equal to itself.")
13321400 }
13331401
13341402
13351403
1336-@Callable(dN)
1337-func unstakeAndGetNoLess (gN,gO,gF) = {
1338- let gv = if (aJ())
1404+@Callable(cP)
1405+func unstakeAndGetNoLess (hz,hA,hp) = {
1406+ let ha = if (aV())
13391407 then true
1340- else (aY == q)
1341- let fT = [if (!(gv))
1408+ else (bk == s)
1409+ let gP = [if (!(ha))
13421410 then true
1343- else throw("get operation is blocked by admin"), if ((size(dN.payments) == 0))
1411+ else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
13441412 then true
13451413 else throw("no payments are expected")]
1346- if ((fT == fT))
1414+ if ((gP == gP))
13471415 then {
1348- let gK = invoke(bg, "unstake", [toBase58String(aZ), gN], nil)
1349- if ((gK == gK))
1416+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1417+ if ((eR == eR))
13501418 then {
1351- let gP = cl(toBase58String(dN.transactionId), toBase58String(aZ), gN, dN.caller)
1352- let cH = gP._1
1353- let cI = gP._2
1354- let cJ = gP._10
1355- let gQ = [if ((cH >= gO))
1356- then true
1357- else throw(makeString(["amount asset amount to receive is less than ", toString(gO)], "")), if ((cI >= gF))
1358- then true
1359- else throw(makeString(["price asset amount to receive is less than ", toString(gF)], ""))]
1360- if ((gQ == gQ))
1419+ let hv = invoke(bu, "unstake", [toBase58String(bl), hz], nil)
1420+ if ((hv == hv))
13611421 then {
1362- let gG = invoke(aE, "burn", [gN], [AttachedPayment(aZ, gN)])
1363- if ((gG == gG))
1364- then cJ
1422+ let hB = dd(toBase58String(cP.transactionId), toBase58String(bl), hz, cP.caller)
1423+ let dz = hB._1
1424+ let dA = hB._2
1425+ let dB = hB._10
1426+ let hC = [if ((dz >= hA))
1427+ then true
1428+ else throw(makeString(["amount asset amount to receive is less than ", toString(hA)], "")), if ((dA >= hp))
1429+ then true
1430+ else throw(makeString(["price asset amount to receive is less than ", toString(hp)], ""))]
1431+ if ((hC == hC))
1432+ then {
1433+ let hq = invoke(aQ, "burn", [hz], [AttachedPayment(bl, hz)])
1434+ if ((hq == hq))
1435+ then {
1436+ let hD = eS(-(dz), -(dA), 0)
1437+ let gi = hD._1
1438+ let eJ = hD._2
1439+ let gj = eW(eR, eJ)
1440+ if ((gj == gj))
1441+ then (dB ++ gi)
1442+ else throw("Strict value is not equal to itself.")
1443+ }
1444+ else throw("Strict value is not equal to itself.")
1445+ }
13651446 else throw("Strict value is not equal to itself.")
13661447 }
13671448 else throw("Strict value is not equal to itself.")
13681449 }
13691450 else throw("Strict value is not equal to itself.")
13701451 }
13711452 else throw("Strict value is not equal to itself.")
13721453 }
13731454
13741455
13751456
1376-@Callable(dN)
1377-func unstakeAndGetOneTknV2 (gN,fg,fh) = {
1378- let go = {
1379- let aG = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1380- if ($isInstanceOf(aG, "Boolean"))
1381- then aG
1382- else throw(($getType(aG) + " couldn't be cast to Boolean"))
1457+@Callable(cP)
1458+func unstakeAndGetOneTknV2 (hz,fL,fM) = {
1459+ let gN = {
1460+ let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1461+ if ($isInstanceOf(aS, "Boolean"))
1462+ then aS
1463+ else throw(($getType(aS) + " couldn't be cast to Boolean"))
13831464 }
1384- let gv = if (if (aJ())
1465+ let ha = if (if (aV())
13851466 then true
1386- else (aY == q))
1467+ else (bk == s))
13871468 then true
1388- else go
1389- let fT = [if (if (!(gv))
1469+ else gN
1470+ let gP = [if (if (!(ha))
13901471 then true
1391- else fC(dN))
1472+ else go(cP))
13921473 then true
1393- else aC("get operation is blocked by admin"), if ((size(dN.payments) == 0))
1474+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
13941475 then true
1395- else aC("no payments are expected")]
1396- if ((fT == fT))
1476+ else aN("no payments are expected")]
1477+ if ((gP == gP))
13971478 then {
1398- let bY = aM()
1399- let gI = be()
1400- let gh = fromBase58String(bY[t])
1401- let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1402- let gK = invoke(gJ, "unstake", [toBase58String(gh), gN], nil)
1403- if ((gK == gK))
1479+ let ht = bs()
1480+ let gD = bl
1481+ let hu = valueOrErrorMessage(addressFromString(ht[C]), "Wr st addr")
1482+ let hv = invoke(hu, "unstake", [toBase58String(gD), hz], nil)
1483+ if ((hv == hv))
14041484 then {
1405- let gR = ff(fg, fh, [AttachedPayment(gh, gN)], dN.caller, dN.originCaller, dN.transactionId)
1406- let cJ = gR._1
1407- let fq = gR._2
1408- $Tuple2(cJ, fq)
1485+ let hE = fK(fL, fM, [AttachedPayment(gD, hz)], cP.caller, cP.originCaller, cP.transactionId)
1486+ let dB = hE._1
1487+ let fV = hE._2
1488+ $Tuple2(dB, fV)
14091489 }
14101490 else throw("Strict value is not equal to itself.")
14111491 }
14121492 else throw("Strict value is not equal to itself.")
14131493 }
14141494
14151495
14161496
1417-@Callable(dN)
1418-func putOneTknV2WithBonusREADONLY (gS,gT) = {
1419- let aU = aM()
1420- let cr = aU[u]
1421- let cs = aU[v]
1422- let cq = aU[t]
1423- let gU = eI(gS, gT, "", "", true)
1424- let eZ = gU._1
1425- let cJ = gU._2
1426- let ck = gU._3
1427- let fe = gU._4
1428- $Tuple2(nil, $Tuple3(eZ, ck, fe))
1497+@Callable(cP)
1498+func putOneTknV2WithBonusREADONLY (hF,hG) = {
1499+ let hH = fp(hF, hG, "", "", true)
1500+ let fE = hH._1
1501+ let dB = hH._2
1502+ let cx = hH._3
1503+ let fJ = hH._4
1504+ $Tuple2(nil, $Tuple3(fE, cx, fJ))
14291505 }
14301506
14311507
14321508
1433-@Callable(dN)
1434-func putOneTknV2WithoutTakeFeeREADONLY (gS,gT) = {
1435- let aU = aM()
1436- let cr = aU[u]
1437- let cs = aU[v]
1438- let cq = aU[t]
1439- let gV = eI(gS, gT, "", "", false)
1440- let eZ = gV._1
1441- let cJ = gV._2
1442- let ck = gV._3
1443- let fe = gV._4
1444- $Tuple2(nil, $Tuple3(eZ, ck, fe))
1509+@Callable(cP)
1510+func putOneTknV2WithoutTakeFeeREADONLY (hF,hG) = {
1511+ let hI = fp(hF, hG, "", "", false)
1512+ let fE = hI._1
1513+ let dB = hI._2
1514+ let cx = hI._3
1515+ let fJ = hI._4
1516+ $Tuple2(nil, $Tuple3(fE, cx, fJ))
14451517 }
14461518
14471519
14481520
1449-@Callable(dN)
1450-func activate (gW,gX) = if ((toString(dN.caller) != toString(aE)))
1521+@Callable(cP)
1522+func activate (hJ,hK) = if ((toString(cP.caller) != toString(aQ)))
14511523 then throw("denied")
1452- else $Tuple2([StringEntry(ac(), gW), StringEntry(ad(), gX)], "success")
1524+ else $Tuple2([StringEntry(aj(), hJ), StringEntry(ak(), hK)], "success")
14531525
14541526
14551527
1456-@Callable(dN)
1457-func setS (gY,gL) = if ((toString(dN.caller) != ay(this, af())))
1458- then fB
1459- else [StringEntry(gY, gL)]
1528+@Callable(cP)
1529+func setS (hL,hw) = if ((toString(cP.caller) != aJ(this, am())))
1530+ then gn
1531+ else [StringEntry(hL, hw)]
14601532
14611533
14621534
1463-@Callable(dN)
1464-func setI (gY,gL) = if ((toString(dN.caller) != ay(this, af())))
1465- then fB
1466- else [IntegerEntry(gY, gL)]
1535+@Callable(cP)
1536+func setI (hL,hw) = if ((toString(cP.caller) != aJ(this, am())))
1537+ then gn
1538+ else [IntegerEntry(hL, hw)]
14671539
14681540
14691541
1470-@Callable(dN)
1471-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aM())
1542+@Callable(cP)
1543+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
14721544
14731545
14741546
1475-@Callable(dN)
1476-func getAccBalanceWrapperREADONLY (bA) = $Tuple2(nil, bz(bA))
1547+@Callable(cP)
1548+func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
14771549
14781550
14791551
1480-@Callable(dN)
1481-func calcPricesWrapperREADONLY (bS,bT,bX) = {
1482- let gZ = bW(bS, bT, bX)
1483- $Tuple2(nil, [toString(gZ[0]), toString(gZ[1]), toString(gZ[2])])
1552+@Callable(cP)
1553+func calcPricesWrapperREADONLY (ch,ci,cm) = {
1554+ let hM = cl(ch, ci, cm)
1555+ $Tuple2(nil, [toString(hM[0]), toString(hM[1]), toString(hM[2])])
14841556 }
14851557
14861558
14871559
1488-@Callable(dN)
1489-func fromX18WrapperREADONLY (J,ha) = $Tuple2(nil, I(parseBigIntValue(J), ha))
1560+@Callable(cP)
1561+func fromX18WrapperREADONLY (M,hN) = $Tuple2(nil, L(parseBigIntValue(M), hN))
14901562
14911563
14921564
1493-@Callable(dN)
1494-func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H)))
1565+@Callable(cP)
1566+func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
14951567
14961568
14971569
1498-@Callable(dN)
1499-func calcPriceBigIntWrapperREADONLY (bC,bD) = $Tuple2(nil, toString(bB(parseBigIntValue(bC), parseBigIntValue(bD))))
1570+@Callable(cP)
1571+func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
15001572
15011573
15021574
1503-@Callable(dN)
1504-func estimatePutOperationWrapperREADONLY (cm,bH,cL,cM,cN,cO,hb,cP,cQ) = $Tuple2(nil, cK(cm, bH, cL, cM, cN, cO, hb, cP, cQ, true, false, 0, ""))
1575+@Callable(cP)
1576+func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,hO,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, hO, dH, dI, true, false, 0, ""))
15051577
15061578
15071579
1508-@Callable(dN)
1509-func estimateGetOperationWrapperREADONLY (cm,hc,co,hb) = {
1510- let df = cl(cm, hc, co, addressFromStringValue(hb))
1511- $Tuple2(nil, $Tuple10(df._1, df._2, df._3, df._4, df._5, df._6, df._7, toString(df._8), df._9, df._10))
1580+@Callable(cP)
1581+func estimateGetOperationWrapperREADONLY (de,hP,dg,hO) = {
1582+ let dX = dd(de, hP, dg, addressFromStringValue(hO))
1583+ $Tuple2(nil, $Tuple10(dX._1, dX._2, dX._3, dX._4, dX._5, dX._6, dX._7, toString(dX._8), dX._9, dX._10))
15121584 }
15131585
15141586
1515-@Verifier(hd)
1516-func he () = {
1517- let hf = {
1518- let aw = fz()
1519- if ($isInstanceOf(aw, "ByteVector"))
1587+@Verifier(hQ)
1588+func hR () = {
1589+ let hS = {
1590+ let gl = gk()
1591+ if ($isInstanceOf(gl, "ByteVector"))
15201592 then {
1521- let fD = aw
1522- fD
1593+ let gp = gl
1594+ gp
15231595 }
1524- else if ($isInstanceOf(aw, "Unit"))
1525- then hd.senderPublicKey
1596+ else if ($isInstanceOf(gl, "Unit"))
1597+ then hQ.senderPublicKey
15261598 else throw("Match error")
15271599 }
1528- let aw = hd
1529- if ($isInstanceOf(aw, "Order"))
1600+ let gl = hQ
1601+ if ($isInstanceOf(gl, "Order"))
15301602 then {
1531- let dA = aw
1532- let hg = aK()
1533- let hh = dz(dA)
1534- let hi = sigVerify(dA.bodyBytes, dA.proofs[0], dA.senderPublicKey)
1535- let hj = sigVerify(dA.bodyBytes, dA.proofs[1], hg)
1536- if (if (if (hh)
1537- then hi
1603+ let eZ = gl
1604+ let hT = aW()
1605+ let hU = eY(eZ)
1606+ let aF = hU._1
1607+ let aG = hU._2
1608+ let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey)
1609+ let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], hT)
1610+ if (if (if (aF)
1611+ then aH
15381612 else false)
1539- then hj
1613+ then aI
15401614 else false)
15411615 then true
1542- else ar(hh, hi, hj)
1616+ else aE(aF, aG, aH, aI)
15431617 }
1544- else if ($isInstanceOf(aw, "SetScriptTransaction"))
1618+ else if ($isInstanceOf(gl, "SetScriptTransaction"))
15451619 then {
1546- let ea = aw
1547- let hk = blake2b256(value(ea.script))
1548- let hl = fromBase64String(value(getString(aE, ap())))
1549- let hm = scriptHash(this)
1550- if (if ((hl == hk))
1551- then (hm != hk)
1552- else false)
1620+ let cC = gl
1621+ if (sigVerify(hQ.bodyBytes, hQ.proofs[0], hS))
15531622 then true
1554- else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
1623+ else {
1624+ let hV = blake2b256(value(cC.script))
1625+ let hW = fromBase64String(value(getString(aQ, aC())))
1626+ let hX = scriptHash(this)
1627+ if ((hW == hV))
1628+ then (hX != hV)
1629+ else false
1630+ }
15551631 }
1556- else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
1632+ else sigVerify(hQ.bodyBytes, hQ.proofs[0], hS)
15571633 }
15581634

github/deemru/w8io/026f985 
302.93 ms