tx · HrUNq8fAZmz84rG89pdDkgQ1Q7ng9kB4imWr4FPrDzNR

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04200000 Waves

2023.10.16 18:12 [2801335] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "HrUNq8fAZmz84rG89pdDkgQ1Q7ng9kB4imWr4FPrDzNR", "fee": 4200000, "feeAssetId": null, "timestamp": 1697469104964, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "HuwMroEMJ7XijGCtVbjoNggB422bdBRCck8zEkMew2VnPgDxiVPWgTQgCAeVqaBDoR3UKYet12214yjSZWr6qSg" ], "script": "base64:BgLnLQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIKYW1wSW5pdGlhbCIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQ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AmFRAgpCeXRlVmVjdG9yBAJnQQUCYVEFAmdBAwkAAQIFAmFRAgRVbml0CAUCaUEPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmFRBQJpQQMJAAECBQJhUQIFT3JkZXIEAmZqBQJhUQQCaUQJAQJibAAEAmlFAwkBAmdIAAkAlAoCBgIACQECZmkBBQJmagQCYUsIBQJpRQJfMQQCYUwIBQJpRQJfMgQCYU0JAPQDAwgFAmZqCWJvZHlCeXRlcwkAkQMCCAUCZmoGcHJvb2ZzAAAIBQJmag9zZW5kZXJQdWJsaWNLZXkEAmFOCQD0AwMIBQJmaglib2R5Qnl0ZXMJAJEDAggFAmZqBnByb29mcwABBQJpRAMDAwUCYUsFAmFNBwUCYU4HBgkBAmFKBAUCYUsFAmFMBQJhTQUCYU4DCQABAgUCYVECFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJhVgUCYVEDCQD0AwMIBQJpQQlib2R5Qnl0ZXMJAJEDAggFAmlBBnByb29mcwAABQJpQwYEAmlGCQD2AwEJAQV2YWx1ZQEIBQJhVgZzY3JpcHQEAmlHCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVUJAQJhRgAEAmlICQDxBwEFBHRoaXMDCQAAAgUCaUcFAmlGCQECIT0CBQJpSAUCaUYHCQD0AwMIBQJpQQlib2R5Qnl0ZXMJAJEDAggFAmlBBnByb29mcwAABQJpQ1Wa7u0=", "height": 2801335, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: JFbdagHpBNy3qRjSWLENLoGQgGKW4W16TfJTNB2LHPQ Next: JE4VCLxAAGMMytb8XvE6qdxJqUwyExphP8WupXH7WsLD Diff:
OldNewDifferences
236236 else throw(($getType(be) + " couldn't be cast to Int"))
237237 }
238238
239-let bg = aW(this, am())
240-
241-func bh () = valueOrElse(getBoolean(aU, aE()), false)
239+func bg (bh) = makeString(["%s%s", "whitelisted", toString(bh)], o)
242240
243241
244-func bi () = fromBase58String(aW(aU, ay()))
242+func bi (bh) = valueOrElse(getBoolean(aU, bg(bh)), false)
245243
246244
247-let bj = addressFromStringValue(aW(aU, aG()))
245+let bj = aW(this, am())
248246
249-func bk () = {
250- let bl = aW(this, ak())
251- let bm = aW(this, al())
252- let bn = aZ(aU, aC(bm))
253- let aA = aZ(aU, aC(bl))
254- split(aW(aU, az(toString(aA), toString(bn))), o)
247+func bk () = valueOrElse(getBoolean(aU, aE()), false)
248+
249+
250+func bl () = fromBase58String(aW(aU, ay()))
251+
252+
253+let bm = addressFromStringValue(aW(aU, aG()))
254+
255+func bn () = {
256+ let bo = aW(this, ak())
257+ let bp = aW(this, al())
258+ let bq = aZ(aU, aC(bp))
259+ let aA = aZ(aU, aC(bo))
260+ split(aW(aU, az(toString(aA), toString(bq))), o)
255261 }
256262
257263
258-func bo (bp) = if ((bp == k))
264+func br (bs) = if ((bs == k))
259265 then unit
260- else fromBase58String(bp)
266+ else fromBase58String(bs)
261267
262268
263-func bq (bp) = if ((bp == unit))
269+func bt (bs) = if ((bs == unit))
264270 then k
265- else toBase58String(value(bp))
271+ else toBase58String(value(bs))
266272
267273
268-func br (bs) = $Tuple7(addressFromStringValue(bs[u]), parseIntValue(bs[v]), fromBase58String(bs[w]), bo(bs[x]), bo(bs[y]), parseIntValue(bs[z]), parseIntValue(bs[A]))
274+func bu (bv) = $Tuple7(addressFromStringValue(bv[u]), parseIntValue(bv[v]), fromBase58String(bv[w]), br(bv[x]), br(bv[y]), parseIntValue(bv[z]), parseIntValue(bv[A]))
269275
270276
271-let bt = br(bk())
277+let bw = bu(bn())
272278
273-let bu = bt
279+let bx = bw
274280
275-let bv = bu._1
281+let by = bx._1
276282
277-let bw = bu._2
283+let bz = bx._2
278284
279-let bx = bu._3
285+let bA = bx._3
280286
281-let by = bu._4
287+let bB = bx._4
282288
283-let bz = bu._5
289+let bC = bx._5
284290
285-let bA = bu._6
291+let bD = bx._6
286292
287-let bB = bu._7
293+let bE = bx._7
288294
289-func bC () = split(aW(aU, ax()), o)
295+func bF () = split(aW(aU, ax()), o)
290296
291297
292-let bD = bC()
298+let bG = bF()
293299
294-let bE = valueOrErrorMessage(addressFromString(bD[D]), "Invalid staking contract address")
300+let bH = valueOrErrorMessage(addressFromString(bG[D]), "Invalid staking contract address")
295301
296-let bF = valueOrErrorMessage(addressFromString(bD[F]), "Invalid slipage contract address")
302+let bI = valueOrErrorMessage(addressFromString(bG[F]), "Invalid slipage contract address")
297303
298-let bG = valueOrErrorMessage(addressFromString(bD[G]), "Invalid gwx contract address")
304+let bJ = valueOrErrorMessage(addressFromString(bG[G]), "Invalid gwx contract address")
299305
300-let bH = valueOrErrorMessage(addressFromString(bD[E]), "Invalid gwx contract address")
306+let bK = valueOrErrorMessage(addressFromString(bG[E]), "Invalid gwx contract address")
301307
302-func bI (bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN), toString(bO), toString(bP), toString(bQ), toString(bR), toString(bS)], o)
308+func bL (bM,bN,bO,bP,bQ,bR,bS,bT,bU,bV) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bM), toString(bN), toString(bO), toString(bP), toString(bQ), toString(bR), toString(bS), toString(bT), toString(bU), toString(bV)], o)
303309
304310
305-func bT (bU,bV,bW,bM,bP,bQ) = makeString(["%d%d%d%d%d%d", toString(bU), toString(bV), toString(bW), toString(bM), toString(bP), toString(bQ)], o)
311+func bW (bX,bY,bZ,bP,bS,bT) = makeString(["%d%d%d%d%d%d", toString(bX), toString(bY), toString(bZ), toString(bP), toString(bS), toString(bT)], o)
306312
307313
308-func bX (bY) = if ((bY == "WAVES"))
314+func ca (cb) = if ((cb == "WAVES"))
309315 then wavesBalance(this).available
310- else assetBalance(this, fromBase58String(bY))
316+ else assetBalance(this, fromBase58String(cb))
311317
312318
313-func bZ (ca,cb) = fraction(ca, c, cb)
319+func cc (cd,ce) = fraction(cd, c, ce)
314320
315321
316-func cc (ca,cb,Q) = fraction(ca, c, cb, Q)
322+func cf (cd,ce,Q) = fraction(cd, c, ce, Q)
317323
318324
319-func cd (ce,cf,cg) = {
320- let ch = fraction((ce - cf), b, cf)
321- let ci = ((cg - X(ch)) > d)
322- if (!(ci))
323- then throw(("Big slpg: " + toString(ch)))
324- else $Tuple2(ci, min([ce, cf]))
325+func cg (ch,ci,cj) = {
326+ let ck = fraction((ch - ci), b, ci)
327+ let cl = ((cj - X(ck)) > d)
328+ if (!(cl))
329+ then throw(("Big slpg: " + toString(ck)))
330+ else $Tuple2(cl, min([ch, ci]))
325331 }
326332
327333
328-func cj (ck,cl,cm) = {
329- let ch = fraction(cl, b, ck)
330- let cn = (cm > ch)
331- if (if (cn)
334+func cm (cn,co,cp) = {
335+ let ck = fraction(co, b, cn)
336+ let cq = (cp > ck)
337+ if (if (cq)
332338 then true
333- else (cl > ck))
334- then throw(((((((toString(cl) + " ") + toString(ck)) + " ") + toString(ch)) + " ") + toString(cm)))
335- else cn
339+ else (co > cn))
340+ then throw(((((((toString(co) + " ") + toString(cn)) + " ") + toString(ck)) + " ") + toString(cp)))
341+ else cq
336342 }
337343
338344
339-func co (cp,cq,cr,cs) = {
340- let ct = I(cr, cp)
341- let cu = I(cs, cq)
342- bZ(cu, ct)
345+func cr (cs,ct,cu,cv) = {
346+ let cw = I(cu, cs)
347+ let cx = I(cv, ct)
348+ cc(cx, cw)
343349 }
344350
345351
346-func cv (cr,cs,cw) = {
347- let cx = bA
348- let cy = bB
349- let cz = co(cx, cy, cr, cs)
350- let cb = I(cr, cx)
351- let ca = I(cs, cy)
352- let cA = I(cw, a)
353- let cB = bZ(cb, cA)
354- let cC = bZ(ca, cA)
355-[cz, cB, cC]
352+func cy (cu,cv,cz) = {
353+ let cA = bD
354+ let cB = bE
355+ let cC = cr(cA, cB, cu, cv)
356+ let ce = I(cu, cA)
357+ let cd = I(cv, cB)
358+ let cD = I(cz, a)
359+ let cE = cc(ce, cD)
360+ let cF = cc(cd, cD)
361+[cC, cE, cF]
356362 }
357363
358364
359-func cD (cr,cs,cw) = {
360- let cE = cv(cr, cs, cw)
361-[M(cE[0], a), M(cE[1], a), M(cE[2], a)]
365+func cG (cu,cv,cz) = {
366+ let cH = cy(cu, cv, cz)
367+[M(cH[0], a), M(cH[1], a), M(cH[2], a)]
362368 }
363369
364370
365-func cF (cG,ar) = {
366- let cH = if ((ar == 0))
371+func cI (cJ,ar) = {
372+ let cK = if ((ar == 0))
367373 then 0
368- else fraction(cG, ar, a)
369- $Tuple2((cG - cH), cH)
374+ else fraction(cJ, ar, a)
375+ $Tuple2((cJ - cK), cK)
370376 }
371377
372378
373-func cI (cJ) = {
374- let cK = cJ[0]
375- let cL = cJ[1]
376- let aV = (cK + cL)
379+func cL (cM) = {
380+ let cN = cM[0]
381+ let cO = cM[1]
382+ let aV = (cN + cO)
377383 if ((aV == e))
378384 then e
379385 else {
380- let aR = parseIntValue(bg)
381- let cM = (aR * 2)
382- let cE = fraction(cK, cL, f)
383- let cN = fraction(cE, i, f)
384- let cO = fraction(toBigInt(cM), aV, f)
385- let cP = toBigInt((cM - 1))
386- func cQ (cR) = {
387- let cS = fraction(cR, cR, f)
388- let cT = fraction(cS, cR, f)
389- let cU = fraction(cT, f, cN)
390- fraction((cO + fraction(cU, g, f)), cR, (fraction(cP, cR, f) + fraction(h, cU, f)))
386+ let aR = parseIntValue(bj)
387+ let cP = (aR * 2)
388+ let cH = fraction(cN, cO, f)
389+ let cQ = fraction(cH, i, f)
390+ let cR = fraction(toBigInt(cP), aV, f)
391+ let cS = toBigInt((cP - 1))
392+ func cT (cU) = {
393+ let cV = fraction(cU, cU, f)
394+ let cW = fraction(cV, cU, f)
395+ let cX = fraction(cW, f, cQ)
396+ fraction((cR + fraction(cX, g, f)), cU, (fraction(cS, cU, f) + fraction(h, cX, f)))
391397 }
392398
393- func cV (cW,cX) = if (cW._2)
394- then cW
399+ func cY (cZ,da) = if (cZ._2)
400+ then cZ
395401 else {
396- let cR = cW._1
397- let cY = cQ(cR)
398- let cZ = (cY - value(cR))
399- let da = if ((e > cZ))
400- then -(cZ)
401- else cZ
402- if ((f >= da))
403- then $Tuple2(cY, true)
404- else $Tuple2(cY, false)
402+ let cU = cZ._1
403+ let db = cT(cU)
404+ let dc = (db - value(cU))
405+ let dd = if ((e > dc))
406+ then -(dc)
407+ else dc
408+ if ((f >= dd))
409+ then $Tuple2(db, true)
410+ else $Tuple2(db, false)
405411 }
406412
407- let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
408- let dc = {
409- let dd = db
410- let de = size(dd)
411- let df = $Tuple2(aV, false)
412- func dg (dh,di) = if ((di >= de))
413- then dh
414- else cV(dh, dd[di])
413+ let de = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
414+ let df = {
415+ let dg = de
416+ let dh = size(dg)
417+ let di = $Tuple2(aV, false)
418+ func dj (dk,dl) = if ((dl >= dh))
419+ then dk
420+ else cY(dk, dg[dl])
415421
416- func dj (dh,di) = if ((di >= de))
417- then dh
422+ func dm (dk,dl) = if ((dl >= dh))
423+ then dk
418424 else throw("List size exceeds 17")
419425
420- dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
426+ dm(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(di, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
421427 }
422- let cR = dc._1
423- let dk = dc._2
424- if (dk)
425- then cR
426- else throw(("D calculation error, D = " + toString(cR)))
428+ let cU = df._1
429+ let dn = df._2
430+ if (dn)
431+ then cU
432+ else throw(("D calculation error, D = " + toString(cU)))
427433 }
428434 }
429435
430436
431-func dl (dm,dn,do,dp) = {
432- let dq = bx
433- let dr = toBase58String(value(by))
434- let ds = toBase58String(value(bz))
437+func do (dp,dq,dr,ds) = {
435438 let dt = bA
436- let du = bB
437- let dv = toString(bw)
438- let dw = valueOrErrorMessage(assetInfo(dq), "Wrong LP id").quantity
439- if ((toBase58String(dq) != dn))
439+ let du = toBase58String(value(bB))
440+ let dv = toBase58String(value(bC))
441+ let dw = bD
442+ let dx = bE
443+ let dy = toString(bz)
444+ let dz = valueOrErrorMessage(assetInfo(dt), "Wrong LP id").quantity
445+ if ((toBase58String(dt) != dq))
440446 then throw("Wrong pmt asset")
441447 else {
442- let dx = bX(dr)
443- let dy = I(dx, dt)
444- let dz = bX(ds)
445- let dA = I(dz, du)
446- let dB = bZ(dA, dy)
447- let dC = M(dB, a)
448- let dD = I(do, a)
449- let dE = I(dw, a)
450- let dF = fraction(dy, dD, dE)
451- let dG = fraction(dA, dD, dE)
452- let dH = P(dF, dt, FLOOR)
453- let dI = P(dG, du, FLOOR)
454- let dJ = if ((dm == ""))
448+ let dA = ca(du)
449+ let dB = I(dA, dw)
450+ let dC = ca(dv)
451+ let dD = I(dC, dx)
452+ let dE = cc(dD, dB)
453+ let dF = M(dE, a)
454+ let dG = I(dr, a)
455+ let dH = I(dz, a)
456+ let dI = fraction(dB, dG, dH)
457+ let dJ = fraction(dD, dG, dH)
458+ let dK = P(dI, dw, FLOOR)
459+ let dL = P(dJ, dx, FLOOR)
460+ let dM = if ((dp == ""))
455461 then nil
456- else [ScriptTransfer(dp, dH, if ((dr == "WAVES"))
462+ else [ScriptTransfer(ds, dK, if ((du == "WAVES"))
457463 then unit
458- else fromBase58String(dr)), ScriptTransfer(dp, dI, if ((ds == "WAVES"))
464+ else fromBase58String(du)), ScriptTransfer(ds, dL, if ((dv == "WAVES"))
459465 then unit
460- else fromBase58String(ds)), StringEntry(aj(toString(dp), dm), bT(dH, dI, do, dC, height, lastBlock.timestamp)), IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC)]
461- $Tuple10(dH, dI, dr, ds, dx, dz, dw, dB, dv, dJ)
466+ else fromBase58String(dv)), StringEntry(aj(toString(ds), dp), bW(dK, dL, dr, dF, height, lastBlock.timestamp)), IntegerEntry(ac(), dF), IntegerEntry(ad(height, lastBlock.timestamp), dF)]
467+ $Tuple10(dK, dL, du, dv, dA, dC, dz, dE, dy, dM)
462468 }
463469 }
464470
465471
466-func dK (dm,cg,dL,dM,dN,dO,dp,dP,dQ,dR,dS,dT,dU) = {
467- let dq = bx
468- let dV = toBase58String(value(by))
469- let dW = toBase58String(value(bz))
470- let dX = bA
471- let dY = bB
472- let dv = toString(bw)
473- let dZ = valueOrErrorMessage(assetInfo(dq), "Wr lp as").quantity
474- let dx = if (dP)
475- then bX(dV)
476- else if (if (dR)
477- then (dU == dV)
478- else false)
479- then (bX(dV) - dT)
480- else if (dR)
481- then bX(dV)
482- else (bX(dV) - dL)
483- let dz = if (dP)
484- then bX(dW)
485- else if (if (dR)
486- then (dU == dW)
487- else false)
488- then (bX(dW) - dT)
489- else if (dR)
490- then bX(dW)
491- else (bX(dW) - dN)
492- let ea = I(dL, dX)
493- let eb = I(dN, dY)
494- let ec = bZ(eb, ea)
495- let dy = I(dx, dX)
496- let dA = I(dz, dY)
497- let cl = cI([dy, dA])
498- let ed = if ((dZ == 0))
472+func dN (dp,cj,dO,dP,dQ,dR,ds,dS,dT,dU,dV,dW,dX) = {
473+ let dt = bA
474+ let dY = toBase58String(value(bB))
475+ let dZ = toBase58String(value(bC))
476+ let ea = bD
477+ let eb = bE
478+ let dy = toString(bz)
479+ let ec = valueOrErrorMessage(assetInfo(dt), "Wr lp as").quantity
480+ let ed = [if (if ((dP == br(dY)))
481+ then (dR == br(dZ))
482+ else false)
483+ then true
484+ else ba("Invalid amt or price asset passed.")]
485+ if ((ed == ed))
499486 then {
500- let ck = cI([(dy + ea), (dA + eb)])
501- let ee = if ((ck > cl))
502- then true
503- else throw("D1 should be greater than D0")
504- if ((ee == ee))
487+ let dA = if (dS)
488+ then ca(dY)
489+ else if (if (dU)
490+ then (dX == dY)
491+ else false)
492+ then (ca(dY) - dW)
493+ else if (dU)
494+ then ca(dY)
495+ else (ca(dY) - dO)
496+ let dC = if (dS)
497+ then ca(dZ)
498+ else if (if (dU)
499+ then (dX == dZ)
500+ else false)
501+ then (ca(dZ) - dW)
502+ else if (dU)
503+ then ca(dZ)
504+ else (ca(dZ) - dQ)
505+ let ee = I(dO, ea)
506+ let ef = I(dQ, eb)
507+ let eg = cc(ef, ee)
508+ let dB = I(dA, ea)
509+ let dD = I(dC, eb)
510+ let co = cL([dB, dD])
511+ let eh = if ((ec == 0))
505512 then {
506- let dB = d
507- let ef = d
508- let cA = ck
509- $Tuple5(M(cA, a), M(ea, dX), M(eb, dY), bZ((dA + eb), (dy + ea)), ef)
510- }
511- else throw("Strict value is not equal to itself.")
512- }
513- else {
514- let dB = bZ(dA, dy)
515- let eg = fraction(X((dB - ec)), c, dB)
516- let ef = I(cg, a)
517- if (if (if (dS)
518- then (dB != d)
519- else false)
520- then (eg > ef)
521- else false)
522- then throw(((("Price slippage " + toString(eg)) + " > ") + toString(ef)))
523- else {
524- let eh = I(dZ, a)
525- let ei = fraction(ea, cc(dA, dy, CEILING), c, CEILING)
526- let ej = fraction(eb, c, cc(dA, dy, FLOOR), CEILING)
527- let ek = if ((ei > eb))
528- then $Tuple2(ej, eb)
529- else $Tuple2(ea, ei)
530- let el = ek._1
531- let em = ek._2
532- let ck = cI([(dy + el), (dA + em)])
533- let ee = if ((ck > cl))
513+ let cn = cL([(dB + ee), (dD + ef)])
514+ let ei = if ((cn > co))
534515 then true
535516 else throw("D1 should be greater than D0")
536- if ((ee == ee))
517+ if ((ei == ei))
537518 then {
538- let cA = fraction(eh, (ck - cl), cl)
539- $Tuple5(P(cA, a, FLOOR), P(el, dX, CEILING), P(em, dY, CEILING), dB, ef)
519+ let dE = d
520+ let ej = d
521+ let cD = cn
522+ $Tuple5(M(cD, a), M(ee, ea), M(ef, eb), cc((dD + ef), (dB + ee)), ej)
540523 }
541524 else throw("Strict value is not equal to itself.")
542525 }
526+ else {
527+ let dE = cc(dD, dB)
528+ let ek = fraction(X((dE - eg)), c, dE)
529+ let ej = I(cj, a)
530+ if (if (if (dV)
531+ then (dE != d)
532+ else false)
533+ then (ek > ej)
534+ else false)
535+ then throw(((("Price slippage " + toString(ek)) + " > ") + toString(ej)))
536+ else {
537+ let el = I(ec, a)
538+ let em = fraction(ee, cf(dD, dB, CEILING), c, CEILING)
539+ let en = fraction(ef, c, cf(dD, dB, FLOOR), CEILING)
540+ let eo = if ((em > ef))
541+ then $Tuple2(en, ef)
542+ else $Tuple2(ee, em)
543+ let ep = eo._1
544+ let eq = eo._2
545+ let cn = cL([(dB + ep), (dD + eq)])
546+ let ei = if ((cn > co))
547+ then true
548+ else throw("D1 should be greater than D0")
549+ if ((ei == ei))
550+ then {
551+ let cD = fraction(el, (cn - co), co)
552+ $Tuple5(P(cD, a, FLOOR), P(ep, ea, CEILING), P(eq, eb, CEILING), dE, ej)
553+ }
554+ else throw("Strict value is not equal to itself.")
555+ }
556+ }
557+ let er = eh._1
558+ let es = eh._2
559+ let et = eh._3
560+ let dF = M(eh._4, a)
561+ let eu = M(eh._5, a)
562+ if ((0 >= er))
563+ then throw("LP <= 0")
564+ else {
565+ let ev = if (!(dT))
566+ then 0
567+ else er
568+ let ew = (dO - es)
569+ let ex = (dQ - et)
570+ let ey = if (if (dU)
571+ then (dX == dY)
572+ else false)
573+ then $Tuple2(dW, 0)
574+ else if (if (dU)
575+ then (dX == dZ)
576+ else false)
577+ then $Tuple2(0, dW)
578+ else $Tuple2(es, et)
579+ let ez = ey._1
580+ let eA = ey._2
581+ let eB = [IntegerEntry(ac(), dF), IntegerEntry(ad(height, lastBlock.timestamp), dF), StringEntry(ag(ds, dp), bL(ez, eA, ev, dF, cj, eu, height, lastBlock.timestamp, ew, ex))]
582+ $Tuple13(er, ev, dF, dA, dC, ec, dt, dy, eB, ew, ex, dP, dR)
583+ }
543584 }
544- let en = ed._1
545- let eo = ed._2
546- let ep = ed._3
547- let dC = M(ed._4, a)
548- let eq = M(ed._5, a)
549- if ((0 >= en))
550- then throw("LP <= 0")
551- else {
552- let er = if (!(dQ))
553- then 0
554- else en
555- let es = (dL - eo)
556- let et = (dN - ep)
557- let eu = if (if (dR)
558- then (dU == dV)
559- else false)
560- then $Tuple2(dT, 0)
561- else if (if (dR)
562- then (dU == dW)
563- else false)
564- then $Tuple2(0, dT)
565- else $Tuple2(eo, ep)
566- let ev = eu._1
567- let ew = eu._2
568- let ex = [IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC), StringEntry(ag(dp, dm), bI(ev, ew, er, dC, cg, eq, height, lastBlock.timestamp, es, et))]
569- $Tuple13(en, er, dC, dx, dz, dZ, dq, dv, ex, es, et, dM, dO)
570- }
585+ else throw("Strict value is not equal to itself.")
571586 }
572587
573588
574-func ey (cJ,cX,ez) = {
575- let eA = g
576- let eB = cJ[if ((cX == 0))
589+func eC (cM,da,eD) = {
590+ let eE = g
591+ let eF = cM[if ((da == 0))
577592 then 1
578593 else 0]
579- let eC = parseBigIntValue(m)
580- let aR = (parseBigIntValue(bg) * eC)
581- let aV = eB
582- let cM = (aR * eA)
583- let eD = (((((ez * ez) / (eB * eA)) * ez) * eC) / (cM * eA))
584- let eE = ((aV + ((ez * eC) / cM)) - ez)
585- func cV (cW,eF) = {
586- let eG = cW
587- let eH = eG._1
588- let dk = eG._2
589- if ((dk != unit))
590- then cW
594+ let eG = parseBigIntValue(m)
595+ let aR = (parseBigIntValue(bj) * eG)
596+ let aV = eF
597+ let cP = (aR * eE)
598+ let eH = (((((eD * eD) / (eF * eE)) * eD) * eG) / (cP * eE))
599+ let eI = ((aV + ((eD * eG) / cP)) - eD)
600+ func cY (cZ,eJ) = {
601+ let eK = cZ
602+ let eL = eK._1
603+ let dn = eK._2
604+ if ((dn != unit))
605+ then cZ
591606 else {
592- let eI = (((eH * eH) + eD) / ((g * eH) + eE))
593- let eJ = Y((eI - value(eH)))
594- if ((f >= eJ))
595- then $Tuple2(eI, eF)
596- else $Tuple2(eI, unit)
607+ let eM = (((eL * eL) + eH) / ((g * eL) + eI))
608+ let eN = Y((eM - value(eL)))
609+ if ((f >= eN))
610+ then $Tuple2(eM, eJ)
611+ else $Tuple2(eM, unit)
597612 }
598613 }
599614
600- let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
601- let eK = {
602- let dd = db
603- let de = size(dd)
604- let df = $Tuple2(ez, unit)
605- func dg (dh,di) = if ((di >= de))
606- then dh
607- else cV(dh, dd[di])
615+ let de = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
616+ let eO = {
617+ let dg = de
618+ let dh = size(dg)
619+ let di = $Tuple2(eD, unit)
620+ func dj (dk,dl) = if ((dl >= dh))
621+ then dk
622+ else cY(dk, dg[dl])
608623
609- func dj (dh,di) = if ((di >= de))
610- then dh
624+ func dm (dk,dl) = if ((dl >= dh))
625+ then dk
611626 else throw("List size exceeds 15")
612627
613- dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
628+ dm(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(di, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
614629 }
615- let eH = eK._1
616- let dk = eK._2
617- if ((dk != unit))
618- then eH
619- else throw(("Y calculation error, Y = " + toString(eH)))
630+ let eL = eO._1
631+ let dn = eO._2
632+ if ((dn != unit))
633+ then eL
634+ else throw(("Y calculation error, Y = " + toString(eL)))
620635 }
621636
622637
623-func eL (eM,eN,eO) = {
624- let eP = fraction(cI([L(eM, toBigInt(bA)), L(eN, toBigInt(bB))]), c, eO)
625- if ((eO == e))
638+func eP (eQ,eR,eS) = {
639+ let eT = fraction(cL([L(eQ, toBigInt(bD)), L(eR, toBigInt(bE))]), c, eS)
640+ if ((eS == e))
626641 then e
627- else eP
642+ else eT
628643 }
629644
630645
631-func eQ (eR,eS,eT) = {
632- let eU = (toBigInt(bX(bq(by))) - eR)
633- let eV = (toBigInt(bX(bq(bz))) - eS)
634- let eW = (toBigInt(value(assetInfo(bx)).quantity) - eT)
635- let eX = eL(eU, eV, eW)
636- eX
646+func eU (eV,eW,eX) = {
647+ let eY = (toBigInt(ca(bt(bB))) - eV)
648+ let eZ = (toBigInt(ca(bt(bC))) - eW)
649+ let fa = (toBigInt(value(assetInfo(bA)).quantity) - eX)
650+ let fb = eP(eY, eZ, fa)
651+ fb
637652 }
638653
639654
640-func eY (eZ,fa,eT) = {
641- let eU = (bX(bq(by)) + eZ)
642- let eV = (bX(bq(bz)) + fa)
643- let eW = (value(assetInfo(bx)).quantity + eT)
644- let eP = eL(toBigInt(eU), toBigInt(eV), toBigInt(eW))
645- let fb = [IntegerEntry(at, height), StringEntry(as, toString(eP))]
646- $Tuple2(fb, eP)
655+func fc (fd,fe,eX) = {
656+ let eY = (ca(bt(bB)) + fd)
657+ let eZ = (ca(bt(bC)) + fe)
658+ let fa = (value(assetInfo(bA)).quantity + eX)
659+ let eT = eP(toBigInt(eY), toBigInt(eZ), toBigInt(fa))
660+ let ff = [IntegerEntry(at, height), StringEntry(as, toString(eT))]
661+ $Tuple2(ff, eT)
647662 }
648663
649664
650-func fc (fd,eP) = if ((eP >= fd))
665+func fg (fh,eT) = if ((eT >= fh))
651666 then true
652667 else ba("updated DLp lower than current DLp")
653668
654669
655-func fe (ff) = {
656- let eU = bX(bq(by))
657- let eV = bX(bq(bz))
658- let fg = ff.amount
659- let fh = fraction(ff.amount, ff.price, a, FLOOR)
660- let fi = if ((ff.orderType == Buy))
661- then $Tuple2(fg, -(fh))
662- else $Tuple2(-(fg), fh)
663- let eZ = fi._1
664- let fa = fi._2
665- if (if (if (bh())
670+func fi (fj) = {
671+ let eY = ca(bt(bB))
672+ let eZ = ca(bt(bC))
673+ let fk = fj.amount
674+ let fl = fraction(fj.amount, fj.price, a, FLOOR)
675+ let fm = if ((fj.orderType == Buy))
676+ then $Tuple2(fk, -(fl))
677+ else $Tuple2(-(fk), fl)
678+ let fd = fm._1
679+ let fe = fm._2
680+ if (if (if (bk())
666681 then true
667- else (bw == s))
682+ else (bz == s))
668683 then true
669- else (bw == t))
684+ else (bz == t))
670685 then throw("Admin blocked")
671- else if (if ((ff.assetPair.amountAsset != by))
686+ else if (if ((fj.assetPair.amountAsset != bB))
672687 then true
673- else (ff.assetPair.priceAsset != bz))
688+ else (fj.assetPair.priceAsset != bC))
674689 then throw("Wr assets")
675690 else {
676- let fj = parseBigIntValue(valueOrElse(getString(this, as), "0"))
677- let fk = eY(eZ, fa, 0)
678- let fl = fk._1
679- let fm = fk._2
680- let fn = (fm >= fj)
681- let fo = makeString(["dLp=", toString(fj), " dLpNew=", toString(fm), " amountAssetBalance=", toString(eU), " priceAssetBalance=", toString(eV), " amountAssetBalanceDelta=", toString(eZ), " priceAssetBalanceDelta=", toString(fa), " height=", toString(height)], "")
682- $Tuple2(fn, fo)
691+ let fn = parseBigIntValue(valueOrElse(getString(this, as), "0"))
692+ let fo = fc(fd, fe, 0)
693+ let fp = fo._1
694+ let fq = fo._2
695+ let fr = (fq >= fn)
696+ let fs = makeString(["dLp=", toString(fn), " dLpNew=", toString(fq), " amountAssetBalance=", toString(eY), " priceAssetBalance=", toString(eZ), " amountAssetBalanceDelta=", toString(fd), " priceAssetBalanceDelta=", toString(fe), " height=", toString(height)], "")
697+ $Tuple2(fr, fs)
683698 }
684699 }
685700
686701
687-func fp (cX) = if ((size(cX.payments) != 1))
702+func ft (da) = if ((size(da.payments) != 1))
688703 then throw("1 pmnt exp")
689704 else {
690- let fq = value(cX.payments[0])
691- let dn = value(fq.assetId)
692- let dT = fq.amount
693- let ed = dl(toBase58String(cX.transactionId), toBase58String(dn), dT, cX.caller)
694- let dH = ed._1
695- let dI = ed._2
696- let dv = parseIntValue(ed._9)
697- let dJ = ed._10
698- if (if (bh())
699- then true
700- else (dv == t))
701- then throw(("Admin blocked: " + toString(dv)))
702- else $Tuple5(dH, dI, dT, dn, dJ)
705+ let fu = value(da.payments[0])
706+ let dq = value(fu.assetId)
707+ let dW = fu.amount
708+ let eh = do(toBase58String(da.transactionId), toBase58String(dq), dW, da.caller)
709+ let dK = eh._1
710+ let dL = eh._2
711+ let dy = parseIntValue(eh._9)
712+ let dM = eh._10
713+ let fv = if (!(bi(da.caller)))
714+ then if (bk())
715+ then true
716+ else (bz == t)
717+ else false
718+ if (fv)
719+ then throw(("Admin blocked: " + toString(dy)))
720+ else $Tuple5(dK, dL, dW, dq, dM)
703721 }
704722
705723
706-func fr (fs,ai,ft,fu,cg,dQ,dR,dS,dT,dU) = {
707- let ed = dK(ai, cg, value(ft).amount, value(ft).assetId, value(fu).amount, value(fu).assetId, fs, (ai == ""), dQ, dR, dS, dT, dU)
708- let dv = parseIntValue(ed._8)
709- if (if (if (bh())
710- then true
711- else (dv == r))
712- then true
713- else (dv == t))
714- then throw(("Blocked:" + toString(dv)))
715- else ed
724+func fw (fx,ai,fy,fz,cj,dT,dU,dV,dW,dX) = {
725+ let eh = dN(ai, cj, value(fy).amount, value(fy).assetId, value(fz).amount, value(fz).assetId, fx, (ai == ""), dT, dU, dV, dW, dX)
726+ let dy = parseIntValue(eh._8)
727+ let fA = if (!(bi(addressFromStringValue(fx))))
728+ then if (if (bk())
729+ then true
730+ else (bz == t))
731+ then true
732+ else (bz == r)
733+ else false
734+ if (fA)
735+ then throw(("Blocked:" + toString(dy)))
736+ else eh
716737 }
717738
718739
719-func fv (fw,dn,dp,ai,fx) = {
720- let dr = toBase58String(value(by))
721- let ds = toBase58String(value(bz))
722- let dq = bx
723- let dX = bA
724- let dY = bB
725- let eW = toBigInt(valueOrErrorMessage(assetInfo(dq), "invalid lp asset").quantity)
726- let fy = if ((eW > e))
740+func fB (fC,dq,ds,ai,fD) = {
741+ let du = toBase58String(value(bB))
742+ let dv = toBase58String(value(bC))
743+ let dt = bA
744+ let ea = bD
745+ let eb = bE
746+ let fa = toBigInt(valueOrErrorMessage(assetInfo(dt), "invalid lp asset").quantity)
747+ let fE = if ((fa > e))
727748 then true
728749 else throw("initial deposit requires all coins")
729- if ((fy == fy))
750+ if ((fE == fE))
730751 then {
731- let dx = bX(dr)
732- let dz = bX(ds)
733- let fz = if ((ai == ""))
734- then $Tuple2(dx, dz)
735- else if ((dn == dr))
736- then if ((fw > dx))
752+ let dA = ca(du)
753+ let dC = ca(dv)
754+ let fF = if ((ai == ""))
755+ then $Tuple2(dA, dC)
756+ else if ((dq == du))
757+ then if ((fC > dA))
737758 then throw("invalid payment amount")
738- else $Tuple2((dx - fw), dz)
739- else if ((dn == ds))
740- then if ((fw > dz))
759+ else $Tuple2((dA - fC), dC)
760+ else if ((dq == dv))
761+ then if ((fC > dC))
741762 then throw("invalid payment amount")
742- else $Tuple2(dx, (dz - fw))
763+ else $Tuple2(dA, (dC - fC))
743764 else throw("wrong pmtAssetId")
744- let fA = fz._1
745- let fB = fz._2
746- let fC = if ((dn == dr))
747- then $Tuple2(fw, 0)
748- else if ((dn == ds))
749- then $Tuple2(0, fw)
750- else throw("invalid payment")
751- let fD = fC._1
752- let fE = fC._2
753- let fF = if (fx)
754- then $Tuple3(cF(fD, bd)._1, cF(fE, bd)._1, cF(fw, bd)._2)
755- else $Tuple3(fD, fE, 0)
756765 let fG = fF._1
757766 let fH = fF._2
758- let cH = fF._3
759- let fI = (fA + fG)
760- let fJ = (fB + fH)
761- let cl = cI([I(fA, bA), I(fB, bB)])
762- let ck = cI([I(fI, bA), I(fJ, bB)])
763- let ee = if ((ck > cl))
767+ let fI = if ((dq == du))
768+ then $Tuple2(fC, 0)
769+ else if ((dq == dv))
770+ then $Tuple2(0, fC)
771+ else throw("invalid payment")
772+ let fJ = fI._1
773+ let fK = fI._2
774+ let fL = if (fD)
775+ then $Tuple3(cI(fJ, bd)._1, cI(fK, bd)._1, cI(fC, bd)._2)
776+ else $Tuple3(fJ, fK, 0)
777+ let fM = fL._1
778+ let fN = fL._2
779+ let cK = fL._3
780+ let fO = (fG + fM)
781+ let fP = (fH + fN)
782+ let co = cL([I(fG, bD), I(fH, bE)])
783+ let cn = cL([I(fO, bD), I(fP, bE)])
784+ let ei = if ((cn > co))
764785 then true
765786 else throw()
766- if ((ee == ee))
787+ if ((ei == ei))
767788 then {
768- let fK = fraction(eW, (ck - cl), cl, FLOOR)
769- let dC = M(bZ(I(fJ, dY), I(fI, dX)), a)
770- let ex = [IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC), StringEntry(ag(dp, ai), bI(fD, fE, toInt(fK), dC, 0, 0, height, lastBlock.timestamp, 0, 0))]
771- let fL = fraction(fB, a, fA)
772- let fM = fraction(fw, a, (fL + a))
773- let fN = (fw - fM)
774- let fO = fraction(eW, toBigInt(fN), toBigInt(fB))
775- let fP = toInt(fraction((fK - fO), b, fO))
776- $Tuple4(toInt(fK), ex, cH, fP)
789+ let fQ = fraction(fa, (cn - co), co, FLOOR)
790+ let dF = M(cc(I(fP, eb), I(fO, ea)), a)
791+ let eB = [IntegerEntry(ac(), dF), IntegerEntry(ad(height, lastBlock.timestamp), dF), StringEntry(ag(ds, ai), bL(fJ, fK, toInt(fQ), dF, 0, 0, height, lastBlock.timestamp, 0, 0))]
792+ let fR = fraction(fH, a, fG)
793+ let fS = fraction(fC, a, (fR + a))
794+ let fT = (fC - fS)
795+ let fU = fraction(fa, toBigInt(fT), toBigInt(fH))
796+ let fV = toInt(fraction((fQ - fU), b, fU))
797+ $Tuple4(toInt(fQ), eB, cK, fV)
777798 }
778799 else throw("Strict value is not equal to itself.")
779800 }
781802 }
782803
783804
784-func fQ (fR,fS,fT,fs,fU,fV) = {
785- let dq = toBase58String(value(bx))
786- let dr = toBase58String(value(by))
787- let ds = toBase58String(value(bz))
788- let fW = bA
789- let fX = bB
790- let fY = bw
791- let dp = if ((fs == bH))
792- then fU
793- else fs
794- let fq = value(fT[0])
795- let dn = value(fq.assetId)
796- let dT = fq.amount
797- let eX = eQ(e, e, e)
798- if ((eX == eX))
805+func fW (fX,fY,fZ,fx,ga,gb) = {
806+ let dt = toBase58String(value(bA))
807+ let du = toBase58String(value(bB))
808+ let dv = toBase58String(value(bC))
809+ let gc = bD
810+ let gd = bE
811+ let ge = bz
812+ let ds = if ((fx == bK))
813+ then ga
814+ else fx
815+ let fu = value(fZ[0])
816+ let dq = value(fu.assetId)
817+ let dW = fu.amount
818+ let fb = eU(e, e, e)
819+ if ((fb == fb))
799820 then {
800- let dm = toBase58String(fV)
801- if ((dq != toBase58String(dn)))
821+ let dp = toBase58String(gb)
822+ if ((dt != toBase58String(dq)))
802823 then throw("Wrong LP")
803824 else {
804- let dx = bX(dr)
805- let dz = bX(ds)
806- let fZ = {
807- let be = invoke(this, "getOneTknV2READONLY", [fR, dT], nil)
825+ let dA = ca(du)
826+ let dC = ca(dv)
827+ let gf = {
828+ let be = invoke(this, "getOneTknV2READONLY", [fX, dW], nil)
808829 if ($isInstanceOf(be, "(Int, Int)"))
809830 then be
810831 else throw(($getType(be) + " couldn't be cast to (Int, Int)"))
811832 }
812- if ((fZ == fZ))
833+ if ((gf == gf))
813834 then {
814- let cH = fZ._2
815- let ga = fZ._1
816- let gb = if (if ((fS > 0))
817- then (fS > ga)
835+ let cK = gf._2
836+ let gg = gf._1
837+ let gh = if (if ((fY > 0))
838+ then (fY > gg)
818839 else false)
819- then ba(makeString(["amount to receive is less than ", toString(fS)], ""))
820- else ga
821- let gc = if ((fR == dr))
822- then $Tuple4(gb, 0, ((dx - gb) - cH), dz)
823- else if ((fR == ds))
824- then $Tuple4(0, gb, dx, ((dz - gb) - cH))
840+ then ba(makeString(["amount to receive is less than ", toString(fY)], ""))
841+ else gg
842+ let gi = if ((fX == du))
843+ then $Tuple4(gh, 0, ((dA - gh) - cK), dC)
844+ else if ((fX == dv))
845+ then $Tuple4(0, gh, dA, ((dC - gh) - cK))
825846 else throw("invalid out asset id")
826- let gd = gc._1
827- let ge = gc._2
828- let fI = gc._3
829- let fJ = gc._4
830- let gf = bZ(I(fJ, fX), I(fI, fW))
831- let gg = M(gf, a)
832- let gh = if ((fR == "WAVES"))
847+ let gj = gi._1
848+ let gk = gi._2
849+ let fO = gi._3
850+ let fP = gi._4
851+ let gl = cc(I(fP, gd), I(fO, gc))
852+ let gm = M(gl, a)
853+ let gn = if ((fX == "WAVES"))
833854 then unit
834- else fromBase58String(fR)
835- let gi = if ((cH > 0))
836- then [ScriptTransfer(bj, cH, gh)]
855+ else fromBase58String(fX)
856+ let go = if ((cK > 0))
857+ then [ScriptTransfer(bm, cK, gn)]
837858 else nil
838- let dJ = ([ScriptTransfer(dp, gb, gh), StringEntry(aj(toString(dp), dm), bT(gd, ge, dT, gg, height, lastBlock.timestamp)), IntegerEntry(ac(), gg), IntegerEntry(ad(height, lastBlock.timestamp), gg)] ++ gi)
839- if ((dJ == dJ))
859+ let dM = ([ScriptTransfer(ds, gh, gn), StringEntry(aj(toString(ds), dp), bW(gj, gk, dW, gm, height, lastBlock.timestamp)), IntegerEntry(ac(), gm), IntegerEntry(ad(height, lastBlock.timestamp), gm)] ++ go)
860+ if ((dM == dM))
840861 then {
841- let gj = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
842- if ((gj == gj))
862+ let gp = invoke(aU, "burn", [dW], [AttachedPayment(dq, dW)])
863+ if ((gp == gp))
843864 then {
844- let gk = {
845- let gl = if ((this == bj))
865+ let gq = {
866+ let gr = if ((this == bm))
846867 then 0
847- else cH
848- let gm = if ((bo(fR) == by))
868+ else cK
869+ let gs = if ((br(fX) == bB))
849870 then true
850871 else false
851- if (gm)
852- then $Tuple2(-((ga + gl)), 0)
853- else $Tuple2(0, -((ga + gl)))
872+ if (gs)
873+ then $Tuple2(-((gg + gr)), 0)
874+ else $Tuple2(0, -((gg + gr)))
854875 }
855- let eZ = gk._1
856- let fa = gk._2
857- let gn = eY(eZ, fa, 0)
858- let go = gn._1
859- let eP = gn._2
860- let gp = fc(eX, eP)
861- if ((gp == gp))
862- then $Tuple2((dJ ++ go), gb)
876+ let fd = gq._1
877+ let fe = gq._2
878+ let gt = fc(fd, fe, 0)
879+ let gu = gt._1
880+ let eT = gt._2
881+ let gv = fg(fb, eT)
882+ if ((gv == gv))
883+ then $Tuple2((dM ++ gu), gh)
863884 else throw("Strict value is not equal to itself.")
864885 }
865886 else throw("Strict value is not equal to itself.")
873894 }
874895
875896
876-func gq () = {
877- let gr = aS()
878- let aQ = getString(gr, aa())
897+func gw () = {
898+ let gx = aS()
899+ let aQ = getString(gx, aa())
879900 if ($isInstanceOf(aQ, "String"))
880901 then {
881902 let aV = aQ
887908 }
888909
889910
890-let gs = throw("Permission denied")
911+let gy = throw("Permission denied")
891912
892-func gt (cX) = {
893- let aQ = gq()
913+func gz (da) = {
914+ let aQ = gw()
894915 if ($isInstanceOf(aQ, "ByteVector"))
895916 then {
896- let gu = aQ
897- (cX.callerPublicKey == gu)
917+ let gA = aQ
918+ (da.callerPublicKey == gA)
898919 }
899920 else if ($isInstanceOf(aQ, "Unit"))
900- then (cX.caller == this)
921+ then (da.caller == this)
901922 else throw("Match error")
902923 }
903924
904925
905-func gv (cX) = {
906- let aQ = gq()
926+func gB (da) = {
927+ let aQ = gw()
907928 if ($isInstanceOf(aQ, "ByteVector"))
908929 then {
909- let gu = aQ
910- if ((cX.callerPublicKey == gu))
930+ let gA = aQ
931+ if ((da.callerPublicKey == gA))
911932 then true
912- else gs
933+ else gy
913934 }
914935 else if ($isInstanceOf(aQ, "Unit"))
915- then if ((cX.caller == this))
936+ then if ((da.caller == this))
916937 then true
917- else gs
938+ else gy
918939 else throw("Match error")
919940 }
920941
921942
922-func gw (gx,ez,gy) = {
923- let bs = bk()
924- let dr = bs[x]
925- let ds = bs[y]
926- let eA = g
927- let eC = parseBigIntValue(m)
928- let aR = (parseBigIntValue(bg) * eC)
929- let cJ = if ((gx == false))
930- then [(toBigInt(bX(dr)) + gy), toBigInt(bX(ds))]
931- else [(toBigInt(bX(ds)) + gy), toBigInt(bX(dr))]
932- let eB = cJ[0]
933- let aV = eB
934- let cM = (aR * eA)
935- let eD = (((((ez * ez) / (eB * eA)) * ez) * eC) / (cM * eA))
936- let eE = ((aV + ((ez * eC) / cM)) - ez)
937- func cV (cW,eF) = {
938- let gz = cW
939- let eH = gz._1
940- let dk = gz._2
941- if ((dk != unit))
942- then cW
943+func gC (gD,eD,gE) = {
944+ let bv = bn()
945+ let du = bv[x]
946+ let dv = bv[y]
947+ let eE = g
948+ let eG = parseBigIntValue(m)
949+ let aR = (parseBigIntValue(bj) * eG)
950+ let cM = if ((gD == false))
951+ then [(toBigInt(ca(du)) + gE), toBigInt(ca(dv))]
952+ else [(toBigInt(ca(dv)) + gE), toBigInt(ca(du))]
953+ let eF = cM[0]
954+ let aV = eF
955+ let cP = (aR * eE)
956+ let eH = (((((eD * eD) / (eF * eE)) * eD) * eG) / (cP * eE))
957+ let eI = ((aV + ((eD * eG) / cP)) - eD)
958+ func cY (cZ,eJ) = {
959+ let gF = cZ
960+ let eL = gF._1
961+ let dn = gF._2
962+ if ((dn != unit))
963+ then cZ
943964 else {
944- let eI = (((eH * eH) + eD) / ((g * eH) + eE))
945- let eJ = Y((eI - value(eH)))
946- if ((f >= eJ))
947- then $Tuple2(eI, eF)
948- else $Tuple2(eI, unit)
965+ let eM = (((eL * eL) + eH) / ((g * eL) + eI))
966+ let eN = Y((eM - value(eL)))
967+ if ((f >= eN))
968+ then $Tuple2(eM, eJ)
969+ else $Tuple2(eM, unit)
949970 }
950971 }
951972
952- let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
953- let gA = {
954- let dd = db
955- let de = size(dd)
956- let df = $Tuple2(ez, unit)
957- func dg (dh,di) = if ((di >= de))
958- then dh
959- else cV(dh, dd[di])
973+ let de = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
974+ let gG = {
975+ let dg = de
976+ let dh = size(dg)
977+ let di = $Tuple2(eD, unit)
978+ func dj (dk,dl) = if ((dl >= dh))
979+ then dk
980+ else cY(dk, dg[dl])
960981
961- func dj (dh,di) = if ((di >= de))
962- then dh
982+ func dm (dk,dl) = if ((dl >= dh))
983+ then dk
963984 else throw("List size exceeds 15")
964985
965- dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
986+ dm(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(di, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
966987 }
967- let eH = gA._1
968- let dk = gA._2
969- if ((dk != unit))
970- then eH
971- else throw(("Y calculation error, Y = " + toString(eH)))
988+ let eL = gG._1
989+ let dn = gG._2
990+ if ((dn != unit))
991+ then eL
992+ else throw(("Y calculation error, Y = " + toString(eL)))
972993 }
973994
974995
975-func gB () = valueOrElse(getBoolean(aU, aH(toString(this))), false)
996+func gH () = valueOrElse(getBoolean(aU, aH(toString(this))), false)
976997
977998
978-@Callable(cX)
979-func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
980- let gE = if ((gx == false))
999+@Callable(da)
1000+func calculateAmountOutForSwapREADONLY (gI,gD,gJ) = {
1001+ let gK = if ((gD == false))
9811002 then {
982- let gF = aW(this, al())
983- let gy = (toBigInt(bX(aW(this, ak()))) + toBigInt(gC))
984- $Tuple2(gF, gy)
1003+ let gL = aW(this, al())
1004+ let gE = (toBigInt(ca(aW(this, ak()))) + toBigInt(gI))
1005+ $Tuple2(gL, gE)
9851006 }
9861007 else {
987- let gF = aW(this, ak())
988- let gy = (toBigInt(bX(aW(this, al()))) + toBigInt(gC))
989- $Tuple2(gF, gy)
1008+ let gL = aW(this, ak())
1009+ let gE = (toBigInt(ca(aW(this, al()))) + toBigInt(gI))
1010+ $Tuple2(gL, gE)
9901011 }
991- let gF = gE._1
992- let gy = gE._2
993- let bs = bk()
994- let dr = bs[x]
995- let ds = bs[y]
996- let cJ = [toBigInt(bX(dr)), toBigInt(bX(ds))]
997- let ez = cI(cJ)
998- let eH = gw(gx, ez, toBigInt(gC))
999- let gG = ((toBigInt(bX(gF)) - eH) - toBigInt(1))
1000- let gH = max([0, toInt(gG)])
1001- let gI = if ((gx == false))
1002- then [((toBigInt(bX(dr)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bX(ds)) - gG)]
1003- else [(toBigInt(bX(dr)) - gG), ((toBigInt(bX(ds)) + toBigInt(gC)) + toBigInt(gD))]
1004- let gJ = cI(gI)
1005- let ee = if ((gJ >= ez))
1012+ let gL = gK._1
1013+ let gE = gK._2
1014+ let bv = bn()
1015+ let du = bv[x]
1016+ let dv = bv[y]
1017+ let cM = [toBigInt(ca(du)), toBigInt(ca(dv))]
1018+ let eD = cL(cM)
1019+ let eL = gC(gD, eD, toBigInt(gI))
1020+ let gM = ((toBigInt(ca(gL)) - eL) - toBigInt(1))
1021+ let gN = max([0, toInt(gM)])
1022+ let gO = if ((gD == false))
1023+ then [((toBigInt(ca(du)) + toBigInt(gI)) + toBigInt(gJ)), (toBigInt(ca(dv)) - gM)]
1024+ else [(toBigInt(ca(du)) - gM), ((toBigInt(ca(dv)) + toBigInt(gI)) + toBigInt(gJ))]
1025+ let gP = cL(gO)
1026+ let ei = if ((gP >= eD))
10061027 then true
1007- else throw(makeString(["new D is fewer error", toString(ez), toString(gJ)], "__"))
1008- if ((ee == ee))
1009- then $Tuple2(nil, gH)
1028+ else throw(makeString(["new D is fewer error", toString(eD), toString(gP)], "__"))
1029+ if ((ei == ei))
1030+ then $Tuple2(nil, gN)
10101031 else throw("Strict value is not equal to itself.")
10111032 }
10121033
10131034
10141035
1015-@Callable(cX)
1016-func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1017- let gM = {
1036+@Callable(da)
1037+func calculateAmountOutForSwapAndSendTokens (gI,gD,gQ,gR,gJ) = {
1038+ let gS = {
10181039 let be = invoke(aU, "getSwapContractREADONLY", nil, nil)
10191040 if ($isInstanceOf(be, "String"))
10201041 then be
10211042 else throw(($getType(be) + " couldn't be cast to String"))
10221043 }
1023- let gN = {
1044+ let gT = {
10241045 let be = invoke(aU, "isPoolSwapDisabledREADONLY", [toString(this)], nil)
10251046 if ($isInstanceOf(be, "Boolean"))
10261047 then be
10271048 else throw(($getType(be) + " couldn't be cast to Boolean"))
10281049 }
1029- let gO = if (if (bh())
1050+ let gU = if (!(bi(da.caller)))
1051+ then if (if (bk())
1052+ then true
1053+ else (bz == t))
1054+ then true
1055+ else gT
1056+ else false
1057+ let gV = [if (if (!(gU))
10301058 then true
1031- else (bw == t))
1059+ else gz(da))
10321060 then true
1033- else gN
1034- let gP = [if (if (!(gO))
1061+ else ba("swap operation is blocked by admin"), if ((value(da.payments[0]).amount >= gI))
10351062 then true
1036- else gt(cX))
1037- then true
1038- else ba("swap operation is blocked by admin"), if ((value(cX.payments[0]).amount >= gC))
1039- then true
1040- else ba("Wrong amount"), if ((cX.caller == addressFromStringValue(gM)))
1063+ else ba("Wrong amount"), if ((da.caller == addressFromStringValue(gS)))
10411064 then true
10421065 else ba("Permission denied")]
1043- if ((gP == gP))
1066+ if ((gV == gV))
10441067 then {
1045- let fq = value(cX.payments[0])
1046- let gQ = bq(fq.assetId)
1047- let gR = if ((gx == false))
1068+ let fu = value(da.payments[0])
1069+ let gW = bt(fu.assetId)
1070+ let gX = if ((gD == false))
10481071 then {
1049- let gF = aW(this, al())
1050- let gy = (bX(gQ) - value(cX.payments[0]).amount)
1051- $Tuple2(gF, gy)
1072+ let gL = aW(this, al())
1073+ let gE = (ca(gW) - value(da.payments[0]).amount)
1074+ $Tuple2(gL, gE)
10521075 }
10531076 else {
1054- let gF = aW(this, ak())
1055- let gy = (bX(gQ) - value(cX.payments[0]).amount)
1056- $Tuple2(gF, gy)
1077+ let gL = aW(this, ak())
1078+ let gE = (ca(gW) - value(da.payments[0]).amount)
1079+ $Tuple2(gL, gE)
10571080 }
1058- let gF = gR._1
1059- let gy = gR._2
1060- let bs = bk()
1061- let dr = bs[x]
1062- let ds = bs[y]
1063- let cJ = if ((gx == false))
1064- then [(toBigInt(bX(dr)) - toBigInt(value(cX.payments[0]).amount)), toBigInt(bX(ds))]
1065- else [toBigInt(bX(dr)), (toBigInt(bX(ds)) - toBigInt(value(cX.payments[0]).amount))]
1066- let ez = cI(cJ)
1067- let eH = gw(gx, ez, toBigInt(0))
1068- let gG = ((toBigInt(bX(gF)) - eH) - toBigInt(1))
1069- let gH = max([0, toInt(gG)])
1070- let gS = if ((gH >= gK))
1081+ let gL = gX._1
1082+ let gE = gX._2
1083+ let bv = bn()
1084+ let du = bv[x]
1085+ let dv = bv[y]
1086+ let cM = if ((gD == false))
1087+ then [(toBigInt(ca(du)) - toBigInt(value(da.payments[0]).amount)), toBigInt(ca(dv))]
1088+ else [toBigInt(ca(du)), (toBigInt(ca(dv)) - toBigInt(value(da.payments[0]).amount))]
1089+ let eD = cL(cM)
1090+ let eL = gC(gD, eD, toBigInt(0))
1091+ let gM = ((toBigInt(ca(gL)) - eL) - toBigInt(1))
1092+ let gN = max([0, toInt(gM)])
1093+ let gY = if ((gN >= gQ))
10711094 then true
10721095 else throw("Exchange result is fewer coins than expected")
1073- if ((gS == gS))
1096+ if ((gY == gY))
10741097 then {
1075- let gI = if ((gx == false))
1076- then [(toBigInt(bX(dr)) + toBigInt(gD)), (toBigInt(bX(ds)) - gG)]
1077- else [(toBigInt(bX(dr)) - gG), (toBigInt(bX(ds)) + toBigInt(gD))]
1078- let gJ = cI(gI)
1079- let ee = if ((gJ >= ez))
1098+ let gO = if ((gD == false))
1099+ then [(toBigInt(ca(du)) + toBigInt(gJ)), (toBigInt(ca(dv)) - gM)]
1100+ else [(toBigInt(ca(du)) - gM), (toBigInt(ca(dv)) + toBigInt(gJ))]
1101+ let gP = cL(gO)
1102+ let ei = if ((gP >= eD))
10801103 then true
10811104 else throw("new D is fewer error")
1082- if ((ee == ee))
1105+ if ((ei == ei))
10831106 then {
1084- let eZ = if (gx)
1085- then -(gH)
1086- else gD
1087- let fa = if (gx)
1088- then gD
1089- else -(gH)
1090- let go = eY(eZ, fa, 0)._1
1091- if ((go == go))
1092- then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bo(gF))], gH)
1107+ let fd = if (gD)
1108+ then -(gN)
1109+ else gJ
1110+ let fe = if (gD)
1111+ then gJ
1112+ else -(gN)
1113+ let gu = fc(fd, fe, 0)._1
1114+ if ((gu == gu))
1115+ then $Tuple2([ScriptTransfer(addressFromStringValue(gR), gN, br(gL))], gN)
10931116 else throw("Strict value is not equal to itself.")
10941117 }
10951118 else throw("Strict value is not equal to itself.")
11011124
11021125
11031126
1104-@Callable(cX)
1127+@Callable(da)
11051128 func constructor (Z) = {
1106- let eD = gv(cX)
1107- if ((eD == eD))
1129+ let eH = gB(da)
1130+ if ((eH == eH))
11081131 then [StringEntry(Z(), Z)]
11091132 else throw("Strict value is not equal to itself.")
11101133 }
11111134
11121135
11131136
1114-@Callable(cX)
1115-func put (gT,gU) = {
1116- let gV = bC()
1117- let gW = valueOrErrorMessage(addressFromString(gV[D]), "Wr st addr")
1118- let gX = valueOrErrorMessage(addressFromString(gV[F]), "Wr sl addr")
1119- if ((0 > gT))
1137+@Callable(da)
1138+func put (gZ,ha) = {
1139+ let hb = bF()
1140+ let hc = valueOrErrorMessage(addressFromString(hb[D]), "Wr st addr")
1141+ let hd = valueOrErrorMessage(addressFromString(hb[F]), "Wr sl addr")
1142+ if ((0 > gZ))
11201143 then throw("Wrong slippage")
1121- else if ((size(cX.payments) != 2))
1144+ else if ((size(da.payments) != 2))
11221145 then throw("2 pmnts expd")
11231146 else {
1124- let gY = toBigInt(value(cX.payments[0]).amount)
1125- let gZ = toBigInt(value(cX.payments[1]).amount)
1126- let eU = (toBigInt(bX(bq(by))) - gY)
1127- if ((eU == eU))
1147+ let he = toBigInt(value(da.payments[0]).amount)
1148+ let hf = toBigInt(value(da.payments[1]).amount)
1149+ let eY = (toBigInt(ca(bt(bB))) - he)
1150+ if ((eY == eY))
11281151 then {
1129- let eV = (toBigInt(bX(bq(bz))) - gZ)
1130- if ((eV == eV))
1152+ let eZ = (toBigInt(ca(bt(bC))) - hf)
1153+ if ((eZ == eZ))
11311154 then {
1132- let eW = toBigInt(value(assetInfo(bx)).quantity)
1133- if ((eW == eW))
1155+ let fa = toBigInt(value(assetInfo(bA)).quantity)
1156+ if ((fa == fa))
11341157 then {
1135- let eX = eQ(gY, gZ, toBigInt(0))
1136- if ((eX == eX))
1158+ let fb = eU(he, hf, toBigInt(0))
1159+ if ((fb == fb))
11371160 then {
1138- let ha = fr(toString(cX.caller), toBase58String(cX.transactionId), AttachedPayment(value(cX.payments[0]).assetId, value(cX.payments[0]).amount), cX.payments[1], gT, true, false, true, 0, "")
1139- let er = ha._2
1140- let hb = ha._7
1141- let dJ = ha._9
1142- let es = ha._10
1143- let et = ha._11
1144- let dr = ha._12
1145- let ds = ha._13
1146- let ed = invoke(aU, "emit", [er], nil)
1147- if ((ed == ed))
1161+ let hg = fw(toString(da.caller), toBase58String(da.transactionId), AttachedPayment(value(da.payments[0]).assetId, value(da.payments[0]).amount), da.payments[1], gZ, true, false, true, 0, "")
1162+ let ev = hg._2
1163+ let hh = hg._7
1164+ let dM = hg._9
1165+ let ew = hg._10
1166+ let ex = hg._11
1167+ let du = hg._12
1168+ let dv = hg._13
1169+ let eh = invoke(aU, "emit", [ev], nil)
1170+ if ((eh == eh))
11481171 then {
1149- let hc = {
1150- let aQ = ed
1172+ let hi = {
1173+ let aQ = eh
11511174 if ($isInstanceOf(aQ, "Address"))
11521175 then {
1153- let hd = aQ
1154- invoke(hd, "emit", [er], nil)
1176+ let hj = aQ
1177+ invoke(hj, "emit", [ev], nil)
11551178 }
11561179 else unit
11571180 }
1158- if ((hc == hc))
1181+ if ((hi == hi))
11591182 then {
1160- let he = if ((es > 0))
1161- then invoke(gX, "put", nil, [AttachedPayment(dr, es)])
1183+ let hk = if ((ew > 0))
1184+ then invoke(hd, "put", nil, [AttachedPayment(du, ew)])
11621185 else nil
1163- if ((he == he))
1186+ if ((hk == hk))
11641187 then {
1165- let hf = if ((et > 0))
1166- then invoke(gX, "put", nil, [AttachedPayment(ds, et)])
1188+ let hl = if ((ex > 0))
1189+ then invoke(hd, "put", nil, [AttachedPayment(dv, ex)])
11671190 else nil
1168- if ((hf == hf))
1191+ if ((hl == hl))
11691192 then {
1170- let hg = if (gU)
1193+ let hm = if (ha)
11711194 then {
1172- let hh = invoke(gW, "stake", nil, [AttachedPayment(hb, er)])
1173- if ((hh == hh))
1195+ let hn = invoke(hc, "stake", nil, [AttachedPayment(hh, ev)])
1196+ if ((hn == hn))
11741197 then nil
11751198 else throw("Strict value is not equal to itself.")
11761199 }
1177- else [ScriptTransfer(cX.caller, er, hb)]
1178- let hi = eY(0, 0, 0)
1179- let go = hi._1
1180- let eP = hi._2
1181- let hj = if ((eP >= eX))
1200+ else [ScriptTransfer(da.caller, ev, hh)]
1201+ let ho = fc(0, 0, 0)
1202+ let gu = ho._1
1203+ let eT = ho._2
1204+ let hp = if ((eT >= fb))
11821205 then true
1183- else ba(makeString(["updated DLp lower than current DLp", toString(eU), toString(eV), toString(eW), toString(eX), toString(eP), toString(es), toString(et)], " "))
1184- if ((hj == hj))
1206+ else ba(makeString(["updated DLp lower than current DLp", toString(eY), toString(eZ), toString(fa), toString(fb), toString(eT), toString(ew), toString(ex)], " "))
1207+ if ((hp == hp))
11851208 then {
1186- let hk = value(assetInfo(bx)).quantity
1187- if ((hk == hk))
1188- then ((dJ ++ hg) ++ go)
1209+ let hq = value(assetInfo(bA)).quantity
1210+ if ((hq == hq))
1211+ then ((dM ++ hm) ++ gu)
11891212 else throw("Strict value is not equal to itself.")
11901213 }
11911214 else throw("Strict value is not equal to itself.")
12101233
12111234
12121235
1213-@Callable(cX)
1214-func putOneTknV2 (fS,gU) = {
1215- let hl = {
1236+@Callable(da)
1237+func putOneTknV2 (fY,ha) = {
1238+ let hr = {
12161239 let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12171240 if ($isInstanceOf(be, "Boolean"))
12181241 then be
12191242 else throw(($getType(be) + " couldn't be cast to Boolean"))
12201243 }
1221- let hm = if (if (if (bh())
1244+ let fA = if (!(bi(da.caller)))
1245+ then if (if (if (bk())
1246+ then true
1247+ else (bz == r))
1248+ then true
1249+ else (bz == t))
1250+ then true
1251+ else hr
1252+ else false
1253+ let gV = [if (if (!(fA))
12221254 then true
1223- else (bw == r))
1255+ else gz(da))
12241256 then true
1225- else (bw == t))
1226- then true
1227- else hl
1228- let gP = [if (if (!(hm))
1229- then true
1230- else gt(cX))
1231- then true
1232- else ba("put operation is blocked by admin"), if ((size(cX.payments) == 1))
1257+ else ba("put operation is blocked by admin"), if ((size(da.payments) == 1))
12331258 then true
12341259 else ba("exactly 1 payment are expected")]
1235- if ((gP == gP))
1260+ if ((gV == gV))
12361261 then {
1237- let dr = toBase58String(value(by))
1238- let ds = toBase58String(value(bz))
1239- let dq = bx
1240- let fW = bA
1241- let fX = bB
1242- let dp = if ((cX.caller == this))
1243- then cX.originCaller
1244- else cX.caller
1245- let fq = value(cX.payments[0])
1246- let dn = toBase58String(value(fq.assetId))
1247- let dT = fq.amount
1248- let eX = if ((fq.assetId == by))
1249- then eQ(toBigInt(dT), toBigInt(0), toBigInt(0))
1250- else eQ(toBigInt(0), toBigInt(dT), toBigInt(0))
1251- if ((eX == eX))
1262+ let du = toBase58String(value(bB))
1263+ let dv = toBase58String(value(bC))
1264+ let dt = bA
1265+ let gc = bD
1266+ let gd = bE
1267+ let ds = if ((da.caller == this))
1268+ then da.originCaller
1269+ else da.caller
1270+ let fu = value(da.payments[0])
1271+ let dq = toBase58String(value(fu.assetId))
1272+ let dW = fu.amount
1273+ let fb = if ((fu.assetId == bB))
1274+ then eU(toBigInt(dW), toBigInt(0), toBigInt(0))
1275+ else eU(toBigInt(0), toBigInt(dW), toBigInt(0))
1276+ if ((fb == fb))
12521277 then {
1253- let hn = fv(dT, dn, toString(dp), toBase58String(cX.transactionId), true)
1254- if ((hn == hn))
1278+ let hs = fB(dW, dq, toString(ds), toBase58String(da.transactionId), true)
1279+ if ((hs == hs))
12551280 then {
1256- let cH = hn._3
1257- let dJ = hn._2
1258- let ho = hn._1
1259- let er = if (if ((fS > 0))
1260- then (fS > ho)
1281+ let cK = hs._3
1282+ let dM = hs._2
1283+ let ht = hs._1
1284+ let ev = if (if ((fY > 0))
1285+ then (fY > ht)
12611286 else false)
1262- then ba(makeString(["amount to receive is less than ", toString(fS)], ""))
1263- else ho
1264- let ha = invoke(aU, "emit", [er], nil)
1265- if ((ha == ha))
1287+ then ba(makeString(["amount to receive is less than ", toString(fY)], ""))
1288+ else ht
1289+ let hg = invoke(aU, "emit", [ev], nil)
1290+ if ((hg == hg))
12661291 then {
1267- let hc = {
1268- let aQ = ha
1292+ let hi = {
1293+ let aQ = hg
12691294 if ($isInstanceOf(aQ, "Address"))
12701295 then {
1271- let hd = aQ
1272- invoke(hd, "emit", [er], nil)
1296+ let hj = aQ
1297+ invoke(hj, "emit", [ev], nil)
12731298 }
12741299 else unit
12751300 }
1276- if ((hc == hc))
1301+ if ((hi == hi))
12771302 then {
1278- let hg = if (gU)
1303+ let hm = if (ha)
12791304 then {
1280- let hh = invoke(bE, "stakeFor", [toString(cX.caller)], [AttachedPayment(dq, er)])
1281- if ((hh == hh))
1305+ let hn = invoke(bH, "stakeFor", [toString(da.caller)], [AttachedPayment(dt, ev)])
1306+ if ((hn == hn))
12821307 then nil
12831308 else throw("Strict value is not equal to itself.")
12841309 }
1285- else [ScriptTransfer(cX.caller, er, dq)]
1286- let gi = if ((cH > 0))
1287- then [ScriptTransfer(bj, cH, fromBase58String(dn))]
1310+ else [ScriptTransfer(da.caller, ev, dt)]
1311+ let go = if ((cK > 0))
1312+ then [ScriptTransfer(bm, cK, fromBase58String(dq))]
12881313 else nil
1289- let hp = if ((this == bj))
1314+ let hu = if ((this == bm))
12901315 then $Tuple2(0, 0)
12911316 else {
1292- let hq = if ((fq.assetId == by))
1317+ let hv = if ((fu.assetId == bB))
12931318 then true
12941319 else false
1295- if (hq)
1296- then $Tuple2(-(cH), 0)
1297- else $Tuple2(0, -(cH))
1320+ if (hv)
1321+ then $Tuple2(-(cK), 0)
1322+ else $Tuple2(0, -(cK))
12981323 }
1299- let eZ = hp._1
1300- let fa = hp._2
1301- let hr = eY(eZ, fa, 0)
1302- let go = hr._1
1303- let eP = hr._2
1304- let gp = fc(eX, eP)
1305- if ((gp == gp))
1306- then $Tuple2((((dJ ++ hg) ++ gi) ++ go), er)
1324+ let fd = hu._1
1325+ let fe = hu._2
1326+ let hw = fc(fd, fe, 0)
1327+ let gu = hw._1
1328+ let eT = hw._2
1329+ let gv = fg(fb, eT)
1330+ if ((gv == gv))
1331+ then $Tuple2((((dM ++ hm) ++ go) ++ gu), ev)
13071332 else throw("Strict value is not equal to itself.")
13081333 }
13091334 else throw("Strict value is not equal to itself.")
13191344
13201345
13211346
1322-@Callable(cX)
1323-func putForFree (hs) = if ((0 > hs))
1347+@Callable(da)
1348+func putForFree (hx) = if ((0 > hx))
13241349 then throw("Wrong slpg")
1325- else if ((size(cX.payments) != 2))
1350+ else if ((size(da.payments) != 2))
13261351 then throw("2 pmnts expd")
13271352 else {
1328- let ht = fr(toString(cX.caller), toBase58String(cX.transactionId), AttachedPayment(value(cX.payments[0]).assetId, value(cX.payments[0]).amount), cX.payments[1], hs, false, false, true, 0, "")
1329- let dJ = ht._9
1330- let gY = toBigInt(value(cX.payments[0]).amount)
1331- let gZ = toBigInt(value(cX.payments[1]).amount)
1332- let eX = eQ(gY, gZ, toBigInt(0))
1333- if ((eX == eX))
1353+ let hy = fw(toString(da.caller), toBase58String(da.transactionId), AttachedPayment(value(da.payments[0]).assetId, value(da.payments[0]).amount), da.payments[1], hx, false, false, true, 0, "")
1354+ let dM = hy._9
1355+ let he = toBigInt(value(da.payments[0]).amount)
1356+ let hf = toBigInt(value(da.payments[1]).amount)
1357+ let fb = eU(he, hf, toBigInt(0))
1358+ if ((fb == fb))
13341359 then {
1335- let hu = eY(0, 0, 0)
1336- let go = hu._1
1337- let eP = hu._2
1338- let gp = fc(eX, eP)
1339- if ((gp == gp))
1340- then (dJ ++ go)
1360+ let hz = fc(0, 0, 0)
1361+ let gu = hz._1
1362+ let eT = hz._2
1363+ let gv = fg(fb, eT)
1364+ if ((gv == gv))
1365+ then (dM ++ gu)
13411366 else throw("Strict value is not equal to itself.")
13421367 }
13431368 else throw("Strict value is not equal to itself.")
13451370
13461371
13471372
1348-@Callable(cX)
1373+@Callable(da)
13491374 func get () = {
1350- let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1351- if ((eX == eX))
1375+ let fb = eU(toBigInt(0), toBigInt(0), toBigInt(0))
1376+ if ((fb == fb))
13521377 then {
1353- let ed = fp(cX)
1354- let hv = ed._1
1355- let dI = ed._2
1356- let dT = ed._3
1357- let dn = ed._4
1358- let dJ = ed._5
1359- let eE = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
1360- if ((eE == eE))
1378+ let eh = ft(da)
1379+ let hA = eh._1
1380+ let dL = eh._2
1381+ let dW = eh._3
1382+ let dq = eh._4
1383+ let dM = eh._5
1384+ let eI = invoke(aU, "burn", [dW], [AttachedPayment(dq, dW)])
1385+ if ((eI == eI))
13611386 then {
1362- let hw = eY(-(hv), -(dI), 0)
1363- let go = hw._1
1364- let eP = hw._2
1365- let gp = fc(eX, eP)
1366- if ((gp == gp))
1367- then (dJ ++ go)
1387+ let hB = fc(-(hA), -(dL), 0)
1388+ let gu = hB._1
1389+ let eT = hB._2
1390+ let gv = fg(fb, eT)
1391+ if ((gv == gv))
1392+ then (dM ++ gu)
13681393 else throw("Strict value is not equal to itself.")
13691394 }
13701395 else throw("Strict value is not equal to itself.")
13741399
13751400
13761401
1377-@Callable(cX)
1378-func getOneTknV2 (fR,fS) = {
1379- let hl = {
1402+@Callable(da)
1403+func getOneTknV2 (fX,fY) = {
1404+ let hr = {
13801405 let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13811406 if ($isInstanceOf(be, "Boolean"))
13821407 then be
13831408 else throw(($getType(be) + " couldn't be cast to Boolean"))
13841409 }
1385- let hx = if (if (bh())
1410+ let fv = if (!(bi(da.caller)))
1411+ then if (if (bk())
1412+ then true
1413+ else (bz == t))
1414+ then true
1415+ else hr
1416+ else false
1417+ let gV = [if (if (!(fv))
13861418 then true
1387- else (bw == t))
1419+ else gz(da))
13881420 then true
1389- else hl
1390- let gP = [if (if (!(hx))
1391- then true
1392- else gt(cX))
1393- then true
1394- else ba("get operation is blocked by admin"), if ((size(cX.payments) == 1))
1421+ else ba("get operation is blocked by admin"), if ((size(da.payments) == 1))
13951422 then true
13961423 else ba("exactly 1 payment are expected")]
1397- if ((gP == gP))
1424+ if ((gV == gV))
13981425 then {
1399- let hy = fQ(fR, fS, cX.payments, cX.caller, cX.originCaller, cX.transactionId)
1400- let dJ = hy._1
1401- let gb = hy._2
1402- $Tuple2(dJ, gb)
1426+ let hC = fW(fX, fY, da.payments, da.caller, da.originCaller, da.transactionId)
1427+ let dM = hC._1
1428+ let gh = hC._2
1429+ $Tuple2(dM, gh)
14031430 }
14041431 else throw("Strict value is not equal to itself.")
14051432 }
14061433
14071434
14081435
1409-@Callable(cX)
1436+@Callable(da)
14101437 func refreshDLp () = {
1411- let hz = valueOrElse(getInteger(at), 0)
1412- let hA = if (((height - hz) >= aw))
1438+ let hD = valueOrElse(getInteger(at), 0)
1439+ let hE = if (((height - hD) >= aw))
14131440 then unit
14141441 else ba(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1415- if ((hA == hA))
1442+ if ((hE == hE))
14161443 then {
1417- let fj = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), bc("invalid dLp"))
1418- let hB = eY(0, 0, 0)
1419- let hC = hB._1
1420- let eP = hB._2
1421- let fb = if ((fj != eP))
1422- then hC
1444+ let fn = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), bc("invalid dLp"))
1445+ let hF = fc(0, 0, 0)
1446+ let hG = hF._1
1447+ let eT = hF._2
1448+ let ff = if ((fn != eT))
1449+ then hG
14231450 else ba("nothing to refresh")
1424- $Tuple2(fb, toString(eP))
1451+ $Tuple2(ff, toString(eT))
14251452 }
14261453 else throw("Strict value is not equal to itself.")
14271454 }
14281455
14291456
14301457
1431-@Callable(cX)
1432-func getOneTknV2READONLY (fR,hD) = {
1433- let dr = toBase58String(value(by))
1434- let ds = toBase58String(value(bz))
1435- let dq = toBase58String(value(bx))
1436- let cJ = [toBigInt(bX(dr)), toBigInt(bX(ds))]
1437- let eO = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dq)), "invalid lp asset").quantity)
1438- let cl = cI(cJ)
1439- let ck = (cl - fraction(toBigInt(hD), cl, eO))
1440- let hE = if ((fR == dr))
1458+@Callable(da)
1459+func getOneTknV2READONLY (fX,hH) = {
1460+ let du = toBase58String(value(bB))
1461+ let dv = toBase58String(value(bC))
1462+ let dt = toBase58String(value(bA))
1463+ let cM = [toBigInt(ca(du)), toBigInt(ca(dv))]
1464+ let eS = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dt)), "invalid lp asset").quantity)
1465+ let co = cL(cM)
1466+ let cn = (co - fraction(toBigInt(hH), co, eS))
1467+ let hI = if ((fX == du))
14411468 then 0
1442- else if ((fR == ds))
1469+ else if ((fX == dv))
14431470 then 1
14441471 else throw("invalid out asset id")
1445- let hF = ey(cJ, hE, ck)
1446- let gG = (cJ[hE] - hF)
1447- let gH = max([0, toInt((gG - f))])
1448- let hG = cF(gH, bf)
1449- let ga = hG._1
1450- let cH = hG._2
1451- $Tuple2(nil, $Tuple2(ga, cH))
1472+ let hJ = eC(cM, hI, cn)
1473+ let gM = (cM[hI] - hJ)
1474+ let gN = max([0, toInt((gM - f))])
1475+ let hK = cI(gN, bf)
1476+ let gg = hK._1
1477+ let cK = hK._2
1478+ $Tuple2(nil, $Tuple2(gg, cK))
14521479 }
14531480
14541481
14551482
1456-@Callable(cX)
1457-func getOneTknV2WithBonusREADONLY (fR,hD) = {
1458- let dr = toBase58String(value(by))
1459- let ds = toBase58String(value(bz))
1460- let dq = toBase58String(value(bx))
1461- let dx = bX(dr)
1462- let dz = bX(ds)
1463- let hH = {
1464- let be = invoke(this, "getOneTknV2READONLY", [fR, hD], nil)
1483+@Callable(da)
1484+func getOneTknV2WithBonusREADONLY (fX,hH) = {
1485+ let du = toBase58String(value(bB))
1486+ let dv = toBase58String(value(bC))
1487+ let dt = toBase58String(value(bA))
1488+ let dA = ca(du)
1489+ let dC = ca(dv)
1490+ let hL = {
1491+ let be = invoke(this, "getOneTknV2READONLY", [fX, hH], nil)
14651492 if ($isInstanceOf(be, "(Int, Int)"))
14661493 then be
14671494 else throw(($getType(be) + " couldn't be cast to (Int, Int)"))
14681495 }
1469- let ga = hH._1
1470- let cH = hH._2
1471- let ed = dl("", dq, hD, this)
1472- let dH = ed._1
1473- let dI = ed._2
1474- let hI = (dH + dI)
1475- let fP = if ((hI == 0))
1476- then if ((ga == 0))
1496+ let gg = hL._1
1497+ let cK = hL._2
1498+ let eh = do("", dt, hH, this)
1499+ let dK = eh._1
1500+ let dL = eh._2
1501+ let hM = (dK + dL)
1502+ let fV = if ((hM == 0))
1503+ then if ((gg == 0))
14771504 then 0
14781505 else throw("bonus calculation error")
1479- else fraction((ga - hI), a, hI)
1480- $Tuple2(nil, $Tuple3(ga, cH, fP))
1506+ else fraction((gg - hM), a, hM)
1507+ $Tuple2(nil, $Tuple3(gg, cK, fV))
14811508 }
14821509
14831510
14841511
1485-@Callable(cX)
1486-func getNoLess (hJ,hK) = {
1487- let ed = fp(cX)
1488- let dH = ed._1
1489- let dI = ed._2
1490- let dT = ed._3
1491- let dn = ed._4
1492- let dJ = ed._5
1493- if ((hJ > dH))
1494- then throw(((("Failed: " + toString(dH)) + " < ") + toString(hJ)))
1495- else if ((hK > dI))
1496- then throw(((("Failed: " + toString(dI)) + " < ") + toString(hK)))
1512+@Callable(da)
1513+func getNoLess (hN,hO) = {
1514+ let eh = ft(da)
1515+ let dK = eh._1
1516+ let dL = eh._2
1517+ let dW = eh._3
1518+ let dq = eh._4
1519+ let dM = eh._5
1520+ if ((hN > dK))
1521+ then throw(((("Failed: " + toString(dK)) + " < ") + toString(hN)))
1522+ else if ((hO > dL))
1523+ then throw(((("Failed: " + toString(dL)) + " < ") + toString(hO)))
14971524 else {
1498- let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1499- if ((eX == eX))
1525+ let fb = eU(toBigInt(0), toBigInt(0), toBigInt(0))
1526+ if ((fb == fb))
15001527 then {
1501- let hL = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
1502- if ((hL == hL))
1528+ let hP = invoke(aU, "burn", [dW], [AttachedPayment(dq, dW)])
1529+ if ((hP == hP))
15031530 then {
1504- let hM = eY(-(dH), -(dI), 0)
1505- let go = hM._1
1506- let eP = hM._2
1507- let gp = fc(eX, eP)
1508- if ((gp == gp))
1509- then (dJ ++ go)
1531+ let hQ = fc(-(dK), -(dL), 0)
1532+ let gu = hQ._1
1533+ let eT = hQ._2
1534+ let gv = fg(fb, eT)
1535+ if ((gv == gv))
1536+ then (dM ++ gu)
15101537 else throw("Strict value is not equal to itself.")
15111538 }
15121539 else throw("Strict value is not equal to itself.")
15171544
15181545
15191546
1520-@Callable(cX)
1521-func unstakeAndGet (cG) = {
1522- let hN = if ((size(cX.payments) != 0))
1547+@Callable(da)
1548+func unstakeAndGet (cJ) = {
1549+ let hR = if ((size(da.payments) != 0))
15231550 then throw("No pmnts expd")
15241551 else true
1525- if ((hN == hN))
1552+ if ((hR == hR))
15261553 then {
1527- let hO = bC()
1528- let hb = bx
1529- let hP = valueOrErrorMessage(addressFromString(hO[D]), "Wr st addr")
1530- let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1531- if ((eX == eX))
1554+ let hS = bF()
1555+ let hh = bA
1556+ let hT = valueOrErrorMessage(addressFromString(hS[D]), "Wr st addr")
1557+ let fb = eU(toBigInt(0), toBigInt(0), toBigInt(0))
1558+ if ((fb == fb))
15321559 then {
1533- let hQ = invoke(hP, "unstake", [toBase58String(hb), cG], nil)
1534- if ((hQ == hQ))
1560+ let hU = invoke(hT, "unstake", [toBase58String(hh), cJ], nil)
1561+ if ((hU == hU))
15351562 then {
1536- let ed = dl(toBase58String(cX.transactionId), toBase58String(hb), cG, cX.caller)
1537- let dH = ed._1
1538- let dI = ed._2
1539- let dv = parseIntValue(ed._9)
1540- let dJ = ed._10
1541- let hR = if (if (bh())
1542- then true
1543- else (dv == t))
1544- then throw(("Blocked: " + toString(dv)))
1563+ let eh = do(toBase58String(da.transactionId), toBase58String(hh), cJ, da.caller)
1564+ let dK = eh._1
1565+ let dL = eh._2
1566+ let dy = parseIntValue(eh._9)
1567+ let dM = eh._10
1568+ let fv = if (!(bi(da.caller)))
1569+ then if (bk())
1570+ then true
1571+ else (bz == t)
1572+ else false
1573+ let hV = if (fv)
1574+ then throw(("Blocked: " + toString(dy)))
15451575 else true
1546- if ((hR == hR))
1576+ if ((hV == hV))
15471577 then {
1548- let hS = invoke(aU, "burn", [cG], [AttachedPayment(hb, cG)])
1549- if ((hS == hS))
1578+ let hW = invoke(aU, "burn", [cJ], [AttachedPayment(hh, cJ)])
1579+ if ((hW == hW))
15501580 then {
1551- let hT = eY(-(dH), -(dI), 0)
1552- let go = hT._1
1553- let eP = hT._2
1554- let gp = fc(eX, eP)
1555- if ((gp == gp))
1556- then (dJ ++ go)
1581+ let hX = fc(-(dK), -(dL), 0)
1582+ let gu = hX._1
1583+ let eT = hX._2
1584+ let gv = fg(fb, eT)
1585+ if ((gv == gv))
1586+ then (dM ++ gu)
15571587 else throw("Strict value is not equal to itself.")
15581588 }
15591589 else throw("Strict value is not equal to itself.")
15691599
15701600
15711601
1572-@Callable(cX)
1573-func unstakeAndGetNoLess (hU,hV,hK) = {
1574- let hx = if (bh())
1602+@Callable(da)
1603+func unstakeAndGetNoLess (hY,hZ,hO) = {
1604+ let fv = if (!(bi(da.caller)))
1605+ then if (bk())
1606+ then true
1607+ else (bz == t)
1608+ else false
1609+ let gV = [if (!(fv))
15751610 then true
1576- else (bw == t)
1577- let gP = [if (!(hx))
1578- then true
1579- else throw("get operation is blocked by admin"), if ((size(cX.payments) == 0))
1611+ else throw("get operation is blocked by admin"), if ((size(da.payments) == 0))
15801612 then true
15811613 else throw("no payments are expected")]
1582- if ((gP == gP))
1614+ if ((gV == gV))
15831615 then {
1584- let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1585- if ((eX == eX))
1616+ let fb = eU(toBigInt(0), toBigInt(0), toBigInt(0))
1617+ if ((fb == fb))
15861618 then {
1587- let hQ = invoke(bE, "unstake", [toBase58String(bx), hU], nil)
1588- if ((hQ == hQ))
1619+ let hU = invoke(bH, "unstake", [toBase58String(bA), hY], nil)
1620+ if ((hU == hU))
15891621 then {
1590- let hW = dl(toBase58String(cX.transactionId), toBase58String(bx), hU, cX.caller)
1591- let dH = hW._1
1592- let dI = hW._2
1593- let dJ = hW._10
1594- let hX = [if ((dH >= hV))
1622+ let ia = do(toBase58String(da.transactionId), toBase58String(bA), hY, da.caller)
1623+ let dK = ia._1
1624+ let dL = ia._2
1625+ let dM = ia._10
1626+ let ib = [if ((dK >= hZ))
15951627 then true
1596- else throw(makeString(["amount asset amount to receive is less than ", toString(hV)], "")), if ((dI >= hK))
1628+ else throw(makeString(["amount asset amount to receive is less than ", toString(hZ)], "")), if ((dL >= hO))
15971629 then true
1598- else throw(makeString(["price asset amount to receive is less than ", toString(hK)], ""))]
1599- if ((hX == hX))
1630+ else throw(makeString(["price asset amount to receive is less than ", toString(hO)], ""))]
1631+ if ((ib == ib))
16001632 then {
1601- let hL = invoke(aU, "burn", [hU], [AttachedPayment(bx, hU)])
1602- if ((hL == hL))
1633+ let hP = invoke(aU, "burn", [hY], [AttachedPayment(bA, hY)])
1634+ if ((hP == hP))
16031635 then {
1604- let hY = eY(-(dH), -(dI), 0)
1605- let go = hY._1
1606- let eP = hY._2
1607- let gp = fc(eX, eP)
1608- if ((gp == gp))
1609- then (dJ ++ go)
1636+ let ic = fc(-(dK), -(dL), 0)
1637+ let gu = ic._1
1638+ let eT = ic._2
1639+ let gv = fg(fb, eT)
1640+ if ((gv == gv))
1641+ then (dM ++ gu)
16101642 else throw("Strict value is not equal to itself.")
16111643 }
16121644 else throw("Strict value is not equal to itself.")
16221654
16231655
16241656
1625-@Callable(cX)
1626-func unstakeAndGetOneTknV2 (hU,fR,fS) = {
1627- let hl = {
1657+@Callable(da)
1658+func unstakeAndGetOneTknV2 (hY,fX,fY) = {
1659+ let hr = {
16281660 let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16291661 if ($isInstanceOf(be, "Boolean"))
16301662 then be
16311663 else throw(($getType(be) + " couldn't be cast to Boolean"))
16321664 }
1633- let hx = if (if (bh())
1665+ let fv = if (!(bi(da.caller)))
1666+ then if (if (bk())
1667+ then true
1668+ else (bz == t))
1669+ then true
1670+ else hr
1671+ else false
1672+ let gV = [if (if (!(fv))
16341673 then true
1635- else (bw == t))
1674+ else gz(da))
16361675 then true
1637- else hl
1638- let gP = [if (if (!(hx))
1639- then true
1640- else gt(cX))
1641- then true
1642- else ba("get operation is blocked by admin"), if ((size(cX.payments) == 0))
1676+ else ba("get operation is blocked by admin"), if ((size(da.payments) == 0))
16431677 then true
16441678 else ba("no payments are expected")]
1645- if ((gP == gP))
1679+ if ((gV == gV))
16461680 then {
1647- let hO = bC()
1648- let hb = bx
1649- let hP = valueOrErrorMessage(addressFromString(hO[D]), "Wr st addr")
1650- let dp = cX.caller
1651- let hZ = this
1652- let hQ = invoke(hP, "unstakeINTERNAL", [hb, hU, dp.bytes, hZ.bytes], nil)
1653- if ((hQ == hQ))
1681+ let hS = bF()
1682+ let hh = bA
1683+ let hT = valueOrErrorMessage(addressFromString(hS[D]), "Wr st addr")
1684+ let ds = da.caller
1685+ let id = this
1686+ let hU = invoke(hT, "unstakeINTERNAL", [hh, hY, ds.bytes, id.bytes], nil)
1687+ if ((hU == hU))
16541688 then {
1655- let ia = fQ(fR, fS, [AttachedPayment(hb, hU)], cX.caller, cX.originCaller, cX.transactionId)
1656- let dJ = ia._1
1657- let gb = ia._2
1658- $Tuple2(dJ, gb)
1689+ let ie = fW(fX, fY, [AttachedPayment(hh, hY)], da.caller, da.originCaller, da.transactionId)
1690+ let dM = ie._1
1691+ let gh = ie._2
1692+ $Tuple2(dM, gh)
16591693 }
16601694 else throw("Strict value is not equal to itself.")
16611695 }
16641698
16651699
16661700
1667-@Callable(cX)
1668-func putOneTknV2WithBonusREADONLY (ib,ic) = {
1669- let id = fv(ib, ic, "", "", true)
1670- let fK = id._1
1671- let dJ = id._2
1672- let cH = id._3
1673- let fP = id._4
1674- $Tuple2(nil, $Tuple3(fK, cH, fP))
1701+@Callable(da)
1702+func putOneTknV2WithBonusREADONLY (if,ig) = {
1703+ let ih = fB(if, ig, "", "", true)
1704+ let fQ = ih._1
1705+ let dM = ih._2
1706+ let cK = ih._3
1707+ let fV = ih._4
1708+ $Tuple2(nil, $Tuple3(fQ, cK, fV))
16751709 }
16761710
16771711
16781712
1679-@Callable(cX)
1680-func putOneTknV2WithoutTakeFeeREADONLY (ib,ic) = {
1681- let ie = fv(ib, ic, "", "", false)
1682- let fK = ie._1
1683- let dJ = ie._2
1684- let cH = ie._3
1685- let fP = ie._4
1686- $Tuple2(nil, $Tuple3(fK, cH, fP))
1713+@Callable(da)
1714+func putOneTknV2WithoutTakeFeeREADONLY (if,ig) = {
1715+ let ii = fB(if, ig, "", "", false)
1716+ let fQ = ii._1
1717+ let dM = ii._2
1718+ let cK = ii._3
1719+ let fV = ii._4
1720+ $Tuple2(nil, $Tuple3(fQ, cK, fV))
16871721 }
16881722
16891723
16901724
1691-@Callable(cX)
1692-func activate (if,ig) = if ((toString(cX.caller) != toString(aU)))
1725+@Callable(da)
1726+func activate (ij,ik) = if ((toString(da.caller) != toString(aU)))
16931727 then throw("denied")
1694- else $Tuple2([StringEntry(ak(), if), StringEntry(al(), ig), StringEntry(am(), toString(l)), StringEntry(an(height), toString(l))], "success")
1728+ else $Tuple2([StringEntry(ak(), ij), StringEntry(al(), ik), StringEntry(am(), toString(l)), StringEntry(an(height), toString(l))], "success")
16951729
16961730
16971731
1698-@Callable(cX)
1699-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bk())
1732+@Callable(da)
1733+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bn())
17001734
17011735
17021736
1703-@Callable(cX)
1704-func getAccBalanceWrapperREADONLY (bY) = $Tuple2(nil, bX(bY))
1737+@Callable(da)
1738+func getAccBalanceWrapperREADONLY (cb) = $Tuple2(nil, ca(cb))
17051739
17061740
17071741
1708-@Callable(cX)
1709-func calcPricesWrapperREADONLY (cr,cs,cw) = {
1710- let ih = cv(cr, cs, cw)
1711- $Tuple2(nil, [toString(ih[0]), toString(ih[1]), toString(ih[2])])
1742+@Callable(da)
1743+func calcPricesWrapperREADONLY (cu,cv,cz) = {
1744+ let il = cy(cu, cv, cz)
1745+ $Tuple2(nil, [toString(il[0]), toString(il[1]), toString(il[2])])
17121746 }
17131747
17141748
17151749
1716-@Callable(cX)
1717-func fromX18WrapperREADONLY (N,ii) = $Tuple2(nil, M(parseBigIntValue(N), ii))
1750+@Callable(da)
1751+func fromX18WrapperREADONLY (N,im) = $Tuple2(nil, M(parseBigIntValue(N), im))
17181752
17191753
17201754
1721-@Callable(cX)
1755+@Callable(da)
17221756 func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K)))
17231757
17241758
17251759
1726-@Callable(cX)
1727-func calcPriceBigIntWrapperREADONLY (ca,cb) = $Tuple2(nil, toString(bZ(parseBigIntValue(ca), parseBigIntValue(cb))))
1760+@Callable(da)
1761+func calcPriceBigIntWrapperREADONLY (cd,ce) = $Tuple2(nil, toString(cc(parseBigIntValue(cd), parseBigIntValue(ce))))
17281762
17291763
17301764
1731-@Callable(cX)
1732-func estimatePutOperationWrapperREADONLY (dm,cg,dL,dM,dN,dO,ij,dP,dQ) = $Tuple2(nil, dK(dm, cg, dL, dM, dN, dO, ij, dP, dQ, true, false, 0, ""))
1765+@Callable(da)
1766+func estimatePutOperationWrapperREADONLY (dp,cj,dO,dP,dQ,dR,in,dS,dT) = $Tuple2(nil, dN(dp, cj, dO, dP, dQ, dR, in, dS, dT, true, false, 0, ""))
17331767
17341768
17351769
1736-@Callable(cX)
1737-func estimateGetOperationWrapperREADONLY (dm,ik,do,ij) = {
1738- let ed = dl(dm, ik, do, addressFromStringValue(ij))
1739- $Tuple2(nil, $Tuple10(ed._1, ed._2, ed._3, ed._4, ed._5, ed._6, ed._7, toString(ed._8), ed._9, ed._10))
1770+@Callable(da)
1771+func estimateGetOperationWrapperREADONLY (dp,io,dr,in) = {
1772+ let eh = do(dp, io, dr, addressFromStringValue(in))
1773+ $Tuple2(nil, $Tuple10(eh._1, eh._2, eh._3, eh._4, eh._5, eh._6, eh._7, toString(eh._8), eh._9, eh._10))
17401774 }
17411775
17421776
17431777
1744-@Callable(cX)
1778+@Callable(da)
17451779 func changeAmp () = {
1746- let il = invoke(aU, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1747- let im = {
1748- let aQ = il
1780+ let ip = invoke(aU, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1781+ let iq = {
1782+ let aQ = ip
17491783 if ($isInstanceOf(aQ, "List[Any]"))
17501784 then {
1751- let in = aQ
1785+ let ir = aQ
17521786 $Tuple3({
1753- let be = in[0]
1787+ let be = ir[0]
17541788 if ($isInstanceOf(be, "Int"))
17551789 then be
17561790 else throw(($getType(be) + " couldn't be cast to Int"))
17571791 }, {
1758- let be = in[1]
1792+ let be = ir[1]
17591793 if ($isInstanceOf(be, "Int"))
17601794 then be
17611795 else throw(($getType(be) + " couldn't be cast to Int"))
17621796 }, {
1763- let be = in[2]
1797+ let be = ir[2]
17641798 if ($isInstanceOf(be, "Int"))
17651799 then be
17661800 else throw(($getType(be) + " couldn't be cast to Int"))
17681802 }
17691803 else ba("invalid entry type")
17701804 }
1771- let io = im._1
1772- let ip = im._2
1773- let iq = im._3
1774- let ir = parseIntValue(getStringValue(am()))
1775- let is = (ir + ip)
1776- let it = if ((0 > ip))
1777- then if ((iq > is))
1778- then iq
1779- else is
1780- else if ((is > iq))
1781- then iq
1782- else is
1783- let iu = valueOrElse(getInteger(ap()), 0)
1784- let iv = (iu + io)
1785- let gP = [if ((height > iv))
1805+ let is = iq._1
1806+ let it = iq._2
1807+ let iu = iq._3
1808+ let iv = parseIntValue(getStringValue(am()))
1809+ let iw = (iv + it)
1810+ let ix = if ((0 > it))
1811+ then if ((iu > iw))
1812+ then iu
1813+ else iw
1814+ else if ((iw > iu))
1815+ then iu
1816+ else iw
1817+ let iy = valueOrElse(getInteger(ap()), 0)
1818+ let iz = (iy + is)
1819+ let gV = [if ((height > iz))
17861820 then true
1787- else ba("try again in few blocks"), if ((ir != it))
1821+ else ba("try again in few blocks"), if ((iv != ix))
17881822 then true
17891823 else ba("already reached target")]
1790- if ((gP == gP))
1791- then [IntegerEntry(ap(), height), StringEntry(am(), toString(it)), StringEntry(an(height), toString(it))]
1824+ if ((gV == gV))
1825+ then [IntegerEntry(ap(), height), StringEntry(am(), toString(ix)), StringEntry(an(height), toString(ix))]
17921826 else throw("Strict value is not equal to itself.")
17931827 }
17941828
17951829
1796-@Verifier(iw)
1797-func ix () = {
1798- let iy = {
1799- let aQ = gq()
1830+@Verifier(iA)
1831+func iB () = {
1832+ let iC = {
1833+ let aQ = gw()
18001834 if ($isInstanceOf(aQ, "ByteVector"))
18011835 then {
1802- let gu = aQ
1803- gu
1836+ let gA = aQ
1837+ gA
18041838 }
18051839 else if ($isInstanceOf(aQ, "Unit"))
1806- then iw.senderPublicKey
1840+ then iA.senderPublicKey
18071841 else throw("Match error")
18081842 }
1809- let aQ = iw
1843+ let aQ = iA
18101844 if ($isInstanceOf(aQ, "Order"))
18111845 then {
1812- let ff = aQ
1813- let iz = bi()
1814- let iA = if (gB())
1846+ let fj = aQ
1847+ let iD = bl()
1848+ let iE = if (gH())
18151849 then $Tuple2(true, "")
1816- else fe(ff)
1817- let aK = iA._1
1818- let aL = iA._2
1819- let aM = sigVerify(ff.bodyBytes, ff.proofs[0], ff.senderPublicKey)
1820- let aN = sigVerify(ff.bodyBytes, ff.proofs[1], iz)
1850+ else fi(fj)
1851+ let aK = iE._1
1852+ let aL = iE._2
1853+ let aM = sigVerify(fj.bodyBytes, fj.proofs[0], fj.senderPublicKey)
1854+ let aN = sigVerify(fj.bodyBytes, fj.proofs[1], iD)
18211855 if (if (if (aK)
18221856 then aM
18231857 else false)
18291863 else if ($isInstanceOf(aQ, "SetScriptTransaction"))
18301864 then {
18311865 let aV = aQ
1832- if (sigVerify(iw.bodyBytes, iw.proofs[0], iy))
1866+ if (sigVerify(iA.bodyBytes, iA.proofs[0], iC))
18331867 then true
18341868 else {
1835- let iB = blake2b256(value(aV.script))
1836- let iC = fromBase64String(value(getString(aU, aF())))
1837- let iD = scriptHash(this)
1838- if ((iC == iB))
1839- then (iD != iB)
1869+ let iF = blake2b256(value(aV.script))
1870+ let iG = fromBase64String(value(getString(aU, aF())))
1871+ let iH = scriptHash(this)
1872+ if ((iG == iF))
1873+ then (iH != iF)
18401874 else false
18411875 }
18421876 }
1843- else sigVerify(iw.bodyBytes, iw.proofs[0], iy)
1877+ else sigVerify(iA.bodyBytes, iA.proofs[0], iC)
18441878 }
18451879
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 = 50
2727
2828 let m = "100"
2929
3030 let n = "1"
3131
3232 let o = "__"
3333
3434 let p = ""
3535
3636 let q = 1
3737
3838 let r = 2
3939
4040 let s = 3
4141
4242 let t = 4
4343
4444 let u = 1
4545
4646 let v = 2
4747
4848 let w = 3
4949
5050 let x = 4
5151
5252 let y = 5
5353
5454 let z = 6
5555
5656 let A = 7
5757
5858 let B = 8
5959
6060 let C = 9
6161
6262 let D = 1
6363
6464 let E = 6
6565
6666 let F = 7
6767
6868 let G = 10
6969
7070 let H = fraction(10, a, 10000)
7171
7272 func I (J,K) = fraction(toBigInt(J), c, toBigInt(K))
7373
7474
7575 func L (J,K) = fraction(J, c, K)
7676
7777
7878 func M (N,O) = toInt(fraction(N, toBigInt(O), c))
7979
8080
8181 func P (N,O,Q) = toInt(fraction(N, toBigInt(O), c, Q))
8282
8383
8484 func R (J,K) = fraction(J, c, toBigInt(K))
8585
8686
8787 func S (N,O) = fraction(N, toBigInt(O), c)
8888
8989
9090 func T (U,V,W) = fraction(U, V, W)
9191
9292
9393 func X (N) = if ((d > N))
9494 then -(N)
9595 else N
9696
9797
9898 func Y (N) = if ((d > N))
9999 then -(N)
100100 else N
101101
102102
103103 func Z () = "%s__factoryContract"
104104
105105
106106 func aa () = "%s__managerPublicKey"
107107
108108
109109 func ab () = "%s__managerVaultAddress"
110110
111111
112112 func ac () = "%s%s__price__last"
113113
114114
115115 func ad (ae,af) = makeString(["%s%s%d%d__price__history", toString(ae), toString(af)], o)
116116
117117
118118 func ag (ah,ai) = ((("%s%s%s__P__" + ah) + "__") + ai)
119119
120120
121121 func aj (ah,ai) = ((("%s%s%s__G__" + ah) + "__") + ai)
122122
123123
124124 func ak () = "%s__amountAsset"
125125
126126
127127 func al () = "%s__priceAsset"
128128
129129
130130 func am () = "%s__amp"
131131
132132
133133 func an (ao) = ("%s%d__amp__" + toString(ao))
134134
135135
136136 func ap () = "%s__changeAmpLastCall"
137137
138138
139139 let aq = "%s__fee"
140140
141141 let ar = valueOrElse(getInteger(this, aq), H)
142142
143143 let as = makeString(["%s", "dLp"], o)
144144
145145 let at = makeString(["%s", "dLpRefreshedHeight"], o)
146146
147147 let au = makeString(["%s", "refreshDLpDelay"], o)
148148
149149 let av = 30
150150
151151 let aw = valueOrElse(getInteger(this, au), av)
152152
153153 func ax () = "%s__factoryConfig"
154154
155155
156156 func ay () = "%s%s__matcher__publicKey"
157157
158158
159159 func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
160160
161161
162162 func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
163163
164164
165165 func aE () = "%s__shutdown"
166166
167167
168168 func aF () = "%s__allowedLpStableScriptHash"
169169
170170
171171 func aG () = "%s__feeCollectorAddress"
172172
173173
174174 func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
175175
176176
177177 func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
178178
179179
180180 func aO (aP) = {
181181 let aQ = addressFromString(aP)
182182 if ($isInstanceOf(aQ, "Address"))
183183 then {
184184 let aR = aQ
185185 aR
186186 }
187187 else this
188188 }
189189
190190
191191 func aS () = {
192192 let aT = {
193193 let aQ = getString(Z())
194194 if ($isInstanceOf(aQ, "String"))
195195 then {
196196 let aU = aQ
197197 aO(aU)
198198 }
199199 else this
200200 }
201201 let aQ = getString(aT, ab())
202202 if ($isInstanceOf(aQ, "String"))
203203 then {
204204 let aV = aQ
205205 aO(aV)
206206 }
207207 else this
208208 }
209209
210210
211211 func aW (aX,aY) = valueOrErrorMessage(getString(aX, aY), makeString(["mandatory ", toString(aX), ".", aY, " not defined"], ""))
212212
213213
214214 func aZ (aX,aY) = valueOrErrorMessage(getInteger(aX, aY), makeString(["mandatory ", toString(aX), ".", aY, " not defined"], ""))
215215
216216
217217 func ba (bb) = throw(makeString(["lp_stable.ride:", bb], " "))
218218
219219
220220 func bc (bb) = makeString(["lp_stable.ride:", bb], " ")
221221
222222
223223 let aU = addressFromStringValue(aW(this, Z()))
224224
225225 let bd = {
226226 let be = invoke(aU, "getInFeeREADONLY", [toString(this)], nil)
227227 if ($isInstanceOf(be, "Int"))
228228 then be
229229 else throw(($getType(be) + " couldn't be cast to Int"))
230230 }
231231
232232 let bf = {
233233 let be = invoke(aU, "getOutFeeREADONLY", [toString(this)], nil)
234234 if ($isInstanceOf(be, "Int"))
235235 then be
236236 else throw(($getType(be) + " couldn't be cast to Int"))
237237 }
238238
239-let bg = aW(this, am())
240-
241-func bh () = valueOrElse(getBoolean(aU, aE()), false)
239+func bg (bh) = makeString(["%s%s", "whitelisted", toString(bh)], o)
242240
243241
244-func bi () = fromBase58String(aW(aU, ay()))
242+func bi (bh) = valueOrElse(getBoolean(aU, bg(bh)), false)
245243
246244
247-let bj = addressFromStringValue(aW(aU, aG()))
245+let bj = aW(this, am())
248246
249-func bk () = {
250- let bl = aW(this, ak())
251- let bm = aW(this, al())
252- let bn = aZ(aU, aC(bm))
253- let aA = aZ(aU, aC(bl))
254- split(aW(aU, az(toString(aA), toString(bn))), o)
247+func bk () = valueOrElse(getBoolean(aU, aE()), false)
248+
249+
250+func bl () = fromBase58String(aW(aU, ay()))
251+
252+
253+let bm = addressFromStringValue(aW(aU, aG()))
254+
255+func bn () = {
256+ let bo = aW(this, ak())
257+ let bp = aW(this, al())
258+ let bq = aZ(aU, aC(bp))
259+ let aA = aZ(aU, aC(bo))
260+ split(aW(aU, az(toString(aA), toString(bq))), o)
255261 }
256262
257263
258-func bo (bp) = if ((bp == k))
264+func br (bs) = if ((bs == k))
259265 then unit
260- else fromBase58String(bp)
266+ else fromBase58String(bs)
261267
262268
263-func bq (bp) = if ((bp == unit))
269+func bt (bs) = if ((bs == unit))
264270 then k
265- else toBase58String(value(bp))
271+ else toBase58String(value(bs))
266272
267273
268-func br (bs) = $Tuple7(addressFromStringValue(bs[u]), parseIntValue(bs[v]), fromBase58String(bs[w]), bo(bs[x]), bo(bs[y]), parseIntValue(bs[z]), parseIntValue(bs[A]))
274+func bu (bv) = $Tuple7(addressFromStringValue(bv[u]), parseIntValue(bv[v]), fromBase58String(bv[w]), br(bv[x]), br(bv[y]), parseIntValue(bv[z]), parseIntValue(bv[A]))
269275
270276
271-let bt = br(bk())
277+let bw = bu(bn())
272278
273-let bu = bt
279+let bx = bw
274280
275-let bv = bu._1
281+let by = bx._1
276282
277-let bw = bu._2
283+let bz = bx._2
278284
279-let bx = bu._3
285+let bA = bx._3
280286
281-let by = bu._4
287+let bB = bx._4
282288
283-let bz = bu._5
289+let bC = bx._5
284290
285-let bA = bu._6
291+let bD = bx._6
286292
287-let bB = bu._7
293+let bE = bx._7
288294
289-func bC () = split(aW(aU, ax()), o)
295+func bF () = split(aW(aU, ax()), o)
290296
291297
292-let bD = bC()
298+let bG = bF()
293299
294-let bE = valueOrErrorMessage(addressFromString(bD[D]), "Invalid staking contract address")
300+let bH = valueOrErrorMessage(addressFromString(bG[D]), "Invalid staking contract address")
295301
296-let bF = valueOrErrorMessage(addressFromString(bD[F]), "Invalid slipage contract address")
302+let bI = valueOrErrorMessage(addressFromString(bG[F]), "Invalid slipage contract address")
297303
298-let bG = valueOrErrorMessage(addressFromString(bD[G]), "Invalid gwx contract address")
304+let bJ = valueOrErrorMessage(addressFromString(bG[G]), "Invalid gwx contract address")
299305
300-let bH = valueOrErrorMessage(addressFromString(bD[E]), "Invalid gwx contract address")
306+let bK = valueOrErrorMessage(addressFromString(bG[E]), "Invalid gwx contract address")
301307
302-func bI (bJ,bK,bL,bM,bN,bO,bP,bQ,bR,bS) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN), toString(bO), toString(bP), toString(bQ), toString(bR), toString(bS)], o)
308+func bL (bM,bN,bO,bP,bQ,bR,bS,bT,bU,bV) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bM), toString(bN), toString(bO), toString(bP), toString(bQ), toString(bR), toString(bS), toString(bT), toString(bU), toString(bV)], o)
303309
304310
305-func bT (bU,bV,bW,bM,bP,bQ) = makeString(["%d%d%d%d%d%d", toString(bU), toString(bV), toString(bW), toString(bM), toString(bP), toString(bQ)], o)
311+func bW (bX,bY,bZ,bP,bS,bT) = makeString(["%d%d%d%d%d%d", toString(bX), toString(bY), toString(bZ), toString(bP), toString(bS), toString(bT)], o)
306312
307313
308-func bX (bY) = if ((bY == "WAVES"))
314+func ca (cb) = if ((cb == "WAVES"))
309315 then wavesBalance(this).available
310- else assetBalance(this, fromBase58String(bY))
316+ else assetBalance(this, fromBase58String(cb))
311317
312318
313-func bZ (ca,cb) = fraction(ca, c, cb)
319+func cc (cd,ce) = fraction(cd, c, ce)
314320
315321
316-func cc (ca,cb,Q) = fraction(ca, c, cb, Q)
322+func cf (cd,ce,Q) = fraction(cd, c, ce, Q)
317323
318324
319-func cd (ce,cf,cg) = {
320- let ch = fraction((ce - cf), b, cf)
321- let ci = ((cg - X(ch)) > d)
322- if (!(ci))
323- then throw(("Big slpg: " + toString(ch)))
324- else $Tuple2(ci, min([ce, cf]))
325+func cg (ch,ci,cj) = {
326+ let ck = fraction((ch - ci), b, ci)
327+ let cl = ((cj - X(ck)) > d)
328+ if (!(cl))
329+ then throw(("Big slpg: " + toString(ck)))
330+ else $Tuple2(cl, min([ch, ci]))
325331 }
326332
327333
328-func cj (ck,cl,cm) = {
329- let ch = fraction(cl, b, ck)
330- let cn = (cm > ch)
331- if (if (cn)
334+func cm (cn,co,cp) = {
335+ let ck = fraction(co, b, cn)
336+ let cq = (cp > ck)
337+ if (if (cq)
332338 then true
333- else (cl > ck))
334- then throw(((((((toString(cl) + " ") + toString(ck)) + " ") + toString(ch)) + " ") + toString(cm)))
335- else cn
339+ else (co > cn))
340+ then throw(((((((toString(co) + " ") + toString(cn)) + " ") + toString(ck)) + " ") + toString(cp)))
341+ else cq
336342 }
337343
338344
339-func co (cp,cq,cr,cs) = {
340- let ct = I(cr, cp)
341- let cu = I(cs, cq)
342- bZ(cu, ct)
345+func cr (cs,ct,cu,cv) = {
346+ let cw = I(cu, cs)
347+ let cx = I(cv, ct)
348+ cc(cx, cw)
343349 }
344350
345351
346-func cv (cr,cs,cw) = {
347- let cx = bA
348- let cy = bB
349- let cz = co(cx, cy, cr, cs)
350- let cb = I(cr, cx)
351- let ca = I(cs, cy)
352- let cA = I(cw, a)
353- let cB = bZ(cb, cA)
354- let cC = bZ(ca, cA)
355-[cz, cB, cC]
352+func cy (cu,cv,cz) = {
353+ let cA = bD
354+ let cB = bE
355+ let cC = cr(cA, cB, cu, cv)
356+ let ce = I(cu, cA)
357+ let cd = I(cv, cB)
358+ let cD = I(cz, a)
359+ let cE = cc(ce, cD)
360+ let cF = cc(cd, cD)
361+[cC, cE, cF]
356362 }
357363
358364
359-func cD (cr,cs,cw) = {
360- let cE = cv(cr, cs, cw)
361-[M(cE[0], a), M(cE[1], a), M(cE[2], a)]
365+func cG (cu,cv,cz) = {
366+ let cH = cy(cu, cv, cz)
367+[M(cH[0], a), M(cH[1], a), M(cH[2], a)]
362368 }
363369
364370
365-func cF (cG,ar) = {
366- let cH = if ((ar == 0))
371+func cI (cJ,ar) = {
372+ let cK = if ((ar == 0))
367373 then 0
368- else fraction(cG, ar, a)
369- $Tuple2((cG - cH), cH)
374+ else fraction(cJ, ar, a)
375+ $Tuple2((cJ - cK), cK)
370376 }
371377
372378
373-func cI (cJ) = {
374- let cK = cJ[0]
375- let cL = cJ[1]
376- let aV = (cK + cL)
379+func cL (cM) = {
380+ let cN = cM[0]
381+ let cO = cM[1]
382+ let aV = (cN + cO)
377383 if ((aV == e))
378384 then e
379385 else {
380- let aR = parseIntValue(bg)
381- let cM = (aR * 2)
382- let cE = fraction(cK, cL, f)
383- let cN = fraction(cE, i, f)
384- let cO = fraction(toBigInt(cM), aV, f)
385- let cP = toBigInt((cM - 1))
386- func cQ (cR) = {
387- let cS = fraction(cR, cR, f)
388- let cT = fraction(cS, cR, f)
389- let cU = fraction(cT, f, cN)
390- fraction((cO + fraction(cU, g, f)), cR, (fraction(cP, cR, f) + fraction(h, cU, f)))
386+ let aR = parseIntValue(bj)
387+ let cP = (aR * 2)
388+ let cH = fraction(cN, cO, f)
389+ let cQ = fraction(cH, i, f)
390+ let cR = fraction(toBigInt(cP), aV, f)
391+ let cS = toBigInt((cP - 1))
392+ func cT (cU) = {
393+ let cV = fraction(cU, cU, f)
394+ let cW = fraction(cV, cU, f)
395+ let cX = fraction(cW, f, cQ)
396+ fraction((cR + fraction(cX, g, f)), cU, (fraction(cS, cU, f) + fraction(h, cX, f)))
391397 }
392398
393- func cV (cW,cX) = if (cW._2)
394- then cW
399+ func cY (cZ,da) = if (cZ._2)
400+ then cZ
395401 else {
396- let cR = cW._1
397- let cY = cQ(cR)
398- let cZ = (cY - value(cR))
399- let da = if ((e > cZ))
400- then -(cZ)
401- else cZ
402- if ((f >= da))
403- then $Tuple2(cY, true)
404- else $Tuple2(cY, false)
402+ let cU = cZ._1
403+ let db = cT(cU)
404+ let dc = (db - value(cU))
405+ let dd = if ((e > dc))
406+ then -(dc)
407+ else dc
408+ if ((f >= dd))
409+ then $Tuple2(db, true)
410+ else $Tuple2(db, false)
405411 }
406412
407- let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
408- let dc = {
409- let dd = db
410- let de = size(dd)
411- let df = $Tuple2(aV, false)
412- func dg (dh,di) = if ((di >= de))
413- then dh
414- else cV(dh, dd[di])
413+ let de = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
414+ let df = {
415+ let dg = de
416+ let dh = size(dg)
417+ let di = $Tuple2(aV, false)
418+ func dj (dk,dl) = if ((dl >= dh))
419+ then dk
420+ else cY(dk, dg[dl])
415421
416- func dj (dh,di) = if ((di >= de))
417- then dh
422+ func dm (dk,dl) = if ((dl >= dh))
423+ then dk
418424 else throw("List size exceeds 17")
419425
420- dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
426+ dm(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(di, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
421427 }
422- let cR = dc._1
423- let dk = dc._2
424- if (dk)
425- then cR
426- else throw(("D calculation error, D = " + toString(cR)))
428+ let cU = df._1
429+ let dn = df._2
430+ if (dn)
431+ then cU
432+ else throw(("D calculation error, D = " + toString(cU)))
427433 }
428434 }
429435
430436
431-func dl (dm,dn,do,dp) = {
432- let dq = bx
433- let dr = toBase58String(value(by))
434- let ds = toBase58String(value(bz))
437+func do (dp,dq,dr,ds) = {
435438 let dt = bA
436- let du = bB
437- let dv = toString(bw)
438- let dw = valueOrErrorMessage(assetInfo(dq), "Wrong LP id").quantity
439- if ((toBase58String(dq) != dn))
439+ let du = toBase58String(value(bB))
440+ let dv = toBase58String(value(bC))
441+ let dw = bD
442+ let dx = bE
443+ let dy = toString(bz)
444+ let dz = valueOrErrorMessage(assetInfo(dt), "Wrong LP id").quantity
445+ if ((toBase58String(dt) != dq))
440446 then throw("Wrong pmt asset")
441447 else {
442- let dx = bX(dr)
443- let dy = I(dx, dt)
444- let dz = bX(ds)
445- let dA = I(dz, du)
446- let dB = bZ(dA, dy)
447- let dC = M(dB, a)
448- let dD = I(do, a)
449- let dE = I(dw, a)
450- let dF = fraction(dy, dD, dE)
451- let dG = fraction(dA, dD, dE)
452- let dH = P(dF, dt, FLOOR)
453- let dI = P(dG, du, FLOOR)
454- let dJ = if ((dm == ""))
448+ let dA = ca(du)
449+ let dB = I(dA, dw)
450+ let dC = ca(dv)
451+ let dD = I(dC, dx)
452+ let dE = cc(dD, dB)
453+ let dF = M(dE, a)
454+ let dG = I(dr, a)
455+ let dH = I(dz, a)
456+ let dI = fraction(dB, dG, dH)
457+ let dJ = fraction(dD, dG, dH)
458+ let dK = P(dI, dw, FLOOR)
459+ let dL = P(dJ, dx, FLOOR)
460+ let dM = if ((dp == ""))
455461 then nil
456- else [ScriptTransfer(dp, dH, if ((dr == "WAVES"))
462+ else [ScriptTransfer(ds, dK, if ((du == "WAVES"))
457463 then unit
458- else fromBase58String(dr)), ScriptTransfer(dp, dI, if ((ds == "WAVES"))
464+ else fromBase58String(du)), ScriptTransfer(ds, dL, if ((dv == "WAVES"))
459465 then unit
460- else fromBase58String(ds)), StringEntry(aj(toString(dp), dm), bT(dH, dI, do, dC, height, lastBlock.timestamp)), IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC)]
461- $Tuple10(dH, dI, dr, ds, dx, dz, dw, dB, dv, dJ)
466+ else fromBase58String(dv)), StringEntry(aj(toString(ds), dp), bW(dK, dL, dr, dF, height, lastBlock.timestamp)), IntegerEntry(ac(), dF), IntegerEntry(ad(height, lastBlock.timestamp), dF)]
467+ $Tuple10(dK, dL, du, dv, dA, dC, dz, dE, dy, dM)
462468 }
463469 }
464470
465471
466-func dK (dm,cg,dL,dM,dN,dO,dp,dP,dQ,dR,dS,dT,dU) = {
467- let dq = bx
468- let dV = toBase58String(value(by))
469- let dW = toBase58String(value(bz))
470- let dX = bA
471- let dY = bB
472- let dv = toString(bw)
473- let dZ = valueOrErrorMessage(assetInfo(dq), "Wr lp as").quantity
474- let dx = if (dP)
475- then bX(dV)
476- else if (if (dR)
477- then (dU == dV)
478- else false)
479- then (bX(dV) - dT)
480- else if (dR)
481- then bX(dV)
482- else (bX(dV) - dL)
483- let dz = if (dP)
484- then bX(dW)
485- else if (if (dR)
486- then (dU == dW)
487- else false)
488- then (bX(dW) - dT)
489- else if (dR)
490- then bX(dW)
491- else (bX(dW) - dN)
492- let ea = I(dL, dX)
493- let eb = I(dN, dY)
494- let ec = bZ(eb, ea)
495- let dy = I(dx, dX)
496- let dA = I(dz, dY)
497- let cl = cI([dy, dA])
498- let ed = if ((dZ == 0))
472+func dN (dp,cj,dO,dP,dQ,dR,ds,dS,dT,dU,dV,dW,dX) = {
473+ let dt = bA
474+ let dY = toBase58String(value(bB))
475+ let dZ = toBase58String(value(bC))
476+ let ea = bD
477+ let eb = bE
478+ let dy = toString(bz)
479+ let ec = valueOrErrorMessage(assetInfo(dt), "Wr lp as").quantity
480+ let ed = [if (if ((dP == br(dY)))
481+ then (dR == br(dZ))
482+ else false)
483+ then true
484+ else ba("Invalid amt or price asset passed.")]
485+ if ((ed == ed))
499486 then {
500- let ck = cI([(dy + ea), (dA + eb)])
501- let ee = if ((ck > cl))
502- then true
503- else throw("D1 should be greater than D0")
504- if ((ee == ee))
487+ let dA = if (dS)
488+ then ca(dY)
489+ else if (if (dU)
490+ then (dX == dY)
491+ else false)
492+ then (ca(dY) - dW)
493+ else if (dU)
494+ then ca(dY)
495+ else (ca(dY) - dO)
496+ let dC = if (dS)
497+ then ca(dZ)
498+ else if (if (dU)
499+ then (dX == dZ)
500+ else false)
501+ then (ca(dZ) - dW)
502+ else if (dU)
503+ then ca(dZ)
504+ else (ca(dZ) - dQ)
505+ let ee = I(dO, ea)
506+ let ef = I(dQ, eb)
507+ let eg = cc(ef, ee)
508+ let dB = I(dA, ea)
509+ let dD = I(dC, eb)
510+ let co = cL([dB, dD])
511+ let eh = if ((ec == 0))
505512 then {
506- let dB = d
507- let ef = d
508- let cA = ck
509- $Tuple5(M(cA, a), M(ea, dX), M(eb, dY), bZ((dA + eb), (dy + ea)), ef)
510- }
511- else throw("Strict value is not equal to itself.")
512- }
513- else {
514- let dB = bZ(dA, dy)
515- let eg = fraction(X((dB - ec)), c, dB)
516- let ef = I(cg, a)
517- if (if (if (dS)
518- then (dB != d)
519- else false)
520- then (eg > ef)
521- else false)
522- then throw(((("Price slippage " + toString(eg)) + " > ") + toString(ef)))
523- else {
524- let eh = I(dZ, a)
525- let ei = fraction(ea, cc(dA, dy, CEILING), c, CEILING)
526- let ej = fraction(eb, c, cc(dA, dy, FLOOR), CEILING)
527- let ek = if ((ei > eb))
528- then $Tuple2(ej, eb)
529- else $Tuple2(ea, ei)
530- let el = ek._1
531- let em = ek._2
532- let ck = cI([(dy + el), (dA + em)])
533- let ee = if ((ck > cl))
513+ let cn = cL([(dB + ee), (dD + ef)])
514+ let ei = if ((cn > co))
534515 then true
535516 else throw("D1 should be greater than D0")
536- if ((ee == ee))
517+ if ((ei == ei))
537518 then {
538- let cA = fraction(eh, (ck - cl), cl)
539- $Tuple5(P(cA, a, FLOOR), P(el, dX, CEILING), P(em, dY, CEILING), dB, ef)
519+ let dE = d
520+ let ej = d
521+ let cD = cn
522+ $Tuple5(M(cD, a), M(ee, ea), M(ef, eb), cc((dD + ef), (dB + ee)), ej)
540523 }
541524 else throw("Strict value is not equal to itself.")
542525 }
526+ else {
527+ let dE = cc(dD, dB)
528+ let ek = fraction(X((dE - eg)), c, dE)
529+ let ej = I(cj, a)
530+ if (if (if (dV)
531+ then (dE != d)
532+ else false)
533+ then (ek > ej)
534+ else false)
535+ then throw(((("Price slippage " + toString(ek)) + " > ") + toString(ej)))
536+ else {
537+ let el = I(ec, a)
538+ let em = fraction(ee, cf(dD, dB, CEILING), c, CEILING)
539+ let en = fraction(ef, c, cf(dD, dB, FLOOR), CEILING)
540+ let eo = if ((em > ef))
541+ then $Tuple2(en, ef)
542+ else $Tuple2(ee, em)
543+ let ep = eo._1
544+ let eq = eo._2
545+ let cn = cL([(dB + ep), (dD + eq)])
546+ let ei = if ((cn > co))
547+ then true
548+ else throw("D1 should be greater than D0")
549+ if ((ei == ei))
550+ then {
551+ let cD = fraction(el, (cn - co), co)
552+ $Tuple5(P(cD, a, FLOOR), P(ep, ea, CEILING), P(eq, eb, CEILING), dE, ej)
553+ }
554+ else throw("Strict value is not equal to itself.")
555+ }
556+ }
557+ let er = eh._1
558+ let es = eh._2
559+ let et = eh._3
560+ let dF = M(eh._4, a)
561+ let eu = M(eh._5, a)
562+ if ((0 >= er))
563+ then throw("LP <= 0")
564+ else {
565+ let ev = if (!(dT))
566+ then 0
567+ else er
568+ let ew = (dO - es)
569+ let ex = (dQ - et)
570+ let ey = if (if (dU)
571+ then (dX == dY)
572+ else false)
573+ then $Tuple2(dW, 0)
574+ else if (if (dU)
575+ then (dX == dZ)
576+ else false)
577+ then $Tuple2(0, dW)
578+ else $Tuple2(es, et)
579+ let ez = ey._1
580+ let eA = ey._2
581+ let eB = [IntegerEntry(ac(), dF), IntegerEntry(ad(height, lastBlock.timestamp), dF), StringEntry(ag(ds, dp), bL(ez, eA, ev, dF, cj, eu, height, lastBlock.timestamp, ew, ex))]
582+ $Tuple13(er, ev, dF, dA, dC, ec, dt, dy, eB, ew, ex, dP, dR)
583+ }
543584 }
544- let en = ed._1
545- let eo = ed._2
546- let ep = ed._3
547- let dC = M(ed._4, a)
548- let eq = M(ed._5, a)
549- if ((0 >= en))
550- then throw("LP <= 0")
551- else {
552- let er = if (!(dQ))
553- then 0
554- else en
555- let es = (dL - eo)
556- let et = (dN - ep)
557- let eu = if (if (dR)
558- then (dU == dV)
559- else false)
560- then $Tuple2(dT, 0)
561- else if (if (dR)
562- then (dU == dW)
563- else false)
564- then $Tuple2(0, dT)
565- else $Tuple2(eo, ep)
566- let ev = eu._1
567- let ew = eu._2
568- let ex = [IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC), StringEntry(ag(dp, dm), bI(ev, ew, er, dC, cg, eq, height, lastBlock.timestamp, es, et))]
569- $Tuple13(en, er, dC, dx, dz, dZ, dq, dv, ex, es, et, dM, dO)
570- }
585+ else throw("Strict value is not equal to itself.")
571586 }
572587
573588
574-func ey (cJ,cX,ez) = {
575- let eA = g
576- let eB = cJ[if ((cX == 0))
589+func eC (cM,da,eD) = {
590+ let eE = g
591+ let eF = cM[if ((da == 0))
577592 then 1
578593 else 0]
579- let eC = parseBigIntValue(m)
580- let aR = (parseBigIntValue(bg) * eC)
581- let aV = eB
582- let cM = (aR * eA)
583- let eD = (((((ez * ez) / (eB * eA)) * ez) * eC) / (cM * eA))
584- let eE = ((aV + ((ez * eC) / cM)) - ez)
585- func cV (cW,eF) = {
586- let eG = cW
587- let eH = eG._1
588- let dk = eG._2
589- if ((dk != unit))
590- then cW
594+ let eG = parseBigIntValue(m)
595+ let aR = (parseBigIntValue(bj) * eG)
596+ let aV = eF
597+ let cP = (aR * eE)
598+ let eH = (((((eD * eD) / (eF * eE)) * eD) * eG) / (cP * eE))
599+ let eI = ((aV + ((eD * eG) / cP)) - eD)
600+ func cY (cZ,eJ) = {
601+ let eK = cZ
602+ let eL = eK._1
603+ let dn = eK._2
604+ if ((dn != unit))
605+ then cZ
591606 else {
592- let eI = (((eH * eH) + eD) / ((g * eH) + eE))
593- let eJ = Y((eI - value(eH)))
594- if ((f >= eJ))
595- then $Tuple2(eI, eF)
596- else $Tuple2(eI, unit)
607+ let eM = (((eL * eL) + eH) / ((g * eL) + eI))
608+ let eN = Y((eM - value(eL)))
609+ if ((f >= eN))
610+ then $Tuple2(eM, eJ)
611+ else $Tuple2(eM, unit)
597612 }
598613 }
599614
600- let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
601- let eK = {
602- let dd = db
603- let de = size(dd)
604- let df = $Tuple2(ez, unit)
605- func dg (dh,di) = if ((di >= de))
606- then dh
607- else cV(dh, dd[di])
615+ let de = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
616+ let eO = {
617+ let dg = de
618+ let dh = size(dg)
619+ let di = $Tuple2(eD, unit)
620+ func dj (dk,dl) = if ((dl >= dh))
621+ then dk
622+ else cY(dk, dg[dl])
608623
609- func dj (dh,di) = if ((di >= de))
610- then dh
624+ func dm (dk,dl) = if ((dl >= dh))
625+ then dk
611626 else throw("List size exceeds 15")
612627
613- dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
628+ dm(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(di, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
614629 }
615- let eH = eK._1
616- let dk = eK._2
617- if ((dk != unit))
618- then eH
619- else throw(("Y calculation error, Y = " + toString(eH)))
630+ let eL = eO._1
631+ let dn = eO._2
632+ if ((dn != unit))
633+ then eL
634+ else throw(("Y calculation error, Y = " + toString(eL)))
620635 }
621636
622637
623-func eL (eM,eN,eO) = {
624- let eP = fraction(cI([L(eM, toBigInt(bA)), L(eN, toBigInt(bB))]), c, eO)
625- if ((eO == e))
638+func eP (eQ,eR,eS) = {
639+ let eT = fraction(cL([L(eQ, toBigInt(bD)), L(eR, toBigInt(bE))]), c, eS)
640+ if ((eS == e))
626641 then e
627- else eP
642+ else eT
628643 }
629644
630645
631-func eQ (eR,eS,eT) = {
632- let eU = (toBigInt(bX(bq(by))) - eR)
633- let eV = (toBigInt(bX(bq(bz))) - eS)
634- let eW = (toBigInt(value(assetInfo(bx)).quantity) - eT)
635- let eX = eL(eU, eV, eW)
636- eX
646+func eU (eV,eW,eX) = {
647+ let eY = (toBigInt(ca(bt(bB))) - eV)
648+ let eZ = (toBigInt(ca(bt(bC))) - eW)
649+ let fa = (toBigInt(value(assetInfo(bA)).quantity) - eX)
650+ let fb = eP(eY, eZ, fa)
651+ fb
637652 }
638653
639654
640-func eY (eZ,fa,eT) = {
641- let eU = (bX(bq(by)) + eZ)
642- let eV = (bX(bq(bz)) + fa)
643- let eW = (value(assetInfo(bx)).quantity + eT)
644- let eP = eL(toBigInt(eU), toBigInt(eV), toBigInt(eW))
645- let fb = [IntegerEntry(at, height), StringEntry(as, toString(eP))]
646- $Tuple2(fb, eP)
655+func fc (fd,fe,eX) = {
656+ let eY = (ca(bt(bB)) + fd)
657+ let eZ = (ca(bt(bC)) + fe)
658+ let fa = (value(assetInfo(bA)).quantity + eX)
659+ let eT = eP(toBigInt(eY), toBigInt(eZ), toBigInt(fa))
660+ let ff = [IntegerEntry(at, height), StringEntry(as, toString(eT))]
661+ $Tuple2(ff, eT)
647662 }
648663
649664
650-func fc (fd,eP) = if ((eP >= fd))
665+func fg (fh,eT) = if ((eT >= fh))
651666 then true
652667 else ba("updated DLp lower than current DLp")
653668
654669
655-func fe (ff) = {
656- let eU = bX(bq(by))
657- let eV = bX(bq(bz))
658- let fg = ff.amount
659- let fh = fraction(ff.amount, ff.price, a, FLOOR)
660- let fi = if ((ff.orderType == Buy))
661- then $Tuple2(fg, -(fh))
662- else $Tuple2(-(fg), fh)
663- let eZ = fi._1
664- let fa = fi._2
665- if (if (if (bh())
670+func fi (fj) = {
671+ let eY = ca(bt(bB))
672+ let eZ = ca(bt(bC))
673+ let fk = fj.amount
674+ let fl = fraction(fj.amount, fj.price, a, FLOOR)
675+ let fm = if ((fj.orderType == Buy))
676+ then $Tuple2(fk, -(fl))
677+ else $Tuple2(-(fk), fl)
678+ let fd = fm._1
679+ let fe = fm._2
680+ if (if (if (bk())
666681 then true
667- else (bw == s))
682+ else (bz == s))
668683 then true
669- else (bw == t))
684+ else (bz == t))
670685 then throw("Admin blocked")
671- else if (if ((ff.assetPair.amountAsset != by))
686+ else if (if ((fj.assetPair.amountAsset != bB))
672687 then true
673- else (ff.assetPair.priceAsset != bz))
688+ else (fj.assetPair.priceAsset != bC))
674689 then throw("Wr assets")
675690 else {
676- let fj = parseBigIntValue(valueOrElse(getString(this, as), "0"))
677- let fk = eY(eZ, fa, 0)
678- let fl = fk._1
679- let fm = fk._2
680- let fn = (fm >= fj)
681- let fo = makeString(["dLp=", toString(fj), " dLpNew=", toString(fm), " amountAssetBalance=", toString(eU), " priceAssetBalance=", toString(eV), " amountAssetBalanceDelta=", toString(eZ), " priceAssetBalanceDelta=", toString(fa), " height=", toString(height)], "")
682- $Tuple2(fn, fo)
691+ let fn = parseBigIntValue(valueOrElse(getString(this, as), "0"))
692+ let fo = fc(fd, fe, 0)
693+ let fp = fo._1
694+ let fq = fo._2
695+ let fr = (fq >= fn)
696+ let fs = makeString(["dLp=", toString(fn), " dLpNew=", toString(fq), " amountAssetBalance=", toString(eY), " priceAssetBalance=", toString(eZ), " amountAssetBalanceDelta=", toString(fd), " priceAssetBalanceDelta=", toString(fe), " height=", toString(height)], "")
697+ $Tuple2(fr, fs)
683698 }
684699 }
685700
686701
687-func fp (cX) = if ((size(cX.payments) != 1))
702+func ft (da) = if ((size(da.payments) != 1))
688703 then throw("1 pmnt exp")
689704 else {
690- let fq = value(cX.payments[0])
691- let dn = value(fq.assetId)
692- let dT = fq.amount
693- let ed = dl(toBase58String(cX.transactionId), toBase58String(dn), dT, cX.caller)
694- let dH = ed._1
695- let dI = ed._2
696- let dv = parseIntValue(ed._9)
697- let dJ = ed._10
698- if (if (bh())
699- then true
700- else (dv == t))
701- then throw(("Admin blocked: " + toString(dv)))
702- else $Tuple5(dH, dI, dT, dn, dJ)
705+ let fu = value(da.payments[0])
706+ let dq = value(fu.assetId)
707+ let dW = fu.amount
708+ let eh = do(toBase58String(da.transactionId), toBase58String(dq), dW, da.caller)
709+ let dK = eh._1
710+ let dL = eh._2
711+ let dy = parseIntValue(eh._9)
712+ let dM = eh._10
713+ let fv = if (!(bi(da.caller)))
714+ then if (bk())
715+ then true
716+ else (bz == t)
717+ else false
718+ if (fv)
719+ then throw(("Admin blocked: " + toString(dy)))
720+ else $Tuple5(dK, dL, dW, dq, dM)
703721 }
704722
705723
706-func fr (fs,ai,ft,fu,cg,dQ,dR,dS,dT,dU) = {
707- let ed = dK(ai, cg, value(ft).amount, value(ft).assetId, value(fu).amount, value(fu).assetId, fs, (ai == ""), dQ, dR, dS, dT, dU)
708- let dv = parseIntValue(ed._8)
709- if (if (if (bh())
710- then true
711- else (dv == r))
712- then true
713- else (dv == t))
714- then throw(("Blocked:" + toString(dv)))
715- else ed
724+func fw (fx,ai,fy,fz,cj,dT,dU,dV,dW,dX) = {
725+ let eh = dN(ai, cj, value(fy).amount, value(fy).assetId, value(fz).amount, value(fz).assetId, fx, (ai == ""), dT, dU, dV, dW, dX)
726+ let dy = parseIntValue(eh._8)
727+ let fA = if (!(bi(addressFromStringValue(fx))))
728+ then if (if (bk())
729+ then true
730+ else (bz == t))
731+ then true
732+ else (bz == r)
733+ else false
734+ if (fA)
735+ then throw(("Blocked:" + toString(dy)))
736+ else eh
716737 }
717738
718739
719-func fv (fw,dn,dp,ai,fx) = {
720- let dr = toBase58String(value(by))
721- let ds = toBase58String(value(bz))
722- let dq = bx
723- let dX = bA
724- let dY = bB
725- let eW = toBigInt(valueOrErrorMessage(assetInfo(dq), "invalid lp asset").quantity)
726- let fy = if ((eW > e))
740+func fB (fC,dq,ds,ai,fD) = {
741+ let du = toBase58String(value(bB))
742+ let dv = toBase58String(value(bC))
743+ let dt = bA
744+ let ea = bD
745+ let eb = bE
746+ let fa = toBigInt(valueOrErrorMessage(assetInfo(dt), "invalid lp asset").quantity)
747+ let fE = if ((fa > e))
727748 then true
728749 else throw("initial deposit requires all coins")
729- if ((fy == fy))
750+ if ((fE == fE))
730751 then {
731- let dx = bX(dr)
732- let dz = bX(ds)
733- let fz = if ((ai == ""))
734- then $Tuple2(dx, dz)
735- else if ((dn == dr))
736- then if ((fw > dx))
752+ let dA = ca(du)
753+ let dC = ca(dv)
754+ let fF = if ((ai == ""))
755+ then $Tuple2(dA, dC)
756+ else if ((dq == du))
757+ then if ((fC > dA))
737758 then throw("invalid payment amount")
738- else $Tuple2((dx - fw), dz)
739- else if ((dn == ds))
740- then if ((fw > dz))
759+ else $Tuple2((dA - fC), dC)
760+ else if ((dq == dv))
761+ then if ((fC > dC))
741762 then throw("invalid payment amount")
742- else $Tuple2(dx, (dz - fw))
763+ else $Tuple2(dA, (dC - fC))
743764 else throw("wrong pmtAssetId")
744- let fA = fz._1
745- let fB = fz._2
746- let fC = if ((dn == dr))
747- then $Tuple2(fw, 0)
748- else if ((dn == ds))
749- then $Tuple2(0, fw)
750- else throw("invalid payment")
751- let fD = fC._1
752- let fE = fC._2
753- let fF = if (fx)
754- then $Tuple3(cF(fD, bd)._1, cF(fE, bd)._1, cF(fw, bd)._2)
755- else $Tuple3(fD, fE, 0)
756765 let fG = fF._1
757766 let fH = fF._2
758- let cH = fF._3
759- let fI = (fA + fG)
760- let fJ = (fB + fH)
761- let cl = cI([I(fA, bA), I(fB, bB)])
762- let ck = cI([I(fI, bA), I(fJ, bB)])
763- let ee = if ((ck > cl))
767+ let fI = if ((dq == du))
768+ then $Tuple2(fC, 0)
769+ else if ((dq == dv))
770+ then $Tuple2(0, fC)
771+ else throw("invalid payment")
772+ let fJ = fI._1
773+ let fK = fI._2
774+ let fL = if (fD)
775+ then $Tuple3(cI(fJ, bd)._1, cI(fK, bd)._1, cI(fC, bd)._2)
776+ else $Tuple3(fJ, fK, 0)
777+ let fM = fL._1
778+ let fN = fL._2
779+ let cK = fL._3
780+ let fO = (fG + fM)
781+ let fP = (fH + fN)
782+ let co = cL([I(fG, bD), I(fH, bE)])
783+ let cn = cL([I(fO, bD), I(fP, bE)])
784+ let ei = if ((cn > co))
764785 then true
765786 else throw()
766- if ((ee == ee))
787+ if ((ei == ei))
767788 then {
768- let fK = fraction(eW, (ck - cl), cl, FLOOR)
769- let dC = M(bZ(I(fJ, dY), I(fI, dX)), a)
770- let ex = [IntegerEntry(ac(), dC), IntegerEntry(ad(height, lastBlock.timestamp), dC), StringEntry(ag(dp, ai), bI(fD, fE, toInt(fK), dC, 0, 0, height, lastBlock.timestamp, 0, 0))]
771- let fL = fraction(fB, a, fA)
772- let fM = fraction(fw, a, (fL + a))
773- let fN = (fw - fM)
774- let fO = fraction(eW, toBigInt(fN), toBigInt(fB))
775- let fP = toInt(fraction((fK - fO), b, fO))
776- $Tuple4(toInt(fK), ex, cH, fP)
789+ let fQ = fraction(fa, (cn - co), co, FLOOR)
790+ let dF = M(cc(I(fP, eb), I(fO, ea)), a)
791+ let eB = [IntegerEntry(ac(), dF), IntegerEntry(ad(height, lastBlock.timestamp), dF), StringEntry(ag(ds, ai), bL(fJ, fK, toInt(fQ), dF, 0, 0, height, lastBlock.timestamp, 0, 0))]
792+ let fR = fraction(fH, a, fG)
793+ let fS = fraction(fC, a, (fR + a))
794+ let fT = (fC - fS)
795+ let fU = fraction(fa, toBigInt(fT), toBigInt(fH))
796+ let fV = toInt(fraction((fQ - fU), b, fU))
797+ $Tuple4(toInt(fQ), eB, cK, fV)
777798 }
778799 else throw("Strict value is not equal to itself.")
779800 }
780801 else throw("Strict value is not equal to itself.")
781802 }
782803
783804
784-func fQ (fR,fS,fT,fs,fU,fV) = {
785- let dq = toBase58String(value(bx))
786- let dr = toBase58String(value(by))
787- let ds = toBase58String(value(bz))
788- let fW = bA
789- let fX = bB
790- let fY = bw
791- let dp = if ((fs == bH))
792- then fU
793- else fs
794- let fq = value(fT[0])
795- let dn = value(fq.assetId)
796- let dT = fq.amount
797- let eX = eQ(e, e, e)
798- if ((eX == eX))
805+func fW (fX,fY,fZ,fx,ga,gb) = {
806+ let dt = toBase58String(value(bA))
807+ let du = toBase58String(value(bB))
808+ let dv = toBase58String(value(bC))
809+ let gc = bD
810+ let gd = bE
811+ let ge = bz
812+ let ds = if ((fx == bK))
813+ then ga
814+ else fx
815+ let fu = value(fZ[0])
816+ let dq = value(fu.assetId)
817+ let dW = fu.amount
818+ let fb = eU(e, e, e)
819+ if ((fb == fb))
799820 then {
800- let dm = toBase58String(fV)
801- if ((dq != toBase58String(dn)))
821+ let dp = toBase58String(gb)
822+ if ((dt != toBase58String(dq)))
802823 then throw("Wrong LP")
803824 else {
804- let dx = bX(dr)
805- let dz = bX(ds)
806- let fZ = {
807- let be = invoke(this, "getOneTknV2READONLY", [fR, dT], nil)
825+ let dA = ca(du)
826+ let dC = ca(dv)
827+ let gf = {
828+ let be = invoke(this, "getOneTknV2READONLY", [fX, dW], nil)
808829 if ($isInstanceOf(be, "(Int, Int)"))
809830 then be
810831 else throw(($getType(be) + " couldn't be cast to (Int, Int)"))
811832 }
812- if ((fZ == fZ))
833+ if ((gf == gf))
813834 then {
814- let cH = fZ._2
815- let ga = fZ._1
816- let gb = if (if ((fS > 0))
817- then (fS > ga)
835+ let cK = gf._2
836+ let gg = gf._1
837+ let gh = if (if ((fY > 0))
838+ then (fY > gg)
818839 else false)
819- then ba(makeString(["amount to receive is less than ", toString(fS)], ""))
820- else ga
821- let gc = if ((fR == dr))
822- then $Tuple4(gb, 0, ((dx - gb) - cH), dz)
823- else if ((fR == ds))
824- then $Tuple4(0, gb, dx, ((dz - gb) - cH))
840+ then ba(makeString(["amount to receive is less than ", toString(fY)], ""))
841+ else gg
842+ let gi = if ((fX == du))
843+ then $Tuple4(gh, 0, ((dA - gh) - cK), dC)
844+ else if ((fX == dv))
845+ then $Tuple4(0, gh, dA, ((dC - gh) - cK))
825846 else throw("invalid out asset id")
826- let gd = gc._1
827- let ge = gc._2
828- let fI = gc._3
829- let fJ = gc._4
830- let gf = bZ(I(fJ, fX), I(fI, fW))
831- let gg = M(gf, a)
832- let gh = if ((fR == "WAVES"))
847+ let gj = gi._1
848+ let gk = gi._2
849+ let fO = gi._3
850+ let fP = gi._4
851+ let gl = cc(I(fP, gd), I(fO, gc))
852+ let gm = M(gl, a)
853+ let gn = if ((fX == "WAVES"))
833854 then unit
834- else fromBase58String(fR)
835- let gi = if ((cH > 0))
836- then [ScriptTransfer(bj, cH, gh)]
855+ else fromBase58String(fX)
856+ let go = if ((cK > 0))
857+ then [ScriptTransfer(bm, cK, gn)]
837858 else nil
838- let dJ = ([ScriptTransfer(dp, gb, gh), StringEntry(aj(toString(dp), dm), bT(gd, ge, dT, gg, height, lastBlock.timestamp)), IntegerEntry(ac(), gg), IntegerEntry(ad(height, lastBlock.timestamp), gg)] ++ gi)
839- if ((dJ == dJ))
859+ let dM = ([ScriptTransfer(ds, gh, gn), StringEntry(aj(toString(ds), dp), bW(gj, gk, dW, gm, height, lastBlock.timestamp)), IntegerEntry(ac(), gm), IntegerEntry(ad(height, lastBlock.timestamp), gm)] ++ go)
860+ if ((dM == dM))
840861 then {
841- let gj = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
842- if ((gj == gj))
862+ let gp = invoke(aU, "burn", [dW], [AttachedPayment(dq, dW)])
863+ if ((gp == gp))
843864 then {
844- let gk = {
845- let gl = if ((this == bj))
865+ let gq = {
866+ let gr = if ((this == bm))
846867 then 0
847- else cH
848- let gm = if ((bo(fR) == by))
868+ else cK
869+ let gs = if ((br(fX) == bB))
849870 then true
850871 else false
851- if (gm)
852- then $Tuple2(-((ga + gl)), 0)
853- else $Tuple2(0, -((ga + gl)))
872+ if (gs)
873+ then $Tuple2(-((gg + gr)), 0)
874+ else $Tuple2(0, -((gg + gr)))
854875 }
855- let eZ = gk._1
856- let fa = gk._2
857- let gn = eY(eZ, fa, 0)
858- let go = gn._1
859- let eP = gn._2
860- let gp = fc(eX, eP)
861- if ((gp == gp))
862- then $Tuple2((dJ ++ go), gb)
876+ let fd = gq._1
877+ let fe = gq._2
878+ let gt = fc(fd, fe, 0)
879+ let gu = gt._1
880+ let eT = gt._2
881+ let gv = fg(fb, eT)
882+ if ((gv == gv))
883+ then $Tuple2((dM ++ gu), gh)
863884 else throw("Strict value is not equal to itself.")
864885 }
865886 else throw("Strict value is not equal to itself.")
866887 }
867888 else throw("Strict value is not equal to itself.")
868889 }
869890 else throw("Strict value is not equal to itself.")
870891 }
871892 }
872893 else throw("Strict value is not equal to itself.")
873894 }
874895
875896
876-func gq () = {
877- let gr = aS()
878- let aQ = getString(gr, aa())
897+func gw () = {
898+ let gx = aS()
899+ let aQ = getString(gx, aa())
879900 if ($isInstanceOf(aQ, "String"))
880901 then {
881902 let aV = aQ
882903 fromBase58String(aV)
883904 }
884905 else if ($isInstanceOf(aQ, "Unit"))
885906 then unit
886907 else throw("Match error")
887908 }
888909
889910
890-let gs = throw("Permission denied")
911+let gy = throw("Permission denied")
891912
892-func gt (cX) = {
893- let aQ = gq()
913+func gz (da) = {
914+ let aQ = gw()
894915 if ($isInstanceOf(aQ, "ByteVector"))
895916 then {
896- let gu = aQ
897- (cX.callerPublicKey == gu)
917+ let gA = aQ
918+ (da.callerPublicKey == gA)
898919 }
899920 else if ($isInstanceOf(aQ, "Unit"))
900- then (cX.caller == this)
921+ then (da.caller == this)
901922 else throw("Match error")
902923 }
903924
904925
905-func gv (cX) = {
906- let aQ = gq()
926+func gB (da) = {
927+ let aQ = gw()
907928 if ($isInstanceOf(aQ, "ByteVector"))
908929 then {
909- let gu = aQ
910- if ((cX.callerPublicKey == gu))
930+ let gA = aQ
931+ if ((da.callerPublicKey == gA))
911932 then true
912- else gs
933+ else gy
913934 }
914935 else if ($isInstanceOf(aQ, "Unit"))
915- then if ((cX.caller == this))
936+ then if ((da.caller == this))
916937 then true
917- else gs
938+ else gy
918939 else throw("Match error")
919940 }
920941
921942
922-func gw (gx,ez,gy) = {
923- let bs = bk()
924- let dr = bs[x]
925- let ds = bs[y]
926- let eA = g
927- let eC = parseBigIntValue(m)
928- let aR = (parseBigIntValue(bg) * eC)
929- let cJ = if ((gx == false))
930- then [(toBigInt(bX(dr)) + gy), toBigInt(bX(ds))]
931- else [(toBigInt(bX(ds)) + gy), toBigInt(bX(dr))]
932- let eB = cJ[0]
933- let aV = eB
934- let cM = (aR * eA)
935- let eD = (((((ez * ez) / (eB * eA)) * ez) * eC) / (cM * eA))
936- let eE = ((aV + ((ez * eC) / cM)) - ez)
937- func cV (cW,eF) = {
938- let gz = cW
939- let eH = gz._1
940- let dk = gz._2
941- if ((dk != unit))
942- then cW
943+func gC (gD,eD,gE) = {
944+ let bv = bn()
945+ let du = bv[x]
946+ let dv = bv[y]
947+ let eE = g
948+ let eG = parseBigIntValue(m)
949+ let aR = (parseBigIntValue(bj) * eG)
950+ let cM = if ((gD == false))
951+ then [(toBigInt(ca(du)) + gE), toBigInt(ca(dv))]
952+ else [(toBigInt(ca(dv)) + gE), toBigInt(ca(du))]
953+ let eF = cM[0]
954+ let aV = eF
955+ let cP = (aR * eE)
956+ let eH = (((((eD * eD) / (eF * eE)) * eD) * eG) / (cP * eE))
957+ let eI = ((aV + ((eD * eG) / cP)) - eD)
958+ func cY (cZ,eJ) = {
959+ let gF = cZ
960+ let eL = gF._1
961+ let dn = gF._2
962+ if ((dn != unit))
963+ then cZ
943964 else {
944- let eI = (((eH * eH) + eD) / ((g * eH) + eE))
945- let eJ = Y((eI - value(eH)))
946- if ((f >= eJ))
947- then $Tuple2(eI, eF)
948- else $Tuple2(eI, unit)
965+ let eM = (((eL * eL) + eH) / ((g * eL) + eI))
966+ let eN = Y((eM - value(eL)))
967+ if ((f >= eN))
968+ then $Tuple2(eM, eJ)
969+ else $Tuple2(eM, unit)
949970 }
950971 }
951972
952- let db = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
953- let gA = {
954- let dd = db
955- let de = size(dd)
956- let df = $Tuple2(ez, unit)
957- func dg (dh,di) = if ((di >= de))
958- then dh
959- else cV(dh, dd[di])
973+ let de = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
974+ let gG = {
975+ let dg = de
976+ let dh = size(dg)
977+ let di = $Tuple2(eD, unit)
978+ func dj (dk,dl) = if ((dl >= dh))
979+ then dk
980+ else cY(dk, dg[dl])
960981
961- func dj (dh,di) = if ((di >= de))
962- then dh
982+ func dm (dk,dl) = if ((dl >= dh))
983+ then dk
963984 else throw("List size exceeds 15")
964985
965- dj(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(dg(df, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
986+ dm(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(dj(di, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
966987 }
967- let eH = gA._1
968- let dk = gA._2
969- if ((dk != unit))
970- then eH
971- else throw(("Y calculation error, Y = " + toString(eH)))
988+ let eL = gG._1
989+ let dn = gG._2
990+ if ((dn != unit))
991+ then eL
992+ else throw(("Y calculation error, Y = " + toString(eL)))
972993 }
973994
974995
975-func gB () = valueOrElse(getBoolean(aU, aH(toString(this))), false)
996+func gH () = valueOrElse(getBoolean(aU, aH(toString(this))), false)
976997
977998
978-@Callable(cX)
979-func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
980- let gE = if ((gx == false))
999+@Callable(da)
1000+func calculateAmountOutForSwapREADONLY (gI,gD,gJ) = {
1001+ let gK = if ((gD == false))
9811002 then {
982- let gF = aW(this, al())
983- let gy = (toBigInt(bX(aW(this, ak()))) + toBigInt(gC))
984- $Tuple2(gF, gy)
1003+ let gL = aW(this, al())
1004+ let gE = (toBigInt(ca(aW(this, ak()))) + toBigInt(gI))
1005+ $Tuple2(gL, gE)
9851006 }
9861007 else {
987- let gF = aW(this, ak())
988- let gy = (toBigInt(bX(aW(this, al()))) + toBigInt(gC))
989- $Tuple2(gF, gy)
1008+ let gL = aW(this, ak())
1009+ let gE = (toBigInt(ca(aW(this, al()))) + toBigInt(gI))
1010+ $Tuple2(gL, gE)
9901011 }
991- let gF = gE._1
992- let gy = gE._2
993- let bs = bk()
994- let dr = bs[x]
995- let ds = bs[y]
996- let cJ = [toBigInt(bX(dr)), toBigInt(bX(ds))]
997- let ez = cI(cJ)
998- let eH = gw(gx, ez, toBigInt(gC))
999- let gG = ((toBigInt(bX(gF)) - eH) - toBigInt(1))
1000- let gH = max([0, toInt(gG)])
1001- let gI = if ((gx == false))
1002- then [((toBigInt(bX(dr)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bX(ds)) - gG)]
1003- else [(toBigInt(bX(dr)) - gG), ((toBigInt(bX(ds)) + toBigInt(gC)) + toBigInt(gD))]
1004- let gJ = cI(gI)
1005- let ee = if ((gJ >= ez))
1012+ let gL = gK._1
1013+ let gE = gK._2
1014+ let bv = bn()
1015+ let du = bv[x]
1016+ let dv = bv[y]
1017+ let cM = [toBigInt(ca(du)), toBigInt(ca(dv))]
1018+ let eD = cL(cM)
1019+ let eL = gC(gD, eD, toBigInt(gI))
1020+ let gM = ((toBigInt(ca(gL)) - eL) - toBigInt(1))
1021+ let gN = max([0, toInt(gM)])
1022+ let gO = if ((gD == false))
1023+ then [((toBigInt(ca(du)) + toBigInt(gI)) + toBigInt(gJ)), (toBigInt(ca(dv)) - gM)]
1024+ else [(toBigInt(ca(du)) - gM), ((toBigInt(ca(dv)) + toBigInt(gI)) + toBigInt(gJ))]
1025+ let gP = cL(gO)
1026+ let ei = if ((gP >= eD))
10061027 then true
1007- else throw(makeString(["new D is fewer error", toString(ez), toString(gJ)], "__"))
1008- if ((ee == ee))
1009- then $Tuple2(nil, gH)
1028+ else throw(makeString(["new D is fewer error", toString(eD), toString(gP)], "__"))
1029+ if ((ei == ei))
1030+ then $Tuple2(nil, gN)
10101031 else throw("Strict value is not equal to itself.")
10111032 }
10121033
10131034
10141035
1015-@Callable(cX)
1016-func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1017- let gM = {
1036+@Callable(da)
1037+func calculateAmountOutForSwapAndSendTokens (gI,gD,gQ,gR,gJ) = {
1038+ let gS = {
10181039 let be = invoke(aU, "getSwapContractREADONLY", nil, nil)
10191040 if ($isInstanceOf(be, "String"))
10201041 then be
10211042 else throw(($getType(be) + " couldn't be cast to String"))
10221043 }
1023- let gN = {
1044+ let gT = {
10241045 let be = invoke(aU, "isPoolSwapDisabledREADONLY", [toString(this)], nil)
10251046 if ($isInstanceOf(be, "Boolean"))
10261047 then be
10271048 else throw(($getType(be) + " couldn't be cast to Boolean"))
10281049 }
1029- let gO = if (if (bh())
1050+ let gU = if (!(bi(da.caller)))
1051+ then if (if (bk())
1052+ then true
1053+ else (bz == t))
1054+ then true
1055+ else gT
1056+ else false
1057+ let gV = [if (if (!(gU))
10301058 then true
1031- else (bw == t))
1059+ else gz(da))
10321060 then true
1033- else gN
1034- let gP = [if (if (!(gO))
1061+ else ba("swap operation is blocked by admin"), if ((value(da.payments[0]).amount >= gI))
10351062 then true
1036- else gt(cX))
1037- then true
1038- else ba("swap operation is blocked by admin"), if ((value(cX.payments[0]).amount >= gC))
1039- then true
1040- else ba("Wrong amount"), if ((cX.caller == addressFromStringValue(gM)))
1063+ else ba("Wrong amount"), if ((da.caller == addressFromStringValue(gS)))
10411064 then true
10421065 else ba("Permission denied")]
1043- if ((gP == gP))
1066+ if ((gV == gV))
10441067 then {
1045- let fq = value(cX.payments[0])
1046- let gQ = bq(fq.assetId)
1047- let gR = if ((gx == false))
1068+ let fu = value(da.payments[0])
1069+ let gW = bt(fu.assetId)
1070+ let gX = if ((gD == false))
10481071 then {
1049- let gF = aW(this, al())
1050- let gy = (bX(gQ) - value(cX.payments[0]).amount)
1051- $Tuple2(gF, gy)
1072+ let gL = aW(this, al())
1073+ let gE = (ca(gW) - value(da.payments[0]).amount)
1074+ $Tuple2(gL, gE)
10521075 }
10531076 else {
1054- let gF = aW(this, ak())
1055- let gy = (bX(gQ) - value(cX.payments[0]).amount)
1056- $Tuple2(gF, gy)
1077+ let gL = aW(this, ak())
1078+ let gE = (ca(gW) - value(da.payments[0]).amount)
1079+ $Tuple2(gL, gE)
10571080 }
1058- let gF = gR._1
1059- let gy = gR._2
1060- let bs = bk()
1061- let dr = bs[x]
1062- let ds = bs[y]
1063- let cJ = if ((gx == false))
1064- then [(toBigInt(bX(dr)) - toBigInt(value(cX.payments[0]).amount)), toBigInt(bX(ds))]
1065- else [toBigInt(bX(dr)), (toBigInt(bX(ds)) - toBigInt(value(cX.payments[0]).amount))]
1066- let ez = cI(cJ)
1067- let eH = gw(gx, ez, toBigInt(0))
1068- let gG = ((toBigInt(bX(gF)) - eH) - toBigInt(1))
1069- let gH = max([0, toInt(gG)])
1070- let gS = if ((gH >= gK))
1081+ let gL = gX._1
1082+ let gE = gX._2
1083+ let bv = bn()
1084+ let du = bv[x]
1085+ let dv = bv[y]
1086+ let cM = if ((gD == false))
1087+ then [(toBigInt(ca(du)) - toBigInt(value(da.payments[0]).amount)), toBigInt(ca(dv))]
1088+ else [toBigInt(ca(du)), (toBigInt(ca(dv)) - toBigInt(value(da.payments[0]).amount))]
1089+ let eD = cL(cM)
1090+ let eL = gC(gD, eD, toBigInt(0))
1091+ let gM = ((toBigInt(ca(gL)) - eL) - toBigInt(1))
1092+ let gN = max([0, toInt(gM)])
1093+ let gY = if ((gN >= gQ))
10711094 then true
10721095 else throw("Exchange result is fewer coins than expected")
1073- if ((gS == gS))
1096+ if ((gY == gY))
10741097 then {
1075- let gI = if ((gx == false))
1076- then [(toBigInt(bX(dr)) + toBigInt(gD)), (toBigInt(bX(ds)) - gG)]
1077- else [(toBigInt(bX(dr)) - gG), (toBigInt(bX(ds)) + toBigInt(gD))]
1078- let gJ = cI(gI)
1079- let ee = if ((gJ >= ez))
1098+ let gO = if ((gD == false))
1099+ then [(toBigInt(ca(du)) + toBigInt(gJ)), (toBigInt(ca(dv)) - gM)]
1100+ else [(toBigInt(ca(du)) - gM), (toBigInt(ca(dv)) + toBigInt(gJ))]
1101+ let gP = cL(gO)
1102+ let ei = if ((gP >= eD))
10801103 then true
10811104 else throw("new D is fewer error")
1082- if ((ee == ee))
1105+ if ((ei == ei))
10831106 then {
1084- let eZ = if (gx)
1085- then -(gH)
1086- else gD
1087- let fa = if (gx)
1088- then gD
1089- else -(gH)
1090- let go = eY(eZ, fa, 0)._1
1091- if ((go == go))
1092- then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bo(gF))], gH)
1107+ let fd = if (gD)
1108+ then -(gN)
1109+ else gJ
1110+ let fe = if (gD)
1111+ then gJ
1112+ else -(gN)
1113+ let gu = fc(fd, fe, 0)._1
1114+ if ((gu == gu))
1115+ then $Tuple2([ScriptTransfer(addressFromStringValue(gR), gN, br(gL))], gN)
10931116 else throw("Strict value is not equal to itself.")
10941117 }
10951118 else throw("Strict value is not equal to itself.")
10961119 }
10971120 else throw("Strict value is not equal to itself.")
10981121 }
10991122 else throw("Strict value is not equal to itself.")
11001123 }
11011124
11021125
11031126
1104-@Callable(cX)
1127+@Callable(da)
11051128 func constructor (Z) = {
1106- let eD = gv(cX)
1107- if ((eD == eD))
1129+ let eH = gB(da)
1130+ if ((eH == eH))
11081131 then [StringEntry(Z(), Z)]
11091132 else throw("Strict value is not equal to itself.")
11101133 }
11111134
11121135
11131136
1114-@Callable(cX)
1115-func put (gT,gU) = {
1116- let gV = bC()
1117- let gW = valueOrErrorMessage(addressFromString(gV[D]), "Wr st addr")
1118- let gX = valueOrErrorMessage(addressFromString(gV[F]), "Wr sl addr")
1119- if ((0 > gT))
1137+@Callable(da)
1138+func put (gZ,ha) = {
1139+ let hb = bF()
1140+ let hc = valueOrErrorMessage(addressFromString(hb[D]), "Wr st addr")
1141+ let hd = valueOrErrorMessage(addressFromString(hb[F]), "Wr sl addr")
1142+ if ((0 > gZ))
11201143 then throw("Wrong slippage")
1121- else if ((size(cX.payments) != 2))
1144+ else if ((size(da.payments) != 2))
11221145 then throw("2 pmnts expd")
11231146 else {
1124- let gY = toBigInt(value(cX.payments[0]).amount)
1125- let gZ = toBigInt(value(cX.payments[1]).amount)
1126- let eU = (toBigInt(bX(bq(by))) - gY)
1127- if ((eU == eU))
1147+ let he = toBigInt(value(da.payments[0]).amount)
1148+ let hf = toBigInt(value(da.payments[1]).amount)
1149+ let eY = (toBigInt(ca(bt(bB))) - he)
1150+ if ((eY == eY))
11281151 then {
1129- let eV = (toBigInt(bX(bq(bz))) - gZ)
1130- if ((eV == eV))
1152+ let eZ = (toBigInt(ca(bt(bC))) - hf)
1153+ if ((eZ == eZ))
11311154 then {
1132- let eW = toBigInt(value(assetInfo(bx)).quantity)
1133- if ((eW == eW))
1155+ let fa = toBigInt(value(assetInfo(bA)).quantity)
1156+ if ((fa == fa))
11341157 then {
1135- let eX = eQ(gY, gZ, toBigInt(0))
1136- if ((eX == eX))
1158+ let fb = eU(he, hf, toBigInt(0))
1159+ if ((fb == fb))
11371160 then {
1138- let ha = fr(toString(cX.caller), toBase58String(cX.transactionId), AttachedPayment(value(cX.payments[0]).assetId, value(cX.payments[0]).amount), cX.payments[1], gT, true, false, true, 0, "")
1139- let er = ha._2
1140- let hb = ha._7
1141- let dJ = ha._9
1142- let es = ha._10
1143- let et = ha._11
1144- let dr = ha._12
1145- let ds = ha._13
1146- let ed = invoke(aU, "emit", [er], nil)
1147- if ((ed == ed))
1161+ let hg = fw(toString(da.caller), toBase58String(da.transactionId), AttachedPayment(value(da.payments[0]).assetId, value(da.payments[0]).amount), da.payments[1], gZ, true, false, true, 0, "")
1162+ let ev = hg._2
1163+ let hh = hg._7
1164+ let dM = hg._9
1165+ let ew = hg._10
1166+ let ex = hg._11
1167+ let du = hg._12
1168+ let dv = hg._13
1169+ let eh = invoke(aU, "emit", [ev], nil)
1170+ if ((eh == eh))
11481171 then {
1149- let hc = {
1150- let aQ = ed
1172+ let hi = {
1173+ let aQ = eh
11511174 if ($isInstanceOf(aQ, "Address"))
11521175 then {
1153- let hd = aQ
1154- invoke(hd, "emit", [er], nil)
1176+ let hj = aQ
1177+ invoke(hj, "emit", [ev], nil)
11551178 }
11561179 else unit
11571180 }
1158- if ((hc == hc))
1181+ if ((hi == hi))
11591182 then {
1160- let he = if ((es > 0))
1161- then invoke(gX, "put", nil, [AttachedPayment(dr, es)])
1183+ let hk = if ((ew > 0))
1184+ then invoke(hd, "put", nil, [AttachedPayment(du, ew)])
11621185 else nil
1163- if ((he == he))
1186+ if ((hk == hk))
11641187 then {
1165- let hf = if ((et > 0))
1166- then invoke(gX, "put", nil, [AttachedPayment(ds, et)])
1188+ let hl = if ((ex > 0))
1189+ then invoke(hd, "put", nil, [AttachedPayment(dv, ex)])
11671190 else nil
1168- if ((hf == hf))
1191+ if ((hl == hl))
11691192 then {
1170- let hg = if (gU)
1193+ let hm = if (ha)
11711194 then {
1172- let hh = invoke(gW, "stake", nil, [AttachedPayment(hb, er)])
1173- if ((hh == hh))
1195+ let hn = invoke(hc, "stake", nil, [AttachedPayment(hh, ev)])
1196+ if ((hn == hn))
11741197 then nil
11751198 else throw("Strict value is not equal to itself.")
11761199 }
1177- else [ScriptTransfer(cX.caller, er, hb)]
1178- let hi = eY(0, 0, 0)
1179- let go = hi._1
1180- let eP = hi._2
1181- let hj = if ((eP >= eX))
1200+ else [ScriptTransfer(da.caller, ev, hh)]
1201+ let ho = fc(0, 0, 0)
1202+ let gu = ho._1
1203+ let eT = ho._2
1204+ let hp = if ((eT >= fb))
11821205 then true
1183- else ba(makeString(["updated DLp lower than current DLp", toString(eU), toString(eV), toString(eW), toString(eX), toString(eP), toString(es), toString(et)], " "))
1184- if ((hj == hj))
1206+ else ba(makeString(["updated DLp lower than current DLp", toString(eY), toString(eZ), toString(fa), toString(fb), toString(eT), toString(ew), toString(ex)], " "))
1207+ if ((hp == hp))
11851208 then {
1186- let hk = value(assetInfo(bx)).quantity
1187- if ((hk == hk))
1188- then ((dJ ++ hg) ++ go)
1209+ let hq = value(assetInfo(bA)).quantity
1210+ if ((hq == hq))
1211+ then ((dM ++ hm) ++ gu)
11891212 else throw("Strict value is not equal to itself.")
11901213 }
11911214 else throw("Strict value is not equal to itself.")
11921215 }
11931216 else throw("Strict value is not equal to itself.")
11941217 }
11951218 else throw("Strict value is not equal to itself.")
11961219 }
11971220 else throw("Strict value is not equal to itself.")
11981221 }
11991222 else throw("Strict value is not equal to itself.")
12001223 }
12011224 else throw("Strict value is not equal to itself.")
12021225 }
12031226 else throw("Strict value is not equal to itself.")
12041227 }
12051228 else throw("Strict value is not equal to itself.")
12061229 }
12071230 else throw("Strict value is not equal to itself.")
12081231 }
12091232 }
12101233
12111234
12121235
1213-@Callable(cX)
1214-func putOneTknV2 (fS,gU) = {
1215- let hl = {
1236+@Callable(da)
1237+func putOneTknV2 (fY,ha) = {
1238+ let hr = {
12161239 let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12171240 if ($isInstanceOf(be, "Boolean"))
12181241 then be
12191242 else throw(($getType(be) + " couldn't be cast to Boolean"))
12201243 }
1221- let hm = if (if (if (bh())
1244+ let fA = if (!(bi(da.caller)))
1245+ then if (if (if (bk())
1246+ then true
1247+ else (bz == r))
1248+ then true
1249+ else (bz == t))
1250+ then true
1251+ else hr
1252+ else false
1253+ let gV = [if (if (!(fA))
12221254 then true
1223- else (bw == r))
1255+ else gz(da))
12241256 then true
1225- else (bw == t))
1226- then true
1227- else hl
1228- let gP = [if (if (!(hm))
1229- then true
1230- else gt(cX))
1231- then true
1232- else ba("put operation is blocked by admin"), if ((size(cX.payments) == 1))
1257+ else ba("put operation is blocked by admin"), if ((size(da.payments) == 1))
12331258 then true
12341259 else ba("exactly 1 payment are expected")]
1235- if ((gP == gP))
1260+ if ((gV == gV))
12361261 then {
1237- let dr = toBase58String(value(by))
1238- let ds = toBase58String(value(bz))
1239- let dq = bx
1240- let fW = bA
1241- let fX = bB
1242- let dp = if ((cX.caller == this))
1243- then cX.originCaller
1244- else cX.caller
1245- let fq = value(cX.payments[0])
1246- let dn = toBase58String(value(fq.assetId))
1247- let dT = fq.amount
1248- let eX = if ((fq.assetId == by))
1249- then eQ(toBigInt(dT), toBigInt(0), toBigInt(0))
1250- else eQ(toBigInt(0), toBigInt(dT), toBigInt(0))
1251- if ((eX == eX))
1262+ let du = toBase58String(value(bB))
1263+ let dv = toBase58String(value(bC))
1264+ let dt = bA
1265+ let gc = bD
1266+ let gd = bE
1267+ let ds = if ((da.caller == this))
1268+ then da.originCaller
1269+ else da.caller
1270+ let fu = value(da.payments[0])
1271+ let dq = toBase58String(value(fu.assetId))
1272+ let dW = fu.amount
1273+ let fb = if ((fu.assetId == bB))
1274+ then eU(toBigInt(dW), toBigInt(0), toBigInt(0))
1275+ else eU(toBigInt(0), toBigInt(dW), toBigInt(0))
1276+ if ((fb == fb))
12521277 then {
1253- let hn = fv(dT, dn, toString(dp), toBase58String(cX.transactionId), true)
1254- if ((hn == hn))
1278+ let hs = fB(dW, dq, toString(ds), toBase58String(da.transactionId), true)
1279+ if ((hs == hs))
12551280 then {
1256- let cH = hn._3
1257- let dJ = hn._2
1258- let ho = hn._1
1259- let er = if (if ((fS > 0))
1260- then (fS > ho)
1281+ let cK = hs._3
1282+ let dM = hs._2
1283+ let ht = hs._1
1284+ let ev = if (if ((fY > 0))
1285+ then (fY > ht)
12611286 else false)
1262- then ba(makeString(["amount to receive is less than ", toString(fS)], ""))
1263- else ho
1264- let ha = invoke(aU, "emit", [er], nil)
1265- if ((ha == ha))
1287+ then ba(makeString(["amount to receive is less than ", toString(fY)], ""))
1288+ else ht
1289+ let hg = invoke(aU, "emit", [ev], nil)
1290+ if ((hg == hg))
12661291 then {
1267- let hc = {
1268- let aQ = ha
1292+ let hi = {
1293+ let aQ = hg
12691294 if ($isInstanceOf(aQ, "Address"))
12701295 then {
1271- let hd = aQ
1272- invoke(hd, "emit", [er], nil)
1296+ let hj = aQ
1297+ invoke(hj, "emit", [ev], nil)
12731298 }
12741299 else unit
12751300 }
1276- if ((hc == hc))
1301+ if ((hi == hi))
12771302 then {
1278- let hg = if (gU)
1303+ let hm = if (ha)
12791304 then {
1280- let hh = invoke(bE, "stakeFor", [toString(cX.caller)], [AttachedPayment(dq, er)])
1281- if ((hh == hh))
1305+ let hn = invoke(bH, "stakeFor", [toString(da.caller)], [AttachedPayment(dt, ev)])
1306+ if ((hn == hn))
12821307 then nil
12831308 else throw("Strict value is not equal to itself.")
12841309 }
1285- else [ScriptTransfer(cX.caller, er, dq)]
1286- let gi = if ((cH > 0))
1287- then [ScriptTransfer(bj, cH, fromBase58String(dn))]
1310+ else [ScriptTransfer(da.caller, ev, dt)]
1311+ let go = if ((cK > 0))
1312+ then [ScriptTransfer(bm, cK, fromBase58String(dq))]
12881313 else nil
1289- let hp = if ((this == bj))
1314+ let hu = if ((this == bm))
12901315 then $Tuple2(0, 0)
12911316 else {
1292- let hq = if ((fq.assetId == by))
1317+ let hv = if ((fu.assetId == bB))
12931318 then true
12941319 else false
1295- if (hq)
1296- then $Tuple2(-(cH), 0)
1297- else $Tuple2(0, -(cH))
1320+ if (hv)
1321+ then $Tuple2(-(cK), 0)
1322+ else $Tuple2(0, -(cK))
12981323 }
1299- let eZ = hp._1
1300- let fa = hp._2
1301- let hr = eY(eZ, fa, 0)
1302- let go = hr._1
1303- let eP = hr._2
1304- let gp = fc(eX, eP)
1305- if ((gp == gp))
1306- then $Tuple2((((dJ ++ hg) ++ gi) ++ go), er)
1324+ let fd = hu._1
1325+ let fe = hu._2
1326+ let hw = fc(fd, fe, 0)
1327+ let gu = hw._1
1328+ let eT = hw._2
1329+ let gv = fg(fb, eT)
1330+ if ((gv == gv))
1331+ then $Tuple2((((dM ++ hm) ++ go) ++ gu), ev)
13071332 else throw("Strict value is not equal to itself.")
13081333 }
13091334 else throw("Strict value is not equal to itself.")
13101335 }
13111336 else throw("Strict value is not equal to itself.")
13121337 }
13131338 else throw("Strict value is not equal to itself.")
13141339 }
13151340 else throw("Strict value is not equal to itself.")
13161341 }
13171342 else throw("Strict value is not equal to itself.")
13181343 }
13191344
13201345
13211346
1322-@Callable(cX)
1323-func putForFree (hs) = if ((0 > hs))
1347+@Callable(da)
1348+func putForFree (hx) = if ((0 > hx))
13241349 then throw("Wrong slpg")
1325- else if ((size(cX.payments) != 2))
1350+ else if ((size(da.payments) != 2))
13261351 then throw("2 pmnts expd")
13271352 else {
1328- let ht = fr(toString(cX.caller), toBase58String(cX.transactionId), AttachedPayment(value(cX.payments[0]).assetId, value(cX.payments[0]).amount), cX.payments[1], hs, false, false, true, 0, "")
1329- let dJ = ht._9
1330- let gY = toBigInt(value(cX.payments[0]).amount)
1331- let gZ = toBigInt(value(cX.payments[1]).amount)
1332- let eX = eQ(gY, gZ, toBigInt(0))
1333- if ((eX == eX))
1353+ let hy = fw(toString(da.caller), toBase58String(da.transactionId), AttachedPayment(value(da.payments[0]).assetId, value(da.payments[0]).amount), da.payments[1], hx, false, false, true, 0, "")
1354+ let dM = hy._9
1355+ let he = toBigInt(value(da.payments[0]).amount)
1356+ let hf = toBigInt(value(da.payments[1]).amount)
1357+ let fb = eU(he, hf, toBigInt(0))
1358+ if ((fb == fb))
13341359 then {
1335- let hu = eY(0, 0, 0)
1336- let go = hu._1
1337- let eP = hu._2
1338- let gp = fc(eX, eP)
1339- if ((gp == gp))
1340- then (dJ ++ go)
1360+ let hz = fc(0, 0, 0)
1361+ let gu = hz._1
1362+ let eT = hz._2
1363+ let gv = fg(fb, eT)
1364+ if ((gv == gv))
1365+ then (dM ++ gu)
13411366 else throw("Strict value is not equal to itself.")
13421367 }
13431368 else throw("Strict value is not equal to itself.")
13441369 }
13451370
13461371
13471372
1348-@Callable(cX)
1373+@Callable(da)
13491374 func get () = {
1350- let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1351- if ((eX == eX))
1375+ let fb = eU(toBigInt(0), toBigInt(0), toBigInt(0))
1376+ if ((fb == fb))
13521377 then {
1353- let ed = fp(cX)
1354- let hv = ed._1
1355- let dI = ed._2
1356- let dT = ed._3
1357- let dn = ed._4
1358- let dJ = ed._5
1359- let eE = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
1360- if ((eE == eE))
1378+ let eh = ft(da)
1379+ let hA = eh._1
1380+ let dL = eh._2
1381+ let dW = eh._3
1382+ let dq = eh._4
1383+ let dM = eh._5
1384+ let eI = invoke(aU, "burn", [dW], [AttachedPayment(dq, dW)])
1385+ if ((eI == eI))
13611386 then {
1362- let hw = eY(-(hv), -(dI), 0)
1363- let go = hw._1
1364- let eP = hw._2
1365- let gp = fc(eX, eP)
1366- if ((gp == gp))
1367- then (dJ ++ go)
1387+ let hB = fc(-(hA), -(dL), 0)
1388+ let gu = hB._1
1389+ let eT = hB._2
1390+ let gv = fg(fb, eT)
1391+ if ((gv == gv))
1392+ then (dM ++ gu)
13681393 else throw("Strict value is not equal to itself.")
13691394 }
13701395 else throw("Strict value is not equal to itself.")
13711396 }
13721397 else throw("Strict value is not equal to itself.")
13731398 }
13741399
13751400
13761401
1377-@Callable(cX)
1378-func getOneTknV2 (fR,fS) = {
1379- let hl = {
1402+@Callable(da)
1403+func getOneTknV2 (fX,fY) = {
1404+ let hr = {
13801405 let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13811406 if ($isInstanceOf(be, "Boolean"))
13821407 then be
13831408 else throw(($getType(be) + " couldn't be cast to Boolean"))
13841409 }
1385- let hx = if (if (bh())
1410+ let fv = if (!(bi(da.caller)))
1411+ then if (if (bk())
1412+ then true
1413+ else (bz == t))
1414+ then true
1415+ else hr
1416+ else false
1417+ let gV = [if (if (!(fv))
13861418 then true
1387- else (bw == t))
1419+ else gz(da))
13881420 then true
1389- else hl
1390- let gP = [if (if (!(hx))
1391- then true
1392- else gt(cX))
1393- then true
1394- else ba("get operation is blocked by admin"), if ((size(cX.payments) == 1))
1421+ else ba("get operation is blocked by admin"), if ((size(da.payments) == 1))
13951422 then true
13961423 else ba("exactly 1 payment are expected")]
1397- if ((gP == gP))
1424+ if ((gV == gV))
13981425 then {
1399- let hy = fQ(fR, fS, cX.payments, cX.caller, cX.originCaller, cX.transactionId)
1400- let dJ = hy._1
1401- let gb = hy._2
1402- $Tuple2(dJ, gb)
1426+ let hC = fW(fX, fY, da.payments, da.caller, da.originCaller, da.transactionId)
1427+ let dM = hC._1
1428+ let gh = hC._2
1429+ $Tuple2(dM, gh)
14031430 }
14041431 else throw("Strict value is not equal to itself.")
14051432 }
14061433
14071434
14081435
1409-@Callable(cX)
1436+@Callable(da)
14101437 func refreshDLp () = {
1411- let hz = valueOrElse(getInteger(at), 0)
1412- let hA = if (((height - hz) >= aw))
1438+ let hD = valueOrElse(getInteger(at), 0)
1439+ let hE = if (((height - hD) >= aw))
14131440 then unit
14141441 else ba(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1415- if ((hA == hA))
1442+ if ((hE == hE))
14161443 then {
1417- let fj = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), bc("invalid dLp"))
1418- let hB = eY(0, 0, 0)
1419- let hC = hB._1
1420- let eP = hB._2
1421- let fb = if ((fj != eP))
1422- then hC
1444+ let fn = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), bc("invalid dLp"))
1445+ let hF = fc(0, 0, 0)
1446+ let hG = hF._1
1447+ let eT = hF._2
1448+ let ff = if ((fn != eT))
1449+ then hG
14231450 else ba("nothing to refresh")
1424- $Tuple2(fb, toString(eP))
1451+ $Tuple2(ff, toString(eT))
14251452 }
14261453 else throw("Strict value is not equal to itself.")
14271454 }
14281455
14291456
14301457
1431-@Callable(cX)
1432-func getOneTknV2READONLY (fR,hD) = {
1433- let dr = toBase58String(value(by))
1434- let ds = toBase58String(value(bz))
1435- let dq = toBase58String(value(bx))
1436- let cJ = [toBigInt(bX(dr)), toBigInt(bX(ds))]
1437- let eO = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dq)), "invalid lp asset").quantity)
1438- let cl = cI(cJ)
1439- let ck = (cl - fraction(toBigInt(hD), cl, eO))
1440- let hE = if ((fR == dr))
1458+@Callable(da)
1459+func getOneTknV2READONLY (fX,hH) = {
1460+ let du = toBase58String(value(bB))
1461+ let dv = toBase58String(value(bC))
1462+ let dt = toBase58String(value(bA))
1463+ let cM = [toBigInt(ca(du)), toBigInt(ca(dv))]
1464+ let eS = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dt)), "invalid lp asset").quantity)
1465+ let co = cL(cM)
1466+ let cn = (co - fraction(toBigInt(hH), co, eS))
1467+ let hI = if ((fX == du))
14411468 then 0
1442- else if ((fR == ds))
1469+ else if ((fX == dv))
14431470 then 1
14441471 else throw("invalid out asset id")
1445- let hF = ey(cJ, hE, ck)
1446- let gG = (cJ[hE] - hF)
1447- let gH = max([0, toInt((gG - f))])
1448- let hG = cF(gH, bf)
1449- let ga = hG._1
1450- let cH = hG._2
1451- $Tuple2(nil, $Tuple2(ga, cH))
1472+ let hJ = eC(cM, hI, cn)
1473+ let gM = (cM[hI] - hJ)
1474+ let gN = max([0, toInt((gM - f))])
1475+ let hK = cI(gN, bf)
1476+ let gg = hK._1
1477+ let cK = hK._2
1478+ $Tuple2(nil, $Tuple2(gg, cK))
14521479 }
14531480
14541481
14551482
1456-@Callable(cX)
1457-func getOneTknV2WithBonusREADONLY (fR,hD) = {
1458- let dr = toBase58String(value(by))
1459- let ds = toBase58String(value(bz))
1460- let dq = toBase58String(value(bx))
1461- let dx = bX(dr)
1462- let dz = bX(ds)
1463- let hH = {
1464- let be = invoke(this, "getOneTknV2READONLY", [fR, hD], nil)
1483+@Callable(da)
1484+func getOneTknV2WithBonusREADONLY (fX,hH) = {
1485+ let du = toBase58String(value(bB))
1486+ let dv = toBase58String(value(bC))
1487+ let dt = toBase58String(value(bA))
1488+ let dA = ca(du)
1489+ let dC = ca(dv)
1490+ let hL = {
1491+ let be = invoke(this, "getOneTknV2READONLY", [fX, hH], nil)
14651492 if ($isInstanceOf(be, "(Int, Int)"))
14661493 then be
14671494 else throw(($getType(be) + " couldn't be cast to (Int, Int)"))
14681495 }
1469- let ga = hH._1
1470- let cH = hH._2
1471- let ed = dl("", dq, hD, this)
1472- let dH = ed._1
1473- let dI = ed._2
1474- let hI = (dH + dI)
1475- let fP = if ((hI == 0))
1476- then if ((ga == 0))
1496+ let gg = hL._1
1497+ let cK = hL._2
1498+ let eh = do("", dt, hH, this)
1499+ let dK = eh._1
1500+ let dL = eh._2
1501+ let hM = (dK + dL)
1502+ let fV = if ((hM == 0))
1503+ then if ((gg == 0))
14771504 then 0
14781505 else throw("bonus calculation error")
1479- else fraction((ga - hI), a, hI)
1480- $Tuple2(nil, $Tuple3(ga, cH, fP))
1506+ else fraction((gg - hM), a, hM)
1507+ $Tuple2(nil, $Tuple3(gg, cK, fV))
14811508 }
14821509
14831510
14841511
1485-@Callable(cX)
1486-func getNoLess (hJ,hK) = {
1487- let ed = fp(cX)
1488- let dH = ed._1
1489- let dI = ed._2
1490- let dT = ed._3
1491- let dn = ed._4
1492- let dJ = ed._5
1493- if ((hJ > dH))
1494- then throw(((("Failed: " + toString(dH)) + " < ") + toString(hJ)))
1495- else if ((hK > dI))
1496- then throw(((("Failed: " + toString(dI)) + " < ") + toString(hK)))
1512+@Callable(da)
1513+func getNoLess (hN,hO) = {
1514+ let eh = ft(da)
1515+ let dK = eh._1
1516+ let dL = eh._2
1517+ let dW = eh._3
1518+ let dq = eh._4
1519+ let dM = eh._5
1520+ if ((hN > dK))
1521+ then throw(((("Failed: " + toString(dK)) + " < ") + toString(hN)))
1522+ else if ((hO > dL))
1523+ then throw(((("Failed: " + toString(dL)) + " < ") + toString(hO)))
14971524 else {
1498- let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1499- if ((eX == eX))
1525+ let fb = eU(toBigInt(0), toBigInt(0), toBigInt(0))
1526+ if ((fb == fb))
15001527 then {
1501- let hL = invoke(aU, "burn", [dT], [AttachedPayment(dn, dT)])
1502- if ((hL == hL))
1528+ let hP = invoke(aU, "burn", [dW], [AttachedPayment(dq, dW)])
1529+ if ((hP == hP))
15031530 then {
1504- let hM = eY(-(dH), -(dI), 0)
1505- let go = hM._1
1506- let eP = hM._2
1507- let gp = fc(eX, eP)
1508- if ((gp == gp))
1509- then (dJ ++ go)
1531+ let hQ = fc(-(dK), -(dL), 0)
1532+ let gu = hQ._1
1533+ let eT = hQ._2
1534+ let gv = fg(fb, eT)
1535+ if ((gv == gv))
1536+ then (dM ++ gu)
15101537 else throw("Strict value is not equal to itself.")
15111538 }
15121539 else throw("Strict value is not equal to itself.")
15131540 }
15141541 else throw("Strict value is not equal to itself.")
15151542 }
15161543 }
15171544
15181545
15191546
1520-@Callable(cX)
1521-func unstakeAndGet (cG) = {
1522- let hN = if ((size(cX.payments) != 0))
1547+@Callable(da)
1548+func unstakeAndGet (cJ) = {
1549+ let hR = if ((size(da.payments) != 0))
15231550 then throw("No pmnts expd")
15241551 else true
1525- if ((hN == hN))
1552+ if ((hR == hR))
15261553 then {
1527- let hO = bC()
1528- let hb = bx
1529- let hP = valueOrErrorMessage(addressFromString(hO[D]), "Wr st addr")
1530- let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1531- if ((eX == eX))
1554+ let hS = bF()
1555+ let hh = bA
1556+ let hT = valueOrErrorMessage(addressFromString(hS[D]), "Wr st addr")
1557+ let fb = eU(toBigInt(0), toBigInt(0), toBigInt(0))
1558+ if ((fb == fb))
15321559 then {
1533- let hQ = invoke(hP, "unstake", [toBase58String(hb), cG], nil)
1534- if ((hQ == hQ))
1560+ let hU = invoke(hT, "unstake", [toBase58String(hh), cJ], nil)
1561+ if ((hU == hU))
15351562 then {
1536- let ed = dl(toBase58String(cX.transactionId), toBase58String(hb), cG, cX.caller)
1537- let dH = ed._1
1538- let dI = ed._2
1539- let dv = parseIntValue(ed._9)
1540- let dJ = ed._10
1541- let hR = if (if (bh())
1542- then true
1543- else (dv == t))
1544- then throw(("Blocked: " + toString(dv)))
1563+ let eh = do(toBase58String(da.transactionId), toBase58String(hh), cJ, da.caller)
1564+ let dK = eh._1
1565+ let dL = eh._2
1566+ let dy = parseIntValue(eh._9)
1567+ let dM = eh._10
1568+ let fv = if (!(bi(da.caller)))
1569+ then if (bk())
1570+ then true
1571+ else (bz == t)
1572+ else false
1573+ let hV = if (fv)
1574+ then throw(("Blocked: " + toString(dy)))
15451575 else true
1546- if ((hR == hR))
1576+ if ((hV == hV))
15471577 then {
1548- let hS = invoke(aU, "burn", [cG], [AttachedPayment(hb, cG)])
1549- if ((hS == hS))
1578+ let hW = invoke(aU, "burn", [cJ], [AttachedPayment(hh, cJ)])
1579+ if ((hW == hW))
15501580 then {
1551- let hT = eY(-(dH), -(dI), 0)
1552- let go = hT._1
1553- let eP = hT._2
1554- let gp = fc(eX, eP)
1555- if ((gp == gp))
1556- then (dJ ++ go)
1581+ let hX = fc(-(dK), -(dL), 0)
1582+ let gu = hX._1
1583+ let eT = hX._2
1584+ let gv = fg(fb, eT)
1585+ if ((gv == gv))
1586+ then (dM ++ gu)
15571587 else throw("Strict value is not equal to itself.")
15581588 }
15591589 else throw("Strict value is not equal to itself.")
15601590 }
15611591 else throw("Strict value is not equal to itself.")
15621592 }
15631593 else throw("Strict value is not equal to itself.")
15641594 }
15651595 else throw("Strict value is not equal to itself.")
15661596 }
15671597 else throw("Strict value is not equal to itself.")
15681598 }
15691599
15701600
15711601
1572-@Callable(cX)
1573-func unstakeAndGetNoLess (hU,hV,hK) = {
1574- let hx = if (bh())
1602+@Callable(da)
1603+func unstakeAndGetNoLess (hY,hZ,hO) = {
1604+ let fv = if (!(bi(da.caller)))
1605+ then if (bk())
1606+ then true
1607+ else (bz == t)
1608+ else false
1609+ let gV = [if (!(fv))
15751610 then true
1576- else (bw == t)
1577- let gP = [if (!(hx))
1578- then true
1579- else throw("get operation is blocked by admin"), if ((size(cX.payments) == 0))
1611+ else throw("get operation is blocked by admin"), if ((size(da.payments) == 0))
15801612 then true
15811613 else throw("no payments are expected")]
1582- if ((gP == gP))
1614+ if ((gV == gV))
15831615 then {
1584- let eX = eQ(toBigInt(0), toBigInt(0), toBigInt(0))
1585- if ((eX == eX))
1616+ let fb = eU(toBigInt(0), toBigInt(0), toBigInt(0))
1617+ if ((fb == fb))
15861618 then {
1587- let hQ = invoke(bE, "unstake", [toBase58String(bx), hU], nil)
1588- if ((hQ == hQ))
1619+ let hU = invoke(bH, "unstake", [toBase58String(bA), hY], nil)
1620+ if ((hU == hU))
15891621 then {
1590- let hW = dl(toBase58String(cX.transactionId), toBase58String(bx), hU, cX.caller)
1591- let dH = hW._1
1592- let dI = hW._2
1593- let dJ = hW._10
1594- let hX = [if ((dH >= hV))
1622+ let ia = do(toBase58String(da.transactionId), toBase58String(bA), hY, da.caller)
1623+ let dK = ia._1
1624+ let dL = ia._2
1625+ let dM = ia._10
1626+ let ib = [if ((dK >= hZ))
15951627 then true
1596- else throw(makeString(["amount asset amount to receive is less than ", toString(hV)], "")), if ((dI >= hK))
1628+ else throw(makeString(["amount asset amount to receive is less than ", toString(hZ)], "")), if ((dL >= hO))
15971629 then true
1598- else throw(makeString(["price asset amount to receive is less than ", toString(hK)], ""))]
1599- if ((hX == hX))
1630+ else throw(makeString(["price asset amount to receive is less than ", toString(hO)], ""))]
1631+ if ((ib == ib))
16001632 then {
1601- let hL = invoke(aU, "burn", [hU], [AttachedPayment(bx, hU)])
1602- if ((hL == hL))
1633+ let hP = invoke(aU, "burn", [hY], [AttachedPayment(bA, hY)])
1634+ if ((hP == hP))
16031635 then {
1604- let hY = eY(-(dH), -(dI), 0)
1605- let go = hY._1
1606- let eP = hY._2
1607- let gp = fc(eX, eP)
1608- if ((gp == gp))
1609- then (dJ ++ go)
1636+ let ic = fc(-(dK), -(dL), 0)
1637+ let gu = ic._1
1638+ let eT = ic._2
1639+ let gv = fg(fb, eT)
1640+ if ((gv == gv))
1641+ then (dM ++ gu)
16101642 else throw("Strict value is not equal to itself.")
16111643 }
16121644 else throw("Strict value is not equal to itself.")
16131645 }
16141646 else throw("Strict value is not equal to itself.")
16151647 }
16161648 else throw("Strict value is not equal to itself.")
16171649 }
16181650 else throw("Strict value is not equal to itself.")
16191651 }
16201652 else throw("Strict value is not equal to itself.")
16211653 }
16221654
16231655
16241656
1625-@Callable(cX)
1626-func unstakeAndGetOneTknV2 (hU,fR,fS) = {
1627- let hl = {
1657+@Callable(da)
1658+func unstakeAndGetOneTknV2 (hY,fX,fY) = {
1659+ let hr = {
16281660 let be = invoke(aU, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16291661 if ($isInstanceOf(be, "Boolean"))
16301662 then be
16311663 else throw(($getType(be) + " couldn't be cast to Boolean"))
16321664 }
1633- let hx = if (if (bh())
1665+ let fv = if (!(bi(da.caller)))
1666+ then if (if (bk())
1667+ then true
1668+ else (bz == t))
1669+ then true
1670+ else hr
1671+ else false
1672+ let gV = [if (if (!(fv))
16341673 then true
1635- else (bw == t))
1674+ else gz(da))
16361675 then true
1637- else hl
1638- let gP = [if (if (!(hx))
1639- then true
1640- else gt(cX))
1641- then true
1642- else ba("get operation is blocked by admin"), if ((size(cX.payments) == 0))
1676+ else ba("get operation is blocked by admin"), if ((size(da.payments) == 0))
16431677 then true
16441678 else ba("no payments are expected")]
1645- if ((gP == gP))
1679+ if ((gV == gV))
16461680 then {
1647- let hO = bC()
1648- let hb = bx
1649- let hP = valueOrErrorMessage(addressFromString(hO[D]), "Wr st addr")
1650- let dp = cX.caller
1651- let hZ = this
1652- let hQ = invoke(hP, "unstakeINTERNAL", [hb, hU, dp.bytes, hZ.bytes], nil)
1653- if ((hQ == hQ))
1681+ let hS = bF()
1682+ let hh = bA
1683+ let hT = valueOrErrorMessage(addressFromString(hS[D]), "Wr st addr")
1684+ let ds = da.caller
1685+ let id = this
1686+ let hU = invoke(hT, "unstakeINTERNAL", [hh, hY, ds.bytes, id.bytes], nil)
1687+ if ((hU == hU))
16541688 then {
1655- let ia = fQ(fR, fS, [AttachedPayment(hb, hU)], cX.caller, cX.originCaller, cX.transactionId)
1656- let dJ = ia._1
1657- let gb = ia._2
1658- $Tuple2(dJ, gb)
1689+ let ie = fW(fX, fY, [AttachedPayment(hh, hY)], da.caller, da.originCaller, da.transactionId)
1690+ let dM = ie._1
1691+ let gh = ie._2
1692+ $Tuple2(dM, gh)
16591693 }
16601694 else throw("Strict value is not equal to itself.")
16611695 }
16621696 else throw("Strict value is not equal to itself.")
16631697 }
16641698
16651699
16661700
1667-@Callable(cX)
1668-func putOneTknV2WithBonusREADONLY (ib,ic) = {
1669- let id = fv(ib, ic, "", "", true)
1670- let fK = id._1
1671- let dJ = id._2
1672- let cH = id._3
1673- let fP = id._4
1674- $Tuple2(nil, $Tuple3(fK, cH, fP))
1701+@Callable(da)
1702+func putOneTknV2WithBonusREADONLY (if,ig) = {
1703+ let ih = fB(if, ig, "", "", true)
1704+ let fQ = ih._1
1705+ let dM = ih._2
1706+ let cK = ih._3
1707+ let fV = ih._4
1708+ $Tuple2(nil, $Tuple3(fQ, cK, fV))
16751709 }
16761710
16771711
16781712
1679-@Callable(cX)
1680-func putOneTknV2WithoutTakeFeeREADONLY (ib,ic) = {
1681- let ie = fv(ib, ic, "", "", false)
1682- let fK = ie._1
1683- let dJ = ie._2
1684- let cH = ie._3
1685- let fP = ie._4
1686- $Tuple2(nil, $Tuple3(fK, cH, fP))
1713+@Callable(da)
1714+func putOneTknV2WithoutTakeFeeREADONLY (if,ig) = {
1715+ let ii = fB(if, ig, "", "", false)
1716+ let fQ = ii._1
1717+ let dM = ii._2
1718+ let cK = ii._3
1719+ let fV = ii._4
1720+ $Tuple2(nil, $Tuple3(fQ, cK, fV))
16871721 }
16881722
16891723
16901724
1691-@Callable(cX)
1692-func activate (if,ig) = if ((toString(cX.caller) != toString(aU)))
1725+@Callable(da)
1726+func activate (ij,ik) = if ((toString(da.caller) != toString(aU)))
16931727 then throw("denied")
1694- else $Tuple2([StringEntry(ak(), if), StringEntry(al(), ig), StringEntry(am(), toString(l)), StringEntry(an(height), toString(l))], "success")
1728+ else $Tuple2([StringEntry(ak(), ij), StringEntry(al(), ik), StringEntry(am(), toString(l)), StringEntry(an(height), toString(l))], "success")
16951729
16961730
16971731
1698-@Callable(cX)
1699-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bk())
1732+@Callable(da)
1733+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bn())
17001734
17011735
17021736
1703-@Callable(cX)
1704-func getAccBalanceWrapperREADONLY (bY) = $Tuple2(nil, bX(bY))
1737+@Callable(da)
1738+func getAccBalanceWrapperREADONLY (cb) = $Tuple2(nil, ca(cb))
17051739
17061740
17071741
1708-@Callable(cX)
1709-func calcPricesWrapperREADONLY (cr,cs,cw) = {
1710- let ih = cv(cr, cs, cw)
1711- $Tuple2(nil, [toString(ih[0]), toString(ih[1]), toString(ih[2])])
1742+@Callable(da)
1743+func calcPricesWrapperREADONLY (cu,cv,cz) = {
1744+ let il = cy(cu, cv, cz)
1745+ $Tuple2(nil, [toString(il[0]), toString(il[1]), toString(il[2])])
17121746 }
17131747
17141748
17151749
1716-@Callable(cX)
1717-func fromX18WrapperREADONLY (N,ii) = $Tuple2(nil, M(parseBigIntValue(N), ii))
1750+@Callable(da)
1751+func fromX18WrapperREADONLY (N,im) = $Tuple2(nil, M(parseBigIntValue(N), im))
17181752
17191753
17201754
1721-@Callable(cX)
1755+@Callable(da)
17221756 func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K)))
17231757
17241758
17251759
1726-@Callable(cX)
1727-func calcPriceBigIntWrapperREADONLY (ca,cb) = $Tuple2(nil, toString(bZ(parseBigIntValue(ca), parseBigIntValue(cb))))
1760+@Callable(da)
1761+func calcPriceBigIntWrapperREADONLY (cd,ce) = $Tuple2(nil, toString(cc(parseBigIntValue(cd), parseBigIntValue(ce))))
17281762
17291763
17301764
1731-@Callable(cX)
1732-func estimatePutOperationWrapperREADONLY (dm,cg,dL,dM,dN,dO,ij,dP,dQ) = $Tuple2(nil, dK(dm, cg, dL, dM, dN, dO, ij, dP, dQ, true, false, 0, ""))
1765+@Callable(da)
1766+func estimatePutOperationWrapperREADONLY (dp,cj,dO,dP,dQ,dR,in,dS,dT) = $Tuple2(nil, dN(dp, cj, dO, dP, dQ, dR, in, dS, dT, true, false, 0, ""))
17331767
17341768
17351769
1736-@Callable(cX)
1737-func estimateGetOperationWrapperREADONLY (dm,ik,do,ij) = {
1738- let ed = dl(dm, ik, do, addressFromStringValue(ij))
1739- $Tuple2(nil, $Tuple10(ed._1, ed._2, ed._3, ed._4, ed._5, ed._6, ed._7, toString(ed._8), ed._9, ed._10))
1770+@Callable(da)
1771+func estimateGetOperationWrapperREADONLY (dp,io,dr,in) = {
1772+ let eh = do(dp, io, dr, addressFromStringValue(in))
1773+ $Tuple2(nil, $Tuple10(eh._1, eh._2, eh._3, eh._4, eh._5, eh._6, eh._7, toString(eh._8), eh._9, eh._10))
17401774 }
17411775
17421776
17431777
1744-@Callable(cX)
1778+@Callable(da)
17451779 func changeAmp () = {
1746- let il = invoke(aU, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1747- let im = {
1748- let aQ = il
1780+ let ip = invoke(aU, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1781+ let iq = {
1782+ let aQ = ip
17491783 if ($isInstanceOf(aQ, "List[Any]"))
17501784 then {
1751- let in = aQ
1785+ let ir = aQ
17521786 $Tuple3({
1753- let be = in[0]
1787+ let be = ir[0]
17541788 if ($isInstanceOf(be, "Int"))
17551789 then be
17561790 else throw(($getType(be) + " couldn't be cast to Int"))
17571791 }, {
1758- let be = in[1]
1792+ let be = ir[1]
17591793 if ($isInstanceOf(be, "Int"))
17601794 then be
17611795 else throw(($getType(be) + " couldn't be cast to Int"))
17621796 }, {
1763- let be = in[2]
1797+ let be = ir[2]
17641798 if ($isInstanceOf(be, "Int"))
17651799 then be
17661800 else throw(($getType(be) + " couldn't be cast to Int"))
17671801 })
17681802 }
17691803 else ba("invalid entry type")
17701804 }
1771- let io = im._1
1772- let ip = im._2
1773- let iq = im._3
1774- let ir = parseIntValue(getStringValue(am()))
1775- let is = (ir + ip)
1776- let it = if ((0 > ip))
1777- then if ((iq > is))
1778- then iq
1779- else is
1780- else if ((is > iq))
1781- then iq
1782- else is
1783- let iu = valueOrElse(getInteger(ap()), 0)
1784- let iv = (iu + io)
1785- let gP = [if ((height > iv))
1805+ let is = iq._1
1806+ let it = iq._2
1807+ let iu = iq._3
1808+ let iv = parseIntValue(getStringValue(am()))
1809+ let iw = (iv + it)
1810+ let ix = if ((0 > it))
1811+ then if ((iu > iw))
1812+ then iu
1813+ else iw
1814+ else if ((iw > iu))
1815+ then iu
1816+ else iw
1817+ let iy = valueOrElse(getInteger(ap()), 0)
1818+ let iz = (iy + is)
1819+ let gV = [if ((height > iz))
17861820 then true
1787- else ba("try again in few blocks"), if ((ir != it))
1821+ else ba("try again in few blocks"), if ((iv != ix))
17881822 then true
17891823 else ba("already reached target")]
1790- if ((gP == gP))
1791- then [IntegerEntry(ap(), height), StringEntry(am(), toString(it)), StringEntry(an(height), toString(it))]
1824+ if ((gV == gV))
1825+ then [IntegerEntry(ap(), height), StringEntry(am(), toString(ix)), StringEntry(an(height), toString(ix))]
17921826 else throw("Strict value is not equal to itself.")
17931827 }
17941828
17951829
1796-@Verifier(iw)
1797-func ix () = {
1798- let iy = {
1799- let aQ = gq()
1830+@Verifier(iA)
1831+func iB () = {
1832+ let iC = {
1833+ let aQ = gw()
18001834 if ($isInstanceOf(aQ, "ByteVector"))
18011835 then {
1802- let gu = aQ
1803- gu
1836+ let gA = aQ
1837+ gA
18041838 }
18051839 else if ($isInstanceOf(aQ, "Unit"))
1806- then iw.senderPublicKey
1840+ then iA.senderPublicKey
18071841 else throw("Match error")
18081842 }
1809- let aQ = iw
1843+ let aQ = iA
18101844 if ($isInstanceOf(aQ, "Order"))
18111845 then {
1812- let ff = aQ
1813- let iz = bi()
1814- let iA = if (gB())
1846+ let fj = aQ
1847+ let iD = bl()
1848+ let iE = if (gH())
18151849 then $Tuple2(true, "")
1816- else fe(ff)
1817- let aK = iA._1
1818- let aL = iA._2
1819- let aM = sigVerify(ff.bodyBytes, ff.proofs[0], ff.senderPublicKey)
1820- let aN = sigVerify(ff.bodyBytes, ff.proofs[1], iz)
1850+ else fi(fj)
1851+ let aK = iE._1
1852+ let aL = iE._2
1853+ let aM = sigVerify(fj.bodyBytes, fj.proofs[0], fj.senderPublicKey)
1854+ let aN = sigVerify(fj.bodyBytes, fj.proofs[1], iD)
18211855 if (if (if (aK)
18221856 then aM
18231857 else false)
18241858 then aN
18251859 else false)
18261860 then true
18271861 else aJ(aK, aL, aM, aN)
18281862 }
18291863 else if ($isInstanceOf(aQ, "SetScriptTransaction"))
18301864 then {
18311865 let aV = aQ
1832- if (sigVerify(iw.bodyBytes, iw.proofs[0], iy))
1866+ if (sigVerify(iA.bodyBytes, iA.proofs[0], iC))
18331867 then true
18341868 else {
1835- let iB = blake2b256(value(aV.script))
1836- let iC = fromBase64String(value(getString(aU, aF())))
1837- let iD = scriptHash(this)
1838- if ((iC == iB))
1839- then (iD != iB)
1869+ let iF = blake2b256(value(aV.script))
1870+ let iG = fromBase64String(value(getString(aU, aF())))
1871+ let iH = scriptHash(this)
1872+ if ((iG == iF))
1873+ then (iH != iF)
18401874 else false
18411875 }
18421876 }
1843- else sigVerify(iw.bodyBytes, iw.proofs[0], iy)
1877+ else sigVerify(iA.bodyBytes, iA.proofs[0], iC)
18441878 }
18451879

github/deemru/w8io/026f985 
622.66 ms