tx · 5pdDnJMzxJfnswHSVFBrATAceTDnSPi9ofcbNBAWR22Z

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04000000 Waves

2023.02.09 22:45 [2442518] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "5pdDnJMzxJfnswHSVFBrATAceTDnSPi9ofcbNBAWR22Z", "fee": 4000000, "feeAssetId": null, "timestamp": 1675971917464, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3rVanP7tZTLm3V8nzPaymo7ZiVQzf1iZuTbrqg7Bj9v5L6RNQHy5EpN615xMJ9BwzXCYLPoaqGuBdMMhHQV6QTUN" ], "script": "base64:BgLlKggCEgQKAgEEEgYKBAEEAQgSAwoBCBIDCgEIEgASBAoCAQQSBAoCAQQSAwoBARIAEgQKAggBEgASBAoCCAESBAoCCAESBAoCAQESAwoBARIFCgMBAQESBQoDAQgBEgQKAgEIEgQKAgEIEgQKAggIEgQKAggIEgQKAggBEgASAwoBCBIFCgMBAQESBAoCCAESBAoCAQESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyILdGVzc3R0dGluZ2ciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQX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IIBQJmYQZwcm9vZnMAAAgFAmZhD3NlbmRlclB1YmxpY0tleQQCYUoJAPQDAwgFAmZhCWJvZHlCeXRlcwkAkQMCCAUCZmEGcHJvb2ZzAAEFAmlrAwMDBQJhRwUCYUkHBQJhSgcGCQECYUYEBQJhRwUCYUgFAmFJBQJhSgMJAAECBQJnbQIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmNEBQJnbQMJAPQDAwgFAmloCWJvZHlCeXRlcwkAkQMCCAUCaWgGcHJvb2ZzAAAFAmlqBgQCaW0JAPYDAQkBBXZhbHVlAQgFAmNEBnNjcmlwdAQCaW4JANsEAQkBBXZhbHVlAQkAnQgCBQJhUgkBAmFEAAQCaW8JAPEHAQUEdGhpcwMJAAACBQJpbgUCaW0JAQIhPQIFAmlvBQJpbQcJAPQDAwgFAmloCWJvZHlCeXRlcwkAkQMCCAUCaWgGcHJvb2ZzAAAFAmlqbhIQfA==", "height": 2442518, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 78Q9YzptySaeaRYQE2Epdu7Pxwd6nBmPcqxKo1KXXSfU Next: ECKrAvdGMvjzTzQKQ8tnPqRDVBLbHYfHmRh9KM5P9dyw Diff:
OldNewDifferences
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
25+
26+let tesstttingg = 1
2527
2628 let Amult = "100"
2729
231233
232234 let poolConfigParsed = parsePoolConfig(gpc())
233235
234-let $t079658194 = poolConfigParsed
236+let $t079848213 = poolConfigParsed
235237
236-let cfgPoolAddress = $t079658194._1
238+let cfgPoolAddress = $t079848213._1
237239
238-let cfgPoolStatus = $t079658194._2
240+let cfgPoolStatus = $t079848213._2
239241
240-let cfgLpAssetId = $t079658194._3
242+let cfgLpAssetId = $t079848213._3
241243
242-let cfgAmountAssetId = $t079658194._4
244+let cfgAmountAssetId = $t079848213._4
243245
244-let cfgPriceAssetId = $t079658194._5
246+let cfgPriceAssetId = $t079848213._5
245247
246-let cfgAmountAssetDecimals = $t079658194._6
248+let cfgAmountAssetDecimals = $t079848213._6
247249
248-let cfgPriceAssetDecimals = $t079658194._7
250+let cfgPriceAssetDecimals = $t079848213._7
249251
250-let cfgInAmountAssedId = $t079658194._8
252+let cfgInAmountAssedId = $t079848213._8
251253
252-let cfgInPriceAssetId = $t079658194._9
254+let cfgInPriceAssetId = $t079848213._9
253255
254256 func gfc () = split(strf(fca, fcfg()), SEP)
255257
370372 }
371373
372374 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
373- let $t01269112739 = {
375+ let $t01271012758 = {
374376 let $l = arr
375377 let $s = size($l)
376378 let $acc0 = $Tuple2(s, false)
384386
385387 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
386388 }
387- let d = $t01269112739._1
388- let found = $t01269112739._2
389+ let d = $t01271012758._1
390+ let found = $t01271012758._2
389391 if (found)
390392 then d
391393 else throw(("D calculation error, D = " + toString(d)))
521523 else calcLpAmt
522524 let amDiff = (inAmAmt - calcAmAssetPmt)
523525 let prDiff = (inPrAmt - calcPrAssetPmt)
524- let $t02057820923 = if (if (isOneAsset)
526+ let $t02059720942 = if (if (isOneAsset)
525527 then (pmtId == amIdStr)
526528 else false)
527529 then $Tuple2(pmtAmt, 0)
530532 else false)
531533 then $Tuple2(0, pmtAmt)
532534 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
533- let writeAmAmt = $t02057820923._1
534- let writePrAmt = $t02057820923._2
535+ let writeAmAmt = $t02059720942._1
536+ let writePrAmt = $t02059720942._2
535537 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))]
536538 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
537539 }
550552 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
551553 let b = ((s + ((D * aPrecision) / ann)) - D)
552554 func calc (acc,cur) = {
553- let $t02211822138 = acc
554- let y = $t02211822138._1
555- let found = $t02211822138._2
555+ let $t02213722157 = acc
556+ let y = $t02213722157._1
557+ let found = $t02213722157._2
556558 if ((found != unit))
557559 then acc
558560 else {
565567 }
566568
567569 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let $t02244522492 = {
570+ let $t02246422511 = {
569571 let $l = arr
570572 let $s = size($l)
571573 let $acc0 = $Tuple2(D, unit)
579581
580582 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581583 }
582- let y = $t02244522492._1
583- let found = $t02244522492._2
584+ let y = $t02246422511._1
585+ let found = $t02246422511._2
584586 if ((found != unit))
585587 then y
586588 else throw(("Y calculation error, Y = " + toString(y)))
624626 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
625627 let amountAssetAmount = order.amount
626628 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
627- let $t02469024902 = if ((order.orderType == Buy))
629+ let $t02470924921 = if ((order.orderType == Buy))
628630 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
629631 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
630- let amountAssetBalanceDelta = $t02469024902._1
631- let priceAssetBalanceDelta = $t02469024902._2
632+ let amountAssetBalanceDelta = $t02470924921._1
633+ let priceAssetBalanceDelta = $t02470924921._2
632634 if (if (if (igs())
633635 then true
634636 else (cfgPoolStatus == PoolMatcherDis))
641643 then throw("Wr assets")
642644 else {
643645 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
644- let $t02524425344 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645- let unusedActions = $t02524425344._1
646- let dLpNew = $t02524425344._2
646+ let $t02526325363 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
647+ let unusedActions = $t02526325363._1
648+ let dLpNew = $t02526325363._2
647649 let isOrderValid = (dLpNew >= dLp)
648650 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
649651 $Tuple2(isOrderValid, info)
697699 then {
698700 let amBalance = getAccBalance(amId)
699701 let prBalance = getAccBalance(prId)
700- let $t02800028462 = if ((txId == ""))
702+ let $t02801928481 = if ((txId == ""))
701703 then $Tuple2(amBalance, prBalance)
702704 else if ((pmtAssetId == amId))
703705 then if ((pmtAmtRaw > amBalance))
708710 then throw("invalid payment amount")
709711 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
710712 else throw("wrong pmtAssetId")
711- let amBalanceOld = $t02800028462._1
712- let prBalanceOld = $t02800028462._2
713- let $t02846828644 = if ((pmtAssetId == amId))
713+ let amBalanceOld = $t02801928481._1
714+ let prBalanceOld = $t02801928481._2
715+ let $t02848728663 = if ((pmtAssetId == amId))
714716 then $Tuple2(pmtAmtRaw, 0)
715717 else if ((pmtAssetId == prId))
716718 then $Tuple2(0, pmtAmtRaw)
717719 else throw("invalid payment")
718- let amAmountRaw = $t02846828644._1
719- let prAmountRaw = $t02846828644._2
720- let $t02864828902 = if (withTakeFee)
720+ let amAmountRaw = $t02848728663._1
721+ let prAmountRaw = $t02848728663._2
722+ let $t02866728921 = if (withTakeFee)
721723 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
722724 else $Tuple3(amAmountRaw, prAmountRaw, 0)
723- let amAmount = $t02864828902._1
724- let prAmount = $t02864828902._2
725- let feeAmount = $t02864828902._3
725+ let amAmount = $t02866728921._1
726+ let prAmount = $t02866728921._2
727+ let feeAmount = $t02866728921._3
726728 let amBalanceNew = (amBalanceOld + amAmount)
727729 let prBalanceNew = (prBalanceOld + prAmount)
728730 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
770772 else {
771773 let amBalance = getAccBalance(amId)
772774 let prBalance = getAccBalance(prId)
773- let $t03101431125 = {
775+ let $t03103331144 = {
774776 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
775777 if ($isInstanceOf(@, "(Int, Int)"))
776778 then @
777779 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
778780 }
779- if (($t03101431125 == $t03101431125))
781+ if (($t03103331144 == $t03103331144))
780782 then {
781- let feeAmount = $t03101431125._2
782- let totalGet = $t03101431125._1
783+ let feeAmount = $t03103331144._2
784+ let totalGet = $t03103331144._1
783785 let totalAmount = if (if ((minOutAmount > 0))
784786 then (minOutAmount > totalGet)
785787 else false)
786788 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
787789 else totalGet
788- let $t03131531622 = if ((outAssetId == amId))
790+ let $t03133431641 = if ((outAssetId == amId))
789791 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
790792 else if ((outAssetId == prId))
791793 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
792794 else throw("invalid out asset id")
793- let outAm = $t03131531622._1
794- let outPr = $t03131531622._2
795- let amBalanceNew = $t03131531622._3
796- let prBalanceNew = $t03131531622._4
795+ let outAm = $t03133431641._1
796+ let outPr = $t03133431641._2
797+ let amBalanceNew = $t03133431641._3
798+ let prBalanceNew = $t03133431641._4
797799 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
798800 let curPr = f1(curPrX18, scale8)
799801 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
808810 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
809811 if ((burn == burn))
810812 then {
811- let $t03240732757 = {
813+ let $t03242632776 = {
812814 let feeAmountForCalc = if ((this == feeCollectorAddress))
813815 then 0
814816 else feeAmount
819821 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
820822 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
821823 }
822- let amountAssetBalanceDelta = $t03240732757._1
823- let priceAssetBalanceDelta = $t03240732757._2
824- let $t03276032868 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825- let refreshDLpActions = $t03276032868._1
826- let updatedDLp = $t03276032868._2
824+ let amountAssetBalanceDelta = $t03242632776._1
825+ let priceAssetBalanceDelta = $t03242632776._2
826+ let $t03277932887 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
827+ let refreshDLpActions = $t03277932887._1
828+ let updatedDLp = $t03277932887._2
827829 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
828830 if ((isUpdatedDLpValid == isUpdatedDLpValid))
829831 then $Tuple2((state ++ refreshDLpActions), totalAmount)
902904 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
903905 let b = ((s + ((D * aPrecision) / ann)) - D)
904906 func calc (acc,cur) = {
905- let $t03431534335 = acc
906- let y = $t03431534335._1
907- let found = $t03431534335._2
907+ let $t03433434354 = acc
908+ let y = $t03433434354._1
909+ let found = $t03433434354._2
908910 if ((found != unit))
909911 then acc
910912 else {
917919 }
918920
919921 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
920- let $t03466634713 = {
922+ let $t03468534732 = {
921923 let $l = arr
922924 let $s = size($l)
923925 let $acc0 = $Tuple2(D, unit)
931933
932934 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
933935 }
934- let y = $t03466634713._1
935- let found = $t03466634713._2
936+ let y = $t03468534732._1
937+ let found = $t03468534732._2
936938 if ((found != unit))
937939 then y
938940 else throw(("Y calculation error, Y = " + toString(y)))
941943
942944 @Callable(i)
943945 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse) = {
944- let $t03493435358 = if ((isReverse == false))
946+ let $t03495335377 = if ((isReverse == false))
945947 then {
946948 let assetOut = strf(this, pa())
947949 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
952954 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
953955 $Tuple2(assetOut, poolAmountInBalance)
954956 }
955- let assetOut = $t03493435358._1
956- let poolAmountInBalance = $t03493435358._2
957+ let assetOut = $t03495335377._1
958+ let poolAmountInBalance = $t03495335377._2
957959 let poolConfig = gpc()
958960 let amId = poolConfig[idxAmAsId]
959961 let prId = poolConfig[idxPrAsId]
995997 let assetIn = if ((pmt.assetId == unit))
996998 then toBase58String(toBytes("WAVES"))
997999 else toBase58String(value(pmt.assetId))
998- let $t03679637190 = if ((isReverse == false))
1000+ let $t03681537209 = if ((isReverse == false))
9991001 then {
10001002 let assetOut = strf(this, pa())
10011003 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10061008 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10071009 $Tuple2(assetOut, poolAmountInBalance)
10081010 }
1009- let assetOut = $t03679637190._1
1010- let poolAmountInBalance = $t03679637190._2
1011+ let assetOut = $t03681537209._1
1012+ let poolAmountInBalance = $t03681537209._2
10111013 let poolConfig = gpc()
10121014 let amId = poolConfig[idxAmAsId]
10131015 let prId = poolConfig[idxPrAsId]
11471149 else throw("Strict value is not equal to itself.")
11481150 }
11491151 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1150- let $t04204742189 = refreshDLpInternal(0, 0, 0)
1151- let refreshDLpActions = $t04204742189._1
1152- let updatedDLp = $t04204742189._2
1152+ let $t04206642208 = refreshDLpInternal(0, 0, 0)
1153+ let refreshDLpActions = $t04206642208._1
1154+ let updatedDLp = $t04206642208._2
11531155 let check = if ((updatedDLp >= currentDLp))
11541156 then true
11551157 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12221224 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12231225 if ((currentDLp == currentDLp))
12241226 then {
1225- let $t04383043988 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1226- if (($t04383043988 == $t04383043988))
1227+ let $t04384944007 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1228+ if (($t04384944007 == $t04384944007))
12271229 then {
1228- let feeAmount = $t04383043988._3
1229- let state = $t04383043988._2
1230- let estimLP = $t04383043988._1
1230+ let feeAmount = $t04384944007._3
1231+ let state = $t04384944007._2
1232+ let estimLP = $t04384944007._1
12311233 let emitLpAmt = if (if ((minOutAmount > 0))
12321234 then (minOutAmount > estimLP)
12331235 else false)
12551257 let sendFeeToMatcher = if ((feeAmount > 0))
12561258 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12571259 else nil
1258- let $t04480345152 = if ((this == feeCollectorAddress))
1260+ let $t04482245171 = if ((this == feeCollectorAddress))
12591261 then $Tuple2(0, 0)
12601262 else {
12611263 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12651267 then $Tuple2(-(feeAmount), 0)
12661268 else $Tuple2(0, -(feeAmount))
12671269 }
1268- let amountAssetBalanceDelta = $t04480345152._1
1269- let priceAssetBalanceDelta = $t04480345152._2
1270- let $t04515545263 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1271- let refreshDLpActions = $t04515545263._1
1272- let updatedDLp = $t04515545263._2
1270+ let amountAssetBalanceDelta = $t04482245171._1
1271+ let priceAssetBalanceDelta = $t04482245171._2
1272+ let $t04517445282 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1273+ let refreshDLpActions = $t04517445282._1
1274+ let updatedDLp = $t04517445282._2
12731275 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12741276 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12751277 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
13011303 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13021304 if ((currentDLp == currentDLp))
13031305 then {
1304- let $t04629346358 = refreshDLpInternal(0, 0, 0)
1305- let refreshDLpActions = $t04629346358._1
1306- let updatedDLp = $t04629346358._2
1306+ let $t04631246377 = refreshDLpInternal(0, 0, 0)
1307+ let refreshDLpActions = $t04631246377._1
1308+ let updatedDLp = $t04631246377._2
13071309 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13081310 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13091311 then (state ++ refreshDLpActions)
13281330 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13291331 if ((b == b))
13301332 then {
1331- let $t04753147613 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1332- let refreshDLpActions = $t04753147613._1
1333- let updatedDLp = $t04753147613._2
1333+ let $t04755047632 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1334+ let refreshDLpActions = $t04755047632._1
1335+ let updatedDLp = $t04755047632._2
13341336 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13351337 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13361338 then (state ++ refreshDLpActions)
13651367 else throwErr("exactly 1 payment are expected")]
13661368 if ((checks == checks))
13671369 then {
1368- let $t04823148386 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1369- let state = $t04823148386._1
1370- let totalAmount = $t04823148386._2
1370+ let $t04825048405 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1371+ let state = $t04825048405._1
1372+ let totalAmount = $t04825048405._2
13711373 $Tuple2(state, totalAmount)
13721374 }
13731375 else throw("Strict value is not equal to itself.")
13841386 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13851387 then {
13861388 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1387- let $t04891048974 = refreshDLpInternal(0, 0, 0)
1388- let dLpUpdateActions = $t04891048974._1
1389- let updatedDLp = $t04891048974._2
1389+ let $t04892948993 = refreshDLpInternal(0, 0, 0)
1390+ let dLpUpdateActions = $t04892948993._1
1391+ let updatedDLp = $t04892948993._2
13901392 let actions = if ((dLp != updatedDLp))
13911393 then dLpUpdateActions
13921394 else throwErr("nothing to refresh")
14141416 let newY = getYD(xp, index, D1)
14151417 let dy = (xp[index] - newY)
14161418 let totalGetRaw = max([0, toInt((dy - big1))])
1417- let $t04998450039 = takeFee(totalGetRaw, outFee)
1418- let totalGet = $t04998450039._1
1419- let feeAmount = $t04998450039._2
1419+ let $t05000350058 = takeFee(totalGetRaw, outFee)
1420+ let totalGet = $t05000350058._1
1421+ let feeAmount = $t05000350058._2
14201422 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14211423 }
14221424
14291431 let lpId = toBase58String(value(cfgLpAssetId))
14301432 let amBalance = getAccBalance(amId)
14311433 let prBalance = getAccBalance(prId)
1432- let $t05041450529 = {
1434+ let $t05043350548 = {
14331435 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14341436 if ($isInstanceOf(@, "(Int, Int)"))
14351437 then @
14361438 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14371439 }
1438- let totalGet = $t05041450529._1
1439- let feeAmount = $t05041450529._2
1440+ let totalGet = $t05043350548._1
1441+ let feeAmount = $t05043350548._2
14401442 let r = ego("", lpId, lpAssetAmount, this)
14411443 let outAmAmt = r._1
14421444 let outPrAmt = r._2
14701472 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14711473 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14721474 then {
1473- let $t05169551776 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1474- let refreshDLpActions = $t05169551776._1
1475- let updatedDLp = $t05169551776._2
1475+ let $t05171451795 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1476+ let refreshDLpActions = $t05171451795._1
1477+ let updatedDLp = $t05171451795._2
14761478 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14771479 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14781480 then (state ++ refreshDLpActions)
15171519 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15181520 if ((burnA == burnA))
15191521 then {
1520- let $t05280352884 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1521- let refreshDLpActions = $t05280352884._1
1522- let updatedDLp = $t05280352884._2
1522+ let $t05282252903 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1523+ let refreshDLpActions = $t05282252903._1
1524+ let updatedDLp = $t05282252903._2
15231525 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15241526 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15251527 then (state ++ refreshDLpActions)
15701572 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15711573 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15721574 then {
1573- let $t05413554216 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1574- let refreshDLpActions = $t05413554216._1
1575- let updatedDLp = $t05413554216._2
1575+ let $t05415454235 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1576+ let refreshDLpActions = $t05415454235._1
1577+ let updatedDLp = $t05415454235._2
15761578 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15771579 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15781580 then (state ++ refreshDLpActions)
16191621 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
16201622 if ((unstakeInv == unstakeInv))
16211623 then {
1622- let $t05511155299 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1623- let state = $t05511155299._1
1624- let totalAmount = $t05511155299._2
1624+ let $t05513055318 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1625+ let state = $t05513055318._1
1626+ let totalAmount = $t05513055318._2
16251627 $Tuple2(state, totalAmount)
16261628 }
16271629 else throw("Strict value is not equal to itself.")
16331635
16341636 @Callable(i)
16351637 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1636- let $t05542755530 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1637- let lpAmount = $t05542755530._1
1638- let state = $t05542755530._2
1639- let feeAmount = $t05542755530._3
1640- let bonus = $t05542755530._4
1638+ let $t05544655549 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1639+ let lpAmount = $t05544655549._1
1640+ let state = $t05544655549._2
1641+ let feeAmount = $t05544655549._3
1642+ let bonus = $t05544655549._4
16411643 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16421644 }
16431645
16451647
16461648 @Callable(i)
16471649 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05567855782 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1649- let lpAmount = $t05567855782._1
1650- let state = $t05567855782._2
1651- let feeAmount = $t05567855782._3
1652- let bonus = $t05567855782._4
1650+ let $t05569755801 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1651+ let lpAmount = $t05569755801._1
1652+ let state = $t05569755801._2
1653+ let feeAmount = $t05569755801._3
1654+ let bonus = $t05569755801._4
16531655 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541656 }
16551657
17341736 match tx {
17351737 case order: Order =>
17361738 let matcherPub = mp()
1737- let $t05857458643 = validateMatcherOrderAllowed(order)
1738- let orderValid = $t05857458643._1
1739- let orderValidInfo = $t05857458643._2
1739+ let $t05859358662 = validateMatcherOrderAllowed(order)
1740+ let orderValid = $t05859358662._1
1741+ let orderValidInfo = $t05859358662._2
17401742 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17411743 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17421744 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
25+
26+let tesstttingg = 1
2527
2628 let Amult = "100"
2729
2830 let Dconv = "1"
2931
3032 let SEP = "__"
3133
3234 let EMPTY = ""
3335
3436 let PoolActive = 1
3537
3638 let PoolPutDis = 2
3739
3840 let PoolMatcherDis = 3
3941
4042 let PoolShutdown = 4
4143
4244 let idxPoolAddress = 1
4345
4446 let idxPoolSt = 2
4547
4648 let idxLPAsId = 3
4749
4850 let idxAmAsId = 4
4951
5052 let idxPrAsId = 5
5153
5254 let idxAmtAsDcm = 6
5355
5456 let idxPriceAsDcm = 7
5557
5658 let idxIAmtAsId = 8
5759
5860 let idxIPriceAsId = 9
5961
6062 let idxFactStakCntr = 1
6163
6264 let idxFactoryRestCntr = 6
6365
6466 let idxFactSlippCntr = 7
6567
6668 let idxFactGwxRewCntr = 10
6769
6870 let feeDefault = fraction(10, scale8, 10000)
6971
7072 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7173
7274
7375 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7476
7577
7678 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7779
7880
7981 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8082
8183
8284 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8385
8486
8587 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8688
8789
8890 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8991
9092
9193 func abs (val) = if ((zeroBigInt > val))
9294 then -(val)
9395 else val
9496
9597
9698 func absBigInt (val) = if ((zeroBigInt > val))
9799 then -(val)
98100 else val
99101
100102
101103 func fc () = "%s__factoryContract"
102104
103105
104106 func mpk () = "%s__managerPublicKey"
105107
106108
107109 func pmpk () = "%s__pendingManagerPublicKey"
108110
109111
110112 func pl () = "%s%s__price__last"
111113
112114
113115 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114116
115117
116118 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117119
118120
119121 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120122
121123
122124 func aa () = "%s__amountAsset"
123125
124126
125127 func pa () = "%s__priceAsset"
126128
127129
128130 func amp () = "%s__amp"
129131
130132
131133 func ada () = "%s__addonAddr"
132134
133135
134136 let keyFee = "%s__fee"
135137
136138 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
137139
138140 let keyDLp = makeString(["%s", "dLp"], SEP)
139141
140142 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
141143
142144 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
143145
144146 let dLpRefreshDelayDefault = 30
145147
146148 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
147149
148150 func fcfg () = "%s__factoryConfig"
149151
150152
151153 func mtpk () = "%s%s__matcher__publicKey"
152154
153155
154156 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
155157
156158
157159 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
158160
159161
160162 func aps () = "%s__shutdown"
161163
162164
163165 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
164166
165167
166168 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
167169
168170
169171 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
170172
171173
172174 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
173175
174176
175177 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
176178
177179
178180 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
179181
180182
181183 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
182184
183185
184186 let fca = addressFromStringValue(strf(this, fc()))
185187
186188 let inFee = {
187189 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
188190 if ($isInstanceOf(@, "Int"))
189191 then @
190192 else throw(($getType(@) + " couldn't be cast to Int"))
191193 }
192194
193195 let outFee = {
194196 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
195197 if ($isInstanceOf(@, "Int"))
196198 then @
197199 else throw(($getType(@) + " couldn't be cast to Int"))
198200 }
199201
200202 let A = strf(this, amp())
201203
202204 func igs () = valueOrElse(getBoolean(fca, aps()), false)
203205
204206
205207 func mp () = fromBase58String(strf(fca, mtpk()))
206208
207209
208210 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
209211
210212 func gpc () = {
211213 let amtAs = strf(this, aa())
212214 let priceAs = strf(this, pa())
213215 let iPriceAs = intf(fca, mba(priceAs))
214216 let iAmtAs = intf(fca, mba(amtAs))
215217 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
216218 }
217219
218220
219221 func parseAssetId (input) = if ((input == wavesString))
220222 then unit
221223 else fromBase58String(input)
222224
223225
224226 func assetIdToString (input) = if ((input == unit))
225227 then wavesString
226228 else toBase58String(value(input))
227229
228230
229231 func parsePoolConfig (poolConfig) = $Tuple9(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]), fromBase58String(poolConfig[idxIAmtAsId]), fromBase58String(poolConfig[idxIPriceAsId]))
230232
231233
232234 let poolConfigParsed = parsePoolConfig(gpc())
233235
234-let $t079658194 = poolConfigParsed
236+let $t079848213 = poolConfigParsed
235237
236-let cfgPoolAddress = $t079658194._1
238+let cfgPoolAddress = $t079848213._1
237239
238-let cfgPoolStatus = $t079658194._2
240+let cfgPoolStatus = $t079848213._2
239241
240-let cfgLpAssetId = $t079658194._3
242+let cfgLpAssetId = $t079848213._3
241243
242-let cfgAmountAssetId = $t079658194._4
244+let cfgAmountAssetId = $t079848213._4
243245
244-let cfgPriceAssetId = $t079658194._5
246+let cfgPriceAssetId = $t079848213._5
245247
246-let cfgAmountAssetDecimals = $t079658194._6
248+let cfgAmountAssetDecimals = $t079848213._6
247249
248-let cfgPriceAssetDecimals = $t079658194._7
250+let cfgPriceAssetDecimals = $t079848213._7
249251
250-let cfgInAmountAssedId = $t079658194._8
252+let cfgInAmountAssedId = $t079848213._8
251253
252-let cfgInPriceAssetId = $t079658194._9
254+let cfgInPriceAssetId = $t079848213._9
253255
254256 func gfc () = split(strf(fca, fcfg()), SEP)
255257
256258
257259 let factoryConfig = gfc()
258260
259261 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
260262
261263 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
262264
263265 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
264266
265267 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
266268
267269 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)
268270
269271
270272 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)
271273
272274
273275 func getAccBalance (assetId) = if ((assetId == "WAVES"))
274276 then wavesBalance(this).available
275277 else assetBalance(this, fromBase58String(assetId))
276278
277279
278280 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
279281
280282
281283 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
282284
283285
284286 func vad (A1,A2,slippage) = {
285287 let diff = fraction((A1 - A2), scale8BigInt, A2)
286288 let pass = ((slippage - abs(diff)) > zeroBigInt)
287289 if (!(pass))
288290 then throw(("Big slpg: " + toString(diff)))
289291 else $Tuple2(pass, min([A1, A2]))
290292 }
291293
292294
293295 func vd (D1,D0,slpg) = {
294296 let diff = fraction(D0, scale8BigInt, D1)
295297 let fail = (slpg > diff)
296298 if (if (fail)
297299 then true
298300 else (D0 > D1))
299301 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
300302 else fail
301303 }
302304
303305
304306 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
305307 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
306308 let prAsAmtX18 = t1(prAmt, prAssetDcm)
307309 cpbi(prAsAmtX18, amtAsAmtX18)
308310 }
309311
310312
311313 func calcPrices (amAmt,prAmt,lpAmt) = {
312314 let amtAsDcm = cfgAmountAssetDecimals
313315 let prAsDcm = cfgPriceAssetDecimals
314316 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
315317 let amAmtX18 = t1(amAmt, amtAsDcm)
316318 let prAmtX18 = t1(prAmt, prAsDcm)
317319 let lpAmtX18 = t1(lpAmt, scale8)
318320 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
319321 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
320322 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
321323 }
322324
323325
324326 func calculatePrices (amAmt,prAmt,lpAmt) = {
325327 let p = calcPrices(amAmt, prAmt, lpAmt)
326328 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
327329 }
328330
329331
330332 func takeFee (amount,fee) = {
331333 let feeAmount = if ((fee == 0))
332334 then 0
333335 else fraction(amount, fee, scale8)
334336 $Tuple2((amount - feeAmount), feeAmount)
335337 }
336338
337339
338340 func getD (xp) = {
339341 let xp0 = xp[0]
340342 let xp1 = xp[1]
341343 let s = (xp0 + xp1)
342344 if ((s == big0))
343345 then big0
344346 else {
345347 let a = parseIntValue(A)
346348 let ann = (a * 2)
347349 let p = fraction(xp0, xp1, big1)
348350 let xp0_xp1_n_n = fraction(p, big4, big1)
349351 let ann_s = fraction(toBigInt(ann), s, big1)
350352 let ann_1 = toBigInt((ann - 1))
351353 func calcDNext (d) = {
352354 let dd = fraction(d, d, big1)
353355 let ddd = fraction(dd, d, big1)
354356 let dp = fraction(ddd, big1, xp0_xp1_n_n)
355357 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
356358 }
357359
358360 func calc (acc,i) = if (acc._2)
359361 then acc
360362 else {
361363 let d = acc._1
362364 let dNext = calcDNext(d)
363365 let dDiffRaw = (dNext - value(d))
364366 let dDiff = if ((big0 > dDiffRaw))
365367 then -(dDiffRaw)
366368 else dDiffRaw
367369 if ((big1 >= dDiff))
368370 then $Tuple2(dNext, true)
369371 else $Tuple2(dNext, false)
370372 }
371373
372374 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
373- let $t01269112739 = {
375+ let $t01271012758 = {
374376 let $l = arr
375377 let $s = size($l)
376378 let $acc0 = $Tuple2(s, false)
377379 func $f0_1 ($a,$i) = if (($i >= $s))
378380 then $a
379381 else calc($a, $l[$i])
380382
381383 func $f0_2 ($a,$i) = if (($i >= $s))
382384 then $a
383385 else throw("List size exceeds 15")
384386
385387 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
386388 }
387- let d = $t01269112739._1
388- let found = $t01269112739._2
389+ let d = $t01271012758._1
390+ let found = $t01271012758._2
389391 if (found)
390392 then d
391393 else throw(("D calculation error, D = " + toString(d)))
392394 }
393395 }
394396
395397
396398 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
397399 let lpId = cfgLpAssetId
398400 let amId = toBase58String(value(cfgAmountAssetId))
399401 let prId = toBase58String(value(cfgPriceAssetId))
400402 let amDcm = cfgAmountAssetDecimals
401403 let prDcm = cfgPriceAssetDecimals
402404 let sts = toString(cfgPoolStatus)
403405 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
404406 if ((toBase58String(lpId) != pmtAssetId))
405407 then throw("Wrong pmt asset")
406408 else {
407409 let amBalance = getAccBalance(amId)
408410 let amBalanceX18 = t1(amBalance, amDcm)
409411 let prBalance = getAccBalance(prId)
410412 let prBalanceX18 = t1(prBalance, prDcm)
411413 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
412414 let curPrice = f1(curPriceX18, scale8)
413415 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
414416 let lpEmissX18 = t1(lpEmiss, scale8)
415417 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
416418 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
417419 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
418420 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
419421 let state = if ((txId58 == ""))
420422 then nil
421423 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
422424 then unit
423425 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
424426 then unit
425427 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)]
426428 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
427429 }
428430 }
429431
430432
431433 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
432434 let lpId = cfgLpAssetId
433435 let amIdStr = toBase58String(value(cfgAmountAssetId))
434436 let prIdStr = toBase58String(value(cfgPriceAssetId))
435437 let inAmIdStr = cfgInAmountAssedId
436438 let inPrIdStr = cfgInPriceAssetId
437439 let amtDcm = cfgAmountAssetDecimals
438440 let priceDcm = cfgPriceAssetDecimals
439441 let sts = toString(cfgPoolStatus)
440442 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
441443 let amBalance = if (isEval)
442444 then getAccBalance(amIdStr)
443445 else if (if (isOneAsset)
444446 then (pmtId == amIdStr)
445447 else false)
446448 then (getAccBalance(amIdStr) - pmtAmt)
447449 else if (isOneAsset)
448450 then getAccBalance(amIdStr)
449451 else (getAccBalance(amIdStr) - inAmAmt)
450452 let prBalance = if (isEval)
451453 then getAccBalance(prIdStr)
452454 else if (if (isOneAsset)
453455 then (pmtId == prIdStr)
454456 else false)
455457 then (getAccBalance(prIdStr) - pmtAmt)
456458 else if (isOneAsset)
457459 then getAccBalance(prIdStr)
458460 else (getAccBalance(prIdStr) - inPrAmt)
459461 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
460462 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
461463 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
462464 let amBalanceX18 = t1(amBalance, amtDcm)
463465 let prBalanceX18 = t1(prBalance, priceDcm)
464466 let D0 = getD([amBalanceX18, prBalanceX18])
465467 let r = if ((lpEm == 0))
466468 then {
467469 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
468470 let checkD = if ((D1 > D0))
469471 then true
470472 else throw("D1 should be greater than D0")
471473 if ((checkD == checkD))
472474 then {
473475 let curPriceX18 = zeroBigInt
474476 let slippageX18 = zeroBigInt
475477 let lpAmtX18 = D1
476478 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
477479 }
478480 else throw("Strict value is not equal to itself.")
479481 }
480482 else {
481483 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
482484 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
483485 let slippageX18 = t1(slippage, scale8)
484486 if (if (if (validateSlippage)
485487 then (curPriceX18 != zeroBigInt)
486488 else false)
487489 then (slippageRealX18 > slippageX18)
488490 else false)
489491 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
490492 else {
491493 let lpEmissionX18 = t1(lpEm, scale8)
492494 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
493495 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
494496 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
495497 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
496498 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
497499 let expAmtAssetAmtX18 = expectedAmts._1
498500 let expPriceAssetAmtX18 = expectedAmts._2
499501 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
500502 let checkD = if ((D1 > D0))
501503 then true
502504 else throw("D1 should be greater than D0")
503505 if ((checkD == checkD))
504506 then {
505507 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
506508 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
507509 }
508510 else throw("Strict value is not equal to itself.")
509511 }
510512 }
511513 let calcLpAmt = r._1
512514 let calcAmAssetPmt = r._2
513515 let calcPrAssetPmt = r._3
514516 let curPrice = f1(r._4, scale8)
515517 let slippageCalc = f1(r._5, scale8)
516518 if ((0 >= calcLpAmt))
517519 then throw("LP <= 0")
518520 else {
519521 let emitLpAmt = if (!(emitLp))
520522 then 0
521523 else calcLpAmt
522524 let amDiff = (inAmAmt - calcAmAssetPmt)
523525 let prDiff = (inPrAmt - calcPrAssetPmt)
524- let $t02057820923 = if (if (isOneAsset)
526+ let $t02059720942 = if (if (isOneAsset)
525527 then (pmtId == amIdStr)
526528 else false)
527529 then $Tuple2(pmtAmt, 0)
528530 else if (if (isOneAsset)
529531 then (pmtId == prIdStr)
530532 else false)
531533 then $Tuple2(0, pmtAmt)
532534 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
533- let writeAmAmt = $t02057820923._1
534- let writePrAmt = $t02057820923._2
535+ let writeAmAmt = $t02059720942._1
536+ let writePrAmt = $t02059720942._2
535537 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))]
536538 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
537539 }
538540 }
539541
540542
541543 func getYD (xp,i,D) = {
542544 let n = big2
543545 let x = xp[if ((i == 0))
544546 then 1
545547 else 0]
546548 let aPrecision = parseBigIntValue(Amult)
547549 let a = (parseBigIntValue(A) * aPrecision)
548550 let s = x
549551 let ann = (a * n)
550552 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
551553 let b = ((s + ((D * aPrecision) / ann)) - D)
552554 func calc (acc,cur) = {
553- let $t02211822138 = acc
554- let y = $t02211822138._1
555- let found = $t02211822138._2
555+ let $t02213722157 = acc
556+ let y = $t02213722157._1
557+ let found = $t02213722157._2
556558 if ((found != unit))
557559 then acc
558560 else {
559561 let yNext = (((y * y) + c) / ((big2 * y) + b))
560562 let yDiff = absBigInt((yNext - value(y)))
561563 if ((big1 >= yDiff))
562564 then $Tuple2(yNext, cur)
563565 else $Tuple2(yNext, unit)
564566 }
565567 }
566568
567569 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let $t02244522492 = {
570+ let $t02246422511 = {
569571 let $l = arr
570572 let $s = size($l)
571573 let $acc0 = $Tuple2(D, unit)
572574 func $f0_1 ($a,$i) = if (($i >= $s))
573575 then $a
574576 else calc($a, $l[$i])
575577
576578 func $f0_2 ($a,$i) = if (($i >= $s))
577579 then $a
578580 else throw("List size exceeds 15")
579581
580582 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581583 }
582- let y = $t02244522492._1
583- let found = $t02244522492._2
584+ let y = $t02246422511._1
585+ let found = $t02246422511._2
584586 if ((found != unit))
585587 then y
586588 else throw(("Y calculation error, Y = " + toString(y)))
587589 }
588590
589591
590592 func calcDLp (amountBalance,priceBalance,lpEmission) = {
591593 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
592594 if ((lpEmission == big0))
593595 then big0
594596 else updatedDLp
595597 }
596598
597599
598600 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
599601 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
600602 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
601603 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
602604 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
603605 currentDLp
604606 }
605607
606608
607609 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
608610 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
609611 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
610612 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
611613 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
612614 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
613615 $Tuple2(actions, updatedDLp)
614616 }
615617
616618
617619 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
618620 then true
619621 else throwErr("updated DLp lower than current DLp")
620622
621623
622624 func validateMatcherOrderAllowed (order) = {
623625 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
624626 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
625627 let amountAssetAmount = order.amount
626628 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
627- let $t02469024902 = if ((order.orderType == Buy))
629+ let $t02470924921 = if ((order.orderType == Buy))
628630 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
629631 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
630- let amountAssetBalanceDelta = $t02469024902._1
631- let priceAssetBalanceDelta = $t02469024902._2
632+ let amountAssetBalanceDelta = $t02470924921._1
633+ let priceAssetBalanceDelta = $t02470924921._2
632634 if (if (if (igs())
633635 then true
634636 else (cfgPoolStatus == PoolMatcherDis))
635637 then true
636638 else (cfgPoolStatus == PoolShutdown))
637639 then throw("Admin blocked")
638640 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
639641 then true
640642 else (order.assetPair.priceAsset != cfgPriceAssetId))
641643 then throw("Wr assets")
642644 else {
643645 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
644- let $t02524425344 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645- let unusedActions = $t02524425344._1
646- let dLpNew = $t02524425344._2
646+ let $t02526325363 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
647+ let unusedActions = $t02526325363._1
648+ let dLpNew = $t02526325363._2
647649 let isOrderValid = (dLpNew >= dLp)
648650 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
649651 $Tuple2(isOrderValid, info)
650652 }
651653 }
652654
653655
654656 func cg (i) = if ((size(i.payments) != 1))
655657 then throw("1 pmnt exp")
656658 else {
657659 let pmt = value(i.payments[0])
658660 let pmtAssetId = value(pmt.assetId)
659661 let pmtAmt = pmt.amount
660662 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
661663 let outAmAmt = r._1
662664 let outPrAmt = r._2
663665 let sts = parseIntValue(r._9)
664666 let state = r._10
665667 if (if (igs())
666668 then true
667669 else (sts == PoolShutdown))
668670 then throw(("Admin blocked: " + toString(sts)))
669671 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
670672 }
671673
672674
673675 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
674676 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
675677 let sts = parseIntValue(r._8)
676678 if (if (if (igs())
677679 then true
678680 else (sts == PoolPutDis))
679681 then true
680682 else (sts == PoolShutdown))
681683 then throw(("Blocked:" + toString(sts)))
682684 else r
683685 }
684686
685687
686688 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
687689 let amId = toBase58String(value(cfgAmountAssetId))
688690 let prId = toBase58String(value(cfgPriceAssetId))
689691 let lpId = cfgLpAssetId
690692 let amtDcm = cfgAmountAssetDecimals
691693 let priceDcm = cfgPriceAssetDecimals
692694 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
693695 let chechEmission = if ((lpAssetEmission > big0))
694696 then true
695697 else throw("initial deposit requires all coins")
696698 if ((chechEmission == chechEmission))
697699 then {
698700 let amBalance = getAccBalance(amId)
699701 let prBalance = getAccBalance(prId)
700- let $t02800028462 = if ((txId == ""))
702+ let $t02801928481 = if ((txId == ""))
701703 then $Tuple2(amBalance, prBalance)
702704 else if ((pmtAssetId == amId))
703705 then if ((pmtAmtRaw > amBalance))
704706 then throw("invalid payment amount")
705707 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
706708 else if ((pmtAssetId == prId))
707709 then if ((pmtAmtRaw > prBalance))
708710 then throw("invalid payment amount")
709711 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
710712 else throw("wrong pmtAssetId")
711- let amBalanceOld = $t02800028462._1
712- let prBalanceOld = $t02800028462._2
713- let $t02846828644 = if ((pmtAssetId == amId))
713+ let amBalanceOld = $t02801928481._1
714+ let prBalanceOld = $t02801928481._2
715+ let $t02848728663 = if ((pmtAssetId == amId))
714716 then $Tuple2(pmtAmtRaw, 0)
715717 else if ((pmtAssetId == prId))
716718 then $Tuple2(0, pmtAmtRaw)
717719 else throw("invalid payment")
718- let amAmountRaw = $t02846828644._1
719- let prAmountRaw = $t02846828644._2
720- let $t02864828902 = if (withTakeFee)
720+ let amAmountRaw = $t02848728663._1
721+ let prAmountRaw = $t02848728663._2
722+ let $t02866728921 = if (withTakeFee)
721723 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
722724 else $Tuple3(amAmountRaw, prAmountRaw, 0)
723- let amAmount = $t02864828902._1
724- let prAmount = $t02864828902._2
725- let feeAmount = $t02864828902._3
725+ let amAmount = $t02866728921._1
726+ let prAmount = $t02866728921._2
727+ let feeAmount = $t02866728921._3
726728 let amBalanceNew = (amBalanceOld + amAmount)
727729 let prBalanceNew = (prBalanceOld + prAmount)
728730 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
729731 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
730732 let checkD = if ((D1 > D0))
731733 then true
732734 else throw()
733735 if ((checkD == checkD))
734736 then {
735737 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
736738 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
737739 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(height, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, height, lastBlock.timestamp, 0, 0))]
738740 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
739741 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
740742 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
741743 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
742744 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
743745 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
744746 }
745747 else throw("Strict value is not equal to itself.")
746748 }
747749 else throw("Strict value is not equal to itself.")
748750 }
749751
750752
751753 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
752754 let lpId = toBase58String(value(cfgLpAssetId))
753755 let amId = toBase58String(value(cfgAmountAssetId))
754756 let prId = toBase58String(value(cfgPriceAssetId))
755757 let amDecimals = cfgAmountAssetDecimals
756758 let prDecimals = cfgPriceAssetDecimals
757759 let poolStatus = cfgPoolStatus
758760 let userAddress = if ((caller == restContract))
759761 then originCaller
760762 else caller
761763 let pmt = value(payments[0])
762764 let pmtAssetId = value(pmt.assetId)
763765 let pmtAmt = pmt.amount
764766 let currentDLp = calcCurrentDLp(big0, big0, big0)
765767 if ((currentDLp == currentDLp))
766768 then {
767769 let txId58 = toBase58String(transactionId)
768770 if ((lpId != toBase58String(pmtAssetId)))
769771 then throw("Wrong LP")
770772 else {
771773 let amBalance = getAccBalance(amId)
772774 let prBalance = getAccBalance(prId)
773- let $t03101431125 = {
775+ let $t03103331144 = {
774776 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
775777 if ($isInstanceOf(@, "(Int, Int)"))
776778 then @
777779 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
778780 }
779- if (($t03101431125 == $t03101431125))
781+ if (($t03103331144 == $t03103331144))
780782 then {
781- let feeAmount = $t03101431125._2
782- let totalGet = $t03101431125._1
783+ let feeAmount = $t03103331144._2
784+ let totalGet = $t03103331144._1
783785 let totalAmount = if (if ((minOutAmount > 0))
784786 then (minOutAmount > totalGet)
785787 else false)
786788 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
787789 else totalGet
788- let $t03131531622 = if ((outAssetId == amId))
790+ let $t03133431641 = if ((outAssetId == amId))
789791 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
790792 else if ((outAssetId == prId))
791793 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
792794 else throw("invalid out asset id")
793- let outAm = $t03131531622._1
794- let outPr = $t03131531622._2
795- let amBalanceNew = $t03131531622._3
796- let prBalanceNew = $t03131531622._4
795+ let outAm = $t03133431641._1
796+ let outPr = $t03133431641._2
797+ let amBalanceNew = $t03133431641._3
798+ let prBalanceNew = $t03133431641._4
797799 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
798800 let curPr = f1(curPrX18, scale8)
799801 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
800802 then unit
801803 else fromBase58String(outAssetId)
802804 let sendFeeToMatcher = if ((feeAmount > 0))
803805 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
804806 else nil
805807 let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, height, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(height, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
806808 if ((state == state))
807809 then {
808810 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
809811 if ((burn == burn))
810812 then {
811- let $t03240732757 = {
813+ let $t03242632776 = {
812814 let feeAmountForCalc = if ((this == feeCollectorAddress))
813815 then 0
814816 else feeAmount
815817 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
816818 then true
817819 else false
818820 if (outInAmountAsset)
819821 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
820822 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
821823 }
822- let amountAssetBalanceDelta = $t03240732757._1
823- let priceAssetBalanceDelta = $t03240732757._2
824- let $t03276032868 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
825- let refreshDLpActions = $t03276032868._1
826- let updatedDLp = $t03276032868._2
824+ let amountAssetBalanceDelta = $t03242632776._1
825+ let priceAssetBalanceDelta = $t03242632776._2
826+ let $t03277932887 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
827+ let refreshDLpActions = $t03277932887._1
828+ let updatedDLp = $t03277932887._2
827829 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
828830 if ((isUpdatedDLpValid == isUpdatedDLpValid))
829831 then $Tuple2((state ++ refreshDLpActions), totalAmount)
830832 else throw("Strict value is not equal to itself.")
831833 }
832834 else throw("Strict value is not equal to itself.")
833835 }
834836 else throw("Strict value is not equal to itself.")
835837 }
836838 else throw("Strict value is not equal to itself.")
837839 }
838840 }
839841 else throw("Strict value is not equal to itself.")
840842 }
841843
842844
843845 func m () = match getString(mpk()) {
844846 case s: String =>
845847 fromBase58String(s)
846848 case _: Unit =>
847849 unit
848850 case _ =>
849851 throw("Match error")
850852 }
851853
852854
853855 func pm () = match getString(pmpk()) {
854856 case s: String =>
855857 fromBase58String(s)
856858 case _: Unit =>
857859 unit
858860 case _ =>
859861 throw("Match error")
860862 }
861863
862864
863865 let pd = throw("Permission denied")
864866
865867 func isManager (i) = match m() {
866868 case pk: ByteVector =>
867869 (i.callerPublicKey == pk)
868870 case _: Unit =>
869871 (i.caller == this)
870872 case _ =>
871873 throw("Match error")
872874 }
873875
874876
875877 func mm (i) = match m() {
876878 case pk: ByteVector =>
877879 if ((i.callerPublicKey == pk))
878880 then true
879881 else pd
880882 case _: Unit =>
881883 if ((i.caller == this))
882884 then true
883885 else pd
884886 case _ =>
885887 throw("Match error")
886888 }
887889
888890
889891 func getY (isReverse,D,poolAmountInBalance) = {
890892 let poolConfig = gpc()
891893 let amId = poolConfig[idxAmAsId]
892894 let prId = poolConfig[idxPrAsId]
893895 let n = big2
894896 let aPrecision = parseBigIntValue(Amult)
895897 let a = (parseBigIntValue(A) * aPrecision)
896898 let xp = if ((isReverse == false))
897899 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
898900 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
899901 let x = xp[0]
900902 let s = x
901903 let ann = (a * n)
902904 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
903905 let b = ((s + ((D * aPrecision) / ann)) - D)
904906 func calc (acc,cur) = {
905- let $t03431534335 = acc
906- let y = $t03431534335._1
907- let found = $t03431534335._2
907+ let $t03433434354 = acc
908+ let y = $t03433434354._1
909+ let found = $t03433434354._2
908910 if ((found != unit))
909911 then acc
910912 else {
911913 let yNext = (((y * y) + c) / ((big2 * y) + b))
912914 let yDiff = absBigInt((yNext - value(y)))
913915 if ((big1 >= yDiff))
914916 then $Tuple2(yNext, cur)
915917 else $Tuple2(yNext, unit)
916918 }
917919 }
918920
919921 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
920- let $t03466634713 = {
922+ let $t03468534732 = {
921923 let $l = arr
922924 let $s = size($l)
923925 let $acc0 = $Tuple2(D, unit)
924926 func $f0_1 ($a,$i) = if (($i >= $s))
925927 then $a
926928 else calc($a, $l[$i])
927929
928930 func $f0_2 ($a,$i) = if (($i >= $s))
929931 then $a
930932 else throw("List size exceeds 15")
931933
932934 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
933935 }
934- let y = $t03466634713._1
935- let found = $t03466634713._2
936+ let y = $t03468534732._1
937+ let found = $t03468534732._2
936938 if ((found != unit))
937939 then y
938940 else throw(("Y calculation error, Y = " + toString(y)))
939941 }
940942
941943
942944 @Callable(i)
943945 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse) = {
944- let $t03493435358 = if ((isReverse == false))
946+ let $t03495335377 = if ((isReverse == false))
945947 then {
946948 let assetOut = strf(this, pa())
947949 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
948950 $Tuple2(assetOut, poolAmountInBalance)
949951 }
950952 else {
951953 let assetOut = strf(this, aa())
952954 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
953955 $Tuple2(assetOut, poolAmountInBalance)
954956 }
955- let assetOut = $t03493435358._1
956- let poolAmountInBalance = $t03493435358._2
957+ let assetOut = $t03495335377._1
958+ let poolAmountInBalance = $t03495335377._2
957959 let poolConfig = gpc()
958960 let amId = poolConfig[idxAmAsId]
959961 let prId = poolConfig[idxPrAsId]
960962 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
961963 let D = getD(xp)
962964 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
963965 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
964966 let totalGetRaw = max([0, toInt(dy)])
965967 let newXp = if ((isReverse == false))
966968 then [(toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)), (toBigInt(getAccBalance(prId)) - dy)]
967969 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn))]
968970 let newD = getD(newXp)
969971 let checkD = if ((newD >= D))
970972 then true
971973 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
972974 if ((checkD == checkD))
973975 then $Tuple2(nil, totalGetRaw)
974976 else throw("Strict value is not equal to itself.")
975977 }
976978
977979
978980
979981 @Callable(i)
980982 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo) = {
981983 let swapContact = {
982984 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
983985 if ($isInstanceOf(@, "String"))
984986 then @
985987 else throw(($getType(@) + " couldn't be cast to String"))
986988 }
987989 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
988990 then true
989991 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
990992 then true
991993 else throwErr("Permission denied")]
992994 if ((checks == checks))
993995 then {
994996 let pmt = value(i.payments[0])
995997 let assetIn = if ((pmt.assetId == unit))
996998 then toBase58String(toBytes("WAVES"))
997999 else toBase58String(value(pmt.assetId))
998- let $t03679637190 = if ((isReverse == false))
1000+ let $t03681537209 = if ((isReverse == false))
9991001 then {
10001002 let assetOut = strf(this, pa())
10011003 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10021004 $Tuple2(assetOut, poolAmountInBalance)
10031005 }
10041006 else {
10051007 let assetOut = strf(this, aa())
10061008 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10071009 $Tuple2(assetOut, poolAmountInBalance)
10081010 }
1009- let assetOut = $t03679637190._1
1010- let poolAmountInBalance = $t03679637190._2
1011+ let assetOut = $t03681537209._1
1012+ let poolAmountInBalance = $t03681537209._2
10111013 let poolConfig = gpc()
10121014 let amId = poolConfig[idxAmAsId]
10131015 let prId = poolConfig[idxPrAsId]
10141016 let xp = if ((isReverse == false))
10151017 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10161018 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10171019 let D = getD(xp)
10181020 let y = getY(isReverse, D, toBigInt(0))
10191021 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10201022 let totalGetRaw = max([0, toInt(dy)])
10211023 let checkMin = if ((totalGetRaw >= amountOutMin))
10221024 then true
10231025 else throw("Exchange result is fewer coins than expected")
10241026 if ((checkMin == checkMin))
10251027 then {
10261028 let newXp = if ((isReverse == false))
10271029 then [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - dy)]
10281030 else [(toBigInt(getAccBalance(amId)) - dy), toBigInt(getAccBalance(prId))]
10291031 let newD = getD(newXp)
10301032 let checkD = if ((newD >= D))
10311033 then true
10321034 else throw("new D is fewer error")
10331035 if ((checkD == checkD))
10341036 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10351037 else throw("Strict value is not equal to itself.")
10361038 }
10371039 else throw("Strict value is not equal to itself.")
10381040 }
10391041 else throw("Strict value is not equal to itself.")
10401042 }
10411043
10421044
10431045
10441046 @Callable(i)
10451047 func constructor (fc) = {
10461048 let c = mm(i)
10471049 if ((c == c))
10481050 then [StringEntry(fc(), fc)]
10491051 else throw("Strict value is not equal to itself.")
10501052 }
10511053
10521054
10531055
10541056 @Callable(i)
10551057 func setManager (pendingManagerPublicKey) = {
10561058 let c = mm(i)
10571059 if ((c == c))
10581060 then {
10591061 let cm = fromBase58String(pendingManagerPublicKey)
10601062 if ((cm == cm))
10611063 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10621064 else throw("Strict value is not equal to itself.")
10631065 }
10641066 else throw("Strict value is not equal to itself.")
10651067 }
10661068
10671069
10681070
10691071 @Callable(i)
10701072 func confirmManager () = {
10711073 let p = pm()
10721074 let hpm = if (isDefined(p))
10731075 then true
10741076 else throw("No pending manager")
10751077 if ((hpm == hpm))
10761078 then {
10771079 let cpm = if ((i.callerPublicKey == value(p)))
10781080 then true
10791081 else throw("You are not pending manager")
10801082 if ((cpm == cpm))
10811083 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10821084 else throw("Strict value is not equal to itself.")
10831085 }
10841086 else throw("Strict value is not equal to itself.")
10851087 }
10861088
10871089
10881090
10891091 @Callable(i)
10901092 func put (slip,autoStake) = {
10911093 let factCfg = gfc()
10921094 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10931095 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10941096 if ((0 > slip))
10951097 then throw("Wrong slippage")
10961098 else if ((size(i.payments) != 2))
10971099 then throw("2 pmnts expd")
10981100 else {
10991101 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11001102 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11011103 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11021104 if ((amountAssetBalance == amountAssetBalance))
11031105 then {
11041106 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11051107 if ((priceAssetBalance == priceAssetBalance))
11061108 then {
11071109 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11081110 if ((lpAssetEmission == lpAssetEmission))
11091111 then {
11101112 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11111113 if ((currentDLp == currentDLp))
11121114 then {
11131115 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, true, 0, "")
11141116 let emitLpAmt = e._2
11151117 let lpAssetId = e._7
11161118 let state = e._9
11171119 let amDiff = e._10
11181120 let prDiff = e._11
11191121 let amId = e._12
11201122 let prId = e._13
11211123 let r = invoke(fca, "emit", [emitLpAmt], nil)
11221124 if ((r == r))
11231125 then {
11241126 let el = match r {
11251127 case legacy: Address =>
11261128 invoke(legacy, "emit", [emitLpAmt], nil)
11271129 case _ =>
11281130 unit
11291131 }
11301132 if ((el == el))
11311133 then {
11321134 let sa = if ((amDiff > 0))
11331135 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11341136 else nil
11351137 if ((sa == sa))
11361138 then {
11371139 let sp = if ((prDiff > 0))
11381140 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11391141 else nil
11401142 if ((sp == sp))
11411143 then {
11421144 let lpTrnsfr = if (autoStake)
11431145 then {
11441146 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11451147 if ((ss == ss))
11461148 then nil
11471149 else throw("Strict value is not equal to itself.")
11481150 }
11491151 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1150- let $t04204742189 = refreshDLpInternal(0, 0, 0)
1151- let refreshDLpActions = $t04204742189._1
1152- let updatedDLp = $t04204742189._2
1152+ let $t04206642208 = refreshDLpInternal(0, 0, 0)
1153+ let refreshDLpActions = $t04206642208._1
1154+ let updatedDLp = $t04206642208._2
11531155 let check = if ((updatedDLp >= currentDLp))
11541156 then true
11551157 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11561158 if ((check == check))
11571159 then {
11581160 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11591161 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11601162 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11611163 else throw("Strict value is not equal to itself.")
11621164 }
11631165 else throw("Strict value is not equal to itself.")
11641166 }
11651167 else throw("Strict value is not equal to itself.")
11661168 }
11671169 else throw("Strict value is not equal to itself.")
11681170 }
11691171 else throw("Strict value is not equal to itself.")
11701172 }
11711173 else throw("Strict value is not equal to itself.")
11721174 }
11731175 else throw("Strict value is not equal to itself.")
11741176 }
11751177 else throw("Strict value is not equal to itself.")
11761178 }
11771179 else throw("Strict value is not equal to itself.")
11781180 }
11791181 else throw("Strict value is not equal to itself.")
11801182 }
11811183 }
11821184
11831185
11841186
11851187 @Callable(i)
11861188 func putOneTknV2 (minOutAmount,autoStake) = {
11871189 let isPoolOneTokenOperationsDisabled = {
11881190 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11891191 if ($isInstanceOf(@, "Boolean"))
11901192 then @
11911193 else throw(($getType(@) + " couldn't be cast to Boolean"))
11921194 }
11931195 let isPutDisabled = if (if (if (igs())
11941196 then true
11951197 else (cfgPoolStatus == PoolPutDis))
11961198 then true
11971199 else (cfgPoolStatus == PoolShutdown))
11981200 then true
11991201 else isPoolOneTokenOperationsDisabled
12001202 let checks = [if (if (!(isPutDisabled))
12011203 then true
12021204 else isManager(i))
12031205 then true
12041206 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12051207 then true
12061208 else throwErr("exactly 1 payment are expected")]
12071209 if ((checks == checks))
12081210 then {
12091211 let amId = toBase58String(value(cfgAmountAssetId))
12101212 let prId = toBase58String(value(cfgPriceAssetId))
12111213 let lpId = cfgLpAssetId
12121214 let amDecimals = cfgAmountAssetDecimals
12131215 let prDecimals = cfgPriceAssetDecimals
12141216 let userAddress = if ((i.caller == this))
12151217 then i.originCaller
12161218 else i.caller
12171219 let pmt = value(i.payments[0])
12181220 let pmtAssetId = toBase58String(value(pmt.assetId))
12191221 let pmtAmt = pmt.amount
12201222 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12211223 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12221224 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12231225 if ((currentDLp == currentDLp))
12241226 then {
1225- let $t04383043988 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1226- if (($t04383043988 == $t04383043988))
1227+ let $t04384944007 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1228+ if (($t04384944007 == $t04384944007))
12271229 then {
1228- let feeAmount = $t04383043988._3
1229- let state = $t04383043988._2
1230- let estimLP = $t04383043988._1
1230+ let feeAmount = $t04384944007._3
1231+ let state = $t04384944007._2
1232+ let estimLP = $t04384944007._1
12311233 let emitLpAmt = if (if ((minOutAmount > 0))
12321234 then (minOutAmount > estimLP)
12331235 else false)
12341236 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12351237 else estimLP
12361238 let e = invoke(fca, "emit", [emitLpAmt], nil)
12371239 if ((e == e))
12381240 then {
12391241 let el = match e {
12401242 case legacy: Address =>
12411243 invoke(legacy, "emit", [emitLpAmt], nil)
12421244 case _ =>
12431245 unit
12441246 }
12451247 if ((el == el))
12461248 then {
12471249 let lpTrnsfr = if (autoStake)
12481250 then {
12491251 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
12501252 if ((ss == ss))
12511253 then nil
12521254 else throw("Strict value is not equal to itself.")
12531255 }
12541256 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12551257 let sendFeeToMatcher = if ((feeAmount > 0))
12561258 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12571259 else nil
1258- let $t04480345152 = if ((this == feeCollectorAddress))
1260+ let $t04482245171 = if ((this == feeCollectorAddress))
12591261 then $Tuple2(0, 0)
12601262 else {
12611263 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12621264 then true
12631265 else false
12641266 if (paymentInAmountAsset)
12651267 then $Tuple2(-(feeAmount), 0)
12661268 else $Tuple2(0, -(feeAmount))
12671269 }
1268- let amountAssetBalanceDelta = $t04480345152._1
1269- let priceAssetBalanceDelta = $t04480345152._2
1270- let $t04515545263 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1271- let refreshDLpActions = $t04515545263._1
1272- let updatedDLp = $t04515545263._2
1270+ let amountAssetBalanceDelta = $t04482245171._1
1271+ let priceAssetBalanceDelta = $t04482245171._2
1272+ let $t04517445282 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
1273+ let refreshDLpActions = $t04517445282._1
1274+ let updatedDLp = $t04517445282._2
12731275 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12741276 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12751277 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12761278 else throw("Strict value is not equal to itself.")
12771279 }
12781280 else throw("Strict value is not equal to itself.")
12791281 }
12801282 else throw("Strict value is not equal to itself.")
12811283 }
12821284 else throw("Strict value is not equal to itself.")
12831285 }
12841286 else throw("Strict value is not equal to itself.")
12851287 }
12861288 else throw("Strict value is not equal to itself.")
12871289 }
12881290
12891291
12901292
12911293 @Callable(i)
12921294 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12931295 then throw("Wrong slpg")
12941296 else if ((size(i.payments) != 2))
12951297 then throw("2 pmnts expd")
12961298 else {
12971299 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, true, 0, "")
12981300 let state = estPut._9
12991301 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13001302 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13011303 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13021304 if ((currentDLp == currentDLp))
13031305 then {
1304- let $t04629346358 = refreshDLpInternal(0, 0, 0)
1305- let refreshDLpActions = $t04629346358._1
1306- let updatedDLp = $t04629346358._2
1306+ let $t04631246377 = refreshDLpInternal(0, 0, 0)
1307+ let refreshDLpActions = $t04631246377._1
1308+ let updatedDLp = $t04631246377._2
13071309 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13081310 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13091311 then (state ++ refreshDLpActions)
13101312 else throw("Strict value is not equal to itself.")
13111313 }
13121314 else throw("Strict value is not equal to itself.")
13131315 }
13141316
13151317
13161318
13171319 @Callable(i)
13181320 func get () = {
13191321 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13201322 if ((currentDLp == currentDLp))
13211323 then {
13221324 let r = cg(i)
13231325 let outAmtAmt = r._1
13241326 let outPrAmt = r._2
13251327 let pmtAmt = r._3
13261328 let pmtAssetId = r._4
13271329 let state = r._5
13281330 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13291331 if ((b == b))
13301332 then {
1331- let $t04753147613 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1332- let refreshDLpActions = $t04753147613._1
1333- let updatedDLp = $t04753147613._2
1333+ let $t04755047632 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1334+ let refreshDLpActions = $t04755047632._1
1335+ let updatedDLp = $t04755047632._2
13341336 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13351337 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13361338 then (state ++ refreshDLpActions)
13371339 else throw("Strict value is not equal to itself.")
13381340 }
13391341 else throw("Strict value is not equal to itself.")
13401342 }
13411343 else throw("Strict value is not equal to itself.")
13421344 }
13431345
13441346
13451347
13461348 @Callable(i)
13471349 func getOneTknV2 (outAssetId,minOutAmount) = {
13481350 let isPoolOneTokenOperationsDisabled = {
13491351 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13501352 if ($isInstanceOf(@, "Boolean"))
13511353 then @
13521354 else throw(($getType(@) + " couldn't be cast to Boolean"))
13531355 }
13541356 let isGetDisabled = if (if (igs())
13551357 then true
13561358 else (cfgPoolStatus == PoolShutdown))
13571359 then true
13581360 else isPoolOneTokenOperationsDisabled
13591361 let checks = [if (if (!(isGetDisabled))
13601362 then true
13611363 else isManager(i))
13621364 then true
13631365 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13641366 then true
13651367 else throwErr("exactly 1 payment are expected")]
13661368 if ((checks == checks))
13671369 then {
1368- let $t04823148386 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1369- let state = $t04823148386._1
1370- let totalAmount = $t04823148386._2
1370+ let $t04825048405 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1371+ let state = $t04825048405._1
1372+ let totalAmount = $t04825048405._2
13711373 $Tuple2(state, totalAmount)
13721374 }
13731375 else throw("Strict value is not equal to itself.")
13741376 }
13751377
13761378
13771379
13781380 @Callable(i)
13791381 func refreshDLp () = {
13801382 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13811383 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13821384 then unit
13831385 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13841386 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13851387 then {
13861388 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1387- let $t04891048974 = refreshDLpInternal(0, 0, 0)
1388- let dLpUpdateActions = $t04891048974._1
1389- let updatedDLp = $t04891048974._2
1389+ let $t04892948993 = refreshDLpInternal(0, 0, 0)
1390+ let dLpUpdateActions = $t04892948993._1
1391+ let updatedDLp = $t04892948993._2
13901392 let actions = if ((dLp != updatedDLp))
13911393 then dLpUpdateActions
13921394 else throwErr("nothing to refresh")
13931395 $Tuple2(actions, toString(updatedDLp))
13941396 }
13951397 else throw("Strict value is not equal to itself.")
13961398 }
13971399
13981400
13991401
14001402 @Callable(i)
14011403 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14021404 let amId = toBase58String(value(cfgAmountAssetId))
14031405 let prId = toBase58String(value(cfgPriceAssetId))
14041406 let lpId = toBase58String(value(cfgLpAssetId))
14051407 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14061408 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14071409 let D0 = getD(xp)
14081410 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14091411 let index = if ((outAssetId == amId))
14101412 then 0
14111413 else if ((outAssetId == prId))
14121414 then 1
14131415 else throw("invalid out asset id")
14141416 let newY = getYD(xp, index, D1)
14151417 let dy = (xp[index] - newY)
14161418 let totalGetRaw = max([0, toInt((dy - big1))])
1417- let $t04998450039 = takeFee(totalGetRaw, outFee)
1418- let totalGet = $t04998450039._1
1419- let feeAmount = $t04998450039._2
1419+ let $t05000350058 = takeFee(totalGetRaw, outFee)
1420+ let totalGet = $t05000350058._1
1421+ let feeAmount = $t05000350058._2
14201422 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14211423 }
14221424
14231425
14241426
14251427 @Callable(i)
14261428 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14271429 let amId = toBase58String(value(cfgAmountAssetId))
14281430 let prId = toBase58String(value(cfgPriceAssetId))
14291431 let lpId = toBase58String(value(cfgLpAssetId))
14301432 let amBalance = getAccBalance(amId)
14311433 let prBalance = getAccBalance(prId)
1432- let $t05041450529 = {
1434+ let $t05043350548 = {
14331435 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14341436 if ($isInstanceOf(@, "(Int, Int)"))
14351437 then @
14361438 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14371439 }
1438- let totalGet = $t05041450529._1
1439- let feeAmount = $t05041450529._2
1440+ let totalGet = $t05043350548._1
1441+ let feeAmount = $t05043350548._2
14401442 let r = ego("", lpId, lpAssetAmount, this)
14411443 let outAmAmt = r._1
14421444 let outPrAmt = r._2
14431445 let sumOfGetAssets = (outAmAmt + outPrAmt)
14441446 let bonus = if ((sumOfGetAssets == 0))
14451447 then if ((totalGet == 0))
14461448 then 0
14471449 else throw("bonus calculation error")
14481450 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14491451 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14501452 }
14511453
14521454
14531455
14541456 @Callable(i)
14551457 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14561458 let r = cg(i)
14571459 let outAmAmt = r._1
14581460 let outPrAmt = r._2
14591461 let pmtAmt = r._3
14601462 let pmtAssetId = r._4
14611463 let state = r._5
14621464 if ((noLessThenAmtAsset > outAmAmt))
14631465 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14641466 else if ((noLessThenPriceAsset > outPrAmt))
14651467 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14661468 else {
14671469 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14681470 if ((currentDLp == currentDLp))
14691471 then {
14701472 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14711473 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14721474 then {
1473- let $t05169551776 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1474- let refreshDLpActions = $t05169551776._1
1475- let updatedDLp = $t05169551776._2
1475+ let $t05171451795 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1476+ let refreshDLpActions = $t05171451795._1
1477+ let updatedDLp = $t05171451795._2
14761478 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14771479 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14781480 then (state ++ refreshDLpActions)
14791481 else throw("Strict value is not equal to itself.")
14801482 }
14811483 else throw("Strict value is not equal to itself.")
14821484 }
14831485 else throw("Strict value is not equal to itself.")
14841486 }
14851487 }
14861488
14871489
14881490
14891491 @Callable(i)
14901492 func unstakeAndGet (amount) = {
14911493 let checkPayments = if ((size(i.payments) != 0))
14921494 then throw("No pmnts expd")
14931495 else true
14941496 if ((checkPayments == checkPayments))
14951497 then {
14961498 let factoryCfg = gfc()
14971499 let lpAssetId = cfgLpAssetId
14981500 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
14991501 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15001502 if ((currentDLp == currentDLp))
15011503 then {
15021504 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15031505 if ((unstakeInv == unstakeInv))
15041506 then {
15051507 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15061508 let outAmAmt = r._1
15071509 let outPrAmt = r._2
15081510 let sts = parseIntValue(r._9)
15091511 let state = r._10
15101512 let v = if (if (igs())
15111513 then true
15121514 else (sts == PoolShutdown))
15131515 then throw(("Blocked: " + toString(sts)))
15141516 else true
15151517 if ((v == v))
15161518 then {
15171519 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15181520 if ((burnA == burnA))
15191521 then {
1520- let $t05280352884 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1521- let refreshDLpActions = $t05280352884._1
1522- let updatedDLp = $t05280352884._2
1522+ let $t05282252903 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1523+ let refreshDLpActions = $t05282252903._1
1524+ let updatedDLp = $t05282252903._2
15231525 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15241526 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15251527 then (state ++ refreshDLpActions)
15261528 else throw("Strict value is not equal to itself.")
15271529 }
15281530 else throw("Strict value is not equal to itself.")
15291531 }
15301532 else throw("Strict value is not equal to itself.")
15311533 }
15321534 else throw("Strict value is not equal to itself.")
15331535 }
15341536 else throw("Strict value is not equal to itself.")
15351537 }
15361538 else throw("Strict value is not equal to itself.")
15371539 }
15381540
15391541
15401542
15411543 @Callable(i)
15421544 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15431545 let isGetDisabled = if (igs())
15441546 then true
15451547 else (cfgPoolStatus == PoolShutdown)
15461548 let checks = [if (!(isGetDisabled))
15471549 then true
15481550 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15491551 then true
15501552 else throw("no payments are expected")]
15511553 if ((checks == checks))
15521554 then {
15531555 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15541556 if ((currentDLp == currentDLp))
15551557 then {
15561558 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15571559 if ((unstakeInv == unstakeInv))
15581560 then {
15591561 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15601562 let outAmAmt = res._1
15611563 let outPrAmt = res._2
15621564 let state = res._10
15631565 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15641566 then true
15651567 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15661568 then true
15671569 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15681570 if ((checkAmounts == checkAmounts))
15691571 then {
15701572 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15711573 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15721574 then {
1573- let $t05413554216 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1574- let refreshDLpActions = $t05413554216._1
1575- let updatedDLp = $t05413554216._2
1575+ let $t05415454235 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1576+ let refreshDLpActions = $t05415454235._1
1577+ let updatedDLp = $t05415454235._2
15761578 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15771579 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15781580 then (state ++ refreshDLpActions)
15791581 else throw("Strict value is not equal to itself.")
15801582 }
15811583 else throw("Strict value is not equal to itself.")
15821584 }
15831585 else throw("Strict value is not equal to itself.")
15841586 }
15851587 else throw("Strict value is not equal to itself.")
15861588 }
15871589 else throw("Strict value is not equal to itself.")
15881590 }
15891591 else throw("Strict value is not equal to itself.")
15901592 }
15911593
15921594
15931595
15941596 @Callable(i)
15951597 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15961598 let isPoolOneTokenOperationsDisabled = {
15971599 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
15981600 if ($isInstanceOf(@, "Boolean"))
15991601 then @
16001602 else throw(($getType(@) + " couldn't be cast to Boolean"))
16011603 }
16021604 let isGetDisabled = if (if (igs())
16031605 then true
16041606 else (cfgPoolStatus == PoolShutdown))
16051607 then true
16061608 else isPoolOneTokenOperationsDisabled
16071609 let checks = [if (if (!(isGetDisabled))
16081610 then true
16091611 else isManager(i))
16101612 then true
16111613 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16121614 then true
16131615 else throwErr("no payments are expected")]
16141616 if ((checks == checks))
16151617 then {
16161618 let factoryCfg = gfc()
16171619 let lpAssetId = cfgLpAssetId
16181620 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16191621 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
16201622 if ((unstakeInv == unstakeInv))
16211623 then {
1622- let $t05511155299 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1623- let state = $t05511155299._1
1624- let totalAmount = $t05511155299._2
1624+ let $t05513055318 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1625+ let state = $t05513055318._1
1626+ let totalAmount = $t05513055318._2
16251627 $Tuple2(state, totalAmount)
16261628 }
16271629 else throw("Strict value is not equal to itself.")
16281630 }
16291631 else throw("Strict value is not equal to itself.")
16301632 }
16311633
16321634
16331635
16341636 @Callable(i)
16351637 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
1636- let $t05542755530 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1637- let lpAmount = $t05542755530._1
1638- let state = $t05542755530._2
1639- let feeAmount = $t05542755530._3
1640- let bonus = $t05542755530._4
1638+ let $t05544655549 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1639+ let lpAmount = $t05544655549._1
1640+ let state = $t05544655549._2
1641+ let feeAmount = $t05544655549._3
1642+ let bonus = $t05544655549._4
16411643 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16421644 }
16431645
16441646
16451647
16461648 @Callable(i)
16471649 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
1648- let $t05567855782 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1649- let lpAmount = $t05567855782._1
1650- let state = $t05567855782._2
1651- let feeAmount = $t05567855782._3
1652- let bonus = $t05567855782._4
1650+ let $t05569755801 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1651+ let lpAmount = $t05569755801._1
1652+ let state = $t05569755801._2
1653+ let feeAmount = $t05569755801._3
1654+ let bonus = $t05569755801._4
16531655 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541656 }
16551657
16561658
16571659
16581660 @Callable(i)
16591661 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16601662 then throw("denied")
16611663 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16621664
16631665
16641666
16651667 @Callable(i)
16661668 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
16671669 then pd
16681670 else [StringEntry(k, v)]
16691671
16701672
16711673
16721674 @Callable(i)
16731675 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
16741676 then pd
16751677 else [IntegerEntry(k, v)]
16761678
16771679
16781680
16791681 @Callable(i)
16801682 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16811683
16821684
16831685
16841686 @Callable(i)
16851687 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16861688
16871689
16881690
16891691 @Callable(i)
16901692 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16911693 let pr = calcPrices(amAmt, prAmt, lpAmt)
16921694 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16931695 }
16941696
16951697
16961698
16971699 @Callable(i)
16981700 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
16991701
17001702
17011703
17021704 @Callable(i)
17031705 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17041706
17051707
17061708
17071709 @Callable(i)
17081710 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17091711
17101712
17111713
17121714 @Callable(i)
17131715 func estimatePutOperationWrapperREADONLY (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,usrAddr,isEval,emitLp) = $Tuple2(nil, epo(txId58, slippage, inAmAmt, inAmId, inPrAmt, inPrId, usrAddr, isEval, emitLp, true, false, 0, ""))
17141716
17151717
17161718
17171719 @Callable(i)
17181720 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17191721 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17201722 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17211723 }
17221724
17231725
17241726 @Verifier(tx)
17251727 func verify () = {
17261728 let targetPublicKey = match m() {
17271729 case pk: ByteVector =>
17281730 pk
17291731 case _: Unit =>
17301732 tx.senderPublicKey
17311733 case _ =>
17321734 throw("Match error")
17331735 }
17341736 match tx {
17351737 case order: Order =>
17361738 let matcherPub = mp()
1737- let $t05857458643 = validateMatcherOrderAllowed(order)
1738- let orderValid = $t05857458643._1
1739- let orderValidInfo = $t05857458643._2
1739+ let $t05859358662 = validateMatcherOrderAllowed(order)
1740+ let orderValid = $t05859358662._1
1741+ let orderValidInfo = $t05859358662._2
17401742 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17411743 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17421744 if (if (if (orderValid)
17431745 then senderValid
17441746 else false)
17451747 then matcherValid
17461748 else false)
17471749 then true
17481750 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17491751 case s: SetScriptTransaction =>
17501752 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17511753 then true
17521754 else {
17531755 let newHash = blake2b256(value(s.script))
17541756 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17551757 let currentHash = scriptHash(this)
17561758 if ((allowedHash == newHash))
17571759 then (currentHash != newHash)
17581760 else false
17591761 }
17601762 case _ =>
17611763 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17621764 }
17631765 }
17641766

github/deemru/w8io/026f985 
225.49 ms