tx · BAQ5R5WWHG5zPXCgib15HoFnCu9GthriJKnwcfJASQ2d

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04200000 Waves

2023.03.24 14:03 [2504002] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "BAQ5R5WWHG5zPXCgib15HoFnCu9GthriJKnwcfJASQ2d", "fee": 4200000, "feeAssetId": null, "timestamp": 1679655808702, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "4gK8cszFFvtiqopABKV8ULzbKueV9X7hGckiJCFiFLJFGoMEGLESwLpAVubVVc7CR9La83rzycwowbDfecXaVt7J" ], "script": "base64:BgLMLAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1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EDCQD0AwMIBQJpeglib2R5Qnl0ZXMJAJEDAggFAml6BnByb29mcwAABQJpQgYEAmlFCQD2AwEJAQV2YWx1ZQEIBQJjSAZzY3JpcHQEAmlGCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVYJAQJhRgAEAmlHCQDxBwEFBHRoaXMDCQAAAgUCaUYFAmlFCQECIT0CBQJpRwUCaUUHCQD0AwMIBQJpeglib2R5Qnl0ZXMJAJEDAggFAml6BnByb29mcwAABQJpQpDIMkQ=", "height": 2504002, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9N9nNRsnWVTt1E5buq3R5Y62Zrt8o7uLBk9YxpqpMYS4 Next: E8S5fXFiSViA45mZ83AqCwxbLrnJLmwac9ihyZQpZS18 Diff:
OldNewDifferences
128128 func al () = "%s__amp"
129129
130130
131-func am () = "%s__addonAddr"
131+func am (an) = ("%s%d__amp__" + toString(an))
132132
133133
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"
134+func ao () = "%s__addonAddr"
149135
150136
151-func av () = "%s%s__matcher__publicKey"
137+func ap () = "%s__changeAmpLastCall"
152138
153139
154-func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
140+let aq = "%s__fee"
141+
142+let ar = valueOrElse(getInteger(this, aq), G)
143+
144+let as = makeString(["%s", "dLp"], n)
145+
146+let at = makeString(["%s", "dLpRefreshedHeight"], n)
147+
148+let au = makeString(["%s", "refreshDLpDelay"], n)
149+
150+let av = 30
151+
152+let aw = valueOrElse(getInteger(this, au), av)
153+
154+func ax () = "%s__factoryConfig"
155155
156156
157-func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
157+func ay () = "%s%s__matcher__publicKey"
158158
159159
160-func aB () = "%s__shutdown"
160+func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
161161
162162
163-func aC () = "%s__allowedLpStableScriptHash"
163+func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
164164
165165
166-func aD () = "%s__feeCollectorAddress"
166+func aE () = "%s__shutdown"
167167
168168
169-func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI)))
169+func aF () = "%s__allowedLpStableScriptHash"
170170
171171
172-func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
172+func aG () = "%s__feeCollectorAddress"
173173
174174
175-func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
175+func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
176176
177177
178-func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
178+func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
179179
180180
181-func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
181+func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
182182
183183
184-let aQ = addressFromStringValue(aJ(this, Y()))
184+func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
185185
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"))
186+
187+func aS (aT) = throw(makeString(["lp_stable.ride:", aT], " "))
188+
189+
190+func aU (aT) = makeString(["lp_stable.ride:", aT], " ")
191+
192+
193+let aV = addressFromStringValue(aO(this, Y()))
194+
195+let aW = {
196+ let aX = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
197+ if ($isInstanceOf(aX, "Int"))
198+ then aX
199+ else throw(($getType(aX) + " couldn't be cast to Int"))
191200 }
192201
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"))
202+let aY = {
203+ let aX = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
204+ if ($isInstanceOf(aX, "Int"))
205+ then aX
206+ else throw(($getType(aX) + " couldn't be cast to Int"))
198207 }
199208
200-let aU = aJ(this, al())
209+let aZ = aO(this, al())
201210
202-func aV () = valueOrElse(getBoolean(aQ, aB()), false)
211+func ba () = valueOrElse(getBoolean(aV, aE()), false)
203212
204213
205-func aW () = fromBase58String(aJ(aQ, av()))
214+func bb () = fromBase58String(aO(aV, ay()))
206215
207216
208-let aX = addressFromStringValue(aJ(aQ, aD()))
217+let bc = addressFromStringValue(aO(aV, aG()))
209218
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)
219+func bd () = {
220+ let be = aO(this, aj())
221+ let bf = aO(this, ak())
222+ let bg = aR(aV, aC(bf))
223+ let aA = aR(aV, aC(be))
224+ split(aO(aV, az(toString(aA), toString(bg))), n)
216225 }
217226
218227
219-func bc (bd) = if ((bd == k))
228+func bh (bi) = if ((bi == k))
220229 then unit
221- else fromBase58String(bd)
230+ else fromBase58String(bi)
222231
223232
224-func be (bd) = if ((bd == unit))
233+func bj (bi) = if ((bi == unit))
225234 then k
226- else toBase58String(value(bd))
235+ else toBase58String(value(bi))
227236
228237
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]))
238+func bk (bl) = $Tuple9(addressFromStringValue(bl[t]), parseIntValue(bl[u]), fromBase58String(bl[v]), bh(bl[w]), bh(bl[x]), parseIntValue(bl[y]), parseIntValue(bl[z]), fromBase58String(bl[A]), fromBase58String(bl[B]))
230239
231240
232-let bh = bf(aY())
241+let bm = bk(bd())
233242
234-let bi = bh
243+let bn = bm
235244
236-let bj = bi._1
245+let bo = bn._1
237246
238-let bk = bi._2
247+let bp = bn._2
239248
240-let bl = bi._3
249+let bq = bn._3
241250
242-let bm = bi._4
251+let br = bn._4
243252
244-let bn = bi._5
253+let bs = bn._5
245254
246-let bo = bi._6
255+let bt = bn._6
247256
248-let bp = bi._7
257+let bu = bn._7
249258
250-let bq = bi._8
259+let bv = bn._8
251260
252-let br = bi._9
261+let bw = bn._9
253262
254-func bs () = split(aJ(aQ, au()), n)
263+func bx () = split(aO(aV, ax()), n)
255264
256265
257-let bt = bs()
266+let by = bx()
258267
259-let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
268+let bz = valueOrErrorMessage(addressFromString(by[C]), "Invalid staking contract address")
260269
261-let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
270+let bA = valueOrErrorMessage(addressFromString(by[E]), "Invalid slipage contract address")
262271
263-let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
272+let bB = valueOrErrorMessage(addressFromString(by[F]), "Invalid gwx contract address")
264273
265-let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
274+let bC = valueOrErrorMessage(addressFromString(by[D]), "Invalid gwx contract address")
266275
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)
276+func bD (bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN)], n)
268277
269278
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)
279+func bO (bP,bQ,bR,bH,bK,bL) = makeString(["%d%d%d%d%d%d", toString(bP), toString(bQ), toString(bR), toString(bH), toString(bK), toString(bL)], n)
271280
272281
273-func bN (bO) = if ((bO == "WAVES"))
282+func bS (bT) = if ((bT == "WAVES"))
274283 then wavesBalance(this).available
275- else assetBalance(this, fromBase58String(bO))
284+ else assetBalance(this, fromBase58String(bT))
276285
277286
278-func bP (bQ,bR) = fraction(bQ, c, bR)
287+func bU (bV,bW) = fraction(bV, c, bW)
279288
280289
281-func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
290+func bX (bV,bW,P) = fraction(bV, c, bW, P)
282291
283292
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]))
293+func bY (bZ,ca,cb) = {
294+ let cc = fraction((bZ - ca), b, ca)
295+ let cd = ((cb - W(cc)) > d)
296+ if (!(cd))
297+ then throw(("Big slpg: " + toString(cc)))
298+ else $Tuple2(cd, min([bZ, ca]))
290299 }
291300
292301
293-func bZ (ca,cb,cc) = {
294- let bX = fraction(cb, b, ca)
295- let cd = (cc > bX)
296- if (if (cd)
302+func ce (cf,cg,ch) = {
303+ let cc = fraction(cg, b, cf)
304+ let ci = (ch > cc)
305+ if (if (ci)
297306 then true
298- else (cb > ca))
299- then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300- else cd
307+ else (cg > cf))
308+ then throw(((((((toString(cg) + " ") + toString(cf)) + " ") + toString(cc)) + " ") + toString(ch)))
309+ else ci
301310 }
302311
303312
304-func ce (cf,cg,ch,ci) = {
305- let cj = H(ch, cf)
306- let ck = H(ci, cg)
307- bP(ck, cj)
313+func cj (ck,cl,cm,cn) = {
314+ let co = H(cm, ck)
315+ let cp = H(cn, cl)
316+ bU(cp, co)
308317 }
309318
310319
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]
320+func cq (cm,cn,cr) = {
321+ let cs = bt
322+ let ct = bu
323+ let cu = cj(cs, ct, cm, cn)
324+ let bW = H(cm, cs)
325+ let bV = H(cn, ct)
326+ let cv = H(cr, a)
327+ let cw = bU(bW, cv)
328+ let cx = bU(bV, cv)
329+[cu, cw, cx]
321330 }
322331
323332
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)]
333+func cy (cm,cn,cr) = {
334+ let cz = cq(cm, cn, cr)
335+[L(cz[0], a), L(cz[1], a), L(cz[2], a)]
327336 }
328337
329338
330-func cv (cw,ao) = {
331- let cx = if ((ao == 0))
339+func cA (cB,ar) = {
340+ let cC = if ((ar == 0))
332341 then 0
333- else fraction(cw, ao, a)
334- $Tuple2((cw - cx), cx)
342+ else fraction(cB, ar, a)
343+ $Tuple2((cB - cC), cC)
335344 }
336345
337346
338-func cy (cz) = {
339- let cA = cz[0]
340- let cB = cz[1]
341- let cC = (cA + cB)
342- if ((cC == e))
347+func cD (cE) = {
348+ let cF = cE[0]
349+ let cG = cE[1]
350+ let cH = (cF + cG)
351+ if ((cH == e))
343352 then e
344353 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)))
354+ let cI = parseIntValue(aZ)
355+ let cJ = (cI * 2)
356+ let cz = fraction(cF, cG, f)
357+ let cK = fraction(cz, i, f)
358+ let cL = fraction(toBigInt(cJ), cH, f)
359+ let cM = toBigInt((cJ - 1))
360+ func cN (cO) = {
361+ let cP = fraction(cO, cO, f)
362+ let cQ = fraction(cP, cO, f)
363+ let cR = fraction(cQ, f, cK)
364+ fraction((cL + fraction(cR, g, f)), cO, (fraction(cM, cO, f) + fraction(h, cR, f)))
356365 }
357366
358- func cN (cO,cP) = if (cO._2)
359- then cO
367+ func cS (cT,cU) = if (cT._2)
368+ then cT
360369 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+ let cO = cT._1
371+ let cV = cN(cO)
372+ let cW = (cV - value(cO))
373+ let cX = if ((e > cW))
374+ then -(cW)
375+ else cW
376+ if ((f >= cX))
377+ then $Tuple2(cV, true)
378+ else $Tuple2(cV, false)
370379 }
371380
372- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
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])
381+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382+ let cZ = {
383+ let da = cY
384+ let db = size(da)
385+ let dc = $Tuple2(cH, false)
386+ func dd (de,df) = if ((df >= db))
387+ then de
388+ else cS(de, da[df])
380389
381- func db (cZ,da) = if ((da >= cW))
382- then cZ
383- else throw("List size exceeds 18")
390+ func dg (de,df) = if ((df >= db))
391+ then de
392+ else throw("List size exceeds 17")
384393
385- db(cY(cY(cY(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), 16), 17), 18)
394+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
386395 }
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)))
396+ let cO = cZ._1
397+ let dh = cZ._2
398+ if (dh)
399+ then cO
400+ else throw(("D calculation error, D = " + toString(cO)))
392401 }
393402 }
394403
395404
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+func di (dj,dk,dl,dm) = {
406+ let dn = bq
407+ let do = toBase58String(value(br))
408+ let dp = toBase58String(value(bs))
409+ let dq = bt
410+ let dr = bu
411+ let ds = toString(bp)
412+ let dt = valueOrErrorMessage(assetInfo(dn), "Wrong LP id").quantity
413+ if ((toBase58String(dn) != dk))
405414 then throw("Wrong pmt asset")
406415 else {
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 == ""))
416+ let du = bS(do)
417+ let dv = H(du, dq)
418+ let dw = bS(dp)
419+ let dx = H(dw, dr)
420+ let dy = bU(dx, dv)
421+ let dz = L(dy, a)
422+ let dA = H(dl, a)
423+ let dB = H(dt, a)
424+ let dC = fraction(dv, dA, dB)
425+ let dD = fraction(dx, dA, dB)
426+ let dE = O(dC, dq, FLOOR)
427+ let dF = O(dD, dr, FLOOR)
428+ let dG = if ((dj == ""))
420429 then nil
421- else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
430+ else [ScriptTransfer(dm, dE, if ((do == "WAVES"))
422431 then unit
423- else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
432+ else fromBase58String(do)), ScriptTransfer(dm, dF, if ((dp == "WAVES"))
424433 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)
434+ else fromBase58String(dp)), StringEntry(ai(toString(dm), dj), bO(dE, dF, dl, dz, height, lastBlock.timestamp)), IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz)]
435+ $Tuple10(dE, dF, do, dp, du, dw, dt, dy, ds, dG)
427436 }
428437 }
429438
430439
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)
440+func dH (dj,cb,dI,dJ,dK,dL,dm,dM,dN,dO,dP,dQ,dR) = {
441+ let dn = bq
442+ let dS = toBase58String(value(br))
443+ let dT = toBase58String(value(bs))
444+ let dU = bv
445+ let dV = bw
446+ let dW = bt
447+ let dX = bu
448+ let ds = toString(bp)
449+ let dY = valueOrErrorMessage(assetInfo(dn), "Wr lp as").quantity
450+ let du = if (dM)
451+ then bS(dS)
452+ else if (if (dO)
453+ then (dR == dS)
445454 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)
455+ then (bS(dS) - dQ)
456+ else if (dO)
457+ then bS(dS)
458+ else (bS(dS) - dI)
459+ let dw = if (dM)
460+ then bS(dT)
461+ else if (if (dO)
462+ then (dR == dT)
454463 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))
464+ then (bS(dT) - dQ)
465+ else if (dO)
466+ then bS(dT)
467+ else (bS(dT) - dK)
468+ let dZ = H(dI, dW)
469+ let ea = H(dK, dX)
470+ let eb = bU(ea, dZ)
471+ let dv = H(du, dW)
472+ let dx = H(dw, dX)
473+ let cg = cD([dv, dx])
474+ let ec = if ((dY == 0))
466475 then {
467- let ca = cy([(dq + dU), (ds + dV)])
468- let dY = if ((ca > cb))
476+ let cf = cD([(dv + dZ), (dx + ea)])
477+ let ed = if ((cf > cg))
469478 then true
470479 else throw("D1 should be greater than D0")
471- if ((dY == dY))
480+ if ((ed == ed))
472481 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)
482+ let dy = d
483+ let ee = d
484+ let cv = cf
485+ $Tuple5(L(cv, a), L(dZ, dW), L(ea, dX), bU((dx + ea), (dv + dZ)), ee)
477486 }
478487 else throw("Strict value is not equal to itself.")
479488 }
480489 else {
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)
490+ let dy = bU(dx, dv)
491+ let ef = fraction(W((dy - eb)), c, dy)
492+ let ee = H(cb, a)
493+ if (if (if (dP)
494+ then (dy != d)
486495 else false)
487- then (ea > dZ)
496+ then (ef > ee)
488497 else false)
489- then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
498+ then throw(((("Price slippage " + toString(ef)) + " > ") + toString(ee)))
490499 else {
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))
500+ let eg = H(dY, a)
501+ let eh = fraction(dZ, bX(dx, dv, CEILING), c, CEILING)
502+ let ei = fraction(ea, c, bX(dx, dv, FLOOR), CEILING)
503+ let ej = if ((eh > ea))
504+ then $Tuple2(ei, ea)
505+ else $Tuple2(dZ, eh)
506+ let ek = ej._1
507+ let el = ej._2
508+ let cf = cD([(dv + ek), (dx + el)])
509+ let ed = if ((cf > cg))
501510 then true
502511 else throw("D1 should be greater than D0")
503- if ((dY == dY))
512+ if ((ed == ed))
504513 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)
514+ let cv = fraction(eg, (cf - cg), cg)
515+ $Tuple5(O(cv, a, FLOOR), O(ek, dW, CEILING), O(el, dX, CEILING), dy, ee)
507516 }
508517 else throw("Strict value is not equal to itself.")
509518 }
510519 }
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))
520+ let em = ec._1
521+ let en = ec._2
522+ let eo = ec._3
523+ let dz = L(ec._4, a)
524+ let ep = L(ec._5, a)
525+ if ((0 >= em))
517526 then throw("LP <= 0")
518527 else {
519- let el = if (!(dI))
528+ let eq = if (!(dN))
520529 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)
530+ else em
531+ let er = (dI - en)
532+ let es = (dK - eo)
533+ let et = if (if (dO)
534+ then (dR == dS)
526535 else false)
527- then $Tuple2(dL, 0)
528- else if (if (dJ)
529- then (dM == dO)
536+ then $Tuple2(dQ, 0)
537+ else if (if (dO)
538+ then (dR == dT)
530539 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)
540+ then $Tuple2(0, dQ)
541+ else $Tuple2(en, eo)
542+ let eu = et._1
543+ let ev = et._2
544+ let ew = [IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz), StringEntry(af(dm, dj), bD(eu, ev, eq, dz, cb, ep, height, lastBlock.timestamp, er, es))]
545+ $Tuple13(em, eq, dz, du, dw, dY, dn, ds, ew, er, es, dJ, dL)
537546 }
538547 }
539548
540549
541-func es (cz,cP,et) = {
542- let eu = g
543- let ev = cz[if ((cP == 0))
550+func ex (cE,cU,ey) = {
551+ let ez = g
552+ let eA = cE[if ((cU == 0))
544553 then 1
545554 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
555+ let eB = parseBigIntValue(l)
556+ let cI = (parseBigIntValue(aZ) * eB)
557+ let cH = eA
558+ let cJ = (cI * ez)
559+ let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
560+ let eD = ((cH + ((ey * eB) / cJ)) - ey)
561+ func cS (cT,eE) = {
562+ let eF = cT
563+ let eG = eF._1
564+ let dh = eF._2
565+ if ((dh != unit))
566+ then cT
558567 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)
568+ let eH = (((eG * eG) + eC) / ((g * eG) + eD))
569+ let eI = X((eH - value(eG)))
570+ if ((f >= eI))
571+ then $Tuple2(eH, eE)
572+ else $Tuple2(eH, unit)
564573 }
565574 }
566575
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])
576+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
577+ let eJ = {
578+ let da = cY
579+ let db = size(da)
580+ let dc = $Tuple2(ey, unit)
581+ func dd (de,df) = if ((df >= db))
582+ then de
583+ else cS(de, da[df])
575584
576- func db (cZ,da) = if ((da >= cW))
577- then cZ
585+ func dg (de,df) = if ((df >= db))
586+ then de
578587 else throw("List size exceeds 15")
579588
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)
589+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581590 }
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
591+ let eG = eJ._1
592+ let dh = eJ._2
593+ if ((dh != unit))
594+ then eG
595+ else throw(("Y calculation error, Y = " + toString(eG)))
595596 }
596597
597598
598599 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
600+ let eO = fraction(cD([K(eL, toBigInt(bt)), K(eM, toBigInt(bu))]), c, eN)
601+ if ((eN == e))
602+ then e
603+ else eO
604604 }
605605
606606
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)
607+func eP (eQ,eR,eS) = {
608+ let eT = (toBigInt(bS(bj(br))) - eQ)
609+ let eU = (toBigInt(bS(bj(bs))) - eR)
610+ let eV = (toBigInt(value(assetInfo(bq)).quantity) - eS)
611+ let eW = eK(eT, eU, eV)
612+ eW
614613 }
615614
616615
617-func eW (eX,eJ) = if ((eJ >= eX))
618- then true
619- else aN("updated DLp lower than current DLp")
616+func eX (eY,eZ,eS) = {
617+ let eT = (bS(bj(br)) + eY)
618+ let eU = (bS(bj(bs)) + eZ)
619+ let eV = (value(assetInfo(bq)).quantity + eS)
620+ let eO = eK(toBigInt(eT), toBigInt(eU), toBigInt(eV))
621+ let fa = [IntegerEntry(at, height), StringEntry(as, toString(eO))]
622+ $Tuple2(fa, eO)
623+ }
620624
621625
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())
626+func fb (fc,eO) = if ((eO >= fc))
627+ then true
628+ else aS("updated DLp lower than current DLp")
629+
630+
631+func fd (fe) = {
632+ let eT = bS(bj(br))
633+ let eU = bS(bj(bs))
634+ let ff = fe.amount
635+ let fg = fraction(fe.amount, fe.price, a, FLOOR)
636+ let fh = if ((fe.orderType == Buy))
637+ then $Tuple2(ff, -(fg))
638+ else $Tuple2(-(ff), fg)
639+ let eY = fh._1
640+ let eZ = fh._2
641+ if (if (if (ba())
633642 then true
634- else (bk == r))
643+ else (bp == r))
635644 then true
636- else (bk == s))
645+ else (bp == s))
637646 then throw("Admin blocked")
638- else if (if ((eZ.assetPair.amountAsset != bm))
647+ else if (if ((fe.assetPair.amountAsset != br))
639648 then true
640- else (eZ.assetPair.priceAsset != bn))
649+ else (fe.assetPair.priceAsset != bs))
641650 then throw("Wr assets")
642651 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)
652+ let fi = parseBigIntValue(valueOrElse(getString(this, as), "0"))
653+ let fj = eX(eY, eZ, 0)
654+ let fk = fj._1
655+ let fl = fj._2
656+ let fm = (fl >= fi)
657+ let fn = makeString(["dLp=", toString(fi), " dLpNew=", toString(fl), " amountAssetBalance=", toString(eT), " priceAssetBalance=", toString(eU), " amountAssetBalanceDelta=", toString(eY), " priceAssetBalanceDelta=", toString(eZ), " height=", toString(height)], "")
658+ $Tuple2(fm, fn)
650659 }
651660 }
652661
653662
654-func fj (cP) = if ((size(cP.payments) != 1))
663+func fo (cU) = if ((size(cU.payments) != 1))
655664 then throw("1 pmnt exp")
656665 else {
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())
666+ let fp = value(cU.payments[0])
667+ let dk = value(fp.assetId)
668+ let dQ = fp.amount
669+ let ec = di(toBase58String(cU.transactionId), toBase58String(dk), dQ, cU.caller)
670+ let dE = ec._1
671+ let dF = ec._2
672+ let ds = parseIntValue(ec._9)
673+ let dG = ec._10
674+ if (if (ba())
666675 then true
667- else (dn == s))
668- then throw(("Admin blocked: " + toString(dn)))
669- else $Tuple5(dz, dA, dL, df, dB)
676+ else (ds == s))
677+ then throw(("Admin blocked: " + toString(ds)))
678+ else $Tuple5(dE, dF, dQ, dk, dG)
670679 }
671680
672681
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())
682+func fq (fr,ah,fs,ft,cb,dN,dO,dP,dQ,dR) = {
683+ let ec = dH(ah, cb, value(fs).amount, value(fs).assetId, value(ft).amount, value(ft).assetId, fr, (ah == ""), dN, dO, dP, dQ, dR)
684+ let ds = parseIntValue(ec._8)
685+ if (if (if (ba())
677686 then true
678- else (dn == q))
687+ else (ds == q))
679688 then true
680- else (dn == s))
681- then throw(("Blocked:" + toString(dn)))
682- else dX
689+ else (ds == s))
690+ then throw(("Blocked:" + toString(ds)))
691+ else ec
683692 }
684693
685694
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))
695+func fu (fv,dk,dm,ah,fw) = {
696+ let do = toBase58String(value(br))
697+ let dp = toBase58String(value(bs))
698+ let dn = bq
699+ let dW = bt
700+ let dX = bu
701+ let eV = toBigInt(valueOrErrorMessage(assetInfo(dn), "invalid lp asset").quantity)
702+ let fx = if ((eV > e))
694703 then true
695704 else throw("initial deposit requires all coins")
696- if ((fs == fs))
705+ if ((fx == fx))
697706 then {
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))
707+ let du = bS(do)
708+ let dw = bS(dp)
709+ let fy = if ((ah == ""))
710+ then $Tuple2(du, dw)
711+ else if ((dk == do))
712+ then if ((fv > du))
704713 then throw("invalid payment amount")
705- else $Tuple2((dp - fq), dr)
706- else if ((df == dk))
707- then if ((fq > dr))
714+ else $Tuple2((du - fv), dw)
715+ else if ((dk == dp))
716+ then if ((fv > dw))
708717 then throw("invalid payment amount")
709- else $Tuple2(dp, (dr - fq))
718+ else $Tuple2(du, (dw - fv))
710719 else throw("wrong pmtAssetId")
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)
720+ let fz = fy._1
721+ let fA = fy._2
722+ let fB = if ((dk == do))
723+ then $Tuple2(fv, 0)
724+ else if ((dk == dp))
725+ then $Tuple2(0, fv)
717726 else throw("invalid payment")
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))
727+ let fC = fB._1
728+ let fD = fB._2
729+ let fE = if (fw)
730+ then $Tuple3(cA(fC, aW)._1, cA(fD, aW)._1, cA(fv, aW)._2)
731+ else $Tuple3(fC, fD, 0)
732+ let fF = fE._1
733+ let fG = fE._2
734+ let cC = fE._3
735+ let fH = (fz + fF)
736+ let fI = (fA + fG)
737+ let cg = cD([H(fz, bt), H(fA, bu)])
738+ let cf = cD([H(fH, bt), H(fI, bu)])
739+ let ed = if ((cf > cg))
731740 then true
732741 else throw()
733- if ((dY == dY))
742+ if ((ed == ed))
734743 then {
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)
744+ let fJ = fraction(eV, (cf - cg), cg, FLOOR)
745+ let dz = L(bU(H(fI, dX), H(fH, dW)), a)
746+ let ew = [IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz), StringEntry(af(dm, ah), bD(fC, fD, toInt(fJ), dz, 0, 0, height, lastBlock.timestamp, 0, 0))]
747+ let fK = fraction(fA, a, fz)
748+ let fL = fraction(fv, a, (fK + a))
749+ let fM = (fv - fL)
750+ let fN = fraction(eV, toBigInt(fM), toBigInt(fA))
751+ let fO = toInt(fraction((fJ - fN), b, fN))
752+ $Tuple4(toInt(fJ), ew, cC, fO)
744753 }
745754 else throw("Strict value is not equal to itself.")
746755 }
748757 }
749758
750759
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))
760+func fP (fQ,fR,fS,fr,fT,fU) = {
761+ let dn = toBase58String(value(bq))
762+ let do = toBase58String(value(br))
763+ let dp = toBase58String(value(bs))
764+ let fV = bt
765+ let fW = bu
766+ let fX = bp
767+ let dm = if ((fr == bC))
768+ then fT
769+ else fr
770+ let fp = value(fS[0])
771+ let dk = value(fp.assetId)
772+ let dQ = fp.amount
773+ let eW = eP(e, e, e)
774+ if ((eW == eW))
766775 then {
767- let de = toBase58String(fP)
768- if ((di != toBase58String(df)))
776+ let dj = toBase58String(fU)
777+ if ((dn != toBase58String(dk)))
769778 then throw("Wrong LP")
770779 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)"))
780+ let du = bS(do)
781+ let dw = bS(dp)
782+ let fY = {
783+ let aX = invoke(this, "getOneTknV2READONLY", [fQ, dQ], nil)
784+ if ($isInstanceOf(aX, "(Int, Int)"))
785+ then aX
786+ else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
778787 }
779- if ((fT == fT))
788+ if ((fY == fY))
780789 then {
781- let cx = fT._2
782- let fU = fT._1
783- let fV = if (if ((fM > 0))
784- then (fM > fU)
790+ let cC = fY._2
791+ let fZ = fY._1
792+ let ga = if (if ((fR > 0))
793+ then (fR > fZ)
785794 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))
795+ then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
796+ else fZ
797+ let gb = if ((fQ == do))
798+ then $Tuple4(ga, 0, ((du - ga) - cC), dw)
799+ else if ((fQ == dp))
800+ then $Tuple4(0, ga, du, ((dw - ga) - cC))
792801 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"))
802+ let gc = gb._1
803+ let gd = gb._2
804+ let fH = gb._3
805+ let fI = gb._4
806+ let ge = bU(H(fI, fW), H(fH, fV))
807+ let gf = L(ge, a)
808+ let gg = if ((fQ == "WAVES"))
800809 then unit
801- else fromBase58String(fL)
802- let gc = if ((cx > 0))
803- then [ScriptTransfer(aX, cx, gb)]
810+ else fromBase58String(fQ)
811+ let gh = if ((cC > 0))
812+ then [ScriptTransfer(bc, cC, gg)]
804813 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))
814+ let dG = ([ScriptTransfer(dm, ga, gg), StringEntry(ai(toString(dm), dj), bO(gc, gd, dQ, gf, height, lastBlock.timestamp)), IntegerEntry(ab(), gf), IntegerEntry(ac(height, lastBlock.timestamp), gf)] ++ gh)
815+ if ((dG == dG))
807816 then {
808- let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809- if ((gd == gd))
817+ let gi = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
818+ if ((gi == gi))
810819 then {
811- let ge = {
812- let gf = if ((this == aX))
820+ let gj = {
821+ let gk = if ((this == bc))
813822 then 0
814- else cx
815- let gg = if ((bc(fL) == bm))
823+ else cC
824+ let gl = if ((bh(fQ) == br))
816825 then true
817826 else false
818- if (gg)
819- then $Tuple2(-((fU + gf)), 0)
820- else $Tuple2(0, -((fU + gf)))
827+ if (gl)
828+ then $Tuple2(-((fZ + gk)), 0)
829+ else $Tuple2(0, -((fZ + gk)))
821830 }
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)
831+ let eY = gj._1
832+ let eZ = gj._2
833+ let gm = eX(eY, eZ, 0)
834+ let gn = gm._1
835+ let eO = gm._2
836+ let go = fb(eW, eO)
837+ if ((go == go))
838+ then $Tuple2((dG ++ gn), ga)
830839 else throw("Strict value is not equal to itself.")
831840 }
832841 else throw("Strict value is not equal to itself.")
840849 }
841850
842851
843-func gk () = {
844- let gl = getString(Z())
845- if ($isInstanceOf(gl, "String"))
852+func gp () = {
853+ let gq = getString(Z())
854+ if ($isInstanceOf(gq, "String"))
846855 then {
847- let cC = gl
848- fromBase58String(cC)
856+ let cH = gq
857+ fromBase58String(cH)
849858 }
850- else if ($isInstanceOf(gl, "Unit"))
859+ else if ($isInstanceOf(gq, "Unit"))
851860 then unit
852861 else throw("Match error")
853862 }
854863
855864
856-func gm () = {
857- let gl = getString(aa())
858- if ($isInstanceOf(gl, "String"))
865+func gr () = {
866+ let gq = getString(aa())
867+ if ($isInstanceOf(gq, "String"))
859868 then {
860- let cC = gl
861- fromBase58String(cC)
869+ let cH = gq
870+ fromBase58String(cH)
862871 }
863- else if ($isInstanceOf(gl, "Unit"))
872+ else if ($isInstanceOf(gq, "Unit"))
864873 then unit
865874 else throw("Match error")
866875 }
867876
868877
869-let gn = throw("Permission denied")
878+let gs = throw("Permission denied")
870879
871-func go (cP) = {
872- let gl = gk()
873- if ($isInstanceOf(gl, "ByteVector"))
880+func gt (cU) = {
881+ let gq = gp()
882+ if ($isInstanceOf(gq, "ByteVector"))
874883 then {
875- let gp = gl
876- (cP.callerPublicKey == gp)
884+ let gu = gq
885+ (cU.callerPublicKey == gu)
877886 }
878- else if ($isInstanceOf(gl, "Unit"))
879- then (cP.caller == this)
887+ else if ($isInstanceOf(gq, "Unit"))
888+ then (cU.caller == this)
880889 else throw("Match error")
881890 }
882891
883892
884-func gq (cP) = {
885- let gl = gk()
886- if ($isInstanceOf(gl, "ByteVector"))
893+func gv (cU) = {
894+ let gq = gp()
895+ if ($isInstanceOf(gq, "ByteVector"))
887896 then {
888- let gp = gl
889- if ((cP.callerPublicKey == gp))
897+ let gu = gq
898+ if ((cU.callerPublicKey == gu))
890899 then true
891- else gn
900+ else gs
892901 }
893- else if ($isInstanceOf(gl, "Unit"))
894- then if ((cP.caller == this))
902+ else if ($isInstanceOf(gq, "Unit"))
903+ then if ((cU.caller == this))
895904 then true
896- else gn
905+ else gs
897906 else throw("Match error")
898907 }
899908
900909
901-func gr (gs,et,gt) = {
902- let bg = aY()
903- let dj = bg[w]
904- let dk = bg[x]
905- let eu = g
906- let ew = parseBigIntValue(l)
907- let cD = (parseBigIntValue(aU) * ew)
908- let cz = if ((gs == false))
909- then [(toBigInt(bN(dj)) + gt), toBigInt(bN(dk))]
910- else [(toBigInt(bN(dk)) + gt), toBigInt(bN(dj))]
911- let ev = cz[0]
912- let cC = ev
913- let cE = (cD * eu)
914- let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
915- let ey = ((cC + ((et * ew) / cE)) - et)
916- func cN (cO,ez) = {
917- let gu = cO
918- let eB = gu._1
919- let dc = gu._2
920- if ((dc != unit))
921- then cO
910+func gw (gx,ey,gy) = {
911+ let bl = bd()
912+ let do = bl[w]
913+ let dp = bl[x]
914+ let ez = g
915+ let eB = parseBigIntValue(l)
916+ let cI = (parseBigIntValue(aZ) * eB)
917+ let cE = if ((gx == false))
918+ then [(toBigInt(bS(do)) + gy), toBigInt(bS(dp))]
919+ else [(toBigInt(bS(dp)) + gy), toBigInt(bS(do))]
920+ let eA = cE[0]
921+ let cH = eA
922+ let cJ = (cI * ez)
923+ let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
924+ let eD = ((cH + ((ey * eB) / cJ)) - ey)
925+ func cS (cT,eE) = {
926+ let gz = cT
927+ let eG = gz._1
928+ let dh = gz._2
929+ if ((dh != unit))
930+ then cT
922931 else {
923- let eC = (((eB * eB) + ex) / ((g * eB) + ey))
924- let eD = X((eC - value(eB)))
925- if ((f >= eD))
926- then $Tuple2(eC, ez)
927- else $Tuple2(eC, unit)
932+ let eH = (((eG * eG) + eC) / ((g * eG) + eD))
933+ let eI = X((eH - value(eG)))
934+ if ((f >= eI))
935+ then $Tuple2(eH, eE)
936+ else $Tuple2(eH, unit)
928937 }
929938 }
930939
931- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
932- let gv = {
933- let cV = cT
934- let cW = size(cV)
935- let cX = $Tuple2(et, unit)
936- func cY (cZ,da) = if ((da >= cW))
937- then cZ
938- else cN(cZ, cV[da])
940+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
941+ let gA = {
942+ let da = cY
943+ let db = size(da)
944+ let dc = $Tuple2(ey, unit)
945+ func dd (de,df) = if ((df >= db))
946+ then de
947+ else cS(de, da[df])
939948
940- func db (cZ,da) = if ((da >= cW))
941- then cZ
949+ func dg (de,df) = if ((df >= db))
950+ then de
942951 else throw("List size exceeds 15")
943952
944- 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)
953+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
945954 }
946- let eB = gv._1
947- let dc = gv._2
948- if ((dc != unit))
949- then eB
950- else throw(("Y calculation error, Y = " + toString(eB)))
955+ let eG = gA._1
956+ let dh = gA._2
957+ if ((dh != unit))
958+ then eG
959+ else throw(("Y calculation error, Y = " + toString(eG)))
951960 }
952961
953962
954-@Callable(cP)
955-func calculateAmountOutForSwapREADONLY (gw,gs,gx) = {
956- let gy = if ((gs == false))
963+func gB () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
964+
965+
966+@Callable(cU)
967+func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
968+ let gE = if ((gx == false))
957969 then {
958- let gz = aJ(this, ak())
959- let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960- $Tuple2(gz, gt)
970+ let gF = aO(this, ak())
971+ let gy = (toBigInt(bS(aO(this, aj()))) + toBigInt(gC))
972+ $Tuple2(gF, gy)
961973 }
962974 else {
963- let gz = aJ(this, aj())
964- let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965- $Tuple2(gz, gt)
975+ let gF = aO(this, aj())
976+ let gy = (toBigInt(bS(aO(this, ak()))) + toBigInt(gC))
977+ $Tuple2(gF, gy)
966978 }
967- let gz = gy._1
968- let gt = gy._2
969- let bg = aY()
970- let dj = bg[w]
971- let dk = bg[x]
972- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
973- let et = cy(cz)
974- let eB = gr(gs, et, toBigInt(gw))
975- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
976- let gB = max([0, toInt(gA)])
977- let gC = if ((gs == false))
978- then [((toBigInt(bN(dj)) + toBigInt(gw)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
979- else [(toBigInt(bN(dj)) - gA), ((toBigInt(bN(dk)) + toBigInt(gw)) + toBigInt(gx))]
980- let gD = cy(gC)
981- let dY = if ((gD >= et))
979+ let gF = gE._1
980+ let gy = gE._2
981+ let bl = bd()
982+ let do = bl[w]
983+ let dp = bl[x]
984+ let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
985+ let ey = cD(cE)
986+ let eG = gw(gx, ey, toBigInt(gC))
987+ let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
988+ let gH = max([0, toInt(gG)])
989+ let gI = if ((gx == false))
990+ then [((toBigInt(bS(do)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
991+ else [(toBigInt(bS(do)) - gG), ((toBigInt(bS(dp)) + toBigInt(gC)) + toBigInt(gD))]
992+ let gJ = cD(gI)
993+ let ed = if ((gJ >= ey))
982994 then true
983- else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__"))
984- if ((dY == dY))
985- then $Tuple2(nil, gB)
995+ else throw(makeString(["new D is fewer error", toString(ey), toString(gJ)], "__"))
996+ if ((ed == ed))
997+ then $Tuple2(nil, gH)
986998 else throw("Strict value is not equal to itself.")
987999 }
9881000
9891001
9901002
991-@Callable(cP)
992-func calculateAmountOutForSwapAndSendTokens (gw,gs,gE,gF,gx) = {
993- let gG = {
994- let aS = invoke(aQ, "getSwapContractREADONLY", nil, nil)
995- if ($isInstanceOf(aS, "String"))
996- then aS
997- else throw(($getType(aS) + " couldn't be cast to String"))
1003+@Callable(cU)
1004+func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1005+ let gM = {
1006+ let aX = invoke(aV, "getSwapContractREADONLY", nil, nil)
1007+ if ($isInstanceOf(aX, "String"))
1008+ then aX
1009+ else throw(($getType(aX) + " couldn't be cast to String"))
9981010 }
999- let gH = [if ((value(cP.payments[0]).amount >= gw))
1011+ let gN = [if ((value(cU.payments[0]).amount >= gC))
10001012 then true
1001- else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG)))
1013+ else aS("Wrong amount"), if ((cU.caller == addressFromStringValue(gM)))
10021014 then true
1003- else aN("Permission denied")]
1004- if ((gH == gH))
1015+ else aS("Permission denied")]
1016+ if ((gN == gN))
10051017 then {
1006- let fk = value(cP.payments[0])
1007- let gI = be(fk.assetId)
1008- let gJ = if ((gs == false))
1018+ let fp = value(cU.payments[0])
1019+ let gO = bj(fp.assetId)
1020+ let gP = if ((gx == false))
10091021 then {
1010- let gz = aJ(this, ak())
1011- let gt = (bN(gI) - value(cP.payments[0]).amount)
1012- $Tuple2(gz, gt)
1022+ let gF = aO(this, ak())
1023+ let gy = (bS(gO) - value(cU.payments[0]).amount)
1024+ $Tuple2(gF, gy)
10131025 }
10141026 else {
1015- let gz = aJ(this, aj())
1016- let gt = (bN(gI) - value(cP.payments[0]).amount)
1017- $Tuple2(gz, gt)
1027+ let gF = aO(this, aj())
1028+ let gy = (bS(gO) - value(cU.payments[0]).amount)
1029+ $Tuple2(gF, gy)
10181030 }
1019- let gz = gJ._1
1020- let gt = gJ._2
1021- let bg = aY()
1022- let dj = bg[w]
1023- let dk = bg[x]
1024- let cz = if ((gs == false))
1025- then [(toBigInt(bN(dj)) - toBigInt(value(cP.payments[0]).amount)), toBigInt(bN(dk))]
1026- else [toBigInt(bN(dj)), (toBigInt(bN(dk)) - toBigInt(value(cP.payments[0]).amount))]
1027- let et = cy(cz)
1028- let eB = gr(gs, et, toBigInt(0))
1029- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
1030- let gB = max([0, toInt(gA)])
1031- let gK = if ((gB >= gE))
1031+ let gF = gP._1
1032+ let gy = gP._2
1033+ let bl = bd()
1034+ let do = bl[w]
1035+ let dp = bl[x]
1036+ let cE = if ((gx == false))
1037+ then [(toBigInt(bS(do)) - toBigInt(value(cU.payments[0]).amount)), toBigInt(bS(dp))]
1038+ else [toBigInt(bS(do)), (toBigInt(bS(dp)) - toBigInt(value(cU.payments[0]).amount))]
1039+ let ey = cD(cE)
1040+ let eG = gw(gx, ey, toBigInt(0))
1041+ let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
1042+ let gH = max([0, toInt(gG)])
1043+ let gQ = if ((gH >= gK))
10321044 then true
10331045 else throw("Exchange result is fewer coins than expected")
1034- if ((gK == gK))
1046+ if ((gQ == gQ))
10351047 then {
1036- let gC = if ((gs == false))
1037- then [(toBigInt(bN(dj)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
1038- else [(toBigInt(bN(dj)) - gA), (toBigInt(bN(dk)) + toBigInt(gx))]
1039- let gD = cy(gC)
1040- let dY = if ((gD >= et))
1048+ let gI = if ((gx == false))
1049+ then [(toBigInt(bS(do)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
1050+ else [(toBigInt(bS(do)) - gG), (toBigInt(bS(dp)) + toBigInt(gD))]
1051+ let gJ = cD(gI)
1052+ let ed = if ((gJ >= ey))
10411053 then true
10421054 else throw("new D is fewer error")
1043- if ((dY == dY))
1044- then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB)
1055+ if ((ed == ed))
1056+ then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bh(gF))], gH)
10451057 else throw("Strict value is not equal to itself.")
10461058 }
10471059 else throw("Strict value is not equal to itself.")
10511063
10521064
10531065
1054-@Callable(cP)
1066+@Callable(cU)
10551067 func constructor (Y) = {
1056- let ex = gq(cP)
1057- if ((ex == ex))
1068+ let eC = gv(cU)
1069+ if ((eC == eC))
10581070 then [StringEntry(Y(), Y)]
10591071 else throw("Strict value is not equal to itself.")
10601072 }
10611073
10621074
10631075
1064-@Callable(cP)
1065-func setManager (gL) = {
1066- let ex = gq(cP)
1067- if ((ex == ex))
1076+@Callable(cU)
1077+func setManager (gR) = {
1078+ let eC = gv(cU)
1079+ if ((eC == eC))
10681080 then {
1069- let gM = fromBase58String(gL)
1070- if ((gM == gM))
1071- then [StringEntry(aa(), gL)]
1081+ let gS = fromBase58String(gR)
1082+ if ((gS == gS))
1083+ then [StringEntry(aa(), gR)]
10721084 else throw("Strict value is not equal to itself.")
10731085 }
10741086 else throw("Strict value is not equal to itself.")
10761088
10771089
10781090
1079-@Callable(cP)
1091+@Callable(cU)
10801092 func confirmManager () = {
1081- let cu = gm()
1082- let gN = if (isDefined(cu))
1093+ let cz = gr()
1094+ let gT = if (isDefined(cz))
10831095 then true
10841096 else throw("No pending manager")
1085- if ((gN == gN))
1097+ if ((gT == gT))
10861098 then {
1087- let gO = if ((cP.callerPublicKey == value(cu)))
1099+ let gU = if ((cU.callerPublicKey == value(cz)))
10881100 then true
10891101 else throw("You are not pending manager")
1090- if ((gO == gO))
1091- then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
1102+ if ((gU == gU))
1103+ then [StringEntry(Z(), toBase58String(value(cz))), DeleteEntry(aa())]
10921104 else throw("Strict value is not equal to itself.")
10931105 }
10941106 else throw("Strict value is not equal to itself.")
10961108
10971109
10981110
1099-@Callable(cP)
1100-func put (gP,gQ) = {
1101- let gR = bs()
1102- let gS = valueOrErrorMessage(addressFromString(gR[C]), "Wr st addr")
1103- let gT = valueOrErrorMessage(addressFromString(gR[E]), "Wr sl addr")
1104- if ((0 > gP))
1111+@Callable(cU)
1112+func put (gV,gW) = {
1113+ let gX = bx()
1114+ let gY = valueOrErrorMessage(addressFromString(gX[C]), "Wr st addr")
1115+ let gZ = valueOrErrorMessage(addressFromString(gX[E]), "Wr sl addr")
1116+ if ((0 > gV))
11051117 then throw("Wrong slippage")
1106- else if ((size(cP.payments) != 2))
1118+ else if ((size(cU.payments) != 2))
11071119 then throw("2 pmnts expd")
11081120 else {
1109- let gU = toBigInt(value(cP.payments[0]).amount)
1110- let gV = toBigInt(value(cP.payments[1]).amount)
1111- let eO = (toBigInt(bN(be(bm))) - gU)
1112- if ((eO == eO))
1121+ let ha = toBigInt(value(cU.payments[0]).amount)
1122+ let hb = toBigInt(value(cU.payments[1]).amount)
1123+ let eT = (toBigInt(bS(bj(br))) - ha)
1124+ if ((eT == eT))
11131125 then {
1114- let eP = (toBigInt(bN(be(bn))) - gV)
1115- if ((eP == eP))
1126+ let eU = (toBigInt(bS(bj(bs))) - hb)
1127+ if ((eU == eU))
11161128 then {
1117- let eQ = toBigInt(value(assetInfo(bl)).quantity)
1118- if ((eQ == eQ))
1129+ let eV = toBigInt(value(assetInfo(bq)).quantity)
1130+ if ((eV == eV))
11191131 then {
1120- let eR = eK(gU, gV, toBigInt(0))
1121- if ((eR == eR))
1132+ let eW = eP(ha, hb, toBigInt(0))
1133+ if ((eW == eW))
11221134 then {
1123- let gW = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gP, true, false, true, 0, "")
1124- let el = gW._2
1125- let gX = gW._7
1126- let dB = gW._9
1127- let em = gW._10
1128- let en = gW._11
1129- let dj = gW._12
1130- let dk = gW._13
1131- let dX = invoke(aQ, "emit", [el], nil)
1132- if ((dX == dX))
1135+ let hc = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], gV, true, false, true, 0, "")
1136+ let eq = hc._2
1137+ let hd = hc._7
1138+ let dG = hc._9
1139+ let er = hc._10
1140+ let es = hc._11
1141+ let do = hc._12
1142+ let dp = hc._13
1143+ let ec = invoke(aV, "emit", [eq], nil)
1144+ if ((ec == ec))
11331145 then {
1134- let gY = {
1135- let gl = dX
1136- if ($isInstanceOf(gl, "Address"))
1146+ let he = {
1147+ let gq = ec
1148+ if ($isInstanceOf(gq, "Address"))
11371149 then {
1138- let gZ = gl
1139- invoke(gZ, "emit", [el], nil)
1150+ let hf = gq
1151+ invoke(hf, "emit", [eq], nil)
11401152 }
11411153 else unit
11421154 }
1143- if ((gY == gY))
1155+ if ((he == he))
11441156 then {
1145- let ha = if ((em > 0))
1146- then invoke(gT, "put", nil, [AttachedPayment(dj, em)])
1157+ let hg = if ((er > 0))
1158+ then invoke(gZ, "put", nil, [AttachedPayment(do, er)])
11471159 else nil
1148- if ((ha == ha))
1160+ if ((hg == hg))
11491161 then {
1150- let hb = if ((en > 0))
1151- then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
1162+ let hh = if ((es > 0))
1163+ then invoke(gZ, "put", nil, [AttachedPayment(dp, es)])
11521164 else nil
1153- if ((hb == hb))
1165+ if ((hh == hh))
11541166 then {
1155- let hc = if (gQ)
1167+ let hi = if (gW)
11561168 then {
1157- let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)])
1158- if ((hd == hd))
1169+ let hj = invoke(gY, "stake", nil, [AttachedPayment(hd, eq)])
1170+ if ((hj == hj))
11591171 then nil
11601172 else throw("Strict value is not equal to itself.")
11611173 }
1162- else [ScriptTransfer(cP.caller, el, gX)]
1163- let he = eS(0, 0, 0)
1164- let gi = he._1
1165- let eJ = he._2
1166- let hf = if ((eJ >= eR))
1174+ else [ScriptTransfer(cU.caller, eq, hd)]
1175+ let hk = eX(0, 0, 0)
1176+ let gn = hk._1
1177+ let eO = hk._2
1178+ let hl = if ((eO >= eW))
11671179 then true
1168- else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " "))
1169- if ((hf == hf))
1180+ else aS(makeString(["updated DLp lower than current DLp", toString(eT), toString(eU), toString(eV), toString(eW), toString(eO), toString(er), toString(es)], " "))
1181+ if ((hl == hl))
11701182 then {
1171- let hg = value(assetInfo(bl)).quantity
1172- if ((hg == hg))
1173- then ((dB ++ hc) ++ gi)
1183+ let hm = value(assetInfo(bq)).quantity
1184+ if ((hm == hm))
1185+ then ((dG ++ hi) ++ gn)
11741186 else throw("Strict value is not equal to itself.")
11751187 }
11761188 else throw("Strict value is not equal to itself.")
11951207
11961208
11971209
1198-@Callable(cP)
1199-func putOneTknV2 (fM,gQ) = {
1200- let hh = {
1201- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1202- if ($isInstanceOf(aS, "Boolean"))
1203- then aS
1204- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1210+@Callable(cU)
1211+func putOneTknV2 (fR,gW) = {
1212+ let hn = {
1213+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1214+ if ($isInstanceOf(aX, "Boolean"))
1215+ then aX
1216+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
12051217 }
1206- let hi = if (if (if (aV())
1218+ let ho = if (if (if (ba())
12071219 then true
1208- else (bk == q))
1220+ else (bp == q))
12091221 then true
1210- else (bk == s))
1222+ else (bp == s))
12111223 then true
1212- else hh
1213- let gH = [if (if (!(hi))
1224+ else hn
1225+ let gN = [if (if (!(ho))
12141226 then true
1215- else go(cP))
1227+ else gt(cU))
12161228 then true
1217- else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
1229+ else aS("put operation is blocked by admin"), if ((size(cU.payments) == 1))
12181230 then true
1219- else aN("exactly 1 payment are expected")]
1220- if ((gH == gH))
1231+ else aS("exactly 1 payment are expected")]
1232+ if ((gN == gN))
12211233 then {
1222- let dj = toBase58String(value(bm))
1223- let dk = toBase58String(value(bn))
1224- let di = bl
1225- let fQ = bo
1226- let fR = bp
1227- let dh = if ((cP.caller == this))
1228- then cP.originCaller
1229- else cP.caller
1230- let fk = value(cP.payments[0])
1231- let df = toBase58String(value(fk.assetId))
1232- let dL = fk.amount
1233- let eR = if ((fk.assetId == bm))
1234- then eK(toBigInt(dL), toBigInt(0), toBigInt(0))
1235- else eK(toBigInt(0), toBigInt(dL), toBigInt(0))
1236- if ((eR == eR))
1234+ let do = toBase58String(value(br))
1235+ let dp = toBase58String(value(bs))
1236+ let dn = bq
1237+ let fV = bt
1238+ let fW = bu
1239+ let dm = if ((cU.caller == this))
1240+ then cU.originCaller
1241+ else cU.caller
1242+ let fp = value(cU.payments[0])
1243+ let dk = toBase58String(value(fp.assetId))
1244+ let dQ = fp.amount
1245+ let eW = if ((fp.assetId == br))
1246+ then eP(toBigInt(dQ), toBigInt(0), toBigInt(0))
1247+ else eP(toBigInt(0), toBigInt(dQ), toBigInt(0))
1248+ if ((eW == eW))
12371249 then {
1238- let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1239- if ((hj == hj))
1250+ let hp = fu(dQ, dk, toString(dm), toBase58String(cU.transactionId), true)
1251+ if ((hp == hp))
12401252 then {
1241- let cx = hj._3
1242- let dB = hj._2
1243- let hk = hj._1
1244- let el = if (if ((fM > 0))
1245- then (fM > hk)
1253+ let cC = hp._3
1254+ let dG = hp._2
1255+ let hq = hp._1
1256+ let eq = if (if ((fR > 0))
1257+ then (fR > hq)
12461258 else false)
1247- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
1248- else hk
1249- let gW = invoke(aQ, "emit", [el], nil)
1250- if ((gW == gW))
1259+ then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
1260+ else hq
1261+ let hc = invoke(aV, "emit", [eq], nil)
1262+ if ((hc == hc))
12511263 then {
1252- let gY = {
1253- let gl = gW
1254- if ($isInstanceOf(gl, "Address"))
1264+ let he = {
1265+ let gq = hc
1266+ if ($isInstanceOf(gq, "Address"))
12551267 then {
1256- let gZ = gl
1257- invoke(gZ, "emit", [el], nil)
1268+ let hf = gq
1269+ invoke(hf, "emit", [eq], nil)
12581270 }
12591271 else unit
12601272 }
1261- if ((gY == gY))
1273+ if ((he == he))
12621274 then {
1263- let hc = if (gQ)
1275+ let hi = if (gW)
12641276 then {
1265- let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1266- if ((hd == hd))
1277+ let hj = invoke(bz, "stakeFor", [toString(cU.caller)], [AttachedPayment(dn, eq)])
1278+ if ((hj == hj))
12671279 then nil
12681280 else throw("Strict value is not equal to itself.")
12691281 }
1270- else [ScriptTransfer(cP.caller, el, di)]
1271- let gc = if ((cx > 0))
1272- then [ScriptTransfer(aX, cx, fromBase58String(df))]
1282+ else [ScriptTransfer(cU.caller, eq, dn)]
1283+ let gh = if ((cC > 0))
1284+ then [ScriptTransfer(bc, cC, fromBase58String(dk))]
12731285 else nil
1274- let hl = if ((this == aX))
1286+ let hr = if ((this == bc))
12751287 then $Tuple2(0, 0)
12761288 else {
1277- let hm = if ((fk.assetId == bm))
1289+ let hs = if ((fp.assetId == br))
12781290 then true
12791291 else false
1280- if (hm)
1281- then $Tuple2(-(cx), 0)
1282- else $Tuple2(0, -(cx))
1292+ if (hs)
1293+ then $Tuple2(-(cC), 0)
1294+ else $Tuple2(0, -(cC))
12831295 }
1284- let eT = hl._1
1285- let eU = hl._2
1286- let hn = eS(eT, eU, 0)
1287- let gi = hn._1
1288- let eJ = hn._2
1289- let gj = eW(eR, eJ)
1290- if ((gj == gj))
1291- then $Tuple2((((dB ++ hc) ++ gc) ++ gi), el)
1296+ let eY = hr._1
1297+ let eZ = hr._2
1298+ let ht = eX(eY, eZ, 0)
1299+ let gn = ht._1
1300+ let eO = ht._2
1301+ let go = fb(eW, eO)
1302+ if ((go == go))
1303+ then $Tuple2((((dG ++ hi) ++ gh) ++ gn), eq)
12921304 else throw("Strict value is not equal to itself.")
12931305 }
12941306 else throw("Strict value is not equal to itself.")
13041316
13051317
13061318
1307-@Callable(cP)
1308-func putForFree (ho) = if ((0 > ho))
1319+@Callable(cU)
1320+func putForFree (hu) = if ((0 > hu))
13091321 then throw("Wrong slpg")
1310- else if ((size(cP.payments) != 2))
1322+ else if ((size(cU.payments) != 2))
13111323 then throw("2 pmnts expd")
13121324 else {
1313- let hp = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], ho, false, false, true, 0, "")
1314- let dB = hp._9
1315- let gU = toBigInt(value(cP.payments[0]).amount)
1316- let gV = toBigInt(value(cP.payments[1]).amount)
1317- let eR = eK(gU, gV, toBigInt(0))
1318- if ((eR == eR))
1325+ let hv = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], hu, false, false, true, 0, "")
1326+ let dG = hv._9
1327+ let ha = toBigInt(value(cU.payments[0]).amount)
1328+ let hb = toBigInt(value(cU.payments[1]).amount)
1329+ let eW = eP(ha, hb, toBigInt(0))
1330+ if ((eW == eW))
13191331 then {
1320- let hq = eS(0, 0, 0)
1321- let gi = hq._1
1322- let eJ = hq._2
1323- let gj = eW(eR, eJ)
1324- if ((gj == gj))
1325- then (dB ++ gi)
1332+ let hw = eX(0, 0, 0)
1333+ let gn = hw._1
1334+ let eO = hw._2
1335+ let go = fb(eW, eO)
1336+ if ((go == go))
1337+ then (dG ++ gn)
13261338 else throw("Strict value is not equal to itself.")
13271339 }
13281340 else throw("Strict value is not equal to itself.")
13301342
13311343
13321344
1333-@Callable(cP)
1345+@Callable(cU)
13341346 func get () = {
1335- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1336- if ((eR == eR))
1347+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1348+ if ((eW == eW))
13371349 then {
1338- let dX = fj(cP)
1339- let hr = dX._1
1340- let dA = dX._2
1341- let dL = dX._3
1342- let df = dX._4
1343- let dB = dX._5
1344- let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1345- if ((ey == ey))
1350+ let ec = fo(cU)
1351+ let hx = ec._1
1352+ let dF = ec._2
1353+ let dQ = ec._3
1354+ let dk = ec._4
1355+ let dG = ec._5
1356+ let eD = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1357+ if ((eD == eD))
13461358 then {
1347- let hs = eS(-(hr), -(dA), 0)
1348- let gi = hs._1
1349- let eJ = hs._2
1350- let gj = eW(eR, eJ)
1351- if ((gj == gj))
1352- then (dB ++ gi)
1359+ let hy = eX(-(hx), -(dF), 0)
1360+ let gn = hy._1
1361+ let eO = hy._2
1362+ let go = fb(eW, eO)
1363+ if ((go == go))
1364+ then (dG ++ gn)
13531365 else throw("Strict value is not equal to itself.")
13541366 }
13551367 else throw("Strict value is not equal to itself.")
13591371
13601372
13611373
1362-@Callable(cP)
1363-func getOneTknV2 (fL,fM) = {
1364- let hh = {
1365- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1366- if ($isInstanceOf(aS, "Boolean"))
1367- then aS
1368- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1374+@Callable(cU)
1375+func getOneTknV2 (fQ,fR) = {
1376+ let hn = {
1377+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1378+ if ($isInstanceOf(aX, "Boolean"))
1379+ then aX
1380+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
13691381 }
1370- let ht = if (if (aV())
1382+ let hz = if (if (ba())
13711383 then true
1372- else (bk == s))
1384+ else (bp == s))
13731385 then true
1374- else hh
1375- let gH = [if (if (!(ht))
1386+ else hn
1387+ let gN = [if (if (!(hz))
13761388 then true
1377- else go(cP))
1389+ else gt(cU))
13781390 then true
1379- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
1391+ else aS("get operation is blocked by admin"), if ((size(cU.payments) == 1))
13801392 then true
1381- else aN("exactly 1 payment are expected")]
1382- if ((gH == gH))
1393+ else aS("exactly 1 payment are expected")]
1394+ if ((gN == gN))
13831395 then {
1384- let hu = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId)
1385- let dB = hu._1
1386- let fV = hu._2
1387- $Tuple2(dB, fV)
1396+ let hA = fP(fQ, fR, cU.payments, cU.caller, cU.originCaller, cU.transactionId)
1397+ let dG = hA._1
1398+ let ga = hA._2
1399+ $Tuple2(dG, ga)
13881400 }
13891401 else throw("Strict value is not equal to itself.")
13901402 }
13911403
13921404
13931405
1394-@Callable(cP)
1406+@Callable(cU)
13951407 func refreshDLp () = {
1396- let hv = valueOrElse(getInteger(aq), 0)
1397- let hw = if (((height - hv) >= at))
1408+ let hB = valueOrElse(getInteger(at), 0)
1409+ let hC = if (((height - hB) >= aw))
13981410 then unit
1399- else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1400- if ((hw == hw))
1411+ else aS(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1412+ if ((hC == hC))
14011413 then {
1402- let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp"))
1403- let hx = eS(0, 0, 0)
1404- let hy = hx._1
1405- let eJ = hx._2
1406- let eV = if ((fd != eJ))
1407- then hy
1408- else aN("nothing to refresh")
1409- $Tuple2(eV, toString(eJ))
1414+ let fi = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), aU("invalid dLp"))
1415+ let hD = eX(0, 0, 0)
1416+ let hE = hD._1
1417+ let eO = hD._2
1418+ let fa = if ((fi != eO))
1419+ then hE
1420+ else aS("nothing to refresh")
1421+ $Tuple2(fa, toString(eO))
14101422 }
14111423 else throw("Strict value is not equal to itself.")
14121424 }
14131425
14141426
14151427
1416-@Callable(cP)
1417-func getOneTknV2READONLY (fL,hz) = {
1418- let dj = toBase58String(value(bm))
1419- let dk = toBase58String(value(bn))
1420- let di = toBase58String(value(bl))
1421- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1422- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1423- let cb = cy(cz)
1424- let ca = (cb - fraction(toBigInt(hz), cb, eI))
1425- let hA = if ((fL == dj))
1428+@Callable(cU)
1429+func getOneTknV2READONLY (fQ,hF) = {
1430+ let do = toBase58String(value(br))
1431+ let dp = toBase58String(value(bs))
1432+ let dn = toBase58String(value(bq))
1433+ let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
1434+ let eN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dn)), "invalid lp asset").quantity)
1435+ let cg = cD(cE)
1436+ let cf = (cg - fraction(toBigInt(hF), cg, eN))
1437+ let hG = if ((fQ == do))
14261438 then 0
1427- else if ((fL == dk))
1439+ else if ((fQ == dp))
14281440 then 1
14291441 else throw("invalid out asset id")
1430- let hB = es(cz, hA, ca)
1431- let gA = (cz[hA] - hB)
1432- let gB = max([0, toInt((gA - f))])
1433- let hC = cv(gB, aT)
1434- let fU = hC._1
1435- let cx = hC._2
1436- $Tuple2(nil, $Tuple2(fU, cx))
1442+ let hH = ex(cE, hG, cf)
1443+ let gG = (cE[hG] - hH)
1444+ let gH = max([0, toInt((gG - f))])
1445+ let hI = cA(gH, aY)
1446+ let fZ = hI._1
1447+ let cC = hI._2
1448+ $Tuple2(nil, $Tuple2(fZ, cC))
14371449 }
14381450
14391451
14401452
1441-@Callable(cP)
1442-func getOneTknV2WithBonusREADONLY (fL,hz) = {
1443- let dj = toBase58String(value(bm))
1444- let dk = toBase58String(value(bn))
1445- let di = toBase58String(value(bl))
1446- let dp = bN(dj)
1447- let dr = bN(dk)
1448- let hD = {
1449- let aS = invoke(this, "getOneTknV2READONLY", [fL, hz], nil)
1450- if ($isInstanceOf(aS, "(Int, Int)"))
1451- then aS
1452- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
1453+@Callable(cU)
1454+func getOneTknV2WithBonusREADONLY (fQ,hF) = {
1455+ let do = toBase58String(value(br))
1456+ let dp = toBase58String(value(bs))
1457+ let dn = toBase58String(value(bq))
1458+ let du = bS(do)
1459+ let dw = bS(dp)
1460+ let hJ = {
1461+ let aX = invoke(this, "getOneTknV2READONLY", [fQ, hF], nil)
1462+ if ($isInstanceOf(aX, "(Int, Int)"))
1463+ then aX
1464+ else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
14531465 }
1454- let fU = hD._1
1455- let cx = hD._2
1456- let dX = dd("", di, hz, this)
1457- let dz = dX._1
1458- let dA = dX._2
1459- let hE = (dz + dA)
1460- let fJ = if ((hE == 0))
1461- then if ((fU == 0))
1466+ let fZ = hJ._1
1467+ let cC = hJ._2
1468+ let ec = di("", dn, hF, this)
1469+ let dE = ec._1
1470+ let dF = ec._2
1471+ let hK = (dE + dF)
1472+ let fO = if ((hK == 0))
1473+ then if ((fZ == 0))
14621474 then 0
14631475 else throw("bonus calculation error")
1464- else fraction((fU - hE), a, hE)
1465- $Tuple2(nil, $Tuple3(fU, cx, fJ))
1476+ else fraction((fZ - hK), a, hK)
1477+ $Tuple2(nil, $Tuple3(fZ, cC, fO))
14661478 }
14671479
14681480
14691481
1470-@Callable(cP)
1471-func getNoLess (hF,hG) = {
1472- let dX = fj(cP)
1473- let dz = dX._1
1474- let dA = dX._2
1475- let dL = dX._3
1476- let df = dX._4
1477- let dB = dX._5
1478- if ((hF > dz))
1479- then throw(((("Failed: " + toString(dz)) + " < ") + toString(hF)))
1480- else if ((hG > dA))
1481- then throw(((("Failed: " + toString(dA)) + " < ") + toString(hG)))
1482+@Callable(cU)
1483+func getNoLess (hL,hM) = {
1484+ let ec = fo(cU)
1485+ let dE = ec._1
1486+ let dF = ec._2
1487+ let dQ = ec._3
1488+ let dk = ec._4
1489+ let dG = ec._5
1490+ if ((hL > dE))
1491+ then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL)))
1492+ else if ((hM > dF))
1493+ then throw(((("Failed: " + toString(dF)) + " < ") + toString(hM)))
14821494 else {
1483- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1484- if ((eR == eR))
1495+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1496+ if ((eW == eW))
14851497 then {
1486- let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1487- if ((hH == hH))
1498+ let hN = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1499+ if ((hN == hN))
14881500 then {
1489- let hI = eS(-(dz), -(dA), 0)
1490- let gi = hI._1
1491- let eJ = hI._2
1492- let gj = eW(eR, eJ)
1493- if ((gj == gj))
1494- then (dB ++ gi)
1501+ let hO = eX(-(dE), -(dF), 0)
1502+ let gn = hO._1
1503+ let eO = hO._2
1504+ let go = fb(eW, eO)
1505+ if ((go == go))
1506+ then (dG ++ gn)
14951507 else throw("Strict value is not equal to itself.")
14961508 }
14971509 else throw("Strict value is not equal to itself.")
15021514
15031515
15041516
1505-@Callable(cP)
1506-func unstakeAndGet (cw) = {
1507- let hJ = if ((size(cP.payments) != 0))
1517+@Callable(cU)
1518+func unstakeAndGet (cB) = {
1519+ let hP = if ((size(cU.payments) != 0))
15081520 then throw("No pmnts expd")
15091521 else true
1510- if ((hJ == hJ))
1522+ if ((hP == hP))
15111523 then {
1512- let hK = bs()
1513- let gX = bl
1514- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1515- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1516- if ((eR == eR))
1524+ let hQ = bx()
1525+ let hd = bq
1526+ let hR = valueOrErrorMessage(addressFromString(hQ[C]), "Wr st addr")
1527+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1528+ if ((eW == eW))
15171529 then {
1518- let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil)
1519- if ((hM == hM))
1530+ let hS = invoke(hR, "unstake", [toBase58String(hd), cB], nil)
1531+ if ((hS == hS))
15201532 then {
1521- let dX = dd(toBase58String(cP.transactionId), toBase58String(gX), cw, cP.caller)
1522- let dz = dX._1
1523- let dA = dX._2
1524- let dn = parseIntValue(dX._9)
1525- let dB = dX._10
1526- let hN = if (if (aV())
1533+ let ec = di(toBase58String(cU.transactionId), toBase58String(hd), cB, cU.caller)
1534+ let dE = ec._1
1535+ let dF = ec._2
1536+ let ds = parseIntValue(ec._9)
1537+ let dG = ec._10
1538+ let hT = if (if (ba())
15271539 then true
1528- else (dn == s))
1529- then throw(("Blocked: " + toString(dn)))
1540+ else (ds == s))
1541+ then throw(("Blocked: " + toString(ds)))
15301542 else true
1531- if ((hN == hN))
1543+ if ((hT == hT))
15321544 then {
1533- let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)])
1534- if ((hO == hO))
1545+ let hU = invoke(aV, "burn", [cB], [AttachedPayment(hd, cB)])
1546+ if ((hU == hU))
15351547 then {
1536- let hP = eS(-(dz), -(dA), 0)
1537- let gi = hP._1
1538- let eJ = hP._2
1539- let gj = eW(eR, eJ)
1540- if ((gj == gj))
1541- then (dB ++ gi)
1548+ let hV = eX(-(dE), -(dF), 0)
1549+ let gn = hV._1
1550+ let eO = hV._2
1551+ let go = fb(eW, eO)
1552+ if ((go == go))
1553+ then (dG ++ gn)
15421554 else throw("Strict value is not equal to itself.")
15431555 }
15441556 else throw("Strict value is not equal to itself.")
15541566
15551567
15561568
1557-@Callable(cP)
1558-func unstakeAndGetNoLess (hQ,hR,hG) = {
1559- let ht = if (aV())
1569+@Callable(cU)
1570+func unstakeAndGetNoLess (hW,hX,hM) = {
1571+ let hz = if (ba())
15601572 then true
1561- else (bk == s)
1562- let gH = [if (!(ht))
1573+ else (bp == s)
1574+ let gN = [if (!(hz))
15631575 then true
1564- else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1576+ else throw("get operation is blocked by admin"), if ((size(cU.payments) == 0))
15651577 then true
15661578 else throw("no payments are expected")]
1567- if ((gH == gH))
1579+ if ((gN == gN))
15681580 then {
1569- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1570- if ((eR == eR))
1581+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1582+ if ((eW == eW))
15711583 then {
1572- let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil)
1573- if ((hM == hM))
1584+ let hS = invoke(bz, "unstake", [toBase58String(bq), hW], nil)
1585+ if ((hS == hS))
15741586 then {
1575- let hS = dd(toBase58String(cP.transactionId), toBase58String(bl), hQ, cP.caller)
1576- let dz = hS._1
1577- let dA = hS._2
1578- let dB = hS._10
1579- let hT = [if ((dz >= hR))
1587+ let hY = di(toBase58String(cU.transactionId), toBase58String(bq), hW, cU.caller)
1588+ let dE = hY._1
1589+ let dF = hY._2
1590+ let dG = hY._10
1591+ let hZ = [if ((dE >= hX))
15801592 then true
1581- else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG))
1593+ else throw(makeString(["amount asset amount to receive is less than ", toString(hX)], "")), if ((dF >= hM))
15821594 then true
1583- else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1584- if ((hT == hT))
1595+ else throw(makeString(["price asset amount to receive is less than ", toString(hM)], ""))]
1596+ if ((hZ == hZ))
15851597 then {
1586- let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)])
1587- if ((hH == hH))
1598+ let hN = invoke(aV, "burn", [hW], [AttachedPayment(bq, hW)])
1599+ if ((hN == hN))
15881600 then {
1589- let hU = eS(-(dz), -(dA), 0)
1590- let gi = hU._1
1591- let eJ = hU._2
1592- let gj = eW(eR, eJ)
1593- if ((gj == gj))
1594- then (dB ++ gi)
1601+ let ia = eX(-(dE), -(dF), 0)
1602+ let gn = ia._1
1603+ let eO = ia._2
1604+ let go = fb(eW, eO)
1605+ if ((go == go))
1606+ then (dG ++ gn)
15951607 else throw("Strict value is not equal to itself.")
15961608 }
15971609 else throw("Strict value is not equal to itself.")
16071619
16081620
16091621
1610-@Callable(cP)
1611-func unstakeAndGetOneTknV2 (hQ,fL,fM) = {
1612- let hh = {
1613- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1614- if ($isInstanceOf(aS, "Boolean"))
1615- then aS
1616- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1622+@Callable(cU)
1623+func unstakeAndGetOneTknV2 (hW,fQ,fR) = {
1624+ let hn = {
1625+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1626+ if ($isInstanceOf(aX, "Boolean"))
1627+ then aX
1628+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
16171629 }
1618- let ht = if (if (aV())
1630+ let hz = if (if (ba())
16191631 then true
1620- else (bk == s))
1632+ else (bp == s))
16211633 then true
1622- else hh
1623- let gH = [if (if (!(ht))
1634+ else hn
1635+ let gN = [if (if (!(hz))
16241636 then true
1625- else go(cP))
1637+ else gt(cU))
16261638 then true
1627- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1639+ else aS("get operation is blocked by admin"), if ((size(cU.payments) == 0))
16281640 then true
1629- else aN("no payments are expected")]
1630- if ((gH == gH))
1641+ else aS("no payments are expected")]
1642+ if ((gN == gN))
16311643 then {
1632- let hK = bs()
1633- let gX = bl
1634- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1635- let dh = cP.caller
1636- let hV = this
1637- let hM = invoke(hL, "unstakeINTERNAL", [gX, hQ, dh.bytes, hV.bytes], nil)
1638- if ((hM == hM))
1644+ let hQ = bx()
1645+ let hd = bq
1646+ let hR = valueOrErrorMessage(addressFromString(hQ[C]), "Wr st addr")
1647+ let dm = cU.caller
1648+ let ib = this
1649+ let hS = invoke(hR, "unstakeINTERNAL", [hd, hW, dm.bytes, ib.bytes], nil)
1650+ if ((hS == hS))
16391651 then {
1640- let hW = fK(fL, fM, [AttachedPayment(gX, hQ)], cP.caller, cP.originCaller, cP.transactionId)
1641- let dB = hW._1
1642- let fV = hW._2
1643- $Tuple2(dB, fV)
1652+ let ic = fP(fQ, fR, [AttachedPayment(hd, hW)], cU.caller, cU.originCaller, cU.transactionId)
1653+ let dG = ic._1
1654+ let ga = ic._2
1655+ $Tuple2(dG, ga)
16441656 }
16451657 else throw("Strict value is not equal to itself.")
16461658 }
16491661
16501662
16511663
1652-@Callable(cP)
1653-func putOneTknV2WithBonusREADONLY (hX,hY) = {
1654- let hZ = fp(hX, hY, "", "", true)
1655- let fE = hZ._1
1656- let dB = hZ._2
1657- let cx = hZ._3
1658- let fJ = hZ._4
1659- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1664+@Callable(cU)
1665+func putOneTknV2WithBonusREADONLY (id,ie) = {
1666+ let if = fu(id, ie, "", "", true)
1667+ let fJ = if._1
1668+ let dG = if._2
1669+ let cC = if._3
1670+ let fO = if._4
1671+ $Tuple2(nil, $Tuple3(fJ, cC, fO))
16601672 }
16611673
16621674
16631675
1664-@Callable(cP)
1665-func putOneTknV2WithoutTakeFeeREADONLY (hX,hY) = {
1666- let ia = fp(hX, hY, "", "", false)
1667- let fE = ia._1
1668- let dB = ia._2
1669- let cx = ia._3
1670- let fJ = ia._4
1671- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1676+@Callable(cU)
1677+func putOneTknV2WithoutTakeFeeREADONLY (id,ie) = {
1678+ let ig = fu(id, ie, "", "", false)
1679+ let fJ = ig._1
1680+ let dG = ig._2
1681+ let cC = ig._3
1682+ let fO = ig._4
1683+ $Tuple2(nil, $Tuple3(fJ, cC, fO))
16721684 }
16731685
16741686
16751687
1676-@Callable(cP)
1677-func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ)))
1688+@Callable(cU)
1689+func activate (ih,ii) = if ((toString(cU.caller) != toString(aV)))
16781690 then throw("denied")
1679- else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
1691+ else $Tuple2([StringEntry(aj(), ih), StringEntry(ak(), ii)], "success")
16801692
16811693
16821694
1683-@Callable(cP)
1684-func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1685- then gn
1686- else [StringEntry(id, hN)]
1695+@Callable(cU)
1696+func setS (ij,hT) = if ((toString(cU.caller) != aO(this, ao())))
1697+ then gs
1698+ else [StringEntry(ij, hT)]
16871699
16881700
16891701
1690-@Callable(cP)
1691-func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1692- then gn
1693- else [IntegerEntry(id, hN)]
1702+@Callable(cU)
1703+func setI (ij,hT) = if ((toString(cU.caller) != aO(this, ao())))
1704+ then gs
1705+ else [IntegerEntry(ij, hT)]
16941706
16951707
16961708
1697-@Callable(cP)
1698-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
1709+@Callable(cU)
1710+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bd())
16991711
17001712
17011713
1702-@Callable(cP)
1703-func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
1714+@Callable(cU)
1715+func getAccBalanceWrapperREADONLY (bT) = $Tuple2(nil, bS(bT))
17041716
17051717
17061718
1707-@Callable(cP)
1708-func calcPricesWrapperREADONLY (ch,ci,cm) = {
1709- let ie = cl(ch, ci, cm)
1710- $Tuple2(nil, [toString(ie[0]), toString(ie[1]), toString(ie[2])])
1719+@Callable(cU)
1720+func calcPricesWrapperREADONLY (cm,cn,cr) = {
1721+ let ik = cq(cm, cn, cr)
1722+ $Tuple2(nil, [toString(ik[0]), toString(ik[1]), toString(ik[2])])
17111723 }
17121724
17131725
17141726
1715-@Callable(cP)
1716-func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if))
1727+@Callable(cU)
1728+func fromX18WrapperREADONLY (M,il) = $Tuple2(nil, L(parseBigIntValue(M), il))
17171729
17181730
17191731
1720-@Callable(cP)
1732+@Callable(cU)
17211733 func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
17221734
17231735
17241736
1725-@Callable(cP)
1726-func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
1737+@Callable(cU)
1738+func calcPriceBigIntWrapperREADONLY (bV,bW) = $Tuple2(nil, toString(bU(parseBigIntValue(bV), parseBigIntValue(bW))))
17271739
17281740
17291741
1730-@Callable(cP)
1731-func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,ig,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, ig, dH, dI, true, false, 0, ""))
1742+@Callable(cU)
1743+func estimatePutOperationWrapperREADONLY (dj,cb,dI,dJ,dK,dL,im,dM,dN) = $Tuple2(nil, dH(dj, cb, dI, dJ, dK, dL, im, dM, dN, true, false, 0, ""))
17321744
17331745
17341746
1735-@Callable(cP)
1736-func estimateGetOperationWrapperREADONLY (de,ih,dg,ig) = {
1737- let dX = dd(de, ih, dg, addressFromStringValue(ig))
1738- $Tuple2(nil, $Tuple10(dX._1, dX._2, dX._3, dX._4, dX._5, dX._6, dX._7, toString(dX._8), dX._9, dX._10))
1747+@Callable(cU)
1748+func estimateGetOperationWrapperREADONLY (dj,in,dl,im) = {
1749+ let ec = di(dj, in, dl, addressFromStringValue(im))
1750+ $Tuple2(nil, $Tuple10(ec._1, ec._2, ec._3, ec._4, ec._5, ec._6, ec._7, toString(ec._8), ec._9, ec._10))
17391751 }
17401752
17411753
1742-@Verifier(ii)
1743-func ij () = {
1744- let ik = {
1745- let gl = gk()
1746- if ($isInstanceOf(gl, "ByteVector"))
1754+
1755+@Callable(cU)
1756+func changeAmp () = {
1757+ let io = invoke(aV, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1758+ let ip = {
1759+ let gq = io
1760+ if ($isInstanceOf(gq, "List[Any]"))
17471761 then {
1748- let gp = gl
1749- gp
1762+ let iq = gq
1763+ $Tuple3({
1764+ let aX = iq[0]
1765+ if ($isInstanceOf(aX, "Int"))
1766+ then aX
1767+ else throw(($getType(aX) + " couldn't be cast to Int"))
1768+ }, {
1769+ let aX = iq[1]
1770+ if ($isInstanceOf(aX, "Int"))
1771+ then aX
1772+ else throw(($getType(aX) + " couldn't be cast to Int"))
1773+ }, {
1774+ let aX = iq[2]
1775+ if ($isInstanceOf(aX, "Int"))
1776+ then aX
1777+ else throw(($getType(aX) + " couldn't be cast to Int"))
1778+ })
17501779 }
1751- else if ($isInstanceOf(gl, "Unit"))
1752- then ii.senderPublicKey
1780+ else aS("invalid entry type")
1781+ }
1782+ let ir = ip._1
1783+ let is = ip._2
1784+ let it = ip._3
1785+ let iu = parseIntValue(getStringValue(al()))
1786+ let iv = (iu + is)
1787+ let iw = if ((0 > is))
1788+ then if ((it > iv))
1789+ then it
1790+ else iv
1791+ else if ((iv > it))
1792+ then it
1793+ else iv
1794+ let ix = valueOrElse(getInteger(ap()), 0)
1795+ let iy = (ix + ir)
1796+ let gN = [if ((height > iy))
1797+ then true
1798+ else aS("try again in few blocks"), if ((iu != iw))
1799+ then true
1800+ else aS("already reached target")]
1801+ if ((gN == gN))
1802+ then [IntegerEntry(ap(), height), StringEntry(al(), toString(iw)), StringEntry(am(height), toString(iw))]
1803+ else throw("Strict value is not equal to itself.")
1804+ }
1805+
1806+
1807+@Verifier(iz)
1808+func iA () = {
1809+ let iB = {
1810+ let gq = gp()
1811+ if ($isInstanceOf(gq, "ByteVector"))
1812+ then {
1813+ let gu = gq
1814+ gu
1815+ }
1816+ else if ($isInstanceOf(gq, "Unit"))
1817+ then iz.senderPublicKey
17531818 else throw("Match error")
17541819 }
1755- let gl = ii
1756- if ($isInstanceOf(gl, "Order"))
1820+ let gq = iz
1821+ if ($isInstanceOf(gq, "Order"))
17571822 then {
1758- let eZ = gl
1759- let il = aW()
1760- let im = eY(eZ)
1761- let aF = im._1
1762- let aG = im._2
1763- let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey)
1764- let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], il)
1765- if (if (if (aF)
1766- then aH
1823+ let fe = gq
1824+ let iC = bb()
1825+ let iD = if (gB())
1826+ then $Tuple2(true, "")
1827+ else fd(fe)
1828+ let aK = iD._1
1829+ let aL = iD._2
1830+ let aM = sigVerify(fe.bodyBytes, fe.proofs[0], fe.senderPublicKey)
1831+ let aN = sigVerify(fe.bodyBytes, fe.proofs[1], iC)
1832+ if (if (if (aK)
1833+ then aM
17671834 else false)
1768- then aI
1835+ then aN
17691836 else false)
17701837 then true
1771- else aE(aF, aG, aH, aI)
1838+ else aJ(aK, aL, aM, aN)
17721839 }
1773- else if ($isInstanceOf(gl, "SetScriptTransaction"))
1840+ else if ($isInstanceOf(gq, "SetScriptTransaction"))
17741841 then {
1775- let cC = gl
1776- if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
1842+ let cH = gq
1843+ if (sigVerify(iz.bodyBytes, iz.proofs[0], iB))
17771844 then true
17781845 else {
1779- let in = blake2b256(value(cC.script))
1780- let io = fromBase64String(value(getString(aQ, aC())))
1781- let ip = scriptHash(this)
1782- if ((io == in))
1783- then (ip != in)
1846+ let iE = blake2b256(value(cH.script))
1847+ let iF = fromBase64String(value(getString(aV, aF())))
1848+ let iG = scriptHash(this)
1849+ if ((iF == iE))
1850+ then (iG != iE)
17841851 else false
17851852 }
17861853 }
1787- else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
1854+ else sigVerify(iz.bodyBytes, iz.proofs[0], iB)
17881855 }
17891856
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = toBigInt(100000000)
77
88 let c = toBigInt(1000000000000000000)
99
1010 let d = toBigInt(0)
1111
1212 let e = toBigInt(0)
1313
1414 let f = toBigInt(1)
1515
1616 let g = toBigInt(2)
1717
1818 let h = toBigInt(3)
1919
2020 let i = toBigInt(4)
2121
2222 let j = toBigInt((a - ((a * 1) / a)))
2323
2424 let k = "WAVES"
2525
2626 let l = "100"
2727
2828 let m = "1"
2929
3030 let n = "__"
3131
3232 let o = ""
3333
3434 let p = 1
3535
3636 let q = 2
3737
3838 let r = 3
3939
4040 let s = 4
4141
4242 let t = 1
4343
4444 let u = 2
4545
4646 let v = 3
4747
4848 let w = 4
4949
5050 let x = 5
5151
5252 let y = 6
5353
5454 let z = 7
5555
5656 let A = 8
5757
5858 let B = 9
5959
6060 let C = 1
6161
6262 let D = 6
6363
6464 let E = 7
6565
6666 let F = 10
6767
6868 let G = fraction(10, a, 10000)
6969
7070 func H (I,J) = fraction(toBigInt(I), c, toBigInt(J))
7171
7272
7373 func K (I,J) = fraction(I, c, J)
7474
7575
7676 func L (M,N) = toInt(fraction(M, toBigInt(N), c))
7777
7878
7979 func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P))
8080
8181
8282 func Q (I,J) = fraction(I, c, toBigInt(J))
8383
8484
8585 func R (M,N) = fraction(M, toBigInt(N), c)
8686
8787
8888 func S (T,U,V) = fraction(T, U, V)
8989
9090
9191 func W (M) = if ((d > M))
9292 then -(M)
9393 else M
9494
9595
9696 func X (M) = if ((d > M))
9797 then -(M)
9898 else M
9999
100100
101101 func Y () = "%s__factoryContract"
102102
103103
104104 func Z () = "%s__managerPublicKey"
105105
106106
107107 func aa () = "%s__pendingManagerPublicKey"
108108
109109
110110 func ab () = "%s%s__price__last"
111111
112112
113113 func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n)
114114
115115
116116 func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah)
117117
118118
119119 func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah)
120120
121121
122122 func aj () = "%s__amountAsset"
123123
124124
125125 func ak () = "%s__priceAsset"
126126
127127
128128 func al () = "%s__amp"
129129
130130
131-func am () = "%s__addonAddr"
131+func am (an) = ("%s%d__amp__" + toString(an))
132132
133133
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"
134+func ao () = "%s__addonAddr"
149135
150136
151-func av () = "%s%s__matcher__publicKey"
137+func ap () = "%s__changeAmpLastCall"
152138
153139
154-func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
140+let aq = "%s__fee"
141+
142+let ar = valueOrElse(getInteger(this, aq), G)
143+
144+let as = makeString(["%s", "dLp"], n)
145+
146+let at = makeString(["%s", "dLpRefreshedHeight"], n)
147+
148+let au = makeString(["%s", "refreshDLpDelay"], n)
149+
150+let av = 30
151+
152+let aw = valueOrElse(getInteger(this, au), av)
153+
154+func ax () = "%s__factoryConfig"
155155
156156
157-func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
157+func ay () = "%s%s__matcher__publicKey"
158158
159159
160-func aB () = "%s__shutdown"
160+func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
161161
162162
163-func aC () = "%s__allowedLpStableScriptHash"
163+func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
164164
165165
166-func aD () = "%s__feeCollectorAddress"
166+func aE () = "%s__shutdown"
167167
168168
169-func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI)))
169+func aF () = "%s__allowedLpStableScriptHash"
170170
171171
172-func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
172+func aG () = "%s__feeCollectorAddress"
173173
174174
175-func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
175+func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
176176
177177
178-func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
178+func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
179179
180180
181-func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
181+func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
182182
183183
184-let aQ = addressFromStringValue(aJ(this, Y()))
184+func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
185185
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"))
186+
187+func aS (aT) = throw(makeString(["lp_stable.ride:", aT], " "))
188+
189+
190+func aU (aT) = makeString(["lp_stable.ride:", aT], " ")
191+
192+
193+let aV = addressFromStringValue(aO(this, Y()))
194+
195+let aW = {
196+ let aX = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
197+ if ($isInstanceOf(aX, "Int"))
198+ then aX
199+ else throw(($getType(aX) + " couldn't be cast to Int"))
191200 }
192201
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"))
202+let aY = {
203+ let aX = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
204+ if ($isInstanceOf(aX, "Int"))
205+ then aX
206+ else throw(($getType(aX) + " couldn't be cast to Int"))
198207 }
199208
200-let aU = aJ(this, al())
209+let aZ = aO(this, al())
201210
202-func aV () = valueOrElse(getBoolean(aQ, aB()), false)
211+func ba () = valueOrElse(getBoolean(aV, aE()), false)
203212
204213
205-func aW () = fromBase58String(aJ(aQ, av()))
214+func bb () = fromBase58String(aO(aV, ay()))
206215
207216
208-let aX = addressFromStringValue(aJ(aQ, aD()))
217+let bc = addressFromStringValue(aO(aV, aG()))
209218
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)
219+func bd () = {
220+ let be = aO(this, aj())
221+ let bf = aO(this, ak())
222+ let bg = aR(aV, aC(bf))
223+ let aA = aR(aV, aC(be))
224+ split(aO(aV, az(toString(aA), toString(bg))), n)
216225 }
217226
218227
219-func bc (bd) = if ((bd == k))
228+func bh (bi) = if ((bi == k))
220229 then unit
221- else fromBase58String(bd)
230+ else fromBase58String(bi)
222231
223232
224-func be (bd) = if ((bd == unit))
233+func bj (bi) = if ((bi == unit))
225234 then k
226- else toBase58String(value(bd))
235+ else toBase58String(value(bi))
227236
228237
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]))
238+func bk (bl) = $Tuple9(addressFromStringValue(bl[t]), parseIntValue(bl[u]), fromBase58String(bl[v]), bh(bl[w]), bh(bl[x]), parseIntValue(bl[y]), parseIntValue(bl[z]), fromBase58String(bl[A]), fromBase58String(bl[B]))
230239
231240
232-let bh = bf(aY())
241+let bm = bk(bd())
233242
234-let bi = bh
243+let bn = bm
235244
236-let bj = bi._1
245+let bo = bn._1
237246
238-let bk = bi._2
247+let bp = bn._2
239248
240-let bl = bi._3
249+let bq = bn._3
241250
242-let bm = bi._4
251+let br = bn._4
243252
244-let bn = bi._5
253+let bs = bn._5
245254
246-let bo = bi._6
255+let bt = bn._6
247256
248-let bp = bi._7
257+let bu = bn._7
249258
250-let bq = bi._8
259+let bv = bn._8
251260
252-let br = bi._9
261+let bw = bn._9
253262
254-func bs () = split(aJ(aQ, au()), n)
263+func bx () = split(aO(aV, ax()), n)
255264
256265
257-let bt = bs()
266+let by = bx()
258267
259-let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
268+let bz = valueOrErrorMessage(addressFromString(by[C]), "Invalid staking contract address")
260269
261-let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
270+let bA = valueOrErrorMessage(addressFromString(by[E]), "Invalid slipage contract address")
262271
263-let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
272+let bB = valueOrErrorMessage(addressFromString(by[F]), "Invalid gwx contract address")
264273
265-let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
274+let bC = valueOrErrorMessage(addressFromString(by[D]), "Invalid gwx contract address")
266275
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)
276+func bD (bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN)], n)
268277
269278
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)
279+func bO (bP,bQ,bR,bH,bK,bL) = makeString(["%d%d%d%d%d%d", toString(bP), toString(bQ), toString(bR), toString(bH), toString(bK), toString(bL)], n)
271280
272281
273-func bN (bO) = if ((bO == "WAVES"))
282+func bS (bT) = if ((bT == "WAVES"))
274283 then wavesBalance(this).available
275- else assetBalance(this, fromBase58String(bO))
284+ else assetBalance(this, fromBase58String(bT))
276285
277286
278-func bP (bQ,bR) = fraction(bQ, c, bR)
287+func bU (bV,bW) = fraction(bV, c, bW)
279288
280289
281-func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
290+func bX (bV,bW,P) = fraction(bV, c, bW, P)
282291
283292
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]))
293+func bY (bZ,ca,cb) = {
294+ let cc = fraction((bZ - ca), b, ca)
295+ let cd = ((cb - W(cc)) > d)
296+ if (!(cd))
297+ then throw(("Big slpg: " + toString(cc)))
298+ else $Tuple2(cd, min([bZ, ca]))
290299 }
291300
292301
293-func bZ (ca,cb,cc) = {
294- let bX = fraction(cb, b, ca)
295- let cd = (cc > bX)
296- if (if (cd)
302+func ce (cf,cg,ch) = {
303+ let cc = fraction(cg, b, cf)
304+ let ci = (ch > cc)
305+ if (if (ci)
297306 then true
298- else (cb > ca))
299- then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300- else cd
307+ else (cg > cf))
308+ then throw(((((((toString(cg) + " ") + toString(cf)) + " ") + toString(cc)) + " ") + toString(ch)))
309+ else ci
301310 }
302311
303312
304-func ce (cf,cg,ch,ci) = {
305- let cj = H(ch, cf)
306- let ck = H(ci, cg)
307- bP(ck, cj)
313+func cj (ck,cl,cm,cn) = {
314+ let co = H(cm, ck)
315+ let cp = H(cn, cl)
316+ bU(cp, co)
308317 }
309318
310319
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]
320+func cq (cm,cn,cr) = {
321+ let cs = bt
322+ let ct = bu
323+ let cu = cj(cs, ct, cm, cn)
324+ let bW = H(cm, cs)
325+ let bV = H(cn, ct)
326+ let cv = H(cr, a)
327+ let cw = bU(bW, cv)
328+ let cx = bU(bV, cv)
329+[cu, cw, cx]
321330 }
322331
323332
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)]
333+func cy (cm,cn,cr) = {
334+ let cz = cq(cm, cn, cr)
335+[L(cz[0], a), L(cz[1], a), L(cz[2], a)]
327336 }
328337
329338
330-func cv (cw,ao) = {
331- let cx = if ((ao == 0))
339+func cA (cB,ar) = {
340+ let cC = if ((ar == 0))
332341 then 0
333- else fraction(cw, ao, a)
334- $Tuple2((cw - cx), cx)
342+ else fraction(cB, ar, a)
343+ $Tuple2((cB - cC), cC)
335344 }
336345
337346
338-func cy (cz) = {
339- let cA = cz[0]
340- let cB = cz[1]
341- let cC = (cA + cB)
342- if ((cC == e))
347+func cD (cE) = {
348+ let cF = cE[0]
349+ let cG = cE[1]
350+ let cH = (cF + cG)
351+ if ((cH == e))
343352 then e
344353 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)))
354+ let cI = parseIntValue(aZ)
355+ let cJ = (cI * 2)
356+ let cz = fraction(cF, cG, f)
357+ let cK = fraction(cz, i, f)
358+ let cL = fraction(toBigInt(cJ), cH, f)
359+ let cM = toBigInt((cJ - 1))
360+ func cN (cO) = {
361+ let cP = fraction(cO, cO, f)
362+ let cQ = fraction(cP, cO, f)
363+ let cR = fraction(cQ, f, cK)
364+ fraction((cL + fraction(cR, g, f)), cO, (fraction(cM, cO, f) + fraction(h, cR, f)))
356365 }
357366
358- func cN (cO,cP) = if (cO._2)
359- then cO
367+ func cS (cT,cU) = if (cT._2)
368+ then cT
360369 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+ let cO = cT._1
371+ let cV = cN(cO)
372+ let cW = (cV - value(cO))
373+ let cX = if ((e > cW))
374+ then -(cW)
375+ else cW
376+ if ((f >= cX))
377+ then $Tuple2(cV, true)
378+ else $Tuple2(cV, false)
370379 }
371380
372- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
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])
381+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382+ let cZ = {
383+ let da = cY
384+ let db = size(da)
385+ let dc = $Tuple2(cH, false)
386+ func dd (de,df) = if ((df >= db))
387+ then de
388+ else cS(de, da[df])
380389
381- func db (cZ,da) = if ((da >= cW))
382- then cZ
383- else throw("List size exceeds 18")
390+ func dg (de,df) = if ((df >= db))
391+ then de
392+ else throw("List size exceeds 17")
384393
385- db(cY(cY(cY(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), 16), 17), 18)
394+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
386395 }
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)))
396+ let cO = cZ._1
397+ let dh = cZ._2
398+ if (dh)
399+ then cO
400+ else throw(("D calculation error, D = " + toString(cO)))
392401 }
393402 }
394403
395404
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+func di (dj,dk,dl,dm) = {
406+ let dn = bq
407+ let do = toBase58String(value(br))
408+ let dp = toBase58String(value(bs))
409+ let dq = bt
410+ let dr = bu
411+ let ds = toString(bp)
412+ let dt = valueOrErrorMessage(assetInfo(dn), "Wrong LP id").quantity
413+ if ((toBase58String(dn) != dk))
405414 then throw("Wrong pmt asset")
406415 else {
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 == ""))
416+ let du = bS(do)
417+ let dv = H(du, dq)
418+ let dw = bS(dp)
419+ let dx = H(dw, dr)
420+ let dy = bU(dx, dv)
421+ let dz = L(dy, a)
422+ let dA = H(dl, a)
423+ let dB = H(dt, a)
424+ let dC = fraction(dv, dA, dB)
425+ let dD = fraction(dx, dA, dB)
426+ let dE = O(dC, dq, FLOOR)
427+ let dF = O(dD, dr, FLOOR)
428+ let dG = if ((dj == ""))
420429 then nil
421- else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
430+ else [ScriptTransfer(dm, dE, if ((do == "WAVES"))
422431 then unit
423- else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
432+ else fromBase58String(do)), ScriptTransfer(dm, dF, if ((dp == "WAVES"))
424433 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)
434+ else fromBase58String(dp)), StringEntry(ai(toString(dm), dj), bO(dE, dF, dl, dz, height, lastBlock.timestamp)), IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz)]
435+ $Tuple10(dE, dF, do, dp, du, dw, dt, dy, ds, dG)
427436 }
428437 }
429438
430439
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)
440+func dH (dj,cb,dI,dJ,dK,dL,dm,dM,dN,dO,dP,dQ,dR) = {
441+ let dn = bq
442+ let dS = toBase58String(value(br))
443+ let dT = toBase58String(value(bs))
444+ let dU = bv
445+ let dV = bw
446+ let dW = bt
447+ let dX = bu
448+ let ds = toString(bp)
449+ let dY = valueOrErrorMessage(assetInfo(dn), "Wr lp as").quantity
450+ let du = if (dM)
451+ then bS(dS)
452+ else if (if (dO)
453+ then (dR == dS)
445454 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)
455+ then (bS(dS) - dQ)
456+ else if (dO)
457+ then bS(dS)
458+ else (bS(dS) - dI)
459+ let dw = if (dM)
460+ then bS(dT)
461+ else if (if (dO)
462+ then (dR == dT)
454463 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))
464+ then (bS(dT) - dQ)
465+ else if (dO)
466+ then bS(dT)
467+ else (bS(dT) - dK)
468+ let dZ = H(dI, dW)
469+ let ea = H(dK, dX)
470+ let eb = bU(ea, dZ)
471+ let dv = H(du, dW)
472+ let dx = H(dw, dX)
473+ let cg = cD([dv, dx])
474+ let ec = if ((dY == 0))
466475 then {
467- let ca = cy([(dq + dU), (ds + dV)])
468- let dY = if ((ca > cb))
476+ let cf = cD([(dv + dZ), (dx + ea)])
477+ let ed = if ((cf > cg))
469478 then true
470479 else throw("D1 should be greater than D0")
471- if ((dY == dY))
480+ if ((ed == ed))
472481 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)
482+ let dy = d
483+ let ee = d
484+ let cv = cf
485+ $Tuple5(L(cv, a), L(dZ, dW), L(ea, dX), bU((dx + ea), (dv + dZ)), ee)
477486 }
478487 else throw("Strict value is not equal to itself.")
479488 }
480489 else {
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)
490+ let dy = bU(dx, dv)
491+ let ef = fraction(W((dy - eb)), c, dy)
492+ let ee = H(cb, a)
493+ if (if (if (dP)
494+ then (dy != d)
486495 else false)
487- then (ea > dZ)
496+ then (ef > ee)
488497 else false)
489- then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
498+ then throw(((("Price slippage " + toString(ef)) + " > ") + toString(ee)))
490499 else {
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))
500+ let eg = H(dY, a)
501+ let eh = fraction(dZ, bX(dx, dv, CEILING), c, CEILING)
502+ let ei = fraction(ea, c, bX(dx, dv, FLOOR), CEILING)
503+ let ej = if ((eh > ea))
504+ then $Tuple2(ei, ea)
505+ else $Tuple2(dZ, eh)
506+ let ek = ej._1
507+ let el = ej._2
508+ let cf = cD([(dv + ek), (dx + el)])
509+ let ed = if ((cf > cg))
501510 then true
502511 else throw("D1 should be greater than D0")
503- if ((dY == dY))
512+ if ((ed == ed))
504513 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)
514+ let cv = fraction(eg, (cf - cg), cg)
515+ $Tuple5(O(cv, a, FLOOR), O(ek, dW, CEILING), O(el, dX, CEILING), dy, ee)
507516 }
508517 else throw("Strict value is not equal to itself.")
509518 }
510519 }
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))
520+ let em = ec._1
521+ let en = ec._2
522+ let eo = ec._3
523+ let dz = L(ec._4, a)
524+ let ep = L(ec._5, a)
525+ if ((0 >= em))
517526 then throw("LP <= 0")
518527 else {
519- let el = if (!(dI))
528+ let eq = if (!(dN))
520529 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)
530+ else em
531+ let er = (dI - en)
532+ let es = (dK - eo)
533+ let et = if (if (dO)
534+ then (dR == dS)
526535 else false)
527- then $Tuple2(dL, 0)
528- else if (if (dJ)
529- then (dM == dO)
536+ then $Tuple2(dQ, 0)
537+ else if (if (dO)
538+ then (dR == dT)
530539 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)
540+ then $Tuple2(0, dQ)
541+ else $Tuple2(en, eo)
542+ let eu = et._1
543+ let ev = et._2
544+ let ew = [IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz), StringEntry(af(dm, dj), bD(eu, ev, eq, dz, cb, ep, height, lastBlock.timestamp, er, es))]
545+ $Tuple13(em, eq, dz, du, dw, dY, dn, ds, ew, er, es, dJ, dL)
537546 }
538547 }
539548
540549
541-func es (cz,cP,et) = {
542- let eu = g
543- let ev = cz[if ((cP == 0))
550+func ex (cE,cU,ey) = {
551+ let ez = g
552+ let eA = cE[if ((cU == 0))
544553 then 1
545554 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
555+ let eB = parseBigIntValue(l)
556+ let cI = (parseBigIntValue(aZ) * eB)
557+ let cH = eA
558+ let cJ = (cI * ez)
559+ let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
560+ let eD = ((cH + ((ey * eB) / cJ)) - ey)
561+ func cS (cT,eE) = {
562+ let eF = cT
563+ let eG = eF._1
564+ let dh = eF._2
565+ if ((dh != unit))
566+ then cT
558567 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)
568+ let eH = (((eG * eG) + eC) / ((g * eG) + eD))
569+ let eI = X((eH - value(eG)))
570+ if ((f >= eI))
571+ then $Tuple2(eH, eE)
572+ else $Tuple2(eH, unit)
564573 }
565574 }
566575
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])
576+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
577+ let eJ = {
578+ let da = cY
579+ let db = size(da)
580+ let dc = $Tuple2(ey, unit)
581+ func dd (de,df) = if ((df >= db))
582+ then de
583+ else cS(de, da[df])
575584
576- func db (cZ,da) = if ((da >= cW))
577- then cZ
585+ func dg (de,df) = if ((df >= db))
586+ then de
578587 else throw("List size exceeds 15")
579588
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)
589+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581590 }
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
591+ let eG = eJ._1
592+ let dh = eJ._2
593+ if ((dh != unit))
594+ then eG
595+ else throw(("Y calculation error, Y = " + toString(eG)))
595596 }
596597
597598
598599 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
600+ let eO = fraction(cD([K(eL, toBigInt(bt)), K(eM, toBigInt(bu))]), c, eN)
601+ if ((eN == e))
602+ then e
603+ else eO
604604 }
605605
606606
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)
607+func eP (eQ,eR,eS) = {
608+ let eT = (toBigInt(bS(bj(br))) - eQ)
609+ let eU = (toBigInt(bS(bj(bs))) - eR)
610+ let eV = (toBigInt(value(assetInfo(bq)).quantity) - eS)
611+ let eW = eK(eT, eU, eV)
612+ eW
614613 }
615614
616615
617-func eW (eX,eJ) = if ((eJ >= eX))
618- then true
619- else aN("updated DLp lower than current DLp")
616+func eX (eY,eZ,eS) = {
617+ let eT = (bS(bj(br)) + eY)
618+ let eU = (bS(bj(bs)) + eZ)
619+ let eV = (value(assetInfo(bq)).quantity + eS)
620+ let eO = eK(toBigInt(eT), toBigInt(eU), toBigInt(eV))
621+ let fa = [IntegerEntry(at, height), StringEntry(as, toString(eO))]
622+ $Tuple2(fa, eO)
623+ }
620624
621625
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())
626+func fb (fc,eO) = if ((eO >= fc))
627+ then true
628+ else aS("updated DLp lower than current DLp")
629+
630+
631+func fd (fe) = {
632+ let eT = bS(bj(br))
633+ let eU = bS(bj(bs))
634+ let ff = fe.amount
635+ let fg = fraction(fe.amount, fe.price, a, FLOOR)
636+ let fh = if ((fe.orderType == Buy))
637+ then $Tuple2(ff, -(fg))
638+ else $Tuple2(-(ff), fg)
639+ let eY = fh._1
640+ let eZ = fh._2
641+ if (if (if (ba())
633642 then true
634- else (bk == r))
643+ else (bp == r))
635644 then true
636- else (bk == s))
645+ else (bp == s))
637646 then throw("Admin blocked")
638- else if (if ((eZ.assetPair.amountAsset != bm))
647+ else if (if ((fe.assetPair.amountAsset != br))
639648 then true
640- else (eZ.assetPair.priceAsset != bn))
649+ else (fe.assetPair.priceAsset != bs))
641650 then throw("Wr assets")
642651 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)
652+ let fi = parseBigIntValue(valueOrElse(getString(this, as), "0"))
653+ let fj = eX(eY, eZ, 0)
654+ let fk = fj._1
655+ let fl = fj._2
656+ let fm = (fl >= fi)
657+ let fn = makeString(["dLp=", toString(fi), " dLpNew=", toString(fl), " amountAssetBalance=", toString(eT), " priceAssetBalance=", toString(eU), " amountAssetBalanceDelta=", toString(eY), " priceAssetBalanceDelta=", toString(eZ), " height=", toString(height)], "")
658+ $Tuple2(fm, fn)
650659 }
651660 }
652661
653662
654-func fj (cP) = if ((size(cP.payments) != 1))
663+func fo (cU) = if ((size(cU.payments) != 1))
655664 then throw("1 pmnt exp")
656665 else {
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())
666+ let fp = value(cU.payments[0])
667+ let dk = value(fp.assetId)
668+ let dQ = fp.amount
669+ let ec = di(toBase58String(cU.transactionId), toBase58String(dk), dQ, cU.caller)
670+ let dE = ec._1
671+ let dF = ec._2
672+ let ds = parseIntValue(ec._9)
673+ let dG = ec._10
674+ if (if (ba())
666675 then true
667- else (dn == s))
668- then throw(("Admin blocked: " + toString(dn)))
669- else $Tuple5(dz, dA, dL, df, dB)
676+ else (ds == s))
677+ then throw(("Admin blocked: " + toString(ds)))
678+ else $Tuple5(dE, dF, dQ, dk, dG)
670679 }
671680
672681
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())
682+func fq (fr,ah,fs,ft,cb,dN,dO,dP,dQ,dR) = {
683+ let ec = dH(ah, cb, value(fs).amount, value(fs).assetId, value(ft).amount, value(ft).assetId, fr, (ah == ""), dN, dO, dP, dQ, dR)
684+ let ds = parseIntValue(ec._8)
685+ if (if (if (ba())
677686 then true
678- else (dn == q))
687+ else (ds == q))
679688 then true
680- else (dn == s))
681- then throw(("Blocked:" + toString(dn)))
682- else dX
689+ else (ds == s))
690+ then throw(("Blocked:" + toString(ds)))
691+ else ec
683692 }
684693
685694
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))
695+func fu (fv,dk,dm,ah,fw) = {
696+ let do = toBase58String(value(br))
697+ let dp = toBase58String(value(bs))
698+ let dn = bq
699+ let dW = bt
700+ let dX = bu
701+ let eV = toBigInt(valueOrErrorMessage(assetInfo(dn), "invalid lp asset").quantity)
702+ let fx = if ((eV > e))
694703 then true
695704 else throw("initial deposit requires all coins")
696- if ((fs == fs))
705+ if ((fx == fx))
697706 then {
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))
707+ let du = bS(do)
708+ let dw = bS(dp)
709+ let fy = if ((ah == ""))
710+ then $Tuple2(du, dw)
711+ else if ((dk == do))
712+ then if ((fv > du))
704713 then throw("invalid payment amount")
705- else $Tuple2((dp - fq), dr)
706- else if ((df == dk))
707- then if ((fq > dr))
714+ else $Tuple2((du - fv), dw)
715+ else if ((dk == dp))
716+ then if ((fv > dw))
708717 then throw("invalid payment amount")
709- else $Tuple2(dp, (dr - fq))
718+ else $Tuple2(du, (dw - fv))
710719 else throw("wrong pmtAssetId")
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)
720+ let fz = fy._1
721+ let fA = fy._2
722+ let fB = if ((dk == do))
723+ then $Tuple2(fv, 0)
724+ else if ((dk == dp))
725+ then $Tuple2(0, fv)
717726 else throw("invalid payment")
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))
727+ let fC = fB._1
728+ let fD = fB._2
729+ let fE = if (fw)
730+ then $Tuple3(cA(fC, aW)._1, cA(fD, aW)._1, cA(fv, aW)._2)
731+ else $Tuple3(fC, fD, 0)
732+ let fF = fE._1
733+ let fG = fE._2
734+ let cC = fE._3
735+ let fH = (fz + fF)
736+ let fI = (fA + fG)
737+ let cg = cD([H(fz, bt), H(fA, bu)])
738+ let cf = cD([H(fH, bt), H(fI, bu)])
739+ let ed = if ((cf > cg))
731740 then true
732741 else throw()
733- if ((dY == dY))
742+ if ((ed == ed))
734743 then {
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)
744+ let fJ = fraction(eV, (cf - cg), cg, FLOOR)
745+ let dz = L(bU(H(fI, dX), H(fH, dW)), a)
746+ let ew = [IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz), StringEntry(af(dm, ah), bD(fC, fD, toInt(fJ), dz, 0, 0, height, lastBlock.timestamp, 0, 0))]
747+ let fK = fraction(fA, a, fz)
748+ let fL = fraction(fv, a, (fK + a))
749+ let fM = (fv - fL)
750+ let fN = fraction(eV, toBigInt(fM), toBigInt(fA))
751+ let fO = toInt(fraction((fJ - fN), b, fN))
752+ $Tuple4(toInt(fJ), ew, cC, fO)
744753 }
745754 else throw("Strict value is not equal to itself.")
746755 }
747756 else throw("Strict value is not equal to itself.")
748757 }
749758
750759
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))
760+func fP (fQ,fR,fS,fr,fT,fU) = {
761+ let dn = toBase58String(value(bq))
762+ let do = toBase58String(value(br))
763+ let dp = toBase58String(value(bs))
764+ let fV = bt
765+ let fW = bu
766+ let fX = bp
767+ let dm = if ((fr == bC))
768+ then fT
769+ else fr
770+ let fp = value(fS[0])
771+ let dk = value(fp.assetId)
772+ let dQ = fp.amount
773+ let eW = eP(e, e, e)
774+ if ((eW == eW))
766775 then {
767- let de = toBase58String(fP)
768- if ((di != toBase58String(df)))
776+ let dj = toBase58String(fU)
777+ if ((dn != toBase58String(dk)))
769778 then throw("Wrong LP")
770779 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)"))
780+ let du = bS(do)
781+ let dw = bS(dp)
782+ let fY = {
783+ let aX = invoke(this, "getOneTknV2READONLY", [fQ, dQ], nil)
784+ if ($isInstanceOf(aX, "(Int, Int)"))
785+ then aX
786+ else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
778787 }
779- if ((fT == fT))
788+ if ((fY == fY))
780789 then {
781- let cx = fT._2
782- let fU = fT._1
783- let fV = if (if ((fM > 0))
784- then (fM > fU)
790+ let cC = fY._2
791+ let fZ = fY._1
792+ let ga = if (if ((fR > 0))
793+ then (fR > fZ)
785794 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))
795+ then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
796+ else fZ
797+ let gb = if ((fQ == do))
798+ then $Tuple4(ga, 0, ((du - ga) - cC), dw)
799+ else if ((fQ == dp))
800+ then $Tuple4(0, ga, du, ((dw - ga) - cC))
792801 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"))
802+ let gc = gb._1
803+ let gd = gb._2
804+ let fH = gb._3
805+ let fI = gb._4
806+ let ge = bU(H(fI, fW), H(fH, fV))
807+ let gf = L(ge, a)
808+ let gg = if ((fQ == "WAVES"))
800809 then unit
801- else fromBase58String(fL)
802- let gc = if ((cx > 0))
803- then [ScriptTransfer(aX, cx, gb)]
810+ else fromBase58String(fQ)
811+ let gh = if ((cC > 0))
812+ then [ScriptTransfer(bc, cC, gg)]
804813 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))
814+ let dG = ([ScriptTransfer(dm, ga, gg), StringEntry(ai(toString(dm), dj), bO(gc, gd, dQ, gf, height, lastBlock.timestamp)), IntegerEntry(ab(), gf), IntegerEntry(ac(height, lastBlock.timestamp), gf)] ++ gh)
815+ if ((dG == dG))
807816 then {
808- let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809- if ((gd == gd))
817+ let gi = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
818+ if ((gi == gi))
810819 then {
811- let ge = {
812- let gf = if ((this == aX))
820+ let gj = {
821+ let gk = if ((this == bc))
813822 then 0
814- else cx
815- let gg = if ((bc(fL) == bm))
823+ else cC
824+ let gl = if ((bh(fQ) == br))
816825 then true
817826 else false
818- if (gg)
819- then $Tuple2(-((fU + gf)), 0)
820- else $Tuple2(0, -((fU + gf)))
827+ if (gl)
828+ then $Tuple2(-((fZ + gk)), 0)
829+ else $Tuple2(0, -((fZ + gk)))
821830 }
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)
831+ let eY = gj._1
832+ let eZ = gj._2
833+ let gm = eX(eY, eZ, 0)
834+ let gn = gm._1
835+ let eO = gm._2
836+ let go = fb(eW, eO)
837+ if ((go == go))
838+ then $Tuple2((dG ++ gn), ga)
830839 else throw("Strict value is not equal to itself.")
831840 }
832841 else throw("Strict value is not equal to itself.")
833842 }
834843 else throw("Strict value is not equal to itself.")
835844 }
836845 else throw("Strict value is not equal to itself.")
837846 }
838847 }
839848 else throw("Strict value is not equal to itself.")
840849 }
841850
842851
843-func gk () = {
844- let gl = getString(Z())
845- if ($isInstanceOf(gl, "String"))
852+func gp () = {
853+ let gq = getString(Z())
854+ if ($isInstanceOf(gq, "String"))
846855 then {
847- let cC = gl
848- fromBase58String(cC)
856+ let cH = gq
857+ fromBase58String(cH)
849858 }
850- else if ($isInstanceOf(gl, "Unit"))
859+ else if ($isInstanceOf(gq, "Unit"))
851860 then unit
852861 else throw("Match error")
853862 }
854863
855864
856-func gm () = {
857- let gl = getString(aa())
858- if ($isInstanceOf(gl, "String"))
865+func gr () = {
866+ let gq = getString(aa())
867+ if ($isInstanceOf(gq, "String"))
859868 then {
860- let cC = gl
861- fromBase58String(cC)
869+ let cH = gq
870+ fromBase58String(cH)
862871 }
863- else if ($isInstanceOf(gl, "Unit"))
872+ else if ($isInstanceOf(gq, "Unit"))
864873 then unit
865874 else throw("Match error")
866875 }
867876
868877
869-let gn = throw("Permission denied")
878+let gs = throw("Permission denied")
870879
871-func go (cP) = {
872- let gl = gk()
873- if ($isInstanceOf(gl, "ByteVector"))
880+func gt (cU) = {
881+ let gq = gp()
882+ if ($isInstanceOf(gq, "ByteVector"))
874883 then {
875- let gp = gl
876- (cP.callerPublicKey == gp)
884+ let gu = gq
885+ (cU.callerPublicKey == gu)
877886 }
878- else if ($isInstanceOf(gl, "Unit"))
879- then (cP.caller == this)
887+ else if ($isInstanceOf(gq, "Unit"))
888+ then (cU.caller == this)
880889 else throw("Match error")
881890 }
882891
883892
884-func gq (cP) = {
885- let gl = gk()
886- if ($isInstanceOf(gl, "ByteVector"))
893+func gv (cU) = {
894+ let gq = gp()
895+ if ($isInstanceOf(gq, "ByteVector"))
887896 then {
888- let gp = gl
889- if ((cP.callerPublicKey == gp))
897+ let gu = gq
898+ if ((cU.callerPublicKey == gu))
890899 then true
891- else gn
900+ else gs
892901 }
893- else if ($isInstanceOf(gl, "Unit"))
894- then if ((cP.caller == this))
902+ else if ($isInstanceOf(gq, "Unit"))
903+ then if ((cU.caller == this))
895904 then true
896- else gn
905+ else gs
897906 else throw("Match error")
898907 }
899908
900909
901-func gr (gs,et,gt) = {
902- let bg = aY()
903- let dj = bg[w]
904- let dk = bg[x]
905- let eu = g
906- let ew = parseBigIntValue(l)
907- let cD = (parseBigIntValue(aU) * ew)
908- let cz = if ((gs == false))
909- then [(toBigInt(bN(dj)) + gt), toBigInt(bN(dk))]
910- else [(toBigInt(bN(dk)) + gt), toBigInt(bN(dj))]
911- let ev = cz[0]
912- let cC = ev
913- let cE = (cD * eu)
914- let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
915- let ey = ((cC + ((et * ew) / cE)) - et)
916- func cN (cO,ez) = {
917- let gu = cO
918- let eB = gu._1
919- let dc = gu._2
920- if ((dc != unit))
921- then cO
910+func gw (gx,ey,gy) = {
911+ let bl = bd()
912+ let do = bl[w]
913+ let dp = bl[x]
914+ let ez = g
915+ let eB = parseBigIntValue(l)
916+ let cI = (parseBigIntValue(aZ) * eB)
917+ let cE = if ((gx == false))
918+ then [(toBigInt(bS(do)) + gy), toBigInt(bS(dp))]
919+ else [(toBigInt(bS(dp)) + gy), toBigInt(bS(do))]
920+ let eA = cE[0]
921+ let cH = eA
922+ let cJ = (cI * ez)
923+ let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
924+ let eD = ((cH + ((ey * eB) / cJ)) - ey)
925+ func cS (cT,eE) = {
926+ let gz = cT
927+ let eG = gz._1
928+ let dh = gz._2
929+ if ((dh != unit))
930+ then cT
922931 else {
923- let eC = (((eB * eB) + ex) / ((g * eB) + ey))
924- let eD = X((eC - value(eB)))
925- if ((f >= eD))
926- then $Tuple2(eC, ez)
927- else $Tuple2(eC, unit)
932+ let eH = (((eG * eG) + eC) / ((g * eG) + eD))
933+ let eI = X((eH - value(eG)))
934+ if ((f >= eI))
935+ then $Tuple2(eH, eE)
936+ else $Tuple2(eH, unit)
928937 }
929938 }
930939
931- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
932- let gv = {
933- let cV = cT
934- let cW = size(cV)
935- let cX = $Tuple2(et, unit)
936- func cY (cZ,da) = if ((da >= cW))
937- then cZ
938- else cN(cZ, cV[da])
940+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
941+ let gA = {
942+ let da = cY
943+ let db = size(da)
944+ let dc = $Tuple2(ey, unit)
945+ func dd (de,df) = if ((df >= db))
946+ then de
947+ else cS(de, da[df])
939948
940- func db (cZ,da) = if ((da >= cW))
941- then cZ
949+ func dg (de,df) = if ((df >= db))
950+ then de
942951 else throw("List size exceeds 15")
943952
944- 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)
953+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
945954 }
946- let eB = gv._1
947- let dc = gv._2
948- if ((dc != unit))
949- then eB
950- else throw(("Y calculation error, Y = " + toString(eB)))
955+ let eG = gA._1
956+ let dh = gA._2
957+ if ((dh != unit))
958+ then eG
959+ else throw(("Y calculation error, Y = " + toString(eG)))
951960 }
952961
953962
954-@Callable(cP)
955-func calculateAmountOutForSwapREADONLY (gw,gs,gx) = {
956- let gy = if ((gs == false))
963+func gB () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
964+
965+
966+@Callable(cU)
967+func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
968+ let gE = if ((gx == false))
957969 then {
958- let gz = aJ(this, ak())
959- let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960- $Tuple2(gz, gt)
970+ let gF = aO(this, ak())
971+ let gy = (toBigInt(bS(aO(this, aj()))) + toBigInt(gC))
972+ $Tuple2(gF, gy)
961973 }
962974 else {
963- let gz = aJ(this, aj())
964- let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965- $Tuple2(gz, gt)
975+ let gF = aO(this, aj())
976+ let gy = (toBigInt(bS(aO(this, ak()))) + toBigInt(gC))
977+ $Tuple2(gF, gy)
966978 }
967- let gz = gy._1
968- let gt = gy._2
969- let bg = aY()
970- let dj = bg[w]
971- let dk = bg[x]
972- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
973- let et = cy(cz)
974- let eB = gr(gs, et, toBigInt(gw))
975- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
976- let gB = max([0, toInt(gA)])
977- let gC = if ((gs == false))
978- then [((toBigInt(bN(dj)) + toBigInt(gw)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
979- else [(toBigInt(bN(dj)) - gA), ((toBigInt(bN(dk)) + toBigInt(gw)) + toBigInt(gx))]
980- let gD = cy(gC)
981- let dY = if ((gD >= et))
979+ let gF = gE._1
980+ let gy = gE._2
981+ let bl = bd()
982+ let do = bl[w]
983+ let dp = bl[x]
984+ let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
985+ let ey = cD(cE)
986+ let eG = gw(gx, ey, toBigInt(gC))
987+ let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
988+ let gH = max([0, toInt(gG)])
989+ let gI = if ((gx == false))
990+ then [((toBigInt(bS(do)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
991+ else [(toBigInt(bS(do)) - gG), ((toBigInt(bS(dp)) + toBigInt(gC)) + toBigInt(gD))]
992+ let gJ = cD(gI)
993+ let ed = if ((gJ >= ey))
982994 then true
983- else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__"))
984- if ((dY == dY))
985- then $Tuple2(nil, gB)
995+ else throw(makeString(["new D is fewer error", toString(ey), toString(gJ)], "__"))
996+ if ((ed == ed))
997+ then $Tuple2(nil, gH)
986998 else throw("Strict value is not equal to itself.")
987999 }
9881000
9891001
9901002
991-@Callable(cP)
992-func calculateAmountOutForSwapAndSendTokens (gw,gs,gE,gF,gx) = {
993- let gG = {
994- let aS = invoke(aQ, "getSwapContractREADONLY", nil, nil)
995- if ($isInstanceOf(aS, "String"))
996- then aS
997- else throw(($getType(aS) + " couldn't be cast to String"))
1003+@Callable(cU)
1004+func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1005+ let gM = {
1006+ let aX = invoke(aV, "getSwapContractREADONLY", nil, nil)
1007+ if ($isInstanceOf(aX, "String"))
1008+ then aX
1009+ else throw(($getType(aX) + " couldn't be cast to String"))
9981010 }
999- let gH = [if ((value(cP.payments[0]).amount >= gw))
1011+ let gN = [if ((value(cU.payments[0]).amount >= gC))
10001012 then true
1001- else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG)))
1013+ else aS("Wrong amount"), if ((cU.caller == addressFromStringValue(gM)))
10021014 then true
1003- else aN("Permission denied")]
1004- if ((gH == gH))
1015+ else aS("Permission denied")]
1016+ if ((gN == gN))
10051017 then {
1006- let fk = value(cP.payments[0])
1007- let gI = be(fk.assetId)
1008- let gJ = if ((gs == false))
1018+ let fp = value(cU.payments[0])
1019+ let gO = bj(fp.assetId)
1020+ let gP = if ((gx == false))
10091021 then {
1010- let gz = aJ(this, ak())
1011- let gt = (bN(gI) - value(cP.payments[0]).amount)
1012- $Tuple2(gz, gt)
1022+ let gF = aO(this, ak())
1023+ let gy = (bS(gO) - value(cU.payments[0]).amount)
1024+ $Tuple2(gF, gy)
10131025 }
10141026 else {
1015- let gz = aJ(this, aj())
1016- let gt = (bN(gI) - value(cP.payments[0]).amount)
1017- $Tuple2(gz, gt)
1027+ let gF = aO(this, aj())
1028+ let gy = (bS(gO) - value(cU.payments[0]).amount)
1029+ $Tuple2(gF, gy)
10181030 }
1019- let gz = gJ._1
1020- let gt = gJ._2
1021- let bg = aY()
1022- let dj = bg[w]
1023- let dk = bg[x]
1024- let cz = if ((gs == false))
1025- then [(toBigInt(bN(dj)) - toBigInt(value(cP.payments[0]).amount)), toBigInt(bN(dk))]
1026- else [toBigInt(bN(dj)), (toBigInt(bN(dk)) - toBigInt(value(cP.payments[0]).amount))]
1027- let et = cy(cz)
1028- let eB = gr(gs, et, toBigInt(0))
1029- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
1030- let gB = max([0, toInt(gA)])
1031- let gK = if ((gB >= gE))
1031+ let gF = gP._1
1032+ let gy = gP._2
1033+ let bl = bd()
1034+ let do = bl[w]
1035+ let dp = bl[x]
1036+ let cE = if ((gx == false))
1037+ then [(toBigInt(bS(do)) - toBigInt(value(cU.payments[0]).amount)), toBigInt(bS(dp))]
1038+ else [toBigInt(bS(do)), (toBigInt(bS(dp)) - toBigInt(value(cU.payments[0]).amount))]
1039+ let ey = cD(cE)
1040+ let eG = gw(gx, ey, toBigInt(0))
1041+ let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
1042+ let gH = max([0, toInt(gG)])
1043+ let gQ = if ((gH >= gK))
10321044 then true
10331045 else throw("Exchange result is fewer coins than expected")
1034- if ((gK == gK))
1046+ if ((gQ == gQ))
10351047 then {
1036- let gC = if ((gs == false))
1037- then [(toBigInt(bN(dj)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
1038- else [(toBigInt(bN(dj)) - gA), (toBigInt(bN(dk)) + toBigInt(gx))]
1039- let gD = cy(gC)
1040- let dY = if ((gD >= et))
1048+ let gI = if ((gx == false))
1049+ then [(toBigInt(bS(do)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
1050+ else [(toBigInt(bS(do)) - gG), (toBigInt(bS(dp)) + toBigInt(gD))]
1051+ let gJ = cD(gI)
1052+ let ed = if ((gJ >= ey))
10411053 then true
10421054 else throw("new D is fewer error")
1043- if ((dY == dY))
1044- then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB)
1055+ if ((ed == ed))
1056+ then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bh(gF))], gH)
10451057 else throw("Strict value is not equal to itself.")
10461058 }
10471059 else throw("Strict value is not equal to itself.")
10481060 }
10491061 else throw("Strict value is not equal to itself.")
10501062 }
10511063
10521064
10531065
1054-@Callable(cP)
1066+@Callable(cU)
10551067 func constructor (Y) = {
1056- let ex = gq(cP)
1057- if ((ex == ex))
1068+ let eC = gv(cU)
1069+ if ((eC == eC))
10581070 then [StringEntry(Y(), Y)]
10591071 else throw("Strict value is not equal to itself.")
10601072 }
10611073
10621074
10631075
1064-@Callable(cP)
1065-func setManager (gL) = {
1066- let ex = gq(cP)
1067- if ((ex == ex))
1076+@Callable(cU)
1077+func setManager (gR) = {
1078+ let eC = gv(cU)
1079+ if ((eC == eC))
10681080 then {
1069- let gM = fromBase58String(gL)
1070- if ((gM == gM))
1071- then [StringEntry(aa(), gL)]
1081+ let gS = fromBase58String(gR)
1082+ if ((gS == gS))
1083+ then [StringEntry(aa(), gR)]
10721084 else throw("Strict value is not equal to itself.")
10731085 }
10741086 else throw("Strict value is not equal to itself.")
10751087 }
10761088
10771089
10781090
1079-@Callable(cP)
1091+@Callable(cU)
10801092 func confirmManager () = {
1081- let cu = gm()
1082- let gN = if (isDefined(cu))
1093+ let cz = gr()
1094+ let gT = if (isDefined(cz))
10831095 then true
10841096 else throw("No pending manager")
1085- if ((gN == gN))
1097+ if ((gT == gT))
10861098 then {
1087- let gO = if ((cP.callerPublicKey == value(cu)))
1099+ let gU = if ((cU.callerPublicKey == value(cz)))
10881100 then true
10891101 else throw("You are not pending manager")
1090- if ((gO == gO))
1091- then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
1102+ if ((gU == gU))
1103+ then [StringEntry(Z(), toBase58String(value(cz))), DeleteEntry(aa())]
10921104 else throw("Strict value is not equal to itself.")
10931105 }
10941106 else throw("Strict value is not equal to itself.")
10951107 }
10961108
10971109
10981110
1099-@Callable(cP)
1100-func put (gP,gQ) = {
1101- let gR = bs()
1102- let gS = valueOrErrorMessage(addressFromString(gR[C]), "Wr st addr")
1103- let gT = valueOrErrorMessage(addressFromString(gR[E]), "Wr sl addr")
1104- if ((0 > gP))
1111+@Callable(cU)
1112+func put (gV,gW) = {
1113+ let gX = bx()
1114+ let gY = valueOrErrorMessage(addressFromString(gX[C]), "Wr st addr")
1115+ let gZ = valueOrErrorMessage(addressFromString(gX[E]), "Wr sl addr")
1116+ if ((0 > gV))
11051117 then throw("Wrong slippage")
1106- else if ((size(cP.payments) != 2))
1118+ else if ((size(cU.payments) != 2))
11071119 then throw("2 pmnts expd")
11081120 else {
1109- let gU = toBigInt(value(cP.payments[0]).amount)
1110- let gV = toBigInt(value(cP.payments[1]).amount)
1111- let eO = (toBigInt(bN(be(bm))) - gU)
1112- if ((eO == eO))
1121+ let ha = toBigInt(value(cU.payments[0]).amount)
1122+ let hb = toBigInt(value(cU.payments[1]).amount)
1123+ let eT = (toBigInt(bS(bj(br))) - ha)
1124+ if ((eT == eT))
11131125 then {
1114- let eP = (toBigInt(bN(be(bn))) - gV)
1115- if ((eP == eP))
1126+ let eU = (toBigInt(bS(bj(bs))) - hb)
1127+ if ((eU == eU))
11161128 then {
1117- let eQ = toBigInt(value(assetInfo(bl)).quantity)
1118- if ((eQ == eQ))
1129+ let eV = toBigInt(value(assetInfo(bq)).quantity)
1130+ if ((eV == eV))
11191131 then {
1120- let eR = eK(gU, gV, toBigInt(0))
1121- if ((eR == eR))
1132+ let eW = eP(ha, hb, toBigInt(0))
1133+ if ((eW == eW))
11221134 then {
1123- let gW = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gP, true, false, true, 0, "")
1124- let el = gW._2
1125- let gX = gW._7
1126- let dB = gW._9
1127- let em = gW._10
1128- let en = gW._11
1129- let dj = gW._12
1130- let dk = gW._13
1131- let dX = invoke(aQ, "emit", [el], nil)
1132- if ((dX == dX))
1135+ let hc = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], gV, true, false, true, 0, "")
1136+ let eq = hc._2
1137+ let hd = hc._7
1138+ let dG = hc._9
1139+ let er = hc._10
1140+ let es = hc._11
1141+ let do = hc._12
1142+ let dp = hc._13
1143+ let ec = invoke(aV, "emit", [eq], nil)
1144+ if ((ec == ec))
11331145 then {
1134- let gY = {
1135- let gl = dX
1136- if ($isInstanceOf(gl, "Address"))
1146+ let he = {
1147+ let gq = ec
1148+ if ($isInstanceOf(gq, "Address"))
11371149 then {
1138- let gZ = gl
1139- invoke(gZ, "emit", [el], nil)
1150+ let hf = gq
1151+ invoke(hf, "emit", [eq], nil)
11401152 }
11411153 else unit
11421154 }
1143- if ((gY == gY))
1155+ if ((he == he))
11441156 then {
1145- let ha = if ((em > 0))
1146- then invoke(gT, "put", nil, [AttachedPayment(dj, em)])
1157+ let hg = if ((er > 0))
1158+ then invoke(gZ, "put", nil, [AttachedPayment(do, er)])
11471159 else nil
1148- if ((ha == ha))
1160+ if ((hg == hg))
11491161 then {
1150- let hb = if ((en > 0))
1151- then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
1162+ let hh = if ((es > 0))
1163+ then invoke(gZ, "put", nil, [AttachedPayment(dp, es)])
11521164 else nil
1153- if ((hb == hb))
1165+ if ((hh == hh))
11541166 then {
1155- let hc = if (gQ)
1167+ let hi = if (gW)
11561168 then {
1157- let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)])
1158- if ((hd == hd))
1169+ let hj = invoke(gY, "stake", nil, [AttachedPayment(hd, eq)])
1170+ if ((hj == hj))
11591171 then nil
11601172 else throw("Strict value is not equal to itself.")
11611173 }
1162- else [ScriptTransfer(cP.caller, el, gX)]
1163- let he = eS(0, 0, 0)
1164- let gi = he._1
1165- let eJ = he._2
1166- let hf = if ((eJ >= eR))
1174+ else [ScriptTransfer(cU.caller, eq, hd)]
1175+ let hk = eX(0, 0, 0)
1176+ let gn = hk._1
1177+ let eO = hk._2
1178+ let hl = if ((eO >= eW))
11671179 then true
1168- else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " "))
1169- if ((hf == hf))
1180+ else aS(makeString(["updated DLp lower than current DLp", toString(eT), toString(eU), toString(eV), toString(eW), toString(eO), toString(er), toString(es)], " "))
1181+ if ((hl == hl))
11701182 then {
1171- let hg = value(assetInfo(bl)).quantity
1172- if ((hg == hg))
1173- then ((dB ++ hc) ++ gi)
1183+ let hm = value(assetInfo(bq)).quantity
1184+ if ((hm == hm))
1185+ then ((dG ++ hi) ++ gn)
11741186 else throw("Strict value is not equal to itself.")
11751187 }
11761188 else throw("Strict value is not equal to itself.")
11771189 }
11781190 else throw("Strict value is not equal to itself.")
11791191 }
11801192 else throw("Strict value is not equal to itself.")
11811193 }
11821194 else throw("Strict value is not equal to itself.")
11831195 }
11841196 else throw("Strict value is not equal to itself.")
11851197 }
11861198 else throw("Strict value is not equal to itself.")
11871199 }
11881200 else throw("Strict value is not equal to itself.")
11891201 }
11901202 else throw("Strict value is not equal to itself.")
11911203 }
11921204 else throw("Strict value is not equal to itself.")
11931205 }
11941206 }
11951207
11961208
11971209
1198-@Callable(cP)
1199-func putOneTknV2 (fM,gQ) = {
1200- let hh = {
1201- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1202- if ($isInstanceOf(aS, "Boolean"))
1203- then aS
1204- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1210+@Callable(cU)
1211+func putOneTknV2 (fR,gW) = {
1212+ let hn = {
1213+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1214+ if ($isInstanceOf(aX, "Boolean"))
1215+ then aX
1216+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
12051217 }
1206- let hi = if (if (if (aV())
1218+ let ho = if (if (if (ba())
12071219 then true
1208- else (bk == q))
1220+ else (bp == q))
12091221 then true
1210- else (bk == s))
1222+ else (bp == s))
12111223 then true
1212- else hh
1213- let gH = [if (if (!(hi))
1224+ else hn
1225+ let gN = [if (if (!(ho))
12141226 then true
1215- else go(cP))
1227+ else gt(cU))
12161228 then true
1217- else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
1229+ else aS("put operation is blocked by admin"), if ((size(cU.payments) == 1))
12181230 then true
1219- else aN("exactly 1 payment are expected")]
1220- if ((gH == gH))
1231+ else aS("exactly 1 payment are expected")]
1232+ if ((gN == gN))
12211233 then {
1222- let dj = toBase58String(value(bm))
1223- let dk = toBase58String(value(bn))
1224- let di = bl
1225- let fQ = bo
1226- let fR = bp
1227- let dh = if ((cP.caller == this))
1228- then cP.originCaller
1229- else cP.caller
1230- let fk = value(cP.payments[0])
1231- let df = toBase58String(value(fk.assetId))
1232- let dL = fk.amount
1233- let eR = if ((fk.assetId == bm))
1234- then eK(toBigInt(dL), toBigInt(0), toBigInt(0))
1235- else eK(toBigInt(0), toBigInt(dL), toBigInt(0))
1236- if ((eR == eR))
1234+ let do = toBase58String(value(br))
1235+ let dp = toBase58String(value(bs))
1236+ let dn = bq
1237+ let fV = bt
1238+ let fW = bu
1239+ let dm = if ((cU.caller == this))
1240+ then cU.originCaller
1241+ else cU.caller
1242+ let fp = value(cU.payments[0])
1243+ let dk = toBase58String(value(fp.assetId))
1244+ let dQ = fp.amount
1245+ let eW = if ((fp.assetId == br))
1246+ then eP(toBigInt(dQ), toBigInt(0), toBigInt(0))
1247+ else eP(toBigInt(0), toBigInt(dQ), toBigInt(0))
1248+ if ((eW == eW))
12371249 then {
1238- let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1239- if ((hj == hj))
1250+ let hp = fu(dQ, dk, toString(dm), toBase58String(cU.transactionId), true)
1251+ if ((hp == hp))
12401252 then {
1241- let cx = hj._3
1242- let dB = hj._2
1243- let hk = hj._1
1244- let el = if (if ((fM > 0))
1245- then (fM > hk)
1253+ let cC = hp._3
1254+ let dG = hp._2
1255+ let hq = hp._1
1256+ let eq = if (if ((fR > 0))
1257+ then (fR > hq)
12461258 else false)
1247- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
1248- else hk
1249- let gW = invoke(aQ, "emit", [el], nil)
1250- if ((gW == gW))
1259+ then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
1260+ else hq
1261+ let hc = invoke(aV, "emit", [eq], nil)
1262+ if ((hc == hc))
12511263 then {
1252- let gY = {
1253- let gl = gW
1254- if ($isInstanceOf(gl, "Address"))
1264+ let he = {
1265+ let gq = hc
1266+ if ($isInstanceOf(gq, "Address"))
12551267 then {
1256- let gZ = gl
1257- invoke(gZ, "emit", [el], nil)
1268+ let hf = gq
1269+ invoke(hf, "emit", [eq], nil)
12581270 }
12591271 else unit
12601272 }
1261- if ((gY == gY))
1273+ if ((he == he))
12621274 then {
1263- let hc = if (gQ)
1275+ let hi = if (gW)
12641276 then {
1265- let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1266- if ((hd == hd))
1277+ let hj = invoke(bz, "stakeFor", [toString(cU.caller)], [AttachedPayment(dn, eq)])
1278+ if ((hj == hj))
12671279 then nil
12681280 else throw("Strict value is not equal to itself.")
12691281 }
1270- else [ScriptTransfer(cP.caller, el, di)]
1271- let gc = if ((cx > 0))
1272- then [ScriptTransfer(aX, cx, fromBase58String(df))]
1282+ else [ScriptTransfer(cU.caller, eq, dn)]
1283+ let gh = if ((cC > 0))
1284+ then [ScriptTransfer(bc, cC, fromBase58String(dk))]
12731285 else nil
1274- let hl = if ((this == aX))
1286+ let hr = if ((this == bc))
12751287 then $Tuple2(0, 0)
12761288 else {
1277- let hm = if ((fk.assetId == bm))
1289+ let hs = if ((fp.assetId == br))
12781290 then true
12791291 else false
1280- if (hm)
1281- then $Tuple2(-(cx), 0)
1282- else $Tuple2(0, -(cx))
1292+ if (hs)
1293+ then $Tuple2(-(cC), 0)
1294+ else $Tuple2(0, -(cC))
12831295 }
1284- let eT = hl._1
1285- let eU = hl._2
1286- let hn = eS(eT, eU, 0)
1287- let gi = hn._1
1288- let eJ = hn._2
1289- let gj = eW(eR, eJ)
1290- if ((gj == gj))
1291- then $Tuple2((((dB ++ hc) ++ gc) ++ gi), el)
1296+ let eY = hr._1
1297+ let eZ = hr._2
1298+ let ht = eX(eY, eZ, 0)
1299+ let gn = ht._1
1300+ let eO = ht._2
1301+ let go = fb(eW, eO)
1302+ if ((go == go))
1303+ then $Tuple2((((dG ++ hi) ++ gh) ++ gn), eq)
12921304 else throw("Strict value is not equal to itself.")
12931305 }
12941306 else throw("Strict value is not equal to itself.")
12951307 }
12961308 else throw("Strict value is not equal to itself.")
12971309 }
12981310 else throw("Strict value is not equal to itself.")
12991311 }
13001312 else throw("Strict value is not equal to itself.")
13011313 }
13021314 else throw("Strict value is not equal to itself.")
13031315 }
13041316
13051317
13061318
1307-@Callable(cP)
1308-func putForFree (ho) = if ((0 > ho))
1319+@Callable(cU)
1320+func putForFree (hu) = if ((0 > hu))
13091321 then throw("Wrong slpg")
1310- else if ((size(cP.payments) != 2))
1322+ else if ((size(cU.payments) != 2))
13111323 then throw("2 pmnts expd")
13121324 else {
1313- let hp = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], ho, false, false, true, 0, "")
1314- let dB = hp._9
1315- let gU = toBigInt(value(cP.payments[0]).amount)
1316- let gV = toBigInt(value(cP.payments[1]).amount)
1317- let eR = eK(gU, gV, toBigInt(0))
1318- if ((eR == eR))
1325+ let hv = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], hu, false, false, true, 0, "")
1326+ let dG = hv._9
1327+ let ha = toBigInt(value(cU.payments[0]).amount)
1328+ let hb = toBigInt(value(cU.payments[1]).amount)
1329+ let eW = eP(ha, hb, toBigInt(0))
1330+ if ((eW == eW))
13191331 then {
1320- let hq = eS(0, 0, 0)
1321- let gi = hq._1
1322- let eJ = hq._2
1323- let gj = eW(eR, eJ)
1324- if ((gj == gj))
1325- then (dB ++ gi)
1332+ let hw = eX(0, 0, 0)
1333+ let gn = hw._1
1334+ let eO = hw._2
1335+ let go = fb(eW, eO)
1336+ if ((go == go))
1337+ then (dG ++ gn)
13261338 else throw("Strict value is not equal to itself.")
13271339 }
13281340 else throw("Strict value is not equal to itself.")
13291341 }
13301342
13311343
13321344
1333-@Callable(cP)
1345+@Callable(cU)
13341346 func get () = {
1335- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1336- if ((eR == eR))
1347+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1348+ if ((eW == eW))
13371349 then {
1338- let dX = fj(cP)
1339- let hr = dX._1
1340- let dA = dX._2
1341- let dL = dX._3
1342- let df = dX._4
1343- let dB = dX._5
1344- let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1345- if ((ey == ey))
1350+ let ec = fo(cU)
1351+ let hx = ec._1
1352+ let dF = ec._2
1353+ let dQ = ec._3
1354+ let dk = ec._4
1355+ let dG = ec._5
1356+ let eD = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1357+ if ((eD == eD))
13461358 then {
1347- let hs = eS(-(hr), -(dA), 0)
1348- let gi = hs._1
1349- let eJ = hs._2
1350- let gj = eW(eR, eJ)
1351- if ((gj == gj))
1352- then (dB ++ gi)
1359+ let hy = eX(-(hx), -(dF), 0)
1360+ let gn = hy._1
1361+ let eO = hy._2
1362+ let go = fb(eW, eO)
1363+ if ((go == go))
1364+ then (dG ++ gn)
13531365 else throw("Strict value is not equal to itself.")
13541366 }
13551367 else throw("Strict value is not equal to itself.")
13561368 }
13571369 else throw("Strict value is not equal to itself.")
13581370 }
13591371
13601372
13611373
1362-@Callable(cP)
1363-func getOneTknV2 (fL,fM) = {
1364- let hh = {
1365- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1366- if ($isInstanceOf(aS, "Boolean"))
1367- then aS
1368- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1374+@Callable(cU)
1375+func getOneTknV2 (fQ,fR) = {
1376+ let hn = {
1377+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1378+ if ($isInstanceOf(aX, "Boolean"))
1379+ then aX
1380+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
13691381 }
1370- let ht = if (if (aV())
1382+ let hz = if (if (ba())
13711383 then true
1372- else (bk == s))
1384+ else (bp == s))
13731385 then true
1374- else hh
1375- let gH = [if (if (!(ht))
1386+ else hn
1387+ let gN = [if (if (!(hz))
13761388 then true
1377- else go(cP))
1389+ else gt(cU))
13781390 then true
1379- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
1391+ else aS("get operation is blocked by admin"), if ((size(cU.payments) == 1))
13801392 then true
1381- else aN("exactly 1 payment are expected")]
1382- if ((gH == gH))
1393+ else aS("exactly 1 payment are expected")]
1394+ if ((gN == gN))
13831395 then {
1384- let hu = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId)
1385- let dB = hu._1
1386- let fV = hu._2
1387- $Tuple2(dB, fV)
1396+ let hA = fP(fQ, fR, cU.payments, cU.caller, cU.originCaller, cU.transactionId)
1397+ let dG = hA._1
1398+ let ga = hA._2
1399+ $Tuple2(dG, ga)
13881400 }
13891401 else throw("Strict value is not equal to itself.")
13901402 }
13911403
13921404
13931405
1394-@Callable(cP)
1406+@Callable(cU)
13951407 func refreshDLp () = {
1396- let hv = valueOrElse(getInteger(aq), 0)
1397- let hw = if (((height - hv) >= at))
1408+ let hB = valueOrElse(getInteger(at), 0)
1409+ let hC = if (((height - hB) >= aw))
13981410 then unit
1399- else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1400- if ((hw == hw))
1411+ else aS(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1412+ if ((hC == hC))
14011413 then {
1402- let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp"))
1403- let hx = eS(0, 0, 0)
1404- let hy = hx._1
1405- let eJ = hx._2
1406- let eV = if ((fd != eJ))
1407- then hy
1408- else aN("nothing to refresh")
1409- $Tuple2(eV, toString(eJ))
1414+ let fi = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), aU("invalid dLp"))
1415+ let hD = eX(0, 0, 0)
1416+ let hE = hD._1
1417+ let eO = hD._2
1418+ let fa = if ((fi != eO))
1419+ then hE
1420+ else aS("nothing to refresh")
1421+ $Tuple2(fa, toString(eO))
14101422 }
14111423 else throw("Strict value is not equal to itself.")
14121424 }
14131425
14141426
14151427
1416-@Callable(cP)
1417-func getOneTknV2READONLY (fL,hz) = {
1418- let dj = toBase58String(value(bm))
1419- let dk = toBase58String(value(bn))
1420- let di = toBase58String(value(bl))
1421- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1422- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1423- let cb = cy(cz)
1424- let ca = (cb - fraction(toBigInt(hz), cb, eI))
1425- let hA = if ((fL == dj))
1428+@Callable(cU)
1429+func getOneTknV2READONLY (fQ,hF) = {
1430+ let do = toBase58String(value(br))
1431+ let dp = toBase58String(value(bs))
1432+ let dn = toBase58String(value(bq))
1433+ let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
1434+ let eN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dn)), "invalid lp asset").quantity)
1435+ let cg = cD(cE)
1436+ let cf = (cg - fraction(toBigInt(hF), cg, eN))
1437+ let hG = if ((fQ == do))
14261438 then 0
1427- else if ((fL == dk))
1439+ else if ((fQ == dp))
14281440 then 1
14291441 else throw("invalid out asset id")
1430- let hB = es(cz, hA, ca)
1431- let gA = (cz[hA] - hB)
1432- let gB = max([0, toInt((gA - f))])
1433- let hC = cv(gB, aT)
1434- let fU = hC._1
1435- let cx = hC._2
1436- $Tuple2(nil, $Tuple2(fU, cx))
1442+ let hH = ex(cE, hG, cf)
1443+ let gG = (cE[hG] - hH)
1444+ let gH = max([0, toInt((gG - f))])
1445+ let hI = cA(gH, aY)
1446+ let fZ = hI._1
1447+ let cC = hI._2
1448+ $Tuple2(nil, $Tuple2(fZ, cC))
14371449 }
14381450
14391451
14401452
1441-@Callable(cP)
1442-func getOneTknV2WithBonusREADONLY (fL,hz) = {
1443- let dj = toBase58String(value(bm))
1444- let dk = toBase58String(value(bn))
1445- let di = toBase58String(value(bl))
1446- let dp = bN(dj)
1447- let dr = bN(dk)
1448- let hD = {
1449- let aS = invoke(this, "getOneTknV2READONLY", [fL, hz], nil)
1450- if ($isInstanceOf(aS, "(Int, Int)"))
1451- then aS
1452- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
1453+@Callable(cU)
1454+func getOneTknV2WithBonusREADONLY (fQ,hF) = {
1455+ let do = toBase58String(value(br))
1456+ let dp = toBase58String(value(bs))
1457+ let dn = toBase58String(value(bq))
1458+ let du = bS(do)
1459+ let dw = bS(dp)
1460+ let hJ = {
1461+ let aX = invoke(this, "getOneTknV2READONLY", [fQ, hF], nil)
1462+ if ($isInstanceOf(aX, "(Int, Int)"))
1463+ then aX
1464+ else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
14531465 }
1454- let fU = hD._1
1455- let cx = hD._2
1456- let dX = dd("", di, hz, this)
1457- let dz = dX._1
1458- let dA = dX._2
1459- let hE = (dz + dA)
1460- let fJ = if ((hE == 0))
1461- then if ((fU == 0))
1466+ let fZ = hJ._1
1467+ let cC = hJ._2
1468+ let ec = di("", dn, hF, this)
1469+ let dE = ec._1
1470+ let dF = ec._2
1471+ let hK = (dE + dF)
1472+ let fO = if ((hK == 0))
1473+ then if ((fZ == 0))
14621474 then 0
14631475 else throw("bonus calculation error")
1464- else fraction((fU - hE), a, hE)
1465- $Tuple2(nil, $Tuple3(fU, cx, fJ))
1476+ else fraction((fZ - hK), a, hK)
1477+ $Tuple2(nil, $Tuple3(fZ, cC, fO))
14661478 }
14671479
14681480
14691481
1470-@Callable(cP)
1471-func getNoLess (hF,hG) = {
1472- let dX = fj(cP)
1473- let dz = dX._1
1474- let dA = dX._2
1475- let dL = dX._3
1476- let df = dX._4
1477- let dB = dX._5
1478- if ((hF > dz))
1479- then throw(((("Failed: " + toString(dz)) + " < ") + toString(hF)))
1480- else if ((hG > dA))
1481- then throw(((("Failed: " + toString(dA)) + " < ") + toString(hG)))
1482+@Callable(cU)
1483+func getNoLess (hL,hM) = {
1484+ let ec = fo(cU)
1485+ let dE = ec._1
1486+ let dF = ec._2
1487+ let dQ = ec._3
1488+ let dk = ec._4
1489+ let dG = ec._5
1490+ if ((hL > dE))
1491+ then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL)))
1492+ else if ((hM > dF))
1493+ then throw(((("Failed: " + toString(dF)) + " < ") + toString(hM)))
14821494 else {
1483- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1484- if ((eR == eR))
1495+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1496+ if ((eW == eW))
14851497 then {
1486- let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1487- if ((hH == hH))
1498+ let hN = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1499+ if ((hN == hN))
14881500 then {
1489- let hI = eS(-(dz), -(dA), 0)
1490- let gi = hI._1
1491- let eJ = hI._2
1492- let gj = eW(eR, eJ)
1493- if ((gj == gj))
1494- then (dB ++ gi)
1501+ let hO = eX(-(dE), -(dF), 0)
1502+ let gn = hO._1
1503+ let eO = hO._2
1504+ let go = fb(eW, eO)
1505+ if ((go == go))
1506+ then (dG ++ gn)
14951507 else throw("Strict value is not equal to itself.")
14961508 }
14971509 else throw("Strict value is not equal to itself.")
14981510 }
14991511 else throw("Strict value is not equal to itself.")
15001512 }
15011513 }
15021514
15031515
15041516
1505-@Callable(cP)
1506-func unstakeAndGet (cw) = {
1507- let hJ = if ((size(cP.payments) != 0))
1517+@Callable(cU)
1518+func unstakeAndGet (cB) = {
1519+ let hP = if ((size(cU.payments) != 0))
15081520 then throw("No pmnts expd")
15091521 else true
1510- if ((hJ == hJ))
1522+ if ((hP == hP))
15111523 then {
1512- let hK = bs()
1513- let gX = bl
1514- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1515- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1516- if ((eR == eR))
1524+ let hQ = bx()
1525+ let hd = bq
1526+ let hR = valueOrErrorMessage(addressFromString(hQ[C]), "Wr st addr")
1527+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1528+ if ((eW == eW))
15171529 then {
1518- let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil)
1519- if ((hM == hM))
1530+ let hS = invoke(hR, "unstake", [toBase58String(hd), cB], nil)
1531+ if ((hS == hS))
15201532 then {
1521- let dX = dd(toBase58String(cP.transactionId), toBase58String(gX), cw, cP.caller)
1522- let dz = dX._1
1523- let dA = dX._2
1524- let dn = parseIntValue(dX._9)
1525- let dB = dX._10
1526- let hN = if (if (aV())
1533+ let ec = di(toBase58String(cU.transactionId), toBase58String(hd), cB, cU.caller)
1534+ let dE = ec._1
1535+ let dF = ec._2
1536+ let ds = parseIntValue(ec._9)
1537+ let dG = ec._10
1538+ let hT = if (if (ba())
15271539 then true
1528- else (dn == s))
1529- then throw(("Blocked: " + toString(dn)))
1540+ else (ds == s))
1541+ then throw(("Blocked: " + toString(ds)))
15301542 else true
1531- if ((hN == hN))
1543+ if ((hT == hT))
15321544 then {
1533- let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)])
1534- if ((hO == hO))
1545+ let hU = invoke(aV, "burn", [cB], [AttachedPayment(hd, cB)])
1546+ if ((hU == hU))
15351547 then {
1536- let hP = eS(-(dz), -(dA), 0)
1537- let gi = hP._1
1538- let eJ = hP._2
1539- let gj = eW(eR, eJ)
1540- if ((gj == gj))
1541- then (dB ++ gi)
1548+ let hV = eX(-(dE), -(dF), 0)
1549+ let gn = hV._1
1550+ let eO = hV._2
1551+ let go = fb(eW, eO)
1552+ if ((go == go))
1553+ then (dG ++ gn)
15421554 else throw("Strict value is not equal to itself.")
15431555 }
15441556 else throw("Strict value is not equal to itself.")
15451557 }
15461558 else throw("Strict value is not equal to itself.")
15471559 }
15481560 else throw("Strict value is not equal to itself.")
15491561 }
15501562 else throw("Strict value is not equal to itself.")
15511563 }
15521564 else throw("Strict value is not equal to itself.")
15531565 }
15541566
15551567
15561568
1557-@Callable(cP)
1558-func unstakeAndGetNoLess (hQ,hR,hG) = {
1559- let ht = if (aV())
1569+@Callable(cU)
1570+func unstakeAndGetNoLess (hW,hX,hM) = {
1571+ let hz = if (ba())
15601572 then true
1561- else (bk == s)
1562- let gH = [if (!(ht))
1573+ else (bp == s)
1574+ let gN = [if (!(hz))
15631575 then true
1564- else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1576+ else throw("get operation is blocked by admin"), if ((size(cU.payments) == 0))
15651577 then true
15661578 else throw("no payments are expected")]
1567- if ((gH == gH))
1579+ if ((gN == gN))
15681580 then {
1569- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1570- if ((eR == eR))
1581+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1582+ if ((eW == eW))
15711583 then {
1572- let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil)
1573- if ((hM == hM))
1584+ let hS = invoke(bz, "unstake", [toBase58String(bq), hW], nil)
1585+ if ((hS == hS))
15741586 then {
1575- let hS = dd(toBase58String(cP.transactionId), toBase58String(bl), hQ, cP.caller)
1576- let dz = hS._1
1577- let dA = hS._2
1578- let dB = hS._10
1579- let hT = [if ((dz >= hR))
1587+ let hY = di(toBase58String(cU.transactionId), toBase58String(bq), hW, cU.caller)
1588+ let dE = hY._1
1589+ let dF = hY._2
1590+ let dG = hY._10
1591+ let hZ = [if ((dE >= hX))
15801592 then true
1581- else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG))
1593+ else throw(makeString(["amount asset amount to receive is less than ", toString(hX)], "")), if ((dF >= hM))
15821594 then true
1583- else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1584- if ((hT == hT))
1595+ else throw(makeString(["price asset amount to receive is less than ", toString(hM)], ""))]
1596+ if ((hZ == hZ))
15851597 then {
1586- let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)])
1587- if ((hH == hH))
1598+ let hN = invoke(aV, "burn", [hW], [AttachedPayment(bq, hW)])
1599+ if ((hN == hN))
15881600 then {
1589- let hU = eS(-(dz), -(dA), 0)
1590- let gi = hU._1
1591- let eJ = hU._2
1592- let gj = eW(eR, eJ)
1593- if ((gj == gj))
1594- then (dB ++ gi)
1601+ let ia = eX(-(dE), -(dF), 0)
1602+ let gn = ia._1
1603+ let eO = ia._2
1604+ let go = fb(eW, eO)
1605+ if ((go == go))
1606+ then (dG ++ gn)
15951607 else throw("Strict value is not equal to itself.")
15961608 }
15971609 else throw("Strict value is not equal to itself.")
15981610 }
15991611 else throw("Strict value is not equal to itself.")
16001612 }
16011613 else throw("Strict value is not equal to itself.")
16021614 }
16031615 else throw("Strict value is not equal to itself.")
16041616 }
16051617 else throw("Strict value is not equal to itself.")
16061618 }
16071619
16081620
16091621
1610-@Callable(cP)
1611-func unstakeAndGetOneTknV2 (hQ,fL,fM) = {
1612- let hh = {
1613- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1614- if ($isInstanceOf(aS, "Boolean"))
1615- then aS
1616- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1622+@Callable(cU)
1623+func unstakeAndGetOneTknV2 (hW,fQ,fR) = {
1624+ let hn = {
1625+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1626+ if ($isInstanceOf(aX, "Boolean"))
1627+ then aX
1628+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
16171629 }
1618- let ht = if (if (aV())
1630+ let hz = if (if (ba())
16191631 then true
1620- else (bk == s))
1632+ else (bp == s))
16211633 then true
1622- else hh
1623- let gH = [if (if (!(ht))
1634+ else hn
1635+ let gN = [if (if (!(hz))
16241636 then true
1625- else go(cP))
1637+ else gt(cU))
16261638 then true
1627- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1639+ else aS("get operation is blocked by admin"), if ((size(cU.payments) == 0))
16281640 then true
1629- else aN("no payments are expected")]
1630- if ((gH == gH))
1641+ else aS("no payments are expected")]
1642+ if ((gN == gN))
16311643 then {
1632- let hK = bs()
1633- let gX = bl
1634- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1635- let dh = cP.caller
1636- let hV = this
1637- let hM = invoke(hL, "unstakeINTERNAL", [gX, hQ, dh.bytes, hV.bytes], nil)
1638- if ((hM == hM))
1644+ let hQ = bx()
1645+ let hd = bq
1646+ let hR = valueOrErrorMessage(addressFromString(hQ[C]), "Wr st addr")
1647+ let dm = cU.caller
1648+ let ib = this
1649+ let hS = invoke(hR, "unstakeINTERNAL", [hd, hW, dm.bytes, ib.bytes], nil)
1650+ if ((hS == hS))
16391651 then {
1640- let hW = fK(fL, fM, [AttachedPayment(gX, hQ)], cP.caller, cP.originCaller, cP.transactionId)
1641- let dB = hW._1
1642- let fV = hW._2
1643- $Tuple2(dB, fV)
1652+ let ic = fP(fQ, fR, [AttachedPayment(hd, hW)], cU.caller, cU.originCaller, cU.transactionId)
1653+ let dG = ic._1
1654+ let ga = ic._2
1655+ $Tuple2(dG, ga)
16441656 }
16451657 else throw("Strict value is not equal to itself.")
16461658 }
16471659 else throw("Strict value is not equal to itself.")
16481660 }
16491661
16501662
16511663
1652-@Callable(cP)
1653-func putOneTknV2WithBonusREADONLY (hX,hY) = {
1654- let hZ = fp(hX, hY, "", "", true)
1655- let fE = hZ._1
1656- let dB = hZ._2
1657- let cx = hZ._3
1658- let fJ = hZ._4
1659- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1664+@Callable(cU)
1665+func putOneTknV2WithBonusREADONLY (id,ie) = {
1666+ let if = fu(id, ie, "", "", true)
1667+ let fJ = if._1
1668+ let dG = if._2
1669+ let cC = if._3
1670+ let fO = if._4
1671+ $Tuple2(nil, $Tuple3(fJ, cC, fO))
16601672 }
16611673
16621674
16631675
1664-@Callable(cP)
1665-func putOneTknV2WithoutTakeFeeREADONLY (hX,hY) = {
1666- let ia = fp(hX, hY, "", "", false)
1667- let fE = ia._1
1668- let dB = ia._2
1669- let cx = ia._3
1670- let fJ = ia._4
1671- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1676+@Callable(cU)
1677+func putOneTknV2WithoutTakeFeeREADONLY (id,ie) = {
1678+ let ig = fu(id, ie, "", "", false)
1679+ let fJ = ig._1
1680+ let dG = ig._2
1681+ let cC = ig._3
1682+ let fO = ig._4
1683+ $Tuple2(nil, $Tuple3(fJ, cC, fO))
16721684 }
16731685
16741686
16751687
1676-@Callable(cP)
1677-func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ)))
1688+@Callable(cU)
1689+func activate (ih,ii) = if ((toString(cU.caller) != toString(aV)))
16781690 then throw("denied")
1679- else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
1691+ else $Tuple2([StringEntry(aj(), ih), StringEntry(ak(), ii)], "success")
16801692
16811693
16821694
1683-@Callable(cP)
1684-func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1685- then gn
1686- else [StringEntry(id, hN)]
1695+@Callable(cU)
1696+func setS (ij,hT) = if ((toString(cU.caller) != aO(this, ao())))
1697+ then gs
1698+ else [StringEntry(ij, hT)]
16871699
16881700
16891701
1690-@Callable(cP)
1691-func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1692- then gn
1693- else [IntegerEntry(id, hN)]
1702+@Callable(cU)
1703+func setI (ij,hT) = if ((toString(cU.caller) != aO(this, ao())))
1704+ then gs
1705+ else [IntegerEntry(ij, hT)]
16941706
16951707
16961708
1697-@Callable(cP)
1698-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
1709+@Callable(cU)
1710+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bd())
16991711
17001712
17011713
1702-@Callable(cP)
1703-func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
1714+@Callable(cU)
1715+func getAccBalanceWrapperREADONLY (bT) = $Tuple2(nil, bS(bT))
17041716
17051717
17061718
1707-@Callable(cP)
1708-func calcPricesWrapperREADONLY (ch,ci,cm) = {
1709- let ie = cl(ch, ci, cm)
1710- $Tuple2(nil, [toString(ie[0]), toString(ie[1]), toString(ie[2])])
1719+@Callable(cU)
1720+func calcPricesWrapperREADONLY (cm,cn,cr) = {
1721+ let ik = cq(cm, cn, cr)
1722+ $Tuple2(nil, [toString(ik[0]), toString(ik[1]), toString(ik[2])])
17111723 }
17121724
17131725
17141726
1715-@Callable(cP)
1716-func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if))
1727+@Callable(cU)
1728+func fromX18WrapperREADONLY (M,il) = $Tuple2(nil, L(parseBigIntValue(M), il))
17171729
17181730
17191731
1720-@Callable(cP)
1732+@Callable(cU)
17211733 func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
17221734
17231735
17241736
1725-@Callable(cP)
1726-func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
1737+@Callable(cU)
1738+func calcPriceBigIntWrapperREADONLY (bV,bW) = $Tuple2(nil, toString(bU(parseBigIntValue(bV), parseBigIntValue(bW))))
17271739
17281740
17291741
1730-@Callable(cP)
1731-func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,ig,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, ig, dH, dI, true, false, 0, ""))
1742+@Callable(cU)
1743+func estimatePutOperationWrapperREADONLY (dj,cb,dI,dJ,dK,dL,im,dM,dN) = $Tuple2(nil, dH(dj, cb, dI, dJ, dK, dL, im, dM, dN, true, false, 0, ""))
17321744
17331745
17341746
1735-@Callable(cP)
1736-func estimateGetOperationWrapperREADONLY (de,ih,dg,ig) = {
1737- let dX = dd(de, ih, dg, addressFromStringValue(ig))
1738- $Tuple2(nil, $Tuple10(dX._1, dX._2, dX._3, dX._4, dX._5, dX._6, dX._7, toString(dX._8), dX._9, dX._10))
1747+@Callable(cU)
1748+func estimateGetOperationWrapperREADONLY (dj,in,dl,im) = {
1749+ let ec = di(dj, in, dl, addressFromStringValue(im))
1750+ $Tuple2(nil, $Tuple10(ec._1, ec._2, ec._3, ec._4, ec._5, ec._6, ec._7, toString(ec._8), ec._9, ec._10))
17391751 }
17401752
17411753
1742-@Verifier(ii)
1743-func ij () = {
1744- let ik = {
1745- let gl = gk()
1746- if ($isInstanceOf(gl, "ByteVector"))
1754+
1755+@Callable(cU)
1756+func changeAmp () = {
1757+ let io = invoke(aV, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1758+ let ip = {
1759+ let gq = io
1760+ if ($isInstanceOf(gq, "List[Any]"))
17471761 then {
1748- let gp = gl
1749- gp
1762+ let iq = gq
1763+ $Tuple3({
1764+ let aX = iq[0]
1765+ if ($isInstanceOf(aX, "Int"))
1766+ then aX
1767+ else throw(($getType(aX) + " couldn't be cast to Int"))
1768+ }, {
1769+ let aX = iq[1]
1770+ if ($isInstanceOf(aX, "Int"))
1771+ then aX
1772+ else throw(($getType(aX) + " couldn't be cast to Int"))
1773+ }, {
1774+ let aX = iq[2]
1775+ if ($isInstanceOf(aX, "Int"))
1776+ then aX
1777+ else throw(($getType(aX) + " couldn't be cast to Int"))
1778+ })
17501779 }
1751- else if ($isInstanceOf(gl, "Unit"))
1752- then ii.senderPublicKey
1780+ else aS("invalid entry type")
1781+ }
1782+ let ir = ip._1
1783+ let is = ip._2
1784+ let it = ip._3
1785+ let iu = parseIntValue(getStringValue(al()))
1786+ let iv = (iu + is)
1787+ let iw = if ((0 > is))
1788+ then if ((it > iv))
1789+ then it
1790+ else iv
1791+ else if ((iv > it))
1792+ then it
1793+ else iv
1794+ let ix = valueOrElse(getInteger(ap()), 0)
1795+ let iy = (ix + ir)
1796+ let gN = [if ((height > iy))
1797+ then true
1798+ else aS("try again in few blocks"), if ((iu != iw))
1799+ then true
1800+ else aS("already reached target")]
1801+ if ((gN == gN))
1802+ then [IntegerEntry(ap(), height), StringEntry(al(), toString(iw)), StringEntry(am(height), toString(iw))]
1803+ else throw("Strict value is not equal to itself.")
1804+ }
1805+
1806+
1807+@Verifier(iz)
1808+func iA () = {
1809+ let iB = {
1810+ let gq = gp()
1811+ if ($isInstanceOf(gq, "ByteVector"))
1812+ then {
1813+ let gu = gq
1814+ gu
1815+ }
1816+ else if ($isInstanceOf(gq, "Unit"))
1817+ then iz.senderPublicKey
17531818 else throw("Match error")
17541819 }
1755- let gl = ii
1756- if ($isInstanceOf(gl, "Order"))
1820+ let gq = iz
1821+ if ($isInstanceOf(gq, "Order"))
17571822 then {
1758- let eZ = gl
1759- let il = aW()
1760- let im = eY(eZ)
1761- let aF = im._1
1762- let aG = im._2
1763- let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey)
1764- let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], il)
1765- if (if (if (aF)
1766- then aH
1823+ let fe = gq
1824+ let iC = bb()
1825+ let iD = if (gB())
1826+ then $Tuple2(true, "")
1827+ else fd(fe)
1828+ let aK = iD._1
1829+ let aL = iD._2
1830+ let aM = sigVerify(fe.bodyBytes, fe.proofs[0], fe.senderPublicKey)
1831+ let aN = sigVerify(fe.bodyBytes, fe.proofs[1], iC)
1832+ if (if (if (aK)
1833+ then aM
17671834 else false)
1768- then aI
1835+ then aN
17691836 else false)
17701837 then true
1771- else aE(aF, aG, aH, aI)
1838+ else aJ(aK, aL, aM, aN)
17721839 }
1773- else if ($isInstanceOf(gl, "SetScriptTransaction"))
1840+ else if ($isInstanceOf(gq, "SetScriptTransaction"))
17741841 then {
1775- let cC = gl
1776- if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
1842+ let cH = gq
1843+ if (sigVerify(iz.bodyBytes, iz.proofs[0], iB))
17771844 then true
17781845 else {
1779- let in = blake2b256(value(cC.script))
1780- let io = fromBase64String(value(getString(aQ, aC())))
1781- let ip = scriptHash(this)
1782- if ((io == in))
1783- then (ip != in)
1846+ let iE = blake2b256(value(cH.script))
1847+ let iF = fromBase64String(value(getString(aV, aF())))
1848+ let iG = scriptHash(this)
1849+ if ((iF == iE))
1850+ then (iG != iE)
17841851 else false
17851852 }
17861853 }
1787- else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
1854+ else sigVerify(iz.bodyBytes, iz.proofs[0], iB)
17881855 }
17891856

github/deemru/w8io/026f985 
810.04 ms