tx · C2ARYeFKEwdpCwkaCCmtu63RURZR9NW7eD6TuQcvt1z9 3N4vUDe3oc1YPNwMyQi2h8f2tmGoA7wBZp2: -0.04200000 Waves 2023.04.06 11:53 [2522486] smart account 3N4vUDe3oc1YPNwMyQi2h8f2tmGoA7wBZp2 > SELF 0.00000000 Waves
{ "type": 13, "id": "C2ARYeFKEwdpCwkaCCmtu63RURZR9NW7eD6TuQcvt1z9", "fee": 4200000, "feeAssetId": null, "timestamp": 1680771191859, "version": 2, "chainId": 84, "sender": "3N4vUDe3oc1YPNwMyQi2h8f2tmGoA7wBZp2", "senderPublicKey": "6MuWw1pkme7UgQX2hZh8yTZyoWVkz8A4rmHZ1acrsrVm", "proofs": [ "2MP95RmS5PvGQPFoYNxLzoveSsQZ22P2sQPBuSJNfgZAsfXyFqJf2vu783MjPN5hDjgx8xcQVBU2TggSXDBbGyLa" ], "script": "base64:BgLJNwgCEgASBQoDAQQBEgcKBQEEAQgBEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2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FAmFKBQJhSwUCYUwDCQABAgUCYlQCFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJnaQUCYlQDCQD0AwMIBQJpaglib2R5Qnl0ZXMJAJEDAggFAmlqBnByb29mcwAABQJpbAYEAmlvCQD2AwEJAQV2YWx1ZQEIBQJnaQZzY3JpcHQEAmlwCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVQJAQJhRgAEAmlxCQDxBwEFBHRoaXMDCQAAAgUCaXAFAmlvCQECIT0CBQJpcQUCaW8HCQD0AwMIBQJpaglib2R5Qnl0ZXMJAJEDAggFAmlqBnByb29mcwAABQJpbLimS3g=", "height": 2522486, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Bb1JkryxS2uppA5Z2iAu2pDttumzfcRcnGyFpZpGXk1W Next: 88XcoWX11tyovp4NVaVJf1Xza72Xk4wYVG3s9mqVCpTH Diff:
Old | New | Differences | |
---|---|---|---|
468 | 468 | } | |
469 | 469 | ||
470 | 470 | ||
471 | - | func cP (cQ,cR | |
472 | - | let | |
473 | - | let | |
474 | - | | |
471 | + | func cP (cQ,cR) = { | |
472 | + | let cS = cK(aM(this, ae()), cQ) | |
473 | + | let cT = cK(aM(this, af()), cR) | |
474 | + | (cS ++ cT) | |
475 | 475 | } | |
476 | 476 | ||
477 | 477 | ||
478 | - | func cW (cS,cT,cX) = { | |
479 | - | let cY = ba() | |
480 | - | let cZ = parseIntValue(cY[t]) | |
481 | - | let da = parseIntValue(cY[u]) | |
482 | - | let db = cP(cZ, da, cS, cT) | |
483 | - | let bO = D(cS, cZ) | |
484 | - | let bN = D(cT, da) | |
485 | - | let dc = D(cX, b) | |
486 | - | let dd = bM(bO, dc) | |
487 | - | let de = bM(bN, dc) | |
488 | - | [db, dd, de] | |
478 | + | func cU (cV,cW,cX,cY) = { | |
479 | + | let cZ = D(cX, cV) | |
480 | + | let da = D(cY, cW) | |
481 | + | bM(da, cZ) | |
489 | 482 | } | |
490 | 483 | ||
491 | 484 | ||
492 | - | func df (cS,cT,cX) = { | |
493 | - | let dg = cW(cS, cT, cX) | |
494 | - | [H(dg[0], b), H(dg[1], b), H(dg[2], b)] | |
485 | + | func db (cX,cY,dc) = { | |
486 | + | let dd = ba() | |
487 | + | let de = parseIntValue(dd[t]) | |
488 | + | let df = parseIntValue(dd[u]) | |
489 | + | let dg = cU(de, df, cX, cY) | |
490 | + | let bO = D(cX, de) | |
491 | + | let bN = D(cY, df) | |
492 | + | let dh = D(dc, b) | |
493 | + | let di = bM(bO, dh) | |
494 | + | let dj = bM(bN, dh) | |
495 | + | [dg, di, dj] | |
495 | 496 | } | |
496 | 497 | ||
497 | 498 | ||
498 | - | func dh (di,dj,dk,ab) = { | |
499 | - | let cY = ba() | |
500 | - | let dl = cY[q] | |
501 | - | let dm = cY[r] | |
502 | - | let dn = cY[s] | |
503 | - | let cQ = parseIntValue(cY[t]) | |
504 | - | let cR = parseIntValue(cY[u]) | |
505 | - | let do = cY[p] | |
506 | - | let dp = valueOrErrorMessage(assetInfo(fromBase58String(dl)), (("Asset " + dl) + " doesn't exist")).quantity | |
507 | - | if ((dl != dj)) | |
499 | + | func dk (cX,cY,dc) = { | |
500 | + | let dl = db(cX, cY, dc) | |
501 | + | [H(dl[0], b), H(dl[1], b), H(dl[2], b)] | |
502 | + | } | |
503 | + | ||
504 | + | ||
505 | + | func dm (dn,do,dp,ab) = { | |
506 | + | let dd = ba() | |
507 | + | let dq = dd[q] | |
508 | + | let dr = dd[r] | |
509 | + | let ds = dd[s] | |
510 | + | let cV = parseIntValue(dd[t]) | |
511 | + | let cW = parseIntValue(dd[u]) | |
512 | + | let dt = dd[p] | |
513 | + | let du = valueOrErrorMessage(assetInfo(fromBase58String(dq)), (("Asset " + dq) + " doesn't exist")).quantity | |
514 | + | if ((dq != do)) | |
508 | 515 | then throw("Invalid asset passed.") | |
509 | 516 | else { | |
510 | - | let dq = bJ(dm) | |
511 | - | let dr = D(dq, cQ) | |
512 | - | let ds = bJ(dn) | |
513 | - | let dt = D(ds, cR) | |
514 | - | let du = bM(dt, dr) | |
515 | - | let dv = H(du, b) | |
516 | - | let dw = D(dk, b) | |
517 | - | let dx = D(dp, b) | |
518 | - | let dy = fraction(dr, dw, dx) | |
519 | - | let dz = fraction(dt, dw, dx) | |
520 | - | let dA = K(dy, cQ, FLOOR) | |
521 | - | let dB = K(dz, cR, FLOOR) | |
522 | - | let dC = cK(dm, dA) | |
523 | - | let dD = cK(dn, dB) | |
524 | - | let dE = if ((di == "")) | |
517 | + | let dv = bJ(dr) | |
518 | + | let dw = D(dv, cV) | |
519 | + | let dx = bJ(ds) | |
520 | + | let dy = D(dx, cW) | |
521 | + | let dz = bM(dy, dw) | |
522 | + | let dA = H(dz, b) | |
523 | + | let dB = D(dp, b) | |
524 | + | let dC = D(du, b) | |
525 | + | let dD = fraction(dw, dB, dC) | |
526 | + | let dE = fraction(dy, dB, dC) | |
527 | + | let dF = K(dD, cV, FLOOR) | |
528 | + | let dG = K(dE, cW, FLOOR) | |
529 | + | let dH = if ((dn == "")) | |
525 | 530 | then nil | |
526 | - | else | |
531 | + | else [ScriptTransfer(ab, dF, if ((dr == "WAVES")) | |
527 | 532 | then unit | |
528 | - | else fromBase58String( | |
533 | + | else fromBase58String(dr)), ScriptTransfer(ab, dG, if ((ds == "WAVES")) | |
529 | 534 | then unit | |
530 | - | else fromBase58String( | |
531 | - | $Tuple10( | |
535 | + | else fromBase58String(ds)), StringEntry(ad(toString(ab), dn), bF(dF, dG, dp, dA, height, lastBlock.timestamp)), IntegerEntry(W(), dA), IntegerEntry(X(height, lastBlock.timestamp), dA)] | |
536 | + | $Tuple10(dF, dG, dr, ds, dv, dx, du, dz, dt, dH) | |
532 | 537 | } | |
533 | 538 | } | |
534 | 539 | ||
535 | 540 | ||
536 | - | func | |
537 | - | let | |
538 | - | let | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | let | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | if (if (( | |
541 | + | func dI (dn,dJ,dK,dL,dM,dN,ab,dO,dP) = { | |
542 | + | let dd = ba() | |
543 | + | let dq = fromBase58String(dd[q]) | |
544 | + | let dQ = dd[r] | |
545 | + | let dR = dd[s] | |
546 | + | let dS = dd[v] | |
547 | + | let dT = dd[w] | |
548 | + | let de = parseIntValue(dd[t]) | |
549 | + | let df = parseIntValue(dd[u]) | |
550 | + | let dt = dd[p] | |
551 | + | let du = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
552 | + | let dU = toBase58String(valueOrElse(dL, fromBase58String("WAVES"))) | |
553 | + | let dV = toBase58String(valueOrElse(dN, fromBase58String("WAVES"))) | |
554 | + | if (if ((dQ != dU)) | |
550 | 555 | then true | |
551 | - | else ( | |
556 | + | else (dR != dV)) | |
552 | 557 | then throw("Invalid amt or price asset passed.") | |
553 | 558 | else { | |
554 | - | let | |
555 | - | then bJ( | |
556 | - | else (bJ( | |
557 | - | let | |
558 | - | then bJ( | |
559 | - | else (bJ( | |
560 | - | let | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
559 | + | let dv = if (dO) | |
560 | + | then bJ(dQ) | |
561 | + | else (bJ(dQ) - dK) | |
562 | + | let dx = if (dO) | |
563 | + | then bJ(dR) | |
564 | + | else (bJ(dR) - dM) | |
565 | + | let dW = D(dK, de) | |
566 | + | let dX = D(dM, df) | |
567 | + | let dY = bM(dX, dW) | |
568 | + | let dw = D(dv, de) | |
569 | + | let dy = D(dx, df) | |
570 | + | let dZ = if ((du == 0)) | |
566 | 571 | then { | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | $Tuple5(H( | |
572 | + | let dz = e | |
573 | + | let ea = e | |
574 | + | let dh = pow((dW * dX), 0, toBigInt(5), 1, 0, DOWN) | |
575 | + | $Tuple5(H(dh, b), H(dW, de), H(dX, df), bM((dy + dX), (dw + dW)), ea) | |
571 | 576 | } | |
572 | 577 | else { | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | if (if (( | |
577 | - | then ( | |
578 | + | let dz = bM(dy, dw) | |
579 | + | let ea = fraction(R((dz - dY)), d, dz) | |
580 | + | let eb = D(dJ, b) | |
581 | + | if (if ((dz != e)) | |
582 | + | then (ea > eb) | |
578 | 583 | else false) | |
579 | - | then throw(((("Price slippage " + toString( | |
584 | + | then throw(((("Price slippage " + toString(ea)) + " exceeded the passed limit of ") + toString(eb))) | |
580 | 585 | else { | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | then $Tuple2( | |
586 | - | else $Tuple2( | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | $Tuple5(K( | |
586 | + | let dC = D(du, b) | |
587 | + | let ec = fraction(dW, bP(dy, dw, CEILING), d, CEILING) | |
588 | + | let ed = fraction(dX, d, bP(dy, dw, FLOOR), CEILING) | |
589 | + | let ee = if ((ec > dX)) | |
590 | + | then $Tuple2(ed, dX) | |
591 | + | else $Tuple2(dW, ec) | |
592 | + | let ef = ee._1 | |
593 | + | let eg = ee._2 | |
594 | + | let dh = fraction(dC, eg, dy, FLOOR) | |
595 | + | $Tuple5(K(dh, b, FLOOR), K(ef, de, CEILING), K(eg, df, CEILING), dz, ea) | |
591 | 596 | } | |
592 | 597 | } | |
593 | - | let | |
594 | - | let | |
595 | - | let | |
596 | - | let | |
597 | - | let | |
598 | - | if ((0 >= | |
598 | + | let eh = dZ._1 | |
599 | + | let ei = dZ._2 | |
600 | + | let ej = dZ._3 | |
601 | + | let dA = H(dZ._4, b) | |
602 | + | let ek = H(dZ._5, b) | |
603 | + | if ((0 >= eh)) | |
599 | 604 | then throw("Invalid calculations. LP calculated is less than zero.") | |
600 | 605 | else { | |
601 | - | let | |
606 | + | let el = if (!(dP)) | |
602 | 607 | then 0 | |
603 | - | else | |
604 | - | let | |
605 | - | let | |
606 | - | let | |
607 | - | $Tuple13( | |
608 | + | else eh | |
609 | + | let em = (dK - ei) | |
610 | + | let en = (dM - ej) | |
611 | + | let eo = [IntegerEntry(W(), dA), IntegerEntry(X(height, lastBlock.timestamp), dA), StringEntry(aa(ab, dn), bu(ei, ej, el, dA, dJ, ek, height, lastBlock.timestamp, em, en))] | |
612 | + | $Tuple13(eh, el, dA, dv, dx, du, dq, dt, eo, em, en, dL, dN) | |
608 | 613 | } | |
609 | 614 | } | |
610 | 615 | } | |
611 | 616 | ||
612 | 617 | ||
613 | - | func | |
614 | - | let | |
615 | - | let | |
616 | - | let | |
617 | - | if (( | |
618 | + | func ep (eq,er,du) = { | |
619 | + | let es = G(eq, toBigInt(bp)) | |
620 | + | let et = G(er, toBigInt(bq)) | |
621 | + | let eu = fraction(pow((es * et), 0, toBigInt(5), 1, 18, DOWN), g, du) | |
622 | + | if ((du == f)) | |
618 | 623 | then f | |
619 | - | else | |
624 | + | else eu | |
620 | 625 | } | |
621 | 626 | ||
622 | 627 | ||
623 | - | func | |
624 | - | let | |
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | | |
628 | + | func ev (ew,ex,ey) = { | |
629 | + | let ez = (toBigInt(bJ(bf(bn))) - ew) | |
630 | + | let eA = (toBigInt(bJ(bf(bo))) - ex) | |
631 | + | let eB = (toBigInt(value(assetInfo(bm)).quantity) - ey) | |
632 | + | let eC = ep(ez, eA, eB) | |
633 | + | eC | |
629 | 634 | } | |
630 | 635 | ||
631 | 636 | ||
632 | - | func | |
633 | - | let | |
634 | - | let | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
638 | - | $Tuple2( | |
637 | + | func eD (eE,eF,ey) = { | |
638 | + | let ez = (bJ(bf(bn)) + eE) | |
639 | + | let eA = (bJ(bf(bo)) + eF) | |
640 | + | let eB = (value(assetInfo(bm)).quantity + ey) | |
641 | + | let eu = ep(toBigInt(ez), toBigInt(eA), toBigInt(eB)) | |
642 | + | let eG = [IntegerEntry(ak, height), StringEntry(aj, toString(eu))] | |
643 | + | $Tuple2(eG, eu) | |
639 | 644 | } | |
640 | 645 | ||
641 | 646 | ||
642 | - | func | |
647 | + | func eH (eI,eu) = if ((eu >= eI)) | |
643 | 648 | then true | |
644 | - | else aQ(makeString(["updated KLp lower than current KLp", toString( | |
649 | + | else aQ(makeString(["updated KLp lower than current KLp", toString(eI), toString(eu)], " ")) | |
645 | 650 | ||
646 | 651 | ||
647 | - | func | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | let | |
653 | - | then $Tuple2( | |
654 | - | else $Tuple2(-( | |
655 | - | let | |
656 | - | let | |
652 | + | func eJ (eK) = { | |
653 | + | let ez = bJ(bf(bn)) | |
654 | + | let eA = bJ(bf(bo)) | |
655 | + | let eL = eK.amount | |
656 | + | let eM = fraction(eK.amount, eK.price, b, FLOOR) | |
657 | + | let eN = if ((eK.orderType == Buy)) | |
658 | + | then $Tuple2(eL, -(eM)) | |
659 | + | else $Tuple2(-(eL), eM) | |
660 | + | let eE = eN._1 | |
661 | + | let eF = eN._2 | |
657 | 662 | if (if (if (aY()) | |
658 | 663 | then true | |
659 | 664 | else (bl == m)) | |
660 | 665 | then true | |
661 | 666 | else (bl == n)) | |
662 | 667 | then throw("Exchange operations disabled") | |
663 | - | else if (if (( | |
668 | + | else if (if ((eK.assetPair.amountAsset != bn)) | |
664 | 669 | then true | |
665 | - | else ( | |
670 | + | else (eK.assetPair.priceAsset != bo)) | |
666 | 671 | then throw("Wrong order assets.") | |
667 | 672 | else { | |
668 | - | let | |
669 | - | let | |
670 | - | let | |
671 | - | let | |
672 | - | let | |
673 | - | let | |
674 | - | $Tuple2( | |
673 | + | let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aS("invalid kLp")) | |
674 | + | let eP = eD(eE, eF, 0) | |
675 | + | let eQ = eP._1 | |
676 | + | let eR = eP._2 | |
677 | + | let eS = (eR >= eO) | |
678 | + | let eT = makeString(["kLp=", toString(eO), " kLpNew=", toString(eR), " amountAssetBalance=", toString(ez), " priceAssetBalance=", toString(eA), " amountAssetBalanceDelta=", toString(eE), " priceAssetBalanceDelta=", toString(eF), " height=", toString(height)], "") | |
679 | + | $Tuple2(eS, eT) | |
675 | 680 | } | |
676 | 681 | } | |
677 | 682 | ||
678 | 683 | ||
679 | - | func | |
684 | + | func eU (eV) = if ((size(eV.payments) != 1)) | |
680 | 685 | then throw("exactly 1 payment is expected") | |
681 | 686 | else { | |
682 | - | let | |
683 | - | let | |
684 | - | let | |
685 | - | let | |
686 | - | let | |
687 | - | let | |
688 | - | let | |
689 | - | let | |
687 | + | let eW = value(eV.payments[0]) | |
688 | + | let do = value(eW.assetId) | |
689 | + | let eX = eW.amount | |
690 | + | let dZ = dm(toBase58String(eV.transactionId), toBase58String(do), eX, eV.caller) | |
691 | + | let dF = dZ._1 | |
692 | + | let dG = dZ._2 | |
693 | + | let dt = parseIntValue(dZ._9) | |
694 | + | let dH = dZ._10 | |
690 | 695 | if (if (aY()) | |
691 | 696 | then true | |
692 | - | else ( | |
693 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
694 | - | else $Tuple5( | |
697 | + | else (dt == n)) | |
698 | + | then throw(("Get operation is blocked by admin. Status = " + toString(dt))) | |
699 | + | else $Tuple5(dF, dG, eX, do, dH) | |
695 | 700 | } | |
696 | 701 | ||
697 | 702 | ||
698 | - | func | |
703 | + | func eY (eV,dJ,dP) = if ((size(eV.payments) != 2)) | |
699 | 704 | then throw("exactly 2 payments are expected") | |
700 | 705 | else { | |
701 | - | let | |
702 | - | let | |
703 | - | let | |
704 | - | let | |
706 | + | let eZ = value(eV.payments[0]) | |
707 | + | let fa = value(eV.payments[1]) | |
708 | + | let fb = dI(toBase58String(eV.transactionId), dJ, eZ.amount, eZ.assetId, fa.amount, fa.assetId, toString(eV.caller), false, dP) | |
709 | + | let dt = parseIntValue(fb._8) | |
705 | 710 | if (if (if (aY()) | |
706 | 711 | then true | |
707 | - | else ( | |
712 | + | else (dt == l)) | |
708 | 713 | then true | |
709 | - | else ( | |
710 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
711 | - | else | |
714 | + | else (dt == n)) | |
715 | + | then throw(("Put operation is blocked by admin. Status = " + toString(dt))) | |
716 | + | else fb | |
712 | 717 | } | |
713 | 718 | ||
714 | 719 | ||
715 | - | func | |
716 | - | let | |
717 | - | if (( | |
720 | + | func fc (bW) = { | |
721 | + | let fd = invoke(aT, "emit", [bW], nil) | |
722 | + | if ((fd == fd)) | |
718 | 723 | then { | |
719 | - | let | |
720 | - | let bT = | |
724 | + | let fe = { | |
725 | + | let bT = fd | |
721 | 726 | if ($isInstanceOf(bT, "Address")) | |
722 | 727 | then { | |
723 | - | let | |
724 | - | invoke( | |
728 | + | let ff = bT | |
729 | + | invoke(ff, "emit", [bW], nil) | |
725 | 730 | } | |
726 | 731 | else unit | |
727 | 732 | } | |
728 | - | if (( | |
733 | + | if ((fe == fe)) | |
729 | 734 | then bW | |
730 | 735 | else throw("Strict value is not equal to itself.") | |
731 | 736 | } | |
733 | 738 | } | |
734 | 739 | ||
735 | 740 | ||
736 | - | func | |
737 | - | let | |
741 | + | func fg (bW,ai) = { | |
742 | + | let fh = if ((ai == 0)) | |
738 | 743 | then 0 | |
739 | 744 | else fraction(bW, ai, b) | |
740 | - | $Tuple2((bW - | |
745 | + | $Tuple2((bW - fh), fh) | |
741 | 746 | } | |
742 | 747 | ||
743 | 748 | ||
744 | - | func | |
745 | - | let | |
746 | - | let | |
747 | - | let | |
748 | - | let | |
749 | + | func fi (fj,fk,ab,ac) = { | |
750 | + | let fl = (ac == unit) | |
751 | + | let fm = bJ(bf(bn)) | |
752 | + | let fn = bJ(bf(bo)) | |
753 | + | let fo = if ((fk == bn)) | |
749 | 754 | then true | |
750 | - | else if (( | |
755 | + | else if ((fk == bo)) | |
751 | 756 | then false | |
752 | 757 | else aQ("invalid asset") | |
753 | - | let fm = if (fi) | |
754 | - | then $Tuple2(fj, fk) | |
755 | - | else if (fl) | |
756 | - | then $Tuple2((fj - fg), fk) | |
757 | - | else $Tuple2(fj, (fk - fg)) | |
758 | - | let fn = fm._1 | |
759 | - | let fo = fm._2 | |
760 | 758 | let fp = if (fl) | |
761 | - | then $Tuple2(fg, 0) | |
762 | - | else $Tuple2(0, fg) | |
759 | + | then $Tuple2(fm, fn) | |
760 | + | else if (fo) | |
761 | + | then $Tuple2((fm - fj), fn) | |
762 | + | else $Tuple2(fm, (fn - fj)) | |
763 | 763 | let fq = fp._1 | |
764 | 764 | let fr = fp._2 | |
765 | - | let | |
766 | - | | |
767 | - | | |
765 | + | let fs = if (fo) | |
766 | + | then $Tuple2(fj, 0) | |
767 | + | else $Tuple2(0, fj) | |
768 | 768 | let ft = fs._1 | |
769 | - | let fe = fs._2 | |
770 | - | let fu = (fn + eI) | |
771 | - | let fv = (fo + eJ) | |
772 | - | let fw = bM(D(fv, bq), D(fu, bp)) | |
773 | - | let fx = H(fw, b) | |
774 | - | let fy = if (fl) | |
775 | - | then fn | |
776 | - | else fo | |
777 | - | let fz = toBigInt(fy) | |
778 | - | let fA = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
779 | - | let fB = if ((fA > f)) | |
769 | + | let fu = fs._2 | |
770 | + | let eL = fg(ft, aV)._1 | |
771 | + | let eM = fg(fu, aV)._1 | |
772 | + | let fv = fg(fj, aV) | |
773 | + | let fw = fv._1 | |
774 | + | let fh = fv._2 | |
775 | + | let fx = (fq + eL) | |
776 | + | let fy = (fr + eM) | |
777 | + | let fz = bM(D(fy, bq), D(fx, bp)) | |
778 | + | let fA = H(fz, b) | |
779 | + | let fB = if (fo) | |
780 | + | then fq | |
781 | + | else fr | |
782 | + | let fC = toBigInt(fB) | |
783 | + | let fD = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
784 | + | let fE = if ((fD > f)) | |
780 | 785 | then true | |
781 | 786 | else aQ("initial deposit requires all coins") | |
782 | - | if (( | |
787 | + | if ((fE == fE)) | |
783 | 788 | then { | |
784 | - | let | |
785 | - | let | |
786 | - | let | |
789 | + | let fF = toBigInt(fw) | |
790 | + | let fG = max([0, toInt(((fD * (sqrtBigInt((d + ((fF * d) / fC)), 18, 18, DOWN) - d)) / d))]) | |
791 | + | let eo = if (fl) | |
787 | 792 | then nil | |
788 | - | else [IntegerEntry(W(), | |
789 | - | let | |
790 | - | let | |
791 | - | let | |
792 | - | let | |
793 | - | then $Tuple2( | |
794 | - | else $Tuple2( | |
795 | - | let bW = | |
796 | - | let | |
797 | - | let | |
798 | - | fraction(( | |
793 | + | else [IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bu(ft, fu, fG, fA, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
794 | + | let fH = bM(D(fr, bq), D(fq, bp)) | |
795 | + | let fI = H(fH, b) | |
796 | + | let fJ = { | |
797 | + | let fK = if (fo) | |
798 | + | then $Tuple2(ft, fq) | |
799 | + | else $Tuple2(fu, fr) | |
800 | + | let bW = fK._1 | |
801 | + | let fL = fK._2 | |
802 | + | let fM = toInt(fraction(fD, toBigInt((bW / 2)), toBigInt(fL))) | |
803 | + | fraction((fG - fM), b, fM) | |
799 | 804 | } | |
800 | - | $Tuple5( | |
805 | + | $Tuple5(fG, eo, fh, fJ, fo) | |
801 | 806 | } | |
802 | 807 | else throw("Strict value is not equal to itself.") | |
803 | 808 | } | |
804 | 809 | ||
805 | 810 | ||
806 | - | func | |
807 | - | let | |
808 | - | let | |
809 | - | let | |
810 | - | let | |
811 | - | let | |
811 | + | func fN (fO,fw,fk,ab,ac) = { | |
812 | + | let fl = (ac == unit) | |
813 | + | let dd = ba() | |
814 | + | let de = parseIntValue(dd[t]) | |
815 | + | let df = parseIntValue(dd[u]) | |
816 | + | let fP = [if ((fk == bm)) | |
812 | 817 | then true | |
813 | 818 | else aQ("invalid lp asset")] | |
814 | - | if (( | |
819 | + | if ((fP == fP)) | |
815 | 820 | then { | |
816 | - | let | |
821 | + | let fQ = if ((fO == bn)) | |
817 | 822 | then true | |
818 | - | else if (( | |
823 | + | else if ((fO == bo)) | |
819 | 824 | then false | |
820 | 825 | else aQ("invalid asset") | |
821 | - | let | |
826 | + | let fR = if (fQ) | |
822 | 827 | then toBigInt(bJ(bf(bn))) | |
823 | 828 | else toBigInt(bJ(bf(bo))) | |
824 | - | let | |
825 | - | then | |
826 | - | else | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | then | |
831 | - | else | |
832 | - | let | |
833 | - | let | |
834 | - | let | |
835 | - | let | |
836 | - | let | |
837 | - | let | |
838 | - | let | |
839 | - | let | |
840 | - | then $Tuple4( | |
841 | - | else $Tuple4(0, | |
842 | - | let | |
843 | - | let | |
844 | - | let | |
845 | - | let | |
846 | - | let | |
847 | - | let | |
848 | - | let | |
829 | + | let fS = if (fQ) | |
830 | + | then de | |
831 | + | else df | |
832 | + | let fT = bJ(bf(bn)) | |
833 | + | let fU = bJ(bf(bo)) | |
834 | + | let fV = if (fQ) | |
835 | + | then fT | |
836 | + | else fU | |
837 | + | let fW = toBigInt(fV) | |
838 | + | let fD = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
839 | + | let fX = toBigInt(fw) | |
840 | + | let fY = max([0, toInt(((fR * (d - pow((d - ((fX * d) / fD)), 18, h, 0, 18, DOWN))) / d))]) | |
841 | + | let fZ = fg(fY, aX) | |
842 | + | let ga = fZ._1 | |
843 | + | let fh = fZ._2 | |
844 | + | let gb = if (fQ) | |
845 | + | then $Tuple4(ga, 0, (fT - fY), fU) | |
846 | + | else $Tuple4(0, ga, fT, (fU - fY)) | |
847 | + | let gc = gb._1 | |
848 | + | let gd = gb._2 | |
849 | + | let ge = gb._3 | |
850 | + | let gf = gb._4 | |
851 | + | let fz = bM(D(gf, bq), D(ge, bp)) | |
852 | + | let fA = H(fz, b) | |
853 | + | let eo = if (fl) | |
849 | 854 | then nil | |
850 | - | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bF( | |
851 | - | let | |
852 | - | let | |
853 | - | let | |
854 | - | let | |
855 | - | fraction(( | |
855 | + | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bF(gc, gd, fw, fA, height, lastBlock.timestamp)), IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA)] | |
856 | + | let fH = bM(D(fU, bq), D(fT, bp)) | |
857 | + | let fI = H(fH, b) | |
858 | + | let fJ = { | |
859 | + | let gg = (toInt(fraction(fR, fX, fD)) * 2) | |
860 | + | fraction((ga - gg), b, gg) | |
856 | 861 | } | |
857 | - | $Tuple5( | |
862 | + | $Tuple5(ga, eo, fh, fJ, fQ) | |
858 | 863 | } | |
859 | 864 | else throw("Strict value is not equal to itself.") | |
860 | 865 | } | |
861 | 866 | ||
862 | 867 | ||
863 | - | func | |
868 | + | func gh () = { | |
864 | 869 | let bT = getString(U()) | |
865 | 870 | if ($isInstanceOf(bT, "String")) | |
866 | 871 | then { | |
867 | - | let | |
868 | - | fromBase58String( | |
872 | + | let gi = bT | |
873 | + | fromBase58String(gi) | |
869 | 874 | } | |
870 | 875 | else if ($isInstanceOf(bT, "Unit")) | |
871 | 876 | then unit | |
873 | 878 | } | |
874 | 879 | ||
875 | 880 | ||
876 | - | func | |
881 | + | func gj () = { | |
877 | 882 | let bT = getString(V()) | |
878 | 883 | if ($isInstanceOf(bT, "String")) | |
879 | 884 | then { | |
880 | - | let | |
881 | - | fromBase58String( | |
885 | + | let gi = bT | |
886 | + | fromBase58String(gi) | |
882 | 887 | } | |
883 | 888 | else if ($isInstanceOf(bT, "Unit")) | |
884 | 889 | then unit | |
886 | 891 | } | |
887 | 892 | ||
888 | 893 | ||
889 | - | func | |
890 | - | let bT = | |
894 | + | func gk (eV) = { | |
895 | + | let bT = gh() | |
891 | 896 | if ($isInstanceOf(bT, "ByteVector")) | |
892 | 897 | then { | |
893 | - | let | |
894 | - | ( | |
898 | + | let gl = bT | |
899 | + | (eV.callerPublicKey == gl) | |
895 | 900 | } | |
896 | 901 | else if ($isInstanceOf(bT, "Unit")) | |
897 | - | then ( | |
902 | + | then (eV.caller == this) | |
898 | 903 | else throw("Match error") | |
899 | 904 | } | |
900 | 905 | ||
901 | 906 | ||
902 | - | func | |
903 | - | let | |
904 | - | let bT = | |
907 | + | func gm (eV) = { | |
908 | + | let gn = throw("Permission denied") | |
909 | + | let bT = gh() | |
905 | 910 | if ($isInstanceOf(bT, "ByteVector")) | |
906 | 911 | then { | |
907 | - | let | |
908 | - | if (( | |
912 | + | let gl = bT | |
913 | + | if ((eV.callerPublicKey == gl)) | |
909 | 914 | then true | |
910 | - | else | |
915 | + | else gn | |
911 | 916 | } | |
912 | 917 | else if ($isInstanceOf(bT, "Unit")) | |
913 | - | then if (( | |
918 | + | then if ((eV.caller == this)) | |
914 | 919 | then true | |
915 | - | else | |
920 | + | else gn | |
916 | 921 | else throw("Match error") | |
917 | 922 | } | |
918 | 923 | ||
919 | 924 | ||
920 | - | @Callable( | |
925 | + | @Callable(eV) | |
921 | 926 | func rebalance () = (cD(aM(this, ae())) ++ cD(aM(this, af()))) | |
922 | 927 | ||
923 | 928 | ||
924 | 929 | ||
925 | - | @Callable( | |
926 | - | func calculateAmountOutForSwapREADONLY ( | |
927 | - | let | |
930 | + | @Callable(eV) | |
931 | + | func calculateAmountOutForSwapREADONLY (go,gp,gq) = { | |
932 | + | let gr = if ((gp == false)) | |
928 | 933 | then { | |
929 | - | let | |
930 | - | let | |
931 | - | $Tuple2( | |
934 | + | let gs = aM(this, af()) | |
935 | + | let gt = aM(this, ae()) | |
936 | + | $Tuple2(gs, gt) | |
932 | 937 | } | |
933 | 938 | else { | |
934 | - | let | |
935 | - | let | |
936 | - | $Tuple2( | |
939 | + | let gs = aM(this, ae()) | |
940 | + | let gt = aM(this, af()) | |
941 | + | $Tuple2(gs, gt) | |
937 | 942 | } | |
938 | - | let | |
939 | - | let | |
940 | - | let | |
941 | - | let | |
942 | - | let | |
943 | - | let | |
944 | - | let | |
945 | - | let | |
943 | + | let gs = gr._1 | |
944 | + | let gt = gr._2 | |
945 | + | let gu = bJ(gt) | |
946 | + | let gv = bJ(gs) | |
947 | + | let gw = fraction(gv, go, (gu + go)) | |
948 | + | let gx = (toBigInt(gu) * toBigInt(gv)) | |
949 | + | let gy = (((toBigInt(bJ(gt)) + toBigInt(go)) + toBigInt(gq)) * (toBigInt(bJ(gs)) - toBigInt(gw))) | |
950 | + | let gz = if ((gy >= gx)) | |
946 | 951 | then true | |
947 | 952 | else throw("new K is fewer error") | |
948 | - | if (( | |
949 | - | then $Tuple2(nil, | |
953 | + | if ((gz == gz)) | |
954 | + | then $Tuple2(nil, gw) | |
950 | 955 | else throw("Strict value is not equal to itself.") | |
951 | 956 | } | |
952 | 957 | ||
953 | 958 | ||
954 | 959 | ||
955 | - | @Callable( | |
956 | - | func calculateAmountOutForSwapAndSendTokens ( | |
957 | - | let | |
960 | + | @Callable(eV) | |
961 | + | func calculateAmountOutForSwapAndSendTokens (go,gp,gA,gB,gq) = { | |
962 | + | let gC = { | |
958 | 963 | let aW = invoke(aT, "getSwapContractREADONLY", nil, nil) | |
959 | 964 | if ($isInstanceOf(aW, "String")) | |
960 | 965 | then aW | |
961 | 966 | else throw(($getType(aW) + " couldn't be cast to String")) | |
962 | 967 | } | |
963 | - | let | |
968 | + | let fP = [if ((value(eV.payments[0]).amount >= go)) | |
964 | 969 | then true | |
965 | - | else aQ("Wrong amount"), if (( | |
970 | + | else aQ("Wrong amount"), if ((eV.caller == addressFromStringValue(gC))) | |
966 | 971 | then true | |
967 | 972 | else aQ("Permission denied")] | |
968 | - | if (( | |
973 | + | if ((fP == fP)) | |
969 | 974 | then { | |
970 | - | let | |
971 | - | let | |
972 | - | let | |
975 | + | let eW = value(eV.payments[0]) | |
976 | + | let gt = bf(eW.assetId) | |
977 | + | let gs = if ((gp == false)) | |
973 | 978 | then aM(this, af()) | |
974 | 979 | else aM(this, ae()) | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | let | |
980 | - | let | |
980 | + | let gu = (bJ(gt) - value(eV.payments[0]).amount) | |
981 | + | let gv = bJ(gs) | |
982 | + | let gw = fraction(gv, go, (gu + go)) | |
983 | + | let gx = (toBigInt(gu) * toBigInt(gv)) | |
984 | + | let gy = ((toBigInt(bJ(gt)) + toBigInt(gq)) * (toBigInt(bJ(gs)) - toBigInt(gw))) | |
985 | + | let gz = if ((gy >= gx)) | |
981 | 986 | then true | |
982 | 987 | else throw("new K is fewer error") | |
983 | - | if (( | |
988 | + | if ((gz == gz)) | |
984 | 989 | then { | |
985 | - | let | |
990 | + | let gD = if ((gw >= gA)) | |
986 | 991 | then true | |
987 | 992 | else throw("Exchange result is fewer coins than expected") | |
988 | - | if (( | |
993 | + | if ((gD == gD)) | |
989 | 994 | then { | |
990 | - | let | |
991 | - | if (( | |
995 | + | let gE = cD(gt) | |
996 | + | if ((gE == gE)) | |
992 | 997 | then { | |
993 | - | let | |
994 | - | if (( | |
995 | - | then $Tuple2((( | |
998 | + | let gF = cK(gs, gw) | |
999 | + | if ((gF == gF)) | |
1000 | + | then $Tuple2(((gF ++ gE) ++ [ScriptTransfer(addressFromStringValue(gB), gw, bd(gs))]), gw) | |
996 | 1001 | else throw("Strict value is not equal to itself.") | |
997 | 1002 | } | |
998 | 1003 | else throw("Strict value is not equal to itself.") | |
1006 | 1011 | ||
1007 | 1012 | ||
1008 | 1013 | ||
1009 | - | @Callable( | |
1010 | - | func setManager ( | |
1011 | - | let | |
1012 | - | if (( | |
1014 | + | @Callable(eV) | |
1015 | + | func setManager (gG) = { | |
1016 | + | let gH = gm(eV) | |
1017 | + | if ((gH == gH)) | |
1013 | 1018 | then { | |
1014 | - | let | |
1015 | - | if (( | |
1016 | - | then [StringEntry(V(), | |
1019 | + | let gI = fromBase58String(gG) | |
1020 | + | if ((gI == gI)) | |
1021 | + | then [StringEntry(V(), gG)] | |
1017 | 1022 | else throw("Strict value is not equal to itself.") | |
1018 | 1023 | } | |
1019 | 1024 | else throw("Strict value is not equal to itself.") | |
1021 | 1026 | ||
1022 | 1027 | ||
1023 | 1028 | ||
1024 | - | @Callable( | |
1029 | + | @Callable(eV) | |
1025 | 1030 | func confirmManager () = { | |
1026 | - | let | |
1027 | - | let | |
1031 | + | let gJ = gj() | |
1032 | + | let gK = if (isDefined(gJ)) | |
1028 | 1033 | then true | |
1029 | 1034 | else throw("No pending manager") | |
1030 | - | if (( | |
1035 | + | if ((gK == gK)) | |
1031 | 1036 | then { | |
1032 | - | let | |
1037 | + | let gL = if ((eV.callerPublicKey == value(gJ))) | |
1033 | 1038 | then true | |
1034 | 1039 | else throw("You are not pending manager") | |
1035 | - | if (( | |
1036 | - | then [StringEntry(U(), toBase58String(value( | |
1040 | + | if ((gL == gL)) | |
1041 | + | then [StringEntry(U(), toBase58String(value(gJ))), DeleteEntry(V())] | |
1037 | 1042 | else throw("Strict value is not equal to itself.") | |
1038 | 1043 | } | |
1039 | 1044 | else throw("Strict value is not equal to itself.") | |
1041 | 1046 | ||
1042 | 1047 | ||
1043 | 1048 | ||
1044 | - | @Callable( | |
1045 | - | func put ( | |
1049 | + | @Callable(eV) | |
1050 | + | func put (dJ,gM) = if ((0 > dJ)) | |
1046 | 1051 | then throw("Invalid slippageTolerance passed") | |
1047 | 1052 | else { | |
1048 | - | let | |
1049 | - | let | |
1050 | - | let | |
1051 | - | let | |
1052 | - | let | |
1053 | - | let | |
1054 | - | let | |
1055 | - | let | |
1056 | - | let | |
1057 | - | let | |
1058 | - | let | |
1059 | - | if (( | |
1053 | + | let fb = eY(eV, dJ, true) | |
1054 | + | let el = fb._2 | |
1055 | + | let dq = fb._7 | |
1056 | + | let dH = fb._9 | |
1057 | + | let em = fb._10 | |
1058 | + | let en = fb._11 | |
1059 | + | let gN = fb._12 | |
1060 | + | let gO = fb._13 | |
1061 | + | let eZ = toBigInt(value(eV.payments[0]).amount) | |
1062 | + | let fa = toBigInt(value(eV.payments[1]).amount) | |
1063 | + | let eC = ev(eZ, fa, toBigInt(0)) | |
1064 | + | if ((eC == eC)) | |
1060 | 1065 | then { | |
1061 | - | let | |
1062 | - | if (( | |
1066 | + | let fd = invoke(aT, "emit", [el], nil) | |
1067 | + | if ((fd == fd)) | |
1063 | 1068 | then { | |
1064 | - | let | |
1065 | - | let bT = | |
1069 | + | let fe = { | |
1070 | + | let bT = fd | |
1066 | 1071 | if ($isInstanceOf(bT, "Address")) | |
1067 | 1072 | then { | |
1068 | - | let | |
1069 | - | invoke( | |
1073 | + | let ff = bT | |
1074 | + | invoke(ff, "emit", [el], nil) | |
1070 | 1075 | } | |
1071 | 1076 | else unit | |
1072 | 1077 | } | |
1073 | - | if (( | |
1078 | + | if ((fe == fe)) | |
1074 | 1079 | then { | |
1075 | - | let | |
1076 | - | then invoke(bt, "put", nil, [AttachedPayment( | |
1080 | + | let gP = if ((em > 0)) | |
1081 | + | then invoke(bt, "put", nil, [AttachedPayment(gN, em)]) | |
1077 | 1082 | else nil | |
1078 | - | if (( | |
1083 | + | if ((gP == gP)) | |
1079 | 1084 | then { | |
1080 | - | let | |
1081 | - | then invoke(bt, "put", nil, [AttachedPayment( | |
1085 | + | let gQ = if ((en > 0)) | |
1086 | + | then invoke(bt, "put", nil, [AttachedPayment(gO, en)]) | |
1082 | 1087 | else nil | |
1083 | - | if (( | |
1088 | + | if ((gQ == gQ)) | |
1084 | 1089 | then { | |
1085 | - | let | |
1090 | + | let gR = if (gM) | |
1086 | 1091 | then { | |
1087 | - | let | |
1088 | - | if (( | |
1092 | + | let gS = invoke(bs, "stake", nil, [AttachedPayment(dq, el)]) | |
1093 | + | if ((gS == gS)) | |
1089 | 1094 | then nil | |
1090 | 1095 | else throw("Strict value is not equal to itself.") | |
1091 | 1096 | } | |
1092 | - | else [ScriptTransfer( | |
1093 | - | let | |
1094 | - | if (( | |
1097 | + | else [ScriptTransfer(eV.caller, el, dq)] | |
1098 | + | let gT = eD(0, 0, 0) | |
1099 | + | if ((gT == gT)) | |
1095 | 1100 | then { | |
1096 | - | let | |
1097 | - | let | |
1098 | - | let | |
1099 | - | if (( | |
1101 | + | let eu = gT._2 | |
1102 | + | let gU = gT._1 | |
1103 | + | let gV = eH(eC, eu) | |
1104 | + | if ((gV == gV)) | |
1100 | 1105 | then { | |
1101 | - | let | |
1102 | - | if (( | |
1103 | - | then (( | |
1106 | + | let gW = invoke(this, "rebalance", nil, nil) | |
1107 | + | if ((gW == gW)) | |
1108 | + | then ((dH ++ gR) ++ gU) | |
1104 | 1109 | else throw("Strict value is not equal to itself.") | |
1105 | 1110 | } | |
1106 | 1111 | else throw("Strict value is not equal to itself.") | |
1120 | 1125 | ||
1121 | 1126 | ||
1122 | 1127 | ||
1123 | - | @Callable( | |
1124 | - | func putForFree ( | |
1128 | + | @Callable(eV) | |
1129 | + | func putForFree (gX) = if ((0 > gX)) | |
1125 | 1130 | then throw("Invalid value passed") | |
1126 | 1131 | else { | |
1127 | - | let | |
1128 | - | let | |
1129 | - | let | |
1130 | - | let | |
1131 | - | let | |
1132 | - | if (( | |
1132 | + | let fb = eY(eV, gX, false) | |
1133 | + | let dH = fb._9 | |
1134 | + | let eZ = toBigInt(value(eV.payments[0]).amount) | |
1135 | + | let fa = toBigInt(value(eV.payments[1]).amount) | |
1136 | + | let eC = ev(eZ, fa, toBigInt(0)) | |
1137 | + | if ((eC == eC)) | |
1133 | 1138 | then { | |
1134 | - | let | |
1135 | - | let | |
1136 | - | let | |
1137 | - | let | |
1138 | - | if (( | |
1139 | - | then ( | |
1139 | + | let gY = eD(0, 0, 0) | |
1140 | + | let gU = gY._1 | |
1141 | + | let eu = gY._2 | |
1142 | + | let gV = eH(eC, eu) | |
1143 | + | if ((gV == gV)) | |
1144 | + | then (dH ++ gU) | |
1140 | 1145 | else throw("Strict value is not equal to itself.") | |
1141 | 1146 | } | |
1142 | 1147 | else throw("Strict value is not equal to itself.") | |
1144 | 1149 | ||
1145 | 1150 | ||
1146 | 1151 | ||
1147 | - | @Callable( | |
1148 | - | func putOneTkn ( | |
1149 | - | let | |
1152 | + | @Callable(eV) | |
1153 | + | func putOneTkn (gZ,ha) = { | |
1154 | + | let hb = { | |
1150 | 1155 | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1151 | 1156 | if ($isInstanceOf(aW, "Boolean")) | |
1152 | 1157 | then aW | |
1153 | 1158 | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1154 | 1159 | } | |
1155 | - | let | |
1160 | + | let hc = if (if (if (aY()) | |
1156 | 1161 | then true | |
1157 | 1162 | else (bl == l)) | |
1158 | 1163 | then true | |
1159 | 1164 | else (bl == n)) | |
1160 | 1165 | then true | |
1161 | - | else | |
1162 | - | let | |
1166 | + | else hb | |
1167 | + | let fP = [if (if (!(hc)) | |
1163 | 1168 | then true | |
1164 | - | else | |
1169 | + | else gk(eV)) | |
1165 | 1170 | then true | |
1166 | - | else aQ("put operation is blocked by admin"), if ((size( | |
1171 | + | else aQ("put operation is blocked by admin"), if ((size(eV.payments) == 1)) | |
1167 | 1172 | then true | |
1168 | 1173 | else aQ("exactly 1 payment are expected")] | |
1169 | - | if (( | |
1174 | + | if ((fP == fP)) | |
1170 | 1175 | then { | |
1171 | - | let | |
1172 | - | let | |
1173 | - | let | |
1174 | - | let | |
1175 | - | then | |
1176 | - | else if (( | |
1177 | - | then | |
1176 | + | let hd = eV.payments[0] | |
1177 | + | let fk = hd.assetId | |
1178 | + | let fj = hd.amount | |
1179 | + | let eC = if ((fk == bn)) | |
1180 | + | then ev(toBigInt(fj), toBigInt(0), toBigInt(0)) | |
1181 | + | else if ((fk == bo)) | |
1182 | + | then ev(toBigInt(0), toBigInt(fj), toBigInt(0)) | |
1178 | 1183 | else aQ("payment asset is not supported") | |
1179 | - | if (( | |
1184 | + | if ((eC == eC)) | |
1180 | 1185 | then { | |
1181 | - | let ab = | |
1182 | - | let ac = | |
1183 | - | let | |
1184 | - | if (( | |
1186 | + | let ab = eV.caller | |
1187 | + | let ac = eV.transactionId | |
1188 | + | let he = fi(fj, fk, ab, ac) | |
1189 | + | if ((he == he)) | |
1185 | 1190 | then { | |
1186 | - | let | |
1187 | - | let | |
1188 | - | let | |
1189 | - | let | |
1190 | - | let | |
1191 | - | let | |
1192 | - | then ( | |
1191 | + | let fo = he._5 | |
1192 | + | let hf = he._4 | |
1193 | + | let fh = he._3 | |
1194 | + | let eo = he._2 | |
1195 | + | let hg = he._1 | |
1196 | + | let hh = if (if ((gZ > 0)) | |
1197 | + | then (gZ > hg) | |
1193 | 1198 | else false) | |
1194 | - | then aQ(makeString(["amount to receive is less than ", toString( | |
1195 | - | else | |
1196 | - | let | |
1197 | - | if (( | |
1199 | + | then aQ(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1200 | + | else hg | |
1201 | + | let fd = fc(hh) | |
1202 | + | if ((fd == fd)) | |
1198 | 1203 | then { | |
1199 | - | let | |
1204 | + | let gR = if (ha) | |
1200 | 1205 | then { | |
1201 | - | let | |
1202 | - | if (( | |
1206 | + | let hi = invoke(bs, "stake", nil, [AttachedPayment(bm, hh)]) | |
1207 | + | if ((hi == hi)) | |
1203 | 1208 | then nil | |
1204 | 1209 | else throw("Strict value is not equal to itself.") | |
1205 | 1210 | } | |
1206 | - | else [ScriptTransfer( | |
1207 | - | let | |
1208 | - | then [ScriptTransfer(aU, | |
1211 | + | else [ScriptTransfer(eV.caller, hh, bm)] | |
1212 | + | let hj = if ((fh > 0)) | |
1213 | + | then [ScriptTransfer(aU, fh, fk)] | |
1209 | 1214 | else nil | |
1210 | - | let | |
1215 | + | let hk = if ((this == aU)) | |
1211 | 1216 | then $Tuple2(0, 0) | |
1212 | - | else if ( | |
1213 | - | then $Tuple2(-( | |
1214 | - | else $Tuple2(0, -( | |
1215 | - | let | |
1216 | - | let | |
1217 | - | let | |
1218 | - | let | |
1219 | - | let | |
1220 | - | let | |
1221 | - | let | |
1222 | - | if (( | |
1217 | + | else if (fo) | |
1218 | + | then $Tuple2(-(fh), 0) | |
1219 | + | else $Tuple2(0, -(fh)) | |
1220 | + | let eE = hk._1 | |
1221 | + | let eF = hk._2 | |
1222 | + | let hl = eD(eE, eF, 0) | |
1223 | + | let gU = hl._1 | |
1224 | + | let eu = hl._2 | |
1225 | + | let eO = value(getString(aj)) | |
1226 | + | let gV = eH(eC, eu) | |
1227 | + | if ((gV == gV)) | |
1223 | 1228 | then { | |
1224 | - | let | |
1225 | - | if (( | |
1226 | - | then $Tuple2(((( | |
1229 | + | let gW = invoke(this, "rebalance", nil, nil) | |
1230 | + | if ((gW == gW)) | |
1231 | + | then $Tuple2((((eo ++ gR) ++ hj) ++ gU), hh) | |
1227 | 1232 | else throw("Strict value is not equal to itself.") | |
1228 | 1233 | } | |
1229 | 1234 | else throw("Strict value is not equal to itself.") | |
1239 | 1244 | ||
1240 | 1245 | ||
1241 | 1246 | ||
1242 | - | @Callable( | |
1243 | - | func putOneTknREADONLY ( | |
1244 | - | let | |
1245 | - | let | |
1246 | - | let | |
1247 | - | let | |
1248 | - | let | |
1249 | - | let | |
1250 | - | $Tuple2(nil, $Tuple3( | |
1247 | + | @Callable(eV) | |
1248 | + | func putOneTknREADONLY (fk,fj) = { | |
1249 | + | let hm = fi(fj, bd(fk), unit, unit) | |
1250 | + | let hg = hm._1 | |
1251 | + | let eo = hm._2 | |
1252 | + | let fh = hm._3 | |
1253 | + | let hf = hm._4 | |
1254 | + | let fo = hm._5 | |
1255 | + | $Tuple2(nil, $Tuple3(hg, fh, hf)) | |
1251 | 1256 | } | |
1252 | 1257 | ||
1253 | 1258 | ||
1254 | 1259 | ||
1255 | - | @Callable( | |
1256 | - | func getOneTkn ( | |
1257 | - | let | |
1260 | + | @Callable(eV) | |
1261 | + | func getOneTkn (hn,gZ) = { | |
1262 | + | let hb = { | |
1258 | 1263 | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1259 | 1264 | if ($isInstanceOf(aW, "Boolean")) | |
1260 | 1265 | then aW | |
1261 | 1266 | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1262 | 1267 | } | |
1263 | - | let | |
1268 | + | let ho = if (if (aY()) | |
1264 | 1269 | then true | |
1265 | 1270 | else (bl == n)) | |
1266 | 1271 | then true | |
1267 | - | else | |
1268 | - | let | |
1272 | + | else hb | |
1273 | + | let fP = [if (if (!(ho)) | |
1269 | 1274 | then true | |
1270 | - | else | |
1275 | + | else gk(eV)) | |
1271 | 1276 | then true | |
1272 | - | else aQ("get operation is blocked by admin"), if ((size( | |
1277 | + | else aQ("get operation is blocked by admin"), if ((size(eV.payments) == 1)) | |
1273 | 1278 | then true | |
1274 | 1279 | else aQ("exactly 1 payment are expected")] | |
1275 | - | if (( | |
1280 | + | if ((fP == fP)) | |
1276 | 1281 | then { | |
1277 | - | let | |
1278 | - | let | |
1279 | - | let | |
1280 | - | let | |
1281 | - | let | |
1282 | - | if (( | |
1282 | + | let fO = bd(hn) | |
1283 | + | let hd = eV.payments[0] | |
1284 | + | let fk = hd.assetId | |
1285 | + | let fw = hd.amount | |
1286 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1287 | + | if ((eC == eC)) | |
1283 | 1288 | then { | |
1284 | - | let ab = | |
1285 | - | let ac = | |
1286 | - | let | |
1287 | - | if (( | |
1289 | + | let ab = eV.caller | |
1290 | + | let ac = eV.transactionId | |
1291 | + | let hp = fN(fO, fw, fk, ab, ac) | |
1292 | + | if ((hp == hp)) | |
1288 | 1293 | then { | |
1289 | - | let | |
1290 | - | let | |
1291 | - | let | |
1292 | - | let | |
1293 | - | let | |
1294 | - | let bW = if (if (( | |
1295 | - | then ( | |
1294 | + | let fQ = hp._5 | |
1295 | + | let hf = hp._4 | |
1296 | + | let fh = hp._3 | |
1297 | + | let eo = hp._2 | |
1298 | + | let hq = hp._1 | |
1299 | + | let bW = if (if ((gZ > 0)) | |
1300 | + | then (gZ > hq) | |
1296 | 1301 | else false) | |
1297 | - | then aQ(makeString(["amount to receive is less than ", toString( | |
1298 | - | else | |
1299 | - | let | |
1300 | - | if (( | |
1302 | + | then aQ(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1303 | + | else hq | |
1304 | + | let hr = invoke(aT, "burn", [fw], [AttachedPayment(fk, fw)]) | |
1305 | + | if ((hr == hr)) | |
1301 | 1306 | then { | |
1302 | - | let | |
1303 | - | let | |
1304 | - | let | |
1305 | - | then [ScriptTransfer(aU, | |
1307 | + | let gF = cK(hn, bW) | |
1308 | + | let hs = [ScriptTransfer(ab, bW, fO)] | |
1309 | + | let hj = if ((fh > 0)) | |
1310 | + | then [ScriptTransfer(aU, fh, fO)] | |
1306 | 1311 | else nil | |
1307 | - | let | |
1308 | - | let | |
1312 | + | let ht = { | |
1313 | + | let hu = if ((this == aU)) | |
1309 | 1314 | then 0 | |
1310 | - | else | |
1311 | - | if ( | |
1312 | - | then $Tuple2(-((bW + | |
1313 | - | else $Tuple2(0, -((bW + | |
1315 | + | else fh | |
1316 | + | if (fQ) | |
1317 | + | then $Tuple2(-((bW + hu)), 0) | |
1318 | + | else $Tuple2(0, -((bW + hu))) | |
1314 | 1319 | } | |
1315 | - | let | |
1316 | - | let | |
1317 | - | let | |
1318 | - | let | |
1319 | - | let | |
1320 | - | let | |
1321 | - | if (( | |
1322 | - | then $Tuple2((((( | |
1320 | + | let eE = ht._1 | |
1321 | + | let eF = ht._2 | |
1322 | + | let hv = eD(eE, eF, 0) | |
1323 | + | let gU = hv._1 | |
1324 | + | let eu = hv._2 | |
1325 | + | let gV = eH(eC, eu) | |
1326 | + | if ((gV == gV)) | |
1327 | + | then $Tuple2(((((eo ++ gF) ++ hs) ++ hj) ++ gU), bW) | |
1323 | 1328 | else throw("Strict value is not equal to itself.") | |
1324 | 1329 | } | |
1325 | 1330 | else throw("Strict value is not equal to itself.") | |
1333 | 1338 | ||
1334 | 1339 | ||
1335 | 1340 | ||
1336 | - | @Callable( | |
1337 | - | func getOneTknREADONLY ( | |
1338 | - | let | |
1339 | - | let | |
1340 | - | let | |
1341 | - | let | |
1342 | - | let | |
1343 | - | let | |
1344 | - | $Tuple2(nil, $Tuple3( | |
1341 | + | @Callable(eV) | |
1342 | + | func getOneTknREADONLY (fO,fw) = { | |
1343 | + | let hw = fN(bd(fO), fw, bm, unit, unit) | |
1344 | + | let hq = hw._1 | |
1345 | + | let eo = hw._2 | |
1346 | + | let fh = hw._3 | |
1347 | + | let hf = hw._4 | |
1348 | + | let fQ = hw._5 | |
1349 | + | $Tuple2(nil, $Tuple3(hq, fh, hf)) | |
1345 | 1350 | } | |
1346 | 1351 | ||
1347 | 1352 | ||
1348 | 1353 | ||
1349 | - | @Callable( | |
1350 | - | func unstakeAndGetOneTkn ( | |
1351 | - | let | |
1354 | + | @Callable(eV) | |
1355 | + | func unstakeAndGetOneTkn (hx,hn,gZ) = { | |
1356 | + | let hb = { | |
1352 | 1357 | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1353 | 1358 | if ($isInstanceOf(aW, "Boolean")) | |
1354 | 1359 | then aW | |
1355 | 1360 | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1356 | 1361 | } | |
1357 | - | let | |
1362 | + | let ho = if (if (aY()) | |
1358 | 1363 | then true | |
1359 | 1364 | else (bl == n)) | |
1360 | 1365 | then true | |
1361 | - | else | |
1362 | - | let | |
1366 | + | else hb | |
1367 | + | let fP = [if (if (!(ho)) | |
1363 | 1368 | then true | |
1364 | - | else | |
1369 | + | else gk(eV)) | |
1365 | 1370 | then true | |
1366 | - | else aQ("get operation is blocked by admin"), if ((size( | |
1371 | + | else aQ("get operation is blocked by admin"), if ((size(eV.payments) == 0)) | |
1367 | 1372 | then true | |
1368 | 1373 | else aQ("no payments are expected")] | |
1369 | - | if (( | |
1374 | + | if ((fP == fP)) | |
1370 | 1375 | then { | |
1371 | - | let | |
1372 | - | let ab = | |
1373 | - | let ac = | |
1374 | - | let | |
1375 | - | if (( | |
1376 | + | let fO = bd(hn) | |
1377 | + | let ab = eV.caller | |
1378 | + | let ac = eV.transactionId | |
1379 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1380 | + | if ((eC == eC)) | |
1376 | 1381 | then { | |
1377 | - | let | |
1378 | - | if (( | |
1382 | + | let hy = invoke(bs, "unstake", [toBase58String(bm), hx], nil) | |
1383 | + | if ((hy == hy)) | |
1379 | 1384 | then { | |
1380 | - | let | |
1381 | - | if (( | |
1385 | + | let hz = fN(fO, hx, bm, ab, ac) | |
1386 | + | if ((hz == hz)) | |
1382 | 1387 | then { | |
1383 | - | let | |
1384 | - | let | |
1385 | - | let | |
1386 | - | let | |
1387 | - | let | |
1388 | - | let bW = if (if (( | |
1389 | - | then ( | |
1388 | + | let fQ = hz._5 | |
1389 | + | let hf = hz._4 | |
1390 | + | let fh = hz._3 | |
1391 | + | let eo = hz._2 | |
1392 | + | let hq = hz._1 | |
1393 | + | let bW = if (if ((gZ > 0)) | |
1394 | + | then (gZ > hq) | |
1390 | 1395 | else false) | |
1391 | - | then aQ(makeString(["amount to receive is less than ", toString( | |
1392 | - | else | |
1393 | - | let | |
1394 | - | if (( | |
1396 | + | then aQ(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1397 | + | else hq | |
1398 | + | let hr = invoke(aT, "burn", [hx], [AttachedPayment(bm, hx)]) | |
1399 | + | if ((hr == hr)) | |
1395 | 1400 | then { | |
1396 | - | let | |
1397 | - | let | |
1398 | - | let | |
1399 | - | then [ScriptTransfer(aU, | |
1401 | + | let gF = cK(hn, bW) | |
1402 | + | let hs = [ScriptTransfer(eV.caller, bW, fO)] | |
1403 | + | let hj = if ((fh > 0)) | |
1404 | + | then [ScriptTransfer(aU, fh, fO)] | |
1400 | 1405 | else nil | |
1401 | - | let | |
1402 | - | let | |
1406 | + | let hA = { | |
1407 | + | let hu = if ((this == aU)) | |
1403 | 1408 | then 0 | |
1404 | - | else | |
1405 | - | if ( | |
1406 | - | then $Tuple2(-((bW + | |
1407 | - | else $Tuple2(0, -((bW + | |
1409 | + | else fh | |
1410 | + | if (fQ) | |
1411 | + | then $Tuple2(-((bW + hu)), 0) | |
1412 | + | else $Tuple2(0, -((bW + hu))) | |
1408 | 1413 | } | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | let | |
1413 | - | let | |
1414 | - | let | |
1415 | - | if (( | |
1416 | - | then $Tuple2((((( | |
1414 | + | let eE = hA._1 | |
1415 | + | let eF = hA._2 | |
1416 | + | let hB = eD(eE, eF, 0) | |
1417 | + | let gU = hB._1 | |
1418 | + | let eu = hB._2 | |
1419 | + | let gV = eH(eC, eu) | |
1420 | + | if ((gV == gV)) | |
1421 | + | then $Tuple2(((((eo ++ gF) ++ hs) ++ hj) ++ gU), bW) | |
1417 | 1422 | else throw("Strict value is not equal to itself.") | |
1418 | 1423 | } | |
1419 | 1424 | else throw("Strict value is not equal to itself.") | |
1429 | 1434 | ||
1430 | 1435 | ||
1431 | 1436 | ||
1432 | - | @Callable( | |
1437 | + | @Callable(eV) | |
1433 | 1438 | func get () = { | |
1434 | - | let dW = eR(eS) | |
1435 | - | let hz = dW._1 | |
1436 | - | let dB = dW._2 | |
1437 | - | let eU = dW._3 | |
1438 | - | let dj = dW._4 | |
1439 | - | let dE = dW._5 | |
1440 | - | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1441 | - | if ((ez == ez)) | |
1439 | + | let dZ = eU(eV) | |
1440 | + | let dF = dZ._1 | |
1441 | + | let dG = dZ._2 | |
1442 | + | let eX = dZ._3 | |
1443 | + | let do = dZ._4 | |
1444 | + | let dH = dZ._5 | |
1445 | + | let gF = cP(dF, dG) | |
1446 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1447 | + | if ((eC == eC)) | |
1442 | 1448 | then { | |
1443 | - | let | |
1444 | - | if (( | |
1449 | + | let hC = invoke(aT, "burn", [eX], [AttachedPayment(do, eX)]) | |
1450 | + | if ((hC == hC)) | |
1445 | 1451 | then { | |
1446 | - | let | |
1447 | - | let | |
1448 | - | let | |
1449 | - | let | |
1450 | - | if (( | |
1451 | - | then ( | |
1452 | + | let hD = eD(-(dF), -(dG), 0) | |
1453 | + | let gU = hD._1 | |
1454 | + | let eu = hD._2 | |
1455 | + | let gV = eH(eC, eu) | |
1456 | + | if ((gV == gV)) | |
1457 | + | then ((gF ++ dH) ++ gU) | |
1452 | 1458 | else throw("Strict value is not equal to itself.") | |
1453 | 1459 | } | |
1454 | 1460 | else throw("Strict value is not equal to itself.") | |
1458 | 1464 | ||
1459 | 1465 | ||
1460 | 1466 | ||
1461 | - | @Callable( | |
1462 | - | func getNoLess ( | |
1463 | - | let | |
1464 | - | let | |
1465 | - | let | |
1466 | - | let | |
1467 | - | let | |
1468 | - | let | |
1469 | - | if (( | |
1470 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1471 | - | else if (( | |
1472 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
1467 | + | @Callable(eV) | |
1468 | + | func getNoLess (hE,hF) = { | |
1469 | + | let dZ = eU(eV) | |
1470 | + | let dF = dZ._1 | |
1471 | + | let dG = dZ._2 | |
1472 | + | let eX = dZ._3 | |
1473 | + | let do = dZ._4 | |
1474 | + | let dH = dZ._5 | |
1475 | + | if ((hE > dF)) | |
1476 | + | then throw(((("noLessThenAmtAsset failed: " + toString(dF)) + " < ") + toString(hE))) | |
1477 | + | else if ((hF > dG)) | |
1478 | + | then throw(((("noLessThenPriceAsset failed: " + toString(dG)) + " < ") + toString(hF))) | |
1473 | 1479 | else { | |
1474 | - | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1475 | - | if ((ez == ez)) | |
1480 | + | let gF = cP(dF, dG) | |
1481 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1482 | + | if ((eC == eC)) | |
1476 | 1483 | then { | |
1477 | - | let | |
1478 | - | if (( | |
1484 | + | let hC = invoke(aT, "burn", [eX], [AttachedPayment(do, eX)]) | |
1485 | + | if ((hC == hC)) | |
1479 | 1486 | then { | |
1480 | - | let | |
1481 | - | let | |
1482 | - | let | |
1483 | - | let | |
1484 | - | if (( | |
1485 | - | then ( | |
1487 | + | let hG = eD(-(dF), -(dG), 0) | |
1488 | + | let gU = hG._1 | |
1489 | + | let eu = hG._2 | |
1490 | + | let gV = eH(eC, eu) | |
1491 | + | if ((gV == gV)) | |
1492 | + | then ((gF ++ dH) ++ gU) | |
1486 | 1493 | else throw("Strict value is not equal to itself.") | |
1487 | 1494 | } | |
1488 | 1495 | else throw("Strict value is not equal to itself.") | |
1493 | 1500 | ||
1494 | 1501 | ||
1495 | 1502 | ||
1496 | - | @Callable( | |
1503 | + | @Callable(eV) | |
1497 | 1504 | func unstakeAndGet (bW) = { | |
1498 | - | let | |
1505 | + | let hH = if ((size(eV.payments) != 0)) | |
1499 | 1506 | then throw("No payments are expected") | |
1500 | 1507 | else true | |
1501 | - | if (( | |
1508 | + | if ((hH == hH)) | |
1502 | 1509 | then { | |
1503 | - | let | |
1504 | - | let | |
1505 | - | let | |
1506 | - | if (( | |
1510 | + | let dd = ba() | |
1511 | + | let dq = fromBase58String(dd[q]) | |
1512 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1513 | + | if ((eC == eC)) | |
1507 | 1514 | then { | |
1508 | - | let | |
1509 | - | if (( | |
1515 | + | let hy = invoke(bs, "unstake", [toBase58String(dq), bW], nil) | |
1516 | + | if ((hy == hy)) | |
1510 | 1517 | then { | |
1511 | - | let dW = dh(toBase58String(eS.transactionId), toBase58String(dl), bW, eS.caller) | |
1512 | - | let dA = dW._1 | |
1513 | - | let dB = dW._2 | |
1514 | - | let do = parseIntValue(dW._9) | |
1515 | - | let dE = dW._10 | |
1516 | - | let hG = if (if (aY()) | |
1518 | + | let dZ = dm(toBase58String(eV.transactionId), toBase58String(dq), bW, eV.caller) | |
1519 | + | let dF = dZ._1 | |
1520 | + | let dG = dZ._2 | |
1521 | + | let dt = parseIntValue(dZ._9) | |
1522 | + | let dH = dZ._10 | |
1523 | + | let gF = cP(dF, dG) | |
1524 | + | let hI = if (if (aY()) | |
1517 | 1525 | then true | |
1518 | - | else ( | |
1519 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1526 | + | else (dt == n)) | |
1527 | + | then throw(("Get operation is blocked by admin. Status = " + toString(dt))) | |
1520 | 1528 | else true | |
1521 | - | if (( | |
1529 | + | if ((hI == hI)) | |
1522 | 1530 | then { | |
1523 | - | let | |
1524 | - | if (( | |
1531 | + | let hC = invoke(aT, "burn", [bW], [AttachedPayment(dq, bW)]) | |
1532 | + | if ((hC == hC)) | |
1525 | 1533 | then { | |
1526 | - | let | |
1527 | - | let | |
1528 | - | let | |
1529 | - | let | |
1530 | - | if (( | |
1531 | - | then ( | |
1534 | + | let hJ = eD(-(dF), -(dG), 0) | |
1535 | + | let gU = hJ._1 | |
1536 | + | let eu = hJ._2 | |
1537 | + | let gV = eH(eC, eu) | |
1538 | + | if ((gV == gV)) | |
1539 | + | then ((gF ++ dH) ++ gU) | |
1532 | 1540 | else throw("Strict value is not equal to itself.") | |
1533 | 1541 | } | |
1534 | 1542 | else throw("Strict value is not equal to itself.") | |
1544 | 1552 | ||
1545 | 1553 | ||
1546 | 1554 | ||
1547 | - | @Callable( | |
1548 | - | func unstakeAndGetNoLess ( | |
1549 | - | let | |
1555 | + | @Callable(eV) | |
1556 | + | func unstakeAndGetNoLess (hx,hK,hF) = { | |
1557 | + | let ho = if (aY()) | |
1550 | 1558 | then true | |
1551 | 1559 | else (bl == n) | |
1552 | - | let | |
1560 | + | let fP = [if (!(ho)) | |
1553 | 1561 | then true | |
1554 | - | else throw("get operation is blocked by admin"), if ((size( | |
1562 | + | else throw("get operation is blocked by admin"), if ((size(eV.payments) == 0)) | |
1555 | 1563 | then true | |
1556 | 1564 | else throw("no payments are expected")] | |
1557 | - | if (( | |
1565 | + | if ((fP == fP)) | |
1558 | 1566 | then { | |
1559 | - | let | |
1560 | - | if (( | |
1567 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1568 | + | if ((eC == eC)) | |
1561 | 1569 | then { | |
1562 | - | let | |
1563 | - | if (( | |
1570 | + | let hy = invoke(bs, "unstake", [toBase58String(bm), hx], nil) | |
1571 | + | if ((hy == hy)) | |
1564 | 1572 | then { | |
1565 | - | let dW = dh(toBase58String(eS.transactionId), toBase58String(bm), hu, eS.caller) | |
1566 | - | let dA = dW._1 | |
1567 | - | let dB = dW._2 | |
1568 | - | let dE = dW._10 | |
1569 | - | let hJ = [if ((dA >= hI)) | |
1573 | + | let dZ = dm(toBase58String(eV.transactionId), toBase58String(bm), hx, eV.caller) | |
1574 | + | let dF = dZ._1 | |
1575 | + | let dG = dZ._2 | |
1576 | + | let dH = dZ._10 | |
1577 | + | let gF = cP(dF, dG) | |
1578 | + | let hL = [if ((dF >= hK)) | |
1570 | 1579 | then true | |
1571 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1580 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hK)], "")), if ((dG >= hF)) | |
1572 | 1581 | then true | |
1573 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1574 | - | if (( | |
1582 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hF)], ""))] | |
1583 | + | if ((hL == hL)) | |
1575 | 1584 | then { | |
1576 | - | let | |
1577 | - | if (( | |
1585 | + | let hC = invoke(aT, "burn", [hx], [AttachedPayment(bm, hx)]) | |
1586 | + | if ((hC == hC)) | |
1578 | 1587 | then { | |
1579 | - | let | |
1580 | - | let | |
1581 | - | let | |
1582 | - | let | |
1583 | - | if (( | |
1584 | - | then ( | |
1588 | + | let hM = eD(-(dF), -(dG), 0) | |
1589 | + | let gU = hM._1 | |
1590 | + | let eu = hM._2 | |
1591 | + | let gV = eH(eC, eu) | |
1592 | + | if ((gV == gV)) | |
1593 | + | then ((gF ++ dH) ++ gU) | |
1585 | 1594 | else throw("Strict value is not equal to itself.") | |
1586 | 1595 | } | |
1587 | 1596 | else throw("Strict value is not equal to itself.") | |
1597 | 1606 | ||
1598 | 1607 | ||
1599 | 1608 | ||
1600 | - | @Callable( | |
1601 | - | func activate ( | |
1609 | + | @Callable(eV) | |
1610 | + | func activate (hN,hO) = if ((toString(eV.caller) != toString(aT))) | |
1602 | 1611 | then throw("permissions denied") | |
1603 | - | else $Tuple2([StringEntry(ae(), | |
1612 | + | else $Tuple2([StringEntry(ae(), hN), StringEntry(af(), hO)], "success") | |
1604 | 1613 | ||
1605 | 1614 | ||
1606 | 1615 | ||
1607 | - | @Callable( | |
1616 | + | @Callable(eV) | |
1608 | 1617 | func refreshKLp () = { | |
1609 | - | let | |
1610 | - | let | |
1618 | + | let hP = valueOrElse(getInteger(ak), 0) | |
1619 | + | let hQ = if (((height - hP) >= an)) | |
1611 | 1620 | then unit | |
1612 | 1621 | else aQ(makeString([toString(an), " blocks have not passed since the previous call"], "")) | |
1613 | - | if (( | |
1622 | + | if ((hQ == hQ)) | |
1614 | 1623 | then { | |
1615 | - | let | |
1616 | - | let | |
1617 | - | let | |
1618 | - | let | |
1619 | - | let | |
1620 | - | then | |
1624 | + | let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aS("invalid kLp")) | |
1625 | + | let hR = eD(0, 0, 0) | |
1626 | + | let hS = hR._1 | |
1627 | + | let eu = hR._2 | |
1628 | + | let eG = if ((eO != eu)) | |
1629 | + | then hS | |
1621 | 1630 | else aQ("nothing to refresh") | |
1622 | - | $Tuple2( | |
1631 | + | $Tuple2(eG, toString(eu)) | |
1623 | 1632 | } | |
1624 | 1633 | else throw("Strict value is not equal to itself.") | |
1625 | 1634 | } | |
1626 | 1635 | ||
1627 | 1636 | ||
1628 | 1637 | ||
1629 | - | @Callable( | |
1638 | + | @Callable(eV) | |
1630 | 1639 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, ba()) | |
1631 | 1640 | ||
1632 | 1641 | ||
1633 | 1642 | ||
1634 | - | @Callable( | |
1643 | + | @Callable(eV) | |
1635 | 1644 | func getAccBalanceWrapperREADONLY (ap) = $Tuple2(nil, bJ(ap)) | |
1636 | 1645 | ||
1637 | 1646 | ||
1638 | 1647 | ||
1639 | - | @Callable( | |
1640 | - | func calcPricesWrapperREADONLY ( | |
1641 | - | let | |
1642 | - | $Tuple2(nil, [toString( | |
1648 | + | @Callable(eV) | |
1649 | + | func calcPricesWrapperREADONLY (cX,cY,dc) = { | |
1650 | + | let dl = db(cX, cY, dc) | |
1651 | + | $Tuple2(nil, [toString(dl[0]), toString(dl[1]), toString(dl[2])]) | |
1643 | 1652 | } | |
1644 | 1653 | ||
1645 | 1654 | ||
1646 | 1655 | ||
1647 | - | @Callable( | |
1656 | + | @Callable(eV) | |
1648 | 1657 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1649 | 1658 | ||
1650 | 1659 | ||
1651 | 1660 | ||
1652 | - | @Callable( | |
1661 | + | @Callable(eV) | |
1653 | 1662 | func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J)) | |
1654 | 1663 | ||
1655 | 1664 | ||
1656 | 1665 | ||
1657 | - | @Callable( | |
1666 | + | @Callable(eV) | |
1658 | 1667 | func calcPriceBigIntWrapperREADONLY (bN,bO) = $Tuple2(nil, toString(bM(parseBigIntValue(bN), parseBigIntValue(bO)))) | |
1659 | 1668 | ||
1660 | 1669 | ||
1661 | 1670 | ||
1662 | - | @Callable( | |
1663 | - | func estimatePutOperationWrapperREADONLY ( | |
1671 | + | @Callable(eV) | |
1672 | + | func estimatePutOperationWrapperREADONLY (dn,dJ,dK,dL,dM,dN,ab,dO,dP) = $Tuple2(nil, dI(dn, dJ, dK, dL, dM, dN, ab, dO, dP)) | |
1664 | 1673 | ||
1665 | 1674 | ||
1666 | 1675 | ||
1667 | - | @Callable( | |
1668 | - | func estimateGetOperationWrapperREADONLY ( | |
1669 | - | let | |
1670 | - | $Tuple2(nil, $Tuple10( | |
1676 | + | @Callable(eV) | |
1677 | + | func estimateGetOperationWrapperREADONLY (dn,do,dp,ab) = { | |
1678 | + | let dZ = dm(dn, do, dp, addressFromStringValue(ab)) | |
1679 | + | $Tuple2(nil, $Tuple10(dZ._1, dZ._2, dZ._3, dZ._4, dZ._5, dZ._6, dZ._7, toString(dZ._8), dZ._9, dZ._10)) | |
1671 | 1680 | } | |
1672 | 1681 | ||
1673 | 1682 | ||
1674 | 1683 | ||
1675 | - | @Callable( | |
1684 | + | @Callable(eV) | |
1676 | 1685 | func statsREADONLY () = { | |
1677 | - | let | |
1678 | - | let | |
1679 | - | let | |
1680 | - | let | |
1681 | - | let | |
1682 | - | let | |
1683 | - | let | |
1684 | - | let | |
1685 | - | let | |
1686 | - | let | |
1687 | - | let | |
1688 | - | let | |
1686 | + | let dd = ba() | |
1687 | + | let dq = fromBase58String(dd[q]) | |
1688 | + | let hT = dd[r] | |
1689 | + | let hU = dd[s] | |
1690 | + | let dS = dd[v] | |
1691 | + | let dT = dd[w] | |
1692 | + | let de = parseIntValue(dd[t]) | |
1693 | + | let df = parseIntValue(dd[u]) | |
1694 | + | let hV = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1695 | + | let hW = bJ(hT) | |
1696 | + | let hX = bJ(hU) | |
1697 | + | let hY = if ((hV == 0)) | |
1689 | 1698 | then [e, e, e] | |
1690 | - | else | |
1691 | - | let | |
1692 | - | let | |
1693 | - | let | |
1694 | - | let | |
1695 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1699 | + | else db(hW, hX, hV) | |
1700 | + | let dA = 0 | |
1701 | + | let hZ = H(hY[1], b) | |
1702 | + | let ia = H(hY[2], b) | |
1703 | + | let ib = value(getInteger(aT, aD(toString(this)))) | |
1704 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hW), toString(hX), toString(hV), toString(dA), toString(hZ), toString(ia), toString(ib)], j)) | |
1696 | 1705 | } | |
1697 | 1706 | ||
1698 | 1707 | ||
1699 | 1708 | ||
1700 | - | @Callable( | |
1701 | - | func evaluatePutByAmountAssetREADONLY ( | |
1702 | - | let | |
1703 | - | let | |
1704 | - | let | |
1705 | - | let | |
1706 | - | let | |
1707 | - | let | |
1708 | - | let | |
1709 | - | let | |
1710 | - | let | |
1711 | - | let | |
1712 | - | let | |
1713 | - | let | |
1714 | - | let | |
1715 | - | let | |
1716 | - | let | |
1709 | + | @Callable(eV) | |
1710 | + | func evaluatePutByAmountAssetREADONLY (dK) = { | |
1711 | + | let dd = ba() | |
1712 | + | let dq = fromBase58String(dd[q]) | |
1713 | + | let dQ = dd[r] | |
1714 | + | let dr = fromBase58String(dQ) | |
1715 | + | let dR = dd[s] | |
1716 | + | let ds = fromBase58String(dR) | |
1717 | + | let de = parseIntValue(dd[t]) | |
1718 | + | let df = parseIntValue(dd[u]) | |
1719 | + | let dt = dd[p] | |
1720 | + | let hV = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1721 | + | let hW = bJ(dQ) | |
1722 | + | let hX = bJ(dR) | |
1723 | + | let cZ = D(hW, de) | |
1724 | + | let da = D(hX, df) | |
1725 | + | let dz = if ((hV == 0)) | |
1717 | 1726 | then e | |
1718 | - | else bM( | |
1719 | - | let | |
1720 | - | let | |
1721 | - | let | |
1722 | - | let | |
1723 | - | let | |
1724 | - | let | |
1725 | - | let | |
1726 | - | let | |
1727 | - | let | |
1728 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1727 | + | else bM(da, cZ) | |
1728 | + | let dW = D(dK, de) | |
1729 | + | let dX = fraction(dW, dz, d) | |
1730 | + | let dM = H(dX, df) | |
1731 | + | let fb = dI("", 500000, dK, dr, dM, ds, "", true, false) | |
1732 | + | let eh = fb._1 | |
1733 | + | let ic = fb._3 | |
1734 | + | let dv = fb._4 | |
1735 | + | let dx = fb._5 | |
1736 | + | let du = fb._6 | |
1737 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eh), toString(H(dz, b)), toString(dv), toString(dx), toString(du), dt, toString(dK), toString(dM)], j)) | |
1729 | 1738 | } | |
1730 | 1739 | ||
1731 | 1740 | ||
1732 | 1741 | ||
1733 | - | @Callable( | |
1734 | - | func evaluatePutByPriceAssetREADONLY ( | |
1735 | - | let | |
1736 | - | let | |
1737 | - | let | |
1738 | - | let | |
1739 | - | let | |
1740 | - | let | |
1741 | - | let | |
1742 | - | let | |
1743 | - | let | |
1744 | - | let | |
1745 | - | let | |
1746 | - | let | |
1747 | - | let | |
1748 | - | let | |
1749 | - | let | |
1742 | + | @Callable(eV) | |
1743 | + | func evaluatePutByPriceAssetREADONLY (dM) = { | |
1744 | + | let dd = ba() | |
1745 | + | let dq = fromBase58String(dd[q]) | |
1746 | + | let dQ = dd[r] | |
1747 | + | let dr = fromBase58String(dQ) | |
1748 | + | let dR = dd[s] | |
1749 | + | let ds = fromBase58String(dR) | |
1750 | + | let de = parseIntValue(dd[t]) | |
1751 | + | let df = parseIntValue(dd[u]) | |
1752 | + | let dt = dd[p] | |
1753 | + | let hV = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1754 | + | let id = bJ(dQ) | |
1755 | + | let ie = bJ(dR) | |
1756 | + | let if = D(id, de) | |
1757 | + | let ig = D(ie, df) | |
1758 | + | let dz = if ((hV == 0)) | |
1750 | 1759 | then e | |
1751 | - | else bM( | |
1752 | - | let | |
1753 | - | let | |
1754 | - | let | |
1755 | - | let | |
1756 | - | let | |
1757 | - | let | |
1758 | - | let | |
1759 | - | let | |
1760 | - | let | |
1761 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1760 | + | else bM(ig, if) | |
1761 | + | let dX = D(dM, df) | |
1762 | + | let dW = fraction(dX, d, dz) | |
1763 | + | let dK = H(dW, de) | |
1764 | + | let fb = dI("", 500000, dK, dr, dM, ds, "", true, false) | |
1765 | + | let eh = fb._1 | |
1766 | + | let ic = fb._3 | |
1767 | + | let dv = fb._4 | |
1768 | + | let dx = fb._5 | |
1769 | + | let du = fb._6 | |
1770 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eh), toString(H(dz, b)), toString(dv), toString(dx), toString(du), dt, toString(dK), toString(dM)], j)) | |
1762 | 1771 | } | |
1763 | 1772 | ||
1764 | 1773 | ||
1765 | 1774 | ||
1766 | - | @Callable( | |
1767 | - | func evaluateGetREADONLY ( | |
1768 | - | let | |
1769 | - | let | |
1770 | - | let | |
1771 | - | let | |
1772 | - | let | |
1773 | - | let | |
1774 | - | let | |
1775 | - | let | |
1776 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1775 | + | @Callable(eV) | |
1776 | + | func evaluateGetREADONLY (ih,ii) = { | |
1777 | + | let dZ = dm("", ih, ii, this) | |
1778 | + | let dF = dZ._1 | |
1779 | + | let dG = dZ._2 | |
1780 | + | let dv = dZ._5 | |
1781 | + | let dx = dZ._6 | |
1782 | + | let du = dZ._7 | |
1783 | + | let dA = dZ._8 | |
1784 | + | let dt = parseIntValue(dZ._9) | |
1785 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dF), toString(dG), toString(dv), toString(dx), toString(du), toString(dA), toString(dt)], j)) | |
1777 | 1786 | } | |
1778 | 1787 | ||
1779 | 1788 | ||
1780 | - | @Verifier( | |
1781 | - | func | |
1782 | - | let | |
1783 | - | let bT = | |
1789 | + | @Verifier(ij) | |
1790 | + | func ik () = { | |
1791 | + | let il = { | |
1792 | + | let bT = gh() | |
1784 | 1793 | if ($isInstanceOf(bT, "ByteVector")) | |
1785 | 1794 | then { | |
1786 | - | let | |
1787 | - | | |
1795 | + | let gl = bT | |
1796 | + | gl | |
1788 | 1797 | } | |
1789 | 1798 | else if ($isInstanceOf(bT, "Unit")) | |
1790 | - | then | |
1799 | + | then ij.senderPublicKey | |
1791 | 1800 | else throw("Match error") | |
1792 | 1801 | } | |
1793 | - | let bT = | |
1802 | + | let bT = ij | |
1794 | 1803 | if ($isInstanceOf(bT, "Order")) | |
1795 | 1804 | then { | |
1796 | - | let | |
1797 | - | let | |
1798 | - | let | |
1799 | - | let aI = | |
1800 | - | let aJ = | |
1801 | - | let aK = sigVerify( | |
1802 | - | let aL = sigVerify( | |
1805 | + | let eK = bT | |
1806 | + | let im = aZ() | |
1807 | + | let in = eJ(eK) | |
1808 | + | let aI = in._1 | |
1809 | + | let aJ = in._2 | |
1810 | + | let aK = sigVerify(eK.bodyBytes, eK.proofs[0], eK.senderPublicKey) | |
1811 | + | let aL = sigVerify(eK.bodyBytes, eK.proofs[1], im) | |
1803 | 1812 | if (if (if (aI) | |
1804 | 1813 | then aK | |
1805 | 1814 | else false) | |
1810 | 1819 | } | |
1811 | 1820 | else if ($isInstanceOf(bT, "SetScriptTransaction")) | |
1812 | 1821 | then { | |
1813 | - | let | |
1814 | - | if (sigVerify( | |
1822 | + | let gi = bT | |
1823 | + | if (sigVerify(ij.bodyBytes, ij.proofs[0], il)) | |
1815 | 1824 | then true | |
1816 | 1825 | else { | |
1817 | - | let | |
1818 | - | let | |
1819 | - | let | |
1820 | - | if (( | |
1821 | - | then ( | |
1826 | + | let io = blake2b256(value(gi.script)) | |
1827 | + | let ip = fromBase64String(value(getString(aT, aF()))) | |
1828 | + | let iq = scriptHash(this) | |
1829 | + | if ((ip == io)) | |
1830 | + | then (iq != io) | |
1822 | 1831 | else false | |
1823 | 1832 | } | |
1824 | 1833 | } | |
1825 | - | else sigVerify( | |
1834 | + | else sigVerify(ij.bodyBytes, ij.proofs[0], il) | |
1826 | 1835 | } | |
1827 | 1836 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 8 | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = toBigInt(100000000) | |
9 | 9 | ||
10 | 10 | let d = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = toBigInt(0) | |
15 | 15 | ||
16 | 16 | let g = toBigInt(1) | |
17 | 17 | ||
18 | 18 | let h = toBigInt(2) | |
19 | 19 | ||
20 | 20 | let i = "WAVES" | |
21 | 21 | ||
22 | 22 | let j = "__" | |
23 | 23 | ||
24 | 24 | let k = 1 | |
25 | 25 | ||
26 | 26 | let l = 2 | |
27 | 27 | ||
28 | 28 | let m = 3 | |
29 | 29 | ||
30 | 30 | let n = 4 | |
31 | 31 | ||
32 | 32 | let o = 1 | |
33 | 33 | ||
34 | 34 | let p = 2 | |
35 | 35 | ||
36 | 36 | let q = 3 | |
37 | 37 | ||
38 | 38 | let r = 4 | |
39 | 39 | ||
40 | 40 | let s = 5 | |
41 | 41 | ||
42 | 42 | let t = 6 | |
43 | 43 | ||
44 | 44 | let u = 7 | |
45 | 45 | ||
46 | 46 | let v = 8 | |
47 | 47 | ||
48 | 48 | let w = 9 | |
49 | 49 | ||
50 | 50 | let x = 10 | |
51 | 51 | ||
52 | 52 | let y = 1 | |
53 | 53 | ||
54 | 54 | let z = 2 | |
55 | 55 | ||
56 | 56 | let A = 3 | |
57 | 57 | ||
58 | 58 | let B = 1 | |
59 | 59 | ||
60 | 60 | let C = 7 | |
61 | 61 | ||
62 | 62 | func D (E,F) = fraction(toBigInt(E), d, toBigInt(F)) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func G (E,F) = fraction(E, d, F) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func H (I,J) = toInt(fraction(I, toBigInt(J), d)) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func K (I,J,L) = toInt(fraction(I, toBigInt(J), d, L)) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func M (N,O,P) = fraction(N, O, P) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func Q (I) = if ((0 > I)) | |
78 | 78 | then -(I) | |
79 | 79 | else I | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func R (I) = if ((e > I)) | |
83 | 83 | then -(I) | |
84 | 84 | else I | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func S () = "%s__swapContract" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func T () = "%s__factoryContract" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func U () = "%s__managerPublicKey" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func V () = "%s__pendingManagerPublicKey" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func W () = "%s%s__price__last" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func X (Y,Z) = makeString(["%s%s%d%d__price__history", toString(Y), toString(Z)], j) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func aa (ab,ac) = ((("%s%s%s__P__" + ab) + "__") + ac) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func ad (ab,ac) = ((("%s%s%s__G__" + ab) + "__") + ac) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func ae () = "%s__amountAsset" | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func af () = "%s__priceAsset" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | let ag = "%s__fee" | |
118 | 118 | ||
119 | 119 | let ah = fraction(10, b, 10000) | |
120 | 120 | ||
121 | 121 | let ai = valueOrElse(getInteger(this, ag), ah) | |
122 | 122 | ||
123 | 123 | let aj = makeString(["%s", "kLp"], j) | |
124 | 124 | ||
125 | 125 | let ak = makeString(["%s", "kLpRefreshedHeight"], j) | |
126 | 126 | ||
127 | 127 | let al = makeString(["%s", "refreshKLpDelay"], j) | |
128 | 128 | ||
129 | 129 | let am = 30 | |
130 | 130 | ||
131 | 131 | let an = valueOrElse(getInteger(this, al), am) | |
132 | 132 | ||
133 | 133 | func ao (ap) = makeString(["%s%s", "stakedBalance", ap], j) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func aq (ap) = makeString(["%s%s", "shareAssetBalance", ap], j) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func ar (ap) = valueOrElse(getInteger(this, ao(ap)), 0) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func as (ap) = valueOrElse(getInteger(this, aq(ap)), 0) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func at () = "%s__factoryConfig" | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func au () = "%s%s__matcher__publicKey" | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func av (aw) = (("%s%s%s__" + aw) + "__mappings__poolContract2LpAsset") | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func ax (ay,az) = (((("%d%d%s__" + ay) + "__") + az) + "__config") | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func aA (aB) = ("%s%s%s__mappings__baseAsset2internalId__" + aB) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func aC () = "%s__shutdown" | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func aD (aE) = ("%s%s__poolWeight__" + aE) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func aF () = "%s__allowedLpScriptHash" | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | let aG = "%s__feeCollectorAddress" | |
170 | 170 | ||
171 | 171 | func aH (aI,aJ,aK,aL) = throw((((((((("order validation failed: orderValid=" + toString(aI)) + " (") + aJ) + ")") + " senderValid=") + toString(aK)) + " matcherValid=") + toString(aL))) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func aM (aN,aO) = valueOrErrorMessage(getString(aN, aO), makeString(["mandatory ", toString(aN), ".", aO, " is not defined"], "")) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func aP (aN,aO) = valueOrErrorMessage(getInteger(aN, aO), makeString(["mandatory ", toString(aN), ".", aO, " is not defined"], "")) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func aQ (aR) = throw(makeString(["lp.ride:", aR], " ")) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func aS (aR) = makeString(["lp.ride:", aR], " ") | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | let aT = addressFromStringValue(aM(this, T())) | |
187 | 187 | ||
188 | 188 | let aU = addressFromStringValue(aM(aT, aG)) | |
189 | 189 | ||
190 | 190 | let aV = { | |
191 | 191 | let aW = invoke(aT, "getInFeeREADONLY", [toString(this)], nil) | |
192 | 192 | if ($isInstanceOf(aW, "Int")) | |
193 | 193 | then aW | |
194 | 194 | else throw(($getType(aW) + " couldn't be cast to Int")) | |
195 | 195 | } | |
196 | 196 | ||
197 | 197 | let aX = { | |
198 | 198 | let aW = invoke(aT, "getOutFeeREADONLY", [toString(this)], nil) | |
199 | 199 | if ($isInstanceOf(aW, "Int")) | |
200 | 200 | then aW | |
201 | 201 | else throw(($getType(aW) + " couldn't be cast to Int")) | |
202 | 202 | } | |
203 | 203 | ||
204 | 204 | func aY () = valueOrElse(getBoolean(aT, aC()), false) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func aZ () = fromBase58String(aM(aT, au())) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func ba () = { | |
211 | 211 | let bb = aM(this, ae()) | |
212 | 212 | let bc = aM(this, af()) | |
213 | 213 | let az = aP(aT, aA(bc)) | |
214 | 214 | let ay = aP(aT, aA(bb)) | |
215 | 215 | split(aM(aT, ax(toString(ay), toString(az))), j) | |
216 | 216 | } | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func bd (be) = if ((be == i)) | |
220 | 220 | then unit | |
221 | 221 | else fromBase58String(be) | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func bf (be) = if ((be == unit)) | |
225 | 225 | then i | |
226 | 226 | else toBase58String(value(be)) | |
227 | 227 | ||
228 | 228 | ||
229 | 229 | func bg (bh) = $Tuple7(addressFromStringValue(bh[o]), parseIntValue(bh[p]), fromBase58String(bh[q]), bd(bh[r]), bd(bh[s]), parseIntValue(bh[t]), parseIntValue(bh[u])) | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | let bi = bg(ba()) | |
233 | 233 | ||
234 | 234 | let bj = bi | |
235 | 235 | ||
236 | 236 | let bk = bj._1 | |
237 | 237 | ||
238 | 238 | let bl = bj._2 | |
239 | 239 | ||
240 | 240 | let bm = bj._3 | |
241 | 241 | ||
242 | 242 | let bn = bj._4 | |
243 | 243 | ||
244 | 244 | let bo = bj._5 | |
245 | 245 | ||
246 | 246 | let bp = bj._6 | |
247 | 247 | ||
248 | 248 | let bq = bj._7 | |
249 | 249 | ||
250 | 250 | func br () = split(aM(aT, at()), j) | |
251 | 251 | ||
252 | 252 | ||
253 | 253 | let bs = valueOrErrorMessage(addressFromString(br()[B]), "incorrect staking address") | |
254 | 254 | ||
255 | 255 | let bt = valueOrErrorMessage(addressFromString(br()[C]), "incorrect staking address") | |
256 | 256 | ||
257 | 257 | func bu (bv,bw,bx,by,bz,bA,bB,bC,bD,bE) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(by), toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE)], j) | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | func bF (bG,bH,bI,by,bB,bC) = makeString(["%d%d%d%d%d%d", toString(bG), toString(bH), toString(bI), toString(by), toString(bB), toString(bC)], j) | |
261 | 261 | ||
262 | 262 | ||
263 | 263 | func bJ (ap) = { | |
264 | 264 | let bK = if ((ap == "WAVES")) | |
265 | 265 | then wavesBalance(this).available | |
266 | 266 | else assetBalance(this, fromBase58String(ap)) | |
267 | 267 | let bL = ((bK + ar(ap)) - as(ap)) | |
268 | 268 | max([0, bL]) | |
269 | 269 | } | |
270 | 270 | ||
271 | 271 | ||
272 | 272 | func bM (bN,bO) = fraction(bN, d, bO) | |
273 | 273 | ||
274 | 274 | ||
275 | 275 | func bP (bN,bO,L) = fraction(bN, d, bO, L) | |
276 | 276 | ||
277 | 277 | ||
278 | 278 | func bQ (bR) = { | |
279 | 279 | let bS = invoke(bR, "getRate", nil, nil) | |
280 | 280 | if ((bS == bS)) | |
281 | 281 | then { | |
282 | 282 | let bT = bS | |
283 | 283 | if ($isInstanceOf(bT, "Int")) | |
284 | 284 | then { | |
285 | 285 | let bU = bT | |
286 | 286 | bU | |
287 | 287 | } | |
288 | 288 | else aQ("proxy.getRate() unexpected value") | |
289 | 289 | } | |
290 | 290 | else throw("Strict value is not equal to itself.") | |
291 | 291 | } | |
292 | 292 | ||
293 | 293 | ||
294 | 294 | func bV (ap,bW,bX,bR) = { | |
295 | 295 | let bY = ar(ap) | |
296 | 296 | if ((bY == bY)) | |
297 | 297 | then { | |
298 | 298 | let bZ = as(bX) | |
299 | 299 | if ((bZ == bZ)) | |
300 | 300 | then { | |
301 | 301 | let ca = bd(ap) | |
302 | 302 | if ((bW > 0)) | |
303 | 303 | then { | |
304 | 304 | let cb = invoke(bR, "deposit", nil, [AttachedPayment(ca, bW)]) | |
305 | 305 | if ((cb == cb)) | |
306 | 306 | then { | |
307 | 307 | let bT = cb | |
308 | 308 | if ($isInstanceOf(bT, "Int")) | |
309 | 309 | then { | |
310 | 310 | let cc = bT | |
311 | 311 | let cd = (bY + bW) | |
312 | 312 | let ce = (bZ + cc) | |
313 | 313 | [IntegerEntry(ao(ap), cd), IntegerEntry(aq(bX), ce)] | |
314 | 314 | } | |
315 | 315 | else nil | |
316 | 316 | } | |
317 | 317 | else throw("Strict value is not equal to itself.") | |
318 | 318 | } | |
319 | 319 | else nil | |
320 | 320 | } | |
321 | 321 | else throw("Strict value is not equal to itself.") | |
322 | 322 | } | |
323 | 323 | else throw("Strict value is not equal to itself.") | |
324 | 324 | } | |
325 | 325 | ||
326 | 326 | ||
327 | 327 | func cf (ap,bW,bX,bR,cg,ch) = { | |
328 | 328 | let bY = ar(ap) | |
329 | 329 | if ((bY == bY)) | |
330 | 330 | then { | |
331 | 331 | let bZ = as(bX) | |
332 | 332 | if ((bZ == bZ)) | |
333 | 333 | then { | |
334 | 334 | let ci = bQ(bR) | |
335 | 335 | if ((ci == ci)) | |
336 | 336 | then { | |
337 | 337 | let cj = fraction(cg, bY, bZ) | |
338 | 338 | let ck = bd(bX) | |
339 | 339 | let cl = fraction(cg, bW, cj) | |
340 | 340 | let cm = fraction(cg, bW, ci) | |
341 | 341 | let cn = max([0, (cl - cm)]) | |
342 | 342 | if ((cm > 0)) | |
343 | 343 | then { | |
344 | 344 | let co = invoke(bR, "withdraw", nil, [AttachedPayment(ck, cm)]) | |
345 | 345 | if ((co == co)) | |
346 | 346 | then { | |
347 | 347 | let bT = co | |
348 | 348 | if ($isInstanceOf(bT, "Int")) | |
349 | 349 | then { | |
350 | 350 | let cp = bT | |
351 | 351 | let cd = (bY - cp) | |
352 | 352 | let ce = ((bZ - cm) - cn) | |
353 | 353 | [IntegerEntry(ao(ap), cd), IntegerEntry(aq(bX), ce), ScriptTransfer(ch, cn, bd(bX))] | |
354 | 354 | } | |
355 | 355 | else nil | |
356 | 356 | } | |
357 | 357 | else throw("Strict value is not equal to itself.") | |
358 | 358 | } | |
359 | 359 | else nil | |
360 | 360 | } | |
361 | 361 | else throw("Strict value is not equal to itself.") | |
362 | 362 | } | |
363 | 363 | else throw("Strict value is not equal to itself.") | |
364 | 364 | } | |
365 | 365 | else throw("Strict value is not equal to itself.") | |
366 | 366 | } | |
367 | 367 | ||
368 | 368 | ||
369 | 369 | func cq (ap) = { | |
370 | 370 | let bT = invoke(aT, "getPoolLeaseConfigREADONLY", [toString(this), ap], nil) | |
371 | 371 | if ($isInstanceOf(bT, "(Boolean, Int, Int, String, String, Int, String)")) | |
372 | 372 | then { | |
373 | 373 | let cr = bT | |
374 | 374 | cr | |
375 | 375 | } | |
376 | 376 | else aQ((("[" + ap) + "] getLeaseProxyConfig() error")) | |
377 | 377 | } | |
378 | 378 | ||
379 | 379 | ||
380 | 380 | func cs (ct,ap,bX,cu,bR,cg,ch) = { | |
381 | 381 | let bY = ar(ap) | |
382 | 382 | if ((bY == bY)) | |
383 | 383 | then { | |
384 | 384 | let bZ = as(bX) | |
385 | 385 | if ((bZ == bZ)) | |
386 | 386 | then { | |
387 | 387 | let cv = { | |
388 | 388 | let bT = bd(ap) | |
389 | 389 | if ($isInstanceOf(bT, "ByteVector")) | |
390 | 390 | then { | |
391 | 391 | let cw = bT | |
392 | 392 | assetBalance(this, cw) | |
393 | 393 | } | |
394 | 394 | else if ($isInstanceOf(bT, "Unit")) | |
395 | 395 | then { | |
396 | 396 | let cx = bT | |
397 | 397 | wavesBalance(this).available | |
398 | 398 | } | |
399 | 399 | else throw("Match error") | |
400 | 400 | } | |
401 | 401 | if ((cv == cv)) | |
402 | 402 | then { | |
403 | 403 | let cy = max([0, ((cv + bY) - cu)]) | |
404 | 404 | let cz = fraction(ct, cy, 100) | |
405 | 405 | let cA = (bY - cz) | |
406 | 406 | if ((cA == 0)) | |
407 | 407 | then nil | |
408 | 408 | else if ((0 > cA)) | |
409 | 409 | then { | |
410 | 410 | let cB = -(cA) | |
411 | 411 | bV(ap, cB, bX, bR) | |
412 | 412 | } | |
413 | 413 | else { | |
414 | 414 | let cC = cA | |
415 | 415 | cf(ap, cC, bX, bR, cg, ch) | |
416 | 416 | } | |
417 | 417 | } | |
418 | 418 | else throw("Strict value is not equal to itself.") | |
419 | 419 | } | |
420 | 420 | else throw("Strict value is not equal to itself.") | |
421 | 421 | } | |
422 | 422 | else throw("Strict value is not equal to itself.") | |
423 | 423 | } | |
424 | 424 | ||
425 | 425 | ||
426 | 426 | func cD (ap) = { | |
427 | 427 | let cE = cq(ap) | |
428 | 428 | let cF = cE._1 | |
429 | 429 | let cG = cE._2 | |
430 | 430 | let cu = cE._3 | |
431 | 431 | let cH = cE._4 | |
432 | 432 | let cI = cE._5 | |
433 | 433 | let cg = cE._6 | |
434 | 434 | let cJ = cE._7 | |
435 | 435 | if (cF) | |
436 | 436 | then cs(cG, ap, cI, cu, addressFromStringValue(cH), cg, addressFromStringValue(cJ)) | |
437 | 437 | else nil | |
438 | 438 | } | |
439 | 439 | ||
440 | 440 | ||
441 | 441 | func cK (ap,cL) = { | |
442 | 442 | let cM = cq(ap) | |
443 | 443 | let cF = cM._1 | |
444 | 444 | let cG = cM._2 | |
445 | 445 | let cu = cM._3 | |
446 | 446 | let cH = cM._4 | |
447 | 447 | let cI = cM._5 | |
448 | 448 | let cg = cM._6 | |
449 | 449 | let cJ = cM._7 | |
450 | 450 | if (cF) | |
451 | 451 | then { | |
452 | 452 | let cN = max([0, ((bJ(ap) - cL) - cu)]) | |
453 | 453 | if ((cN == cN)) | |
454 | 454 | then { | |
455 | 455 | let cd = fraction(cG, cN, 100) | |
456 | 456 | if ((cd == cd)) | |
457 | 457 | then { | |
458 | 458 | let cO = max([0, (ar(ap) - cd)]) | |
459 | 459 | if ((cO == cO)) | |
460 | 460 | then cf(ap, cO, cI, addressFromStringValue(cH), cg, addressFromStringValue(cJ)) | |
461 | 461 | else throw("Strict value is not equal to itself.") | |
462 | 462 | } | |
463 | 463 | else throw("Strict value is not equal to itself.") | |
464 | 464 | } | |
465 | 465 | else throw("Strict value is not equal to itself.") | |
466 | 466 | } | |
467 | 467 | else nil | |
468 | 468 | } | |
469 | 469 | ||
470 | 470 | ||
471 | - | func cP (cQ,cR | |
472 | - | let | |
473 | - | let | |
474 | - | | |
471 | + | func cP (cQ,cR) = { | |
472 | + | let cS = cK(aM(this, ae()), cQ) | |
473 | + | let cT = cK(aM(this, af()), cR) | |
474 | + | (cS ++ cT) | |
475 | 475 | } | |
476 | 476 | ||
477 | 477 | ||
478 | - | func cW (cS,cT,cX) = { | |
479 | - | let cY = ba() | |
480 | - | let cZ = parseIntValue(cY[t]) | |
481 | - | let da = parseIntValue(cY[u]) | |
482 | - | let db = cP(cZ, da, cS, cT) | |
483 | - | let bO = D(cS, cZ) | |
484 | - | let bN = D(cT, da) | |
485 | - | let dc = D(cX, b) | |
486 | - | let dd = bM(bO, dc) | |
487 | - | let de = bM(bN, dc) | |
488 | - | [db, dd, de] | |
478 | + | func cU (cV,cW,cX,cY) = { | |
479 | + | let cZ = D(cX, cV) | |
480 | + | let da = D(cY, cW) | |
481 | + | bM(da, cZ) | |
489 | 482 | } | |
490 | 483 | ||
491 | 484 | ||
492 | - | func df (cS,cT,cX) = { | |
493 | - | let dg = cW(cS, cT, cX) | |
494 | - | [H(dg[0], b), H(dg[1], b), H(dg[2], b)] | |
485 | + | func db (cX,cY,dc) = { | |
486 | + | let dd = ba() | |
487 | + | let de = parseIntValue(dd[t]) | |
488 | + | let df = parseIntValue(dd[u]) | |
489 | + | let dg = cU(de, df, cX, cY) | |
490 | + | let bO = D(cX, de) | |
491 | + | let bN = D(cY, df) | |
492 | + | let dh = D(dc, b) | |
493 | + | let di = bM(bO, dh) | |
494 | + | let dj = bM(bN, dh) | |
495 | + | [dg, di, dj] | |
495 | 496 | } | |
496 | 497 | ||
497 | 498 | ||
498 | - | func dh (di,dj,dk,ab) = { | |
499 | - | let cY = ba() | |
500 | - | let dl = cY[q] | |
501 | - | let dm = cY[r] | |
502 | - | let dn = cY[s] | |
503 | - | let cQ = parseIntValue(cY[t]) | |
504 | - | let cR = parseIntValue(cY[u]) | |
505 | - | let do = cY[p] | |
506 | - | let dp = valueOrErrorMessage(assetInfo(fromBase58String(dl)), (("Asset " + dl) + " doesn't exist")).quantity | |
507 | - | if ((dl != dj)) | |
499 | + | func dk (cX,cY,dc) = { | |
500 | + | let dl = db(cX, cY, dc) | |
501 | + | [H(dl[0], b), H(dl[1], b), H(dl[2], b)] | |
502 | + | } | |
503 | + | ||
504 | + | ||
505 | + | func dm (dn,do,dp,ab) = { | |
506 | + | let dd = ba() | |
507 | + | let dq = dd[q] | |
508 | + | let dr = dd[r] | |
509 | + | let ds = dd[s] | |
510 | + | let cV = parseIntValue(dd[t]) | |
511 | + | let cW = parseIntValue(dd[u]) | |
512 | + | let dt = dd[p] | |
513 | + | let du = valueOrErrorMessage(assetInfo(fromBase58String(dq)), (("Asset " + dq) + " doesn't exist")).quantity | |
514 | + | if ((dq != do)) | |
508 | 515 | then throw("Invalid asset passed.") | |
509 | 516 | else { | |
510 | - | let dq = bJ(dm) | |
511 | - | let dr = D(dq, cQ) | |
512 | - | let ds = bJ(dn) | |
513 | - | let dt = D(ds, cR) | |
514 | - | let du = bM(dt, dr) | |
515 | - | let dv = H(du, b) | |
516 | - | let dw = D(dk, b) | |
517 | - | let dx = D(dp, b) | |
518 | - | let dy = fraction(dr, dw, dx) | |
519 | - | let dz = fraction(dt, dw, dx) | |
520 | - | let dA = K(dy, cQ, FLOOR) | |
521 | - | let dB = K(dz, cR, FLOOR) | |
522 | - | let dC = cK(dm, dA) | |
523 | - | let dD = cK(dn, dB) | |
524 | - | let dE = if ((di == "")) | |
517 | + | let dv = bJ(dr) | |
518 | + | let dw = D(dv, cV) | |
519 | + | let dx = bJ(ds) | |
520 | + | let dy = D(dx, cW) | |
521 | + | let dz = bM(dy, dw) | |
522 | + | let dA = H(dz, b) | |
523 | + | let dB = D(dp, b) | |
524 | + | let dC = D(du, b) | |
525 | + | let dD = fraction(dw, dB, dC) | |
526 | + | let dE = fraction(dy, dB, dC) | |
527 | + | let dF = K(dD, cV, FLOOR) | |
528 | + | let dG = K(dE, cW, FLOOR) | |
529 | + | let dH = if ((dn == "")) | |
525 | 530 | then nil | |
526 | - | else | |
531 | + | else [ScriptTransfer(ab, dF, if ((dr == "WAVES")) | |
527 | 532 | then unit | |
528 | - | else fromBase58String( | |
533 | + | else fromBase58String(dr)), ScriptTransfer(ab, dG, if ((ds == "WAVES")) | |
529 | 534 | then unit | |
530 | - | else fromBase58String( | |
531 | - | $Tuple10( | |
535 | + | else fromBase58String(ds)), StringEntry(ad(toString(ab), dn), bF(dF, dG, dp, dA, height, lastBlock.timestamp)), IntegerEntry(W(), dA), IntegerEntry(X(height, lastBlock.timestamp), dA)] | |
536 | + | $Tuple10(dF, dG, dr, ds, dv, dx, du, dz, dt, dH) | |
532 | 537 | } | |
533 | 538 | } | |
534 | 539 | ||
535 | 540 | ||
536 | - | func | |
537 | - | let | |
538 | - | let | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | let | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | if (if (( | |
541 | + | func dI (dn,dJ,dK,dL,dM,dN,ab,dO,dP) = { | |
542 | + | let dd = ba() | |
543 | + | let dq = fromBase58String(dd[q]) | |
544 | + | let dQ = dd[r] | |
545 | + | let dR = dd[s] | |
546 | + | let dS = dd[v] | |
547 | + | let dT = dd[w] | |
548 | + | let de = parseIntValue(dd[t]) | |
549 | + | let df = parseIntValue(dd[u]) | |
550 | + | let dt = dd[p] | |
551 | + | let du = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
552 | + | let dU = toBase58String(valueOrElse(dL, fromBase58String("WAVES"))) | |
553 | + | let dV = toBase58String(valueOrElse(dN, fromBase58String("WAVES"))) | |
554 | + | if (if ((dQ != dU)) | |
550 | 555 | then true | |
551 | - | else ( | |
556 | + | else (dR != dV)) | |
552 | 557 | then throw("Invalid amt or price asset passed.") | |
553 | 558 | else { | |
554 | - | let | |
555 | - | then bJ( | |
556 | - | else (bJ( | |
557 | - | let | |
558 | - | then bJ( | |
559 | - | else (bJ( | |
560 | - | let | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
559 | + | let dv = if (dO) | |
560 | + | then bJ(dQ) | |
561 | + | else (bJ(dQ) - dK) | |
562 | + | let dx = if (dO) | |
563 | + | then bJ(dR) | |
564 | + | else (bJ(dR) - dM) | |
565 | + | let dW = D(dK, de) | |
566 | + | let dX = D(dM, df) | |
567 | + | let dY = bM(dX, dW) | |
568 | + | let dw = D(dv, de) | |
569 | + | let dy = D(dx, df) | |
570 | + | let dZ = if ((du == 0)) | |
566 | 571 | then { | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | $Tuple5(H( | |
572 | + | let dz = e | |
573 | + | let ea = e | |
574 | + | let dh = pow((dW * dX), 0, toBigInt(5), 1, 0, DOWN) | |
575 | + | $Tuple5(H(dh, b), H(dW, de), H(dX, df), bM((dy + dX), (dw + dW)), ea) | |
571 | 576 | } | |
572 | 577 | else { | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | if (if (( | |
577 | - | then ( | |
578 | + | let dz = bM(dy, dw) | |
579 | + | let ea = fraction(R((dz - dY)), d, dz) | |
580 | + | let eb = D(dJ, b) | |
581 | + | if (if ((dz != e)) | |
582 | + | then (ea > eb) | |
578 | 583 | else false) | |
579 | - | then throw(((("Price slippage " + toString( | |
584 | + | then throw(((("Price slippage " + toString(ea)) + " exceeded the passed limit of ") + toString(eb))) | |
580 | 585 | else { | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | then $Tuple2( | |
586 | - | else $Tuple2( | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | $Tuple5(K( | |
586 | + | let dC = D(du, b) | |
587 | + | let ec = fraction(dW, bP(dy, dw, CEILING), d, CEILING) | |
588 | + | let ed = fraction(dX, d, bP(dy, dw, FLOOR), CEILING) | |
589 | + | let ee = if ((ec > dX)) | |
590 | + | then $Tuple2(ed, dX) | |
591 | + | else $Tuple2(dW, ec) | |
592 | + | let ef = ee._1 | |
593 | + | let eg = ee._2 | |
594 | + | let dh = fraction(dC, eg, dy, FLOOR) | |
595 | + | $Tuple5(K(dh, b, FLOOR), K(ef, de, CEILING), K(eg, df, CEILING), dz, ea) | |
591 | 596 | } | |
592 | 597 | } | |
593 | - | let | |
594 | - | let | |
595 | - | let | |
596 | - | let | |
597 | - | let | |
598 | - | if ((0 >= | |
598 | + | let eh = dZ._1 | |
599 | + | let ei = dZ._2 | |
600 | + | let ej = dZ._3 | |
601 | + | let dA = H(dZ._4, b) | |
602 | + | let ek = H(dZ._5, b) | |
603 | + | if ((0 >= eh)) | |
599 | 604 | then throw("Invalid calculations. LP calculated is less than zero.") | |
600 | 605 | else { | |
601 | - | let | |
606 | + | let el = if (!(dP)) | |
602 | 607 | then 0 | |
603 | - | else | |
604 | - | let | |
605 | - | let | |
606 | - | let | |
607 | - | $Tuple13( | |
608 | + | else eh | |
609 | + | let em = (dK - ei) | |
610 | + | let en = (dM - ej) | |
611 | + | let eo = [IntegerEntry(W(), dA), IntegerEntry(X(height, lastBlock.timestamp), dA), StringEntry(aa(ab, dn), bu(ei, ej, el, dA, dJ, ek, height, lastBlock.timestamp, em, en))] | |
612 | + | $Tuple13(eh, el, dA, dv, dx, du, dq, dt, eo, em, en, dL, dN) | |
608 | 613 | } | |
609 | 614 | } | |
610 | 615 | } | |
611 | 616 | ||
612 | 617 | ||
613 | - | func | |
614 | - | let | |
615 | - | let | |
616 | - | let | |
617 | - | if (( | |
618 | + | func ep (eq,er,du) = { | |
619 | + | let es = G(eq, toBigInt(bp)) | |
620 | + | let et = G(er, toBigInt(bq)) | |
621 | + | let eu = fraction(pow((es * et), 0, toBigInt(5), 1, 18, DOWN), g, du) | |
622 | + | if ((du == f)) | |
618 | 623 | then f | |
619 | - | else | |
624 | + | else eu | |
620 | 625 | } | |
621 | 626 | ||
622 | 627 | ||
623 | - | func | |
624 | - | let | |
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | | |
628 | + | func ev (ew,ex,ey) = { | |
629 | + | let ez = (toBigInt(bJ(bf(bn))) - ew) | |
630 | + | let eA = (toBigInt(bJ(bf(bo))) - ex) | |
631 | + | let eB = (toBigInt(value(assetInfo(bm)).quantity) - ey) | |
632 | + | let eC = ep(ez, eA, eB) | |
633 | + | eC | |
629 | 634 | } | |
630 | 635 | ||
631 | 636 | ||
632 | - | func | |
633 | - | let | |
634 | - | let | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
638 | - | $Tuple2( | |
637 | + | func eD (eE,eF,ey) = { | |
638 | + | let ez = (bJ(bf(bn)) + eE) | |
639 | + | let eA = (bJ(bf(bo)) + eF) | |
640 | + | let eB = (value(assetInfo(bm)).quantity + ey) | |
641 | + | let eu = ep(toBigInt(ez), toBigInt(eA), toBigInt(eB)) | |
642 | + | let eG = [IntegerEntry(ak, height), StringEntry(aj, toString(eu))] | |
643 | + | $Tuple2(eG, eu) | |
639 | 644 | } | |
640 | 645 | ||
641 | 646 | ||
642 | - | func | |
647 | + | func eH (eI,eu) = if ((eu >= eI)) | |
643 | 648 | then true | |
644 | - | else aQ(makeString(["updated KLp lower than current KLp", toString( | |
649 | + | else aQ(makeString(["updated KLp lower than current KLp", toString(eI), toString(eu)], " ")) | |
645 | 650 | ||
646 | 651 | ||
647 | - | func | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | let | |
653 | - | then $Tuple2( | |
654 | - | else $Tuple2(-( | |
655 | - | let | |
656 | - | let | |
652 | + | func eJ (eK) = { | |
653 | + | let ez = bJ(bf(bn)) | |
654 | + | let eA = bJ(bf(bo)) | |
655 | + | let eL = eK.amount | |
656 | + | let eM = fraction(eK.amount, eK.price, b, FLOOR) | |
657 | + | let eN = if ((eK.orderType == Buy)) | |
658 | + | then $Tuple2(eL, -(eM)) | |
659 | + | else $Tuple2(-(eL), eM) | |
660 | + | let eE = eN._1 | |
661 | + | let eF = eN._2 | |
657 | 662 | if (if (if (aY()) | |
658 | 663 | then true | |
659 | 664 | else (bl == m)) | |
660 | 665 | then true | |
661 | 666 | else (bl == n)) | |
662 | 667 | then throw("Exchange operations disabled") | |
663 | - | else if (if (( | |
668 | + | else if (if ((eK.assetPair.amountAsset != bn)) | |
664 | 669 | then true | |
665 | - | else ( | |
670 | + | else (eK.assetPair.priceAsset != bo)) | |
666 | 671 | then throw("Wrong order assets.") | |
667 | 672 | else { | |
668 | - | let | |
669 | - | let | |
670 | - | let | |
671 | - | let | |
672 | - | let | |
673 | - | let | |
674 | - | $Tuple2( | |
673 | + | let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aS("invalid kLp")) | |
674 | + | let eP = eD(eE, eF, 0) | |
675 | + | let eQ = eP._1 | |
676 | + | let eR = eP._2 | |
677 | + | let eS = (eR >= eO) | |
678 | + | let eT = makeString(["kLp=", toString(eO), " kLpNew=", toString(eR), " amountAssetBalance=", toString(ez), " priceAssetBalance=", toString(eA), " amountAssetBalanceDelta=", toString(eE), " priceAssetBalanceDelta=", toString(eF), " height=", toString(height)], "") | |
679 | + | $Tuple2(eS, eT) | |
675 | 680 | } | |
676 | 681 | } | |
677 | 682 | ||
678 | 683 | ||
679 | - | func | |
684 | + | func eU (eV) = if ((size(eV.payments) != 1)) | |
680 | 685 | then throw("exactly 1 payment is expected") | |
681 | 686 | else { | |
682 | - | let | |
683 | - | let | |
684 | - | let | |
685 | - | let | |
686 | - | let | |
687 | - | let | |
688 | - | let | |
689 | - | let | |
687 | + | let eW = value(eV.payments[0]) | |
688 | + | let do = value(eW.assetId) | |
689 | + | let eX = eW.amount | |
690 | + | let dZ = dm(toBase58String(eV.transactionId), toBase58String(do), eX, eV.caller) | |
691 | + | let dF = dZ._1 | |
692 | + | let dG = dZ._2 | |
693 | + | let dt = parseIntValue(dZ._9) | |
694 | + | let dH = dZ._10 | |
690 | 695 | if (if (aY()) | |
691 | 696 | then true | |
692 | - | else ( | |
693 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
694 | - | else $Tuple5( | |
697 | + | else (dt == n)) | |
698 | + | then throw(("Get operation is blocked by admin. Status = " + toString(dt))) | |
699 | + | else $Tuple5(dF, dG, eX, do, dH) | |
695 | 700 | } | |
696 | 701 | ||
697 | 702 | ||
698 | - | func | |
703 | + | func eY (eV,dJ,dP) = if ((size(eV.payments) != 2)) | |
699 | 704 | then throw("exactly 2 payments are expected") | |
700 | 705 | else { | |
701 | - | let | |
702 | - | let | |
703 | - | let | |
704 | - | let | |
706 | + | let eZ = value(eV.payments[0]) | |
707 | + | let fa = value(eV.payments[1]) | |
708 | + | let fb = dI(toBase58String(eV.transactionId), dJ, eZ.amount, eZ.assetId, fa.amount, fa.assetId, toString(eV.caller), false, dP) | |
709 | + | let dt = parseIntValue(fb._8) | |
705 | 710 | if (if (if (aY()) | |
706 | 711 | then true | |
707 | - | else ( | |
712 | + | else (dt == l)) | |
708 | 713 | then true | |
709 | - | else ( | |
710 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
711 | - | else | |
714 | + | else (dt == n)) | |
715 | + | then throw(("Put operation is blocked by admin. Status = " + toString(dt))) | |
716 | + | else fb | |
712 | 717 | } | |
713 | 718 | ||
714 | 719 | ||
715 | - | func | |
716 | - | let | |
717 | - | if (( | |
720 | + | func fc (bW) = { | |
721 | + | let fd = invoke(aT, "emit", [bW], nil) | |
722 | + | if ((fd == fd)) | |
718 | 723 | then { | |
719 | - | let | |
720 | - | let bT = | |
724 | + | let fe = { | |
725 | + | let bT = fd | |
721 | 726 | if ($isInstanceOf(bT, "Address")) | |
722 | 727 | then { | |
723 | - | let | |
724 | - | invoke( | |
728 | + | let ff = bT | |
729 | + | invoke(ff, "emit", [bW], nil) | |
725 | 730 | } | |
726 | 731 | else unit | |
727 | 732 | } | |
728 | - | if (( | |
733 | + | if ((fe == fe)) | |
729 | 734 | then bW | |
730 | 735 | else throw("Strict value is not equal to itself.") | |
731 | 736 | } | |
732 | 737 | else throw("Strict value is not equal to itself.") | |
733 | 738 | } | |
734 | 739 | ||
735 | 740 | ||
736 | - | func | |
737 | - | let | |
741 | + | func fg (bW,ai) = { | |
742 | + | let fh = if ((ai == 0)) | |
738 | 743 | then 0 | |
739 | 744 | else fraction(bW, ai, b) | |
740 | - | $Tuple2((bW - | |
745 | + | $Tuple2((bW - fh), fh) | |
741 | 746 | } | |
742 | 747 | ||
743 | 748 | ||
744 | - | func | |
745 | - | let | |
746 | - | let | |
747 | - | let | |
748 | - | let | |
749 | + | func fi (fj,fk,ab,ac) = { | |
750 | + | let fl = (ac == unit) | |
751 | + | let fm = bJ(bf(bn)) | |
752 | + | let fn = bJ(bf(bo)) | |
753 | + | let fo = if ((fk == bn)) | |
749 | 754 | then true | |
750 | - | else if (( | |
755 | + | else if ((fk == bo)) | |
751 | 756 | then false | |
752 | 757 | else aQ("invalid asset") | |
753 | - | let fm = if (fi) | |
754 | - | then $Tuple2(fj, fk) | |
755 | - | else if (fl) | |
756 | - | then $Tuple2((fj - fg), fk) | |
757 | - | else $Tuple2(fj, (fk - fg)) | |
758 | - | let fn = fm._1 | |
759 | - | let fo = fm._2 | |
760 | 758 | let fp = if (fl) | |
761 | - | then $Tuple2(fg, 0) | |
762 | - | else $Tuple2(0, fg) | |
759 | + | then $Tuple2(fm, fn) | |
760 | + | else if (fo) | |
761 | + | then $Tuple2((fm - fj), fn) | |
762 | + | else $Tuple2(fm, (fn - fj)) | |
763 | 763 | let fq = fp._1 | |
764 | 764 | let fr = fp._2 | |
765 | - | let | |
766 | - | | |
767 | - | | |
765 | + | let fs = if (fo) | |
766 | + | then $Tuple2(fj, 0) | |
767 | + | else $Tuple2(0, fj) | |
768 | 768 | let ft = fs._1 | |
769 | - | let fe = fs._2 | |
770 | - | let fu = (fn + eI) | |
771 | - | let fv = (fo + eJ) | |
772 | - | let fw = bM(D(fv, bq), D(fu, bp)) | |
773 | - | let fx = H(fw, b) | |
774 | - | let fy = if (fl) | |
775 | - | then fn | |
776 | - | else fo | |
777 | - | let fz = toBigInt(fy) | |
778 | - | let fA = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
779 | - | let fB = if ((fA > f)) | |
769 | + | let fu = fs._2 | |
770 | + | let eL = fg(ft, aV)._1 | |
771 | + | let eM = fg(fu, aV)._1 | |
772 | + | let fv = fg(fj, aV) | |
773 | + | let fw = fv._1 | |
774 | + | let fh = fv._2 | |
775 | + | let fx = (fq + eL) | |
776 | + | let fy = (fr + eM) | |
777 | + | let fz = bM(D(fy, bq), D(fx, bp)) | |
778 | + | let fA = H(fz, b) | |
779 | + | let fB = if (fo) | |
780 | + | then fq | |
781 | + | else fr | |
782 | + | let fC = toBigInt(fB) | |
783 | + | let fD = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
784 | + | let fE = if ((fD > f)) | |
780 | 785 | then true | |
781 | 786 | else aQ("initial deposit requires all coins") | |
782 | - | if (( | |
787 | + | if ((fE == fE)) | |
783 | 788 | then { | |
784 | - | let | |
785 | - | let | |
786 | - | let | |
789 | + | let fF = toBigInt(fw) | |
790 | + | let fG = max([0, toInt(((fD * (sqrtBigInt((d + ((fF * d) / fC)), 18, 18, DOWN) - d)) / d))]) | |
791 | + | let eo = if (fl) | |
787 | 792 | then nil | |
788 | - | else [IntegerEntry(W(), | |
789 | - | let | |
790 | - | let | |
791 | - | let | |
792 | - | let | |
793 | - | then $Tuple2( | |
794 | - | else $Tuple2( | |
795 | - | let bW = | |
796 | - | let | |
797 | - | let | |
798 | - | fraction(( | |
793 | + | else [IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bu(ft, fu, fG, fA, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
794 | + | let fH = bM(D(fr, bq), D(fq, bp)) | |
795 | + | let fI = H(fH, b) | |
796 | + | let fJ = { | |
797 | + | let fK = if (fo) | |
798 | + | then $Tuple2(ft, fq) | |
799 | + | else $Tuple2(fu, fr) | |
800 | + | let bW = fK._1 | |
801 | + | let fL = fK._2 | |
802 | + | let fM = toInt(fraction(fD, toBigInt((bW / 2)), toBigInt(fL))) | |
803 | + | fraction((fG - fM), b, fM) | |
799 | 804 | } | |
800 | - | $Tuple5( | |
805 | + | $Tuple5(fG, eo, fh, fJ, fo) | |
801 | 806 | } | |
802 | 807 | else throw("Strict value is not equal to itself.") | |
803 | 808 | } | |
804 | 809 | ||
805 | 810 | ||
806 | - | func | |
807 | - | let | |
808 | - | let | |
809 | - | let | |
810 | - | let | |
811 | - | let | |
811 | + | func fN (fO,fw,fk,ab,ac) = { | |
812 | + | let fl = (ac == unit) | |
813 | + | let dd = ba() | |
814 | + | let de = parseIntValue(dd[t]) | |
815 | + | let df = parseIntValue(dd[u]) | |
816 | + | let fP = [if ((fk == bm)) | |
812 | 817 | then true | |
813 | 818 | else aQ("invalid lp asset")] | |
814 | - | if (( | |
819 | + | if ((fP == fP)) | |
815 | 820 | then { | |
816 | - | let | |
821 | + | let fQ = if ((fO == bn)) | |
817 | 822 | then true | |
818 | - | else if (( | |
823 | + | else if ((fO == bo)) | |
819 | 824 | then false | |
820 | 825 | else aQ("invalid asset") | |
821 | - | let | |
826 | + | let fR = if (fQ) | |
822 | 827 | then toBigInt(bJ(bf(bn))) | |
823 | 828 | else toBigInt(bJ(bf(bo))) | |
824 | - | let | |
825 | - | then | |
826 | - | else | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | then | |
831 | - | else | |
832 | - | let | |
833 | - | let | |
834 | - | let | |
835 | - | let | |
836 | - | let | |
837 | - | let | |
838 | - | let | |
839 | - | let | |
840 | - | then $Tuple4( | |
841 | - | else $Tuple4(0, | |
842 | - | let | |
843 | - | let | |
844 | - | let | |
845 | - | let | |
846 | - | let | |
847 | - | let | |
848 | - | let | |
829 | + | let fS = if (fQ) | |
830 | + | then de | |
831 | + | else df | |
832 | + | let fT = bJ(bf(bn)) | |
833 | + | let fU = bJ(bf(bo)) | |
834 | + | let fV = if (fQ) | |
835 | + | then fT | |
836 | + | else fU | |
837 | + | let fW = toBigInt(fV) | |
838 | + | let fD = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
839 | + | let fX = toBigInt(fw) | |
840 | + | let fY = max([0, toInt(((fR * (d - pow((d - ((fX * d) / fD)), 18, h, 0, 18, DOWN))) / d))]) | |
841 | + | let fZ = fg(fY, aX) | |
842 | + | let ga = fZ._1 | |
843 | + | let fh = fZ._2 | |
844 | + | let gb = if (fQ) | |
845 | + | then $Tuple4(ga, 0, (fT - fY), fU) | |
846 | + | else $Tuple4(0, ga, fT, (fU - fY)) | |
847 | + | let gc = gb._1 | |
848 | + | let gd = gb._2 | |
849 | + | let ge = gb._3 | |
850 | + | let gf = gb._4 | |
851 | + | let fz = bM(D(gf, bq), D(ge, bp)) | |
852 | + | let fA = H(fz, b) | |
853 | + | let eo = if (fl) | |
849 | 854 | then nil | |
850 | - | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bF( | |
851 | - | let | |
852 | - | let | |
853 | - | let | |
854 | - | let | |
855 | - | fraction(( | |
855 | + | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bF(gc, gd, fw, fA, height, lastBlock.timestamp)), IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA)] | |
856 | + | let fH = bM(D(fU, bq), D(fT, bp)) | |
857 | + | let fI = H(fH, b) | |
858 | + | let fJ = { | |
859 | + | let gg = (toInt(fraction(fR, fX, fD)) * 2) | |
860 | + | fraction((ga - gg), b, gg) | |
856 | 861 | } | |
857 | - | $Tuple5( | |
862 | + | $Tuple5(ga, eo, fh, fJ, fQ) | |
858 | 863 | } | |
859 | 864 | else throw("Strict value is not equal to itself.") | |
860 | 865 | } | |
861 | 866 | ||
862 | 867 | ||
863 | - | func | |
868 | + | func gh () = { | |
864 | 869 | let bT = getString(U()) | |
865 | 870 | if ($isInstanceOf(bT, "String")) | |
866 | 871 | then { | |
867 | - | let | |
868 | - | fromBase58String( | |
872 | + | let gi = bT | |
873 | + | fromBase58String(gi) | |
869 | 874 | } | |
870 | 875 | else if ($isInstanceOf(bT, "Unit")) | |
871 | 876 | then unit | |
872 | 877 | else throw("Match error") | |
873 | 878 | } | |
874 | 879 | ||
875 | 880 | ||
876 | - | func | |
881 | + | func gj () = { | |
877 | 882 | let bT = getString(V()) | |
878 | 883 | if ($isInstanceOf(bT, "String")) | |
879 | 884 | then { | |
880 | - | let | |
881 | - | fromBase58String( | |
885 | + | let gi = bT | |
886 | + | fromBase58String(gi) | |
882 | 887 | } | |
883 | 888 | else if ($isInstanceOf(bT, "Unit")) | |
884 | 889 | then unit | |
885 | 890 | else throw("Match error") | |
886 | 891 | } | |
887 | 892 | ||
888 | 893 | ||
889 | - | func | |
890 | - | let bT = | |
894 | + | func gk (eV) = { | |
895 | + | let bT = gh() | |
891 | 896 | if ($isInstanceOf(bT, "ByteVector")) | |
892 | 897 | then { | |
893 | - | let | |
894 | - | ( | |
898 | + | let gl = bT | |
899 | + | (eV.callerPublicKey == gl) | |
895 | 900 | } | |
896 | 901 | else if ($isInstanceOf(bT, "Unit")) | |
897 | - | then ( | |
902 | + | then (eV.caller == this) | |
898 | 903 | else throw("Match error") | |
899 | 904 | } | |
900 | 905 | ||
901 | 906 | ||
902 | - | func | |
903 | - | let | |
904 | - | let bT = | |
907 | + | func gm (eV) = { | |
908 | + | let gn = throw("Permission denied") | |
909 | + | let bT = gh() | |
905 | 910 | if ($isInstanceOf(bT, "ByteVector")) | |
906 | 911 | then { | |
907 | - | let | |
908 | - | if (( | |
912 | + | let gl = bT | |
913 | + | if ((eV.callerPublicKey == gl)) | |
909 | 914 | then true | |
910 | - | else | |
915 | + | else gn | |
911 | 916 | } | |
912 | 917 | else if ($isInstanceOf(bT, "Unit")) | |
913 | - | then if (( | |
918 | + | then if ((eV.caller == this)) | |
914 | 919 | then true | |
915 | - | else | |
920 | + | else gn | |
916 | 921 | else throw("Match error") | |
917 | 922 | } | |
918 | 923 | ||
919 | 924 | ||
920 | - | @Callable( | |
925 | + | @Callable(eV) | |
921 | 926 | func rebalance () = (cD(aM(this, ae())) ++ cD(aM(this, af()))) | |
922 | 927 | ||
923 | 928 | ||
924 | 929 | ||
925 | - | @Callable( | |
926 | - | func calculateAmountOutForSwapREADONLY ( | |
927 | - | let | |
930 | + | @Callable(eV) | |
931 | + | func calculateAmountOutForSwapREADONLY (go,gp,gq) = { | |
932 | + | let gr = if ((gp == false)) | |
928 | 933 | then { | |
929 | - | let | |
930 | - | let | |
931 | - | $Tuple2( | |
934 | + | let gs = aM(this, af()) | |
935 | + | let gt = aM(this, ae()) | |
936 | + | $Tuple2(gs, gt) | |
932 | 937 | } | |
933 | 938 | else { | |
934 | - | let | |
935 | - | let | |
936 | - | $Tuple2( | |
939 | + | let gs = aM(this, ae()) | |
940 | + | let gt = aM(this, af()) | |
941 | + | $Tuple2(gs, gt) | |
937 | 942 | } | |
938 | - | let | |
939 | - | let | |
940 | - | let | |
941 | - | let | |
942 | - | let | |
943 | - | let | |
944 | - | let | |
945 | - | let | |
943 | + | let gs = gr._1 | |
944 | + | let gt = gr._2 | |
945 | + | let gu = bJ(gt) | |
946 | + | let gv = bJ(gs) | |
947 | + | let gw = fraction(gv, go, (gu + go)) | |
948 | + | let gx = (toBigInt(gu) * toBigInt(gv)) | |
949 | + | let gy = (((toBigInt(bJ(gt)) + toBigInt(go)) + toBigInt(gq)) * (toBigInt(bJ(gs)) - toBigInt(gw))) | |
950 | + | let gz = if ((gy >= gx)) | |
946 | 951 | then true | |
947 | 952 | else throw("new K is fewer error") | |
948 | - | if (( | |
949 | - | then $Tuple2(nil, | |
953 | + | if ((gz == gz)) | |
954 | + | then $Tuple2(nil, gw) | |
950 | 955 | else throw("Strict value is not equal to itself.") | |
951 | 956 | } | |
952 | 957 | ||
953 | 958 | ||
954 | 959 | ||
955 | - | @Callable( | |
956 | - | func calculateAmountOutForSwapAndSendTokens ( | |
957 | - | let | |
960 | + | @Callable(eV) | |
961 | + | func calculateAmountOutForSwapAndSendTokens (go,gp,gA,gB,gq) = { | |
962 | + | let gC = { | |
958 | 963 | let aW = invoke(aT, "getSwapContractREADONLY", nil, nil) | |
959 | 964 | if ($isInstanceOf(aW, "String")) | |
960 | 965 | then aW | |
961 | 966 | else throw(($getType(aW) + " couldn't be cast to String")) | |
962 | 967 | } | |
963 | - | let | |
968 | + | let fP = [if ((value(eV.payments[0]).amount >= go)) | |
964 | 969 | then true | |
965 | - | else aQ("Wrong amount"), if (( | |
970 | + | else aQ("Wrong amount"), if ((eV.caller == addressFromStringValue(gC))) | |
966 | 971 | then true | |
967 | 972 | else aQ("Permission denied")] | |
968 | - | if (( | |
973 | + | if ((fP == fP)) | |
969 | 974 | then { | |
970 | - | let | |
971 | - | let | |
972 | - | let | |
975 | + | let eW = value(eV.payments[0]) | |
976 | + | let gt = bf(eW.assetId) | |
977 | + | let gs = if ((gp == false)) | |
973 | 978 | then aM(this, af()) | |
974 | 979 | else aM(this, ae()) | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | let | |
980 | - | let | |
980 | + | let gu = (bJ(gt) - value(eV.payments[0]).amount) | |
981 | + | let gv = bJ(gs) | |
982 | + | let gw = fraction(gv, go, (gu + go)) | |
983 | + | let gx = (toBigInt(gu) * toBigInt(gv)) | |
984 | + | let gy = ((toBigInt(bJ(gt)) + toBigInt(gq)) * (toBigInt(bJ(gs)) - toBigInt(gw))) | |
985 | + | let gz = if ((gy >= gx)) | |
981 | 986 | then true | |
982 | 987 | else throw("new K is fewer error") | |
983 | - | if (( | |
988 | + | if ((gz == gz)) | |
984 | 989 | then { | |
985 | - | let | |
990 | + | let gD = if ((gw >= gA)) | |
986 | 991 | then true | |
987 | 992 | else throw("Exchange result is fewer coins than expected") | |
988 | - | if (( | |
993 | + | if ((gD == gD)) | |
989 | 994 | then { | |
990 | - | let | |
991 | - | if (( | |
995 | + | let gE = cD(gt) | |
996 | + | if ((gE == gE)) | |
992 | 997 | then { | |
993 | - | let | |
994 | - | if (( | |
995 | - | then $Tuple2((( | |
998 | + | let gF = cK(gs, gw) | |
999 | + | if ((gF == gF)) | |
1000 | + | then $Tuple2(((gF ++ gE) ++ [ScriptTransfer(addressFromStringValue(gB), gw, bd(gs))]), gw) | |
996 | 1001 | else throw("Strict value is not equal to itself.") | |
997 | 1002 | } | |
998 | 1003 | else throw("Strict value is not equal to itself.") | |
999 | 1004 | } | |
1000 | 1005 | else throw("Strict value is not equal to itself.") | |
1001 | 1006 | } | |
1002 | 1007 | else throw("Strict value is not equal to itself.") | |
1003 | 1008 | } | |
1004 | 1009 | else throw("Strict value is not equal to itself.") | |
1005 | 1010 | } | |
1006 | 1011 | ||
1007 | 1012 | ||
1008 | 1013 | ||
1009 | - | @Callable( | |
1010 | - | func setManager ( | |
1011 | - | let | |
1012 | - | if (( | |
1014 | + | @Callable(eV) | |
1015 | + | func setManager (gG) = { | |
1016 | + | let gH = gm(eV) | |
1017 | + | if ((gH == gH)) | |
1013 | 1018 | then { | |
1014 | - | let | |
1015 | - | if (( | |
1016 | - | then [StringEntry(V(), | |
1019 | + | let gI = fromBase58String(gG) | |
1020 | + | if ((gI == gI)) | |
1021 | + | then [StringEntry(V(), gG)] | |
1017 | 1022 | else throw("Strict value is not equal to itself.") | |
1018 | 1023 | } | |
1019 | 1024 | else throw("Strict value is not equal to itself.") | |
1020 | 1025 | } | |
1021 | 1026 | ||
1022 | 1027 | ||
1023 | 1028 | ||
1024 | - | @Callable( | |
1029 | + | @Callable(eV) | |
1025 | 1030 | func confirmManager () = { | |
1026 | - | let | |
1027 | - | let | |
1031 | + | let gJ = gj() | |
1032 | + | let gK = if (isDefined(gJ)) | |
1028 | 1033 | then true | |
1029 | 1034 | else throw("No pending manager") | |
1030 | - | if (( | |
1035 | + | if ((gK == gK)) | |
1031 | 1036 | then { | |
1032 | - | let | |
1037 | + | let gL = if ((eV.callerPublicKey == value(gJ))) | |
1033 | 1038 | then true | |
1034 | 1039 | else throw("You are not pending manager") | |
1035 | - | if (( | |
1036 | - | then [StringEntry(U(), toBase58String(value( | |
1040 | + | if ((gL == gL)) | |
1041 | + | then [StringEntry(U(), toBase58String(value(gJ))), DeleteEntry(V())] | |
1037 | 1042 | else throw("Strict value is not equal to itself.") | |
1038 | 1043 | } | |
1039 | 1044 | else throw("Strict value is not equal to itself.") | |
1040 | 1045 | } | |
1041 | 1046 | ||
1042 | 1047 | ||
1043 | 1048 | ||
1044 | - | @Callable( | |
1045 | - | func put ( | |
1049 | + | @Callable(eV) | |
1050 | + | func put (dJ,gM) = if ((0 > dJ)) | |
1046 | 1051 | then throw("Invalid slippageTolerance passed") | |
1047 | 1052 | else { | |
1048 | - | let | |
1049 | - | let | |
1050 | - | let | |
1051 | - | let | |
1052 | - | let | |
1053 | - | let | |
1054 | - | let | |
1055 | - | let | |
1056 | - | let | |
1057 | - | let | |
1058 | - | let | |
1059 | - | if (( | |
1053 | + | let fb = eY(eV, dJ, true) | |
1054 | + | let el = fb._2 | |
1055 | + | let dq = fb._7 | |
1056 | + | let dH = fb._9 | |
1057 | + | let em = fb._10 | |
1058 | + | let en = fb._11 | |
1059 | + | let gN = fb._12 | |
1060 | + | let gO = fb._13 | |
1061 | + | let eZ = toBigInt(value(eV.payments[0]).amount) | |
1062 | + | let fa = toBigInt(value(eV.payments[1]).amount) | |
1063 | + | let eC = ev(eZ, fa, toBigInt(0)) | |
1064 | + | if ((eC == eC)) | |
1060 | 1065 | then { | |
1061 | - | let | |
1062 | - | if (( | |
1066 | + | let fd = invoke(aT, "emit", [el], nil) | |
1067 | + | if ((fd == fd)) | |
1063 | 1068 | then { | |
1064 | - | let | |
1065 | - | let bT = | |
1069 | + | let fe = { | |
1070 | + | let bT = fd | |
1066 | 1071 | if ($isInstanceOf(bT, "Address")) | |
1067 | 1072 | then { | |
1068 | - | let | |
1069 | - | invoke( | |
1073 | + | let ff = bT | |
1074 | + | invoke(ff, "emit", [el], nil) | |
1070 | 1075 | } | |
1071 | 1076 | else unit | |
1072 | 1077 | } | |
1073 | - | if (( | |
1078 | + | if ((fe == fe)) | |
1074 | 1079 | then { | |
1075 | - | let | |
1076 | - | then invoke(bt, "put", nil, [AttachedPayment( | |
1080 | + | let gP = if ((em > 0)) | |
1081 | + | then invoke(bt, "put", nil, [AttachedPayment(gN, em)]) | |
1077 | 1082 | else nil | |
1078 | - | if (( | |
1083 | + | if ((gP == gP)) | |
1079 | 1084 | then { | |
1080 | - | let | |
1081 | - | then invoke(bt, "put", nil, [AttachedPayment( | |
1085 | + | let gQ = if ((en > 0)) | |
1086 | + | then invoke(bt, "put", nil, [AttachedPayment(gO, en)]) | |
1082 | 1087 | else nil | |
1083 | - | if (( | |
1088 | + | if ((gQ == gQ)) | |
1084 | 1089 | then { | |
1085 | - | let | |
1090 | + | let gR = if (gM) | |
1086 | 1091 | then { | |
1087 | - | let | |
1088 | - | if (( | |
1092 | + | let gS = invoke(bs, "stake", nil, [AttachedPayment(dq, el)]) | |
1093 | + | if ((gS == gS)) | |
1089 | 1094 | then nil | |
1090 | 1095 | else throw("Strict value is not equal to itself.") | |
1091 | 1096 | } | |
1092 | - | else [ScriptTransfer( | |
1093 | - | let | |
1094 | - | if (( | |
1097 | + | else [ScriptTransfer(eV.caller, el, dq)] | |
1098 | + | let gT = eD(0, 0, 0) | |
1099 | + | if ((gT == gT)) | |
1095 | 1100 | then { | |
1096 | - | let | |
1097 | - | let | |
1098 | - | let | |
1099 | - | if (( | |
1101 | + | let eu = gT._2 | |
1102 | + | let gU = gT._1 | |
1103 | + | let gV = eH(eC, eu) | |
1104 | + | if ((gV == gV)) | |
1100 | 1105 | then { | |
1101 | - | let | |
1102 | - | if (( | |
1103 | - | then (( | |
1106 | + | let gW = invoke(this, "rebalance", nil, nil) | |
1107 | + | if ((gW == gW)) | |
1108 | + | then ((dH ++ gR) ++ gU) | |
1104 | 1109 | else throw("Strict value is not equal to itself.") | |
1105 | 1110 | } | |
1106 | 1111 | else throw("Strict value is not equal to itself.") | |
1107 | 1112 | } | |
1108 | 1113 | else throw("Strict value is not equal to itself.") | |
1109 | 1114 | } | |
1110 | 1115 | else throw("Strict value is not equal to itself.") | |
1111 | 1116 | } | |
1112 | 1117 | else throw("Strict value is not equal to itself.") | |
1113 | 1118 | } | |
1114 | 1119 | else throw("Strict value is not equal to itself.") | |
1115 | 1120 | } | |
1116 | 1121 | else throw("Strict value is not equal to itself.") | |
1117 | 1122 | } | |
1118 | 1123 | else throw("Strict value is not equal to itself.") | |
1119 | 1124 | } | |
1120 | 1125 | ||
1121 | 1126 | ||
1122 | 1127 | ||
1123 | - | @Callable( | |
1124 | - | func putForFree ( | |
1128 | + | @Callable(eV) | |
1129 | + | func putForFree (gX) = if ((0 > gX)) | |
1125 | 1130 | then throw("Invalid value passed") | |
1126 | 1131 | else { | |
1127 | - | let | |
1128 | - | let | |
1129 | - | let | |
1130 | - | let | |
1131 | - | let | |
1132 | - | if (( | |
1132 | + | let fb = eY(eV, gX, false) | |
1133 | + | let dH = fb._9 | |
1134 | + | let eZ = toBigInt(value(eV.payments[0]).amount) | |
1135 | + | let fa = toBigInt(value(eV.payments[1]).amount) | |
1136 | + | let eC = ev(eZ, fa, toBigInt(0)) | |
1137 | + | if ((eC == eC)) | |
1133 | 1138 | then { | |
1134 | - | let | |
1135 | - | let | |
1136 | - | let | |
1137 | - | let | |
1138 | - | if (( | |
1139 | - | then ( | |
1139 | + | let gY = eD(0, 0, 0) | |
1140 | + | let gU = gY._1 | |
1141 | + | let eu = gY._2 | |
1142 | + | let gV = eH(eC, eu) | |
1143 | + | if ((gV == gV)) | |
1144 | + | then (dH ++ gU) | |
1140 | 1145 | else throw("Strict value is not equal to itself.") | |
1141 | 1146 | } | |
1142 | 1147 | else throw("Strict value is not equal to itself.") | |
1143 | 1148 | } | |
1144 | 1149 | ||
1145 | 1150 | ||
1146 | 1151 | ||
1147 | - | @Callable( | |
1148 | - | func putOneTkn ( | |
1149 | - | let | |
1152 | + | @Callable(eV) | |
1153 | + | func putOneTkn (gZ,ha) = { | |
1154 | + | let hb = { | |
1150 | 1155 | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1151 | 1156 | if ($isInstanceOf(aW, "Boolean")) | |
1152 | 1157 | then aW | |
1153 | 1158 | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1154 | 1159 | } | |
1155 | - | let | |
1160 | + | let hc = if (if (if (aY()) | |
1156 | 1161 | then true | |
1157 | 1162 | else (bl == l)) | |
1158 | 1163 | then true | |
1159 | 1164 | else (bl == n)) | |
1160 | 1165 | then true | |
1161 | - | else | |
1162 | - | let | |
1166 | + | else hb | |
1167 | + | let fP = [if (if (!(hc)) | |
1163 | 1168 | then true | |
1164 | - | else | |
1169 | + | else gk(eV)) | |
1165 | 1170 | then true | |
1166 | - | else aQ("put operation is blocked by admin"), if ((size( | |
1171 | + | else aQ("put operation is blocked by admin"), if ((size(eV.payments) == 1)) | |
1167 | 1172 | then true | |
1168 | 1173 | else aQ("exactly 1 payment are expected")] | |
1169 | - | if (( | |
1174 | + | if ((fP == fP)) | |
1170 | 1175 | then { | |
1171 | - | let | |
1172 | - | let | |
1173 | - | let | |
1174 | - | let | |
1175 | - | then | |
1176 | - | else if (( | |
1177 | - | then | |
1176 | + | let hd = eV.payments[0] | |
1177 | + | let fk = hd.assetId | |
1178 | + | let fj = hd.amount | |
1179 | + | let eC = if ((fk == bn)) | |
1180 | + | then ev(toBigInt(fj), toBigInt(0), toBigInt(0)) | |
1181 | + | else if ((fk == bo)) | |
1182 | + | then ev(toBigInt(0), toBigInt(fj), toBigInt(0)) | |
1178 | 1183 | else aQ("payment asset is not supported") | |
1179 | - | if (( | |
1184 | + | if ((eC == eC)) | |
1180 | 1185 | then { | |
1181 | - | let ab = | |
1182 | - | let ac = | |
1183 | - | let | |
1184 | - | if (( | |
1186 | + | let ab = eV.caller | |
1187 | + | let ac = eV.transactionId | |
1188 | + | let he = fi(fj, fk, ab, ac) | |
1189 | + | if ((he == he)) | |
1185 | 1190 | then { | |
1186 | - | let | |
1187 | - | let | |
1188 | - | let | |
1189 | - | let | |
1190 | - | let | |
1191 | - | let | |
1192 | - | then ( | |
1191 | + | let fo = he._5 | |
1192 | + | let hf = he._4 | |
1193 | + | let fh = he._3 | |
1194 | + | let eo = he._2 | |
1195 | + | let hg = he._1 | |
1196 | + | let hh = if (if ((gZ > 0)) | |
1197 | + | then (gZ > hg) | |
1193 | 1198 | else false) | |
1194 | - | then aQ(makeString(["amount to receive is less than ", toString( | |
1195 | - | else | |
1196 | - | let | |
1197 | - | if (( | |
1199 | + | then aQ(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1200 | + | else hg | |
1201 | + | let fd = fc(hh) | |
1202 | + | if ((fd == fd)) | |
1198 | 1203 | then { | |
1199 | - | let | |
1204 | + | let gR = if (ha) | |
1200 | 1205 | then { | |
1201 | - | let | |
1202 | - | if (( | |
1206 | + | let hi = invoke(bs, "stake", nil, [AttachedPayment(bm, hh)]) | |
1207 | + | if ((hi == hi)) | |
1203 | 1208 | then nil | |
1204 | 1209 | else throw("Strict value is not equal to itself.") | |
1205 | 1210 | } | |
1206 | - | else [ScriptTransfer( | |
1207 | - | let | |
1208 | - | then [ScriptTransfer(aU, | |
1211 | + | else [ScriptTransfer(eV.caller, hh, bm)] | |
1212 | + | let hj = if ((fh > 0)) | |
1213 | + | then [ScriptTransfer(aU, fh, fk)] | |
1209 | 1214 | else nil | |
1210 | - | let | |
1215 | + | let hk = if ((this == aU)) | |
1211 | 1216 | then $Tuple2(0, 0) | |
1212 | - | else if ( | |
1213 | - | then $Tuple2(-( | |
1214 | - | else $Tuple2(0, -( | |
1215 | - | let | |
1216 | - | let | |
1217 | - | let | |
1218 | - | let | |
1219 | - | let | |
1220 | - | let | |
1221 | - | let | |
1222 | - | if (( | |
1217 | + | else if (fo) | |
1218 | + | then $Tuple2(-(fh), 0) | |
1219 | + | else $Tuple2(0, -(fh)) | |
1220 | + | let eE = hk._1 | |
1221 | + | let eF = hk._2 | |
1222 | + | let hl = eD(eE, eF, 0) | |
1223 | + | let gU = hl._1 | |
1224 | + | let eu = hl._2 | |
1225 | + | let eO = value(getString(aj)) | |
1226 | + | let gV = eH(eC, eu) | |
1227 | + | if ((gV == gV)) | |
1223 | 1228 | then { | |
1224 | - | let | |
1225 | - | if (( | |
1226 | - | then $Tuple2(((( | |
1229 | + | let gW = invoke(this, "rebalance", nil, nil) | |
1230 | + | if ((gW == gW)) | |
1231 | + | then $Tuple2((((eo ++ gR) ++ hj) ++ gU), hh) | |
1227 | 1232 | else throw("Strict value is not equal to itself.") | |
1228 | 1233 | } | |
1229 | 1234 | else throw("Strict value is not equal to itself.") | |
1230 | 1235 | } | |
1231 | 1236 | else throw("Strict value is not equal to itself.") | |
1232 | 1237 | } | |
1233 | 1238 | else throw("Strict value is not equal to itself.") | |
1234 | 1239 | } | |
1235 | 1240 | else throw("Strict value is not equal to itself.") | |
1236 | 1241 | } | |
1237 | 1242 | else throw("Strict value is not equal to itself.") | |
1238 | 1243 | } | |
1239 | 1244 | ||
1240 | 1245 | ||
1241 | 1246 | ||
1242 | - | @Callable( | |
1243 | - | func putOneTknREADONLY ( | |
1244 | - | let | |
1245 | - | let | |
1246 | - | let | |
1247 | - | let | |
1248 | - | let | |
1249 | - | let | |
1250 | - | $Tuple2(nil, $Tuple3( | |
1247 | + | @Callable(eV) | |
1248 | + | func putOneTknREADONLY (fk,fj) = { | |
1249 | + | let hm = fi(fj, bd(fk), unit, unit) | |
1250 | + | let hg = hm._1 | |
1251 | + | let eo = hm._2 | |
1252 | + | let fh = hm._3 | |
1253 | + | let hf = hm._4 | |
1254 | + | let fo = hm._5 | |
1255 | + | $Tuple2(nil, $Tuple3(hg, fh, hf)) | |
1251 | 1256 | } | |
1252 | 1257 | ||
1253 | 1258 | ||
1254 | 1259 | ||
1255 | - | @Callable( | |
1256 | - | func getOneTkn ( | |
1257 | - | let | |
1260 | + | @Callable(eV) | |
1261 | + | func getOneTkn (hn,gZ) = { | |
1262 | + | let hb = { | |
1258 | 1263 | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1259 | 1264 | if ($isInstanceOf(aW, "Boolean")) | |
1260 | 1265 | then aW | |
1261 | 1266 | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1262 | 1267 | } | |
1263 | - | let | |
1268 | + | let ho = if (if (aY()) | |
1264 | 1269 | then true | |
1265 | 1270 | else (bl == n)) | |
1266 | 1271 | then true | |
1267 | - | else | |
1268 | - | let | |
1272 | + | else hb | |
1273 | + | let fP = [if (if (!(ho)) | |
1269 | 1274 | then true | |
1270 | - | else | |
1275 | + | else gk(eV)) | |
1271 | 1276 | then true | |
1272 | - | else aQ("get operation is blocked by admin"), if ((size( | |
1277 | + | else aQ("get operation is blocked by admin"), if ((size(eV.payments) == 1)) | |
1273 | 1278 | then true | |
1274 | 1279 | else aQ("exactly 1 payment are expected")] | |
1275 | - | if (( | |
1280 | + | if ((fP == fP)) | |
1276 | 1281 | then { | |
1277 | - | let | |
1278 | - | let | |
1279 | - | let | |
1280 | - | let | |
1281 | - | let | |
1282 | - | if (( | |
1282 | + | let fO = bd(hn) | |
1283 | + | let hd = eV.payments[0] | |
1284 | + | let fk = hd.assetId | |
1285 | + | let fw = hd.amount | |
1286 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1287 | + | if ((eC == eC)) | |
1283 | 1288 | then { | |
1284 | - | let ab = | |
1285 | - | let ac = | |
1286 | - | let | |
1287 | - | if (( | |
1289 | + | let ab = eV.caller | |
1290 | + | let ac = eV.transactionId | |
1291 | + | let hp = fN(fO, fw, fk, ab, ac) | |
1292 | + | if ((hp == hp)) | |
1288 | 1293 | then { | |
1289 | - | let | |
1290 | - | let | |
1291 | - | let | |
1292 | - | let | |
1293 | - | let | |
1294 | - | let bW = if (if (( | |
1295 | - | then ( | |
1294 | + | let fQ = hp._5 | |
1295 | + | let hf = hp._4 | |
1296 | + | let fh = hp._3 | |
1297 | + | let eo = hp._2 | |
1298 | + | let hq = hp._1 | |
1299 | + | let bW = if (if ((gZ > 0)) | |
1300 | + | then (gZ > hq) | |
1296 | 1301 | else false) | |
1297 | - | then aQ(makeString(["amount to receive is less than ", toString( | |
1298 | - | else | |
1299 | - | let | |
1300 | - | if (( | |
1302 | + | then aQ(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1303 | + | else hq | |
1304 | + | let hr = invoke(aT, "burn", [fw], [AttachedPayment(fk, fw)]) | |
1305 | + | if ((hr == hr)) | |
1301 | 1306 | then { | |
1302 | - | let | |
1303 | - | let | |
1304 | - | let | |
1305 | - | then [ScriptTransfer(aU, | |
1307 | + | let gF = cK(hn, bW) | |
1308 | + | let hs = [ScriptTransfer(ab, bW, fO)] | |
1309 | + | let hj = if ((fh > 0)) | |
1310 | + | then [ScriptTransfer(aU, fh, fO)] | |
1306 | 1311 | else nil | |
1307 | - | let | |
1308 | - | let | |
1312 | + | let ht = { | |
1313 | + | let hu = if ((this == aU)) | |
1309 | 1314 | then 0 | |
1310 | - | else | |
1311 | - | if ( | |
1312 | - | then $Tuple2(-((bW + | |
1313 | - | else $Tuple2(0, -((bW + | |
1315 | + | else fh | |
1316 | + | if (fQ) | |
1317 | + | then $Tuple2(-((bW + hu)), 0) | |
1318 | + | else $Tuple2(0, -((bW + hu))) | |
1314 | 1319 | } | |
1315 | - | let | |
1316 | - | let | |
1317 | - | let | |
1318 | - | let | |
1319 | - | let | |
1320 | - | let | |
1321 | - | if (( | |
1322 | - | then $Tuple2((((( | |
1320 | + | let eE = ht._1 | |
1321 | + | let eF = ht._2 | |
1322 | + | let hv = eD(eE, eF, 0) | |
1323 | + | let gU = hv._1 | |
1324 | + | let eu = hv._2 | |
1325 | + | let gV = eH(eC, eu) | |
1326 | + | if ((gV == gV)) | |
1327 | + | then $Tuple2(((((eo ++ gF) ++ hs) ++ hj) ++ gU), bW) | |
1323 | 1328 | else throw("Strict value is not equal to itself.") | |
1324 | 1329 | } | |
1325 | 1330 | else throw("Strict value is not equal to itself.") | |
1326 | 1331 | } | |
1327 | 1332 | else throw("Strict value is not equal to itself.") | |
1328 | 1333 | } | |
1329 | 1334 | else throw("Strict value is not equal to itself.") | |
1330 | 1335 | } | |
1331 | 1336 | else throw("Strict value is not equal to itself.") | |
1332 | 1337 | } | |
1333 | 1338 | ||
1334 | 1339 | ||
1335 | 1340 | ||
1336 | - | @Callable( | |
1337 | - | func getOneTknREADONLY ( | |
1338 | - | let | |
1339 | - | let | |
1340 | - | let | |
1341 | - | let | |
1342 | - | let | |
1343 | - | let | |
1344 | - | $Tuple2(nil, $Tuple3( | |
1341 | + | @Callable(eV) | |
1342 | + | func getOneTknREADONLY (fO,fw) = { | |
1343 | + | let hw = fN(bd(fO), fw, bm, unit, unit) | |
1344 | + | let hq = hw._1 | |
1345 | + | let eo = hw._2 | |
1346 | + | let fh = hw._3 | |
1347 | + | let hf = hw._4 | |
1348 | + | let fQ = hw._5 | |
1349 | + | $Tuple2(nil, $Tuple3(hq, fh, hf)) | |
1345 | 1350 | } | |
1346 | 1351 | ||
1347 | 1352 | ||
1348 | 1353 | ||
1349 | - | @Callable( | |
1350 | - | func unstakeAndGetOneTkn ( | |
1351 | - | let | |
1354 | + | @Callable(eV) | |
1355 | + | func unstakeAndGetOneTkn (hx,hn,gZ) = { | |
1356 | + | let hb = { | |
1352 | 1357 | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1353 | 1358 | if ($isInstanceOf(aW, "Boolean")) | |
1354 | 1359 | then aW | |
1355 | 1360 | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1356 | 1361 | } | |
1357 | - | let | |
1362 | + | let ho = if (if (aY()) | |
1358 | 1363 | then true | |
1359 | 1364 | else (bl == n)) | |
1360 | 1365 | then true | |
1361 | - | else | |
1362 | - | let | |
1366 | + | else hb | |
1367 | + | let fP = [if (if (!(ho)) | |
1363 | 1368 | then true | |
1364 | - | else | |
1369 | + | else gk(eV)) | |
1365 | 1370 | then true | |
1366 | - | else aQ("get operation is blocked by admin"), if ((size( | |
1371 | + | else aQ("get operation is blocked by admin"), if ((size(eV.payments) == 0)) | |
1367 | 1372 | then true | |
1368 | 1373 | else aQ("no payments are expected")] | |
1369 | - | if (( | |
1374 | + | if ((fP == fP)) | |
1370 | 1375 | then { | |
1371 | - | let | |
1372 | - | let ab = | |
1373 | - | let ac = | |
1374 | - | let | |
1375 | - | if (( | |
1376 | + | let fO = bd(hn) | |
1377 | + | let ab = eV.caller | |
1378 | + | let ac = eV.transactionId | |
1379 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1380 | + | if ((eC == eC)) | |
1376 | 1381 | then { | |
1377 | - | let | |
1378 | - | if (( | |
1382 | + | let hy = invoke(bs, "unstake", [toBase58String(bm), hx], nil) | |
1383 | + | if ((hy == hy)) | |
1379 | 1384 | then { | |
1380 | - | let | |
1381 | - | if (( | |
1385 | + | let hz = fN(fO, hx, bm, ab, ac) | |
1386 | + | if ((hz == hz)) | |
1382 | 1387 | then { | |
1383 | - | let | |
1384 | - | let | |
1385 | - | let | |
1386 | - | let | |
1387 | - | let | |
1388 | - | let bW = if (if (( | |
1389 | - | then ( | |
1388 | + | let fQ = hz._5 | |
1389 | + | let hf = hz._4 | |
1390 | + | let fh = hz._3 | |
1391 | + | let eo = hz._2 | |
1392 | + | let hq = hz._1 | |
1393 | + | let bW = if (if ((gZ > 0)) | |
1394 | + | then (gZ > hq) | |
1390 | 1395 | else false) | |
1391 | - | then aQ(makeString(["amount to receive is less than ", toString( | |
1392 | - | else | |
1393 | - | let | |
1394 | - | if (( | |
1396 | + | then aQ(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1397 | + | else hq | |
1398 | + | let hr = invoke(aT, "burn", [hx], [AttachedPayment(bm, hx)]) | |
1399 | + | if ((hr == hr)) | |
1395 | 1400 | then { | |
1396 | - | let | |
1397 | - | let | |
1398 | - | let | |
1399 | - | then [ScriptTransfer(aU, | |
1401 | + | let gF = cK(hn, bW) | |
1402 | + | let hs = [ScriptTransfer(eV.caller, bW, fO)] | |
1403 | + | let hj = if ((fh > 0)) | |
1404 | + | then [ScriptTransfer(aU, fh, fO)] | |
1400 | 1405 | else nil | |
1401 | - | let | |
1402 | - | let | |
1406 | + | let hA = { | |
1407 | + | let hu = if ((this == aU)) | |
1403 | 1408 | then 0 | |
1404 | - | else | |
1405 | - | if ( | |
1406 | - | then $Tuple2(-((bW + | |
1407 | - | else $Tuple2(0, -((bW + | |
1409 | + | else fh | |
1410 | + | if (fQ) | |
1411 | + | then $Tuple2(-((bW + hu)), 0) | |
1412 | + | else $Tuple2(0, -((bW + hu))) | |
1408 | 1413 | } | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | let | |
1413 | - | let | |
1414 | - | let | |
1415 | - | if (( | |
1416 | - | then $Tuple2((((( | |
1414 | + | let eE = hA._1 | |
1415 | + | let eF = hA._2 | |
1416 | + | let hB = eD(eE, eF, 0) | |
1417 | + | let gU = hB._1 | |
1418 | + | let eu = hB._2 | |
1419 | + | let gV = eH(eC, eu) | |
1420 | + | if ((gV == gV)) | |
1421 | + | then $Tuple2(((((eo ++ gF) ++ hs) ++ hj) ++ gU), bW) | |
1417 | 1422 | else throw("Strict value is not equal to itself.") | |
1418 | 1423 | } | |
1419 | 1424 | else throw("Strict value is not equal to itself.") | |
1420 | 1425 | } | |
1421 | 1426 | else throw("Strict value is not equal to itself.") | |
1422 | 1427 | } | |
1423 | 1428 | else throw("Strict value is not equal to itself.") | |
1424 | 1429 | } | |
1425 | 1430 | else throw("Strict value is not equal to itself.") | |
1426 | 1431 | } | |
1427 | 1432 | else throw("Strict value is not equal to itself.") | |
1428 | 1433 | } | |
1429 | 1434 | ||
1430 | 1435 | ||
1431 | 1436 | ||
1432 | - | @Callable( | |
1437 | + | @Callable(eV) | |
1433 | 1438 | func get () = { | |
1434 | - | let dW = eR(eS) | |
1435 | - | let hz = dW._1 | |
1436 | - | let dB = dW._2 | |
1437 | - | let eU = dW._3 | |
1438 | - | let dj = dW._4 | |
1439 | - | let dE = dW._5 | |
1440 | - | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1441 | - | if ((ez == ez)) | |
1439 | + | let dZ = eU(eV) | |
1440 | + | let dF = dZ._1 | |
1441 | + | let dG = dZ._2 | |
1442 | + | let eX = dZ._3 | |
1443 | + | let do = dZ._4 | |
1444 | + | let dH = dZ._5 | |
1445 | + | let gF = cP(dF, dG) | |
1446 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1447 | + | if ((eC == eC)) | |
1442 | 1448 | then { | |
1443 | - | let | |
1444 | - | if (( | |
1449 | + | let hC = invoke(aT, "burn", [eX], [AttachedPayment(do, eX)]) | |
1450 | + | if ((hC == hC)) | |
1445 | 1451 | then { | |
1446 | - | let | |
1447 | - | let | |
1448 | - | let | |
1449 | - | let | |
1450 | - | if (( | |
1451 | - | then ( | |
1452 | + | let hD = eD(-(dF), -(dG), 0) | |
1453 | + | let gU = hD._1 | |
1454 | + | let eu = hD._2 | |
1455 | + | let gV = eH(eC, eu) | |
1456 | + | if ((gV == gV)) | |
1457 | + | then ((gF ++ dH) ++ gU) | |
1452 | 1458 | else throw("Strict value is not equal to itself.") | |
1453 | 1459 | } | |
1454 | 1460 | else throw("Strict value is not equal to itself.") | |
1455 | 1461 | } | |
1456 | 1462 | else throw("Strict value is not equal to itself.") | |
1457 | 1463 | } | |
1458 | 1464 | ||
1459 | 1465 | ||
1460 | 1466 | ||
1461 | - | @Callable( | |
1462 | - | func getNoLess ( | |
1463 | - | let | |
1464 | - | let | |
1465 | - | let | |
1466 | - | let | |
1467 | - | let | |
1468 | - | let | |
1469 | - | if (( | |
1470 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1471 | - | else if (( | |
1472 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
1467 | + | @Callable(eV) | |
1468 | + | func getNoLess (hE,hF) = { | |
1469 | + | let dZ = eU(eV) | |
1470 | + | let dF = dZ._1 | |
1471 | + | let dG = dZ._2 | |
1472 | + | let eX = dZ._3 | |
1473 | + | let do = dZ._4 | |
1474 | + | let dH = dZ._5 | |
1475 | + | if ((hE > dF)) | |
1476 | + | then throw(((("noLessThenAmtAsset failed: " + toString(dF)) + " < ") + toString(hE))) | |
1477 | + | else if ((hF > dG)) | |
1478 | + | then throw(((("noLessThenPriceAsset failed: " + toString(dG)) + " < ") + toString(hF))) | |
1473 | 1479 | else { | |
1474 | - | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1475 | - | if ((ez == ez)) | |
1480 | + | let gF = cP(dF, dG) | |
1481 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1482 | + | if ((eC == eC)) | |
1476 | 1483 | then { | |
1477 | - | let | |
1478 | - | if (( | |
1484 | + | let hC = invoke(aT, "burn", [eX], [AttachedPayment(do, eX)]) | |
1485 | + | if ((hC == hC)) | |
1479 | 1486 | then { | |
1480 | - | let | |
1481 | - | let | |
1482 | - | let | |
1483 | - | let | |
1484 | - | if (( | |
1485 | - | then ( | |
1487 | + | let hG = eD(-(dF), -(dG), 0) | |
1488 | + | let gU = hG._1 | |
1489 | + | let eu = hG._2 | |
1490 | + | let gV = eH(eC, eu) | |
1491 | + | if ((gV == gV)) | |
1492 | + | then ((gF ++ dH) ++ gU) | |
1486 | 1493 | else throw("Strict value is not equal to itself.") | |
1487 | 1494 | } | |
1488 | 1495 | else throw("Strict value is not equal to itself.") | |
1489 | 1496 | } | |
1490 | 1497 | else throw("Strict value is not equal to itself.") | |
1491 | 1498 | } | |
1492 | 1499 | } | |
1493 | 1500 | ||
1494 | 1501 | ||
1495 | 1502 | ||
1496 | - | @Callable( | |
1503 | + | @Callable(eV) | |
1497 | 1504 | func unstakeAndGet (bW) = { | |
1498 | - | let | |
1505 | + | let hH = if ((size(eV.payments) != 0)) | |
1499 | 1506 | then throw("No payments are expected") | |
1500 | 1507 | else true | |
1501 | - | if (( | |
1508 | + | if ((hH == hH)) | |
1502 | 1509 | then { | |
1503 | - | let | |
1504 | - | let | |
1505 | - | let | |
1506 | - | if (( | |
1510 | + | let dd = ba() | |
1511 | + | let dq = fromBase58String(dd[q]) | |
1512 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1513 | + | if ((eC == eC)) | |
1507 | 1514 | then { | |
1508 | - | let | |
1509 | - | if (( | |
1515 | + | let hy = invoke(bs, "unstake", [toBase58String(dq), bW], nil) | |
1516 | + | if ((hy == hy)) | |
1510 | 1517 | then { | |
1511 | - | let dW = dh(toBase58String(eS.transactionId), toBase58String(dl), bW, eS.caller) | |
1512 | - | let dA = dW._1 | |
1513 | - | let dB = dW._2 | |
1514 | - | let do = parseIntValue(dW._9) | |
1515 | - | let dE = dW._10 | |
1516 | - | let hG = if (if (aY()) | |
1518 | + | let dZ = dm(toBase58String(eV.transactionId), toBase58String(dq), bW, eV.caller) | |
1519 | + | let dF = dZ._1 | |
1520 | + | let dG = dZ._2 | |
1521 | + | let dt = parseIntValue(dZ._9) | |
1522 | + | let dH = dZ._10 | |
1523 | + | let gF = cP(dF, dG) | |
1524 | + | let hI = if (if (aY()) | |
1517 | 1525 | then true | |
1518 | - | else ( | |
1519 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1526 | + | else (dt == n)) | |
1527 | + | then throw(("Get operation is blocked by admin. Status = " + toString(dt))) | |
1520 | 1528 | else true | |
1521 | - | if (( | |
1529 | + | if ((hI == hI)) | |
1522 | 1530 | then { | |
1523 | - | let | |
1524 | - | if (( | |
1531 | + | let hC = invoke(aT, "burn", [bW], [AttachedPayment(dq, bW)]) | |
1532 | + | if ((hC == hC)) | |
1525 | 1533 | then { | |
1526 | - | let | |
1527 | - | let | |
1528 | - | let | |
1529 | - | let | |
1530 | - | if (( | |
1531 | - | then ( | |
1534 | + | let hJ = eD(-(dF), -(dG), 0) | |
1535 | + | let gU = hJ._1 | |
1536 | + | let eu = hJ._2 | |
1537 | + | let gV = eH(eC, eu) | |
1538 | + | if ((gV == gV)) | |
1539 | + | then ((gF ++ dH) ++ gU) | |
1532 | 1540 | else throw("Strict value is not equal to itself.") | |
1533 | 1541 | } | |
1534 | 1542 | else throw("Strict value is not equal to itself.") | |
1535 | 1543 | } | |
1536 | 1544 | else throw("Strict value is not equal to itself.") | |
1537 | 1545 | } | |
1538 | 1546 | else throw("Strict value is not equal to itself.") | |
1539 | 1547 | } | |
1540 | 1548 | else throw("Strict value is not equal to itself.") | |
1541 | 1549 | } | |
1542 | 1550 | else throw("Strict value is not equal to itself.") | |
1543 | 1551 | } | |
1544 | 1552 | ||
1545 | 1553 | ||
1546 | 1554 | ||
1547 | - | @Callable( | |
1548 | - | func unstakeAndGetNoLess ( | |
1549 | - | let | |
1555 | + | @Callable(eV) | |
1556 | + | func unstakeAndGetNoLess (hx,hK,hF) = { | |
1557 | + | let ho = if (aY()) | |
1550 | 1558 | then true | |
1551 | 1559 | else (bl == n) | |
1552 | - | let | |
1560 | + | let fP = [if (!(ho)) | |
1553 | 1561 | then true | |
1554 | - | else throw("get operation is blocked by admin"), if ((size( | |
1562 | + | else throw("get operation is blocked by admin"), if ((size(eV.payments) == 0)) | |
1555 | 1563 | then true | |
1556 | 1564 | else throw("no payments are expected")] | |
1557 | - | if (( | |
1565 | + | if ((fP == fP)) | |
1558 | 1566 | then { | |
1559 | - | let | |
1560 | - | if (( | |
1567 | + | let eC = ev(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1568 | + | if ((eC == eC)) | |
1561 | 1569 | then { | |
1562 | - | let | |
1563 | - | if (( | |
1570 | + | let hy = invoke(bs, "unstake", [toBase58String(bm), hx], nil) | |
1571 | + | if ((hy == hy)) | |
1564 | 1572 | then { | |
1565 | - | let dW = dh(toBase58String(eS.transactionId), toBase58String(bm), hu, eS.caller) | |
1566 | - | let dA = dW._1 | |
1567 | - | let dB = dW._2 | |
1568 | - | let dE = dW._10 | |
1569 | - | let hJ = [if ((dA >= hI)) | |
1573 | + | let dZ = dm(toBase58String(eV.transactionId), toBase58String(bm), hx, eV.caller) | |
1574 | + | let dF = dZ._1 | |
1575 | + | let dG = dZ._2 | |
1576 | + | let dH = dZ._10 | |
1577 | + | let gF = cP(dF, dG) | |
1578 | + | let hL = [if ((dF >= hK)) | |
1570 | 1579 | then true | |
1571 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1580 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hK)], "")), if ((dG >= hF)) | |
1572 | 1581 | then true | |
1573 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1574 | - | if (( | |
1582 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hF)], ""))] | |
1583 | + | if ((hL == hL)) | |
1575 | 1584 | then { | |
1576 | - | let | |
1577 | - | if (( | |
1585 | + | let hC = invoke(aT, "burn", [hx], [AttachedPayment(bm, hx)]) | |
1586 | + | if ((hC == hC)) | |
1578 | 1587 | then { | |
1579 | - | let | |
1580 | - | let | |
1581 | - | let | |
1582 | - | let | |
1583 | - | if (( | |
1584 | - | then ( | |
1588 | + | let hM = eD(-(dF), -(dG), 0) | |
1589 | + | let gU = hM._1 | |
1590 | + | let eu = hM._2 | |
1591 | + | let gV = eH(eC, eu) | |
1592 | + | if ((gV == gV)) | |
1593 | + | then ((gF ++ dH) ++ gU) | |
1585 | 1594 | else throw("Strict value is not equal to itself.") | |
1586 | 1595 | } | |
1587 | 1596 | else throw("Strict value is not equal to itself.") | |
1588 | 1597 | } | |
1589 | 1598 | else throw("Strict value is not equal to itself.") | |
1590 | 1599 | } | |
1591 | 1600 | else throw("Strict value is not equal to itself.") | |
1592 | 1601 | } | |
1593 | 1602 | else throw("Strict value is not equal to itself.") | |
1594 | 1603 | } | |
1595 | 1604 | else throw("Strict value is not equal to itself.") | |
1596 | 1605 | } | |
1597 | 1606 | ||
1598 | 1607 | ||
1599 | 1608 | ||
1600 | - | @Callable( | |
1601 | - | func activate ( | |
1609 | + | @Callable(eV) | |
1610 | + | func activate (hN,hO) = if ((toString(eV.caller) != toString(aT))) | |
1602 | 1611 | then throw("permissions denied") | |
1603 | - | else $Tuple2([StringEntry(ae(), | |
1612 | + | else $Tuple2([StringEntry(ae(), hN), StringEntry(af(), hO)], "success") | |
1604 | 1613 | ||
1605 | 1614 | ||
1606 | 1615 | ||
1607 | - | @Callable( | |
1616 | + | @Callable(eV) | |
1608 | 1617 | func refreshKLp () = { | |
1609 | - | let | |
1610 | - | let | |
1618 | + | let hP = valueOrElse(getInteger(ak), 0) | |
1619 | + | let hQ = if (((height - hP) >= an)) | |
1611 | 1620 | then unit | |
1612 | 1621 | else aQ(makeString([toString(an), " blocks have not passed since the previous call"], "")) | |
1613 | - | if (( | |
1622 | + | if ((hQ == hQ)) | |
1614 | 1623 | then { | |
1615 | - | let | |
1616 | - | let | |
1617 | - | let | |
1618 | - | let | |
1619 | - | let | |
1620 | - | then | |
1624 | + | let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aS("invalid kLp")) | |
1625 | + | let hR = eD(0, 0, 0) | |
1626 | + | let hS = hR._1 | |
1627 | + | let eu = hR._2 | |
1628 | + | let eG = if ((eO != eu)) | |
1629 | + | then hS | |
1621 | 1630 | else aQ("nothing to refresh") | |
1622 | - | $Tuple2( | |
1631 | + | $Tuple2(eG, toString(eu)) | |
1623 | 1632 | } | |
1624 | 1633 | else throw("Strict value is not equal to itself.") | |
1625 | 1634 | } | |
1626 | 1635 | ||
1627 | 1636 | ||
1628 | 1637 | ||
1629 | - | @Callable( | |
1638 | + | @Callable(eV) | |
1630 | 1639 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, ba()) | |
1631 | 1640 | ||
1632 | 1641 | ||
1633 | 1642 | ||
1634 | - | @Callable( | |
1643 | + | @Callable(eV) | |
1635 | 1644 | func getAccBalanceWrapperREADONLY (ap) = $Tuple2(nil, bJ(ap)) | |
1636 | 1645 | ||
1637 | 1646 | ||
1638 | 1647 | ||
1639 | - | @Callable( | |
1640 | - | func calcPricesWrapperREADONLY ( | |
1641 | - | let | |
1642 | - | $Tuple2(nil, [toString( | |
1648 | + | @Callable(eV) | |
1649 | + | func calcPricesWrapperREADONLY (cX,cY,dc) = { | |
1650 | + | let dl = db(cX, cY, dc) | |
1651 | + | $Tuple2(nil, [toString(dl[0]), toString(dl[1]), toString(dl[2])]) | |
1643 | 1652 | } | |
1644 | 1653 | ||
1645 | 1654 | ||
1646 | 1655 | ||
1647 | - | @Callable( | |
1656 | + | @Callable(eV) | |
1648 | 1657 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1649 | 1658 | ||
1650 | 1659 | ||
1651 | 1660 | ||
1652 | - | @Callable( | |
1661 | + | @Callable(eV) | |
1653 | 1662 | func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J)) | |
1654 | 1663 | ||
1655 | 1664 | ||
1656 | 1665 | ||
1657 | - | @Callable( | |
1666 | + | @Callable(eV) | |
1658 | 1667 | func calcPriceBigIntWrapperREADONLY (bN,bO) = $Tuple2(nil, toString(bM(parseBigIntValue(bN), parseBigIntValue(bO)))) | |
1659 | 1668 | ||
1660 | 1669 | ||
1661 | 1670 | ||
1662 | - | @Callable( | |
1663 | - | func estimatePutOperationWrapperREADONLY ( | |
1671 | + | @Callable(eV) | |
1672 | + | func estimatePutOperationWrapperREADONLY (dn,dJ,dK,dL,dM,dN,ab,dO,dP) = $Tuple2(nil, dI(dn, dJ, dK, dL, dM, dN, ab, dO, dP)) | |
1664 | 1673 | ||
1665 | 1674 | ||
1666 | 1675 | ||
1667 | - | @Callable( | |
1668 | - | func estimateGetOperationWrapperREADONLY ( | |
1669 | - | let | |
1670 | - | $Tuple2(nil, $Tuple10( | |
1676 | + | @Callable(eV) | |
1677 | + | func estimateGetOperationWrapperREADONLY (dn,do,dp,ab) = { | |
1678 | + | let dZ = dm(dn, do, dp, addressFromStringValue(ab)) | |
1679 | + | $Tuple2(nil, $Tuple10(dZ._1, dZ._2, dZ._3, dZ._4, dZ._5, dZ._6, dZ._7, toString(dZ._8), dZ._9, dZ._10)) | |
1671 | 1680 | } | |
1672 | 1681 | ||
1673 | 1682 | ||
1674 | 1683 | ||
1675 | - | @Callable( | |
1684 | + | @Callable(eV) | |
1676 | 1685 | func statsREADONLY () = { | |
1677 | - | let | |
1678 | - | let | |
1679 | - | let | |
1680 | - | let | |
1681 | - | let | |
1682 | - | let | |
1683 | - | let | |
1684 | - | let | |
1685 | - | let | |
1686 | - | let | |
1687 | - | let | |
1688 | - | let | |
1686 | + | let dd = ba() | |
1687 | + | let dq = fromBase58String(dd[q]) | |
1688 | + | let hT = dd[r] | |
1689 | + | let hU = dd[s] | |
1690 | + | let dS = dd[v] | |
1691 | + | let dT = dd[w] | |
1692 | + | let de = parseIntValue(dd[t]) | |
1693 | + | let df = parseIntValue(dd[u]) | |
1694 | + | let hV = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1695 | + | let hW = bJ(hT) | |
1696 | + | let hX = bJ(hU) | |
1697 | + | let hY = if ((hV == 0)) | |
1689 | 1698 | then [e, e, e] | |
1690 | - | else | |
1691 | - | let | |
1692 | - | let | |
1693 | - | let | |
1694 | - | let | |
1695 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1699 | + | else db(hW, hX, hV) | |
1700 | + | let dA = 0 | |
1701 | + | let hZ = H(hY[1], b) | |
1702 | + | let ia = H(hY[2], b) | |
1703 | + | let ib = value(getInteger(aT, aD(toString(this)))) | |
1704 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hW), toString(hX), toString(hV), toString(dA), toString(hZ), toString(ia), toString(ib)], j)) | |
1696 | 1705 | } | |
1697 | 1706 | ||
1698 | 1707 | ||
1699 | 1708 | ||
1700 | - | @Callable( | |
1701 | - | func evaluatePutByAmountAssetREADONLY ( | |
1702 | - | let | |
1703 | - | let | |
1704 | - | let | |
1705 | - | let | |
1706 | - | let | |
1707 | - | let | |
1708 | - | let | |
1709 | - | let | |
1710 | - | let | |
1711 | - | let | |
1712 | - | let | |
1713 | - | let | |
1714 | - | let | |
1715 | - | let | |
1716 | - | let | |
1709 | + | @Callable(eV) | |
1710 | + | func evaluatePutByAmountAssetREADONLY (dK) = { | |
1711 | + | let dd = ba() | |
1712 | + | let dq = fromBase58String(dd[q]) | |
1713 | + | let dQ = dd[r] | |
1714 | + | let dr = fromBase58String(dQ) | |
1715 | + | let dR = dd[s] | |
1716 | + | let ds = fromBase58String(dR) | |
1717 | + | let de = parseIntValue(dd[t]) | |
1718 | + | let df = parseIntValue(dd[u]) | |
1719 | + | let dt = dd[p] | |
1720 | + | let hV = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1721 | + | let hW = bJ(dQ) | |
1722 | + | let hX = bJ(dR) | |
1723 | + | let cZ = D(hW, de) | |
1724 | + | let da = D(hX, df) | |
1725 | + | let dz = if ((hV == 0)) | |
1717 | 1726 | then e | |
1718 | - | else bM( | |
1719 | - | let | |
1720 | - | let | |
1721 | - | let | |
1722 | - | let | |
1723 | - | let | |
1724 | - | let | |
1725 | - | let | |
1726 | - | let | |
1727 | - | let | |
1728 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1727 | + | else bM(da, cZ) | |
1728 | + | let dW = D(dK, de) | |
1729 | + | let dX = fraction(dW, dz, d) | |
1730 | + | let dM = H(dX, df) | |
1731 | + | let fb = dI("", 500000, dK, dr, dM, ds, "", true, false) | |
1732 | + | let eh = fb._1 | |
1733 | + | let ic = fb._3 | |
1734 | + | let dv = fb._4 | |
1735 | + | let dx = fb._5 | |
1736 | + | let du = fb._6 | |
1737 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eh), toString(H(dz, b)), toString(dv), toString(dx), toString(du), dt, toString(dK), toString(dM)], j)) | |
1729 | 1738 | } | |
1730 | 1739 | ||
1731 | 1740 | ||
1732 | 1741 | ||
1733 | - | @Callable( | |
1734 | - | func evaluatePutByPriceAssetREADONLY ( | |
1735 | - | let | |
1736 | - | let | |
1737 | - | let | |
1738 | - | let | |
1739 | - | let | |
1740 | - | let | |
1741 | - | let | |
1742 | - | let | |
1743 | - | let | |
1744 | - | let | |
1745 | - | let | |
1746 | - | let | |
1747 | - | let | |
1748 | - | let | |
1749 | - | let | |
1742 | + | @Callable(eV) | |
1743 | + | func evaluatePutByPriceAssetREADONLY (dM) = { | |
1744 | + | let dd = ba() | |
1745 | + | let dq = fromBase58String(dd[q]) | |
1746 | + | let dQ = dd[r] | |
1747 | + | let dr = fromBase58String(dQ) | |
1748 | + | let dR = dd[s] | |
1749 | + | let ds = fromBase58String(dR) | |
1750 | + | let de = parseIntValue(dd[t]) | |
1751 | + | let df = parseIntValue(dd[u]) | |
1752 | + | let dt = dd[p] | |
1753 | + | let hV = valueOrErrorMessage(assetInfo(dq), (("Asset " + toBase58String(dq)) + " doesn't exist")).quantity | |
1754 | + | let id = bJ(dQ) | |
1755 | + | let ie = bJ(dR) | |
1756 | + | let if = D(id, de) | |
1757 | + | let ig = D(ie, df) | |
1758 | + | let dz = if ((hV == 0)) | |
1750 | 1759 | then e | |
1751 | - | else bM( | |
1752 | - | let | |
1753 | - | let | |
1754 | - | let | |
1755 | - | let | |
1756 | - | let | |
1757 | - | let | |
1758 | - | let | |
1759 | - | let | |
1760 | - | let | |
1761 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1760 | + | else bM(ig, if) | |
1761 | + | let dX = D(dM, df) | |
1762 | + | let dW = fraction(dX, d, dz) | |
1763 | + | let dK = H(dW, de) | |
1764 | + | let fb = dI("", 500000, dK, dr, dM, ds, "", true, false) | |
1765 | + | let eh = fb._1 | |
1766 | + | let ic = fb._3 | |
1767 | + | let dv = fb._4 | |
1768 | + | let dx = fb._5 | |
1769 | + | let du = fb._6 | |
1770 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eh), toString(H(dz, b)), toString(dv), toString(dx), toString(du), dt, toString(dK), toString(dM)], j)) | |
1762 | 1771 | } | |
1763 | 1772 | ||
1764 | 1773 | ||
1765 | 1774 | ||
1766 | - | @Callable( | |
1767 | - | func evaluateGetREADONLY ( | |
1768 | - | let | |
1769 | - | let | |
1770 | - | let | |
1771 | - | let | |
1772 | - | let | |
1773 | - | let | |
1774 | - | let | |
1775 | - | let | |
1776 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1775 | + | @Callable(eV) | |
1776 | + | func evaluateGetREADONLY (ih,ii) = { | |
1777 | + | let dZ = dm("", ih, ii, this) | |
1778 | + | let dF = dZ._1 | |
1779 | + | let dG = dZ._2 | |
1780 | + | let dv = dZ._5 | |
1781 | + | let dx = dZ._6 | |
1782 | + | let du = dZ._7 | |
1783 | + | let dA = dZ._8 | |
1784 | + | let dt = parseIntValue(dZ._9) | |
1785 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dF), toString(dG), toString(dv), toString(dx), toString(du), toString(dA), toString(dt)], j)) | |
1777 | 1786 | } | |
1778 | 1787 | ||
1779 | 1788 | ||
1780 | - | @Verifier( | |
1781 | - | func | |
1782 | - | let | |
1783 | - | let bT = | |
1789 | + | @Verifier(ij) | |
1790 | + | func ik () = { | |
1791 | + | let il = { | |
1792 | + | let bT = gh() | |
1784 | 1793 | if ($isInstanceOf(bT, "ByteVector")) | |
1785 | 1794 | then { | |
1786 | - | let | |
1787 | - | | |
1795 | + | let gl = bT | |
1796 | + | gl | |
1788 | 1797 | } | |
1789 | 1798 | else if ($isInstanceOf(bT, "Unit")) | |
1790 | - | then | |
1799 | + | then ij.senderPublicKey | |
1791 | 1800 | else throw("Match error") | |
1792 | 1801 | } | |
1793 | - | let bT = | |
1802 | + | let bT = ij | |
1794 | 1803 | if ($isInstanceOf(bT, "Order")) | |
1795 | 1804 | then { | |
1796 | - | let | |
1797 | - | let | |
1798 | - | let | |
1799 | - | let aI = | |
1800 | - | let aJ = | |
1801 | - | let aK = sigVerify( | |
1802 | - | let aL = sigVerify( | |
1805 | + | let eK = bT | |
1806 | + | let im = aZ() | |
1807 | + | let in = eJ(eK) | |
1808 | + | let aI = in._1 | |
1809 | + | let aJ = in._2 | |
1810 | + | let aK = sigVerify(eK.bodyBytes, eK.proofs[0], eK.senderPublicKey) | |
1811 | + | let aL = sigVerify(eK.bodyBytes, eK.proofs[1], im) | |
1803 | 1812 | if (if (if (aI) | |
1804 | 1813 | then aK | |
1805 | 1814 | else false) | |
1806 | 1815 | then aL | |
1807 | 1816 | else false) | |
1808 | 1817 | then true | |
1809 | 1818 | else aH(aI, aJ, aK, aL) | |
1810 | 1819 | } | |
1811 | 1820 | else if ($isInstanceOf(bT, "SetScriptTransaction")) | |
1812 | 1821 | then { | |
1813 | - | let | |
1814 | - | if (sigVerify( | |
1822 | + | let gi = bT | |
1823 | + | if (sigVerify(ij.bodyBytes, ij.proofs[0], il)) | |
1815 | 1824 | then true | |
1816 | 1825 | else { | |
1817 | - | let | |
1818 | - | let | |
1819 | - | let | |
1820 | - | if (( | |
1821 | - | then ( | |
1826 | + | let io = blake2b256(value(gi.script)) | |
1827 | + | let ip = fromBase64String(value(getString(aT, aF()))) | |
1828 | + | let iq = scriptHash(this) | |
1829 | + | if ((ip == io)) | |
1830 | + | then (iq != io) | |
1822 | 1831 | else false | |
1823 | 1832 | } | |
1824 | 1833 | } | |
1825 | - | else sigVerify( | |
1834 | + | else sigVerify(ij.bodyBytes, ij.proofs[0], il) | |
1826 | 1835 | } | |
1827 | 1836 |
github/deemru/w8io/169f3d6 552.06 ms ◑