tx · 45hJedv3552NyZDqW11cbB7HkKbTgt8t2wQFCcLsa2p6 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS: -0.34000000 Waves 2022.11.16 22:01 [2320071] smart account 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS > SELF 0.00000000 Waves
{ "type": 13, "id": "45hJedv3552NyZDqW11cbB7HkKbTgt8t2wQFCcLsa2p6", "fee": 34000000, "feeAssetId": null, "timestamp": 1668625268454, "version": 2, "chainId": 84, "sender": "3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS", "senderPublicKey": "C7xgcYqQ8qV8rmvzAjhQWq4cz82F6VJfXMNygvrTXsfW", "proofs": [ "32xCKJKEqi9mmSUpxybJTvZ5EcH6rJj2KD93XDctzHMqonsd9pSUUonMgDdcALBKXfkzm6Fhw5vrCkKMN8W4k2YG", "4VTHu7dDz3ZTj9YbhxW1BuQagke9jBNPeLdTW6A6URmoytsdFMPcTZaMtiA6zJxuNqSNEbKnGJVyczP8WC1Hrbnf" ], "script": "base64:BgJmCAISBAoCEQESBQoDCAEBEgUKAwEEARIECgIRCBIDCgEBEgYKBAgIAQgSBAoCCAESAwoBERIECgIRARIFCgMBCAgSBAoCCAESBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIAXAAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgAIREVDSU1BTFMABgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTMuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMABmtDYXVzZQIOc2h1dGRvd25fY2F1c2UADWtTaGFyZUFzc2V0SWQCDnNoYXJlX2Fzc2V0X2lkABFrU2hhcmVBc3NldFN1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ZG1pblB1YktleUludm9rZQMDBRNjYWxsVGFrZUludG9BY2NvdW50BQ1zaWduZWRCeUFkbWluBwYFE211bHRpU2lnbmVkQnlBZG1pbnMFE211bHRpU2lnbmVkQnlBZG1pbnO40wRv", "height": 2320071, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FQJkm5Aogrt7psbfx8LYFeSGcqsZKB9cxWY9bE2JPVe8 Next: 9aXugkWGEkPRK6SpH4LTpcAECJJSqBsJv4o6724riXSt Diff:
Old | New | Differences | |
---|---|---|---|
97 | 97 | ||
98 | 98 | let V = Address(H(F)) | |
99 | 99 | ||
100 | - | let W = base58' | |
100 | + | let W = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
101 | 101 | ||
102 | 102 | let X = [toBase58String(W)] | |
103 | 103 | ||
708 | 708 | } | |
709 | 709 | ||
710 | 710 | ||
711 | - | @Callable(dc) | |
711 | + | func dc (dd,de,df) = { | |
712 | + | let cJ = cF() | |
713 | + | if (cJ._1) | |
714 | + | then (cL(cJ._2) ++ cM(dd.caller, dd.payments)) | |
715 | + | else { | |
716 | + | let dg = if ((size(dd.payments) > 0)) | |
717 | + | then if ((size(dd.payments) != 1)) | |
718 | + | then throw("size(payments) != 1") | |
719 | + | else { | |
720 | + | let dh = dd.payments[0].assetId | |
721 | + | if ((aa != dh)) | |
722 | + | then throw("unknown payment token") | |
723 | + | else dd.payments[0].amount | |
724 | + | } | |
725 | + | else 0 | |
726 | + | let di = (dg + df) | |
727 | + | func dj (aO,dk) = { | |
728 | + | let dl = aO | |
729 | + | let dm = dl._1 | |
730 | + | let aq = dl._2 | |
731 | + | let dn = fraction(dk, di, ab) | |
732 | + | if (ax((dn >= de[aq]))) | |
733 | + | then throw("Withdrawal resulted in fewer coins than expected") | |
734 | + | else { | |
735 | + | let do = cA(dn, aj[aq]) | |
736 | + | if ((do == do)) | |
737 | + | then $Tuple2((dm ++ [IntegerEntry((aj[aq] + i), (dk - dn)), ScriptTransfer(dd.caller, dn, fromBase58String(aj[aq]))]), (aq + 1)) | |
738 | + | else throw("Strict value is not equal to itself.") | |
739 | + | } | |
740 | + | } | |
741 | + | ||
742 | + | let dp = { | |
743 | + | let aQ = aM() | |
744 | + | let aR = size(aQ) | |
745 | + | let aS = $Tuple2(nil, 0) | |
746 | + | func aT (aU,aV) = if ((aV >= aR)) | |
747 | + | then aU | |
748 | + | else dj(aU, aQ[aV]) | |
749 | + | ||
750 | + | func aW (aU,aV) = if ((aV >= aR)) | |
751 | + | then aU | |
752 | + | else throw("List size exceeds 10") | |
753 | + | ||
754 | + | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
755 | + | } | |
756 | + | let dm = dp._1 | |
757 | + | let aq = dp._2 | |
758 | + | (dm ++ [Burn(aa, di), IntegerEntry(n, (ab - di))]) | |
759 | + | } | |
760 | + | } | |
761 | + | ||
762 | + | ||
763 | + | func dq (dd,dr,ds,df) = if ((size(dd.payments) != 1)) | |
764 | + | then throw("size(payments) != 1") | |
765 | + | else { | |
766 | + | let cJ = cF() | |
767 | + | if (cJ._1) | |
768 | + | then (cL(cJ._2) ++ cM(dd.originCaller, dd.payments)) | |
769 | + | else { | |
770 | + | let dg = if ((size(dd.payments) > 0)) | |
771 | + | then if ((size(dd.payments) != 1)) | |
772 | + | then throw("size(payments) != 1") | |
773 | + | else { | |
774 | + | let dh = dd.payments[0].assetId | |
775 | + | if ((aa != dh)) | |
776 | + | then throw("unknown payment token") | |
777 | + | else dd.payments[0].amount | |
778 | + | } | |
779 | + | else 0 | |
780 | + | let dt = valueOrErrorMessage(indexOf(aj, dr), "unknown token out") | |
781 | + | let du = fromBase58String(dr) | |
782 | + | let di = (dg + df) | |
783 | + | let aY = aM() | |
784 | + | let dv = bR(aY, di, dt, dd.originCaller) | |
785 | + | let cj = dv._1 | |
786 | + | let dw = dv._2 | |
787 | + | if (ax((cj >= ds))) | |
788 | + | then throw("Not enough coins removed") | |
789 | + | else { | |
790 | + | let dx = fraction(dw, ae, ac) | |
791 | + | let dy = (cj + dw) | |
792 | + | func dz (aO,dA) = { | |
793 | + | let dB = aO | |
794 | + | let cQ = dB._1 | |
795 | + | let aq = dB._2 | |
796 | + | if ((aq == dt)) | |
797 | + | then $Tuple2((cQ :+ (dA - dy)), (aq + 1)) | |
798 | + | else $Tuple2((cQ :+ dA), (aq + 1)) | |
799 | + | } | |
800 | + | ||
801 | + | let dC = { | |
802 | + | let aQ = aY | |
803 | + | let aR = size(aQ) | |
804 | + | let aS = $Tuple2(nil, 0) | |
805 | + | func aT (aU,aV) = if ((aV >= aR)) | |
806 | + | then aU | |
807 | + | else dz(aU, aQ[aV]) | |
808 | + | ||
809 | + | func aW (aU,aV) = if ((aV >= aR)) | |
810 | + | then aU | |
811 | + | else throw("List size exceeds 10") | |
812 | + | ||
813 | + | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
814 | + | } | |
815 | + | let cQ = dC._1 | |
816 | + | let dD = dC._2 | |
817 | + | if (cP(cQ)) | |
818 | + | then throw() | |
819 | + | else { | |
820 | + | let do = cA(dy, dr) | |
821 | + | if ((do == do)) | |
822 | + | then { | |
823 | + | let dE = (dw - dx) | |
824 | + | let dF = if ((dE > 0)) | |
825 | + | then invoke(V, "airDrop", nil, [AttachedPayment(du, dE)]) | |
826 | + | else 0 | |
827 | + | if ((dF == dF)) | |
828 | + | then [ScriptTransfer(dd.originCaller, cj, du), IntegerEntry((aj[dt] + i), (aY[dt] - dy)), Burn(aa, di), ScriptTransfer(Q, dx, du), IntegerEntry(n, (ab - di))] | |
829 | + | else throw("Strict value is not equal to itself.") | |
830 | + | } | |
831 | + | else throw("Strict value is not equal to itself.") | |
832 | + | } | |
833 | + | } | |
834 | + | } | |
835 | + | } | |
836 | + | ||
837 | + | ||
838 | + | @Callable(dd) | |
712 | 839 | func D (aY,bc) = { | |
713 | 840 | let bp = be(aY, bc) | |
714 | 841 | $Tuple2([IntegerEntry("D", bp)], bp) | |
716 | 843 | ||
717 | 844 | ||
718 | 845 | ||
719 | - | @Callable( | |
720 | - | func init (aj,aH, | |
846 | + | @Callable(dd) | |
847 | + | func init (aj,aH,dG) = if (!(isDataStorageUntouched(this))) | |
721 | 848 | then throw("Already initialized") | |
722 | 849 | else if ((0 >= aH)) | |
723 | 850 | then throw("Amp must be must > 0") | |
724 | - | else if ((0 >= | |
851 | + | else if ((0 >= dG)) | |
725 | 852 | then throw("dApp Threshold Coef must be > 0") | |
726 | 853 | else { | |
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
854 | + | let dH = "s_Multi_USD" | |
855 | + | let dI = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this)) | |
856 | + | let dJ = Issue(dH, dI, 0, 6, true) | |
857 | + | let dK = calculateAssetId(dJ) | |
731 | 858 | if (cW(aj)) | |
732 | 859 | then throw() | |
733 | - | else [StringEntry(g, f), StringEntry(h, aj), IntegerEntry("initial_A", aH), IntegerEntry("future_A", aH), IntegerEntry(o, getIntegerValue(G, "base_fee_flat")), StringEntry(m, toBase58String( | |
860 | + | else [StringEntry(g, f), StringEntry(h, aj), IntegerEntry("initial_A", aH), IntegerEntry("future_A", aH), IntegerEntry(o, getIntegerValue(G, "base_fee_flat")), StringEntry(m, toBase58String(dK)), IntegerEntry(n, 0), IntegerEntry(p, dG), BooleanEntry(j, true), dJ] | |
734 | 861 | } | |
735 | 862 | ||
736 | 863 | ||
737 | 864 | ||
738 | - | @Callable( | |
739 | - | func addLiquidity ( | |
865 | + | @Callable(dd) | |
866 | + | func addLiquidity (dL,dM,dN) = valueOrElse(ao(), { | |
740 | 867 | let bc = aH() | |
741 | 868 | let aY = aM() | |
742 | 869 | let bX = if ((ab == 0)) | |
743 | 870 | then 0 | |
744 | 871 | else bs(aY, bc) | |
745 | - | let | |
746 | - | then ( | |
872 | + | let dO = if (if ((dN > 0)) | |
873 | + | then (dd.payments[(size(dd.payments) - 1)].assetId == unit) | |
747 | 874 | else false) | |
748 | - | then $Tuple2(removeByIndex( | |
749 | - | else $Tuple2( | |
750 | - | let cz = | |
751 | - | let | |
752 | - | let | |
753 | - | func | |
875 | + | then $Tuple2(removeByIndex(dd.payments, (size(dd.payments) - 1)), [dd.payments[(size(dd.payments) - 1)]]) | |
876 | + | else $Tuple2(dd.payments, nil) | |
877 | + | let cz = dO._1 | |
878 | + | let dP = dO._2 | |
879 | + | let dQ = size(cz) | |
880 | + | func dR (dS) = if ((dQ > ak)) | |
754 | 881 | then throw(("payments size > " + toString(ak))) | |
755 | - | else if ((1 > | |
882 | + | else if ((1 > dQ)) | |
756 | 883 | then throw("payments size < 1") | |
757 | 884 | else if (if ((ab == 0)) | |
758 | - | then (ak != | |
885 | + | then (ak != dQ) | |
759 | 886 | else false) | |
760 | 887 | then throw("initial deposit requires all coins") | |
761 | 888 | else { | |
762 | - | func | |
889 | + | func dT (aO,cO) = if (containsElement(aj, ck(cO.assetId))) | |
763 | 890 | then true | |
764 | 891 | else throw("Invalid asset in payment") | |
765 | 892 | ||
768 | 895 | let aS = false | |
769 | 896 | func aT (aU,aV) = if ((aV >= aR)) | |
770 | 897 | then aU | |
771 | - | else | |
898 | + | else dT(aU, aQ[aV]) | |
772 | 899 | ||
773 | 900 | func aW (aU,aV) = if ((aV >= aR)) | |
774 | 901 | then aU | |
777 | 904 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
778 | 905 | } | |
779 | 906 | ||
780 | - | if (!( | |
907 | + | if (!(dR(dQ))) | |
781 | 908 | then throw() | |
782 | 909 | else { | |
783 | 910 | let cJ = cF() | |
784 | 911 | if (cJ._1) | |
785 | - | then (cL(cJ._2) ++ cM( | |
912 | + | then (cL(cJ._2) ++ cM(dd.caller, cz)) | |
786 | 913 | else { | |
787 | 914 | func cN (aO,aP) = { | |
788 | - | let | |
789 | - | let cQ = | |
790 | - | let aq = | |
791 | - | func | |
792 | - | then ( | |
793 | - | else | |
915 | + | let dU = aO | |
916 | + | let cQ = dU._1 | |
917 | + | let aq = dU._2 | |
918 | + | func dV (dW,cO) = if ((ck(cO.assetId) == aP)) | |
919 | + | then (dW + cO.amount) | |
920 | + | else dW | |
794 | 921 | ||
795 | - | let | |
922 | + | let dX = { | |
796 | 923 | let aQ = cz | |
797 | 924 | let aR = size(aQ) | |
798 | 925 | let aS = aY[aq] | |
799 | 926 | func aT (aU,aV) = if ((aV >= aR)) | |
800 | 927 | then aU | |
801 | - | else | |
928 | + | else dV(aU, aQ[aV]) | |
802 | 929 | ||
803 | 930 | func aW (aU,aV) = if ((aV >= aR)) | |
804 | 931 | then aU | |
806 | 933 | ||
807 | 934 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
808 | 935 | } | |
809 | - | $Tuple2((cQ :+ | |
936 | + | $Tuple2((cQ :+ dX), (aq + 1)) | |
810 | 937 | } | |
811 | 938 | ||
812 | - | let | |
939 | + | let dY = { | |
813 | 940 | let aQ = aj | |
814 | 941 | let aR = size(aQ) | |
815 | 942 | let aS = $Tuple2(nil, 0) | |
823 | 950 | ||
824 | 951 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
825 | 952 | } | |
826 | - | let cQ = | |
827 | - | let | |
953 | + | let cQ = dY._1 | |
954 | + | let dZ = dY._2 | |
828 | 955 | if (cP(cQ)) | |
829 | 956 | then throw() | |
830 | 957 | else { | |
832 | 959 | if (ax((bY > bX))) | |
833 | 960 | then throw("D1 > D0") | |
834 | 961 | else { | |
835 | - | let bU = az( | |
836 | - | func | |
837 | - | let | |
838 | - | let | |
839 | - | let | |
840 | - | let aq = | |
962 | + | let bU = az(dd.caller) | |
963 | + | func dj (aO,dW) = { | |
964 | + | let ea = aO | |
965 | + | let eb = ea._1 | |
966 | + | let dm = ea._2 | |
967 | + | let aq = ea._3 | |
841 | 968 | if ((ab > 0)) | |
842 | 969 | then { | |
843 | 970 | let bV = ((fraction(ad, bU, ac, CEILING) * ak) / (4 * (ak - 1))) | |
844 | - | let | |
845 | - | let | |
846 | - | let | |
847 | - | then ( | |
848 | - | else ( | |
849 | - | fraction(bV, | |
971 | + | let ec = { | |
972 | + | let ed = fraction(bY, aY[aq], bX) | |
973 | + | let ee = if ((ed > dW)) | |
974 | + | then (ed - dW) | |
975 | + | else (dW - ed) | |
976 | + | fraction(bV, ee, ac) | |
850 | 977 | } | |
851 | - | let | |
852 | - | let | |
853 | - | let | |
854 | - | let | |
855 | - | let | |
856 | - | let | |
857 | - | then co(( | |
858 | - | else cA( | |
859 | - | if (( | |
978 | + | let dx = fraction(ec, ae, ac) | |
979 | + | let ef = (dW - ec) | |
980 | + | let eg = (dW - ec) | |
981 | + | let eh = (dW - aY[aq]) | |
982 | + | let dE = (ec - dx) | |
983 | + | let ei = if ((eh > 0)) | |
984 | + | then co((eh - ec), aj[aq]) | |
985 | + | else cA(ec, aj[aq]) | |
986 | + | if ((ei == ei)) | |
860 | 987 | then { | |
861 | - | let | |
862 | - | then invoke(V, "airDrop", nil, [AttachedPayment(fromBase58String(aj[aq]), | |
988 | + | let dF = if ((dE > 0)) | |
989 | + | then invoke(V, "airDrop", nil, [AttachedPayment(fromBase58String(aj[aq]), dE)]) | |
863 | 990 | else 0 | |
864 | - | if (( | |
865 | - | then $Tuple3(( | |
991 | + | if ((dF == dF)) | |
992 | + | then $Tuple3((eb :+ eg), (dm ++ [ScriptTransfer(Q, dx, fromBase58String(aj[aq])), IntegerEntry((aj[aq] + i), ef)]), (aq + 1)) | |
866 | 993 | else throw("Strict value is not equal to itself.") | |
867 | 994 | } | |
868 | 995 | else throw("Strict value is not equal to itself.") | |
869 | 996 | } | |
870 | 997 | else { | |
871 | - | let | |
872 | - | if (( | |
873 | - | then $Tuple3(( | |
998 | + | let ei = co(dW, aj[aq]) | |
999 | + | if ((ei == ei)) | |
1000 | + | then $Tuple3((eb :+ dW), (dm :+ IntegerEntry((aj[aq] + i), dW)), (aq + 1)) | |
874 | 1001 | else throw("Strict value is not equal to itself.") | |
875 | 1002 | } | |
876 | 1003 | } | |
877 | 1004 | ||
878 | - | let | |
1005 | + | let ej = { | |
879 | 1006 | let aQ = cQ | |
880 | 1007 | let aR = size(aQ) | |
881 | 1008 | let aS = $Tuple3(nil, nil, 0) | |
882 | 1009 | func bn (aU,aV) = if ((aV >= aR)) | |
883 | 1010 | then aU | |
884 | - | else | |
1011 | + | else dj(aU, aQ[aV]) | |
885 | 1012 | ||
886 | 1013 | func bo (aU,aV) = if ((aV >= aR)) | |
887 | 1014 | then aU | |
889 | 1016 | ||
890 | 1017 | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
891 | 1018 | } | |
892 | - | let | |
893 | - | let | |
894 | - | let | |
895 | - | let | |
1019 | + | let eb = ej._1 | |
1020 | + | let dm = ej._2 | |
1021 | + | let ek = bs(eb, bc) | |
1022 | + | let el = if ((ab == 0)) | |
896 | 1023 | then bY | |
897 | - | else fraction(ab, ( | |
898 | - | if (ax(( | |
1024 | + | else fraction(ab, (ek - bX), bX) | |
1025 | + | if (ax((el >= dL))) | |
899 | 1026 | then throw("Slippage screwed you") | |
900 | - | else if ( | |
1027 | + | else if (dM) | |
901 | 1028 | then { | |
902 | - | let | |
903 | - | if (( | |
1029 | + | let em = invoke(this, "reissueShare", [el], nil) | |
1030 | + | if ((em == em)) | |
904 | 1031 | then { | |
905 | - | let | |
906 | - | if (( | |
907 | - | then ( | |
1032 | + | let en = invoke(U, "lockShareTokensFromPool", [dd.caller.bytes, toString(this), dN], ([AttachedPayment(aa, el)] ++ dP)) | |
1033 | + | if ((en == en)) | |
1034 | + | then (dm :+ IntegerEntry(n, (ab + el))) | |
908 | 1035 | else throw("Strict value is not equal to itself.") | |
909 | 1036 | } | |
910 | 1037 | else throw("Strict value is not equal to itself.") | |
911 | 1038 | } | |
912 | - | else ( | |
1039 | + | else (dm ++ [Reissue(aa, el, true), ScriptTransfer(dd.caller, el, aa), IntegerEntry(n, (ab + el))]) | |
913 | 1040 | } | |
914 | 1041 | } | |
915 | 1042 | } | |
918 | 1045 | ||
919 | 1046 | ||
920 | 1047 | ||
921 | - | @Callable( | |
1048 | + | @Callable(dd) | |
922 | 1049 | func calcMintAmount (cQ,aB) = { | |
923 | 1050 | let bc = aH() | |
924 | 1051 | let aY = aM() | |
928 | 1055 | else { | |
929 | 1056 | let bX = bs(aY, bc) | |
930 | 1057 | let bU = az(aB) | |
931 | - | func | |
932 | - | let | |
933 | - | let | |
934 | - | let aq = | |
1058 | + | func eo (aO,dW) = { | |
1059 | + | let ep = aO | |
1060 | + | let eb = ep._1 | |
1061 | + | let aq = ep._2 | |
935 | 1062 | let bV = ((fraction(ad, bU, ac, CEILING) * ak) / (4 * (ak - 1))) | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
939 | - | then ( | |
940 | - | else ( | |
941 | - | fraction(bV, | |
1063 | + | let ec = { | |
1064 | + | let ed = fraction(bY, aY[aq], bX) | |
1065 | + | let ee = if ((ed > dW)) | |
1066 | + | then (ed - dW) | |
1067 | + | else (dW - ed) | |
1068 | + | fraction(bV, ee, ac) | |
942 | 1069 | } | |
943 | - | let | |
944 | - | $Tuple2(( | |
1070 | + | let eg = (dW - ec) | |
1071 | + | $Tuple2((eb :+ eg), (aq + 1)) | |
945 | 1072 | } | |
946 | 1073 | ||
947 | - | let | |
1074 | + | let eq = { | |
948 | 1075 | let aQ = cQ | |
949 | 1076 | let aR = size(aQ) | |
950 | 1077 | let aS = $Tuple2(nil, 0) | |
951 | 1078 | func aT (aU,aV) = if ((aV >= aR)) | |
952 | 1079 | then aU | |
953 | - | else | |
1080 | + | else eo(aU, aQ[aV]) | |
954 | 1081 | ||
955 | 1082 | func aW (aU,aV) = if ((aV >= aR)) | |
956 | 1083 | then aU | |
958 | 1085 | ||
959 | 1086 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
960 | 1087 | } | |
961 | - | let | |
962 | - | let | |
963 | - | let | |
964 | - | let | |
965 | - | $Tuple2(nil, | |
1088 | + | let eb = eq._1 | |
1089 | + | let dZ = eq._2 | |
1090 | + | let ek = bs(eb, bc) | |
1091 | + | let er = fraction(ab, (ek - bX), bX) | |
1092 | + | $Tuple2(nil, er) | |
966 | 1093 | } | |
967 | 1094 | } | |
968 | 1095 | ||
969 | 1096 | ||
970 | 1097 | ||
971 | - | @Callable( | |
972 | - | func reissueShare (cq) = valueOrElse(ar( | |
1098 | + | @Callable(dd) | |
1099 | + | func reissueShare (cq) = valueOrElse(ar(dd), [Reissue(aa, cq, true)]) | |
973 | 1100 | ||
974 | 1101 | ||
975 | 1102 | ||
976 | - | @Callable( | |
977 | - | func getDy ( | |
1103 | + | @Callable(dd) | |
1104 | + | func getDy (es,et,eu,ev) = { | |
978 | 1105 | let aY = aM() | |
979 | - | let | |
980 | - | let | |
981 | - | let bw = (aY[ | |
982 | - | let bJ = bt( | |
983 | - | let cj = ((aY[ | |
984 | - | let bU = az(Address(fromBase58String( | |
1106 | + | let ew = valueOrErrorMessage(indexOf(aj, es), "unknown token in") | |
1107 | + | let ex = valueOrErrorMessage(indexOf(aj, et), "unknown token out") | |
1108 | + | let bw = (aY[ew] + eu) | |
1109 | + | let bJ = bt(ew, ex, bw, aY) | |
1110 | + | let cj = ((aY[ex] - bJ) - 1) | |
1111 | + | let bU = az(Address(fromBase58String(ev))) | |
985 | 1112 | let bV = fraction(fraction(ad, bU, ac, CEILING), cj, ac) | |
986 | 1113 | $Tuple2(nil, $Tuple2((cj - bV), bV)) | |
987 | 1114 | } | |
988 | 1115 | ||
989 | 1116 | ||
990 | 1117 | ||
991 | - | @Callable( | |
992 | - | func exchange ( | |
1118 | + | @Callable(dd) | |
1119 | + | func exchange (dr,ey) = valueOrElse(ao(), if ((size(dd.payments) != 1)) | |
993 | 1120 | then throw("size(payments) != 1") | |
994 | 1121 | else { | |
995 | 1122 | let cJ = cF() | |
996 | 1123 | if (cJ._1) | |
997 | - | then (cL(cJ._2) ++ cM( | |
1124 | + | then (cL(cJ._2) ++ cM(dd.caller, dd.payments)) | |
998 | 1125 | else { | |
999 | - | let cO = | |
1000 | - | let | |
1001 | - | let | |
1002 | - | let | |
1003 | - | let | |
1004 | - | let | |
1126 | + | let cO = dd.payments[0] | |
1127 | + | let ez = ck(cO.assetId) | |
1128 | + | let du = fromBase58String(dr) | |
1129 | + | let eu = cO.amount | |
1130 | + | let ew = valueOrErrorMessage(indexOf(aj, ez), "unknown token in") | |
1131 | + | let ex = valueOrErrorMessage(indexOf(aj, dr), "unknown token out") | |
1005 | 1132 | let aY = aM() | |
1006 | - | let bw = (aY[ | |
1007 | - | let bJ = bt( | |
1008 | - | let | |
1009 | - | let bU = az( | |
1010 | - | let bV = fraction( | |
1011 | - | let cj = ( | |
1012 | - | let | |
1013 | - | if (ax((cj >= | |
1133 | + | let bw = (aY[ew] + eu) | |
1134 | + | let bJ = bt(ew, ex, bw, aY) | |
1135 | + | let eA = ((aY[ex] - bJ) - 1) | |
1136 | + | let bU = az(dd.originCaller) | |
1137 | + | let bV = fraction(eA, fraction(ad, bU, ac, CEILING), ac) | |
1138 | + | let cj = (eA - bV) | |
1139 | + | let dx = fraction(bV, ae, ac) | |
1140 | + | if (ax((cj >= ey))) | |
1014 | 1141 | then throw("Exchange resulted in fewer coins than expected") | |
1015 | 1142 | else { | |
1016 | - | func | |
1017 | - | let | |
1018 | - | let cQ = | |
1019 | - | let aq = | |
1020 | - | if ((aq == | |
1021 | - | then $Tuple2((cQ :+ ( | |
1022 | - | else if ((aq == | |
1023 | - | then $Tuple2((cQ :+ ( | |
1024 | - | else $Tuple2((cQ :+ | |
1143 | + | func dz (aO,dA) = { | |
1144 | + | let eB = aO | |
1145 | + | let cQ = eB._1 | |
1146 | + | let aq = eB._2 | |
1147 | + | if ((aq == ew)) | |
1148 | + | then $Tuple2((cQ :+ (dA + eu)), (aq + 1)) | |
1149 | + | else if ((aq == ex)) | |
1150 | + | then $Tuple2((cQ :+ (dA - eA)), (aq + 1)) | |
1151 | + | else $Tuple2((cQ :+ dA), (aq + 1)) | |
1025 | 1152 | } | |
1026 | 1153 | ||
1027 | - | let | |
1154 | + | let eC = { | |
1028 | 1155 | let aQ = aY | |
1029 | 1156 | let aR = size(aQ) | |
1030 | 1157 | let aS = $Tuple2(nil, 0) | |
1031 | 1158 | func aT (aU,aV) = if ((aV >= aR)) | |
1032 | 1159 | then aU | |
1033 | - | else | |
1160 | + | else dz(aU, aQ[aV]) | |
1034 | 1161 | ||
1035 | 1162 | func aW (aU,aV) = if ((aV >= aR)) | |
1036 | 1163 | then aU | |
1038 | 1165 | ||
1039 | 1166 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1040 | 1167 | } | |
1041 | - | let cQ = | |
1042 | - | let aq = | |
1168 | + | let cQ = eC._1 | |
1169 | + | let aq = eC._2 | |
1043 | 1170 | if (cP(cQ)) | |
1044 | 1171 | then throw() | |
1045 | 1172 | else { | |
1046 | - | let | |
1047 | - | if (( | |
1173 | + | let en = co(cO.amount, ck(cO.assetId)) | |
1174 | + | if ((en == en)) | |
1048 | 1175 | then { | |
1049 | - | let | |
1050 | - | if (( | |
1176 | + | let do = cA(eA, dr) | |
1177 | + | if ((do == do)) | |
1051 | 1178 | then { | |
1052 | - | let | |
1053 | - | let | |
1054 | - | then invoke(V, "airDrop", nil, [AttachedPayment( | |
1179 | + | let dE = (bV - dx) | |
1180 | + | let dF = if ((dE > 0)) | |
1181 | + | then invoke(V, "airDrop", nil, [AttachedPayment(du, dE)]) | |
1055 | 1182 | else 0 | |
1056 | - | if (( | |
1057 | - | then $Tuple2([IntegerEntry(( | |
1183 | + | if ((dF == dF)) | |
1184 | + | then $Tuple2([IntegerEntry((ez + i), bw), IntegerEntry((dr + i), (aY[ex] - eA)), ScriptTransfer(dd.caller, cj, du), ScriptTransfer(Q, dx, du)], [cj, du]) | |
1058 | 1185 | else throw("Strict value is not equal to itself.") | |
1059 | 1186 | } | |
1060 | 1187 | else throw("Strict value is not equal to itself.") | |
1067 | 1194 | ||
1068 | 1195 | ||
1069 | 1196 | ||
1070 | - | @Callable(dc) | |
1071 | - | func withdraw (ek) = valueOrElse(ao(), if ((size(dc.payments) != 1)) | |
1072 | - | then throw("size(payments) != 1") | |
1197 | + | @Callable(dd) | |
1198 | + | func withdraw (de) = valueOrElse(ao(), dc(dd, de, 0)) | |
1199 | + | ||
1200 | + | ||
1201 | + | ||
1202 | + | @Callable(dd) | |
1203 | + | func withdrawWithUnlock (de,df) = valueOrElse(ao(), if ((0 >= df)) | |
1204 | + | then throw("Unlock amount must be positive") | |
1073 | 1205 | else { | |
1074 | - | let el = dc.payments[0].amount | |
1075 | - | let em = dc.payments[0].assetId | |
1076 | - | if ((aa != em)) | |
1077 | - | then throw("unknown payment token") | |
1078 | - | else { | |
1079 | - | let cJ = cF() | |
1080 | - | if (cJ._1) | |
1081 | - | then (cL(cJ._2) ++ cM(dc.originCaller, dc.payments)) | |
1082 | - | else { | |
1083 | - | func dx (aO,en) = { | |
1084 | - | let eo = aO | |
1085 | - | let dA = eo._1 | |
1086 | - | let aq = eo._2 | |
1087 | - | let ep = fraction(en, el, ab) | |
1088 | - | if (ax((ep >= ek[aq]))) | |
1089 | - | then throw("Withdrawal resulted in fewer coins than expected") | |
1090 | - | else { | |
1091 | - | let ej = cA(ep, aj[aq]) | |
1092 | - | if ((ej == ej)) | |
1093 | - | then $Tuple2((dA ++ [IntegerEntry((aj[aq] + i), (en - ep)), ScriptTransfer(dc.originCaller, ep, fromBase58String(aj[aq]))]), (aq + 1)) | |
1094 | - | else throw("Strict value is not equal to itself.") | |
1095 | - | } | |
1096 | - | } | |
1097 | - | ||
1098 | - | let eq = { | |
1099 | - | let aQ = aM() | |
1100 | - | let aR = size(aQ) | |
1101 | - | let aS = $Tuple2(nil, 0) | |
1102 | - | func aT (aU,aV) = if ((aV >= aR)) | |
1103 | - | then aU | |
1104 | - | else dx(aU, aQ[aV]) | |
1105 | - | ||
1106 | - | func aW (aU,aV) = if ((aV >= aR)) | |
1107 | - | then aU | |
1108 | - | else throw("List size exceeds 10") | |
1109 | - | ||
1110 | - | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1111 | - | } | |
1112 | - | let dA = eq._1 | |
1113 | - | let aq = eq._2 | |
1114 | - | (dA ++ [Burn(aa, el), IntegerEntry(n, (ab - el))]) | |
1115 | - | } | |
1116 | - | } | |
1206 | + | let eD = invoke(U, "withdrawShareTokensFromPool", [dd.caller.bytes, toString(this), df], nil) | |
1207 | + | if ((eD == eD)) | |
1208 | + | then dc(dd, de, df) | |
1209 | + | else throw("Strict value is not equal to itself.") | |
1117 | 1210 | }) | |
1118 | 1211 | ||
1119 | 1212 | ||
1120 | 1213 | ||
1121 | - | @Callable(dc) | |
1122 | - | func withdrawWithUnlock (ek,er) = valueOrElse(ao(), if ((0 >= er)) | |
1214 | + | @Callable(dd) | |
1215 | + | func calcWithdrawOneCoin (eE,dr,aB) = if ((0 >= eE)) | |
1216 | + | then throw("Amount must be positive") | |
1217 | + | else { | |
1218 | + | let aq = valueOrErrorMessage(indexOf(aj, dr), "unknown token out") | |
1219 | + | $Tuple2(nil, bR(aM(), eE, aq, Address(fromBase58String(aB)))._1) | |
1220 | + | } | |
1221 | + | ||
1222 | + | ||
1223 | + | ||
1224 | + | @Callable(dd) | |
1225 | + | func withdrawOneCoin (dr,ds) = valueOrElse(ao(), dq(dd, dr, ds, 0)) | |
1226 | + | ||
1227 | + | ||
1228 | + | ||
1229 | + | @Callable(dd) | |
1230 | + | func withdrawOneCoinWithUnlock (dr,ds,df) = valueOrElse(ao(), if ((0 >= df)) | |
1123 | 1231 | then throw("Unlock amount must be positive") | |
1124 | 1232 | else { | |
1125 | - | let cJ = cF() | |
1126 | - | if (cJ._1) | |
1127 | - | then (cL(cJ._2) ++ cM(dc.caller, dc.payments)) | |
1128 | - | else { | |
1129 | - | let el = if ((size(dc.payments) > 0)) | |
1130 | - | then if ((size(dc.payments) != 1)) | |
1131 | - | then throw("size(payments) != 1") | |
1132 | - | else { | |
1133 | - | let em = dc.payments[0].assetId | |
1134 | - | if ((aa != em)) | |
1135 | - | then throw("unknown payment token") | |
1136 | - | else dc.payments[0].amount | |
1137 | - | } | |
1138 | - | else 0 | |
1139 | - | let es = invoke(U, "withdrawShareTokensFromPool", [dc.caller.bytes, toString(this), er], nil) | |
1140 | - | if ((es == es)) | |
1141 | - | then { | |
1142 | - | let et = (el + er) | |
1143 | - | let dJ = invoke(this, "withdraw", [ek], [AttachedPayment(aa, et)]) | |
1144 | - | if ((dJ == dJ)) | |
1145 | - | then nil | |
1146 | - | else throw("Strict value is not equal to itself.") | |
1147 | - | } | |
1148 | - | else throw("Strict value is not equal to itself.") | |
1149 | - | } | |
1233 | + | let eD = invoke(U, "withdrawShareTokensFromPool", [dd.caller.bytes, toString(this), df], nil) | |
1234 | + | if ((eD == eD)) | |
1235 | + | then dq(dd, dr, ds, df) | |
1236 | + | else throw("Strict value is not equal to itself.") | |
1150 | 1237 | }) | |
1151 | 1238 | ||
1152 | 1239 | ||
1153 | 1240 | ||
1154 | - | @Callable(dc) | |
1155 | - | func calcWithdrawOneCoin (eu,ea,aB) = if ((0 >= eu)) | |
1156 | - | then throw("Amount must be positive") | |
1157 | - | else { | |
1158 | - | let aq = valueOrErrorMessage(indexOf(aj, ea), "unknown token out") | |
1159 | - | $Tuple2(nil, bR(aM(), eu, aq, Address(fromBase58String(aB)))._1) | |
1160 | - | } | |
1161 | - | ||
1162 | - | ||
1163 | - | ||
1164 | - | @Callable(dc) | |
1165 | - | func withdrawOneCoin (ea,ev) = valueOrElse(ao(), if ((size(dc.payments) != 1)) | |
1166 | - | then throw("size(payments) != 1") | |
1167 | - | else { | |
1168 | - | let cJ = cF() | |
1169 | - | if (cJ._1) | |
1170 | - | then (cL(cJ._2) ++ cM(dc.originCaller, dc.payments)) | |
1171 | - | else { | |
1172 | - | let el = dc.payments[0].amount | |
1173 | - | let em = dc.payments[0].assetId | |
1174 | - | if ((em != aa)) | |
1175 | - | then throw("unknown token") | |
1176 | - | else { | |
1177 | - | let ew = valueOrErrorMessage(indexOf(aj, ea), "unknown token out") | |
1178 | - | let ed = fromBase58String(ea) | |
1179 | - | let aY = aM() | |
1180 | - | let ex = bR(aY, el, ew, dc.originCaller) | |
1181 | - | let cj = ex._1 | |
1182 | - | let ey = ex._2 | |
1183 | - | if (ax((cj >= ev))) | |
1184 | - | then throw("Not enough coins removed") | |
1185 | - | else { | |
1186 | - | let dE = fraction(ey, ae, ac) | |
1187 | - | let ez = (cj + ey) | |
1188 | - | func ef (aO,eg) = { | |
1189 | - | let eA = aO | |
1190 | - | let cQ = eA._1 | |
1191 | - | let aq = eA._2 | |
1192 | - | if ((aq == ew)) | |
1193 | - | then $Tuple2((cQ :+ (eg - ez)), (aq + 1)) | |
1194 | - | else $Tuple2((cQ :+ eg), (aq + 1)) | |
1195 | - | } | |
1196 | - | ||
1197 | - | let eB = { | |
1198 | - | let aQ = aY | |
1199 | - | let aR = size(aQ) | |
1200 | - | let aS = $Tuple2(nil, 0) | |
1201 | - | func aT (aU,aV) = if ((aV >= aR)) | |
1202 | - | then aU | |
1203 | - | else ef(aU, aQ[aV]) | |
1204 | - | ||
1205 | - | func aW (aU,aV) = if ((aV >= aR)) | |
1206 | - | then aU | |
1207 | - | else throw("List size exceeds 10") | |
1208 | - | ||
1209 | - | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1210 | - | } | |
1211 | - | let cQ = eB._1 | |
1212 | - | let eC = eB._2 | |
1213 | - | if (cP(cQ)) | |
1214 | - | then throw() | |
1215 | - | else { | |
1216 | - | let ej = cA(ez, ea) | |
1217 | - | if ((ej == ej)) | |
1218 | - | then { | |
1219 | - | let dI = (ey - dE) | |
1220 | - | let dK = if ((dI > 0)) | |
1221 | - | then invoke(V, "airDrop", nil, [AttachedPayment(ed, dI)]) | |
1222 | - | else 0 | |
1223 | - | if ((dK == dK)) | |
1224 | - | then [ScriptTransfer(dc.originCaller, cj, ed), IntegerEntry((aj[ew] + i), (aY[ew] - ez)), Burn(aa, el), ScriptTransfer(Q, dE, ed), IntegerEntry(n, (ab - el))] | |
1225 | - | else throw("Strict value is not equal to itself.") | |
1226 | - | } | |
1227 | - | else throw("Strict value is not equal to itself.") | |
1228 | - | } | |
1229 | - | } | |
1230 | - | } | |
1231 | - | } | |
1232 | - | }) | |
1233 | - | ||
1234 | - | ||
1235 | - | ||
1236 | - | @Callable(dc) | |
1237 | - | func withdrawOneCoinWithUnlock (ea,ev,er) = valueOrElse(ao(), if ((0 >= er)) | |
1238 | - | then throw("Unlock amount must be positive") | |
1239 | - | else { | |
1240 | - | let cJ = cF() | |
1241 | - | if (cJ._1) | |
1242 | - | then (cL(cJ._2) ++ cM(dc.caller, dc.payments)) | |
1243 | - | else { | |
1244 | - | let el = if ((size(dc.payments) > 0)) | |
1245 | - | then if ((size(dc.payments) != 1)) | |
1246 | - | then throw("size(payments) != 1") | |
1247 | - | else { | |
1248 | - | let em = dc.payments[0].assetId | |
1249 | - | if ((aa != em)) | |
1250 | - | then throw("unknown payment token") | |
1251 | - | else dc.payments[0].amount | |
1252 | - | } | |
1253 | - | else 0 | |
1254 | - | let es = invoke(U, "withdrawShareTokensFromPool", [dc.caller.bytes, toString(this), er], nil) | |
1255 | - | if ((es == es)) | |
1256 | - | then { | |
1257 | - | let et = (el + er) | |
1258 | - | let dJ = invoke(this, "withdrawOneCoin", [ea, ev], [AttachedPayment(aa, et)]) | |
1259 | - | if ((dJ == dJ)) | |
1260 | - | then nil | |
1261 | - | else throw("Strict value is not equal to itself.") | |
1262 | - | } | |
1263 | - | else throw("Strict value is not equal to itself.") | |
1264 | - | } | |
1265 | - | }) | |
1266 | - | ||
1267 | - | ||
1268 | - | ||
1269 | - | @Callable(dc) | |
1241 | + | @Callable(dd) | |
1270 | 1242 | func A () = $Tuple2(nil, aH()) | |
1271 | 1243 | ||
1272 | 1244 | ||
1273 | 1245 | ||
1274 | - | @Callable( | |
1246 | + | @Callable(dd) | |
1275 | 1247 | func getVirtualPrice () = { | |
1276 | 1248 | let bp = bb(aM(), aH()) | |
1277 | 1249 | $Tuple2(nil, fraction(bp, a, ab)) | |
1279 | 1251 | ||
1280 | 1252 | ||
1281 | 1253 | ||
1282 | - | @Callable( | |
1283 | - | func calcTokenAmount ( | |
1254 | + | @Callable(dd) | |
1255 | + | func calcTokenAmount (eF,eG) = { | |
1284 | 1256 | let bc = aH() | |
1285 | - | let | |
1286 | - | let bX = bs( | |
1287 | - | func | |
1288 | - | let | |
1289 | - | let cQ = | |
1290 | - | let aq = | |
1291 | - | let | |
1292 | - | then | |
1293 | - | else -( | |
1294 | - | $Tuple2((cQ :+ | |
1257 | + | let eH = aM() | |
1258 | + | let bX = bs(eH, bc) | |
1259 | + | func eI (aO,dk) = { | |
1260 | + | let eJ = aO | |
1261 | + | let cQ = eJ._1 | |
1262 | + | let aq = eJ._2 | |
1263 | + | let dW = (dk + (if (eG) | |
1264 | + | then eF[aq] | |
1265 | + | else -(eF[aq]))) | |
1266 | + | $Tuple2((cQ :+ dW), (aq + 1)) | |
1295 | 1267 | } | |
1296 | 1268 | ||
1297 | - | let cQ = ( let aQ = | |
1269 | + | let cQ = ( let aQ = eH | |
1298 | 1270 | let aR = size(aQ) | |
1299 | 1271 | let aS = $Tuple2(nil, 0) | |
1300 | 1272 | func aT (aU,aV) = if ((aV >= aR)) | |
1301 | 1273 | then aU | |
1302 | - | else | |
1274 | + | else eI(aU, aQ[aV]) | |
1303 | 1275 | ||
1304 | 1276 | func aW (aU,aV) = if ((aV >= aR)) | |
1305 | 1277 | then aU | |
1307 | 1279 | ||
1308 | 1280 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10))._1 | |
1309 | 1281 | let bY = bs(cQ, bc) | |
1310 | - | let | |
1282 | + | let eK = if (eG) | |
1311 | 1283 | then (bY - bX) | |
1312 | 1284 | else (bX - bY) | |
1313 | - | $Tuple2(nil, fraction( | |
1285 | + | $Tuple2(nil, fraction(eK, ab, bX)) | |
1314 | 1286 | } | |
1315 | 1287 | ||
1316 | 1288 | ||
1317 | 1289 | ||
1318 | - | @Callable( | |
1319 | - | func rampA ( | |
1290 | + | @Callable(dd) | |
1291 | + | func rampA (eL,eM) = valueOrElse(ao(), valueOrElse(ap(dd), if (ax((aw >= (ah + e)))) | |
1320 | 1292 | then throw("too often") | |
1321 | - | else if (ax(( | |
1293 | + | else if (ax((eM >= (aw + e)))) | |
1322 | 1294 | then throw("insufficient time") | |
1323 | 1295 | else { | |
1324 | - | let | |
1325 | - | if (ax(if (( | |
1326 | - | then (b > | |
1296 | + | let eN = aH() | |
1297 | + | if (ax(if ((eL > 0)) | |
1298 | + | then (b > eL) | |
1327 | 1299 | else false)) | |
1328 | 1300 | then throw("out of base range") | |
1329 | - | else if (ax(if (if (( | |
1330 | - | then (( | |
1301 | + | else if (ax(if (if ((eL >= eN)) | |
1302 | + | then ((eN * c) >= eL) | |
1331 | 1303 | else false) | |
1332 | 1304 | then true | |
1333 | - | else if (( | |
1334 | - | then (( | |
1305 | + | else if ((eN > eL)) | |
1306 | + | then ((eL * c) >= eN) | |
1335 | 1307 | else false)) | |
1336 | 1308 | then throw("out of range") | |
1337 | - | else [IntegerEntry("initial_A", | |
1309 | + | else [IntegerEntry("initial_A", eN), IntegerEntry("future_A", eL), IntegerEntry("initial_A_time", aw), IntegerEntry("future_A_time", eM)] | |
1338 | 1310 | })) | |
1339 | 1311 | ||
1340 | 1312 | ||
1341 | 1313 | ||
1342 | - | @Callable( | |
1343 | - | func stopRampA () = valueOrElse(ao(), valueOrElse(ap( | |
1344 | - | let | |
1345 | - | [IntegerEntry("initial_A", | |
1314 | + | @Callable(dd) | |
1315 | + | func stopRampA () = valueOrElse(ao(), valueOrElse(ap(dd), { | |
1316 | + | let eO = aH() | |
1317 | + | [IntegerEntry("initial_A", eO), IntegerEntry("future_A", eO), IntegerEntry("initial_A_time", aw), IntegerEntry("future_A_time", aw)] | |
1346 | 1318 | })) | |
1347 | 1319 | ||
1348 | 1320 | ||
1349 | 1321 | ||
1350 | - | @Callable( | |
1351 | - | func shutdown () = valueOrElse(ap( | |
1322 | + | @Callable(dd) | |
1323 | + | func shutdown () = valueOrElse(ap(dd), if (!(Y)) | |
1352 | 1324 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, l), "the cause wasn't specified"))) | |
1353 | 1325 | else al("Paused by admin")) | |
1354 | 1326 | ||
1355 | 1327 | ||
1356 | 1328 | ||
1357 | - | @Callable( | |
1358 | - | func activate () = valueOrElse(ap( | |
1329 | + | @Callable(dd) | |
1330 | + | func activate () = valueOrElse(ap(dd), if (Y) | |
1359 | 1331 | then an() | |
1360 | 1332 | else [BooleanEntry(j, true), DeleteEntry(l)]) | |
1361 | 1333 | ||
1362 | 1334 | ||
1363 | 1335 | ||
1364 | - | @Callable( | |
1365 | - | func takeIntoAccountExtraFunds () = valueOrElse(ao(), if (( | |
1336 | + | @Callable(dd) | |
1337 | + | func takeIntoAccountExtraFunds () = valueOrElse(ao(), if ((dd.caller != Q)) | |
1366 | 1338 | then throw("Only the wallet can call this function") | |
1367 | 1339 | else { | |
1368 | - | let | |
1369 | - | func | |
1370 | - | let | |
1371 | - | let | |
1372 | - | let aq = | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | if ((0 > | |
1340 | + | let eH = aM() | |
1341 | + | func eP (aO,aP) = { | |
1342 | + | let eQ = aO | |
1343 | + | let eR = eQ._1 | |
1344 | + | let aq = eQ._2 | |
1345 | + | let eS = fromBase58String(aP) | |
1346 | + | let eT = (assetBalance(this, eS) + cC(eS)) | |
1347 | + | let eU = (eT - eH[aq]) | |
1348 | + | if ((0 > eU)) | |
1377 | 1349 | then al(("Enroll amount negative for asset" + aP)) | |
1378 | 1350 | else { | |
1379 | - | let | |
1380 | - | then invoke(V, "airDrop", nil, [AttachedPayment( | |
1351 | + | let dF = if ((eU > 0)) | |
1352 | + | then invoke(V, "airDrop", nil, [AttachedPayment(eS, eU)]) | |
1381 | 1353 | else 0 | |
1382 | - | if (( | |
1383 | - | then $Tuple2(( | |
1354 | + | if ((dF == dF)) | |
1355 | + | then $Tuple2((eR + eU), (aq + 1)) | |
1384 | 1356 | else throw("Strict value is not equal to itself.") | |
1385 | 1357 | } | |
1386 | 1358 | } | |
1387 | 1359 | ||
1388 | - | let | |
1360 | + | let dZ = { | |
1389 | 1361 | let aQ = aj | |
1390 | 1362 | let aR = size(aQ) | |
1391 | 1363 | let aS = $Tuple2(0, 0) | |
1392 | 1364 | func aT (aU,aV) = if ((aV >= aR)) | |
1393 | 1365 | then aU | |
1394 | - | else | |
1366 | + | else eP(aU, aQ[aV]) | |
1395 | 1367 | ||
1396 | 1368 | func aW (aU,aV) = if ((aV >= aR)) | |
1397 | 1369 | then aU | |
1399 | 1371 | ||
1400 | 1372 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1401 | 1373 | } | |
1402 | - | if (( | |
1374 | + | if ((dZ._1 == 0)) | |
1403 | 1375 | then throw("No money to take") | |
1404 | 1376 | else nil | |
1405 | 1377 | }) | |
1406 | 1378 | ||
1407 | 1379 | ||
1408 | - | @Verifier( | |
1409 | - | func | |
1410 | - | let | |
1411 | - | let | |
1380 | + | @Verifier(eV) | |
1381 | + | func eW () = { | |
1382 | + | let eX = { | |
1383 | + | let eY = if (sigVerify(eV.bodyBytes, eV.proofs[0], M)) | |
1412 | 1384 | then 1 | |
1413 | 1385 | else 0 | |
1414 | - | let | |
1386 | + | let eZ = if (sigVerify(eV.bodyBytes, eV.proofs[1], N)) | |
1415 | 1387 | then 1 | |
1416 | 1388 | else 0 | |
1417 | - | let | |
1389 | + | let fa = if (sigVerify(eV.bodyBytes, eV.proofs[2], O)) | |
1418 | 1390 | then 1 | |
1419 | 1391 | else 0 | |
1420 | - | ((( | |
1392 | + | (((eY + eZ) + fa) >= 2) | |
1421 | 1393 | } | |
1422 | - | let J = | |
1394 | + | let J = eV | |
1423 | 1395 | if ($isInstanceOf(J, "InvokeScriptTransaction")) | |
1424 | 1396 | then { | |
1425 | - | let | |
1426 | - | let | |
1427 | - | then ( | |
1397 | + | let ei = J | |
1398 | + | let fb = if ((ei.dApp == this)) | |
1399 | + | then (ei.function == "takeIntoAccountExtraFunds") | |
1428 | 1400 | else false | |
1429 | - | let | |
1401 | + | let fc = if (if (if (sigVerify(eV.bodyBytes, eV.proofs[0], M)) | |
1430 | 1402 | then true | |
1431 | - | else sigVerify( | |
1403 | + | else sigVerify(eV.bodyBytes, eV.proofs[0], N)) | |
1432 | 1404 | then true | |
1433 | - | else sigVerify( | |
1405 | + | else sigVerify(eV.bodyBytes, eV.proofs[0], O)) | |
1434 | 1406 | then true | |
1435 | - | else sigVerify( | |
1436 | - | if (if ( | |
1437 | - | then | |
1407 | + | else sigVerify(eV.bodyBytes, eV.proofs[0], P) | |
1408 | + | if (if (fb) | |
1409 | + | then fc | |
1438 | 1410 | else false) | |
1439 | 1411 | then true | |
1440 | - | else | |
1412 | + | else eX | |
1441 | 1413 | } | |
1442 | - | else | |
1414 | + | else eX | |
1443 | 1415 | } | |
1444 | 1416 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1000000 | |
5 | 5 | ||
6 | 6 | let b = 1000000 | |
7 | 7 | ||
8 | 8 | let c = 10 | |
9 | 9 | ||
10 | 10 | let d = 6 | |
11 | 11 | ||
12 | 12 | let e = (86400 / 60) | |
13 | 13 | ||
14 | 14 | let f = "3.0.0" | |
15 | 15 | ||
16 | 16 | let g = "version" | |
17 | 17 | ||
18 | 18 | let h = "asset_ids" | |
19 | 19 | ||
20 | 20 | let i = "_balance" | |
21 | 21 | ||
22 | 22 | let j = "active" | |
23 | 23 | ||
24 | 24 | let k = "active_all_contracts" | |
25 | 25 | ||
26 | 26 | let l = "shutdown_cause" | |
27 | 27 | ||
28 | 28 | let m = "share_asset_id" | |
29 | 29 | ||
30 | 30 | let n = "share_asset_supply" | |
31 | 31 | ||
32 | 32 | let o = "commission" | |
33 | 33 | ||
34 | 34 | let p = "dAppThresholdCoef" | |
35 | 35 | ||
36 | 36 | let q = "staking_usdnnsbt_address" | |
37 | 37 | ||
38 | 38 | let r = "discounts" | |
39 | 39 | ||
40 | 40 | let s = "discount_values" | |
41 | 41 | ||
42 | 42 | let t = "_SWOP_amount" | |
43 | 43 | ||
44 | 44 | let u = "_GSwop_amount" | |
45 | 45 | ||
46 | 46 | let v = "admin_pub_1" | |
47 | 47 | ||
48 | 48 | let w = "admin_pub_2" | |
49 | 49 | ||
50 | 50 | let x = "admin_pub_3" | |
51 | 51 | ||
52 | 52 | let y = "admin_invoke_pub" | |
53 | 53 | ||
54 | 54 | let z = "money_box_address" | |
55 | 55 | ||
56 | 56 | let B = "governance_address" | |
57 | 57 | ||
58 | 58 | let C = "voting_address" | |
59 | 59 | ||
60 | 60 | let E = "farming_address" | |
61 | 61 | ||
62 | 62 | let F = "lp_farming" | |
63 | 63 | ||
64 | 64 | let G = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
65 | 65 | ||
66 | 66 | func H (I) = { | |
67 | 67 | let J = getString(G, I) | |
68 | 68 | if ($isInstanceOf(J, "String")) | |
69 | 69 | then { | |
70 | 70 | let K = J | |
71 | 71 | fromBase58String(K) | |
72 | 72 | } | |
73 | 73 | else { | |
74 | 74 | let L = J | |
75 | 75 | throw((I + "is empty")) | |
76 | 76 | } | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | let M = H(v) | |
81 | 81 | ||
82 | 82 | let N = H(w) | |
83 | 83 | ||
84 | 84 | let O = H(x) | |
85 | 85 | ||
86 | 86 | let P = H(y) | |
87 | 87 | ||
88 | 88 | let Q = Address(H(z)) | |
89 | 89 | ||
90 | 90 | let R = Address(H(B)) | |
91 | 91 | ||
92 | 92 | let S = Address(H(q)) | |
93 | 93 | ||
94 | 94 | let T = Address(H(C)) | |
95 | 95 | ||
96 | 96 | let U = Address(H(E)) | |
97 | 97 | ||
98 | 98 | let V = Address(H(F)) | |
99 | 99 | ||
100 | - | let W = base58' | |
100 | + | let W = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
101 | 101 | ||
102 | 102 | let X = [toBase58String(W)] | |
103 | 103 | ||
104 | 104 | let Y = getBooleanValue(this, j) | |
105 | 105 | ||
106 | 106 | let Z = valueOrElse(getBoolean(G, k), true) | |
107 | 107 | ||
108 | 108 | let aa = fromBase58String(getStringValue(this, m)) | |
109 | 109 | ||
110 | 110 | let ab = getIntegerValue(this, n) | |
111 | 111 | ||
112 | 112 | let ac = 1000000 | |
113 | 113 | ||
114 | 114 | let ad = getIntegerValue(this, o) | |
115 | 115 | ||
116 | 116 | let ae = fraction(40, ac, 100) | |
117 | 117 | ||
118 | 118 | let af = getIntegerValue(this, "initial_A") | |
119 | 119 | ||
120 | 120 | let ag = getIntegerValue(this, "future_A") | |
121 | 121 | ||
122 | 122 | let ah = valueOrElse(getInteger(this, "initial_A_time"), 0) | |
123 | 123 | ||
124 | 124 | let ai = valueOrElse(getInteger(this, "future_A_time"), 0) | |
125 | 125 | ||
126 | 126 | let aj = split(getStringValue(this, h), ",") | |
127 | 127 | ||
128 | 128 | let ak = size(aj) | |
129 | 129 | ||
130 | 130 | func al (am) = [BooleanEntry(j, false), StringEntry(l, am)] | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func an () = throw("DApp is already active") | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func ao () = if (if (Y) | |
137 | 137 | then Z | |
138 | 138 | else false) | |
139 | 139 | then unit | |
140 | 140 | else throw("DApp is inactive at this moment") | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func ap (aq) = if (containsElement([M, N, O], aq.callerPublicKey)) | |
144 | 144 | then unit | |
145 | 145 | else throw("Only admin can call this function") | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func ar (aq) = if ((this == aq.caller)) | |
149 | 149 | then unit | |
150 | 150 | else throw("Only contract itself can call this function") | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | let as = toBigInt(2) | |
154 | 154 | ||
155 | 155 | let at = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
156 | 156 | ||
157 | 157 | let au = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
158 | 158 | ||
159 | 159 | let av = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
160 | 160 | ||
161 | 161 | let aw = height | |
162 | 162 | ||
163 | 163 | func ax (ay) = if (ay) | |
164 | 164 | then false | |
165 | 165 | else true | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func az (aA) = { | |
169 | 169 | let aB = { | |
170 | 170 | let J = aA | |
171 | 171 | if ($isInstanceOf(J, "Address")) | |
172 | 172 | then { | |
173 | 173 | let aC = J | |
174 | 174 | toString(aC) | |
175 | 175 | } | |
176 | 176 | else if ($isInstanceOf(J, "String")) | |
177 | 177 | then { | |
178 | 178 | let aC = J | |
179 | 179 | aC | |
180 | 180 | } | |
181 | 181 | else throw("Unknow type of user Addr") | |
182 | 182 | } | |
183 | 183 | let aD = valueOrElse(getInteger(R, (aB + u)), 0) | |
184 | 184 | let aE = valueOrElse(getInteger(R, (aB + u)), aD) | |
185 | 185 | let aF = split(getStringValue(G, s), ",") | |
186 | 186 | let aG = split(getStringValue(G, r), ",") | |
187 | 187 | if (if ((aE >= parseIntValue(aF[0]))) | |
188 | 188 | then (parseIntValue(aF[1]) > aE) | |
189 | 189 | else false) | |
190 | 190 | then (ac - parseIntValue(aG[0])) | |
191 | 191 | else if (if ((aE >= parseIntValue(aF[1]))) | |
192 | 192 | then (parseIntValue(aF[2]) > aE) | |
193 | 193 | else false) | |
194 | 194 | then (ac - parseIntValue(aG[1])) | |
195 | 195 | else if (if ((aE >= parseIntValue(aF[2]))) | |
196 | 196 | then (parseIntValue(aF[3]) > aE) | |
197 | 197 | else false) | |
198 | 198 | then (ac - parseIntValue(aG[2])) | |
199 | 199 | else if (if ((aE >= parseIntValue(aF[3]))) | |
200 | 200 | then (parseIntValue(aF[4]) > aE) | |
201 | 201 | else false) | |
202 | 202 | then (ac - parseIntValue(aG[3])) | |
203 | 203 | else if ((aE >= parseIntValue(aF[4]))) | |
204 | 204 | then (ac - parseIntValue(aG[4])) | |
205 | 205 | else ac | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | func aH () = { | |
210 | 210 | let aI = ai | |
211 | 211 | let aJ = ag | |
212 | 212 | if ((aI > aw)) | |
213 | 213 | then { | |
214 | 214 | let aK = af | |
215 | 215 | let aL = ah | |
216 | 216 | if ((aJ > aK)) | |
217 | 217 | then (aK + (((aJ - aK) * (aw - aL)) / (aI - aL))) | |
218 | 218 | else (aK - (((aK - aJ) * (aw - aL)) / (aI - aL))) | |
219 | 219 | } | |
220 | 220 | else aJ | |
221 | 221 | } | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func aM () = { | |
225 | 225 | func aN (aO,aP) = (aO :+ valueOrElse(getInteger(this, (aP + i)), 0)) | |
226 | 226 | ||
227 | 227 | let aQ = aj | |
228 | 228 | let aR = size(aQ) | |
229 | 229 | let aS = nil | |
230 | 230 | func aT (aU,aV) = if ((aV >= aR)) | |
231 | 231 | then aU | |
232 | 232 | else aN(aU, aQ[aV]) | |
233 | 233 | ||
234 | 234 | func aW (aU,aV) = if ((aV >= aR)) | |
235 | 235 | then aU | |
236 | 236 | else throw("List size exceeds 10") | |
237 | 237 | ||
238 | 238 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | func aX (aY) = aY | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | func aZ (aO,ba) = (aO + ba) | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | func bb (aY,bc) = { | |
249 | 249 | let bd = invoke(this, "D", [aY, bc], nil) | |
250 | 250 | if ($isInstanceOf(bd, "Int")) | |
251 | 251 | then bd | |
252 | 252 | else throw(($getType(bd) + " couldn't be cast to Int")) | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | func be (aY,bc) = { | |
257 | 257 | let bf = { | |
258 | 258 | let aQ = aY | |
259 | 259 | let aR = size(aQ) | |
260 | 260 | let aS = 0 | |
261 | 261 | func aT (aU,aV) = if ((aV >= aR)) | |
262 | 262 | then aU | |
263 | 263 | else aZ(aU, aQ[aV]) | |
264 | 264 | ||
265 | 265 | func aW (aU,aV) = if ((aV >= aR)) | |
266 | 266 | then aU | |
267 | 267 | else throw("List size exceeds 10") | |
268 | 268 | ||
269 | 269 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
270 | 270 | } | |
271 | 271 | if ((bf == 0)) | |
272 | 272 | then 0 | |
273 | 273 | else { | |
274 | 274 | let bg = (bc * ak) | |
275 | 275 | let bh = (toBigInt(bg) * toBigInt(bf)) | |
276 | 276 | let bi = toBigInt((bg - 1)) | |
277 | 277 | func bj (aO,aq) = if ((aO._2 == true)) | |
278 | 278 | then aO | |
279 | 279 | else { | |
280 | 280 | let bk = aO._1 | |
281 | 281 | func bl (bm,aq) = if ((ak > aq)) | |
282 | 282 | then ((bm * bk) / (toBigInt(aY[aq]) * toBigInt(ak))) | |
283 | 283 | else bm | |
284 | 284 | ||
285 | 285 | let bm = { | |
286 | 286 | let aQ = at | |
287 | 287 | let aR = size(aQ) | |
288 | 288 | let aS = bk | |
289 | 289 | func bn (aU,aV) = if ((aV >= aR)) | |
290 | 290 | then aU | |
291 | 291 | else bl(aU, aQ[aV]) | |
292 | 292 | ||
293 | 293 | func bo (aU,aV) = if ((aV >= aR)) | |
294 | 294 | then aU | |
295 | 295 | else throw("List size exceeds 10") | |
296 | 296 | ||
297 | 297 | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
298 | 298 | } | |
299 | 299 | let bp = fraction((bh + (toBigInt(ak) * bm)), bk, ((bi * bk) + (toBigInt((ak + 1)) * bm))) | |
300 | 300 | if ((bp > bk)) | |
301 | 301 | then if ((1 >= toInt((bp - bk)))) | |
302 | 302 | then $Tuple2(bp, true) | |
303 | 303 | else $Tuple2(bp, false) | |
304 | 304 | else if ((1 >= toInt((bk - bp)))) | |
305 | 305 | then $Tuple2(bp, true) | |
306 | 306 | else $Tuple2(bp, false) | |
307 | 307 | } | |
308 | 308 | ||
309 | 309 | let bq = { | |
310 | 310 | let aQ = au | |
311 | 311 | let aR = size(aQ) | |
312 | 312 | let aS = $Tuple2(toBigInt(bf), false) | |
313 | 313 | func bn (aU,aV) = if ((aV >= aR)) | |
314 | 314 | then aU | |
315 | 315 | else bj(aU, aQ[aV]) | |
316 | 316 | ||
317 | 317 | func bo (aU,aV) = if ((aV >= aR)) | |
318 | 318 | then aU | |
319 | 319 | else throw("List size exceeds 15") | |
320 | 320 | ||
321 | 321 | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
322 | 322 | } | |
323 | 323 | let bp = bq._1 | |
324 | 324 | let br = bq._2 | |
325 | 325 | if ((br == false)) | |
326 | 326 | then throw(("get_D() not finished with " + toString(bp))) | |
327 | 327 | else toInt(bp) | |
328 | 328 | } | |
329 | 329 | } | |
330 | 330 | ||
331 | 331 | ||
332 | 332 | func bs (aY,bc) = bb(aX(aY), bc) | |
333 | 333 | ||
334 | 334 | ||
335 | 335 | func bt (bu,bv,bw,bx) = if (ax((bu != bv))) | |
336 | 336 | then throw("same coin") | |
337 | 337 | else if (ax(if ((bv >= 0)) | |
338 | 338 | then (bu >= 0) | |
339 | 339 | else false)) | |
340 | 340 | then throw("below zero") | |
341 | 341 | else if (ax(if ((ak > bv)) | |
342 | 342 | then (ak > bu) | |
343 | 343 | else false)) | |
344 | 344 | then throw("above N_COINS") | |
345 | 345 | else { | |
346 | 346 | let bc = aH() | |
347 | 347 | let bp = bb(bx, bc) | |
348 | 348 | let bg = (bc * ak) | |
349 | 349 | func by (aO,aq) = { | |
350 | 350 | let bz = aO | |
351 | 351 | let bA = bz._1 | |
352 | 352 | let bB = bz._2 | |
353 | 353 | let bC = if ((bu == aq)) | |
354 | 354 | then bw | |
355 | 355 | else bx[aq] | |
356 | 356 | if (if ((aq != bv)) | |
357 | 357 | then (ak > aq) | |
358 | 358 | else false) | |
359 | 359 | then $Tuple2((bA + bC), fraction(bB, toBigInt(bp), toBigInt((bC * ak)))) | |
360 | 360 | else $Tuple2(bA, bB) | |
361 | 361 | } | |
362 | 362 | ||
363 | 363 | let bD = { | |
364 | 364 | let aQ = at | |
365 | 365 | let aR = size(aQ) | |
366 | 366 | let aS = $Tuple2(0, toBigInt(bp)) | |
367 | 367 | func aT (aU,aV) = if ((aV >= aR)) | |
368 | 368 | then aU | |
369 | 369 | else by(aU, aQ[aV]) | |
370 | 370 | ||
371 | 371 | func aW (aU,aV) = if ((aV >= aR)) | |
372 | 372 | then aU | |
373 | 373 | else throw("List size exceeds 10") | |
374 | 374 | ||
375 | 375 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
376 | 376 | } | |
377 | 377 | let bA = bD._1 | |
378 | 378 | let bE = bD._2 | |
379 | 379 | let bB = fraction(bE, toBigInt(bp), toBigInt((bg * ak))) | |
380 | 380 | let bF = toBigInt(((bA + (bp / bg)) - bp)) | |
381 | 381 | func bG (aO,bH) = if ((aO._2 == true)) | |
382 | 382 | then aO | |
383 | 383 | else { | |
384 | 384 | let bI = aO._1 | |
385 | 385 | let bJ = (((bI * bI) + bB) / ((as * bI) + bF)) | |
386 | 386 | if ((bJ > bI)) | |
387 | 387 | then if ((1 >= toInt((bJ - bI)))) | |
388 | 388 | then $Tuple2(bJ, true) | |
389 | 389 | else $Tuple2(bJ, false) | |
390 | 390 | else if ((1 >= toInt((bI - bJ)))) | |
391 | 391 | then $Tuple2(bJ, true) | |
392 | 392 | else $Tuple2(bJ, false) | |
393 | 393 | } | |
394 | 394 | ||
395 | 395 | let bK = { | |
396 | 396 | let aQ = av | |
397 | 397 | let aR = size(aQ) | |
398 | 398 | let aS = $Tuple2(toBigInt(bp), false) | |
399 | 399 | func bn (aU,aV) = if ((aV >= aR)) | |
400 | 400 | then aU | |
401 | 401 | else bG(aU, aQ[aV]) | |
402 | 402 | ||
403 | 403 | func bo (aU,aV) = if ((aV >= aR)) | |
404 | 404 | then aU | |
405 | 405 | else throw("List size exceeds 16") | |
406 | 406 | ||
407 | 407 | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
408 | 408 | } | |
409 | 409 | let bJ = bK._1 | |
410 | 410 | let br = bK._2 | |
411 | 411 | if ((br == false)) | |
412 | 412 | then throw(("getY() not finished with " + toString(bJ))) | |
413 | 413 | else toInt(bJ) | |
414 | 414 | } | |
415 | 415 | ||
416 | 416 | ||
417 | 417 | func bL (bM,bu,aY,bp) = if (ax((bu >= 0))) | |
418 | 418 | then throw("i below zero") | |
419 | 419 | else if (ax((ak > bu))) | |
420 | 420 | then throw("i above N_COINS") | |
421 | 421 | else { | |
422 | 422 | let bg = (bM * ak) | |
423 | 423 | func by (aO,aq) = { | |
424 | 424 | let bN = aO | |
425 | 425 | let bA = bN._1 | |
426 | 426 | let bB = bN._2 | |
427 | 427 | let bC = if (if ((bu != aq)) | |
428 | 428 | then (ak > aq) | |
429 | 429 | else false) | |
430 | 430 | then aY[aq] | |
431 | 431 | else 0 | |
432 | 432 | if (if ((ak > aq)) | |
433 | 433 | then (bu != aq) | |
434 | 434 | else false) | |
435 | 435 | then $Tuple2((bA + bC), fraction(bB, toBigInt(bp), toBigInt((bC * ak)))) | |
436 | 436 | else $Tuple2(bA, bB) | |
437 | 437 | } | |
438 | 438 | ||
439 | 439 | let bO = { | |
440 | 440 | let aQ = at | |
441 | 441 | let aR = size(aQ) | |
442 | 442 | let aS = $Tuple2(0, toBigInt(bp)) | |
443 | 443 | func aT (aU,aV) = if ((aV >= aR)) | |
444 | 444 | then aU | |
445 | 445 | else by(aU, aQ[aV]) | |
446 | 446 | ||
447 | 447 | func aW (aU,aV) = if ((aV >= aR)) | |
448 | 448 | then aU | |
449 | 449 | else throw("List size exceeds 10") | |
450 | 450 | ||
451 | 451 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
452 | 452 | } | |
453 | 453 | let bA = bO._1 | |
454 | 454 | let bE = bO._2 | |
455 | 455 | let bB = fraction(bE, toBigInt(bp), toBigInt((bg * ak))) | |
456 | 456 | let bF = toBigInt(((bA + (bp / bg)) - bp)) | |
457 | 457 | func bP (aO,aq) = if ((aO._2 == true)) | |
458 | 458 | then aO | |
459 | 459 | else { | |
460 | 460 | let bI = aO._1 | |
461 | 461 | let bJ = (((bI * bI) + bB) / ((as * bI) + bF)) | |
462 | 462 | if ((bJ > bI)) | |
463 | 463 | then if ((1 >= toInt((bJ - bI)))) | |
464 | 464 | then $Tuple2(bJ, true) | |
465 | 465 | else $Tuple2(bJ, false) | |
466 | 466 | else if ((1 >= toInt((bI - bJ)))) | |
467 | 467 | then $Tuple2(bJ, true) | |
468 | 468 | else $Tuple2(bJ, false) | |
469 | 469 | } | |
470 | 470 | ||
471 | 471 | let bQ = { | |
472 | 472 | let aQ = av | |
473 | 473 | let aR = size(aQ) | |
474 | 474 | let aS = $Tuple2(toBigInt(bp), false) | |
475 | 475 | func bn (aU,aV) = if ((aV >= aR)) | |
476 | 476 | then aU | |
477 | 477 | else bP(aU, aQ[aV]) | |
478 | 478 | ||
479 | 479 | func bo (aU,aV) = if ((aV >= aR)) | |
480 | 480 | then aU | |
481 | 481 | else throw("List size exceeds 16") | |
482 | 482 | ||
483 | 483 | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
484 | 484 | } | |
485 | 485 | let bJ = bQ._1 | |
486 | 486 | let br = bQ._2 | |
487 | 487 | if ((br == false)) | |
488 | 488 | then throw(("get_y_D() not finished with " + toString(bJ))) | |
489 | 489 | else toInt(bJ) | |
490 | 490 | } | |
491 | 491 | ||
492 | 492 | ||
493 | 493 | func bR (aY,bS,aq,bT) = { | |
494 | 494 | let bU = az(bT) | |
495 | 495 | let bc = aH() | |
496 | 496 | let bV = ((fraction(ad, bU, ac, CEILING) * ak) / (4 * (ak - 1))) | |
497 | 497 | let bW = ab | |
498 | 498 | let bX = bb(aY, bc) | |
499 | 499 | let bY = (bX - fraction(bS, bX, bW)) | |
500 | 500 | let bZ = bL(bc, aq, aY, bY) | |
501 | 501 | let ca = (aY[aq] - bZ) | |
502 | 502 | func cb (aO,cc) = { | |
503 | 503 | let cd = aO | |
504 | 504 | let ce = cd._1 | |
505 | 505 | let cf = cd._2 | |
506 | 506 | let cg = if ((cf == aq)) | |
507 | 507 | then (fraction(cc, bY, bX) - bZ) | |
508 | 508 | else (cc - fraction(cc, bY, bX)) | |
509 | 509 | $Tuple2((ce :+ (cc - fraction(bV, cg, ac))), (cf + 1)) | |
510 | 510 | } | |
511 | 511 | ||
512 | 512 | let ch = { | |
513 | 513 | let aQ = aY | |
514 | 514 | let aR = size(aQ) | |
515 | 515 | let aS = $Tuple2(nil, 0) | |
516 | 516 | func aT (aU,aV) = if ((aV >= aR)) | |
517 | 517 | then aU | |
518 | 518 | else cb(aU, aQ[aV]) | |
519 | 519 | ||
520 | 520 | func aW (aU,aV) = if ((aV >= aR)) | |
521 | 521 | then aU | |
522 | 522 | else throw("List size exceeds 10") | |
523 | 523 | ||
524 | 524 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
525 | 525 | } | |
526 | 526 | let ce = ch._1 | |
527 | 527 | let cf = ch._2 | |
528 | 528 | let ci = ce[aq] | |
529 | 529 | let cj = ((ci - bL(bc, aq, ce, bY)) - 1) | |
530 | 530 | $Tuple2(cj, (ca - cj)) | |
531 | 531 | } | |
532 | 532 | ||
533 | 533 | ||
534 | 534 | func ck (aP) = { | |
535 | 535 | let J = aP | |
536 | 536 | if ($isInstanceOf(J, "ByteVector")) | |
537 | 537 | then { | |
538 | 538 | let cl = J | |
539 | 539 | toBase58String(cl) | |
540 | 540 | } | |
541 | 541 | else if ($isInstanceOf(J, "Unit")) | |
542 | 542 | then { | |
543 | 543 | let cm = J | |
544 | 544 | "WAVES" | |
545 | 545 | } | |
546 | 546 | else throw("Match error") | |
547 | 547 | } | |
548 | 548 | ||
549 | 549 | ||
550 | 550 | func cn (co,aP) = if (co) | |
551 | 551 | then $Tuple2("lockNeutrino", S) | |
552 | 552 | else $Tuple2("unlockNeutrino", S) | |
553 | 553 | ||
554 | 554 | ||
555 | 555 | func cp (co,cq,aP) = if (co) | |
556 | 556 | then { | |
557 | 557 | let cr = cn(co, aP) | |
558 | 558 | let cs = cr._1 | |
559 | 559 | let ct = cr._2 | |
560 | 560 | $Tuple4(cs, ct, nil, [AttachedPayment(aP, cq)]) | |
561 | 561 | } | |
562 | 562 | else { | |
563 | 563 | let cu = cn(co, aP) | |
564 | 564 | let cs = cu._1 | |
565 | 565 | let ct = cu._2 | |
566 | 566 | $Tuple4(cs, ct, [cq, toBase58String(aP)], nil) | |
567 | 567 | } | |
568 | 568 | ||
569 | 569 | ||
570 | 570 | func co (cq,cv) = if (containsElement(X, cv)) | |
571 | 571 | then { | |
572 | 572 | let cw = cp(true, cq, fromBase58String(cv)) | |
573 | 573 | let cs = cw._1 | |
574 | 574 | let cx = cw._2 | |
575 | 575 | let cy = cw._3 | |
576 | 576 | let cz = cw._4 | |
577 | 577 | invoke(cx, cs, cy, cz) | |
578 | 578 | } | |
579 | 579 | else 0 | |
580 | 580 | ||
581 | 581 | ||
582 | 582 | func cA (cq,cv) = if (containsElement(X, cv)) | |
583 | 583 | then { | |
584 | 584 | let cB = cp(false, cq, fromBase58String(cv)) | |
585 | 585 | let cs = cB._1 | |
586 | 586 | let cx = cB._2 | |
587 | 587 | let cy = cB._3 | |
588 | 588 | let cz = cB._4 | |
589 | 589 | invoke(cx, cs, cy, cz) | |
590 | 590 | } | |
591 | 591 | else 0 | |
592 | 592 | ||
593 | 593 | ||
594 | 594 | func cC (aP) = { | |
595 | 595 | let cD = { | |
596 | 596 | let J = aP | |
597 | 597 | if ($isInstanceOf(J, "ByteVector")) | |
598 | 598 | then { | |
599 | 599 | let cE = J | |
600 | 600 | if ((cE == W)) | |
601 | 601 | then getInteger(S, ((("rpd_balance_" + toBase58String(cE)) + "_") + toString(this))) | |
602 | 602 | else 0 | |
603 | 603 | } | |
604 | 604 | else if ($isInstanceOf(J, "Unit")) | |
605 | 605 | then 0 | |
606 | 606 | else throw("Match error") | |
607 | 607 | } | |
608 | 608 | let J = cD | |
609 | 609 | if ($isInstanceOf(J, "Int")) | |
610 | 610 | then { | |
611 | 611 | let aq = J | |
612 | 612 | aq | |
613 | 613 | } | |
614 | 614 | else 0 | |
615 | 615 | } | |
616 | 616 | ||
617 | 617 | ||
618 | 618 | func cF () = { | |
619 | 619 | let cG = aM() | |
620 | 620 | func cH (aO,aP) = { | |
621 | 621 | let cI = aO | |
622 | 622 | let cJ = cI._1 | |
623 | 623 | let aq = cI._2 | |
624 | 624 | if (cJ) | |
625 | 625 | then $Tuple2(cJ, aq) | |
626 | 626 | else { | |
627 | 627 | let cK = (assetBalance(this, fromBase58String(aP)) + cC(fromBase58String(aP))) | |
628 | 628 | if ((cG[aq] > cK)) | |
629 | 629 | then $Tuple2(true, aq) | |
630 | 630 | else $Tuple2(false, (aq + 1)) | |
631 | 631 | } | |
632 | 632 | } | |
633 | 633 | ||
634 | 634 | let aQ = aj | |
635 | 635 | let aR = size(aQ) | |
636 | 636 | let aS = $Tuple2(false, 0) | |
637 | 637 | func aT (aU,aV) = if ((aV >= aR)) | |
638 | 638 | then aU | |
639 | 639 | else cH(aU, aQ[aV]) | |
640 | 640 | ||
641 | 641 | func aW (aU,aV) = if ((aV >= aR)) | |
642 | 642 | then aU | |
643 | 643 | else throw("List size exceeds 10") | |
644 | 644 | ||
645 | 645 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
646 | 646 | } | |
647 | 647 | ||
648 | 648 | ||
649 | 649 | func cL (aq) = al(("Suspicious state with asset: " + aj[aq])) | |
650 | 650 | ||
651 | 651 | ||
652 | 652 | func cM (bT,cz) = { | |
653 | 653 | func cN (aO,cO) = (aO :+ ScriptTransfer(bT, cO.amount, cO.assetId)) | |
654 | 654 | ||
655 | 655 | let aQ = cz | |
656 | 656 | let aR = size(aQ) | |
657 | 657 | let aS = nil | |
658 | 658 | func aT (aU,aV) = if ((aV >= aR)) | |
659 | 659 | then aU | |
660 | 660 | else cN(aU, aQ[aV]) | |
661 | 661 | ||
662 | 662 | func aW (aU,aV) = if ((aV >= aR)) | |
663 | 663 | then aU | |
664 | 664 | else throw("List size exceeds 10") | |
665 | 665 | ||
666 | 666 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
667 | 667 | } | |
668 | 668 | ||
669 | 669 | ||
670 | 670 | func cP (cQ) = { | |
671 | 671 | let cR = valueOrErrorMessage(getInteger(this, p), "No dAppThresholdCoef key") | |
672 | 672 | let cS = 10000 | |
673 | 673 | let cT = max(cQ) | |
674 | 674 | let cU = min(cQ) | |
675 | 675 | let cV = fraction(cT, cS, cU) | |
676 | 676 | if ((cV > (cR * cS))) | |
677 | 677 | then throw("New balance in assets of the DApp is less than threshold") | |
678 | 678 | else false | |
679 | 679 | } | |
680 | 680 | ||
681 | 681 | ||
682 | 682 | func cW (aj) = { | |
683 | 683 | let cX = split(aj, ",") | |
684 | 684 | if ((size(cX) > 10)) | |
685 | 685 | then throw("To many coins, max coins size 10") | |
686 | 686 | else { | |
687 | 687 | func cY (cZ,aP) = { | |
688 | 688 | let da = valueOrErrorMessage(fromBase58String(aP), ("fromBase58String: " + aP)) | |
689 | 689 | let db = valueOrErrorMessage(assetInfo(da), ("assetInfo: " + aP)).decimals | |
690 | 690 | if ((db != d)) | |
691 | 691 | then throw("wrong decimals") | |
692 | 692 | else false | |
693 | 693 | } | |
694 | 694 | ||
695 | 695 | let aQ = cX | |
696 | 696 | let aR = size(aQ) | |
697 | 697 | let aS = false | |
698 | 698 | func aT (aU,aV) = if ((aV >= aR)) | |
699 | 699 | then aU | |
700 | 700 | else cY(aU, aQ[aV]) | |
701 | 701 | ||
702 | 702 | func aW (aU,aV) = if ((aV >= aR)) | |
703 | 703 | then aU | |
704 | 704 | else throw("List size exceeds 10") | |
705 | 705 | ||
706 | 706 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
707 | 707 | } | |
708 | 708 | } | |
709 | 709 | ||
710 | 710 | ||
711 | - | @Callable(dc) | |
711 | + | func dc (dd,de,df) = { | |
712 | + | let cJ = cF() | |
713 | + | if (cJ._1) | |
714 | + | then (cL(cJ._2) ++ cM(dd.caller, dd.payments)) | |
715 | + | else { | |
716 | + | let dg = if ((size(dd.payments) > 0)) | |
717 | + | then if ((size(dd.payments) != 1)) | |
718 | + | then throw("size(payments) != 1") | |
719 | + | else { | |
720 | + | let dh = dd.payments[0].assetId | |
721 | + | if ((aa != dh)) | |
722 | + | then throw("unknown payment token") | |
723 | + | else dd.payments[0].amount | |
724 | + | } | |
725 | + | else 0 | |
726 | + | let di = (dg + df) | |
727 | + | func dj (aO,dk) = { | |
728 | + | let dl = aO | |
729 | + | let dm = dl._1 | |
730 | + | let aq = dl._2 | |
731 | + | let dn = fraction(dk, di, ab) | |
732 | + | if (ax((dn >= de[aq]))) | |
733 | + | then throw("Withdrawal resulted in fewer coins than expected") | |
734 | + | else { | |
735 | + | let do = cA(dn, aj[aq]) | |
736 | + | if ((do == do)) | |
737 | + | then $Tuple2((dm ++ [IntegerEntry((aj[aq] + i), (dk - dn)), ScriptTransfer(dd.caller, dn, fromBase58String(aj[aq]))]), (aq + 1)) | |
738 | + | else throw("Strict value is not equal to itself.") | |
739 | + | } | |
740 | + | } | |
741 | + | ||
742 | + | let dp = { | |
743 | + | let aQ = aM() | |
744 | + | let aR = size(aQ) | |
745 | + | let aS = $Tuple2(nil, 0) | |
746 | + | func aT (aU,aV) = if ((aV >= aR)) | |
747 | + | then aU | |
748 | + | else dj(aU, aQ[aV]) | |
749 | + | ||
750 | + | func aW (aU,aV) = if ((aV >= aR)) | |
751 | + | then aU | |
752 | + | else throw("List size exceeds 10") | |
753 | + | ||
754 | + | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
755 | + | } | |
756 | + | let dm = dp._1 | |
757 | + | let aq = dp._2 | |
758 | + | (dm ++ [Burn(aa, di), IntegerEntry(n, (ab - di))]) | |
759 | + | } | |
760 | + | } | |
761 | + | ||
762 | + | ||
763 | + | func dq (dd,dr,ds,df) = if ((size(dd.payments) != 1)) | |
764 | + | then throw("size(payments) != 1") | |
765 | + | else { | |
766 | + | let cJ = cF() | |
767 | + | if (cJ._1) | |
768 | + | then (cL(cJ._2) ++ cM(dd.originCaller, dd.payments)) | |
769 | + | else { | |
770 | + | let dg = if ((size(dd.payments) > 0)) | |
771 | + | then if ((size(dd.payments) != 1)) | |
772 | + | then throw("size(payments) != 1") | |
773 | + | else { | |
774 | + | let dh = dd.payments[0].assetId | |
775 | + | if ((aa != dh)) | |
776 | + | then throw("unknown payment token") | |
777 | + | else dd.payments[0].amount | |
778 | + | } | |
779 | + | else 0 | |
780 | + | let dt = valueOrErrorMessage(indexOf(aj, dr), "unknown token out") | |
781 | + | let du = fromBase58String(dr) | |
782 | + | let di = (dg + df) | |
783 | + | let aY = aM() | |
784 | + | let dv = bR(aY, di, dt, dd.originCaller) | |
785 | + | let cj = dv._1 | |
786 | + | let dw = dv._2 | |
787 | + | if (ax((cj >= ds))) | |
788 | + | then throw("Not enough coins removed") | |
789 | + | else { | |
790 | + | let dx = fraction(dw, ae, ac) | |
791 | + | let dy = (cj + dw) | |
792 | + | func dz (aO,dA) = { | |
793 | + | let dB = aO | |
794 | + | let cQ = dB._1 | |
795 | + | let aq = dB._2 | |
796 | + | if ((aq == dt)) | |
797 | + | then $Tuple2((cQ :+ (dA - dy)), (aq + 1)) | |
798 | + | else $Tuple2((cQ :+ dA), (aq + 1)) | |
799 | + | } | |
800 | + | ||
801 | + | let dC = { | |
802 | + | let aQ = aY | |
803 | + | let aR = size(aQ) | |
804 | + | let aS = $Tuple2(nil, 0) | |
805 | + | func aT (aU,aV) = if ((aV >= aR)) | |
806 | + | then aU | |
807 | + | else dz(aU, aQ[aV]) | |
808 | + | ||
809 | + | func aW (aU,aV) = if ((aV >= aR)) | |
810 | + | then aU | |
811 | + | else throw("List size exceeds 10") | |
812 | + | ||
813 | + | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
814 | + | } | |
815 | + | let cQ = dC._1 | |
816 | + | let dD = dC._2 | |
817 | + | if (cP(cQ)) | |
818 | + | then throw() | |
819 | + | else { | |
820 | + | let do = cA(dy, dr) | |
821 | + | if ((do == do)) | |
822 | + | then { | |
823 | + | let dE = (dw - dx) | |
824 | + | let dF = if ((dE > 0)) | |
825 | + | then invoke(V, "airDrop", nil, [AttachedPayment(du, dE)]) | |
826 | + | else 0 | |
827 | + | if ((dF == dF)) | |
828 | + | then [ScriptTransfer(dd.originCaller, cj, du), IntegerEntry((aj[dt] + i), (aY[dt] - dy)), Burn(aa, di), ScriptTransfer(Q, dx, du), IntegerEntry(n, (ab - di))] | |
829 | + | else throw("Strict value is not equal to itself.") | |
830 | + | } | |
831 | + | else throw("Strict value is not equal to itself.") | |
832 | + | } | |
833 | + | } | |
834 | + | } | |
835 | + | } | |
836 | + | ||
837 | + | ||
838 | + | @Callable(dd) | |
712 | 839 | func D (aY,bc) = { | |
713 | 840 | let bp = be(aY, bc) | |
714 | 841 | $Tuple2([IntegerEntry("D", bp)], bp) | |
715 | 842 | } | |
716 | 843 | ||
717 | 844 | ||
718 | 845 | ||
719 | - | @Callable( | |
720 | - | func init (aj,aH, | |
846 | + | @Callable(dd) | |
847 | + | func init (aj,aH,dG) = if (!(isDataStorageUntouched(this))) | |
721 | 848 | then throw("Already initialized") | |
722 | 849 | else if ((0 >= aH)) | |
723 | 850 | then throw("Amp must be must > 0") | |
724 | - | else if ((0 >= | |
851 | + | else if ((0 >= dG)) | |
725 | 852 | then throw("dApp Threshold Coef must be > 0") | |
726 | 853 | else { | |
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
854 | + | let dH = "s_Multi_USD" | |
855 | + | let dI = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this)) | |
856 | + | let dJ = Issue(dH, dI, 0, 6, true) | |
857 | + | let dK = calculateAssetId(dJ) | |
731 | 858 | if (cW(aj)) | |
732 | 859 | then throw() | |
733 | - | else [StringEntry(g, f), StringEntry(h, aj), IntegerEntry("initial_A", aH), IntegerEntry("future_A", aH), IntegerEntry(o, getIntegerValue(G, "base_fee_flat")), StringEntry(m, toBase58String( | |
860 | + | else [StringEntry(g, f), StringEntry(h, aj), IntegerEntry("initial_A", aH), IntegerEntry("future_A", aH), IntegerEntry(o, getIntegerValue(G, "base_fee_flat")), StringEntry(m, toBase58String(dK)), IntegerEntry(n, 0), IntegerEntry(p, dG), BooleanEntry(j, true), dJ] | |
734 | 861 | } | |
735 | 862 | ||
736 | 863 | ||
737 | 864 | ||
738 | - | @Callable( | |
739 | - | func addLiquidity ( | |
865 | + | @Callable(dd) | |
866 | + | func addLiquidity (dL,dM,dN) = valueOrElse(ao(), { | |
740 | 867 | let bc = aH() | |
741 | 868 | let aY = aM() | |
742 | 869 | let bX = if ((ab == 0)) | |
743 | 870 | then 0 | |
744 | 871 | else bs(aY, bc) | |
745 | - | let | |
746 | - | then ( | |
872 | + | let dO = if (if ((dN > 0)) | |
873 | + | then (dd.payments[(size(dd.payments) - 1)].assetId == unit) | |
747 | 874 | else false) | |
748 | - | then $Tuple2(removeByIndex( | |
749 | - | else $Tuple2( | |
750 | - | let cz = | |
751 | - | let | |
752 | - | let | |
753 | - | func | |
875 | + | then $Tuple2(removeByIndex(dd.payments, (size(dd.payments) - 1)), [dd.payments[(size(dd.payments) - 1)]]) | |
876 | + | else $Tuple2(dd.payments, nil) | |
877 | + | let cz = dO._1 | |
878 | + | let dP = dO._2 | |
879 | + | let dQ = size(cz) | |
880 | + | func dR (dS) = if ((dQ > ak)) | |
754 | 881 | then throw(("payments size > " + toString(ak))) | |
755 | - | else if ((1 > | |
882 | + | else if ((1 > dQ)) | |
756 | 883 | then throw("payments size < 1") | |
757 | 884 | else if (if ((ab == 0)) | |
758 | - | then (ak != | |
885 | + | then (ak != dQ) | |
759 | 886 | else false) | |
760 | 887 | then throw("initial deposit requires all coins") | |
761 | 888 | else { | |
762 | - | func | |
889 | + | func dT (aO,cO) = if (containsElement(aj, ck(cO.assetId))) | |
763 | 890 | then true | |
764 | 891 | else throw("Invalid asset in payment") | |
765 | 892 | ||
766 | 893 | let aQ = cz | |
767 | 894 | let aR = size(aQ) | |
768 | 895 | let aS = false | |
769 | 896 | func aT (aU,aV) = if ((aV >= aR)) | |
770 | 897 | then aU | |
771 | - | else | |
898 | + | else dT(aU, aQ[aV]) | |
772 | 899 | ||
773 | 900 | func aW (aU,aV) = if ((aV >= aR)) | |
774 | 901 | then aU | |
775 | 902 | else throw("List size exceeds 10") | |
776 | 903 | ||
777 | 904 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
778 | 905 | } | |
779 | 906 | ||
780 | - | if (!( | |
907 | + | if (!(dR(dQ))) | |
781 | 908 | then throw() | |
782 | 909 | else { | |
783 | 910 | let cJ = cF() | |
784 | 911 | if (cJ._1) | |
785 | - | then (cL(cJ._2) ++ cM( | |
912 | + | then (cL(cJ._2) ++ cM(dd.caller, cz)) | |
786 | 913 | else { | |
787 | 914 | func cN (aO,aP) = { | |
788 | - | let | |
789 | - | let cQ = | |
790 | - | let aq = | |
791 | - | func | |
792 | - | then ( | |
793 | - | else | |
915 | + | let dU = aO | |
916 | + | let cQ = dU._1 | |
917 | + | let aq = dU._2 | |
918 | + | func dV (dW,cO) = if ((ck(cO.assetId) == aP)) | |
919 | + | then (dW + cO.amount) | |
920 | + | else dW | |
794 | 921 | ||
795 | - | let | |
922 | + | let dX = { | |
796 | 923 | let aQ = cz | |
797 | 924 | let aR = size(aQ) | |
798 | 925 | let aS = aY[aq] | |
799 | 926 | func aT (aU,aV) = if ((aV >= aR)) | |
800 | 927 | then aU | |
801 | - | else | |
928 | + | else dV(aU, aQ[aV]) | |
802 | 929 | ||
803 | 930 | func aW (aU,aV) = if ((aV >= aR)) | |
804 | 931 | then aU | |
805 | 932 | else throw("List size exceeds 10") | |
806 | 933 | ||
807 | 934 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
808 | 935 | } | |
809 | - | $Tuple2((cQ :+ | |
936 | + | $Tuple2((cQ :+ dX), (aq + 1)) | |
810 | 937 | } | |
811 | 938 | ||
812 | - | let | |
939 | + | let dY = { | |
813 | 940 | let aQ = aj | |
814 | 941 | let aR = size(aQ) | |
815 | 942 | let aS = $Tuple2(nil, 0) | |
816 | 943 | func aT (aU,aV) = if ((aV >= aR)) | |
817 | 944 | then aU | |
818 | 945 | else cN(aU, aQ[aV]) | |
819 | 946 | ||
820 | 947 | func aW (aU,aV) = if ((aV >= aR)) | |
821 | 948 | then aU | |
822 | 949 | else throw("List size exceeds 10") | |
823 | 950 | ||
824 | 951 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
825 | 952 | } | |
826 | - | let cQ = | |
827 | - | let | |
953 | + | let cQ = dY._1 | |
954 | + | let dZ = dY._2 | |
828 | 955 | if (cP(cQ)) | |
829 | 956 | then throw() | |
830 | 957 | else { | |
831 | 958 | let bY = bs(cQ, bc) | |
832 | 959 | if (ax((bY > bX))) | |
833 | 960 | then throw("D1 > D0") | |
834 | 961 | else { | |
835 | - | let bU = az( | |
836 | - | func | |
837 | - | let | |
838 | - | let | |
839 | - | let | |
840 | - | let aq = | |
962 | + | let bU = az(dd.caller) | |
963 | + | func dj (aO,dW) = { | |
964 | + | let ea = aO | |
965 | + | let eb = ea._1 | |
966 | + | let dm = ea._2 | |
967 | + | let aq = ea._3 | |
841 | 968 | if ((ab > 0)) | |
842 | 969 | then { | |
843 | 970 | let bV = ((fraction(ad, bU, ac, CEILING) * ak) / (4 * (ak - 1))) | |
844 | - | let | |
845 | - | let | |
846 | - | let | |
847 | - | then ( | |
848 | - | else ( | |
849 | - | fraction(bV, | |
971 | + | let ec = { | |
972 | + | let ed = fraction(bY, aY[aq], bX) | |
973 | + | let ee = if ((ed > dW)) | |
974 | + | then (ed - dW) | |
975 | + | else (dW - ed) | |
976 | + | fraction(bV, ee, ac) | |
850 | 977 | } | |
851 | - | let | |
852 | - | let | |
853 | - | let | |
854 | - | let | |
855 | - | let | |
856 | - | let | |
857 | - | then co(( | |
858 | - | else cA( | |
859 | - | if (( | |
978 | + | let dx = fraction(ec, ae, ac) | |
979 | + | let ef = (dW - ec) | |
980 | + | let eg = (dW - ec) | |
981 | + | let eh = (dW - aY[aq]) | |
982 | + | let dE = (ec - dx) | |
983 | + | let ei = if ((eh > 0)) | |
984 | + | then co((eh - ec), aj[aq]) | |
985 | + | else cA(ec, aj[aq]) | |
986 | + | if ((ei == ei)) | |
860 | 987 | then { | |
861 | - | let | |
862 | - | then invoke(V, "airDrop", nil, [AttachedPayment(fromBase58String(aj[aq]), | |
988 | + | let dF = if ((dE > 0)) | |
989 | + | then invoke(V, "airDrop", nil, [AttachedPayment(fromBase58String(aj[aq]), dE)]) | |
863 | 990 | else 0 | |
864 | - | if (( | |
865 | - | then $Tuple3(( | |
991 | + | if ((dF == dF)) | |
992 | + | then $Tuple3((eb :+ eg), (dm ++ [ScriptTransfer(Q, dx, fromBase58String(aj[aq])), IntegerEntry((aj[aq] + i), ef)]), (aq + 1)) | |
866 | 993 | else throw("Strict value is not equal to itself.") | |
867 | 994 | } | |
868 | 995 | else throw("Strict value is not equal to itself.") | |
869 | 996 | } | |
870 | 997 | else { | |
871 | - | let | |
872 | - | if (( | |
873 | - | then $Tuple3(( | |
998 | + | let ei = co(dW, aj[aq]) | |
999 | + | if ((ei == ei)) | |
1000 | + | then $Tuple3((eb :+ dW), (dm :+ IntegerEntry((aj[aq] + i), dW)), (aq + 1)) | |
874 | 1001 | else throw("Strict value is not equal to itself.") | |
875 | 1002 | } | |
876 | 1003 | } | |
877 | 1004 | ||
878 | - | let | |
1005 | + | let ej = { | |
879 | 1006 | let aQ = cQ | |
880 | 1007 | let aR = size(aQ) | |
881 | 1008 | let aS = $Tuple3(nil, nil, 0) | |
882 | 1009 | func bn (aU,aV) = if ((aV >= aR)) | |
883 | 1010 | then aU | |
884 | - | else | |
1011 | + | else dj(aU, aQ[aV]) | |
885 | 1012 | ||
886 | 1013 | func bo (aU,aV) = if ((aV >= aR)) | |
887 | 1014 | then aU | |
888 | 1015 | else throw("List size exceeds 10") | |
889 | 1016 | ||
890 | 1017 | bo(bn(bn(bn(bn(bn(bn(bn(bn(bn(bn(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
891 | 1018 | } | |
892 | - | let | |
893 | - | let | |
894 | - | let | |
895 | - | let | |
1019 | + | let eb = ej._1 | |
1020 | + | let dm = ej._2 | |
1021 | + | let ek = bs(eb, bc) | |
1022 | + | let el = if ((ab == 0)) | |
896 | 1023 | then bY | |
897 | - | else fraction(ab, ( | |
898 | - | if (ax(( | |
1024 | + | else fraction(ab, (ek - bX), bX) | |
1025 | + | if (ax((el >= dL))) | |
899 | 1026 | then throw("Slippage screwed you") | |
900 | - | else if ( | |
1027 | + | else if (dM) | |
901 | 1028 | then { | |
902 | - | let | |
903 | - | if (( | |
1029 | + | let em = invoke(this, "reissueShare", [el], nil) | |
1030 | + | if ((em == em)) | |
904 | 1031 | then { | |
905 | - | let | |
906 | - | if (( | |
907 | - | then ( | |
1032 | + | let en = invoke(U, "lockShareTokensFromPool", [dd.caller.bytes, toString(this), dN], ([AttachedPayment(aa, el)] ++ dP)) | |
1033 | + | if ((en == en)) | |
1034 | + | then (dm :+ IntegerEntry(n, (ab + el))) | |
908 | 1035 | else throw("Strict value is not equal to itself.") | |
909 | 1036 | } | |
910 | 1037 | else throw("Strict value is not equal to itself.") | |
911 | 1038 | } | |
912 | - | else ( | |
1039 | + | else (dm ++ [Reissue(aa, el, true), ScriptTransfer(dd.caller, el, aa), IntegerEntry(n, (ab + el))]) | |
913 | 1040 | } | |
914 | 1041 | } | |
915 | 1042 | } | |
916 | 1043 | } | |
917 | 1044 | }) | |
918 | 1045 | ||
919 | 1046 | ||
920 | 1047 | ||
921 | - | @Callable( | |
1048 | + | @Callable(dd) | |
922 | 1049 | func calcMintAmount (cQ,aB) = { | |
923 | 1050 | let bc = aH() | |
924 | 1051 | let aY = aM() | |
925 | 1052 | let bY = bs(cQ, bc) | |
926 | 1053 | if ((ab == 0)) | |
927 | 1054 | then $Tuple2(nil, bY) | |
928 | 1055 | else { | |
929 | 1056 | let bX = bs(aY, bc) | |
930 | 1057 | let bU = az(aB) | |
931 | - | func | |
932 | - | let | |
933 | - | let | |
934 | - | let aq = | |
1058 | + | func eo (aO,dW) = { | |
1059 | + | let ep = aO | |
1060 | + | let eb = ep._1 | |
1061 | + | let aq = ep._2 | |
935 | 1062 | let bV = ((fraction(ad, bU, ac, CEILING) * ak) / (4 * (ak - 1))) | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
939 | - | then ( | |
940 | - | else ( | |
941 | - | fraction(bV, | |
1063 | + | let ec = { | |
1064 | + | let ed = fraction(bY, aY[aq], bX) | |
1065 | + | let ee = if ((ed > dW)) | |
1066 | + | then (ed - dW) | |
1067 | + | else (dW - ed) | |
1068 | + | fraction(bV, ee, ac) | |
942 | 1069 | } | |
943 | - | let | |
944 | - | $Tuple2(( | |
1070 | + | let eg = (dW - ec) | |
1071 | + | $Tuple2((eb :+ eg), (aq + 1)) | |
945 | 1072 | } | |
946 | 1073 | ||
947 | - | let | |
1074 | + | let eq = { | |
948 | 1075 | let aQ = cQ | |
949 | 1076 | let aR = size(aQ) | |
950 | 1077 | let aS = $Tuple2(nil, 0) | |
951 | 1078 | func aT (aU,aV) = if ((aV >= aR)) | |
952 | 1079 | then aU | |
953 | - | else | |
1080 | + | else eo(aU, aQ[aV]) | |
954 | 1081 | ||
955 | 1082 | func aW (aU,aV) = if ((aV >= aR)) | |
956 | 1083 | then aU | |
957 | 1084 | else throw("List size exceeds 10") | |
958 | 1085 | ||
959 | 1086 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
960 | 1087 | } | |
961 | - | let | |
962 | - | let | |
963 | - | let | |
964 | - | let | |
965 | - | $Tuple2(nil, | |
1088 | + | let eb = eq._1 | |
1089 | + | let dZ = eq._2 | |
1090 | + | let ek = bs(eb, bc) | |
1091 | + | let er = fraction(ab, (ek - bX), bX) | |
1092 | + | $Tuple2(nil, er) | |
966 | 1093 | } | |
967 | 1094 | } | |
968 | 1095 | ||
969 | 1096 | ||
970 | 1097 | ||
971 | - | @Callable( | |
972 | - | func reissueShare (cq) = valueOrElse(ar( | |
1098 | + | @Callable(dd) | |
1099 | + | func reissueShare (cq) = valueOrElse(ar(dd), [Reissue(aa, cq, true)]) | |
973 | 1100 | ||
974 | 1101 | ||
975 | 1102 | ||
976 | - | @Callable( | |
977 | - | func getDy ( | |
1103 | + | @Callable(dd) | |
1104 | + | func getDy (es,et,eu,ev) = { | |
978 | 1105 | let aY = aM() | |
979 | - | let | |
980 | - | let | |
981 | - | let bw = (aY[ | |
982 | - | let bJ = bt( | |
983 | - | let cj = ((aY[ | |
984 | - | let bU = az(Address(fromBase58String( | |
1106 | + | let ew = valueOrErrorMessage(indexOf(aj, es), "unknown token in") | |
1107 | + | let ex = valueOrErrorMessage(indexOf(aj, et), "unknown token out") | |
1108 | + | let bw = (aY[ew] + eu) | |
1109 | + | let bJ = bt(ew, ex, bw, aY) | |
1110 | + | let cj = ((aY[ex] - bJ) - 1) | |
1111 | + | let bU = az(Address(fromBase58String(ev))) | |
985 | 1112 | let bV = fraction(fraction(ad, bU, ac, CEILING), cj, ac) | |
986 | 1113 | $Tuple2(nil, $Tuple2((cj - bV), bV)) | |
987 | 1114 | } | |
988 | 1115 | ||
989 | 1116 | ||
990 | 1117 | ||
991 | - | @Callable( | |
992 | - | func exchange ( | |
1118 | + | @Callable(dd) | |
1119 | + | func exchange (dr,ey) = valueOrElse(ao(), if ((size(dd.payments) != 1)) | |
993 | 1120 | then throw("size(payments) != 1") | |
994 | 1121 | else { | |
995 | 1122 | let cJ = cF() | |
996 | 1123 | if (cJ._1) | |
997 | - | then (cL(cJ._2) ++ cM( | |
1124 | + | then (cL(cJ._2) ++ cM(dd.caller, dd.payments)) | |
998 | 1125 | else { | |
999 | - | let cO = | |
1000 | - | let | |
1001 | - | let | |
1002 | - | let | |
1003 | - | let | |
1004 | - | let | |
1126 | + | let cO = dd.payments[0] | |
1127 | + | let ez = ck(cO.assetId) | |
1128 | + | let du = fromBase58String(dr) | |
1129 | + | let eu = cO.amount | |
1130 | + | let ew = valueOrErrorMessage(indexOf(aj, ez), "unknown token in") | |
1131 | + | let ex = valueOrErrorMessage(indexOf(aj, dr), "unknown token out") | |
1005 | 1132 | let aY = aM() | |
1006 | - | let bw = (aY[ | |
1007 | - | let bJ = bt( | |
1008 | - | let | |
1009 | - | let bU = az( | |
1010 | - | let bV = fraction( | |
1011 | - | let cj = ( | |
1012 | - | let | |
1013 | - | if (ax((cj >= | |
1133 | + | let bw = (aY[ew] + eu) | |
1134 | + | let bJ = bt(ew, ex, bw, aY) | |
1135 | + | let eA = ((aY[ex] - bJ) - 1) | |
1136 | + | let bU = az(dd.originCaller) | |
1137 | + | let bV = fraction(eA, fraction(ad, bU, ac, CEILING), ac) | |
1138 | + | let cj = (eA - bV) | |
1139 | + | let dx = fraction(bV, ae, ac) | |
1140 | + | if (ax((cj >= ey))) | |
1014 | 1141 | then throw("Exchange resulted in fewer coins than expected") | |
1015 | 1142 | else { | |
1016 | - | func | |
1017 | - | let | |
1018 | - | let cQ = | |
1019 | - | let aq = | |
1020 | - | if ((aq == | |
1021 | - | then $Tuple2((cQ :+ ( | |
1022 | - | else if ((aq == | |
1023 | - | then $Tuple2((cQ :+ ( | |
1024 | - | else $Tuple2((cQ :+ | |
1143 | + | func dz (aO,dA) = { | |
1144 | + | let eB = aO | |
1145 | + | let cQ = eB._1 | |
1146 | + | let aq = eB._2 | |
1147 | + | if ((aq == ew)) | |
1148 | + | then $Tuple2((cQ :+ (dA + eu)), (aq + 1)) | |
1149 | + | else if ((aq == ex)) | |
1150 | + | then $Tuple2((cQ :+ (dA - eA)), (aq + 1)) | |
1151 | + | else $Tuple2((cQ :+ dA), (aq + 1)) | |
1025 | 1152 | } | |
1026 | 1153 | ||
1027 | - | let | |
1154 | + | let eC = { | |
1028 | 1155 | let aQ = aY | |
1029 | 1156 | let aR = size(aQ) | |
1030 | 1157 | let aS = $Tuple2(nil, 0) | |
1031 | 1158 | func aT (aU,aV) = if ((aV >= aR)) | |
1032 | 1159 | then aU | |
1033 | - | else | |
1160 | + | else dz(aU, aQ[aV]) | |
1034 | 1161 | ||
1035 | 1162 | func aW (aU,aV) = if ((aV >= aR)) | |
1036 | 1163 | then aU | |
1037 | 1164 | else throw("List size exceeds 10") | |
1038 | 1165 | ||
1039 | 1166 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1040 | 1167 | } | |
1041 | - | let cQ = | |
1042 | - | let aq = | |
1168 | + | let cQ = eC._1 | |
1169 | + | let aq = eC._2 | |
1043 | 1170 | if (cP(cQ)) | |
1044 | 1171 | then throw() | |
1045 | 1172 | else { | |
1046 | - | let | |
1047 | - | if (( | |
1173 | + | let en = co(cO.amount, ck(cO.assetId)) | |
1174 | + | if ((en == en)) | |
1048 | 1175 | then { | |
1049 | - | let | |
1050 | - | if (( | |
1176 | + | let do = cA(eA, dr) | |
1177 | + | if ((do == do)) | |
1051 | 1178 | then { | |
1052 | - | let | |
1053 | - | let | |
1054 | - | then invoke(V, "airDrop", nil, [AttachedPayment( | |
1179 | + | let dE = (bV - dx) | |
1180 | + | let dF = if ((dE > 0)) | |
1181 | + | then invoke(V, "airDrop", nil, [AttachedPayment(du, dE)]) | |
1055 | 1182 | else 0 | |
1056 | - | if (( | |
1057 | - | then $Tuple2([IntegerEntry(( | |
1183 | + | if ((dF == dF)) | |
1184 | + | then $Tuple2([IntegerEntry((ez + i), bw), IntegerEntry((dr + i), (aY[ex] - eA)), ScriptTransfer(dd.caller, cj, du), ScriptTransfer(Q, dx, du)], [cj, du]) | |
1058 | 1185 | else throw("Strict value is not equal to itself.") | |
1059 | 1186 | } | |
1060 | 1187 | else throw("Strict value is not equal to itself.") | |
1061 | 1188 | } | |
1062 | 1189 | else throw("Strict value is not equal to itself.") | |
1063 | 1190 | } | |
1064 | 1191 | } | |
1065 | 1192 | } | |
1066 | 1193 | }) | |
1067 | 1194 | ||
1068 | 1195 | ||
1069 | 1196 | ||
1070 | - | @Callable(dc) | |
1071 | - | func withdraw (ek) = valueOrElse(ao(), if ((size(dc.payments) != 1)) | |
1072 | - | then throw("size(payments) != 1") | |
1197 | + | @Callable(dd) | |
1198 | + | func withdraw (de) = valueOrElse(ao(), dc(dd, de, 0)) | |
1199 | + | ||
1200 | + | ||
1201 | + | ||
1202 | + | @Callable(dd) | |
1203 | + | func withdrawWithUnlock (de,df) = valueOrElse(ao(), if ((0 >= df)) | |
1204 | + | then throw("Unlock amount must be positive") | |
1073 | 1205 | else { | |
1074 | - | let el = dc.payments[0].amount | |
1075 | - | let em = dc.payments[0].assetId | |
1076 | - | if ((aa != em)) | |
1077 | - | then throw("unknown payment token") | |
1078 | - | else { | |
1079 | - | let cJ = cF() | |
1080 | - | if (cJ._1) | |
1081 | - | then (cL(cJ._2) ++ cM(dc.originCaller, dc.payments)) | |
1082 | - | else { | |
1083 | - | func dx (aO,en) = { | |
1084 | - | let eo = aO | |
1085 | - | let dA = eo._1 | |
1086 | - | let aq = eo._2 | |
1087 | - | let ep = fraction(en, el, ab) | |
1088 | - | if (ax((ep >= ek[aq]))) | |
1089 | - | then throw("Withdrawal resulted in fewer coins than expected") | |
1090 | - | else { | |
1091 | - | let ej = cA(ep, aj[aq]) | |
1092 | - | if ((ej == ej)) | |
1093 | - | then $Tuple2((dA ++ [IntegerEntry((aj[aq] + i), (en - ep)), ScriptTransfer(dc.originCaller, ep, fromBase58String(aj[aq]))]), (aq + 1)) | |
1094 | - | else throw("Strict value is not equal to itself.") | |
1095 | - | } | |
1096 | - | } | |
1097 | - | ||
1098 | - | let eq = { | |
1099 | - | let aQ = aM() | |
1100 | - | let aR = size(aQ) | |
1101 | - | let aS = $Tuple2(nil, 0) | |
1102 | - | func aT (aU,aV) = if ((aV >= aR)) | |
1103 | - | then aU | |
1104 | - | else dx(aU, aQ[aV]) | |
1105 | - | ||
1106 | - | func aW (aU,aV) = if ((aV >= aR)) | |
1107 | - | then aU | |
1108 | - | else throw("List size exceeds 10") | |
1109 | - | ||
1110 | - | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1111 | - | } | |
1112 | - | let dA = eq._1 | |
1113 | - | let aq = eq._2 | |
1114 | - | (dA ++ [Burn(aa, el), IntegerEntry(n, (ab - el))]) | |
1115 | - | } | |
1116 | - | } | |
1206 | + | let eD = invoke(U, "withdrawShareTokensFromPool", [dd.caller.bytes, toString(this), df], nil) | |
1207 | + | if ((eD == eD)) | |
1208 | + | then dc(dd, de, df) | |
1209 | + | else throw("Strict value is not equal to itself.") | |
1117 | 1210 | }) | |
1118 | 1211 | ||
1119 | 1212 | ||
1120 | 1213 | ||
1121 | - | @Callable(dc) | |
1122 | - | func withdrawWithUnlock (ek,er) = valueOrElse(ao(), if ((0 >= er)) | |
1214 | + | @Callable(dd) | |
1215 | + | func calcWithdrawOneCoin (eE,dr,aB) = if ((0 >= eE)) | |
1216 | + | then throw("Amount must be positive") | |
1217 | + | else { | |
1218 | + | let aq = valueOrErrorMessage(indexOf(aj, dr), "unknown token out") | |
1219 | + | $Tuple2(nil, bR(aM(), eE, aq, Address(fromBase58String(aB)))._1) | |
1220 | + | } | |
1221 | + | ||
1222 | + | ||
1223 | + | ||
1224 | + | @Callable(dd) | |
1225 | + | func withdrawOneCoin (dr,ds) = valueOrElse(ao(), dq(dd, dr, ds, 0)) | |
1226 | + | ||
1227 | + | ||
1228 | + | ||
1229 | + | @Callable(dd) | |
1230 | + | func withdrawOneCoinWithUnlock (dr,ds,df) = valueOrElse(ao(), if ((0 >= df)) | |
1123 | 1231 | then throw("Unlock amount must be positive") | |
1124 | 1232 | else { | |
1125 | - | let cJ = cF() | |
1126 | - | if (cJ._1) | |
1127 | - | then (cL(cJ._2) ++ cM(dc.caller, dc.payments)) | |
1128 | - | else { | |
1129 | - | let el = if ((size(dc.payments) > 0)) | |
1130 | - | then if ((size(dc.payments) != 1)) | |
1131 | - | then throw("size(payments) != 1") | |
1132 | - | else { | |
1133 | - | let em = dc.payments[0].assetId | |
1134 | - | if ((aa != em)) | |
1135 | - | then throw("unknown payment token") | |
1136 | - | else dc.payments[0].amount | |
1137 | - | } | |
1138 | - | else 0 | |
1139 | - | let es = invoke(U, "withdrawShareTokensFromPool", [dc.caller.bytes, toString(this), er], nil) | |
1140 | - | if ((es == es)) | |
1141 | - | then { | |
1142 | - | let et = (el + er) | |
1143 | - | let dJ = invoke(this, "withdraw", [ek], [AttachedPayment(aa, et)]) | |
1144 | - | if ((dJ == dJ)) | |
1145 | - | then nil | |
1146 | - | else throw("Strict value is not equal to itself.") | |
1147 | - | } | |
1148 | - | else throw("Strict value is not equal to itself.") | |
1149 | - | } | |
1233 | + | let eD = invoke(U, "withdrawShareTokensFromPool", [dd.caller.bytes, toString(this), df], nil) | |
1234 | + | if ((eD == eD)) | |
1235 | + | then dq(dd, dr, ds, df) | |
1236 | + | else throw("Strict value is not equal to itself.") | |
1150 | 1237 | }) | |
1151 | 1238 | ||
1152 | 1239 | ||
1153 | 1240 | ||
1154 | - | @Callable(dc) | |
1155 | - | func calcWithdrawOneCoin (eu,ea,aB) = if ((0 >= eu)) | |
1156 | - | then throw("Amount must be positive") | |
1157 | - | else { | |
1158 | - | let aq = valueOrErrorMessage(indexOf(aj, ea), "unknown token out") | |
1159 | - | $Tuple2(nil, bR(aM(), eu, aq, Address(fromBase58String(aB)))._1) | |
1160 | - | } | |
1161 | - | ||
1162 | - | ||
1163 | - | ||
1164 | - | @Callable(dc) | |
1165 | - | func withdrawOneCoin (ea,ev) = valueOrElse(ao(), if ((size(dc.payments) != 1)) | |
1166 | - | then throw("size(payments) != 1") | |
1167 | - | else { | |
1168 | - | let cJ = cF() | |
1169 | - | if (cJ._1) | |
1170 | - | then (cL(cJ._2) ++ cM(dc.originCaller, dc.payments)) | |
1171 | - | else { | |
1172 | - | let el = dc.payments[0].amount | |
1173 | - | let em = dc.payments[0].assetId | |
1174 | - | if ((em != aa)) | |
1175 | - | then throw("unknown token") | |
1176 | - | else { | |
1177 | - | let ew = valueOrErrorMessage(indexOf(aj, ea), "unknown token out") | |
1178 | - | let ed = fromBase58String(ea) | |
1179 | - | let aY = aM() | |
1180 | - | let ex = bR(aY, el, ew, dc.originCaller) | |
1181 | - | let cj = ex._1 | |
1182 | - | let ey = ex._2 | |
1183 | - | if (ax((cj >= ev))) | |
1184 | - | then throw("Not enough coins removed") | |
1185 | - | else { | |
1186 | - | let dE = fraction(ey, ae, ac) | |
1187 | - | let ez = (cj + ey) | |
1188 | - | func ef (aO,eg) = { | |
1189 | - | let eA = aO | |
1190 | - | let cQ = eA._1 | |
1191 | - | let aq = eA._2 | |
1192 | - | if ((aq == ew)) | |
1193 | - | then $Tuple2((cQ :+ (eg - ez)), (aq + 1)) | |
1194 | - | else $Tuple2((cQ :+ eg), (aq + 1)) | |
1195 | - | } | |
1196 | - | ||
1197 | - | let eB = { | |
1198 | - | let aQ = aY | |
1199 | - | let aR = size(aQ) | |
1200 | - | let aS = $Tuple2(nil, 0) | |
1201 | - | func aT (aU,aV) = if ((aV >= aR)) | |
1202 | - | then aU | |
1203 | - | else ef(aU, aQ[aV]) | |
1204 | - | ||
1205 | - | func aW (aU,aV) = if ((aV >= aR)) | |
1206 | - | then aU | |
1207 | - | else throw("List size exceeds 10") | |
1208 | - | ||
1209 | - | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1210 | - | } | |
1211 | - | let cQ = eB._1 | |
1212 | - | let eC = eB._2 | |
1213 | - | if (cP(cQ)) | |
1214 | - | then throw() | |
1215 | - | else { | |
1216 | - | let ej = cA(ez, ea) | |
1217 | - | if ((ej == ej)) | |
1218 | - | then { | |
1219 | - | let dI = (ey - dE) | |
1220 | - | let dK = if ((dI > 0)) | |
1221 | - | then invoke(V, "airDrop", nil, [AttachedPayment(ed, dI)]) | |
1222 | - | else 0 | |
1223 | - | if ((dK == dK)) | |
1224 | - | then [ScriptTransfer(dc.originCaller, cj, ed), IntegerEntry((aj[ew] + i), (aY[ew] - ez)), Burn(aa, el), ScriptTransfer(Q, dE, ed), IntegerEntry(n, (ab - el))] | |
1225 | - | else throw("Strict value is not equal to itself.") | |
1226 | - | } | |
1227 | - | else throw("Strict value is not equal to itself.") | |
1228 | - | } | |
1229 | - | } | |
1230 | - | } | |
1231 | - | } | |
1232 | - | }) | |
1233 | - | ||
1234 | - | ||
1235 | - | ||
1236 | - | @Callable(dc) | |
1237 | - | func withdrawOneCoinWithUnlock (ea,ev,er) = valueOrElse(ao(), if ((0 >= er)) | |
1238 | - | then throw("Unlock amount must be positive") | |
1239 | - | else { | |
1240 | - | let cJ = cF() | |
1241 | - | if (cJ._1) | |
1242 | - | then (cL(cJ._2) ++ cM(dc.caller, dc.payments)) | |
1243 | - | else { | |
1244 | - | let el = if ((size(dc.payments) > 0)) | |
1245 | - | then if ((size(dc.payments) != 1)) | |
1246 | - | then throw("size(payments) != 1") | |
1247 | - | else { | |
1248 | - | let em = dc.payments[0].assetId | |
1249 | - | if ((aa != em)) | |
1250 | - | then throw("unknown payment token") | |
1251 | - | else dc.payments[0].amount | |
1252 | - | } | |
1253 | - | else 0 | |
1254 | - | let es = invoke(U, "withdrawShareTokensFromPool", [dc.caller.bytes, toString(this), er], nil) | |
1255 | - | if ((es == es)) | |
1256 | - | then { | |
1257 | - | let et = (el + er) | |
1258 | - | let dJ = invoke(this, "withdrawOneCoin", [ea, ev], [AttachedPayment(aa, et)]) | |
1259 | - | if ((dJ == dJ)) | |
1260 | - | then nil | |
1261 | - | else throw("Strict value is not equal to itself.") | |
1262 | - | } | |
1263 | - | else throw("Strict value is not equal to itself.") | |
1264 | - | } | |
1265 | - | }) | |
1266 | - | ||
1267 | - | ||
1268 | - | ||
1269 | - | @Callable(dc) | |
1241 | + | @Callable(dd) | |
1270 | 1242 | func A () = $Tuple2(nil, aH()) | |
1271 | 1243 | ||
1272 | 1244 | ||
1273 | 1245 | ||
1274 | - | @Callable( | |
1246 | + | @Callable(dd) | |
1275 | 1247 | func getVirtualPrice () = { | |
1276 | 1248 | let bp = bb(aM(), aH()) | |
1277 | 1249 | $Tuple2(nil, fraction(bp, a, ab)) | |
1278 | 1250 | } | |
1279 | 1251 | ||
1280 | 1252 | ||
1281 | 1253 | ||
1282 | - | @Callable( | |
1283 | - | func calcTokenAmount ( | |
1254 | + | @Callable(dd) | |
1255 | + | func calcTokenAmount (eF,eG) = { | |
1284 | 1256 | let bc = aH() | |
1285 | - | let | |
1286 | - | let bX = bs( | |
1287 | - | func | |
1288 | - | let | |
1289 | - | let cQ = | |
1290 | - | let aq = | |
1291 | - | let | |
1292 | - | then | |
1293 | - | else -( | |
1294 | - | $Tuple2((cQ :+ | |
1257 | + | let eH = aM() | |
1258 | + | let bX = bs(eH, bc) | |
1259 | + | func eI (aO,dk) = { | |
1260 | + | let eJ = aO | |
1261 | + | let cQ = eJ._1 | |
1262 | + | let aq = eJ._2 | |
1263 | + | let dW = (dk + (if (eG) | |
1264 | + | then eF[aq] | |
1265 | + | else -(eF[aq]))) | |
1266 | + | $Tuple2((cQ :+ dW), (aq + 1)) | |
1295 | 1267 | } | |
1296 | 1268 | ||
1297 | - | let cQ = ( let aQ = | |
1269 | + | let cQ = ( let aQ = eH | |
1298 | 1270 | let aR = size(aQ) | |
1299 | 1271 | let aS = $Tuple2(nil, 0) | |
1300 | 1272 | func aT (aU,aV) = if ((aV >= aR)) | |
1301 | 1273 | then aU | |
1302 | - | else | |
1274 | + | else eI(aU, aQ[aV]) | |
1303 | 1275 | ||
1304 | 1276 | func aW (aU,aV) = if ((aV >= aR)) | |
1305 | 1277 | then aU | |
1306 | 1278 | else throw("List size exceeds 10") | |
1307 | 1279 | ||
1308 | 1280 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10))._1 | |
1309 | 1281 | let bY = bs(cQ, bc) | |
1310 | - | let | |
1282 | + | let eK = if (eG) | |
1311 | 1283 | then (bY - bX) | |
1312 | 1284 | else (bX - bY) | |
1313 | - | $Tuple2(nil, fraction( | |
1285 | + | $Tuple2(nil, fraction(eK, ab, bX)) | |
1314 | 1286 | } | |
1315 | 1287 | ||
1316 | 1288 | ||
1317 | 1289 | ||
1318 | - | @Callable( | |
1319 | - | func rampA ( | |
1290 | + | @Callable(dd) | |
1291 | + | func rampA (eL,eM) = valueOrElse(ao(), valueOrElse(ap(dd), if (ax((aw >= (ah + e)))) | |
1320 | 1292 | then throw("too often") | |
1321 | - | else if (ax(( | |
1293 | + | else if (ax((eM >= (aw + e)))) | |
1322 | 1294 | then throw("insufficient time") | |
1323 | 1295 | else { | |
1324 | - | let | |
1325 | - | if (ax(if (( | |
1326 | - | then (b > | |
1296 | + | let eN = aH() | |
1297 | + | if (ax(if ((eL > 0)) | |
1298 | + | then (b > eL) | |
1327 | 1299 | else false)) | |
1328 | 1300 | then throw("out of base range") | |
1329 | - | else if (ax(if (if (( | |
1330 | - | then (( | |
1301 | + | else if (ax(if (if ((eL >= eN)) | |
1302 | + | then ((eN * c) >= eL) | |
1331 | 1303 | else false) | |
1332 | 1304 | then true | |
1333 | - | else if (( | |
1334 | - | then (( | |
1305 | + | else if ((eN > eL)) | |
1306 | + | then ((eL * c) >= eN) | |
1335 | 1307 | else false)) | |
1336 | 1308 | then throw("out of range") | |
1337 | - | else [IntegerEntry("initial_A", | |
1309 | + | else [IntegerEntry("initial_A", eN), IntegerEntry("future_A", eL), IntegerEntry("initial_A_time", aw), IntegerEntry("future_A_time", eM)] | |
1338 | 1310 | })) | |
1339 | 1311 | ||
1340 | 1312 | ||
1341 | 1313 | ||
1342 | - | @Callable( | |
1343 | - | func stopRampA () = valueOrElse(ao(), valueOrElse(ap( | |
1344 | - | let | |
1345 | - | [IntegerEntry("initial_A", | |
1314 | + | @Callable(dd) | |
1315 | + | func stopRampA () = valueOrElse(ao(), valueOrElse(ap(dd), { | |
1316 | + | let eO = aH() | |
1317 | + | [IntegerEntry("initial_A", eO), IntegerEntry("future_A", eO), IntegerEntry("initial_A_time", aw), IntegerEntry("future_A_time", aw)] | |
1346 | 1318 | })) | |
1347 | 1319 | ||
1348 | 1320 | ||
1349 | 1321 | ||
1350 | - | @Callable( | |
1351 | - | func shutdown () = valueOrElse(ap( | |
1322 | + | @Callable(dd) | |
1323 | + | func shutdown () = valueOrElse(ap(dd), if (!(Y)) | |
1352 | 1324 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, l), "the cause wasn't specified"))) | |
1353 | 1325 | else al("Paused by admin")) | |
1354 | 1326 | ||
1355 | 1327 | ||
1356 | 1328 | ||
1357 | - | @Callable( | |
1358 | - | func activate () = valueOrElse(ap( | |
1329 | + | @Callable(dd) | |
1330 | + | func activate () = valueOrElse(ap(dd), if (Y) | |
1359 | 1331 | then an() | |
1360 | 1332 | else [BooleanEntry(j, true), DeleteEntry(l)]) | |
1361 | 1333 | ||
1362 | 1334 | ||
1363 | 1335 | ||
1364 | - | @Callable( | |
1365 | - | func takeIntoAccountExtraFunds () = valueOrElse(ao(), if (( | |
1336 | + | @Callable(dd) | |
1337 | + | func takeIntoAccountExtraFunds () = valueOrElse(ao(), if ((dd.caller != Q)) | |
1366 | 1338 | then throw("Only the wallet can call this function") | |
1367 | 1339 | else { | |
1368 | - | let | |
1369 | - | func | |
1370 | - | let | |
1371 | - | let | |
1372 | - | let aq = | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | if ((0 > | |
1340 | + | let eH = aM() | |
1341 | + | func eP (aO,aP) = { | |
1342 | + | let eQ = aO | |
1343 | + | let eR = eQ._1 | |
1344 | + | let aq = eQ._2 | |
1345 | + | let eS = fromBase58String(aP) | |
1346 | + | let eT = (assetBalance(this, eS) + cC(eS)) | |
1347 | + | let eU = (eT - eH[aq]) | |
1348 | + | if ((0 > eU)) | |
1377 | 1349 | then al(("Enroll amount negative for asset" + aP)) | |
1378 | 1350 | else { | |
1379 | - | let | |
1380 | - | then invoke(V, "airDrop", nil, [AttachedPayment( | |
1351 | + | let dF = if ((eU > 0)) | |
1352 | + | then invoke(V, "airDrop", nil, [AttachedPayment(eS, eU)]) | |
1381 | 1353 | else 0 | |
1382 | - | if (( | |
1383 | - | then $Tuple2(( | |
1354 | + | if ((dF == dF)) | |
1355 | + | then $Tuple2((eR + eU), (aq + 1)) | |
1384 | 1356 | else throw("Strict value is not equal to itself.") | |
1385 | 1357 | } | |
1386 | 1358 | } | |
1387 | 1359 | ||
1388 | - | let | |
1360 | + | let dZ = { | |
1389 | 1361 | let aQ = aj | |
1390 | 1362 | let aR = size(aQ) | |
1391 | 1363 | let aS = $Tuple2(0, 0) | |
1392 | 1364 | func aT (aU,aV) = if ((aV >= aR)) | |
1393 | 1365 | then aU | |
1394 | - | else | |
1366 | + | else eP(aU, aQ[aV]) | |
1395 | 1367 | ||
1396 | 1368 | func aW (aU,aV) = if ((aV >= aR)) | |
1397 | 1369 | then aU | |
1398 | 1370 | else throw("List size exceeds 10") | |
1399 | 1371 | ||
1400 | 1372 | aW(aT(aT(aT(aT(aT(aT(aT(aT(aT(aT(aS, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1401 | 1373 | } | |
1402 | - | if (( | |
1374 | + | if ((dZ._1 == 0)) | |
1403 | 1375 | then throw("No money to take") | |
1404 | 1376 | else nil | |
1405 | 1377 | }) | |
1406 | 1378 | ||
1407 | 1379 | ||
1408 | - | @Verifier( | |
1409 | - | func | |
1410 | - | let | |
1411 | - | let | |
1380 | + | @Verifier(eV) | |
1381 | + | func eW () = { | |
1382 | + | let eX = { | |
1383 | + | let eY = if (sigVerify(eV.bodyBytes, eV.proofs[0], M)) | |
1412 | 1384 | then 1 | |
1413 | 1385 | else 0 | |
1414 | - | let | |
1386 | + | let eZ = if (sigVerify(eV.bodyBytes, eV.proofs[1], N)) | |
1415 | 1387 | then 1 | |
1416 | 1388 | else 0 | |
1417 | - | let | |
1389 | + | let fa = if (sigVerify(eV.bodyBytes, eV.proofs[2], O)) | |
1418 | 1390 | then 1 | |
1419 | 1391 | else 0 | |
1420 | - | ((( | |
1392 | + | (((eY + eZ) + fa) >= 2) | |
1421 | 1393 | } | |
1422 | - | let J = | |
1394 | + | let J = eV | |
1423 | 1395 | if ($isInstanceOf(J, "InvokeScriptTransaction")) | |
1424 | 1396 | then { | |
1425 | - | let | |
1426 | - | let | |
1427 | - | then ( | |
1397 | + | let ei = J | |
1398 | + | let fb = if ((ei.dApp == this)) | |
1399 | + | then (ei.function == "takeIntoAccountExtraFunds") | |
1428 | 1400 | else false | |
1429 | - | let | |
1401 | + | let fc = if (if (if (sigVerify(eV.bodyBytes, eV.proofs[0], M)) | |
1430 | 1402 | then true | |
1431 | - | else sigVerify( | |
1403 | + | else sigVerify(eV.bodyBytes, eV.proofs[0], N)) | |
1432 | 1404 | then true | |
1433 | - | else sigVerify( | |
1405 | + | else sigVerify(eV.bodyBytes, eV.proofs[0], O)) | |
1434 | 1406 | then true | |
1435 | - | else sigVerify( | |
1436 | - | if (if ( | |
1437 | - | then | |
1407 | + | else sigVerify(eV.bodyBytes, eV.proofs[0], P) | |
1408 | + | if (if (fb) | |
1409 | + | then fc | |
1438 | 1410 | else false) | |
1439 | 1411 | then true | |
1440 | - | else | |
1412 | + | else eX | |
1441 | 1413 | } | |
1442 | - | else | |
1414 | + | else eX | |
1443 | 1415 | } | |
1444 | 1416 |
github/deemru/w8io/169f3d6 300.68 ms ◑