tx · 7qeTDJZn4LaYsgJzFkLvUDfohq4PyThmF9agu58eqZ9N

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.03100000 Waves

2022.11.28 16:08 [2336997] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "7qeTDJZn4LaYsgJzFkLvUDfohq4PyThmF9agu58eqZ9N", "fee": 3100000, "feeAssetId": null, "timestamp": 1669640862601, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3KF7d5rUWrzP6GGzm48yeRkvv2vyZNCBY5e47jbSDh1ahAwqG7MronzB2Y9KqrwEDrmzWrN21MSA3YQDo6ePwKQW" ], "script": "base64:BgKjIggCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2lkeEZhY3RTdGFrQ250ciISa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nUAMDAwUCZ1EFAmdSBwUCZ1MHBgkBAmFzAwUCZ1EFAmdSBQJnUwMJAAECBQJheAIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmRYBQJheAQCZ1QJAPYDAQkBBXZhbHVlAQgFAmRYBnNjcmlwdAQCZ1UJANsEAQkBBXZhbHVlAQkAnQgCBQJhRgkBAmFxAAQCZ1YJAPEHAQUEdGhpcwMDCQAAAgUCZ1UFAmdUCQECIT0CBQJnVgUCZ1QHBgkA9AMDCAUCZ00JYm9keUJ5dGVzCQCRAwIIBQJnTQZwcm9vZnMAAAUCZ08JAPQDAwgFAmdNCWJvZHlCeXRlcwkAkQMCCAUCZ00GcHJvb2ZzAAAFAmdPE2zoyw==", "chainId": 84, "height": 2336997, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FPMLZ8iV3ZL6aewP5GiNV1egWBvmBWWrno9SS3WDru46 Next: GE24pgEr6yjW1wACdqv9tTWNNUStTC1HyubAKEgNJsuD Diff:
OldNewDifferences
689689 else {
690690 let amBalance = getAccBalance(amId)
691691 let prBalance = getAccBalance(prId)
692- let $t02737827486 = {
692+ let $t02737827489 = {
693693 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
694694 if ($isInstanceOf(@, "(Int, Int)"))
695695 then @
696696 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
697697 }
698- let totalGet = $t02737827486._1
699- let feeAmount = $t02737827486._2
700- let totalAmount = if (if ((minOutAmount > 0))
701- then (minOutAmount > totalGet)
702- else false)
703- then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
704- else totalGet
705- let $t02767627983 = if ((outAssetId == amId))
706- then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
707- else if ((outAssetId == prId))
708- then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
709- else throw("invalid out asset id")
710- let outAm = $t02767627983._1
711- let outPr = $t02767627983._2
712- let amBalanceNew = $t02767627983._3
713- let prBalanceNew = $t02767627983._4
714- let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
715- let curPr = f1(curPrX18, scale8)
716- let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
717- then unit
718- else fromBase58String(outAssetId)
719- let sendFeeToMatcher = if ((feeAmount > 0))
720- then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
721- else nil
722- 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)
723- if ((state == state))
698+ if (($t02737827489 == $t02737827489))
724699 then {
725- let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
726- if ((burn == burn))
727- then $Tuple2(state, totalAmount)
700+ let feeAmount = $t02737827489._2
701+ let totalGet = $t02737827489._1
702+ let totalAmount = if (if ((minOutAmount > 0))
703+ then (minOutAmount > totalGet)
704+ else false)
705+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
706+ else totalGet
707+ let $t02767927986 = if ((outAssetId == amId))
708+ then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
709+ else if ((outAssetId == prId))
710+ then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
711+ else throw("invalid out asset id")
712+ let outAm = $t02767927986._1
713+ let outPr = $t02767927986._2
714+ let amBalanceNew = $t02767927986._3
715+ let prBalanceNew = $t02767927986._4
716+ let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
717+ let curPr = f1(curPrX18, scale8)
718+ let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
719+ then unit
720+ else fromBase58String(outAssetId)
721+ let sendFeeToMatcher = if ((feeAmount > 0))
722+ then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
723+ else nil
724+ 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)
725+ if ((state == state))
726+ then {
727+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
728+ if ((burn == burn))
729+ then $Tuple2(state, totalAmount)
730+ else throw("Strict value is not equal to itself.")
731+ }
728732 else throw("Strict value is not equal to itself.")
729733 }
730734 else throw("Strict value is not equal to itself.")
920924 let pmt = value(i.payments[0])
921925 let pmtAssetId = toBase58String(value(pmt.assetId))
922926 let pmtAmt = pmt.amount
923- let $t03334533500 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
924- let estimLP = $t03334533500._1
925- let state = $t03334533500._2
926- let feeAmount = $t03334533500._3
927- let emitLpAmt = if (if ((minOutAmount > 0))
928- then (minOutAmount > estimLP)
929- else false)
930- then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
931- else estimLP
932- let e = invoke(fca, "emit", [emitLpAmt], nil)
933- if ((e == e))
927+ let $t03334833506 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
928+ if (($t03334833506 == $t03334833506))
934929 then {
935- let el = match e {
936- case legacy: Address =>
937- invoke(legacy, "emit", [emitLpAmt], nil)
938- case _ =>
939- unit
940- }
941- if ((el == el))
930+ let feeAmount = $t03334833506._3
931+ let state = $t03334833506._2
932+ let estimLP = $t03334833506._1
933+ let emitLpAmt = if (if ((minOutAmount > 0))
934+ then (minOutAmount > estimLP)
935+ else false)
936+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
937+ else estimLP
938+ let e = invoke(fca, "emit", [emitLpAmt], nil)
939+ if ((e == e))
942940 then {
943- let lpTrnsfr = if (autoStake)
941+ let el = match e {
942+ case legacy: Address =>
943+ invoke(legacy, "emit", [emitLpAmt], nil)
944+ case _ =>
945+ unit
946+ }
947+ if ((el == el))
944948 then {
945- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
946- if ((ss == ss))
947- then nil
948- else throw("Strict value is not equal to itself.")
949+ let lpTrnsfr = if (autoStake)
950+ then {
951+ let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
952+ if ((ss == ss))
953+ then nil
954+ else throw("Strict value is not equal to itself.")
955+ }
956+ else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
957+ let sendFeeToMatcher = if ((feeAmount > 0))
958+ then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
959+ else nil
960+ $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
949961 }
950- else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
951- let sendFeeToMatcher = if ((feeAmount > 0))
952- then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
953- else nil
954- $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
962+ else throw("Strict value is not equal to itself.")
955963 }
956964 else throw("Strict value is not equal to itself.")
957965 }
10121020 else throwErr("exactly 1 payment are expected")]
10131021 if ((checks == checks))
10141022 then {
1015- let $t03612236277 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1016- let state = $t03612236277._1
1017- let totalAmount = $t03612236277._2
1023+ let $t03612836283 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1024+ let state = $t03612836283._1
1025+ let totalAmount = $t03612836283._2
10181026 $Tuple2(state, totalAmount)
10191027 }
10201028 else throw("Strict value is not equal to itself.")
10451053 let newY = getYD(xp, index, D1)
10461054 let dy = (xp[index] - newY)
10471055 let totalGetRaw = max([0, toInt((dy - big1))])
1048- let $t03711837167 = takeFee(totalGetRaw)
1049- let totalGet = $t03711837167._1
1050- let feeAmount = $t03711837167._2
1056+ let $t03712437173 = takeFee(totalGetRaw)
1057+ let totalGet = $t03712437173._1
1058+ let feeAmount = $t03712437173._2
10511059 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
10521060 }
10531061
10611069 let lpId = poolConfig[idxLPAsId]
10621070 let amBalance = getAccBalance(amId)
10631071 let prBalance = getAccBalance(prId)
1064- let $t03751237627 = {
1072+ let $t03751837633 = {
10651073 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
10661074 if ($isInstanceOf(@, "(Int, Int)"))
10671075 then @
10681076 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
10691077 }
1070- let totalGet = $t03751237627._1
1071- let feeAmount = $t03751237627._2
1078+ let totalGet = $t03751837633._1
1079+ let feeAmount = $t03751837633._2
10721080 let r = ego("", lpId, lpAssetAmount, this)
10731081 let outAmAmt = r._1
10741082 let outPrAmt = r._2
12121220 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
12131221 if ((unstakeInv == unstakeInv))
12141222 then {
1215- let $t04146541653 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1216- let state = $t04146541653._1
1217- let totalAmount = $t04146541653._2
1223+ let $t04147141659 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1224+ let state = $t04147141659._1
1225+ let totalAmount = $t04147141659._2
12181226 $Tuple2(state, totalAmount)
12191227 }
12201228 else throw("Strict value is not equal to itself.")
12301238 let amId = poolConfig[idxAmAsId]
12311239 let prId = poolConfig[idxPrAsId]
12321240 let lpId = poolConfig[idxLPAsId]
1233- let $t04191242015 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1234- let lpAmount = $t04191242015._1
1235- let state = $t04191242015._2
1236- let feeAmount = $t04191242015._3
1237- let bonus = $t04191242015._4
1241+ let $t04191842021 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1242+ let lpAmount = $t04191842021._1
1243+ let state = $t04191842021._2
1244+ let feeAmount = $t04191842021._3
1245+ let bonus = $t04191842021._4
12381246 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
12391247 }
12401248
12461254 let amId = poolConfig[idxAmAsId]
12471255 let prId = poolConfig[idxPrAsId]
12481256 let lpId = poolConfig[idxLPAsId]
1249- let $t04229442398 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1250- let lpAmount = $t04229442398._1
1251- let state = $t04229442398._2
1252- let feeAmount = $t04229442398._3
1253- let bonus = $t04229442398._4
1257+ let $t04230042404 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1258+ let lpAmount = $t04230042404._1
1259+ let state = $t04230042404._2
1260+ let feeAmount = $t04230042404._3
1261+ let bonus = $t04230042404._4
12541262 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
12551263 }
12561264
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 slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
1919
2020 let wavesString = "WAVES"
2121
2222 let Amult = "100"
2323
2424 let Dconv = "1"
2525
2626 let SEP = "__"
2727
2828 let EMPTY = ""
2929
3030 let PoolActive = 1
3131
3232 let PoolPutDis = 2
3333
3434 let PoolMatcherDis = 3
3535
3636 let PoolShutdown = 4
3737
3838 let idxPoolAddress = 1
3939
4040 let idxPoolSt = 2
4141
4242 let idxLPAsId = 3
4343
4444 let idxAmAsId = 4
4545
4646 let idxPrAsId = 5
4747
4848 let idxAmtAsDcm = 6
4949
5050 let idxPriceAsDcm = 7
5151
5252 let idxIAmtAsId = 8
5353
5454 let idxIPriceAsId = 9
5555
5656 let idxFactStakCntr = 1
5757
5858 let idxFactoryRestCntr = 6
5959
6060 let idxFactSlippCntr = 7
6161
6262 let idxFactGwxRewCntr = 10
6363
6464 let feeDefault = fraction(10, scale8, 10000)
6565
6666 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
6767
6868
6969 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7070
7171
7272 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
7373
7474
7575 func abs (val) = if ((zeroBigInt > val))
7676 then -(val)
7777 else val
7878
7979
8080 func absBigInt (val) = if ((zeroBigInt > val))
8181 then -(val)
8282 else val
8383
8484
8585 func fc () = "%s__factoryContract"
8686
8787
8888 func mpk () = "%s__managerPublicKey"
8989
9090
9191 func pmpk () = "%s__pendingManagerPublicKey"
9292
9393
9494 func pl () = "%s%s__price__last"
9595
9696
9797 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
9898
9999
100100 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
101101
102102
103103 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
104104
105105
106106 func aa () = "%s__amountAsset"
107107
108108
109109 func pa () = "%s__priceAsset"
110110
111111
112112 func amp () = "%s__amp"
113113
114114
115115 func ada () = "%s__addonAddr"
116116
117117
118118 let keyFee = "%s__fee"
119119
120120 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
121121
122122 func fcfg () = "%s__factoryConfig"
123123
124124
125125 func mtpk () = "%s%s__matcher__publicKey"
126126
127127
128128 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
129129
130130
131131 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
132132
133133
134134 func aps () = "%s__shutdown"
135135
136136
137137 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
138138
139139
140140 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
141141
142142
143143 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
144144
145145
146146 func str (val) = match val {
147147 case valStr: String =>
148148 valStr
149149 case _ =>
150150 throw("fail cast to String")
151151 }
152152
153153
154154 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
155155
156156
157157 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
158158
159159
160160 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
161161
162162
163163 let fca = addressFromStringValue(strf(this, fc()))
164164
165165 let A = strf(this, amp())
166166
167167 func igs () = valueOrElse(getBoolean(fca, aps()), false)
168168
169169
170170 func mp () = fromBase58String(strf(fca, mtpk()))
171171
172172
173173 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
174174
175175 func gpc () = {
176176 let amtAs = strf(this, aa())
177177 let priceAs = strf(this, pa())
178178 let iPriceAs = intf(fca, mba(priceAs))
179179 let iAmtAs = intf(fca, mba(amtAs))
180180 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
181181 }
182182
183183
184184 func parseAssetId (input) = if ((input == wavesString))
185185 then unit
186186 else fromBase58String(input)
187187
188188
189189 func assetIdToString (input) = if ((input == unit))
190190 then wavesString
191191 else toBase58String(value(input))
192192
193193
194194 func parsePoolConfig (poolConfig) = $Tuple7(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]))
195195
196196
197197 let poolConfigParsed = parsePoolConfig(gpc())
198198
199199 let $t068307016 = poolConfigParsed
200200
201201 let cfgPoolAddress = $t068307016._1
202202
203203 let cfgPoolStatus = $t068307016._2
204204
205205 let cfgLpAssetId = $t068307016._3
206206
207207 let cfgAmountAssetId = $t068307016._4
208208
209209 let cfgPriceAssetId = $t068307016._5
210210
211211 let cfgAmountAssetDecimals = $t068307016._6
212212
213213 let cfgPriceAssetDecimals = $t068307016._7
214214
215215 func gfc () = split(strf(fca, fcfg()), SEP)
216216
217217
218218 let factoryConfig = gfc()
219219
220220 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
221221
222222 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
223223
224224 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
225225
226226 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
227227
228228 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)
229229
230230
231231 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)
232232
233233
234234 func getAccBalance (assetId) = if ((assetId == "WAVES"))
235235 then wavesBalance(this).available
236236 else assetBalance(this, fromBase58String(assetId))
237237
238238
239239 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
240240
241241
242242 func vad (A1,A2,slippage) = {
243243 let diff = fraction((A1 - A2), scale8BigInt, A2)
244244 let pass = ((slippage - abs(diff)) > zeroBigInt)
245245 if (!(pass))
246246 then throw(("Big slpg: " + toString(diff)))
247247 else $Tuple2(pass, min([A1, A2]))
248248 }
249249
250250
251251 func vd (D1,D0,slpg) = {
252252 let diff = fraction(D0, scale8BigInt, D1)
253253 let fail = (slpg > diff)
254254 if (if (fail)
255255 then true
256256 else (D0 > D1))
257257 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
258258 else fail
259259 }
260260
261261
262262 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
263263 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
264264 let prAsAmtX18 = t1(prAmt, prAssetDcm)
265265 cpbi(prAsAmtX18, amtAsAmtX18)
266266 }
267267
268268
269269 func calcPrices (amAmt,prAmt,lpAmt) = {
270270 let cfg = gpc()
271271 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
272272 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
273273 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
274274 let amAmtX18 = t1(amAmt, amtAsDcm)
275275 let prAmtX18 = t1(prAmt, prAsDcm)
276276 let lpAmtX18 = t1(lpAmt, scale8)
277277 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
278278 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
279279 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
280280 }
281281
282282
283283 func calculatePrices (amAmt,prAmt,lpAmt) = {
284284 let p = calcPrices(amAmt, prAmt, lpAmt)
285285 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
286286 }
287287
288288
289289 func takeFee (amount) = {
290290 let feeAmount = fraction(amount, fee, scale8)
291291 $Tuple2((amount - feeAmount), feeAmount)
292292 }
293293
294294
295295 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
296296 let cfg = gpc()
297297 let lpId = cfg[idxLPAsId]
298298 let amId = cfg[idxAmAsId]
299299 let prId = cfg[idxPrAsId]
300300 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
301301 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
302302 let sts = cfg[idxPoolSt]
303303 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
304304 if ((lpId != pmtAssetId))
305305 then throw("Wrong pmt asset")
306306 else {
307307 let amBalance = getAccBalance(amId)
308308 let amBalanceX18 = t1(amBalance, amDcm)
309309 let prBalance = getAccBalance(prId)
310310 let prBalanceX18 = t1(prBalance, prDcm)
311311 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
312312 let curPrice = f1(curPriceX18, scale8)
313313 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
314314 let lpEmissX18 = t1(lpEmiss, scale8)
315315 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
316316 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
317317 let outAmAmt = f1(outAmAmtX18, amDcm)
318318 let outPrAmt = f1(outPrAmtX18, prDcm)
319319 let state = if ((txId58 == ""))
320320 then nil
321321 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
322322 then unit
323323 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
324324 then unit
325325 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)]
326326 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
327327 }
328328 }
329329
330330
331331 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
332332 let cfg = gpc()
333333 let lpId = fromBase58String(cfg[idxLPAsId])
334334 let amIdStr = cfg[idxAmAsId]
335335 let prIdStr = cfg[idxPrAsId]
336336 let inAmIdStr = cfg[idxIAmtAsId]
337337 let inPrIdStr = cfg[idxIPriceAsId]
338338 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
339339 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
340340 let sts = cfg[idxPoolSt]
341341 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
342342 let amBalance = if (isEval)
343343 then getAccBalance(amIdStr)
344344 else if (if (isOneAsset)
345345 then (pmtId == amIdStr)
346346 else false)
347347 then (getAccBalance(amIdStr) - pmtAmt)
348348 else if (isOneAsset)
349349 then getAccBalance(amIdStr)
350350 else (getAccBalance(amIdStr) - inAmAmt)
351351 let prBalance = if (isEval)
352352 then getAccBalance(prIdStr)
353353 else if (if (isOneAsset)
354354 then (pmtId == prIdStr)
355355 else false)
356356 then (getAccBalance(prIdStr) - pmtAmt)
357357 else if (isOneAsset)
358358 then getAccBalance(prIdStr)
359359 else (getAccBalance(prIdStr) - inPrAmt)
360360 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
361361 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
362362 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
363363 let amBalanceX18 = t1(amBalance, amtDcm)
364364 let prBalanceX18 = t1(prBalance, priceDcm)
365365 let r = if ((lpEm == 0))
366366 then {
367367 let curPriceX18 = zeroBigInt
368368 let slippageX18 = zeroBigInt
369369 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
370370 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
371371 }
372372 else {
373373 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
374374 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
375375 let slippageX18 = t1(slippage, scale8)
376376 if (if (if (validateSlippage)
377377 then (curPriceX18 != zeroBigInt)
378378 else false)
379379 then (slippageRealX18 > slippageX18)
380380 else false)
381381 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
382382 else {
383383 let lpEmissionX18 = t1(lpEm, scale8)
384384 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
385385 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
386386 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
387387 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
388388 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
389389 let expAmtAssetAmtX18 = expectedAmts._1
390390 let expPriceAssetAmtX18 = expectedAmts._2
391391 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
392392 $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
393393 }
394394 }
395395 let calcLpAmt = r._1
396396 let calcAmAssetPmt = r._2
397397 let calcPrAssetPmt = r._3
398398 let curPrice = f1(r._4, scale8)
399399 let slippageCalc = f1(r._5, scale8)
400400 if ((0 >= calcLpAmt))
401401 then throw("LP <= 0")
402402 else {
403403 let emitLpAmt = if (!(emitLp))
404404 then 0
405405 else calcLpAmt
406406 let amDiff = (inAmAmt - calcAmAssetPmt)
407407 let prDiff = (inPrAmt - calcPrAssetPmt)
408408 let $t01744717792 = if (if (isOneAsset)
409409 then (pmtId == amIdStr)
410410 else false)
411411 then $Tuple2(pmtAmt, 0)
412412 else if (if (isOneAsset)
413413 then (pmtId == prIdStr)
414414 else false)
415415 then $Tuple2(0, pmtAmt)
416416 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
417417 let writeAmAmt = $t01744717792._1
418418 let writePrAmt = $t01744717792._2
419419 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))]
420420 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
421421 }
422422 }
423423
424424
425425 func moa (order) = {
426426 let cfg = gpc()
427427 let amtAsId = cfg[idxAmAsId]
428428 let prAsId = cfg[idxPrAsId]
429429 let sts = parseIntValue(cfg[idxPoolSt])
430430 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
431431 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
432432 let accAmtAsBalance = getAccBalance(amtAsId)
433433 let accPrAsBalance = getAccBalance(prAsId)
434434 let curPriceX18 = if ((order.orderType == Buy))
435435 then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
436436 else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
437437 let curPrice = f1(curPriceX18, scale8)
438438 if (if (if (igs())
439439 then true
440440 else (sts == PoolMatcherDis))
441441 then true
442442 else (sts == PoolShutdown))
443443 then throw("Admin blocked")
444444 else {
445445 let orAmtAsset = order.assetPair.amountAsset
446446 let orAmtAsStr = if ((orAmtAsset == unit))
447447 then "WAVES"
448448 else toBase58String(value(orAmtAsset))
449449 let orPrAsset = order.assetPair.priceAsset
450450 let orPrAsStr = if ((orPrAsset == unit))
451451 then "WAVES"
452452 else toBase58String(value(orPrAsset))
453453 if (if ((orAmtAsStr != amtAsId))
454454 then true
455455 else (orPrAsStr != prAsId))
456456 then throw("Wr assets")
457457 else {
458458 let orderPrice = order.price
459459 let priceDcm = fraction(scale8, prAsDcm, amtAsDcm)
460460 let castOrderPrice = ts(orderPrice, scale8, priceDcm)
461461 let isOrderPriceValid = if ((order.orderType == Buy))
462462 then (curPrice >= castOrderPrice)
463463 else (castOrderPrice >= curPrice)
464464 true
465465 }
466466 }
467467 }
468468
469469
470470 func cg (i) = if ((size(i.payments) != 1))
471471 then throw("1 pmnt exp")
472472 else {
473473 let pmt = value(i.payments[0])
474474 let pmtAssetId = value(pmt.assetId)
475475 let pmtAmt = pmt.amount
476476 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
477477 let outAmAmt = r._1
478478 let outPrAmt = r._2
479479 let sts = parseIntValue(r._9)
480480 let state = r._10
481481 if (if (igs())
482482 then true
483483 else (sts == PoolShutdown))
484484 then throw(("Admin blocked: " + toString(sts)))
485485 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
486486 }
487487
488488
489489 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
490490 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
491491 let sts = parseIntValue(r._8)
492492 if (if (if (igs())
493493 then true
494494 else (sts == PoolPutDis))
495495 then true
496496 else (sts == PoolShutdown))
497497 then throw(("Blocked:" + toString(sts)))
498498 else r
499499 }
500500
501501
502502 func getD (xp) = {
503503 let n = big2
504504 let xp0 = xp[0]
505505 let xp1 = xp[1]
506506 let aPrecision = parseBigIntValue(Amult)
507507 let a = (parseBigIntValue(A) * aPrecision)
508508 let s = (xp0 + xp1)
509509 if ((s == big0))
510510 then big0
511511 else {
512512 let ann = (a * n)
513513 let xp0_xp1_n_n = (((xp0 * xp1) * n) * n)
514514 let ann_s_aPrecision = ((ann * s) / aPrecision)
515515 let ann_aPrecision = (ann - aPrecision)
516516 let n1 = (n + big1)
517517 func calc (acc,cur) = {
518518 let $t02234422364 = acc
519519 let d = $t02234422364._1
520520 let found = $t02234422364._2
521521 if ((found != unit))
522522 then acc
523523 else {
524524 let dp = (((d * d) * d) / xp0_xp1_n_n)
525525 let dNext = (((ann_s_aPrecision + (dp * n)) * d) / (((ann_aPrecision * d) / aPrecision) + (n1 * dp)))
526526 let dDiff = absBigInt((dNext - value(d)))
527527 if ((big1 >= dDiff))
528528 then $Tuple2(dNext, cur)
529529 else $Tuple2(dNext, unit)
530530 }
531531 }
532532
533533 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
534534 let $t02278522832 = {
535535 let $l = arr
536536 let $s = size($l)
537537 let $acc0 = $Tuple2(s, unit)
538538 func $f0_1 ($a,$i) = if (($i >= $s))
539539 then $a
540540 else calc($a, $l[$i])
541541
542542 func $f0_2 ($a,$i) = if (($i >= $s))
543543 then $a
544544 else throw("List size exceeds 15")
545545
546546 $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)
547547 }
548548 let d = $t02278522832._1
549549 let found = $t02278522832._2
550550 if ((found != unit))
551551 then d
552552 else throw(("D calculation error, D = " + toString(d)))
553553 }
554554 }
555555
556556
557557 func getYD (xp,i,D) = {
558558 let n = big2
559559 let x = xp[if ((i == 0))
560560 then 1
561561 else 0]
562562 let aPrecision = parseBigIntValue(Amult)
563563 let a = (parseBigIntValue(A) * aPrecision)
564564 let s = x
565565 let ann = (a * n)
566566 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
567567 let b = ((s + ((D * aPrecision) / ann)) - D)
568568 func calc (acc,cur) = {
569569 let $t02333223352 = acc
570570 let y = $t02333223352._1
571571 let found = $t02333223352._2
572572 if ((found != unit))
573573 then acc
574574 else {
575575 let yNext = (((y * y) + c) / ((big2 * y) + b))
576576 let yDiff = absBigInt((yNext - value(y)))
577577 if ((big1 >= yDiff))
578578 then $Tuple2(yNext, cur)
579579 else $Tuple2(yNext, unit)
580580 }
581581 }
582582
583583 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
584584 let $t02365923706 = {
585585 let $l = arr
586586 let $s = size($l)
587587 let $acc0 = $Tuple2(D, unit)
588588 func $f0_1 ($a,$i) = if (($i >= $s))
589589 then $a
590590 else calc($a, $l[$i])
591591
592592 func $f0_2 ($a,$i) = if (($i >= $s))
593593 then $a
594594 else throw("List size exceeds 15")
595595
596596 $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)
597597 }
598598 let y = $t02365923706._1
599599 let found = $t02365923706._2
600600 if ((found != unit))
601601 then y
602602 else throw(("Y calculation error, Y = " + toString(y)))
603603 }
604604
605605
606606 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
607607 let poolConfig = gpc()
608608 let amId = poolConfig[idxAmAsId]
609609 let prId = poolConfig[idxPrAsId]
610610 let lpId = poolConfig[idxLPAsId]
611611 let amtDcm = parseIntValue(poolConfig[idxAmtAsDcm])
612612 let priceDcm = parseIntValue(poolConfig[idxPriceAsDcm])
613613 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
614614 let chechEmission = if ((lpAssetEmission > big0))
615615 then true
616616 else throw("initial deposit requires all coins")
617617 if ((chechEmission == chechEmission))
618618 then {
619619 let amBalance = getAccBalance(amId)
620620 let prBalance = getAccBalance(prId)
621621 let $t02448924951 = if ((txId == ""))
622622 then $Tuple2(amBalance, prBalance)
623623 else if ((pmtAssetId == amId))
624624 then if ((pmtAmtRaw > amBalance))
625625 then throw("invalid payment amount")
626626 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
627627 else if ((pmtAssetId == prId))
628628 then if ((pmtAmtRaw > prBalance))
629629 then throw("invalid payment amount")
630630 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
631631 else throw("wrong pmtAssetId")
632632 let amBalanceOld = $t02448924951._1
633633 let prBalanceOld = $t02448924951._2
634634 let $t02495725133 = if ((pmtAssetId == amId))
635635 then $Tuple2(pmtAmtRaw, 0)
636636 else if ((pmtAssetId == prId))
637637 then $Tuple2(0, pmtAmtRaw)
638638 else throw("invalid payment")
639639 let amAmountRaw = $t02495725133._1
640640 let prAmountRaw = $t02495725133._2
641641 let $t02513725376 = if (withTakeFee)
642642 then $Tuple3(takeFee(amAmountRaw)._1, takeFee(prAmountRaw)._1, takeFee(pmtAmtRaw)._2)
643643 else $Tuple3(amAmountRaw, prAmountRaw, 0)
644644 let amAmount = $t02513725376._1
645645 let prAmount = $t02513725376._2
646646 let feeAmount = $t02513725376._3
647647 let amBalanceNew = (amBalanceOld + amAmount)
648648 let prBalanceNew = (prBalanceOld + prAmount)
649649 let D0 = getD([toBigInt(amBalanceOld), toBigInt(prBalanceOld)])
650650 let D1 = getD([toBigInt(amBalanceNew), toBigInt(prBalanceNew)])
651651 let checkD = if ((D1 > D0))
652652 then true
653653 else throw()
654654 if ((checkD == checkD))
655655 then {
656656 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0)
657657 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
658658 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))]
659659 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
660660 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
661661 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
662662 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
663663 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
664664 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
665665 }
666666 else throw("Strict value is not equal to itself.")
667667 }
668668 else throw("Strict value is not equal to itself.")
669669 }
670670
671671
672672 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
673673 let poolConfig = gpc()
674674 let lpId = poolConfig[idxLPAsId]
675675 let amId = poolConfig[idxAmAsId]
676676 let prId = poolConfig[idxPrAsId]
677677 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
678678 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
679679 let poolStatus = poolConfig[idxPoolSt]
680680 let userAddress = if ((caller == restContract))
681681 then originCaller
682682 else caller
683683 let pmt = value(payments[0])
684684 let pmtAssetId = value(pmt.assetId)
685685 let pmtAmt = pmt.amount
686686 let txId58 = toBase58String(transactionId)
687687 if ((lpId != toBase58String(pmtAssetId)))
688688 then throw("Wrong LP")
689689 else {
690690 let amBalance = getAccBalance(amId)
691691 let prBalance = getAccBalance(prId)
692- let $t02737827486 = {
692+ let $t02737827489 = {
693693 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
694694 if ($isInstanceOf(@, "(Int, Int)"))
695695 then @
696696 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
697697 }
698- let totalGet = $t02737827486._1
699- let feeAmount = $t02737827486._2
700- let totalAmount = if (if ((minOutAmount > 0))
701- then (minOutAmount > totalGet)
702- else false)
703- then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
704- else totalGet
705- let $t02767627983 = if ((outAssetId == amId))
706- then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
707- else if ((outAssetId == prId))
708- then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
709- else throw("invalid out asset id")
710- let outAm = $t02767627983._1
711- let outPr = $t02767627983._2
712- let amBalanceNew = $t02767627983._3
713- let prBalanceNew = $t02767627983._4
714- let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
715- let curPr = f1(curPrX18, scale8)
716- let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
717- then unit
718- else fromBase58String(outAssetId)
719- let sendFeeToMatcher = if ((feeAmount > 0))
720- then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
721- else nil
722- 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)
723- if ((state == state))
698+ if (($t02737827489 == $t02737827489))
724699 then {
725- let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
726- if ((burn == burn))
727- then $Tuple2(state, totalAmount)
700+ let feeAmount = $t02737827489._2
701+ let totalGet = $t02737827489._1
702+ let totalAmount = if (if ((minOutAmount > 0))
703+ then (minOutAmount > totalGet)
704+ else false)
705+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
706+ else totalGet
707+ let $t02767927986 = if ((outAssetId == amId))
708+ then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
709+ else if ((outAssetId == prId))
710+ then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
711+ else throw("invalid out asset id")
712+ let outAm = $t02767927986._1
713+ let outPr = $t02767927986._2
714+ let amBalanceNew = $t02767927986._3
715+ let prBalanceNew = $t02767927986._4
716+ let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
717+ let curPr = f1(curPrX18, scale8)
718+ let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
719+ then unit
720+ else fromBase58String(outAssetId)
721+ let sendFeeToMatcher = if ((feeAmount > 0))
722+ then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
723+ else nil
724+ 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)
725+ if ((state == state))
726+ then {
727+ let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
728+ if ((burn == burn))
729+ then $Tuple2(state, totalAmount)
730+ else throw("Strict value is not equal to itself.")
731+ }
728732 else throw("Strict value is not equal to itself.")
729733 }
730734 else throw("Strict value is not equal to itself.")
731735 }
732736 }
733737
734738
735739 func m () = match getString(mpk()) {
736740 case s: String =>
737741 fromBase58String(s)
738742 case _: Unit =>
739743 unit
740744 case _ =>
741745 throw("Match error")
742746 }
743747
744748
745749 func pm () = match getString(pmpk()) {
746750 case s: String =>
747751 fromBase58String(s)
748752 case _: Unit =>
749753 unit
750754 case _ =>
751755 throw("Match error")
752756 }
753757
754758
755759 let pd = throw("Permission denied")
756760
757761 func isManager (i) = match m() {
758762 case pk: ByteVector =>
759763 (i.callerPublicKey == pk)
760764 case _: Unit =>
761765 (i.caller == this)
762766 case _ =>
763767 throw("Match error")
764768 }
765769
766770
767771 func mm (i) = match m() {
768772 case pk: ByteVector =>
769773 if ((i.callerPublicKey == pk))
770774 then true
771775 else pd
772776 case _: Unit =>
773777 if ((i.caller == this))
774778 then true
775779 else pd
776780 case _ =>
777781 throw("Match error")
778782 }
779783
780784
781785 @Callable(i)
782786 func constructor (fc) = {
783787 let c = mm(i)
784788 if ((c == c))
785789 then [StringEntry(fc(), fc)]
786790 else throw("Strict value is not equal to itself.")
787791 }
788792
789793
790794
791795 @Callable(i)
792796 func setManager (pendingManagerPublicKey) = {
793797 let c = mm(i)
794798 if ((c == c))
795799 then {
796800 let cm = fromBase58String(pendingManagerPublicKey)
797801 if ((cm == cm))
798802 then [StringEntry(pmpk(), pendingManagerPublicKey)]
799803 else throw("Strict value is not equal to itself.")
800804 }
801805 else throw("Strict value is not equal to itself.")
802806 }
803807
804808
805809
806810 @Callable(i)
807811 func confirmManager () = {
808812 let p = pm()
809813 let hpm = if (isDefined(p))
810814 then true
811815 else throw("No pending manager")
812816 if ((hpm == hpm))
813817 then {
814818 let cpm = if ((i.callerPublicKey == value(p)))
815819 then true
816820 else throw("You are not pending manager")
817821 if ((cpm == cpm))
818822 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
819823 else throw("Strict value is not equal to itself.")
820824 }
821825 else throw("Strict value is not equal to itself.")
822826 }
823827
824828
825829
826830 @Callable(i)
827831 func put (slip,autoStake) = {
828832 let factCfg = gfc()
829833 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
830834 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
831835 if ((0 > slip))
832836 then throw("Wrong slippage")
833837 else if ((size(i.payments) != 2))
834838 then throw("2 pmnts expd")
835839 else {
836840 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, "")
837841 let emitLpAmt = e._2
838842 let lpAssetId = e._7
839843 let state = e._9
840844 let amDiff = e._10
841845 let prDiff = e._11
842846 let amId = e._12
843847 let prId = e._13
844848 let r = invoke(fca, "emit", [emitLpAmt], nil)
845849 if ((r == r))
846850 then {
847851 let el = match r {
848852 case legacy: Address =>
849853 invoke(legacy, "emit", [emitLpAmt], nil)
850854 case _ =>
851855 unit
852856 }
853857 if ((el == el))
854858 then {
855859 let sa = if ((amDiff > 0))
856860 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
857861 else nil
858862 if ((sa == sa))
859863 then {
860864 let sp = if ((prDiff > 0))
861865 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
862866 else nil
863867 if ((sp == sp))
864868 then {
865869 let lpTrnsfr = if (autoStake)
866870 then {
867871 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
868872 if ((ss == ss))
869873 then nil
870874 else throw("Strict value is not equal to itself.")
871875 }
872876 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
873877 (state ++ lpTrnsfr)
874878 }
875879 else throw("Strict value is not equal to itself.")
876880 }
877881 else throw("Strict value is not equal to itself.")
878882 }
879883 else throw("Strict value is not equal to itself.")
880884 }
881885 else throw("Strict value is not equal to itself.")
882886 }
883887 }
884888
885889
886890
887891 @Callable(i)
888892 func putOneTknV2 (minOutAmount,autoStake) = {
889893 let isPoolOneTokenOperationsDisabled = {
890894 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
891895 if ($isInstanceOf(@, "Boolean"))
892896 then @
893897 else throw(($getType(@) + " couldn't be cast to Boolean"))
894898 }
895899 let isPutDisabled = if (if (if (igs())
896900 then true
897901 else (cfgPoolStatus == PoolPutDis))
898902 then true
899903 else (cfgPoolStatus == PoolShutdown))
900904 then true
901905 else isPoolOneTokenOperationsDisabled
902906 let checks = [if (if (!(isPutDisabled))
903907 then true
904908 else isManager(i))
905909 then true
906910 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
907911 then true
908912 else throwErr("exactly 1 payment are expected")]
909913 if ((checks == checks))
910914 then {
911915 let poolConfig = gpc()
912916 let amId = poolConfig[idxAmAsId]
913917 let prId = poolConfig[idxPrAsId]
914918 let lpId = fromBase58String(poolConfig[idxLPAsId])
915919 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
916920 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
917921 let userAddress = if ((i.caller == this))
918922 then i.originCaller
919923 else i.caller
920924 let pmt = value(i.payments[0])
921925 let pmtAssetId = toBase58String(value(pmt.assetId))
922926 let pmtAmt = pmt.amount
923- let $t03334533500 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
924- let estimLP = $t03334533500._1
925- let state = $t03334533500._2
926- let feeAmount = $t03334533500._3
927- let emitLpAmt = if (if ((minOutAmount > 0))
928- then (minOutAmount > estimLP)
929- else false)
930- then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
931- else estimLP
932- let e = invoke(fca, "emit", [emitLpAmt], nil)
933- if ((e == e))
927+ let $t03334833506 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
928+ if (($t03334833506 == $t03334833506))
934929 then {
935- let el = match e {
936- case legacy: Address =>
937- invoke(legacy, "emit", [emitLpAmt], nil)
938- case _ =>
939- unit
940- }
941- if ((el == el))
930+ let feeAmount = $t03334833506._3
931+ let state = $t03334833506._2
932+ let estimLP = $t03334833506._1
933+ let emitLpAmt = if (if ((minOutAmount > 0))
934+ then (minOutAmount > estimLP)
935+ else false)
936+ then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
937+ else estimLP
938+ let e = invoke(fca, "emit", [emitLpAmt], nil)
939+ if ((e == e))
942940 then {
943- let lpTrnsfr = if (autoStake)
941+ let el = match e {
942+ case legacy: Address =>
943+ invoke(legacy, "emit", [emitLpAmt], nil)
944+ case _ =>
945+ unit
946+ }
947+ if ((el == el))
944948 then {
945- let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
946- if ((ss == ss))
947- then nil
948- else throw("Strict value is not equal to itself.")
949+ let lpTrnsfr = if (autoStake)
950+ then {
951+ let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpId, emitLpAmt)])
952+ if ((ss == ss))
953+ then nil
954+ else throw("Strict value is not equal to itself.")
955+ }
956+ else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
957+ let sendFeeToMatcher = if ((feeAmount > 0))
958+ then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
959+ else nil
960+ $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
949961 }
950- else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
951- let sendFeeToMatcher = if ((feeAmount > 0))
952- then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
953- else nil
954- $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
962+ else throw("Strict value is not equal to itself.")
955963 }
956964 else throw("Strict value is not equal to itself.")
957965 }
958966 else throw("Strict value is not equal to itself.")
959967 }
960968 else throw("Strict value is not equal to itself.")
961969 }
962970
963971
964972
965973 @Callable(i)
966974 func putForFree (maxSlpg) = if ((0 > maxSlpg))
967975 then throw("Wrong slpg")
968976 else if ((size(i.payments) != 2))
969977 then throw("2 pmnts expd")
970978 else {
971979 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, "")
972980 estPut._9
973981 }
974982
975983
976984
977985 @Callable(i)
978986 func get () = {
979987 let r = cg(i)
980988 let outAmtAmt = r._1
981989 let outPrAmt = r._2
982990 let pmtAmt = r._3
983991 let pmtAssetId = r._4
984992 let state = r._5
985993 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
986994 if ((b == b))
987995 then state
988996 else throw("Strict value is not equal to itself.")
989997 }
990998
991999
9921000
9931001 @Callable(i)
9941002 func getOneTknV2 (outAssetId,minOutAmount) = {
9951003 let isPoolOneTokenOperationsDisabled = {
9961004 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
9971005 if ($isInstanceOf(@, "Boolean"))
9981006 then @
9991007 else throw(($getType(@) + " couldn't be cast to Boolean"))
10001008 }
10011009 let isGetDisabled = if (if (igs())
10021010 then true
10031011 else (cfgPoolStatus == PoolShutdown))
10041012 then true
10051013 else isPoolOneTokenOperationsDisabled
10061014 let checks = [if (if (!(isGetDisabled))
10071015 then true
10081016 else isManager(i))
10091017 then true
10101018 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
10111019 then true
10121020 else throwErr("exactly 1 payment are expected")]
10131021 if ((checks == checks))
10141022 then {
1015- let $t03612236277 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1016- let state = $t03612236277._1
1017- let totalAmount = $t03612236277._2
1023+ let $t03612836283 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1024+ let state = $t03612836283._1
1025+ let totalAmount = $t03612836283._2
10181026 $Tuple2(state, totalAmount)
10191027 }
10201028 else throw("Strict value is not equal to itself.")
10211029 }
10221030
10231031
10241032
10251033 @Callable(i)
10261034 func refreshDlp () = nil
10271035
10281036
10291037
10301038 @Callable(i)
10311039 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
10321040 let poolConfig = gpc()
10331041 let amId = poolConfig[idxAmAsId]
10341042 let prId = poolConfig[idxPrAsId]
10351043 let lpId = poolConfig[idxLPAsId]
10361044 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
10371045 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
10381046 let D0 = getD(xp)
10391047 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
10401048 let index = if ((outAssetId == amId))
10411049 then 0
10421050 else if ((outAssetId == prId))
10431051 then 1
10441052 else throw("invalid out asset id")
10451053 let newY = getYD(xp, index, D1)
10461054 let dy = (xp[index] - newY)
10471055 let totalGetRaw = max([0, toInt((dy - big1))])
1048- let $t03711837167 = takeFee(totalGetRaw)
1049- let totalGet = $t03711837167._1
1050- let feeAmount = $t03711837167._2
1056+ let $t03712437173 = takeFee(totalGetRaw)
1057+ let totalGet = $t03712437173._1
1058+ let feeAmount = $t03712437173._2
10511059 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
10521060 }
10531061
10541062
10551063
10561064 @Callable(i)
10571065 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
10581066 let poolConfig = gpc()
10591067 let amId = poolConfig[idxAmAsId]
10601068 let prId = poolConfig[idxPrAsId]
10611069 let lpId = poolConfig[idxLPAsId]
10621070 let amBalance = getAccBalance(amId)
10631071 let prBalance = getAccBalance(prId)
1064- let $t03751237627 = {
1072+ let $t03751837633 = {
10651073 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
10661074 if ($isInstanceOf(@, "(Int, Int)"))
10671075 then @
10681076 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
10691077 }
1070- let totalGet = $t03751237627._1
1071- let feeAmount = $t03751237627._2
1078+ let totalGet = $t03751837633._1
1079+ let feeAmount = $t03751837633._2
10721080 let r = ego("", lpId, lpAssetAmount, this)
10731081 let outAmAmt = r._1
10741082 let outPrAmt = r._2
10751083 let sumOfGetAssets = (outAmAmt + outPrAmt)
10761084 let bonus = if ((sumOfGetAssets == 0))
10771085 then if ((totalGet == 0))
10781086 then 0
10791087 else throw("bonus calculation error")
10801088 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
10811089 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
10821090 }
10831091
10841092
10851093
10861094 @Callable(i)
10871095 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
10881096 let r = cg(i)
10891097 let outAmAmt = r._1
10901098 let outPrAmt = r._2
10911099 let pmtAmt = r._3
10921100 let pmtAssetId = r._4
10931101 let state = r._5
10941102 if ((noLessThenAmtAsset > outAmAmt))
10951103 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
10961104 else if ((noLessThenPriceAsset > outPrAmt))
10971105 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
10981106 else {
10991107 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11001108 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11011109 then state
11021110 else throw("Strict value is not equal to itself.")
11031111 }
11041112 }
11051113
11061114
11071115
11081116 @Callable(i)
11091117 func unstakeAndGet (amount) = {
11101118 let checkPayments = if ((size(i.payments) != 0))
11111119 then throw("No pmnts expd")
11121120 else true
11131121 if ((checkPayments == checkPayments))
11141122 then {
11151123 let cfg = gpc()
11161124 let factoryCfg = gfc()
11171125 let lpAssetId = fromBase58String(cfg[idxLPAsId])
11181126 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
11191127 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
11201128 if ((unstakeInv == unstakeInv))
11211129 then {
11221130 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
11231131 let sts = parseIntValue(r._9)
11241132 let state = r._10
11251133 let v = if (if (igs())
11261134 then true
11271135 else (sts == PoolShutdown))
11281136 then throw(("Blocked: " + toString(sts)))
11291137 else true
11301138 if ((v == v))
11311139 then {
11321140 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11331141 if ((burnA == burnA))
11341142 then state
11351143 else throw("Strict value is not equal to itself.")
11361144 }
11371145 else throw("Strict value is not equal to itself.")
11381146 }
11391147 else throw("Strict value is not equal to itself.")
11401148 }
11411149 else throw("Strict value is not equal to itself.")
11421150 }
11431151
11441152
11451153
11461154 @Callable(i)
11471155 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
11481156 let isGetDisabled = if (igs())
11491157 then true
11501158 else (cfgPoolStatus == PoolShutdown)
11511159 let checks = [if (!(isGetDisabled))
11521160 then true
11531161 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
11541162 then true
11551163 else throw("no payments are expected")]
11561164 if ((checks == checks))
11571165 then {
11581166 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
11591167 if ((unstakeInv == unstakeInv))
11601168 then {
11611169 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
11621170 let outAmAmt = res._1
11631171 let outPrAmt = res._2
11641172 let state = res._10
11651173 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
11661174 then true
11671175 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
11681176 then true
11691177 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
11701178 if ((checkAmounts == checkAmounts))
11711179 then {
11721180 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
11731181 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11741182 then state
11751183 else throw("Strict value is not equal to itself.")
11761184 }
11771185 else throw("Strict value is not equal to itself.")
11781186 }
11791187 else throw("Strict value is not equal to itself.")
11801188 }
11811189 else throw("Strict value is not equal to itself.")
11821190 }
11831191
11841192
11851193
11861194 @Callable(i)
11871195 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
11881196 let isPoolOneTokenOperationsDisabled = {
11891197 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11901198 if ($isInstanceOf(@, "Boolean"))
11911199 then @
11921200 else throw(($getType(@) + " couldn't be cast to Boolean"))
11931201 }
11941202 let isGetDisabled = if (if (igs())
11951203 then true
11961204 else (cfgPoolStatus == PoolShutdown))
11971205 then true
11981206 else isPoolOneTokenOperationsDisabled
11991207 let checks = [if (if (!(isGetDisabled))
12001208 then true
12011209 else isManager(i))
12021210 then true
12031211 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
12041212 then true
12051213 else throwErr("no payments are expected")]
12061214 if ((checks == checks))
12071215 then {
12081216 let cfg = gpc()
12091217 let factoryCfg = gfc()
12101218 let lpAssetId = fromBase58String(cfg[idxLPAsId])
12111219 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
12121220 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
12131221 if ((unstakeInv == unstakeInv))
12141222 then {
1215- let $t04146541653 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1216- let state = $t04146541653._1
1217- let totalAmount = $t04146541653._2
1223+ let $t04147141659 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1224+ let state = $t04147141659._1
1225+ let totalAmount = $t04147141659._2
12181226 $Tuple2(state, totalAmount)
12191227 }
12201228 else throw("Strict value is not equal to itself.")
12211229 }
12221230 else throw("Strict value is not equal to itself.")
12231231 }
12241232
12251233
12261234
12271235 @Callable(i)
12281236 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
12291237 let poolConfig = gpc()
12301238 let amId = poolConfig[idxAmAsId]
12311239 let prId = poolConfig[idxPrAsId]
12321240 let lpId = poolConfig[idxLPAsId]
1233- let $t04191242015 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1234- let lpAmount = $t04191242015._1
1235- let state = $t04191242015._2
1236- let feeAmount = $t04191242015._3
1237- let bonus = $t04191242015._4
1241+ let $t04191842021 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
1242+ let lpAmount = $t04191842021._1
1243+ let state = $t04191842021._2
1244+ let feeAmount = $t04191842021._3
1245+ let bonus = $t04191842021._4
12381246 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
12391247 }
12401248
12411249
12421250
12431251 @Callable(i)
12441252 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
12451253 let poolConfig = gpc()
12461254 let amId = poolConfig[idxAmAsId]
12471255 let prId = poolConfig[idxPrAsId]
12481256 let lpId = poolConfig[idxLPAsId]
1249- let $t04229442398 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1250- let lpAmount = $t04229442398._1
1251- let state = $t04229442398._2
1252- let feeAmount = $t04229442398._3
1253- let bonus = $t04229442398._4
1257+ let $t04230042404 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
1258+ let lpAmount = $t04230042404._1
1259+ let state = $t04230042404._2
1260+ let feeAmount = $t04230042404._3
1261+ let bonus = $t04230042404._4
12541262 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
12551263 }
12561264
12571265
12581266
12591267 @Callable(i)
12601268 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
12611269 then throw("denied")
12621270 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
12631271
12641272
12651273
12661274 @Callable(i)
12671275 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
12681276 then pd
12691277 else [StringEntry(k, v)]
12701278
12711279
12721280
12731281 @Callable(i)
12741282 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
12751283 then pd
12761284 else [IntegerEntry(k, v)]
12771285
12781286
12791287
12801288 @Callable(i)
12811289 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
12821290
12831291
12841292
12851293 @Callable(i)
12861294 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
12871295
12881296
12891297
12901298 @Callable(i)
12911299 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
12921300 let pr = calcPrices(amAmt, prAmt, lpAmt)
12931301 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
12941302 }
12951303
12961304
12971305
12981306 @Callable(i)
12991307 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
13001308
13011309
13021310
13031311 @Callable(i)
13041312 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
13051313
13061314
13071315
13081316 @Callable(i)
13091317 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
13101318
13111319
13121320
13131321 @Callable(i)
13141322 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, ""))
13151323
13161324
13171325
13181326 @Callable(i)
13191327 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
13201328 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
13211329 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
13221330 }
13231331
13241332
13251333
13261334 @Callable(i)
13271335 func getFeeREADONLY () = $Tuple2(nil, fee)
13281336
13291337
13301338 @Verifier(tx)
13311339 func verify () = {
13321340 let targetPublicKey = match m() {
13331341 case pk: ByteVector =>
13341342 pk
13351343 case _: Unit =>
13361344 tx.senderPublicKey
13371345 case _ =>
13381346 throw("Match error")
13391347 }
13401348 match tx {
13411349 case order: Order =>
13421350 let matcherPub = mp()
13431351 let orderValid = moa(order)
13441352 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
13451353 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
13461354 if (if (if (orderValid)
13471355 then senderValid
13481356 else false)
13491357 then matcherValid
13501358 else false)
13511359 then true
13521360 else toe(orderValid, senderValid, matcherValid)
13531361 case s: SetScriptTransaction =>
13541362 let newHash = blake2b256(value(s.script))
13551363 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
13561364 let currentHash = scriptHash(this)
13571365 if (if ((allowedHash == newHash))
13581366 then (currentHash != newHash)
13591367 else false)
13601368 then true
13611369 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
13621370 case _ =>
13631371 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
13641372 }
13651373 }
13661374

github/deemru/w8io/026f985 
168.81 ms