tx · GHgFLNSm2sKo2Nx79EUFqCFZBaY1YxVZm5SG7wZHjjQw

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04100000 Waves

2023.05.10 13:15 [2571654] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "GHgFLNSm2sKo2Nx79EUFqCFZBaY1YxVZm5SG7wZHjjQw", "fee": 4100000, "feeAssetId": null, "timestamp": 1683713696856, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "3Xg6dWcSreSpA6HfgFUYDwN7KMQChd4HrotfUuKykkZ83rGeud4yQMMC1AwzWQHXUgAUEqsE6kZjtZErP8mKsH7x" ], "script": "base64:BgKxLQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQc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CAl8xBAJhSwgFAmlCAl8yBAJhTAkA9AMDCAUCZmkJYm9keUJ5dGVzCQCRAwIIBQJmaQZwcm9vZnMAAAgFAmZpD3NlbmRlclB1YmxpY0tleQQCYU0JAPQDAwgFAmZpCWJvZHlCeXRlcwkAkQMCCAUCZmkGcHJvb2ZzAAEFAmlBAwMDBQJhSgUCYUwHBQJhTQcGCQECYUkEBQJhSgUCYUsFAmFMBQJhTQMJAAECBQJhUAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmFVBQJhUAMJAPQDAwgFAml4CWJvZHlCeXRlcwkAkQMCCAUCaXgGcHJvb2ZzAAAFAml6BgQCaUMJAPYDAQkBBXZhbHVlAQgFAmFVBnNjcmlwdAQCaUQJANsEAQkBBXZhbHVlAQkAnQgCBQJhVAkBAmFFAAQCaUUJAPEHAQUEdGhpcwMJAAACBQJpRAUCaUMJAQIhPQIFAmlFBQJpQwcJAPQDAwgFAml4CWJvZHlCeXRlcwkAkQMCCAUCaXgGcHJvb2ZzAAAFAml6CFKkNA==", "height": 2571654, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4DPD7nfTyXrocx8HxYNdS9LA6CuiztveyJH1ByJxgvAu Next: 4imPqecHSp9A2woTLbCtJnhWnBmUJ1kdZY4MZiE6EDhj Diff:
OldNewDifferences
104104 func Z () = "%s__managerPublicKey"
105105
106106
107-func aa () = "%s__pendingManagerPublicKey"
107+func aa () = "%s__managerVaultAddress"
108108
109109
110110 func ab () = "%s%s__price__last"
175175 func aI (aJ,aK,aL,aM) = throw((((((((("order validation failed: orderValid=" + toString(aJ)) + " (") + aK) + ")") + " senderValid=") + toString(aL)) + " matcherValid=") + toString(aM)))
176176
177177
178-func aN (aO,aP) = valueOrErrorMessage(getString(aO, aP), makeString(["mandatory ", toString(aO), ".", aP, " not defined"], ""))
179-
180-
181-func aQ (aO,aP) = valueOrErrorMessage(getInteger(aO, aP), makeString(["mandatory ", toString(aO), ".", aP, " not defined"], ""))
182-
183-
184-func aR (aS) = throw(makeString(["lp_stable.ride:", aS], " "))
185-
186-
187-func aT (aS) = makeString(["lp_stable.ride:", aS], " ")
188-
189-
190-let aU = addressFromStringValue(aN(this, Y()))
191-
192-let aV = {
193- let aW = invoke(aU, "getInFeeREADONLY", [toString(this)], nil)
194- if ($isInstanceOf(aW, "Int"))
195- then aW
196- else throw(($getType(aW) + " couldn't be cast to Int"))
197- }
198-
199-let aX = {
200- let aW = invoke(aU, "getOutFeeREADONLY", [toString(this)], nil)
201- if ($isInstanceOf(aW, "Int"))
202- then aW
203- else throw(($getType(aW) + " couldn't be cast to Int"))
204- }
205-
206-let aY = aN(this, al())
207-
208-func aZ () = valueOrElse(getBoolean(aU, aD()), false)
209-
210-
211-func ba () = fromBase58String(aN(aU, ax()))
212-
213-
214-let bb = addressFromStringValue(aN(aU, aF()))
215-
216-func bc () = {
217- let bd = aN(this, aj())
218- let be = aN(this, ak())
219- let bf = aQ(aU, aB(be))
220- let az = aQ(aU, aB(bd))
221- split(aN(aU, ay(toString(az), toString(bf))), n)
178+func aN (aO) = {
179+ let aP = addressFromString(aO)
180+ if ($isInstanceOf(aP, "Address"))
181+ then {
182+ let aQ = aP
183+ aQ
184+ }
185+ else this
222186 }
223187
224188
225-func bg (bh) = if ((bh == k))
226- then unit
227- else fromBase58String(bh)
228-
229-
230-func bi (bh) = if ((bh == unit))
231- then k
232- else toBase58String(value(bh))
233-
234-
235-func bj (bk) = $Tuple9(addressFromStringValue(bk[t]), parseIntValue(bk[u]), fromBase58String(bk[v]), bg(bk[w]), bg(bk[x]), parseIntValue(bk[y]), parseIntValue(bk[z]), fromBase58String(bk[A]), fromBase58String(bk[B]))
236-
237-
238-let bl = bj(bc())
239-
240-let bm = bl
241-
242-let bn = bm._1
243-
244-let bo = bm._2
245-
246-let bp = bm._3
247-
248-let bq = bm._4
249-
250-let br = bm._5
251-
252-let bs = bm._6
253-
254-let bt = bm._7
255-
256-let bu = bm._8
257-
258-let bv = bm._9
259-
260-func bw () = split(aN(aU, aw()), n)
261-
262-
263-let bx = bw()
264-
265-let by = valueOrErrorMessage(addressFromString(bx[C]), "Invalid staking contract address")
266-
267-let bz = valueOrErrorMessage(addressFromString(bx[E]), "Invalid slipage contract address")
268-
269-let bA = valueOrErrorMessage(addressFromString(bx[F]), "Invalid gwx contract address")
270-
271-let bB = valueOrErrorMessage(addressFromString(bx[D]), "Invalid gwx contract address")
272-
273-func bC (bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM)], n)
274-
275-
276-func bN (bO,bP,bQ,bG,bJ,bK) = makeString(["%d%d%d%d%d%d", toString(bO), toString(bP), toString(bQ), toString(bG), toString(bJ), toString(bK)], n)
277-
278-
279-func bR (bS) = if ((bS == "WAVES"))
280- then wavesBalance(this).available
281- else assetBalance(this, fromBase58String(bS))
282-
283-
284-func bT (bU,bV) = fraction(bU, c, bV)
285-
286-
287-func bW (bU,bV,P) = fraction(bU, c, bV, P)
288-
289-
290-func bX (bY,bZ,ca) = {
291- let cb = fraction((bY - bZ), b, bZ)
292- let cc = ((ca - W(cb)) > d)
293- if (!(cc))
294- then throw(("Big slpg: " + toString(cb)))
295- else $Tuple2(cc, min([bY, bZ]))
189+func aR () = {
190+ let aS = {
191+ let aP = aN(Y())
192+ if ($isInstanceOf(aP, "Address"))
193+ then {
194+ let aT = aP
195+ aT
196+ }
197+ else this
198+ }
199+ let aP = getString(aS, aa())
200+ if ($isInstanceOf(aP, "String"))
201+ then {
202+ let aU = aP
203+ aN(aU)
204+ }
205+ else this
296206 }
297207
298208
299-func cd (ce,cf,cg) = {
300- let cb = fraction(cf, b, ce)
301- let ch = (cg > cb)
302- if (if (ch)
303- then true
304- else (cf > ce))
305- then throw(((((((toString(cf) + " ") + toString(ce)) + " ") + toString(cb)) + " ") + toString(cg)))
306- else ch
209+func aV (aW,aX) = valueOrErrorMessage(getString(aW, aX), makeString(["mandatory ", toString(aW), ".", aX, " not defined"], ""))
210+
211+
212+func aY (aW,aX) = valueOrErrorMessage(getInteger(aW, aX), makeString(["mandatory ", toString(aW), ".", aX, " not defined"], ""))
213+
214+
215+func aZ (ba) = throw(makeString(["lp_stable.ride:", ba], " "))
216+
217+
218+func bb (ba) = makeString(["lp_stable.ride:", ba], " ")
219+
220+
221+let aT = addressFromStringValue(aV(this, Y()))
222+
223+let bc = {
224+ let bd = invoke(aT, "getInFeeREADONLY", [toString(this)], nil)
225+ if ($isInstanceOf(bd, "Int"))
226+ then bd
227+ else throw(($getType(bd) + " couldn't be cast to Int"))
228+ }
229+
230+let be = {
231+ let bd = invoke(aT, "getOutFeeREADONLY", [toString(this)], nil)
232+ if ($isInstanceOf(bd, "Int"))
233+ then bd
234+ else throw(($getType(bd) + " couldn't be cast to Int"))
235+ }
236+
237+let bf = aV(this, al())
238+
239+func bg () = valueOrElse(getBoolean(aT, aD()), false)
240+
241+
242+func bh () = fromBase58String(aV(aT, ax()))
243+
244+
245+let bi = addressFromStringValue(aV(aT, aF()))
246+
247+func bj () = {
248+ let bk = aV(this, aj())
249+ let bl = aV(this, ak())
250+ let bm = aY(aT, aB(bl))
251+ let az = aY(aT, aB(bk))
252+ split(aV(aT, ay(toString(az), toString(bm))), n)
307253 }
308254
309255
310-func ci (cj,ck,cl,cm) = {
311- let cn = H(cl, cj)
312- let co = H(cm, ck)
313- bT(co, cn)
256+func bn (bo) = if ((bo == k))
257+ then unit
258+ else fromBase58String(bo)
259+
260+
261+func bp (bo) = if ((bo == unit))
262+ then k
263+ else toBase58String(value(bo))
264+
265+
266+func bq (br) = $Tuple9(addressFromStringValue(br[t]), parseIntValue(br[u]), fromBase58String(br[v]), bn(br[w]), bn(br[x]), parseIntValue(br[y]), parseIntValue(br[z]), fromBase58String(br[A]), fromBase58String(br[B]))
267+
268+
269+let bs = bq(bj())
270+
271+let bt = bs
272+
273+let bu = bt._1
274+
275+let bv = bt._2
276+
277+let bw = bt._3
278+
279+let bx = bt._4
280+
281+let by = bt._5
282+
283+let bz = bt._6
284+
285+let bA = bt._7
286+
287+let bB = bt._8
288+
289+let bC = bt._9
290+
291+func bD () = split(aV(aT, aw()), n)
292+
293+
294+let bE = bD()
295+
296+let bF = valueOrErrorMessage(addressFromString(bE[C]), "Invalid staking contract address")
297+
298+let bG = valueOrErrorMessage(addressFromString(bE[E]), "Invalid slipage contract address")
299+
300+let bH = valueOrErrorMessage(addressFromString(bE[F]), "Invalid gwx contract address")
301+
302+let bI = valueOrErrorMessage(addressFromString(bE[D]), "Invalid gwx contract address")
303+
304+func bJ (bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bN), toString(bO), toString(bP), toString(bQ), toString(bR), toString(bS), toString(bT)], n)
305+
306+
307+func bU (bV,bW,bX,bN,bQ,bR) = makeString(["%d%d%d%d%d%d", toString(bV), toString(bW), toString(bX), toString(bN), toString(bQ), toString(bR)], n)
308+
309+
310+func bY (bZ) = if ((bZ == "WAVES"))
311+ then wavesBalance(this).available
312+ else assetBalance(this, fromBase58String(bZ))
313+
314+
315+func ca (cb,cc) = fraction(cb, c, cc)
316+
317+
318+func cd (cb,cc,P) = fraction(cb, c, cc, P)
319+
320+
321+func ce (cf,cg,ch) = {
322+ let ci = fraction((cf - cg), b, cg)
323+ let cj = ((ch - W(ci)) > d)
324+ if (!(cj))
325+ then throw(("Big slpg: " + toString(ci)))
326+ else $Tuple2(cj, min([cf, cg]))
314327 }
315328
316329
317-func cp (cl,cm,cq) = {
318- let cr = bs
319- let cs = bt
320- let ct = ci(cr, cs, cl, cm)
321- let bV = H(cl, cr)
322- let bU = H(cm, cs)
323- let cu = H(cq, a)
324- let cv = bT(bV, cu)
325- let cw = bT(bU, cu)
326-[ct, cv, cw]
330+func ck (cl,cm,cn) = {
331+ let ci = fraction(cm, b, cl)
332+ let co = (cn > ci)
333+ if (if (co)
334+ then true
335+ else (cm > cl))
336+ then throw(((((((toString(cm) + " ") + toString(cl)) + " ") + toString(ci)) + " ") + toString(cn)))
337+ else co
327338 }
328339
329340
330-func cx (cl,cm,cq) = {
331- let cy = cp(cl, cm, cq)
332-[L(cy[0], a), L(cy[1], a), L(cy[2], a)]
341+func cp (cq,cr,cs,ct) = {
342+ let cu = H(cs, cq)
343+ let cv = H(ct, cr)
344+ ca(cv, cu)
333345 }
334346
335347
336-func cz (cA,aq) = {
337- let cB = if ((aq == 0))
338- then 0
339- else fraction(cA, aq, a)
340- $Tuple2((cA - cB), cB)
348+func cw (cs,ct,cx) = {
349+ let cy = bz
350+ let cz = bA
351+ let cA = cp(cy, cz, cs, ct)
352+ let cc = H(cs, cy)
353+ let cb = H(ct, cz)
354+ let cB = H(cx, a)
355+ let cC = ca(cc, cB)
356+ let cD = ca(cb, cB)
357+[cA, cC, cD]
341358 }
342359
343360
344-func cC (cD) = {
345- let cE = cD[0]
346- let cF = cD[1]
347- let cG = (cE + cF)
348- if ((cG == e))
361+func cE (cs,ct,cx) = {
362+ let cF = cw(cs, ct, cx)
363+[L(cF[0], a), L(cF[1], a), L(cF[2], a)]
364+ }
365+
366+
367+func cG (cH,aq) = {
368+ let cI = if ((aq == 0))
369+ then 0
370+ else fraction(cH, aq, a)
371+ $Tuple2((cH - cI), cI)
372+ }
373+
374+
375+func cJ (cK) = {
376+ let cL = cK[0]
377+ let cM = cK[1]
378+ let aU = (cL + cM)
379+ if ((aU == e))
349380 then e
350381 else {
351- let cH = parseIntValue(aY)
352- let cI = (cH * 2)
353- let cy = fraction(cE, cF, f)
354- let cJ = fraction(cy, i, f)
355- let cK = fraction(toBigInt(cI), cG, f)
356- let cL = toBigInt((cI - 1))
357- func cM (cN) = {
358- let cO = fraction(cN, cN, f)
359- let cP = fraction(cO, cN, f)
360- let cQ = fraction(cP, f, cJ)
361- fraction((cK + fraction(cQ, g, f)), cN, (fraction(cL, cN, f) + fraction(h, cQ, f)))
382+ let aQ = parseIntValue(bf)
383+ let cN = (aQ * 2)
384+ let cF = fraction(cL, cM, f)
385+ let cO = fraction(cF, i, f)
386+ let cP = fraction(toBigInt(cN), aU, f)
387+ let cQ = toBigInt((cN - 1))
388+ func cR (cS) = {
389+ let cT = fraction(cS, cS, f)
390+ let cU = fraction(cT, cS, f)
391+ let cV = fraction(cU, f, cO)
392+ fraction((cP + fraction(cV, g, f)), cS, (fraction(cQ, cS, f) + fraction(h, cV, f)))
362393 }
363394
364- func cR (cS,cT) = if (cS._2)
365- then cS
395+ func cW (cX,cY) = if (cX._2)
396+ then cX
366397 else {
367- let cN = cS._1
368- let cU = cM(cN)
369- let cV = (cU - value(cN))
370- let cW = if ((e > cV))
371- then -(cV)
372- else cV
373- if ((f >= cW))
374- then $Tuple2(cU, true)
375- else $Tuple2(cU, false)
398+ let cS = cX._1
399+ let cZ = cR(cS)
400+ let da = (cZ - value(cS))
401+ let db = if ((e > da))
402+ then -(da)
403+ else da
404+ if ((f >= db))
405+ then $Tuple2(cZ, true)
406+ else $Tuple2(cZ, false)
376407 }
377408
378- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
379- let cY = {
380- let cZ = cX
381- let da = size(cZ)
382- let db = $Tuple2(cG, false)
383- func dc (dd,de) = if ((de >= da))
384- then dd
385- else cR(dd, cZ[de])
409+ let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
410+ let dd = {
411+ let de = dc
412+ let df = size(de)
413+ let dg = $Tuple2(aU, false)
414+ func dh (di,dj) = if ((dj >= df))
415+ then di
416+ else cW(di, de[dj])
386417
387- func df (dd,de) = if ((de >= da))
388- then dd
418+ func dk (di,dj) = if ((dj >= df))
419+ then di
389420 else throw("List size exceeds 17")
390421
391- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
422+ dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
392423 }
393- let cN = cY._1
394- let dg = cY._2
395- if (dg)
396- then cN
397- else throw(("D calculation error, D = " + toString(cN)))
424+ let cS = dd._1
425+ let dl = dd._2
426+ if (dl)
427+ then cS
428+ else throw(("D calculation error, D = " + toString(cS)))
398429 }
399430 }
400431
401432
402-func dh (di,dj,dk,dl) = {
403- let dm = bp
404- let dn = toBase58String(value(bq))
405- let do = toBase58String(value(br))
406- let dp = bs
407- let dq = bt
408- let dr = toString(bo)
409- let ds = valueOrErrorMessage(assetInfo(dm), "Wrong LP id").quantity
410- if ((toBase58String(dm) != dj))
433+func dm (dn,do,dp,dq) = {
434+ let dr = bw
435+ let ds = toBase58String(value(bx))
436+ let dt = toBase58String(value(by))
437+ let du = bz
438+ let dv = bA
439+ let dw = toString(bv)
440+ let dx = valueOrErrorMessage(assetInfo(dr), "Wrong LP id").quantity
441+ if ((toBase58String(dr) != do))
411442 then throw("Wrong pmt asset")
412443 else {
413- let dt = bR(dn)
414- let du = H(dt, dp)
415- let dv = bR(do)
416- let dw = H(dv, dq)
417- let dx = bT(dw, du)
418- let dy = L(dx, a)
419- let dz = H(dk, a)
420- let dA = H(ds, a)
421- let dB = fraction(du, dz, dA)
422- let dC = fraction(dw, dz, dA)
423- let dD = O(dB, dp, FLOOR)
424- let dE = O(dC, dq, FLOOR)
425- let dF = if ((di == ""))
444+ let dy = bY(ds)
445+ let dz = H(dy, du)
446+ let dA = bY(dt)
447+ let dB = H(dA, dv)
448+ let dC = ca(dB, dz)
449+ let dD = L(dC, a)
450+ let dE = H(dp, a)
451+ let dF = H(dx, a)
452+ let dG = fraction(dz, dE, dF)
453+ let dH = fraction(dB, dE, dF)
454+ let dI = O(dG, du, FLOOR)
455+ let dJ = O(dH, dv, FLOOR)
456+ let dK = if ((dn == ""))
426457 then nil
427- else [ScriptTransfer(dl, dD, if ((dn == "WAVES"))
458+ else [ScriptTransfer(dq, dI, if ((ds == "WAVES"))
428459 then unit
429- else fromBase58String(dn)), ScriptTransfer(dl, dE, if ((do == "WAVES"))
460+ else fromBase58String(ds)), ScriptTransfer(dq, dJ, if ((dt == "WAVES"))
430461 then unit
431- else fromBase58String(do)), StringEntry(ai(toString(dl), di), bN(dD, dE, dk, dy, height, lastBlock.timestamp)), IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy)]
432- $Tuple10(dD, dE, dn, do, dt, dv, ds, dx, dr, dF)
462+ else fromBase58String(dt)), StringEntry(ai(toString(dq), dn), bU(dI, dJ, dp, dD, height, lastBlock.timestamp)), IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD)]
463+ $Tuple10(dI, dJ, ds, dt, dy, dA, dx, dC, dw, dK)
433464 }
434465 }
435466
436467
437-func dG (di,ca,dH,dI,dJ,dK,dl,dL,dM,dN,dO,dP,dQ) = {
438- let dm = bp
439- let dR = toBase58String(value(bq))
440- let dS = toBase58String(value(br))
441- let dT = bu
442- let dU = bv
443- let dV = bs
444- let dW = bt
445- let dr = toString(bo)
446- let dX = valueOrErrorMessage(assetInfo(dm), "Wr lp as").quantity
447- let dt = if (dL)
448- then bR(dR)
449- else if (if (dN)
450- then (dQ == dR)
468+func dL (dn,ch,dM,dN,dO,dP,dq,dQ,dR,dS,dT,dU,dV) = {
469+ let dr = bw
470+ let dW = toBase58String(value(bx))
471+ let dX = toBase58String(value(by))
472+ let dY = bB
473+ let dZ = bC
474+ let ea = bz
475+ let eb = bA
476+ let dw = toString(bv)
477+ let ec = valueOrErrorMessage(assetInfo(dr), "Wr lp as").quantity
478+ let dy = if (dQ)
479+ then bY(dW)
480+ else if (if (dS)
481+ then (dV == dW)
451482 else false)
452- then (bR(dR) - dP)
453- else if (dN)
454- then bR(dR)
455- else (bR(dR) - dH)
456- let dv = if (dL)
457- then bR(dS)
458- else if (if (dN)
459- then (dQ == dS)
483+ then (bY(dW) - dU)
484+ else if (dS)
485+ then bY(dW)
486+ else (bY(dW) - dM)
487+ let dA = if (dQ)
488+ then bY(dX)
489+ else if (if (dS)
490+ then (dV == dX)
460491 else false)
461- then (bR(dS) - dP)
462- else if (dN)
463- then bR(dS)
464- else (bR(dS) - dJ)
465- let dY = H(dH, dV)
466- let dZ = H(dJ, dW)
467- let ea = bT(dZ, dY)
468- let du = H(dt, dV)
469- let dw = H(dv, dW)
470- let cf = cC([du, dw])
471- let eb = if ((dX == 0))
492+ then (bY(dX) - dU)
493+ else if (dS)
494+ then bY(dX)
495+ else (bY(dX) - dO)
496+ let ed = H(dM, ea)
497+ let ee = H(dO, eb)
498+ let ef = ca(ee, ed)
499+ let dz = H(dy, ea)
500+ let dB = H(dA, eb)
501+ let cm = cJ([dz, dB])
502+ let eg = if ((ec == 0))
472503 then {
473- let ce = cC([(du + dY), (dw + dZ)])
474- let ec = if ((ce > cf))
504+ let cl = cJ([(dz + ed), (dB + ee)])
505+ let eh = if ((cl > cm))
475506 then true
476507 else throw("D1 should be greater than D0")
477- if ((ec == ec))
508+ if ((eh == eh))
478509 then {
479- let dx = d
480- let ed = d
481- let cu = ce
482- $Tuple5(L(cu, a), L(dY, dV), L(dZ, dW), bT((dw + dZ), (du + dY)), ed)
510+ let dC = d
511+ let ei = d
512+ let cB = cl
513+ $Tuple5(L(cB, a), L(ed, ea), L(ee, eb), ca((dB + ee), (dz + ed)), ei)
483514 }
484515 else throw("Strict value is not equal to itself.")
485516 }
486517 else {
487- let dx = bT(dw, du)
488- let ee = fraction(W((dx - ea)), c, dx)
489- let ed = H(ca, a)
490- if (if (if (dO)
491- then (dx != d)
518+ let dC = ca(dB, dz)
519+ let ej = fraction(W((dC - ef)), c, dC)
520+ let ei = H(ch, a)
521+ if (if (if (dT)
522+ then (dC != d)
492523 else false)
493- then (ee > ed)
524+ then (ej > ei)
494525 else false)
495- then throw(((("Price slippage " + toString(ee)) + " > ") + toString(ed)))
526+ then throw(((("Price slippage " + toString(ej)) + " > ") + toString(ei)))
496527 else {
497- let ef = H(dX, a)
498- let eg = fraction(dY, bW(dw, du, CEILING), c, CEILING)
499- let eh = fraction(dZ, c, bW(dw, du, FLOOR), CEILING)
500- let ei = if ((eg > dZ))
501- then $Tuple2(eh, dZ)
502- else $Tuple2(dY, eg)
503- let ej = ei._1
504- let ek = ei._2
505- let ce = cC([(du + ej), (dw + ek)])
506- let ec = if ((ce > cf))
528+ let ek = H(ec, a)
529+ let el = fraction(ed, cd(dB, dz, CEILING), c, CEILING)
530+ let em = fraction(ee, c, cd(dB, dz, FLOOR), CEILING)
531+ let en = if ((el > ee))
532+ then $Tuple2(em, ee)
533+ else $Tuple2(ed, el)
534+ let eo = en._1
535+ let ep = en._2
536+ let cl = cJ([(dz + eo), (dB + ep)])
537+ let eh = if ((cl > cm))
507538 then true
508539 else throw("D1 should be greater than D0")
509- if ((ec == ec))
540+ if ((eh == eh))
510541 then {
511- let cu = fraction(ef, (ce - cf), cf)
512- $Tuple5(O(cu, a, FLOOR), O(ej, dV, CEILING), O(ek, dW, CEILING), dx, ed)
542+ let cB = fraction(ek, (cl - cm), cm)
543+ $Tuple5(O(cB, a, FLOOR), O(eo, ea, CEILING), O(ep, eb, CEILING), dC, ei)
513544 }
514545 else throw("Strict value is not equal to itself.")
515546 }
516547 }
517- let el = eb._1
518- let em = eb._2
519- let en = eb._3
520- let dy = L(eb._4, a)
521- let eo = L(eb._5, a)
522- if ((0 >= el))
548+ let eq = eg._1
549+ let er = eg._2
550+ let es = eg._3
551+ let dD = L(eg._4, a)
552+ let et = L(eg._5, a)
553+ if ((0 >= eq))
523554 then throw("LP <= 0")
524555 else {
525- let ep = if (!(dM))
556+ let eu = if (!(dR))
526557 then 0
527- else el
528- let eq = (dH - em)
529- let er = (dJ - en)
530- let es = if (if (dN)
531- then (dQ == dR)
558+ else eq
559+ let ev = (dM - er)
560+ let ew = (dO - es)
561+ let ex = if (if (dS)
562+ then (dV == dW)
532563 else false)
533- then $Tuple2(dP, 0)
534- else if (if (dN)
535- then (dQ == dS)
564+ then $Tuple2(dU, 0)
565+ else if (if (dS)
566+ then (dV == dX)
536567 else false)
537- then $Tuple2(0, dP)
538- else $Tuple2(em, en)
539- let et = es._1
540- let eu = es._2
541- let ev = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, di), bC(et, eu, ep, dy, ca, eo, height, lastBlock.timestamp, eq, er))]
542- $Tuple13(el, ep, dy, dt, dv, dX, dm, dr, ev, eq, er, dI, dK)
568+ then $Tuple2(0, dU)
569+ else $Tuple2(er, es)
570+ let ey = ex._1
571+ let ez = ex._2
572+ let eA = [IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD), StringEntry(af(dq, dn), bJ(ey, ez, eu, dD, ch, et, height, lastBlock.timestamp, ev, ew))]
573+ $Tuple13(eq, eu, dD, dy, dA, ec, dr, dw, eA, ev, ew, dN, dP)
543574 }
544575 }
545576
546577
547-func ew (cD,cT,ex) = {
548- let ey = g
549- let ez = cD[if ((cT == 0))
578+func eB (cK,cY,eC) = {
579+ let eD = g
580+ let eE = cK[if ((cY == 0))
550581 then 1
551582 else 0]
552- let eA = parseBigIntValue(l)
553- let cH = (parseBigIntValue(aY) * eA)
554- let cG = ez
555- let cI = (cH * ey)
556- let eB = (((((ex * ex) / (ez * ey)) * ex) * eA) / (cI * ey))
557- let eC = ((cG + ((ex * eA) / cI)) - ex)
558- func cR (cS,eD) = {
559- let eE = cS
560- let eF = eE._1
561- let dg = eE._2
562- if ((dg != unit))
563- then cS
583+ let eF = parseBigIntValue(l)
584+ let aQ = (parseBigIntValue(bf) * eF)
585+ let aU = eE
586+ let cN = (aQ * eD)
587+ let eG = (((((eC * eC) / (eE * eD)) * eC) * eF) / (cN * eD))
588+ let eH = ((aU + ((eC * eF) / cN)) - eC)
589+ func cW (cX,eI) = {
590+ let eJ = cX
591+ let eK = eJ._1
592+ let dl = eJ._2
593+ if ((dl != unit))
594+ then cX
564595 else {
565- let eG = (((eF * eF) + eB) / ((g * eF) + eC))
566- let eH = X((eG - value(eF)))
567- if ((f >= eH))
568- then $Tuple2(eG, eD)
569- else $Tuple2(eG, unit)
596+ let eL = (((eK * eK) + eG) / ((g * eK) + eH))
597+ let eM = X((eL - value(eK)))
598+ if ((f >= eM))
599+ then $Tuple2(eL, eI)
600+ else $Tuple2(eL, unit)
570601 }
571602 }
572603
573- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
574- let eI = {
575- let cZ = cX
576- let da = size(cZ)
577- let db = $Tuple2(ex, unit)
578- func dc (dd,de) = if ((de >= da))
579- then dd
580- else cR(dd, cZ[de])
604+ let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
605+ let eN = {
606+ let de = dc
607+ let df = size(de)
608+ let dg = $Tuple2(eC, unit)
609+ func dh (di,dj) = if ((dj >= df))
610+ then di
611+ else cW(di, de[dj])
581612
582- func df (dd,de) = if ((de >= da))
583- then dd
613+ func dk (di,dj) = if ((dj >= df))
614+ then di
584615 else throw("List size exceeds 15")
585616
586- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
617+ dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
587618 }
588- let eF = eI._1
589- let dg = eI._2
590- if ((dg != unit))
591- then eF
592- else throw(("Y calculation error, Y = " + toString(eF)))
593- }
594-
595-
596-func eJ (eK,eL,eM) = {
597- let eN = fraction(cC([K(eK, toBigInt(bs)), K(eL, toBigInt(bt))]), c, eM)
598- if ((eM == e))
599- then e
600- else eN
619+ let eK = eN._1
620+ let dl = eN._2
621+ if ((dl != unit))
622+ then eK
623+ else throw(("Y calculation error, Y = " + toString(eK)))
601624 }
602625
603626
604627 func eO (eP,eQ,eR) = {
605- let eS = (toBigInt(bR(bi(bq))) - eP)
606- let eT = (toBigInt(bR(bi(br))) - eQ)
607- let eU = (toBigInt(value(assetInfo(bp)).quantity) - eR)
608- let eV = eJ(eS, eT, eU)
609- eV
628+ let eS = fraction(cJ([K(eP, toBigInt(bz)), K(eQ, toBigInt(bA))]), c, eR)
629+ if ((eR == e))
630+ then e
631+ else eS
610632 }
611633
612634
613-func eW (eX,eY,eR) = {
614- let eS = (bR(bi(bq)) + eX)
615- let eT = (bR(bi(br)) + eY)
616- let eU = (value(assetInfo(bp)).quantity + eR)
617- let eN = eJ(toBigInt(eS), toBigInt(eT), toBigInt(eU))
618- let eZ = [IntegerEntry(as, height), StringEntry(ar, toString(eN))]
619- $Tuple2(eZ, eN)
635+func eT (eU,eV,eW) = {
636+ let eX = (toBigInt(bY(bp(bx))) - eU)
637+ let eY = (toBigInt(bY(bp(by))) - eV)
638+ let eZ = (toBigInt(value(assetInfo(bw)).quantity) - eW)
639+ let fa = eO(eX, eY, eZ)
640+ fa
620641 }
621642
622643
623-func fa (fb,eN) = if ((eN >= fb))
624- then true
625- else aR("updated DLp lower than current DLp")
644+func fb (fc,fd,eW) = {
645+ let eX = (bY(bp(bx)) + fc)
646+ let eY = (bY(bp(by)) + fd)
647+ let eZ = (value(assetInfo(bw)).quantity + eW)
648+ let eS = eO(toBigInt(eX), toBigInt(eY), toBigInt(eZ))
649+ let fe = [IntegerEntry(as, height), StringEntry(ar, toString(eS))]
650+ $Tuple2(fe, eS)
651+ }
626652
627653
628-func fc (fd) = {
629- let eS = bR(bi(bq))
630- let eT = bR(bi(br))
631- let fe = fd.amount
632- let ff = fraction(fd.amount, fd.price, a, FLOOR)
633- let fg = if ((fd.orderType == Buy))
634- then $Tuple2(fe, -(ff))
635- else $Tuple2(-(fe), ff)
636- let eX = fg._1
637- let eY = fg._2
638- if (if (if (aZ())
654+func ff (fg,eS) = if ((eS >= fg))
655+ then true
656+ else aZ("updated DLp lower than current DLp")
657+
658+
659+func fh (fi) = {
660+ let eX = bY(bp(bx))
661+ let eY = bY(bp(by))
662+ let fj = fi.amount
663+ let fk = fraction(fi.amount, fi.price, a, FLOOR)
664+ let fl = if ((fi.orderType == Buy))
665+ then $Tuple2(fj, -(fk))
666+ else $Tuple2(-(fj), fk)
667+ let fc = fl._1
668+ let fd = fl._2
669+ if (if (if (bg())
639670 then true
640- else (bo == r))
671+ else (bv == r))
641672 then true
642- else (bo == s))
673+ else (bv == s))
643674 then throw("Admin blocked")
644- else if (if ((fd.assetPair.amountAsset != bq))
675+ else if (if ((fi.assetPair.amountAsset != bx))
645676 then true
646- else (fd.assetPair.priceAsset != br))
677+ else (fi.assetPair.priceAsset != by))
647678 then throw("Wr assets")
648679 else {
649- let fh = parseBigIntValue(valueOrElse(getString(this, ar), "0"))
650- let fi = eW(eX, eY, 0)
651- let fj = fi._1
652- let fk = fi._2
653- let fl = (fk >= fh)
654- let fm = makeString(["dLp=", toString(fh), " dLpNew=", toString(fk), " amountAssetBalance=", toString(eS), " priceAssetBalance=", toString(eT), " amountAssetBalanceDelta=", toString(eX), " priceAssetBalanceDelta=", toString(eY), " height=", toString(height)], "")
655- $Tuple2(fl, fm)
680+ let fm = parseBigIntValue(valueOrElse(getString(this, ar), "0"))
681+ let fn = fb(fc, fd, 0)
682+ let fo = fn._1
683+ let fp = fn._2
684+ let fq = (fp >= fm)
685+ let fr = makeString(["dLp=", toString(fm), " dLpNew=", toString(fp), " amountAssetBalance=", toString(eX), " priceAssetBalance=", toString(eY), " amountAssetBalanceDelta=", toString(fc), " priceAssetBalanceDelta=", toString(fd), " height=", toString(height)], "")
686+ $Tuple2(fq, fr)
656687 }
657688 }
658689
659690
660-func fn (cT) = if ((size(cT.payments) != 1))
691+func fs (cY) = if ((size(cY.payments) != 1))
661692 then throw("1 pmnt exp")
662693 else {
663- let fo = value(cT.payments[0])
664- let dj = value(fo.assetId)
665- let dP = fo.amount
666- let eb = dh(toBase58String(cT.transactionId), toBase58String(dj), dP, cT.caller)
667- let dD = eb._1
668- let dE = eb._2
669- let dr = parseIntValue(eb._9)
670- let dF = eb._10
671- if (if (aZ())
694+ let ft = value(cY.payments[0])
695+ let do = value(ft.assetId)
696+ let dU = ft.amount
697+ let eg = dm(toBase58String(cY.transactionId), toBase58String(do), dU, cY.caller)
698+ let dI = eg._1
699+ let dJ = eg._2
700+ let dw = parseIntValue(eg._9)
701+ let dK = eg._10
702+ if (if (bg())
672703 then true
673- else (dr == s))
674- then throw(("Admin blocked: " + toString(dr)))
675- else $Tuple5(dD, dE, dP, dj, dF)
704+ else (dw == s))
705+ then throw(("Admin blocked: " + toString(dw)))
706+ else $Tuple5(dI, dJ, dU, do, dK)
676707 }
677708
678709
679-func fp (fq,ah,fr,fs,ca,dM,dN,dO,dP,dQ) = {
680- let eb = dG(ah, ca, value(fr).amount, value(fr).assetId, value(fs).amount, value(fs).assetId, fq, (ah == ""), dM, dN, dO, dP, dQ)
681- let dr = parseIntValue(eb._8)
682- if (if (if (aZ())
710+func fu (fv,ah,fw,fx,ch,dR,dS,dT,dU,dV) = {
711+ let eg = dL(ah, ch, value(fw).amount, value(fw).assetId, value(fx).amount, value(fx).assetId, fv, (ah == ""), dR, dS, dT, dU, dV)
712+ let dw = parseIntValue(eg._8)
713+ if (if (if (bg())
683714 then true
684- else (dr == q))
715+ else (dw == q))
685716 then true
686- else (dr == s))
687- then throw(("Blocked:" + toString(dr)))
688- else eb
717+ else (dw == s))
718+ then throw(("Blocked:" + toString(dw)))
719+ else eg
689720 }
690721
691722
692-func ft (fu,dj,dl,ah,fv) = {
693- let dn = toBase58String(value(bq))
694- let do = toBase58String(value(br))
695- let dm = bp
696- let dV = bs
697- let dW = bt
698- let eU = toBigInt(valueOrErrorMessage(assetInfo(dm), "invalid lp asset").quantity)
699- let fw = if ((eU > e))
723+func fy (fz,do,dq,ah,fA) = {
724+ let ds = toBase58String(value(bx))
725+ let dt = toBase58String(value(by))
726+ let dr = bw
727+ let ea = bz
728+ let eb = bA
729+ let eZ = toBigInt(valueOrErrorMessage(assetInfo(dr), "invalid lp asset").quantity)
730+ let fB = if ((eZ > e))
700731 then true
701732 else throw("initial deposit requires all coins")
702- if ((fw == fw))
733+ if ((fB == fB))
703734 then {
704- let dt = bR(dn)
705- let dv = bR(do)
706- let fx = if ((ah == ""))
707- then $Tuple2(dt, dv)
708- else if ((dj == dn))
709- then if ((fu > dt))
735+ let dy = bY(ds)
736+ let dA = bY(dt)
737+ let fC = if ((ah == ""))
738+ then $Tuple2(dy, dA)
739+ else if ((do == ds))
740+ then if ((fz > dy))
710741 then throw("invalid payment amount")
711- else $Tuple2((dt - fu), dv)
712- else if ((dj == do))
713- then if ((fu > dv))
742+ else $Tuple2((dy - fz), dA)
743+ else if ((do == dt))
744+ then if ((fz > dA))
714745 then throw("invalid payment amount")
715- else $Tuple2(dt, (dv - fu))
746+ else $Tuple2(dy, (dA - fz))
716747 else throw("wrong pmtAssetId")
717- let fy = fx._1
718- let fz = fx._2
719- let fA = if ((dj == dn))
720- then $Tuple2(fu, 0)
721- else if ((dj == do))
722- then $Tuple2(0, fu)
748+ let fD = fC._1
749+ let fE = fC._2
750+ let fF = if ((do == ds))
751+ then $Tuple2(fz, 0)
752+ else if ((do == dt))
753+ then $Tuple2(0, fz)
723754 else throw("invalid payment")
724- let fB = fA._1
725- let fC = fA._2
726- let fD = if (fv)
727- then $Tuple3(cz(fB, aV)._1, cz(fC, aV)._1, cz(fu, aV)._2)
728- else $Tuple3(fB, fC, 0)
729- let fE = fD._1
730- let fF = fD._2
731- let cB = fD._3
732- let fG = (fy + fE)
733- let fH = (fz + fF)
734- let cf = cC([H(fy, bs), H(fz, bt)])
735- let ce = cC([H(fG, bs), H(fH, bt)])
736- let ec = if ((ce > cf))
755+ let fG = fF._1
756+ let fH = fF._2
757+ let fI = if (fA)
758+ then $Tuple3(cG(fG, bc)._1, cG(fH, bc)._1, cG(fz, bc)._2)
759+ else $Tuple3(fG, fH, 0)
760+ let fJ = fI._1
761+ let fK = fI._2
762+ let cI = fI._3
763+ let fL = (fD + fJ)
764+ let fM = (fE + fK)
765+ let cm = cJ([H(fD, bz), H(fE, bA)])
766+ let cl = cJ([H(fL, bz), H(fM, bA)])
767+ let eh = if ((cl > cm))
737768 then true
738769 else throw()
739- if ((ec == ec))
770+ if ((eh == eh))
740771 then {
741- let fI = fraction(eU, (ce - cf), cf, FLOOR)
742- let dy = L(bT(H(fH, dW), H(fG, dV)), a)
743- let ev = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, ah), bC(fB, fC, toInt(fI), dy, 0, 0, height, lastBlock.timestamp, 0, 0))]
744- let fJ = fraction(fz, a, fy)
745- let fK = fraction(fu, a, (fJ + a))
746- let fL = (fu - fK)
747- let fM = fraction(eU, toBigInt(fL), toBigInt(fz))
748- let fN = toInt(fraction((fI - fM), b, fM))
749- $Tuple4(toInt(fI), ev, cB, fN)
772+ let fN = fraction(eZ, (cl - cm), cm, FLOOR)
773+ let dD = L(ca(H(fM, eb), H(fL, ea)), a)
774+ let eA = [IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD), StringEntry(af(dq, ah), bJ(fG, fH, toInt(fN), dD, 0, 0, height, lastBlock.timestamp, 0, 0))]
775+ let fO = fraction(fE, a, fD)
776+ let fP = fraction(fz, a, (fO + a))
777+ let fQ = (fz - fP)
778+ let fR = fraction(eZ, toBigInt(fQ), toBigInt(fE))
779+ let fS = toInt(fraction((fN - fR), b, fR))
780+ $Tuple4(toInt(fN), eA, cI, fS)
750781 }
751782 else throw("Strict value is not equal to itself.")
752783 }
754785 }
755786
756787
757-func fO (fP,fQ,fR,fq,fS,fT) = {
758- let dm = toBase58String(value(bp))
759- let dn = toBase58String(value(bq))
760- let do = toBase58String(value(br))
761- let fU = bs
762- let fV = bt
763- let fW = bo
764- let dl = if ((fq == bB))
765- then fS
766- else fq
767- let fo = value(fR[0])
768- let dj = value(fo.assetId)
769- let dP = fo.amount
770- let eV = eO(e, e, e)
771- if ((eV == eV))
788+func fT (fU,fV,fW,fv,fX,fY) = {
789+ let dr = toBase58String(value(bw))
790+ let ds = toBase58String(value(bx))
791+ let dt = toBase58String(value(by))
792+ let fZ = bz
793+ let ga = bA
794+ let gb = bv
795+ let dq = if ((fv == bI))
796+ then fX
797+ else fv
798+ let ft = value(fW[0])
799+ let do = value(ft.assetId)
800+ let dU = ft.amount
801+ let fa = eT(e, e, e)
802+ if ((fa == fa))
772803 then {
773- let di = toBase58String(fT)
774- if ((dm != toBase58String(dj)))
804+ let dn = toBase58String(fY)
805+ if ((dr != toBase58String(do)))
775806 then throw("Wrong LP")
776807 else {
777- let dt = bR(dn)
778- let dv = bR(do)
779- let fX = {
780- let aW = invoke(this, "getOneTknV2READONLY", [fP, dP], nil)
781- if ($isInstanceOf(aW, "(Int, Int)"))
782- then aW
783- else throw(($getType(aW) + " couldn't be cast to (Int, Int)"))
808+ let dy = bY(ds)
809+ let dA = bY(dt)
810+ let gc = {
811+ let bd = invoke(this, "getOneTknV2READONLY", [fU, dU], nil)
812+ if ($isInstanceOf(bd, "(Int, Int)"))
813+ then bd
814+ else throw(($getType(bd) + " couldn't be cast to (Int, Int)"))
784815 }
785- if ((fX == fX))
816+ if ((gc == gc))
786817 then {
787- let cB = fX._2
788- let fY = fX._1
789- let fZ = if (if ((fQ > 0))
790- then (fQ > fY)
818+ let cI = gc._2
819+ let gd = gc._1
820+ let ge = if (if ((fV > 0))
821+ then (fV > gd)
791822 else false)
792- then aR(makeString(["amount to receive is less than ", toString(fQ)], ""))
793- else fY
794- let ga = if ((fP == dn))
795- then $Tuple4(fZ, 0, ((dt - fZ) - cB), dv)
796- else if ((fP == do))
797- then $Tuple4(0, fZ, dt, ((dv - fZ) - cB))
823+ then aZ(makeString(["amount to receive is less than ", toString(fV)], ""))
824+ else gd
825+ let gf = if ((fU == ds))
826+ then $Tuple4(ge, 0, ((dy - ge) - cI), dA)
827+ else if ((fU == dt))
828+ then $Tuple4(0, ge, dy, ((dA - ge) - cI))
798829 else throw("invalid out asset id")
799- let gb = ga._1
800- let gc = ga._2
801- let fG = ga._3
802- let fH = ga._4
803- let gd = bT(H(fH, fV), H(fG, fU))
804- let ge = L(gd, a)
805- let gf = if ((fP == "WAVES"))
830+ let gg = gf._1
831+ let gh = gf._2
832+ let fL = gf._3
833+ let fM = gf._4
834+ let gi = ca(H(fM, ga), H(fL, fZ))
835+ let gj = L(gi, a)
836+ let gk = if ((fU == "WAVES"))
806837 then unit
807- else fromBase58String(fP)
808- let gg = if ((cB > 0))
809- then [ScriptTransfer(bb, cB, gf)]
838+ else fromBase58String(fU)
839+ let gl = if ((cI > 0))
840+ then [ScriptTransfer(bi, cI, gk)]
810841 else nil
811- let dF = ([ScriptTransfer(dl, fZ, gf), StringEntry(ai(toString(dl), di), bN(gb, gc, dP, ge, height, lastBlock.timestamp)), IntegerEntry(ab(), ge), IntegerEntry(ac(height, lastBlock.timestamp), ge)] ++ gg)
812- if ((dF == dF))
842+ let dK = ([ScriptTransfer(dq, ge, gk), StringEntry(ai(toString(dq), dn), bU(gg, gh, dU, gj, height, lastBlock.timestamp)), IntegerEntry(ab(), gj), IntegerEntry(ac(height, lastBlock.timestamp), gj)] ++ gl)
843+ if ((dK == dK))
813844 then {
814- let gh = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)])
815- if ((gh == gh))
845+ let gm = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)])
846+ if ((gm == gm))
816847 then {
817- let gi = {
818- let gj = if ((this == bb))
848+ let gn = {
849+ let go = if ((this == bi))
819850 then 0
820- else cB
821- let gk = if ((bg(fP) == bq))
851+ else cI
852+ let gp = if ((bn(fU) == bx))
822853 then true
823854 else false
824- if (gk)
825- then $Tuple2(-((fY + gj)), 0)
826- else $Tuple2(0, -((fY + gj)))
855+ if (gp)
856+ then $Tuple2(-((gd + go)), 0)
857+ else $Tuple2(0, -((gd + go)))
827858 }
828- let eX = gi._1
829- let eY = gi._2
830- let gl = eW(eX, eY, 0)
831- let gm = gl._1
832- let eN = gl._2
833- let gn = fa(eV, eN)
834- if ((gn == gn))
835- then $Tuple2((dF ++ gm), fZ)
859+ let fc = gn._1
860+ let fd = gn._2
861+ let gq = fb(fc, fd, 0)
862+ let gr = gq._1
863+ let eS = gq._2
864+ let gs = ff(fa, eS)
865+ if ((gs == gs))
866+ then $Tuple2((dK ++ gr), ge)
836867 else throw("Strict value is not equal to itself.")
837868 }
838869 else throw("Strict value is not equal to itself.")
846877 }
847878
848879
849-func go () = {
850- let gp = getString(Z())
851- if ($isInstanceOf(gp, "String"))
880+func gt () = {
881+ let gu = aR()
882+ let aP = getString(gu, Z())
883+ if ($isInstanceOf(aP, "String"))
852884 then {
853- let cG = gp
854- fromBase58String(cG)
885+ let aU = aP
886+ fromBase58String(aU)
855887 }
856- else if ($isInstanceOf(gp, "Unit"))
888+ else if ($isInstanceOf(aP, "Unit"))
857889 then unit
858890 else throw("Match error")
859891 }
860892
861893
862-func gq () = {
863- let gp = getString(aa())
864- if ($isInstanceOf(gp, "String"))
894+let gv = throw("Permission denied")
895+
896+func gw (cY) = {
897+ let aP = gt()
898+ if ($isInstanceOf(aP, "ByteVector"))
865899 then {
866- let cG = gp
867- fromBase58String(cG)
900+ let gx = aP
901+ (cY.callerPublicKey == gx)
868902 }
869- else if ($isInstanceOf(gp, "Unit"))
870- then unit
903+ else if ($isInstanceOf(aP, "Unit"))
904+ then (cY.caller == this)
871905 else throw("Match error")
872906 }
873907
874908
875-let gr = throw("Permission denied")
876-
877-func gs (cT) = {
878- let gp = go()
879- if ($isInstanceOf(gp, "ByteVector"))
909+func gy (cY) = {
910+ let aP = gt()
911+ if ($isInstanceOf(aP, "ByteVector"))
880912 then {
881- let gt = gp
882- (cT.callerPublicKey == gt)
913+ let gx = aP
914+ if ((cY.callerPublicKey == gx))
915+ then true
916+ else gv
883917 }
884- else if ($isInstanceOf(gp, "Unit"))
885- then (cT.caller == this)
918+ else if ($isInstanceOf(aP, "Unit"))
919+ then if ((cY.caller == this))
920+ then true
921+ else gv
886922 else throw("Match error")
887923 }
888924
889925
890-func gu (cT) = {
891- let gp = go()
892- if ($isInstanceOf(gp, "ByteVector"))
893- then {
894- let gt = gp
895- if ((cT.callerPublicKey == gt))
896- then true
897- else gr
898- }
899- else if ($isInstanceOf(gp, "Unit"))
900- then if ((cT.caller == this))
901- then true
902- else gr
903- else throw("Match error")
926+func gz (gA,eC,gB) = {
927+ let br = bj()
928+ let ds = br[w]
929+ let dt = br[x]
930+ let eD = g
931+ let eF = parseBigIntValue(l)
932+ let aQ = (parseBigIntValue(bf) * eF)
933+ let cK = if ((gA == false))
934+ then [(toBigInt(bY(ds)) + gB), toBigInt(bY(dt))]
935+ else [(toBigInt(bY(dt)) + gB), toBigInt(bY(ds))]
936+ let eE = cK[0]
937+ let aU = eE
938+ let cN = (aQ * eD)
939+ let eG = (((((eC * eC) / (eE * eD)) * eC) * eF) / (cN * eD))
940+ let eH = ((aU + ((eC * eF) / cN)) - eC)
941+ func cW (cX,eI) = {
942+ let gC = cX
943+ let eK = gC._1
944+ let dl = gC._2
945+ if ((dl != unit))
946+ then cX
947+ else {
948+ let eL = (((eK * eK) + eG) / ((g * eK) + eH))
949+ let eM = X((eL - value(eK)))
950+ if ((f >= eM))
951+ then $Tuple2(eL, eI)
952+ else $Tuple2(eL, unit)
953+ }
954+ }
955+
956+ let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
957+ let gD = {
958+ let de = dc
959+ let df = size(de)
960+ let dg = $Tuple2(eC, unit)
961+ func dh (di,dj) = if ((dj >= df))
962+ then di
963+ else cW(di, de[dj])
964+
965+ func dk (di,dj) = if ((dj >= df))
966+ then di
967+ else throw("List size exceeds 15")
968+
969+ dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
970+ }
971+ let eK = gD._1
972+ let dl = gD._2
973+ if ((dl != unit))
974+ then eK
975+ else throw(("Y calculation error, Y = " + toString(eK)))
904976 }
905977
906978
907-func gv (gw,ex,gx) = {
908- let bk = bc()
909- let dn = bk[w]
910- let do = bk[x]
911- let ey = g
912- let eA = parseBigIntValue(l)
913- let cH = (parseBigIntValue(aY) * eA)
914- let cD = if ((gw == false))
915- then [(toBigInt(bR(dn)) + gx), toBigInt(bR(do))]
916- else [(toBigInt(bR(do)) + gx), toBigInt(bR(dn))]
917- let ez = cD[0]
918- let cG = ez
919- let cI = (cH * ey)
920- let eB = (((((ex * ex) / (ez * ey)) * ex) * eA) / (cI * ey))
921- let eC = ((cG + ((ex * eA) / cI)) - ex)
922- func cR (cS,eD) = {
923- let gy = cS
924- let eF = gy._1
925- let dg = gy._2
926- if ((dg != unit))
927- then cS
928- else {
929- let eG = (((eF * eF) + eB) / ((g * eF) + eC))
930- let eH = X((eG - value(eF)))
931- if ((f >= eH))
932- then $Tuple2(eG, eD)
933- else $Tuple2(eG, unit)
934- }
935- }
936-
937- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
938- let gz = {
939- let cZ = cX
940- let da = size(cZ)
941- let db = $Tuple2(ex, unit)
942- func dc (dd,de) = if ((de >= da))
943- then dd
944- else cR(dd, cZ[de])
945-
946- func df (dd,de) = if ((de >= da))
947- then dd
948- else throw("List size exceeds 15")
949-
950- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
951- }
952- let eF = gz._1
953- let dg = gz._2
954- if ((dg != unit))
955- then eF
956- else throw(("Y calculation error, Y = " + toString(eF)))
957- }
979+func gE () = valueOrElse(getBoolean(aT, aG(toString(this))), false)
958980
959981
960-func gA () = valueOrElse(getBoolean(aU, aG(toString(this))), false)
961-
962-
963-@Callable(cT)
964-func calculateAmountOutForSwapREADONLY (gB,gw,gC) = {
965- let gD = if ((gw == false))
982+@Callable(cY)
983+func calculateAmountOutForSwapREADONLY (gF,gA,gG) = {
984+ let gH = if ((gA == false))
966985 then {
967- let gE = aN(this, ak())
968- let gx = (toBigInt(bR(aN(this, aj()))) + toBigInt(gB))
969- $Tuple2(gE, gx)
986+ let gI = aV(this, ak())
987+ let gB = (toBigInt(bY(aV(this, aj()))) + toBigInt(gF))
988+ $Tuple2(gI, gB)
970989 }
971990 else {
972- let gE = aN(this, aj())
973- let gx = (toBigInt(bR(aN(this, ak()))) + toBigInt(gB))
974- $Tuple2(gE, gx)
991+ let gI = aV(this, aj())
992+ let gB = (toBigInt(bY(aV(this, ak()))) + toBigInt(gF))
993+ $Tuple2(gI, gB)
975994 }
976- let gE = gD._1
977- let gx = gD._2
978- let bk = bc()
979- let dn = bk[w]
980- let do = bk[x]
981- let cD = [toBigInt(bR(dn)), toBigInt(bR(do))]
982- let ex = cC(cD)
983- let eF = gv(gw, ex, toBigInt(gB))
984- let gF = ((toBigInt(bR(gE)) - eF) - toBigInt(1))
985- let gG = max([0, toInt(gF)])
986- let gH = if ((gw == false))
987- then [((toBigInt(bR(dn)) + toBigInt(gB)) + toBigInt(gC)), (toBigInt(bR(do)) - gF)]
988- else [(toBigInt(bR(dn)) - gF), ((toBigInt(bR(do)) + toBigInt(gB)) + toBigInt(gC))]
989- let gI = cC(gH)
990- let ec = if ((gI >= ex))
995+ let gI = gH._1
996+ let gB = gH._2
997+ let br = bj()
998+ let ds = br[w]
999+ let dt = br[x]
1000+ let cK = [toBigInt(bY(ds)), toBigInt(bY(dt))]
1001+ let eC = cJ(cK)
1002+ let eK = gz(gA, eC, toBigInt(gF))
1003+ let gJ = ((toBigInt(bY(gI)) - eK) - toBigInt(1))
1004+ let gK = max([0, toInt(gJ)])
1005+ let gL = if ((gA == false))
1006+ then [((toBigInt(bY(ds)) + toBigInt(gF)) + toBigInt(gG)), (toBigInt(bY(dt)) - gJ)]
1007+ else [(toBigInt(bY(ds)) - gJ), ((toBigInt(bY(dt)) + toBigInt(gF)) + toBigInt(gG))]
1008+ let gM = cJ(gL)
1009+ let eh = if ((gM >= eC))
9911010 then true
992- else throw(makeString(["new D is fewer error", toString(ex), toString(gI)], "__"))
993- if ((ec == ec))
994- then $Tuple2(nil, gG)
1011+ else throw(makeString(["new D is fewer error", toString(eC), toString(gM)], "__"))
1012+ if ((eh == eh))
1013+ then $Tuple2(nil, gK)
9951014 else throw("Strict value is not equal to itself.")
9961015 }
9971016
9981017
9991018
1000-@Callable(cT)
1001-func calculateAmountOutForSwapAndSendTokens (gB,gw,gJ,gK,gC) = {
1002- let gL = {
1003- let aW = invoke(aU, "getSwapContractREADONLY", nil, nil)
1004- if ($isInstanceOf(aW, "String"))
1005- then aW
1006- else throw(($getType(aW) + " couldn't be cast to String"))
1019+@Callable(cY)
1020+func calculateAmountOutForSwapAndSendTokens (gF,gA,gN,gO,gG) = {
1021+ let gP = {
1022+ let bd = invoke(aT, "getSwapContractREADONLY", nil, nil)
1023+ if ($isInstanceOf(bd, "String"))
1024+ then bd
1025+ else throw(($getType(bd) + " couldn't be cast to String"))
10071026 }
1008- let gM = [if ((value(cT.payments[0]).amount >= gB))
1027+ let gQ = [if ((value(cY.payments[0]).amount >= gF))
10091028 then true
1010- else aR("Wrong amount"), if ((cT.caller == addressFromStringValue(gL)))
1029+ else aZ("Wrong amount"), if ((cY.caller == addressFromStringValue(gP)))
10111030 then true
1012- else aR("Permission denied")]
1013- if ((gM == gM))
1031+ else aZ("Permission denied")]
1032+ if ((gQ == gQ))
10141033 then {
1015- let fo = value(cT.payments[0])
1016- let gN = bi(fo.assetId)
1017- let gO = if ((gw == false))
1034+ let ft = value(cY.payments[0])
1035+ let gR = bp(ft.assetId)
1036+ let gS = if ((gA == false))
10181037 then {
1019- let gE = aN(this, ak())
1020- let gx = (bR(gN) - value(cT.payments[0]).amount)
1021- $Tuple2(gE, gx)
1038+ let gI = aV(this, ak())
1039+ let gB = (bY(gR) - value(cY.payments[0]).amount)
1040+ $Tuple2(gI, gB)
10221041 }
10231042 else {
1024- let gE = aN(this, aj())
1025- let gx = (bR(gN) - value(cT.payments[0]).amount)
1026- $Tuple2(gE, gx)
1043+ let gI = aV(this, aj())
1044+ let gB = (bY(gR) - value(cY.payments[0]).amount)
1045+ $Tuple2(gI, gB)
10271046 }
1028- let gE = gO._1
1029- let gx = gO._2
1030- let bk = bc()
1031- let dn = bk[w]
1032- let do = bk[x]
1033- let cD = if ((gw == false))
1034- then [(toBigInt(bR(dn)) - toBigInt(value(cT.payments[0]).amount)), toBigInt(bR(do))]
1035- else [toBigInt(bR(dn)), (toBigInt(bR(do)) - toBigInt(value(cT.payments[0]).amount))]
1036- let ex = cC(cD)
1037- let eF = gv(gw, ex, toBigInt(0))
1038- let gF = ((toBigInt(bR(gE)) - eF) - toBigInt(1))
1039- let gG = max([0, toInt(gF)])
1040- let gP = if ((gG >= gJ))
1047+ let gI = gS._1
1048+ let gB = gS._2
1049+ let br = bj()
1050+ let ds = br[w]
1051+ let dt = br[x]
1052+ let cK = if ((gA == false))
1053+ then [(toBigInt(bY(ds)) - toBigInt(value(cY.payments[0]).amount)), toBigInt(bY(dt))]
1054+ else [toBigInt(bY(ds)), (toBigInt(bY(dt)) - toBigInt(value(cY.payments[0]).amount))]
1055+ let eC = cJ(cK)
1056+ let eK = gz(gA, eC, toBigInt(0))
1057+ let gJ = ((toBigInt(bY(gI)) - eK) - toBigInt(1))
1058+ let gK = max([0, toInt(gJ)])
1059+ let gT = if ((gK >= gN))
10411060 then true
10421061 else throw("Exchange result is fewer coins than expected")
1043- if ((gP == gP))
1062+ if ((gT == gT))
10441063 then {
1045- let gH = if ((gw == false))
1046- then [(toBigInt(bR(dn)) + toBigInt(gC)), (toBigInt(bR(do)) - gF)]
1047- else [(toBigInt(bR(dn)) - gF), (toBigInt(bR(do)) + toBigInt(gC))]
1048- let gI = cC(gH)
1049- let ec = if ((gI >= ex))
1064+ let gL = if ((gA == false))
1065+ then [(toBigInt(bY(ds)) + toBigInt(gG)), (toBigInt(bY(dt)) - gJ)]
1066+ else [(toBigInt(bY(ds)) - gJ), (toBigInt(bY(dt)) + toBigInt(gG))]
1067+ let gM = cJ(gL)
1068+ let eh = if ((gM >= eC))
10501069 then true
10511070 else throw("new D is fewer error")
1052- if ((ec == ec))
1053- then $Tuple2([ScriptTransfer(addressFromStringValue(gK), gG, bg(gE))], gG)
1071+ if ((eh == eh))
1072+ then $Tuple2([ScriptTransfer(addressFromStringValue(gO), gK, bn(gI))], gK)
10541073 else throw("Strict value is not equal to itself.")
10551074 }
10561075 else throw("Strict value is not equal to itself.")
10601079
10611080
10621081
1063-@Callable(cT)
1082+@Callable(cY)
10641083 func constructor (Y) = {
1065- let eB = gu(cT)
1066- if ((eB == eB))
1084+ let eG = gy(cY)
1085+ if ((eG == eG))
10671086 then [StringEntry(Y(), Y)]
10681087 else throw("Strict value is not equal to itself.")
10691088 }
10701089
10711090
10721091
1073-@Callable(cT)
1074-func setManager (gQ) = {
1075- let eB = gu(cT)
1076- if ((eB == eB))
1077- then {
1078- let gR = fromBase58String(gQ)
1079- if ((gR == gR))
1080- then [StringEntry(aa(), gQ)]
1081- else throw("Strict value is not equal to itself.")
1082- }
1083- else throw("Strict value is not equal to itself.")
1084- }
1085-
1086-
1087-
1088-@Callable(cT)
1089-func confirmManager () = {
1090- let cy = gq()
1091- let gS = if (isDefined(cy))
1092- then true
1093- else throw("No pending manager")
1094- if ((gS == gS))
1095- then {
1096- let gT = if ((cT.callerPublicKey == value(cy)))
1097- then true
1098- else throw("You are not pending manager")
1099- if ((gT == gT))
1100- then [StringEntry(Z(), toBase58String(value(cy))), DeleteEntry(aa())]
1101- else throw("Strict value is not equal to itself.")
1102- }
1103- else throw("Strict value is not equal to itself.")
1104- }
1105-
1106-
1107-
1108-@Callable(cT)
1092+@Callable(cY)
11091093 func put (gU,gV) = {
1110- let gW = bw()
1094+ let gW = bD()
11111095 let gX = valueOrErrorMessage(addressFromString(gW[C]), "Wr st addr")
11121096 let gY = valueOrErrorMessage(addressFromString(gW[E]), "Wr sl addr")
11131097 if ((0 > gU))
11141098 then throw("Wrong slippage")
1115- else if ((size(cT.payments) != 2))
1099+ else if ((size(cY.payments) != 2))
11161100 then throw("2 pmnts expd")
11171101 else {
1118- let gZ = toBigInt(value(cT.payments[0]).amount)
1119- let ha = toBigInt(value(cT.payments[1]).amount)
1120- let eS = (toBigInt(bR(bi(bq))) - gZ)
1121- if ((eS == eS))
1102+ let gZ = toBigInt(value(cY.payments[0]).amount)
1103+ let ha = toBigInt(value(cY.payments[1]).amount)
1104+ let eX = (toBigInt(bY(bp(bx))) - gZ)
1105+ if ((eX == eX))
11221106 then {
1123- let eT = (toBigInt(bR(bi(br))) - ha)
1124- if ((eT == eT))
1107+ let eY = (toBigInt(bY(bp(by))) - ha)
1108+ if ((eY == eY))
11251109 then {
1126- let eU = toBigInt(value(assetInfo(bp)).quantity)
1127- if ((eU == eU))
1110+ let eZ = toBigInt(value(assetInfo(bw)).quantity)
1111+ if ((eZ == eZ))
11281112 then {
1129- let eV = eO(gZ, ha, toBigInt(0))
1130- if ((eV == eV))
1113+ let fa = eT(gZ, ha, toBigInt(0))
1114+ if ((fa == fa))
11311115 then {
1132- let hb = fp(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], gU, true, false, true, 0, "")
1133- let ep = hb._2
1116+ let hb = fu(toString(cY.caller), toBase58String(cY.transactionId), AttachedPayment(value(cY.payments[0]).assetId, value(cY.payments[0]).amount), cY.payments[1], gU, true, false, true, 0, "")
1117+ let eu = hb._2
11341118 let hc = hb._7
1135- let dF = hb._9
1136- let eq = hb._10
1137- let er = hb._11
1138- let dn = hb._12
1139- let do = hb._13
1140- let eb = invoke(aU, "emit", [ep], nil)
1141- if ((eb == eb))
1119+ let dK = hb._9
1120+ let ev = hb._10
1121+ let ew = hb._11
1122+ let ds = hb._12
1123+ let dt = hb._13
1124+ let eg = invoke(aT, "emit", [eu], nil)
1125+ if ((eg == eg))
11421126 then {
11431127 let hd = {
1144- let gp = eb
1145- if ($isInstanceOf(gp, "Address"))
1128+ let aP = eg
1129+ if ($isInstanceOf(aP, "Address"))
11461130 then {
1147- let he = gp
1148- invoke(he, "emit", [ep], nil)
1131+ let he = aP
1132+ invoke(he, "emit", [eu], nil)
11491133 }
11501134 else unit
11511135 }
11521136 if ((hd == hd))
11531137 then {
1154- let hf = if ((eq > 0))
1155- then invoke(gY, "put", nil, [AttachedPayment(dn, eq)])
1138+ let hf = if ((ev > 0))
1139+ then invoke(gY, "put", nil, [AttachedPayment(ds, ev)])
11561140 else nil
11571141 if ((hf == hf))
11581142 then {
1159- let hg = if ((er > 0))
1160- then invoke(gY, "put", nil, [AttachedPayment(do, er)])
1143+ let hg = if ((ew > 0))
1144+ then invoke(gY, "put", nil, [AttachedPayment(dt, ew)])
11611145 else nil
11621146 if ((hg == hg))
11631147 then {
11641148 let hh = if (gV)
11651149 then {
1166- let hi = invoke(gX, "stake", nil, [AttachedPayment(hc, ep)])
1150+ let hi = invoke(gX, "stake", nil, [AttachedPayment(hc, eu)])
11671151 if ((hi == hi))
11681152 then nil
11691153 else throw("Strict value is not equal to itself.")
11701154 }
1171- else [ScriptTransfer(cT.caller, ep, hc)]
1172- let hj = eW(0, 0, 0)
1173- let gm = hj._1
1174- let eN = hj._2
1175- let hk = if ((eN >= eV))
1155+ else [ScriptTransfer(cY.caller, eu, hc)]
1156+ let hj = fb(0, 0, 0)
1157+ let gr = hj._1
1158+ let eS = hj._2
1159+ let hk = if ((eS >= fa))
11761160 then true
1177- else aR(makeString(["updated DLp lower than current DLp", toString(eS), toString(eT), toString(eU), toString(eV), toString(eN), toString(eq), toString(er)], " "))
1161+ else aZ(makeString(["updated DLp lower than current DLp", toString(eX), toString(eY), toString(eZ), toString(fa), toString(eS), toString(ev), toString(ew)], " "))
11781162 if ((hk == hk))
11791163 then {
1180- let hl = value(assetInfo(bp)).quantity
1164+ let hl = value(assetInfo(bw)).quantity
11811165 if ((hl == hl))
1182- then ((dF ++ hh) ++ gm)
1166+ then ((dK ++ hh) ++ gr)
11831167 else throw("Strict value is not equal to itself.")
11841168 }
11851169 else throw("Strict value is not equal to itself.")
12041188
12051189
12061190
1207-@Callable(cT)
1208-func putOneTknV2 (fQ,gV) = {
1191+@Callable(cY)
1192+func putOneTknV2 (fV,gV) = {
12091193 let hm = {
1210- let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1211- if ($isInstanceOf(aW, "Boolean"))
1212- then aW
1213- else throw(($getType(aW) + " couldn't be cast to Boolean"))
1194+ let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1195+ if ($isInstanceOf(bd, "Boolean"))
1196+ then bd
1197+ else throw(($getType(bd) + " couldn't be cast to Boolean"))
12141198 }
1215- let hn = if (if (if (aZ())
1199+ let hn = if (if (if (bg())
12161200 then true
1217- else (bo == q))
1201+ else (bv == q))
12181202 then true
1219- else (bo == s))
1203+ else (bv == s))
12201204 then true
12211205 else hm
1222- let gM = [if (if (!(hn))
1206+ let gQ = [if (if (!(hn))
12231207 then true
1224- else gs(cT))
1208+ else gw(cY))
12251209 then true
1226- else aR("put operation is blocked by admin"), if ((size(cT.payments) == 1))
1210+ else aZ("put operation is blocked by admin"), if ((size(cY.payments) == 1))
12271211 then true
1228- else aR("exactly 1 payment are expected")]
1229- if ((gM == gM))
1212+ else aZ("exactly 1 payment are expected")]
1213+ if ((gQ == gQ))
12301214 then {
1231- let dn = toBase58String(value(bq))
1232- let do = toBase58String(value(br))
1233- let dm = bp
1234- let fU = bs
1235- let fV = bt
1236- let dl = if ((cT.caller == this))
1237- then cT.originCaller
1238- else cT.caller
1239- let fo = value(cT.payments[0])
1240- let dj = toBase58String(value(fo.assetId))
1241- let dP = fo.amount
1242- let eV = if ((fo.assetId == bq))
1243- then eO(toBigInt(dP), toBigInt(0), toBigInt(0))
1244- else eO(toBigInt(0), toBigInt(dP), toBigInt(0))
1245- if ((eV == eV))
1215+ let ds = toBase58String(value(bx))
1216+ let dt = toBase58String(value(by))
1217+ let dr = bw
1218+ let fZ = bz
1219+ let ga = bA
1220+ let dq = if ((cY.caller == this))
1221+ then cY.originCaller
1222+ else cY.caller
1223+ let ft = value(cY.payments[0])
1224+ let do = toBase58String(value(ft.assetId))
1225+ let dU = ft.amount
1226+ let fa = if ((ft.assetId == bx))
1227+ then eT(toBigInt(dU), toBigInt(0), toBigInt(0))
1228+ else eT(toBigInt(0), toBigInt(dU), toBigInt(0))
1229+ if ((fa == fa))
12461230 then {
1247- let ho = ft(dP, dj, toString(dl), toBase58String(cT.transactionId), true)
1231+ let ho = fy(dU, do, toString(dq), toBase58String(cY.transactionId), true)
12481232 if ((ho == ho))
12491233 then {
1250- let cB = ho._3
1251- let dF = ho._2
1234+ let cI = ho._3
1235+ let dK = ho._2
12521236 let hp = ho._1
1253- let ep = if (if ((fQ > 0))
1254- then (fQ > hp)
1237+ let eu = if (if ((fV > 0))
1238+ then (fV > hp)
12551239 else false)
1256- then aR(makeString(["amount to receive is less than ", toString(fQ)], ""))
1240+ then aZ(makeString(["amount to receive is less than ", toString(fV)], ""))
12571241 else hp
1258- let hb = invoke(aU, "emit", [ep], nil)
1242+ let hb = invoke(aT, "emit", [eu], nil)
12591243 if ((hb == hb))
12601244 then {
12611245 let hd = {
1262- let gp = hb
1263- if ($isInstanceOf(gp, "Address"))
1246+ let aP = hb
1247+ if ($isInstanceOf(aP, "Address"))
12641248 then {
1265- let he = gp
1266- invoke(he, "emit", [ep], nil)
1249+ let he = aP
1250+ invoke(he, "emit", [eu], nil)
12671251 }
12681252 else unit
12691253 }
12711255 then {
12721256 let hh = if (gV)
12731257 then {
1274- let hi = invoke(by, "stakeFor", [toString(cT.caller)], [AttachedPayment(dm, ep)])
1258+ let hi = invoke(bF, "stakeFor", [toString(cY.caller)], [AttachedPayment(dr, eu)])
12751259 if ((hi == hi))
12761260 then nil
12771261 else throw("Strict value is not equal to itself.")
12781262 }
1279- else [ScriptTransfer(cT.caller, ep, dm)]
1280- let gg = if ((cB > 0))
1281- then [ScriptTransfer(bb, cB, fromBase58String(dj))]
1263+ else [ScriptTransfer(cY.caller, eu, dr)]
1264+ let gl = if ((cI > 0))
1265+ then [ScriptTransfer(bi, cI, fromBase58String(do))]
12821266 else nil
1283- let hq = if ((this == bb))
1267+ let hq = if ((this == bi))
12841268 then $Tuple2(0, 0)
12851269 else {
1286- let hr = if ((fo.assetId == bq))
1270+ let hr = if ((ft.assetId == bx))
12871271 then true
12881272 else false
12891273 if (hr)
1290- then $Tuple2(-(cB), 0)
1291- else $Tuple2(0, -(cB))
1274+ then $Tuple2(-(cI), 0)
1275+ else $Tuple2(0, -(cI))
12921276 }
1293- let eX = hq._1
1294- let eY = hq._2
1295- let hs = eW(eX, eY, 0)
1296- let gm = hs._1
1297- let eN = hs._2
1298- let gn = fa(eV, eN)
1299- if ((gn == gn))
1300- then $Tuple2((((dF ++ hh) ++ gg) ++ gm), ep)
1277+ let fc = hq._1
1278+ let fd = hq._2
1279+ let hs = fb(fc, fd, 0)
1280+ let gr = hs._1
1281+ let eS = hs._2
1282+ let gs = ff(fa, eS)
1283+ if ((gs == gs))
1284+ then $Tuple2((((dK ++ hh) ++ gl) ++ gr), eu)
13011285 else throw("Strict value is not equal to itself.")
13021286 }
13031287 else throw("Strict value is not equal to itself.")
13131297
13141298
13151299
1316-@Callable(cT)
1300+@Callable(cY)
13171301 func putForFree (ht) = if ((0 > ht))
13181302 then throw("Wrong slpg")
1319- else if ((size(cT.payments) != 2))
1303+ else if ((size(cY.payments) != 2))
13201304 then throw("2 pmnts expd")
13211305 else {
1322- let hu = fp(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], ht, false, false, true, 0, "")
1323- let dF = hu._9
1324- let gZ = toBigInt(value(cT.payments[0]).amount)
1325- let ha = toBigInt(value(cT.payments[1]).amount)
1326- let eV = eO(gZ, ha, toBigInt(0))
1327- if ((eV == eV))
1306+ let hu = fu(toString(cY.caller), toBase58String(cY.transactionId), AttachedPayment(value(cY.payments[0]).assetId, value(cY.payments[0]).amount), cY.payments[1], ht, false, false, true, 0, "")
1307+ let dK = hu._9
1308+ let gZ = toBigInt(value(cY.payments[0]).amount)
1309+ let ha = toBigInt(value(cY.payments[1]).amount)
1310+ let fa = eT(gZ, ha, toBigInt(0))
1311+ if ((fa == fa))
13281312 then {
1329- let hv = eW(0, 0, 0)
1330- let gm = hv._1
1331- let eN = hv._2
1332- let gn = fa(eV, eN)
1333- if ((gn == gn))
1334- then (dF ++ gm)
1313+ let hv = fb(0, 0, 0)
1314+ let gr = hv._1
1315+ let eS = hv._2
1316+ let gs = ff(fa, eS)
1317+ if ((gs == gs))
1318+ then (dK ++ gr)
13351319 else throw("Strict value is not equal to itself.")
13361320 }
13371321 else throw("Strict value is not equal to itself.")
13391323
13401324
13411325
1342-@Callable(cT)
1326+@Callable(cY)
13431327 func get () = {
1344- let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0))
1345- if ((eV == eV))
1328+ let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0))
1329+ if ((fa == fa))
13461330 then {
1347- let eb = fn(cT)
1348- let hw = eb._1
1349- let dE = eb._2
1350- let dP = eb._3
1351- let dj = eb._4
1352- let dF = eb._5
1353- let eC = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)])
1354- if ((eC == eC))
1331+ let eg = fs(cY)
1332+ let hw = eg._1
1333+ let dJ = eg._2
1334+ let dU = eg._3
1335+ let do = eg._4
1336+ let dK = eg._5
1337+ let eH = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)])
1338+ if ((eH == eH))
13551339 then {
1356- let hx = eW(-(hw), -(dE), 0)
1357- let gm = hx._1
1358- let eN = hx._2
1359- let gn = fa(eV, eN)
1360- if ((gn == gn))
1361- then (dF ++ gm)
1340+ let hx = fb(-(hw), -(dJ), 0)
1341+ let gr = hx._1
1342+ let eS = hx._2
1343+ let gs = ff(fa, eS)
1344+ if ((gs == gs))
1345+ then (dK ++ gr)
13621346 else throw("Strict value is not equal to itself.")
13631347 }
13641348 else throw("Strict value is not equal to itself.")
13681352
13691353
13701354
1371-@Callable(cT)
1372-func getOneTknV2 (fP,fQ) = {
1355+@Callable(cY)
1356+func getOneTknV2 (fU,fV) = {
13731357 let hm = {
1374- let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1375- if ($isInstanceOf(aW, "Boolean"))
1376- then aW
1377- else throw(($getType(aW) + " couldn't be cast to Boolean"))
1358+ let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1359+ if ($isInstanceOf(bd, "Boolean"))
1360+ then bd
1361+ else throw(($getType(bd) + " couldn't be cast to Boolean"))
13781362 }
1379- let hy = if (if (aZ())
1363+ let hy = if (if (bg())
13801364 then true
1381- else (bo == s))
1365+ else (bv == s))
13821366 then true
13831367 else hm
1384- let gM = [if (if (!(hy))
1368+ let gQ = [if (if (!(hy))
13851369 then true
1386- else gs(cT))
1370+ else gw(cY))
13871371 then true
1388- else aR("get operation is blocked by admin"), if ((size(cT.payments) == 1))
1372+ else aZ("get operation is blocked by admin"), if ((size(cY.payments) == 1))
13891373 then true
1390- else aR("exactly 1 payment are expected")]
1391- if ((gM == gM))
1374+ else aZ("exactly 1 payment are expected")]
1375+ if ((gQ == gQ))
13921376 then {
1393- let hz = fO(fP, fQ, cT.payments, cT.caller, cT.originCaller, cT.transactionId)
1394- let dF = hz._1
1395- let fZ = hz._2
1396- $Tuple2(dF, fZ)
1377+ let hz = fT(fU, fV, cY.payments, cY.caller, cY.originCaller, cY.transactionId)
1378+ let dK = hz._1
1379+ let ge = hz._2
1380+ $Tuple2(dK, ge)
13971381 }
13981382 else throw("Strict value is not equal to itself.")
13991383 }
14001384
14011385
14021386
1403-@Callable(cT)
1387+@Callable(cY)
14041388 func refreshDLp () = {
14051389 let hA = valueOrElse(getInteger(as), 0)
14061390 let hB = if (((height - hA) >= av))
14071391 then unit
1408- else aR(makeString([toString(av), " blocks have not passed since the previous call"], ""))
1392+ else aZ(makeString([toString(av), " blocks have not passed since the previous call"], ""))
14091393 if ((hB == hB))
14101394 then {
1411- let fh = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ar), "0")), aT("invalid dLp"))
1412- let hC = eW(0, 0, 0)
1395+ let fm = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ar), "0")), bb("invalid dLp"))
1396+ let hC = fb(0, 0, 0)
14131397 let hD = hC._1
1414- let eN = hC._2
1415- let eZ = if ((fh != eN))
1398+ let eS = hC._2
1399+ let fe = if ((fm != eS))
14161400 then hD
1417- else aR("nothing to refresh")
1418- $Tuple2(eZ, toString(eN))
1401+ else aZ("nothing to refresh")
1402+ $Tuple2(fe, toString(eS))
14191403 }
14201404 else throw("Strict value is not equal to itself.")
14211405 }
14221406
14231407
14241408
1425-@Callable(cT)
1426-func getOneTknV2READONLY (fP,hE) = {
1427- let dn = toBase58String(value(bq))
1428- let do = toBase58String(value(br))
1429- let dm = toBase58String(value(bp))
1430- let cD = [toBigInt(bR(dn)), toBigInt(bR(do))]
1431- let eM = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dm)), "invalid lp asset").quantity)
1432- let cf = cC(cD)
1433- let ce = (cf - fraction(toBigInt(hE), cf, eM))
1434- let hF = if ((fP == dn))
1409+@Callable(cY)
1410+func getOneTknV2READONLY (fU,hE) = {
1411+ let ds = toBase58String(value(bx))
1412+ let dt = toBase58String(value(by))
1413+ let dr = toBase58String(value(bw))
1414+ let cK = [toBigInt(bY(ds)), toBigInt(bY(dt))]
1415+ let eR = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dr)), "invalid lp asset").quantity)
1416+ let cm = cJ(cK)
1417+ let cl = (cm - fraction(toBigInt(hE), cm, eR))
1418+ let hF = if ((fU == ds))
14351419 then 0
1436- else if ((fP == do))
1420+ else if ((fU == dt))
14371421 then 1
14381422 else throw("invalid out asset id")
1439- let hG = ew(cD, hF, ce)
1440- let gF = (cD[hF] - hG)
1441- let gG = max([0, toInt((gF - f))])
1442- let hH = cz(gG, aX)
1443- let fY = hH._1
1444- let cB = hH._2
1445- $Tuple2(nil, $Tuple2(fY, cB))
1423+ let hG = eB(cK, hF, cl)
1424+ let gJ = (cK[hF] - hG)
1425+ let gK = max([0, toInt((gJ - f))])
1426+ let hH = cG(gK, be)
1427+ let gd = hH._1
1428+ let cI = hH._2
1429+ $Tuple2(nil, $Tuple2(gd, cI))
14461430 }
14471431
14481432
14491433
1450-@Callable(cT)
1451-func getOneTknV2WithBonusREADONLY (fP,hE) = {
1452- let dn = toBase58String(value(bq))
1453- let do = toBase58String(value(br))
1454- let dm = toBase58String(value(bp))
1455- let dt = bR(dn)
1456- let dv = bR(do)
1434+@Callable(cY)
1435+func getOneTknV2WithBonusREADONLY (fU,hE) = {
1436+ let ds = toBase58String(value(bx))
1437+ let dt = toBase58String(value(by))
1438+ let dr = toBase58String(value(bw))
1439+ let dy = bY(ds)
1440+ let dA = bY(dt)
14571441 let hI = {
1458- let aW = invoke(this, "getOneTknV2READONLY", [fP, hE], nil)
1459- if ($isInstanceOf(aW, "(Int, Int)"))
1460- then aW
1461- else throw(($getType(aW) + " couldn't be cast to (Int, Int)"))
1442+ let bd = invoke(this, "getOneTknV2READONLY", [fU, hE], nil)
1443+ if ($isInstanceOf(bd, "(Int, Int)"))
1444+ then bd
1445+ else throw(($getType(bd) + " couldn't be cast to (Int, Int)"))
14621446 }
1463- let fY = hI._1
1464- let cB = hI._2
1465- let eb = dh("", dm, hE, this)
1466- let dD = eb._1
1467- let dE = eb._2
1468- let hJ = (dD + dE)
1469- let fN = if ((hJ == 0))
1470- then if ((fY == 0))
1447+ let gd = hI._1
1448+ let cI = hI._2
1449+ let eg = dm("", dr, hE, this)
1450+ let dI = eg._1
1451+ let dJ = eg._2
1452+ let hJ = (dI + dJ)
1453+ let fS = if ((hJ == 0))
1454+ then if ((gd == 0))
14711455 then 0
14721456 else throw("bonus calculation error")
1473- else fraction((fY - hJ), a, hJ)
1474- $Tuple2(nil, $Tuple3(fY, cB, fN))
1457+ else fraction((gd - hJ), a, hJ)
1458+ $Tuple2(nil, $Tuple3(gd, cI, fS))
14751459 }
14761460
14771461
14781462
1479-@Callable(cT)
1463+@Callable(cY)
14801464 func getNoLess (hK,hL) = {
1481- let eb = fn(cT)
1482- let dD = eb._1
1483- let dE = eb._2
1484- let dP = eb._3
1485- let dj = eb._4
1486- let dF = eb._5
1487- if ((hK > dD))
1488- then throw(((("Failed: " + toString(dD)) + " < ") + toString(hK)))
1489- else if ((hL > dE))
1490- then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL)))
1465+ let eg = fs(cY)
1466+ let dI = eg._1
1467+ let dJ = eg._2
1468+ let dU = eg._3
1469+ let do = eg._4
1470+ let dK = eg._5
1471+ if ((hK > dI))
1472+ then throw(((("Failed: " + toString(dI)) + " < ") + toString(hK)))
1473+ else if ((hL > dJ))
1474+ then throw(((("Failed: " + toString(dJ)) + " < ") + toString(hL)))
14911475 else {
1492- let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0))
1493- if ((eV == eV))
1476+ let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0))
1477+ if ((fa == fa))
14941478 then {
1495- let hM = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)])
1479+ let hM = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)])
14961480 if ((hM == hM))
14971481 then {
1498- let hN = eW(-(dD), -(dE), 0)
1499- let gm = hN._1
1500- let eN = hN._2
1501- let gn = fa(eV, eN)
1502- if ((gn == gn))
1503- then (dF ++ gm)
1482+ let hN = fb(-(dI), -(dJ), 0)
1483+ let gr = hN._1
1484+ let eS = hN._2
1485+ let gs = ff(fa, eS)
1486+ if ((gs == gs))
1487+ then (dK ++ gr)
15041488 else throw("Strict value is not equal to itself.")
15051489 }
15061490 else throw("Strict value is not equal to itself.")
15111495
15121496
15131497
1514-@Callable(cT)
1515-func unstakeAndGet (cA) = {
1516- let hO = if ((size(cT.payments) != 0))
1498+@Callable(cY)
1499+func unstakeAndGet (cH) = {
1500+ let hO = if ((size(cY.payments) != 0))
15171501 then throw("No pmnts expd")
15181502 else true
15191503 if ((hO == hO))
15201504 then {
1521- let hP = bw()
1522- let hc = bp
1505+ let hP = bD()
1506+ let hc = bw
15231507 let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr")
1524- let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0))
1525- if ((eV == eV))
1508+ let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0))
1509+ if ((fa == fa))
15261510 then {
1527- let hR = invoke(hQ, "unstake", [toBase58String(hc), cA], nil)
1511+ let hR = invoke(hQ, "unstake", [toBase58String(hc), cH], nil)
15281512 if ((hR == hR))
15291513 then {
1530- let eb = dh(toBase58String(cT.transactionId), toBase58String(hc), cA, cT.caller)
1531- let dD = eb._1
1532- let dE = eb._2
1533- let dr = parseIntValue(eb._9)
1534- let dF = eb._10
1535- let hS = if (if (aZ())
1514+ let eg = dm(toBase58String(cY.transactionId), toBase58String(hc), cH, cY.caller)
1515+ let dI = eg._1
1516+ let dJ = eg._2
1517+ let dw = parseIntValue(eg._9)
1518+ let dK = eg._10
1519+ let hS = if (if (bg())
15361520 then true
1537- else (dr == s))
1538- then throw(("Blocked: " + toString(dr)))
1521+ else (dw == s))
1522+ then throw(("Blocked: " + toString(dw)))
15391523 else true
15401524 if ((hS == hS))
15411525 then {
1542- let hT = invoke(aU, "burn", [cA], [AttachedPayment(hc, cA)])
1526+ let hT = invoke(aT, "burn", [cH], [AttachedPayment(hc, cH)])
15431527 if ((hT == hT))
15441528 then {
1545- let hU = eW(-(dD), -(dE), 0)
1546- let gm = hU._1
1547- let eN = hU._2
1548- let gn = fa(eV, eN)
1549- if ((gn == gn))
1550- then (dF ++ gm)
1529+ let hU = fb(-(dI), -(dJ), 0)
1530+ let gr = hU._1
1531+ let eS = hU._2
1532+ let gs = ff(fa, eS)
1533+ if ((gs == gs))
1534+ then (dK ++ gr)
15511535 else throw("Strict value is not equal to itself.")
15521536 }
15531537 else throw("Strict value is not equal to itself.")
15631547
15641548
15651549
1566-@Callable(cT)
1550+@Callable(cY)
15671551 func unstakeAndGetNoLess (hV,hW,hL) = {
1568- let hy = if (aZ())
1552+ let hy = if (bg())
15691553 then true
1570- else (bo == s)
1571- let gM = [if (!(hy))
1554+ else (bv == s)
1555+ let gQ = [if (!(hy))
15721556 then true
1573- else throw("get operation is blocked by admin"), if ((size(cT.payments) == 0))
1557+ else throw("get operation is blocked by admin"), if ((size(cY.payments) == 0))
15741558 then true
15751559 else throw("no payments are expected")]
1576- if ((gM == gM))
1560+ if ((gQ == gQ))
15771561 then {
1578- let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0))
1579- if ((eV == eV))
1562+ let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0))
1563+ if ((fa == fa))
15801564 then {
1581- let hR = invoke(by, "unstake", [toBase58String(bp), hV], nil)
1565+ let hR = invoke(bF, "unstake", [toBase58String(bw), hV], nil)
15821566 if ((hR == hR))
15831567 then {
1584- let hX = dh(toBase58String(cT.transactionId), toBase58String(bp), hV, cT.caller)
1585- let dD = hX._1
1586- let dE = hX._2
1587- let dF = hX._10
1588- let hY = [if ((dD >= hW))
1568+ let hX = dm(toBase58String(cY.transactionId), toBase58String(bw), hV, cY.caller)
1569+ let dI = hX._1
1570+ let dJ = hX._2
1571+ let dK = hX._10
1572+ let hY = [if ((dI >= hW))
15891573 then true
1590- else throw(makeString(["amount asset amount to receive is less than ", toString(hW)], "")), if ((dE >= hL))
1574+ else throw(makeString(["amount asset amount to receive is less than ", toString(hW)], "")), if ((dJ >= hL))
15911575 then true
15921576 else throw(makeString(["price asset amount to receive is less than ", toString(hL)], ""))]
15931577 if ((hY == hY))
15941578 then {
1595- let hM = invoke(aU, "burn", [hV], [AttachedPayment(bp, hV)])
1579+ let hM = invoke(aT, "burn", [hV], [AttachedPayment(bw, hV)])
15961580 if ((hM == hM))
15971581 then {
1598- let hZ = eW(-(dD), -(dE), 0)
1599- let gm = hZ._1
1600- let eN = hZ._2
1601- let gn = fa(eV, eN)
1602- if ((gn == gn))
1603- then (dF ++ gm)
1582+ let hZ = fb(-(dI), -(dJ), 0)
1583+ let gr = hZ._1
1584+ let eS = hZ._2
1585+ let gs = ff(fa, eS)
1586+ if ((gs == gs))
1587+ then (dK ++ gr)
16041588 else throw("Strict value is not equal to itself.")
16051589 }
16061590 else throw("Strict value is not equal to itself.")
16161600
16171601
16181602
1619-@Callable(cT)
1620-func unstakeAndGetOneTknV2 (hV,fP,fQ) = {
1603+@Callable(cY)
1604+func unstakeAndGetOneTknV2 (hV,fU,fV) = {
16211605 let hm = {
1622- let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1623- if ($isInstanceOf(aW, "Boolean"))
1624- then aW
1625- else throw(($getType(aW) + " couldn't be cast to Boolean"))
1606+ let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1607+ if ($isInstanceOf(bd, "Boolean"))
1608+ then bd
1609+ else throw(($getType(bd) + " couldn't be cast to Boolean"))
16261610 }
1627- let hy = if (if (aZ())
1611+ let hy = if (if (bg())
16281612 then true
1629- else (bo == s))
1613+ else (bv == s))
16301614 then true
16311615 else hm
1632- let gM = [if (if (!(hy))
1616+ let gQ = [if (if (!(hy))
16331617 then true
1634- else gs(cT))
1618+ else gw(cY))
16351619 then true
1636- else aR("get operation is blocked by admin"), if ((size(cT.payments) == 0))
1620+ else aZ("get operation is blocked by admin"), if ((size(cY.payments) == 0))
16371621 then true
1638- else aR("no payments are expected")]
1639- if ((gM == gM))
1622+ else aZ("no payments are expected")]
1623+ if ((gQ == gQ))
16401624 then {
1641- let hP = bw()
1642- let hc = bp
1625+ let hP = bD()
1626+ let hc = bw
16431627 let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr")
1644- let dl = cT.caller
1628+ let dq = cY.caller
16451629 let ia = this
1646- let hR = invoke(hQ, "unstakeINTERNAL", [hc, hV, dl.bytes, ia.bytes], nil)
1630+ let hR = invoke(hQ, "unstakeINTERNAL", [hc, hV, dq.bytes, ia.bytes], nil)
16471631 if ((hR == hR))
16481632 then {
1649- let ib = fO(fP, fQ, [AttachedPayment(hc, hV)], cT.caller, cT.originCaller, cT.transactionId)
1650- let dF = ib._1
1651- let fZ = ib._2
1652- $Tuple2(dF, fZ)
1633+ let ib = fT(fU, fV, [AttachedPayment(hc, hV)], cY.caller, cY.originCaller, cY.transactionId)
1634+ let dK = ib._1
1635+ let ge = ib._2
1636+ $Tuple2(dK, ge)
16531637 }
16541638 else throw("Strict value is not equal to itself.")
16551639 }
16581642
16591643
16601644
1661-@Callable(cT)
1645+@Callable(cY)
16621646 func putOneTknV2WithBonusREADONLY (ic,id) = {
1663- let ie = ft(ic, id, "", "", true)
1664- let fI = ie._1
1665- let dF = ie._2
1666- let cB = ie._3
1667- let fN = ie._4
1668- $Tuple2(nil, $Tuple3(fI, cB, fN))
1647+ let ie = fy(ic, id, "", "", true)
1648+ let fN = ie._1
1649+ let dK = ie._2
1650+ let cI = ie._3
1651+ let fS = ie._4
1652+ $Tuple2(nil, $Tuple3(fN, cI, fS))
16691653 }
16701654
16711655
16721656
1673-@Callable(cT)
1657+@Callable(cY)
16741658 func putOneTknV2WithoutTakeFeeREADONLY (ic,id) = {
1675- let if = ft(ic, id, "", "", false)
1676- let fI = if._1
1677- let dF = if._2
1678- let cB = if._3
1679- let fN = if._4
1680- $Tuple2(nil, $Tuple3(fI, cB, fN))
1659+ let if = fy(ic, id, "", "", false)
1660+ let fN = if._1
1661+ let dK = if._2
1662+ let cI = if._3
1663+ let fS = if._4
1664+ $Tuple2(nil, $Tuple3(fN, cI, fS))
16811665 }
16821666
16831667
16841668
1685-@Callable(cT)
1686-func activate (ig,ih) = if ((toString(cT.caller) != toString(aU)))
1669+@Callable(cY)
1670+func activate (ig,ih) = if ((toString(cY.caller) != toString(aT)))
16871671 then throw("denied")
16881672 else $Tuple2([StringEntry(aj(), ig), StringEntry(ak(), ih)], "success")
16891673
16901674
16911675
1692-@Callable(cT)
1693-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bc())
1676+@Callable(cY)
1677+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bj())
16941678
16951679
16961680
1697-@Callable(cT)
1698-func getAccBalanceWrapperREADONLY (bS) = $Tuple2(nil, bR(bS))
1681+@Callable(cY)
1682+func getAccBalanceWrapperREADONLY (bZ) = $Tuple2(nil, bY(bZ))
16991683
17001684
17011685
1702-@Callable(cT)
1703-func calcPricesWrapperREADONLY (cl,cm,cq) = {
1704- let ii = cp(cl, cm, cq)
1686+@Callable(cY)
1687+func calcPricesWrapperREADONLY (cs,ct,cx) = {
1688+ let ii = cw(cs, ct, cx)
17051689 $Tuple2(nil, [toString(ii[0]), toString(ii[1]), toString(ii[2])])
17061690 }
17071691
17081692
17091693
1710-@Callable(cT)
1694+@Callable(cY)
17111695 func fromX18WrapperREADONLY (M,ij) = $Tuple2(nil, L(parseBigIntValue(M), ij))
17121696
17131697
17141698
1715-@Callable(cT)
1699+@Callable(cY)
17161700 func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
17171701
17181702
17191703
1720-@Callable(cT)
1721-func calcPriceBigIntWrapperREADONLY (bU,bV) = $Tuple2(nil, toString(bT(parseBigIntValue(bU), parseBigIntValue(bV))))
1704+@Callable(cY)
1705+func calcPriceBigIntWrapperREADONLY (cb,cc) = $Tuple2(nil, toString(ca(parseBigIntValue(cb), parseBigIntValue(cc))))
17221706
17231707
17241708
1725-@Callable(cT)
1726-func estimatePutOperationWrapperREADONLY (di,ca,dH,dI,dJ,dK,ik,dL,dM) = $Tuple2(nil, dG(di, ca, dH, dI, dJ, dK, ik, dL, dM, true, false, 0, ""))
1709+@Callable(cY)
1710+func estimatePutOperationWrapperREADONLY (dn,ch,dM,dN,dO,dP,ik,dQ,dR) = $Tuple2(nil, dL(dn, ch, dM, dN, dO, dP, ik, dQ, dR, true, false, 0, ""))
17271711
17281712
17291713
1730-@Callable(cT)
1731-func estimateGetOperationWrapperREADONLY (di,il,dk,ik) = {
1732- let eb = dh(di, il, dk, addressFromStringValue(ik))
1733- $Tuple2(nil, $Tuple10(eb._1, eb._2, eb._3, eb._4, eb._5, eb._6, eb._7, toString(eb._8), eb._9, eb._10))
1714+@Callable(cY)
1715+func estimateGetOperationWrapperREADONLY (dn,il,dp,ik) = {
1716+ let eg = dm(dn, il, dp, addressFromStringValue(ik))
1717+ $Tuple2(nil, $Tuple10(eg._1, eg._2, eg._3, eg._4, eg._5, eg._6, eg._7, toString(eg._8), eg._9, eg._10))
17341718 }
17351719
17361720
17371721
1738-@Callable(cT)
1722+@Callable(cY)
17391723 func changeAmp () = {
1740- let im = invoke(aU, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1724+ let im = invoke(aT, "getChangeAmpConfigREADONLY", [toString(this)], nil)
17411725 let in = {
1742- let gp = im
1743- if ($isInstanceOf(gp, "List[Any]"))
1726+ let aP = im
1727+ if ($isInstanceOf(aP, "List[Any]"))
17441728 then {
1745- let io = gp
1729+ let io = aP
17461730 $Tuple3({
1747- let aW = io[0]
1748- if ($isInstanceOf(aW, "Int"))
1749- then aW
1750- else throw(($getType(aW) + " couldn't be cast to Int"))
1731+ let bd = io[0]
1732+ if ($isInstanceOf(bd, "Int"))
1733+ then bd
1734+ else throw(($getType(bd) + " couldn't be cast to Int"))
17511735 }, {
1752- let aW = io[1]
1753- if ($isInstanceOf(aW, "Int"))
1754- then aW
1755- else throw(($getType(aW) + " couldn't be cast to Int"))
1736+ let bd = io[1]
1737+ if ($isInstanceOf(bd, "Int"))
1738+ then bd
1739+ else throw(($getType(bd) + " couldn't be cast to Int"))
17561740 }, {
1757- let aW = io[2]
1758- if ($isInstanceOf(aW, "Int"))
1759- then aW
1760- else throw(($getType(aW) + " couldn't be cast to Int"))
1741+ let bd = io[2]
1742+ if ($isInstanceOf(bd, "Int"))
1743+ then bd
1744+ else throw(($getType(bd) + " couldn't be cast to Int"))
17611745 })
17621746 }
1763- else aR("invalid entry type")
1747+ else aZ("invalid entry type")
17641748 }
17651749 let ip = in._1
17661750 let iq = in._2
17761760 else it
17771761 let iv = valueOrElse(getInteger(ao()), 0)
17781762 let iw = (iv + ip)
1779- let gM = [if ((height > iw))
1763+ let gQ = [if ((height > iw))
17801764 then true
1781- else aR("try again in few blocks"), if ((is != iu))
1765+ else aZ("try again in few blocks"), if ((is != iu))
17821766 then true
1783- else aR("already reached target")]
1784- if ((gM == gM))
1767+ else aZ("already reached target")]
1768+ if ((gQ == gQ))
17851769 then [IntegerEntry(ao(), height), StringEntry(al(), toString(iu)), StringEntry(am(height), toString(iu))]
17861770 else throw("Strict value is not equal to itself.")
17871771 }
17901774 @Verifier(ix)
17911775 func iy () = {
17921776 let iz = {
1793- let gp = go()
1794- if ($isInstanceOf(gp, "ByteVector"))
1777+ let aP = gt()
1778+ if ($isInstanceOf(aP, "ByteVector"))
17951779 then {
1796- let gt = gp
1797- gt
1780+ let gx = aP
1781+ gx
17981782 }
1799- else if ($isInstanceOf(gp, "Unit"))
1783+ else if ($isInstanceOf(aP, "Unit"))
18001784 then ix.senderPublicKey
18011785 else throw("Match error")
18021786 }
1803- let gp = ix
1804- if ($isInstanceOf(gp, "Order"))
1787+ let aP = ix
1788+ if ($isInstanceOf(aP, "Order"))
18051789 then {
1806- let fd = gp
1807- let iA = ba()
1808- let iB = if (gA())
1790+ let fi = aP
1791+ let iA = bh()
1792+ let iB = if (gE())
18091793 then $Tuple2(true, "")
1810- else fc(fd)
1794+ else fh(fi)
18111795 let aJ = iB._1
18121796 let aK = iB._2
1813- let aL = sigVerify(fd.bodyBytes, fd.proofs[0], fd.senderPublicKey)
1814- let aM = sigVerify(fd.bodyBytes, fd.proofs[1], iA)
1797+ let aL = sigVerify(fi.bodyBytes, fi.proofs[0], fi.senderPublicKey)
1798+ let aM = sigVerify(fi.bodyBytes, fi.proofs[1], iA)
18151799 if (if (if (aJ)
18161800 then aL
18171801 else false)
18201804 then true
18211805 else aI(aJ, aK, aL, aM)
18221806 }
1823- else if ($isInstanceOf(gp, "SetScriptTransaction"))
1807+ else if ($isInstanceOf(aP, "SetScriptTransaction"))
18241808 then {
1825- let cG = gp
1809+ let aU = aP
18261810 if (sigVerify(ix.bodyBytes, ix.proofs[0], iz))
18271811 then true
18281812 else {
1829- let iC = blake2b256(value(cG.script))
1830- let iD = fromBase64String(value(getString(aU, aE())))
1813+ let iC = blake2b256(value(aU.script))
1814+ let iD = fromBase64String(value(getString(aT, aE())))
18311815 let iE = scriptHash(this)
18321816 if ((iD == iC))
18331817 then (iE != iC)
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
107-func aa () = "%s__pendingManagerPublicKey"
107+func aa () = "%s__managerVaultAddress"
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
131131 func am (an) = ("%s%d__amp__" + toString(an))
132132
133133
134134 func ao () = "%s__changeAmpLastCall"
135135
136136
137137 let ap = "%s__fee"
138138
139139 let aq = valueOrElse(getInteger(this, ap), G)
140140
141141 let ar = makeString(["%s", "dLp"], n)
142142
143143 let as = makeString(["%s", "dLpRefreshedHeight"], n)
144144
145145 let at = makeString(["%s", "refreshDLpDelay"], n)
146146
147147 let au = 30
148148
149149 let av = valueOrElse(getInteger(this, at), au)
150150
151151 func aw () = "%s__factoryConfig"
152152
153153
154154 func ax () = "%s%s__matcher__publicKey"
155155
156156
157157 func ay (az,aA) = (((("%d%d%s__" + az) + "__") + aA) + "__config")
158158
159159
160160 func aB (aC) = ("%s%s%s__mappings__baseAsset2internalId__" + aC)
161161
162162
163163 func aD () = "%s__shutdown"
164164
165165
166166 func aE () = "%s__allowedLpStableScriptHash"
167167
168168
169169 func aF () = "%s__feeCollectorAddress"
170170
171171
172172 func aG (aH) = ("%s%s__skipOrderValidation__" + aH)
173173
174174
175175 func aI (aJ,aK,aL,aM) = throw((((((((("order validation failed: orderValid=" + toString(aJ)) + " (") + aK) + ")") + " senderValid=") + toString(aL)) + " matcherValid=") + toString(aM)))
176176
177177
178-func aN (aO,aP) = valueOrErrorMessage(getString(aO, aP), makeString(["mandatory ", toString(aO), ".", aP, " not defined"], ""))
179-
180-
181-func aQ (aO,aP) = valueOrErrorMessage(getInteger(aO, aP), makeString(["mandatory ", toString(aO), ".", aP, " not defined"], ""))
182-
183-
184-func aR (aS) = throw(makeString(["lp_stable.ride:", aS], " "))
185-
186-
187-func aT (aS) = makeString(["lp_stable.ride:", aS], " ")
188-
189-
190-let aU = addressFromStringValue(aN(this, Y()))
191-
192-let aV = {
193- let aW = invoke(aU, "getInFeeREADONLY", [toString(this)], nil)
194- if ($isInstanceOf(aW, "Int"))
195- then aW
196- else throw(($getType(aW) + " couldn't be cast to Int"))
197- }
198-
199-let aX = {
200- let aW = invoke(aU, "getOutFeeREADONLY", [toString(this)], nil)
201- if ($isInstanceOf(aW, "Int"))
202- then aW
203- else throw(($getType(aW) + " couldn't be cast to Int"))
204- }
205-
206-let aY = aN(this, al())
207-
208-func aZ () = valueOrElse(getBoolean(aU, aD()), false)
209-
210-
211-func ba () = fromBase58String(aN(aU, ax()))
212-
213-
214-let bb = addressFromStringValue(aN(aU, aF()))
215-
216-func bc () = {
217- let bd = aN(this, aj())
218- let be = aN(this, ak())
219- let bf = aQ(aU, aB(be))
220- let az = aQ(aU, aB(bd))
221- split(aN(aU, ay(toString(az), toString(bf))), n)
178+func aN (aO) = {
179+ let aP = addressFromString(aO)
180+ if ($isInstanceOf(aP, "Address"))
181+ then {
182+ let aQ = aP
183+ aQ
184+ }
185+ else this
222186 }
223187
224188
225-func bg (bh) = if ((bh == k))
226- then unit
227- else fromBase58String(bh)
228-
229-
230-func bi (bh) = if ((bh == unit))
231- then k
232- else toBase58String(value(bh))
233-
234-
235-func bj (bk) = $Tuple9(addressFromStringValue(bk[t]), parseIntValue(bk[u]), fromBase58String(bk[v]), bg(bk[w]), bg(bk[x]), parseIntValue(bk[y]), parseIntValue(bk[z]), fromBase58String(bk[A]), fromBase58String(bk[B]))
236-
237-
238-let bl = bj(bc())
239-
240-let bm = bl
241-
242-let bn = bm._1
243-
244-let bo = bm._2
245-
246-let bp = bm._3
247-
248-let bq = bm._4
249-
250-let br = bm._5
251-
252-let bs = bm._6
253-
254-let bt = bm._7
255-
256-let bu = bm._8
257-
258-let bv = bm._9
259-
260-func bw () = split(aN(aU, aw()), n)
261-
262-
263-let bx = bw()
264-
265-let by = valueOrErrorMessage(addressFromString(bx[C]), "Invalid staking contract address")
266-
267-let bz = valueOrErrorMessage(addressFromString(bx[E]), "Invalid slipage contract address")
268-
269-let bA = valueOrErrorMessage(addressFromString(bx[F]), "Invalid gwx contract address")
270-
271-let bB = valueOrErrorMessage(addressFromString(bx[D]), "Invalid gwx contract address")
272-
273-func bC (bD,bE,bF,bG,bH,bI,bJ,bK,bL,bM) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM)], n)
274-
275-
276-func bN (bO,bP,bQ,bG,bJ,bK) = makeString(["%d%d%d%d%d%d", toString(bO), toString(bP), toString(bQ), toString(bG), toString(bJ), toString(bK)], n)
277-
278-
279-func bR (bS) = if ((bS == "WAVES"))
280- then wavesBalance(this).available
281- else assetBalance(this, fromBase58String(bS))
282-
283-
284-func bT (bU,bV) = fraction(bU, c, bV)
285-
286-
287-func bW (bU,bV,P) = fraction(bU, c, bV, P)
288-
289-
290-func bX (bY,bZ,ca) = {
291- let cb = fraction((bY - bZ), b, bZ)
292- let cc = ((ca - W(cb)) > d)
293- if (!(cc))
294- then throw(("Big slpg: " + toString(cb)))
295- else $Tuple2(cc, min([bY, bZ]))
189+func aR () = {
190+ let aS = {
191+ let aP = aN(Y())
192+ if ($isInstanceOf(aP, "Address"))
193+ then {
194+ let aT = aP
195+ aT
196+ }
197+ else this
198+ }
199+ let aP = getString(aS, aa())
200+ if ($isInstanceOf(aP, "String"))
201+ then {
202+ let aU = aP
203+ aN(aU)
204+ }
205+ else this
296206 }
297207
298208
299-func cd (ce,cf,cg) = {
300- let cb = fraction(cf, b, ce)
301- let ch = (cg > cb)
302- if (if (ch)
303- then true
304- else (cf > ce))
305- then throw(((((((toString(cf) + " ") + toString(ce)) + " ") + toString(cb)) + " ") + toString(cg)))
306- else ch
209+func aV (aW,aX) = valueOrErrorMessage(getString(aW, aX), makeString(["mandatory ", toString(aW), ".", aX, " not defined"], ""))
210+
211+
212+func aY (aW,aX) = valueOrErrorMessage(getInteger(aW, aX), makeString(["mandatory ", toString(aW), ".", aX, " not defined"], ""))
213+
214+
215+func aZ (ba) = throw(makeString(["lp_stable.ride:", ba], " "))
216+
217+
218+func bb (ba) = makeString(["lp_stable.ride:", ba], " ")
219+
220+
221+let aT = addressFromStringValue(aV(this, Y()))
222+
223+let bc = {
224+ let bd = invoke(aT, "getInFeeREADONLY", [toString(this)], nil)
225+ if ($isInstanceOf(bd, "Int"))
226+ then bd
227+ else throw(($getType(bd) + " couldn't be cast to Int"))
228+ }
229+
230+let be = {
231+ let bd = invoke(aT, "getOutFeeREADONLY", [toString(this)], nil)
232+ if ($isInstanceOf(bd, "Int"))
233+ then bd
234+ else throw(($getType(bd) + " couldn't be cast to Int"))
235+ }
236+
237+let bf = aV(this, al())
238+
239+func bg () = valueOrElse(getBoolean(aT, aD()), false)
240+
241+
242+func bh () = fromBase58String(aV(aT, ax()))
243+
244+
245+let bi = addressFromStringValue(aV(aT, aF()))
246+
247+func bj () = {
248+ let bk = aV(this, aj())
249+ let bl = aV(this, ak())
250+ let bm = aY(aT, aB(bl))
251+ let az = aY(aT, aB(bk))
252+ split(aV(aT, ay(toString(az), toString(bm))), n)
307253 }
308254
309255
310-func ci (cj,ck,cl,cm) = {
311- let cn = H(cl, cj)
312- let co = H(cm, ck)
313- bT(co, cn)
256+func bn (bo) = if ((bo == k))
257+ then unit
258+ else fromBase58String(bo)
259+
260+
261+func bp (bo) = if ((bo == unit))
262+ then k
263+ else toBase58String(value(bo))
264+
265+
266+func bq (br) = $Tuple9(addressFromStringValue(br[t]), parseIntValue(br[u]), fromBase58String(br[v]), bn(br[w]), bn(br[x]), parseIntValue(br[y]), parseIntValue(br[z]), fromBase58String(br[A]), fromBase58String(br[B]))
267+
268+
269+let bs = bq(bj())
270+
271+let bt = bs
272+
273+let bu = bt._1
274+
275+let bv = bt._2
276+
277+let bw = bt._3
278+
279+let bx = bt._4
280+
281+let by = bt._5
282+
283+let bz = bt._6
284+
285+let bA = bt._7
286+
287+let bB = bt._8
288+
289+let bC = bt._9
290+
291+func bD () = split(aV(aT, aw()), n)
292+
293+
294+let bE = bD()
295+
296+let bF = valueOrErrorMessage(addressFromString(bE[C]), "Invalid staking contract address")
297+
298+let bG = valueOrErrorMessage(addressFromString(bE[E]), "Invalid slipage contract address")
299+
300+let bH = valueOrErrorMessage(addressFromString(bE[F]), "Invalid gwx contract address")
301+
302+let bI = valueOrErrorMessage(addressFromString(bE[D]), "Invalid gwx contract address")
303+
304+func bJ (bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bN), toString(bO), toString(bP), toString(bQ), toString(bR), toString(bS), toString(bT)], n)
305+
306+
307+func bU (bV,bW,bX,bN,bQ,bR) = makeString(["%d%d%d%d%d%d", toString(bV), toString(bW), toString(bX), toString(bN), toString(bQ), toString(bR)], n)
308+
309+
310+func bY (bZ) = if ((bZ == "WAVES"))
311+ then wavesBalance(this).available
312+ else assetBalance(this, fromBase58String(bZ))
313+
314+
315+func ca (cb,cc) = fraction(cb, c, cc)
316+
317+
318+func cd (cb,cc,P) = fraction(cb, c, cc, P)
319+
320+
321+func ce (cf,cg,ch) = {
322+ let ci = fraction((cf - cg), b, cg)
323+ let cj = ((ch - W(ci)) > d)
324+ if (!(cj))
325+ then throw(("Big slpg: " + toString(ci)))
326+ else $Tuple2(cj, min([cf, cg]))
314327 }
315328
316329
317-func cp (cl,cm,cq) = {
318- let cr = bs
319- let cs = bt
320- let ct = ci(cr, cs, cl, cm)
321- let bV = H(cl, cr)
322- let bU = H(cm, cs)
323- let cu = H(cq, a)
324- let cv = bT(bV, cu)
325- let cw = bT(bU, cu)
326-[ct, cv, cw]
330+func ck (cl,cm,cn) = {
331+ let ci = fraction(cm, b, cl)
332+ let co = (cn > ci)
333+ if (if (co)
334+ then true
335+ else (cm > cl))
336+ then throw(((((((toString(cm) + " ") + toString(cl)) + " ") + toString(ci)) + " ") + toString(cn)))
337+ else co
327338 }
328339
329340
330-func cx (cl,cm,cq) = {
331- let cy = cp(cl, cm, cq)
332-[L(cy[0], a), L(cy[1], a), L(cy[2], a)]
341+func cp (cq,cr,cs,ct) = {
342+ let cu = H(cs, cq)
343+ let cv = H(ct, cr)
344+ ca(cv, cu)
333345 }
334346
335347
336-func cz (cA,aq) = {
337- let cB = if ((aq == 0))
338- then 0
339- else fraction(cA, aq, a)
340- $Tuple2((cA - cB), cB)
348+func cw (cs,ct,cx) = {
349+ let cy = bz
350+ let cz = bA
351+ let cA = cp(cy, cz, cs, ct)
352+ let cc = H(cs, cy)
353+ let cb = H(ct, cz)
354+ let cB = H(cx, a)
355+ let cC = ca(cc, cB)
356+ let cD = ca(cb, cB)
357+[cA, cC, cD]
341358 }
342359
343360
344-func cC (cD) = {
345- let cE = cD[0]
346- let cF = cD[1]
347- let cG = (cE + cF)
348- if ((cG == e))
361+func cE (cs,ct,cx) = {
362+ let cF = cw(cs, ct, cx)
363+[L(cF[0], a), L(cF[1], a), L(cF[2], a)]
364+ }
365+
366+
367+func cG (cH,aq) = {
368+ let cI = if ((aq == 0))
369+ then 0
370+ else fraction(cH, aq, a)
371+ $Tuple2((cH - cI), cI)
372+ }
373+
374+
375+func cJ (cK) = {
376+ let cL = cK[0]
377+ let cM = cK[1]
378+ let aU = (cL + cM)
379+ if ((aU == e))
349380 then e
350381 else {
351- let cH = parseIntValue(aY)
352- let cI = (cH * 2)
353- let cy = fraction(cE, cF, f)
354- let cJ = fraction(cy, i, f)
355- let cK = fraction(toBigInt(cI), cG, f)
356- let cL = toBigInt((cI - 1))
357- func cM (cN) = {
358- let cO = fraction(cN, cN, f)
359- let cP = fraction(cO, cN, f)
360- let cQ = fraction(cP, f, cJ)
361- fraction((cK + fraction(cQ, g, f)), cN, (fraction(cL, cN, f) + fraction(h, cQ, f)))
382+ let aQ = parseIntValue(bf)
383+ let cN = (aQ * 2)
384+ let cF = fraction(cL, cM, f)
385+ let cO = fraction(cF, i, f)
386+ let cP = fraction(toBigInt(cN), aU, f)
387+ let cQ = toBigInt((cN - 1))
388+ func cR (cS) = {
389+ let cT = fraction(cS, cS, f)
390+ let cU = fraction(cT, cS, f)
391+ let cV = fraction(cU, f, cO)
392+ fraction((cP + fraction(cV, g, f)), cS, (fraction(cQ, cS, f) + fraction(h, cV, f)))
362393 }
363394
364- func cR (cS,cT) = if (cS._2)
365- then cS
395+ func cW (cX,cY) = if (cX._2)
396+ then cX
366397 else {
367- let cN = cS._1
368- let cU = cM(cN)
369- let cV = (cU - value(cN))
370- let cW = if ((e > cV))
371- then -(cV)
372- else cV
373- if ((f >= cW))
374- then $Tuple2(cU, true)
375- else $Tuple2(cU, false)
398+ let cS = cX._1
399+ let cZ = cR(cS)
400+ let da = (cZ - value(cS))
401+ let db = if ((e > da))
402+ then -(da)
403+ else da
404+ if ((f >= db))
405+ then $Tuple2(cZ, true)
406+ else $Tuple2(cZ, false)
376407 }
377408
378- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
379- let cY = {
380- let cZ = cX
381- let da = size(cZ)
382- let db = $Tuple2(cG, false)
383- func dc (dd,de) = if ((de >= da))
384- then dd
385- else cR(dd, cZ[de])
409+ let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
410+ let dd = {
411+ let de = dc
412+ let df = size(de)
413+ let dg = $Tuple2(aU, false)
414+ func dh (di,dj) = if ((dj >= df))
415+ then di
416+ else cW(di, de[dj])
386417
387- func df (dd,de) = if ((de >= da))
388- then dd
418+ func dk (di,dj) = if ((dj >= df))
419+ then di
389420 else throw("List size exceeds 17")
390421
391- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
422+ dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
392423 }
393- let cN = cY._1
394- let dg = cY._2
395- if (dg)
396- then cN
397- else throw(("D calculation error, D = " + toString(cN)))
424+ let cS = dd._1
425+ let dl = dd._2
426+ if (dl)
427+ then cS
428+ else throw(("D calculation error, D = " + toString(cS)))
398429 }
399430 }
400431
401432
402-func dh (di,dj,dk,dl) = {
403- let dm = bp
404- let dn = toBase58String(value(bq))
405- let do = toBase58String(value(br))
406- let dp = bs
407- let dq = bt
408- let dr = toString(bo)
409- let ds = valueOrErrorMessage(assetInfo(dm), "Wrong LP id").quantity
410- if ((toBase58String(dm) != dj))
433+func dm (dn,do,dp,dq) = {
434+ let dr = bw
435+ let ds = toBase58String(value(bx))
436+ let dt = toBase58String(value(by))
437+ let du = bz
438+ let dv = bA
439+ let dw = toString(bv)
440+ let dx = valueOrErrorMessage(assetInfo(dr), "Wrong LP id").quantity
441+ if ((toBase58String(dr) != do))
411442 then throw("Wrong pmt asset")
412443 else {
413- let dt = bR(dn)
414- let du = H(dt, dp)
415- let dv = bR(do)
416- let dw = H(dv, dq)
417- let dx = bT(dw, du)
418- let dy = L(dx, a)
419- let dz = H(dk, a)
420- let dA = H(ds, a)
421- let dB = fraction(du, dz, dA)
422- let dC = fraction(dw, dz, dA)
423- let dD = O(dB, dp, FLOOR)
424- let dE = O(dC, dq, FLOOR)
425- let dF = if ((di == ""))
444+ let dy = bY(ds)
445+ let dz = H(dy, du)
446+ let dA = bY(dt)
447+ let dB = H(dA, dv)
448+ let dC = ca(dB, dz)
449+ let dD = L(dC, a)
450+ let dE = H(dp, a)
451+ let dF = H(dx, a)
452+ let dG = fraction(dz, dE, dF)
453+ let dH = fraction(dB, dE, dF)
454+ let dI = O(dG, du, FLOOR)
455+ let dJ = O(dH, dv, FLOOR)
456+ let dK = if ((dn == ""))
426457 then nil
427- else [ScriptTransfer(dl, dD, if ((dn == "WAVES"))
458+ else [ScriptTransfer(dq, dI, if ((ds == "WAVES"))
428459 then unit
429- else fromBase58String(dn)), ScriptTransfer(dl, dE, if ((do == "WAVES"))
460+ else fromBase58String(ds)), ScriptTransfer(dq, dJ, if ((dt == "WAVES"))
430461 then unit
431- else fromBase58String(do)), StringEntry(ai(toString(dl), di), bN(dD, dE, dk, dy, height, lastBlock.timestamp)), IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy)]
432- $Tuple10(dD, dE, dn, do, dt, dv, ds, dx, dr, dF)
462+ else fromBase58String(dt)), StringEntry(ai(toString(dq), dn), bU(dI, dJ, dp, dD, height, lastBlock.timestamp)), IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD)]
463+ $Tuple10(dI, dJ, ds, dt, dy, dA, dx, dC, dw, dK)
433464 }
434465 }
435466
436467
437-func dG (di,ca,dH,dI,dJ,dK,dl,dL,dM,dN,dO,dP,dQ) = {
438- let dm = bp
439- let dR = toBase58String(value(bq))
440- let dS = toBase58String(value(br))
441- let dT = bu
442- let dU = bv
443- let dV = bs
444- let dW = bt
445- let dr = toString(bo)
446- let dX = valueOrErrorMessage(assetInfo(dm), "Wr lp as").quantity
447- let dt = if (dL)
448- then bR(dR)
449- else if (if (dN)
450- then (dQ == dR)
468+func dL (dn,ch,dM,dN,dO,dP,dq,dQ,dR,dS,dT,dU,dV) = {
469+ let dr = bw
470+ let dW = toBase58String(value(bx))
471+ let dX = toBase58String(value(by))
472+ let dY = bB
473+ let dZ = bC
474+ let ea = bz
475+ let eb = bA
476+ let dw = toString(bv)
477+ let ec = valueOrErrorMessage(assetInfo(dr), "Wr lp as").quantity
478+ let dy = if (dQ)
479+ then bY(dW)
480+ else if (if (dS)
481+ then (dV == dW)
451482 else false)
452- then (bR(dR) - dP)
453- else if (dN)
454- then bR(dR)
455- else (bR(dR) - dH)
456- let dv = if (dL)
457- then bR(dS)
458- else if (if (dN)
459- then (dQ == dS)
483+ then (bY(dW) - dU)
484+ else if (dS)
485+ then bY(dW)
486+ else (bY(dW) - dM)
487+ let dA = if (dQ)
488+ then bY(dX)
489+ else if (if (dS)
490+ then (dV == dX)
460491 else false)
461- then (bR(dS) - dP)
462- else if (dN)
463- then bR(dS)
464- else (bR(dS) - dJ)
465- let dY = H(dH, dV)
466- let dZ = H(dJ, dW)
467- let ea = bT(dZ, dY)
468- let du = H(dt, dV)
469- let dw = H(dv, dW)
470- let cf = cC([du, dw])
471- let eb = if ((dX == 0))
492+ then (bY(dX) - dU)
493+ else if (dS)
494+ then bY(dX)
495+ else (bY(dX) - dO)
496+ let ed = H(dM, ea)
497+ let ee = H(dO, eb)
498+ let ef = ca(ee, ed)
499+ let dz = H(dy, ea)
500+ let dB = H(dA, eb)
501+ let cm = cJ([dz, dB])
502+ let eg = if ((ec == 0))
472503 then {
473- let ce = cC([(du + dY), (dw + dZ)])
474- let ec = if ((ce > cf))
504+ let cl = cJ([(dz + ed), (dB + ee)])
505+ let eh = if ((cl > cm))
475506 then true
476507 else throw("D1 should be greater than D0")
477- if ((ec == ec))
508+ if ((eh == eh))
478509 then {
479- let dx = d
480- let ed = d
481- let cu = ce
482- $Tuple5(L(cu, a), L(dY, dV), L(dZ, dW), bT((dw + dZ), (du + dY)), ed)
510+ let dC = d
511+ let ei = d
512+ let cB = cl
513+ $Tuple5(L(cB, a), L(ed, ea), L(ee, eb), ca((dB + ee), (dz + ed)), ei)
483514 }
484515 else throw("Strict value is not equal to itself.")
485516 }
486517 else {
487- let dx = bT(dw, du)
488- let ee = fraction(W((dx - ea)), c, dx)
489- let ed = H(ca, a)
490- if (if (if (dO)
491- then (dx != d)
518+ let dC = ca(dB, dz)
519+ let ej = fraction(W((dC - ef)), c, dC)
520+ let ei = H(ch, a)
521+ if (if (if (dT)
522+ then (dC != d)
492523 else false)
493- then (ee > ed)
524+ then (ej > ei)
494525 else false)
495- then throw(((("Price slippage " + toString(ee)) + " > ") + toString(ed)))
526+ then throw(((("Price slippage " + toString(ej)) + " > ") + toString(ei)))
496527 else {
497- let ef = H(dX, a)
498- let eg = fraction(dY, bW(dw, du, CEILING), c, CEILING)
499- let eh = fraction(dZ, c, bW(dw, du, FLOOR), CEILING)
500- let ei = if ((eg > dZ))
501- then $Tuple2(eh, dZ)
502- else $Tuple2(dY, eg)
503- let ej = ei._1
504- let ek = ei._2
505- let ce = cC([(du + ej), (dw + ek)])
506- let ec = if ((ce > cf))
528+ let ek = H(ec, a)
529+ let el = fraction(ed, cd(dB, dz, CEILING), c, CEILING)
530+ let em = fraction(ee, c, cd(dB, dz, FLOOR), CEILING)
531+ let en = if ((el > ee))
532+ then $Tuple2(em, ee)
533+ else $Tuple2(ed, el)
534+ let eo = en._1
535+ let ep = en._2
536+ let cl = cJ([(dz + eo), (dB + ep)])
537+ let eh = if ((cl > cm))
507538 then true
508539 else throw("D1 should be greater than D0")
509- if ((ec == ec))
540+ if ((eh == eh))
510541 then {
511- let cu = fraction(ef, (ce - cf), cf)
512- $Tuple5(O(cu, a, FLOOR), O(ej, dV, CEILING), O(ek, dW, CEILING), dx, ed)
542+ let cB = fraction(ek, (cl - cm), cm)
543+ $Tuple5(O(cB, a, FLOOR), O(eo, ea, CEILING), O(ep, eb, CEILING), dC, ei)
513544 }
514545 else throw("Strict value is not equal to itself.")
515546 }
516547 }
517- let el = eb._1
518- let em = eb._2
519- let en = eb._3
520- let dy = L(eb._4, a)
521- let eo = L(eb._5, a)
522- if ((0 >= el))
548+ let eq = eg._1
549+ let er = eg._2
550+ let es = eg._3
551+ let dD = L(eg._4, a)
552+ let et = L(eg._5, a)
553+ if ((0 >= eq))
523554 then throw("LP <= 0")
524555 else {
525- let ep = if (!(dM))
556+ let eu = if (!(dR))
526557 then 0
527- else el
528- let eq = (dH - em)
529- let er = (dJ - en)
530- let es = if (if (dN)
531- then (dQ == dR)
558+ else eq
559+ let ev = (dM - er)
560+ let ew = (dO - es)
561+ let ex = if (if (dS)
562+ then (dV == dW)
532563 else false)
533- then $Tuple2(dP, 0)
534- else if (if (dN)
535- then (dQ == dS)
564+ then $Tuple2(dU, 0)
565+ else if (if (dS)
566+ then (dV == dX)
536567 else false)
537- then $Tuple2(0, dP)
538- else $Tuple2(em, en)
539- let et = es._1
540- let eu = es._2
541- let ev = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, di), bC(et, eu, ep, dy, ca, eo, height, lastBlock.timestamp, eq, er))]
542- $Tuple13(el, ep, dy, dt, dv, dX, dm, dr, ev, eq, er, dI, dK)
568+ then $Tuple2(0, dU)
569+ else $Tuple2(er, es)
570+ let ey = ex._1
571+ let ez = ex._2
572+ let eA = [IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD), StringEntry(af(dq, dn), bJ(ey, ez, eu, dD, ch, et, height, lastBlock.timestamp, ev, ew))]
573+ $Tuple13(eq, eu, dD, dy, dA, ec, dr, dw, eA, ev, ew, dN, dP)
543574 }
544575 }
545576
546577
547-func ew (cD,cT,ex) = {
548- let ey = g
549- let ez = cD[if ((cT == 0))
578+func eB (cK,cY,eC) = {
579+ let eD = g
580+ let eE = cK[if ((cY == 0))
550581 then 1
551582 else 0]
552- let eA = parseBigIntValue(l)
553- let cH = (parseBigIntValue(aY) * eA)
554- let cG = ez
555- let cI = (cH * ey)
556- let eB = (((((ex * ex) / (ez * ey)) * ex) * eA) / (cI * ey))
557- let eC = ((cG + ((ex * eA) / cI)) - ex)
558- func cR (cS,eD) = {
559- let eE = cS
560- let eF = eE._1
561- let dg = eE._2
562- if ((dg != unit))
563- then cS
583+ let eF = parseBigIntValue(l)
584+ let aQ = (parseBigIntValue(bf) * eF)
585+ let aU = eE
586+ let cN = (aQ * eD)
587+ let eG = (((((eC * eC) / (eE * eD)) * eC) * eF) / (cN * eD))
588+ let eH = ((aU + ((eC * eF) / cN)) - eC)
589+ func cW (cX,eI) = {
590+ let eJ = cX
591+ let eK = eJ._1
592+ let dl = eJ._2
593+ if ((dl != unit))
594+ then cX
564595 else {
565- let eG = (((eF * eF) + eB) / ((g * eF) + eC))
566- let eH = X((eG - value(eF)))
567- if ((f >= eH))
568- then $Tuple2(eG, eD)
569- else $Tuple2(eG, unit)
596+ let eL = (((eK * eK) + eG) / ((g * eK) + eH))
597+ let eM = X((eL - value(eK)))
598+ if ((f >= eM))
599+ then $Tuple2(eL, eI)
600+ else $Tuple2(eL, unit)
570601 }
571602 }
572603
573- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
574- let eI = {
575- let cZ = cX
576- let da = size(cZ)
577- let db = $Tuple2(ex, unit)
578- func dc (dd,de) = if ((de >= da))
579- then dd
580- else cR(dd, cZ[de])
604+ let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
605+ let eN = {
606+ let de = dc
607+ let df = size(de)
608+ let dg = $Tuple2(eC, unit)
609+ func dh (di,dj) = if ((dj >= df))
610+ then di
611+ else cW(di, de[dj])
581612
582- func df (dd,de) = if ((de >= da))
583- then dd
613+ func dk (di,dj) = if ((dj >= df))
614+ then di
584615 else throw("List size exceeds 15")
585616
586- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
617+ dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
587618 }
588- let eF = eI._1
589- let dg = eI._2
590- if ((dg != unit))
591- then eF
592- else throw(("Y calculation error, Y = " + toString(eF)))
593- }
594-
595-
596-func eJ (eK,eL,eM) = {
597- let eN = fraction(cC([K(eK, toBigInt(bs)), K(eL, toBigInt(bt))]), c, eM)
598- if ((eM == e))
599- then e
600- else eN
619+ let eK = eN._1
620+ let dl = eN._2
621+ if ((dl != unit))
622+ then eK
623+ else throw(("Y calculation error, Y = " + toString(eK)))
601624 }
602625
603626
604627 func eO (eP,eQ,eR) = {
605- let eS = (toBigInt(bR(bi(bq))) - eP)
606- let eT = (toBigInt(bR(bi(br))) - eQ)
607- let eU = (toBigInt(value(assetInfo(bp)).quantity) - eR)
608- let eV = eJ(eS, eT, eU)
609- eV
628+ let eS = fraction(cJ([K(eP, toBigInt(bz)), K(eQ, toBigInt(bA))]), c, eR)
629+ if ((eR == e))
630+ then e
631+ else eS
610632 }
611633
612634
613-func eW (eX,eY,eR) = {
614- let eS = (bR(bi(bq)) + eX)
615- let eT = (bR(bi(br)) + eY)
616- let eU = (value(assetInfo(bp)).quantity + eR)
617- let eN = eJ(toBigInt(eS), toBigInt(eT), toBigInt(eU))
618- let eZ = [IntegerEntry(as, height), StringEntry(ar, toString(eN))]
619- $Tuple2(eZ, eN)
635+func eT (eU,eV,eW) = {
636+ let eX = (toBigInt(bY(bp(bx))) - eU)
637+ let eY = (toBigInt(bY(bp(by))) - eV)
638+ let eZ = (toBigInt(value(assetInfo(bw)).quantity) - eW)
639+ let fa = eO(eX, eY, eZ)
640+ fa
620641 }
621642
622643
623-func fa (fb,eN) = if ((eN >= fb))
624- then true
625- else aR("updated DLp lower than current DLp")
644+func fb (fc,fd,eW) = {
645+ let eX = (bY(bp(bx)) + fc)
646+ let eY = (bY(bp(by)) + fd)
647+ let eZ = (value(assetInfo(bw)).quantity + eW)
648+ let eS = eO(toBigInt(eX), toBigInt(eY), toBigInt(eZ))
649+ let fe = [IntegerEntry(as, height), StringEntry(ar, toString(eS))]
650+ $Tuple2(fe, eS)
651+ }
626652
627653
628-func fc (fd) = {
629- let eS = bR(bi(bq))
630- let eT = bR(bi(br))
631- let fe = fd.amount
632- let ff = fraction(fd.amount, fd.price, a, FLOOR)
633- let fg = if ((fd.orderType == Buy))
634- then $Tuple2(fe, -(ff))
635- else $Tuple2(-(fe), ff)
636- let eX = fg._1
637- let eY = fg._2
638- if (if (if (aZ())
654+func ff (fg,eS) = if ((eS >= fg))
655+ then true
656+ else aZ("updated DLp lower than current DLp")
657+
658+
659+func fh (fi) = {
660+ let eX = bY(bp(bx))
661+ let eY = bY(bp(by))
662+ let fj = fi.amount
663+ let fk = fraction(fi.amount, fi.price, a, FLOOR)
664+ let fl = if ((fi.orderType == Buy))
665+ then $Tuple2(fj, -(fk))
666+ else $Tuple2(-(fj), fk)
667+ let fc = fl._1
668+ let fd = fl._2
669+ if (if (if (bg())
639670 then true
640- else (bo == r))
671+ else (bv == r))
641672 then true
642- else (bo == s))
673+ else (bv == s))
643674 then throw("Admin blocked")
644- else if (if ((fd.assetPair.amountAsset != bq))
675+ else if (if ((fi.assetPair.amountAsset != bx))
645676 then true
646- else (fd.assetPair.priceAsset != br))
677+ else (fi.assetPair.priceAsset != by))
647678 then throw("Wr assets")
648679 else {
649- let fh = parseBigIntValue(valueOrElse(getString(this, ar), "0"))
650- let fi = eW(eX, eY, 0)
651- let fj = fi._1
652- let fk = fi._2
653- let fl = (fk >= fh)
654- let fm = makeString(["dLp=", toString(fh), " dLpNew=", toString(fk), " amountAssetBalance=", toString(eS), " priceAssetBalance=", toString(eT), " amountAssetBalanceDelta=", toString(eX), " priceAssetBalanceDelta=", toString(eY), " height=", toString(height)], "")
655- $Tuple2(fl, fm)
680+ let fm = parseBigIntValue(valueOrElse(getString(this, ar), "0"))
681+ let fn = fb(fc, fd, 0)
682+ let fo = fn._1
683+ let fp = fn._2
684+ let fq = (fp >= fm)
685+ let fr = makeString(["dLp=", toString(fm), " dLpNew=", toString(fp), " amountAssetBalance=", toString(eX), " priceAssetBalance=", toString(eY), " amountAssetBalanceDelta=", toString(fc), " priceAssetBalanceDelta=", toString(fd), " height=", toString(height)], "")
686+ $Tuple2(fq, fr)
656687 }
657688 }
658689
659690
660-func fn (cT) = if ((size(cT.payments) != 1))
691+func fs (cY) = if ((size(cY.payments) != 1))
661692 then throw("1 pmnt exp")
662693 else {
663- let fo = value(cT.payments[0])
664- let dj = value(fo.assetId)
665- let dP = fo.amount
666- let eb = dh(toBase58String(cT.transactionId), toBase58String(dj), dP, cT.caller)
667- let dD = eb._1
668- let dE = eb._2
669- let dr = parseIntValue(eb._9)
670- let dF = eb._10
671- if (if (aZ())
694+ let ft = value(cY.payments[0])
695+ let do = value(ft.assetId)
696+ let dU = ft.amount
697+ let eg = dm(toBase58String(cY.transactionId), toBase58String(do), dU, cY.caller)
698+ let dI = eg._1
699+ let dJ = eg._2
700+ let dw = parseIntValue(eg._9)
701+ let dK = eg._10
702+ if (if (bg())
672703 then true
673- else (dr == s))
674- then throw(("Admin blocked: " + toString(dr)))
675- else $Tuple5(dD, dE, dP, dj, dF)
704+ else (dw == s))
705+ then throw(("Admin blocked: " + toString(dw)))
706+ else $Tuple5(dI, dJ, dU, do, dK)
676707 }
677708
678709
679-func fp (fq,ah,fr,fs,ca,dM,dN,dO,dP,dQ) = {
680- let eb = dG(ah, ca, value(fr).amount, value(fr).assetId, value(fs).amount, value(fs).assetId, fq, (ah == ""), dM, dN, dO, dP, dQ)
681- let dr = parseIntValue(eb._8)
682- if (if (if (aZ())
710+func fu (fv,ah,fw,fx,ch,dR,dS,dT,dU,dV) = {
711+ let eg = dL(ah, ch, value(fw).amount, value(fw).assetId, value(fx).amount, value(fx).assetId, fv, (ah == ""), dR, dS, dT, dU, dV)
712+ let dw = parseIntValue(eg._8)
713+ if (if (if (bg())
683714 then true
684- else (dr == q))
715+ else (dw == q))
685716 then true
686- else (dr == s))
687- then throw(("Blocked:" + toString(dr)))
688- else eb
717+ else (dw == s))
718+ then throw(("Blocked:" + toString(dw)))
719+ else eg
689720 }
690721
691722
692-func ft (fu,dj,dl,ah,fv) = {
693- let dn = toBase58String(value(bq))
694- let do = toBase58String(value(br))
695- let dm = bp
696- let dV = bs
697- let dW = bt
698- let eU = toBigInt(valueOrErrorMessage(assetInfo(dm), "invalid lp asset").quantity)
699- let fw = if ((eU > e))
723+func fy (fz,do,dq,ah,fA) = {
724+ let ds = toBase58String(value(bx))
725+ let dt = toBase58String(value(by))
726+ let dr = bw
727+ let ea = bz
728+ let eb = bA
729+ let eZ = toBigInt(valueOrErrorMessage(assetInfo(dr), "invalid lp asset").quantity)
730+ let fB = if ((eZ > e))
700731 then true
701732 else throw("initial deposit requires all coins")
702- if ((fw == fw))
733+ if ((fB == fB))
703734 then {
704- let dt = bR(dn)
705- let dv = bR(do)
706- let fx = if ((ah == ""))
707- then $Tuple2(dt, dv)
708- else if ((dj == dn))
709- then if ((fu > dt))
735+ let dy = bY(ds)
736+ let dA = bY(dt)
737+ let fC = if ((ah == ""))
738+ then $Tuple2(dy, dA)
739+ else if ((do == ds))
740+ then if ((fz > dy))
710741 then throw("invalid payment amount")
711- else $Tuple2((dt - fu), dv)
712- else if ((dj == do))
713- then if ((fu > dv))
742+ else $Tuple2((dy - fz), dA)
743+ else if ((do == dt))
744+ then if ((fz > dA))
714745 then throw("invalid payment amount")
715- else $Tuple2(dt, (dv - fu))
746+ else $Tuple2(dy, (dA - fz))
716747 else throw("wrong pmtAssetId")
717- let fy = fx._1
718- let fz = fx._2
719- let fA = if ((dj == dn))
720- then $Tuple2(fu, 0)
721- else if ((dj == do))
722- then $Tuple2(0, fu)
748+ let fD = fC._1
749+ let fE = fC._2
750+ let fF = if ((do == ds))
751+ then $Tuple2(fz, 0)
752+ else if ((do == dt))
753+ then $Tuple2(0, fz)
723754 else throw("invalid payment")
724- let fB = fA._1
725- let fC = fA._2
726- let fD = if (fv)
727- then $Tuple3(cz(fB, aV)._1, cz(fC, aV)._1, cz(fu, aV)._2)
728- else $Tuple3(fB, fC, 0)
729- let fE = fD._1
730- let fF = fD._2
731- let cB = fD._3
732- let fG = (fy + fE)
733- let fH = (fz + fF)
734- let cf = cC([H(fy, bs), H(fz, bt)])
735- let ce = cC([H(fG, bs), H(fH, bt)])
736- let ec = if ((ce > cf))
755+ let fG = fF._1
756+ let fH = fF._2
757+ let fI = if (fA)
758+ then $Tuple3(cG(fG, bc)._1, cG(fH, bc)._1, cG(fz, bc)._2)
759+ else $Tuple3(fG, fH, 0)
760+ let fJ = fI._1
761+ let fK = fI._2
762+ let cI = fI._3
763+ let fL = (fD + fJ)
764+ let fM = (fE + fK)
765+ let cm = cJ([H(fD, bz), H(fE, bA)])
766+ let cl = cJ([H(fL, bz), H(fM, bA)])
767+ let eh = if ((cl > cm))
737768 then true
738769 else throw()
739- if ((ec == ec))
770+ if ((eh == eh))
740771 then {
741- let fI = fraction(eU, (ce - cf), cf, FLOOR)
742- let dy = L(bT(H(fH, dW), H(fG, dV)), a)
743- let ev = [IntegerEntry(ab(), dy), IntegerEntry(ac(height, lastBlock.timestamp), dy), StringEntry(af(dl, ah), bC(fB, fC, toInt(fI), dy, 0, 0, height, lastBlock.timestamp, 0, 0))]
744- let fJ = fraction(fz, a, fy)
745- let fK = fraction(fu, a, (fJ + a))
746- let fL = (fu - fK)
747- let fM = fraction(eU, toBigInt(fL), toBigInt(fz))
748- let fN = toInt(fraction((fI - fM), b, fM))
749- $Tuple4(toInt(fI), ev, cB, fN)
772+ let fN = fraction(eZ, (cl - cm), cm, FLOOR)
773+ let dD = L(ca(H(fM, eb), H(fL, ea)), a)
774+ let eA = [IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD), StringEntry(af(dq, ah), bJ(fG, fH, toInt(fN), dD, 0, 0, height, lastBlock.timestamp, 0, 0))]
775+ let fO = fraction(fE, a, fD)
776+ let fP = fraction(fz, a, (fO + a))
777+ let fQ = (fz - fP)
778+ let fR = fraction(eZ, toBigInt(fQ), toBigInt(fE))
779+ let fS = toInt(fraction((fN - fR), b, fR))
780+ $Tuple4(toInt(fN), eA, cI, fS)
750781 }
751782 else throw("Strict value is not equal to itself.")
752783 }
753784 else throw("Strict value is not equal to itself.")
754785 }
755786
756787
757-func fO (fP,fQ,fR,fq,fS,fT) = {
758- let dm = toBase58String(value(bp))
759- let dn = toBase58String(value(bq))
760- let do = toBase58String(value(br))
761- let fU = bs
762- let fV = bt
763- let fW = bo
764- let dl = if ((fq == bB))
765- then fS
766- else fq
767- let fo = value(fR[0])
768- let dj = value(fo.assetId)
769- let dP = fo.amount
770- let eV = eO(e, e, e)
771- if ((eV == eV))
788+func fT (fU,fV,fW,fv,fX,fY) = {
789+ let dr = toBase58String(value(bw))
790+ let ds = toBase58String(value(bx))
791+ let dt = toBase58String(value(by))
792+ let fZ = bz
793+ let ga = bA
794+ let gb = bv
795+ let dq = if ((fv == bI))
796+ then fX
797+ else fv
798+ let ft = value(fW[0])
799+ let do = value(ft.assetId)
800+ let dU = ft.amount
801+ let fa = eT(e, e, e)
802+ if ((fa == fa))
772803 then {
773- let di = toBase58String(fT)
774- if ((dm != toBase58String(dj)))
804+ let dn = toBase58String(fY)
805+ if ((dr != toBase58String(do)))
775806 then throw("Wrong LP")
776807 else {
777- let dt = bR(dn)
778- let dv = bR(do)
779- let fX = {
780- let aW = invoke(this, "getOneTknV2READONLY", [fP, dP], nil)
781- if ($isInstanceOf(aW, "(Int, Int)"))
782- then aW
783- else throw(($getType(aW) + " couldn't be cast to (Int, Int)"))
808+ let dy = bY(ds)
809+ let dA = bY(dt)
810+ let gc = {
811+ let bd = invoke(this, "getOneTknV2READONLY", [fU, dU], nil)
812+ if ($isInstanceOf(bd, "(Int, Int)"))
813+ then bd
814+ else throw(($getType(bd) + " couldn't be cast to (Int, Int)"))
784815 }
785- if ((fX == fX))
816+ if ((gc == gc))
786817 then {
787- let cB = fX._2
788- let fY = fX._1
789- let fZ = if (if ((fQ > 0))
790- then (fQ > fY)
818+ let cI = gc._2
819+ let gd = gc._1
820+ let ge = if (if ((fV > 0))
821+ then (fV > gd)
791822 else false)
792- then aR(makeString(["amount to receive is less than ", toString(fQ)], ""))
793- else fY
794- let ga = if ((fP == dn))
795- then $Tuple4(fZ, 0, ((dt - fZ) - cB), dv)
796- else if ((fP == do))
797- then $Tuple4(0, fZ, dt, ((dv - fZ) - cB))
823+ then aZ(makeString(["amount to receive is less than ", toString(fV)], ""))
824+ else gd
825+ let gf = if ((fU == ds))
826+ then $Tuple4(ge, 0, ((dy - ge) - cI), dA)
827+ else if ((fU == dt))
828+ then $Tuple4(0, ge, dy, ((dA - ge) - cI))
798829 else throw("invalid out asset id")
799- let gb = ga._1
800- let gc = ga._2
801- let fG = ga._3
802- let fH = ga._4
803- let gd = bT(H(fH, fV), H(fG, fU))
804- let ge = L(gd, a)
805- let gf = if ((fP == "WAVES"))
830+ let gg = gf._1
831+ let gh = gf._2
832+ let fL = gf._3
833+ let fM = gf._4
834+ let gi = ca(H(fM, ga), H(fL, fZ))
835+ let gj = L(gi, a)
836+ let gk = if ((fU == "WAVES"))
806837 then unit
807- else fromBase58String(fP)
808- let gg = if ((cB > 0))
809- then [ScriptTransfer(bb, cB, gf)]
838+ else fromBase58String(fU)
839+ let gl = if ((cI > 0))
840+ then [ScriptTransfer(bi, cI, gk)]
810841 else nil
811- let dF = ([ScriptTransfer(dl, fZ, gf), StringEntry(ai(toString(dl), di), bN(gb, gc, dP, ge, height, lastBlock.timestamp)), IntegerEntry(ab(), ge), IntegerEntry(ac(height, lastBlock.timestamp), ge)] ++ gg)
812- if ((dF == dF))
842+ let dK = ([ScriptTransfer(dq, ge, gk), StringEntry(ai(toString(dq), dn), bU(gg, gh, dU, gj, height, lastBlock.timestamp)), IntegerEntry(ab(), gj), IntegerEntry(ac(height, lastBlock.timestamp), gj)] ++ gl)
843+ if ((dK == dK))
813844 then {
814- let gh = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)])
815- if ((gh == gh))
845+ let gm = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)])
846+ if ((gm == gm))
816847 then {
817- let gi = {
818- let gj = if ((this == bb))
848+ let gn = {
849+ let go = if ((this == bi))
819850 then 0
820- else cB
821- let gk = if ((bg(fP) == bq))
851+ else cI
852+ let gp = if ((bn(fU) == bx))
822853 then true
823854 else false
824- if (gk)
825- then $Tuple2(-((fY + gj)), 0)
826- else $Tuple2(0, -((fY + gj)))
855+ if (gp)
856+ then $Tuple2(-((gd + go)), 0)
857+ else $Tuple2(0, -((gd + go)))
827858 }
828- let eX = gi._1
829- let eY = gi._2
830- let gl = eW(eX, eY, 0)
831- let gm = gl._1
832- let eN = gl._2
833- let gn = fa(eV, eN)
834- if ((gn == gn))
835- then $Tuple2((dF ++ gm), fZ)
859+ let fc = gn._1
860+ let fd = gn._2
861+ let gq = fb(fc, fd, 0)
862+ let gr = gq._1
863+ let eS = gq._2
864+ let gs = ff(fa, eS)
865+ if ((gs == gs))
866+ then $Tuple2((dK ++ gr), ge)
836867 else throw("Strict value is not equal to itself.")
837868 }
838869 else throw("Strict value is not equal to itself.")
839870 }
840871 else throw("Strict value is not equal to itself.")
841872 }
842873 else throw("Strict value is not equal to itself.")
843874 }
844875 }
845876 else throw("Strict value is not equal to itself.")
846877 }
847878
848879
849-func go () = {
850- let gp = getString(Z())
851- if ($isInstanceOf(gp, "String"))
880+func gt () = {
881+ let gu = aR()
882+ let aP = getString(gu, Z())
883+ if ($isInstanceOf(aP, "String"))
852884 then {
853- let cG = gp
854- fromBase58String(cG)
885+ let aU = aP
886+ fromBase58String(aU)
855887 }
856- else if ($isInstanceOf(gp, "Unit"))
888+ else if ($isInstanceOf(aP, "Unit"))
857889 then unit
858890 else throw("Match error")
859891 }
860892
861893
862-func gq () = {
863- let gp = getString(aa())
864- if ($isInstanceOf(gp, "String"))
894+let gv = throw("Permission denied")
895+
896+func gw (cY) = {
897+ let aP = gt()
898+ if ($isInstanceOf(aP, "ByteVector"))
865899 then {
866- let cG = gp
867- fromBase58String(cG)
900+ let gx = aP
901+ (cY.callerPublicKey == gx)
868902 }
869- else if ($isInstanceOf(gp, "Unit"))
870- then unit
903+ else if ($isInstanceOf(aP, "Unit"))
904+ then (cY.caller == this)
871905 else throw("Match error")
872906 }
873907
874908
875-let gr = throw("Permission denied")
876-
877-func gs (cT) = {
878- let gp = go()
879- if ($isInstanceOf(gp, "ByteVector"))
909+func gy (cY) = {
910+ let aP = gt()
911+ if ($isInstanceOf(aP, "ByteVector"))
880912 then {
881- let gt = gp
882- (cT.callerPublicKey == gt)
913+ let gx = aP
914+ if ((cY.callerPublicKey == gx))
915+ then true
916+ else gv
883917 }
884- else if ($isInstanceOf(gp, "Unit"))
885- then (cT.caller == this)
918+ else if ($isInstanceOf(aP, "Unit"))
919+ then if ((cY.caller == this))
920+ then true
921+ else gv
886922 else throw("Match error")
887923 }
888924
889925
890-func gu (cT) = {
891- let gp = go()
892- if ($isInstanceOf(gp, "ByteVector"))
893- then {
894- let gt = gp
895- if ((cT.callerPublicKey == gt))
896- then true
897- else gr
898- }
899- else if ($isInstanceOf(gp, "Unit"))
900- then if ((cT.caller == this))
901- then true
902- else gr
903- else throw("Match error")
926+func gz (gA,eC,gB) = {
927+ let br = bj()
928+ let ds = br[w]
929+ let dt = br[x]
930+ let eD = g
931+ let eF = parseBigIntValue(l)
932+ let aQ = (parseBigIntValue(bf) * eF)
933+ let cK = if ((gA == false))
934+ then [(toBigInt(bY(ds)) + gB), toBigInt(bY(dt))]
935+ else [(toBigInt(bY(dt)) + gB), toBigInt(bY(ds))]
936+ let eE = cK[0]
937+ let aU = eE
938+ let cN = (aQ * eD)
939+ let eG = (((((eC * eC) / (eE * eD)) * eC) * eF) / (cN * eD))
940+ let eH = ((aU + ((eC * eF) / cN)) - eC)
941+ func cW (cX,eI) = {
942+ let gC = cX
943+ let eK = gC._1
944+ let dl = gC._2
945+ if ((dl != unit))
946+ then cX
947+ else {
948+ let eL = (((eK * eK) + eG) / ((g * eK) + eH))
949+ let eM = X((eL - value(eK)))
950+ if ((f >= eM))
951+ then $Tuple2(eL, eI)
952+ else $Tuple2(eL, unit)
953+ }
954+ }
955+
956+ let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
957+ let gD = {
958+ let de = dc
959+ let df = size(de)
960+ let dg = $Tuple2(eC, unit)
961+ func dh (di,dj) = if ((dj >= df))
962+ then di
963+ else cW(di, de[dj])
964+
965+ func dk (di,dj) = if ((dj >= df))
966+ then di
967+ else throw("List size exceeds 15")
968+
969+ dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
970+ }
971+ let eK = gD._1
972+ let dl = gD._2
973+ if ((dl != unit))
974+ then eK
975+ else throw(("Y calculation error, Y = " + toString(eK)))
904976 }
905977
906978
907-func gv (gw,ex,gx) = {
908- let bk = bc()
909- let dn = bk[w]
910- let do = bk[x]
911- let ey = g
912- let eA = parseBigIntValue(l)
913- let cH = (parseBigIntValue(aY) * eA)
914- let cD = if ((gw == false))
915- then [(toBigInt(bR(dn)) + gx), toBigInt(bR(do))]
916- else [(toBigInt(bR(do)) + gx), toBigInt(bR(dn))]
917- let ez = cD[0]
918- let cG = ez
919- let cI = (cH * ey)
920- let eB = (((((ex * ex) / (ez * ey)) * ex) * eA) / (cI * ey))
921- let eC = ((cG + ((ex * eA) / cI)) - ex)
922- func cR (cS,eD) = {
923- let gy = cS
924- let eF = gy._1
925- let dg = gy._2
926- if ((dg != unit))
927- then cS
928- else {
929- let eG = (((eF * eF) + eB) / ((g * eF) + eC))
930- let eH = X((eG - value(eF)))
931- if ((f >= eH))
932- then $Tuple2(eG, eD)
933- else $Tuple2(eG, unit)
934- }
935- }
936-
937- let cX = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
938- let gz = {
939- let cZ = cX
940- let da = size(cZ)
941- let db = $Tuple2(ex, unit)
942- func dc (dd,de) = if ((de >= da))
943- then dd
944- else cR(dd, cZ[de])
945-
946- func df (dd,de) = if ((de >= da))
947- then dd
948- else throw("List size exceeds 15")
949-
950- df(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(dc(db, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
951- }
952- let eF = gz._1
953- let dg = gz._2
954- if ((dg != unit))
955- then eF
956- else throw(("Y calculation error, Y = " + toString(eF)))
957- }
979+func gE () = valueOrElse(getBoolean(aT, aG(toString(this))), false)
958980
959981
960-func gA () = valueOrElse(getBoolean(aU, aG(toString(this))), false)
961-
962-
963-@Callable(cT)
964-func calculateAmountOutForSwapREADONLY (gB,gw,gC) = {
965- let gD = if ((gw == false))
982+@Callable(cY)
983+func calculateAmountOutForSwapREADONLY (gF,gA,gG) = {
984+ let gH = if ((gA == false))
966985 then {
967- let gE = aN(this, ak())
968- let gx = (toBigInt(bR(aN(this, aj()))) + toBigInt(gB))
969- $Tuple2(gE, gx)
986+ let gI = aV(this, ak())
987+ let gB = (toBigInt(bY(aV(this, aj()))) + toBigInt(gF))
988+ $Tuple2(gI, gB)
970989 }
971990 else {
972- let gE = aN(this, aj())
973- let gx = (toBigInt(bR(aN(this, ak()))) + toBigInt(gB))
974- $Tuple2(gE, gx)
991+ let gI = aV(this, aj())
992+ let gB = (toBigInt(bY(aV(this, ak()))) + toBigInt(gF))
993+ $Tuple2(gI, gB)
975994 }
976- let gE = gD._1
977- let gx = gD._2
978- let bk = bc()
979- let dn = bk[w]
980- let do = bk[x]
981- let cD = [toBigInt(bR(dn)), toBigInt(bR(do))]
982- let ex = cC(cD)
983- let eF = gv(gw, ex, toBigInt(gB))
984- let gF = ((toBigInt(bR(gE)) - eF) - toBigInt(1))
985- let gG = max([0, toInt(gF)])
986- let gH = if ((gw == false))
987- then [((toBigInt(bR(dn)) + toBigInt(gB)) + toBigInt(gC)), (toBigInt(bR(do)) - gF)]
988- else [(toBigInt(bR(dn)) - gF), ((toBigInt(bR(do)) + toBigInt(gB)) + toBigInt(gC))]
989- let gI = cC(gH)
990- let ec = if ((gI >= ex))
995+ let gI = gH._1
996+ let gB = gH._2
997+ let br = bj()
998+ let ds = br[w]
999+ let dt = br[x]
1000+ let cK = [toBigInt(bY(ds)), toBigInt(bY(dt))]
1001+ let eC = cJ(cK)
1002+ let eK = gz(gA, eC, toBigInt(gF))
1003+ let gJ = ((toBigInt(bY(gI)) - eK) - toBigInt(1))
1004+ let gK = max([0, toInt(gJ)])
1005+ let gL = if ((gA == false))
1006+ then [((toBigInt(bY(ds)) + toBigInt(gF)) + toBigInt(gG)), (toBigInt(bY(dt)) - gJ)]
1007+ else [(toBigInt(bY(ds)) - gJ), ((toBigInt(bY(dt)) + toBigInt(gF)) + toBigInt(gG))]
1008+ let gM = cJ(gL)
1009+ let eh = if ((gM >= eC))
9911010 then true
992- else throw(makeString(["new D is fewer error", toString(ex), toString(gI)], "__"))
993- if ((ec == ec))
994- then $Tuple2(nil, gG)
1011+ else throw(makeString(["new D is fewer error", toString(eC), toString(gM)], "__"))
1012+ if ((eh == eh))
1013+ then $Tuple2(nil, gK)
9951014 else throw("Strict value is not equal to itself.")
9961015 }
9971016
9981017
9991018
1000-@Callable(cT)
1001-func calculateAmountOutForSwapAndSendTokens (gB,gw,gJ,gK,gC) = {
1002- let gL = {
1003- let aW = invoke(aU, "getSwapContractREADONLY", nil, nil)
1004- if ($isInstanceOf(aW, "String"))
1005- then aW
1006- else throw(($getType(aW) + " couldn't be cast to String"))
1019+@Callable(cY)
1020+func calculateAmountOutForSwapAndSendTokens (gF,gA,gN,gO,gG) = {
1021+ let gP = {
1022+ let bd = invoke(aT, "getSwapContractREADONLY", nil, nil)
1023+ if ($isInstanceOf(bd, "String"))
1024+ then bd
1025+ else throw(($getType(bd) + " couldn't be cast to String"))
10071026 }
1008- let gM = [if ((value(cT.payments[0]).amount >= gB))
1027+ let gQ = [if ((value(cY.payments[0]).amount >= gF))
10091028 then true
1010- else aR("Wrong amount"), if ((cT.caller == addressFromStringValue(gL)))
1029+ else aZ("Wrong amount"), if ((cY.caller == addressFromStringValue(gP)))
10111030 then true
1012- else aR("Permission denied")]
1013- if ((gM == gM))
1031+ else aZ("Permission denied")]
1032+ if ((gQ == gQ))
10141033 then {
1015- let fo = value(cT.payments[0])
1016- let gN = bi(fo.assetId)
1017- let gO = if ((gw == false))
1034+ let ft = value(cY.payments[0])
1035+ let gR = bp(ft.assetId)
1036+ let gS = if ((gA == false))
10181037 then {
1019- let gE = aN(this, ak())
1020- let gx = (bR(gN) - value(cT.payments[0]).amount)
1021- $Tuple2(gE, gx)
1038+ let gI = aV(this, ak())
1039+ let gB = (bY(gR) - value(cY.payments[0]).amount)
1040+ $Tuple2(gI, gB)
10221041 }
10231042 else {
1024- let gE = aN(this, aj())
1025- let gx = (bR(gN) - value(cT.payments[0]).amount)
1026- $Tuple2(gE, gx)
1043+ let gI = aV(this, aj())
1044+ let gB = (bY(gR) - value(cY.payments[0]).amount)
1045+ $Tuple2(gI, gB)
10271046 }
1028- let gE = gO._1
1029- let gx = gO._2
1030- let bk = bc()
1031- let dn = bk[w]
1032- let do = bk[x]
1033- let cD = if ((gw == false))
1034- then [(toBigInt(bR(dn)) - toBigInt(value(cT.payments[0]).amount)), toBigInt(bR(do))]
1035- else [toBigInt(bR(dn)), (toBigInt(bR(do)) - toBigInt(value(cT.payments[0]).amount))]
1036- let ex = cC(cD)
1037- let eF = gv(gw, ex, toBigInt(0))
1038- let gF = ((toBigInt(bR(gE)) - eF) - toBigInt(1))
1039- let gG = max([0, toInt(gF)])
1040- let gP = if ((gG >= gJ))
1047+ let gI = gS._1
1048+ let gB = gS._2
1049+ let br = bj()
1050+ let ds = br[w]
1051+ let dt = br[x]
1052+ let cK = if ((gA == false))
1053+ then [(toBigInt(bY(ds)) - toBigInt(value(cY.payments[0]).amount)), toBigInt(bY(dt))]
1054+ else [toBigInt(bY(ds)), (toBigInt(bY(dt)) - toBigInt(value(cY.payments[0]).amount))]
1055+ let eC = cJ(cK)
1056+ let eK = gz(gA, eC, toBigInt(0))
1057+ let gJ = ((toBigInt(bY(gI)) - eK) - toBigInt(1))
1058+ let gK = max([0, toInt(gJ)])
1059+ let gT = if ((gK >= gN))
10411060 then true
10421061 else throw("Exchange result is fewer coins than expected")
1043- if ((gP == gP))
1062+ if ((gT == gT))
10441063 then {
1045- let gH = if ((gw == false))
1046- then [(toBigInt(bR(dn)) + toBigInt(gC)), (toBigInt(bR(do)) - gF)]
1047- else [(toBigInt(bR(dn)) - gF), (toBigInt(bR(do)) + toBigInt(gC))]
1048- let gI = cC(gH)
1049- let ec = if ((gI >= ex))
1064+ let gL = if ((gA == false))
1065+ then [(toBigInt(bY(ds)) + toBigInt(gG)), (toBigInt(bY(dt)) - gJ)]
1066+ else [(toBigInt(bY(ds)) - gJ), (toBigInt(bY(dt)) + toBigInt(gG))]
1067+ let gM = cJ(gL)
1068+ let eh = if ((gM >= eC))
10501069 then true
10511070 else throw("new D is fewer error")
1052- if ((ec == ec))
1053- then $Tuple2([ScriptTransfer(addressFromStringValue(gK), gG, bg(gE))], gG)
1071+ if ((eh == eh))
1072+ then $Tuple2([ScriptTransfer(addressFromStringValue(gO), gK, bn(gI))], gK)
10541073 else throw("Strict value is not equal to itself.")
10551074 }
10561075 else throw("Strict value is not equal to itself.")
10571076 }
10581077 else throw("Strict value is not equal to itself.")
10591078 }
10601079
10611080
10621081
1063-@Callable(cT)
1082+@Callable(cY)
10641083 func constructor (Y) = {
1065- let eB = gu(cT)
1066- if ((eB == eB))
1084+ let eG = gy(cY)
1085+ if ((eG == eG))
10671086 then [StringEntry(Y(), Y)]
10681087 else throw("Strict value is not equal to itself.")
10691088 }
10701089
10711090
10721091
1073-@Callable(cT)
1074-func setManager (gQ) = {
1075- let eB = gu(cT)
1076- if ((eB == eB))
1077- then {
1078- let gR = fromBase58String(gQ)
1079- if ((gR == gR))
1080- then [StringEntry(aa(), gQ)]
1081- else throw("Strict value is not equal to itself.")
1082- }
1083- else throw("Strict value is not equal to itself.")
1084- }
1085-
1086-
1087-
1088-@Callable(cT)
1089-func confirmManager () = {
1090- let cy = gq()
1091- let gS = if (isDefined(cy))
1092- then true
1093- else throw("No pending manager")
1094- if ((gS == gS))
1095- then {
1096- let gT = if ((cT.callerPublicKey == value(cy)))
1097- then true
1098- else throw("You are not pending manager")
1099- if ((gT == gT))
1100- then [StringEntry(Z(), toBase58String(value(cy))), DeleteEntry(aa())]
1101- else throw("Strict value is not equal to itself.")
1102- }
1103- else throw("Strict value is not equal to itself.")
1104- }
1105-
1106-
1107-
1108-@Callable(cT)
1092+@Callable(cY)
11091093 func put (gU,gV) = {
1110- let gW = bw()
1094+ let gW = bD()
11111095 let gX = valueOrErrorMessage(addressFromString(gW[C]), "Wr st addr")
11121096 let gY = valueOrErrorMessage(addressFromString(gW[E]), "Wr sl addr")
11131097 if ((0 > gU))
11141098 then throw("Wrong slippage")
1115- else if ((size(cT.payments) != 2))
1099+ else if ((size(cY.payments) != 2))
11161100 then throw("2 pmnts expd")
11171101 else {
1118- let gZ = toBigInt(value(cT.payments[0]).amount)
1119- let ha = toBigInt(value(cT.payments[1]).amount)
1120- let eS = (toBigInt(bR(bi(bq))) - gZ)
1121- if ((eS == eS))
1102+ let gZ = toBigInt(value(cY.payments[0]).amount)
1103+ let ha = toBigInt(value(cY.payments[1]).amount)
1104+ let eX = (toBigInt(bY(bp(bx))) - gZ)
1105+ if ((eX == eX))
11221106 then {
1123- let eT = (toBigInt(bR(bi(br))) - ha)
1124- if ((eT == eT))
1107+ let eY = (toBigInt(bY(bp(by))) - ha)
1108+ if ((eY == eY))
11251109 then {
1126- let eU = toBigInt(value(assetInfo(bp)).quantity)
1127- if ((eU == eU))
1110+ let eZ = toBigInt(value(assetInfo(bw)).quantity)
1111+ if ((eZ == eZ))
11281112 then {
1129- let eV = eO(gZ, ha, toBigInt(0))
1130- if ((eV == eV))
1113+ let fa = eT(gZ, ha, toBigInt(0))
1114+ if ((fa == fa))
11311115 then {
1132- let hb = fp(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], gU, true, false, true, 0, "")
1133- let ep = hb._2
1116+ let hb = fu(toString(cY.caller), toBase58String(cY.transactionId), AttachedPayment(value(cY.payments[0]).assetId, value(cY.payments[0]).amount), cY.payments[1], gU, true, false, true, 0, "")
1117+ let eu = hb._2
11341118 let hc = hb._7
1135- let dF = hb._9
1136- let eq = hb._10
1137- let er = hb._11
1138- let dn = hb._12
1139- let do = hb._13
1140- let eb = invoke(aU, "emit", [ep], nil)
1141- if ((eb == eb))
1119+ let dK = hb._9
1120+ let ev = hb._10
1121+ let ew = hb._11
1122+ let ds = hb._12
1123+ let dt = hb._13
1124+ let eg = invoke(aT, "emit", [eu], nil)
1125+ if ((eg == eg))
11421126 then {
11431127 let hd = {
1144- let gp = eb
1145- if ($isInstanceOf(gp, "Address"))
1128+ let aP = eg
1129+ if ($isInstanceOf(aP, "Address"))
11461130 then {
1147- let he = gp
1148- invoke(he, "emit", [ep], nil)
1131+ let he = aP
1132+ invoke(he, "emit", [eu], nil)
11491133 }
11501134 else unit
11511135 }
11521136 if ((hd == hd))
11531137 then {
1154- let hf = if ((eq > 0))
1155- then invoke(gY, "put", nil, [AttachedPayment(dn, eq)])
1138+ let hf = if ((ev > 0))
1139+ then invoke(gY, "put", nil, [AttachedPayment(ds, ev)])
11561140 else nil
11571141 if ((hf == hf))
11581142 then {
1159- let hg = if ((er > 0))
1160- then invoke(gY, "put", nil, [AttachedPayment(do, er)])
1143+ let hg = if ((ew > 0))
1144+ then invoke(gY, "put", nil, [AttachedPayment(dt, ew)])
11611145 else nil
11621146 if ((hg == hg))
11631147 then {
11641148 let hh = if (gV)
11651149 then {
1166- let hi = invoke(gX, "stake", nil, [AttachedPayment(hc, ep)])
1150+ let hi = invoke(gX, "stake", nil, [AttachedPayment(hc, eu)])
11671151 if ((hi == hi))
11681152 then nil
11691153 else throw("Strict value is not equal to itself.")
11701154 }
1171- else [ScriptTransfer(cT.caller, ep, hc)]
1172- let hj = eW(0, 0, 0)
1173- let gm = hj._1
1174- let eN = hj._2
1175- let hk = if ((eN >= eV))
1155+ else [ScriptTransfer(cY.caller, eu, hc)]
1156+ let hj = fb(0, 0, 0)
1157+ let gr = hj._1
1158+ let eS = hj._2
1159+ let hk = if ((eS >= fa))
11761160 then true
1177- else aR(makeString(["updated DLp lower than current DLp", toString(eS), toString(eT), toString(eU), toString(eV), toString(eN), toString(eq), toString(er)], " "))
1161+ else aZ(makeString(["updated DLp lower than current DLp", toString(eX), toString(eY), toString(eZ), toString(fa), toString(eS), toString(ev), toString(ew)], " "))
11781162 if ((hk == hk))
11791163 then {
1180- let hl = value(assetInfo(bp)).quantity
1164+ let hl = value(assetInfo(bw)).quantity
11811165 if ((hl == hl))
1182- then ((dF ++ hh) ++ gm)
1166+ then ((dK ++ hh) ++ gr)
11831167 else throw("Strict value is not equal to itself.")
11841168 }
11851169 else throw("Strict value is not equal to itself.")
11861170 }
11871171 else throw("Strict value is not equal to itself.")
11881172 }
11891173 else throw("Strict value is not equal to itself.")
11901174 }
11911175 else throw("Strict value is not equal to itself.")
11921176 }
11931177 else throw("Strict value is not equal to itself.")
11941178 }
11951179 else throw("Strict value is not equal to itself.")
11961180 }
11971181 else throw("Strict value is not equal to itself.")
11981182 }
11991183 else throw("Strict value is not equal to itself.")
12001184 }
12011185 else throw("Strict value is not equal to itself.")
12021186 }
12031187 }
12041188
12051189
12061190
1207-@Callable(cT)
1208-func putOneTknV2 (fQ,gV) = {
1191+@Callable(cY)
1192+func putOneTknV2 (fV,gV) = {
12091193 let hm = {
1210- let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1211- if ($isInstanceOf(aW, "Boolean"))
1212- then aW
1213- else throw(($getType(aW) + " couldn't be cast to Boolean"))
1194+ let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1195+ if ($isInstanceOf(bd, "Boolean"))
1196+ then bd
1197+ else throw(($getType(bd) + " couldn't be cast to Boolean"))
12141198 }
1215- let hn = if (if (if (aZ())
1199+ let hn = if (if (if (bg())
12161200 then true
1217- else (bo == q))
1201+ else (bv == q))
12181202 then true
1219- else (bo == s))
1203+ else (bv == s))
12201204 then true
12211205 else hm
1222- let gM = [if (if (!(hn))
1206+ let gQ = [if (if (!(hn))
12231207 then true
1224- else gs(cT))
1208+ else gw(cY))
12251209 then true
1226- else aR("put operation is blocked by admin"), if ((size(cT.payments) == 1))
1210+ else aZ("put operation is blocked by admin"), if ((size(cY.payments) == 1))
12271211 then true
1228- else aR("exactly 1 payment are expected")]
1229- if ((gM == gM))
1212+ else aZ("exactly 1 payment are expected")]
1213+ if ((gQ == gQ))
12301214 then {
1231- let dn = toBase58String(value(bq))
1232- let do = toBase58String(value(br))
1233- let dm = bp
1234- let fU = bs
1235- let fV = bt
1236- let dl = if ((cT.caller == this))
1237- then cT.originCaller
1238- else cT.caller
1239- let fo = value(cT.payments[0])
1240- let dj = toBase58String(value(fo.assetId))
1241- let dP = fo.amount
1242- let eV = if ((fo.assetId == bq))
1243- then eO(toBigInt(dP), toBigInt(0), toBigInt(0))
1244- else eO(toBigInt(0), toBigInt(dP), toBigInt(0))
1245- if ((eV == eV))
1215+ let ds = toBase58String(value(bx))
1216+ let dt = toBase58String(value(by))
1217+ let dr = bw
1218+ let fZ = bz
1219+ let ga = bA
1220+ let dq = if ((cY.caller == this))
1221+ then cY.originCaller
1222+ else cY.caller
1223+ let ft = value(cY.payments[0])
1224+ let do = toBase58String(value(ft.assetId))
1225+ let dU = ft.amount
1226+ let fa = if ((ft.assetId == bx))
1227+ then eT(toBigInt(dU), toBigInt(0), toBigInt(0))
1228+ else eT(toBigInt(0), toBigInt(dU), toBigInt(0))
1229+ if ((fa == fa))
12461230 then {
1247- let ho = ft(dP, dj, toString(dl), toBase58String(cT.transactionId), true)
1231+ let ho = fy(dU, do, toString(dq), toBase58String(cY.transactionId), true)
12481232 if ((ho == ho))
12491233 then {
1250- let cB = ho._3
1251- let dF = ho._2
1234+ let cI = ho._3
1235+ let dK = ho._2
12521236 let hp = ho._1
1253- let ep = if (if ((fQ > 0))
1254- then (fQ > hp)
1237+ let eu = if (if ((fV > 0))
1238+ then (fV > hp)
12551239 else false)
1256- then aR(makeString(["amount to receive is less than ", toString(fQ)], ""))
1240+ then aZ(makeString(["amount to receive is less than ", toString(fV)], ""))
12571241 else hp
1258- let hb = invoke(aU, "emit", [ep], nil)
1242+ let hb = invoke(aT, "emit", [eu], nil)
12591243 if ((hb == hb))
12601244 then {
12611245 let hd = {
1262- let gp = hb
1263- if ($isInstanceOf(gp, "Address"))
1246+ let aP = hb
1247+ if ($isInstanceOf(aP, "Address"))
12641248 then {
1265- let he = gp
1266- invoke(he, "emit", [ep], nil)
1249+ let he = aP
1250+ invoke(he, "emit", [eu], nil)
12671251 }
12681252 else unit
12691253 }
12701254 if ((hd == hd))
12711255 then {
12721256 let hh = if (gV)
12731257 then {
1274- let hi = invoke(by, "stakeFor", [toString(cT.caller)], [AttachedPayment(dm, ep)])
1258+ let hi = invoke(bF, "stakeFor", [toString(cY.caller)], [AttachedPayment(dr, eu)])
12751259 if ((hi == hi))
12761260 then nil
12771261 else throw("Strict value is not equal to itself.")
12781262 }
1279- else [ScriptTransfer(cT.caller, ep, dm)]
1280- let gg = if ((cB > 0))
1281- then [ScriptTransfer(bb, cB, fromBase58String(dj))]
1263+ else [ScriptTransfer(cY.caller, eu, dr)]
1264+ let gl = if ((cI > 0))
1265+ then [ScriptTransfer(bi, cI, fromBase58String(do))]
12821266 else nil
1283- let hq = if ((this == bb))
1267+ let hq = if ((this == bi))
12841268 then $Tuple2(0, 0)
12851269 else {
1286- let hr = if ((fo.assetId == bq))
1270+ let hr = if ((ft.assetId == bx))
12871271 then true
12881272 else false
12891273 if (hr)
1290- then $Tuple2(-(cB), 0)
1291- else $Tuple2(0, -(cB))
1274+ then $Tuple2(-(cI), 0)
1275+ else $Tuple2(0, -(cI))
12921276 }
1293- let eX = hq._1
1294- let eY = hq._2
1295- let hs = eW(eX, eY, 0)
1296- let gm = hs._1
1297- let eN = hs._2
1298- let gn = fa(eV, eN)
1299- if ((gn == gn))
1300- then $Tuple2((((dF ++ hh) ++ gg) ++ gm), ep)
1277+ let fc = hq._1
1278+ let fd = hq._2
1279+ let hs = fb(fc, fd, 0)
1280+ let gr = hs._1
1281+ let eS = hs._2
1282+ let gs = ff(fa, eS)
1283+ if ((gs == gs))
1284+ then $Tuple2((((dK ++ hh) ++ gl) ++ gr), eu)
13011285 else throw("Strict value is not equal to itself.")
13021286 }
13031287 else throw("Strict value is not equal to itself.")
13041288 }
13051289 else throw("Strict value is not equal to itself.")
13061290 }
13071291 else throw("Strict value is not equal to itself.")
13081292 }
13091293 else throw("Strict value is not equal to itself.")
13101294 }
13111295 else throw("Strict value is not equal to itself.")
13121296 }
13131297
13141298
13151299
1316-@Callable(cT)
1300+@Callable(cY)
13171301 func putForFree (ht) = if ((0 > ht))
13181302 then throw("Wrong slpg")
1319- else if ((size(cT.payments) != 2))
1303+ else if ((size(cY.payments) != 2))
13201304 then throw("2 pmnts expd")
13211305 else {
1322- let hu = fp(toString(cT.caller), toBase58String(cT.transactionId), AttachedPayment(value(cT.payments[0]).assetId, value(cT.payments[0]).amount), cT.payments[1], ht, false, false, true, 0, "")
1323- let dF = hu._9
1324- let gZ = toBigInt(value(cT.payments[0]).amount)
1325- let ha = toBigInt(value(cT.payments[1]).amount)
1326- let eV = eO(gZ, ha, toBigInt(0))
1327- if ((eV == eV))
1306+ let hu = fu(toString(cY.caller), toBase58String(cY.transactionId), AttachedPayment(value(cY.payments[0]).assetId, value(cY.payments[0]).amount), cY.payments[1], ht, false, false, true, 0, "")
1307+ let dK = hu._9
1308+ let gZ = toBigInt(value(cY.payments[0]).amount)
1309+ let ha = toBigInt(value(cY.payments[1]).amount)
1310+ let fa = eT(gZ, ha, toBigInt(0))
1311+ if ((fa == fa))
13281312 then {
1329- let hv = eW(0, 0, 0)
1330- let gm = hv._1
1331- let eN = hv._2
1332- let gn = fa(eV, eN)
1333- if ((gn == gn))
1334- then (dF ++ gm)
1313+ let hv = fb(0, 0, 0)
1314+ let gr = hv._1
1315+ let eS = hv._2
1316+ let gs = ff(fa, eS)
1317+ if ((gs == gs))
1318+ then (dK ++ gr)
13351319 else throw("Strict value is not equal to itself.")
13361320 }
13371321 else throw("Strict value is not equal to itself.")
13381322 }
13391323
13401324
13411325
1342-@Callable(cT)
1326+@Callable(cY)
13431327 func get () = {
1344- let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0))
1345- if ((eV == eV))
1328+ let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0))
1329+ if ((fa == fa))
13461330 then {
1347- let eb = fn(cT)
1348- let hw = eb._1
1349- let dE = eb._2
1350- let dP = eb._3
1351- let dj = eb._4
1352- let dF = eb._5
1353- let eC = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)])
1354- if ((eC == eC))
1331+ let eg = fs(cY)
1332+ let hw = eg._1
1333+ let dJ = eg._2
1334+ let dU = eg._3
1335+ let do = eg._4
1336+ let dK = eg._5
1337+ let eH = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)])
1338+ if ((eH == eH))
13551339 then {
1356- let hx = eW(-(hw), -(dE), 0)
1357- let gm = hx._1
1358- let eN = hx._2
1359- let gn = fa(eV, eN)
1360- if ((gn == gn))
1361- then (dF ++ gm)
1340+ let hx = fb(-(hw), -(dJ), 0)
1341+ let gr = hx._1
1342+ let eS = hx._2
1343+ let gs = ff(fa, eS)
1344+ if ((gs == gs))
1345+ then (dK ++ gr)
13621346 else throw("Strict value is not equal to itself.")
13631347 }
13641348 else throw("Strict value is not equal to itself.")
13651349 }
13661350 else throw("Strict value is not equal to itself.")
13671351 }
13681352
13691353
13701354
1371-@Callable(cT)
1372-func getOneTknV2 (fP,fQ) = {
1355+@Callable(cY)
1356+func getOneTknV2 (fU,fV) = {
13731357 let hm = {
1374- let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1375- if ($isInstanceOf(aW, "Boolean"))
1376- then aW
1377- else throw(($getType(aW) + " couldn't be cast to Boolean"))
1358+ let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1359+ if ($isInstanceOf(bd, "Boolean"))
1360+ then bd
1361+ else throw(($getType(bd) + " couldn't be cast to Boolean"))
13781362 }
1379- let hy = if (if (aZ())
1363+ let hy = if (if (bg())
13801364 then true
1381- else (bo == s))
1365+ else (bv == s))
13821366 then true
13831367 else hm
1384- let gM = [if (if (!(hy))
1368+ let gQ = [if (if (!(hy))
13851369 then true
1386- else gs(cT))
1370+ else gw(cY))
13871371 then true
1388- else aR("get operation is blocked by admin"), if ((size(cT.payments) == 1))
1372+ else aZ("get operation is blocked by admin"), if ((size(cY.payments) == 1))
13891373 then true
1390- else aR("exactly 1 payment are expected")]
1391- if ((gM == gM))
1374+ else aZ("exactly 1 payment are expected")]
1375+ if ((gQ == gQ))
13921376 then {
1393- let hz = fO(fP, fQ, cT.payments, cT.caller, cT.originCaller, cT.transactionId)
1394- let dF = hz._1
1395- let fZ = hz._2
1396- $Tuple2(dF, fZ)
1377+ let hz = fT(fU, fV, cY.payments, cY.caller, cY.originCaller, cY.transactionId)
1378+ let dK = hz._1
1379+ let ge = hz._2
1380+ $Tuple2(dK, ge)
13971381 }
13981382 else throw("Strict value is not equal to itself.")
13991383 }
14001384
14011385
14021386
1403-@Callable(cT)
1387+@Callable(cY)
14041388 func refreshDLp () = {
14051389 let hA = valueOrElse(getInteger(as), 0)
14061390 let hB = if (((height - hA) >= av))
14071391 then unit
1408- else aR(makeString([toString(av), " blocks have not passed since the previous call"], ""))
1392+ else aZ(makeString([toString(av), " blocks have not passed since the previous call"], ""))
14091393 if ((hB == hB))
14101394 then {
1411- let fh = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ar), "0")), aT("invalid dLp"))
1412- let hC = eW(0, 0, 0)
1395+ let fm = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ar), "0")), bb("invalid dLp"))
1396+ let hC = fb(0, 0, 0)
14131397 let hD = hC._1
1414- let eN = hC._2
1415- let eZ = if ((fh != eN))
1398+ let eS = hC._2
1399+ let fe = if ((fm != eS))
14161400 then hD
1417- else aR("nothing to refresh")
1418- $Tuple2(eZ, toString(eN))
1401+ else aZ("nothing to refresh")
1402+ $Tuple2(fe, toString(eS))
14191403 }
14201404 else throw("Strict value is not equal to itself.")
14211405 }
14221406
14231407
14241408
1425-@Callable(cT)
1426-func getOneTknV2READONLY (fP,hE) = {
1427- let dn = toBase58String(value(bq))
1428- let do = toBase58String(value(br))
1429- let dm = toBase58String(value(bp))
1430- let cD = [toBigInt(bR(dn)), toBigInt(bR(do))]
1431- let eM = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dm)), "invalid lp asset").quantity)
1432- let cf = cC(cD)
1433- let ce = (cf - fraction(toBigInt(hE), cf, eM))
1434- let hF = if ((fP == dn))
1409+@Callable(cY)
1410+func getOneTknV2READONLY (fU,hE) = {
1411+ let ds = toBase58String(value(bx))
1412+ let dt = toBase58String(value(by))
1413+ let dr = toBase58String(value(bw))
1414+ let cK = [toBigInt(bY(ds)), toBigInt(bY(dt))]
1415+ let eR = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dr)), "invalid lp asset").quantity)
1416+ let cm = cJ(cK)
1417+ let cl = (cm - fraction(toBigInt(hE), cm, eR))
1418+ let hF = if ((fU == ds))
14351419 then 0
1436- else if ((fP == do))
1420+ else if ((fU == dt))
14371421 then 1
14381422 else throw("invalid out asset id")
1439- let hG = ew(cD, hF, ce)
1440- let gF = (cD[hF] - hG)
1441- let gG = max([0, toInt((gF - f))])
1442- let hH = cz(gG, aX)
1443- let fY = hH._1
1444- let cB = hH._2
1445- $Tuple2(nil, $Tuple2(fY, cB))
1423+ let hG = eB(cK, hF, cl)
1424+ let gJ = (cK[hF] - hG)
1425+ let gK = max([0, toInt((gJ - f))])
1426+ let hH = cG(gK, be)
1427+ let gd = hH._1
1428+ let cI = hH._2
1429+ $Tuple2(nil, $Tuple2(gd, cI))
14461430 }
14471431
14481432
14491433
1450-@Callable(cT)
1451-func getOneTknV2WithBonusREADONLY (fP,hE) = {
1452- let dn = toBase58String(value(bq))
1453- let do = toBase58String(value(br))
1454- let dm = toBase58String(value(bp))
1455- let dt = bR(dn)
1456- let dv = bR(do)
1434+@Callable(cY)
1435+func getOneTknV2WithBonusREADONLY (fU,hE) = {
1436+ let ds = toBase58String(value(bx))
1437+ let dt = toBase58String(value(by))
1438+ let dr = toBase58String(value(bw))
1439+ let dy = bY(ds)
1440+ let dA = bY(dt)
14571441 let hI = {
1458- let aW = invoke(this, "getOneTknV2READONLY", [fP, hE], nil)
1459- if ($isInstanceOf(aW, "(Int, Int)"))
1460- then aW
1461- else throw(($getType(aW) + " couldn't be cast to (Int, Int)"))
1442+ let bd = invoke(this, "getOneTknV2READONLY", [fU, hE], nil)
1443+ if ($isInstanceOf(bd, "(Int, Int)"))
1444+ then bd
1445+ else throw(($getType(bd) + " couldn't be cast to (Int, Int)"))
14621446 }
1463- let fY = hI._1
1464- let cB = hI._2
1465- let eb = dh("", dm, hE, this)
1466- let dD = eb._1
1467- let dE = eb._2
1468- let hJ = (dD + dE)
1469- let fN = if ((hJ == 0))
1470- then if ((fY == 0))
1447+ let gd = hI._1
1448+ let cI = hI._2
1449+ let eg = dm("", dr, hE, this)
1450+ let dI = eg._1
1451+ let dJ = eg._2
1452+ let hJ = (dI + dJ)
1453+ let fS = if ((hJ == 0))
1454+ then if ((gd == 0))
14711455 then 0
14721456 else throw("bonus calculation error")
1473- else fraction((fY - hJ), a, hJ)
1474- $Tuple2(nil, $Tuple3(fY, cB, fN))
1457+ else fraction((gd - hJ), a, hJ)
1458+ $Tuple2(nil, $Tuple3(gd, cI, fS))
14751459 }
14761460
14771461
14781462
1479-@Callable(cT)
1463+@Callable(cY)
14801464 func getNoLess (hK,hL) = {
1481- let eb = fn(cT)
1482- let dD = eb._1
1483- let dE = eb._2
1484- let dP = eb._3
1485- let dj = eb._4
1486- let dF = eb._5
1487- if ((hK > dD))
1488- then throw(((("Failed: " + toString(dD)) + " < ") + toString(hK)))
1489- else if ((hL > dE))
1490- then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL)))
1465+ let eg = fs(cY)
1466+ let dI = eg._1
1467+ let dJ = eg._2
1468+ let dU = eg._3
1469+ let do = eg._4
1470+ let dK = eg._5
1471+ if ((hK > dI))
1472+ then throw(((("Failed: " + toString(dI)) + " < ") + toString(hK)))
1473+ else if ((hL > dJ))
1474+ then throw(((("Failed: " + toString(dJ)) + " < ") + toString(hL)))
14911475 else {
1492- let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0))
1493- if ((eV == eV))
1476+ let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0))
1477+ if ((fa == fa))
14941478 then {
1495- let hM = invoke(aU, "burn", [dP], [AttachedPayment(dj, dP)])
1479+ let hM = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)])
14961480 if ((hM == hM))
14971481 then {
1498- let hN = eW(-(dD), -(dE), 0)
1499- let gm = hN._1
1500- let eN = hN._2
1501- let gn = fa(eV, eN)
1502- if ((gn == gn))
1503- then (dF ++ gm)
1482+ let hN = fb(-(dI), -(dJ), 0)
1483+ let gr = hN._1
1484+ let eS = hN._2
1485+ let gs = ff(fa, eS)
1486+ if ((gs == gs))
1487+ then (dK ++ gr)
15041488 else throw("Strict value is not equal to itself.")
15051489 }
15061490 else throw("Strict value is not equal to itself.")
15071491 }
15081492 else throw("Strict value is not equal to itself.")
15091493 }
15101494 }
15111495
15121496
15131497
1514-@Callable(cT)
1515-func unstakeAndGet (cA) = {
1516- let hO = if ((size(cT.payments) != 0))
1498+@Callable(cY)
1499+func unstakeAndGet (cH) = {
1500+ let hO = if ((size(cY.payments) != 0))
15171501 then throw("No pmnts expd")
15181502 else true
15191503 if ((hO == hO))
15201504 then {
1521- let hP = bw()
1522- let hc = bp
1505+ let hP = bD()
1506+ let hc = bw
15231507 let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr")
1524- let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0))
1525- if ((eV == eV))
1508+ let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0))
1509+ if ((fa == fa))
15261510 then {
1527- let hR = invoke(hQ, "unstake", [toBase58String(hc), cA], nil)
1511+ let hR = invoke(hQ, "unstake", [toBase58String(hc), cH], nil)
15281512 if ((hR == hR))
15291513 then {
1530- let eb = dh(toBase58String(cT.transactionId), toBase58String(hc), cA, cT.caller)
1531- let dD = eb._1
1532- let dE = eb._2
1533- let dr = parseIntValue(eb._9)
1534- let dF = eb._10
1535- let hS = if (if (aZ())
1514+ let eg = dm(toBase58String(cY.transactionId), toBase58String(hc), cH, cY.caller)
1515+ let dI = eg._1
1516+ let dJ = eg._2
1517+ let dw = parseIntValue(eg._9)
1518+ let dK = eg._10
1519+ let hS = if (if (bg())
15361520 then true
1537- else (dr == s))
1538- then throw(("Blocked: " + toString(dr)))
1521+ else (dw == s))
1522+ then throw(("Blocked: " + toString(dw)))
15391523 else true
15401524 if ((hS == hS))
15411525 then {
1542- let hT = invoke(aU, "burn", [cA], [AttachedPayment(hc, cA)])
1526+ let hT = invoke(aT, "burn", [cH], [AttachedPayment(hc, cH)])
15431527 if ((hT == hT))
15441528 then {
1545- let hU = eW(-(dD), -(dE), 0)
1546- let gm = hU._1
1547- let eN = hU._2
1548- let gn = fa(eV, eN)
1549- if ((gn == gn))
1550- then (dF ++ gm)
1529+ let hU = fb(-(dI), -(dJ), 0)
1530+ let gr = hU._1
1531+ let eS = hU._2
1532+ let gs = ff(fa, eS)
1533+ if ((gs == gs))
1534+ then (dK ++ gr)
15511535 else throw("Strict value is not equal to itself.")
15521536 }
15531537 else throw("Strict value is not equal to itself.")
15541538 }
15551539 else throw("Strict value is not equal to itself.")
15561540 }
15571541 else throw("Strict value is not equal to itself.")
15581542 }
15591543 else throw("Strict value is not equal to itself.")
15601544 }
15611545 else throw("Strict value is not equal to itself.")
15621546 }
15631547
15641548
15651549
1566-@Callable(cT)
1550+@Callable(cY)
15671551 func unstakeAndGetNoLess (hV,hW,hL) = {
1568- let hy = if (aZ())
1552+ let hy = if (bg())
15691553 then true
1570- else (bo == s)
1571- let gM = [if (!(hy))
1554+ else (bv == s)
1555+ let gQ = [if (!(hy))
15721556 then true
1573- else throw("get operation is blocked by admin"), if ((size(cT.payments) == 0))
1557+ else throw("get operation is blocked by admin"), if ((size(cY.payments) == 0))
15741558 then true
15751559 else throw("no payments are expected")]
1576- if ((gM == gM))
1560+ if ((gQ == gQ))
15771561 then {
1578- let eV = eO(toBigInt(0), toBigInt(0), toBigInt(0))
1579- if ((eV == eV))
1562+ let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0))
1563+ if ((fa == fa))
15801564 then {
1581- let hR = invoke(by, "unstake", [toBase58String(bp), hV], nil)
1565+ let hR = invoke(bF, "unstake", [toBase58String(bw), hV], nil)
15821566 if ((hR == hR))
15831567 then {
1584- let hX = dh(toBase58String(cT.transactionId), toBase58String(bp), hV, cT.caller)
1585- let dD = hX._1
1586- let dE = hX._2
1587- let dF = hX._10
1588- let hY = [if ((dD >= hW))
1568+ let hX = dm(toBase58String(cY.transactionId), toBase58String(bw), hV, cY.caller)
1569+ let dI = hX._1
1570+ let dJ = hX._2
1571+ let dK = hX._10
1572+ let hY = [if ((dI >= hW))
15891573 then true
1590- else throw(makeString(["amount asset amount to receive is less than ", toString(hW)], "")), if ((dE >= hL))
1574+ else throw(makeString(["amount asset amount to receive is less than ", toString(hW)], "")), if ((dJ >= hL))
15911575 then true
15921576 else throw(makeString(["price asset amount to receive is less than ", toString(hL)], ""))]
15931577 if ((hY == hY))
15941578 then {
1595- let hM = invoke(aU, "burn", [hV], [AttachedPayment(bp, hV)])
1579+ let hM = invoke(aT, "burn", [hV], [AttachedPayment(bw, hV)])
15961580 if ((hM == hM))
15971581 then {
1598- let hZ = eW(-(dD), -(dE), 0)
1599- let gm = hZ._1
1600- let eN = hZ._2
1601- let gn = fa(eV, eN)
1602- if ((gn == gn))
1603- then (dF ++ gm)
1582+ let hZ = fb(-(dI), -(dJ), 0)
1583+ let gr = hZ._1
1584+ let eS = hZ._2
1585+ let gs = ff(fa, eS)
1586+ if ((gs == gs))
1587+ then (dK ++ gr)
16041588 else throw("Strict value is not equal to itself.")
16051589 }
16061590 else throw("Strict value is not equal to itself.")
16071591 }
16081592 else throw("Strict value is not equal to itself.")
16091593 }
16101594 else throw("Strict value is not equal to itself.")
16111595 }
16121596 else throw("Strict value is not equal to itself.")
16131597 }
16141598 else throw("Strict value is not equal to itself.")
16151599 }
16161600
16171601
16181602
1619-@Callable(cT)
1620-func unstakeAndGetOneTknV2 (hV,fP,fQ) = {
1603+@Callable(cY)
1604+func unstakeAndGetOneTknV2 (hV,fU,fV) = {
16211605 let hm = {
1622- let aW = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1623- if ($isInstanceOf(aW, "Boolean"))
1624- then aW
1625- else throw(($getType(aW) + " couldn't be cast to Boolean"))
1606+ let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1607+ if ($isInstanceOf(bd, "Boolean"))
1608+ then bd
1609+ else throw(($getType(bd) + " couldn't be cast to Boolean"))
16261610 }
1627- let hy = if (if (aZ())
1611+ let hy = if (if (bg())
16281612 then true
1629- else (bo == s))
1613+ else (bv == s))
16301614 then true
16311615 else hm
1632- let gM = [if (if (!(hy))
1616+ let gQ = [if (if (!(hy))
16331617 then true
1634- else gs(cT))
1618+ else gw(cY))
16351619 then true
1636- else aR("get operation is blocked by admin"), if ((size(cT.payments) == 0))
1620+ else aZ("get operation is blocked by admin"), if ((size(cY.payments) == 0))
16371621 then true
1638- else aR("no payments are expected")]
1639- if ((gM == gM))
1622+ else aZ("no payments are expected")]
1623+ if ((gQ == gQ))
16401624 then {
1641- let hP = bw()
1642- let hc = bp
1625+ let hP = bD()
1626+ let hc = bw
16431627 let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr")
1644- let dl = cT.caller
1628+ let dq = cY.caller
16451629 let ia = this
1646- let hR = invoke(hQ, "unstakeINTERNAL", [hc, hV, dl.bytes, ia.bytes], nil)
1630+ let hR = invoke(hQ, "unstakeINTERNAL", [hc, hV, dq.bytes, ia.bytes], nil)
16471631 if ((hR == hR))
16481632 then {
1649- let ib = fO(fP, fQ, [AttachedPayment(hc, hV)], cT.caller, cT.originCaller, cT.transactionId)
1650- let dF = ib._1
1651- let fZ = ib._2
1652- $Tuple2(dF, fZ)
1633+ let ib = fT(fU, fV, [AttachedPayment(hc, hV)], cY.caller, cY.originCaller, cY.transactionId)
1634+ let dK = ib._1
1635+ let ge = ib._2
1636+ $Tuple2(dK, ge)
16531637 }
16541638 else throw("Strict value is not equal to itself.")
16551639 }
16561640 else throw("Strict value is not equal to itself.")
16571641 }
16581642
16591643
16601644
1661-@Callable(cT)
1645+@Callable(cY)
16621646 func putOneTknV2WithBonusREADONLY (ic,id) = {
1663- let ie = ft(ic, id, "", "", true)
1664- let fI = ie._1
1665- let dF = ie._2
1666- let cB = ie._3
1667- let fN = ie._4
1668- $Tuple2(nil, $Tuple3(fI, cB, fN))
1647+ let ie = fy(ic, id, "", "", true)
1648+ let fN = ie._1
1649+ let dK = ie._2
1650+ let cI = ie._3
1651+ let fS = ie._4
1652+ $Tuple2(nil, $Tuple3(fN, cI, fS))
16691653 }
16701654
16711655
16721656
1673-@Callable(cT)
1657+@Callable(cY)
16741658 func putOneTknV2WithoutTakeFeeREADONLY (ic,id) = {
1675- let if = ft(ic, id, "", "", false)
1676- let fI = if._1
1677- let dF = if._2
1678- let cB = if._3
1679- let fN = if._4
1680- $Tuple2(nil, $Tuple3(fI, cB, fN))
1659+ let if = fy(ic, id, "", "", false)
1660+ let fN = if._1
1661+ let dK = if._2
1662+ let cI = if._3
1663+ let fS = if._4
1664+ $Tuple2(nil, $Tuple3(fN, cI, fS))
16811665 }
16821666
16831667
16841668
1685-@Callable(cT)
1686-func activate (ig,ih) = if ((toString(cT.caller) != toString(aU)))
1669+@Callable(cY)
1670+func activate (ig,ih) = if ((toString(cY.caller) != toString(aT)))
16871671 then throw("denied")
16881672 else $Tuple2([StringEntry(aj(), ig), StringEntry(ak(), ih)], "success")
16891673
16901674
16911675
1692-@Callable(cT)
1693-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bc())
1676+@Callable(cY)
1677+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bj())
16941678
16951679
16961680
1697-@Callable(cT)
1698-func getAccBalanceWrapperREADONLY (bS) = $Tuple2(nil, bR(bS))
1681+@Callable(cY)
1682+func getAccBalanceWrapperREADONLY (bZ) = $Tuple2(nil, bY(bZ))
16991683
17001684
17011685
1702-@Callable(cT)
1703-func calcPricesWrapperREADONLY (cl,cm,cq) = {
1704- let ii = cp(cl, cm, cq)
1686+@Callable(cY)
1687+func calcPricesWrapperREADONLY (cs,ct,cx) = {
1688+ let ii = cw(cs, ct, cx)
17051689 $Tuple2(nil, [toString(ii[0]), toString(ii[1]), toString(ii[2])])
17061690 }
17071691
17081692
17091693
1710-@Callable(cT)
1694+@Callable(cY)
17111695 func fromX18WrapperREADONLY (M,ij) = $Tuple2(nil, L(parseBigIntValue(M), ij))
17121696
17131697
17141698
1715-@Callable(cT)
1699+@Callable(cY)
17161700 func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
17171701
17181702
17191703
1720-@Callable(cT)
1721-func calcPriceBigIntWrapperREADONLY (bU,bV) = $Tuple2(nil, toString(bT(parseBigIntValue(bU), parseBigIntValue(bV))))
1704+@Callable(cY)
1705+func calcPriceBigIntWrapperREADONLY (cb,cc) = $Tuple2(nil, toString(ca(parseBigIntValue(cb), parseBigIntValue(cc))))
17221706
17231707
17241708
1725-@Callable(cT)
1726-func estimatePutOperationWrapperREADONLY (di,ca,dH,dI,dJ,dK,ik,dL,dM) = $Tuple2(nil, dG(di, ca, dH, dI, dJ, dK, ik, dL, dM, true, false, 0, ""))
1709+@Callable(cY)
1710+func estimatePutOperationWrapperREADONLY (dn,ch,dM,dN,dO,dP,ik,dQ,dR) = $Tuple2(nil, dL(dn, ch, dM, dN, dO, dP, ik, dQ, dR, true, false, 0, ""))
17271711
17281712
17291713
1730-@Callable(cT)
1731-func estimateGetOperationWrapperREADONLY (di,il,dk,ik) = {
1732- let eb = dh(di, il, dk, addressFromStringValue(ik))
1733- $Tuple2(nil, $Tuple10(eb._1, eb._2, eb._3, eb._4, eb._5, eb._6, eb._7, toString(eb._8), eb._9, eb._10))
1714+@Callable(cY)
1715+func estimateGetOperationWrapperREADONLY (dn,il,dp,ik) = {
1716+ let eg = dm(dn, il, dp, addressFromStringValue(ik))
1717+ $Tuple2(nil, $Tuple10(eg._1, eg._2, eg._3, eg._4, eg._5, eg._6, eg._7, toString(eg._8), eg._9, eg._10))
17341718 }
17351719
17361720
17371721
1738-@Callable(cT)
1722+@Callable(cY)
17391723 func changeAmp () = {
1740- let im = invoke(aU, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1724+ let im = invoke(aT, "getChangeAmpConfigREADONLY", [toString(this)], nil)
17411725 let in = {
1742- let gp = im
1743- if ($isInstanceOf(gp, "List[Any]"))
1726+ let aP = im
1727+ if ($isInstanceOf(aP, "List[Any]"))
17441728 then {
1745- let io = gp
1729+ let io = aP
17461730 $Tuple3({
1747- let aW = io[0]
1748- if ($isInstanceOf(aW, "Int"))
1749- then aW
1750- else throw(($getType(aW) + " couldn't be cast to Int"))
1731+ let bd = io[0]
1732+ if ($isInstanceOf(bd, "Int"))
1733+ then bd
1734+ else throw(($getType(bd) + " couldn't be cast to Int"))
17511735 }, {
1752- let aW = io[1]
1753- if ($isInstanceOf(aW, "Int"))
1754- then aW
1755- else throw(($getType(aW) + " couldn't be cast to Int"))
1736+ let bd = io[1]
1737+ if ($isInstanceOf(bd, "Int"))
1738+ then bd
1739+ else throw(($getType(bd) + " couldn't be cast to Int"))
17561740 }, {
1757- let aW = io[2]
1758- if ($isInstanceOf(aW, "Int"))
1759- then aW
1760- else throw(($getType(aW) + " couldn't be cast to Int"))
1741+ let bd = io[2]
1742+ if ($isInstanceOf(bd, "Int"))
1743+ then bd
1744+ else throw(($getType(bd) + " couldn't be cast to Int"))
17611745 })
17621746 }
1763- else aR("invalid entry type")
1747+ else aZ("invalid entry type")
17641748 }
17651749 let ip = in._1
17661750 let iq = in._2
17671751 let ir = in._3
17681752 let is = parseIntValue(getStringValue(al()))
17691753 let it = (is + iq)
17701754 let iu = if ((0 > iq))
17711755 then if ((ir > it))
17721756 then ir
17731757 else it
17741758 else if ((it > ir))
17751759 then ir
17761760 else it
17771761 let iv = valueOrElse(getInteger(ao()), 0)
17781762 let iw = (iv + ip)
1779- let gM = [if ((height > iw))
1763+ let gQ = [if ((height > iw))
17801764 then true
1781- else aR("try again in few blocks"), if ((is != iu))
1765+ else aZ("try again in few blocks"), if ((is != iu))
17821766 then true
1783- else aR("already reached target")]
1784- if ((gM == gM))
1767+ else aZ("already reached target")]
1768+ if ((gQ == gQ))
17851769 then [IntegerEntry(ao(), height), StringEntry(al(), toString(iu)), StringEntry(am(height), toString(iu))]
17861770 else throw("Strict value is not equal to itself.")
17871771 }
17881772
17891773
17901774 @Verifier(ix)
17911775 func iy () = {
17921776 let iz = {
1793- let gp = go()
1794- if ($isInstanceOf(gp, "ByteVector"))
1777+ let aP = gt()
1778+ if ($isInstanceOf(aP, "ByteVector"))
17951779 then {
1796- let gt = gp
1797- gt
1780+ let gx = aP
1781+ gx
17981782 }
1799- else if ($isInstanceOf(gp, "Unit"))
1783+ else if ($isInstanceOf(aP, "Unit"))
18001784 then ix.senderPublicKey
18011785 else throw("Match error")
18021786 }
1803- let gp = ix
1804- if ($isInstanceOf(gp, "Order"))
1787+ let aP = ix
1788+ if ($isInstanceOf(aP, "Order"))
18051789 then {
1806- let fd = gp
1807- let iA = ba()
1808- let iB = if (gA())
1790+ let fi = aP
1791+ let iA = bh()
1792+ let iB = if (gE())
18091793 then $Tuple2(true, "")
1810- else fc(fd)
1794+ else fh(fi)
18111795 let aJ = iB._1
18121796 let aK = iB._2
1813- let aL = sigVerify(fd.bodyBytes, fd.proofs[0], fd.senderPublicKey)
1814- let aM = sigVerify(fd.bodyBytes, fd.proofs[1], iA)
1797+ let aL = sigVerify(fi.bodyBytes, fi.proofs[0], fi.senderPublicKey)
1798+ let aM = sigVerify(fi.bodyBytes, fi.proofs[1], iA)
18151799 if (if (if (aJ)
18161800 then aL
18171801 else false)
18181802 then aM
18191803 else false)
18201804 then true
18211805 else aI(aJ, aK, aL, aM)
18221806 }
1823- else if ($isInstanceOf(gp, "SetScriptTransaction"))
1807+ else if ($isInstanceOf(aP, "SetScriptTransaction"))
18241808 then {
1825- let cG = gp
1809+ let aU = aP
18261810 if (sigVerify(ix.bodyBytes, ix.proofs[0], iz))
18271811 then true
18281812 else {
1829- let iC = blake2b256(value(cG.script))
1830- let iD = fromBase64String(value(getString(aU, aE())))
1813+ let iC = blake2b256(value(aU.script))
1814+ let iD = fromBase64String(value(getString(aT, aE())))
18311815 let iE = scriptHash(this)
18321816 if ((iD == iC))
18331817 then (iE != iC)
18341818 else false
18351819 }
18361820 }
18371821 else sigVerify(ix.bodyBytes, ix.proofs[0], iz)
18381822 }
18391823

github/deemru/w8io/026f985 
569.37 ms