tx · 8Gcr1AQyNGGr6UstxrYqZR3Uh9yX4Fqa3U1ENU7P9ScW 3N9KXr9JbnPwrN9oacmFjc3qB4tYrzvxWss: -0.03500000 Waves 2022.12.16 09:58 [2362523] smart account 3N9KXr9JbnPwrN9oacmFjc3qB4tYrzvxWss > SELF 0.00000000 Waves
{ "type": 13, "id": "8Gcr1AQyNGGr6UstxrYqZR3Uh9yX4Fqa3U1ENU7P9ScW", "fee": 3500000, "feeAssetId": null, "timestamp": 1671173914653, "version": 1, "sender": "3N9KXr9JbnPwrN9oacmFjc3qB4tYrzvxWss", "senderPublicKey": "CuH6mrgac4GztriBQFELtAx7gw4diUcD94EVLt78E1kt", "proofs": [ "5MTEK6LEfr1tSZQZKkS49KuVFHk6ymdqpSXyLPZuueUjCwtsNd62VqACazLT6f8NtZHn1oH8aaWLWNsMhkLpHo3D" ], "script": "base64:BgKdLQgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQ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ApAMBBQJjZgkAzAgCCQCkAwEFAmNoCQDMCAIJAKQDAQUCY2UJAMwIAgkApgMBBQJjawkAzAgCCQCkAwEFAmNkBQNuaWwFAWoBAmdCAQJnQwAEAmdEBAJkTgkBAmVRAAMJAAECBQJkTgIKQnl0ZVZlY3RvcgQCZVUFAmROBQJlVQMJAAECBQJkTgIEVW5pdAgFAmdCD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yBAJkTgUCZ0IDCQABAgUCZE4CBU9yZGVyBAJkcwUCZE4EAmdFCQECYU8ABAJhQgkBAmRyAQUCZHMEAmFDCQD0AwMIBQJkcwlib2R5Qnl0ZXMJAJEDAggFAmRzBnByb29mcwAACAUCZHMPc2VuZGVyUHVibGljS2V5BAJhRAkA9AMDCAUCZHMJYm9keUJ5dGVzCQCRAwIIBQJkcwZwcm9vZnMAAQUCZ0UDAwMFAmFCBQJhQwcFAmFEBwYJAQJhQQMFAmFCBQJhQwUCYUQDCQABAgUCZE4CFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJlUgUCZE4EAmdGCQD2AwEJAQV2YWx1ZQEIBQJlUgZzY3JpcHQEAmdHCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYUwJAQJheQAEAmdICQDxBwEFBHRoaXMDAwkAAAIFAmdHBQJnRgkBAiE9AgUCZ0gFAmdGBwYJAPQDAwgFAmdCCWJvZHlCeXRlcwkAkQMCCAUCZ0IGcHJvb2ZzAAAFAmdECQD0AwMIBQJnQglib2R5Qnl0ZXMJAJEDAggFAmdCBnByb29mcwAABQJnRE1P6gM=", "chainId": 84, "height": 2362523, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8dnW4ztARBTtRJVJCEjSDTqsVd8ondzy5SS4oiSA4K3r Next: EfXSUGbcwgUyirFw665ArpTENB1vhzsr7ESpq9bzr4i3 Diff:
Old | New | Differences | |
---|---|---|---|
288 | 288 | let cm = D(ce, b) | |
289 | 289 | let cn = fraction(cg, cl, cm) | |
290 | 290 | let co = fraction(ci, cl, cm) | |
291 | - | let cp = | |
292 | - | let cq = | |
291 | + | let cp = J(cn, bF, FLOOR) | |
292 | + | let cq = J(co, bG, FLOOR) | |
293 | 293 | let cr = if ((bX == "")) | |
294 | 294 | then nil | |
295 | 295 | else [ScriptTransfer(Z, cp, if ((cb == "WAVES")) | |
544 | 544 | if ((en == en)) | |
545 | 545 | then { | |
546 | 546 | let eo = toBigInt(ef) | |
547 | - | let ep = max([0, | |
547 | + | let ep = max([0, J(fraction(em, (sqrtBigInt((d + ((eo * d) / el)), 18, 18, DOWN) - d), d), b, FLOOR)]) | |
548 | 548 | let cY = if (dU) | |
549 | 549 | then nil | |
550 | 550 | else [IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej), StringEntry(Y(toString(value(Z)), toBase58String(value(aa))), bj(ec, ed, ep, ej, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
567 | 567 | ||
568 | 568 | func ew (ex,ef,dT,Z,aa) = { | |
569 | 569 | let dU = (aa == unit) | |
570 | + | let bN = aP() | |
571 | + | let bO = parseIntValue(bN[t]) | |
572 | + | let bP = parseIntValue(bN[u]) | |
570 | 573 | let ey = [if ((dT == bb)) | |
571 | 574 | then true | |
572 | 575 | else aI("invalid lp asset")] | |
580 | 583 | let eA = if (ez) | |
581 | 584 | then toBigInt(by(aU(bc))) | |
582 | 585 | else toBigInt(by(aU(bd))) | |
583 | - | let eB = by(aU(bc)) | |
584 | - | let eC = by(aU(bd)) | |
585 | - | let eD = if (ez) | |
586 | - | then eB | |
587 | - | else eC | |
588 | - | let eE = toBigInt(eD) | |
586 | + | let eB = if (ez) | |
587 | + | then bO | |
588 | + | else bP | |
589 | + | let eC = by(aU(bc)) | |
590 | + | let eD = by(aU(bd)) | |
591 | + | let eE = if (ez) | |
592 | + | then eC | |
593 | + | else eD | |
594 | + | let eF = toBigInt(eE) | |
589 | 595 | let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity) | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let dQ = | |
595 | - | let | |
596 | - | then $Tuple4( | |
597 | - | else $Tuple4(0, | |
598 | - | let | |
599 | - | let | |
600 | - | let | |
601 | - | let | |
602 | - | let ei = bA(D( | |
596 | + | let eG = toBigInt(ef) | |
597 | + | let eH = max([0, J(fraction(eA, (d - pow((d - ((eG * d) / em)), 18, h, 0, 18, DOWN)), d), eB, FLOOR)]) | |
598 | + | let eI = dP(eH) | |
599 | + | let eJ = eI._1 | |
600 | + | let dQ = eI._2 | |
601 | + | let eK = if (ez) | |
602 | + | then $Tuple4(eJ, 0, (eC - eH), eD) | |
603 | + | else $Tuple4(0, eJ, eC, (eD - eH)) | |
604 | + | let eL = eK._1 | |
605 | + | let eM = eK._2 | |
606 | + | let eN = eK._3 | |
607 | + | let eO = eK._4 | |
608 | + | let ei = bA(D(eO, bf), D(eN, be)) | |
603 | 609 | let ej = G(ei, b) | |
604 | 610 | let cY = if (dU) | |
605 | 611 | then nil | |
606 | - | else [StringEntry(ab(toString(value(Z)), toBase58String(value(aa))), bu( | |
607 | - | let eq = bA(D( | |
612 | + | else [StringEntry(ab(toString(value(Z)), toBase58String(value(aa))), bu(eL, eM, ef, ej, height, lastBlock.timestamp)), IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej)] | |
613 | + | let eq = bA(D(eD, bf), D(eC, be)) | |
608 | 614 | let er = G(eq, b) | |
609 | 615 | let es = { | |
610 | - | let | |
611 | - | fraction(( | |
616 | + | let eP = (toInt(fraction(eA, eG, em)) * 2) | |
617 | + | fraction((eJ - eP), b, eP) | |
612 | 618 | } | |
613 | - | $Tuple5( | |
619 | + | $Tuple5(eJ, cY, dQ, es, ez) | |
614 | 620 | } | |
615 | 621 | else throw("Strict value is not equal to itself.") | |
616 | 622 | } | |
617 | 623 | ||
618 | 624 | ||
619 | - | func | |
625 | + | func eQ () = { | |
620 | 626 | let dN = getString(S()) | |
621 | 627 | if ($isInstanceOf(dN, "String")) | |
622 | 628 | then { | |
623 | - | let | |
624 | - | fromBase58String( | |
629 | + | let eR = dN | |
630 | + | fromBase58String(eR) | |
625 | 631 | } | |
626 | 632 | else if ($isInstanceOf(dN, "Unit")) | |
627 | 633 | then unit | |
629 | 635 | } | |
630 | 636 | ||
631 | 637 | ||
632 | - | func | |
638 | + | func eS () = { | |
633 | 639 | let dN = getString(T()) | |
634 | 640 | if ($isInstanceOf(dN, "String")) | |
635 | 641 | then { | |
636 | - | let | |
637 | - | fromBase58String( | |
642 | + | let eR = dN | |
643 | + | fromBase58String(eR) | |
638 | 644 | } | |
639 | 645 | else if ($isInstanceOf(dN, "Unit")) | |
640 | 646 | then unit | |
642 | 648 | } | |
643 | 649 | ||
644 | 650 | ||
645 | - | func | |
646 | - | let dN = | |
651 | + | func eT (dC) = { | |
652 | + | let dN = eQ() | |
647 | 653 | if ($isInstanceOf(dN, "ByteVector")) | |
648 | 654 | then { | |
649 | - | let | |
650 | - | (dC.callerPublicKey == | |
655 | + | let eU = dN | |
656 | + | (dC.callerPublicKey == eU) | |
651 | 657 | } | |
652 | 658 | else if ($isInstanceOf(dN, "Unit")) | |
653 | 659 | then (dC.caller == this) | |
655 | 661 | } | |
656 | 662 | ||
657 | 663 | ||
658 | - | func | |
659 | - | let | |
660 | - | let dN = | |
664 | + | func eV (dC) = { | |
665 | + | let eW = throw("Permission denied") | |
666 | + | let dN = eQ() | |
661 | 667 | if ($isInstanceOf(dN, "ByteVector")) | |
662 | 668 | then { | |
663 | - | let | |
664 | - | if ((dC.callerPublicKey == | |
669 | + | let eU = dN | |
670 | + | if ((dC.callerPublicKey == eU)) | |
665 | 671 | then true | |
666 | - | else | |
672 | + | else eW | |
667 | 673 | } | |
668 | 674 | else if ($isInstanceOf(dN, "Unit")) | |
669 | 675 | then if ((dC.caller == this)) | |
670 | 676 | then true | |
671 | - | else | |
677 | + | else eW | |
672 | 678 | else throw("Match error") | |
673 | 679 | } | |
674 | 680 | ||
675 | 681 | ||
676 | 682 | @Callable(dC) | |
677 | - | func setManager ( | |
678 | - | let | |
679 | - | if (( | |
683 | + | func setManager (eX) = { | |
684 | + | let eY = eV(dC) | |
685 | + | if ((eY == eY)) | |
680 | 686 | then { | |
681 | - | let | |
682 | - | if (( | |
683 | - | then [StringEntry(T(), | |
687 | + | let eZ = fromBase58String(eX) | |
688 | + | if ((eZ == eZ)) | |
689 | + | then [StringEntry(T(), eX)] | |
684 | 690 | else throw("Strict value is not equal to itself.") | |
685 | 691 | } | |
686 | 692 | else throw("Strict value is not equal to itself.") | |
690 | 696 | ||
691 | 697 | @Callable(dC) | |
692 | 698 | func confirmManager () = { | |
693 | - | let | |
694 | - | let | |
699 | + | let fa = eS() | |
700 | + | let fb = if (isDefined(fa)) | |
695 | 701 | then true | |
696 | 702 | else throw("No pending manager") | |
697 | - | if (( | |
703 | + | if ((fb == fb)) | |
698 | 704 | then { | |
699 | - | let | |
705 | + | let fc = if ((dC.callerPublicKey == value(fa))) | |
700 | 706 | then true | |
701 | 707 | else throw("You are not pending manager") | |
702 | - | if (( | |
703 | - | then [StringEntry(S(), toBase58String(value( | |
708 | + | if ((fc == fc)) | |
709 | + | then [StringEntry(S(), toBase58String(value(fa))), DeleteEntry(T())] | |
704 | 710 | else throw("Strict value is not equal to itself.") | |
705 | 711 | } | |
706 | 712 | else throw("Strict value is not equal to itself.") | |
709 | 715 | ||
710 | 716 | ||
711 | 717 | @Callable(dC) | |
712 | - | func put (ct, | |
718 | + | func put (ct,fd) = if ((0 > ct)) | |
713 | 719 | then throw("Invalid slippageTolerance passed") | |
714 | 720 | else { | |
715 | 721 | let dI = dF(dC, ct, true) | |
718 | 724 | let cr = dI._9 | |
719 | 725 | let cW = dI._10 | |
720 | 726 | let cX = dI._11 | |
721 | - | let | |
722 | - | let | |
727 | + | let fe = dI._12 | |
728 | + | let ff = dI._13 | |
723 | 729 | let dG = toBigInt(value(dC.payments[0]).amount) | |
724 | 730 | let dH = toBigInt(value(dC.payments[1]).amount) | |
725 | 731 | let dk = dd(dG, dH, toBigInt(0)) | |
739 | 745 | } | |
740 | 746 | if ((dM == dM)) | |
741 | 747 | then { | |
742 | - | let | |
743 | - | then invoke(bi, "put", nil, [AttachedPayment( | |
748 | + | let fg = if ((cW > 0)) | |
749 | + | then invoke(bi, "put", nil, [AttachedPayment(fe, cW)]) | |
744 | 750 | else nil | |
745 | - | if (( | |
751 | + | if ((fg == fg)) | |
746 | 752 | then { | |
747 | - | let | |
748 | - | then invoke(bi, "put", nil, [AttachedPayment( | |
753 | + | let fh = if ((cX > 0)) | |
754 | + | then invoke(bi, "put", nil, [AttachedPayment(ff, cX)]) | |
749 | 755 | else nil | |
750 | - | if (( | |
756 | + | if ((fh == fh)) | |
751 | 757 | then { | |
752 | - | let | |
758 | + | let fi = if (fd) | |
753 | 759 | then { | |
754 | - | let | |
755 | - | if (( | |
760 | + | let fj = invoke(bh, "stake", nil, [AttachedPayment(ca, cV)]) | |
761 | + | if ((fj == fj)) | |
756 | 762 | then nil | |
757 | 763 | else throw("Strict value is not equal to itself.") | |
758 | 764 | } | |
759 | 765 | else [ScriptTransfer(dC.caller, cV, ca)] | |
760 | - | let | |
761 | - | if (( | |
766 | + | let fk = dl(0, 0, 0) | |
767 | + | if ((fk == fk)) | |
762 | 768 | then { | |
763 | - | let dc = | |
764 | - | let | |
765 | - | let | |
766 | - | if (( | |
767 | - | then ((cr ++ | |
769 | + | let dc = fk._2 | |
770 | + | let fl = fk._1 | |
771 | + | let fm = dp(dk, dc) | |
772 | + | if ((fm == fm)) | |
773 | + | then ((cr ++ fi) ++ fl) | |
768 | 774 | else throw("Strict value is not equal to itself.") | |
769 | 775 | } | |
770 | 776 | else throw("Strict value is not equal to itself.") | |
783 | 789 | ||
784 | 790 | ||
785 | 791 | @Callable(dC) | |
786 | - | func putForFree ( | |
792 | + | func putForFree (fn) = if ((0 > fn)) | |
787 | 793 | then throw("Invalid value passed") | |
788 | 794 | else { | |
789 | - | let dI = dF(dC, | |
795 | + | let dI = dF(dC, fn, false) | |
790 | 796 | let cr = dI._9 | |
791 | 797 | let dG = toBigInt(value(dC.payments[0]).amount) | |
792 | 798 | let dH = toBigInt(value(dC.payments[1]).amount) | |
793 | 799 | let dk = dd(dG, dH, toBigInt(0)) | |
794 | 800 | if ((dk == dk)) | |
795 | 801 | then { | |
796 | - | let | |
797 | - | let | |
798 | - | let dc = | |
799 | - | let | |
800 | - | if (( | |
801 | - | then (cr ++ | |
802 | + | let fo = dl(0, 0, 0) | |
803 | + | let fl = fo._1 | |
804 | + | let dc = fo._2 | |
805 | + | let fm = dp(dk, dc) | |
806 | + | if ((fm == fm)) | |
807 | + | then (cr ++ fl) | |
802 | 808 | else throw("Strict value is not equal to itself.") | |
803 | 809 | } | |
804 | 810 | else throw("Strict value is not equal to itself.") | |
807 | 813 | ||
808 | 814 | ||
809 | 815 | @Callable(dC) | |
810 | - | func putOneTkn ( | |
811 | - | let | |
812 | - | let | |
813 | - | if ($isInstanceOf( | |
814 | - | then | |
815 | - | else throw(($getType( | |
816 | + | func putOneTkn (fp,fq) = { | |
817 | + | let fr = { | |
818 | + | let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
819 | + | if ($isInstanceOf(fs, "Boolean")) | |
820 | + | then fs | |
821 | + | else throw(($getType(fs) + " couldn't be cast to Boolean")) | |
816 | 822 | } | |
817 | - | let | |
823 | + | let ft = if (if (if (aN()) | |
818 | 824 | then true | |
819 | 825 | else (ba == l)) | |
820 | 826 | then true | |
821 | 827 | else (ba == n)) | |
822 | 828 | then true | |
823 | - | else | |
824 | - | let ey = [if (if (!( | |
829 | + | else fr | |
830 | + | let ey = [if (if (!(ft)) | |
825 | 831 | then true | |
826 | - | else | |
832 | + | else eT(dC)) | |
827 | 833 | then true | |
828 | 834 | else aI("put operation is blocked by admin"), if ((size(dC.payments) == 1)) | |
829 | 835 | then true | |
830 | 836 | else aI("exactly 1 payment are expected")] | |
831 | 837 | if ((ey == ey)) | |
832 | 838 | then { | |
833 | - | let | |
834 | - | let dT = | |
835 | - | let dS = | |
839 | + | let fu = dC.payments[0] | |
840 | + | let dT = fu.assetId | |
841 | + | let dS = fu.amount | |
836 | 842 | let dk = if ((dT == bc)) | |
837 | 843 | then dd(toBigInt(dS), toBigInt(0), toBigInt(0)) | |
838 | 844 | else if ((dT == bd)) | |
840 | 846 | else aI("payment asset is not supported") | |
841 | 847 | let Z = dC.caller | |
842 | 848 | let aa = dC.transactionId | |
843 | - | let | |
844 | - | if (( | |
849 | + | let fv = dR(dS, dT, Z, aa) | |
850 | + | if ((fv == fv)) | |
845 | 851 | then { | |
846 | - | let dX = | |
847 | - | let | |
848 | - | let dQ = | |
849 | - | let cY = | |
850 | - | let | |
851 | - | let | |
852 | - | then ( | |
852 | + | let dX = fv._5 | |
853 | + | let fw = fv._4 | |
854 | + | let dQ = fv._3 | |
855 | + | let cY = fv._2 | |
856 | + | let fx = fv._1 | |
857 | + | let fy = if (if ((fp > 0)) | |
858 | + | then (fp > fx) | |
853 | 859 | else false) | |
854 | - | then aI(makeString(["amount to receive is less than ", toString( | |
855 | - | else | |
856 | - | let dL = dJ( | |
860 | + | then aI(makeString(["amount to receive is less than ", toString(fp)], "")) | |
861 | + | else fx | |
862 | + | let dL = dJ(fy) | |
857 | 863 | if ((dL == dL)) | |
858 | 864 | then { | |
859 | - | let | |
865 | + | let fi = if (fq) | |
860 | 866 | then { | |
861 | - | let | |
862 | - | if (( | |
867 | + | let fz = invoke(bh, "stake", nil, [AttachedPayment(bb, fy)]) | |
868 | + | if ((fz == fz)) | |
863 | 869 | then nil | |
864 | 870 | else throw("Strict value is not equal to itself.") | |
865 | 871 | } | |
866 | - | else [ScriptTransfer(dC.caller, | |
867 | - | let | |
872 | + | else [ScriptTransfer(dC.caller, fy, bb)] | |
873 | + | let fA = if ((dQ > 0)) | |
868 | 874 | then [ScriptTransfer(aM, dQ, dT)] | |
869 | 875 | else nil | |
870 | - | let | |
876 | + | let fB = if ((this == aM)) | |
871 | 877 | then $Tuple2(0, 0) | |
872 | 878 | else if (dX) | |
873 | 879 | then $Tuple2(-(dQ), 0) | |
874 | 880 | else $Tuple2(0, -(dQ)) | |
875 | - | let dm = | |
876 | - | let dn = | |
877 | - | let | |
878 | - | let | |
879 | - | let dc = | |
881 | + | let dm = fB._1 | |
882 | + | let dn = fB._2 | |
883 | + | let fC = dl(dm, dn, 0) | |
884 | + | let fl = fC._1 | |
885 | + | let dc = fC._2 | |
880 | 886 | let dw = value(getString(ah)) | |
881 | - | let | |
882 | - | if (( | |
883 | - | then $Tuple2((((cY ++ | |
887 | + | let fm = dp(dk, dc) | |
888 | + | if ((fm == fm)) | |
889 | + | then $Tuple2((((cY ++ fi) ++ fA) ++ fl), fy) | |
884 | 890 | else throw("Strict value is not equal to itself.") | |
885 | 891 | } | |
886 | 892 | else throw("Strict value is not equal to itself.") | |
894 | 900 | ||
895 | 901 | @Callable(dC) | |
896 | 902 | func putOneTknREADONLY (dT,dS) = { | |
897 | - | let | |
898 | - | let | |
899 | - | let cY = | |
900 | - | let dQ = | |
901 | - | let | |
902 | - | let dX = | |
903 | - | $Tuple2(nil, $Tuple3( | |
903 | + | let fD = dR(dS, aS(dT), unit, unit) | |
904 | + | let fx = fD._1 | |
905 | + | let cY = fD._2 | |
906 | + | let dQ = fD._3 | |
907 | + | let fw = fD._4 | |
908 | + | let dX = fD._5 | |
909 | + | $Tuple2(nil, $Tuple3(fx, dQ, fw)) | |
904 | 910 | } | |
905 | 911 | ||
906 | 912 | ||
907 | 913 | ||
908 | 914 | @Callable(dC) | |
909 | - | func getOneTkn ( | |
910 | - | let | |
911 | - | let | |
912 | - | if ($isInstanceOf( | |
913 | - | then | |
914 | - | else throw(($getType( | |
915 | + | func getOneTkn (fE,fp) = { | |
916 | + | let fr = { | |
917 | + | let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
918 | + | if ($isInstanceOf(fs, "Boolean")) | |
919 | + | then fs | |
920 | + | else throw(($getType(fs) + " couldn't be cast to Boolean")) | |
915 | 921 | } | |
916 | - | let | |
922 | + | let fF = if (if (aN()) | |
917 | 923 | then true | |
918 | 924 | else (ba == n)) | |
919 | 925 | then true | |
920 | - | else | |
921 | - | let ey = [if (if (!( | |
926 | + | else fr | |
927 | + | let ey = [if (if (!(fF)) | |
922 | 928 | then true | |
923 | - | else | |
929 | + | else eT(dC)) | |
924 | 930 | then true | |
925 | 931 | else aI("get operation is blocked by admin"), if ((size(dC.payments) == 1)) | |
926 | 932 | then true | |
927 | 933 | else aI("exactly 1 payment are expected")] | |
928 | 934 | if ((ey == ey)) | |
929 | 935 | then { | |
930 | - | let ex = aS( | |
931 | - | let | |
932 | - | let dT = | |
933 | - | let ef = | |
936 | + | let ex = aS(fE) | |
937 | + | let fu = dC.payments[0] | |
938 | + | let dT = fu.assetId | |
939 | + | let ef = fu.amount | |
934 | 940 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(ef)) | |
935 | 941 | let Z = dC.caller | |
936 | 942 | let aa = dC.transactionId | |
937 | - | let | |
938 | - | if (( | |
943 | + | let fG = ew(ex, ef, dT, Z, aa) | |
944 | + | if ((fG == fG)) | |
939 | 945 | then { | |
940 | - | let ez = | |
941 | - | let | |
942 | - | let dQ = | |
943 | - | let cY = | |
944 | - | let | |
945 | - | let dK = if (if (( | |
946 | - | then ( | |
946 | + | let ez = fG._5 | |
947 | + | let fw = fG._4 | |
948 | + | let dQ = fG._3 | |
949 | + | let cY = fG._2 | |
950 | + | let fH = fG._1 | |
951 | + | let dK = if (if ((fp > 0)) | |
952 | + | then (fp > fH) | |
947 | 953 | else false) | |
948 | - | then aI(makeString(["amount to receive is less than ", toString( | |
949 | - | else | |
950 | - | let | |
951 | - | if (( | |
954 | + | then aI(makeString(["amount to receive is less than ", toString(fp)], "")) | |
955 | + | else fH | |
956 | + | let fI = invoke(aL, "burn", [ef], [AttachedPayment(dT, ef)]) | |
957 | + | if ((fI == fI)) | |
952 | 958 | then { | |
953 | - | let | |
954 | - | let | |
959 | + | let fJ = [ScriptTransfer(Z, dK, ex)] | |
960 | + | let fA = if ((dQ > 0)) | |
955 | 961 | then [ScriptTransfer(aM, dQ, ex)] | |
956 | 962 | else nil | |
957 | - | let | |
958 | - | let | |
963 | + | let fK = { | |
964 | + | let fL = if ((this == aM)) | |
959 | 965 | then 0 | |
960 | 966 | else dQ | |
961 | 967 | if (ez) | |
962 | - | then $Tuple2(-((dK + | |
963 | - | else $Tuple2(0, -((dK + | |
968 | + | then $Tuple2(-((dK + fL)), 0) | |
969 | + | else $Tuple2(0, -((dK + fL))) | |
964 | 970 | } | |
965 | - | let dm = | |
966 | - | let dn = | |
967 | - | let | |
968 | - | let | |
969 | - | let dc = | |
970 | - | let | |
971 | - | if (( | |
972 | - | then $Tuple2((((cY ++ | |
971 | + | let dm = fK._1 | |
972 | + | let dn = fK._2 | |
973 | + | let fM = dl(dm, dn, 0) | |
974 | + | let fl = fM._1 | |
975 | + | let dc = fM._2 | |
976 | + | let fm = dp(dk, dc) | |
977 | + | if ((fm == fm)) | |
978 | + | then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK) | |
973 | 979 | else throw("Strict value is not equal to itself.") | |
974 | 980 | } | |
975 | 981 | else throw("Strict value is not equal to itself.") | |
983 | 989 | ||
984 | 990 | @Callable(dC) | |
985 | 991 | func getOneTknREADONLY (ex,ef) = { | |
986 | - | let | |
987 | - | let | |
988 | - | let cY = | |
989 | - | let dQ = | |
990 | - | let | |
991 | - | let ez = | |
992 | - | $Tuple2(nil, $Tuple3( | |
992 | + | let fN = ew(aS(ex), ef, bb, unit, unit) | |
993 | + | let fH = fN._1 | |
994 | + | let cY = fN._2 | |
995 | + | let dQ = fN._3 | |
996 | + | let fw = fN._4 | |
997 | + | let ez = fN._5 | |
998 | + | $Tuple2(nil, $Tuple3(fH, dQ, fw)) | |
993 | 999 | } | |
994 | 1000 | ||
995 | 1001 | ||
996 | 1002 | ||
997 | 1003 | @Callable(dC) | |
998 | - | func unstakeAndGetOneTkn ( | |
999 | - | let | |
1000 | - | let | |
1001 | - | if ($isInstanceOf( | |
1002 | - | then | |
1003 | - | else throw(($getType( | |
1004 | + | func unstakeAndGetOneTkn (fO,fE,fp) = { | |
1005 | + | let fr = { | |
1006 | + | let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1007 | + | if ($isInstanceOf(fs, "Boolean")) | |
1008 | + | then fs | |
1009 | + | else throw(($getType(fs) + " couldn't be cast to Boolean")) | |
1004 | 1010 | } | |
1005 | - | let | |
1011 | + | let fF = if (if (aN()) | |
1006 | 1012 | then true | |
1007 | 1013 | else (ba == n)) | |
1008 | 1014 | then true | |
1009 | - | else | |
1010 | - | let ey = [if (if (!( | |
1015 | + | else fr | |
1016 | + | let ey = [if (if (!(fF)) | |
1011 | 1017 | then true | |
1012 | - | else | |
1018 | + | else eT(dC)) | |
1013 | 1019 | then true | |
1014 | 1020 | else aI("get operation is blocked by admin"), if ((size(dC.payments) == 0)) | |
1015 | 1021 | then true | |
1016 | 1022 | else aI("no payments are expected")] | |
1017 | 1023 | if ((ey == ey)) | |
1018 | 1024 | then { | |
1019 | - | let ex = aS( | |
1025 | + | let ex = aS(fE) | |
1020 | 1026 | let Z = dC.caller | |
1021 | 1027 | let aa = dC.transactionId | |
1022 | 1028 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1023 | - | let | |
1024 | - | if (( | |
1029 | + | let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil) | |
1030 | + | if ((fP == fP)) | |
1025 | 1031 | then { | |
1026 | - | let | |
1027 | - | if (( | |
1032 | + | let fQ = ew(ex, fO, bb, Z, aa) | |
1033 | + | if ((fQ == fQ)) | |
1028 | 1034 | then { | |
1029 | - | let ez = | |
1030 | - | let | |
1031 | - | let dQ = | |
1032 | - | let cY = | |
1033 | - | let | |
1034 | - | let dK = if (if (( | |
1035 | - | then ( | |
1035 | + | let ez = fQ._5 | |
1036 | + | let fw = fQ._4 | |
1037 | + | let dQ = fQ._3 | |
1038 | + | let cY = fQ._2 | |
1039 | + | let fH = fQ._1 | |
1040 | + | let dK = if (if ((fp > 0)) | |
1041 | + | then (fp > fH) | |
1036 | 1042 | else false) | |
1037 | - | then aI(makeString(["amount to receive is less than ", toString( | |
1038 | - | else | |
1039 | - | let | |
1040 | - | if (( | |
1043 | + | then aI(makeString(["amount to receive is less than ", toString(fp)], "")) | |
1044 | + | else fH | |
1045 | + | let fI = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)]) | |
1046 | + | if ((fI == fI)) | |
1041 | 1047 | then { | |
1042 | - | let | |
1043 | - | let | |
1048 | + | let fJ = [ScriptTransfer(dC.caller, dK, ex)] | |
1049 | + | let fA = if ((dQ > 0)) | |
1044 | 1050 | then [ScriptTransfer(aM, dQ, ex)] | |
1045 | 1051 | else nil | |
1046 | - | let | |
1047 | - | let | |
1052 | + | let fR = { | |
1053 | + | let fL = if ((this == aM)) | |
1048 | 1054 | then 0 | |
1049 | 1055 | else dQ | |
1050 | 1056 | if (ez) | |
1051 | - | then $Tuple2(-((dK + | |
1052 | - | else $Tuple2(0, -((dK + | |
1057 | + | then $Tuple2(-((dK + fL)), 0) | |
1058 | + | else $Tuple2(0, -((dK + fL))) | |
1053 | 1059 | } | |
1054 | - | let dm = | |
1055 | - | let dn = | |
1056 | - | let | |
1057 | - | let | |
1058 | - | let dc = | |
1059 | - | let | |
1060 | - | if (( | |
1061 | - | then $Tuple2((((cY ++ | |
1060 | + | let dm = fR._1 | |
1061 | + | let dn = fR._2 | |
1062 | + | let fS = dl(dm, dn, 0) | |
1063 | + | let fl = fS._1 | |
1064 | + | let dc = fS._2 | |
1065 | + | let fm = dp(dk, dc) | |
1066 | + | if ((fm == fm)) | |
1067 | + | then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK) | |
1062 | 1068 | else throw("Strict value is not equal to itself.") | |
1063 | 1069 | } | |
1064 | 1070 | else throw("Strict value is not equal to itself.") | |
1075 | 1081 | @Callable(dC) | |
1076 | 1082 | func get () = { | |
1077 | 1083 | let cJ = dB(dC) | |
1078 | - | let | |
1084 | + | let fT = cJ._1 | |
1079 | 1085 | let cq = cJ._2 | |
1080 | 1086 | let dE = cJ._3 | |
1081 | 1087 | let bY = cJ._4 | |
1082 | 1088 | let cr = cJ._5 | |
1083 | 1089 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE)) | |
1084 | - | let | |
1085 | - | if (( | |
1090 | + | let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)]) | |
1091 | + | if ((fU == fU)) | |
1086 | 1092 | then { | |
1087 | - | let | |
1088 | - | let | |
1089 | - | let dc = | |
1090 | - | let | |
1091 | - | if (( | |
1092 | - | then (cr ++ | |
1093 | + | let fV = dl(-(fT), -(cq), 0) | |
1094 | + | let fl = fV._1 | |
1095 | + | let dc = fV._2 | |
1096 | + | let fm = dp(dk, dc) | |
1097 | + | if ((fm == fm)) | |
1098 | + | then (cr ++ fl) | |
1093 | 1099 | else throw("Strict value is not equal to itself.") | |
1094 | 1100 | } | |
1095 | 1101 | else throw("Strict value is not equal to itself.") | |
1098 | 1104 | ||
1099 | 1105 | ||
1100 | 1106 | @Callable(dC) | |
1101 | - | func getNoLess ( | |
1107 | + | func getNoLess (fW,fX) = { | |
1102 | 1108 | let cJ = dB(dC) | |
1103 | 1109 | let cp = cJ._1 | |
1104 | 1110 | let cq = cJ._2 | |
1105 | 1111 | let dE = cJ._3 | |
1106 | 1112 | let bY = cJ._4 | |
1107 | 1113 | let cr = cJ._5 | |
1108 | - | if (( | |
1109 | - | then throw(((("noLessThenAmtAsset failed: " + toString(cp)) + " < ") + toString( | |
1110 | - | else if (( | |
1111 | - | then throw(((("noLessThenPriceAsset failed: " + toString(cq)) + " < ") + toString( | |
1114 | + | if ((fW > cp)) | |
1115 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cp)) + " < ") + toString(fW))) | |
1116 | + | else if ((fX > cq)) | |
1117 | + | then throw(((("noLessThenPriceAsset failed: " + toString(cq)) + " < ") + toString(fX))) | |
1112 | 1118 | else { | |
1113 | 1119 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE)) | |
1114 | - | let | |
1115 | - | if (( | |
1120 | + | let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)]) | |
1121 | + | if ((fU == fU)) | |
1116 | 1122 | then { | |
1117 | - | let | |
1118 | - | let | |
1119 | - | let dc = | |
1120 | - | let | |
1121 | - | if (( | |
1122 | - | then (cr ++ | |
1123 | + | let fY = dl(-(cp), -(cq), 0) | |
1124 | + | let fl = fY._1 | |
1125 | + | let dc = fY._2 | |
1126 | + | let fm = dp(dk, dc) | |
1127 | + | if ((fm == fm)) | |
1128 | + | then (cr ++ fl) | |
1123 | 1129 | else throw("Strict value is not equal to itself.") | |
1124 | 1130 | } | |
1125 | 1131 | else throw("Strict value is not equal to itself.") | |
1130 | 1136 | ||
1131 | 1137 | @Callable(dC) | |
1132 | 1138 | func unstakeAndGet (dK) = { | |
1133 | - | let | |
1139 | + | let fZ = if ((size(dC.payments) != 0)) | |
1134 | 1140 | then throw("No payments are expected") | |
1135 | 1141 | else true | |
1136 | - | if (( | |
1142 | + | if ((fZ == fZ)) | |
1137 | 1143 | then { | |
1138 | 1144 | let bN = aP() | |
1139 | 1145 | let ca = fromBase58String(bN[q]) | |
1140 | 1146 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1141 | - | let | |
1142 | - | if (( | |
1147 | + | let fP = invoke(bh, "unstake", [toBase58String(ca), dK], nil) | |
1148 | + | if ((fP == fP)) | |
1143 | 1149 | then { | |
1144 | 1150 | let cJ = bW(toBase58String(dC.transactionId), toBase58String(ca), dK, dC.caller) | |
1145 | 1151 | let cp = cJ._1 | |
1146 | 1152 | let cq = cJ._2 | |
1147 | 1153 | let cd = parseIntValue(cJ._9) | |
1148 | 1154 | let cr = cJ._10 | |
1149 | - | let | |
1155 | + | let ga = if (if (aN()) | |
1150 | 1156 | then true | |
1151 | 1157 | else (cd == n)) | |
1152 | 1158 | then throw(("Get operation is blocked by admin. Status = " + toString(cd))) | |
1153 | 1159 | else true | |
1154 | - | if (( | |
1160 | + | if ((ga == ga)) | |
1155 | 1161 | then { | |
1156 | - | let | |
1157 | - | if (( | |
1162 | + | let fU = invoke(aL, "burn", [dK], [AttachedPayment(ca, dK)]) | |
1163 | + | if ((fU == fU)) | |
1158 | 1164 | then { | |
1159 | - | let | |
1160 | - | let | |
1161 | - | let dc = | |
1162 | - | let | |
1163 | - | if (( | |
1164 | - | then (cr ++ | |
1165 | + | let gb = dl(-(cp), -(cq), 0) | |
1166 | + | let fl = gb._1 | |
1167 | + | let dc = gb._2 | |
1168 | + | let fm = dp(dk, dc) | |
1169 | + | if ((fm == fm)) | |
1170 | + | then (cr ++ fl) | |
1165 | 1171 | else throw("Strict value is not equal to itself.") | |
1166 | 1172 | } | |
1167 | 1173 | else throw("Strict value is not equal to itself.") | |
1176 | 1182 | ||
1177 | 1183 | ||
1178 | 1184 | @Callable(dC) | |
1179 | - | func unstakeAndGetNoLess ( | |
1180 | - | let | |
1185 | + | func unstakeAndGetNoLess (fO,gc,fX) = { | |
1186 | + | let fF = if (aN()) | |
1181 | 1187 | then true | |
1182 | 1188 | else (ba == n) | |
1183 | - | let ey = [if (!( | |
1189 | + | let ey = [if (!(fF)) | |
1184 | 1190 | then true | |
1185 | 1191 | else throw("get operation is blocked by admin"), if ((size(dC.payments) == 0)) | |
1186 | 1192 | then true | |
1188 | 1194 | if ((ey == ey)) | |
1189 | 1195 | then { | |
1190 | 1196 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1191 | - | let | |
1192 | - | if (( | |
1197 | + | let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil) | |
1198 | + | if ((fP == fP)) | |
1193 | 1199 | then { | |
1194 | - | let cJ = bW(toBase58String(dC.transactionId), toBase58String(bb), | |
1200 | + | let cJ = bW(toBase58String(dC.transactionId), toBase58String(bb), fO, dC.caller) | |
1195 | 1201 | let cp = cJ._1 | |
1196 | 1202 | let cq = cJ._2 | |
1197 | 1203 | let cr = cJ._10 | |
1198 | - | let | |
1204 | + | let gd = [if ((cp >= gc)) | |
1199 | 1205 | then true | |
1200 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1206 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(gc)], "")), if ((cq >= fX)) | |
1201 | 1207 | then true | |
1202 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1203 | - | if (( | |
1208 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fX)], ""))] | |
1209 | + | if ((gd == gd)) | |
1204 | 1210 | then { | |
1205 | - | let | |
1206 | - | if (( | |
1211 | + | let fU = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)]) | |
1212 | + | if ((fU == fU)) | |
1207 | 1213 | then { | |
1208 | - | let | |
1209 | - | let | |
1210 | - | let dc = | |
1211 | - | let | |
1212 | - | if (( | |
1213 | - | then (cr ++ | |
1214 | + | let ge = dl(-(cp), -(cq), 0) | |
1215 | + | let fl = ge._1 | |
1216 | + | let dc = ge._2 | |
1217 | + | let fm = dp(dk, dc) | |
1218 | + | if ((fm == fm)) | |
1219 | + | then (cr ++ fl) | |
1214 | 1220 | else throw("Strict value is not equal to itself.") | |
1215 | 1221 | } | |
1216 | 1222 | else throw("Strict value is not equal to itself.") | |
1225 | 1231 | ||
1226 | 1232 | ||
1227 | 1233 | @Callable(dC) | |
1228 | - | func activate ( | |
1234 | + | func activate (gf,gg) = if ((toString(dC.caller) != toString(aL))) | |
1229 | 1235 | then throw("permissions denied") | |
1230 | - | else $Tuple2([StringEntry(ac(), | |
1236 | + | else $Tuple2([StringEntry(ac(), gf), StringEntry(ad(), gg)], "success") | |
1231 | 1237 | ||
1232 | 1238 | ||
1233 | 1239 | ||
1234 | 1240 | @Callable(dC) | |
1235 | 1241 | func refreshKLp () = { | |
1236 | - | let | |
1237 | - | let | |
1242 | + | let gh = valueOrElse(getInteger(ai), 0) | |
1243 | + | let gi = if (((height - gh) >= al)) | |
1238 | 1244 | then unit | |
1239 | 1245 | else aI(makeString([toString(al), " blocks have not passed since the previous call"], "")) | |
1240 | - | if (( | |
1246 | + | if ((gi == gi)) | |
1241 | 1247 | then { | |
1242 | 1248 | let dw = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ah), "0")), aK("invalid kLp")) | |
1243 | - | let | |
1244 | - | let | |
1245 | - | let dc = | |
1249 | + | let gj = dl(0, 0, 0) | |
1250 | + | let gk = gj._1 | |
1251 | + | let dc = gj._2 | |
1246 | 1252 | let do = if ((dw != dc)) | |
1247 | - | then | |
1253 | + | then gk | |
1248 | 1254 | else aI("nothing to refresh") | |
1249 | 1255 | $Tuple2(do, toString(dc)) | |
1250 | 1256 | } | |
1303 | 1309 | func statsREADONLY () = { | |
1304 | 1310 | let bN = aP() | |
1305 | 1311 | let ca = fromBase58String(bN[q]) | |
1306 | - | let | |
1307 | - | let | |
1312 | + | let gl = bN[r] | |
1313 | + | let gm = bN[s] | |
1308 | 1314 | let cC = bN[v] | |
1309 | 1315 | let cD = bN[w] | |
1310 | 1316 | let bO = parseIntValue(bN[t]) | |
1311 | 1317 | let bP = parseIntValue(bN[u]) | |
1312 | - | let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1313 | - | let gn = by(gk) | |
1318 | + | let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1314 | 1319 | let go = by(gl) | |
1315 | - | let gp = if ((gm == 0)) | |
1320 | + | let gp = by(gm) | |
1321 | + | let gq = if ((gn == 0)) | |
1316 | 1322 | then [e, e, e] | |
1317 | - | else bL( | |
1323 | + | else bL(go, gp, gn) | |
1318 | 1324 | let ck = 0 | |
1319 | - | let | |
1320 | - | let | |
1321 | - | let | |
1322 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gn), toString( | |
1325 | + | let gr = G(gq[1], b) | |
1326 | + | let gs = G(gq[2], b) | |
1327 | + | let gt = value(getInteger(aL, aw(toString(this)))) | |
1328 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(go), toString(gp), toString(gn), toString(ck), toString(gr), toString(gs), toString(gt)], j)) | |
1323 | 1329 | } | |
1324 | 1330 | ||
1325 | 1331 | ||
1335 | 1341 | let bO = parseIntValue(bN[t]) | |
1336 | 1342 | let bP = parseIntValue(bN[u]) | |
1337 | 1343 | let cd = bN[p] | |
1338 | - | let | |
1339 | - | let | |
1340 | - | let | |
1341 | - | let bJ = D( | |
1342 | - | let bK = D( | |
1343 | - | let cj = if (( | |
1344 | + | let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1345 | + | let go = by(cA) | |
1346 | + | let gp = by(cB) | |
1347 | + | let bJ = D(go, bO) | |
1348 | + | let bK = D(gp, bP) | |
1349 | + | let cj = if ((gn == 0)) | |
1344 | 1350 | then e | |
1345 | 1351 | else bA(bK, bJ) | |
1346 | 1352 | let cG = D(cu, bO) | |
1348 | 1354 | let cw = G(cH, bP) | |
1349 | 1355 | let dI = cs("", 500000, cu, cb, cw, cc, "", true, false) | |
1350 | 1356 | let cR = dI._1 | |
1351 | - | let | |
1357 | + | let gu = dI._3 | |
1352 | 1358 | let cf = dI._4 | |
1353 | 1359 | let ch = dI._5 | |
1354 | 1360 | let ce = dI._6 | |
1368 | 1374 | let bO = parseIntValue(bN[t]) | |
1369 | 1375 | let bP = parseIntValue(bN[u]) | |
1370 | 1376 | let cd = bN[p] | |
1371 | - | let | |
1372 | - | let | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | let cj = if (( | |
1377 | + | let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1378 | + | let gv = by(cA) | |
1379 | + | let gw = by(cB) | |
1380 | + | let gx = D(gv, bO) | |
1381 | + | let gy = D(gw, bP) | |
1382 | + | let cj = if ((gn == 0)) | |
1377 | 1383 | then e | |
1378 | - | else bA( | |
1384 | + | else bA(gy, gx) | |
1379 | 1385 | let cH = D(cw, bP) | |
1380 | 1386 | let cG = fraction(cH, d, cj) | |
1381 | 1387 | let cu = G(cG, bO) | |
1382 | 1388 | let dI = cs("", 500000, cu, cb, cw, cc, "", true, false) | |
1383 | 1389 | let cR = dI._1 | |
1384 | - | let | |
1390 | + | let gu = dI._3 | |
1385 | 1391 | let cf = dI._4 | |
1386 | 1392 | let ch = dI._5 | |
1387 | 1393 | let ce = dI._6 | |
1391 | 1397 | ||
1392 | 1398 | ||
1393 | 1399 | @Callable(dC) | |
1394 | - | func evaluateGetREADONLY ( | |
1395 | - | let cJ = bW("", | |
1400 | + | func evaluateGetREADONLY (gz,gA) = { | |
1401 | + | let cJ = bW("", gz, gA, this) | |
1396 | 1402 | let cp = cJ._1 | |
1397 | 1403 | let cq = cJ._2 | |
1398 | 1404 | let cf = cJ._5 | |
1404 | 1410 | } | |
1405 | 1411 | ||
1406 | 1412 | ||
1407 | - | @Verifier( | |
1408 | - | func | |
1409 | - | let | |
1410 | - | let dN = | |
1413 | + | @Verifier(gB) | |
1414 | + | func gC () = { | |
1415 | + | let gD = { | |
1416 | + | let dN = eQ() | |
1411 | 1417 | if ($isInstanceOf(dN, "ByteVector")) | |
1412 | 1418 | then { | |
1413 | - | let | |
1414 | - | | |
1419 | + | let eU = dN | |
1420 | + | eU | |
1415 | 1421 | } | |
1416 | 1422 | else if ($isInstanceOf(dN, "Unit")) | |
1417 | - | then | |
1423 | + | then gB.senderPublicKey | |
1418 | 1424 | else throw("Match error") | |
1419 | 1425 | } | |
1420 | - | let dN = | |
1426 | + | let dN = gB | |
1421 | 1427 | if ($isInstanceOf(dN, "Order")) | |
1422 | 1428 | then { | |
1423 | 1429 | let ds = dN | |
1424 | - | let | |
1430 | + | let gE = aO() | |
1425 | 1431 | let aB = dr(ds) | |
1426 | 1432 | let aC = sigVerify(ds.bodyBytes, ds.proofs[0], ds.senderPublicKey) | |
1427 | - | let aD = sigVerify(ds.bodyBytes, ds.proofs[1], | |
1433 | + | let aD = sigVerify(ds.bodyBytes, ds.proofs[1], gE) | |
1428 | 1434 | if (if (if (aB) | |
1429 | 1435 | then aC | |
1430 | 1436 | else false) | |
1435 | 1441 | } | |
1436 | 1442 | else if ($isInstanceOf(dN, "SetScriptTransaction")) | |
1437 | 1443 | then { | |
1438 | - | let | |
1439 | - | let | |
1440 | - | let | |
1441 | - | let | |
1442 | - | if (if (( | |
1443 | - | then ( | |
1444 | + | let eR = dN | |
1445 | + | let gF = blake2b256(value(eR.script)) | |
1446 | + | let gG = fromBase64String(value(getString(aL, ay()))) | |
1447 | + | let gH = scriptHash(this) | |
1448 | + | if (if ((gG == gF)) | |
1449 | + | then (gH != gF) | |
1444 | 1450 | else false) | |
1445 | 1451 | then true | |
1446 | - | else sigVerify( | |
1452 | + | else sigVerify(gB.bodyBytes, gB.proofs[0], gD) | |
1447 | 1453 | } | |
1448 | - | else sigVerify( | |
1454 | + | else sigVerify(gB.bodyBytes, gB.proofs[0], gD) | |
1449 | 1455 | } | |
1450 | 1456 |
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 (H,I) = toInt(fraction(H, toBigInt(I), d)) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func J (H,I,K) = toInt(fraction(H, toBigInt(I), d, K)) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func L (M,N,O) = fraction(M, N, O) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func P (H) = if ((0 > H)) | |
75 | 75 | then -(H) | |
76 | 76 | else H | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func Q (H) = if ((e > H)) | |
80 | 80 | then -(H) | |
81 | 81 | else H | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func R () = "%s__factoryContract" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func S () = "%s__managerPublicKey" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func T () = "%s__pendingManagerPublicKey" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func U () = "%s%s__price__last" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], j) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func ac () = "%s__amountAsset" | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func ad () = "%s__priceAsset" | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | let ae = "%s__fee" | |
112 | 112 | ||
113 | 113 | let af = fraction(10, b, 10000) | |
114 | 114 | ||
115 | 115 | let ag = valueOrElse(getInteger(this, ae), af) | |
116 | 116 | ||
117 | 117 | let ah = makeString(["%s", "kLp"], j) | |
118 | 118 | ||
119 | 119 | let ai = makeString(["%s", "kLpRefreshedHeight"], j) | |
120 | 120 | ||
121 | 121 | let aj = makeString(["%s", "refreshKLpDelay"], j) | |
122 | 122 | ||
123 | 123 | let ak = 30 | |
124 | 124 | ||
125 | 125 | let al = valueOrElse(getInteger(this, aj), ak) | |
126 | 126 | ||
127 | 127 | func am () = "%s__factoryConfig" | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func an () = "%s%s__matcher__publicKey" | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func ao (ap) = (("%s%s%s__" + ap) + "__mappings__poolContract2LpAsset") | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func aq (ar,as) = (((("%d%d%s__" + ar) + "__") + as) + "__config") | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func at (au) = ("%s%s%s__mappings__baseAsset2internalId__" + au) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func av () = "%s__shutdown" | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func aw (ax) = ("%s%s__poolWeight__" + ax) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func ay () = "%s__allowedLpScriptHash" | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | let az = "%s__feeCollectorAddress" | |
152 | 152 | ||
153 | 153 | func aA (aB,aC,aD) = throw(((((("order validation failed: orderValid=" + toString(aB)) + " senderValid=") + toString(aC)) + " matcherValid=") + toString(aD))) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func aE (aF,aG) = valueOrErrorMessage(getString(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], "")) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func aH (aF,aG) = valueOrErrorMessage(getInteger(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], "")) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func aI (aJ) = throw(makeString(["lp.ride:", aJ], " ")) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func aK (aJ) = makeString(["lp.ride:", aJ], " ") | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | let aL = addressFromStringValue(aE(this, R())) | |
169 | 169 | ||
170 | 170 | let aM = addressFromStringValue(aE(aL, az)) | |
171 | 171 | ||
172 | 172 | func aN () = valueOrElse(getBoolean(aL, av()), false) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func aO () = fromBase58String(aE(aL, an())) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func aP () = { | |
179 | 179 | let aQ = aE(this, ac()) | |
180 | 180 | let aR = aE(this, ad()) | |
181 | 181 | let as = aH(aL, at(aR)) | |
182 | 182 | let ar = aH(aL, at(aQ)) | |
183 | 183 | split(aE(aL, aq(toString(ar), toString(as))), j) | |
184 | 184 | } | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func aS (aT) = if ((aT == i)) | |
188 | 188 | then unit | |
189 | 189 | else fromBase58String(aT) | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func aU (aT) = if ((aT == unit)) | |
193 | 193 | then i | |
194 | 194 | else toBase58String(value(aT)) | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | func aV (aW) = $Tuple7(addressFromStringValue(aW[o]), parseIntValue(aW[p]), fromBase58String(aW[q]), aS(aW[r]), aS(aW[s]), parseIntValue(aW[t]), parseIntValue(aW[u])) | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | let aX = aV(aP()) | |
201 | 201 | ||
202 | 202 | let aY = aX | |
203 | 203 | ||
204 | 204 | let aZ = aY._1 | |
205 | 205 | ||
206 | 206 | let ba = aY._2 | |
207 | 207 | ||
208 | 208 | let bb = aY._3 | |
209 | 209 | ||
210 | 210 | let bc = aY._4 | |
211 | 211 | ||
212 | 212 | let bd = aY._5 | |
213 | 213 | ||
214 | 214 | let be = aY._6 | |
215 | 215 | ||
216 | 216 | let bf = aY._7 | |
217 | 217 | ||
218 | 218 | func bg () = split(aE(aL, am()), j) | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | let bh = valueOrErrorMessage(addressFromString(bg()[B]), "incorrect staking address") | |
222 | 222 | ||
223 | 223 | let bi = valueOrErrorMessage(addressFromString(bg()[C]), "incorrect staking address") | |
224 | 224 | ||
225 | 225 | func bj (bk,bl,bm,bn,bo,bp,bq,br,bs,bt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt)], j) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func bu (bv,bw,bx,bn,bq,br) = makeString(["%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(bn), toString(bq), toString(br)], j) | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func by (bz) = if ((bz == "WAVES")) | |
232 | 232 | then wavesBalance(this).available | |
233 | 233 | else assetBalance(this, fromBase58String(bz)) | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | func bA (bB,bC) = fraction(bB, d, bC) | |
237 | 237 | ||
238 | 238 | ||
239 | 239 | func bD (bB,bC,K) = fraction(bB, d, bC, K) | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func bE (bF,bG,bH,bI) = { | |
243 | 243 | let bJ = D(bH, bF) | |
244 | 244 | let bK = D(bI, bG) | |
245 | 245 | bA(bK, bJ) | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func bL (bH,bI,bM) = { | |
250 | 250 | let bN = aP() | |
251 | 251 | let bO = parseIntValue(bN[t]) | |
252 | 252 | let bP = parseIntValue(bN[u]) | |
253 | 253 | let bQ = bE(bO, bP, bH, bI) | |
254 | 254 | let bC = D(bH, bO) | |
255 | 255 | let bB = D(bI, bP) | |
256 | 256 | let bR = D(bM, b) | |
257 | 257 | let bS = bA(bC, bR) | |
258 | 258 | let bT = bA(bB, bR) | |
259 | 259 | [bQ, bS, bT] | |
260 | 260 | } | |
261 | 261 | ||
262 | 262 | ||
263 | 263 | func bU (bH,bI,bM) = { | |
264 | 264 | let bV = bL(bH, bI, bM) | |
265 | 265 | [G(bV[0], b), G(bV[1], b), G(bV[2], b)] | |
266 | 266 | } | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | func bW (bX,bY,bZ,Z) = { | |
270 | 270 | let bN = aP() | |
271 | 271 | let ca = bN[q] | |
272 | 272 | let cb = bN[r] | |
273 | 273 | let cc = bN[s] | |
274 | 274 | let bF = parseIntValue(bN[t]) | |
275 | 275 | let bG = parseIntValue(bN[u]) | |
276 | 276 | let cd = bN[p] | |
277 | 277 | let ce = valueOrErrorMessage(assetInfo(fromBase58String(ca)), (("Asset " + ca) + " doesn't exist")).quantity | |
278 | 278 | if ((ca != bY)) | |
279 | 279 | then throw("Invalid asset passed.") | |
280 | 280 | else { | |
281 | 281 | let cf = by(cb) | |
282 | 282 | let cg = D(cf, bF) | |
283 | 283 | let ch = by(cc) | |
284 | 284 | let ci = D(ch, bG) | |
285 | 285 | let cj = bA(ci, cg) | |
286 | 286 | let ck = G(cj, b) | |
287 | 287 | let cl = D(bZ, b) | |
288 | 288 | let cm = D(ce, b) | |
289 | 289 | let cn = fraction(cg, cl, cm) | |
290 | 290 | let co = fraction(ci, cl, cm) | |
291 | - | let cp = | |
292 | - | let cq = | |
291 | + | let cp = J(cn, bF, FLOOR) | |
292 | + | let cq = J(co, bG, FLOOR) | |
293 | 293 | let cr = if ((bX == "")) | |
294 | 294 | then nil | |
295 | 295 | else [ScriptTransfer(Z, cp, if ((cb == "WAVES")) | |
296 | 296 | then unit | |
297 | 297 | else fromBase58String(cb)), ScriptTransfer(Z, cq, if ((cc == "WAVES")) | |
298 | 298 | then unit | |
299 | 299 | else fromBase58String(cc)), StringEntry(ab(toString(Z), bX), bu(cp, cq, bZ, ck, height, lastBlock.timestamp)), IntegerEntry(U(), ck), IntegerEntry(V(height, lastBlock.timestamp), ck)] | |
300 | 300 | $Tuple10(cp, cq, cb, cc, cf, ch, ce, cj, cd, cr) | |
301 | 301 | } | |
302 | 302 | } | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func cs (bX,ct,cu,cv,cw,cx,Z,cy,cz) = { | |
306 | 306 | let bN = aP() | |
307 | 307 | let ca = fromBase58String(bN[q]) | |
308 | 308 | let cA = bN[r] | |
309 | 309 | let cB = bN[s] | |
310 | 310 | let cC = bN[v] | |
311 | 311 | let cD = bN[w] | |
312 | 312 | let bO = parseIntValue(bN[t]) | |
313 | 313 | let bP = parseIntValue(bN[u]) | |
314 | 314 | let cd = bN[p] | |
315 | 315 | let ce = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
316 | 316 | let cE = toBase58String(valueOrElse(cv, fromBase58String("WAVES"))) | |
317 | 317 | let cF = toBase58String(valueOrElse(cx, fromBase58String("WAVES"))) | |
318 | 318 | if (if ((cA != cE)) | |
319 | 319 | then true | |
320 | 320 | else (cB != cF)) | |
321 | 321 | then throw("Invalid amt or price asset passed.") | |
322 | 322 | else { | |
323 | 323 | let cf = if (cy) | |
324 | 324 | then by(cA) | |
325 | 325 | else (by(cA) - cu) | |
326 | 326 | let ch = if (cy) | |
327 | 327 | then by(cB) | |
328 | 328 | else (by(cB) - cw) | |
329 | 329 | let cG = D(cu, bO) | |
330 | 330 | let cH = D(cw, bP) | |
331 | 331 | let cI = bA(cH, cG) | |
332 | 332 | let cg = D(cf, bO) | |
333 | 333 | let ci = D(ch, bP) | |
334 | 334 | let cJ = if ((ce == 0)) | |
335 | 335 | then { | |
336 | 336 | let cj = e | |
337 | 337 | let cK = e | |
338 | 338 | let bR = pow((cG * cH), 0, toBigInt(5), 1, 0, DOWN) | |
339 | 339 | $Tuple5(G(bR, b), G(cG, bO), G(cH, bP), bA((ci + cH), (cg + cG)), cK) | |
340 | 340 | } | |
341 | 341 | else { | |
342 | 342 | let cj = bA(ci, cg) | |
343 | 343 | let cK = fraction(Q((cj - cI)), d, cj) | |
344 | 344 | let cL = D(ct, b) | |
345 | 345 | if (if ((cj != e)) | |
346 | 346 | then (cK > cL) | |
347 | 347 | else false) | |
348 | 348 | then throw(((("Price slippage " + toString(cK)) + " exceeded the passed limit of ") + toString(cL))) | |
349 | 349 | else { | |
350 | 350 | let cm = D(ce, b) | |
351 | 351 | let cM = fraction(cG, bD(ci, cg, CEILING), d, CEILING) | |
352 | 352 | let cN = fraction(cH, d, bD(ci, cg, FLOOR), CEILING) | |
353 | 353 | let cO = if ((cM > cH)) | |
354 | 354 | then $Tuple2(cN, cH) | |
355 | 355 | else $Tuple2(cG, cM) | |
356 | 356 | let cP = cO._1 | |
357 | 357 | let cQ = cO._2 | |
358 | 358 | let bR = fraction(cm, cQ, ci, FLOOR) | |
359 | 359 | $Tuple5(J(bR, b, FLOOR), J(cP, bO, CEILING), J(cQ, bP, CEILING), cj, cK) | |
360 | 360 | } | |
361 | 361 | } | |
362 | 362 | let cR = cJ._1 | |
363 | 363 | let cS = cJ._2 | |
364 | 364 | let cT = cJ._3 | |
365 | 365 | let ck = G(cJ._4, b) | |
366 | 366 | let cU = G(cJ._5, b) | |
367 | 367 | if ((0 >= cR)) | |
368 | 368 | then throw("Invalid calculations. LP calculated is less than zero.") | |
369 | 369 | else { | |
370 | 370 | let cV = if (!(cz)) | |
371 | 371 | then 0 | |
372 | 372 | else cR | |
373 | 373 | let cW = (cu - cS) | |
374 | 374 | let cX = (cw - cT) | |
375 | 375 | let cY = [IntegerEntry(U(), ck), IntegerEntry(V(height, lastBlock.timestamp), ck), StringEntry(Y(Z, bX), bj(cS, cT, cV, ck, ct, cU, height, lastBlock.timestamp, cW, cX))] | |
376 | 376 | $Tuple13(cR, cV, ck, cf, ch, ce, ca, cd, cY, cW, cX, cv, cx) | |
377 | 377 | } | |
378 | 378 | } | |
379 | 379 | } | |
380 | 380 | ||
381 | 381 | ||
382 | 382 | func cZ (da,db,ce) = { | |
383 | 383 | let dc = fraction(pow((da * db), 0, toBigInt(5), 1, 18, DOWN), g, ce) | |
384 | 384 | if ((ce == f)) | |
385 | 385 | then f | |
386 | 386 | else dc | |
387 | 387 | } | |
388 | 388 | ||
389 | 389 | ||
390 | 390 | func dd (de,df,dg) = { | |
391 | 391 | let dh = (toBigInt(by(aU(bc))) - de) | |
392 | 392 | let di = (toBigInt(by(aU(bd))) - df) | |
393 | 393 | let dj = (toBigInt(value(assetInfo(bb)).quantity) - dg) | |
394 | 394 | let dk = cZ(dh, di, dj) | |
395 | 395 | dk | |
396 | 396 | } | |
397 | 397 | ||
398 | 398 | ||
399 | 399 | func dl (dm,dn,dg) = { | |
400 | 400 | let dh = (by(aU(bc)) + dm) | |
401 | 401 | let di = (by(aU(bd)) + dn) | |
402 | 402 | let dj = (value(assetInfo(bb)).quantity + dg) | |
403 | 403 | let dc = cZ(toBigInt(dh), toBigInt(di), toBigInt(dj)) | |
404 | 404 | let do = [IntegerEntry(ai, height), StringEntry(ah, toString(dc))] | |
405 | 405 | $Tuple2(do, dc) | |
406 | 406 | } | |
407 | 407 | ||
408 | 408 | ||
409 | 409 | func dp (dq,dc) = if ((dc >= dq)) | |
410 | 410 | then true | |
411 | 411 | else aI(makeString(["updated KLp lower than current KLp", toString(dq), toString(dc)], " ")) | |
412 | 412 | ||
413 | 413 | ||
414 | 414 | func dr (ds) = { | |
415 | 415 | let dt = ds.amount | |
416 | 416 | let du = fraction(ds.amount, ds.price, b, FLOOR) | |
417 | 417 | let dv = if ((ds.orderType == Buy)) | |
418 | 418 | then $Tuple2(dt, -(du)) | |
419 | 419 | else $Tuple2(-(dt), du) | |
420 | 420 | let dm = dv._1 | |
421 | 421 | let dn = dv._2 | |
422 | 422 | if (if (if (aN()) | |
423 | 423 | then true | |
424 | 424 | else (ba == m)) | |
425 | 425 | then true | |
426 | 426 | else (ba == n)) | |
427 | 427 | then throw("Exchange operations disabled") | |
428 | 428 | else if (if ((ds.assetPair.amountAsset != bc)) | |
429 | 429 | then true | |
430 | 430 | else (ds.assetPair.priceAsset != bd)) | |
431 | 431 | then throw("Wrong order assets.") | |
432 | 432 | else { | |
433 | 433 | let dw = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, ah), aK("kLp is required"))), aK("invalid kLp")) | |
434 | 434 | let dx = dl(dm, dn, 0) | |
435 | 435 | let dy = dx._1 | |
436 | 436 | let dz = dx._2 | |
437 | 437 | let dA = (dz >= dw) | |
438 | 438 | dA | |
439 | 439 | } | |
440 | 440 | } | |
441 | 441 | ||
442 | 442 | ||
443 | 443 | func dB (dC) = if ((size(dC.payments) != 1)) | |
444 | 444 | then throw("exactly 1 payment is expected") | |
445 | 445 | else { | |
446 | 446 | let dD = value(dC.payments[0]) | |
447 | 447 | let bY = value(dD.assetId) | |
448 | 448 | let dE = dD.amount | |
449 | 449 | let cJ = bW(toBase58String(dC.transactionId), toBase58String(bY), dE, dC.caller) | |
450 | 450 | let cp = cJ._1 | |
451 | 451 | let cq = cJ._2 | |
452 | 452 | let cd = parseIntValue(cJ._9) | |
453 | 453 | let cr = cJ._10 | |
454 | 454 | if (if (aN()) | |
455 | 455 | then true | |
456 | 456 | else (cd == n)) | |
457 | 457 | then throw(("Get operation is blocked by admin. Status = " + toString(cd))) | |
458 | 458 | else $Tuple5(cp, cq, dE, bY, cr) | |
459 | 459 | } | |
460 | 460 | ||
461 | 461 | ||
462 | 462 | func dF (dC,ct,cz) = if ((size(dC.payments) != 2)) | |
463 | 463 | then throw("exactly 2 payments are expected") | |
464 | 464 | else { | |
465 | 465 | let dG = value(dC.payments[0]) | |
466 | 466 | let dH = value(dC.payments[1]) | |
467 | 467 | let dI = cs(toBase58String(dC.transactionId), ct, dG.amount, dG.assetId, dH.amount, dH.assetId, toString(dC.caller), false, cz) | |
468 | 468 | let cd = parseIntValue(dI._8) | |
469 | 469 | if (if (if (aN()) | |
470 | 470 | then true | |
471 | 471 | else (cd == l)) | |
472 | 472 | then true | |
473 | 473 | else (cd == n)) | |
474 | 474 | then throw(("Put operation is blocked by admin. Status = " + toString(cd))) | |
475 | 475 | else dI | |
476 | 476 | } | |
477 | 477 | ||
478 | 478 | ||
479 | 479 | func dJ (dK) = { | |
480 | 480 | let dL = invoke(aL, "emit", [dK], nil) | |
481 | 481 | if ((dL == dL)) | |
482 | 482 | then { | |
483 | 483 | let dM = { | |
484 | 484 | let dN = dL | |
485 | 485 | if ($isInstanceOf(dN, "Address")) | |
486 | 486 | then { | |
487 | 487 | let dO = dN | |
488 | 488 | invoke(dO, "emit", [dK], nil) | |
489 | 489 | } | |
490 | 490 | else unit | |
491 | 491 | } | |
492 | 492 | if ((dM == dM)) | |
493 | 493 | then dK | |
494 | 494 | else throw("Strict value is not equal to itself.") | |
495 | 495 | } | |
496 | 496 | else throw("Strict value is not equal to itself.") | |
497 | 497 | } | |
498 | 498 | ||
499 | 499 | ||
500 | 500 | func dP (dK) = { | |
501 | 501 | let dQ = fraction(dK, ag, b) | |
502 | 502 | $Tuple2((dK - dQ), dQ) | |
503 | 503 | } | |
504 | 504 | ||
505 | 505 | ||
506 | 506 | func dR (dS,dT,Z,aa) = { | |
507 | 507 | let dU = (aa == unit) | |
508 | 508 | let dV = by(aU(bc)) | |
509 | 509 | let dW = by(aU(bd)) | |
510 | 510 | let dX = if ((dT == bc)) | |
511 | 511 | then true | |
512 | 512 | else if ((dT == bd)) | |
513 | 513 | then false | |
514 | 514 | else aI("invalid asset") | |
515 | 515 | let dY = if (dU) | |
516 | 516 | then $Tuple2(dV, dW) | |
517 | 517 | else if (dX) | |
518 | 518 | then $Tuple2((dV - dS), dW) | |
519 | 519 | else $Tuple2(dV, (dW - dS)) | |
520 | 520 | let dZ = dY._1 | |
521 | 521 | let ea = dY._2 | |
522 | 522 | let eb = if (dX) | |
523 | 523 | then $Tuple2(dS, 0) | |
524 | 524 | else $Tuple2(0, dS) | |
525 | 525 | let ec = eb._1 | |
526 | 526 | let ed = eb._2 | |
527 | 527 | let dt = dP(ec)._1 | |
528 | 528 | let du = dP(ed)._1 | |
529 | 529 | let ee = dP(dS) | |
530 | 530 | let ef = ee._1 | |
531 | 531 | let dQ = ee._2 | |
532 | 532 | let eg = (dZ + dt) | |
533 | 533 | let eh = (ea + du) | |
534 | 534 | let ei = bA(D(eh, bf), D(eg, be)) | |
535 | 535 | let ej = G(ei, b) | |
536 | 536 | let ek = if (dX) | |
537 | 537 | then dZ | |
538 | 538 | else ea | |
539 | 539 | let el = toBigInt(ek) | |
540 | 540 | let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity) | |
541 | 541 | let en = if ((em > f)) | |
542 | 542 | then true | |
543 | 543 | else aI("initial deposit requires all coins") | |
544 | 544 | if ((en == en)) | |
545 | 545 | then { | |
546 | 546 | let eo = toBigInt(ef) | |
547 | - | let ep = max([0, | |
547 | + | let ep = max([0, J(fraction(em, (sqrtBigInt((d + ((eo * d) / el)), 18, 18, DOWN) - d), d), b, FLOOR)]) | |
548 | 548 | let cY = if (dU) | |
549 | 549 | then nil | |
550 | 550 | else [IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej), StringEntry(Y(toString(value(Z)), toBase58String(value(aa))), bj(ec, ed, ep, ej, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
551 | 551 | let eq = bA(D(ea, bf), D(dZ, be)) | |
552 | 552 | let er = G(eq, b) | |
553 | 553 | let es = { | |
554 | 554 | let et = if (dX) | |
555 | 555 | then $Tuple2(ec, dZ) | |
556 | 556 | else $Tuple2(ed, ea) | |
557 | 557 | let dK = et._1 | |
558 | 558 | let eu = et._2 | |
559 | 559 | let ev = toInt(fraction(em, toBigInt((dK / 2)), toBigInt(eu))) | |
560 | 560 | fraction((ep - ev), b, ev) | |
561 | 561 | } | |
562 | 562 | $Tuple5(ep, cY, dQ, es, dX) | |
563 | 563 | } | |
564 | 564 | else throw("Strict value is not equal to itself.") | |
565 | 565 | } | |
566 | 566 | ||
567 | 567 | ||
568 | 568 | func ew (ex,ef,dT,Z,aa) = { | |
569 | 569 | let dU = (aa == unit) | |
570 | + | let bN = aP() | |
571 | + | let bO = parseIntValue(bN[t]) | |
572 | + | let bP = parseIntValue(bN[u]) | |
570 | 573 | let ey = [if ((dT == bb)) | |
571 | 574 | then true | |
572 | 575 | else aI("invalid lp asset")] | |
573 | 576 | if ((ey == ey)) | |
574 | 577 | then { | |
575 | 578 | let ez = if ((ex == bc)) | |
576 | 579 | then true | |
577 | 580 | else if ((ex == bd)) | |
578 | 581 | then false | |
579 | 582 | else aI("invalid asset") | |
580 | 583 | let eA = if (ez) | |
581 | 584 | then toBigInt(by(aU(bc))) | |
582 | 585 | else toBigInt(by(aU(bd))) | |
583 | - | let eB = by(aU(bc)) | |
584 | - | let eC = by(aU(bd)) | |
585 | - | let eD = if (ez) | |
586 | - | then eB | |
587 | - | else eC | |
588 | - | let eE = toBigInt(eD) | |
586 | + | let eB = if (ez) | |
587 | + | then bO | |
588 | + | else bP | |
589 | + | let eC = by(aU(bc)) | |
590 | + | let eD = by(aU(bd)) | |
591 | + | let eE = if (ez) | |
592 | + | then eC | |
593 | + | else eD | |
594 | + | let eF = toBigInt(eE) | |
589 | 595 | let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity) | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let dQ = | |
595 | - | let | |
596 | - | then $Tuple4( | |
597 | - | else $Tuple4(0, | |
598 | - | let | |
599 | - | let | |
600 | - | let | |
601 | - | let | |
602 | - | let ei = bA(D( | |
596 | + | let eG = toBigInt(ef) | |
597 | + | let eH = max([0, J(fraction(eA, (d - pow((d - ((eG * d) / em)), 18, h, 0, 18, DOWN)), d), eB, FLOOR)]) | |
598 | + | let eI = dP(eH) | |
599 | + | let eJ = eI._1 | |
600 | + | let dQ = eI._2 | |
601 | + | let eK = if (ez) | |
602 | + | then $Tuple4(eJ, 0, (eC - eH), eD) | |
603 | + | else $Tuple4(0, eJ, eC, (eD - eH)) | |
604 | + | let eL = eK._1 | |
605 | + | let eM = eK._2 | |
606 | + | let eN = eK._3 | |
607 | + | let eO = eK._4 | |
608 | + | let ei = bA(D(eO, bf), D(eN, be)) | |
603 | 609 | let ej = G(ei, b) | |
604 | 610 | let cY = if (dU) | |
605 | 611 | then nil | |
606 | - | else [StringEntry(ab(toString(value(Z)), toBase58String(value(aa))), bu( | |
607 | - | let eq = bA(D( | |
612 | + | else [StringEntry(ab(toString(value(Z)), toBase58String(value(aa))), bu(eL, eM, ef, ej, height, lastBlock.timestamp)), IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej)] | |
613 | + | let eq = bA(D(eD, bf), D(eC, be)) | |
608 | 614 | let er = G(eq, b) | |
609 | 615 | let es = { | |
610 | - | let | |
611 | - | fraction(( | |
616 | + | let eP = (toInt(fraction(eA, eG, em)) * 2) | |
617 | + | fraction((eJ - eP), b, eP) | |
612 | 618 | } | |
613 | - | $Tuple5( | |
619 | + | $Tuple5(eJ, cY, dQ, es, ez) | |
614 | 620 | } | |
615 | 621 | else throw("Strict value is not equal to itself.") | |
616 | 622 | } | |
617 | 623 | ||
618 | 624 | ||
619 | - | func | |
625 | + | func eQ () = { | |
620 | 626 | let dN = getString(S()) | |
621 | 627 | if ($isInstanceOf(dN, "String")) | |
622 | 628 | then { | |
623 | - | let | |
624 | - | fromBase58String( | |
629 | + | let eR = dN | |
630 | + | fromBase58String(eR) | |
625 | 631 | } | |
626 | 632 | else if ($isInstanceOf(dN, "Unit")) | |
627 | 633 | then unit | |
628 | 634 | else throw("Match error") | |
629 | 635 | } | |
630 | 636 | ||
631 | 637 | ||
632 | - | func | |
638 | + | func eS () = { | |
633 | 639 | let dN = getString(T()) | |
634 | 640 | if ($isInstanceOf(dN, "String")) | |
635 | 641 | then { | |
636 | - | let | |
637 | - | fromBase58String( | |
642 | + | let eR = dN | |
643 | + | fromBase58String(eR) | |
638 | 644 | } | |
639 | 645 | else if ($isInstanceOf(dN, "Unit")) | |
640 | 646 | then unit | |
641 | 647 | else throw("Match error") | |
642 | 648 | } | |
643 | 649 | ||
644 | 650 | ||
645 | - | func | |
646 | - | let dN = | |
651 | + | func eT (dC) = { | |
652 | + | let dN = eQ() | |
647 | 653 | if ($isInstanceOf(dN, "ByteVector")) | |
648 | 654 | then { | |
649 | - | let | |
650 | - | (dC.callerPublicKey == | |
655 | + | let eU = dN | |
656 | + | (dC.callerPublicKey == eU) | |
651 | 657 | } | |
652 | 658 | else if ($isInstanceOf(dN, "Unit")) | |
653 | 659 | then (dC.caller == this) | |
654 | 660 | else throw("Match error") | |
655 | 661 | } | |
656 | 662 | ||
657 | 663 | ||
658 | - | func | |
659 | - | let | |
660 | - | let dN = | |
664 | + | func eV (dC) = { | |
665 | + | let eW = throw("Permission denied") | |
666 | + | let dN = eQ() | |
661 | 667 | if ($isInstanceOf(dN, "ByteVector")) | |
662 | 668 | then { | |
663 | - | let | |
664 | - | if ((dC.callerPublicKey == | |
669 | + | let eU = dN | |
670 | + | if ((dC.callerPublicKey == eU)) | |
665 | 671 | then true | |
666 | - | else | |
672 | + | else eW | |
667 | 673 | } | |
668 | 674 | else if ($isInstanceOf(dN, "Unit")) | |
669 | 675 | then if ((dC.caller == this)) | |
670 | 676 | then true | |
671 | - | else | |
677 | + | else eW | |
672 | 678 | else throw("Match error") | |
673 | 679 | } | |
674 | 680 | ||
675 | 681 | ||
676 | 682 | @Callable(dC) | |
677 | - | func setManager ( | |
678 | - | let | |
679 | - | if (( | |
683 | + | func setManager (eX) = { | |
684 | + | let eY = eV(dC) | |
685 | + | if ((eY == eY)) | |
680 | 686 | then { | |
681 | - | let | |
682 | - | if (( | |
683 | - | then [StringEntry(T(), | |
687 | + | let eZ = fromBase58String(eX) | |
688 | + | if ((eZ == eZ)) | |
689 | + | then [StringEntry(T(), eX)] | |
684 | 690 | else throw("Strict value is not equal to itself.") | |
685 | 691 | } | |
686 | 692 | else throw("Strict value is not equal to itself.") | |
687 | 693 | } | |
688 | 694 | ||
689 | 695 | ||
690 | 696 | ||
691 | 697 | @Callable(dC) | |
692 | 698 | func confirmManager () = { | |
693 | - | let | |
694 | - | let | |
699 | + | let fa = eS() | |
700 | + | let fb = if (isDefined(fa)) | |
695 | 701 | then true | |
696 | 702 | else throw("No pending manager") | |
697 | - | if (( | |
703 | + | if ((fb == fb)) | |
698 | 704 | then { | |
699 | - | let | |
705 | + | let fc = if ((dC.callerPublicKey == value(fa))) | |
700 | 706 | then true | |
701 | 707 | else throw("You are not pending manager") | |
702 | - | if (( | |
703 | - | then [StringEntry(S(), toBase58String(value( | |
708 | + | if ((fc == fc)) | |
709 | + | then [StringEntry(S(), toBase58String(value(fa))), DeleteEntry(T())] | |
704 | 710 | else throw("Strict value is not equal to itself.") | |
705 | 711 | } | |
706 | 712 | else throw("Strict value is not equal to itself.") | |
707 | 713 | } | |
708 | 714 | ||
709 | 715 | ||
710 | 716 | ||
711 | 717 | @Callable(dC) | |
712 | - | func put (ct, | |
718 | + | func put (ct,fd) = if ((0 > ct)) | |
713 | 719 | then throw("Invalid slippageTolerance passed") | |
714 | 720 | else { | |
715 | 721 | let dI = dF(dC, ct, true) | |
716 | 722 | let cV = dI._2 | |
717 | 723 | let ca = dI._7 | |
718 | 724 | let cr = dI._9 | |
719 | 725 | let cW = dI._10 | |
720 | 726 | let cX = dI._11 | |
721 | - | let | |
722 | - | let | |
727 | + | let fe = dI._12 | |
728 | + | let ff = dI._13 | |
723 | 729 | let dG = toBigInt(value(dC.payments[0]).amount) | |
724 | 730 | let dH = toBigInt(value(dC.payments[1]).amount) | |
725 | 731 | let dk = dd(dG, dH, toBigInt(0)) | |
726 | 732 | if ((dk == dk)) | |
727 | 733 | then { | |
728 | 734 | let dL = invoke(aL, "emit", [cV], nil) | |
729 | 735 | if ((dL == dL)) | |
730 | 736 | then { | |
731 | 737 | let dM = { | |
732 | 738 | let dN = dL | |
733 | 739 | if ($isInstanceOf(dN, "Address")) | |
734 | 740 | then { | |
735 | 741 | let dO = dN | |
736 | 742 | invoke(dO, "emit", [cV], nil) | |
737 | 743 | } | |
738 | 744 | else unit | |
739 | 745 | } | |
740 | 746 | if ((dM == dM)) | |
741 | 747 | then { | |
742 | - | let | |
743 | - | then invoke(bi, "put", nil, [AttachedPayment( | |
748 | + | let fg = if ((cW > 0)) | |
749 | + | then invoke(bi, "put", nil, [AttachedPayment(fe, cW)]) | |
744 | 750 | else nil | |
745 | - | if (( | |
751 | + | if ((fg == fg)) | |
746 | 752 | then { | |
747 | - | let | |
748 | - | then invoke(bi, "put", nil, [AttachedPayment( | |
753 | + | let fh = if ((cX > 0)) | |
754 | + | then invoke(bi, "put", nil, [AttachedPayment(ff, cX)]) | |
749 | 755 | else nil | |
750 | - | if (( | |
756 | + | if ((fh == fh)) | |
751 | 757 | then { | |
752 | - | let | |
758 | + | let fi = if (fd) | |
753 | 759 | then { | |
754 | - | let | |
755 | - | if (( | |
760 | + | let fj = invoke(bh, "stake", nil, [AttachedPayment(ca, cV)]) | |
761 | + | if ((fj == fj)) | |
756 | 762 | then nil | |
757 | 763 | else throw("Strict value is not equal to itself.") | |
758 | 764 | } | |
759 | 765 | else [ScriptTransfer(dC.caller, cV, ca)] | |
760 | - | let | |
761 | - | if (( | |
766 | + | let fk = dl(0, 0, 0) | |
767 | + | if ((fk == fk)) | |
762 | 768 | then { | |
763 | - | let dc = | |
764 | - | let | |
765 | - | let | |
766 | - | if (( | |
767 | - | then ((cr ++ | |
769 | + | let dc = fk._2 | |
770 | + | let fl = fk._1 | |
771 | + | let fm = dp(dk, dc) | |
772 | + | if ((fm == fm)) | |
773 | + | then ((cr ++ fi) ++ fl) | |
768 | 774 | else throw("Strict value is not equal to itself.") | |
769 | 775 | } | |
770 | 776 | else throw("Strict value is not equal to itself.") | |
771 | 777 | } | |
772 | 778 | else throw("Strict value is not equal to itself.") | |
773 | 779 | } | |
774 | 780 | else throw("Strict value is not equal to itself.") | |
775 | 781 | } | |
776 | 782 | else throw("Strict value is not equal to itself.") | |
777 | 783 | } | |
778 | 784 | else throw("Strict value is not equal to itself.") | |
779 | 785 | } | |
780 | 786 | else throw("Strict value is not equal to itself.") | |
781 | 787 | } | |
782 | 788 | ||
783 | 789 | ||
784 | 790 | ||
785 | 791 | @Callable(dC) | |
786 | - | func putForFree ( | |
792 | + | func putForFree (fn) = if ((0 > fn)) | |
787 | 793 | then throw("Invalid value passed") | |
788 | 794 | else { | |
789 | - | let dI = dF(dC, | |
795 | + | let dI = dF(dC, fn, false) | |
790 | 796 | let cr = dI._9 | |
791 | 797 | let dG = toBigInt(value(dC.payments[0]).amount) | |
792 | 798 | let dH = toBigInt(value(dC.payments[1]).amount) | |
793 | 799 | let dk = dd(dG, dH, toBigInt(0)) | |
794 | 800 | if ((dk == dk)) | |
795 | 801 | then { | |
796 | - | let | |
797 | - | let | |
798 | - | let dc = | |
799 | - | let | |
800 | - | if (( | |
801 | - | then (cr ++ | |
802 | + | let fo = dl(0, 0, 0) | |
803 | + | let fl = fo._1 | |
804 | + | let dc = fo._2 | |
805 | + | let fm = dp(dk, dc) | |
806 | + | if ((fm == fm)) | |
807 | + | then (cr ++ fl) | |
802 | 808 | else throw("Strict value is not equal to itself.") | |
803 | 809 | } | |
804 | 810 | else throw("Strict value is not equal to itself.") | |
805 | 811 | } | |
806 | 812 | ||
807 | 813 | ||
808 | 814 | ||
809 | 815 | @Callable(dC) | |
810 | - | func putOneTkn ( | |
811 | - | let | |
812 | - | let | |
813 | - | if ($isInstanceOf( | |
814 | - | then | |
815 | - | else throw(($getType( | |
816 | + | func putOneTkn (fp,fq) = { | |
817 | + | let fr = { | |
818 | + | let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
819 | + | if ($isInstanceOf(fs, "Boolean")) | |
820 | + | then fs | |
821 | + | else throw(($getType(fs) + " couldn't be cast to Boolean")) | |
816 | 822 | } | |
817 | - | let | |
823 | + | let ft = if (if (if (aN()) | |
818 | 824 | then true | |
819 | 825 | else (ba == l)) | |
820 | 826 | then true | |
821 | 827 | else (ba == n)) | |
822 | 828 | then true | |
823 | - | else | |
824 | - | let ey = [if (if (!( | |
829 | + | else fr | |
830 | + | let ey = [if (if (!(ft)) | |
825 | 831 | then true | |
826 | - | else | |
832 | + | else eT(dC)) | |
827 | 833 | then true | |
828 | 834 | else aI("put operation is blocked by admin"), if ((size(dC.payments) == 1)) | |
829 | 835 | then true | |
830 | 836 | else aI("exactly 1 payment are expected")] | |
831 | 837 | if ((ey == ey)) | |
832 | 838 | then { | |
833 | - | let | |
834 | - | let dT = | |
835 | - | let dS = | |
839 | + | let fu = dC.payments[0] | |
840 | + | let dT = fu.assetId | |
841 | + | let dS = fu.amount | |
836 | 842 | let dk = if ((dT == bc)) | |
837 | 843 | then dd(toBigInt(dS), toBigInt(0), toBigInt(0)) | |
838 | 844 | else if ((dT == bd)) | |
839 | 845 | then dd(toBigInt(0), toBigInt(dS), toBigInt(0)) | |
840 | 846 | else aI("payment asset is not supported") | |
841 | 847 | let Z = dC.caller | |
842 | 848 | let aa = dC.transactionId | |
843 | - | let | |
844 | - | if (( | |
849 | + | let fv = dR(dS, dT, Z, aa) | |
850 | + | if ((fv == fv)) | |
845 | 851 | then { | |
846 | - | let dX = | |
847 | - | let | |
848 | - | let dQ = | |
849 | - | let cY = | |
850 | - | let | |
851 | - | let | |
852 | - | then ( | |
852 | + | let dX = fv._5 | |
853 | + | let fw = fv._4 | |
854 | + | let dQ = fv._3 | |
855 | + | let cY = fv._2 | |
856 | + | let fx = fv._1 | |
857 | + | let fy = if (if ((fp > 0)) | |
858 | + | then (fp > fx) | |
853 | 859 | else false) | |
854 | - | then aI(makeString(["amount to receive is less than ", toString( | |
855 | - | else | |
856 | - | let dL = dJ( | |
860 | + | then aI(makeString(["amount to receive is less than ", toString(fp)], "")) | |
861 | + | else fx | |
862 | + | let dL = dJ(fy) | |
857 | 863 | if ((dL == dL)) | |
858 | 864 | then { | |
859 | - | let | |
865 | + | let fi = if (fq) | |
860 | 866 | then { | |
861 | - | let | |
862 | - | if (( | |
867 | + | let fz = invoke(bh, "stake", nil, [AttachedPayment(bb, fy)]) | |
868 | + | if ((fz == fz)) | |
863 | 869 | then nil | |
864 | 870 | else throw("Strict value is not equal to itself.") | |
865 | 871 | } | |
866 | - | else [ScriptTransfer(dC.caller, | |
867 | - | let | |
872 | + | else [ScriptTransfer(dC.caller, fy, bb)] | |
873 | + | let fA = if ((dQ > 0)) | |
868 | 874 | then [ScriptTransfer(aM, dQ, dT)] | |
869 | 875 | else nil | |
870 | - | let | |
876 | + | let fB = if ((this == aM)) | |
871 | 877 | then $Tuple2(0, 0) | |
872 | 878 | else if (dX) | |
873 | 879 | then $Tuple2(-(dQ), 0) | |
874 | 880 | else $Tuple2(0, -(dQ)) | |
875 | - | let dm = | |
876 | - | let dn = | |
877 | - | let | |
878 | - | let | |
879 | - | let dc = | |
881 | + | let dm = fB._1 | |
882 | + | let dn = fB._2 | |
883 | + | let fC = dl(dm, dn, 0) | |
884 | + | let fl = fC._1 | |
885 | + | let dc = fC._2 | |
880 | 886 | let dw = value(getString(ah)) | |
881 | - | let | |
882 | - | if (( | |
883 | - | then $Tuple2((((cY ++ | |
887 | + | let fm = dp(dk, dc) | |
888 | + | if ((fm == fm)) | |
889 | + | then $Tuple2((((cY ++ fi) ++ fA) ++ fl), fy) | |
884 | 890 | else throw("Strict value is not equal to itself.") | |
885 | 891 | } | |
886 | 892 | else throw("Strict value is not equal to itself.") | |
887 | 893 | } | |
888 | 894 | else throw("Strict value is not equal to itself.") | |
889 | 895 | } | |
890 | 896 | else throw("Strict value is not equal to itself.") | |
891 | 897 | } | |
892 | 898 | ||
893 | 899 | ||
894 | 900 | ||
895 | 901 | @Callable(dC) | |
896 | 902 | func putOneTknREADONLY (dT,dS) = { | |
897 | - | let | |
898 | - | let | |
899 | - | let cY = | |
900 | - | let dQ = | |
901 | - | let | |
902 | - | let dX = | |
903 | - | $Tuple2(nil, $Tuple3( | |
903 | + | let fD = dR(dS, aS(dT), unit, unit) | |
904 | + | let fx = fD._1 | |
905 | + | let cY = fD._2 | |
906 | + | let dQ = fD._3 | |
907 | + | let fw = fD._4 | |
908 | + | let dX = fD._5 | |
909 | + | $Tuple2(nil, $Tuple3(fx, dQ, fw)) | |
904 | 910 | } | |
905 | 911 | ||
906 | 912 | ||
907 | 913 | ||
908 | 914 | @Callable(dC) | |
909 | - | func getOneTkn ( | |
910 | - | let | |
911 | - | let | |
912 | - | if ($isInstanceOf( | |
913 | - | then | |
914 | - | else throw(($getType( | |
915 | + | func getOneTkn (fE,fp) = { | |
916 | + | let fr = { | |
917 | + | let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
918 | + | if ($isInstanceOf(fs, "Boolean")) | |
919 | + | then fs | |
920 | + | else throw(($getType(fs) + " couldn't be cast to Boolean")) | |
915 | 921 | } | |
916 | - | let | |
922 | + | let fF = if (if (aN()) | |
917 | 923 | then true | |
918 | 924 | else (ba == n)) | |
919 | 925 | then true | |
920 | - | else | |
921 | - | let ey = [if (if (!( | |
926 | + | else fr | |
927 | + | let ey = [if (if (!(fF)) | |
922 | 928 | then true | |
923 | - | else | |
929 | + | else eT(dC)) | |
924 | 930 | then true | |
925 | 931 | else aI("get operation is blocked by admin"), if ((size(dC.payments) == 1)) | |
926 | 932 | then true | |
927 | 933 | else aI("exactly 1 payment are expected")] | |
928 | 934 | if ((ey == ey)) | |
929 | 935 | then { | |
930 | - | let ex = aS( | |
931 | - | let | |
932 | - | let dT = | |
933 | - | let ef = | |
936 | + | let ex = aS(fE) | |
937 | + | let fu = dC.payments[0] | |
938 | + | let dT = fu.assetId | |
939 | + | let ef = fu.amount | |
934 | 940 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(ef)) | |
935 | 941 | let Z = dC.caller | |
936 | 942 | let aa = dC.transactionId | |
937 | - | let | |
938 | - | if (( | |
943 | + | let fG = ew(ex, ef, dT, Z, aa) | |
944 | + | if ((fG == fG)) | |
939 | 945 | then { | |
940 | - | let ez = | |
941 | - | let | |
942 | - | let dQ = | |
943 | - | let cY = | |
944 | - | let | |
945 | - | let dK = if (if (( | |
946 | - | then ( | |
946 | + | let ez = fG._5 | |
947 | + | let fw = fG._4 | |
948 | + | let dQ = fG._3 | |
949 | + | let cY = fG._2 | |
950 | + | let fH = fG._1 | |
951 | + | let dK = if (if ((fp > 0)) | |
952 | + | then (fp > fH) | |
947 | 953 | else false) | |
948 | - | then aI(makeString(["amount to receive is less than ", toString( | |
949 | - | else | |
950 | - | let | |
951 | - | if (( | |
954 | + | then aI(makeString(["amount to receive is less than ", toString(fp)], "")) | |
955 | + | else fH | |
956 | + | let fI = invoke(aL, "burn", [ef], [AttachedPayment(dT, ef)]) | |
957 | + | if ((fI == fI)) | |
952 | 958 | then { | |
953 | - | let | |
954 | - | let | |
959 | + | let fJ = [ScriptTransfer(Z, dK, ex)] | |
960 | + | let fA = if ((dQ > 0)) | |
955 | 961 | then [ScriptTransfer(aM, dQ, ex)] | |
956 | 962 | else nil | |
957 | - | let | |
958 | - | let | |
963 | + | let fK = { | |
964 | + | let fL = if ((this == aM)) | |
959 | 965 | then 0 | |
960 | 966 | else dQ | |
961 | 967 | if (ez) | |
962 | - | then $Tuple2(-((dK + | |
963 | - | else $Tuple2(0, -((dK + | |
968 | + | then $Tuple2(-((dK + fL)), 0) | |
969 | + | else $Tuple2(0, -((dK + fL))) | |
964 | 970 | } | |
965 | - | let dm = | |
966 | - | let dn = | |
967 | - | let | |
968 | - | let | |
969 | - | let dc = | |
970 | - | let | |
971 | - | if (( | |
972 | - | then $Tuple2((((cY ++ | |
971 | + | let dm = fK._1 | |
972 | + | let dn = fK._2 | |
973 | + | let fM = dl(dm, dn, 0) | |
974 | + | let fl = fM._1 | |
975 | + | let dc = fM._2 | |
976 | + | let fm = dp(dk, dc) | |
977 | + | if ((fm == fm)) | |
978 | + | then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK) | |
973 | 979 | else throw("Strict value is not equal to itself.") | |
974 | 980 | } | |
975 | 981 | else throw("Strict value is not equal to itself.") | |
976 | 982 | } | |
977 | 983 | else throw("Strict value is not equal to itself.") | |
978 | 984 | } | |
979 | 985 | else throw("Strict value is not equal to itself.") | |
980 | 986 | } | |
981 | 987 | ||
982 | 988 | ||
983 | 989 | ||
984 | 990 | @Callable(dC) | |
985 | 991 | func getOneTknREADONLY (ex,ef) = { | |
986 | - | let | |
987 | - | let | |
988 | - | let cY = | |
989 | - | let dQ = | |
990 | - | let | |
991 | - | let ez = | |
992 | - | $Tuple2(nil, $Tuple3( | |
992 | + | let fN = ew(aS(ex), ef, bb, unit, unit) | |
993 | + | let fH = fN._1 | |
994 | + | let cY = fN._2 | |
995 | + | let dQ = fN._3 | |
996 | + | let fw = fN._4 | |
997 | + | let ez = fN._5 | |
998 | + | $Tuple2(nil, $Tuple3(fH, dQ, fw)) | |
993 | 999 | } | |
994 | 1000 | ||
995 | 1001 | ||
996 | 1002 | ||
997 | 1003 | @Callable(dC) | |
998 | - | func unstakeAndGetOneTkn ( | |
999 | - | let | |
1000 | - | let | |
1001 | - | if ($isInstanceOf( | |
1002 | - | then | |
1003 | - | else throw(($getType( | |
1004 | + | func unstakeAndGetOneTkn (fO,fE,fp) = { | |
1005 | + | let fr = { | |
1006 | + | let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1007 | + | if ($isInstanceOf(fs, "Boolean")) | |
1008 | + | then fs | |
1009 | + | else throw(($getType(fs) + " couldn't be cast to Boolean")) | |
1004 | 1010 | } | |
1005 | - | let | |
1011 | + | let fF = if (if (aN()) | |
1006 | 1012 | then true | |
1007 | 1013 | else (ba == n)) | |
1008 | 1014 | then true | |
1009 | - | else | |
1010 | - | let ey = [if (if (!( | |
1015 | + | else fr | |
1016 | + | let ey = [if (if (!(fF)) | |
1011 | 1017 | then true | |
1012 | - | else | |
1018 | + | else eT(dC)) | |
1013 | 1019 | then true | |
1014 | 1020 | else aI("get operation is blocked by admin"), if ((size(dC.payments) == 0)) | |
1015 | 1021 | then true | |
1016 | 1022 | else aI("no payments are expected")] | |
1017 | 1023 | if ((ey == ey)) | |
1018 | 1024 | then { | |
1019 | - | let ex = aS( | |
1025 | + | let ex = aS(fE) | |
1020 | 1026 | let Z = dC.caller | |
1021 | 1027 | let aa = dC.transactionId | |
1022 | 1028 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1023 | - | let | |
1024 | - | if (( | |
1029 | + | let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil) | |
1030 | + | if ((fP == fP)) | |
1025 | 1031 | then { | |
1026 | - | let | |
1027 | - | if (( | |
1032 | + | let fQ = ew(ex, fO, bb, Z, aa) | |
1033 | + | if ((fQ == fQ)) | |
1028 | 1034 | then { | |
1029 | - | let ez = | |
1030 | - | let | |
1031 | - | let dQ = | |
1032 | - | let cY = | |
1033 | - | let | |
1034 | - | let dK = if (if (( | |
1035 | - | then ( | |
1035 | + | let ez = fQ._5 | |
1036 | + | let fw = fQ._4 | |
1037 | + | let dQ = fQ._3 | |
1038 | + | let cY = fQ._2 | |
1039 | + | let fH = fQ._1 | |
1040 | + | let dK = if (if ((fp > 0)) | |
1041 | + | then (fp > fH) | |
1036 | 1042 | else false) | |
1037 | - | then aI(makeString(["amount to receive is less than ", toString( | |
1038 | - | else | |
1039 | - | let | |
1040 | - | if (( | |
1043 | + | then aI(makeString(["amount to receive is less than ", toString(fp)], "")) | |
1044 | + | else fH | |
1045 | + | let fI = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)]) | |
1046 | + | if ((fI == fI)) | |
1041 | 1047 | then { | |
1042 | - | let | |
1043 | - | let | |
1048 | + | let fJ = [ScriptTransfer(dC.caller, dK, ex)] | |
1049 | + | let fA = if ((dQ > 0)) | |
1044 | 1050 | then [ScriptTransfer(aM, dQ, ex)] | |
1045 | 1051 | else nil | |
1046 | - | let | |
1047 | - | let | |
1052 | + | let fR = { | |
1053 | + | let fL = if ((this == aM)) | |
1048 | 1054 | then 0 | |
1049 | 1055 | else dQ | |
1050 | 1056 | if (ez) | |
1051 | - | then $Tuple2(-((dK + | |
1052 | - | else $Tuple2(0, -((dK + | |
1057 | + | then $Tuple2(-((dK + fL)), 0) | |
1058 | + | else $Tuple2(0, -((dK + fL))) | |
1053 | 1059 | } | |
1054 | - | let dm = | |
1055 | - | let dn = | |
1056 | - | let | |
1057 | - | let | |
1058 | - | let dc = | |
1059 | - | let | |
1060 | - | if (( | |
1061 | - | then $Tuple2((((cY ++ | |
1060 | + | let dm = fR._1 | |
1061 | + | let dn = fR._2 | |
1062 | + | let fS = dl(dm, dn, 0) | |
1063 | + | let fl = fS._1 | |
1064 | + | let dc = fS._2 | |
1065 | + | let fm = dp(dk, dc) | |
1066 | + | if ((fm == fm)) | |
1067 | + | then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK) | |
1062 | 1068 | else throw("Strict value is not equal to itself.") | |
1063 | 1069 | } | |
1064 | 1070 | else throw("Strict value is not equal to itself.") | |
1065 | 1071 | } | |
1066 | 1072 | else throw("Strict value is not equal to itself.") | |
1067 | 1073 | } | |
1068 | 1074 | else throw("Strict value is not equal to itself.") | |
1069 | 1075 | } | |
1070 | 1076 | else throw("Strict value is not equal to itself.") | |
1071 | 1077 | } | |
1072 | 1078 | ||
1073 | 1079 | ||
1074 | 1080 | ||
1075 | 1081 | @Callable(dC) | |
1076 | 1082 | func get () = { | |
1077 | 1083 | let cJ = dB(dC) | |
1078 | - | let | |
1084 | + | let fT = cJ._1 | |
1079 | 1085 | let cq = cJ._2 | |
1080 | 1086 | let dE = cJ._3 | |
1081 | 1087 | let bY = cJ._4 | |
1082 | 1088 | let cr = cJ._5 | |
1083 | 1089 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE)) | |
1084 | - | let | |
1085 | - | if (( | |
1090 | + | let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)]) | |
1091 | + | if ((fU == fU)) | |
1086 | 1092 | then { | |
1087 | - | let | |
1088 | - | let | |
1089 | - | let dc = | |
1090 | - | let | |
1091 | - | if (( | |
1092 | - | then (cr ++ | |
1093 | + | let fV = dl(-(fT), -(cq), 0) | |
1094 | + | let fl = fV._1 | |
1095 | + | let dc = fV._2 | |
1096 | + | let fm = dp(dk, dc) | |
1097 | + | if ((fm == fm)) | |
1098 | + | then (cr ++ fl) | |
1093 | 1099 | else throw("Strict value is not equal to itself.") | |
1094 | 1100 | } | |
1095 | 1101 | else throw("Strict value is not equal to itself.") | |
1096 | 1102 | } | |
1097 | 1103 | ||
1098 | 1104 | ||
1099 | 1105 | ||
1100 | 1106 | @Callable(dC) | |
1101 | - | func getNoLess ( | |
1107 | + | func getNoLess (fW,fX) = { | |
1102 | 1108 | let cJ = dB(dC) | |
1103 | 1109 | let cp = cJ._1 | |
1104 | 1110 | let cq = cJ._2 | |
1105 | 1111 | let dE = cJ._3 | |
1106 | 1112 | let bY = cJ._4 | |
1107 | 1113 | let cr = cJ._5 | |
1108 | - | if (( | |
1109 | - | then throw(((("noLessThenAmtAsset failed: " + toString(cp)) + " < ") + toString( | |
1110 | - | else if (( | |
1111 | - | then throw(((("noLessThenPriceAsset failed: " + toString(cq)) + " < ") + toString( | |
1114 | + | if ((fW > cp)) | |
1115 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cp)) + " < ") + toString(fW))) | |
1116 | + | else if ((fX > cq)) | |
1117 | + | then throw(((("noLessThenPriceAsset failed: " + toString(cq)) + " < ") + toString(fX))) | |
1112 | 1118 | else { | |
1113 | 1119 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE)) | |
1114 | - | let | |
1115 | - | if (( | |
1120 | + | let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)]) | |
1121 | + | if ((fU == fU)) | |
1116 | 1122 | then { | |
1117 | - | let | |
1118 | - | let | |
1119 | - | let dc = | |
1120 | - | let | |
1121 | - | if (( | |
1122 | - | then (cr ++ | |
1123 | + | let fY = dl(-(cp), -(cq), 0) | |
1124 | + | let fl = fY._1 | |
1125 | + | let dc = fY._2 | |
1126 | + | let fm = dp(dk, dc) | |
1127 | + | if ((fm == fm)) | |
1128 | + | then (cr ++ fl) | |
1123 | 1129 | else throw("Strict value is not equal to itself.") | |
1124 | 1130 | } | |
1125 | 1131 | else throw("Strict value is not equal to itself.") | |
1126 | 1132 | } | |
1127 | 1133 | } | |
1128 | 1134 | ||
1129 | 1135 | ||
1130 | 1136 | ||
1131 | 1137 | @Callable(dC) | |
1132 | 1138 | func unstakeAndGet (dK) = { | |
1133 | - | let | |
1139 | + | let fZ = if ((size(dC.payments) != 0)) | |
1134 | 1140 | then throw("No payments are expected") | |
1135 | 1141 | else true | |
1136 | - | if (( | |
1142 | + | if ((fZ == fZ)) | |
1137 | 1143 | then { | |
1138 | 1144 | let bN = aP() | |
1139 | 1145 | let ca = fromBase58String(bN[q]) | |
1140 | 1146 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1141 | - | let | |
1142 | - | if (( | |
1147 | + | let fP = invoke(bh, "unstake", [toBase58String(ca), dK], nil) | |
1148 | + | if ((fP == fP)) | |
1143 | 1149 | then { | |
1144 | 1150 | let cJ = bW(toBase58String(dC.transactionId), toBase58String(ca), dK, dC.caller) | |
1145 | 1151 | let cp = cJ._1 | |
1146 | 1152 | let cq = cJ._2 | |
1147 | 1153 | let cd = parseIntValue(cJ._9) | |
1148 | 1154 | let cr = cJ._10 | |
1149 | - | let | |
1155 | + | let ga = if (if (aN()) | |
1150 | 1156 | then true | |
1151 | 1157 | else (cd == n)) | |
1152 | 1158 | then throw(("Get operation is blocked by admin. Status = " + toString(cd))) | |
1153 | 1159 | else true | |
1154 | - | if (( | |
1160 | + | if ((ga == ga)) | |
1155 | 1161 | then { | |
1156 | - | let | |
1157 | - | if (( | |
1162 | + | let fU = invoke(aL, "burn", [dK], [AttachedPayment(ca, dK)]) | |
1163 | + | if ((fU == fU)) | |
1158 | 1164 | then { | |
1159 | - | let | |
1160 | - | let | |
1161 | - | let dc = | |
1162 | - | let | |
1163 | - | if (( | |
1164 | - | then (cr ++ | |
1165 | + | let gb = dl(-(cp), -(cq), 0) | |
1166 | + | let fl = gb._1 | |
1167 | + | let dc = gb._2 | |
1168 | + | let fm = dp(dk, dc) | |
1169 | + | if ((fm == fm)) | |
1170 | + | then (cr ++ fl) | |
1165 | 1171 | else throw("Strict value is not equal to itself.") | |
1166 | 1172 | } | |
1167 | 1173 | else throw("Strict value is not equal to itself.") | |
1168 | 1174 | } | |
1169 | 1175 | else throw("Strict value is not equal to itself.") | |
1170 | 1176 | } | |
1171 | 1177 | else throw("Strict value is not equal to itself.") | |
1172 | 1178 | } | |
1173 | 1179 | else throw("Strict value is not equal to itself.") | |
1174 | 1180 | } | |
1175 | 1181 | ||
1176 | 1182 | ||
1177 | 1183 | ||
1178 | 1184 | @Callable(dC) | |
1179 | - | func unstakeAndGetNoLess ( | |
1180 | - | let | |
1185 | + | func unstakeAndGetNoLess (fO,gc,fX) = { | |
1186 | + | let fF = if (aN()) | |
1181 | 1187 | then true | |
1182 | 1188 | else (ba == n) | |
1183 | - | let ey = [if (!( | |
1189 | + | let ey = [if (!(fF)) | |
1184 | 1190 | then true | |
1185 | 1191 | else throw("get operation is blocked by admin"), if ((size(dC.payments) == 0)) | |
1186 | 1192 | then true | |
1187 | 1193 | else throw("no payments are expected")] | |
1188 | 1194 | if ((ey == ey)) | |
1189 | 1195 | then { | |
1190 | 1196 | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1191 | - | let | |
1192 | - | if (( | |
1197 | + | let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil) | |
1198 | + | if ((fP == fP)) | |
1193 | 1199 | then { | |
1194 | - | let cJ = bW(toBase58String(dC.transactionId), toBase58String(bb), | |
1200 | + | let cJ = bW(toBase58String(dC.transactionId), toBase58String(bb), fO, dC.caller) | |
1195 | 1201 | let cp = cJ._1 | |
1196 | 1202 | let cq = cJ._2 | |
1197 | 1203 | let cr = cJ._10 | |
1198 | - | let | |
1204 | + | let gd = [if ((cp >= gc)) | |
1199 | 1205 | then true | |
1200 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1206 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(gc)], "")), if ((cq >= fX)) | |
1201 | 1207 | then true | |
1202 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1203 | - | if (( | |
1208 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fX)], ""))] | |
1209 | + | if ((gd == gd)) | |
1204 | 1210 | then { | |
1205 | - | let | |
1206 | - | if (( | |
1211 | + | let fU = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)]) | |
1212 | + | if ((fU == fU)) | |
1207 | 1213 | then { | |
1208 | - | let | |
1209 | - | let | |
1210 | - | let dc = | |
1211 | - | let | |
1212 | - | if (( | |
1213 | - | then (cr ++ | |
1214 | + | let ge = dl(-(cp), -(cq), 0) | |
1215 | + | let fl = ge._1 | |
1216 | + | let dc = ge._2 | |
1217 | + | let fm = dp(dk, dc) | |
1218 | + | if ((fm == fm)) | |
1219 | + | then (cr ++ fl) | |
1214 | 1220 | else throw("Strict value is not equal to itself.") | |
1215 | 1221 | } | |
1216 | 1222 | else throw("Strict value is not equal to itself.") | |
1217 | 1223 | } | |
1218 | 1224 | else throw("Strict value is not equal to itself.") | |
1219 | 1225 | } | |
1220 | 1226 | else throw("Strict value is not equal to itself.") | |
1221 | 1227 | } | |
1222 | 1228 | else throw("Strict value is not equal to itself.") | |
1223 | 1229 | } | |
1224 | 1230 | ||
1225 | 1231 | ||
1226 | 1232 | ||
1227 | 1233 | @Callable(dC) | |
1228 | - | func activate ( | |
1234 | + | func activate (gf,gg) = if ((toString(dC.caller) != toString(aL))) | |
1229 | 1235 | then throw("permissions denied") | |
1230 | - | else $Tuple2([StringEntry(ac(), | |
1236 | + | else $Tuple2([StringEntry(ac(), gf), StringEntry(ad(), gg)], "success") | |
1231 | 1237 | ||
1232 | 1238 | ||
1233 | 1239 | ||
1234 | 1240 | @Callable(dC) | |
1235 | 1241 | func refreshKLp () = { | |
1236 | - | let | |
1237 | - | let | |
1242 | + | let gh = valueOrElse(getInteger(ai), 0) | |
1243 | + | let gi = if (((height - gh) >= al)) | |
1238 | 1244 | then unit | |
1239 | 1245 | else aI(makeString([toString(al), " blocks have not passed since the previous call"], "")) | |
1240 | - | if (( | |
1246 | + | if ((gi == gi)) | |
1241 | 1247 | then { | |
1242 | 1248 | let dw = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ah), "0")), aK("invalid kLp")) | |
1243 | - | let | |
1244 | - | let | |
1245 | - | let dc = | |
1249 | + | let gj = dl(0, 0, 0) | |
1250 | + | let gk = gj._1 | |
1251 | + | let dc = gj._2 | |
1246 | 1252 | let do = if ((dw != dc)) | |
1247 | - | then | |
1253 | + | then gk | |
1248 | 1254 | else aI("nothing to refresh") | |
1249 | 1255 | $Tuple2(do, toString(dc)) | |
1250 | 1256 | } | |
1251 | 1257 | else throw("Strict value is not equal to itself.") | |
1252 | 1258 | } | |
1253 | 1259 | ||
1254 | 1260 | ||
1255 | 1261 | ||
1256 | 1262 | @Callable(dC) | |
1257 | 1263 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aP()) | |
1258 | 1264 | ||
1259 | 1265 | ||
1260 | 1266 | ||
1261 | 1267 | @Callable(dC) | |
1262 | 1268 | func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz)) | |
1263 | 1269 | ||
1264 | 1270 | ||
1265 | 1271 | ||
1266 | 1272 | @Callable(dC) | |
1267 | 1273 | func calcPricesWrapperREADONLY (bH,bI,bM) = { | |
1268 | 1274 | let bV = bL(bH, bI, bM) | |
1269 | 1275 | $Tuple2(nil, [toString(bV[0]), toString(bV[1]), toString(bV[2])]) | |
1270 | 1276 | } | |
1271 | 1277 | ||
1272 | 1278 | ||
1273 | 1279 | ||
1274 | 1280 | @Callable(dC) | |
1275 | 1281 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1276 | 1282 | ||
1277 | 1283 | ||
1278 | 1284 | ||
1279 | 1285 | @Callable(dC) | |
1280 | 1286 | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1281 | 1287 | ||
1282 | 1288 | ||
1283 | 1289 | ||
1284 | 1290 | @Callable(dC) | |
1285 | 1291 | func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC)))) | |
1286 | 1292 | ||
1287 | 1293 | ||
1288 | 1294 | ||
1289 | 1295 | @Callable(dC) | |
1290 | 1296 | func estimatePutOperationWrapperREADONLY (bX,ct,cu,cv,cw,cx,Z,cy,cz) = $Tuple2(nil, cs(bX, ct, cu, cv, cw, cx, Z, cy, cz)) | |
1291 | 1297 | ||
1292 | 1298 | ||
1293 | 1299 | ||
1294 | 1300 | @Callable(dC) | |
1295 | 1301 | func estimateGetOperationWrapperREADONLY (bX,bY,bZ,Z) = { | |
1296 | 1302 | let cJ = bW(bX, bY, bZ, addressFromStringValue(Z)) | |
1297 | 1303 | $Tuple2(nil, $Tuple10(cJ._1, cJ._2, cJ._3, cJ._4, cJ._5, cJ._6, cJ._7, toString(cJ._8), cJ._9, cJ._10)) | |
1298 | 1304 | } | |
1299 | 1305 | ||
1300 | 1306 | ||
1301 | 1307 | ||
1302 | 1308 | @Callable(dC) | |
1303 | 1309 | func statsREADONLY () = { | |
1304 | 1310 | let bN = aP() | |
1305 | 1311 | let ca = fromBase58String(bN[q]) | |
1306 | - | let | |
1307 | - | let | |
1312 | + | let gl = bN[r] | |
1313 | + | let gm = bN[s] | |
1308 | 1314 | let cC = bN[v] | |
1309 | 1315 | let cD = bN[w] | |
1310 | 1316 | let bO = parseIntValue(bN[t]) | |
1311 | 1317 | let bP = parseIntValue(bN[u]) | |
1312 | - | let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1313 | - | let gn = by(gk) | |
1318 | + | let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1314 | 1319 | let go = by(gl) | |
1315 | - | let gp = if ((gm == 0)) | |
1320 | + | let gp = by(gm) | |
1321 | + | let gq = if ((gn == 0)) | |
1316 | 1322 | then [e, e, e] | |
1317 | - | else bL( | |
1323 | + | else bL(go, gp, gn) | |
1318 | 1324 | let ck = 0 | |
1319 | - | let | |
1320 | - | let | |
1321 | - | let | |
1322 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gn), toString( | |
1325 | + | let gr = G(gq[1], b) | |
1326 | + | let gs = G(gq[2], b) | |
1327 | + | let gt = value(getInteger(aL, aw(toString(this)))) | |
1328 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(go), toString(gp), toString(gn), toString(ck), toString(gr), toString(gs), toString(gt)], j)) | |
1323 | 1329 | } | |
1324 | 1330 | ||
1325 | 1331 | ||
1326 | 1332 | ||
1327 | 1333 | @Callable(dC) | |
1328 | 1334 | func evaluatePutByAmountAssetREADONLY (cu) = { | |
1329 | 1335 | let bN = aP() | |
1330 | 1336 | let ca = fromBase58String(bN[q]) | |
1331 | 1337 | let cA = bN[r] | |
1332 | 1338 | let cb = fromBase58String(cA) | |
1333 | 1339 | let cB = bN[s] | |
1334 | 1340 | let cc = fromBase58String(cB) | |
1335 | 1341 | let bO = parseIntValue(bN[t]) | |
1336 | 1342 | let bP = parseIntValue(bN[u]) | |
1337 | 1343 | let cd = bN[p] | |
1338 | - | let | |
1339 | - | let | |
1340 | - | let | |
1341 | - | let bJ = D( | |
1342 | - | let bK = D( | |
1343 | - | let cj = if (( | |
1344 | + | let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1345 | + | let go = by(cA) | |
1346 | + | let gp = by(cB) | |
1347 | + | let bJ = D(go, bO) | |
1348 | + | let bK = D(gp, bP) | |
1349 | + | let cj = if ((gn == 0)) | |
1344 | 1350 | then e | |
1345 | 1351 | else bA(bK, bJ) | |
1346 | 1352 | let cG = D(cu, bO) | |
1347 | 1353 | let cH = fraction(cG, cj, d) | |
1348 | 1354 | let cw = G(cH, bP) | |
1349 | 1355 | let dI = cs("", 500000, cu, cb, cw, cc, "", true, false) | |
1350 | 1356 | let cR = dI._1 | |
1351 | - | let | |
1357 | + | let gu = dI._3 | |
1352 | 1358 | let cf = dI._4 | |
1353 | 1359 | let ch = dI._5 | |
1354 | 1360 | let ce = dI._6 | |
1355 | 1361 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j)) | |
1356 | 1362 | } | |
1357 | 1363 | ||
1358 | 1364 | ||
1359 | 1365 | ||
1360 | 1366 | @Callable(dC) | |
1361 | 1367 | func evaluatePutByPriceAssetREADONLY (cw) = { | |
1362 | 1368 | let bN = aP() | |
1363 | 1369 | let ca = fromBase58String(bN[q]) | |
1364 | 1370 | let cA = bN[r] | |
1365 | 1371 | let cb = fromBase58String(cA) | |
1366 | 1372 | let cB = bN[s] | |
1367 | 1373 | let cc = fromBase58String(cB) | |
1368 | 1374 | let bO = parseIntValue(bN[t]) | |
1369 | 1375 | let bP = parseIntValue(bN[u]) | |
1370 | 1376 | let cd = bN[p] | |
1371 | - | let | |
1372 | - | let | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | let cj = if (( | |
1377 | + | let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1378 | + | let gv = by(cA) | |
1379 | + | let gw = by(cB) | |
1380 | + | let gx = D(gv, bO) | |
1381 | + | let gy = D(gw, bP) | |
1382 | + | let cj = if ((gn == 0)) | |
1377 | 1383 | then e | |
1378 | - | else bA( | |
1384 | + | else bA(gy, gx) | |
1379 | 1385 | let cH = D(cw, bP) | |
1380 | 1386 | let cG = fraction(cH, d, cj) | |
1381 | 1387 | let cu = G(cG, bO) | |
1382 | 1388 | let dI = cs("", 500000, cu, cb, cw, cc, "", true, false) | |
1383 | 1389 | let cR = dI._1 | |
1384 | - | let | |
1390 | + | let gu = dI._3 | |
1385 | 1391 | let cf = dI._4 | |
1386 | 1392 | let ch = dI._5 | |
1387 | 1393 | let ce = dI._6 | |
1388 | 1394 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j)) | |
1389 | 1395 | } | |
1390 | 1396 | ||
1391 | 1397 | ||
1392 | 1398 | ||
1393 | 1399 | @Callable(dC) | |
1394 | - | func evaluateGetREADONLY ( | |
1395 | - | let cJ = bW("", | |
1400 | + | func evaluateGetREADONLY (gz,gA) = { | |
1401 | + | let cJ = bW("", gz, gA, this) | |
1396 | 1402 | let cp = cJ._1 | |
1397 | 1403 | let cq = cJ._2 | |
1398 | 1404 | let cf = cJ._5 | |
1399 | 1405 | let ch = cJ._6 | |
1400 | 1406 | let ce = cJ._7 | |
1401 | 1407 | let ck = cJ._8 | |
1402 | 1408 | let cd = parseIntValue(cJ._9) | |
1403 | 1409 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cp), toString(cq), toString(cf), toString(ch), toString(ce), toString(ck), toString(cd)], j)) | |
1404 | 1410 | } | |
1405 | 1411 | ||
1406 | 1412 | ||
1407 | - | @Verifier( | |
1408 | - | func | |
1409 | - | let | |
1410 | - | let dN = | |
1413 | + | @Verifier(gB) | |
1414 | + | func gC () = { | |
1415 | + | let gD = { | |
1416 | + | let dN = eQ() | |
1411 | 1417 | if ($isInstanceOf(dN, "ByteVector")) | |
1412 | 1418 | then { | |
1413 | - | let | |
1414 | - | | |
1419 | + | let eU = dN | |
1420 | + | eU | |
1415 | 1421 | } | |
1416 | 1422 | else if ($isInstanceOf(dN, "Unit")) | |
1417 | - | then | |
1423 | + | then gB.senderPublicKey | |
1418 | 1424 | else throw("Match error") | |
1419 | 1425 | } | |
1420 | - | let dN = | |
1426 | + | let dN = gB | |
1421 | 1427 | if ($isInstanceOf(dN, "Order")) | |
1422 | 1428 | then { | |
1423 | 1429 | let ds = dN | |
1424 | - | let | |
1430 | + | let gE = aO() | |
1425 | 1431 | let aB = dr(ds) | |
1426 | 1432 | let aC = sigVerify(ds.bodyBytes, ds.proofs[0], ds.senderPublicKey) | |
1427 | - | let aD = sigVerify(ds.bodyBytes, ds.proofs[1], | |
1433 | + | let aD = sigVerify(ds.bodyBytes, ds.proofs[1], gE) | |
1428 | 1434 | if (if (if (aB) | |
1429 | 1435 | then aC | |
1430 | 1436 | else false) | |
1431 | 1437 | then aD | |
1432 | 1438 | else false) | |
1433 | 1439 | then true | |
1434 | 1440 | else aA(aB, aC, aD) | |
1435 | 1441 | } | |
1436 | 1442 | else if ($isInstanceOf(dN, "SetScriptTransaction")) | |
1437 | 1443 | then { | |
1438 | - | let | |
1439 | - | let | |
1440 | - | let | |
1441 | - | let | |
1442 | - | if (if (( | |
1443 | - | then ( | |
1444 | + | let eR = dN | |
1445 | + | let gF = blake2b256(value(eR.script)) | |
1446 | + | let gG = fromBase64String(value(getString(aL, ay()))) | |
1447 | + | let gH = scriptHash(this) | |
1448 | + | if (if ((gG == gF)) | |
1449 | + | then (gH != gF) | |
1444 | 1450 | else false) | |
1445 | 1451 | then true | |
1446 | - | else sigVerify( | |
1452 | + | else sigVerify(gB.bodyBytes, gB.proofs[0], gD) | |
1447 | 1453 | } | |
1448 | - | else sigVerify( | |
1454 | + | else sigVerify(gB.bodyBytes, gB.proofs[0], gD) | |
1449 | 1455 | } | |
1450 | 1456 |
github/deemru/w8io/026f985 281.86 ms ◑