tx · FyA79qriLAn4bfRzC6psFiq7jd4NESeyP9m2PuZc7nEY

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04100000 Waves

2023.05.04 14:16 [2562938] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "FyA79qriLAn4bfRzC6psFiq7jd4NESeyP9m2PuZc7nEY", "fee": 4100000, "feeAssetId": null, "timestamp": 1683198997763, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "4ge6qR1GGUFeRGxJhUkJAWCxXp7qjYKSbTqjKzVBy8CvbkmZgw4Y6WYEGVdBeqQ12LKa24vfSyzXivJ1cmHCqVe4" ], "script": "base64:BgKHLAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciCmFtcEluaXRpYWwiBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBb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CB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECaXUBAml2AAQCaXcEAmdtCQECZ2wAAwkAAQIFAmdtAgpCeXRlVmVjdG9yBAJncQUCZ20FAmdxAwkAAQIFAmdtAgRVbml0CAUCaXUPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmdtBQJpdQMJAAECBQJnbQIFT3JkZXIEAmZhBQJnbQQCaXgJAQJiYgAEAml5AwkBAmd4AAkAlAoCBgIACQECZVoBBQJmYQQCYUsIBQJpeQJfMQQCYUwIBQJpeQJfMgQCYU0JAPQDAwgFAmZhCWJvZHlCeXRlcwkAkQMCCAUCZmEGcHJvb2ZzAAAIBQJmYQ9zZW5kZXJQdWJsaWNLZXkEAmFOCQD0AwMIBQJmYQlib2R5Qnl0ZXMJAJEDAggFAmZhBnByb29mcwABBQJpeAMDAwUCYUsFAmFNBwUCYU4HBgkBAmFKBAUCYUsFAmFMBQJhTQUCYU4DCQABAgUCZ20CFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJjRgUCZ20DCQD0AwMIBQJpdQlib2R5Qnl0ZXMJAJEDAggFAml1BnByb29mcwAABQJpdwYEAml6CQD2AwEJAQV2YWx1ZQEIBQJjRgZzY3JpcHQEAmlBCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVYJAQJhRgAEAmlCCQDxBwEFBHRoaXMDCQAAAgUCaUEFAml6CQECIT0CBQJpQgUCaXoHCQD0AwMIBQJpdQlib2R5Qnl0ZXMJAJEDAggFAml1BnByb29mcwAABQJpd9dYCLA=", "height": 2562938, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8U7w3FTaGBbmxWq6G37eiKVgU31GoTqEZm7hq8CyV6jL Next: 4DPD7nfTyXrocx8HxYNdS9LA6CuiztveyJH1ByJxgvAu Diff:
OldNewDifferences
234234 else toBase58String(value(bi))
235235
236236
237-func bk (bl) = $Tuple9(addressFromStringValue(bl[u]), parseIntValue(bl[v]), fromBase58String(bl[w]), bh(bl[x]), bh(bl[y]), parseIntValue(bl[z]), parseIntValue(bl[A]), fromBase58String(bl[B]), fromBase58String(bl[C]))
237+func bk (bl) = $Tuple7(addressFromStringValue(bl[u]), parseIntValue(bl[v]), fromBase58String(bl[w]), bh(bl[x]), bh(bl[y]), parseIntValue(bl[z]), parseIntValue(bl[A]))
238238
239239
240240 let bm = bk(bd())
255255
256256 let bu = bn._7
257257
258-let bv = bn._8
259-
260-let bw = bn._9
261-
262-func bx () = split(aO(aV, ax()), o)
258+func bv () = split(aO(aV, ax()), o)
263259
264260
265-let by = bx()
261+let bw = bv()
266262
267-let bz = valueOrErrorMessage(addressFromString(by[D]), "Invalid staking contract address")
263+let bx = valueOrErrorMessage(addressFromString(bw[D]), "Invalid staking contract address")
268264
269-let bA = valueOrErrorMessage(addressFromString(by[F]), "Invalid slipage contract address")
265+let by = valueOrErrorMessage(addressFromString(bw[F]), "Invalid slipage contract address")
270266
271-let bB = valueOrErrorMessage(addressFromString(by[G]), "Invalid gwx contract address")
267+let bz = valueOrErrorMessage(addressFromString(bw[G]), "Invalid gwx contract address")
272268
273-let bC = valueOrErrorMessage(addressFromString(by[E]), "Invalid gwx contract address")
269+let bA = valueOrErrorMessage(addressFromString(bw[E]), "Invalid gwx contract address")
274270
275-func bD (bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN)], o)
271+func bB (bC,bD,bE,bF,bG,bH,bI,bJ,bK,bL) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL)], o)
276272
277273
278-func bO (bP,bQ,bR,bH,bK,bL) = makeString(["%d%d%d%d%d%d", toString(bP), toString(bQ), toString(bR), toString(bH), toString(bK), toString(bL)], o)
274+func bM (bN,bO,bP,bF,bI,bJ) = makeString(["%d%d%d%d%d%d", toString(bN), toString(bO), toString(bP), toString(bF), toString(bI), toString(bJ)], o)
279275
280276
281-func bS (bT) = if ((bT == "WAVES"))
277+func bQ (bR) = if ((bR == "WAVES"))
282278 then wavesBalance(this).available
283- else assetBalance(this, fromBase58String(bT))
279+ else assetBalance(this, fromBase58String(bR))
284280
285281
286-func bU (bV,bW) = fraction(bV, c, bW)
282+func bS (bT,bU) = fraction(bT, c, bU)
287283
288284
289-func bX (bV,bW,Q) = fraction(bV, c, bW, Q)
285+func bV (bT,bU,Q) = fraction(bT, c, bU, Q)
290286
291287
292-func bY (bZ,ca,cb) = {
293- let cc = fraction((bZ - ca), b, ca)
294- let cd = ((cb - X(cc)) > d)
295- if (!(cd))
296- then throw(("Big slpg: " + toString(cc)))
297- else $Tuple2(cd, min([bZ, ca]))
288+func bW (bX,bY,bZ) = {
289+ let ca = fraction((bX - bY), b, bY)
290+ let cb = ((bZ - X(ca)) > d)
291+ if (!(cb))
292+ then throw(("Big slpg: " + toString(ca)))
293+ else $Tuple2(cb, min([bX, bY]))
298294 }
299295
300296
301-func ce (cf,cg,ch) = {
302- let cc = fraction(cg, b, cf)
303- let ci = (ch > cc)
304- if (if (ci)
297+func cc (cd,ce,cf) = {
298+ let ca = fraction(ce, b, cd)
299+ let cg = (cf > ca)
300+ if (if (cg)
305301 then true
306- else (cg > cf))
307- then throw(((((((toString(cg) + " ") + toString(cf)) + " ") + toString(cc)) + " ") + toString(ch)))
308- else ci
302+ else (ce > cd))
303+ then throw(((((((toString(ce) + " ") + toString(cd)) + " ") + toString(ca)) + " ") + toString(cf)))
304+ else cg
309305 }
310306
311307
312-func cj (ck,cl,cm,cn) = {
313- let co = I(cm, ck)
314- let cp = I(cn, cl)
315- bU(cp, co)
308+func ch (ci,cj,ck,cl) = {
309+ let cm = I(ck, ci)
310+ let cn = I(cl, cj)
311+ bS(cn, cm)
316312 }
317313
318314
319-func cq (cm,cn,cr) = {
320- let cs = bt
321- let ct = bu
322- let cu = cj(cs, ct, cm, cn)
323- let bW = I(cm, cs)
324- let bV = I(cn, ct)
325- let cv = I(cr, a)
326- let cw = bU(bW, cv)
327- let cx = bU(bV, cv)
328-[cu, cw, cx]
315+func co (ck,cl,cp) = {
316+ let cq = bt
317+ let cr = bu
318+ let cs = ch(cq, cr, ck, cl)
319+ let bU = I(ck, cq)
320+ let bT = I(cl, cr)
321+ let ct = I(cp, a)
322+ let cu = bS(bU, ct)
323+ let cv = bS(bT, ct)
324+[cs, cu, cv]
329325 }
330326
331327
332-func cy (cm,cn,cr) = {
333- let cz = cq(cm, cn, cr)
334-[M(cz[0], a), M(cz[1], a), M(cz[2], a)]
328+func cw (ck,cl,cp) = {
329+ let cx = co(ck, cl, cp)
330+[M(cx[0], a), M(cx[1], a), M(cx[2], a)]
335331 }
336332
337333
338-func cA (cB,ar) = {
339- let cC = if ((ar == 0))
334+func cy (cz,ar) = {
335+ let cA = if ((ar == 0))
340336 then 0
341- else fraction(cB, ar, a)
342- $Tuple2((cB - cC), cC)
337+ else fraction(cz, ar, a)
338+ $Tuple2((cz - cA), cA)
343339 }
344340
345341
346-func cD (cE) = {
347- let cF = cE[0]
348- let cG = cE[1]
349- let cH = (cF + cG)
350- if ((cH == e))
342+func cB (cC) = {
343+ let cD = cC[0]
344+ let cE = cC[1]
345+ let cF = (cD + cE)
346+ if ((cF == e))
351347 then e
352348 else {
353- let cI = parseIntValue(aZ)
354- let cJ = (cI * 2)
355- let cz = fraction(cF, cG, f)
356- let cK = fraction(cz, i, f)
357- let cL = fraction(toBigInt(cJ), cH, f)
358- let cM = toBigInt((cJ - 1))
359- func cN (cO) = {
360- let cP = fraction(cO, cO, f)
361- let cQ = fraction(cP, cO, f)
362- let cR = fraction(cQ, f, cK)
363- fraction((cL + fraction(cR, g, f)), cO, (fraction(cM, cO, f) + fraction(h, cR, f)))
349+ let cG = parseIntValue(aZ)
350+ let cH = (cG * 2)
351+ let cx = fraction(cD, cE, f)
352+ let cI = fraction(cx, i, f)
353+ let cJ = fraction(toBigInt(cH), cF, f)
354+ let cK = toBigInt((cH - 1))
355+ func cL (cM) = {
356+ let cN = fraction(cM, cM, f)
357+ let cO = fraction(cN, cM, f)
358+ let cP = fraction(cO, f, cI)
359+ fraction((cJ + fraction(cP, g, f)), cM, (fraction(cK, cM, f) + fraction(h, cP, f)))
364360 }
365361
366- func cS (cT,cU) = if (cT._2)
367- then cT
362+ func cQ (cR,cS) = if (cR._2)
363+ then cR
368364 else {
369- let cO = cT._1
370- let cV = cN(cO)
371- let cW = (cV - value(cO))
372- let cX = if ((e > cW))
373- then -(cW)
374- else cW
375- if ((f >= cX))
376- then $Tuple2(cV, true)
377- else $Tuple2(cV, false)
365+ let cM = cR._1
366+ let cT = cL(cM)
367+ let cU = (cT - value(cM))
368+ let cV = if ((e > cU))
369+ then -(cU)
370+ else cU
371+ if ((f >= cV))
372+ then $Tuple2(cT, true)
373+ else $Tuple2(cT, false)
378374 }
379375
380- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
381- let cZ = {
382- let da = cY
383- let db = size(da)
384- let dc = $Tuple2(cH, false)
385- func dd (de,df) = if ((df >= db))
386- then de
387- else cS(de, da[df])
376+ let cW = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
377+ let cX = {
378+ let cY = cW
379+ let cZ = size(cY)
380+ let da = $Tuple2(cF, false)
381+ func db (dc,dd) = if ((dd >= cZ))
382+ then dc
383+ else cQ(dc, cY[dd])
388384
389- func dg (de,df) = if ((df >= db))
390- then de
385+ func de (dc,dd) = if ((dd >= cZ))
386+ then dc
391387 else throw("List size exceeds 17")
392388
393- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
389+ de(db(db(db(db(db(db(db(db(db(db(db(db(db(db(db(db(db(da, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
394390 }
395- let cO = cZ._1
396- let dh = cZ._2
397- if (dh)
398- then cO
399- else throw(("D calculation error, D = " + toString(cO)))
391+ let cM = cX._1
392+ let df = cX._2
393+ if (df)
394+ then cM
395+ else throw(("D calculation error, D = " + toString(cM)))
400396 }
401397 }
402398
403399
404-func di (dj,dk,dl,dm) = {
405- let dn = bq
406- let do = toBase58String(value(br))
407- let dp = toBase58String(value(bs))
408- let dq = bt
409- let dr = bu
410- let ds = toString(bp)
411- let dt = valueOrErrorMessage(assetInfo(dn), "Wrong LP id").quantity
412- if ((toBase58String(dn) != dk))
400+func dg (dh,di,dj,dk) = {
401+ let dl = bq
402+ let dm = toBase58String(value(br))
403+ let dn = toBase58String(value(bs))
404+ let do = bt
405+ let dp = bu
406+ let dq = toString(bp)
407+ let dr = valueOrErrorMessage(assetInfo(dl), "Wrong LP id").quantity
408+ if ((toBase58String(dl) != di))
413409 then throw("Wrong pmt asset")
414410 else {
415- let du = bS(do)
416- let dv = I(du, dq)
417- let dw = bS(dp)
418- let dx = I(dw, dr)
419- let dy = bU(dx, dv)
420- let dz = M(dy, a)
421- let dA = I(dl, a)
422- let dB = I(dt, a)
423- let dC = fraction(dv, dA, dB)
424- let dD = fraction(dx, dA, dB)
425- let dE = P(dC, dq, FLOOR)
426- let dF = P(dD, dr, FLOOR)
427- let dG = if ((dj == ""))
411+ let ds = bQ(dm)
412+ let dt = I(ds, do)
413+ let du = bQ(dn)
414+ let dv = I(du, dp)
415+ let dw = bS(dv, dt)
416+ let dx = M(dw, a)
417+ let dy = I(dj, a)
418+ let dz = I(dr, a)
419+ let dA = fraction(dt, dy, dz)
420+ let dB = fraction(dv, dy, dz)
421+ let dC = P(dA, do, FLOOR)
422+ let dD = P(dB, dp, FLOOR)
423+ let dE = if ((dh == ""))
428424 then nil
429- else [ScriptTransfer(dm, dE, if ((do == "WAVES"))
425+ else [ScriptTransfer(dk, dC, if ((dm == "WAVES"))
430426 then unit
431- else fromBase58String(do)), ScriptTransfer(dm, dF, if ((dp == "WAVES"))
427+ else fromBase58String(dm)), ScriptTransfer(dk, dD, if ((dn == "WAVES"))
432428 then unit
433- else fromBase58String(dp)), StringEntry(aj(toString(dm), dj), bO(dE, dF, dl, dz, height, lastBlock.timestamp)), IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz)]
434- $Tuple10(dE, dF, do, dp, du, dw, dt, dy, ds, dG)
429+ else fromBase58String(dn)), StringEntry(aj(toString(dk), dh), bM(dC, dD, dj, dx, height, lastBlock.timestamp)), IntegerEntry(ac(), dx), IntegerEntry(ad(height, lastBlock.timestamp), dx)]
430+ $Tuple10(dC, dD, dm, dn, ds, du, dr, dw, dq, dE)
435431 }
436432 }
437433
438434
439-func dH (dj,cb,dI,dJ,dK,dL,dm,dM,dN,dO,dP,dQ,dR) = {
440- let dn = bq
441- let dS = toBase58String(value(br))
442- let dT = toBase58String(value(bs))
443- let dU = bv
444- let dV = bw
445- let dW = bt
446- let dX = bu
447- let ds = toString(bp)
448- let dY = valueOrErrorMessage(assetInfo(dn), "Wr lp as").quantity
449- let du = if (dM)
450- then bS(dS)
451- else if (if (dO)
452- then (dR == dS)
435+func dF (dh,bZ,dG,dH,dI,dJ,dk,dK,dL,dM,dN,dO,dP) = {
436+ let dl = bq
437+ let dQ = toBase58String(value(br))
438+ let dR = toBase58String(value(bs))
439+ let dS = bt
440+ let dT = bu
441+ let dq = toString(bp)
442+ let dU = valueOrErrorMessage(assetInfo(dl), "Wr lp as").quantity
443+ let ds = if (dK)
444+ then bQ(dQ)
445+ else if (if (dM)
446+ then (dP == dQ)
453447 else false)
454- then (bS(dS) - dQ)
455- else if (dO)
456- then bS(dS)
457- else (bS(dS) - dI)
458- let dw = if (dM)
459- then bS(dT)
460- else if (if (dO)
461- then (dR == dT)
448+ then (bQ(dQ) - dO)
449+ else if (dM)
450+ then bQ(dQ)
451+ else (bQ(dQ) - dG)
452+ let du = if (dK)
453+ then bQ(dR)
454+ else if (if (dM)
455+ then (dP == dR)
462456 else false)
463- then (bS(dT) - dQ)
464- else if (dO)
465- then bS(dT)
466- else (bS(dT) - dK)
467- let dZ = I(dI, dW)
468- let ea = I(dK, dX)
469- let eb = bU(ea, dZ)
470- let dv = I(du, dW)
471- let dx = I(dw, dX)
472- let cg = cD([dv, dx])
473- let ec = if ((dY == 0))
457+ then (bQ(dR) - dO)
458+ else if (dM)
459+ then bQ(dR)
460+ else (bQ(dR) - dI)
461+ let dV = I(dG, dS)
462+ let dW = I(dI, dT)
463+ let dX = bS(dW, dV)
464+ let dt = I(ds, dS)
465+ let dv = I(du, dT)
466+ let ce = cB([dt, dv])
467+ let dY = if ((dU == 0))
474468 then {
475- let cf = cD([(dv + dZ), (dx + ea)])
476- let ed = if ((cf > cg))
469+ let cd = cB([(dt + dV), (dv + dW)])
470+ let dZ = if ((cd > ce))
477471 then true
478472 else throw("D1 should be greater than D0")
479- if ((ed == ed))
473+ if ((dZ == dZ))
480474 then {
481- let dy = d
482- let ee = d
483- let cv = cf
484- $Tuple5(M(cv, a), M(dZ, dW), M(ea, dX), bU((dx + ea), (dv + dZ)), ee)
475+ let dw = d
476+ let ea = d
477+ let ct = cd
478+ $Tuple5(M(ct, a), M(dV, dS), M(dW, dT), bS((dv + dW), (dt + dV)), ea)
485479 }
486480 else throw("Strict value is not equal to itself.")
487481 }
488482 else {
489- let dy = bU(dx, dv)
490- let ef = fraction(X((dy - eb)), c, dy)
491- let ee = I(cb, a)
492- if (if (if (dP)
493- then (dy != d)
483+ let dw = bS(dv, dt)
484+ let eb = fraction(X((dw - dX)), c, dw)
485+ let ea = I(bZ, a)
486+ if (if (if (dN)
487+ then (dw != d)
494488 else false)
495- then (ef > ee)
489+ then (eb > ea)
496490 else false)
497- then throw(((("Price slippage " + toString(ef)) + " > ") + toString(ee)))
491+ then throw(((("Price slippage " + toString(eb)) + " > ") + toString(ea)))
498492 else {
499- let eg = I(dY, a)
500- let eh = fraction(dZ, bX(dx, dv, CEILING), c, CEILING)
501- let ei = fraction(ea, c, bX(dx, dv, FLOOR), CEILING)
502- let ej = if ((eh > ea))
503- then $Tuple2(ei, ea)
504- else $Tuple2(dZ, eh)
505- let ek = ej._1
506- let el = ej._2
507- let cf = cD([(dv + ek), (dx + el)])
508- let ed = if ((cf > cg))
493+ let ec = I(dU, a)
494+ let ed = fraction(dV, bV(dv, dt, CEILING), c, CEILING)
495+ let ee = fraction(dW, c, bV(dv, dt, FLOOR), CEILING)
496+ let ef = if ((ed > dW))
497+ then $Tuple2(ee, dW)
498+ else $Tuple2(dV, ed)
499+ let eg = ef._1
500+ let eh = ef._2
501+ let cd = cB([(dt + eg), (dv + eh)])
502+ let dZ = if ((cd > ce))
509503 then true
510504 else throw("D1 should be greater than D0")
511- if ((ed == ed))
505+ if ((dZ == dZ))
512506 then {
513- let cv = fraction(eg, (cf - cg), cg)
514- $Tuple5(P(cv, a, FLOOR), P(ek, dW, CEILING), P(el, dX, CEILING), dy, ee)
507+ let ct = fraction(ec, (cd - ce), ce)
508+ $Tuple5(P(ct, a, FLOOR), P(eg, dS, CEILING), P(eh, dT, CEILING), dw, ea)
515509 }
516510 else throw("Strict value is not equal to itself.")
517511 }
518512 }
519- let em = ec._1
520- let en = ec._2
521- let eo = ec._3
522- let dz = M(ec._4, a)
523- let ep = M(ec._5, a)
524- if ((0 >= em))
513+ let ei = dY._1
514+ let ej = dY._2
515+ let ek = dY._3
516+ let dx = M(dY._4, a)
517+ let el = M(dY._5, a)
518+ if ((0 >= ei))
525519 then throw("LP <= 0")
526520 else {
527- let eq = if (!(dN))
521+ let em = if (!(dL))
528522 then 0
529- else em
530- let er = (dI - en)
531- let es = (dK - eo)
532- let et = if (if (dO)
533- then (dR == dS)
523+ else ei
524+ let en = (dG - ej)
525+ let eo = (dI - ek)
526+ let ep = if (if (dM)
527+ then (dP == dQ)
534528 else false)
535- then $Tuple2(dQ, 0)
536- else if (if (dO)
537- then (dR == dT)
529+ then $Tuple2(dO, 0)
530+ else if (if (dM)
531+ then (dP == dR)
538532 else false)
539- then $Tuple2(0, dQ)
540- else $Tuple2(en, eo)
541- let eu = et._1
542- let ev = et._2
543- let ew = [IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz), StringEntry(ag(dm, dj), bD(eu, ev, eq, dz, cb, ep, height, lastBlock.timestamp, er, es))]
544- $Tuple13(em, eq, dz, du, dw, dY, dn, ds, ew, er, es, dJ, dL)
533+ then $Tuple2(0, dO)
534+ else $Tuple2(ej, ek)
535+ let eq = ep._1
536+ let er = ep._2
537+ let es = [IntegerEntry(ac(), dx), IntegerEntry(ad(height, lastBlock.timestamp), dx), StringEntry(ag(dk, dh), bB(eq, er, em, dx, bZ, el, height, lastBlock.timestamp, en, eo))]
538+ $Tuple13(ei, em, dx, ds, du, dU, dl, dq, es, en, eo, dH, dJ)
545539 }
546540 }
547541
548542
549-func ex (cE,cU,ey) = {
550- let ez = g
551- let eA = cE[if ((cU == 0))
543+func et (cC,cS,eu) = {
544+ let ev = g
545+ let ew = cC[if ((cS == 0))
552546 then 1
553547 else 0]
554- let eB = parseBigIntValue(m)
555- let cI = (parseBigIntValue(aZ) * eB)
556- let cH = eA
557- let cJ = (cI * ez)
558- let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
559- let eD = ((cH + ((ey * eB) / cJ)) - ey)
560- func cS (cT,eE) = {
561- let eF = cT
562- let eG = eF._1
563- let dh = eF._2
564- if ((dh != unit))
565- then cT
548+ let ex = parseBigIntValue(m)
549+ let cG = (parseBigIntValue(aZ) * ex)
550+ let cF = ew
551+ let cH = (cG * ev)
552+ let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cH * ev))
553+ let ez = ((cF + ((eu * ex) / cH)) - eu)
554+ func cQ (cR,eA) = {
555+ let eB = cR
556+ let eC = eB._1
557+ let df = eB._2
558+ if ((df != unit))
559+ then cR
566560 else {
567- let eH = (((eG * eG) + eC) / ((g * eG) + eD))
568- let eI = Y((eH - value(eG)))
569- if ((f >= eI))
570- then $Tuple2(eH, eE)
571- else $Tuple2(eH, unit)
561+ let eD = (((eC * eC) + ey) / ((g * eC) + ez))
562+ let eE = Y((eD - value(eC)))
563+ if ((f >= eE))
564+ then $Tuple2(eD, eA)
565+ else $Tuple2(eD, unit)
572566 }
573567 }
574568
575- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
576- let eJ = {
577- let da = cY
578- let db = size(da)
579- let dc = $Tuple2(ey, unit)
580- func dd (de,df) = if ((df >= db))
581- then de
582- else cS(de, da[df])
569+ let cW = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
570+ let eF = {
571+ let cY = cW
572+ let cZ = size(cY)
573+ let da = $Tuple2(eu, unit)
574+ func db (dc,dd) = if ((dd >= cZ))
575+ then dc
576+ else cQ(dc, cY[dd])
583577
584- func dg (de,df) = if ((df >= db))
585- then de
578+ func de (dc,dd) = if ((dd >= cZ))
579+ then dc
586580 else throw("List size exceeds 15")
587581
588- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
582+ de(db(db(db(db(db(db(db(db(db(db(db(db(db(db(db(da, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
589583 }
590- let eG = eJ._1
591- let dh = eJ._2
592- if ((dh != unit))
593- then eG
594- else throw(("Y calculation error, Y = " + toString(eG)))
584+ let eC = eF._1
585+ let df = eF._2
586+ if ((df != unit))
587+ then eC
588+ else throw(("Y calculation error, Y = " + toString(eC)))
595589 }
596590
597591
598-func eK (eL,eM,eN) = {
599- let eO = fraction(cD([L(eL, toBigInt(bt)), L(eM, toBigInt(bu))]), c, eN)
600- if ((eN == e))
592+func eG (eH,eI,eJ) = {
593+ let eK = fraction(cB([L(eH, toBigInt(bt)), L(eI, toBigInt(bu))]), c, eJ)
594+ if ((eJ == e))
601595 then e
602- else eO
596+ else eK
603597 }
604598
605599
606-func eP (eQ,eR,eS) = {
607- let eT = (toBigInt(bS(bj(br))) - eQ)
608- let eU = (toBigInt(bS(bj(bs))) - eR)
609- let eV = (toBigInt(value(assetInfo(bq)).quantity) - eS)
610- let eW = eK(eT, eU, eV)
611- eW
600+func eL (eM,eN,eO) = {
601+ let eP = (toBigInt(bQ(bj(br))) - eM)
602+ let eQ = (toBigInt(bQ(bj(bs))) - eN)
603+ let eR = (toBigInt(value(assetInfo(bq)).quantity) - eO)
604+ let eS = eG(eP, eQ, eR)
605+ eS
612606 }
613607
614608
615-func eX (eY,eZ,eS) = {
616- let eT = (bS(bj(br)) + eY)
617- let eU = (bS(bj(bs)) + eZ)
618- let eV = (value(assetInfo(bq)).quantity + eS)
619- let eO = eK(toBigInt(eT), toBigInt(eU), toBigInt(eV))
620- let fa = [IntegerEntry(at, height), StringEntry(as, toString(eO))]
621- $Tuple2(fa, eO)
609+func eT (eU,eV,eO) = {
610+ let eP = (bQ(bj(br)) + eU)
611+ let eQ = (bQ(bj(bs)) + eV)
612+ let eR = (value(assetInfo(bq)).quantity + eO)
613+ let eK = eG(toBigInt(eP), toBigInt(eQ), toBigInt(eR))
614+ let eW = [IntegerEntry(at, height), StringEntry(as, toString(eK))]
615+ $Tuple2(eW, eK)
622616 }
623617
624618
625-func fb (fc,eO) = if ((eO >= fc))
619+func eX (eY,eK) = if ((eK >= eY))
626620 then true
627621 else aS("updated DLp lower than current DLp")
628622
629623
630-func fd (fe) = {
631- let eT = bS(bj(br))
632- let eU = bS(bj(bs))
633- let ff = fe.amount
634- let fg = fraction(fe.amount, fe.price, a, FLOOR)
635- let fh = if ((fe.orderType == Buy))
636- then $Tuple2(ff, -(fg))
637- else $Tuple2(-(ff), fg)
638- let eY = fh._1
639- let eZ = fh._2
624+func eZ (fa) = {
625+ let eP = bQ(bj(br))
626+ let eQ = bQ(bj(bs))
627+ let fb = fa.amount
628+ let fc = fraction(fa.amount, fa.price, a, FLOOR)
629+ let fd = if ((fa.orderType == Buy))
630+ then $Tuple2(fb, -(fc))
631+ else $Tuple2(-(fb), fc)
632+ let eU = fd._1
633+ let eV = fd._2
640634 if (if (if (ba())
641635 then true
642636 else (bp == s))
643637 then true
644638 else (bp == t))
645639 then throw("Admin blocked")
646- else if (if ((fe.assetPair.amountAsset != br))
640+ else if (if ((fa.assetPair.amountAsset != br))
647641 then true
648- else (fe.assetPair.priceAsset != bs))
642+ else (fa.assetPair.priceAsset != bs))
649643 then throw("Wr assets")
650644 else {
651- let fi = parseBigIntValue(valueOrElse(getString(this, as), "0"))
652- let fj = eX(eY, eZ, 0)
653- let fk = fj._1
654- let fl = fj._2
655- let fm = (fl >= fi)
656- let fn = makeString(["dLp=", toString(fi), " dLpNew=", toString(fl), " amountAssetBalance=", toString(eT), " priceAssetBalance=", toString(eU), " amountAssetBalanceDelta=", toString(eY), " priceAssetBalanceDelta=", toString(eZ), " height=", toString(height)], "")
657- $Tuple2(fm, fn)
645+ let fe = parseBigIntValue(valueOrElse(getString(this, as), "0"))
646+ let ff = eT(eU, eV, 0)
647+ let fg = ff._1
648+ let fh = ff._2
649+ let fi = (fh >= fe)
650+ let fj = makeString(["dLp=", toString(fe), " dLpNew=", toString(fh), " amountAssetBalance=", toString(eP), " priceAssetBalance=", toString(eQ), " amountAssetBalanceDelta=", toString(eU), " priceAssetBalanceDelta=", toString(eV), " height=", toString(height)], "")
651+ $Tuple2(fi, fj)
658652 }
659653 }
660654
661655
662-func fo (cU) = if ((size(cU.payments) != 1))
656+func fk (cS) = if ((size(cS.payments) != 1))
663657 then throw("1 pmnt exp")
664658 else {
665- let fp = value(cU.payments[0])
666- let dk = value(fp.assetId)
667- let dQ = fp.amount
668- let ec = di(toBase58String(cU.transactionId), toBase58String(dk), dQ, cU.caller)
669- let dE = ec._1
670- let dF = ec._2
671- let ds = parseIntValue(ec._9)
672- let dG = ec._10
659+ let fl = value(cS.payments[0])
660+ let di = value(fl.assetId)
661+ let dO = fl.amount
662+ let dY = dg(toBase58String(cS.transactionId), toBase58String(di), dO, cS.caller)
663+ let dC = dY._1
664+ let dD = dY._2
665+ let dq = parseIntValue(dY._9)
666+ let dE = dY._10
673667 if (if (ba())
674668 then true
675- else (ds == t))
676- then throw(("Admin blocked: " + toString(ds)))
677- else $Tuple5(dE, dF, dQ, dk, dG)
669+ else (dq == t))
670+ then throw(("Admin blocked: " + toString(dq)))
671+ else $Tuple5(dC, dD, dO, di, dE)
678672 }
679673
680674
681-func fq (fr,ai,fs,ft,cb,dN,dO,dP,dQ,dR) = {
682- let ec = dH(ai, cb, value(fs).amount, value(fs).assetId, value(ft).amount, value(ft).assetId, fr, (ai == ""), dN, dO, dP, dQ, dR)
683- let ds = parseIntValue(ec._8)
675+func fm (fn,ai,fo,fp,bZ,dL,dM,dN,dO,dP) = {
676+ let dY = dF(ai, bZ, value(fo).amount, value(fo).assetId, value(fp).amount, value(fp).assetId, fn, (ai == ""), dL, dM, dN, dO, dP)
677+ let dq = parseIntValue(dY._8)
684678 if (if (if (ba())
685679 then true
686- else (ds == r))
680+ else (dq == r))
687681 then true
688- else (ds == t))
689- then throw(("Blocked:" + toString(ds)))
690- else ec
682+ else (dq == t))
683+ then throw(("Blocked:" + toString(dq)))
684+ else dY
691685 }
692686
693687
694-func fu (fv,dk,dm,ai,fw) = {
695- let do = toBase58String(value(br))
696- let dp = toBase58String(value(bs))
697- let dn = bq
698- let dW = bt
699- let dX = bu
700- let eV = toBigInt(valueOrErrorMessage(assetInfo(dn), "invalid lp asset").quantity)
701- let fx = if ((eV > e))
688+func fq (fr,di,dk,ai,fs) = {
689+ let dm = toBase58String(value(br))
690+ let dn = toBase58String(value(bs))
691+ let dl = bq
692+ let dS = bt
693+ let dT = bu
694+ let eR = toBigInt(valueOrErrorMessage(assetInfo(dl), "invalid lp asset").quantity)
695+ let ft = if ((eR > e))
702696 then true
703697 else throw("initial deposit requires all coins")
704- if ((fx == fx))
698+ if ((ft == ft))
705699 then {
706- let du = bS(do)
707- let dw = bS(dp)
708- let fy = if ((ai == ""))
709- then $Tuple2(du, dw)
710- else if ((dk == do))
711- then if ((fv > du))
700+ let ds = bQ(dm)
701+ let du = bQ(dn)
702+ let fu = if ((ai == ""))
703+ then $Tuple2(ds, du)
704+ else if ((di == dm))
705+ then if ((fr > ds))
712706 then throw("invalid payment amount")
713- else $Tuple2((du - fv), dw)
714- else if ((dk == dp))
715- then if ((fv > dw))
707+ else $Tuple2((ds - fr), du)
708+ else if ((di == dn))
709+ then if ((fr > du))
716710 then throw("invalid payment amount")
717- else $Tuple2(du, (dw - fv))
711+ else $Tuple2(ds, (du - fr))
718712 else throw("wrong pmtAssetId")
719- let fz = fy._1
720- let fA = fy._2
721- let fB = if ((dk == do))
722- then $Tuple2(fv, 0)
723- else if ((dk == dp))
724- then $Tuple2(0, fv)
713+ let fv = fu._1
714+ let fw = fu._2
715+ let fx = if ((di == dm))
716+ then $Tuple2(fr, 0)
717+ else if ((di == dn))
718+ then $Tuple2(0, fr)
725719 else throw("invalid payment")
726- let fC = fB._1
727- let fD = fB._2
728- let fE = if (fw)
729- then $Tuple3(cA(fC, aW)._1, cA(fD, aW)._1, cA(fv, aW)._2)
730- else $Tuple3(fC, fD, 0)
731- let fF = fE._1
732- let fG = fE._2
733- let cC = fE._3
734- let fH = (fz + fF)
735- let fI = (fA + fG)
736- let cg = cD([I(fz, bt), I(fA, bu)])
737- let cf = cD([I(fH, bt), I(fI, bu)])
738- let ed = if ((cf > cg))
720+ let fy = fx._1
721+ let fz = fx._2
722+ let fA = if (fs)
723+ then $Tuple3(cy(fy, aW)._1, cy(fz, aW)._1, cy(fr, aW)._2)
724+ else $Tuple3(fy, fz, 0)
725+ let fB = fA._1
726+ let fC = fA._2
727+ let cA = fA._3
728+ let fD = (fv + fB)
729+ let fE = (fw + fC)
730+ let ce = cB([I(fv, bt), I(fw, bu)])
731+ let cd = cB([I(fD, bt), I(fE, bu)])
732+ let dZ = if ((cd > ce))
739733 then true
740734 else throw()
741- if ((ed == ed))
735+ if ((dZ == dZ))
742736 then {
743- let fJ = fraction(eV, (cf - cg), cg, FLOOR)
744- let dz = M(bU(I(fI, dX), I(fH, dW)), a)
745- let ew = [IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz), StringEntry(ag(dm, ai), bD(fC, fD, toInt(fJ), dz, 0, 0, height, lastBlock.timestamp, 0, 0))]
746- let fK = fraction(fA, a, fz)
747- let fL = fraction(fv, a, (fK + a))
748- let fM = (fv - fL)
749- let fN = fraction(eV, toBigInt(fM), toBigInt(fA))
750- let fO = toInt(fraction((fJ - fN), b, fN))
751- $Tuple4(toInt(fJ), ew, cC, fO)
737+ let fF = fraction(eR, (cd - ce), ce, FLOOR)
738+ let dx = M(bS(I(fE, dT), I(fD, dS)), a)
739+ let es = [IntegerEntry(ac(), dx), IntegerEntry(ad(height, lastBlock.timestamp), dx), StringEntry(ag(dk, ai), bB(fy, fz, toInt(fF), dx, 0, 0, height, lastBlock.timestamp, 0, 0))]
740+ let fG = fraction(fw, a, fv)
741+ let fH = fraction(fr, a, (fG + a))
742+ let fI = (fr - fH)
743+ let fJ = fraction(eR, toBigInt(fI), toBigInt(fw))
744+ let fK = toInt(fraction((fF - fJ), b, fJ))
745+ $Tuple4(toInt(fF), es, cA, fK)
752746 }
753747 else throw("Strict value is not equal to itself.")
754748 }
756750 }
757751
758752
759-func fP (fQ,fR,fS,fr,fT,fU) = {
760- let dn = toBase58String(value(bq))
761- let do = toBase58String(value(br))
762- let dp = toBase58String(value(bs))
763- let fV = bt
764- let fW = bu
765- let fX = bp
766- let dm = if ((fr == bC))
767- then fT
768- else fr
769- let fp = value(fS[0])
770- let dk = value(fp.assetId)
771- let dQ = fp.amount
772- let eW = eP(e, e, e)
773- if ((eW == eW))
753+func fL (fM,fN,fO,fn,fP,fQ) = {
754+ let dl = toBase58String(value(bq))
755+ let dm = toBase58String(value(br))
756+ let dn = toBase58String(value(bs))
757+ let fR = bt
758+ let fS = bu
759+ let fT = bp
760+ let dk = if ((fn == bA))
761+ then fP
762+ else fn
763+ let fl = value(fO[0])
764+ let di = value(fl.assetId)
765+ let dO = fl.amount
766+ let eS = eL(e, e, e)
767+ if ((eS == eS))
774768 then {
775- let dj = toBase58String(fU)
776- if ((dn != toBase58String(dk)))
769+ let dh = toBase58String(fQ)
770+ if ((dl != toBase58String(di)))
777771 then throw("Wrong LP")
778772 else {
779- let du = bS(do)
780- let dw = bS(dp)
781- let fY = {
782- let aX = invoke(this, "getOneTknV2READONLY", [fQ, dQ], nil)
773+ let ds = bQ(dm)
774+ let du = bQ(dn)
775+ let fU = {
776+ let aX = invoke(this, "getOneTknV2READONLY", [fM, dO], nil)
783777 if ($isInstanceOf(aX, "(Int, Int)"))
784778 then aX
785779 else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
786780 }
787- if ((fY == fY))
781+ if ((fU == fU))
788782 then {
789- let cC = fY._2
790- let fZ = fY._1
791- let ga = if (if ((fR > 0))
792- then (fR > fZ)
783+ let cA = fU._2
784+ let fV = fU._1
785+ let fW = if (if ((fN > 0))
786+ then (fN > fV)
793787 else false)
794- then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
795- else fZ
796- let gb = if ((fQ == do))
797- then $Tuple4(ga, 0, ((du - ga) - cC), dw)
798- else if ((fQ == dp))
799- then $Tuple4(0, ga, du, ((dw - ga) - cC))
788+ then aS(makeString(["amount to receive is less than ", toString(fN)], ""))
789+ else fV
790+ let fX = if ((fM == dm))
791+ then $Tuple4(fW, 0, ((ds - fW) - cA), du)
792+ else if ((fM == dn))
793+ then $Tuple4(0, fW, ds, ((du - fW) - cA))
800794 else throw("invalid out asset id")
801- let gc = gb._1
802- let gd = gb._2
803- let fH = gb._3
804- let fI = gb._4
805- let ge = bU(I(fI, fW), I(fH, fV))
806- let gf = M(ge, a)
807- let gg = if ((fQ == "WAVES"))
795+ let fY = fX._1
796+ let fZ = fX._2
797+ let fD = fX._3
798+ let fE = fX._4
799+ let ga = bS(I(fE, fS), I(fD, fR))
800+ let gb = M(ga, a)
801+ let gc = if ((fM == "WAVES"))
808802 then unit
809- else fromBase58String(fQ)
810- let gh = if ((cC > 0))
811- then [ScriptTransfer(bc, cC, gg)]
803+ else fromBase58String(fM)
804+ let gd = if ((cA > 0))
805+ then [ScriptTransfer(bc, cA, gc)]
812806 else nil
813- let dG = ([ScriptTransfer(dm, ga, gg), StringEntry(aj(toString(dm), dj), bO(gc, gd, dQ, gf, height, lastBlock.timestamp)), IntegerEntry(ac(), gf), IntegerEntry(ad(height, lastBlock.timestamp), gf)] ++ gh)
814- if ((dG == dG))
807+ let dE = ([ScriptTransfer(dk, fW, gc), StringEntry(aj(toString(dk), dh), bM(fY, fZ, dO, gb, height, lastBlock.timestamp)), IntegerEntry(ac(), gb), IntegerEntry(ad(height, lastBlock.timestamp), gb)] ++ gd)
808+ if ((dE == dE))
815809 then {
816- let gi = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
817- if ((gi == gi))
810+ let ge = invoke(aV, "burn", [dO], [AttachedPayment(di, dO)])
811+ if ((ge == ge))
818812 then {
819- let gj = {
820- let gk = if ((this == bc))
813+ let gf = {
814+ let gg = if ((this == bc))
821815 then 0
822- else cC
823- let gl = if ((bh(fQ) == br))
816+ else cA
817+ let gh = if ((bh(fM) == br))
824818 then true
825819 else false
826- if (gl)
827- then $Tuple2(-((fZ + gk)), 0)
828- else $Tuple2(0, -((fZ + gk)))
820+ if (gh)
821+ then $Tuple2(-((fV + gg)), 0)
822+ else $Tuple2(0, -((fV + gg)))
829823 }
830- let eY = gj._1
831- let eZ = gj._2
832- let gm = eX(eY, eZ, 0)
833- let gn = gm._1
834- let eO = gm._2
835- let go = fb(eW, eO)
836- if ((go == go))
837- then $Tuple2((dG ++ gn), ga)
824+ let eU = gf._1
825+ let eV = gf._2
826+ let gi = eT(eU, eV, 0)
827+ let gj = gi._1
828+ let eK = gi._2
829+ let gk = eX(eS, eK)
830+ if ((gk == gk))
831+ then $Tuple2((dE ++ gj), fW)
838832 else throw("Strict value is not equal to itself.")
839833 }
840834 else throw("Strict value is not equal to itself.")
848842 }
849843
850844
851-func gp () = {
852- let gq = getString(aa())
853- if ($isInstanceOf(gq, "String"))
845+func gl () = {
846+ let gm = getString(aa())
847+ if ($isInstanceOf(gm, "String"))
854848 then {
855- let cH = gq
856- fromBase58String(cH)
849+ let cF = gm
850+ fromBase58String(cF)
857851 }
858- else if ($isInstanceOf(gq, "Unit"))
852+ else if ($isInstanceOf(gm, "Unit"))
859853 then unit
860854 else throw("Match error")
861855 }
862856
863857
864-func gr () = {
865- let gq = getString(ab())
866- if ($isInstanceOf(gq, "String"))
858+func gn () = {
859+ let gm = getString(ab())
860+ if ($isInstanceOf(gm, "String"))
867861 then {
868- let cH = gq
869- fromBase58String(cH)
862+ let cF = gm
863+ fromBase58String(cF)
870864 }
871- else if ($isInstanceOf(gq, "Unit"))
865+ else if ($isInstanceOf(gm, "Unit"))
872866 then unit
873867 else throw("Match error")
874868 }
875869
876870
877-let gs = throw("Permission denied")
871+let go = throw("Permission denied")
878872
879-func gt (cU) = {
880- let gq = gp()
881- if ($isInstanceOf(gq, "ByteVector"))
873+func gp (cS) = {
874+ let gm = gl()
875+ if ($isInstanceOf(gm, "ByteVector"))
882876 then {
883- let gu = gq
884- (cU.callerPublicKey == gu)
877+ let gq = gm
878+ (cS.callerPublicKey == gq)
885879 }
886- else if ($isInstanceOf(gq, "Unit"))
887- then (cU.caller == this)
880+ else if ($isInstanceOf(gm, "Unit"))
881+ then (cS.caller == this)
888882 else throw("Match error")
889883 }
890884
891885
892-func gv (cU) = {
893- let gq = gp()
894- if ($isInstanceOf(gq, "ByteVector"))
886+func gr (cS) = {
887+ let gm = gl()
888+ if ($isInstanceOf(gm, "ByteVector"))
895889 then {
896- let gu = gq
897- if ((cU.callerPublicKey == gu))
890+ let gq = gm
891+ if ((cS.callerPublicKey == gq))
898892 then true
899- else gs
893+ else go
900894 }
901- else if ($isInstanceOf(gq, "Unit"))
902- then if ((cU.caller == this))
895+ else if ($isInstanceOf(gm, "Unit"))
896+ then if ((cS.caller == this))
903897 then true
904- else gs
898+ else go
905899 else throw("Match error")
906900 }
907901
908902
909-func gw (gx,ey,gy) = {
903+func gs (gt,eu,gu) = {
910904 let bl = bd()
911- let do = bl[x]
912- let dp = bl[y]
913- let ez = g
914- let eB = parseBigIntValue(m)
915- let cI = (parseBigIntValue(aZ) * eB)
916- let cE = if ((gx == false))
917- then [(toBigInt(bS(do)) + gy), toBigInt(bS(dp))]
918- else [(toBigInt(bS(dp)) + gy), toBigInt(bS(do))]
919- let eA = cE[0]
920- let cH = eA
921- let cJ = (cI * ez)
922- let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
923- let eD = ((cH + ((ey * eB) / cJ)) - ey)
924- func cS (cT,eE) = {
925- let gz = cT
926- let eG = gz._1
927- let dh = gz._2
928- if ((dh != unit))
929- then cT
905+ let dm = bl[x]
906+ let dn = bl[y]
907+ let ev = g
908+ let ex = parseBigIntValue(m)
909+ let cG = (parseBigIntValue(aZ) * ex)
910+ let cC = if ((gt == false))
911+ then [(toBigInt(bQ(dm)) + gu), toBigInt(bQ(dn))]
912+ else [(toBigInt(bQ(dn)) + gu), toBigInt(bQ(dm))]
913+ let ew = cC[0]
914+ let cF = ew
915+ let cH = (cG * ev)
916+ let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cH * ev))
917+ let ez = ((cF + ((eu * ex) / cH)) - eu)
918+ func cQ (cR,eA) = {
919+ let gv = cR
920+ let eC = gv._1
921+ let df = gv._2
922+ if ((df != unit))
923+ then cR
930924 else {
931- let eH = (((eG * eG) + eC) / ((g * eG) + eD))
932- let eI = Y((eH - value(eG)))
933- if ((f >= eI))
934- then $Tuple2(eH, eE)
935- else $Tuple2(eH, unit)
925+ let eD = (((eC * eC) + ey) / ((g * eC) + ez))
926+ let eE = Y((eD - value(eC)))
927+ if ((f >= eE))
928+ then $Tuple2(eD, eA)
929+ else $Tuple2(eD, unit)
936930 }
937931 }
938932
939- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
940- let gA = {
941- let da = cY
942- let db = size(da)
943- let dc = $Tuple2(ey, unit)
944- func dd (de,df) = if ((df >= db))
945- then de
946- else cS(de, da[df])
933+ let cW = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
934+ let gw = {
935+ let cY = cW
936+ let cZ = size(cY)
937+ let da = $Tuple2(eu, unit)
938+ func db (dc,dd) = if ((dd >= cZ))
939+ then dc
940+ else cQ(dc, cY[dd])
947941
948- func dg (de,df) = if ((df >= db))
949- then de
942+ func de (dc,dd) = if ((dd >= cZ))
943+ then dc
950944 else throw("List size exceeds 15")
951945
952- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
946+ de(db(db(db(db(db(db(db(db(db(db(db(db(db(db(db(da, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
953947 }
954- let eG = gA._1
955- let dh = gA._2
956- if ((dh != unit))
957- then eG
958- else throw(("Y calculation error, Y = " + toString(eG)))
948+ let eC = gw._1
949+ let df = gw._2
950+ if ((df != unit))
951+ then eC
952+ else throw(("Y calculation error, Y = " + toString(eC)))
959953 }
960954
961955
962-func gB () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
956+func gx () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
963957
964958
965-@Callable(cU)
966-func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
967- let gE = if ((gx == false))
959+@Callable(cS)
960+func calculateAmountOutForSwapREADONLY (gy,gt,gz) = {
961+ let gA = if ((gt == false))
968962 then {
969- let gF = aO(this, al())
970- let gy = (toBigInt(bS(aO(this, ak()))) + toBigInt(gC))
971- $Tuple2(gF, gy)
963+ let gB = aO(this, al())
964+ let gu = (toBigInt(bQ(aO(this, ak()))) + toBigInt(gy))
965+ $Tuple2(gB, gu)
972966 }
973967 else {
974- let gF = aO(this, ak())
975- let gy = (toBigInt(bS(aO(this, al()))) + toBigInt(gC))
976- $Tuple2(gF, gy)
968+ let gB = aO(this, ak())
969+ let gu = (toBigInt(bQ(aO(this, al()))) + toBigInt(gy))
970+ $Tuple2(gB, gu)
977971 }
978- let gF = gE._1
979- let gy = gE._2
972+ let gB = gA._1
973+ let gu = gA._2
980974 let bl = bd()
981- let do = bl[x]
982- let dp = bl[y]
983- let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
984- let ey = cD(cE)
985- let eG = gw(gx, ey, toBigInt(gC))
986- let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
987- let gH = max([0, toInt(gG)])
988- let gI = if ((gx == false))
989- then [((toBigInt(bS(do)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
990- else [(toBigInt(bS(do)) - gG), ((toBigInt(bS(dp)) + toBigInt(gC)) + toBigInt(gD))]
991- let gJ = cD(gI)
992- let ed = if ((gJ >= ey))
975+ let dm = bl[x]
976+ let dn = bl[y]
977+ let cC = [toBigInt(bQ(dm)), toBigInt(bQ(dn))]
978+ let eu = cB(cC)
979+ let eC = gs(gt, eu, toBigInt(gy))
980+ let gC = ((toBigInt(bQ(gB)) - eC) - toBigInt(1))
981+ let gD = max([0, toInt(gC)])
982+ let gE = if ((gt == false))
983+ then [((toBigInt(bQ(dm)) + toBigInt(gy)) + toBigInt(gz)), (toBigInt(bQ(dn)) - gC)]
984+ else [(toBigInt(bQ(dm)) - gC), ((toBigInt(bQ(dn)) + toBigInt(gy)) + toBigInt(gz))]
985+ let gF = cB(gE)
986+ let dZ = if ((gF >= eu))
993987 then true
994- else throw(makeString(["new D is fewer error", toString(ey), toString(gJ)], "__"))
995- if ((ed == ed))
996- then $Tuple2(nil, gH)
988+ else throw(makeString(["new D is fewer error", toString(eu), toString(gF)], "__"))
989+ if ((dZ == dZ))
990+ then $Tuple2(nil, gD)
997991 else throw("Strict value is not equal to itself.")
998992 }
999993
1000994
1001995
1002-@Callable(cU)
1003-func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1004- let gM = {
996+@Callable(cS)
997+func calculateAmountOutForSwapAndSendTokens (gy,gt,gG,gH,gz) = {
998+ let gI = {
1005999 let aX = invoke(aV, "getSwapContractREADONLY", nil, nil)
10061000 if ($isInstanceOf(aX, "String"))
10071001 then aX
10081002 else throw(($getType(aX) + " couldn't be cast to String"))
10091003 }
1010- let gN = [if ((value(cU.payments[0]).amount >= gC))
1004+ let gJ = [if ((value(cS.payments[0]).amount >= gy))
10111005 then true
1012- else aS("Wrong amount"), if ((cU.caller == addressFromStringValue(gM)))
1006+ else aS("Wrong amount"), if ((cS.caller == addressFromStringValue(gI)))
10131007 then true
10141008 else aS("Permission denied")]
1015- if ((gN == gN))
1009+ if ((gJ == gJ))
10161010 then {
1017- let fp = value(cU.payments[0])
1018- let gO = bj(fp.assetId)
1019- let gP = if ((gx == false))
1011+ let fl = value(cS.payments[0])
1012+ let gK = bj(fl.assetId)
1013+ let gL = if ((gt == false))
10201014 then {
1021- let gF = aO(this, al())
1022- let gy = (bS(gO) - value(cU.payments[0]).amount)
1023- $Tuple2(gF, gy)
1015+ let gB = aO(this, al())
1016+ let gu = (bQ(gK) - value(cS.payments[0]).amount)
1017+ $Tuple2(gB, gu)
10241018 }
10251019 else {
1026- let gF = aO(this, ak())
1027- let gy = (bS(gO) - value(cU.payments[0]).amount)
1028- $Tuple2(gF, gy)
1020+ let gB = aO(this, ak())
1021+ let gu = (bQ(gK) - value(cS.payments[0]).amount)
1022+ $Tuple2(gB, gu)
10291023 }
1030- let gF = gP._1
1031- let gy = gP._2
1024+ let gB = gL._1
1025+ let gu = gL._2
10321026 let bl = bd()
1033- let do = bl[x]
1034- let dp = bl[y]
1035- let cE = if ((gx == false))
1036- then [(toBigInt(bS(do)) - toBigInt(value(cU.payments[0]).amount)), toBigInt(bS(dp))]
1037- else [toBigInt(bS(do)), (toBigInt(bS(dp)) - toBigInt(value(cU.payments[0]).amount))]
1038- let ey = cD(cE)
1039- let eG = gw(gx, ey, toBigInt(0))
1040- let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
1041- let gH = max([0, toInt(gG)])
1042- let gQ = if ((gH >= gK))
1027+ let dm = bl[x]
1028+ let dn = bl[y]
1029+ let cC = if ((gt == false))
1030+ then [(toBigInt(bQ(dm)) - toBigInt(value(cS.payments[0]).amount)), toBigInt(bQ(dn))]
1031+ else [toBigInt(bQ(dm)), (toBigInt(bQ(dn)) - toBigInt(value(cS.payments[0]).amount))]
1032+ let eu = cB(cC)
1033+ let eC = gs(gt, eu, toBigInt(0))
1034+ let gC = ((toBigInt(bQ(gB)) - eC) - toBigInt(1))
1035+ let gD = max([0, toInt(gC)])
1036+ let gM = if ((gD >= gG))
10431037 then true
10441038 else throw("Exchange result is fewer coins than expected")
1045- if ((gQ == gQ))
1039+ if ((gM == gM))
10461040 then {
1047- let gI = if ((gx == false))
1048- then [(toBigInt(bS(do)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
1049- else [(toBigInt(bS(do)) - gG), (toBigInt(bS(dp)) + toBigInt(gD))]
1050- let gJ = cD(gI)
1051- let ed = if ((gJ >= ey))
1041+ let gE = if ((gt == false))
1042+ then [(toBigInt(bQ(dm)) + toBigInt(gz)), (toBigInt(bQ(dn)) - gC)]
1043+ else [(toBigInt(bQ(dm)) - gC), (toBigInt(bQ(dn)) + toBigInt(gz))]
1044+ let gF = cB(gE)
1045+ let dZ = if ((gF >= eu))
10521046 then true
10531047 else throw("new D is fewer error")
1054- if ((ed == ed))
1055- then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bh(gF))], gH)
1048+ if ((dZ == dZ))
1049+ then $Tuple2([ScriptTransfer(addressFromStringValue(gH), gD, bh(gB))], gD)
10561050 else throw("Strict value is not equal to itself.")
10571051 }
10581052 else throw("Strict value is not equal to itself.")
10621056
10631057
10641058
1065-@Callable(cU)
1059+@Callable(cS)
10661060 func constructor (Z) = {
1067- let eC = gv(cU)
1068- if ((eC == eC))
1061+ let ey = gr(cS)
1062+ if ((ey == ey))
10691063 then [StringEntry(Z(), Z)]
10701064 else throw("Strict value is not equal to itself.")
10711065 }
10721066
10731067
10741068
1075-@Callable(cU)
1076-func setManager (gR) = {
1077- let eC = gv(cU)
1078- if ((eC == eC))
1069+@Callable(cS)
1070+func setManager (gN) = {
1071+ let ey = gr(cS)
1072+ if ((ey == ey))
10791073 then {
1080- let gS = fromBase58String(gR)
1081- if ((gS == gS))
1082- then [StringEntry(ab(), gR)]
1074+ let gO = fromBase58String(gN)
1075+ if ((gO == gO))
1076+ then [StringEntry(ab(), gN)]
10831077 else throw("Strict value is not equal to itself.")
10841078 }
10851079 else throw("Strict value is not equal to itself.")
10871081
10881082
10891083
1090-@Callable(cU)
1084+@Callable(cS)
10911085 func confirmManager () = {
1092- let cz = gr()
1093- let gT = if (isDefined(cz))
1086+ let cx = gn()
1087+ let gP = if (isDefined(cx))
10941088 then true
10951089 else throw("No pending manager")
1096- if ((gT == gT))
1090+ if ((gP == gP))
10971091 then {
1098- let gU = if ((cU.callerPublicKey == value(cz)))
1092+ let gQ = if ((cS.callerPublicKey == value(cx)))
10991093 then true
11001094 else throw("You are not pending manager")
1101- if ((gU == gU))
1102- then [StringEntry(aa(), toBase58String(value(cz))), DeleteEntry(ab())]
1095+ if ((gQ == gQ))
1096+ then [StringEntry(aa(), toBase58String(value(cx))), DeleteEntry(ab())]
11031097 else throw("Strict value is not equal to itself.")
11041098 }
11051099 else throw("Strict value is not equal to itself.")
11071101
11081102
11091103
1110-@Callable(cU)
1111-func put (gV,gW) = {
1112- let gX = bx()
1113- let gY = valueOrErrorMessage(addressFromString(gX[D]), "Wr st addr")
1114- let gZ = valueOrErrorMessage(addressFromString(gX[F]), "Wr sl addr")
1115- if ((0 > gV))
1104+@Callable(cS)
1105+func put (gR,gS) = {
1106+ let gT = bv()
1107+ let gU = valueOrErrorMessage(addressFromString(gT[D]), "Wr st addr")
1108+ let gV = valueOrErrorMessage(addressFromString(gT[F]), "Wr sl addr")
1109+ if ((0 > gR))
11161110 then throw("Wrong slippage")
1117- else if ((size(cU.payments) != 2))
1111+ else if ((size(cS.payments) != 2))
11181112 then throw("2 pmnts expd")
11191113 else {
1120- let ha = toBigInt(value(cU.payments[0]).amount)
1121- let hb = toBigInt(value(cU.payments[1]).amount)
1122- let eT = (toBigInt(bS(bj(br))) - ha)
1123- if ((eT == eT))
1114+ let gW = toBigInt(value(cS.payments[0]).amount)
1115+ let gX = toBigInt(value(cS.payments[1]).amount)
1116+ let eP = (toBigInt(bQ(bj(br))) - gW)
1117+ if ((eP == eP))
11241118 then {
1125- let eU = (toBigInt(bS(bj(bs))) - hb)
1126- if ((eU == eU))
1119+ let eQ = (toBigInt(bQ(bj(bs))) - gX)
1120+ if ((eQ == eQ))
11271121 then {
1128- let eV = toBigInt(value(assetInfo(bq)).quantity)
1129- if ((eV == eV))
1122+ let eR = toBigInt(value(assetInfo(bq)).quantity)
1123+ if ((eR == eR))
11301124 then {
1131- let eW = eP(ha, hb, toBigInt(0))
1132- if ((eW == eW))
1125+ let eS = eL(gW, gX, toBigInt(0))
1126+ if ((eS == eS))
11331127 then {
1134- let hc = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], gV, true, false, true, 0, "")
1135- let eq = hc._2
1136- let hd = hc._7
1137- let dG = hc._9
1138- let er = hc._10
1139- let es = hc._11
1140- let do = hc._12
1141- let dp = hc._13
1142- let ec = invoke(aV, "emit", [eq], nil)
1143- if ((ec == ec))
1128+ let gY = fm(toString(cS.caller), toBase58String(cS.transactionId), AttachedPayment(value(cS.payments[0]).assetId, value(cS.payments[0]).amount), cS.payments[1], gR, true, false, true, 0, "")
1129+ let em = gY._2
1130+ let gZ = gY._7
1131+ let dE = gY._9
1132+ let en = gY._10
1133+ let eo = gY._11
1134+ let dm = gY._12
1135+ let dn = gY._13
1136+ let dY = invoke(aV, "emit", [em], nil)
1137+ if ((dY == dY))
11441138 then {
1145- let he = {
1146- let gq = ec
1147- if ($isInstanceOf(gq, "Address"))
1139+ let ha = {
1140+ let gm = dY
1141+ if ($isInstanceOf(gm, "Address"))
11481142 then {
1149- let hf = gq
1150- invoke(hf, "emit", [eq], nil)
1143+ let hb = gm
1144+ invoke(hb, "emit", [em], nil)
11511145 }
11521146 else unit
11531147 }
1154- if ((he == he))
1148+ if ((ha == ha))
11551149 then {
1156- let hg = if ((er > 0))
1157- then invoke(gZ, "put", nil, [AttachedPayment(do, er)])
1150+ let hc = if ((en > 0))
1151+ then invoke(gV, "put", nil, [AttachedPayment(dm, en)])
11581152 else nil
1159- if ((hg == hg))
1153+ if ((hc == hc))
11601154 then {
1161- let hh = if ((es > 0))
1162- then invoke(gZ, "put", nil, [AttachedPayment(dp, es)])
1155+ let hd = if ((eo > 0))
1156+ then invoke(gV, "put", nil, [AttachedPayment(dn, eo)])
11631157 else nil
1164- if ((hh == hh))
1158+ if ((hd == hd))
11651159 then {
1166- let hi = if (gW)
1160+ let he = if (gS)
11671161 then {
1168- let hj = invoke(gY, "stake", nil, [AttachedPayment(hd, eq)])
1169- if ((hj == hj))
1162+ let hf = invoke(gU, "stake", nil, [AttachedPayment(gZ, em)])
1163+ if ((hf == hf))
11701164 then nil
11711165 else throw("Strict value is not equal to itself.")
11721166 }
1173- else [ScriptTransfer(cU.caller, eq, hd)]
1174- let hk = eX(0, 0, 0)
1175- let gn = hk._1
1176- let eO = hk._2
1177- let hl = if ((eO >= eW))
1167+ else [ScriptTransfer(cS.caller, em, gZ)]
1168+ let hg = eT(0, 0, 0)
1169+ let gj = hg._1
1170+ let eK = hg._2
1171+ let hh = if ((eK >= eS))
11781172 then true
1179- else aS(makeString(["updated DLp lower than current DLp", toString(eT), toString(eU), toString(eV), toString(eW), toString(eO), toString(er), toString(es)], " "))
1180- if ((hl == hl))
1173+ else aS(makeString(["updated DLp lower than current DLp", toString(eP), toString(eQ), toString(eR), toString(eS), toString(eK), toString(en), toString(eo)], " "))
1174+ if ((hh == hh))
11811175 then {
1182- let hm = value(assetInfo(bq)).quantity
1183- if ((hm == hm))
1184- then ((dG ++ hi) ++ gn)
1176+ let hi = value(assetInfo(bq)).quantity
1177+ if ((hi == hi))
1178+ then ((dE ++ he) ++ gj)
11851179 else throw("Strict value is not equal to itself.")
11861180 }
11871181 else throw("Strict value is not equal to itself.")
12061200
12071201
12081202
1209-@Callable(cU)
1210-func putOneTknV2 (fR,gW) = {
1211- let hn = {
1203+@Callable(cS)
1204+func putOneTknV2 (fN,gS) = {
1205+ let hj = {
12121206 let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12131207 if ($isInstanceOf(aX, "Boolean"))
12141208 then aX
12151209 else throw(($getType(aX) + " couldn't be cast to Boolean"))
12161210 }
1217- let ho = if (if (if (ba())
1211+ let hk = if (if (if (ba())
12181212 then true
12191213 else (bp == r))
12201214 then true
12211215 else (bp == t))
12221216 then true
1223- else hn
1224- let gN = [if (if (!(ho))
1217+ else hj
1218+ let gJ = [if (if (!(hk))
12251219 then true
1226- else gt(cU))
1220+ else gp(cS))
12271221 then true
1228- else aS("put operation is blocked by admin"), if ((size(cU.payments) == 1))
1222+ else aS("put operation is blocked by admin"), if ((size(cS.payments) == 1))
12291223 then true
12301224 else aS("exactly 1 payment are expected")]
1231- if ((gN == gN))
1225+ if ((gJ == gJ))
12321226 then {
1233- let do = toBase58String(value(br))
1234- let dp = toBase58String(value(bs))
1235- let dn = bq
1236- let fV = bt
1237- let fW = bu
1238- let dm = if ((cU.caller == this))
1239- then cU.originCaller
1240- else cU.caller
1241- let fp = value(cU.payments[0])
1242- let dk = toBase58String(value(fp.assetId))
1243- let dQ = fp.amount
1244- let eW = if ((fp.assetId == br))
1245- then eP(toBigInt(dQ), toBigInt(0), toBigInt(0))
1246- else eP(toBigInt(0), toBigInt(dQ), toBigInt(0))
1247- if ((eW == eW))
1227+ let dm = toBase58String(value(br))
1228+ let dn = toBase58String(value(bs))
1229+ let dl = bq
1230+ let fR = bt
1231+ let fS = bu
1232+ let dk = if ((cS.caller == this))
1233+ then cS.originCaller
1234+ else cS.caller
1235+ let fl = value(cS.payments[0])
1236+ let di = toBase58String(value(fl.assetId))
1237+ let dO = fl.amount
1238+ let eS = if ((fl.assetId == br))
1239+ then eL(toBigInt(dO), toBigInt(0), toBigInt(0))
1240+ else eL(toBigInt(0), toBigInt(dO), toBigInt(0))
1241+ if ((eS == eS))
12481242 then {
1249- let hp = fu(dQ, dk, toString(dm), toBase58String(cU.transactionId), true)
1250- if ((hp == hp))
1243+ let hl = fq(dO, di, toString(dk), toBase58String(cS.transactionId), true)
1244+ if ((hl == hl))
12511245 then {
1252- let cC = hp._3
1253- let dG = hp._2
1254- let hq = hp._1
1255- let eq = if (if ((fR > 0))
1256- then (fR > hq)
1246+ let cA = hl._3
1247+ let dE = hl._2
1248+ let hm = hl._1
1249+ let em = if (if ((fN > 0))
1250+ then (fN > hm)
12571251 else false)
1258- then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
1259- else hq
1260- let hc = invoke(aV, "emit", [eq], nil)
1261- if ((hc == hc))
1252+ then aS(makeString(["amount to receive is less than ", toString(fN)], ""))
1253+ else hm
1254+ let gY = invoke(aV, "emit", [em], nil)
1255+ if ((gY == gY))
12621256 then {
1263- let he = {
1264- let gq = hc
1265- if ($isInstanceOf(gq, "Address"))
1257+ let ha = {
1258+ let gm = gY
1259+ if ($isInstanceOf(gm, "Address"))
12661260 then {
1267- let hf = gq
1268- invoke(hf, "emit", [eq], nil)
1261+ let hb = gm
1262+ invoke(hb, "emit", [em], nil)
12691263 }
12701264 else unit
12711265 }
1272- if ((he == he))
1266+ if ((ha == ha))
12731267 then {
1274- let hi = if (gW)
1268+ let he = if (gS)
12751269 then {
1276- let hj = invoke(bz, "stakeFor", [toString(cU.caller)], [AttachedPayment(dn, eq)])
1277- if ((hj == hj))
1270+ let hf = invoke(bx, "stakeFor", [toString(cS.caller)], [AttachedPayment(dl, em)])
1271+ if ((hf == hf))
12781272 then nil
12791273 else throw("Strict value is not equal to itself.")
12801274 }
1281- else [ScriptTransfer(cU.caller, eq, dn)]
1282- let gh = if ((cC > 0))
1283- then [ScriptTransfer(bc, cC, fromBase58String(dk))]
1275+ else [ScriptTransfer(cS.caller, em, dl)]
1276+ let gd = if ((cA > 0))
1277+ then [ScriptTransfer(bc, cA, fromBase58String(di))]
12841278 else nil
1285- let hr = if ((this == bc))
1279+ let hn = if ((this == bc))
12861280 then $Tuple2(0, 0)
12871281 else {
1288- let hs = if ((fp.assetId == br))
1282+ let ho = if ((fl.assetId == br))
12891283 then true
12901284 else false
1291- if (hs)
1292- then $Tuple2(-(cC), 0)
1293- else $Tuple2(0, -(cC))
1285+ if (ho)
1286+ then $Tuple2(-(cA), 0)
1287+ else $Tuple2(0, -(cA))
12941288 }
1295- let eY = hr._1
1296- let eZ = hr._2
1297- let ht = eX(eY, eZ, 0)
1298- let gn = ht._1
1299- let eO = ht._2
1300- let go = fb(eW, eO)
1301- if ((go == go))
1302- then $Tuple2((((dG ++ hi) ++ gh) ++ gn), eq)
1289+ let eU = hn._1
1290+ let eV = hn._2
1291+ let hp = eT(eU, eV, 0)
1292+ let gj = hp._1
1293+ let eK = hp._2
1294+ let gk = eX(eS, eK)
1295+ if ((gk == gk))
1296+ then $Tuple2((((dE ++ he) ++ gd) ++ gj), em)
13031297 else throw("Strict value is not equal to itself.")
13041298 }
13051299 else throw("Strict value is not equal to itself.")
13151309
13161310
13171311
1318-@Callable(cU)
1319-func putForFree (hu) = if ((0 > hu))
1312+@Callable(cS)
1313+func putForFree (hq) = if ((0 > hq))
13201314 then throw("Wrong slpg")
1321- else if ((size(cU.payments) != 2))
1315+ else if ((size(cS.payments) != 2))
13221316 then throw("2 pmnts expd")
13231317 else {
1324- let hv = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], hu, false, false, true, 0, "")
1325- let dG = hv._9
1326- let ha = toBigInt(value(cU.payments[0]).amount)
1327- let hb = toBigInt(value(cU.payments[1]).amount)
1328- let eW = eP(ha, hb, toBigInt(0))
1329- if ((eW == eW))
1318+ let hr = fm(toString(cS.caller), toBase58String(cS.transactionId), AttachedPayment(value(cS.payments[0]).assetId, value(cS.payments[0]).amount), cS.payments[1], hq, false, false, true, 0, "")
1319+ let dE = hr._9
1320+ let gW = toBigInt(value(cS.payments[0]).amount)
1321+ let gX = toBigInt(value(cS.payments[1]).amount)
1322+ let eS = eL(gW, gX, toBigInt(0))
1323+ if ((eS == eS))
13301324 then {
1331- let hw = eX(0, 0, 0)
1332- let gn = hw._1
1333- let eO = hw._2
1334- let go = fb(eW, eO)
1335- if ((go == go))
1336- then (dG ++ gn)
1325+ let hs = eT(0, 0, 0)
1326+ let gj = hs._1
1327+ let eK = hs._2
1328+ let gk = eX(eS, eK)
1329+ if ((gk == gk))
1330+ then (dE ++ gj)
13371331 else throw("Strict value is not equal to itself.")
13381332 }
13391333 else throw("Strict value is not equal to itself.")
13411335
13421336
13431337
1344-@Callable(cU)
1338+@Callable(cS)
13451339 func get () = {
1346- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1347- if ((eW == eW))
1340+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1341+ if ((eS == eS))
13481342 then {
1349- let ec = fo(cU)
1350- let hx = ec._1
1351- let dF = ec._2
1352- let dQ = ec._3
1353- let dk = ec._4
1354- let dG = ec._5
1355- let eD = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1356- if ((eD == eD))
1343+ let dY = fk(cS)
1344+ let ht = dY._1
1345+ let dD = dY._2
1346+ let dO = dY._3
1347+ let di = dY._4
1348+ let dE = dY._5
1349+ let ez = invoke(aV, "burn", [dO], [AttachedPayment(di, dO)])
1350+ if ((ez == ez))
13571351 then {
1358- let hy = eX(-(hx), -(dF), 0)
1359- let gn = hy._1
1360- let eO = hy._2
1361- let go = fb(eW, eO)
1362- if ((go == go))
1363- then (dG ++ gn)
1352+ let hu = eT(-(ht), -(dD), 0)
1353+ let gj = hu._1
1354+ let eK = hu._2
1355+ let gk = eX(eS, eK)
1356+ if ((gk == gk))
1357+ then (dE ++ gj)
13641358 else throw("Strict value is not equal to itself.")
13651359 }
13661360 else throw("Strict value is not equal to itself.")
13701364
13711365
13721366
1373-@Callable(cU)
1374-func getOneTknV2 (fQ,fR) = {
1375- let hn = {
1367+@Callable(cS)
1368+func getOneTknV2 (fM,fN) = {
1369+ let hj = {
13761370 let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13771371 if ($isInstanceOf(aX, "Boolean"))
13781372 then aX
13791373 else throw(($getType(aX) + " couldn't be cast to Boolean"))
13801374 }
1381- let hz = if (if (ba())
1375+ let hv = if (if (ba())
13821376 then true
13831377 else (bp == t))
13841378 then true
1385- else hn
1386- let gN = [if (if (!(hz))
1379+ else hj
1380+ let gJ = [if (if (!(hv))
13871381 then true
1388- else gt(cU))
1382+ else gp(cS))
13891383 then true
1390- else aS("get operation is blocked by admin"), if ((size(cU.payments) == 1))
1384+ else aS("get operation is blocked by admin"), if ((size(cS.payments) == 1))
13911385 then true
13921386 else aS("exactly 1 payment are expected")]
1393- if ((gN == gN))
1387+ if ((gJ == gJ))
13941388 then {
1395- let hA = fP(fQ, fR, cU.payments, cU.caller, cU.originCaller, cU.transactionId)
1396- let dG = hA._1
1397- let ga = hA._2
1398- $Tuple2(dG, ga)
1389+ let hw = fL(fM, fN, cS.payments, cS.caller, cS.originCaller, cS.transactionId)
1390+ let dE = hw._1
1391+ let fW = hw._2
1392+ $Tuple2(dE, fW)
13991393 }
14001394 else throw("Strict value is not equal to itself.")
14011395 }
14021396
14031397
14041398
1405-@Callable(cU)
1399+@Callable(cS)
14061400 func refreshDLp () = {
1407- let hB = valueOrElse(getInteger(at), 0)
1408- let hC = if (((height - hB) >= aw))
1401+ let hx = valueOrElse(getInteger(at), 0)
1402+ let hy = if (((height - hx) >= aw))
14091403 then unit
14101404 else aS(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1411- if ((hC == hC))
1405+ if ((hy == hy))
14121406 then {
1413- let fi = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), aU("invalid dLp"))
1414- let hD = eX(0, 0, 0)
1415- let hE = hD._1
1416- let eO = hD._2
1417- let fa = if ((fi != eO))
1418- then hE
1407+ let fe = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), aU("invalid dLp"))
1408+ let hz = eT(0, 0, 0)
1409+ let hA = hz._1
1410+ let eK = hz._2
1411+ let eW = if ((fe != eK))
1412+ then hA
14191413 else aS("nothing to refresh")
1420- $Tuple2(fa, toString(eO))
1414+ $Tuple2(eW, toString(eK))
14211415 }
14221416 else throw("Strict value is not equal to itself.")
14231417 }
14241418
14251419
14261420
1427-@Callable(cU)
1428-func getOneTknV2READONLY (fQ,hF) = {
1429- let do = toBase58String(value(br))
1430- let dp = toBase58String(value(bs))
1431- let dn = toBase58String(value(bq))
1432- let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
1433- let eN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dn)), "invalid lp asset").quantity)
1434- let cg = cD(cE)
1435- let cf = (cg - fraction(toBigInt(hF), cg, eN))
1436- let hG = if ((fQ == do))
1421+@Callable(cS)
1422+func getOneTknV2READONLY (fM,hB) = {
1423+ let dm = toBase58String(value(br))
1424+ let dn = toBase58String(value(bs))
1425+ let dl = toBase58String(value(bq))
1426+ let cC = [toBigInt(bQ(dm)), toBigInt(bQ(dn))]
1427+ let eJ = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dl)), "invalid lp asset").quantity)
1428+ let ce = cB(cC)
1429+ let cd = (ce - fraction(toBigInt(hB), ce, eJ))
1430+ let hC = if ((fM == dm))
14371431 then 0
1438- else if ((fQ == dp))
1432+ else if ((fM == dn))
14391433 then 1
14401434 else throw("invalid out asset id")
1441- let hH = ex(cE, hG, cf)
1442- let gG = (cE[hG] - hH)
1443- let gH = max([0, toInt((gG - f))])
1444- let hI = cA(gH, aY)
1445- let fZ = hI._1
1446- let cC = hI._2
1447- $Tuple2(nil, $Tuple2(fZ, cC))
1435+ let hD = et(cC, hC, cd)
1436+ let gC = (cC[hC] - hD)
1437+ let gD = max([0, toInt((gC - f))])
1438+ let hE = cy(gD, aY)
1439+ let fV = hE._1
1440+ let cA = hE._2
1441+ $Tuple2(nil, $Tuple2(fV, cA))
14481442 }
14491443
14501444
14511445
1452-@Callable(cU)
1453-func getOneTknV2WithBonusREADONLY (fQ,hF) = {
1454- let do = toBase58String(value(br))
1455- let dp = toBase58String(value(bs))
1456- let dn = toBase58String(value(bq))
1457- let du = bS(do)
1458- let dw = bS(dp)
1459- let hJ = {
1460- let aX = invoke(this, "getOneTknV2READONLY", [fQ, hF], nil)
1446+@Callable(cS)
1447+func getOneTknV2WithBonusREADONLY (fM,hB) = {
1448+ let dm = toBase58String(value(br))
1449+ let dn = toBase58String(value(bs))
1450+ let dl = toBase58String(value(bq))
1451+ let ds = bQ(dm)
1452+ let du = bQ(dn)
1453+ let hF = {
1454+ let aX = invoke(this, "getOneTknV2READONLY", [fM, hB], nil)
14611455 if ($isInstanceOf(aX, "(Int, Int)"))
14621456 then aX
14631457 else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
14641458 }
1465- let fZ = hJ._1
1466- let cC = hJ._2
1467- let ec = di("", dn, hF, this)
1468- let dE = ec._1
1469- let dF = ec._2
1470- let hK = (dE + dF)
1471- let fO = if ((hK == 0))
1472- then if ((fZ == 0))
1459+ let fV = hF._1
1460+ let cA = hF._2
1461+ let dY = dg("", dl, hB, this)
1462+ let dC = dY._1
1463+ let dD = dY._2
1464+ let hG = (dC + dD)
1465+ let fK = if ((hG == 0))
1466+ then if ((fV == 0))
14731467 then 0
14741468 else throw("bonus calculation error")
1475- else fraction((fZ - hK), a, hK)
1476- $Tuple2(nil, $Tuple3(fZ, cC, fO))
1469+ else fraction((fV - hG), a, hG)
1470+ $Tuple2(nil, $Tuple3(fV, cA, fK))
14771471 }
14781472
14791473
14801474
1481-@Callable(cU)
1482-func getNoLess (hL,hM) = {
1483- let ec = fo(cU)
1484- let dE = ec._1
1485- let dF = ec._2
1486- let dQ = ec._3
1487- let dk = ec._4
1488- let dG = ec._5
1489- if ((hL > dE))
1490- then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL)))
1491- else if ((hM > dF))
1492- then throw(((("Failed: " + toString(dF)) + " < ") + toString(hM)))
1475+@Callable(cS)
1476+func getNoLess (hH,hI) = {
1477+ let dY = fk(cS)
1478+ let dC = dY._1
1479+ let dD = dY._2
1480+ let dO = dY._3
1481+ let di = dY._4
1482+ let dE = dY._5
1483+ if ((hH > dC))
1484+ then throw(((("Failed: " + toString(dC)) + " < ") + toString(hH)))
1485+ else if ((hI > dD))
1486+ then throw(((("Failed: " + toString(dD)) + " < ") + toString(hI)))
14931487 else {
1494- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1495- if ((eW == eW))
1488+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1489+ if ((eS == eS))
14961490 then {
1497- let hN = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1498- if ((hN == hN))
1491+ let hJ = invoke(aV, "burn", [dO], [AttachedPayment(di, dO)])
1492+ if ((hJ == hJ))
14991493 then {
1500- let hO = eX(-(dE), -(dF), 0)
1501- let gn = hO._1
1502- let eO = hO._2
1503- let go = fb(eW, eO)
1504- if ((go == go))
1505- then (dG ++ gn)
1494+ let hK = eT(-(dC), -(dD), 0)
1495+ let gj = hK._1
1496+ let eK = hK._2
1497+ let gk = eX(eS, eK)
1498+ if ((gk == gk))
1499+ then (dE ++ gj)
15061500 else throw("Strict value is not equal to itself.")
15071501 }
15081502 else throw("Strict value is not equal to itself.")
15131507
15141508
15151509
1516-@Callable(cU)
1517-func unstakeAndGet (cB) = {
1518- let hP = if ((size(cU.payments) != 0))
1510+@Callable(cS)
1511+func unstakeAndGet (cz) = {
1512+ let hL = if ((size(cS.payments) != 0))
15191513 then throw("No pmnts expd")
15201514 else true
1521- if ((hP == hP))
1515+ if ((hL == hL))
15221516 then {
1523- let hQ = bx()
1524- let hd = bq
1525- let hR = valueOrErrorMessage(addressFromString(hQ[D]), "Wr st addr")
1526- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1527- if ((eW == eW))
1517+ let hM = bv()
1518+ let gZ = bq
1519+ let hN = valueOrErrorMessage(addressFromString(hM[D]), "Wr st addr")
1520+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1521+ if ((eS == eS))
15281522 then {
1529- let hS = invoke(hR, "unstake", [toBase58String(hd), cB], nil)
1530- if ((hS == hS))
1523+ let hO = invoke(hN, "unstake", [toBase58String(gZ), cz], nil)
1524+ if ((hO == hO))
15311525 then {
1532- let ec = di(toBase58String(cU.transactionId), toBase58String(hd), cB, cU.caller)
1533- let dE = ec._1
1534- let dF = ec._2
1535- let ds = parseIntValue(ec._9)
1536- let dG = ec._10
1537- let hT = if (if (ba())
1526+ let dY = dg(toBase58String(cS.transactionId), toBase58String(gZ), cz, cS.caller)
1527+ let dC = dY._1
1528+ let dD = dY._2
1529+ let dq = parseIntValue(dY._9)
1530+ let dE = dY._10
1531+ let hP = if (if (ba())
15381532 then true
1539- else (ds == t))
1540- then throw(("Blocked: " + toString(ds)))
1533+ else (dq == t))
1534+ then throw(("Blocked: " + toString(dq)))
15411535 else true
1542- if ((hT == hT))
1536+ if ((hP == hP))
15431537 then {
1544- let hU = invoke(aV, "burn", [cB], [AttachedPayment(hd, cB)])
1545- if ((hU == hU))
1538+ let hQ = invoke(aV, "burn", [cz], [AttachedPayment(gZ, cz)])
1539+ if ((hQ == hQ))
15461540 then {
1547- let hV = eX(-(dE), -(dF), 0)
1548- let gn = hV._1
1549- let eO = hV._2
1550- let go = fb(eW, eO)
1551- if ((go == go))
1552- then (dG ++ gn)
1541+ let hR = eT(-(dC), -(dD), 0)
1542+ let gj = hR._1
1543+ let eK = hR._2
1544+ let gk = eX(eS, eK)
1545+ if ((gk == gk))
1546+ then (dE ++ gj)
15531547 else throw("Strict value is not equal to itself.")
15541548 }
15551549 else throw("Strict value is not equal to itself.")
15651559
15661560
15671561
1568-@Callable(cU)
1569-func unstakeAndGetNoLess (hW,hX,hM) = {
1570- let hz = if (ba())
1562+@Callable(cS)
1563+func unstakeAndGetNoLess (hS,hT,hI) = {
1564+ let hv = if (ba())
15711565 then true
15721566 else (bp == t)
1573- let gN = [if (!(hz))
1567+ let gJ = [if (!(hv))
15741568 then true
1575- else throw("get operation is blocked by admin"), if ((size(cU.payments) == 0))
1569+ else throw("get operation is blocked by admin"), if ((size(cS.payments) == 0))
15761570 then true
15771571 else throw("no payments are expected")]
1578- if ((gN == gN))
1572+ if ((gJ == gJ))
15791573 then {
1580- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1581- if ((eW == eW))
1574+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1575+ if ((eS == eS))
15821576 then {
1583- let hS = invoke(bz, "unstake", [toBase58String(bq), hW], nil)
1584- if ((hS == hS))
1577+ let hO = invoke(bx, "unstake", [toBase58String(bq), hS], nil)
1578+ if ((hO == hO))
15851579 then {
1586- let hY = di(toBase58String(cU.transactionId), toBase58String(bq), hW, cU.caller)
1587- let dE = hY._1
1588- let dF = hY._2
1589- let dG = hY._10
1590- let hZ = [if ((dE >= hX))
1580+ let hU = dg(toBase58String(cS.transactionId), toBase58String(bq), hS, cS.caller)
1581+ let dC = hU._1
1582+ let dD = hU._2
1583+ let dE = hU._10
1584+ let hV = [if ((dC >= hT))
15911585 then true
1592- else throw(makeString(["amount asset amount to receive is less than ", toString(hX)], "")), if ((dF >= hM))
1586+ else throw(makeString(["amount asset amount to receive is less than ", toString(hT)], "")), if ((dD >= hI))
15931587 then true
1594- else throw(makeString(["price asset amount to receive is less than ", toString(hM)], ""))]
1595- if ((hZ == hZ))
1588+ else throw(makeString(["price asset amount to receive is less than ", toString(hI)], ""))]
1589+ if ((hV == hV))
15961590 then {
1597- let hN = invoke(aV, "burn", [hW], [AttachedPayment(bq, hW)])
1598- if ((hN == hN))
1591+ let hJ = invoke(aV, "burn", [hS], [AttachedPayment(bq, hS)])
1592+ if ((hJ == hJ))
15991593 then {
1600- let ia = eX(-(dE), -(dF), 0)
1601- let gn = ia._1
1602- let eO = ia._2
1603- let go = fb(eW, eO)
1604- if ((go == go))
1605- then (dG ++ gn)
1594+ let hW = eT(-(dC), -(dD), 0)
1595+ let gj = hW._1
1596+ let eK = hW._2
1597+ let gk = eX(eS, eK)
1598+ if ((gk == gk))
1599+ then (dE ++ gj)
16061600 else throw("Strict value is not equal to itself.")
16071601 }
16081602 else throw("Strict value is not equal to itself.")
16181612
16191613
16201614
1621-@Callable(cU)
1622-func unstakeAndGetOneTknV2 (hW,fQ,fR) = {
1623- let hn = {
1615+@Callable(cS)
1616+func unstakeAndGetOneTknV2 (hS,fM,fN) = {
1617+ let hj = {
16241618 let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16251619 if ($isInstanceOf(aX, "Boolean"))
16261620 then aX
16271621 else throw(($getType(aX) + " couldn't be cast to Boolean"))
16281622 }
1629- let hz = if (if (ba())
1623+ let hv = if (if (ba())
16301624 then true
16311625 else (bp == t))
16321626 then true
1633- else hn
1634- let gN = [if (if (!(hz))
1627+ else hj
1628+ let gJ = [if (if (!(hv))
16351629 then true
1636- else gt(cU))
1630+ else gp(cS))
16371631 then true
1638- else aS("get operation is blocked by admin"), if ((size(cU.payments) == 0))
1632+ else aS("get operation is blocked by admin"), if ((size(cS.payments) == 0))
16391633 then true
16401634 else aS("no payments are expected")]
1641- if ((gN == gN))
1635+ if ((gJ == gJ))
16421636 then {
1643- let hQ = bx()
1644- let hd = bq
1645- let hR = valueOrErrorMessage(addressFromString(hQ[D]), "Wr st addr")
1646- let dm = cU.caller
1647- let ib = this
1648- let hS = invoke(hR, "unstakeINTERNAL", [hd, hW, dm.bytes, ib.bytes], nil)
1649- if ((hS == hS))
1637+ let hM = bv()
1638+ let gZ = bq
1639+ let hN = valueOrErrorMessage(addressFromString(hM[D]), "Wr st addr")
1640+ let dk = cS.caller
1641+ let hX = this
1642+ let hO = invoke(hN, "unstakeINTERNAL", [gZ, hS, dk.bytes, hX.bytes], nil)
1643+ if ((hO == hO))
16501644 then {
1651- let ic = fP(fQ, fR, [AttachedPayment(hd, hW)], cU.caller, cU.originCaller, cU.transactionId)
1652- let dG = ic._1
1653- let ga = ic._2
1654- $Tuple2(dG, ga)
1645+ let hY = fL(fM, fN, [AttachedPayment(gZ, hS)], cS.caller, cS.originCaller, cS.transactionId)
1646+ let dE = hY._1
1647+ let fW = hY._2
1648+ $Tuple2(dE, fW)
16551649 }
16561650 else throw("Strict value is not equal to itself.")
16571651 }
16601654
16611655
16621656
1663-@Callable(cU)
1664-func putOneTknV2WithBonusREADONLY (id,ie) = {
1665- let if = fu(id, ie, "", "", true)
1666- let fJ = if._1
1667- let dG = if._2
1668- let cC = if._3
1669- let fO = if._4
1670- $Tuple2(nil, $Tuple3(fJ, cC, fO))
1657+@Callable(cS)
1658+func putOneTknV2WithBonusREADONLY (hZ,ia) = {
1659+ let ib = fq(hZ, ia, "", "", true)
1660+ let fF = ib._1
1661+ let dE = ib._2
1662+ let cA = ib._3
1663+ let fK = ib._4
1664+ $Tuple2(nil, $Tuple3(fF, cA, fK))
16711665 }
16721666
16731667
16741668
1675-@Callable(cU)
1676-func putOneTknV2WithoutTakeFeeREADONLY (id,ie) = {
1677- let ig = fu(id, ie, "", "", false)
1678- let fJ = ig._1
1679- let dG = ig._2
1680- let cC = ig._3
1681- let fO = ig._4
1682- $Tuple2(nil, $Tuple3(fJ, cC, fO))
1669+@Callable(cS)
1670+func putOneTknV2WithoutTakeFeeREADONLY (hZ,ia) = {
1671+ let ic = fq(hZ, ia, "", "", false)
1672+ let fF = ic._1
1673+ let dE = ic._2
1674+ let cA = ic._3
1675+ let fK = ic._4
1676+ $Tuple2(nil, $Tuple3(fF, cA, fK))
16831677 }
16841678
16851679
16861680
1687-@Callable(cU)
1688-func activate (ih,ii) = if ((toString(cU.caller) != toString(aV)))
1681+@Callable(cS)
1682+func activate (id,ie) = if ((toString(cS.caller) != toString(aV)))
16891683 then throw("denied")
1690- else $Tuple2([StringEntry(ak(), ih), StringEntry(al(), ii), StringEntry(am(), toString(l))], "success")
1684+ else $Tuple2([StringEntry(ak(), id), StringEntry(al(), ie), StringEntry(am(), toString(l))], "success")
16911685
16921686
16931687
1694-@Callable(cU)
1688+@Callable(cS)
16951689 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bd())
16961690
16971691
16981692
1699-@Callable(cU)
1700-func getAccBalanceWrapperREADONLY (bT) = $Tuple2(nil, bS(bT))
1693+@Callable(cS)
1694+func getAccBalanceWrapperREADONLY (bR) = $Tuple2(nil, bQ(bR))
17011695
17021696
17031697
1704-@Callable(cU)
1705-func calcPricesWrapperREADONLY (cm,cn,cr) = {
1706- let ij = cq(cm, cn, cr)
1707- $Tuple2(nil, [toString(ij[0]), toString(ij[1]), toString(ij[2])])
1698+@Callable(cS)
1699+func calcPricesWrapperREADONLY (ck,cl,cp) = {
1700+ let if = co(ck, cl, cp)
1701+ $Tuple2(nil, [toString(if[0]), toString(if[1]), toString(if[2])])
17081702 }
17091703
17101704
17111705
1712-@Callable(cU)
1713-func fromX18WrapperREADONLY (N,ik) = $Tuple2(nil, M(parseBigIntValue(N), ik))
1706+@Callable(cS)
1707+func fromX18WrapperREADONLY (N,ig) = $Tuple2(nil, M(parseBigIntValue(N), ig))
17141708
17151709
17161710
1717-@Callable(cU)
1711+@Callable(cS)
17181712 func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K)))
17191713
17201714
17211715
1722-@Callable(cU)
1723-func calcPriceBigIntWrapperREADONLY (bV,bW) = $Tuple2(nil, toString(bU(parseBigIntValue(bV), parseBigIntValue(bW))))
1716+@Callable(cS)
1717+func calcPriceBigIntWrapperREADONLY (bT,bU) = $Tuple2(nil, toString(bS(parseBigIntValue(bT), parseBigIntValue(bU))))
17241718
17251719
17261720
1727-@Callable(cU)
1728-func estimatePutOperationWrapperREADONLY (dj,cb,dI,dJ,dK,dL,il,dM,dN) = $Tuple2(nil, dH(dj, cb, dI, dJ, dK, dL, il, dM, dN, true, false, 0, ""))
1721+@Callable(cS)
1722+func estimatePutOperationWrapperREADONLY (dh,bZ,dG,dH,dI,dJ,ih,dK,dL) = $Tuple2(nil, dF(dh, bZ, dG, dH, dI, dJ, ih, dK, dL, true, false, 0, ""))
17291723
17301724
17311725
1732-@Callable(cU)
1733-func estimateGetOperationWrapperREADONLY (dj,im,dl,il) = {
1734- let ec = di(dj, im, dl, addressFromStringValue(il))
1735- $Tuple2(nil, $Tuple10(ec._1, ec._2, ec._3, ec._4, ec._5, ec._6, ec._7, toString(ec._8), ec._9, ec._10))
1726+@Callable(cS)
1727+func estimateGetOperationWrapperREADONLY (dh,ii,dj,ih) = {
1728+ let dY = dg(dh, ii, dj, addressFromStringValue(ih))
1729+ $Tuple2(nil, $Tuple10(dY._1, dY._2, dY._3, dY._4, dY._5, dY._6, dY._7, toString(dY._8), dY._9, dY._10))
17361730 }
17371731
17381732
17391733
1740-@Callable(cU)
1734+@Callable(cS)
17411735 func changeAmp () = {
1742- let in = invoke(aV, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1743- let io = {
1744- let gq = in
1745- if ($isInstanceOf(gq, "List[Any]"))
1736+ let ij = invoke(aV, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1737+ let ik = {
1738+ let gm = ij
1739+ if ($isInstanceOf(gm, "List[Any]"))
17461740 then {
1747- let ip = gq
1741+ let il = gm
17481742 $Tuple3({
1749- let aX = ip[0]
1743+ let aX = il[0]
17501744 if ($isInstanceOf(aX, "Int"))
17511745 then aX
17521746 else throw(($getType(aX) + " couldn't be cast to Int"))
17531747 }, {
1754- let aX = ip[1]
1748+ let aX = il[1]
17551749 if ($isInstanceOf(aX, "Int"))
17561750 then aX
17571751 else throw(($getType(aX) + " couldn't be cast to Int"))
17581752 }, {
1759- let aX = ip[2]
1753+ let aX = il[2]
17601754 if ($isInstanceOf(aX, "Int"))
17611755 then aX
17621756 else throw(($getType(aX) + " couldn't be cast to Int"))
17641758 }
17651759 else aS("invalid entry type")
17661760 }
1767- let iq = io._1
1768- let ir = io._2
1769- let is = io._3
1770- let it = parseIntValue(getStringValue(am()))
1771- let iu = (it + ir)
1772- let iv = if ((0 > ir))
1773- then if ((is > iu))
1774- then is
1775- else iu
1776- else if ((iu > is))
1777- then is
1778- else iu
1779- let iw = valueOrElse(getInteger(ap()), 0)
1780- let ix = (iw + iq)
1781- let gN = [if ((height > ix))
1761+ let im = ik._1
1762+ let in = ik._2
1763+ let io = ik._3
1764+ let ip = parseIntValue(getStringValue(am()))
1765+ let iq = (ip + in)
1766+ let ir = if ((0 > in))
1767+ then if ((io > iq))
1768+ then io
1769+ else iq
1770+ else if ((iq > io))
1771+ then io
1772+ else iq
1773+ let is = valueOrElse(getInteger(ap()), 0)
1774+ let it = (is + im)
1775+ let gJ = [if ((height > it))
17821776 then true
1783- else aS("try again in few blocks"), if ((it != iv))
1777+ else aS("try again in few blocks"), if ((ip != ir))
17841778 then true
17851779 else aS("already reached target")]
1786- if ((gN == gN))
1787- then [IntegerEntry(ap(), height), StringEntry(am(), toString(iv)), StringEntry(an(height), toString(iv))]
1780+ if ((gJ == gJ))
1781+ then [IntegerEntry(ap(), height), StringEntry(am(), toString(ir)), StringEntry(an(height), toString(ir))]
17881782 else throw("Strict value is not equal to itself.")
17891783 }
17901784
17911785
1792-@Verifier(iy)
1793-func iz () = {
1794- let iA = {
1795- let gq = gp()
1796- if ($isInstanceOf(gq, "ByteVector"))
1786+@Verifier(iu)
1787+func iv () = {
1788+ let iw = {
1789+ let gm = gl()
1790+ if ($isInstanceOf(gm, "ByteVector"))
17971791 then {
1798- let gu = gq
1799- gu
1792+ let gq = gm
1793+ gq
18001794 }
1801- else if ($isInstanceOf(gq, "Unit"))
1802- then iy.senderPublicKey
1795+ else if ($isInstanceOf(gm, "Unit"))
1796+ then iu.senderPublicKey
18031797 else throw("Match error")
18041798 }
1805- let gq = iy
1806- if ($isInstanceOf(gq, "Order"))
1799+ let gm = iu
1800+ if ($isInstanceOf(gm, "Order"))
18071801 then {
1808- let fe = gq
1809- let iB = bb()
1810- let iC = if (gB())
1802+ let fa = gm
1803+ let ix = bb()
1804+ let iy = if (gx())
18111805 then $Tuple2(true, "")
1812- else fd(fe)
1813- let aK = iC._1
1814- let aL = iC._2
1815- let aM = sigVerify(fe.bodyBytes, fe.proofs[0], fe.senderPublicKey)
1816- let aN = sigVerify(fe.bodyBytes, fe.proofs[1], iB)
1806+ else eZ(fa)
1807+ let aK = iy._1
1808+ let aL = iy._2
1809+ let aM = sigVerify(fa.bodyBytes, fa.proofs[0], fa.senderPublicKey)
1810+ let aN = sigVerify(fa.bodyBytes, fa.proofs[1], ix)
18171811 if (if (if (aK)
18181812 then aM
18191813 else false)
18221816 then true
18231817 else aJ(aK, aL, aM, aN)
18241818 }
1825- else if ($isInstanceOf(gq, "SetScriptTransaction"))
1819+ else if ($isInstanceOf(gm, "SetScriptTransaction"))
18261820 then {
1827- let cH = gq
1828- if (sigVerify(iy.bodyBytes, iy.proofs[0], iA))
1821+ let cF = gm
1822+ if (sigVerify(iu.bodyBytes, iu.proofs[0], iw))
18291823 then true
18301824 else {
1831- let iD = blake2b256(value(cH.script))
1832- let iE = fromBase64String(value(getString(aV, aF())))
1833- let iF = scriptHash(this)
1834- if ((iE == iD))
1835- then (iF != iD)
1825+ let iz = blake2b256(value(cF.script))
1826+ let iA = fromBase64String(value(getString(aV, aF())))
1827+ let iB = scriptHash(this)
1828+ if ((iA == iz))
1829+ then (iB != iz)
18361830 else false
18371831 }
18381832 }
1839- else sigVerify(iy.bodyBytes, iy.proofs[0], iA)
1833+ else sigVerify(iu.bodyBytes, iu.proofs[0], iw)
18401834 }
18411835
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__pendingManagerPublicKey"
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,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
181181
182182
183183 func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
184184
185185
186186 func aS (aT) = throw(makeString(["lp_stable.ride:", aT], " "))
187187
188188
189189 func aU (aT) = makeString(["lp_stable.ride:", aT], " ")
190190
191191
192192 let aV = addressFromStringValue(aO(this, Z()))
193193
194194 let aW = {
195195 let aX = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
196196 if ($isInstanceOf(aX, "Int"))
197197 then aX
198198 else throw(($getType(aX) + " couldn't be cast to Int"))
199199 }
200200
201201 let aY = {
202202 let aX = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
203203 if ($isInstanceOf(aX, "Int"))
204204 then aX
205205 else throw(($getType(aX) + " couldn't be cast to Int"))
206206 }
207207
208208 let aZ = aO(this, am())
209209
210210 func ba () = valueOrElse(getBoolean(aV, aE()), false)
211211
212212
213213 func bb () = fromBase58String(aO(aV, ay()))
214214
215215
216216 let bc = addressFromStringValue(aO(aV, aG()))
217217
218218 func bd () = {
219219 let be = aO(this, ak())
220220 let bf = aO(this, al())
221221 let bg = aR(aV, aC(bf))
222222 let aA = aR(aV, aC(be))
223223 split(aO(aV, az(toString(aA), toString(bg))), o)
224224 }
225225
226226
227227 func bh (bi) = if ((bi == k))
228228 then unit
229229 else fromBase58String(bi)
230230
231231
232232 func bj (bi) = if ((bi == unit))
233233 then k
234234 else toBase58String(value(bi))
235235
236236
237-func bk (bl) = $Tuple9(addressFromStringValue(bl[u]), parseIntValue(bl[v]), fromBase58String(bl[w]), bh(bl[x]), bh(bl[y]), parseIntValue(bl[z]), parseIntValue(bl[A]), fromBase58String(bl[B]), fromBase58String(bl[C]))
237+func bk (bl) = $Tuple7(addressFromStringValue(bl[u]), parseIntValue(bl[v]), fromBase58String(bl[w]), bh(bl[x]), bh(bl[y]), parseIntValue(bl[z]), parseIntValue(bl[A]))
238238
239239
240240 let bm = bk(bd())
241241
242242 let bn = bm
243243
244244 let bo = bn._1
245245
246246 let bp = bn._2
247247
248248 let bq = bn._3
249249
250250 let br = bn._4
251251
252252 let bs = bn._5
253253
254254 let bt = bn._6
255255
256256 let bu = bn._7
257257
258-let bv = bn._8
259-
260-let bw = bn._9
261-
262-func bx () = split(aO(aV, ax()), o)
258+func bv () = split(aO(aV, ax()), o)
263259
264260
265-let by = bx()
261+let bw = bv()
266262
267-let bz = valueOrErrorMessage(addressFromString(by[D]), "Invalid staking contract address")
263+let bx = valueOrErrorMessage(addressFromString(bw[D]), "Invalid staking contract address")
268264
269-let bA = valueOrErrorMessage(addressFromString(by[F]), "Invalid slipage contract address")
265+let by = valueOrErrorMessage(addressFromString(bw[F]), "Invalid slipage contract address")
270266
271-let bB = valueOrErrorMessage(addressFromString(by[G]), "Invalid gwx contract address")
267+let bz = valueOrErrorMessage(addressFromString(bw[G]), "Invalid gwx contract address")
272268
273-let bC = valueOrErrorMessage(addressFromString(by[E]), "Invalid gwx contract address")
269+let bA = valueOrErrorMessage(addressFromString(bw[E]), "Invalid gwx contract address")
274270
275-func bD (bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN)], o)
271+func bB (bC,bD,bE,bF,bG,bH,bI,bJ,bK,bL) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL)], o)
276272
277273
278-func bO (bP,bQ,bR,bH,bK,bL) = makeString(["%d%d%d%d%d%d", toString(bP), toString(bQ), toString(bR), toString(bH), toString(bK), toString(bL)], o)
274+func bM (bN,bO,bP,bF,bI,bJ) = makeString(["%d%d%d%d%d%d", toString(bN), toString(bO), toString(bP), toString(bF), toString(bI), toString(bJ)], o)
279275
280276
281-func bS (bT) = if ((bT == "WAVES"))
277+func bQ (bR) = if ((bR == "WAVES"))
282278 then wavesBalance(this).available
283- else assetBalance(this, fromBase58String(bT))
279+ else assetBalance(this, fromBase58String(bR))
284280
285281
286-func bU (bV,bW) = fraction(bV, c, bW)
282+func bS (bT,bU) = fraction(bT, c, bU)
287283
288284
289-func bX (bV,bW,Q) = fraction(bV, c, bW, Q)
285+func bV (bT,bU,Q) = fraction(bT, c, bU, Q)
290286
291287
292-func bY (bZ,ca,cb) = {
293- let cc = fraction((bZ - ca), b, ca)
294- let cd = ((cb - X(cc)) > d)
295- if (!(cd))
296- then throw(("Big slpg: " + toString(cc)))
297- else $Tuple2(cd, min([bZ, ca]))
288+func bW (bX,bY,bZ) = {
289+ let ca = fraction((bX - bY), b, bY)
290+ let cb = ((bZ - X(ca)) > d)
291+ if (!(cb))
292+ then throw(("Big slpg: " + toString(ca)))
293+ else $Tuple2(cb, min([bX, bY]))
298294 }
299295
300296
301-func ce (cf,cg,ch) = {
302- let cc = fraction(cg, b, cf)
303- let ci = (ch > cc)
304- if (if (ci)
297+func cc (cd,ce,cf) = {
298+ let ca = fraction(ce, b, cd)
299+ let cg = (cf > ca)
300+ if (if (cg)
305301 then true
306- else (cg > cf))
307- then throw(((((((toString(cg) + " ") + toString(cf)) + " ") + toString(cc)) + " ") + toString(ch)))
308- else ci
302+ else (ce > cd))
303+ then throw(((((((toString(ce) + " ") + toString(cd)) + " ") + toString(ca)) + " ") + toString(cf)))
304+ else cg
309305 }
310306
311307
312-func cj (ck,cl,cm,cn) = {
313- let co = I(cm, ck)
314- let cp = I(cn, cl)
315- bU(cp, co)
308+func ch (ci,cj,ck,cl) = {
309+ let cm = I(ck, ci)
310+ let cn = I(cl, cj)
311+ bS(cn, cm)
316312 }
317313
318314
319-func cq (cm,cn,cr) = {
320- let cs = bt
321- let ct = bu
322- let cu = cj(cs, ct, cm, cn)
323- let bW = I(cm, cs)
324- let bV = I(cn, ct)
325- let cv = I(cr, a)
326- let cw = bU(bW, cv)
327- let cx = bU(bV, cv)
328-[cu, cw, cx]
315+func co (ck,cl,cp) = {
316+ let cq = bt
317+ let cr = bu
318+ let cs = ch(cq, cr, ck, cl)
319+ let bU = I(ck, cq)
320+ let bT = I(cl, cr)
321+ let ct = I(cp, a)
322+ let cu = bS(bU, ct)
323+ let cv = bS(bT, ct)
324+[cs, cu, cv]
329325 }
330326
331327
332-func cy (cm,cn,cr) = {
333- let cz = cq(cm, cn, cr)
334-[M(cz[0], a), M(cz[1], a), M(cz[2], a)]
328+func cw (ck,cl,cp) = {
329+ let cx = co(ck, cl, cp)
330+[M(cx[0], a), M(cx[1], a), M(cx[2], a)]
335331 }
336332
337333
338-func cA (cB,ar) = {
339- let cC = if ((ar == 0))
334+func cy (cz,ar) = {
335+ let cA = if ((ar == 0))
340336 then 0
341- else fraction(cB, ar, a)
342- $Tuple2((cB - cC), cC)
337+ else fraction(cz, ar, a)
338+ $Tuple2((cz - cA), cA)
343339 }
344340
345341
346-func cD (cE) = {
347- let cF = cE[0]
348- let cG = cE[1]
349- let cH = (cF + cG)
350- if ((cH == e))
342+func cB (cC) = {
343+ let cD = cC[0]
344+ let cE = cC[1]
345+ let cF = (cD + cE)
346+ if ((cF == e))
351347 then e
352348 else {
353- let cI = parseIntValue(aZ)
354- let cJ = (cI * 2)
355- let cz = fraction(cF, cG, f)
356- let cK = fraction(cz, i, f)
357- let cL = fraction(toBigInt(cJ), cH, f)
358- let cM = toBigInt((cJ - 1))
359- func cN (cO) = {
360- let cP = fraction(cO, cO, f)
361- let cQ = fraction(cP, cO, f)
362- let cR = fraction(cQ, f, cK)
363- fraction((cL + fraction(cR, g, f)), cO, (fraction(cM, cO, f) + fraction(h, cR, f)))
349+ let cG = parseIntValue(aZ)
350+ let cH = (cG * 2)
351+ let cx = fraction(cD, cE, f)
352+ let cI = fraction(cx, i, f)
353+ let cJ = fraction(toBigInt(cH), cF, f)
354+ let cK = toBigInt((cH - 1))
355+ func cL (cM) = {
356+ let cN = fraction(cM, cM, f)
357+ let cO = fraction(cN, cM, f)
358+ let cP = fraction(cO, f, cI)
359+ fraction((cJ + fraction(cP, g, f)), cM, (fraction(cK, cM, f) + fraction(h, cP, f)))
364360 }
365361
366- func cS (cT,cU) = if (cT._2)
367- then cT
362+ func cQ (cR,cS) = if (cR._2)
363+ then cR
368364 else {
369- let cO = cT._1
370- let cV = cN(cO)
371- let cW = (cV - value(cO))
372- let cX = if ((e > cW))
373- then -(cW)
374- else cW
375- if ((f >= cX))
376- then $Tuple2(cV, true)
377- else $Tuple2(cV, false)
365+ let cM = cR._1
366+ let cT = cL(cM)
367+ let cU = (cT - value(cM))
368+ let cV = if ((e > cU))
369+ then -(cU)
370+ else cU
371+ if ((f >= cV))
372+ then $Tuple2(cT, true)
373+ else $Tuple2(cT, false)
378374 }
379375
380- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
381- let cZ = {
382- let da = cY
383- let db = size(da)
384- let dc = $Tuple2(cH, false)
385- func dd (de,df) = if ((df >= db))
386- then de
387- else cS(de, da[df])
376+ let cW = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
377+ let cX = {
378+ let cY = cW
379+ let cZ = size(cY)
380+ let da = $Tuple2(cF, false)
381+ func db (dc,dd) = if ((dd >= cZ))
382+ then dc
383+ else cQ(dc, cY[dd])
388384
389- func dg (de,df) = if ((df >= db))
390- then de
385+ func de (dc,dd) = if ((dd >= cZ))
386+ then dc
391387 else throw("List size exceeds 17")
392388
393- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
389+ de(db(db(db(db(db(db(db(db(db(db(db(db(db(db(db(db(db(da, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
394390 }
395- let cO = cZ._1
396- let dh = cZ._2
397- if (dh)
398- then cO
399- else throw(("D calculation error, D = " + toString(cO)))
391+ let cM = cX._1
392+ let df = cX._2
393+ if (df)
394+ then cM
395+ else throw(("D calculation error, D = " + toString(cM)))
400396 }
401397 }
402398
403399
404-func di (dj,dk,dl,dm) = {
405- let dn = bq
406- let do = toBase58String(value(br))
407- let dp = toBase58String(value(bs))
408- let dq = bt
409- let dr = bu
410- let ds = toString(bp)
411- let dt = valueOrErrorMessage(assetInfo(dn), "Wrong LP id").quantity
412- if ((toBase58String(dn) != dk))
400+func dg (dh,di,dj,dk) = {
401+ let dl = bq
402+ let dm = toBase58String(value(br))
403+ let dn = toBase58String(value(bs))
404+ let do = bt
405+ let dp = bu
406+ let dq = toString(bp)
407+ let dr = valueOrErrorMessage(assetInfo(dl), "Wrong LP id").quantity
408+ if ((toBase58String(dl) != di))
413409 then throw("Wrong pmt asset")
414410 else {
415- let du = bS(do)
416- let dv = I(du, dq)
417- let dw = bS(dp)
418- let dx = I(dw, dr)
419- let dy = bU(dx, dv)
420- let dz = M(dy, a)
421- let dA = I(dl, a)
422- let dB = I(dt, a)
423- let dC = fraction(dv, dA, dB)
424- let dD = fraction(dx, dA, dB)
425- let dE = P(dC, dq, FLOOR)
426- let dF = P(dD, dr, FLOOR)
427- let dG = if ((dj == ""))
411+ let ds = bQ(dm)
412+ let dt = I(ds, do)
413+ let du = bQ(dn)
414+ let dv = I(du, dp)
415+ let dw = bS(dv, dt)
416+ let dx = M(dw, a)
417+ let dy = I(dj, a)
418+ let dz = I(dr, a)
419+ let dA = fraction(dt, dy, dz)
420+ let dB = fraction(dv, dy, dz)
421+ let dC = P(dA, do, FLOOR)
422+ let dD = P(dB, dp, FLOOR)
423+ let dE = if ((dh == ""))
428424 then nil
429- else [ScriptTransfer(dm, dE, if ((do == "WAVES"))
425+ else [ScriptTransfer(dk, dC, if ((dm == "WAVES"))
430426 then unit
431- else fromBase58String(do)), ScriptTransfer(dm, dF, if ((dp == "WAVES"))
427+ else fromBase58String(dm)), ScriptTransfer(dk, dD, if ((dn == "WAVES"))
432428 then unit
433- else fromBase58String(dp)), StringEntry(aj(toString(dm), dj), bO(dE, dF, dl, dz, height, lastBlock.timestamp)), IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz)]
434- $Tuple10(dE, dF, do, dp, du, dw, dt, dy, ds, dG)
429+ else fromBase58String(dn)), StringEntry(aj(toString(dk), dh), bM(dC, dD, dj, dx, height, lastBlock.timestamp)), IntegerEntry(ac(), dx), IntegerEntry(ad(height, lastBlock.timestamp), dx)]
430+ $Tuple10(dC, dD, dm, dn, ds, du, dr, dw, dq, dE)
435431 }
436432 }
437433
438434
439-func dH (dj,cb,dI,dJ,dK,dL,dm,dM,dN,dO,dP,dQ,dR) = {
440- let dn = bq
441- let dS = toBase58String(value(br))
442- let dT = toBase58String(value(bs))
443- let dU = bv
444- let dV = bw
445- let dW = bt
446- let dX = bu
447- let ds = toString(bp)
448- let dY = valueOrErrorMessage(assetInfo(dn), "Wr lp as").quantity
449- let du = if (dM)
450- then bS(dS)
451- else if (if (dO)
452- then (dR == dS)
435+func dF (dh,bZ,dG,dH,dI,dJ,dk,dK,dL,dM,dN,dO,dP) = {
436+ let dl = bq
437+ let dQ = toBase58String(value(br))
438+ let dR = toBase58String(value(bs))
439+ let dS = bt
440+ let dT = bu
441+ let dq = toString(bp)
442+ let dU = valueOrErrorMessage(assetInfo(dl), "Wr lp as").quantity
443+ let ds = if (dK)
444+ then bQ(dQ)
445+ else if (if (dM)
446+ then (dP == dQ)
453447 else false)
454- then (bS(dS) - dQ)
455- else if (dO)
456- then bS(dS)
457- else (bS(dS) - dI)
458- let dw = if (dM)
459- then bS(dT)
460- else if (if (dO)
461- then (dR == dT)
448+ then (bQ(dQ) - dO)
449+ else if (dM)
450+ then bQ(dQ)
451+ else (bQ(dQ) - dG)
452+ let du = if (dK)
453+ then bQ(dR)
454+ else if (if (dM)
455+ then (dP == dR)
462456 else false)
463- then (bS(dT) - dQ)
464- else if (dO)
465- then bS(dT)
466- else (bS(dT) - dK)
467- let dZ = I(dI, dW)
468- let ea = I(dK, dX)
469- let eb = bU(ea, dZ)
470- let dv = I(du, dW)
471- let dx = I(dw, dX)
472- let cg = cD([dv, dx])
473- let ec = if ((dY == 0))
457+ then (bQ(dR) - dO)
458+ else if (dM)
459+ then bQ(dR)
460+ else (bQ(dR) - dI)
461+ let dV = I(dG, dS)
462+ let dW = I(dI, dT)
463+ let dX = bS(dW, dV)
464+ let dt = I(ds, dS)
465+ let dv = I(du, dT)
466+ let ce = cB([dt, dv])
467+ let dY = if ((dU == 0))
474468 then {
475- let cf = cD([(dv + dZ), (dx + ea)])
476- let ed = if ((cf > cg))
469+ let cd = cB([(dt + dV), (dv + dW)])
470+ let dZ = if ((cd > ce))
477471 then true
478472 else throw("D1 should be greater than D0")
479- if ((ed == ed))
473+ if ((dZ == dZ))
480474 then {
481- let dy = d
482- let ee = d
483- let cv = cf
484- $Tuple5(M(cv, a), M(dZ, dW), M(ea, dX), bU((dx + ea), (dv + dZ)), ee)
475+ let dw = d
476+ let ea = d
477+ let ct = cd
478+ $Tuple5(M(ct, a), M(dV, dS), M(dW, dT), bS((dv + dW), (dt + dV)), ea)
485479 }
486480 else throw("Strict value is not equal to itself.")
487481 }
488482 else {
489- let dy = bU(dx, dv)
490- let ef = fraction(X((dy - eb)), c, dy)
491- let ee = I(cb, a)
492- if (if (if (dP)
493- then (dy != d)
483+ let dw = bS(dv, dt)
484+ let eb = fraction(X((dw - dX)), c, dw)
485+ let ea = I(bZ, a)
486+ if (if (if (dN)
487+ then (dw != d)
494488 else false)
495- then (ef > ee)
489+ then (eb > ea)
496490 else false)
497- then throw(((("Price slippage " + toString(ef)) + " > ") + toString(ee)))
491+ then throw(((("Price slippage " + toString(eb)) + " > ") + toString(ea)))
498492 else {
499- let eg = I(dY, a)
500- let eh = fraction(dZ, bX(dx, dv, CEILING), c, CEILING)
501- let ei = fraction(ea, c, bX(dx, dv, FLOOR), CEILING)
502- let ej = if ((eh > ea))
503- then $Tuple2(ei, ea)
504- else $Tuple2(dZ, eh)
505- let ek = ej._1
506- let el = ej._2
507- let cf = cD([(dv + ek), (dx + el)])
508- let ed = if ((cf > cg))
493+ let ec = I(dU, a)
494+ let ed = fraction(dV, bV(dv, dt, CEILING), c, CEILING)
495+ let ee = fraction(dW, c, bV(dv, dt, FLOOR), CEILING)
496+ let ef = if ((ed > dW))
497+ then $Tuple2(ee, dW)
498+ else $Tuple2(dV, ed)
499+ let eg = ef._1
500+ let eh = ef._2
501+ let cd = cB([(dt + eg), (dv + eh)])
502+ let dZ = if ((cd > ce))
509503 then true
510504 else throw("D1 should be greater than D0")
511- if ((ed == ed))
505+ if ((dZ == dZ))
512506 then {
513- let cv = fraction(eg, (cf - cg), cg)
514- $Tuple5(P(cv, a, FLOOR), P(ek, dW, CEILING), P(el, dX, CEILING), dy, ee)
507+ let ct = fraction(ec, (cd - ce), ce)
508+ $Tuple5(P(ct, a, FLOOR), P(eg, dS, CEILING), P(eh, dT, CEILING), dw, ea)
515509 }
516510 else throw("Strict value is not equal to itself.")
517511 }
518512 }
519- let em = ec._1
520- let en = ec._2
521- let eo = ec._3
522- let dz = M(ec._4, a)
523- let ep = M(ec._5, a)
524- if ((0 >= em))
513+ let ei = dY._1
514+ let ej = dY._2
515+ let ek = dY._3
516+ let dx = M(dY._4, a)
517+ let el = M(dY._5, a)
518+ if ((0 >= ei))
525519 then throw("LP <= 0")
526520 else {
527- let eq = if (!(dN))
521+ let em = if (!(dL))
528522 then 0
529- else em
530- let er = (dI - en)
531- let es = (dK - eo)
532- let et = if (if (dO)
533- then (dR == dS)
523+ else ei
524+ let en = (dG - ej)
525+ let eo = (dI - ek)
526+ let ep = if (if (dM)
527+ then (dP == dQ)
534528 else false)
535- then $Tuple2(dQ, 0)
536- else if (if (dO)
537- then (dR == dT)
529+ then $Tuple2(dO, 0)
530+ else if (if (dM)
531+ then (dP == dR)
538532 else false)
539- then $Tuple2(0, dQ)
540- else $Tuple2(en, eo)
541- let eu = et._1
542- let ev = et._2
543- let ew = [IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz), StringEntry(ag(dm, dj), bD(eu, ev, eq, dz, cb, ep, height, lastBlock.timestamp, er, es))]
544- $Tuple13(em, eq, dz, du, dw, dY, dn, ds, ew, er, es, dJ, dL)
533+ then $Tuple2(0, dO)
534+ else $Tuple2(ej, ek)
535+ let eq = ep._1
536+ let er = ep._2
537+ let es = [IntegerEntry(ac(), dx), IntegerEntry(ad(height, lastBlock.timestamp), dx), StringEntry(ag(dk, dh), bB(eq, er, em, dx, bZ, el, height, lastBlock.timestamp, en, eo))]
538+ $Tuple13(ei, em, dx, ds, du, dU, dl, dq, es, en, eo, dH, dJ)
545539 }
546540 }
547541
548542
549-func ex (cE,cU,ey) = {
550- let ez = g
551- let eA = cE[if ((cU == 0))
543+func et (cC,cS,eu) = {
544+ let ev = g
545+ let ew = cC[if ((cS == 0))
552546 then 1
553547 else 0]
554- let eB = parseBigIntValue(m)
555- let cI = (parseBigIntValue(aZ) * eB)
556- let cH = eA
557- let cJ = (cI * ez)
558- let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
559- let eD = ((cH + ((ey * eB) / cJ)) - ey)
560- func cS (cT,eE) = {
561- let eF = cT
562- let eG = eF._1
563- let dh = eF._2
564- if ((dh != unit))
565- then cT
548+ let ex = parseBigIntValue(m)
549+ let cG = (parseBigIntValue(aZ) * ex)
550+ let cF = ew
551+ let cH = (cG * ev)
552+ let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cH * ev))
553+ let ez = ((cF + ((eu * ex) / cH)) - eu)
554+ func cQ (cR,eA) = {
555+ let eB = cR
556+ let eC = eB._1
557+ let df = eB._2
558+ if ((df != unit))
559+ then cR
566560 else {
567- let eH = (((eG * eG) + eC) / ((g * eG) + eD))
568- let eI = Y((eH - value(eG)))
569- if ((f >= eI))
570- then $Tuple2(eH, eE)
571- else $Tuple2(eH, unit)
561+ let eD = (((eC * eC) + ey) / ((g * eC) + ez))
562+ let eE = Y((eD - value(eC)))
563+ if ((f >= eE))
564+ then $Tuple2(eD, eA)
565+ else $Tuple2(eD, unit)
572566 }
573567 }
574568
575- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
576- let eJ = {
577- let da = cY
578- let db = size(da)
579- let dc = $Tuple2(ey, unit)
580- func dd (de,df) = if ((df >= db))
581- then de
582- else cS(de, da[df])
569+ let cW = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
570+ let eF = {
571+ let cY = cW
572+ let cZ = size(cY)
573+ let da = $Tuple2(eu, unit)
574+ func db (dc,dd) = if ((dd >= cZ))
575+ then dc
576+ else cQ(dc, cY[dd])
583577
584- func dg (de,df) = if ((df >= db))
585- then de
578+ func de (dc,dd) = if ((dd >= cZ))
579+ then dc
586580 else throw("List size exceeds 15")
587581
588- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
582+ de(db(db(db(db(db(db(db(db(db(db(db(db(db(db(db(da, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
589583 }
590- let eG = eJ._1
591- let dh = eJ._2
592- if ((dh != unit))
593- then eG
594- else throw(("Y calculation error, Y = " + toString(eG)))
584+ let eC = eF._1
585+ let df = eF._2
586+ if ((df != unit))
587+ then eC
588+ else throw(("Y calculation error, Y = " + toString(eC)))
595589 }
596590
597591
598-func eK (eL,eM,eN) = {
599- let eO = fraction(cD([L(eL, toBigInt(bt)), L(eM, toBigInt(bu))]), c, eN)
600- if ((eN == e))
592+func eG (eH,eI,eJ) = {
593+ let eK = fraction(cB([L(eH, toBigInt(bt)), L(eI, toBigInt(bu))]), c, eJ)
594+ if ((eJ == e))
601595 then e
602- else eO
596+ else eK
603597 }
604598
605599
606-func eP (eQ,eR,eS) = {
607- let eT = (toBigInt(bS(bj(br))) - eQ)
608- let eU = (toBigInt(bS(bj(bs))) - eR)
609- let eV = (toBigInt(value(assetInfo(bq)).quantity) - eS)
610- let eW = eK(eT, eU, eV)
611- eW
600+func eL (eM,eN,eO) = {
601+ let eP = (toBigInt(bQ(bj(br))) - eM)
602+ let eQ = (toBigInt(bQ(bj(bs))) - eN)
603+ let eR = (toBigInt(value(assetInfo(bq)).quantity) - eO)
604+ let eS = eG(eP, eQ, eR)
605+ eS
612606 }
613607
614608
615-func eX (eY,eZ,eS) = {
616- let eT = (bS(bj(br)) + eY)
617- let eU = (bS(bj(bs)) + eZ)
618- let eV = (value(assetInfo(bq)).quantity + eS)
619- let eO = eK(toBigInt(eT), toBigInt(eU), toBigInt(eV))
620- let fa = [IntegerEntry(at, height), StringEntry(as, toString(eO))]
621- $Tuple2(fa, eO)
609+func eT (eU,eV,eO) = {
610+ let eP = (bQ(bj(br)) + eU)
611+ let eQ = (bQ(bj(bs)) + eV)
612+ let eR = (value(assetInfo(bq)).quantity + eO)
613+ let eK = eG(toBigInt(eP), toBigInt(eQ), toBigInt(eR))
614+ let eW = [IntegerEntry(at, height), StringEntry(as, toString(eK))]
615+ $Tuple2(eW, eK)
622616 }
623617
624618
625-func fb (fc,eO) = if ((eO >= fc))
619+func eX (eY,eK) = if ((eK >= eY))
626620 then true
627621 else aS("updated DLp lower than current DLp")
628622
629623
630-func fd (fe) = {
631- let eT = bS(bj(br))
632- let eU = bS(bj(bs))
633- let ff = fe.amount
634- let fg = fraction(fe.amount, fe.price, a, FLOOR)
635- let fh = if ((fe.orderType == Buy))
636- then $Tuple2(ff, -(fg))
637- else $Tuple2(-(ff), fg)
638- let eY = fh._1
639- let eZ = fh._2
624+func eZ (fa) = {
625+ let eP = bQ(bj(br))
626+ let eQ = bQ(bj(bs))
627+ let fb = fa.amount
628+ let fc = fraction(fa.amount, fa.price, a, FLOOR)
629+ let fd = if ((fa.orderType == Buy))
630+ then $Tuple2(fb, -(fc))
631+ else $Tuple2(-(fb), fc)
632+ let eU = fd._1
633+ let eV = fd._2
640634 if (if (if (ba())
641635 then true
642636 else (bp == s))
643637 then true
644638 else (bp == t))
645639 then throw("Admin blocked")
646- else if (if ((fe.assetPair.amountAsset != br))
640+ else if (if ((fa.assetPair.amountAsset != br))
647641 then true
648- else (fe.assetPair.priceAsset != bs))
642+ else (fa.assetPair.priceAsset != bs))
649643 then throw("Wr assets")
650644 else {
651- let fi = parseBigIntValue(valueOrElse(getString(this, as), "0"))
652- let fj = eX(eY, eZ, 0)
653- let fk = fj._1
654- let fl = fj._2
655- let fm = (fl >= fi)
656- let fn = makeString(["dLp=", toString(fi), " dLpNew=", toString(fl), " amountAssetBalance=", toString(eT), " priceAssetBalance=", toString(eU), " amountAssetBalanceDelta=", toString(eY), " priceAssetBalanceDelta=", toString(eZ), " height=", toString(height)], "")
657- $Tuple2(fm, fn)
645+ let fe = parseBigIntValue(valueOrElse(getString(this, as), "0"))
646+ let ff = eT(eU, eV, 0)
647+ let fg = ff._1
648+ let fh = ff._2
649+ let fi = (fh >= fe)
650+ let fj = makeString(["dLp=", toString(fe), " dLpNew=", toString(fh), " amountAssetBalance=", toString(eP), " priceAssetBalance=", toString(eQ), " amountAssetBalanceDelta=", toString(eU), " priceAssetBalanceDelta=", toString(eV), " height=", toString(height)], "")
651+ $Tuple2(fi, fj)
658652 }
659653 }
660654
661655
662-func fo (cU) = if ((size(cU.payments) != 1))
656+func fk (cS) = if ((size(cS.payments) != 1))
663657 then throw("1 pmnt exp")
664658 else {
665- let fp = value(cU.payments[0])
666- let dk = value(fp.assetId)
667- let dQ = fp.amount
668- let ec = di(toBase58String(cU.transactionId), toBase58String(dk), dQ, cU.caller)
669- let dE = ec._1
670- let dF = ec._2
671- let ds = parseIntValue(ec._9)
672- let dG = ec._10
659+ let fl = value(cS.payments[0])
660+ let di = value(fl.assetId)
661+ let dO = fl.amount
662+ let dY = dg(toBase58String(cS.transactionId), toBase58String(di), dO, cS.caller)
663+ let dC = dY._1
664+ let dD = dY._2
665+ let dq = parseIntValue(dY._9)
666+ let dE = dY._10
673667 if (if (ba())
674668 then true
675- else (ds == t))
676- then throw(("Admin blocked: " + toString(ds)))
677- else $Tuple5(dE, dF, dQ, dk, dG)
669+ else (dq == t))
670+ then throw(("Admin blocked: " + toString(dq)))
671+ else $Tuple5(dC, dD, dO, di, dE)
678672 }
679673
680674
681-func fq (fr,ai,fs,ft,cb,dN,dO,dP,dQ,dR) = {
682- let ec = dH(ai, cb, value(fs).amount, value(fs).assetId, value(ft).amount, value(ft).assetId, fr, (ai == ""), dN, dO, dP, dQ, dR)
683- let ds = parseIntValue(ec._8)
675+func fm (fn,ai,fo,fp,bZ,dL,dM,dN,dO,dP) = {
676+ let dY = dF(ai, bZ, value(fo).amount, value(fo).assetId, value(fp).amount, value(fp).assetId, fn, (ai == ""), dL, dM, dN, dO, dP)
677+ let dq = parseIntValue(dY._8)
684678 if (if (if (ba())
685679 then true
686- else (ds == r))
680+ else (dq == r))
687681 then true
688- else (ds == t))
689- then throw(("Blocked:" + toString(ds)))
690- else ec
682+ else (dq == t))
683+ then throw(("Blocked:" + toString(dq)))
684+ else dY
691685 }
692686
693687
694-func fu (fv,dk,dm,ai,fw) = {
695- let do = toBase58String(value(br))
696- let dp = toBase58String(value(bs))
697- let dn = bq
698- let dW = bt
699- let dX = bu
700- let eV = toBigInt(valueOrErrorMessage(assetInfo(dn), "invalid lp asset").quantity)
701- let fx = if ((eV > e))
688+func fq (fr,di,dk,ai,fs) = {
689+ let dm = toBase58String(value(br))
690+ let dn = toBase58String(value(bs))
691+ let dl = bq
692+ let dS = bt
693+ let dT = bu
694+ let eR = toBigInt(valueOrErrorMessage(assetInfo(dl), "invalid lp asset").quantity)
695+ let ft = if ((eR > e))
702696 then true
703697 else throw("initial deposit requires all coins")
704- if ((fx == fx))
698+ if ((ft == ft))
705699 then {
706- let du = bS(do)
707- let dw = bS(dp)
708- let fy = if ((ai == ""))
709- then $Tuple2(du, dw)
710- else if ((dk == do))
711- then if ((fv > du))
700+ let ds = bQ(dm)
701+ let du = bQ(dn)
702+ let fu = if ((ai == ""))
703+ then $Tuple2(ds, du)
704+ else if ((di == dm))
705+ then if ((fr > ds))
712706 then throw("invalid payment amount")
713- else $Tuple2((du - fv), dw)
714- else if ((dk == dp))
715- then if ((fv > dw))
707+ else $Tuple2((ds - fr), du)
708+ else if ((di == dn))
709+ then if ((fr > du))
716710 then throw("invalid payment amount")
717- else $Tuple2(du, (dw - fv))
711+ else $Tuple2(ds, (du - fr))
718712 else throw("wrong pmtAssetId")
719- let fz = fy._1
720- let fA = fy._2
721- let fB = if ((dk == do))
722- then $Tuple2(fv, 0)
723- else if ((dk == dp))
724- then $Tuple2(0, fv)
713+ let fv = fu._1
714+ let fw = fu._2
715+ let fx = if ((di == dm))
716+ then $Tuple2(fr, 0)
717+ else if ((di == dn))
718+ then $Tuple2(0, fr)
725719 else throw("invalid payment")
726- let fC = fB._1
727- let fD = fB._2
728- let fE = if (fw)
729- then $Tuple3(cA(fC, aW)._1, cA(fD, aW)._1, cA(fv, aW)._2)
730- else $Tuple3(fC, fD, 0)
731- let fF = fE._1
732- let fG = fE._2
733- let cC = fE._3
734- let fH = (fz + fF)
735- let fI = (fA + fG)
736- let cg = cD([I(fz, bt), I(fA, bu)])
737- let cf = cD([I(fH, bt), I(fI, bu)])
738- let ed = if ((cf > cg))
720+ let fy = fx._1
721+ let fz = fx._2
722+ let fA = if (fs)
723+ then $Tuple3(cy(fy, aW)._1, cy(fz, aW)._1, cy(fr, aW)._2)
724+ else $Tuple3(fy, fz, 0)
725+ let fB = fA._1
726+ let fC = fA._2
727+ let cA = fA._3
728+ let fD = (fv + fB)
729+ let fE = (fw + fC)
730+ let ce = cB([I(fv, bt), I(fw, bu)])
731+ let cd = cB([I(fD, bt), I(fE, bu)])
732+ let dZ = if ((cd > ce))
739733 then true
740734 else throw()
741- if ((ed == ed))
735+ if ((dZ == dZ))
742736 then {
743- let fJ = fraction(eV, (cf - cg), cg, FLOOR)
744- let dz = M(bU(I(fI, dX), I(fH, dW)), a)
745- let ew = [IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz), StringEntry(ag(dm, ai), bD(fC, fD, toInt(fJ), dz, 0, 0, height, lastBlock.timestamp, 0, 0))]
746- let fK = fraction(fA, a, fz)
747- let fL = fraction(fv, a, (fK + a))
748- let fM = (fv - fL)
749- let fN = fraction(eV, toBigInt(fM), toBigInt(fA))
750- let fO = toInt(fraction((fJ - fN), b, fN))
751- $Tuple4(toInt(fJ), ew, cC, fO)
737+ let fF = fraction(eR, (cd - ce), ce, FLOOR)
738+ let dx = M(bS(I(fE, dT), I(fD, dS)), a)
739+ let es = [IntegerEntry(ac(), dx), IntegerEntry(ad(height, lastBlock.timestamp), dx), StringEntry(ag(dk, ai), bB(fy, fz, toInt(fF), dx, 0, 0, height, lastBlock.timestamp, 0, 0))]
740+ let fG = fraction(fw, a, fv)
741+ let fH = fraction(fr, a, (fG + a))
742+ let fI = (fr - fH)
743+ let fJ = fraction(eR, toBigInt(fI), toBigInt(fw))
744+ let fK = toInt(fraction((fF - fJ), b, fJ))
745+ $Tuple4(toInt(fF), es, cA, fK)
752746 }
753747 else throw("Strict value is not equal to itself.")
754748 }
755749 else throw("Strict value is not equal to itself.")
756750 }
757751
758752
759-func fP (fQ,fR,fS,fr,fT,fU) = {
760- let dn = toBase58String(value(bq))
761- let do = toBase58String(value(br))
762- let dp = toBase58String(value(bs))
763- let fV = bt
764- let fW = bu
765- let fX = bp
766- let dm = if ((fr == bC))
767- then fT
768- else fr
769- let fp = value(fS[0])
770- let dk = value(fp.assetId)
771- let dQ = fp.amount
772- let eW = eP(e, e, e)
773- if ((eW == eW))
753+func fL (fM,fN,fO,fn,fP,fQ) = {
754+ let dl = toBase58String(value(bq))
755+ let dm = toBase58String(value(br))
756+ let dn = toBase58String(value(bs))
757+ let fR = bt
758+ let fS = bu
759+ let fT = bp
760+ let dk = if ((fn == bA))
761+ then fP
762+ else fn
763+ let fl = value(fO[0])
764+ let di = value(fl.assetId)
765+ let dO = fl.amount
766+ let eS = eL(e, e, e)
767+ if ((eS == eS))
774768 then {
775- let dj = toBase58String(fU)
776- if ((dn != toBase58String(dk)))
769+ let dh = toBase58String(fQ)
770+ if ((dl != toBase58String(di)))
777771 then throw("Wrong LP")
778772 else {
779- let du = bS(do)
780- let dw = bS(dp)
781- let fY = {
782- let aX = invoke(this, "getOneTknV2READONLY", [fQ, dQ], nil)
773+ let ds = bQ(dm)
774+ let du = bQ(dn)
775+ let fU = {
776+ let aX = invoke(this, "getOneTknV2READONLY", [fM, dO], nil)
783777 if ($isInstanceOf(aX, "(Int, Int)"))
784778 then aX
785779 else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
786780 }
787- if ((fY == fY))
781+ if ((fU == fU))
788782 then {
789- let cC = fY._2
790- let fZ = fY._1
791- let ga = if (if ((fR > 0))
792- then (fR > fZ)
783+ let cA = fU._2
784+ let fV = fU._1
785+ let fW = if (if ((fN > 0))
786+ then (fN > fV)
793787 else false)
794- then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
795- else fZ
796- let gb = if ((fQ == do))
797- then $Tuple4(ga, 0, ((du - ga) - cC), dw)
798- else if ((fQ == dp))
799- then $Tuple4(0, ga, du, ((dw - ga) - cC))
788+ then aS(makeString(["amount to receive is less than ", toString(fN)], ""))
789+ else fV
790+ let fX = if ((fM == dm))
791+ then $Tuple4(fW, 0, ((ds - fW) - cA), du)
792+ else if ((fM == dn))
793+ then $Tuple4(0, fW, ds, ((du - fW) - cA))
800794 else throw("invalid out asset id")
801- let gc = gb._1
802- let gd = gb._2
803- let fH = gb._3
804- let fI = gb._4
805- let ge = bU(I(fI, fW), I(fH, fV))
806- let gf = M(ge, a)
807- let gg = if ((fQ == "WAVES"))
795+ let fY = fX._1
796+ let fZ = fX._2
797+ let fD = fX._3
798+ let fE = fX._4
799+ let ga = bS(I(fE, fS), I(fD, fR))
800+ let gb = M(ga, a)
801+ let gc = if ((fM == "WAVES"))
808802 then unit
809- else fromBase58String(fQ)
810- let gh = if ((cC > 0))
811- then [ScriptTransfer(bc, cC, gg)]
803+ else fromBase58String(fM)
804+ let gd = if ((cA > 0))
805+ then [ScriptTransfer(bc, cA, gc)]
812806 else nil
813- let dG = ([ScriptTransfer(dm, ga, gg), StringEntry(aj(toString(dm), dj), bO(gc, gd, dQ, gf, height, lastBlock.timestamp)), IntegerEntry(ac(), gf), IntegerEntry(ad(height, lastBlock.timestamp), gf)] ++ gh)
814- if ((dG == dG))
807+ let dE = ([ScriptTransfer(dk, fW, gc), StringEntry(aj(toString(dk), dh), bM(fY, fZ, dO, gb, height, lastBlock.timestamp)), IntegerEntry(ac(), gb), IntegerEntry(ad(height, lastBlock.timestamp), gb)] ++ gd)
808+ if ((dE == dE))
815809 then {
816- let gi = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
817- if ((gi == gi))
810+ let ge = invoke(aV, "burn", [dO], [AttachedPayment(di, dO)])
811+ if ((ge == ge))
818812 then {
819- let gj = {
820- let gk = if ((this == bc))
813+ let gf = {
814+ let gg = if ((this == bc))
821815 then 0
822- else cC
823- let gl = if ((bh(fQ) == br))
816+ else cA
817+ let gh = if ((bh(fM) == br))
824818 then true
825819 else false
826- if (gl)
827- then $Tuple2(-((fZ + gk)), 0)
828- else $Tuple2(0, -((fZ + gk)))
820+ if (gh)
821+ then $Tuple2(-((fV + gg)), 0)
822+ else $Tuple2(0, -((fV + gg)))
829823 }
830- let eY = gj._1
831- let eZ = gj._2
832- let gm = eX(eY, eZ, 0)
833- let gn = gm._1
834- let eO = gm._2
835- let go = fb(eW, eO)
836- if ((go == go))
837- then $Tuple2((dG ++ gn), ga)
824+ let eU = gf._1
825+ let eV = gf._2
826+ let gi = eT(eU, eV, 0)
827+ let gj = gi._1
828+ let eK = gi._2
829+ let gk = eX(eS, eK)
830+ if ((gk == gk))
831+ then $Tuple2((dE ++ gj), fW)
838832 else throw("Strict value is not equal to itself.")
839833 }
840834 else throw("Strict value is not equal to itself.")
841835 }
842836 else throw("Strict value is not equal to itself.")
843837 }
844838 else throw("Strict value is not equal to itself.")
845839 }
846840 }
847841 else throw("Strict value is not equal to itself.")
848842 }
849843
850844
851-func gp () = {
852- let gq = getString(aa())
853- if ($isInstanceOf(gq, "String"))
845+func gl () = {
846+ let gm = getString(aa())
847+ if ($isInstanceOf(gm, "String"))
854848 then {
855- let cH = gq
856- fromBase58String(cH)
849+ let cF = gm
850+ fromBase58String(cF)
857851 }
858- else if ($isInstanceOf(gq, "Unit"))
852+ else if ($isInstanceOf(gm, "Unit"))
859853 then unit
860854 else throw("Match error")
861855 }
862856
863857
864-func gr () = {
865- let gq = getString(ab())
866- if ($isInstanceOf(gq, "String"))
858+func gn () = {
859+ let gm = getString(ab())
860+ if ($isInstanceOf(gm, "String"))
867861 then {
868- let cH = gq
869- fromBase58String(cH)
862+ let cF = gm
863+ fromBase58String(cF)
870864 }
871- else if ($isInstanceOf(gq, "Unit"))
865+ else if ($isInstanceOf(gm, "Unit"))
872866 then unit
873867 else throw("Match error")
874868 }
875869
876870
877-let gs = throw("Permission denied")
871+let go = throw("Permission denied")
878872
879-func gt (cU) = {
880- let gq = gp()
881- if ($isInstanceOf(gq, "ByteVector"))
873+func gp (cS) = {
874+ let gm = gl()
875+ if ($isInstanceOf(gm, "ByteVector"))
882876 then {
883- let gu = gq
884- (cU.callerPublicKey == gu)
877+ let gq = gm
878+ (cS.callerPublicKey == gq)
885879 }
886- else if ($isInstanceOf(gq, "Unit"))
887- then (cU.caller == this)
880+ else if ($isInstanceOf(gm, "Unit"))
881+ then (cS.caller == this)
888882 else throw("Match error")
889883 }
890884
891885
892-func gv (cU) = {
893- let gq = gp()
894- if ($isInstanceOf(gq, "ByteVector"))
886+func gr (cS) = {
887+ let gm = gl()
888+ if ($isInstanceOf(gm, "ByteVector"))
895889 then {
896- let gu = gq
897- if ((cU.callerPublicKey == gu))
890+ let gq = gm
891+ if ((cS.callerPublicKey == gq))
898892 then true
899- else gs
893+ else go
900894 }
901- else if ($isInstanceOf(gq, "Unit"))
902- then if ((cU.caller == this))
895+ else if ($isInstanceOf(gm, "Unit"))
896+ then if ((cS.caller == this))
903897 then true
904- else gs
898+ else go
905899 else throw("Match error")
906900 }
907901
908902
909-func gw (gx,ey,gy) = {
903+func gs (gt,eu,gu) = {
910904 let bl = bd()
911- let do = bl[x]
912- let dp = bl[y]
913- let ez = g
914- let eB = parseBigIntValue(m)
915- let cI = (parseBigIntValue(aZ) * eB)
916- let cE = if ((gx == false))
917- then [(toBigInt(bS(do)) + gy), toBigInt(bS(dp))]
918- else [(toBigInt(bS(dp)) + gy), toBigInt(bS(do))]
919- let eA = cE[0]
920- let cH = eA
921- let cJ = (cI * ez)
922- let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
923- let eD = ((cH + ((ey * eB) / cJ)) - ey)
924- func cS (cT,eE) = {
925- let gz = cT
926- let eG = gz._1
927- let dh = gz._2
928- if ((dh != unit))
929- then cT
905+ let dm = bl[x]
906+ let dn = bl[y]
907+ let ev = g
908+ let ex = parseBigIntValue(m)
909+ let cG = (parseBigIntValue(aZ) * ex)
910+ let cC = if ((gt == false))
911+ then [(toBigInt(bQ(dm)) + gu), toBigInt(bQ(dn))]
912+ else [(toBigInt(bQ(dn)) + gu), toBigInt(bQ(dm))]
913+ let ew = cC[0]
914+ let cF = ew
915+ let cH = (cG * ev)
916+ let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cH * ev))
917+ let ez = ((cF + ((eu * ex) / cH)) - eu)
918+ func cQ (cR,eA) = {
919+ let gv = cR
920+ let eC = gv._1
921+ let df = gv._2
922+ if ((df != unit))
923+ then cR
930924 else {
931- let eH = (((eG * eG) + eC) / ((g * eG) + eD))
932- let eI = Y((eH - value(eG)))
933- if ((f >= eI))
934- then $Tuple2(eH, eE)
935- else $Tuple2(eH, unit)
925+ let eD = (((eC * eC) + ey) / ((g * eC) + ez))
926+ let eE = Y((eD - value(eC)))
927+ if ((f >= eE))
928+ then $Tuple2(eD, eA)
929+ else $Tuple2(eD, unit)
936930 }
937931 }
938932
939- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
940- let gA = {
941- let da = cY
942- let db = size(da)
943- let dc = $Tuple2(ey, unit)
944- func dd (de,df) = if ((df >= db))
945- then de
946- else cS(de, da[df])
933+ let cW = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
934+ let gw = {
935+ let cY = cW
936+ let cZ = size(cY)
937+ let da = $Tuple2(eu, unit)
938+ func db (dc,dd) = if ((dd >= cZ))
939+ then dc
940+ else cQ(dc, cY[dd])
947941
948- func dg (de,df) = if ((df >= db))
949- then de
942+ func de (dc,dd) = if ((dd >= cZ))
943+ then dc
950944 else throw("List size exceeds 15")
951945
952- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
946+ de(db(db(db(db(db(db(db(db(db(db(db(db(db(db(db(da, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
953947 }
954- let eG = gA._1
955- let dh = gA._2
956- if ((dh != unit))
957- then eG
958- else throw(("Y calculation error, Y = " + toString(eG)))
948+ let eC = gw._1
949+ let df = gw._2
950+ if ((df != unit))
951+ then eC
952+ else throw(("Y calculation error, Y = " + toString(eC)))
959953 }
960954
961955
962-func gB () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
956+func gx () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
963957
964958
965-@Callable(cU)
966-func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
967- let gE = if ((gx == false))
959+@Callable(cS)
960+func calculateAmountOutForSwapREADONLY (gy,gt,gz) = {
961+ let gA = if ((gt == false))
968962 then {
969- let gF = aO(this, al())
970- let gy = (toBigInt(bS(aO(this, ak()))) + toBigInt(gC))
971- $Tuple2(gF, gy)
963+ let gB = aO(this, al())
964+ let gu = (toBigInt(bQ(aO(this, ak()))) + toBigInt(gy))
965+ $Tuple2(gB, gu)
972966 }
973967 else {
974- let gF = aO(this, ak())
975- let gy = (toBigInt(bS(aO(this, al()))) + toBigInt(gC))
976- $Tuple2(gF, gy)
968+ let gB = aO(this, ak())
969+ let gu = (toBigInt(bQ(aO(this, al()))) + toBigInt(gy))
970+ $Tuple2(gB, gu)
977971 }
978- let gF = gE._1
979- let gy = gE._2
972+ let gB = gA._1
973+ let gu = gA._2
980974 let bl = bd()
981- let do = bl[x]
982- let dp = bl[y]
983- let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
984- let ey = cD(cE)
985- let eG = gw(gx, ey, toBigInt(gC))
986- let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
987- let gH = max([0, toInt(gG)])
988- let gI = if ((gx == false))
989- then [((toBigInt(bS(do)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
990- else [(toBigInt(bS(do)) - gG), ((toBigInt(bS(dp)) + toBigInt(gC)) + toBigInt(gD))]
991- let gJ = cD(gI)
992- let ed = if ((gJ >= ey))
975+ let dm = bl[x]
976+ let dn = bl[y]
977+ let cC = [toBigInt(bQ(dm)), toBigInt(bQ(dn))]
978+ let eu = cB(cC)
979+ let eC = gs(gt, eu, toBigInt(gy))
980+ let gC = ((toBigInt(bQ(gB)) - eC) - toBigInt(1))
981+ let gD = max([0, toInt(gC)])
982+ let gE = if ((gt == false))
983+ then [((toBigInt(bQ(dm)) + toBigInt(gy)) + toBigInt(gz)), (toBigInt(bQ(dn)) - gC)]
984+ else [(toBigInt(bQ(dm)) - gC), ((toBigInt(bQ(dn)) + toBigInt(gy)) + toBigInt(gz))]
985+ let gF = cB(gE)
986+ let dZ = if ((gF >= eu))
993987 then true
994- else throw(makeString(["new D is fewer error", toString(ey), toString(gJ)], "__"))
995- if ((ed == ed))
996- then $Tuple2(nil, gH)
988+ else throw(makeString(["new D is fewer error", toString(eu), toString(gF)], "__"))
989+ if ((dZ == dZ))
990+ then $Tuple2(nil, gD)
997991 else throw("Strict value is not equal to itself.")
998992 }
999993
1000994
1001995
1002-@Callable(cU)
1003-func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1004- let gM = {
996+@Callable(cS)
997+func calculateAmountOutForSwapAndSendTokens (gy,gt,gG,gH,gz) = {
998+ let gI = {
1005999 let aX = invoke(aV, "getSwapContractREADONLY", nil, nil)
10061000 if ($isInstanceOf(aX, "String"))
10071001 then aX
10081002 else throw(($getType(aX) + " couldn't be cast to String"))
10091003 }
1010- let gN = [if ((value(cU.payments[0]).amount >= gC))
1004+ let gJ = [if ((value(cS.payments[0]).amount >= gy))
10111005 then true
1012- else aS("Wrong amount"), if ((cU.caller == addressFromStringValue(gM)))
1006+ else aS("Wrong amount"), if ((cS.caller == addressFromStringValue(gI)))
10131007 then true
10141008 else aS("Permission denied")]
1015- if ((gN == gN))
1009+ if ((gJ == gJ))
10161010 then {
1017- let fp = value(cU.payments[0])
1018- let gO = bj(fp.assetId)
1019- let gP = if ((gx == false))
1011+ let fl = value(cS.payments[0])
1012+ let gK = bj(fl.assetId)
1013+ let gL = if ((gt == false))
10201014 then {
1021- let gF = aO(this, al())
1022- let gy = (bS(gO) - value(cU.payments[0]).amount)
1023- $Tuple2(gF, gy)
1015+ let gB = aO(this, al())
1016+ let gu = (bQ(gK) - value(cS.payments[0]).amount)
1017+ $Tuple2(gB, gu)
10241018 }
10251019 else {
1026- let gF = aO(this, ak())
1027- let gy = (bS(gO) - value(cU.payments[0]).amount)
1028- $Tuple2(gF, gy)
1020+ let gB = aO(this, ak())
1021+ let gu = (bQ(gK) - value(cS.payments[0]).amount)
1022+ $Tuple2(gB, gu)
10291023 }
1030- let gF = gP._1
1031- let gy = gP._2
1024+ let gB = gL._1
1025+ let gu = gL._2
10321026 let bl = bd()
1033- let do = bl[x]
1034- let dp = bl[y]
1035- let cE = if ((gx == false))
1036- then [(toBigInt(bS(do)) - toBigInt(value(cU.payments[0]).amount)), toBigInt(bS(dp))]
1037- else [toBigInt(bS(do)), (toBigInt(bS(dp)) - toBigInt(value(cU.payments[0]).amount))]
1038- let ey = cD(cE)
1039- let eG = gw(gx, ey, toBigInt(0))
1040- let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
1041- let gH = max([0, toInt(gG)])
1042- let gQ = if ((gH >= gK))
1027+ let dm = bl[x]
1028+ let dn = bl[y]
1029+ let cC = if ((gt == false))
1030+ then [(toBigInt(bQ(dm)) - toBigInt(value(cS.payments[0]).amount)), toBigInt(bQ(dn))]
1031+ else [toBigInt(bQ(dm)), (toBigInt(bQ(dn)) - toBigInt(value(cS.payments[0]).amount))]
1032+ let eu = cB(cC)
1033+ let eC = gs(gt, eu, toBigInt(0))
1034+ let gC = ((toBigInt(bQ(gB)) - eC) - toBigInt(1))
1035+ let gD = max([0, toInt(gC)])
1036+ let gM = if ((gD >= gG))
10431037 then true
10441038 else throw("Exchange result is fewer coins than expected")
1045- if ((gQ == gQ))
1039+ if ((gM == gM))
10461040 then {
1047- let gI = if ((gx == false))
1048- then [(toBigInt(bS(do)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
1049- else [(toBigInt(bS(do)) - gG), (toBigInt(bS(dp)) + toBigInt(gD))]
1050- let gJ = cD(gI)
1051- let ed = if ((gJ >= ey))
1041+ let gE = if ((gt == false))
1042+ then [(toBigInt(bQ(dm)) + toBigInt(gz)), (toBigInt(bQ(dn)) - gC)]
1043+ else [(toBigInt(bQ(dm)) - gC), (toBigInt(bQ(dn)) + toBigInt(gz))]
1044+ let gF = cB(gE)
1045+ let dZ = if ((gF >= eu))
10521046 then true
10531047 else throw("new D is fewer error")
1054- if ((ed == ed))
1055- then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bh(gF))], gH)
1048+ if ((dZ == dZ))
1049+ then $Tuple2([ScriptTransfer(addressFromStringValue(gH), gD, bh(gB))], gD)
10561050 else throw("Strict value is not equal to itself.")
10571051 }
10581052 else throw("Strict value is not equal to itself.")
10591053 }
10601054 else throw("Strict value is not equal to itself.")
10611055 }
10621056
10631057
10641058
1065-@Callable(cU)
1059+@Callable(cS)
10661060 func constructor (Z) = {
1067- let eC = gv(cU)
1068- if ((eC == eC))
1061+ let ey = gr(cS)
1062+ if ((ey == ey))
10691063 then [StringEntry(Z(), Z)]
10701064 else throw("Strict value is not equal to itself.")
10711065 }
10721066
10731067
10741068
1075-@Callable(cU)
1076-func setManager (gR) = {
1077- let eC = gv(cU)
1078- if ((eC == eC))
1069+@Callable(cS)
1070+func setManager (gN) = {
1071+ let ey = gr(cS)
1072+ if ((ey == ey))
10791073 then {
1080- let gS = fromBase58String(gR)
1081- if ((gS == gS))
1082- then [StringEntry(ab(), gR)]
1074+ let gO = fromBase58String(gN)
1075+ if ((gO == gO))
1076+ then [StringEntry(ab(), gN)]
10831077 else throw("Strict value is not equal to itself.")
10841078 }
10851079 else throw("Strict value is not equal to itself.")
10861080 }
10871081
10881082
10891083
1090-@Callable(cU)
1084+@Callable(cS)
10911085 func confirmManager () = {
1092- let cz = gr()
1093- let gT = if (isDefined(cz))
1086+ let cx = gn()
1087+ let gP = if (isDefined(cx))
10941088 then true
10951089 else throw("No pending manager")
1096- if ((gT == gT))
1090+ if ((gP == gP))
10971091 then {
1098- let gU = if ((cU.callerPublicKey == value(cz)))
1092+ let gQ = if ((cS.callerPublicKey == value(cx)))
10991093 then true
11001094 else throw("You are not pending manager")
1101- if ((gU == gU))
1102- then [StringEntry(aa(), toBase58String(value(cz))), DeleteEntry(ab())]
1095+ if ((gQ == gQ))
1096+ then [StringEntry(aa(), toBase58String(value(cx))), DeleteEntry(ab())]
11031097 else throw("Strict value is not equal to itself.")
11041098 }
11051099 else throw("Strict value is not equal to itself.")
11061100 }
11071101
11081102
11091103
1110-@Callable(cU)
1111-func put (gV,gW) = {
1112- let gX = bx()
1113- let gY = valueOrErrorMessage(addressFromString(gX[D]), "Wr st addr")
1114- let gZ = valueOrErrorMessage(addressFromString(gX[F]), "Wr sl addr")
1115- if ((0 > gV))
1104+@Callable(cS)
1105+func put (gR,gS) = {
1106+ let gT = bv()
1107+ let gU = valueOrErrorMessage(addressFromString(gT[D]), "Wr st addr")
1108+ let gV = valueOrErrorMessage(addressFromString(gT[F]), "Wr sl addr")
1109+ if ((0 > gR))
11161110 then throw("Wrong slippage")
1117- else if ((size(cU.payments) != 2))
1111+ else if ((size(cS.payments) != 2))
11181112 then throw("2 pmnts expd")
11191113 else {
1120- let ha = toBigInt(value(cU.payments[0]).amount)
1121- let hb = toBigInt(value(cU.payments[1]).amount)
1122- let eT = (toBigInt(bS(bj(br))) - ha)
1123- if ((eT == eT))
1114+ let gW = toBigInt(value(cS.payments[0]).amount)
1115+ let gX = toBigInt(value(cS.payments[1]).amount)
1116+ let eP = (toBigInt(bQ(bj(br))) - gW)
1117+ if ((eP == eP))
11241118 then {
1125- let eU = (toBigInt(bS(bj(bs))) - hb)
1126- if ((eU == eU))
1119+ let eQ = (toBigInt(bQ(bj(bs))) - gX)
1120+ if ((eQ == eQ))
11271121 then {
1128- let eV = toBigInt(value(assetInfo(bq)).quantity)
1129- if ((eV == eV))
1122+ let eR = toBigInt(value(assetInfo(bq)).quantity)
1123+ if ((eR == eR))
11301124 then {
1131- let eW = eP(ha, hb, toBigInt(0))
1132- if ((eW == eW))
1125+ let eS = eL(gW, gX, toBigInt(0))
1126+ if ((eS == eS))
11331127 then {
1134- let hc = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], gV, true, false, true, 0, "")
1135- let eq = hc._2
1136- let hd = hc._7
1137- let dG = hc._9
1138- let er = hc._10
1139- let es = hc._11
1140- let do = hc._12
1141- let dp = hc._13
1142- let ec = invoke(aV, "emit", [eq], nil)
1143- if ((ec == ec))
1128+ let gY = fm(toString(cS.caller), toBase58String(cS.transactionId), AttachedPayment(value(cS.payments[0]).assetId, value(cS.payments[0]).amount), cS.payments[1], gR, true, false, true, 0, "")
1129+ let em = gY._2
1130+ let gZ = gY._7
1131+ let dE = gY._9
1132+ let en = gY._10
1133+ let eo = gY._11
1134+ let dm = gY._12
1135+ let dn = gY._13
1136+ let dY = invoke(aV, "emit", [em], nil)
1137+ if ((dY == dY))
11441138 then {
1145- let he = {
1146- let gq = ec
1147- if ($isInstanceOf(gq, "Address"))
1139+ let ha = {
1140+ let gm = dY
1141+ if ($isInstanceOf(gm, "Address"))
11481142 then {
1149- let hf = gq
1150- invoke(hf, "emit", [eq], nil)
1143+ let hb = gm
1144+ invoke(hb, "emit", [em], nil)
11511145 }
11521146 else unit
11531147 }
1154- if ((he == he))
1148+ if ((ha == ha))
11551149 then {
1156- let hg = if ((er > 0))
1157- then invoke(gZ, "put", nil, [AttachedPayment(do, er)])
1150+ let hc = if ((en > 0))
1151+ then invoke(gV, "put", nil, [AttachedPayment(dm, en)])
11581152 else nil
1159- if ((hg == hg))
1153+ if ((hc == hc))
11601154 then {
1161- let hh = if ((es > 0))
1162- then invoke(gZ, "put", nil, [AttachedPayment(dp, es)])
1155+ let hd = if ((eo > 0))
1156+ then invoke(gV, "put", nil, [AttachedPayment(dn, eo)])
11631157 else nil
1164- if ((hh == hh))
1158+ if ((hd == hd))
11651159 then {
1166- let hi = if (gW)
1160+ let he = if (gS)
11671161 then {
1168- let hj = invoke(gY, "stake", nil, [AttachedPayment(hd, eq)])
1169- if ((hj == hj))
1162+ let hf = invoke(gU, "stake", nil, [AttachedPayment(gZ, em)])
1163+ if ((hf == hf))
11701164 then nil
11711165 else throw("Strict value is not equal to itself.")
11721166 }
1173- else [ScriptTransfer(cU.caller, eq, hd)]
1174- let hk = eX(0, 0, 0)
1175- let gn = hk._1
1176- let eO = hk._2
1177- let hl = if ((eO >= eW))
1167+ else [ScriptTransfer(cS.caller, em, gZ)]
1168+ let hg = eT(0, 0, 0)
1169+ let gj = hg._1
1170+ let eK = hg._2
1171+ let hh = if ((eK >= eS))
11781172 then true
1179- else aS(makeString(["updated DLp lower than current DLp", toString(eT), toString(eU), toString(eV), toString(eW), toString(eO), toString(er), toString(es)], " "))
1180- if ((hl == hl))
1173+ else aS(makeString(["updated DLp lower than current DLp", toString(eP), toString(eQ), toString(eR), toString(eS), toString(eK), toString(en), toString(eo)], " "))
1174+ if ((hh == hh))
11811175 then {
1182- let hm = value(assetInfo(bq)).quantity
1183- if ((hm == hm))
1184- then ((dG ++ hi) ++ gn)
1176+ let hi = value(assetInfo(bq)).quantity
1177+ if ((hi == hi))
1178+ then ((dE ++ he) ++ gj)
11851179 else throw("Strict value is not equal to itself.")
11861180 }
11871181 else throw("Strict value is not equal to itself.")
11881182 }
11891183 else throw("Strict value is not equal to itself.")
11901184 }
11911185 else throw("Strict value is not equal to itself.")
11921186 }
11931187 else throw("Strict value is not equal to itself.")
11941188 }
11951189 else throw("Strict value is not equal to itself.")
11961190 }
11971191 else throw("Strict value is not equal to itself.")
11981192 }
11991193 else throw("Strict value is not equal to itself.")
12001194 }
12011195 else throw("Strict value is not equal to itself.")
12021196 }
12031197 else throw("Strict value is not equal to itself.")
12041198 }
12051199 }
12061200
12071201
12081202
1209-@Callable(cU)
1210-func putOneTknV2 (fR,gW) = {
1211- let hn = {
1203+@Callable(cS)
1204+func putOneTknV2 (fN,gS) = {
1205+ let hj = {
12121206 let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
12131207 if ($isInstanceOf(aX, "Boolean"))
12141208 then aX
12151209 else throw(($getType(aX) + " couldn't be cast to Boolean"))
12161210 }
1217- let ho = if (if (if (ba())
1211+ let hk = if (if (if (ba())
12181212 then true
12191213 else (bp == r))
12201214 then true
12211215 else (bp == t))
12221216 then true
1223- else hn
1224- let gN = [if (if (!(ho))
1217+ else hj
1218+ let gJ = [if (if (!(hk))
12251219 then true
1226- else gt(cU))
1220+ else gp(cS))
12271221 then true
1228- else aS("put operation is blocked by admin"), if ((size(cU.payments) == 1))
1222+ else aS("put operation is blocked by admin"), if ((size(cS.payments) == 1))
12291223 then true
12301224 else aS("exactly 1 payment are expected")]
1231- if ((gN == gN))
1225+ if ((gJ == gJ))
12321226 then {
1233- let do = toBase58String(value(br))
1234- let dp = toBase58String(value(bs))
1235- let dn = bq
1236- let fV = bt
1237- let fW = bu
1238- let dm = if ((cU.caller == this))
1239- then cU.originCaller
1240- else cU.caller
1241- let fp = value(cU.payments[0])
1242- let dk = toBase58String(value(fp.assetId))
1243- let dQ = fp.amount
1244- let eW = if ((fp.assetId == br))
1245- then eP(toBigInt(dQ), toBigInt(0), toBigInt(0))
1246- else eP(toBigInt(0), toBigInt(dQ), toBigInt(0))
1247- if ((eW == eW))
1227+ let dm = toBase58String(value(br))
1228+ let dn = toBase58String(value(bs))
1229+ let dl = bq
1230+ let fR = bt
1231+ let fS = bu
1232+ let dk = if ((cS.caller == this))
1233+ then cS.originCaller
1234+ else cS.caller
1235+ let fl = value(cS.payments[0])
1236+ let di = toBase58String(value(fl.assetId))
1237+ let dO = fl.amount
1238+ let eS = if ((fl.assetId == br))
1239+ then eL(toBigInt(dO), toBigInt(0), toBigInt(0))
1240+ else eL(toBigInt(0), toBigInt(dO), toBigInt(0))
1241+ if ((eS == eS))
12481242 then {
1249- let hp = fu(dQ, dk, toString(dm), toBase58String(cU.transactionId), true)
1250- if ((hp == hp))
1243+ let hl = fq(dO, di, toString(dk), toBase58String(cS.transactionId), true)
1244+ if ((hl == hl))
12511245 then {
1252- let cC = hp._3
1253- let dG = hp._2
1254- let hq = hp._1
1255- let eq = if (if ((fR > 0))
1256- then (fR > hq)
1246+ let cA = hl._3
1247+ let dE = hl._2
1248+ let hm = hl._1
1249+ let em = if (if ((fN > 0))
1250+ then (fN > hm)
12571251 else false)
1258- then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
1259- else hq
1260- let hc = invoke(aV, "emit", [eq], nil)
1261- if ((hc == hc))
1252+ then aS(makeString(["amount to receive is less than ", toString(fN)], ""))
1253+ else hm
1254+ let gY = invoke(aV, "emit", [em], nil)
1255+ if ((gY == gY))
12621256 then {
1263- let he = {
1264- let gq = hc
1265- if ($isInstanceOf(gq, "Address"))
1257+ let ha = {
1258+ let gm = gY
1259+ if ($isInstanceOf(gm, "Address"))
12661260 then {
1267- let hf = gq
1268- invoke(hf, "emit", [eq], nil)
1261+ let hb = gm
1262+ invoke(hb, "emit", [em], nil)
12691263 }
12701264 else unit
12711265 }
1272- if ((he == he))
1266+ if ((ha == ha))
12731267 then {
1274- let hi = if (gW)
1268+ let he = if (gS)
12751269 then {
1276- let hj = invoke(bz, "stakeFor", [toString(cU.caller)], [AttachedPayment(dn, eq)])
1277- if ((hj == hj))
1270+ let hf = invoke(bx, "stakeFor", [toString(cS.caller)], [AttachedPayment(dl, em)])
1271+ if ((hf == hf))
12781272 then nil
12791273 else throw("Strict value is not equal to itself.")
12801274 }
1281- else [ScriptTransfer(cU.caller, eq, dn)]
1282- let gh = if ((cC > 0))
1283- then [ScriptTransfer(bc, cC, fromBase58String(dk))]
1275+ else [ScriptTransfer(cS.caller, em, dl)]
1276+ let gd = if ((cA > 0))
1277+ then [ScriptTransfer(bc, cA, fromBase58String(di))]
12841278 else nil
1285- let hr = if ((this == bc))
1279+ let hn = if ((this == bc))
12861280 then $Tuple2(0, 0)
12871281 else {
1288- let hs = if ((fp.assetId == br))
1282+ let ho = if ((fl.assetId == br))
12891283 then true
12901284 else false
1291- if (hs)
1292- then $Tuple2(-(cC), 0)
1293- else $Tuple2(0, -(cC))
1285+ if (ho)
1286+ then $Tuple2(-(cA), 0)
1287+ else $Tuple2(0, -(cA))
12941288 }
1295- let eY = hr._1
1296- let eZ = hr._2
1297- let ht = eX(eY, eZ, 0)
1298- let gn = ht._1
1299- let eO = ht._2
1300- let go = fb(eW, eO)
1301- if ((go == go))
1302- then $Tuple2((((dG ++ hi) ++ gh) ++ gn), eq)
1289+ let eU = hn._1
1290+ let eV = hn._2
1291+ let hp = eT(eU, eV, 0)
1292+ let gj = hp._1
1293+ let eK = hp._2
1294+ let gk = eX(eS, eK)
1295+ if ((gk == gk))
1296+ then $Tuple2((((dE ++ he) ++ gd) ++ gj), em)
13031297 else throw("Strict value is not equal to itself.")
13041298 }
13051299 else throw("Strict value is not equal to itself.")
13061300 }
13071301 else throw("Strict value is not equal to itself.")
13081302 }
13091303 else throw("Strict value is not equal to itself.")
13101304 }
13111305 else throw("Strict value is not equal to itself.")
13121306 }
13131307 else throw("Strict value is not equal to itself.")
13141308 }
13151309
13161310
13171311
1318-@Callable(cU)
1319-func putForFree (hu) = if ((0 > hu))
1312+@Callable(cS)
1313+func putForFree (hq) = if ((0 > hq))
13201314 then throw("Wrong slpg")
1321- else if ((size(cU.payments) != 2))
1315+ else if ((size(cS.payments) != 2))
13221316 then throw("2 pmnts expd")
13231317 else {
1324- let hv = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], hu, false, false, true, 0, "")
1325- let dG = hv._9
1326- let ha = toBigInt(value(cU.payments[0]).amount)
1327- let hb = toBigInt(value(cU.payments[1]).amount)
1328- let eW = eP(ha, hb, toBigInt(0))
1329- if ((eW == eW))
1318+ let hr = fm(toString(cS.caller), toBase58String(cS.transactionId), AttachedPayment(value(cS.payments[0]).assetId, value(cS.payments[0]).amount), cS.payments[1], hq, false, false, true, 0, "")
1319+ let dE = hr._9
1320+ let gW = toBigInt(value(cS.payments[0]).amount)
1321+ let gX = toBigInt(value(cS.payments[1]).amount)
1322+ let eS = eL(gW, gX, toBigInt(0))
1323+ if ((eS == eS))
13301324 then {
1331- let hw = eX(0, 0, 0)
1332- let gn = hw._1
1333- let eO = hw._2
1334- let go = fb(eW, eO)
1335- if ((go == go))
1336- then (dG ++ gn)
1325+ let hs = eT(0, 0, 0)
1326+ let gj = hs._1
1327+ let eK = hs._2
1328+ let gk = eX(eS, eK)
1329+ if ((gk == gk))
1330+ then (dE ++ gj)
13371331 else throw("Strict value is not equal to itself.")
13381332 }
13391333 else throw("Strict value is not equal to itself.")
13401334 }
13411335
13421336
13431337
1344-@Callable(cU)
1338+@Callable(cS)
13451339 func get () = {
1346- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1347- if ((eW == eW))
1340+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1341+ if ((eS == eS))
13481342 then {
1349- let ec = fo(cU)
1350- let hx = ec._1
1351- let dF = ec._2
1352- let dQ = ec._3
1353- let dk = ec._4
1354- let dG = ec._5
1355- let eD = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1356- if ((eD == eD))
1343+ let dY = fk(cS)
1344+ let ht = dY._1
1345+ let dD = dY._2
1346+ let dO = dY._3
1347+ let di = dY._4
1348+ let dE = dY._5
1349+ let ez = invoke(aV, "burn", [dO], [AttachedPayment(di, dO)])
1350+ if ((ez == ez))
13571351 then {
1358- let hy = eX(-(hx), -(dF), 0)
1359- let gn = hy._1
1360- let eO = hy._2
1361- let go = fb(eW, eO)
1362- if ((go == go))
1363- then (dG ++ gn)
1352+ let hu = eT(-(ht), -(dD), 0)
1353+ let gj = hu._1
1354+ let eK = hu._2
1355+ let gk = eX(eS, eK)
1356+ if ((gk == gk))
1357+ then (dE ++ gj)
13641358 else throw("Strict value is not equal to itself.")
13651359 }
13661360 else throw("Strict value is not equal to itself.")
13671361 }
13681362 else throw("Strict value is not equal to itself.")
13691363 }
13701364
13711365
13721366
1373-@Callable(cU)
1374-func getOneTknV2 (fQ,fR) = {
1375- let hn = {
1367+@Callable(cS)
1368+func getOneTknV2 (fM,fN) = {
1369+ let hj = {
13761370 let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13771371 if ($isInstanceOf(aX, "Boolean"))
13781372 then aX
13791373 else throw(($getType(aX) + " couldn't be cast to Boolean"))
13801374 }
1381- let hz = if (if (ba())
1375+ let hv = if (if (ba())
13821376 then true
13831377 else (bp == t))
13841378 then true
1385- else hn
1386- let gN = [if (if (!(hz))
1379+ else hj
1380+ let gJ = [if (if (!(hv))
13871381 then true
1388- else gt(cU))
1382+ else gp(cS))
13891383 then true
1390- else aS("get operation is blocked by admin"), if ((size(cU.payments) == 1))
1384+ else aS("get operation is blocked by admin"), if ((size(cS.payments) == 1))
13911385 then true
13921386 else aS("exactly 1 payment are expected")]
1393- if ((gN == gN))
1387+ if ((gJ == gJ))
13941388 then {
1395- let hA = fP(fQ, fR, cU.payments, cU.caller, cU.originCaller, cU.transactionId)
1396- let dG = hA._1
1397- let ga = hA._2
1398- $Tuple2(dG, ga)
1389+ let hw = fL(fM, fN, cS.payments, cS.caller, cS.originCaller, cS.transactionId)
1390+ let dE = hw._1
1391+ let fW = hw._2
1392+ $Tuple2(dE, fW)
13991393 }
14001394 else throw("Strict value is not equal to itself.")
14011395 }
14021396
14031397
14041398
1405-@Callable(cU)
1399+@Callable(cS)
14061400 func refreshDLp () = {
1407- let hB = valueOrElse(getInteger(at), 0)
1408- let hC = if (((height - hB) >= aw))
1401+ let hx = valueOrElse(getInteger(at), 0)
1402+ let hy = if (((height - hx) >= aw))
14091403 then unit
14101404 else aS(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1411- if ((hC == hC))
1405+ if ((hy == hy))
14121406 then {
1413- let fi = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), aU("invalid dLp"))
1414- let hD = eX(0, 0, 0)
1415- let hE = hD._1
1416- let eO = hD._2
1417- let fa = if ((fi != eO))
1418- then hE
1407+ let fe = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), aU("invalid dLp"))
1408+ let hz = eT(0, 0, 0)
1409+ let hA = hz._1
1410+ let eK = hz._2
1411+ let eW = if ((fe != eK))
1412+ then hA
14191413 else aS("nothing to refresh")
1420- $Tuple2(fa, toString(eO))
1414+ $Tuple2(eW, toString(eK))
14211415 }
14221416 else throw("Strict value is not equal to itself.")
14231417 }
14241418
14251419
14261420
1427-@Callable(cU)
1428-func getOneTknV2READONLY (fQ,hF) = {
1429- let do = toBase58String(value(br))
1430- let dp = toBase58String(value(bs))
1431- let dn = toBase58String(value(bq))
1432- let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
1433- let eN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dn)), "invalid lp asset").quantity)
1434- let cg = cD(cE)
1435- let cf = (cg - fraction(toBigInt(hF), cg, eN))
1436- let hG = if ((fQ == do))
1421+@Callable(cS)
1422+func getOneTknV2READONLY (fM,hB) = {
1423+ let dm = toBase58String(value(br))
1424+ let dn = toBase58String(value(bs))
1425+ let dl = toBase58String(value(bq))
1426+ let cC = [toBigInt(bQ(dm)), toBigInt(bQ(dn))]
1427+ let eJ = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dl)), "invalid lp asset").quantity)
1428+ let ce = cB(cC)
1429+ let cd = (ce - fraction(toBigInt(hB), ce, eJ))
1430+ let hC = if ((fM == dm))
14371431 then 0
1438- else if ((fQ == dp))
1432+ else if ((fM == dn))
14391433 then 1
14401434 else throw("invalid out asset id")
1441- let hH = ex(cE, hG, cf)
1442- let gG = (cE[hG] - hH)
1443- let gH = max([0, toInt((gG - f))])
1444- let hI = cA(gH, aY)
1445- let fZ = hI._1
1446- let cC = hI._2
1447- $Tuple2(nil, $Tuple2(fZ, cC))
1435+ let hD = et(cC, hC, cd)
1436+ let gC = (cC[hC] - hD)
1437+ let gD = max([0, toInt((gC - f))])
1438+ let hE = cy(gD, aY)
1439+ let fV = hE._1
1440+ let cA = hE._2
1441+ $Tuple2(nil, $Tuple2(fV, cA))
14481442 }
14491443
14501444
14511445
1452-@Callable(cU)
1453-func getOneTknV2WithBonusREADONLY (fQ,hF) = {
1454- let do = toBase58String(value(br))
1455- let dp = toBase58String(value(bs))
1456- let dn = toBase58String(value(bq))
1457- let du = bS(do)
1458- let dw = bS(dp)
1459- let hJ = {
1460- let aX = invoke(this, "getOneTknV2READONLY", [fQ, hF], nil)
1446+@Callable(cS)
1447+func getOneTknV2WithBonusREADONLY (fM,hB) = {
1448+ let dm = toBase58String(value(br))
1449+ let dn = toBase58String(value(bs))
1450+ let dl = toBase58String(value(bq))
1451+ let ds = bQ(dm)
1452+ let du = bQ(dn)
1453+ let hF = {
1454+ let aX = invoke(this, "getOneTknV2READONLY", [fM, hB], nil)
14611455 if ($isInstanceOf(aX, "(Int, Int)"))
14621456 then aX
14631457 else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
14641458 }
1465- let fZ = hJ._1
1466- let cC = hJ._2
1467- let ec = di("", dn, hF, this)
1468- let dE = ec._1
1469- let dF = ec._2
1470- let hK = (dE + dF)
1471- let fO = if ((hK == 0))
1472- then if ((fZ == 0))
1459+ let fV = hF._1
1460+ let cA = hF._2
1461+ let dY = dg("", dl, hB, this)
1462+ let dC = dY._1
1463+ let dD = dY._2
1464+ let hG = (dC + dD)
1465+ let fK = if ((hG == 0))
1466+ then if ((fV == 0))
14731467 then 0
14741468 else throw("bonus calculation error")
1475- else fraction((fZ - hK), a, hK)
1476- $Tuple2(nil, $Tuple3(fZ, cC, fO))
1469+ else fraction((fV - hG), a, hG)
1470+ $Tuple2(nil, $Tuple3(fV, cA, fK))
14771471 }
14781472
14791473
14801474
1481-@Callable(cU)
1482-func getNoLess (hL,hM) = {
1483- let ec = fo(cU)
1484- let dE = ec._1
1485- let dF = ec._2
1486- let dQ = ec._3
1487- let dk = ec._4
1488- let dG = ec._5
1489- if ((hL > dE))
1490- then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL)))
1491- else if ((hM > dF))
1492- then throw(((("Failed: " + toString(dF)) + " < ") + toString(hM)))
1475+@Callable(cS)
1476+func getNoLess (hH,hI) = {
1477+ let dY = fk(cS)
1478+ let dC = dY._1
1479+ let dD = dY._2
1480+ let dO = dY._3
1481+ let di = dY._4
1482+ let dE = dY._5
1483+ if ((hH > dC))
1484+ then throw(((("Failed: " + toString(dC)) + " < ") + toString(hH)))
1485+ else if ((hI > dD))
1486+ then throw(((("Failed: " + toString(dD)) + " < ") + toString(hI)))
14931487 else {
1494- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1495- if ((eW == eW))
1488+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1489+ if ((eS == eS))
14961490 then {
1497- let hN = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1498- if ((hN == hN))
1491+ let hJ = invoke(aV, "burn", [dO], [AttachedPayment(di, dO)])
1492+ if ((hJ == hJ))
14991493 then {
1500- let hO = eX(-(dE), -(dF), 0)
1501- let gn = hO._1
1502- let eO = hO._2
1503- let go = fb(eW, eO)
1504- if ((go == go))
1505- then (dG ++ gn)
1494+ let hK = eT(-(dC), -(dD), 0)
1495+ let gj = hK._1
1496+ let eK = hK._2
1497+ let gk = eX(eS, eK)
1498+ if ((gk == gk))
1499+ then (dE ++ gj)
15061500 else throw("Strict value is not equal to itself.")
15071501 }
15081502 else throw("Strict value is not equal to itself.")
15091503 }
15101504 else throw("Strict value is not equal to itself.")
15111505 }
15121506 }
15131507
15141508
15151509
1516-@Callable(cU)
1517-func unstakeAndGet (cB) = {
1518- let hP = if ((size(cU.payments) != 0))
1510+@Callable(cS)
1511+func unstakeAndGet (cz) = {
1512+ let hL = if ((size(cS.payments) != 0))
15191513 then throw("No pmnts expd")
15201514 else true
1521- if ((hP == hP))
1515+ if ((hL == hL))
15221516 then {
1523- let hQ = bx()
1524- let hd = bq
1525- let hR = valueOrErrorMessage(addressFromString(hQ[D]), "Wr st addr")
1526- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1527- if ((eW == eW))
1517+ let hM = bv()
1518+ let gZ = bq
1519+ let hN = valueOrErrorMessage(addressFromString(hM[D]), "Wr st addr")
1520+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1521+ if ((eS == eS))
15281522 then {
1529- let hS = invoke(hR, "unstake", [toBase58String(hd), cB], nil)
1530- if ((hS == hS))
1523+ let hO = invoke(hN, "unstake", [toBase58String(gZ), cz], nil)
1524+ if ((hO == hO))
15311525 then {
1532- let ec = di(toBase58String(cU.transactionId), toBase58String(hd), cB, cU.caller)
1533- let dE = ec._1
1534- let dF = ec._2
1535- let ds = parseIntValue(ec._9)
1536- let dG = ec._10
1537- let hT = if (if (ba())
1526+ let dY = dg(toBase58String(cS.transactionId), toBase58String(gZ), cz, cS.caller)
1527+ let dC = dY._1
1528+ let dD = dY._2
1529+ let dq = parseIntValue(dY._9)
1530+ let dE = dY._10
1531+ let hP = if (if (ba())
15381532 then true
1539- else (ds == t))
1540- then throw(("Blocked: " + toString(ds)))
1533+ else (dq == t))
1534+ then throw(("Blocked: " + toString(dq)))
15411535 else true
1542- if ((hT == hT))
1536+ if ((hP == hP))
15431537 then {
1544- let hU = invoke(aV, "burn", [cB], [AttachedPayment(hd, cB)])
1545- if ((hU == hU))
1538+ let hQ = invoke(aV, "burn", [cz], [AttachedPayment(gZ, cz)])
1539+ if ((hQ == hQ))
15461540 then {
1547- let hV = eX(-(dE), -(dF), 0)
1548- let gn = hV._1
1549- let eO = hV._2
1550- let go = fb(eW, eO)
1551- if ((go == go))
1552- then (dG ++ gn)
1541+ let hR = eT(-(dC), -(dD), 0)
1542+ let gj = hR._1
1543+ let eK = hR._2
1544+ let gk = eX(eS, eK)
1545+ if ((gk == gk))
1546+ then (dE ++ gj)
15531547 else throw("Strict value is not equal to itself.")
15541548 }
15551549 else throw("Strict value is not equal to itself.")
15561550 }
15571551 else throw("Strict value is not equal to itself.")
15581552 }
15591553 else throw("Strict value is not equal to itself.")
15601554 }
15611555 else throw("Strict value is not equal to itself.")
15621556 }
15631557 else throw("Strict value is not equal to itself.")
15641558 }
15651559
15661560
15671561
1568-@Callable(cU)
1569-func unstakeAndGetNoLess (hW,hX,hM) = {
1570- let hz = if (ba())
1562+@Callable(cS)
1563+func unstakeAndGetNoLess (hS,hT,hI) = {
1564+ let hv = if (ba())
15711565 then true
15721566 else (bp == t)
1573- let gN = [if (!(hz))
1567+ let gJ = [if (!(hv))
15741568 then true
1575- else throw("get operation is blocked by admin"), if ((size(cU.payments) == 0))
1569+ else throw("get operation is blocked by admin"), if ((size(cS.payments) == 0))
15761570 then true
15771571 else throw("no payments are expected")]
1578- if ((gN == gN))
1572+ if ((gJ == gJ))
15791573 then {
1580- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1581- if ((eW == eW))
1574+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1575+ if ((eS == eS))
15821576 then {
1583- let hS = invoke(bz, "unstake", [toBase58String(bq), hW], nil)
1584- if ((hS == hS))
1577+ let hO = invoke(bx, "unstake", [toBase58String(bq), hS], nil)
1578+ if ((hO == hO))
15851579 then {
1586- let hY = di(toBase58String(cU.transactionId), toBase58String(bq), hW, cU.caller)
1587- let dE = hY._1
1588- let dF = hY._2
1589- let dG = hY._10
1590- let hZ = [if ((dE >= hX))
1580+ let hU = dg(toBase58String(cS.transactionId), toBase58String(bq), hS, cS.caller)
1581+ let dC = hU._1
1582+ let dD = hU._2
1583+ let dE = hU._10
1584+ let hV = [if ((dC >= hT))
15911585 then true
1592- else throw(makeString(["amount asset amount to receive is less than ", toString(hX)], "")), if ((dF >= hM))
1586+ else throw(makeString(["amount asset amount to receive is less than ", toString(hT)], "")), if ((dD >= hI))
15931587 then true
1594- else throw(makeString(["price asset amount to receive is less than ", toString(hM)], ""))]
1595- if ((hZ == hZ))
1588+ else throw(makeString(["price asset amount to receive is less than ", toString(hI)], ""))]
1589+ if ((hV == hV))
15961590 then {
1597- let hN = invoke(aV, "burn", [hW], [AttachedPayment(bq, hW)])
1598- if ((hN == hN))
1591+ let hJ = invoke(aV, "burn", [hS], [AttachedPayment(bq, hS)])
1592+ if ((hJ == hJ))
15991593 then {
1600- let ia = eX(-(dE), -(dF), 0)
1601- let gn = ia._1
1602- let eO = ia._2
1603- let go = fb(eW, eO)
1604- if ((go == go))
1605- then (dG ++ gn)
1594+ let hW = eT(-(dC), -(dD), 0)
1595+ let gj = hW._1
1596+ let eK = hW._2
1597+ let gk = eX(eS, eK)
1598+ if ((gk == gk))
1599+ then (dE ++ gj)
16061600 else throw("Strict value is not equal to itself.")
16071601 }
16081602 else throw("Strict value is not equal to itself.")
16091603 }
16101604 else throw("Strict value is not equal to itself.")
16111605 }
16121606 else throw("Strict value is not equal to itself.")
16131607 }
16141608 else throw("Strict value is not equal to itself.")
16151609 }
16161610 else throw("Strict value is not equal to itself.")
16171611 }
16181612
16191613
16201614
1621-@Callable(cU)
1622-func unstakeAndGetOneTknV2 (hW,fQ,fR) = {
1623- let hn = {
1615+@Callable(cS)
1616+func unstakeAndGetOneTknV2 (hS,fM,fN) = {
1617+ let hj = {
16241618 let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16251619 if ($isInstanceOf(aX, "Boolean"))
16261620 then aX
16271621 else throw(($getType(aX) + " couldn't be cast to Boolean"))
16281622 }
1629- let hz = if (if (ba())
1623+ let hv = if (if (ba())
16301624 then true
16311625 else (bp == t))
16321626 then true
1633- else hn
1634- let gN = [if (if (!(hz))
1627+ else hj
1628+ let gJ = [if (if (!(hv))
16351629 then true
1636- else gt(cU))
1630+ else gp(cS))
16371631 then true
1638- else aS("get operation is blocked by admin"), if ((size(cU.payments) == 0))
1632+ else aS("get operation is blocked by admin"), if ((size(cS.payments) == 0))
16391633 then true
16401634 else aS("no payments are expected")]
1641- if ((gN == gN))
1635+ if ((gJ == gJ))
16421636 then {
1643- let hQ = bx()
1644- let hd = bq
1645- let hR = valueOrErrorMessage(addressFromString(hQ[D]), "Wr st addr")
1646- let dm = cU.caller
1647- let ib = this
1648- let hS = invoke(hR, "unstakeINTERNAL", [hd, hW, dm.bytes, ib.bytes], nil)
1649- if ((hS == hS))
1637+ let hM = bv()
1638+ let gZ = bq
1639+ let hN = valueOrErrorMessage(addressFromString(hM[D]), "Wr st addr")
1640+ let dk = cS.caller
1641+ let hX = this
1642+ let hO = invoke(hN, "unstakeINTERNAL", [gZ, hS, dk.bytes, hX.bytes], nil)
1643+ if ((hO == hO))
16501644 then {
1651- let ic = fP(fQ, fR, [AttachedPayment(hd, hW)], cU.caller, cU.originCaller, cU.transactionId)
1652- let dG = ic._1
1653- let ga = ic._2
1654- $Tuple2(dG, ga)
1645+ let hY = fL(fM, fN, [AttachedPayment(gZ, hS)], cS.caller, cS.originCaller, cS.transactionId)
1646+ let dE = hY._1
1647+ let fW = hY._2
1648+ $Tuple2(dE, fW)
16551649 }
16561650 else throw("Strict value is not equal to itself.")
16571651 }
16581652 else throw("Strict value is not equal to itself.")
16591653 }
16601654
16611655
16621656
1663-@Callable(cU)
1664-func putOneTknV2WithBonusREADONLY (id,ie) = {
1665- let if = fu(id, ie, "", "", true)
1666- let fJ = if._1
1667- let dG = if._2
1668- let cC = if._3
1669- let fO = if._4
1670- $Tuple2(nil, $Tuple3(fJ, cC, fO))
1657+@Callable(cS)
1658+func putOneTknV2WithBonusREADONLY (hZ,ia) = {
1659+ let ib = fq(hZ, ia, "", "", true)
1660+ let fF = ib._1
1661+ let dE = ib._2
1662+ let cA = ib._3
1663+ let fK = ib._4
1664+ $Tuple2(nil, $Tuple3(fF, cA, fK))
16711665 }
16721666
16731667
16741668
1675-@Callable(cU)
1676-func putOneTknV2WithoutTakeFeeREADONLY (id,ie) = {
1677- let ig = fu(id, ie, "", "", false)
1678- let fJ = ig._1
1679- let dG = ig._2
1680- let cC = ig._3
1681- let fO = ig._4
1682- $Tuple2(nil, $Tuple3(fJ, cC, fO))
1669+@Callable(cS)
1670+func putOneTknV2WithoutTakeFeeREADONLY (hZ,ia) = {
1671+ let ic = fq(hZ, ia, "", "", false)
1672+ let fF = ic._1
1673+ let dE = ic._2
1674+ let cA = ic._3
1675+ let fK = ic._4
1676+ $Tuple2(nil, $Tuple3(fF, cA, fK))
16831677 }
16841678
16851679
16861680
1687-@Callable(cU)
1688-func activate (ih,ii) = if ((toString(cU.caller) != toString(aV)))
1681+@Callable(cS)
1682+func activate (id,ie) = if ((toString(cS.caller) != toString(aV)))
16891683 then throw("denied")
1690- else $Tuple2([StringEntry(ak(), ih), StringEntry(al(), ii), StringEntry(am(), toString(l))], "success")
1684+ else $Tuple2([StringEntry(ak(), id), StringEntry(al(), ie), StringEntry(am(), toString(l))], "success")
16911685
16921686
16931687
1694-@Callable(cU)
1688+@Callable(cS)
16951689 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bd())
16961690
16971691
16981692
1699-@Callable(cU)
1700-func getAccBalanceWrapperREADONLY (bT) = $Tuple2(nil, bS(bT))
1693+@Callable(cS)
1694+func getAccBalanceWrapperREADONLY (bR) = $Tuple2(nil, bQ(bR))
17011695
17021696
17031697
1704-@Callable(cU)
1705-func calcPricesWrapperREADONLY (cm,cn,cr) = {
1706- let ij = cq(cm, cn, cr)
1707- $Tuple2(nil, [toString(ij[0]), toString(ij[1]), toString(ij[2])])
1698+@Callable(cS)
1699+func calcPricesWrapperREADONLY (ck,cl,cp) = {
1700+ let if = co(ck, cl, cp)
1701+ $Tuple2(nil, [toString(if[0]), toString(if[1]), toString(if[2])])
17081702 }
17091703
17101704
17111705
1712-@Callable(cU)
1713-func fromX18WrapperREADONLY (N,ik) = $Tuple2(nil, M(parseBigIntValue(N), ik))
1706+@Callable(cS)
1707+func fromX18WrapperREADONLY (N,ig) = $Tuple2(nil, M(parseBigIntValue(N), ig))
17141708
17151709
17161710
1717-@Callable(cU)
1711+@Callable(cS)
17181712 func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K)))
17191713
17201714
17211715
1722-@Callable(cU)
1723-func calcPriceBigIntWrapperREADONLY (bV,bW) = $Tuple2(nil, toString(bU(parseBigIntValue(bV), parseBigIntValue(bW))))
1716+@Callable(cS)
1717+func calcPriceBigIntWrapperREADONLY (bT,bU) = $Tuple2(nil, toString(bS(parseBigIntValue(bT), parseBigIntValue(bU))))
17241718
17251719
17261720
1727-@Callable(cU)
1728-func estimatePutOperationWrapperREADONLY (dj,cb,dI,dJ,dK,dL,il,dM,dN) = $Tuple2(nil, dH(dj, cb, dI, dJ, dK, dL, il, dM, dN, true, false, 0, ""))
1721+@Callable(cS)
1722+func estimatePutOperationWrapperREADONLY (dh,bZ,dG,dH,dI,dJ,ih,dK,dL) = $Tuple2(nil, dF(dh, bZ, dG, dH, dI, dJ, ih, dK, dL, true, false, 0, ""))
17291723
17301724
17311725
1732-@Callable(cU)
1733-func estimateGetOperationWrapperREADONLY (dj,im,dl,il) = {
1734- let ec = di(dj, im, dl, addressFromStringValue(il))
1735- $Tuple2(nil, $Tuple10(ec._1, ec._2, ec._3, ec._4, ec._5, ec._6, ec._7, toString(ec._8), ec._9, ec._10))
1726+@Callable(cS)
1727+func estimateGetOperationWrapperREADONLY (dh,ii,dj,ih) = {
1728+ let dY = dg(dh, ii, dj, addressFromStringValue(ih))
1729+ $Tuple2(nil, $Tuple10(dY._1, dY._2, dY._3, dY._4, dY._5, dY._6, dY._7, toString(dY._8), dY._9, dY._10))
17361730 }
17371731
17381732
17391733
1740-@Callable(cU)
1734+@Callable(cS)
17411735 func changeAmp () = {
1742- let in = invoke(aV, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1743- let io = {
1744- let gq = in
1745- if ($isInstanceOf(gq, "List[Any]"))
1736+ let ij = invoke(aV, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1737+ let ik = {
1738+ let gm = ij
1739+ if ($isInstanceOf(gm, "List[Any]"))
17461740 then {
1747- let ip = gq
1741+ let il = gm
17481742 $Tuple3({
1749- let aX = ip[0]
1743+ let aX = il[0]
17501744 if ($isInstanceOf(aX, "Int"))
17511745 then aX
17521746 else throw(($getType(aX) + " couldn't be cast to Int"))
17531747 }, {
1754- let aX = ip[1]
1748+ let aX = il[1]
17551749 if ($isInstanceOf(aX, "Int"))
17561750 then aX
17571751 else throw(($getType(aX) + " couldn't be cast to Int"))
17581752 }, {
1759- let aX = ip[2]
1753+ let aX = il[2]
17601754 if ($isInstanceOf(aX, "Int"))
17611755 then aX
17621756 else throw(($getType(aX) + " couldn't be cast to Int"))
17631757 })
17641758 }
17651759 else aS("invalid entry type")
17661760 }
1767- let iq = io._1
1768- let ir = io._2
1769- let is = io._3
1770- let it = parseIntValue(getStringValue(am()))
1771- let iu = (it + ir)
1772- let iv = if ((0 > ir))
1773- then if ((is > iu))
1774- then is
1775- else iu
1776- else if ((iu > is))
1777- then is
1778- else iu
1779- let iw = valueOrElse(getInteger(ap()), 0)
1780- let ix = (iw + iq)
1781- let gN = [if ((height > ix))
1761+ let im = ik._1
1762+ let in = ik._2
1763+ let io = ik._3
1764+ let ip = parseIntValue(getStringValue(am()))
1765+ let iq = (ip + in)
1766+ let ir = if ((0 > in))
1767+ then if ((io > iq))
1768+ then io
1769+ else iq
1770+ else if ((iq > io))
1771+ then io
1772+ else iq
1773+ let is = valueOrElse(getInteger(ap()), 0)
1774+ let it = (is + im)
1775+ let gJ = [if ((height > it))
17821776 then true
1783- else aS("try again in few blocks"), if ((it != iv))
1777+ else aS("try again in few blocks"), if ((ip != ir))
17841778 then true
17851779 else aS("already reached target")]
1786- if ((gN == gN))
1787- then [IntegerEntry(ap(), height), StringEntry(am(), toString(iv)), StringEntry(an(height), toString(iv))]
1780+ if ((gJ == gJ))
1781+ then [IntegerEntry(ap(), height), StringEntry(am(), toString(ir)), StringEntry(an(height), toString(ir))]
17881782 else throw("Strict value is not equal to itself.")
17891783 }
17901784
17911785
1792-@Verifier(iy)
1793-func iz () = {
1794- let iA = {
1795- let gq = gp()
1796- if ($isInstanceOf(gq, "ByteVector"))
1786+@Verifier(iu)
1787+func iv () = {
1788+ let iw = {
1789+ let gm = gl()
1790+ if ($isInstanceOf(gm, "ByteVector"))
17971791 then {
1798- let gu = gq
1799- gu
1792+ let gq = gm
1793+ gq
18001794 }
1801- else if ($isInstanceOf(gq, "Unit"))
1802- then iy.senderPublicKey
1795+ else if ($isInstanceOf(gm, "Unit"))
1796+ then iu.senderPublicKey
18031797 else throw("Match error")
18041798 }
1805- let gq = iy
1806- if ($isInstanceOf(gq, "Order"))
1799+ let gm = iu
1800+ if ($isInstanceOf(gm, "Order"))
18071801 then {
1808- let fe = gq
1809- let iB = bb()
1810- let iC = if (gB())
1802+ let fa = gm
1803+ let ix = bb()
1804+ let iy = if (gx())
18111805 then $Tuple2(true, "")
1812- else fd(fe)
1813- let aK = iC._1
1814- let aL = iC._2
1815- let aM = sigVerify(fe.bodyBytes, fe.proofs[0], fe.senderPublicKey)
1816- let aN = sigVerify(fe.bodyBytes, fe.proofs[1], iB)
1806+ else eZ(fa)
1807+ let aK = iy._1
1808+ let aL = iy._2
1809+ let aM = sigVerify(fa.bodyBytes, fa.proofs[0], fa.senderPublicKey)
1810+ let aN = sigVerify(fa.bodyBytes, fa.proofs[1], ix)
18171811 if (if (if (aK)
18181812 then aM
18191813 else false)
18201814 then aN
18211815 else false)
18221816 then true
18231817 else aJ(aK, aL, aM, aN)
18241818 }
1825- else if ($isInstanceOf(gq, "SetScriptTransaction"))
1819+ else if ($isInstanceOf(gm, "SetScriptTransaction"))
18261820 then {
1827- let cH = gq
1828- if (sigVerify(iy.bodyBytes, iy.proofs[0], iA))
1821+ let cF = gm
1822+ if (sigVerify(iu.bodyBytes, iu.proofs[0], iw))
18291823 then true
18301824 else {
1831- let iD = blake2b256(value(cH.script))
1832- let iE = fromBase64String(value(getString(aV, aF())))
1833- let iF = scriptHash(this)
1834- if ((iE == iD))
1835- then (iF != iD)
1825+ let iz = blake2b256(value(cF.script))
1826+ let iA = fromBase64String(value(getString(aV, aF())))
1827+ let iB = scriptHash(this)
1828+ if ((iA == iz))
1829+ then (iB != iz)
18361830 else false
18371831 }
18381832 }
1839- else sigVerify(iy.bodyBytes, iy.proofs[0], iA)
1833+ else sigVerify(iu.bodyBytes, iu.proofs[0], iw)
18401834 }
18411835

github/deemru/w8io/026f985 
690.59 ms