tx · 984XrwirZcLsRC5yGkY1jsauYM5totQnv5pL153FWfGi

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.03100000 Waves

2022.09.26 15:22 [2246098] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "984XrwirZcLsRC5yGkY1jsauYM5totQnv5pL153FWfGi", "fee": 3100000, "feeAssetId": null, "timestamp": 1664194968220, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3tUZaxGmYd2XghbTeoPnjYQ564oaCjwoTzosEQLJ9z94tvQ94d3VZayCpUqFdhJ7KLTLZWxXM7fHoxE6rLTXjeXK" ], "script": "base64:BgKFHwgCEgMKAQgSAwoBCBIAEgQKAgEEEgcKBQEBAQEEEgQKAgEEEgQKAgEIEgQKAgEIEgMKAQESABIHCgUBAQEIARIECgIIARIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEIARIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IglvbmVCaWdJbnQiCnNsaXBwYWdlNEQiBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHhJUHJpY2VBc0lkIg9pZHhGYWN0U3Rha0NudHIiEGlkeEZhY3RTbGlwcENudHIi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dGVzCQCRAwIIBQJmTwZwcm9vZnMAAAUCZlEJAPQDAwgFAmZPCWJvZHlCeXRlcwkAkQMCCAUCZk8GcHJvb2ZzAAAFAmZRtU1VWg==", "chainId": 84, "height": 2246098, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Crm7EBEVVuPas1FrwqcRvfgTVQira7hbXhpydbKVSVxH Next: 5LLFZNvs6hPAjp9J1UPDMZGAWL13XJSdLXdZNBLH7CXR Diff:
OldNewDifferences
941941 then fraction(amountAssetAmount, scale8, estimLP)
942942 else fraction(priceAssetAmount, scale8, estimLP)
943943 let lpAssetPriceBoth = fraction((priceAssetAmount + amountAssetAmount), scale8, lpAmtBoth)
944- let bonus = fraction((lpAssetPriceBoth - lpAssetPriceOne), scale8, lpAssetPriceOne)
944+ let bonus = fraction((estimLP - lpAmtBoth), scale8, lpAmtBoth)
945945 let feeAmount = takeFee(paymentAmount)._2
946946 $Tuple2(nil, $Tuple3(estimLP, feeAmount, bonus))
947947 }
10131013 let estimPrAmt = r._2
10141014 let amBalance = getAccBalance(amId)
10151015 let prBalance = getAccBalance(prId)
1016- let $t03868539145 = if ((outAssetId == amId))
1016+ let $t03875039210 = if ((outAssetId == amId))
10171017 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
10181018 else if ((outAssetId == prId))
10191019 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
10201020 else throw("wrong outAssetId")
1021- let amBalanceNow = $t03868539145._1
1022- let prBalanceNow = $t03868539145._2
1023- let virtSwapInAm = $t03868539145._3
1024- let virtSwapOutPr = $t03868539145._4
1025- let virtSwapInPr = $t03868539145._5
1026- let virtSwapOutAm = $t03868539145._6
1027- let totalGetRaw = $t03868539145._7
1021+ let amBalanceNow = $t03875039210._1
1022+ let prBalanceNow = $t03875039210._2
1023+ let virtSwapInAm = $t03875039210._3
1024+ let virtSwapOutPr = $t03875039210._4
1025+ let virtSwapInPr = $t03875039210._5
1026+ let virtSwapOutAm = $t03875039210._6
1027+ let totalGetRaw = $t03875039210._7
10281028 if (if ((0 > virtSwapInAm))
10291029 then true
10301030 else (0 > virtSwapInPr))
10391039 let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
10401040 if ((finalRes == finalRes))
10411041 then {
1042- let $t03989239996 = if ((outAssetId == amId))
1042+ let $t03995740061 = if ((outAssetId == amId))
10431043 then $Tuple2(toInt(finalRes._2), 0)
10441044 else $Tuple2(0, toInt(finalRes._2))
1045- let outAm = $t03989239996._1
1046- let outPr = $t03989239996._2
1045+ let outAm = $t03995740061._1
1046+ let outPr = $t03995740061._2
10471047 let totalAmount = (outAm + outPr)
10481048 let feeAmount = (totalGetRaw - totalGet)
10491049 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
10751075
10761076 @Callable(i)
10771077 func getOneTknV2 (outAssetId,minOutAmount) = {
1078- let $t04102141176 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1079- let state = $t04102141176._1
1080- let totalAmount = $t04102141176._2
1078+ let $t04108641241 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1079+ let state = $t04108641241._1
1080+ let totalAmount = $t04108641241._2
10811081 $Tuple2(state, totalAmount)
10821082 }
10831083
10961096 let prBalance = getAccBalance(prId)
10971097 let amBalanceNow = (amBalance - estimAmAmt)
10981098 let prBalanceNow = (prBalance - estimPrAmt)
1099- let $t04168641957 = if ((outAssetId == amId))
1099+ let $t04175142022 = if ((outAssetId == amId))
11001100 then $Tuple3(prBalanceNow, amBalanceNow, estimPrAmt)
11011101 else if ((outAssetId == prId))
11021102 then $Tuple3(amBalanceNow, prBalanceNow, estimAmAmt)
11031103 else throw("wrong outAssetId")
1104- let amountBalanceForSwap = $t04168641957._1
1105- let priceBalanceForSwap = $t04168641957._2
1106- let amountToSwap = $t04168641957._3
1104+ let amountBalanceForSwap = $t04175142022._1
1105+ let priceBalanceForSwap = $t04175142022._2
1106+ let amountToSwap = $t04175142022._3
11071107 let yPrecision = 1
11081108 let exchResult = {
11091109 let @ = invoke(gwxContract, "calcSwapXToY", [toString(amountToSwap), toString(amountBalanceForSwap), toString(priceBalanceForSwap), "", A, Amult, toString(yPrecision), Dconv], nil)
11141114 let totalGetRaw = (exchResult + (if ((outAssetId == amId))
11151115 then estimAmAmt
11161116 else estimPrAmt))
1117- let $t04252942578 = takeFee(totalGetRaw)
1118- let totalGet = $t04252942578._1
1119- let feeAmount = $t04252942578._2
1117+ let $t04259442643 = takeFee(totalGetRaw)
1118+ let totalGet = $t04259442643._1
1119+ let feeAmount = $t04259442643._2
11201120 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
11211121 }
11221122
11301130 let lpId = poolConfig[idxLPAsId]
11311131 let amBalance = getAccBalance(amId)
11321132 let prBalance = getAccBalance(prId)
1133- let $t04292243037 = {
1133+ let $t04298743102 = {
11341134 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
11351135 if ($isInstanceOf(@, "(Int, Int)"))
11361136 then @
11371137 else throw(($getType(invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)) + " couldn't be cast to (Int, Int)"))
11381138 }
1139- let totalGet = $t04292243037._1
1140- let feeAmount = $t04292243037._2
1139+ let totalGet = $t04298743102._1
1140+ let feeAmount = $t04298743102._2
11411141 let r = ego("", lpId, lpAssetAmount, this)
11421142 let outAmAmt = r._1
11431143 let outPrAmt = r._2
12231223 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
12241224 if ((unstakeInv == unstakeInv))
12251225 then {
1226- let $t04545745645 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1227- let state = $t04545745645._1
1228- let totalAmount = $t04545745645._2
1226+ let $t04552245710 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1227+ let state = $t04552245710._1
1228+ let totalAmount = $t04552245710._2
12291229 $Tuple2(state, totalAmount)
12301230 }
12311231 else throw("Strict value is not equal to itself.")
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 oneBigInt = toBigInt(1)
1313
1414 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
1515
1616 let Amult = "100"
1717
1818 let Dconv = "1"
1919
2020 let SEP = "__"
2121
2222 let EMPTY = ""
2323
2424 let PoolActive = 1
2525
2626 let PoolPutDis = 2
2727
2828 let PoolMatcherDis = 3
2929
3030 let PoolShutdown = 4
3131
3232 let idxPoolAddress = 1
3333
3434 let idxPoolSt = 2
3535
3636 let idxLPAsId = 3
3737
3838 let idxAmAsId = 4
3939
4040 let idxPrAsId = 5
4141
4242 let idxAmtAsDcm = 6
4343
4444 let idxPriceAsDcm = 7
4545
4646 let idxIAmtAsId = 8
4747
4848 let idxIPriceAsId = 9
4949
5050 let idxFactStakCntr = 1
5151
5252 let idxFactSlippCntr = 7
5353
5454 let idxFactGwxRewCntr = 10
5555
5656 let feeDefault = fraction(5, scale8, 10000)
5757
5858 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
5959
6060
6161 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
6262
6363
6464 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
6565
6666
6767 func abs (val) = if ((zeroBigInt > val))
6868 then -(val)
6969 else val
7070
7171
7272 func fc () = "%s__factoryContract"
7373
7474
7575 func mpk () = "%s__managerPublicKey"
7676
7777
7878 func pmpk () = "%s__pendingManagerPublicKey"
7979
8080
8181 func pl () = "%s%s__price__last"
8282
8383
8484 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
8585
8686
8787 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
8888
8989
9090 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
9191
9292
9393 func aa () = "%s__amountAsset"
9494
9595
9696 func pa () = "%s__priceAsset"
9797
9898
9999 func amp () = "%s__amp"
100100
101101
102102 func ada () = "%s__addonAddr"
103103
104104
105105 let keyFee = "%s__fee"
106106
107107 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
108108
109109 func fcfg () = "%s__factoryConfig"
110110
111111
112112 func mtpk () = "%s%s__matcher__publicKey"
113113
114114
115115 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
116116
117117
118118 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
119119
120120
121121 func aps () = "%s__shutdown"
122122
123123
124124 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
125125
126126
127127 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
128128
129129
130130 func toe (orV,sendrV,matchV) = throw(((((("Failed: ordValid=" + toString(orV)) + " sndrValid=") + toString(sendrV)) + " mtchrValid=") + toString(matchV)))
131131
132132
133133 func str (val) = match val {
134134 case valStr: String =>
135135 valStr
136136 case _ =>
137137 throw("fail cast to String")
138138 }
139139
140140
141141 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
142142
143143
144144 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
145145
146146
147147 let fca = addressFromStringValue(strf(this, fc()))
148148
149149 let A = strf(this, amp())
150150
151151 func igs () = valueOrElse(getBoolean(fca, aps()), false)
152152
153153
154154 func mp () = fromBase58String(strf(fca, mtpk()))
155155
156156
157157 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
158158
159159 func gpc () = {
160160 let amtAs = strf(this, aa())
161161 let priceAs = strf(this, pa())
162162 let iPriceAs = intf(fca, mba(priceAs))
163163 let iAmtAs = intf(fca, mba(amtAs))
164164 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
165165 }
166166
167167
168168 func gfc () = split(strf(fca, fcfg()), SEP)
169169
170170
171171 let factoryConfig = gfc()
172172
173173 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
174174
175175 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
176176
177177 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
178178
179179 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)
180180
181181
182182 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)
183183
184184
185185 func getAccBalance (assetId) = if ((assetId == "WAVES"))
186186 then wavesBalance(this).available
187187 else assetBalance(this, fromBase58String(assetId))
188188
189189
190190 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
191191
192192
193193 func vad (A1,A2,slippage) = {
194194 let diff = fraction((A1 - A2), scale8BigInt, A2)
195195 let pass = ((slippage - abs(diff)) > zeroBigInt)
196196 if (!(pass))
197197 then throw(("Big slpg: " + toString(diff)))
198198 else $Tuple2(pass, min([A1, A2]))
199199 }
200200
201201
202202 func vd (D1,D0,slpg) = {
203203 let diff = fraction(D0, scale8BigInt, D1)
204204 let fail = (slpg > diff)
205205 if (if (fail)
206206 then true
207207 else (D0 > D1))
208208 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
209209 else fail
210210 }
211211
212212
213213 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
214214 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
215215 let prAsAmtX18 = t1(prAmt, prAssetDcm)
216216 cpbi(prAsAmtX18, amtAsAmtX18)
217217 }
218218
219219
220220 func calcPrices (amAmt,prAmt,lpAmt) = {
221221 let cfg = gpc()
222222 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
223223 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
224224 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
225225 let amAmtX18 = t1(amAmt, amtAsDcm)
226226 let prAmtX18 = t1(prAmt, prAsDcm)
227227 let lpAmtX18 = t1(lpAmt, scale8)
228228 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
229229 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
230230 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
231231 }
232232
233233
234234 func calculatePrices (amAmt,prAmt,lpAmt) = {
235235 let p = calcPrices(amAmt, prAmt, lpAmt)
236236 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
237237 }
238238
239239
240240 func takeFee (amount) = {
241241 let feeAmount = fraction(amount, fee, scale8)
242242 $Tuple2((amount - feeAmount), feeAmount)
243243 }
244244
245245
246246 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
247247 let cfg = gpc()
248248 let lpId = cfg[idxLPAsId]
249249 let amId = cfg[idxAmAsId]
250250 let prId = cfg[idxPrAsId]
251251 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
252252 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
253253 let sts = cfg[idxPoolSt]
254254 let lpEmiss = valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "Wrong LP id").quantity
255255 if ((lpId != pmtAssetId))
256256 then throw("Wrong pmt asset")
257257 else {
258258 let amBalance = getAccBalance(amId)
259259 let amBalanceX18 = t1(amBalance, amDcm)
260260 let prBalance = getAccBalance(prId)
261261 let prBalanceX18 = t1(prBalance, prDcm)
262262 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
263263 let curPrice = f1(curPriceX18, scale8)
264264 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
265265 let lpEmissX18 = t1(lpEmiss, scale8)
266266 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
267267 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
268268 let outAmAmt = f1(outAmAmtX18, amDcm)
269269 let outPrAmt = f1(outPrAmtX18, prDcm)
270270 let state = if ((txId58 == ""))
271271 then nil
272272 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
273273 then unit
274274 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
275275 then unit
276276 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)]
277277 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
278278 }
279279 }
280280
281281
282282 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
283283 let cfg = gpc()
284284 let lpId = fromBase58String(cfg[idxLPAsId])
285285 let amIdStr = cfg[idxAmAsId]
286286 let prIdStr = cfg[idxPrAsId]
287287 let inAmIdStr = cfg[idxIAmtAsId]
288288 let inPrIdStr = cfg[idxIPriceAsId]
289289 let amtDcm = parseIntValue(cfg[idxAmtAsDcm])
290290 let priceDcm = parseIntValue(cfg[idxPriceAsDcm])
291291 let sts = cfg[idxPoolSt]
292292 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
293293 let amBalance = if (isEval)
294294 then getAccBalance(amIdStr)
295295 else if (if (isOneAsset)
296296 then (pmtId == amIdStr)
297297 else false)
298298 then (getAccBalance(amIdStr) - pmtAmt)
299299 else if (isOneAsset)
300300 then getAccBalance(amIdStr)
301301 else (getAccBalance(amIdStr) - inAmAmt)
302302 let prBalance = if (isEval)
303303 then getAccBalance(prIdStr)
304304 else if (if (isOneAsset)
305305 then (pmtId == prIdStr)
306306 else false)
307307 then (getAccBalance(prIdStr) - pmtAmt)
308308 else if (isOneAsset)
309309 then getAccBalance(prIdStr)
310310 else (getAccBalance(prIdStr) - inPrAmt)
311311 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
312312 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
313313 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
314314 let amBalanceX18 = t1(amBalance, amtDcm)
315315 let prBalanceX18 = t1(prBalance, priceDcm)
316316 let r = if ((lpEm == 0))
317317 then {
318318 let curPriceX18 = zeroBigInt
319319 let slippageX18 = zeroBigInt
320320 let lpAmtX18 = pow((inAmAssetAmtX18 * inPrAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN)
321321 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
322322 }
323323 else {
324324 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
325325 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
326326 let slippageX18 = t1(slippage, scale8)
327327 if (if (if (validateSlippage)
328328 then (curPriceX18 != zeroBigInt)
329329 else false)
330330 then (slippageRealX18 > slippageX18)
331331 else false)
332332 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
333333 else {
334334 let lpEmissionX18 = t1(lpEm, scale8)
335335 let prViaAmX18 = fraction(inAmAssetAmtX18, curPriceX18, scale18)
336336 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, curPriceX18)
337337 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
338338 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
339339 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
340340 let expAmtAssetAmtX18 = expectedAmts._1
341341 let expPriceAssetAmtX18 = expectedAmts._2
342342 let lpAmtX18 = fraction(lpEmissionX18, expPriceAssetAmtX18, prBalanceX18)
343343 $Tuple5(f1(lpAmtX18, scale8), f1(expAmtAssetAmtX18, amtDcm), f1(expPriceAssetAmtX18, priceDcm), curPriceX18, slippageX18)
344344 }
345345 }
346346 let calcLpAmt = r._1
347347 let calcAmAssetPmt = r._2
348348 let calcPrAssetPmt = r._3
349349 let curPrice = f1(r._4, scale8)
350350 let slippageCalc = f1(r._5, scale8)
351351 if ((0 >= calcLpAmt))
352352 then throw("LP <= 0")
353353 else {
354354 let emitLpAmt = if (!(emitLp))
355355 then 0
356356 else calcLpAmt
357357 let amDiff = (inAmAmt - calcAmAssetPmt)
358358 let prDiff = (inPrAmt - calcPrAssetPmt)
359359 let $t01623716582 = if (if (isOneAsset)
360360 then (pmtId == amIdStr)
361361 else false)
362362 then $Tuple2(pmtAmt, 0)
363363 else if (if (isOneAsset)
364364 then (pmtId == prIdStr)
365365 else false)
366366 then $Tuple2(0, pmtAmt)
367367 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
368368 let writeAmAmt = $t01623716582._1
369369 let writePrAmt = $t01623716582._2
370370 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))]
371371 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
372372 }
373373 }
374374
375375
376376 func moa (order) = {
377377 let cfg = gpc()
378378 let amtAsId = cfg[idxAmAsId]
379379 let prAsId = cfg[idxPrAsId]
380380 let sts = parseIntValue(cfg[idxPoolSt])
381381 let amtAsDcm = parseIntValue(cfg[idxAmtAsDcm])
382382 let prAsDcm = parseIntValue(cfg[idxPriceAsDcm])
383383 let accAmtAsBalance = getAccBalance(amtAsId)
384384 let accPrAsBalance = getAccBalance(prAsId)
385385 let curPriceX18 = if ((order.orderType == Buy))
386386 then pcp(amtAsDcm, prAsDcm, (accAmtAsBalance + order.amount), accPrAsBalance)
387387 else pcp(amtAsDcm, prAsDcm, (accAmtAsBalance - order.amount), accPrAsBalance)
388388 let curPrice = f1(curPriceX18, scale8)
389389 if (if (if (igs())
390390 then true
391391 else (sts == PoolMatcherDis))
392392 then true
393393 else (sts == PoolShutdown))
394394 then throw("Admin blocked")
395395 else {
396396 let orAmtAsset = order.assetPair.amountAsset
397397 let orAmtAsStr = if ((orAmtAsset == unit))
398398 then "WAVES"
399399 else toBase58String(value(orAmtAsset))
400400 let orPrAsset = order.assetPair.priceAsset
401401 let orPrAsStr = if ((orPrAsset == unit))
402402 then "WAVES"
403403 else toBase58String(value(orPrAsset))
404404 if (if ((orAmtAsStr != amtAsId))
405405 then true
406406 else (orPrAsStr != prAsId))
407407 then throw("Wr assets")
408408 else {
409409 let orderPrice = order.price
410410 let priceDcm = fraction(scale8, prAsDcm, amtAsDcm)
411411 let castOrderPrice = ts(orderPrice, scale8, priceDcm)
412412 let isOrderPriceValid = if ((order.orderType == Buy))
413413 then (curPrice >= castOrderPrice)
414414 else (castOrderPrice >= curPrice)
415415 true
416416 }
417417 }
418418 }
419419
420420
421421 func cg (i) = if ((size(i.payments) != 1))
422422 then throw("1 pmnt exp")
423423 else {
424424 let pmt = value(i.payments[0])
425425 let pmtAssetId = value(pmt.assetId)
426426 let pmtAmt = pmt.amount
427427 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
428428 let outAmAmt = r._1
429429 let outPrAmt = r._2
430430 let sts = parseIntValue(r._9)
431431 let state = r._10
432432 if (if (igs())
433433 then true
434434 else (sts == PoolShutdown))
435435 then throw(("Admin blocked: " + toString(sts)))
436436 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
437437 }
438438
439439
440440 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
441441 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, false, emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
442442 let sts = parseIntValue(r._8)
443443 if (if (if (igs())
444444 then true
445445 else (sts == PoolPutDis))
446446 then true
447447 else (sts == PoolShutdown))
448448 then throw(("Blocked:" + toString(sts)))
449449 else r
450450 }
451451
452452
453453 func estimatePutOneTknV2 (pmtAmtRaw,pmtAssetId,userAddress,txId) = {
454454 let poolConfig = gpc()
455455 let amId = poolConfig[idxAmAsId]
456456 let prId = poolConfig[idxPrAsId]
457457 let amBalance = getAccBalance(amId)
458458 let prBalance = getAccBalance(prId)
459459 let $t02090820953 = takeFee(pmtAmtRaw)
460460 let pmtAmt = $t02090820953._1
461461 let feeAmount = $t02090820953._2
462462 let $t02095721418 = if ((txId == ""))
463463 then $Tuple2(amBalance, prBalance)
464464 else if ((pmtAssetId == amId))
465465 then if ((pmtAmtRaw > amBalance))
466466 then throw("invalid payment amount")
467467 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
468468 else if ((pmtAssetId == prId))
469469 then if ((pmtAmtRaw > prBalance))
470470 then throw("invalid payment amount")
471471 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
472472 else throw("wrong pmtAssetId")
473473 let amBalanceNow = $t02095721418._1
474474 let prBalanceNow = $t02095721418._2
475475 let $t02142221556 = if ((pmtAssetId == amId))
476476 then $Tuple2(amBalanceNow, prBalanceNow)
477477 else $Tuple2(prBalanceNow, amBalanceNow)
478478 let amBalanceForCalc = $t02142221556._1
479479 let prBalanceForCalc = $t02142221556._2
480480 let xPrecision = 1
481481 let result = {
482482 let @ = invoke(gwxContract, "calcPutXOnly", [toString(pmtAmt), toString(amBalanceForCalc), toString(prBalanceForCalc), "", A, Amult, toString(xPrecision), Dconv], nil)
483483 if ($isInstanceOf(@, "(Int, Int)"))
484484 then @
485485 else throw(($getType(invoke(gwxContract, "calcPutXOnly", [toString(pmtAmt), toString(amBalanceForCalc), toString(prBalanceForCalc), "", A, Amult, toString(xPrecision), Dconv], nil)) + " couldn't be cast to (Int, Int)"))
486486 }
487487 let $t02202522121 = if ((pmtAssetId == amId))
488488 then result
489489 else $Tuple2(result._2, result._1)
490490 let amAssetPart = $t02202522121._1
491491 let prAssetPart = $t02202522121._2
492492 let estPut = cp(userAddress, txId, AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), 0, true, true, false, pmtAmtRaw, pmtAssetId)
493493 let estimLP = estPut._2
494494 let lpAssetId = estPut._7
495495 let state = estPut._9
496496 let amDiff = estPut._10
497497 let prDiff = estPut._11
498498 estPut
499499 }
500500
501501
502502 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = if ((size(payments) != 1))
503503 then throw("1 pmnt expd")
504504 else {
505505 let poolConfig = gpc()
506506 let lpId = poolConfig[idxLPAsId]
507507 let amId = poolConfig[idxAmAsId]
508508 let prId = poolConfig[idxPrAsId]
509509 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
510510 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
511511 let poolStatus = poolConfig[idxPoolSt]
512512 let userAddress = if ((caller == this))
513513 then originCaller
514514 else caller
515515 let pmt = value(payments[0])
516516 let pmtAssetId = value(pmt.assetId)
517517 let pmtAmt = pmt.amount
518518 if ((1000000000 > pmtAmt))
519519 then throw("Min pmt 10 LP")
520520 else {
521521 let txId58 = toBase58String(transactionId)
522522 if ((lpId != toBase58String(pmtAssetId)))
523523 then throw("Wrong LP")
524524 else {
525525 let amBalance = getAccBalance(amId)
526526 let prBalance = getAccBalance(prId)
527527 let $t02347623584 = {
528528 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
529529 if ($isInstanceOf(@, "(Int, Int)"))
530530 then @
531531 else throw(($getType(invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)) + " couldn't be cast to (Int, Int)"))
532532 }
533533 let totalGet = $t02347623584._1
534534 let feeAmount = $t02347623584._2
535535 let totalAmount = if (if ((minOutAmount > 0))
536536 then (minOutAmount > totalGet)
537537 else false)
538538 then throw(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
539539 else totalGet
540540 let $t02377123858 = if ((outAssetId == amId))
541541 then $Tuple2(totalAmount, 0)
542542 else $Tuple2(0, totalAmount)
543543 let outAm = $t02377123858._1
544544 let outPr = $t02377123858._2
545545 let curPrX18 = cpbi(t1(prBalance, prDecimals), t1(amBalance, amDecimals))
546546 let curPr = f1(curPrX18, scale8)
547547 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
548548 then unit
549549 else fromBase58String(outAssetId)
550550 let sendFeeToMatcher = if ((feeAmount > 0))
551551 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
552552 else nil
553553 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)
554554 if ((state == state))
555555 then {
556556 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
557557 if ((burn == burn))
558558 then $Tuple2(state, totalAmount)
559559 else throw("Strict value is not equal to itself.")
560560 }
561561 else throw("Strict value is not equal to itself.")
562562 }
563563 }
564564 }
565565
566566
567567 func m () = match getString(mpk()) {
568568 case s: String =>
569569 fromBase58String(s)
570570 case _: Unit =>
571571 unit
572572 case _ =>
573573 throw("Match error")
574574 }
575575
576576
577577 func pm () = match getString(pmpk()) {
578578 case s: String =>
579579 fromBase58String(s)
580580 case _: Unit =>
581581 unit
582582 case _ =>
583583 throw("Match error")
584584 }
585585
586586
587587 let pd = throw("Permission denied")
588588
589589 func mm (i) = match m() {
590590 case pk: ByteVector =>
591591 if ((i.callerPublicKey == pk))
592592 then true
593593 else pd
594594 case _: Unit =>
595595 if ((i.caller == this))
596596 then true
597597 else pd
598598 case _ =>
599599 throw("Match error")
600600 }
601601
602602
603603 @Callable(i)
604604 func constructor (fc) = {
605605 let c = mm(i)
606606 if ((c == c))
607607 then [StringEntry(fc(), fc)]
608608 else throw("Strict value is not equal to itself.")
609609 }
610610
611611
612612
613613 @Callable(i)
614614 func setManager (pendingManagerPublicKey) = {
615615 let c = mm(i)
616616 if ((c == c))
617617 then {
618618 let cm = fromBase58String(pendingManagerPublicKey)
619619 if ((cm == cm))
620620 then [StringEntry(pmpk(), pendingManagerPublicKey)]
621621 else throw("Strict value is not equal to itself.")
622622 }
623623 else throw("Strict value is not equal to itself.")
624624 }
625625
626626
627627
628628 @Callable(i)
629629 func confirmManager () = {
630630 let p = pm()
631631 let hpm = if (isDefined(p))
632632 then true
633633 else throw("No pending manager")
634634 if ((hpm == hpm))
635635 then {
636636 let cpm = if ((i.callerPublicKey == value(p)))
637637 then true
638638 else throw("You are not pending manager")
639639 if ((cpm == cpm))
640640 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
641641 else throw("Strict value is not equal to itself.")
642642 }
643643 else throw("Strict value is not equal to itself.")
644644 }
645645
646646
647647
648648 @Callable(i)
649649 func put (slip,autoStake) = {
650650 let factCfg = gfc()
651651 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
652652 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
653653 if ((0 > slip))
654654 then throw("Wrong slippage")
655655 else if ((size(i.payments) != 2))
656656 then throw("2 pmnts expd")
657657 else {
658658 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, "")
659659 let emitLpAmt = e._2
660660 let lpAssetId = e._7
661661 let state = e._9
662662 let amDiff = e._10
663663 let prDiff = e._11
664664 let amId = e._12
665665 let prId = e._13
666666 let r = invoke(fca, "emit", [emitLpAmt], nil)
667667 if ((r == r))
668668 then {
669669 let el = match r {
670670 case legacy: Address =>
671671 invoke(legacy, "emit", [emitLpAmt], nil)
672672 case _ =>
673673 unit
674674 }
675675 if ((el == el))
676676 then {
677677 let sa = if ((amDiff > 0))
678678 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
679679 else nil
680680 if ((sa == sa))
681681 then {
682682 let sp = if ((prDiff > 0))
683683 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
684684 else nil
685685 if ((sp == sp))
686686 then {
687687 let lpTrnsfr = if (autoStake)
688688 then {
689689 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
690690 if ((ss == ss))
691691 then nil
692692 else throw("Strict value is not equal to itself.")
693693 }
694694 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
695695 (state ++ lpTrnsfr)
696696 }
697697 else throw("Strict value is not equal to itself.")
698698 }
699699 else throw("Strict value is not equal to itself.")
700700 }
701701 else throw("Strict value is not equal to itself.")
702702 }
703703 else throw("Strict value is not equal to itself.")
704704 }
705705 }
706706
707707
708708
709709 @Callable(i)
710710 func putOneTkn (amAssetPart,prAssetPart,outLp,slippage,autoStake) = {
711711 let cfg = gfc()
712712 let stakingCntr = valueOrErrorMessage(addressFromString(cfg[idxFactStakCntr]), "Wr st addr")
713713 let slipCntr = valueOrErrorMessage(addressFromString(cfg[idxFactSlippCntr]), "Wr sl addr")
714714 let gwxCntr = valueOrErrorMessage(addressFromString(cfg[idxFactGwxRewCntr]), "Wr gwx addr")
715715 let poolCfg = gpc()
716716 let amId = poolCfg[idxAmAsId]
717717 let prId = poolCfg[idxPrAsId]
718718 let amDcm = parseIntValue(poolCfg[idxAmtAsDcm])
719719 let prDcm = parseIntValue(poolCfg[idxPriceAsDcm])
720720 let addon = valueOrElse(getString(this, ada()), "")
721721 let userAddress = if ((addon == toString(i.caller)))
722722 then i.originCaller
723723 else i.caller
724724 if (if (if (if ((0 >= slippage))
725725 then true
726726 else (0 >= amAssetPart))
727727 then true
728728 else (0 >= prAssetPart))
729729 then true
730730 else (0 >= outLp))
731731 then throw("Wrong params")
732732 else if ((size(i.payments) != 1))
733733 then throw("1 pmnt expd")
734734 else {
735735 let pmt = value(i.payments[0])
736736 let pmtAssetId = toBase58String(value(pmt.assetId))
737737 let paymentAmountRaw = pmt.amount
738738 let $t02924429296 = takeFee(paymentAmountRaw)
739739 let pmtAmt = $t02924429296._1
740740 let feeAmount = $t02924429296._2
741741 if ((10000000 > paymentAmountRaw))
742742 then throw("Wrong pmt amt")
743743 else {
744744 let amBalance = getAccBalance(amId)
745745 let prBalance = getAccBalance(prId)
746746 let $t02945630072 = if ((pmtAssetId == amId))
747747 then if (if ((paymentAmountRaw > amBalance))
748748 then true
749749 else (amAssetPart > pmtAmt))
750750 then throw("invalid payment amount")
751751 else $Tuple6((amBalance - paymentAmountRaw), prBalance, (pmtAmt - amAssetPart), prAssetPart, 0, 0)
752752 else if ((pmtAssetId == prId))
753753 then if (if ((paymentAmountRaw > prBalance))
754754 then true
755755 else (prAssetPart > pmtAmt))
756756 then throw("invalid payment amount")
757757 else $Tuple6(amBalance, (prBalance - paymentAmountRaw), 0, 0, (pmtAmt - prAssetPart), amAssetPart)
758758 else throw("wrong pmtAssetId")
759759 let amBalanceNow = $t02945630072._1
760760 let prBalanceNow = $t02945630072._2
761761 let virtSwapInAm = $t02945630072._3
762762 let virtSwapOutPr = $t02945630072._4
763763 let virtSwapInPr = $t02945630072._5
764764 let virtSwapOutAm = $t02945630072._6
765765 let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
766766 let D1 = invoke(gwxCntr, "calcD", [toString(toBigInt(((amBalanceNow + virtSwapInAm) - virtSwapOutAm))), toString(toBigInt(((prBalanceNow + virtSwapInPr) - virtSwapOutPr))), A, Amult, Dconv], nil)
767767 let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
768768 if ((D0vsD1 == D0vsD1))
769769 then {
770770 let estPut = cp(toString(i.caller), toBase58String(i.transactionId), AttachedPayment(fromBase58String(amId), amAssetPart), AttachedPayment(fromBase58String(prId), prAssetPart), slippage, true, true, true, pmtAmt, pmtAssetId)
771771 let estimLP = estPut._2
772772 let lpAssetId = estPut._7
773773 let state = estPut._9
774774 let amDiff = estPut._10
775775 let prDiff = estPut._11
776776 let lpCalcRes = vad(toBigInt(estimLP), toBigInt(outLp), toBigInt(slippage))
777777 let emitLpAmt = toInt(lpCalcRes._2)
778778 let e = invoke(fca, "emit", [emitLpAmt], nil)
779779 if ((e == e))
780780 then {
781781 let el = match e {
782782 case legacy: Address =>
783783 invoke(legacy, "emit", [emitLpAmt], nil)
784784 case _ =>
785785 unit
786786 }
787787 if ((el == el))
788788 then {
789789 let sa = if ((amDiff > 0))
790790 then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
791791 else nil
792792 if ((sa == sa))
793793 then {
794794 let sp = if ((prDiff > 0))
795795 then invoke(slipCntr, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
796796 else nil
797797 if ((sp == sp))
798798 then {
799799 let lpTrnsfr = if (autoStake)
800800 then {
801801 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
802802 if ((ss == ss))
803803 then nil
804804 else throw("Strict value is not equal to itself.")
805805 }
806806 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
807807 let sendFeeToMatcher = if ((feeAmount > 0))
808808 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
809809 else nil
810810 ((state ++ lpTrnsfr) ++ sendFeeToMatcher)
811811 }
812812 else throw("Strict value is not equal to itself.")
813813 }
814814 else throw("Strict value is not equal to itself.")
815815 }
816816 else throw("Strict value is not equal to itself.")
817817 }
818818 else throw("Strict value is not equal to itself.")
819819 }
820820 else throw("Strict value is not equal to itself.")
821821 }
822822 }
823823 }
824824
825825
826826
827827 @Callable(i)
828828 func putOneTknV2 (minOutAmount,autoStake) = if ((size(i.payments) != 1))
829829 then throw("1 pmnt expd")
830830 else {
831831 let poolConfig = gpc()
832832 let amId = poolConfig[idxAmAsId]
833833 let prId = poolConfig[idxPrAsId]
834834 let amDecimals = parseIntValue(poolConfig[idxAmtAsDcm])
835835 let prDecimals = parseIntValue(poolConfig[idxPriceAsDcm])
836836 let userAddress = if ((i.caller == this))
837837 then i.originCaller
838838 else i.caller
839839 let pmt = value(i.payments[0])
840840 let pmtAssetId = toBase58String(value(pmt.assetId))
841841 let pmtAmt = pmt.amount
842842 if ((10000000 > pmtAmt))
843843 then throw("Wrong pmt amt")
844844 else {
845845 let r = estimatePutOneTknV2(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId))
846846 let estimLP = r._2
847847 let lpAssetId = r._7
848848 let state = r._9
849849 let amDiff = r._10
850850 let prDiff = r._11
851851 let emitLpAmt = if (if ((minOutAmount > 0))
852852 then (minOutAmount > estimLP)
853853 else false)
854854 then throw(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
855855 else estimLP
856856 let e = invoke(fca, "emit", [emitLpAmt], nil)
857857 if ((e == e))
858858 then {
859859 let el = match e {
860860 case legacy: Address =>
861861 invoke(legacy, "emit", [emitLpAmt], nil)
862862 case _ =>
863863 unit
864864 }
865865 if ((el == el))
866866 then {
867867 let sa = if ((amDiff > 0))
868868 then invoke(slipageContract, "put", nil, [AttachedPayment(fromBase58String(amId), amDiff)])
869869 else nil
870870 if ((sa == sa))
871871 then {
872872 let sp = if ((prDiff > 0))
873873 then invoke(slipageContract, "put", nil, [AttachedPayment(fromBase58String(prId), prDiff)])
874874 else nil
875875 if ((sp == sp))
876876 then {
877877 let lpTrnsfr = if (autoStake)
878878 then {
879879 let ss = invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
880880 if ((ss == ss))
881881 then nil
882882 else throw("Strict value is not equal to itself.")
883883 }
884884 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
885885 let feeAmount = takeFee(pmtAmt)._2
886886 let sendFeeToMatcher = if ((feeAmount > 0))
887887 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
888888 else nil
889889 $Tuple2(((state ++ lpTrnsfr) ++ sendFeeToMatcher), emitLpAmt)
890890 }
891891 else throw("Strict value is not equal to itself.")
892892 }
893893 else throw("Strict value is not equal to itself.")
894894 }
895895 else throw("Strict value is not equal to itself.")
896896 }
897897 else throw("Strict value is not equal to itself.")
898898 }
899899 }
900900
901901
902902
903903 @Callable(i)
904904 func putOneTknV2READONLY (paymentAmount,paymentAssetId) = {
905905 let r = estimatePutOneTknV2(paymentAmount, paymentAssetId, "", "")
906906 let estimLP = r._2
907907 let lpAssetId = r._7
908908 let state = r._9
909909 let amDiff = r._10
910910 let prDiff = r._11
911911 $Tuple2(nil, estimLP)
912912 }
913913
914914
915915
916916 @Callable(i)
917917 func putOneTknV2WithBonusREADONLY (paymentAmount,paymentAssetId) = {
918918 let poolConfig = gpc()
919919 let amId = poolConfig[idxAmAsId]
920920 let prId = poolConfig[idxPrAsId]
921921 let amBalance = getAccBalance(amId)
922922 let prBalance = getAccBalance(prId)
923923 let r = estimatePutOneTknV2(paymentAmount, paymentAssetId, "", "")
924924 let estimLP = r._2
925925 let curPrice = r._3
926926 let lpAssetEmission = r._6
927927 let lpAssetId = r._7
928928 let $t03509535404 = if ((paymentAssetId == amId))
929929 then {
930930 let priceAssetAmount = fraction(paymentAmount, curPrice, scale8)
931931 $Tuple2(paymentAmount, priceAssetAmount)
932932 }
933933 else {
934934 let amountAssetAmount = fraction(paymentAmount, scale8, curPrice)
935935 $Tuple2(amountAssetAmount, paymentAmount)
936936 }
937937 let amountAssetAmount = $t03509535404._1
938938 let priceAssetAmount = $t03509535404._2
939939 let lpAmtBoth = fraction(lpAssetEmission, priceAssetAmount, prBalance)
940940 let lpAssetPriceOne = if ((paymentAssetId == amId))
941941 then fraction(amountAssetAmount, scale8, estimLP)
942942 else fraction(priceAssetAmount, scale8, estimLP)
943943 let lpAssetPriceBoth = fraction((priceAssetAmount + amountAssetAmount), scale8, lpAmtBoth)
944- let bonus = fraction((lpAssetPriceBoth - lpAssetPriceOne), scale8, lpAssetPriceOne)
944+ let bonus = fraction((estimLP - lpAmtBoth), scale8, lpAmtBoth)
945945 let feeAmount = takeFee(paymentAmount)._2
946946 $Tuple2(nil, $Tuple3(estimLP, feeAmount, bonus))
947947 }
948948
949949
950950
951951 @Callable(i)
952952 func putForFree (maxSlpg) = if ((0 > maxSlpg))
953953 then throw("Wrong slpg")
954954 else if ((size(i.payments) != 2))
955955 then throw("2 pmnts expd")
956956 else {
957957 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, "")
958958 estPut._9
959959 }
960960
961961
962962
963963 @Callable(i)
964964 func get () = {
965965 let r = cg(i)
966966 let outAmtAmt = r._1
967967 let outPrAmt = r._2
968968 let pmtAmt = r._3
969969 let pmtAssetId = r._4
970970 let state = r._5
971971 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
972972 if ((b == b))
973973 then state
974974 else throw("Strict value is not equal to itself.")
975975 }
976976
977977
978978
979979 @Callable(i)
980980 func getOneTkn (exchResult,notUsed,outAmount,outAssetId,slippage) = if ((size(i.payments) != 1))
981981 then throw("1 pmnt expd")
982982 else {
983983 let cfg = gpc()
984984 let lpId = cfg[idxLPAsId]
985985 let amId = cfg[idxAmAsId]
986986 let prId = cfg[idxPrAsId]
987987 let amDcm = parseIntValue(cfg[idxAmtAsDcm])
988988 let prDcm = parseIntValue(cfg[idxPriceAsDcm])
989989 let sts = cfg[idxPoolSt]
990990 let factCfg = gfc()
991991 let gwxCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactGwxRewCntr]), "Wr sl addr")
992992 let pmt = value(i.payments[0])
993993 let addon = valueOrElse(getString(this, ada()), "")
994994 let userAddress = if ((addon == toString(i.caller)))
995995 then i.originCaller
996996 else i.caller
997997 let txId58 = toBase58String(i.transactionId)
998998 let pmtAssetId = value(pmt.assetId)
999999 let pmtAmt = pmt.amount
10001000 if ((1000000000 > pmtAmt))
10011001 then throw("Min pmt 10 LP")
10021002 else if (if (if ((0 > slippage))
10031003 then true
10041004 else (0 > exchResult))
10051005 then true
10061006 else (0 > outAmount))
10071007 then throw("Wrong params")
10081008 else if ((lpId != toBase58String(pmtAssetId)))
10091009 then throw("Wrong LP")
10101010 else {
10111011 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
10121012 let estimAmAmt = r._1
10131013 let estimPrAmt = r._2
10141014 let amBalance = getAccBalance(amId)
10151015 let prBalance = getAccBalance(prId)
1016- let $t03868539145 = if ((outAssetId == amId))
1016+ let $t03875039210 = if ((outAssetId == amId))
10171017 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), exchResult, estimPrAmt, 0, 0, (estimAmAmt + exchResult))
10181018 else if ((outAssetId == prId))
10191019 then $Tuple7((amBalance - estimAmAmt), (prBalance - estimPrAmt), 0, 0, exchResult, estimAmAmt, (estimPrAmt + exchResult))
10201020 else throw("wrong outAssetId")
1021- let amBalanceNow = $t03868539145._1
1022- let prBalanceNow = $t03868539145._2
1023- let virtSwapInAm = $t03868539145._3
1024- let virtSwapOutPr = $t03868539145._4
1025- let virtSwapInPr = $t03868539145._5
1026- let virtSwapOutAm = $t03868539145._6
1027- let totalGetRaw = $t03868539145._7
1021+ let amBalanceNow = $t03875039210._1
1022+ let prBalanceNow = $t03875039210._2
1023+ let virtSwapInAm = $t03875039210._3
1024+ let virtSwapOutPr = $t03875039210._4
1025+ let virtSwapInPr = $t03875039210._5
1026+ let virtSwapOutAm = $t03875039210._6
1027+ let totalGetRaw = $t03875039210._7
10281028 if (if ((0 > virtSwapInAm))
10291029 then true
10301030 else (0 > virtSwapInPr))
10311031 then throw("Wrong calc")
10321032 else {
10331033 let D0 = invoke(gwxCntr, "calcD", [toString(amBalanceNow), toString(prBalanceNow), A, Amult, Dconv], nil)
10341034 let D1 = invoke(gwxCntr, "calcD", [toString(((amBalanceNow - virtSwapInAm) + virtSwapOutAm)), toString(((prBalanceNow + virtSwapOutPr) - virtSwapInPr)), A, Amult, Dconv], nil)
10351035 let D0vsD1 = vd(parseBigIntValue(str(D1)), parseBigIntValue(str(D0)), slippage4D)
10361036 if ((D0vsD1 == D0vsD1))
10371037 then {
10381038 let totalGet = takeFee(totalGetRaw)._1
10391039 let finalRes = vad(toBigInt(totalGet), toBigInt(outAmount), toBigInt(slippage))
10401040 if ((finalRes == finalRes))
10411041 then {
1042- let $t03989239996 = if ((outAssetId == amId))
1042+ let $t03995740061 = if ((outAssetId == amId))
10431043 then $Tuple2(toInt(finalRes._2), 0)
10441044 else $Tuple2(0, toInt(finalRes._2))
1045- let outAm = $t03989239996._1
1046- let outPr = $t03989239996._2
1045+ let outAm = $t03995740061._1
1046+ let outPr = $t03995740061._2
10471047 let totalAmount = (outAm + outPr)
10481048 let feeAmount = (totalGetRaw - totalGet)
10491049 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
10501050 then unit
10511051 else fromBase58String(outAssetId)
10521052 let sendFeeToMatcher = if ((feeAmount > 0))
10531053 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
10541054 else nil
10551055 let curPrX18 = cpbi(t1(prBalance, prDcm), t1(amBalance, amDcm))
10561056 let curPr = f1(curPrX18, scale8)
10571057 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)]
10581058 if ((state == state))
10591059 then {
10601060 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
10611061 if ((burn == burn))
10621062 then (state ++ sendFeeToMatcher)
10631063 else throw("Strict value is not equal to itself.")
10641064 }
10651065 else throw("Strict value is not equal to itself.")
10661066 }
10671067 else throw("Strict value is not equal to itself.")
10681068 }
10691069 else throw("Strict value is not equal to itself.")
10701070 }
10711071 }
10721072 }
10731073
10741074
10751075
10761076 @Callable(i)
10771077 func getOneTknV2 (outAssetId,minOutAmount) = {
1078- let $t04102141176 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1079- let state = $t04102141176._1
1080- let totalAmount = $t04102141176._2
1078+ let $t04108641241 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
1079+ let state = $t04108641241._1
1080+ let totalAmount = $t04108641241._2
10811081 $Tuple2(state, totalAmount)
10821082 }
10831083
10841084
10851085
10861086 @Callable(i)
10871087 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
10881088 let poolConfig = gpc()
10891089 let lpId = poolConfig[idxLPAsId]
10901090 let amId = poolConfig[idxAmAsId]
10911091 let prId = poolConfig[idxPrAsId]
10921092 let r = ego("", lpId, lpAssetAmount, this)
10931093 let estimAmAmt = r._1
10941094 let estimPrAmt = r._2
10951095 let amBalance = getAccBalance(amId)
10961096 let prBalance = getAccBalance(prId)
10971097 let amBalanceNow = (amBalance - estimAmAmt)
10981098 let prBalanceNow = (prBalance - estimPrAmt)
1099- let $t04168641957 = if ((outAssetId == amId))
1099+ let $t04175142022 = if ((outAssetId == amId))
11001100 then $Tuple3(prBalanceNow, amBalanceNow, estimPrAmt)
11011101 else if ((outAssetId == prId))
11021102 then $Tuple3(amBalanceNow, prBalanceNow, estimAmAmt)
11031103 else throw("wrong outAssetId")
1104- let amountBalanceForSwap = $t04168641957._1
1105- let priceBalanceForSwap = $t04168641957._2
1106- let amountToSwap = $t04168641957._3
1104+ let amountBalanceForSwap = $t04175142022._1
1105+ let priceBalanceForSwap = $t04175142022._2
1106+ let amountToSwap = $t04175142022._3
11071107 let yPrecision = 1
11081108 let exchResult = {
11091109 let @ = invoke(gwxContract, "calcSwapXToY", [toString(amountToSwap), toString(amountBalanceForSwap), toString(priceBalanceForSwap), "", A, Amult, toString(yPrecision), Dconv], nil)
11101110 if ($isInstanceOf(@, "Int"))
11111111 then @
11121112 else throw(($getType(invoke(gwxContract, "calcSwapXToY", [toString(amountToSwap), toString(amountBalanceForSwap), toString(priceBalanceForSwap), "", A, Amult, toString(yPrecision), Dconv], nil)) + " couldn't be cast to Int"))
11131113 }
11141114 let totalGetRaw = (exchResult + (if ((outAssetId == amId))
11151115 then estimAmAmt
11161116 else estimPrAmt))
1117- let $t04252942578 = takeFee(totalGetRaw)
1118- let totalGet = $t04252942578._1
1119- let feeAmount = $t04252942578._2
1117+ let $t04259442643 = takeFee(totalGetRaw)
1118+ let totalGet = $t04259442643._1
1119+ let feeAmount = $t04259442643._2
11201120 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
11211121 }
11221122
11231123
11241124
11251125 @Callable(i)
11261126 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
11271127 let poolConfig = gpc()
11281128 let amId = poolConfig[idxAmAsId]
11291129 let prId = poolConfig[idxPrAsId]
11301130 let lpId = poolConfig[idxLPAsId]
11311131 let amBalance = getAccBalance(amId)
11321132 let prBalance = getAccBalance(prId)
1133- let $t04292243037 = {
1133+ let $t04298743102 = {
11341134 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
11351135 if ($isInstanceOf(@, "(Int, Int)"))
11361136 then @
11371137 else throw(($getType(invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)) + " couldn't be cast to (Int, Int)"))
11381138 }
1139- let totalGet = $t04292243037._1
1140- let feeAmount = $t04292243037._2
1139+ let totalGet = $t04298743102._1
1140+ let feeAmount = $t04298743102._2
11411141 let r = ego("", lpId, lpAssetAmount, this)
11421142 let outAmAmt = r._1
11431143 let outPrAmt = r._2
11441144 let lpAssetPriceOne = fraction(totalGet, scale8, lpAssetAmount)
11451145 let lpAssetPriceBoth = fraction((outAmAmt + outPrAmt), scale8, lpAssetAmount)
11461146 let bonus = fraction((lpAssetPriceOne - lpAssetPriceBoth), scale8, lpAssetPriceBoth)
11471147 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
11481148 }
11491149
11501150
11511151
11521152 @Callable(i)
11531153 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
11541154 let r = cg(i)
11551155 let outAmAmt = r._1
11561156 let outPrAmt = r._2
11571157 let pmtAmt = r._3
11581158 let pmtAssetId = r._4
11591159 let state = r._5
11601160 if ((noLessThenAmtAsset > outAmAmt))
11611161 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
11621162 else if ((noLessThenPriceAsset > outPrAmt))
11631163 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
11641164 else {
11651165 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
11661166 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
11671167 then state
11681168 else throw("Strict value is not equal to itself.")
11691169 }
11701170 }
11711171
11721172
11731173
11741174 @Callable(i)
11751175 func unstakeAndGet (amount) = {
11761176 let checkPayments = if ((size(i.payments) != 0))
11771177 then throw("No pmnts expd")
11781178 else true
11791179 if ((checkPayments == checkPayments))
11801180 then {
11811181 let cfg = gpc()
11821182 let factoryCfg = gfc()
11831183 let lpAssetId = fromBase58String(cfg[idxLPAsId])
11841184 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
11851185 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
11861186 if ((unstakeInv == unstakeInv))
11871187 then {
11881188 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
11891189 let sts = parseIntValue(r._9)
11901190 let state = r._10
11911191 let v = if (if (igs())
11921192 then true
11931193 else (sts == PoolShutdown))
11941194 then throw(("Blocked: " + toString(sts)))
11951195 else true
11961196 if ((v == v))
11971197 then {
11981198 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
11991199 if ((burnA == burnA))
12001200 then state
12011201 else throw("Strict value is not equal to itself.")
12021202 }
12031203 else throw("Strict value is not equal to itself.")
12041204 }
12051205 else throw("Strict value is not equal to itself.")
12061206 }
12071207 else throw("Strict value is not equal to itself.")
12081208 }
12091209
12101210
12111211
12121212 @Callable(i)
12131213 func unstakeAndGetOneTkn (unstakeAmount,outAssetId,minOutAmount) = {
12141214 let checkPayments = if ((size(i.payments) != 0))
12151215 then throw("No pmnts expd")
12161216 else true
12171217 if ((checkPayments == checkPayments))
12181218 then {
12191219 let cfg = gpc()
12201220 let factoryCfg = gfc()
12211221 let lpAssetId = fromBase58String(cfg[idxLPAsId])
12221222 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
12231223 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), unstakeAmount], nil)
12241224 if ((unstakeInv == unstakeInv))
12251225 then {
1226- let $t04545745645 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1227- let state = $t04545745645._1
1228- let totalAmount = $t04545745645._2
1226+ let $t04552245710 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
1227+ let state = $t04552245710._1
1228+ let totalAmount = $t04552245710._2
12291229 $Tuple2(state, totalAmount)
12301230 }
12311231 else throw("Strict value is not equal to itself.")
12321232 }
12331233 else throw("Strict value is not equal to itself.")
12341234 }
12351235
12361236
12371237
12381238 @Callable(i)
12391239 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
12401240 then throw("denied")
12411241 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
12421242
12431243
12441244
12451245 @Callable(i)
12461246 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
12471247 then pd
12481248 else [StringEntry(k, v)]
12491249
12501250
12511251
12521252 @Callable(i)
12531253 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
12541254 then pd
12551255 else [IntegerEntry(k, v)]
12561256
12571257
12581258
12591259 @Callable(i)
12601260 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
12611261
12621262
12631263
12641264 @Callable(i)
12651265 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
12661266
12671267
12681268
12691269 @Callable(i)
12701270 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
12711271 let pr = calcPrices(amAmt, prAmt, lpAmt)
12721272 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
12731273 }
12741274
12751275
12761276
12771277 @Callable(i)
12781278 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
12791279
12801280
12811281
12821282 @Callable(i)
12831283 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
12841284
12851285
12861286
12871287 @Callable(i)
12881288 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
12891289
12901290
12911291
12921292 @Callable(i)
12931293 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, ""))
12941294
12951295
12961296
12971297 @Callable(i)
12981298 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
12991299 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
13001300 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
13011301 }
13021302
13031303
13041304
13051305 @Callable(i)
13061306 func getFeeREADONLY () = $Tuple2(nil, fee)
13071307
13081308
13091309 @Verifier(tx)
13101310 func verify () = {
13111311 let targetPublicKey = match m() {
13121312 case pk: ByteVector =>
13131313 pk
13141314 case _: Unit =>
13151315 tx.senderPublicKey
13161316 case _ =>
13171317 throw("Match error")
13181318 }
13191319 match tx {
13201320 case order: Order =>
13211321 let matcherPub = mp()
13221322 let orderValid = moa(order)
13231323 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
13241324 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
13251325 if (if (if (orderValid)
13261326 then senderValid
13271327 else false)
13281328 then matcherValid
13291329 else false)
13301330 then true
13311331 else toe(orderValid, senderValid, matcherValid)
13321332 case s: SetScriptTransaction =>
13331333 let newHash = blake2b256(value(s.script))
13341334 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
13351335 let currentHash = scriptHash(this)
13361336 if (if ((allowedHash == newHash))
13371337 then (currentHash != newHash)
13381338 else false)
13391339 then true
13401340 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
13411341 case _ =>
13421342 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
13431343 }
13441344 }
13451345

github/deemru/w8io/026f985 
202.91 ms