tx · 28ND4mpNE8xut96V6QiYLoireEaHVaCTwQjqUsAzcFbn 3NAwbpcPsGSxuaojbBpYgdUYsGbrNauJ57J: -0.03500000 Waves 2022.06.07 10:12 [2085626] smart account 3NAwbpcPsGSxuaojbBpYgdUYsGbrNauJ57J > SELF 0.00000000 Waves
{ "type": 13, "id": "28ND4mpNE8xut96V6QiYLoireEaHVaCTwQjqUsAzcFbn", "fee": 3500000, "feeAssetId": null, "timestamp": 1654585963195, "version": 1, "sender": "3NAwbpcPsGSxuaojbBpYgdUYsGbrNauJ57J", "senderPublicKey": "F3cz73sYXXXQegEA2JLAqUWZViMB9jmE26svEgk9PUFm", "proofs": [ "4RpU8TxEaaxBZwpXRWagauX33irSX5nQV6gsc3ThgM65EQ7Z5zdDQ7TzpCN8kLbjg3hASMGRAR7tu5DiWzk9L3Cr" ], "script": "base64:AAIFAAAAAAAAEpIIAhIECgIICBIDCgEIEgASBAoCAQQSBwoFAQEBAQQSAwoBARIAEgcKBQEBAQgBEgQKAgEBEgMKAQESBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBoKCgFBEgVkZWxheRoHCgFCEgJ0MRoMCgFDEgdvcmlnVmFsGhIKAUQSDW9yaWdTY2FsZU11bHQaBwoBRRICZjEaCAoBRhIDdmFsGhQKAUcSD3Jlc3VsdFNjYWxlTXVsdBoHCgFIEgJ0cxoICgFJEgNhbXQaDQoBShIIcmVzU2NhbGUaDQoBSxIIY3VyU2NhbGUaCAoBTBIDYWJzGgcKAU0SAmZjGggKAU4SA21waxoJCgFPEgRwbXBrGgcKAVASAnBsGgcKAVESAnBoGgYKAVISAWgaBgoBUxIBdBoICgFUEgNwYXUaBwoBVRICdWEaCQoBVhIEdHhJZBoICgFXEgNnYXUaBwoBWBICYWEaBwoBWRICcGEaCAoBWhIDYW1wGgsKAWESBnNjYWxlOBoJCgJhQRIDZ3BjGgsKAmFCEgVhbX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mVKAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACZUoAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJlTztN1KE=", "chainId": 84, "height": 2085626, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H2DqrHCxwycpKw3sCRabBpAESvTwzkQ3baULK5cfwPFT Next: GmrMbXESxUPhH7mc57bNcCspdbNAVsandzdbuPJoXErr Diff:
Old | New | Differences | |
---|---|---|---|
102 | 102 | func ada () = "%s__addonAddr" | |
103 | 103 | ||
104 | 104 | ||
105 | - | func lgotc (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP) | |
106 | - | ||
107 | - | ||
108 | - | func lsotc (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP) | |
105 | + | func lgopotc (caller) = makeString(["%s%s__lastGetOrPutOneTknCall", caller], SEP) | |
109 | 106 | ||
110 | 107 | ||
111 | 108 | func fcfg () = "%s__factoryConfig" | |
334 | 331 | else calcLpAmt | |
335 | 332 | let amDiff = (inAmAmt - calcAmAssetPmt) | |
336 | 333 | let prDiff = (inPrAmt - calcPrAssetPmt) | |
337 | - | let $ | |
334 | + | let $t01572516070 = if (if (isOneAsset) | |
338 | 335 | then (pmtId == amIdStr) | |
339 | 336 | else false) | |
340 | 337 | then $Tuple2(pmtAmt, 0) | |
343 | 340 | else false) | |
344 | 341 | then $Tuple2(0, pmtAmt) | |
345 | 342 | else $Tuple2(calcAmAssetPmt, calcPrAssetPmt) | |
346 | - | let writeAmAmt = $ | |
347 | - | let writePrAmt = $ | |
343 | + | let writeAmAmt = $t01572516070._1 | |
344 | + | let writePrAmt = $t01572516070._2 | |
348 | 345 | let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))] | |
349 | 346 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId) | |
350 | 347 | } | |
465 | 462 | ||
466 | 463 | ||
467 | 464 | @Callable(i) | |
468 | - | func constructor (fc) = { | |
465 | + | func constructor (fc,aa) = { | |
469 | 466 | let c = mm(i) | |
470 | 467 | if ((c == c)) | |
471 | 468 | then [StringEntry(fc(), fc)] | |
586 | 583 | then i.originCaller | |
587 | 584 | else i.caller | |
588 | 585 | let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid") | |
589 | - | let check = reentrantInvoke(addonContract, " | |
586 | + | let check = reentrantInvoke(addonContract, "ensureCanGetOrPutOneTkn", [toString(userAddress)], nil) | |
590 | 587 | if ((check == check)) | |
591 | 588 | then if (if (if (if ((0 >= slippage)) | |
592 | 589 | then true | |
611 | 608 | else { | |
612 | 609 | let amBalance = getAccBalance(amId) | |
613 | 610 | let prBalance = getAccBalance(prId) | |
614 | - | let $ | |
611 | + | let $t02506325443 = if ((pmtAssetId == amId)) | |
615 | 612 | then $Tuple6((amBalance - pmtAmt), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0) | |
616 | 613 | else if ((pmtAssetId == prId)) | |
617 | 614 | then $Tuple6(amBalance, (prBalance - pmtAmt), 0, 0, (pmtAmt - prAssetPart), amAssetPart) | |
618 | 615 | else throw("wrong pmtAssetId") | |
619 | - | let amBalanceNow = $ | |
620 | - | let prBalanceNow = $ | |
621 | - | let virtSwapInAm = $ | |
622 | - | let virtSwapOutPr = $ | |
623 | - | let virtSwapInPr = $ | |
624 | - | let virtSwapOutAm = $ | |
616 | + | let amBalanceNow = $t02506325443._1 | |
617 | + | let prBalanceNow = $t02506325443._2 | |
618 | + | let virtSwapInAm = $t02506325443._3 | |
619 | + | let virtSwapOutPr = $t02506325443._4 | |
620 | + | let virtSwapInPr = $t02506325443._5 | |
621 | + | let virtSwapOutAm = $t02506325443._6 | |
625 | 622 | let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil) | |
626 | 623 | let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil) | |
627 | 624 | let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D) | |
628 | 625 | if ((D0vsD1 == D0vsD1)) | |
629 | 626 | then { | |
630 | - | let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId) | |
631 | - | let estimLP = estPut._2 | |
632 | - | let lpAssetId = estPut._7 | |
633 | - | let state = estPut._9 | |
634 | - | let amDiff = estPut._10 | |
635 | - | let prDiff = estPut._11 | |
636 | - | let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage)) | |
637 | - | let emitLpAmt = toInt(lpCalcRes._2) | |
638 | - | let e = invoke(fca, "emit", [emitLpAmt], nil) | |
639 | - | if ((e == e)) | |
627 | + | let error = throw("error before estPut") | |
628 | + | if ((error == error)) | |
640 | 629 | then { | |
641 | - | let el = match e { | |
642 | - | case legacy: Address => | |
643 | - | invoke(legacy, "emit", [emitLpAmt], nil) | |
644 | - | case _ => | |
645 | - | unit | |
646 | - | } | |
647 | - | if ((el == el)) | |
630 | + | let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId) | |
631 | + | let estimLP = estPut._2 | |
632 | + | let lpAssetId = estPut._7 | |
633 | + | let state = estPut._9 | |
634 | + | let amDiff = estPut._10 | |
635 | + | let prDiff = estPut._11 | |
636 | + | let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage)) | |
637 | + | let emitLpAmt = toInt(lpCalcRes._2) | |
638 | + | let e = invoke(fca, "emit", [emitLpAmt], nil) | |
639 | + | if ((e == e)) | |
648 | 640 | then { | |
649 | - | let sa = if ((amDiff > 0)) | |
650 | - | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)]) | |
651 | - | else nil | |
652 | - | if ((sa == sa)) | |
641 | + | let el = match e { | |
642 | + | case legacy: Address => | |
643 | + | invoke(legacy, "emit", [emitLpAmt], nil) | |
644 | + | case _ => | |
645 | + | unit | |
646 | + | } | |
647 | + | if ((el == el)) | |
653 | 648 | then { | |
654 | - | let | |
655 | - | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String( | |
649 | + | let sa = if ((amDiff > 0)) | |
650 | + | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)]) | |
656 | 651 | else nil | |
657 | - | if (( | |
652 | + | if ((sa == sa)) | |
658 | 653 | then { | |
659 | - | let lpTrnsfr = if (autoStake) | |
654 | + | let sp = if ((prDiff > 0)) | |
655 | + | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)]) | |
656 | + | else nil | |
657 | + | if ((sp == sp)) | |
660 | 658 | then { | |
661 | - | let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
662 | - | if ((ss == ss)) | |
663 | - | then nil | |
664 | - | else throw("Strict value is not equal to itself.") | |
659 | + | let lpTrnsfr = if (autoStake) | |
660 | + | then { | |
661 | + | let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
662 | + | if ((ss == ss)) | |
663 | + | then nil | |
664 | + | else throw("Strict value is not equal to itself.") | |
665 | + | } | |
666 | + | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
667 | + | (state ++ lpTrnsfr) | |
665 | 668 | } | |
666 | - | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
667 | - | (state ++ lpTrnsfr) | |
669 | + | else throw("Strict value is not equal to itself.") | |
668 | 670 | } | |
669 | 671 | else throw("Strict value is not equal to itself.") | |
670 | 672 | } | |
732 | 734 | let pmtAssetId = value(pmt.assetId) | |
733 | 735 | let pmtAmt = pmt.amount | |
734 | 736 | let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid") | |
735 | - | let check = reentrantInvoke(addonContract, " | |
737 | + | let check = reentrantInvoke(addonContract, "ensureCanGetOrPutOneTkn", [toString(userAddress)], nil) | |
736 | 738 | if ((check == check)) | |
737 | 739 | then if ((1000000000 > pmtAmt)) | |
738 | 740 | then throw("Min pmt 10 LP") | |
750 | 752 | let estimPrAmt = r._2 | |
751 | 753 | let amBalance = getAccBalance(amId) | |
752 | 754 | let prBalance = getAccBalance(prId) | |
753 | - | let $ | |
755 | + | let $t03052830985 = if ((outAssetId == amId)) | |
754 | 756 | then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult)) | |
755 | 757 | else if ((outAssetId == prId)) | |
756 | 758 | then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult)) | |
757 | 759 | else throw("wrong outAssetId") | |
758 | - | let amBalanceNow = $ | |
759 | - | let prBalanceNow = $ | |
760 | - | let virtSwapInAm = $ | |
761 | - | let virtSwapOutPr = $ | |
762 | - | let virtSwapInPr = $ | |
763 | - | let virtSwapOutAm = $ | |
764 | - | let totalGet = $ | |
760 | + | let amBalanceNow = $t03052830985._1 | |
761 | + | let prBalanceNow = $t03052830985._2 | |
762 | + | let virtSwapInAm = $t03052830985._3 | |
763 | + | let virtSwapOutPr = $t03052830985._4 | |
764 | + | let virtSwapInPr = $t03052830985._5 | |
765 | + | let virtSwapOutAm = $t03052830985._6 | |
766 | + | let totalGet = $t03052830985._7 | |
765 | 767 | if (if ((0 > virtSwapInAm)) | |
766 | 768 | then true | |
767 | 769 | else (0 > virtSwapInPr)) | |
775 | 777 | let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage)) | |
776 | 778 | if ((finalRes == finalRes)) | |
777 | 779 | then { | |
778 | - | let $ | |
780 | + | let $t03169031794 = if ((outAssetId == amId)) | |
779 | 781 | then $Tuple2(toInt(finalRes._2), 0) | |
780 | 782 | else $Tuple2(0, toInt(finalRes._2)) | |
781 | - | let outAm = $ | |
782 | - | let outPr = $ | |
783 | + | let outAm = $t03169031794._1 | |
784 | + | let outPr = $t03169031794._2 | |
783 | 785 | let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm)) | |
784 | 786 | let curPr = f1(curPrX18, scale8) | |
785 | 787 | let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES")) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let scale8 = 100000000 | |
5 | 5 | ||
6 | 6 | let scale8BigInt = toBigInt(100000000) | |
7 | 7 | ||
8 | 8 | let scale18 = toBigInt(1000000000000000000) | |
9 | 9 | ||
10 | 10 | let zeroBigInt = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let oneBigInt = toBigInt(1) | |
13 | 13 | ||
14 | 14 | let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8))) | |
15 | 15 | ||
16 | 16 | let Amult = "100" | |
17 | 17 | ||
18 | 18 | let Dconv = "1" | |
19 | 19 | ||
20 | 20 | let SEP = "__" | |
21 | 21 | ||
22 | 22 | let EMPTY = "" | |
23 | 23 | ||
24 | 24 | let PoolActive = 1 | |
25 | 25 | ||
26 | 26 | let PoolPutDis = 2 | |
27 | 27 | ||
28 | 28 | let PoolMatcherDis = 3 | |
29 | 29 | ||
30 | 30 | let PoolShutdown = 4 | |
31 | 31 | ||
32 | 32 | let idxPoolAddress = 1 | |
33 | 33 | ||
34 | 34 | let idxPoolSt = 2 | |
35 | 35 | ||
36 | 36 | let idxLPAsId = 3 | |
37 | 37 | ||
38 | 38 | let idxAmAsId = 4 | |
39 | 39 | ||
40 | 40 | let idxPrAsId = 5 | |
41 | 41 | ||
42 | 42 | let idxAmtAsDcm = 6 | |
43 | 43 | ||
44 | 44 | let idxPriceAsDcm = 7 | |
45 | 45 | ||
46 | 46 | let idxIAmtAsId = 8 | |
47 | 47 | ||
48 | 48 | let idxIPriceAsId = 9 | |
49 | 49 | ||
50 | 50 | let idxFactStakCntr = 1 | |
51 | 51 | ||
52 | 52 | let idxFactSlippCntr = 7 | |
53 | 53 | ||
54 | 54 | let idxFactGwxRewCntr = 10 | |
55 | 55 | ||
56 | 56 | let delay = "%s__delay" | |
57 | 57 | ||
58 | 58 | func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func abs (val) = if ((zeroBigInt > val)) | |
68 | 68 | then -(val) | |
69 | 69 | else val | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func fc () = "%s__factoryContract" | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func mpk () = "%s__managerPublicKey" | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func pmpk () = "%s__pendingManagerPublicKey" | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func pl () = "%s%s__price__last" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func aa () = "%s__amountAsset" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func pa () = "%s__priceAsset" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func amp () = "%s__amp" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func ada () = "%s__addonAddr" | |
103 | 103 | ||
104 | 104 | ||
105 | - | func lgotc (caller) = makeString(["%s%s__lastGetOneTknCall", caller], SEP) | |
106 | - | ||
107 | - | ||
108 | - | func lsotc (caller) = makeString(["%s%s__lastPutOneTknCall", caller], SEP) | |
105 | + | func lgopotc (caller) = makeString(["%s%s__lastGetOrPutOneTknCall", caller], SEP) | |
109 | 106 | ||
110 | 107 | ||
111 | 108 | func fcfg () = "%s__factoryConfig" | |
112 | 109 | ||
113 | 110 | ||
114 | 111 | func mtpk () = "%s%s__matcher__publicKey" | |
115 | 112 | ||
116 | 113 | ||
117 | 114 | func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config") | |
118 | 115 | ||
119 | 116 | ||
120 | 117 | func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr) | |
121 | 118 | ||
122 | 119 | ||
123 | 120 | func aps () = "%s__shutdown" | |
124 | 121 | ||
125 | 122 | ||
126 | 123 | func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV))) | |
127 | 124 | ||
128 | 125 | ||
129 | 126 | func str (val) = match val { | |
130 | 127 | case valStr: String => | |
131 | 128 | valStr | |
132 | 129 | case _ => | |
133 | 130 | throw("fail cast to String") | |
134 | 131 | } | |
135 | 132 | ||
136 | 133 | ||
137 | 134 | func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
138 | 135 | ||
139 | 136 | ||
140 | 137 | func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], "")) | |
141 | 138 | ||
142 | 139 | ||
143 | 140 | let fca = addressFromStringValue(strf(this, fc())) | |
144 | 141 | ||
145 | 142 | let A = strf(this, amp()) | |
146 | 143 | ||
147 | 144 | func igs () = valueOrElse(getBoolean(fca, aps()), false) | |
148 | 145 | ||
149 | 146 | ||
150 | 147 | func mp () = fromBase58String(strf(fca, mtpk())) | |
151 | 148 | ||
152 | 149 | ||
153 | 150 | func gpc () = { | |
154 | 151 | let amtAs = strf(this, aa()) | |
155 | 152 | let priceAs = strf(this, pa()) | |
156 | 153 | let iPriceAs = intf(fca, mba(priceAs)) | |
157 | 154 | let iAmtAs = intf(fca, mba(amtAs)) | |
158 | 155 | split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP) | |
159 | 156 | } | |
160 | 157 | ||
161 | 158 | ||
162 | 159 | func gfc () = split(strf(fca, fcfg()), SEP) | |
163 | 160 | ||
164 | 161 | ||
165 | 162 | func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slipByUser,slippageReal,txHeight,txTimestamp,slipageAmAmt,slipagePrAmt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slipByUser), toString(slippageReal), toString(txHeight), toString(txTimestamp), toString(slipageAmAmt), toString(slipagePrAmt)], SEP) | |
166 | 163 | ||
167 | 164 | ||
168 | 165 | func dataGetActionInfo (outAmtAssetAmt,outPriceAssetAmt,inLpAmt,price,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d", toString(outAmtAssetAmt), toString(outPriceAssetAmt), toString(inLpAmt), toString(price), toString(txHeight), toString(txTimestamp)], SEP) | |
169 | 166 | ||
170 | 167 | ||
171 | 168 | func getAccBalance (assetId) = if ((assetId == "WAVES")) | |
172 | 169 | then wavesBalance(this).available | |
173 | 170 | else assetBalance(this, fromBase58String(assetId)) | |
174 | 171 | ||
175 | 172 | ||
176 | 173 | func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18) | |
177 | 174 | ||
178 | 175 | ||
179 | 176 | func vad (A1,A2,slippage) = { | |
180 | 177 | let diff = fraction((A1 - A2), scale8BigInt, A2) | |
181 | 178 | let pass = ((slippage - abs(diff)) > zeroBigInt) | |
182 | 179 | if (!(pass)) | |
183 | 180 | then throw(("Big slpg: " + toString(diff))) | |
184 | 181 | else $Tuple2(pass, min([A1, A2])) | |
185 | 182 | } | |
186 | 183 | ||
187 | 184 | ||
188 | 185 | func vd (D1,D0,slpg) = { | |
189 | 186 | let diff = fraction(D0, scale8BigInt, D1) | |
190 | 187 | let fail = (slpg > diff) | |
191 | 188 | if (if (fail) | |
192 | 189 | then true | |
193 | 190 | else (D0 > D1)) | |
194 | 191 | then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg))) | |
195 | 192 | else fail | |
196 | 193 | } | |
197 | 194 | ||
198 | 195 | ||
199 | 196 | func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = { | |
200 | 197 | let amtAsAmtX18 = t1(amAmt, amAssetDcm) | |
201 | 198 | let prAsAmtX18 = t1(prAmt, prAssetDcm) | |
202 | 199 | cpbi(prAsAmtX18, amtAsAmtX18) | |
203 | 200 | } | |
204 | 201 | ||
205 | 202 | ||
206 | 203 | func calcPrices (amAmt,prAmt,lpAmt) = { | |
207 | 204 | let cfg = gpc() | |
208 | 205 | let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
209 | 206 | let prAsDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
210 | 207 | let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt) | |
211 | 208 | let amAmtX18 = t1(amAmt, amtAsDcm) | |
212 | 209 | let prAmtX18 = t1(prAmt, prAsDcm) | |
213 | 210 | let lpAmtX18 = t1(lpAmt, scale8) | |
214 | 211 | let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18) | |
215 | 212 | let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18) | |
216 | 213 | [priceX18, lpPrInAmAsX18, lpPrInPrAsX18] | |
217 | 214 | } | |
218 | 215 | ||
219 | 216 | ||
220 | 217 | func calculatePrices (amAmt,prAmt,lpAmt) = { | |
221 | 218 | let p = calcPrices(amAmt, prAmt, lpAmt) | |
222 | 219 | [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)] | |
223 | 220 | } | |
224 | 221 | ||
225 | 222 | ||
226 | 223 | func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = { | |
227 | 224 | let cfg = gpc() | |
228 | 225 | let lpId = cfg[idxLPAsId] | |
229 | 226 | let amId = cfg[idxAmAsId] | |
230 | 227 | let prId = cfg[idxPrAsId] | |
231 | 228 | let amDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
232 | 229 | let prDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
233 | 230 | let sts = cfg[idxPoolSt] | |
234 | 231 | let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity | |
235 | 232 | if ((lpId != pmtAssetId)) | |
236 | 233 | then throw("Wrong pmt asset") | |
237 | 234 | else { | |
238 | 235 | let amBalance = getAccBalance(amId) | |
239 | 236 | let amBalanceX18 = t1(amBalance, amDcm) | |
240 | 237 | let prBalance = getAccBalance(prId) | |
241 | 238 | let prBalanceX18 = t1(prBalance, prDcm) | |
242 | 239 | let curPriceX18 = cpbi(prBalanceX18, amBalanceX18) | |
243 | 240 | let curPrice = f1(curPriceX18, scale8) | |
244 | 241 | let pmtLpAmtX18 = t1(pmtLpAmt, scale8) | |
245 | 242 | let lpEmissX18 = t1(lpEmiss, scale8) | |
246 | 243 | let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18) | |
247 | 244 | let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18) | |
248 | 245 | let outAmAmt = f1(outAmAmtX18, amDcm) | |
249 | 246 | let outPrAmt = f1(outPrAmtX18, prDcm) | |
250 | 247 | let state = if ((txId58 == "")) | |
251 | 248 | then nil | |
252 | 249 | else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES")) | |
253 | 250 | then unit | |
254 | 251 | else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES")) | |
255 | 252 | then unit | |
256 | 253 | else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, height, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice)] | |
257 | 254 | $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state) | |
258 | 255 | } | |
259 | 256 | } | |
260 | 257 | ||
261 | 258 | ||
262 | 259 | func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,pmtAmt,pmtId) = { | |
263 | 260 | let cfg = gpc() | |
264 | 261 | let lpId = fromBase58String(cfg[idxLPAsId]) | |
265 | 262 | let amIdStr = cfg[idxAmAsId] | |
266 | 263 | let prIdStr = cfg[idxPrAsId] | |
267 | 264 | let inAmIdStr = cfg[idxIAmtAsId] | |
268 | 265 | let inPrIdStr = cfg[idxIPriceAsId] | |
269 | 266 | let amtDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
270 | 267 | let priceDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
271 | 268 | let sts = cfg[idxPoolSt] | |
272 | 269 | let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity | |
273 | 270 | let amBalance = if (isEval) | |
274 | 271 | then getAccBalance(amIdStr) | |
275 | 272 | else if (if (isOneAsset) | |
276 | 273 | then (pmtId == amIdStr) | |
277 | 274 | else false) | |
278 | 275 | then (getAccBalance(amIdStr) - pmtAmt) | |
279 | 276 | else if (isOneAsset) | |
280 | 277 | then getAccBalance(amIdStr) | |
281 | 278 | else (getAccBalance(amIdStr) - inAmAmt) | |
282 | 279 | let prBalance = if (isEval) | |
283 | 280 | then getAccBalance(prIdStr) | |
284 | 281 | else if (if (isOneAsset) | |
285 | 282 | then (pmtId == prIdStr) | |
286 | 283 | else false) | |
287 | 284 | then (getAccBalance(prIdStr) - pmtAmt) | |
288 | 285 | else if (isOneAsset) | |
289 | 286 | then getAccBalance(prIdStr) | |
290 | 287 | else (getAccBalance(prIdStr) - inPrAmt) | |
291 | 288 | let inAmAssetAmtX18 = t1(inAmAmt, amtDcm) | |
292 | 289 | let inPrAssetAmtX18 = t1(inPrAmt, priceDcm) | |
293 | 290 | let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18) | |
294 | 291 | let amBalanceX18 = t1(amBalance, amtDcm) | |
295 | 292 | let prBalanceX18 = t1(prBalance, priceDcm) | |
296 | 293 | let r = if ((lpEm == 0)) | |
297 | 294 | then { | |
298 | 295 | let curPriceX18 = zeroBigInt | |
299 | 296 | let slippageX18 = zeroBigInt | |
300 | 297 | let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
301 | 298 | $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18) | |
302 | 299 | } | |
303 | 300 | else { | |
304 | 301 | let curPriceX18 = cpbi(prBalanceX18, amBalanceX18) | |
305 | 302 | let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18) | |
306 | 303 | let slippageX18 = t1(slippage, scale8) | |
307 | 304 | if (if ((curPriceX18 != zeroBigInt)) | |
308 | 305 | then (slippageRealX18 > slippageX18) | |
309 | 306 | else false) | |
310 | 307 | then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18))) | |
311 | 308 | else { | |
312 | 309 | let lpEmissionX18 = t1(lpEm, scale8) | |
313 | 310 | let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18) | |
314 | 311 | let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18) | |
315 | 312 | let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18)) | |
316 | 313 | then $Tuple2(amViaPrX18, inPrAssetAmtX18) | |
317 | 314 | else $Tuple2(inAmAssetAmtX18, prViaAmX18) | |
318 | 315 | let expAmtAssetAmtX18 = expectedAmts._1 | |
319 | 316 | let expPriceAssetAmtX18 = expectedAmts._2 | |
320 | 317 | let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18) | |
321 | 318 | $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18) | |
322 | 319 | } | |
323 | 320 | } | |
324 | 321 | let calcLpAmt = r._1 | |
325 | 322 | let calcAmAssetPmt = r._2 | |
326 | 323 | let calcPrAssetPmt = r._3 | |
327 | 324 | let curPrice = f1(r._4, scale8) | |
328 | 325 | let slippageCalc = f1(r._5, scale8) | |
329 | 326 | if ((0 >= calcLpAmt)) | |
330 | 327 | then throw("LP <= 0") | |
331 | 328 | else { | |
332 | 329 | let emitLpAmt = if (!(emitLp)) | |
333 | 330 | then 0 | |
334 | 331 | else calcLpAmt | |
335 | 332 | let amDiff = (inAmAmt - calcAmAssetPmt) | |
336 | 333 | let prDiff = (inPrAmt - calcPrAssetPmt) | |
337 | - | let $ | |
334 | + | let $t01572516070 = if (if (isOneAsset) | |
338 | 335 | then (pmtId == amIdStr) | |
339 | 336 | else false) | |
340 | 337 | then $Tuple2(pmtAmt, 0) | |
341 | 338 | else if (if (isOneAsset) | |
342 | 339 | then (pmtId == prIdStr) | |
343 | 340 | else false) | |
344 | 341 | then $Tuple2(0, pmtAmt) | |
345 | 342 | else $Tuple2(calcAmAssetPmt, calcPrAssetPmt) | |
346 | - | let writeAmAmt = $ | |
347 | - | let writePrAmt = $ | |
343 | + | let writeAmAmt = $t01572516070._1 | |
344 | + | let writePrAmt = $t01572516070._2 | |
348 | 345 | let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, height, lastBlock.timestamp, amDiff, prDiff))] | |
349 | 346 | $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId) | |
350 | 347 | } | |
351 | 348 | } | |
352 | 349 | ||
353 | 350 | ||
354 | 351 | func moa (order) = { | |
355 | 352 | let cfg = gpc() | |
356 | 353 | let amtAsId = cfg[idxAmAsId] | |
357 | 354 | let prAsId = cfg[idxPrAsId] | |
358 | 355 | let sts = parseIntValue(cfg[idxPoolSt]) | |
359 | 356 | let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
360 | 357 | let prAsDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
361 | 358 | let accAmtAsBalance = getAccBalance(amtAsId) | |
362 | 359 | let accPrAsBalance = getAccBalance(prAsId) | |
363 | 360 | let curPriceX18 = if ((order.orderType == Buy)) | |
364 | 361 | then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance) | |
365 | 362 | else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance) | |
366 | 363 | let curPrice = f1(curPriceX18, scale8) | |
367 | 364 | if (if (if (igs()) | |
368 | 365 | then true | |
369 | 366 | else (sts == PoolMatcherDis)) | |
370 | 367 | then true | |
371 | 368 | else (sts == PoolShutdown)) | |
372 | 369 | then throw("Admin blocked") | |
373 | 370 | else { | |
374 | 371 | let orAmtAsset = order.assetPair.amountAsset | |
375 | 372 | let orAmtAsStr = if ((orAmtAsset == unit)) | |
376 | 373 | then "WAVES" | |
377 | 374 | else toBase58String(value(orAmtAsset)) | |
378 | 375 | let orPrAsset = order.assetPair.priceAsset | |
379 | 376 | let orPrAsStr = if ((orPrAsset == unit)) | |
380 | 377 | then "WAVES" | |
381 | 378 | else toBase58String(value(orPrAsset)) | |
382 | 379 | if (if ((orAmtAsStr != amtAsId)) | |
383 | 380 | then true | |
384 | 381 | else (orPrAsStr != prAsId)) | |
385 | 382 | then throw("Wr assets") | |
386 | 383 | else { | |
387 | 384 | let orderPrice = order.price | |
388 | 385 | let priceDcm = fraction(scale8, prAsDcm, amtAsDcm) | |
389 | 386 | let castOrderPrice = ts(orderPrice, scale8, priceDcm) | |
390 | 387 | let isOrderPriceValid = if ((order.orderType == Buy)) | |
391 | 388 | then (curPrice >= castOrderPrice) | |
392 | 389 | else (castOrderPrice >= curPrice) | |
393 | 390 | true | |
394 | 391 | } | |
395 | 392 | } | |
396 | 393 | } | |
397 | 394 | ||
398 | 395 | ||
399 | 396 | func cg (i) = if ((size(i.payments) != 1)) | |
400 | 397 | then throw("1 pmnt exp") | |
401 | 398 | else { | |
402 | 399 | let pmt = value(i.payments[0]) | |
403 | 400 | let pmtAssetId = value(pmt.assetId) | |
404 | 401 | let pmtAmt = pmt.amount | |
405 | 402 | let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
406 | 403 | let outAmAmt = r._1 | |
407 | 404 | let outPrAmt = r._2 | |
408 | 405 | let sts = parseIntValue(r._9) | |
409 | 406 | let state = r._10 | |
410 | 407 | if (if (igs()) | |
411 | 408 | then true | |
412 | 409 | else (sts == PoolShutdown)) | |
413 | 410 | then throw(("Admin blocked: " + toString(sts))) | |
414 | 411 | else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state) | |
415 | 412 | } | |
416 | 413 | ||
417 | 414 | ||
418 | 415 | func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,pmtAmt,pmtId) = { | |
419 | 416 | let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp, isOneAsset, pmtAmt, pmtId) | |
420 | 417 | let sts = parseIntValue(r._8) | |
421 | 418 | if (if (if (igs()) | |
422 | 419 | then true | |
423 | 420 | else (sts == PoolPutDis)) | |
424 | 421 | then true | |
425 | 422 | else (sts == PoolShutdown)) | |
426 | 423 | then throw(("Blocked:" + toString(sts))) | |
427 | 424 | else r | |
428 | 425 | } | |
429 | 426 | ||
430 | 427 | ||
431 | 428 | func m () = match getString(mpk()) { | |
432 | 429 | case s: String => | |
433 | 430 | fromBase58String(s) | |
434 | 431 | case _: Unit => | |
435 | 432 | unit | |
436 | 433 | case _ => | |
437 | 434 | throw("Match error") | |
438 | 435 | } | |
439 | 436 | ||
440 | 437 | ||
441 | 438 | func pm () = match getString(pmpk()) { | |
442 | 439 | case s: String => | |
443 | 440 | fromBase58String(s) | |
444 | 441 | case _: Unit => | |
445 | 442 | unit | |
446 | 443 | case _ => | |
447 | 444 | throw("Match error") | |
448 | 445 | } | |
449 | 446 | ||
450 | 447 | ||
451 | 448 | let pd = throw("Permission denied") | |
452 | 449 | ||
453 | 450 | func mm (i) = match m() { | |
454 | 451 | case pk: ByteVector => | |
455 | 452 | if ((i.callerPublicKey == pk)) | |
456 | 453 | then true | |
457 | 454 | else pd | |
458 | 455 | case _: Unit => | |
459 | 456 | if ((i.caller == this)) | |
460 | 457 | then true | |
461 | 458 | else pd | |
462 | 459 | case _ => | |
463 | 460 | throw("Match error") | |
464 | 461 | } | |
465 | 462 | ||
466 | 463 | ||
467 | 464 | @Callable(i) | |
468 | - | func constructor (fc) = { | |
465 | + | func constructor (fc,aa) = { | |
469 | 466 | let c = mm(i) | |
470 | 467 | if ((c == c)) | |
471 | 468 | then [StringEntry(fc(), fc)] | |
472 | 469 | else throw("Strict value is not equal to itself.") | |
473 | 470 | } | |
474 | 471 | ||
475 | 472 | ||
476 | 473 | ||
477 | 474 | @Callable(i) | |
478 | 475 | func setManager (pendingManagerPublicKey) = { | |
479 | 476 | let c = mm(i) | |
480 | 477 | if ((c == c)) | |
481 | 478 | then { | |
482 | 479 | let cm = fromBase58String(pendingManagerPublicKey) | |
483 | 480 | if ((cm == cm)) | |
484 | 481 | then [StringEntry(pmpk(), pendingManagerPublicKey)] | |
485 | 482 | else throw("Strict value is not equal to itself.") | |
486 | 483 | } | |
487 | 484 | else throw("Strict value is not equal to itself.") | |
488 | 485 | } | |
489 | 486 | ||
490 | 487 | ||
491 | 488 | ||
492 | 489 | @Callable(i) | |
493 | 490 | func confirmManager () = { | |
494 | 491 | let p = pm() | |
495 | 492 | let hpm = if (isDefined(p)) | |
496 | 493 | then true | |
497 | 494 | else throw("No pending manager") | |
498 | 495 | if ((hpm == hpm)) | |
499 | 496 | then { | |
500 | 497 | let cpm = if ((i.callerPublicKey == value(p))) | |
501 | 498 | then true | |
502 | 499 | else throw("You are not pending manager") | |
503 | 500 | if ((cpm == cpm)) | |
504 | 501 | then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())] | |
505 | 502 | else throw("Strict value is not equal to itself.") | |
506 | 503 | } | |
507 | 504 | else throw("Strict value is not equal to itself.") | |
508 | 505 | } | |
509 | 506 | ||
510 | 507 | ||
511 | 508 | ||
512 | 509 | @Callable(i) | |
513 | 510 | func put (slip,autoStake) = { | |
514 | 511 | let factCfg = gfc() | |
515 | 512 | let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr") | |
516 | 513 | let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr") | |
517 | 514 | if ((0 > slip)) | |
518 | 515 | then throw("Wrong slippage") | |
519 | 516 | else if ((size(i.payments) != 2)) | |
520 | 517 | then throw("2 pmnts expd") | |
521 | 518 | else { | |
522 | 519 | let e = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], slip, true, false, 0, "") | |
523 | 520 | let emitLpAmt = e._2 | |
524 | 521 | let lpAssetId = e._7 | |
525 | 522 | let state = e._9 | |
526 | 523 | let amDiff = e._10 | |
527 | 524 | let prDiff = e._11 | |
528 | 525 | let amId = e._12 | |
529 | 526 | let prId = e._13 | |
530 | 527 | let r = invoke(fca, "emit", [emitLpAmt], nil) | |
531 | 528 | if ((r == r)) | |
532 | 529 | then { | |
533 | 530 | let el = match r { | |
534 | 531 | case legacy: Address => | |
535 | 532 | invoke(legacy, "emit", [emitLpAmt], nil) | |
536 | 533 | case _ => | |
537 | 534 | unit | |
538 | 535 | } | |
539 | 536 | if ((el == el)) | |
540 | 537 | then { | |
541 | 538 | let sa = if ((amDiff > 0)) | |
542 | 539 | then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)]) | |
543 | 540 | else nil | |
544 | 541 | if ((sa == sa)) | |
545 | 542 | then { | |
546 | 543 | let sp = if ((prDiff > 0)) | |
547 | 544 | then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)]) | |
548 | 545 | else nil | |
549 | 546 | if ((sp == sp)) | |
550 | 547 | then { | |
551 | 548 | let lpTrnsfr = if (autoStake) | |
552 | 549 | then { | |
553 | 550 | let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
554 | 551 | if ((ss == ss)) | |
555 | 552 | then nil | |
556 | 553 | else throw("Strict value is not equal to itself.") | |
557 | 554 | } | |
558 | 555 | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
559 | 556 | (state ++ lpTrnsfr) | |
560 | 557 | } | |
561 | 558 | else throw("Strict value is not equal to itself.") | |
562 | 559 | } | |
563 | 560 | else throw("Strict value is not equal to itself.") | |
564 | 561 | } | |
565 | 562 | else throw("Strict value is not equal to itself.") | |
566 | 563 | } | |
567 | 564 | else throw("Strict value is not equal to itself.") | |
568 | 565 | } | |
569 | 566 | } | |
570 | 567 | ||
571 | 568 | ||
572 | 569 | ||
573 | 570 | @Callable(i) | |
574 | 571 | func putOneTkn (amAssetPart,prAssetPart,outLp,slippage,autoStake) = { | |
575 | 572 | let cfg = gfc() | |
576 | 573 | let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wr st addr") | |
577 | 574 | let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wr sl addr") | |
578 | 575 | let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wr gwx addr") | |
579 | 576 | let poolCfg = gpc() | |
580 | 577 | let amId = poolCfg[idxAmAsId] | |
581 | 578 | let prId = poolCfg[idxPrAsId] | |
582 | 579 | let amDcm = parseIntValue(poolCfg[idxAmtAsDcm]) | |
583 | 580 | let prDcm = parseIntValue(poolCfg[idxPriceAsDcm]) | |
584 | 581 | let addon = valueOrElse(getString(this, ada()), "") | |
585 | 582 | let userAddress = if ((addon == toString(i.caller))) | |
586 | 583 | then i.originCaller | |
587 | 584 | else i.caller | |
588 | 585 | let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid") | |
589 | - | let check = reentrantInvoke(addonContract, " | |
586 | + | let check = reentrantInvoke(addonContract, "ensureCanGetOrPutOneTkn", [toString(userAddress)], nil) | |
590 | 587 | if ((check == check)) | |
591 | 588 | then if (if (if (if ((0 >= slippage)) | |
592 | 589 | then true | |
593 | 590 | else (0 >= amAssetPart)) | |
594 | 591 | then true | |
595 | 592 | else (0 >= prAssetPart)) | |
596 | 593 | then true | |
597 | 594 | else (0 >= outLp)) | |
598 | 595 | then throw("Wrong params") | |
599 | 596 | else if ((size(i.payments) != 1)) | |
600 | 597 | then throw("1 pmnt expd") | |
601 | 598 | else { | |
602 | 599 | let pmt = value(i.payments[0]) | |
603 | 600 | let pmtAssetId = toBase58String(value(pmt.assetId)) | |
604 | 601 | let pmtAmt = pmt.amount | |
605 | 602 | if (if (if ((amAssetPart > pmtAmt)) | |
606 | 603 | then true | |
607 | 604 | else (prAssetPart > pmtAmt)) | |
608 | 605 | then true | |
609 | 606 | else (10000000 > pmtAmt)) | |
610 | 607 | then throw("Wrong pmt amt") | |
611 | 608 | else { | |
612 | 609 | let amBalance = getAccBalance(amId) | |
613 | 610 | let prBalance = getAccBalance(prId) | |
614 | - | let $ | |
611 | + | let $t02506325443 = if ((pmtAssetId == amId)) | |
615 | 612 | then $Tuple6((amBalance - pmtAmt), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0) | |
616 | 613 | else if ((pmtAssetId == prId)) | |
617 | 614 | then $Tuple6(amBalance, (prBalance - pmtAmt), 0, 0, (pmtAmt - prAssetPart), amAssetPart) | |
618 | 615 | else throw("wrong pmtAssetId") | |
619 | - | let amBalanceNow = $ | |
620 | - | let prBalanceNow = $ | |
621 | - | let virtSwapInAm = $ | |
622 | - | let virtSwapOutPr = $ | |
623 | - | let virtSwapInPr = $ | |
624 | - | let virtSwapOutAm = $ | |
616 | + | let amBalanceNow = $t02506325443._1 | |
617 | + | let prBalanceNow = $t02506325443._2 | |
618 | + | let virtSwapInAm = $t02506325443._3 | |
619 | + | let virtSwapOutPr = $t02506325443._4 | |
620 | + | let virtSwapInPr = $t02506325443._5 | |
621 | + | let virtSwapOutAm = $t02506325443._6 | |
625 | 622 | let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil) | |
626 | 623 | let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil) | |
627 | 624 | let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D) | |
628 | 625 | if ((D0vsD1 == D0vsD1)) | |
629 | 626 | then { | |
630 | - | let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId) | |
631 | - | let estimLP = estPut._2 | |
632 | - | let lpAssetId = estPut._7 | |
633 | - | let state = estPut._9 | |
634 | - | let amDiff = estPut._10 | |
635 | - | let prDiff = estPut._11 | |
636 | - | let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage)) | |
637 | - | let emitLpAmt = toInt(lpCalcRes._2) | |
638 | - | let e = invoke(fca, "emit", [emitLpAmt], nil) | |
639 | - | if ((e == e)) | |
627 | + | let error = throw("error before estPut") | |
628 | + | if ((error == error)) | |
640 | 629 | then { | |
641 | - | let el = match e { | |
642 | - | case legacy: Address => | |
643 | - | invoke(legacy, "emit", [emitLpAmt], nil) | |
644 | - | case _ => | |
645 | - | unit | |
646 | - | } | |
647 | - | if ((el == el)) | |
630 | + | let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, pmtAmt, pmtAssetId) | |
631 | + | let estimLP = estPut._2 | |
632 | + | let lpAssetId = estPut._7 | |
633 | + | let state = estPut._9 | |
634 | + | let amDiff = estPut._10 | |
635 | + | let prDiff = estPut._11 | |
636 | + | let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage)) | |
637 | + | let emitLpAmt = toInt(lpCalcRes._2) | |
638 | + | let e = invoke(fca, "emit", [emitLpAmt], nil) | |
639 | + | if ((e == e)) | |
648 | 640 | then { | |
649 | - | let sa = if ((amDiff > 0)) | |
650 | - | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)]) | |
651 | - | else nil | |
652 | - | if ((sa == sa)) | |
641 | + | let el = match e { | |
642 | + | case legacy: Address => | |
643 | + | invoke(legacy, "emit", [emitLpAmt], nil) | |
644 | + | case _ => | |
645 | + | unit | |
646 | + | } | |
647 | + | if ((el == el)) | |
653 | 648 | then { | |
654 | - | let | |
655 | - | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String( | |
649 | + | let sa = if ((amDiff > 0)) | |
650 | + | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)]) | |
656 | 651 | else nil | |
657 | - | if (( | |
652 | + | if ((sa == sa)) | |
658 | 653 | then { | |
659 | - | let lpTrnsfr = if (autoStake) | |
654 | + | let sp = if ((prDiff > 0)) | |
655 | + | then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)]) | |
656 | + | else nil | |
657 | + | if ((sp == sp)) | |
660 | 658 | then { | |
661 | - | let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
662 | - | if ((ss == ss)) | |
663 | - | then nil | |
664 | - | else throw("Strict value is not equal to itself.") | |
659 | + | let lpTrnsfr = if (autoStake) | |
660 | + | then { | |
661 | + | let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)]) | |
662 | + | if ((ss == ss)) | |
663 | + | then nil | |
664 | + | else throw("Strict value is not equal to itself.") | |
665 | + | } | |
666 | + | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
667 | + | (state ++ lpTrnsfr) | |
665 | 668 | } | |
666 | - | else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)] | |
667 | - | (state ++ lpTrnsfr) | |
669 | + | else throw("Strict value is not equal to itself.") | |
668 | 670 | } | |
669 | 671 | else throw("Strict value is not equal to itself.") | |
670 | 672 | } | |
671 | 673 | else throw("Strict value is not equal to itself.") | |
672 | 674 | } | |
673 | 675 | else throw("Strict value is not equal to itself.") | |
674 | 676 | } | |
675 | 677 | else throw("Strict value is not equal to itself.") | |
676 | 678 | } | |
677 | 679 | else throw("Strict value is not equal to itself.") | |
678 | 680 | } | |
679 | 681 | } | |
680 | 682 | else throw("Strict value is not equal to itself.") | |
681 | 683 | } | |
682 | 684 | ||
683 | 685 | ||
684 | 686 | ||
685 | 687 | @Callable(i) | |
686 | 688 | func putForFree (maxSlpg) = if ((0 > maxSlpg)) | |
687 | 689 | then throw("Wrong slpg") | |
688 | 690 | else if ((size(i.payments) != 2)) | |
689 | 691 | then throw("2 pmnts expd") | |
690 | 692 | else { | |
691 | 693 | let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(value(i.payments[0]).assetId, value(i.payments[0]).amount), i.payments[1], maxSlpg, false, false, 0, "") | |
692 | 694 | estPut._9 | |
693 | 695 | } | |
694 | 696 | ||
695 | 697 | ||
696 | 698 | ||
697 | 699 | @Callable(i) | |
698 | 700 | func get () = { | |
699 | 701 | let r = cg(i) | |
700 | 702 | let outAmtAmt = r._1 | |
701 | 703 | let outPrAmt = r._2 | |
702 | 704 | let pmtAmt = r._3 | |
703 | 705 | let pmtAssetId = r._4 | |
704 | 706 | let state = r._5 | |
705 | 707 | let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
706 | 708 | if ((b == b)) | |
707 | 709 | then state | |
708 | 710 | else throw("Strict value is not equal to itself.") | |
709 | 711 | } | |
710 | 712 | ||
711 | 713 | ||
712 | 714 | ||
713 | 715 | @Callable(i) | |
714 | 716 | func getOneTkn (exchResult,notUsed,outAmount,outAssetId,slippage) = if ((size(i.payments) != 1)) | |
715 | 717 | then throw("1 pmnt expd") | |
716 | 718 | else { | |
717 | 719 | let cfg = gpc() | |
718 | 720 | let lpId = cfg[idxLPAsId] | |
719 | 721 | let amId = cfg[idxAmAsId] | |
720 | 722 | let prId = cfg[idxPrAsId] | |
721 | 723 | let amDcm = parseIntValue(cfg[idxAmtAsDcm]) | |
722 | 724 | let prDcm = parseIntValue(cfg[idxPriceAsDcm]) | |
723 | 725 | let sts = cfg[idxPoolSt] | |
724 | 726 | let factCfg = gfc() | |
725 | 727 | let gwxCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactGwxRewCntr]), "Wr sl addr") | |
726 | 728 | let pmt = value(i.payments[0]) | |
727 | 729 | let addon = valueOrElse(getString(this, ada()), "") | |
728 | 730 | let userAddress = if ((addon == toString(i.caller))) | |
729 | 731 | then i.originCaller | |
730 | 732 | else i.caller | |
731 | 733 | let txId58 = toBase58String(i.transactionId) | |
732 | 734 | let pmtAssetId = value(pmt.assetId) | |
733 | 735 | let pmtAmt = pmt.amount | |
734 | 736 | let addonContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(ada()), "no addons")), "addon address in not valid") | |
735 | - | let check = reentrantInvoke(addonContract, " | |
737 | + | let check = reentrantInvoke(addonContract, "ensureCanGetOrPutOneTkn", [toString(userAddress)], nil) | |
736 | 738 | if ((check == check)) | |
737 | 739 | then if ((1000000000 > pmtAmt)) | |
738 | 740 | then throw("Min pmt 10 LP") | |
739 | 741 | else if (if (if ((0 > slippage)) | |
740 | 742 | then true | |
741 | 743 | else (0 > exchResult)) | |
742 | 744 | then true | |
743 | 745 | else (0 > outAmount)) | |
744 | 746 | then throw("Wrong params") | |
745 | 747 | else if ((lpId != toBase58String(pmtAssetId))) | |
746 | 748 | then throw("Wrong LP") | |
747 | 749 | else { | |
748 | 750 | let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller) | |
749 | 751 | let estimAmAmt = r._1 | |
750 | 752 | let estimPrAmt = r._2 | |
751 | 753 | let amBalance = getAccBalance(amId) | |
752 | 754 | let prBalance = getAccBalance(prId) | |
753 | - | let $ | |
755 | + | let $t03052830985 = if ((outAssetId == amId)) | |
754 | 756 | then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult)) | |
755 | 757 | else if ((outAssetId == prId)) | |
756 | 758 | then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult)) | |
757 | 759 | else throw("wrong outAssetId") | |
758 | - | let amBalanceNow = $ | |
759 | - | let prBalanceNow = $ | |
760 | - | let virtSwapInAm = $ | |
761 | - | let virtSwapOutPr = $ | |
762 | - | let virtSwapInPr = $ | |
763 | - | let virtSwapOutAm = $ | |
764 | - | let totalGet = $ | |
760 | + | let amBalanceNow = $t03052830985._1 | |
761 | + | let prBalanceNow = $t03052830985._2 | |
762 | + | let virtSwapInAm = $t03052830985._3 | |
763 | + | let virtSwapOutPr = $t03052830985._4 | |
764 | + | let virtSwapInPr = $t03052830985._5 | |
765 | + | let virtSwapOutAm = $t03052830985._6 | |
766 | + | let totalGet = $t03052830985._7 | |
765 | 767 | if (if ((0 > virtSwapInAm)) | |
766 | 768 | then true | |
767 | 769 | else (0 > virtSwapInPr)) | |
768 | 770 | then throw("Wrong calc") | |
769 | 771 | else { | |
770 | 772 | let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil) | |
771 | 773 | let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil) | |
772 | 774 | let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D) | |
773 | 775 | if ((D0vsD1 == D0vsD1)) | |
774 | 776 | then { | |
775 | 777 | let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage)) | |
776 | 778 | if ((finalRes == finalRes)) | |
777 | 779 | then { | |
778 | - | let $ | |
780 | + | let $t03169031794 = if ((outAssetId == amId)) | |
779 | 781 | then $Tuple2(toInt(finalRes._2), 0) | |
780 | 782 | else $Tuple2(0, toInt(finalRes._2)) | |
781 | - | let outAm = $ | |
782 | - | let outPr = $ | |
783 | + | let outAm = $t03169031794._1 | |
784 | + | let outPr = $t03169031794._2 | |
783 | 785 | let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm)) | |
784 | 786 | let curPr = f1(curPrX18, scale8) | |
785 | 787 | let state = [ScriptTransfer(userAddress, (outAm + outPr), if ((outAssetId == "WAVES")) | |
786 | 788 | then unit | |
787 | 789 | else fromBase58String(outAssetId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] | |
788 | 790 | if ((state == state)) | |
789 | 791 | then { | |
790 | 792 | let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
791 | 793 | if ((burn == burn)) | |
792 | 794 | then state | |
793 | 795 | else throw("Strict value is not equal to itself.") | |
794 | 796 | } | |
795 | 797 | else throw("Strict value is not equal to itself.") | |
796 | 798 | } | |
797 | 799 | else throw("Strict value is not equal to itself.") | |
798 | 800 | } | |
799 | 801 | else throw("Strict value is not equal to itself.") | |
800 | 802 | } | |
801 | 803 | } | |
802 | 804 | else throw("Strict value is not equal to itself.") | |
803 | 805 | } | |
804 | 806 | ||
805 | 807 | ||
806 | 808 | ||
807 | 809 | @Callable(i) | |
808 | 810 | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
809 | 811 | let r = cg(i) | |
810 | 812 | let outAmAmt = r._1 | |
811 | 813 | let outPrAmt = r._2 | |
812 | 814 | let pmtAmt = r._3 | |
813 | 815 | let pmtAssetId = r._4 | |
814 | 816 | let state = r._5 | |
815 | 817 | if ((noLessThenAmtAsset > outAmAmt)) | |
816 | 818 | then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
817 | 819 | else if ((noLessThenPriceAsset > outPrAmt)) | |
818 | 820 | then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
819 | 821 | else { | |
820 | 822 | let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)]) | |
821 | 823 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
822 | 824 | then state | |
823 | 825 | else throw("Strict value is not equal to itself.") | |
824 | 826 | } | |
825 | 827 | } | |
826 | 828 | ||
827 | 829 | ||
828 | 830 | ||
829 | 831 | @Callable(i) | |
830 | 832 | func unstakeAndGet (amount) = { | |
831 | 833 | let checkPayments = if ((size(i.payments) != 0)) | |
832 | 834 | then throw("No pmnts expd") | |
833 | 835 | else true | |
834 | 836 | if ((checkPayments == checkPayments)) | |
835 | 837 | then { | |
836 | 838 | let cfg = gpc() | |
837 | 839 | let factoryCfg = gfc() | |
838 | 840 | let lpAssetId = fromBase58String(cfg[idxLPAsId]) | |
839 | 841 | let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr") | |
840 | 842 | let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil) | |
841 | 843 | if ((unstakeInv == unstakeInv)) | |
842 | 844 | then { | |
843 | 845 | let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller) | |
844 | 846 | let sts = parseIntValue(r._9) | |
845 | 847 | let state = r._10 | |
846 | 848 | let v = if (if (igs()) | |
847 | 849 | then true | |
848 | 850 | else (sts == PoolShutdown)) | |
849 | 851 | then throw(("Blocked: " + toString(sts))) | |
850 | 852 | else true | |
851 | 853 | if ((v == v)) | |
852 | 854 | then { | |
853 | 855 | let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)]) | |
854 | 856 | if ((burnA == burnA)) | |
855 | 857 | then state | |
856 | 858 | else throw("Strict value is not equal to itself.") | |
857 | 859 | } | |
858 | 860 | else throw("Strict value is not equal to itself.") | |
859 | 861 | } | |
860 | 862 | else throw("Strict value is not equal to itself.") | |
861 | 863 | } | |
862 | 864 | else throw("Strict value is not equal to itself.") | |
863 | 865 | } | |
864 | 866 | ||
865 | 867 | ||
866 | 868 | ||
867 | 869 | @Callable(i) | |
868 | 870 | func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca))) | |
869 | 871 | then throw("denied") | |
870 | 872 | else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success") | |
871 | 873 | ||
872 | 874 | ||
873 | 875 | ||
874 | 876 | @Callable(i) | |
875 | 877 | func setS (k,v) = if ((toString(i.caller) != strf(this, ada()))) | |
876 | 878 | then pd | |
877 | 879 | else [StringEntry(k, v)] | |
878 | 880 | ||
879 | 881 | ||
880 | 882 | ||
881 | 883 | @Callable(i) | |
882 | 884 | func setI (k,v) = if ((toString(i.caller) != strf(this, ada()))) | |
883 | 885 | then pd | |
884 | 886 | else [IntegerEntry(k, v)] | |
885 | 887 | ||
886 | 888 | ||
887 | 889 | ||
888 | 890 | @Callable(i) | |
889 | 891 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc()) | |
890 | 892 | ||
891 | 893 | ||
892 | 894 | ||
893 | 895 | @Callable(i) | |
894 | 896 | func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId)) | |
895 | 897 | ||
896 | 898 | ||
897 | 899 | ||
898 | 900 | @Callable(i) | |
899 | 901 | func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = { | |
900 | 902 | let pr = calcPrices(amAmt, prAmt, lpAmt) | |
901 | 903 | $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])]) | |
902 | 904 | } | |
903 | 905 | ||
904 | 906 | ||
905 | 907 | ||
906 | 908 | @Callable(i) | |
907 | 909 | func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult)) | |
908 | 910 | ||
909 | 911 | ||
910 | 912 | ||
911 | 913 | @Callable(i) | |
912 | 914 | func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult))) | |
913 | 915 | ||
914 | 916 | ||
915 | 917 | ||
916 | 918 | @Callable(i) | |
917 | 919 | func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18)))) | |
918 | 920 | ||
919 | 921 | ||
920 | 922 | ||
921 | 923 | @Callable(i) | |
922 | 924 | func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, false, 0, "")) | |
923 | 925 | ||
924 | 926 | ||
925 | 927 | ||
926 | 928 | @Callable(i) | |
927 | 929 | func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = { | |
928 | 930 | let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr)) | |
929 | 931 | $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10)) | |
930 | 932 | } | |
931 | 933 | ||
932 | 934 | ||
933 | 935 | @Verifier(tx) | |
934 | 936 | func verify () = match tx { | |
935 | 937 | case order: Order => | |
936 | 938 | let mtchPub = mp() | |
937 | 939 | let orV = moa(order) | |
938 | 940 | let sndrV = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey) | |
939 | 941 | let mtchV = sigVerify(order.bodyBytes, order.proofs[1], mtchPub) | |
940 | 942 | if (if (if (orV) | |
941 | 943 | then sndrV | |
942 | 944 | else false) | |
943 | 945 | then mtchV | |
944 | 946 | else false) | |
945 | 947 | then true | |
946 | 948 | else toe(orV, sndrV, mtchV) | |
947 | 949 | case _ => | |
948 | 950 | let targetPublicKey = match m() { | |
949 | 951 | case pk: ByteVector => | |
950 | 952 | pk | |
951 | 953 | case _: Unit => | |
952 | 954 | tx.senderPublicKey | |
953 | 955 | case _ => | |
954 | 956 | throw("Match error") | |
955 | 957 | } | |
956 | 958 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
957 | 959 | } | |
958 | 960 |
github/deemru/w8io/026f985 114.79 ms ◑