tx · ECKrAvdGMvjzTzQKQ8tnPqRDVBLbHYfHmRh9KM5P9dyw

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04000000 Waves

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

{ "type": 13, "id": "ECKrAvdGMvjzTzQKQ8tnPqRDVBLbHYfHmRh9KM5P9dyw", "fee": 4000000, "feeAssetId": null, "timestamp": 1675971962567, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "ESGz2pxMAkcQG1PMxjf85ezouuezYLpAQoMxMxnka1qTGieen68CnoLeAvGxdTrzW1uNVLDPep4bnhBZc4EES5i" ], "script": "base64:BgLYKggCEgQKAgEEEgYKBAEEAQgSAwoBCBIDCgEIEgASBAoCAQQSBAoCAQQSAwoBARIAEgQKAggBEgASBAoCCAESBAoCCAESBAoCAQESAwoBARIFCgMBAQESBQoDAQgBEgQKAgEIEgQKAgEIEgQKAggIEgQKAggIEgQKAggBEgASAwoBCBIFCgMBAQESBAoCCAESBAoCAQESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSW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YUgHBQJhSQcGCQECYUUEBQJhRgUCYUcFAmFIBQJhSQMJAAECBQJnbAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmNDBQJnbAMJAPQDAwgFAmlnCWJvZHlCeXRlcwkAkQMCCAUCaWcGcHJvb2ZzAAAFAmlpBgQCaWwJAPYDAQkBBXZhbHVlAQgFAmNDBnNjcmlwdAQCaW0JANsEAQkBBXZhbHVlAQkAnQgCBQJhUQkBAmFDAAQCaW4JAPEHAQUEdGhpcwMJAAACBQJpbQUCaWwJAQIhPQIFAmluBQJpbAcJAPQDAwgFAmlnCWJvZHlCeXRlcwkAkQMCCAUCaWcGcHJvb2ZzAAAFAmlpODxC4g==", "height": 2442518, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5pdDnJMzxJfnswHSVFBrATAceTDnSPi9ofcbNBAWR22Z Next: 5AgjhwQG3NGFP3Ah7rqD2au6h6iJYCfzLh63LSnADcyy Diff:
OldNewDifferences
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
25-
26-let tesstttingg = 1
2725
2826 let Amult = "100"
2927
233231
234232 let poolConfigParsed = parsePoolConfig(gpc())
235233
236-let $t079848213 = poolConfigParsed
234+let $t079658194 = poolConfigParsed
237235
238-let cfgPoolAddress = $t079848213._1
236+let cfgPoolAddress = $t079658194._1
239237
240-let cfgPoolStatus = $t079848213._2
238+let cfgPoolStatus = $t079658194._2
241239
242-let cfgLpAssetId = $t079848213._3
240+let cfgLpAssetId = $t079658194._3
243241
244-let cfgAmountAssetId = $t079848213._4
242+let cfgAmountAssetId = $t079658194._4
245243
246-let cfgPriceAssetId = $t079848213._5
244+let cfgPriceAssetId = $t079658194._5
247245
248-let cfgAmountAssetDecimals = $t079848213._6
246+let cfgAmountAssetDecimals = $t079658194._6
249247
250-let cfgPriceAssetDecimals = $t079848213._7
248+let cfgPriceAssetDecimals = $t079658194._7
251249
252-let cfgInAmountAssedId = $t079848213._8
250+let cfgInAmountAssedId = $t079658194._8
253251
254-let cfgInPriceAssetId = $t079848213._9
252+let cfgInPriceAssetId = $t079658194._9
255253
256254 func gfc () = split(strf(fca, fcfg()), SEP)
257255
372370 }
373371
374372 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
375- let $t01271012758 = {
373+ let $t01269112739 = {
376374 let $l = arr
377375 let $s = size($l)
378376 let $acc0 = $Tuple2(s, false)
386384
387385 $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)
388386 }
389- let d = $t01271012758._1
390- let found = $t01271012758._2
387+ let d = $t01269112739._1
388+ let found = $t01269112739._2
391389 if (found)
392390 then d
393391 else throw(("D calculation error, D = " + toString(d)))
523521 else calcLpAmt
524522 let amDiff = (inAmAmt - calcAmAssetPmt)
525523 let prDiff = (inPrAmt - calcPrAssetPmt)
526- let $t02059720942 = if (if (isOneAsset)
524+ let $t02057820923 = if (if (isOneAsset)
527525 then (pmtId == amIdStr)
528526 else false)
529527 then $Tuple2(pmtAmt, 0)
532530 else false)
533531 then $Tuple2(0, pmtAmt)
534532 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
535- let writeAmAmt = $t02059720942._1
536- let writePrAmt = $t02059720942._2
533+ let writeAmAmt = $t02057820923._1
534+ let writePrAmt = $t02057820923._2
537535 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))]
538536 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
539537 }
552550 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
553551 let b = ((s + ((D * aPrecision) / ann)) - D)
554552 func calc (acc,cur) = {
555- let $t02213722157 = acc
556- let y = $t02213722157._1
557- let found = $t02213722157._2
553+ let $t02211822138 = acc
554+ let y = $t02211822138._1
555+ let found = $t02211822138._2
558556 if ((found != unit))
559557 then acc
560558 else {
567565 }
568566
569567 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
570- let $t02246422511 = {
568+ let $t02244522492 = {
571569 let $l = arr
572570 let $s = size($l)
573571 let $acc0 = $Tuple2(D, unit)
581579
582580 $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)
583581 }
584- let y = $t02246422511._1
585- let found = $t02246422511._2
582+ let y = $t02244522492._1
583+ let found = $t02244522492._2
586584 if ((found != unit))
587585 then y
588586 else throw(("Y calculation error, Y = " + toString(y)))
626624 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
627625 let amountAssetAmount = order.amount
628626 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
629- let $t02470924921 = if ((order.orderType == Buy))
627+ let $t02469024902 = if ((order.orderType == Buy))
630628 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
631629 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
632- let amountAssetBalanceDelta = $t02470924921._1
633- let priceAssetBalanceDelta = $t02470924921._2
630+ let amountAssetBalanceDelta = $t02469024902._1
631+ let priceAssetBalanceDelta = $t02469024902._2
634632 if (if (if (igs())
635633 then true
636634 else (cfgPoolStatus == PoolMatcherDis))
643641 then throw("Wr assets")
644642 else {
645643 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
646- let $t02526325363 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
647- let unusedActions = $t02526325363._1
648- let dLpNew = $t02526325363._2
644+ let $t02524425344 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645+ let unusedActions = $t02524425344._1
646+ let dLpNew = $t02524425344._2
649647 let isOrderValid = (dLpNew >= dLp)
650648 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
651649 $Tuple2(isOrderValid, info)
699697 then {
700698 let amBalance = getAccBalance(amId)
701699 let prBalance = getAccBalance(prId)
702- let $t02801928481 = if ((txId == ""))
700+ let $t02800028462 = if ((txId == ""))
703701 then $Tuple2(amBalance, prBalance)
704702 else if ((pmtAssetId == amId))
705703 then if ((pmtAmtRaw > amBalance))
710708 then throw("invalid payment amount")
711709 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
712710 else throw("wrong pmtAssetId")
713- let amBalanceOld = $t02801928481._1
714- let prBalanceOld = $t02801928481._2
715- let $t02848728663 = if ((pmtAssetId == amId))
711+ let amBalanceOld = $t02800028462._1
712+ let prBalanceOld = $t02800028462._2
713+ let $t02846828644 = if ((pmtAssetId == amId))
716714 then $Tuple2(pmtAmtRaw, 0)
717715 else if ((pmtAssetId == prId))
718716 then $Tuple2(0, pmtAmtRaw)
719717 else throw("invalid payment")
720- let amAmountRaw = $t02848728663._1
721- let prAmountRaw = $t02848728663._2
722- let $t02866728921 = if (withTakeFee)
718+ let amAmountRaw = $t02846828644._1
719+ let prAmountRaw = $t02846828644._2
720+ let $t02864828902 = if (withTakeFee)
723721 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
724722 else $Tuple3(amAmountRaw, prAmountRaw, 0)
725- let amAmount = $t02866728921._1
726- let prAmount = $t02866728921._2
727- let feeAmount = $t02866728921._3
723+ let amAmount = $t02864828902._1
724+ let prAmount = $t02864828902._2
725+ let feeAmount = $t02864828902._3
728726 let amBalanceNew = (amBalanceOld + amAmount)
729727 let prBalanceNew = (prBalanceOld + prAmount)
730728 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
772770 else {
773771 let amBalance = getAccBalance(amId)
774772 let prBalance = getAccBalance(prId)
775- let $t03103331144 = {
773+ let $t03101431125 = {
776774 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
777775 if ($isInstanceOf(@, "(Int, Int)"))
778776 then @
779777 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
780778 }
781- if (($t03103331144 == $t03103331144))
779+ if (($t03101431125 == $t03101431125))
782780 then {
783- let feeAmount = $t03103331144._2
784- let totalGet = $t03103331144._1
781+ let feeAmount = $t03101431125._2
782+ let totalGet = $t03101431125._1
785783 let totalAmount = if (if ((minOutAmount > 0))
786784 then (minOutAmount > totalGet)
787785 else false)
788786 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
789787 else totalGet
790- let $t03133431641 = if ((outAssetId == amId))
788+ let $t03131531622 = if ((outAssetId == amId))
791789 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
792790 else if ((outAssetId == prId))
793791 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
794792 else throw("invalid out asset id")
795- let outAm = $t03133431641._1
796- let outPr = $t03133431641._2
797- let amBalanceNew = $t03133431641._3
798- let prBalanceNew = $t03133431641._4
793+ let outAm = $t03131531622._1
794+ let outPr = $t03131531622._2
795+ let amBalanceNew = $t03131531622._3
796+ let prBalanceNew = $t03131531622._4
799797 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
800798 let curPr = f1(curPrX18, scale8)
801799 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
810808 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
811809 if ((burn == burn))
812810 then {
813- let $t03242632776 = {
811+ let $t03240732757 = {
814812 let feeAmountForCalc = if ((this == feeCollectorAddress))
815813 then 0
816814 else feeAmount
821819 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
822820 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
823821 }
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
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
829827 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
830828 if ((isUpdatedDLpValid == isUpdatedDLpValid))
831829 then $Tuple2((state ++ refreshDLpActions), totalAmount)
904902 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
905903 let b = ((s + ((D * aPrecision) / ann)) - D)
906904 func calc (acc,cur) = {
907- let $t03433434354 = acc
908- let y = $t03433434354._1
909- let found = $t03433434354._2
905+ let $t03431534335 = acc
906+ let y = $t03431534335._1
907+ let found = $t03431534335._2
910908 if ((found != unit))
911909 then acc
912910 else {
919917 }
920918
921919 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
922- let $t03468534732 = {
920+ let $t03466634713 = {
923921 let $l = arr
924922 let $s = size($l)
925923 let $acc0 = $Tuple2(D, unit)
933931
934932 $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)
935933 }
936- let y = $t03468534732._1
937- let found = $t03468534732._2
934+ let y = $t03466634713._1
935+ let found = $t03466634713._2
938936 if ((found != unit))
939937 then y
940938 else throw(("Y calculation error, Y = " + toString(y)))
943941
944942 @Callable(i)
945943 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse) = {
946- let $t03495335377 = if ((isReverse == false))
944+ let $t03493435358 = if ((isReverse == false))
947945 then {
948946 let assetOut = strf(this, pa())
949947 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
954952 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
955953 $Tuple2(assetOut, poolAmountInBalance)
956954 }
957- let assetOut = $t03495335377._1
958- let poolAmountInBalance = $t03495335377._2
955+ let assetOut = $t03493435358._1
956+ let poolAmountInBalance = $t03493435358._2
959957 let poolConfig = gpc()
960958 let amId = poolConfig[idxAmAsId]
961959 let prId = poolConfig[idxPrAsId]
997995 let assetIn = if ((pmt.assetId == unit))
998996 then toBase58String(toBytes("WAVES"))
999997 else toBase58String(value(pmt.assetId))
1000- let $t03681537209 = if ((isReverse == false))
998+ let $t03679637190 = if ((isReverse == false))
1001999 then {
10021000 let assetOut = strf(this, pa())
10031001 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10081006 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10091007 $Tuple2(assetOut, poolAmountInBalance)
10101008 }
1011- let assetOut = $t03681537209._1
1012- let poolAmountInBalance = $t03681537209._2
1009+ let assetOut = $t03679637190._1
1010+ let poolAmountInBalance = $t03679637190._2
10131011 let poolConfig = gpc()
10141012 let amId = poolConfig[idxAmAsId]
10151013 let prId = poolConfig[idxPrAsId]
11491147 else throw("Strict value is not equal to itself.")
11501148 }
11511149 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1152- let $t04206642208 = refreshDLpInternal(0, 0, 0)
1153- let refreshDLpActions = $t04206642208._1
1154- let updatedDLp = $t04206642208._2
1150+ let $t04204742189 = refreshDLpInternal(0, 0, 0)
1151+ let refreshDLpActions = $t04204742189._1
1152+ let updatedDLp = $t04204742189._2
11551153 let check = if ((updatedDLp >= currentDLp))
11561154 then true
11571155 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
12241222 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12251223 if ((currentDLp == currentDLp))
12261224 then {
1227- let $t04384944007 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1228- if (($t04384944007 == $t04384944007))
1225+ let $t04383043988 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1226+ if (($t04383043988 == $t04383043988))
12291227 then {
1230- let feeAmount = $t04384944007._3
1231- let state = $t04384944007._2
1232- let estimLP = $t04384944007._1
1228+ let feeAmount = $t04383043988._3
1229+ let state = $t04383043988._2
1230+ let estimLP = $t04383043988._1
12331231 let emitLpAmt = if (if ((minOutAmount > 0))
12341232 then (minOutAmount > estimLP)
12351233 else false)
12571255 let sendFeeToMatcher = if ((feeAmount > 0))
12581256 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12591257 else nil
1260- let $t04482245171 = if ((this == feeCollectorAddress))
1258+ let $t04480345152 = if ((this == feeCollectorAddress))
12611259 then $Tuple2(0, 0)
12621260 else {
12631261 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12671265 then $Tuple2(-(feeAmount), 0)
12681266 else $Tuple2(0, -(feeAmount))
12691267 }
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
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
12751273 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12761274 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12771275 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
13031301 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13041302 if ((currentDLp == currentDLp))
13051303 then {
1306- let $t04631246377 = refreshDLpInternal(0, 0, 0)
1307- let refreshDLpActions = $t04631246377._1
1308- let updatedDLp = $t04631246377._2
1304+ let $t04629346358 = refreshDLpInternal(0, 0, 0)
1305+ let refreshDLpActions = $t04629346358._1
1306+ let updatedDLp = $t04629346358._2
13091307 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13101308 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13111309 then (state ++ refreshDLpActions)
13301328 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13311329 if ((b == b))
13321330 then {
1333- let $t04755047632 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1334- let refreshDLpActions = $t04755047632._1
1335- let updatedDLp = $t04755047632._2
1331+ let $t04753147613 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1332+ let refreshDLpActions = $t04753147613._1
1333+ let updatedDLp = $t04753147613._2
13361334 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13371335 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13381336 then (state ++ refreshDLpActions)
13671365 else throwErr("exactly 1 payment are expected")]
13681366 if ((checks == checks))
13691367 then {
1370- let $t04825048405 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1371- let state = $t04825048405._1
1372- let totalAmount = $t04825048405._2
1368+ let $t04823148386 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1369+ let state = $t04823148386._1
1370+ let totalAmount = $t04823148386._2
13731371 $Tuple2(state, totalAmount)
13741372 }
13751373 else throw("Strict value is not equal to itself.")
13861384 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13871385 then {
13881386 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1389- let $t04892948993 = refreshDLpInternal(0, 0, 0)
1390- let dLpUpdateActions = $t04892948993._1
1391- let updatedDLp = $t04892948993._2
1387+ let $t04891048974 = refreshDLpInternal(0, 0, 0)
1388+ let dLpUpdateActions = $t04891048974._1
1389+ let updatedDLp = $t04891048974._2
13921390 let actions = if ((dLp != updatedDLp))
13931391 then dLpUpdateActions
13941392 else throwErr("nothing to refresh")
14161414 let newY = getYD(xp, index, D1)
14171415 let dy = (xp[index] - newY)
14181416 let totalGetRaw = max([0, toInt((dy - big1))])
1419- let $t05000350058 = takeFee(totalGetRaw, outFee)
1420- let totalGet = $t05000350058._1
1421- let feeAmount = $t05000350058._2
1417+ let $t04998450039 = takeFee(totalGetRaw, outFee)
1418+ let totalGet = $t04998450039._1
1419+ let feeAmount = $t04998450039._2
14221420 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14231421 }
14241422
14311429 let lpId = toBase58String(value(cfgLpAssetId))
14321430 let amBalance = getAccBalance(amId)
14331431 let prBalance = getAccBalance(prId)
1434- let $t05043350548 = {
1432+ let $t05041450529 = {
14351433 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14361434 if ($isInstanceOf(@, "(Int, Int)"))
14371435 then @
14381436 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14391437 }
1440- let totalGet = $t05043350548._1
1441- let feeAmount = $t05043350548._2
1438+ let totalGet = $t05041450529._1
1439+ let feeAmount = $t05041450529._2
14421440 let r = ego("", lpId, lpAssetAmount, this)
14431441 let outAmAmt = r._1
14441442 let outPrAmt = r._2
14721470 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14731471 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14741472 then {
1475- let $t05171451795 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1476- let refreshDLpActions = $t05171451795._1
1477- let updatedDLp = $t05171451795._2
1473+ let $t05169551776 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1474+ let refreshDLpActions = $t05169551776._1
1475+ let updatedDLp = $t05169551776._2
14781476 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14791477 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14801478 then (state ++ refreshDLpActions)
15191517 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15201518 if ((burnA == burnA))
15211519 then {
1522- let $t05282252903 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1523- let refreshDLpActions = $t05282252903._1
1524- let updatedDLp = $t05282252903._2
1520+ let $t05280352884 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1521+ let refreshDLpActions = $t05280352884._1
1522+ let updatedDLp = $t05280352884._2
15251523 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15261524 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15271525 then (state ++ refreshDLpActions)
15721570 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15731571 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15741572 then {
1575- let $t05415454235 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1576- let refreshDLpActions = $t05415454235._1
1577- let updatedDLp = $t05415454235._2
1573+ let $t05413554216 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1574+ let refreshDLpActions = $t05413554216._1
1575+ let updatedDLp = $t05413554216._2
15781576 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15791577 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15801578 then (state ++ refreshDLpActions)
16211619 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
16221620 if ((unstakeInv == unstakeInv))
16231621 then {
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
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
16271625 $Tuple2(state, totalAmount)
16281626 }
16291627 else throw("Strict value is not equal to itself.")
16351633
16361634 @Callable(i)
16371635 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
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
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
16431641 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16441642 }
16451643
16471645
16481646 @Callable(i)
16491647 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
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
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
16551653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16561654 }
16571655
17361734 match tx {
17371735 case order: Order =>
17381736 let matcherPub = mp()
1739- let $t05859358662 = validateMatcherOrderAllowed(order)
1740- let orderValid = $t05859358662._1
1741- let orderValidInfo = $t05859358662._2
1737+ let $t05857458643 = validateMatcherOrderAllowed(order)
1738+ let orderValid = $t05857458643._1
1739+ let orderValidInfo = $t05857458643._2
17421740 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17431741 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17441742 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
2725
2826 let Amult = "100"
2927
3028 let Dconv = "1"
3129
3230 let SEP = "__"
3331
3432 let EMPTY = ""
3533
3634 let PoolActive = 1
3735
3836 let PoolPutDis = 2
3937
4038 let PoolMatcherDis = 3
4139
4240 let PoolShutdown = 4
4341
4442 let idxPoolAddress = 1
4543
4644 let idxPoolSt = 2
4745
4846 let idxLPAsId = 3
4947
5048 let idxAmAsId = 4
5149
5250 let idxPrAsId = 5
5351
5452 let idxAmtAsDcm = 6
5553
5654 let idxPriceAsDcm = 7
5755
5856 let idxIAmtAsId = 8
5957
6058 let idxIPriceAsId = 9
6159
6260 let idxFactStakCntr = 1
6361
6462 let idxFactoryRestCntr = 6
6563
6664 let idxFactSlippCntr = 7
6765
6866 let idxFactGwxRewCntr = 10
6967
7068 let feeDefault = fraction(10, scale8, 10000)
7169
7270 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7371
7472
7573 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7674
7775
7876 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7977
8078
8179 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8280
8381
8482 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8583
8684
8785 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8886
8987
9088 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
9189
9290
9391 func abs (val) = if ((zeroBigInt > val))
9492 then -(val)
9593 else val
9694
9795
9896 func absBigInt (val) = if ((zeroBigInt > val))
9997 then -(val)
10098 else val
10199
102100
103101 func fc () = "%s__factoryContract"
104102
105103
106104 func mpk () = "%s__managerPublicKey"
107105
108106
109107 func pmpk () = "%s__pendingManagerPublicKey"
110108
111109
112110 func pl () = "%s%s__price__last"
113111
114112
115113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
116114
117115
118116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
119117
120118
121119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
122120
123121
124122 func aa () = "%s__amountAsset"
125123
126124
127125 func pa () = "%s__priceAsset"
128126
129127
130128 func amp () = "%s__amp"
131129
132130
133131 func ada () = "%s__addonAddr"
134132
135133
136134 let keyFee = "%s__fee"
137135
138136 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
139137
140138 let keyDLp = makeString(["%s", "dLp"], SEP)
141139
142140 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
143141
144142 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
145143
146144 let dLpRefreshDelayDefault = 30
147145
148146 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
149147
150148 func fcfg () = "%s__factoryConfig"
151149
152150
153151 func mtpk () = "%s%s__matcher__publicKey"
154152
155153
156154 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
157155
158156
159157 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
160158
161159
162160 func aps () = "%s__shutdown"
163161
164162
165163 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
166164
167165
168166 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
169167
170168
171169 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
172170
173171
174172 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
175173
176174
177175 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
178176
179177
180178 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
181179
182180
183181 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
184182
185183
186184 let fca = addressFromStringValue(strf(this, fc()))
187185
188186 let inFee = {
189187 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
190188 if ($isInstanceOf(@, "Int"))
191189 then @
192190 else throw(($getType(@) + " couldn't be cast to Int"))
193191 }
194192
195193 let outFee = {
196194 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
197195 if ($isInstanceOf(@, "Int"))
198196 then @
199197 else throw(($getType(@) + " couldn't be cast to Int"))
200198 }
201199
202200 let A = strf(this, amp())
203201
204202 func igs () = valueOrElse(getBoolean(fca, aps()), false)
205203
206204
207205 func mp () = fromBase58String(strf(fca, mtpk()))
208206
209207
210208 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
211209
212210 func gpc () = {
213211 let amtAs = strf(this, aa())
214212 let priceAs = strf(this, pa())
215213 let iPriceAs = intf(fca, mba(priceAs))
216214 let iAmtAs = intf(fca, mba(amtAs))
217215 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
218216 }
219217
220218
221219 func parseAssetId (input) = if ((input == wavesString))
222220 then unit
223221 else fromBase58String(input)
224222
225223
226224 func assetIdToString (input) = if ((input == unit))
227225 then wavesString
228226 else toBase58String(value(input))
229227
230228
231229 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]))
232230
233231
234232 let poolConfigParsed = parsePoolConfig(gpc())
235233
236-let $t079848213 = poolConfigParsed
234+let $t079658194 = poolConfigParsed
237235
238-let cfgPoolAddress = $t079848213._1
236+let cfgPoolAddress = $t079658194._1
239237
240-let cfgPoolStatus = $t079848213._2
238+let cfgPoolStatus = $t079658194._2
241239
242-let cfgLpAssetId = $t079848213._3
240+let cfgLpAssetId = $t079658194._3
243241
244-let cfgAmountAssetId = $t079848213._4
242+let cfgAmountAssetId = $t079658194._4
245243
246-let cfgPriceAssetId = $t079848213._5
244+let cfgPriceAssetId = $t079658194._5
247245
248-let cfgAmountAssetDecimals = $t079848213._6
246+let cfgAmountAssetDecimals = $t079658194._6
249247
250-let cfgPriceAssetDecimals = $t079848213._7
248+let cfgPriceAssetDecimals = $t079658194._7
251249
252-let cfgInAmountAssedId = $t079848213._8
250+let cfgInAmountAssedId = $t079658194._8
253251
254-let cfgInPriceAssetId = $t079848213._9
252+let cfgInPriceAssetId = $t079658194._9
255253
256254 func gfc () = split(strf(fca, fcfg()), SEP)
257255
258256
259257 let factoryConfig = gfc()
260258
261259 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
262260
263261 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
264262
265263 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
266264
267265 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
268266
269267 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)
270268
271269
272270 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)
273271
274272
275273 func getAccBalance (assetId) = if ((assetId == "WAVES"))
276274 then wavesBalance(this).available
277275 else assetBalance(this, fromBase58String(assetId))
278276
279277
280278 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
281279
282280
283281 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
284282
285283
286284 func vad (A1,A2,slippage) = {
287285 let diff = fraction((A1 - A2), scale8BigInt, A2)
288286 let pass = ((slippage - abs(diff)) > zeroBigInt)
289287 if (!(pass))
290288 then throw(("Big slpg: " + toString(diff)))
291289 else $Tuple2(pass, min([A1, A2]))
292290 }
293291
294292
295293 func vd (D1,D0,slpg) = {
296294 let diff = fraction(D0, scale8BigInt, D1)
297295 let fail = (slpg > diff)
298296 if (if (fail)
299297 then true
300298 else (D0 > D1))
301299 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
302300 else fail
303301 }
304302
305303
306304 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
307305 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
308306 let prAsAmtX18 = t1(prAmt, prAssetDcm)
309307 cpbi(prAsAmtX18, amtAsAmtX18)
310308 }
311309
312310
313311 func calcPrices (amAmt,prAmt,lpAmt) = {
314312 let amtAsDcm = cfgAmountAssetDecimals
315313 let prAsDcm = cfgPriceAssetDecimals
316314 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
317315 let amAmtX18 = t1(amAmt, amtAsDcm)
318316 let prAmtX18 = t1(prAmt, prAsDcm)
319317 let lpAmtX18 = t1(lpAmt, scale8)
320318 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
321319 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
322320 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
323321 }
324322
325323
326324 func calculatePrices (amAmt,prAmt,lpAmt) = {
327325 let p = calcPrices(amAmt, prAmt, lpAmt)
328326 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
329327 }
330328
331329
332330 func takeFee (amount,fee) = {
333331 let feeAmount = if ((fee == 0))
334332 then 0
335333 else fraction(amount, fee, scale8)
336334 $Tuple2((amount - feeAmount), feeAmount)
337335 }
338336
339337
340338 func getD (xp) = {
341339 let xp0 = xp[0]
342340 let xp1 = xp[1]
343341 let s = (xp0 + xp1)
344342 if ((s == big0))
345343 then big0
346344 else {
347345 let a = parseIntValue(A)
348346 let ann = (a * 2)
349347 let p = fraction(xp0, xp1, big1)
350348 let xp0_xp1_n_n = fraction(p, big4, big1)
351349 let ann_s = fraction(toBigInt(ann), s, big1)
352350 let ann_1 = toBigInt((ann - 1))
353351 func calcDNext (d) = {
354352 let dd = fraction(d, d, big1)
355353 let ddd = fraction(dd, d, big1)
356354 let dp = fraction(ddd, big1, xp0_xp1_n_n)
357355 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
358356 }
359357
360358 func calc (acc,i) = if (acc._2)
361359 then acc
362360 else {
363361 let d = acc._1
364362 let dNext = calcDNext(d)
365363 let dDiffRaw = (dNext - value(d))
366364 let dDiff = if ((big0 > dDiffRaw))
367365 then -(dDiffRaw)
368366 else dDiffRaw
369367 if ((big1 >= dDiff))
370368 then $Tuple2(dNext, true)
371369 else $Tuple2(dNext, false)
372370 }
373371
374372 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
375- let $t01271012758 = {
373+ let $t01269112739 = {
376374 let $l = arr
377375 let $s = size($l)
378376 let $acc0 = $Tuple2(s, false)
379377 func $f0_1 ($a,$i) = if (($i >= $s))
380378 then $a
381379 else calc($a, $l[$i])
382380
383381 func $f0_2 ($a,$i) = if (($i >= $s))
384382 then $a
385383 else throw("List size exceeds 15")
386384
387385 $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)
388386 }
389- let d = $t01271012758._1
390- let found = $t01271012758._2
387+ let d = $t01269112739._1
388+ let found = $t01269112739._2
391389 if (found)
392390 then d
393391 else throw(("D calculation error, D = " + toString(d)))
394392 }
395393 }
396394
397395
398396 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
399397 let lpId = cfgLpAssetId
400398 let amId = toBase58String(value(cfgAmountAssetId))
401399 let prId = toBase58String(value(cfgPriceAssetId))
402400 let amDcm = cfgAmountAssetDecimals
403401 let prDcm = cfgPriceAssetDecimals
404402 let sts = toString(cfgPoolStatus)
405403 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
406404 if ((toBase58String(lpId) != pmtAssetId))
407405 then throw("Wrong pmt asset")
408406 else {
409407 let amBalance = getAccBalance(amId)
410408 let amBalanceX18 = t1(amBalance, amDcm)
411409 let prBalance = getAccBalance(prId)
412410 let prBalanceX18 = t1(prBalance, prDcm)
413411 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
414412 let curPrice = f1(curPriceX18, scale8)
415413 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
416414 let lpEmissX18 = t1(lpEmiss, scale8)
417415 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
418416 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
419417 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
420418 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
421419 let state = if ((txId58 == ""))
422420 then nil
423421 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
424422 then unit
425423 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
426424 then unit
427425 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)]
428426 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
429427 }
430428 }
431429
432430
433431 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
434432 let lpId = cfgLpAssetId
435433 let amIdStr = toBase58String(value(cfgAmountAssetId))
436434 let prIdStr = toBase58String(value(cfgPriceAssetId))
437435 let inAmIdStr = cfgInAmountAssedId
438436 let inPrIdStr = cfgInPriceAssetId
439437 let amtDcm = cfgAmountAssetDecimals
440438 let priceDcm = cfgPriceAssetDecimals
441439 let sts = toString(cfgPoolStatus)
442440 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
443441 let amBalance = if (isEval)
444442 then getAccBalance(amIdStr)
445443 else if (if (isOneAsset)
446444 then (pmtId == amIdStr)
447445 else false)
448446 then (getAccBalance(amIdStr) - pmtAmt)
449447 else if (isOneAsset)
450448 then getAccBalance(amIdStr)
451449 else (getAccBalance(amIdStr) - inAmAmt)
452450 let prBalance = if (isEval)
453451 then getAccBalance(prIdStr)
454452 else if (if (isOneAsset)
455453 then (pmtId == prIdStr)
456454 else false)
457455 then (getAccBalance(prIdStr) - pmtAmt)
458456 else if (isOneAsset)
459457 then getAccBalance(prIdStr)
460458 else (getAccBalance(prIdStr) - inPrAmt)
461459 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
462460 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
463461 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
464462 let amBalanceX18 = t1(amBalance, amtDcm)
465463 let prBalanceX18 = t1(prBalance, priceDcm)
466464 let D0 = getD([amBalanceX18, prBalanceX18])
467465 let r = if ((lpEm == 0))
468466 then {
469467 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
470468 let checkD = if ((D1 > D0))
471469 then true
472470 else throw("D1 should be greater than D0")
473471 if ((checkD == checkD))
474472 then {
475473 let curPriceX18 = zeroBigInt
476474 let slippageX18 = zeroBigInt
477475 let lpAmtX18 = D1
478476 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
479477 }
480478 else throw("Strict value is not equal to itself.")
481479 }
482480 else {
483481 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
484482 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
485483 let slippageX18 = t1(slippage, scale8)
486484 if (if (if (validateSlippage)
487485 then (curPriceX18 != zeroBigInt)
488486 else false)
489487 then (slippageRealX18 > slippageX18)
490488 else false)
491489 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
492490 else {
493491 let lpEmissionX18 = t1(lpEm, scale8)
494492 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
495493 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
496494 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
497495 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
498496 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
499497 let expAmtAssetAmtX18 = expectedAmts._1
500498 let expPriceAssetAmtX18 = expectedAmts._2
501499 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
502500 let checkD = if ((D1 > D0))
503501 then true
504502 else throw("D1 should be greater than D0")
505503 if ((checkD == checkD))
506504 then {
507505 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
508506 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
509507 }
510508 else throw("Strict value is not equal to itself.")
511509 }
512510 }
513511 let calcLpAmt = r._1
514512 let calcAmAssetPmt = r._2
515513 let calcPrAssetPmt = r._3
516514 let curPrice = f1(r._4, scale8)
517515 let slippageCalc = f1(r._5, scale8)
518516 if ((0 >= calcLpAmt))
519517 then throw("LP <= 0")
520518 else {
521519 let emitLpAmt = if (!(emitLp))
522520 then 0
523521 else calcLpAmt
524522 let amDiff = (inAmAmt - calcAmAssetPmt)
525523 let prDiff = (inPrAmt - calcPrAssetPmt)
526- let $t02059720942 = if (if (isOneAsset)
524+ let $t02057820923 = if (if (isOneAsset)
527525 then (pmtId == amIdStr)
528526 else false)
529527 then $Tuple2(pmtAmt, 0)
530528 else if (if (isOneAsset)
531529 then (pmtId == prIdStr)
532530 else false)
533531 then $Tuple2(0, pmtAmt)
534532 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
535- let writeAmAmt = $t02059720942._1
536- let writePrAmt = $t02059720942._2
533+ let writeAmAmt = $t02057820923._1
534+ let writePrAmt = $t02057820923._2
537535 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))]
538536 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
539537 }
540538 }
541539
542540
543541 func getYD (xp,i,D) = {
544542 let n = big2
545543 let x = xp[if ((i == 0))
546544 then 1
547545 else 0]
548546 let aPrecision = parseBigIntValue(Amult)
549547 let a = (parseBigIntValue(A) * aPrecision)
550548 let s = x
551549 let ann = (a * n)
552550 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
553551 let b = ((s + ((D * aPrecision) / ann)) - D)
554552 func calc (acc,cur) = {
555- let $t02213722157 = acc
556- let y = $t02213722157._1
557- let found = $t02213722157._2
553+ let $t02211822138 = acc
554+ let y = $t02211822138._1
555+ let found = $t02211822138._2
558556 if ((found != unit))
559557 then acc
560558 else {
561559 let yNext = (((y * y) + c) / ((big2 * y) + b))
562560 let yDiff = absBigInt((yNext - value(y)))
563561 if ((big1 >= yDiff))
564562 then $Tuple2(yNext, cur)
565563 else $Tuple2(yNext, unit)
566564 }
567565 }
568566
569567 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
570- let $t02246422511 = {
568+ let $t02244522492 = {
571569 let $l = arr
572570 let $s = size($l)
573571 let $acc0 = $Tuple2(D, unit)
574572 func $f0_1 ($a,$i) = if (($i >= $s))
575573 then $a
576574 else calc($a, $l[$i])
577575
578576 func $f0_2 ($a,$i) = if (($i >= $s))
579577 then $a
580578 else throw("List size exceeds 15")
581579
582580 $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)
583581 }
584- let y = $t02246422511._1
585- let found = $t02246422511._2
582+ let y = $t02244522492._1
583+ let found = $t02244522492._2
586584 if ((found != unit))
587585 then y
588586 else throw(("Y calculation error, Y = " + toString(y)))
589587 }
590588
591589
592590 func calcDLp (amountBalance,priceBalance,lpEmission) = {
593591 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
594592 if ((lpEmission == big0))
595593 then big0
596594 else updatedDLp
597595 }
598596
599597
600598 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
601599 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
602600 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
603601 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
604602 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
605603 currentDLp
606604 }
607605
608606
609607 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
610608 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
611609 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
612610 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
613611 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
614612 let actions = [IntegerEntry(keyDLpRefreshedHeight, height), StringEntry(keyDLp, toString(updatedDLp))]
615613 $Tuple2(actions, updatedDLp)
616614 }
617615
618616
619617 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
620618 then true
621619 else throwErr("updated DLp lower than current DLp")
622620
623621
624622 func validateMatcherOrderAllowed (order) = {
625623 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
626624 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
627625 let amountAssetAmount = order.amount
628626 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
629- let $t02470924921 = if ((order.orderType == Buy))
627+ let $t02469024902 = if ((order.orderType == Buy))
630628 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
631629 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
632- let amountAssetBalanceDelta = $t02470924921._1
633- let priceAssetBalanceDelta = $t02470924921._2
630+ let amountAssetBalanceDelta = $t02469024902._1
631+ let priceAssetBalanceDelta = $t02469024902._2
634632 if (if (if (igs())
635633 then true
636634 else (cfgPoolStatus == PoolMatcherDis))
637635 then true
638636 else (cfgPoolStatus == PoolShutdown))
639637 then throw("Admin blocked")
640638 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
641639 then true
642640 else (order.assetPair.priceAsset != cfgPriceAssetId))
643641 then throw("Wr assets")
644642 else {
645643 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
646- let $t02526325363 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
647- let unusedActions = $t02526325363._1
648- let dLpNew = $t02526325363._2
644+ let $t02524425344 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
645+ let unusedActions = $t02524425344._1
646+ let dLpNew = $t02524425344._2
649647 let isOrderValid = (dLpNew >= dLp)
650648 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(height)], "")
651649 $Tuple2(isOrderValid, info)
652650 }
653651 }
654652
655653
656654 func cg (i) = if ((size(i.payments) != 1))
657655 then throw("1 pmnt exp")
658656 else {
659657 let pmt = value(i.payments[0])
660658 let pmtAssetId = value(pmt.assetId)
661659 let pmtAmt = pmt.amount
662660 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
663661 let outAmAmt = r._1
664662 let outPrAmt = r._2
665663 let sts = parseIntValue(r._9)
666664 let state = r._10
667665 if (if (igs())
668666 then true
669667 else (sts == PoolShutdown))
670668 then throw(("Admin blocked: " + toString(sts)))
671669 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
672670 }
673671
674672
675673 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
676674 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
677675 let sts = parseIntValue(r._8)
678676 if (if (if (igs())
679677 then true
680678 else (sts == PoolPutDis))
681679 then true
682680 else (sts == PoolShutdown))
683681 then throw(("Blocked:" + toString(sts)))
684682 else r
685683 }
686684
687685
688686 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
689687 let amId = toBase58String(value(cfgAmountAssetId))
690688 let prId = toBase58String(value(cfgPriceAssetId))
691689 let lpId = cfgLpAssetId
692690 let amtDcm = cfgAmountAssetDecimals
693691 let priceDcm = cfgPriceAssetDecimals
694692 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
695693 let chechEmission = if ((lpAssetEmission > big0))
696694 then true
697695 else throw("initial deposit requires all coins")
698696 if ((chechEmission == chechEmission))
699697 then {
700698 let amBalance = getAccBalance(amId)
701699 let prBalance = getAccBalance(prId)
702- let $t02801928481 = if ((txId == ""))
700+ let $t02800028462 = if ((txId == ""))
703701 then $Tuple2(amBalance, prBalance)
704702 else if ((pmtAssetId == amId))
705703 then if ((pmtAmtRaw > amBalance))
706704 then throw("invalid payment amount")
707705 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
708706 else if ((pmtAssetId == prId))
709707 then if ((pmtAmtRaw > prBalance))
710708 then throw("invalid payment amount")
711709 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
712710 else throw("wrong pmtAssetId")
713- let amBalanceOld = $t02801928481._1
714- let prBalanceOld = $t02801928481._2
715- let $t02848728663 = if ((pmtAssetId == amId))
711+ let amBalanceOld = $t02800028462._1
712+ let prBalanceOld = $t02800028462._2
713+ let $t02846828644 = if ((pmtAssetId == amId))
716714 then $Tuple2(pmtAmtRaw, 0)
717715 else if ((pmtAssetId == prId))
718716 then $Tuple2(0, pmtAmtRaw)
719717 else throw("invalid payment")
720- let amAmountRaw = $t02848728663._1
721- let prAmountRaw = $t02848728663._2
722- let $t02866728921 = if (withTakeFee)
718+ let amAmountRaw = $t02846828644._1
719+ let prAmountRaw = $t02846828644._2
720+ let $t02864828902 = if (withTakeFee)
723721 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
724722 else $Tuple3(amAmountRaw, prAmountRaw, 0)
725- let amAmount = $t02866728921._1
726- let prAmount = $t02866728921._2
727- let feeAmount = $t02866728921._3
723+ let amAmount = $t02864828902._1
724+ let prAmount = $t02864828902._2
725+ let feeAmount = $t02864828902._3
728726 let amBalanceNew = (amBalanceOld + amAmount)
729727 let prBalanceNew = (prBalanceOld + prAmount)
730728 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
731729 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
732730 let checkD = if ((D1 > D0))
733731 then true
734732 else throw()
735733 if ((checkD == checkD))
736734 then {
737735 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
738736 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
739737 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))]
740738 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
741739 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
742740 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
743741 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
744742 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
745743 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
746744 }
747745 else throw("Strict value is not equal to itself.")
748746 }
749747 else throw("Strict value is not equal to itself.")
750748 }
751749
752750
753751 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
754752 let lpId = toBase58String(value(cfgLpAssetId))
755753 let amId = toBase58String(value(cfgAmountAssetId))
756754 let prId = toBase58String(value(cfgPriceAssetId))
757755 let amDecimals = cfgAmountAssetDecimals
758756 let prDecimals = cfgPriceAssetDecimals
759757 let poolStatus = cfgPoolStatus
760758 let userAddress = if ((caller == restContract))
761759 then originCaller
762760 else caller
763761 let pmt = value(payments[0])
764762 let pmtAssetId = value(pmt.assetId)
765763 let pmtAmt = pmt.amount
766764 let currentDLp = calcCurrentDLp(big0, big0, big0)
767765 if ((currentDLp == currentDLp))
768766 then {
769767 let txId58 = toBase58String(transactionId)
770768 if ((lpId != toBase58String(pmtAssetId)))
771769 then throw("Wrong LP")
772770 else {
773771 let amBalance = getAccBalance(amId)
774772 let prBalance = getAccBalance(prId)
775- let $t03103331144 = {
773+ let $t03101431125 = {
776774 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
777775 if ($isInstanceOf(@, "(Int, Int)"))
778776 then @
779777 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
780778 }
781- if (($t03103331144 == $t03103331144))
779+ if (($t03101431125 == $t03101431125))
782780 then {
783- let feeAmount = $t03103331144._2
784- let totalGet = $t03103331144._1
781+ let feeAmount = $t03101431125._2
782+ let totalGet = $t03101431125._1
785783 let totalAmount = if (if ((minOutAmount > 0))
786784 then (minOutAmount > totalGet)
787785 else false)
788786 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
789787 else totalGet
790- let $t03133431641 = if ((outAssetId == amId))
788+ let $t03131531622 = if ((outAssetId == amId))
791789 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
792790 else if ((outAssetId == prId))
793791 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
794792 else throw("invalid out asset id")
795- let outAm = $t03133431641._1
796- let outPr = $t03133431641._2
797- let amBalanceNew = $t03133431641._3
798- let prBalanceNew = $t03133431641._4
793+ let outAm = $t03131531622._1
794+ let outPr = $t03131531622._2
795+ let amBalanceNew = $t03131531622._3
796+ let prBalanceNew = $t03131531622._4
799797 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
800798 let curPr = f1(curPrX18, scale8)
801799 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
802800 then unit
803801 else fromBase58String(outAssetId)
804802 let sendFeeToMatcher = if ((feeAmount > 0))
805803 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
806804 else nil
807805 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)
808806 if ((state == state))
809807 then {
810808 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
811809 if ((burn == burn))
812810 then {
813- let $t03242632776 = {
811+ let $t03240732757 = {
814812 let feeAmountForCalc = if ((this == feeCollectorAddress))
815813 then 0
816814 else feeAmount
817815 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
818816 then true
819817 else false
820818 if (outInAmountAsset)
821819 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
822820 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
823821 }
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
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
829827 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
830828 if ((isUpdatedDLpValid == isUpdatedDLpValid))
831829 then $Tuple2((state ++ refreshDLpActions), totalAmount)
832830 else throw("Strict value is not equal to itself.")
833831 }
834832 else throw("Strict value is not equal to itself.")
835833 }
836834 else throw("Strict value is not equal to itself.")
837835 }
838836 else throw("Strict value is not equal to itself.")
839837 }
840838 }
841839 else throw("Strict value is not equal to itself.")
842840 }
843841
844842
845843 func m () = match getString(mpk()) {
846844 case s: String =>
847845 fromBase58String(s)
848846 case _: Unit =>
849847 unit
850848 case _ =>
851849 throw("Match error")
852850 }
853851
854852
855853 func pm () = match getString(pmpk()) {
856854 case s: String =>
857855 fromBase58String(s)
858856 case _: Unit =>
859857 unit
860858 case _ =>
861859 throw("Match error")
862860 }
863861
864862
865863 let pd = throw("Permission denied")
866864
867865 func isManager (i) = match m() {
868866 case pk: ByteVector =>
869867 (i.callerPublicKey == pk)
870868 case _: Unit =>
871869 (i.caller == this)
872870 case _ =>
873871 throw("Match error")
874872 }
875873
876874
877875 func mm (i) = match m() {
878876 case pk: ByteVector =>
879877 if ((i.callerPublicKey == pk))
880878 then true
881879 else pd
882880 case _: Unit =>
883881 if ((i.caller == this))
884882 then true
885883 else pd
886884 case _ =>
887885 throw("Match error")
888886 }
889887
890888
891889 func getY (isReverse,D,poolAmountInBalance) = {
892890 let poolConfig = gpc()
893891 let amId = poolConfig[idxAmAsId]
894892 let prId = poolConfig[idxPrAsId]
895893 let n = big2
896894 let aPrecision = parseBigIntValue(Amult)
897895 let a = (parseBigIntValue(A) * aPrecision)
898896 let xp = if ((isReverse == false))
899897 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
900898 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
901899 let x = xp[0]
902900 let s = x
903901 let ann = (a * n)
904902 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
905903 let b = ((s + ((D * aPrecision) / ann)) - D)
906904 func calc (acc,cur) = {
907- let $t03433434354 = acc
908- let y = $t03433434354._1
909- let found = $t03433434354._2
905+ let $t03431534335 = acc
906+ let y = $t03431534335._1
907+ let found = $t03431534335._2
910908 if ((found != unit))
911909 then acc
912910 else {
913911 let yNext = (((y * y) + c) / ((big2 * y) + b))
914912 let yDiff = absBigInt((yNext - value(y)))
915913 if ((big1 >= yDiff))
916914 then $Tuple2(yNext, cur)
917915 else $Tuple2(yNext, unit)
918916 }
919917 }
920918
921919 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
922- let $t03468534732 = {
920+ let $t03466634713 = {
923921 let $l = arr
924922 let $s = size($l)
925923 let $acc0 = $Tuple2(D, unit)
926924 func $f0_1 ($a,$i) = if (($i >= $s))
927925 then $a
928926 else calc($a, $l[$i])
929927
930928 func $f0_2 ($a,$i) = if (($i >= $s))
931929 then $a
932930 else throw("List size exceeds 15")
933931
934932 $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)
935933 }
936- let y = $t03468534732._1
937- let found = $t03468534732._2
934+ let y = $t03466634713._1
935+ let found = $t03466634713._2
938936 if ((found != unit))
939937 then y
940938 else throw(("Y calculation error, Y = " + toString(y)))
941939 }
942940
943941
944942 @Callable(i)
945943 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse) = {
946- let $t03495335377 = if ((isReverse == false))
944+ let $t03493435358 = if ((isReverse == false))
947945 then {
948946 let assetOut = strf(this, pa())
949947 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
950948 $Tuple2(assetOut, poolAmountInBalance)
951949 }
952950 else {
953951 let assetOut = strf(this, aa())
954952 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
955953 $Tuple2(assetOut, poolAmountInBalance)
956954 }
957- let assetOut = $t03495335377._1
958- let poolAmountInBalance = $t03495335377._2
955+ let assetOut = $t03493435358._1
956+ let poolAmountInBalance = $t03493435358._2
959957 let poolConfig = gpc()
960958 let amId = poolConfig[idxAmAsId]
961959 let prId = poolConfig[idxPrAsId]
962960 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
963961 let D = getD(xp)
964962 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
965963 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
966964 let totalGetRaw = max([0, toInt(dy)])
967965 let newXp = if ((isReverse == false))
968966 then [(toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)), (toBigInt(getAccBalance(prId)) - dy)]
969967 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn))]
970968 let newD = getD(newXp)
971969 let checkD = if ((newD >= D))
972970 then true
973971 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
974972 if ((checkD == checkD))
975973 then $Tuple2(nil, totalGetRaw)
976974 else throw("Strict value is not equal to itself.")
977975 }
978976
979977
980978
981979 @Callable(i)
982980 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo) = {
983981 let swapContact = {
984982 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
985983 if ($isInstanceOf(@, "String"))
986984 then @
987985 else throw(($getType(@) + " couldn't be cast to String"))
988986 }
989987 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
990988 then true
991989 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
992990 then true
993991 else throwErr("Permission denied")]
994992 if ((checks == checks))
995993 then {
996994 let pmt = value(i.payments[0])
997995 let assetIn = if ((pmt.assetId == unit))
998996 then toBase58String(toBytes("WAVES"))
999997 else toBase58String(value(pmt.assetId))
1000- let $t03681537209 = if ((isReverse == false))
998+ let $t03679637190 = if ((isReverse == false))
1001999 then {
10021000 let assetOut = strf(this, pa())
10031001 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10041002 $Tuple2(assetOut, poolAmountInBalance)
10051003 }
10061004 else {
10071005 let assetOut = strf(this, aa())
10081006 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10091007 $Tuple2(assetOut, poolAmountInBalance)
10101008 }
1011- let assetOut = $t03681537209._1
1012- let poolAmountInBalance = $t03681537209._2
1009+ let assetOut = $t03679637190._1
1010+ let poolAmountInBalance = $t03679637190._2
10131011 let poolConfig = gpc()
10141012 let amId = poolConfig[idxAmAsId]
10151013 let prId = poolConfig[idxPrAsId]
10161014 let xp = if ((isReverse == false))
10171015 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10181016 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10191017 let D = getD(xp)
10201018 let y = getY(isReverse, D, toBigInt(0))
10211019 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10221020 let totalGetRaw = max([0, toInt(dy)])
10231021 let checkMin = if ((totalGetRaw >= amountOutMin))
10241022 then true
10251023 else throw("Exchange result is fewer coins than expected")
10261024 if ((checkMin == checkMin))
10271025 then {
10281026 let newXp = if ((isReverse == false))
10291027 then [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - dy)]
10301028 else [(toBigInt(getAccBalance(amId)) - dy), toBigInt(getAccBalance(prId))]
10311029 let newD = getD(newXp)
10321030 let checkD = if ((newD >= D))
10331031 then true
10341032 else throw("new D is fewer error")
10351033 if ((checkD == checkD))
10361034 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10371035 else throw("Strict value is not equal to itself.")
10381036 }
10391037 else throw("Strict value is not equal to itself.")
10401038 }
10411039 else throw("Strict value is not equal to itself.")
10421040 }
10431041
10441042
10451043
10461044 @Callable(i)
10471045 func constructor (fc) = {
10481046 let c = mm(i)
10491047 if ((c == c))
10501048 then [StringEntry(fc(), fc)]
10511049 else throw("Strict value is not equal to itself.")
10521050 }
10531051
10541052
10551053
10561054 @Callable(i)
10571055 func setManager (pendingManagerPublicKey) = {
10581056 let c = mm(i)
10591057 if ((c == c))
10601058 then {
10611059 let cm = fromBase58String(pendingManagerPublicKey)
10621060 if ((cm == cm))
10631061 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10641062 else throw("Strict value is not equal to itself.")
10651063 }
10661064 else throw("Strict value is not equal to itself.")
10671065 }
10681066
10691067
10701068
10711069 @Callable(i)
10721070 func confirmManager () = {
10731071 let p = pm()
10741072 let hpm = if (isDefined(p))
10751073 then true
10761074 else throw("No pending manager")
10771075 if ((hpm == hpm))
10781076 then {
10791077 let cpm = if ((i.callerPublicKey == value(p)))
10801078 then true
10811079 else throw("You are not pending manager")
10821080 if ((cpm == cpm))
10831081 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10841082 else throw("Strict value is not equal to itself.")
10851083 }
10861084 else throw("Strict value is not equal to itself.")
10871085 }
10881086
10891087
10901088
10911089 @Callable(i)
10921090 func put (slip,autoStake) = {
10931091 let factCfg = gfc()
10941092 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
10951093 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
10961094 if ((0 > slip))
10971095 then throw("Wrong slippage")
10981096 else if ((size(i.payments) != 2))
10991097 then throw("2 pmnts expd")
11001098 else {
11011099 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11021100 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11031101 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11041102 if ((amountAssetBalance == amountAssetBalance))
11051103 then {
11061104 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11071105 if ((priceAssetBalance == priceAssetBalance))
11081106 then {
11091107 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11101108 if ((lpAssetEmission == lpAssetEmission))
11111109 then {
11121110 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11131111 if ((currentDLp == currentDLp))
11141112 then {
11151113 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, "")
11161114 let emitLpAmt = e._2
11171115 let lpAssetId = e._7
11181116 let state = e._9
11191117 let amDiff = e._10
11201118 let prDiff = e._11
11211119 let amId = e._12
11221120 let prId = e._13
11231121 let r = invoke(fca, "emit", [emitLpAmt], nil)
11241122 if ((r == r))
11251123 then {
11261124 let el = match r {
11271125 case legacy: Address =>
11281126 invoke(legacy, "emit", [emitLpAmt], nil)
11291127 case _ =>
11301128 unit
11311129 }
11321130 if ((el == el))
11331131 then {
11341132 let sa = if ((amDiff > 0))
11351133 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11361134 else nil
11371135 if ((sa == sa))
11381136 then {
11391137 let sp = if ((prDiff > 0))
11401138 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11411139 else nil
11421140 if ((sp == sp))
11431141 then {
11441142 let lpTrnsfr = if (autoStake)
11451143 then {
11461144 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11471145 if ((ss == ss))
11481146 then nil
11491147 else throw("Strict value is not equal to itself.")
11501148 }
11511149 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
1152- let $t04206642208 = refreshDLpInternal(0, 0, 0)
1153- let refreshDLpActions = $t04206642208._1
1154- let updatedDLp = $t04206642208._2
1150+ let $t04204742189 = refreshDLpInternal(0, 0, 0)
1151+ let refreshDLpActions = $t04204742189._1
1152+ let updatedDLp = $t04204742189._2
11551153 let check = if ((updatedDLp >= currentDLp))
11561154 then true
11571155 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11581156 if ((check == check))
11591157 then {
11601158 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11611159 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11621160 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11631161 else throw("Strict value is not equal to itself.")
11641162 }
11651163 else throw("Strict value is not equal to itself.")
11661164 }
11671165 else throw("Strict value is not equal to itself.")
11681166 }
11691167 else throw("Strict value is not equal to itself.")
11701168 }
11711169 else throw("Strict value is not equal to itself.")
11721170 }
11731171 else throw("Strict value is not equal to itself.")
11741172 }
11751173 else throw("Strict value is not equal to itself.")
11761174 }
11771175 else throw("Strict value is not equal to itself.")
11781176 }
11791177 else throw("Strict value is not equal to itself.")
11801178 }
11811179 else throw("Strict value is not equal to itself.")
11821180 }
11831181 }
11841182
11851183
11861184
11871185 @Callable(i)
11881186 func putOneTknV2 (minOutAmount,autoStake) = {
11891187 let isPoolOneTokenOperationsDisabled = {
11901188 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11911189 if ($isInstanceOf(@, "Boolean"))
11921190 then @
11931191 else throw(($getType(@) + " couldn't be cast to Boolean"))
11941192 }
11951193 let isPutDisabled = if (if (if (igs())
11961194 then true
11971195 else (cfgPoolStatus == PoolPutDis))
11981196 then true
11991197 else (cfgPoolStatus == PoolShutdown))
12001198 then true
12011199 else isPoolOneTokenOperationsDisabled
12021200 let checks = [if (if (!(isPutDisabled))
12031201 then true
12041202 else isManager(i))
12051203 then true
12061204 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12071205 then true
12081206 else throwErr("exactly 1 payment are expected")]
12091207 if ((checks == checks))
12101208 then {
12111209 let amId = toBase58String(value(cfgAmountAssetId))
12121210 let prId = toBase58String(value(cfgPriceAssetId))
12131211 let lpId = cfgLpAssetId
12141212 let amDecimals = cfgAmountAssetDecimals
12151213 let prDecimals = cfgPriceAssetDecimals
12161214 let userAddress = if ((i.caller == this))
12171215 then i.originCaller
12181216 else i.caller
12191217 let pmt = value(i.payments[0])
12201218 let pmtAssetId = toBase58String(value(pmt.assetId))
12211219 let pmtAmt = pmt.amount
12221220 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12231221 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12241222 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12251223 if ((currentDLp == currentDLp))
12261224 then {
1227- let $t04384944007 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1228- if (($t04384944007 == $t04384944007))
1225+ let $t04383043988 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
1226+ if (($t04383043988 == $t04383043988))
12291227 then {
1230- let feeAmount = $t04384944007._3
1231- let state = $t04384944007._2
1232- let estimLP = $t04384944007._1
1228+ let feeAmount = $t04383043988._3
1229+ let state = $t04383043988._2
1230+ let estimLP = $t04383043988._1
12331231 let emitLpAmt = if (if ((minOutAmount > 0))
12341232 then (minOutAmount > estimLP)
12351233 else false)
12361234 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12371235 else estimLP
12381236 let e = invoke(fca, "emit", [emitLpAmt], nil)
12391237 if ((e == e))
12401238 then {
12411239 let el = match e {
12421240 case legacy: Address =>
12431241 invoke(legacy, "emit", [emitLpAmt], nil)
12441242 case _ =>
12451243 unit
12461244 }
12471245 if ((el == el))
12481246 then {
12491247 let lpTrnsfr = if (autoStake)
12501248 then {
12511249 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
12521250 if ((ss == ss))
12531251 then nil
12541252 else throw("Strict value is not equal to itself.")
12551253 }
12561254 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12571255 let sendFeeToMatcher = if ((feeAmount > 0))
12581256 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12591257 else nil
1260- let $t04482245171 = if ((this == feeCollectorAddress))
1258+ let $t04480345152 = if ((this == feeCollectorAddress))
12611259 then $Tuple2(0, 0)
12621260 else {
12631261 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12641262 then true
12651263 else false
12661264 if (paymentInAmountAsset)
12671265 then $Tuple2(-(feeAmount), 0)
12681266 else $Tuple2(0, -(feeAmount))
12691267 }
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
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
12751273 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12761274 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12771275 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12781276 else throw("Strict value is not equal to itself.")
12791277 }
12801278 else throw("Strict value is not equal to itself.")
12811279 }
12821280 else throw("Strict value is not equal to itself.")
12831281 }
12841282 else throw("Strict value is not equal to itself.")
12851283 }
12861284 else throw("Strict value is not equal to itself.")
12871285 }
12881286 else throw("Strict value is not equal to itself.")
12891287 }
12901288
12911289
12921290
12931291 @Callable(i)
12941292 func putForFree (maxSlpg) = if ((0 > maxSlpg))
12951293 then throw("Wrong slpg")
12961294 else if ((size(i.payments) != 2))
12971295 then throw("2 pmnts expd")
12981296 else {
12991297 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, "")
13001298 let state = estPut._9
13011299 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13021300 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13031301 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13041302 if ((currentDLp == currentDLp))
13051303 then {
1306- let $t04631246377 = refreshDLpInternal(0, 0, 0)
1307- let refreshDLpActions = $t04631246377._1
1308- let updatedDLp = $t04631246377._2
1304+ let $t04629346358 = refreshDLpInternal(0, 0, 0)
1305+ let refreshDLpActions = $t04629346358._1
1306+ let updatedDLp = $t04629346358._2
13091307 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13101308 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13111309 then (state ++ refreshDLpActions)
13121310 else throw("Strict value is not equal to itself.")
13131311 }
13141312 else throw("Strict value is not equal to itself.")
13151313 }
13161314
13171315
13181316
13191317 @Callable(i)
13201318 func get () = {
13211319 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13221320 if ((currentDLp == currentDLp))
13231321 then {
13241322 let r = cg(i)
13251323 let outAmtAmt = r._1
13261324 let outPrAmt = r._2
13271325 let pmtAmt = r._3
13281326 let pmtAssetId = r._4
13291327 let state = r._5
13301328 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13311329 if ((b == b))
13321330 then {
1333- let $t04755047632 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1334- let refreshDLpActions = $t04755047632._1
1335- let updatedDLp = $t04755047632._2
1331+ let $t04753147613 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
1332+ let refreshDLpActions = $t04753147613._1
1333+ let updatedDLp = $t04753147613._2
13361334 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13371335 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13381336 then (state ++ refreshDLpActions)
13391337 else throw("Strict value is not equal to itself.")
13401338 }
13411339 else throw("Strict value is not equal to itself.")
13421340 }
13431341 else throw("Strict value is not equal to itself.")
13441342 }
13451343
13461344
13471345
13481346 @Callable(i)
13491347 func getOneTknV2 (outAssetId,minOutAmount) = {
13501348 let isPoolOneTokenOperationsDisabled = {
13511349 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13521350 if ($isInstanceOf(@, "Boolean"))
13531351 then @
13541352 else throw(($getType(@) + " couldn't be cast to Boolean"))
13551353 }
13561354 let isGetDisabled = if (if (igs())
13571355 then true
13581356 else (cfgPoolStatus == PoolShutdown))
13591357 then true
13601358 else isPoolOneTokenOperationsDisabled
13611359 let checks = [if (if (!(isGetDisabled))
13621360 then true
13631361 else isManager(i))
13641362 then true
13651363 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13661364 then true
13671365 else throwErr("exactly 1 payment are expected")]
13681366 if ((checks == checks))
13691367 then {
1370- let $t04825048405 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1371- let state = $t04825048405._1
1372- let totalAmount = $t04825048405._2
1368+ let $t04823148386 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1369+ let state = $t04823148386._1
1370+ let totalAmount = $t04823148386._2
13731371 $Tuple2(state, totalAmount)
13741372 }
13751373 else throw("Strict value is not equal to itself.")
13761374 }
13771375
13781376
13791377
13801378 @Callable(i)
13811379 func refreshDLp () = {
13821380 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13831381 let checkLastRefreshedBlockHeight = if (((height - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13841382 then unit
13851383 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13861384 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13871385 then {
13881386 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
1389- let $t04892948993 = refreshDLpInternal(0, 0, 0)
1390- let dLpUpdateActions = $t04892948993._1
1391- let updatedDLp = $t04892948993._2
1387+ let $t04891048974 = refreshDLpInternal(0, 0, 0)
1388+ let dLpUpdateActions = $t04891048974._1
1389+ let updatedDLp = $t04891048974._2
13921390 let actions = if ((dLp != updatedDLp))
13931391 then dLpUpdateActions
13941392 else throwErr("nothing to refresh")
13951393 $Tuple2(actions, toString(updatedDLp))
13961394 }
13971395 else throw("Strict value is not equal to itself.")
13981396 }
13991397
14001398
14011399
14021400 @Callable(i)
14031401 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14041402 let amId = toBase58String(value(cfgAmountAssetId))
14051403 let prId = toBase58String(value(cfgPriceAssetId))
14061404 let lpId = toBase58String(value(cfgLpAssetId))
14071405 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14081406 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14091407 let D0 = getD(xp)
14101408 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14111409 let index = if ((outAssetId == amId))
14121410 then 0
14131411 else if ((outAssetId == prId))
14141412 then 1
14151413 else throw("invalid out asset id")
14161414 let newY = getYD(xp, index, D1)
14171415 let dy = (xp[index] - newY)
14181416 let totalGetRaw = max([0, toInt((dy - big1))])
1419- let $t05000350058 = takeFee(totalGetRaw, outFee)
1420- let totalGet = $t05000350058._1
1421- let feeAmount = $t05000350058._2
1417+ let $t04998450039 = takeFee(totalGetRaw, outFee)
1418+ let totalGet = $t04998450039._1
1419+ let feeAmount = $t04998450039._2
14221420 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14231421 }
14241422
14251423
14261424
14271425 @Callable(i)
14281426 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14291427 let amId = toBase58String(value(cfgAmountAssetId))
14301428 let prId = toBase58String(value(cfgPriceAssetId))
14311429 let lpId = toBase58String(value(cfgLpAssetId))
14321430 let amBalance = getAccBalance(amId)
14331431 let prBalance = getAccBalance(prId)
1434- let $t05043350548 = {
1432+ let $t05041450529 = {
14351433 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14361434 if ($isInstanceOf(@, "(Int, Int)"))
14371435 then @
14381436 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14391437 }
1440- let totalGet = $t05043350548._1
1441- let feeAmount = $t05043350548._2
1438+ let totalGet = $t05041450529._1
1439+ let feeAmount = $t05041450529._2
14421440 let r = ego("", lpId, lpAssetAmount, this)
14431441 let outAmAmt = r._1
14441442 let outPrAmt = r._2
14451443 let sumOfGetAssets = (outAmAmt + outPrAmt)
14461444 let bonus = if ((sumOfGetAssets == 0))
14471445 then if ((totalGet == 0))
14481446 then 0
14491447 else throw("bonus calculation error")
14501448 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14511449 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14521450 }
14531451
14541452
14551453
14561454 @Callable(i)
14571455 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14581456 let r = cg(i)
14591457 let outAmAmt = r._1
14601458 let outPrAmt = r._2
14611459 let pmtAmt = r._3
14621460 let pmtAssetId = r._4
14631461 let state = r._5
14641462 if ((noLessThenAmtAsset > outAmAmt))
14651463 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14661464 else if ((noLessThenPriceAsset > outPrAmt))
14671465 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14681466 else {
14691467 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14701468 if ((currentDLp == currentDLp))
14711469 then {
14721470 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14731471 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14741472 then {
1475- let $t05171451795 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1476- let refreshDLpActions = $t05171451795._1
1477- let updatedDLp = $t05171451795._2
1473+ let $t05169551776 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1474+ let refreshDLpActions = $t05169551776._1
1475+ let updatedDLp = $t05169551776._2
14781476 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14791477 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14801478 then (state ++ refreshDLpActions)
14811479 else throw("Strict value is not equal to itself.")
14821480 }
14831481 else throw("Strict value is not equal to itself.")
14841482 }
14851483 else throw("Strict value is not equal to itself.")
14861484 }
14871485 }
14881486
14891487
14901488
14911489 @Callable(i)
14921490 func unstakeAndGet (amount) = {
14931491 let checkPayments = if ((size(i.payments) != 0))
14941492 then throw("No pmnts expd")
14951493 else true
14961494 if ((checkPayments == checkPayments))
14971495 then {
14981496 let factoryCfg = gfc()
14991497 let lpAssetId = cfgLpAssetId
15001498 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15011499 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15021500 if ((currentDLp == currentDLp))
15031501 then {
15041502 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15051503 if ((unstakeInv == unstakeInv))
15061504 then {
15071505 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15081506 let outAmAmt = r._1
15091507 let outPrAmt = r._2
15101508 let sts = parseIntValue(r._9)
15111509 let state = r._10
15121510 let v = if (if (igs())
15131511 then true
15141512 else (sts == PoolShutdown))
15151513 then throw(("Blocked: " + toString(sts)))
15161514 else true
15171515 if ((v == v))
15181516 then {
15191517 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15201518 if ((burnA == burnA))
15211519 then {
1522- let $t05282252903 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1523- let refreshDLpActions = $t05282252903._1
1524- let updatedDLp = $t05282252903._2
1520+ let $t05280352884 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1521+ let refreshDLpActions = $t05280352884._1
1522+ let updatedDLp = $t05280352884._2
15251523 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15261524 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15271525 then (state ++ refreshDLpActions)
15281526 else throw("Strict value is not equal to itself.")
15291527 }
15301528 else throw("Strict value is not equal to itself.")
15311529 }
15321530 else throw("Strict value is not equal to itself.")
15331531 }
15341532 else throw("Strict value is not equal to itself.")
15351533 }
15361534 else throw("Strict value is not equal to itself.")
15371535 }
15381536 else throw("Strict value is not equal to itself.")
15391537 }
15401538
15411539
15421540
15431541 @Callable(i)
15441542 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15451543 let isGetDisabled = if (igs())
15461544 then true
15471545 else (cfgPoolStatus == PoolShutdown)
15481546 let checks = [if (!(isGetDisabled))
15491547 then true
15501548 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15511549 then true
15521550 else throw("no payments are expected")]
15531551 if ((checks == checks))
15541552 then {
15551553 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15561554 if ((currentDLp == currentDLp))
15571555 then {
15581556 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15591557 if ((unstakeInv == unstakeInv))
15601558 then {
15611559 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15621560 let outAmAmt = res._1
15631561 let outPrAmt = res._2
15641562 let state = res._10
15651563 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15661564 then true
15671565 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15681566 then true
15691567 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15701568 if ((checkAmounts == checkAmounts))
15711569 then {
15721570 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15731571 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15741572 then {
1575- let $t05415454235 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1576- let refreshDLpActions = $t05415454235._1
1577- let updatedDLp = $t05415454235._2
1573+ let $t05413554216 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
1574+ let refreshDLpActions = $t05413554216._1
1575+ let updatedDLp = $t05413554216._2
15781576 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15791577 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15801578 then (state ++ refreshDLpActions)
15811579 else throw("Strict value is not equal to itself.")
15821580 }
15831581 else throw("Strict value is not equal to itself.")
15841582 }
15851583 else throw("Strict value is not equal to itself.")
15861584 }
15871585 else throw("Strict value is not equal to itself.")
15881586 }
15891587 else throw("Strict value is not equal to itself.")
15901588 }
15911589 else throw("Strict value is not equal to itself.")
15921590 }
15931591
15941592
15951593
15961594 @Callable(i)
15971595 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
15981596 let isPoolOneTokenOperationsDisabled = {
15991597 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16001598 if ($isInstanceOf(@, "Boolean"))
16011599 then @
16021600 else throw(($getType(@) + " couldn't be cast to Boolean"))
16031601 }
16041602 let isGetDisabled = if (if (igs())
16051603 then true
16061604 else (cfgPoolStatus == PoolShutdown))
16071605 then true
16081606 else isPoolOneTokenOperationsDisabled
16091607 let checks = [if (if (!(isGetDisabled))
16101608 then true
16111609 else isManager(i))
16121610 then true
16131611 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16141612 then true
16151613 else throwErr("no payments are expected")]
16161614 if ((checks == checks))
16171615 then {
16181616 let factoryCfg = gfc()
16191617 let lpAssetId = cfgLpAssetId
16201618 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16211619 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
16221620 if ((unstakeInv == unstakeInv))
16231621 then {
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
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
16271625 $Tuple2(state, totalAmount)
16281626 }
16291627 else throw("Strict value is not equal to itself.")
16301628 }
16311629 else throw("Strict value is not equal to itself.")
16321630 }
16331631
16341632
16351633
16361634 @Callable(i)
16371635 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
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
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
16431641 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16441642 }
16451643
16461644
16471645
16481646 @Callable(i)
16491647 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
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
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
16551653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16561654 }
16571655
16581656
16591657
16601658 @Callable(i)
16611659 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16621660 then throw("denied")
16631661 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16641662
16651663
16661664
16671665 @Callable(i)
16681666 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
16691667 then pd
16701668 else [StringEntry(k, v)]
16711669
16721670
16731671
16741672 @Callable(i)
16751673 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
16761674 then pd
16771675 else [IntegerEntry(k, v)]
16781676
16791677
16801678
16811679 @Callable(i)
16821680 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16831681
16841682
16851683
16861684 @Callable(i)
16871685 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16881686
16891687
16901688
16911689 @Callable(i)
16921690 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
16931691 let pr = calcPrices(amAmt, prAmt, lpAmt)
16941692 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
16951693 }
16961694
16971695
16981696
16991697 @Callable(i)
17001698 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
17011699
17021700
17031701
17041702 @Callable(i)
17051703 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17061704
17071705
17081706
17091707 @Callable(i)
17101708 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17111709
17121710
17131711
17141712 @Callable(i)
17151713 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, ""))
17161714
17171715
17181716
17191717 @Callable(i)
17201718 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17211719 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17221720 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17231721 }
17241722
17251723
17261724 @Verifier(tx)
17271725 func verify () = {
17281726 let targetPublicKey = match m() {
17291727 case pk: ByteVector =>
17301728 pk
17311729 case _: Unit =>
17321730 tx.senderPublicKey
17331731 case _ =>
17341732 throw("Match error")
17351733 }
17361734 match tx {
17371735 case order: Order =>
17381736 let matcherPub = mp()
1739- let $t05859358662 = validateMatcherOrderAllowed(order)
1740- let orderValid = $t05859358662._1
1741- let orderValidInfo = $t05859358662._2
1737+ let $t05857458643 = validateMatcherOrderAllowed(order)
1738+ let orderValid = $t05857458643._1
1739+ let orderValidInfo = $t05857458643._2
17421740 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
17431741 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
17441742 if (if (if (orderValid)
17451743 then senderValid
17461744 else false)
17471745 then matcherValid
17481746 else false)
17491747 then true
17501748 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
17511749 case s: SetScriptTransaction =>
17521750 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
17531751 then true
17541752 else {
17551753 let newHash = blake2b256(value(s.script))
17561754 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
17571755 let currentHash = scriptHash(this)
17581756 if ((allowedHash == newHash))
17591757 then (currentHash != newHash)
17601758 else false
17611759 }
17621760 case _ =>
17631761 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
17641762 }
17651763 }
17661764

github/deemru/w8io/026f985 
227.18 ms