tx · 6cXB5yDnqMsErUrkzpKYPG8rj4DZh6tcRRhJYN3QYKQa

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04200000 Waves

2023.03.22 18:59 [2501424] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "6cXB5yDnqMsErUrkzpKYPG8rj4DZh6tcRRhJYN3QYKQa", "fee": 4200000, "feeAssetId": null, "timestamp": 1679500802217, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "5SjK3LpLB7SoRcm31ndQJwLzjRYoWbkfnDhckns8gssc4kDpWGVSqDZcmBibJboYTXpbLu7uzst1upe6Zh3vvKf5" ], "script": "base64:BgK7LAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lk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b3IEAmdxBQJpegMJAAECBQJncQIFT3JkZXIEAmZlBQJncQQCaUMJAQJiYgAEAmlEAwkBAmdCAAkAlAoCBgIACQECZmQBBQJmZQQCYUsIBQJpRAJfMQQCYUwIBQJpRAJfMgQCYU0JAPQDAwgFAmZlCWJvZHlCeXRlcwkAkQMCCAUCZmUGcHJvb2ZzAAAIBQJmZQ9zZW5kZXJQdWJsaWNLZXkEAmFOCQD0AwMIBQJmZQlib2R5Qnl0ZXMJAJEDAggFAmZlBnByb29mcwABBQJpQwMDAwUCYUsFAmFNBwUCYU4HBgkBAmFKBAUCYUsFAmFMBQJhTQUCYU4DCQABAgUCZ3ECFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJjSAUCZ3EDCQD0AwMIBQJpeglib2R5Qnl0ZXMJAJEDAggFAml6BnByb29mcwAABQJpQgYEAmlFCQD2AwEJAQV2YWx1ZQEIBQJjSAZzY3JpcHQEAmlGCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVYJAQJhRgAEAmlHCQDxBwEFBHRoaXMDCQAAAgUCaUYFAmlFCQECIT0CBQJpRwUCaUUHCQD0AwMIBQJpeglib2R5Qnl0ZXMJAJEDAggFAml6BnByb29mcwAABQJpQlilDec=", "height": 2501424, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GwsYWsebc2vvGfJMaByKAybucLaGSaGYeYr4BHH3ooJq Next: BdH1avShJ758iijxJbeMt3H26va4JRU2dfXHvCRFb6Eb Diff:
OldNewDifferences
17361736
17371737 @Callable(i)
17381738 func changeAmp () = {
1739- let $t05682257134 = match "1__2__3" {
1740- case str: String =>
1739+ let str = match "1__2__3" {
1740+ case s: String =>
1741+ s
1742+ case _ =>
1743+ throw("invalid entry type")
1744+ }
1745+ if ((str == str))
1746+ then {
17411747 let list = split(str, SEP)
17421748 if ((list == list))
17431749 then {
1744- let v1 = parseIntValue(list[0])
1745- if ((v1 == v1))
1750+ let delay = parseIntValue(list[0])
1751+ if ((delay == delay))
17461752 then {
1747- let v2 = parseIntValue(list[1])
1748- if ((v2 == v2))
1753+ let delta = parseIntValue(list[1])
1754+ if ((delta == delta))
17491755 then {
1750- let v3 = parseIntValue(list[2])
1751- if ((v3 == v3))
1752- then $Tuple3(v1, v2, v3)
1753- else throw("Strict value is not equal to itself.")
1754- }
1755- else throw("Strict value is not equal to itself.")
1756- }
1757- else throw("Strict value is not equal to itself.")
1758- }
1759- else throw("Strict value is not equal to itself.")
1760- case _ =>
1761- throw("invalid entry type")
1762- }
1763- if (($t05682257134 == $t05682257134))
1764- then {
1765- let target = $t05682257134._3
1766- let delta = $t05682257134._2
1767- let delay = $t05682257134._1
1768- let curAmp = parseIntValue(getStringValue(amp()))
1769- if ((curAmp == curAmp))
1770- then {
1771- let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1772- if ((lastCall == lastCall))
1773- then {
1774- let newAmpRaw = (curAmp + delta)
1775- if ((newAmpRaw == newAmpRaw))
1776- then {
1777- let newAmp = if ((0 > delta))
1778- then if ((target > newAmpRaw))
1779- then target
1780- else newAmpRaw
1781- else if ((newAmpRaw > target))
1782- then target
1783- else newAmpRaw
1784- if ((newAmp == newAmp))
1756+ let target = parseIntValue(list[2])
1757+ if ((target == target))
17851758 then {
1786- let wait = (1 + 1)
1787- if ((wait == wait))
1759+ let curAmp = parseIntValue(getStringValue(amp()))
1760+ if ((curAmp == curAmp))
17881761 then {
1789- let checks = [if ((an > wait))
1790- then true
1791- else throwErr("try again in few blocks"), if ((curAmp != newAmp))
1792- then true
1793- else throwErr("already reached target")]
1794- if ((checks == checks))
1762+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1763+ if ((lastCall == lastCall))
17951764 then {
1796- let t6 = throw("6")
1797- if ((t6 == t6))
1798- then [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
1765+ let newAmpRaw = (curAmp + delta)
1766+ if ((newAmpRaw == newAmpRaw))
1767+ then {
1768+ let newAmp = if ((0 > delta))
1769+ then if ((target > newAmpRaw))
1770+ then target
1771+ else newAmpRaw
1772+ else if ((newAmpRaw > target))
1773+ then target
1774+ else newAmpRaw
1775+ if ((newAmp == newAmp))
1776+ then {
1777+ let wait = (lastCall + delay)
1778+ if ((wait == wait))
1779+ then {
1780+ let checks = [if ((curAmp != newAmp))
1781+ then true
1782+ else throwErr("already reached target")]
1783+ if ((checks == checks))
1784+ then {
1785+ let t6 = throw("6")
1786+ if ((t6 == t6))
1787+ then [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
1788+ else throw("Strict value is not equal to itself.")
1789+ }
1790+ else throw("Strict value is not equal to itself.")
1791+ }
1792+ else throw("Strict value is not equal to itself.")
1793+ }
1794+ else throw("Strict value is not equal to itself.")
1795+ }
17991796 else throw("Strict value is not equal to itself.")
18001797 }
18011798 else throw("Strict value is not equal to itself.")
18271824 match tx {
18281825 case order: Order =>
18291826 let matcherPub = mp()
1830- let $t05807958196 = if (skipOrderValidation())
1827+ let $t05803758154 = if (skipOrderValidation())
18311828 then $Tuple2(true, "")
18321829 else validateMatcherOrderAllowed(order)
1833- let orderValid = $t05807958196._1
1834- let orderValidInfo = $t05807958196._2
1830+ let orderValid = $t05803758154._1
1831+ let orderValidInfo = $t05803758154._2
18351832 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
18361833 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
18371834 if (if (if (orderValid)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let scale8 = 100000000
55
66 let scale8BigInt = toBigInt(100000000)
77
88 let scale18 = toBigInt(1000000000000000000)
99
1010 let zeroBigInt = toBigInt(0)
1111
1212 let big0 = toBigInt(0)
1313
1414 let big1 = toBigInt(1)
1515
1616 let big2 = toBigInt(2)
1717
1818 let big3 = toBigInt(3)
1919
2020 let big4 = toBigInt(4)
2121
2222 let slippage4D = toBigInt((scale8 - ((scale8 * 1) / scale8)))
2323
2424 let wavesString = "WAVES"
2525
2626 let Amult = "100"
2727
2828 let Dconv = "1"
2929
3030 let SEP = "__"
3131
3232 let EMPTY = ""
3333
3434 let PoolActive = 1
3535
3636 let PoolPutDis = 2
3737
3838 let PoolMatcherDis = 3
3939
4040 let PoolShutdown = 4
4141
4242 let idxPoolAddress = 1
4343
4444 let idxPoolSt = 2
4545
4646 let idxLPAsId = 3
4747
4848 let idxAmAsId = 4
4949
5050 let idxPrAsId = 5
5151
5252 let idxAmtAsDcm = 6
5353
5454 let idxPriceAsDcm = 7
5555
5656 let idxIAmtAsId = 8
5757
5858 let idxIPriceAsId = 9
5959
6060 let idxFactStakCntr = 1
6161
6262 let idxFactoryRestCntr = 6
6363
6464 let idxFactSlippCntr = 7
6565
6666 let idxFactGwxRewCntr = 10
6767
6868 let feeDefault = fraction(10, scale8, 10000)
6969
7070 func t1 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult))
7171
7272
7373 func t1BigInt (origVal,origScaleMult) = fraction(origVal, scale18, origScaleMult)
7474
7575
7676 func f1 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18))
7777
7878
7979 func fromX18Round (val,resultScaleMult,round) = toInt(fraction(val, toBigInt(resultScaleMult), scale18, round))
8080
8181
8282 func t2 (origVal,origScaleMult) = fraction(origVal, scale18, toBigInt(origScaleMult))
8383
8484
8585 func f2 (val,resultScaleMult) = fraction(val, toBigInt(resultScaleMult), scale18)
8686
8787
8888 func ts (amt,resScale,curScale) = fraction(amt, resScale, curScale)
8989
9090
9191 func abs (val) = if ((zeroBigInt > val))
9292 then -(val)
9393 else val
9494
9595
9696 func absBigInt (val) = if ((zeroBigInt > val))
9797 then -(val)
9898 else val
9999
100100
101101 func fc () = "%s__factoryContract"
102102
103103
104104 func mpk () = "%s__managerPublicKey"
105105
106106
107107 func pmpk () = "%s__pendingManagerPublicKey"
108108
109109
110110 func pl () = "%s%s__price__last"
111111
112112
113113 func ph (h,t) = makeString(["%s%s%d%d__price__history", toString(h), toString(t)], SEP)
114114
115115
116116 func pau (ua,txId) = ((("%s%s%s__P__" + ua) + "__") + txId)
117117
118118
119119 func gau (ua,txId) = ((("%s%s%s__G__" + ua) + "__") + txId)
120120
121121
122122 func aa () = "%s__amountAsset"
123123
124124
125125 func pa () = "%s__priceAsset"
126126
127127
128128 func amp () = "%s__amp"
129129
130130
131131 func keyAmpHistory (height) = ("%s%d__amp__" + toString(height))
132132
133133
134134 func ada () = "%s__addonAddr"
135135
136136
137137 func keyChangeAmpLastCall () = "%s__changeAmpLastCall"
138138
139139
140140 let keyFee = "%s__fee"
141141
142142 let fee = valueOrElse(getInteger(this, keyFee), feeDefault)
143143
144144 let keyDLp = makeString(["%s", "dLp"], SEP)
145145
146146 let keyDLpRefreshedHeight = makeString(["%s", "dLpRefreshedHeight"], SEP)
147147
148148 let keyDLpRefreshDelay = makeString(["%s", "refreshDLpDelay"], SEP)
149149
150150 let dLpRefreshDelayDefault = 30
151151
152152 let dLpRefreshDelay = valueOrElse(getInteger(this, keyDLpRefreshDelay), dLpRefreshDelayDefault)
153153
154154 func fcfg () = "%s__factoryConfig"
155155
156156
157157 func mtpk () = "%s%s__matcher__publicKey"
158158
159159
160160 func pc (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
161161
162162
163163 func mba (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
164164
165165
166166 func aps () = "%s__shutdown"
167167
168168
169169 func keyAllowedLpStableScriptHash () = "%s__allowedLpStableScriptHash"
170170
171171
172172 func keyFeeCollectorAddress () = "%s__feeCollectorAddress"
173173
174174
175175 func keySkipOrderValidation (poolAddress) = ("%s%s__skipOrderValidation__" + poolAddress)
176176
177177
178178 func throwOrderError (orderValid,orderValidInfo,senderValid,matcherValid) = throw((((((((("order validation failed: orderValid=" + toString(orderValid)) + " (") + orderValidInfo) + ")") + " senderValid=") + toString(senderValid)) + " matcherValid=") + toString(matcherValid)))
179179
180180
181181 func strf (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
182182
183183
184184 func intf (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
185185
186186
187187 func throwErr (msg) = throw(makeString(["lp_stable.ride:", msg], " "))
188188
189189
190190 func fmtErr (msg) = makeString(["lp_stable.ride:", msg], " ")
191191
192192
193193 let fca = addressFromStringValue(strf(this, fc()))
194194
195195 let inFee = {
196196 let @ = invoke(fca, "getInFeeREADONLY", [toString(this)], nil)
197197 if ($isInstanceOf(@, "Int"))
198198 then @
199199 else throw(($getType(@) + " couldn't be cast to Int"))
200200 }
201201
202202 let outFee = {
203203 let @ = invoke(fca, "getOutFeeREADONLY", [toString(this)], nil)
204204 if ($isInstanceOf(@, "Int"))
205205 then @
206206 else throw(($getType(@) + " couldn't be cast to Int"))
207207 }
208208
209209 let A = strf(this, amp())
210210
211211 func igs () = valueOrElse(getBoolean(fca, aps()), false)
212212
213213
214214 func mp () = fromBase58String(strf(fca, mtpk()))
215215
216216
217217 let feeCollectorAddress = addressFromStringValue(strf(fca, keyFeeCollectorAddress()))
218218
219219 func gpc () = {
220220 let amtAs = strf(this, aa())
221221 let priceAs = strf(this, pa())
222222 let iPriceAs = intf(fca, mba(priceAs))
223223 let iAmtAs = intf(fca, mba(amtAs))
224224 split(strf(fca, pc(toString(iAmtAs), toString(iPriceAs))), SEP)
225225 }
226226
227227
228228 func parseAssetId (input) = if ((input == wavesString))
229229 then unit
230230 else fromBase58String(input)
231231
232232
233233 func assetIdToString (input) = if ((input == unit))
234234 then wavesString
235235 else toBase58String(value(input))
236236
237237
238238 func parsePoolConfig (poolConfig) = $Tuple9(addressFromStringValue(poolConfig[idxPoolAddress]), parseIntValue(poolConfig[idxPoolSt]), fromBase58String(poolConfig[idxLPAsId]), parseAssetId(poolConfig[idxAmAsId]), parseAssetId(poolConfig[idxPrAsId]), parseIntValue(poolConfig[idxAmtAsDcm]), parseIntValue(poolConfig[idxPriceAsDcm]), fromBase58String(poolConfig[idxIAmtAsId]), fromBase58String(poolConfig[idxIPriceAsId]))
239239
240240
241241 let poolConfigParsed = parsePoolConfig(gpc())
242242
243243 let $t081818392 = poolConfigParsed
244244
245245 let cfgPoolAddress = $t081818392._1
246246
247247 let cfgPoolStatus = $t081818392._2
248248
249249 let cfgLpAssetId = $t081818392._3
250250
251251 let cfgAmountAssetId = $t081818392._4
252252
253253 let cfgPriceAssetId = $t081818392._5
254254
255255 let cfgAmountAssetDecimals = $t081818392._6
256256
257257 let cfgPriceAssetDecimals = $t081818392._7
258258
259259 let cfgInAmountAssedId = $t081818392._8
260260
261261 let cfgInPriceAssetId = $t081818392._9
262262
263263 func gfc () = split(strf(fca, fcfg()), SEP)
264264
265265
266266 let factoryConfig = gfc()
267267
268268 let stakingContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactStakCntr]), "Invalid staking contract address")
269269
270270 let slipageContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactSlippCntr]), "Invalid slipage contract address")
271271
272272 let gwxContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactGwxRewCntr]), "Invalid gwx contract address")
273273
274274 let restContract = valueOrErrorMessage(addressFromString(factoryConfig[idxFactoryRestCntr]), "Invalid gwx contract address")
275275
276276 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)
277277
278278
279279 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)
280280
281281
282282 func getAccBalance (assetId) = if ((assetId == "WAVES"))
283283 then wavesBalance(this).available
284284 else assetBalance(this, fromBase58String(assetId))
285285
286286
287287 func cpbi (prAmtX18,amAmtX18) = fraction(prAmtX18, scale18, amAmtX18)
288288
289289
290290 func cpbir (prAmtX18,amAmtX18,round) = fraction(prAmtX18, scale18, amAmtX18, round)
291291
292292
293293 func vad (A1,A2,slippage) = {
294294 let diff = fraction((A1 - A2), scale8BigInt, A2)
295295 let pass = ((slippage - abs(diff)) > zeroBigInt)
296296 if (!(pass))
297297 then throw(("Big slpg: " + toString(diff)))
298298 else $Tuple2(pass, min([A1, A2]))
299299 }
300300
301301
302302 func vd (D1,D0,slpg) = {
303303 let diff = fraction(D0, scale8BigInt, D1)
304304 let fail = (slpg > diff)
305305 if (if (fail)
306306 then true
307307 else (D0 > D1))
308308 then throw(((((((toString(D0) + " ") + toString(D1)) + " ") + toString(diff)) + " ") + toString(slpg)))
309309 else fail
310310 }
311311
312312
313313 func pcp (amAssetDcm,prAssetDcm,amAmt,prAmt) = {
314314 let amtAsAmtX18 = t1(amAmt, amAssetDcm)
315315 let prAsAmtX18 = t1(prAmt, prAssetDcm)
316316 cpbi(prAsAmtX18, amtAsAmtX18)
317317 }
318318
319319
320320 func calcPrices (amAmt,prAmt,lpAmt) = {
321321 let amtAsDcm = cfgAmountAssetDecimals
322322 let prAsDcm = cfgPriceAssetDecimals
323323 let priceX18 = pcp(amtAsDcm, prAsDcm, amAmt, prAmt)
324324 let amAmtX18 = t1(amAmt, amtAsDcm)
325325 let prAmtX18 = t1(prAmt, prAsDcm)
326326 let lpAmtX18 = t1(lpAmt, scale8)
327327 let lpPrInAmAsX18 = cpbi(amAmtX18, lpAmtX18)
328328 let lpPrInPrAsX18 = cpbi(prAmtX18, lpAmtX18)
329329 [priceX18, lpPrInAmAsX18, lpPrInPrAsX18]
330330 }
331331
332332
333333 func calculatePrices (amAmt,prAmt,lpAmt) = {
334334 let p = calcPrices(amAmt, prAmt, lpAmt)
335335 [f1(p[0], scale8), f1(p[1], scale8), f1(p[2], scale8)]
336336 }
337337
338338
339339 func takeFee (amount,fee) = {
340340 let feeAmount = if ((fee == 0))
341341 then 0
342342 else fraction(amount, fee, scale8)
343343 $Tuple2((amount - feeAmount), feeAmount)
344344 }
345345
346346
347347 func getD (xp) = {
348348 let xp0 = xp[0]
349349 let xp1 = xp[1]
350350 let s = (xp0 + xp1)
351351 if ((s == big0))
352352 then big0
353353 else {
354354 let a = parseIntValue(A)
355355 let ann = (a * 2)
356356 let p = fraction(xp0, xp1, big1)
357357 let xp0_xp1_n_n = fraction(p, big4, big1)
358358 let ann_s = fraction(toBigInt(ann), s, big1)
359359 let ann_1 = toBigInt((ann - 1))
360360 func calcDNext (d) = {
361361 let dd = fraction(d, d, big1)
362362 let ddd = fraction(dd, d, big1)
363363 let dp = fraction(ddd, big1, xp0_xp1_n_n)
364364 fraction((ann_s + fraction(dp, big2, big1)), d, (fraction(ann_1, d, big1) + fraction(big3, dp, big1)))
365365 }
366366
367367 func calc (acc,i) = if (acc._2)
368368 then acc
369369 else {
370370 let d = acc._1
371371 let dNext = calcDNext(d)
372372 let dDiffRaw = (dNext - value(d))
373373 let dDiff = if ((big0 > dDiffRaw))
374374 then -(dDiffRaw)
375375 else dDiffRaw
376376 if ((big1 >= dDiff))
377377 then $Tuple2(dNext, true)
378378 else $Tuple2(dNext, false)
379379 }
380380
381381 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382382 let $t01287912927 = {
383383 let $l = arr
384384 let $s = size($l)
385385 let $acc0 = $Tuple2(s, false)
386386 func $f0_1 ($a,$i) = if (($i >= $s))
387387 then $a
388388 else calc($a, $l[$i])
389389
390390 func $f0_2 ($a,$i) = if (($i >= $s))
391391 then $a
392392 else throw("List size exceeds 17")
393393
394394 $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($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
395395 }
396396 let d = $t01287912927._1
397397 let found = $t01287912927._2
398398 if (found)
399399 then d
400400 else throw(("D calculation error, D = " + toString(d)))
401401 }
402402 }
403403
404404
405405 func ego (txId58,pmtAssetId,pmtLpAmt,userAddress) = {
406406 let lpId = cfgLpAssetId
407407 let amId = toBase58String(value(cfgAmountAssetId))
408408 let prId = toBase58String(value(cfgPriceAssetId))
409409 let amDcm = cfgAmountAssetDecimals
410410 let prDcm = cfgPriceAssetDecimals
411411 let sts = toString(cfgPoolStatus)
412412 let lpEmiss = valueOrErrorMessage(assetInfo(lpId), "Wrong LP id").quantity
413413 if ((toBase58String(lpId) != pmtAssetId))
414414 then throw("Wrong pmt asset")
415415 else {
416416 let amBalance = getAccBalance(amId)
417417 let amBalanceX18 = t1(amBalance, amDcm)
418418 let prBalance = getAccBalance(prId)
419419 let prBalanceX18 = t1(prBalance, prDcm)
420420 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
421421 let curPrice = f1(curPriceX18, scale8)
422422 let pmtLpAmtX18 = t1(pmtLpAmt, scale8)
423423 let lpEmissX18 = t1(lpEmiss, scale8)
424424 let outAmAmtX18 = fraction(amBalanceX18, pmtLpAmtX18, lpEmissX18)
425425 let outPrAmtX18 = fraction(prBalanceX18, pmtLpAmtX18, lpEmissX18)
426426 let outAmAmt = fromX18Round(outAmAmtX18, amDcm, FLOOR)
427427 let outPrAmt = fromX18Round(outPrAmtX18, prDcm, FLOOR)
428428 let state = if ((txId58 == ""))
429429 then nil
430430 else [ScriptTransfer(userAddress, outAmAmt, if ((amId == "WAVES"))
431431 then unit
432432 else fromBase58String(amId)), ScriptTransfer(userAddress, outPrAmt, if ((prId == "WAVES"))
433433 then unit
434434 else fromBase58String(prId)), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAmAmt, outPrAmt, pmtLpAmt, curPrice, an, lastBlock.timestamp)), IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice)]
435435 $Tuple10(outAmAmt, outPrAmt, amId, prId, amBalance, prBalance, lpEmiss, curPriceX18, sts, state)
436436 }
437437 }
438438
439439
440440 func epo (txId58,slippage,inAmAmt,inAmId,inPrAmt,inPrId,userAddress,isEval,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
441441 let lpId = cfgLpAssetId
442442 let amIdStr = toBase58String(value(cfgAmountAssetId))
443443 let prIdStr = toBase58String(value(cfgPriceAssetId))
444444 let inAmIdStr = cfgInAmountAssedId
445445 let inPrIdStr = cfgInPriceAssetId
446446 let amtDcm = cfgAmountAssetDecimals
447447 let priceDcm = cfgPriceAssetDecimals
448448 let sts = toString(cfgPoolStatus)
449449 let lpEm = valueOrErrorMessage(assetInfo(lpId), "Wr lp as").quantity
450450 let amBalance = if (isEval)
451451 then getAccBalance(amIdStr)
452452 else if (if (isOneAsset)
453453 then (pmtId == amIdStr)
454454 else false)
455455 then (getAccBalance(amIdStr) - pmtAmt)
456456 else if (isOneAsset)
457457 then getAccBalance(amIdStr)
458458 else (getAccBalance(amIdStr) - inAmAmt)
459459 let prBalance = if (isEval)
460460 then getAccBalance(prIdStr)
461461 else if (if (isOneAsset)
462462 then (pmtId == prIdStr)
463463 else false)
464464 then (getAccBalance(prIdStr) - pmtAmt)
465465 else if (isOneAsset)
466466 then getAccBalance(prIdStr)
467467 else (getAccBalance(prIdStr) - inPrAmt)
468468 let inAmAssetAmtX18 = t1(inAmAmt, amtDcm)
469469 let inPrAssetAmtX18 = t1(inPrAmt, priceDcm)
470470 let userPriceX18 = cpbi(inPrAssetAmtX18, inAmAssetAmtX18)
471471 let amBalanceX18 = t1(amBalance, amtDcm)
472472 let prBalanceX18 = t1(prBalance, priceDcm)
473473 let D0 = getD([amBalanceX18, prBalanceX18])
474474 let r = if ((lpEm == 0))
475475 then {
476476 let D1 = getD([(amBalanceX18 + inAmAssetAmtX18), (prBalanceX18 + inPrAssetAmtX18)])
477477 let checkD = if ((D1 > D0))
478478 then true
479479 else throw("D1 should be greater than D0")
480480 if ((checkD == checkD))
481481 then {
482482 let curPriceX18 = zeroBigInt
483483 let slippageX18 = zeroBigInt
484484 let lpAmtX18 = D1
485485 $Tuple5(f1(lpAmtX18, scale8), f1(inAmAssetAmtX18, amtDcm), f1(inPrAssetAmtX18, priceDcm), cpbi((prBalanceX18 + inPrAssetAmtX18), (amBalanceX18 + inAmAssetAmtX18)), slippageX18)
486486 }
487487 else throw("Strict value is not equal to itself.")
488488 }
489489 else {
490490 let curPriceX18 = cpbi(prBalanceX18, amBalanceX18)
491491 let slippageRealX18 = fraction(abs((curPriceX18 - userPriceX18)), scale18, curPriceX18)
492492 let slippageX18 = t1(slippage, scale8)
493493 if (if (if (validateSlippage)
494494 then (curPriceX18 != zeroBigInt)
495495 else false)
496496 then (slippageRealX18 > slippageX18)
497497 else false)
498498 then throw(((("Price slippage " + toString(slippageRealX18)) + " > ") + toString(slippageX18)))
499499 else {
500500 let lpEmissionX18 = t1(lpEm, scale8)
501501 let prViaAmX18 = fraction(inAmAssetAmtX18, cpbir(prBalanceX18, amBalanceX18, CEILING), scale18, CEILING)
502502 let amViaPrX18 = fraction(inPrAssetAmtX18, scale18, cpbir(prBalanceX18, amBalanceX18, FLOOR), CEILING)
503503 let expectedAmts = if ((prViaAmX18 > inPrAssetAmtX18))
504504 then $Tuple2(amViaPrX18, inPrAssetAmtX18)
505505 else $Tuple2(inAmAssetAmtX18, prViaAmX18)
506506 let expAmtAssetAmtX18 = expectedAmts._1
507507 let expPriceAssetAmtX18 = expectedAmts._2
508508 let D1 = getD([(amBalanceX18 + expAmtAssetAmtX18), (prBalanceX18 + expPriceAssetAmtX18)])
509509 let checkD = if ((D1 > D0))
510510 then true
511511 else throw("D1 should be greater than D0")
512512 if ((checkD == checkD))
513513 then {
514514 let lpAmtX18 = fraction(lpEmissionX18, (D1 - D0), D0)
515515 $Tuple5(fromX18Round(lpAmtX18, scale8, FLOOR), fromX18Round(expAmtAssetAmtX18, amtDcm, CEILING), fromX18Round(expPriceAssetAmtX18, priceDcm, CEILING), curPriceX18, slippageX18)
516516 }
517517 else throw("Strict value is not equal to itself.")
518518 }
519519 }
520520 let calcLpAmt = r._1
521521 let calcAmAssetPmt = r._2
522522 let calcPrAssetPmt = r._3
523523 let curPrice = f1(r._4, scale8)
524524 let slippageCalc = f1(r._5, scale8)
525525 if ((0 >= calcLpAmt))
526526 then throw("LP <= 0")
527527 else {
528528 let emitLpAmt = if (!(emitLp))
529529 then 0
530530 else calcLpAmt
531531 let amDiff = (inAmAmt - calcAmAssetPmt)
532532 let prDiff = (inPrAmt - calcPrAssetPmt)
533533 let $t01991220105 = if (if (isOneAsset)
534534 then (pmtId == amIdStr)
535535 else false)
536536 then $Tuple2(pmtAmt, 0)
537537 else if (if (isOneAsset)
538538 then (pmtId == prIdStr)
539539 else false)
540540 then $Tuple2(0, pmtAmt)
541541 else $Tuple2(calcAmAssetPmt, calcPrAssetPmt)
542542 let writeAmAmt = $t01991220105._1
543543 let writePrAmt = $t01991220105._2
544544 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId58), dataPutActionInfo(writeAmAmt, writePrAmt, emitLpAmt, curPrice, slippage, slippageCalc, an, lastBlock.timestamp, amDiff, prDiff))]
545545 $Tuple13(calcLpAmt, emitLpAmt, curPrice, amBalance, prBalance, lpEm, lpId, sts, commonState, amDiff, prDiff, inAmId, inPrId)
546546 }
547547 }
548548
549549
550550 func getYD (xp,i,D) = {
551551 let n = big2
552552 let x = xp[if ((i == 0))
553553 then 1
554554 else 0]
555555 let aPrecision = parseBigIntValue(Amult)
556556 let a = (parseBigIntValue(A) * aPrecision)
557557 let s = x
558558 let ann = (a * n)
559559 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
560560 let b = ((s + ((D * aPrecision) / ann)) - D)
561561 func calc (acc,cur) = {
562562 let $t02129621316 = acc
563563 let y = $t02129621316._1
564564 let found = $t02129621316._2
565565 if ((found != unit))
566566 then acc
567567 else {
568568 let yNext = (((y * y) + c) / ((big2 * y) + b))
569569 let yDiff = absBigInt((yNext - value(y)))
570570 if ((big1 >= yDiff))
571571 then $Tuple2(yNext, cur)
572572 else $Tuple2(yNext, unit)
573573 }
574574 }
575575
576576 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
577577 let $t02162321670 = {
578578 let $l = arr
579579 let $s = size($l)
580580 let $acc0 = $Tuple2(D, unit)
581581 func $f0_1 ($a,$i) = if (($i >= $s))
582582 then $a
583583 else calc($a, $l[$i])
584584
585585 func $f0_2 ($a,$i) = if (($i >= $s))
586586 then $a
587587 else throw("List size exceeds 15")
588588
589589 $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)
590590 }
591591 let y = $t02162321670._1
592592 let found = $t02162321670._2
593593 if ((found != unit))
594594 then y
595595 else throw(("Y calculation error, Y = " + toString(y)))
596596 }
597597
598598
599599 func calcDLp (amountBalance,priceBalance,lpEmission) = {
600600 let updatedDLp = fraction(getD([t1BigInt(amountBalance, toBigInt(cfgAmountAssetDecimals)), t1BigInt(priceBalance, toBigInt(cfgPriceAssetDecimals))]), scale18, lpEmission)
601601 if ((lpEmission == big0))
602602 then big0
603603 else updatedDLp
604604 }
605605
606606
607607 func calcCurrentDLp (amountAssetDelta,priceAssetDelta,lpAssetEmissionDelta) = {
608608 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amountAssetDelta)
609609 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - priceAssetDelta)
610610 let lpAssetEmission = (toBigInt(value(assetInfo(cfgLpAssetId)).quantity) - lpAssetEmissionDelta)
611611 let currentDLp = calcDLp(amountAssetBalance, priceAssetBalance, lpAssetEmission)
612612 currentDLp
613613 }
614614
615615
616616 func refreshDLpInternal (amountAssetBalanceDelta,priceAssetBalanceDelta,lpAssetEmissionDelta) = {
617617 let amountAssetBalance = (getAccBalance(assetIdToString(cfgAmountAssetId)) + amountAssetBalanceDelta)
618618 let priceAssetBalance = (getAccBalance(assetIdToString(cfgPriceAssetId)) + priceAssetBalanceDelta)
619619 let lpAssetEmission = (value(assetInfo(cfgLpAssetId)).quantity + lpAssetEmissionDelta)
620620 let updatedDLp = calcDLp(toBigInt(amountAssetBalance), toBigInt(priceAssetBalance), toBigInt(lpAssetEmission))
621621 let actions = [IntegerEntry(keyDLpRefreshedHeight, an), StringEntry(keyDLp, toString(updatedDLp))]
622622 $Tuple2(actions, updatedDLp)
623623 }
624624
625625
626626 func validateUpdatedDLp (oldDLp,updatedDLp) = if ((updatedDLp >= oldDLp))
627627 then true
628628 else throwErr("updated DLp lower than current DLp")
629629
630630
631631 func validateMatcherOrderAllowed (order) = {
632632 let amountAssetBalance = getAccBalance(assetIdToString(cfgAmountAssetId))
633633 let priceAssetBalance = getAccBalance(assetIdToString(cfgPriceAssetId))
634634 let amountAssetAmount = order.amount
635635 let priceAssetAmount = fraction(order.amount, order.price, scale8, FLOOR)
636636 let $t02386824080 = if ((order.orderType == Buy))
637637 then $Tuple2(amountAssetAmount, -(priceAssetAmount))
638638 else $Tuple2(-(amountAssetAmount), priceAssetAmount)
639639 let amountAssetBalanceDelta = $t02386824080._1
640640 let priceAssetBalanceDelta = $t02386824080._2
641641 if (if (if (igs())
642642 then true
643643 else (cfgPoolStatus == PoolMatcherDis))
644644 then true
645645 else (cfgPoolStatus == PoolShutdown))
646646 then throw("Admin blocked")
647647 else if (if ((order.assetPair.amountAsset != cfgAmountAssetId))
648648 then true
649649 else (order.assetPair.priceAsset != cfgPriceAssetId))
650650 then throw("Wr assets")
651651 else {
652652 let dLp = parseBigIntValue(valueOrElse(getString(this, keyDLp), "0"))
653653 let $t02442624526 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
654654 let unusedActions = $t02442624526._1
655655 let dLpNew = $t02442624526._2
656656 let isOrderValid = (dLpNew >= dLp)
657657 let info = makeString(["dLp=", toString(dLp), " dLpNew=", toString(dLpNew), " amountAssetBalance=", toString(amountAssetBalance), " priceAssetBalance=", toString(priceAssetBalance), " amountAssetBalanceDelta=", toString(amountAssetBalanceDelta), " priceAssetBalanceDelta=", toString(priceAssetBalanceDelta), " height=", toString(an)], "")
658658 $Tuple2(isOrderValid, info)
659659 }
660660 }
661661
662662
663663 func cg (i) = if ((size(i.payments) != 1))
664664 then throw("1 pmnt exp")
665665 else {
666666 let pmt = value(i.payments[0])
667667 let pmtAssetId = value(pmt.assetId)
668668 let pmtAmt = pmt.amount
669669 let r = ego(toBase58String(i.transactionId), toBase58String(pmtAssetId), pmtAmt, i.caller)
670670 let outAmAmt = r._1
671671 let outPrAmt = r._2
672672 let sts = parseIntValue(r._9)
673673 let state = r._10
674674 if (if (igs())
675675 then true
676676 else (sts == PoolShutdown))
677677 then throw(("Admin blocked: " + toString(sts)))
678678 else $Tuple5(outAmAmt, outPrAmt, pmtAmt, pmtAssetId, state)
679679 }
680680
681681
682682 func cp (caller,txId,amAsPmt,prAsPmt,slippage,emitLp,isOneAsset,validateSlippage,pmtAmt,pmtId) = {
683683 let r = epo(txId, slippage, value(amAsPmt).amount, value(amAsPmt).assetId, value(prAsPmt).amount, value(prAsPmt).assetId, caller, (txId == ""), emitLp, isOneAsset, validateSlippage, pmtAmt, pmtId)
684684 let sts = parseIntValue(r._8)
685685 if (if (if (igs())
686686 then true
687687 else (sts == PoolPutDis))
688688 then true
689689 else (sts == PoolShutdown))
690690 then throw(("Blocked:" + toString(sts)))
691691 else r
692692 }
693693
694694
695695 func calcPutOneTkn (pmtAmtRaw,pmtAssetId,userAddress,txId,withTakeFee) = {
696696 let amId = toBase58String(value(cfgAmountAssetId))
697697 let prId = toBase58String(value(cfgPriceAssetId))
698698 let lpId = cfgLpAssetId
699699 let amtDcm = cfgAmountAssetDecimals
700700 let priceDcm = cfgPriceAssetDecimals
701701 let lpAssetEmission = toBigInt(valueOrErrorMessage(assetInfo(lpId), "invalid lp asset").quantity)
702702 let chechEmission = if ((lpAssetEmission > big0))
703703 then true
704704 else throw("initial deposit requires all coins")
705705 if ((chechEmission == chechEmission))
706706 then {
707707 let amBalance = getAccBalance(amId)
708708 let prBalance = getAccBalance(prId)
709709 let $t02687427318 = if ((txId == ""))
710710 then $Tuple2(amBalance, prBalance)
711711 else if ((pmtAssetId == amId))
712712 then if ((pmtAmtRaw > amBalance))
713713 then throw("invalid payment amount")
714714 else $Tuple2((amBalance - pmtAmtRaw), prBalance)
715715 else if ((pmtAssetId == prId))
716716 then if ((pmtAmtRaw > prBalance))
717717 then throw("invalid payment amount")
718718 else $Tuple2(amBalance, (prBalance - pmtAmtRaw))
719719 else throw("wrong pmtAssetId")
720720 let amBalanceOld = $t02687427318._1
721721 let prBalanceOld = $t02687427318._2
722722 let $t02732227498 = if ((pmtAssetId == amId))
723723 then $Tuple2(pmtAmtRaw, 0)
724724 else if ((pmtAssetId == prId))
725725 then $Tuple2(0, pmtAmtRaw)
726726 else throw("invalid payment")
727727 let amAmountRaw = $t02732227498._1
728728 let prAmountRaw = $t02732227498._2
729729 let $t02750227756 = if (withTakeFee)
730730 then $Tuple3(takeFee(amAmountRaw, inFee)._1, takeFee(prAmountRaw, inFee)._1, takeFee(pmtAmtRaw, inFee)._2)
731731 else $Tuple3(amAmountRaw, prAmountRaw, 0)
732732 let amAmount = $t02750227756._1
733733 let prAmount = $t02750227756._2
734734 let feeAmount = $t02750227756._3
735735 let amBalanceNew = (amBalanceOld + amAmount)
736736 let prBalanceNew = (prBalanceOld + prAmount)
737737 let D0 = getD([t1(amBalanceOld, cfgAmountAssetDecimals), t1(prBalanceOld, cfgPriceAssetDecimals)])
738738 let D1 = getD([t1(amBalanceNew, cfgAmountAssetDecimals), t1(prBalanceNew, cfgPriceAssetDecimals)])
739739 let checkD = if ((D1 > D0))
740740 then true
741741 else throw()
742742 if ((checkD == checkD))
743743 then {
744744 let lpAmount = fraction(lpAssetEmission, (D1 - D0), D0, FLOOR)
745745 let curPrice = f1(cpbi(t1(prBalanceNew, priceDcm), t1(amBalanceNew, amtDcm)), scale8)
746746 let commonState = [IntegerEntry(pl(), curPrice), IntegerEntry(ph(an, lastBlock.timestamp), curPrice), StringEntry(pau(userAddress, txId), dataPutActionInfo(amAmountRaw, prAmountRaw, toInt(lpAmount), curPrice, 0, 0, an, lastBlock.timestamp, 0, 0))]
747747 let poolProportion = fraction(prBalanceOld, scale8, amBalanceOld)
748748 let amountAssetPart = fraction(pmtAmtRaw, scale8, (poolProportion + scale8))
749749 let priceAssetPart = (pmtAmtRaw - amountAssetPart)
750750 let lpAmtBoth = fraction(lpAssetEmission, toBigInt(priceAssetPart), toBigInt(prBalanceOld))
751751 let bonus = toInt(fraction((lpAmount - lpAmtBoth), scale8BigInt, lpAmtBoth))
752752 $Tuple4(toInt(lpAmount), commonState, feeAmount, bonus)
753753 }
754754 else throw("Strict value is not equal to itself.")
755755 }
756756 else throw("Strict value is not equal to itself.")
757757 }
758758
759759
760760 func getOneTknV2Internal (outAssetId,minOutAmount,payments,caller,originCaller,transactionId) = {
761761 let lpId = toBase58String(value(cfgLpAssetId))
762762 let amId = toBase58String(value(cfgAmountAssetId))
763763 let prId = toBase58String(value(cfgPriceAssetId))
764764 let amDecimals = cfgAmountAssetDecimals
765765 let prDecimals = cfgPriceAssetDecimals
766766 let poolStatus = cfgPoolStatus
767767 let userAddress = if ((caller == restContract))
768768 then originCaller
769769 else caller
770770 let pmt = value(payments[0])
771771 let pmtAssetId = value(pmt.assetId)
772772 let pmtAmt = pmt.amount
773773 let currentDLp = calcCurrentDLp(big0, big0, big0)
774774 if ((currentDLp == currentDLp))
775775 then {
776776 let txId58 = toBase58String(transactionId)
777777 if ((lpId != toBase58String(pmtAssetId)))
778778 then throw("Wrong LP")
779779 else {
780780 let amBalance = getAccBalance(amId)
781781 let prBalance = getAccBalance(prId)
782782 let $t02987229983 = {
783783 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, pmtAmt], nil)
784784 if ($isInstanceOf(@, "(Int, Int)"))
785785 then @
786786 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
787787 }
788788 if (($t02987229983 == $t02987229983))
789789 then {
790790 let feeAmount = $t02987229983._2
791791 let totalGet = $t02987229983._1
792792 let totalAmount = if (if ((minOutAmount > 0))
793793 then (minOutAmount > totalGet)
794794 else false)
795795 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
796796 else totalGet
797797 let $t03018130500 = if ((outAssetId == amId))
798798 then $Tuple4(totalAmount, 0, ((amBalance - totalAmount) - feeAmount), prBalance)
799799 else if ((outAssetId == prId))
800800 then $Tuple4(0, totalAmount, amBalance, ((prBalance - totalAmount) - feeAmount))
801801 else throw("invalid out asset id")
802802 let outAm = $t03018130500._1
803803 let outPr = $t03018130500._2
804804 let amBalanceNew = $t03018130500._3
805805 let prBalanceNew = $t03018130500._4
806806 let curPrX18 = cpbi(t1(prBalanceNew, prDecimals), t1(amBalanceNew, amDecimals))
807807 let curPr = f1(curPrX18, scale8)
808808 let outAssetIdOrWaves = if ((outAssetId == "WAVES"))
809809 then unit
810810 else fromBase58String(outAssetId)
811811 let sendFeeToMatcher = if ((feeAmount > 0))
812812 then [ScriptTransfer(feeCollectorAddress, feeAmount, outAssetIdOrWaves)]
813813 else nil
814814 let state = ([ScriptTransfer(userAddress, totalAmount, outAssetIdOrWaves), StringEntry(gau(toString(userAddress), txId58), dataGetActionInfo(outAm, outPr, pmtAmt, curPr, an, lastBlock.timestamp)), IntegerEntry(pl(), curPr), IntegerEntry(ph(an, lastBlock.timestamp), curPr)] ++ sendFeeToMatcher)
815815 if ((state == state))
816816 then {
817817 let burn = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
818818 if ((burn == burn))
819819 then {
820820 let $t03131531673 = {
821821 let feeAmountForCalc = if ((this == feeCollectorAddress))
822822 then 0
823823 else feeAmount
824824 let outInAmountAsset = if ((parseAssetId(outAssetId) == cfgAmountAssetId))
825825 then true
826826 else false
827827 if (outInAmountAsset)
828828 then $Tuple2(-((totalGet + feeAmountForCalc)), 0)
829829 else $Tuple2(0, -((totalGet + feeAmountForCalc)))
830830 }
831831 let amountAssetBalanceDelta = $t03131531673._1
832832 let priceAssetBalanceDelta = $t03131531673._2
833833 let $t03167831786 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
834834 let refreshDLpActions = $t03167831786._1
835835 let updatedDLp = $t03167831786._2
836836 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
837837 if ((isUpdatedDLpValid == isUpdatedDLpValid))
838838 then $Tuple2((state ++ refreshDLpActions), totalAmount)
839839 else throw("Strict value is not equal to itself.")
840840 }
841841 else throw("Strict value is not equal to itself.")
842842 }
843843 else throw("Strict value is not equal to itself.")
844844 }
845845 else throw("Strict value is not equal to itself.")
846846 }
847847 }
848848 else throw("Strict value is not equal to itself.")
849849 }
850850
851851
852852 func m () = match getString(mpk()) {
853853 case s: String =>
854854 fromBase58String(s)
855855 case _: Unit =>
856856 unit
857857 case _ =>
858858 throw("Match error")
859859 }
860860
861861
862862 func pm () = match getString(pmpk()) {
863863 case s: String =>
864864 fromBase58String(s)
865865 case _: Unit =>
866866 unit
867867 case _ =>
868868 throw("Match error")
869869 }
870870
871871
872872 let pd = throw("Permission denied")
873873
874874 func isManager (i) = match m() {
875875 case pk: ByteVector =>
876876 (i.callerPublicKey == pk)
877877 case _: Unit =>
878878 (i.caller == this)
879879 case _ =>
880880 throw("Match error")
881881 }
882882
883883
884884 func mm (i) = match m() {
885885 case pk: ByteVector =>
886886 if ((i.callerPublicKey == pk))
887887 then true
888888 else pd
889889 case _: Unit =>
890890 if ((i.caller == this))
891891 then true
892892 else pd
893893 case _ =>
894894 throw("Match error")
895895 }
896896
897897
898898 func getY (isReverse,D,poolAmountInBalance) = {
899899 let poolConfig = gpc()
900900 let amId = poolConfig[idxAmAsId]
901901 let prId = poolConfig[idxPrAsId]
902902 let n = big2
903903 let aPrecision = parseBigIntValue(Amult)
904904 let a = (parseBigIntValue(A) * aPrecision)
905905 let xp = if ((isReverse == false))
906906 then [(toBigInt(getAccBalance(amId)) + poolAmountInBalance), toBigInt(getAccBalance(prId))]
907907 else [(toBigInt(getAccBalance(prId)) + poolAmountInBalance), toBigInt(getAccBalance(amId))]
908908 let x = xp[0]
909909 let s = x
910910 let ann = (a * n)
911911 let c = (((((D * D) / (x * n)) * D) * aPrecision) / (ann * n))
912912 let b = ((s + ((D * aPrecision) / ann)) - D)
913913 func calc (acc,cur) = {
914914 let $t03323433254 = acc
915915 let y = $t03323433254._1
916916 let found = $t03323433254._2
917917 if ((found != unit))
918918 then acc
919919 else {
920920 let yNext = (((y * y) + c) / ((big2 * y) + b))
921921 let yDiff = absBigInt((yNext - value(y)))
922922 if ((big1 >= yDiff))
923923 then $Tuple2(yNext, cur)
924924 else $Tuple2(yNext, unit)
925925 }
926926 }
927927
928928 let arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
929929 let $t03356133608 = {
930930 let $l = arr
931931 let $s = size($l)
932932 let $acc0 = $Tuple2(D, unit)
933933 func $f0_1 ($a,$i) = if (($i >= $s))
934934 then $a
935935 else calc($a, $l[$i])
936936
937937 func $f0_2 ($a,$i) = if (($i >= $s))
938938 then $a
939939 else throw("List size exceeds 15")
940940
941941 $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)
942942 }
943943 let y = $t03356133608._1
944944 let found = $t03356133608._2
945945 if ((found != unit))
946946 then y
947947 else throw(("Y calculation error, Y = " + toString(y)))
948948 }
949949
950950
951951 func skipOrderValidation () = valueOrElse(getBoolean(fca, keySkipOrderValidation(toString(this))), false)
952952
953953
954954 @Callable(i)
955955 func calculateAmountOutForSwapREADONLY (cleanAmountIn,isReverse,feePoolAmount) = {
956956 let $t03394934372 = if ((isReverse == false))
957957 then {
958958 let assetOut = strf(this, pa())
959959 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, aa()))) + toBigInt(cleanAmountIn))
960960 $Tuple2(assetOut, poolAmountInBalance)
961961 }
962962 else {
963963 let assetOut = strf(this, aa())
964964 let poolAmountInBalance = (toBigInt(getAccBalance(strf(this, pa()))) + toBigInt(cleanAmountIn))
965965 $Tuple2(assetOut, poolAmountInBalance)
966966 }
967967 let assetOut = $t03394934372._1
968968 let poolAmountInBalance = $t03394934372._2
969969 let poolConfig = gpc()
970970 let amId = poolConfig[idxAmAsId]
971971 let prId = poolConfig[idxPrAsId]
972972 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
973973 let D = getD(xp)
974974 let y = getY(isReverse, D, toBigInt(cleanAmountIn))
975975 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
976976 let totalGetRaw = max([0, toInt(dy)])
977977 let newXp = if ((isReverse == false))
978978 then [((toBigInt(getAccBalance(amId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
979979 else [(toBigInt(getAccBalance(amId)) - dy), ((toBigInt(getAccBalance(prId)) + toBigInt(cleanAmountIn)) + toBigInt(feePoolAmount))]
980980 let newD = getD(newXp)
981981 let checkD = if ((newD >= D))
982982 then true
983983 else throw(makeString(["new D is fewer error", toString(D), toString(newD)], "__"))
984984 if ((checkD == checkD))
985985 then $Tuple2(nil, totalGetRaw)
986986 else throw("Strict value is not equal to itself.")
987987 }
988988
989989
990990
991991 @Callable(i)
992992 func calculateAmountOutForSwapAndSendTokens (cleanAmountIn,isReverse,amountOutMin,addressTo,feePoolAmount) = {
993993 let swapContact = {
994994 let @ = invoke(fca, "getSwapContractREADONLY", nil, nil)
995995 if ($isInstanceOf(@, "String"))
996996 then @
997997 else throw(($getType(@) + " couldn't be cast to String"))
998998 }
999999 let checks = [if ((value(i.payments[0]).amount >= cleanAmountIn))
10001000 then true
10011001 else throwErr("Wrong amount"), if ((i.caller == addressFromStringValue(swapContact)))
10021002 then true
10031003 else throwErr("Permission denied")]
10041004 if ((checks == checks))
10051005 then {
10061006 let pmt = value(i.payments[0])
10071007 let assetIn = assetIdToString(pmt.assetId)
10081008 let $t03580136194 = if ((isReverse == false))
10091009 then {
10101010 let assetOut = strf(this, pa())
10111011 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10121012 $Tuple2(assetOut, poolAmountInBalance)
10131013 }
10141014 else {
10151015 let assetOut = strf(this, aa())
10161016 let poolAmountInBalance = (getAccBalance(assetIn) - value(i.payments[0]).amount)
10171017 $Tuple2(assetOut, poolAmountInBalance)
10181018 }
10191019 let assetOut = $t03580136194._1
10201020 let poolAmountInBalance = $t03580136194._2
10211021 let poolConfig = gpc()
10221022 let amId = poolConfig[idxAmAsId]
10231023 let prId = poolConfig[idxPrAsId]
10241024 let xp = if ((isReverse == false))
10251025 then [(toBigInt(getAccBalance(amId)) - toBigInt(value(i.payments[0]).amount)), toBigInt(getAccBalance(prId))]
10261026 else [toBigInt(getAccBalance(amId)), (toBigInt(getAccBalance(prId)) - toBigInt(value(i.payments[0]).amount))]
10271027 let D = getD(xp)
10281028 let y = getY(isReverse, D, toBigInt(0))
10291029 let dy = ((toBigInt(getAccBalance(assetOut)) - y) - toBigInt(1))
10301030 let totalGetRaw = max([0, toInt(dy)])
10311031 let checkMin = if ((totalGetRaw >= amountOutMin))
10321032 then true
10331033 else throw("Exchange result is fewer coins than expected")
10341034 if ((checkMin == checkMin))
10351035 then {
10361036 let newXp = if ((isReverse == false))
10371037 then [(toBigInt(getAccBalance(amId)) + toBigInt(feePoolAmount)), (toBigInt(getAccBalance(prId)) - dy)]
10381038 else [(toBigInt(getAccBalance(amId)) - dy), (toBigInt(getAccBalance(prId)) + toBigInt(feePoolAmount))]
10391039 let newD = getD(newXp)
10401040 let checkD = if ((newD >= D))
10411041 then true
10421042 else throw("new D is fewer error")
10431043 if ((checkD == checkD))
10441044 then $Tuple2([ScriptTransfer(addressFromStringValue(addressTo), totalGetRaw, parseAssetId(assetOut))], totalGetRaw)
10451045 else throw("Strict value is not equal to itself.")
10461046 }
10471047 else throw("Strict value is not equal to itself.")
10481048 }
10491049 else throw("Strict value is not equal to itself.")
10501050 }
10511051
10521052
10531053
10541054 @Callable(i)
10551055 func constructor (fc) = {
10561056 let c = mm(i)
10571057 if ((c == c))
10581058 then [StringEntry(fc(), fc)]
10591059 else throw("Strict value is not equal to itself.")
10601060 }
10611061
10621062
10631063
10641064 @Callable(i)
10651065 func setManager (pendingManagerPublicKey) = {
10661066 let c = mm(i)
10671067 if ((c == c))
10681068 then {
10691069 let cm = fromBase58String(pendingManagerPublicKey)
10701070 if ((cm == cm))
10711071 then [StringEntry(pmpk(), pendingManagerPublicKey)]
10721072 else throw("Strict value is not equal to itself.")
10731073 }
10741074 else throw("Strict value is not equal to itself.")
10751075 }
10761076
10771077
10781078
10791079 @Callable(i)
10801080 func confirmManager () = {
10811081 let p = pm()
10821082 let hpm = if (isDefined(p))
10831083 then true
10841084 else throw("No pending manager")
10851085 if ((hpm == hpm))
10861086 then {
10871087 let cpm = if ((i.callerPublicKey == value(p)))
10881088 then true
10891089 else throw("You are not pending manager")
10901090 if ((cpm == cpm))
10911091 then [StringEntry(mpk(), toBase58String(value(p))), DeleteEntry(pmpk())]
10921092 else throw("Strict value is not equal to itself.")
10931093 }
10941094 else throw("Strict value is not equal to itself.")
10951095 }
10961096
10971097
10981098
10991099 @Callable(i)
11001100 func put (slip,autoStake) = {
11011101 let factCfg = gfc()
11021102 let stakingCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactStakCntr]), "Wr st addr")
11031103 let slipCntr = valueOrErrorMessage(addressFromString(factCfg[idxFactSlippCntr]), "Wr sl addr")
11041104 if ((0 > slip))
11051105 then throw("Wrong slippage")
11061106 else if ((size(i.payments) != 2))
11071107 then throw("2 pmnts expd")
11081108 else {
11091109 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
11101110 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
11111111 let amountAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgAmountAssetId))) - amAssetPmt)
11121112 if ((amountAssetBalance == amountAssetBalance))
11131113 then {
11141114 let priceAssetBalance = (toBigInt(getAccBalance(assetIdToString(cfgPriceAssetId))) - prAssetPmt)
11151115 if ((priceAssetBalance == priceAssetBalance))
11161116 then {
11171117 let lpAssetEmission = toBigInt(value(assetInfo(cfgLpAssetId)).quantity)
11181118 if ((lpAssetEmission == lpAssetEmission))
11191119 then {
11201120 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
11211121 if ((currentDLp == currentDLp))
11221122 then {
11231123 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, "")
11241124 let emitLpAmt = e._2
11251125 let lpAssetId = e._7
11261126 let state = e._9
11271127 let amDiff = e._10
11281128 let prDiff = e._11
11291129 let amId = e._12
11301130 let prId = e._13
11311131 let r = invoke(fca, "emit", [emitLpAmt], nil)
11321132 if ((r == r))
11331133 then {
11341134 let el = match r {
11351135 case legacy: Address =>
11361136 invoke(legacy, "emit", [emitLpAmt], nil)
11371137 case _ =>
11381138 unit
11391139 }
11401140 if ((el == el))
11411141 then {
11421142 let sa = if ((amDiff > 0))
11431143 then invoke(slipCntr, "put", nil, [AttachedPayment(amId, amDiff)])
11441144 else nil
11451145 if ((sa == sa))
11461146 then {
11471147 let sp = if ((prDiff > 0))
11481148 then invoke(slipCntr, "put", nil, [AttachedPayment(prId, prDiff)])
11491149 else nil
11501150 if ((sp == sp))
11511151 then {
11521152 let lpTrnsfr = if (autoStake)
11531153 then {
11541154 let ss = invoke(stakingCntr, "stake", nil, [AttachedPayment(lpAssetId, emitLpAmt)])
11551155 if ((ss == ss))
11561156 then nil
11571157 else throw("Strict value is not equal to itself.")
11581158 }
11591159 else [ScriptTransfer(i.caller, emitLpAmt, lpAssetId)]
11601160 let $t04059340735 = refreshDLpInternal(0, 0, 0)
11611161 let refreshDLpActions = $t04059340735._1
11621162 let updatedDLp = $t04059340735._2
11631163 let check = if ((updatedDLp >= currentDLp))
11641164 then true
11651165 else throwErr(makeString(["updated DLp lower than current DLp", toString(amountAssetBalance), toString(priceAssetBalance), toString(lpAssetEmission), toString(currentDLp), toString(updatedDLp), toString(amDiff), toString(prDiff)], " "))
11661166 if ((check == check))
11671167 then {
11681168 let lpAssetEmissionAfter = value(assetInfo(cfgLpAssetId)).quantity
11691169 if ((lpAssetEmissionAfter == lpAssetEmissionAfter))
11701170 then ((state ++ lpTrnsfr) ++ refreshDLpActions)
11711171 else throw("Strict value is not equal to itself.")
11721172 }
11731173 else throw("Strict value is not equal to itself.")
11741174 }
11751175 else throw("Strict value is not equal to itself.")
11761176 }
11771177 else throw("Strict value is not equal to itself.")
11781178 }
11791179 else throw("Strict value is not equal to itself.")
11801180 }
11811181 else throw("Strict value is not equal to itself.")
11821182 }
11831183 else throw("Strict value is not equal to itself.")
11841184 }
11851185 else throw("Strict value is not equal to itself.")
11861186 }
11871187 else throw("Strict value is not equal to itself.")
11881188 }
11891189 else throw("Strict value is not equal to itself.")
11901190 }
11911191 }
11921192
11931193
11941194
11951195 @Callable(i)
11961196 func putOneTknV2 (minOutAmount,autoStake) = {
11971197 let isPoolOneTokenOperationsDisabled = {
11981198 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
11991199 if ($isInstanceOf(@, "Boolean"))
12001200 then @
12011201 else throw(($getType(@) + " couldn't be cast to Boolean"))
12021202 }
12031203 let isPutDisabled = if (if (if (igs())
12041204 then true
12051205 else (cfgPoolStatus == PoolPutDis))
12061206 then true
12071207 else (cfgPoolStatus == PoolShutdown))
12081208 then true
12091209 else isPoolOneTokenOperationsDisabled
12101210 let checks = [if (if (!(isPutDisabled))
12111211 then true
12121212 else isManager(i))
12131213 then true
12141214 else throwErr("put operation is blocked by admin"), if ((size(i.payments) == 1))
12151215 then true
12161216 else throwErr("exactly 1 payment are expected")]
12171217 if ((checks == checks))
12181218 then {
12191219 let amId = toBase58String(value(cfgAmountAssetId))
12201220 let prId = toBase58String(value(cfgPriceAssetId))
12211221 let lpId = cfgLpAssetId
12221222 let amDecimals = cfgAmountAssetDecimals
12231223 let prDecimals = cfgPriceAssetDecimals
12241224 let userAddress = if ((i.caller == this))
12251225 then i.originCaller
12261226 else i.caller
12271227 let pmt = value(i.payments[0])
12281228 let pmtAssetId = toBase58String(value(pmt.assetId))
12291229 let pmtAmt = pmt.amount
12301230 let currentDLp = if ((pmt.assetId == cfgAmountAssetId))
12311231 then calcCurrentDLp(toBigInt(pmtAmt), toBigInt(0), toBigInt(0))
12321232 else calcCurrentDLp(toBigInt(0), toBigInt(pmtAmt), toBigInt(0))
12331233 if ((currentDLp == currentDLp))
12341234 then {
12351235 let $t04237642534 = calcPutOneTkn(pmtAmt, pmtAssetId, toString(userAddress), toBase58String(i.transactionId), true)
12361236 if (($t04237642534 == $t04237642534))
12371237 then {
12381238 let feeAmount = $t04237642534._3
12391239 let state = $t04237642534._2
12401240 let estimLP = $t04237642534._1
12411241 let emitLpAmt = if (if ((minOutAmount > 0))
12421242 then (minOutAmount > estimLP)
12431243 else false)
12441244 then throwErr(makeString(["amount to receive is less than ", toString(minOutAmount)], ""))
12451245 else estimLP
12461246 let e = invoke(fca, "emit", [emitLpAmt], nil)
12471247 if ((e == e))
12481248 then {
12491249 let el = match e {
12501250 case legacy: Address =>
12511251 invoke(legacy, "emit", [emitLpAmt], nil)
12521252 case _ =>
12531253 unit
12541254 }
12551255 if ((el == el))
12561256 then {
12571257 let lpTrnsfr = if (autoStake)
12581258 then {
12591259 let ss = invoke(stakingContract, "stakeFor", [toString(i.caller)], [AttachedPayment(lpId, emitLpAmt)])
12601260 if ((ss == ss))
12611261 then nil
12621262 else throw("Strict value is not equal to itself.")
12631263 }
12641264 else [ScriptTransfer(i.caller, emitLpAmt, lpId)]
12651265 let sendFeeToMatcher = if ((feeAmount > 0))
12661266 then [ScriptTransfer(feeCollectorAddress, feeAmount, fromBase58String(pmtAssetId))]
12671267 else nil
12681268 let $t04340343750 = if ((this == feeCollectorAddress))
12691269 then $Tuple2(0, 0)
12701270 else {
12711271 let paymentInAmountAsset = if ((pmt.assetId == cfgAmountAssetId))
12721272 then true
12731273 else false
12741274 if (paymentInAmountAsset)
12751275 then $Tuple2(-(feeAmount), 0)
12761276 else $Tuple2(0, -(feeAmount))
12771277 }
12781278 let amountAssetBalanceDelta = $t04340343750._1
12791279 let priceAssetBalanceDelta = $t04340343750._2
12801280 let $t04375343861 = refreshDLpInternal(amountAssetBalanceDelta, priceAssetBalanceDelta, 0)
12811281 let refreshDLpActions = $t04375343861._1
12821282 let updatedDLp = $t04375343861._2
12831283 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
12841284 if ((isUpdatedDLpValid == isUpdatedDLpValid))
12851285 then $Tuple2((((state ++ lpTrnsfr) ++ sendFeeToMatcher) ++ refreshDLpActions), emitLpAmt)
12861286 else throw("Strict value is not equal to itself.")
12871287 }
12881288 else throw("Strict value is not equal to itself.")
12891289 }
12901290 else throw("Strict value is not equal to itself.")
12911291 }
12921292 else throw("Strict value is not equal to itself.")
12931293 }
12941294 else throw("Strict value is not equal to itself.")
12951295 }
12961296 else throw("Strict value is not equal to itself.")
12971297 }
12981298
12991299
13001300
13011301 @Callable(i)
13021302 func putForFree (maxSlpg) = if ((0 > maxSlpg))
13031303 then throw("Wrong slpg")
13041304 else if ((size(i.payments) != 2))
13051305 then throw("2 pmnts expd")
13061306 else {
13071307 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, "")
13081308 let state = estPut._9
13091309 let amAssetPmt = toBigInt(value(i.payments[0]).amount)
13101310 let prAssetPmt = toBigInt(value(i.payments[1]).amount)
13111311 let currentDLp = calcCurrentDLp(amAssetPmt, prAssetPmt, toBigInt(0))
13121312 if ((currentDLp == currentDLp))
13131313 then {
13141314 let $t04469344758 = refreshDLpInternal(0, 0, 0)
13151315 let refreshDLpActions = $t04469344758._1
13161316 let updatedDLp = $t04469344758._2
13171317 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13181318 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13191319 then (state ++ refreshDLpActions)
13201320 else throw("Strict value is not equal to itself.")
13211321 }
13221322 else throw("Strict value is not equal to itself.")
13231323 }
13241324
13251325
13261326
13271327 @Callable(i)
13281328 func get () = {
13291329 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
13301330 if ((currentDLp == currentDLp))
13311331 then {
13321332 let r = cg(i)
13331333 let outAmtAmt = r._1
13341334 let outPrAmt = r._2
13351335 let pmtAmt = r._3
13361336 let pmtAssetId = r._4
13371337 let state = r._5
13381338 let b = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
13391339 if ((b == b))
13401340 then {
13411341 let $t04586145943 = refreshDLpInternal(-(outAmtAmt), -(outPrAmt), 0)
13421342 let refreshDLpActions = $t04586145943._1
13431343 let updatedDLp = $t04586145943._2
13441344 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
13451345 if ((isUpdatedDLpValid == isUpdatedDLpValid))
13461346 then (state ++ refreshDLpActions)
13471347 else throw("Strict value is not equal to itself.")
13481348 }
13491349 else throw("Strict value is not equal to itself.")
13501350 }
13511351 else throw("Strict value is not equal to itself.")
13521352 }
13531353
13541354
13551355
13561356 @Callable(i)
13571357 func getOneTknV2 (outAssetId,minOutAmount) = {
13581358 let isPoolOneTokenOperationsDisabled = {
13591359 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
13601360 if ($isInstanceOf(@, "Boolean"))
13611361 then @
13621362 else throw(($getType(@) + " couldn't be cast to Boolean"))
13631363 }
13641364 let isGetDisabled = if (if (igs())
13651365 then true
13661366 else (cfgPoolStatus == PoolShutdown))
13671367 then true
13681368 else isPoolOneTokenOperationsDisabled
13691369 let checks = [if (if (!(isGetDisabled))
13701370 then true
13711371 else isManager(i))
13721372 then true
13731373 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 1))
13741374 then true
13751375 else throwErr("exactly 1 payment are expected")]
13761376 if ((checks == checks))
13771377 then {
13781378 let $t04656146716 = getOneTknV2Internal(outAssetId, minOutAmount, i.payments, i.caller, i.originCaller, i.transactionId)
13791379 let state = $t04656146716._1
13801380 let totalAmount = $t04656146716._2
13811381 $Tuple2(state, totalAmount)
13821382 }
13831383 else throw("Strict value is not equal to itself.")
13841384 }
13851385
13861386
13871387
13881388 @Callable(i)
13891389 func refreshDLp () = {
13901390 let lastRefreshedBlockHeight = valueOrElse(getInteger(keyDLpRefreshedHeight), 0)
13911391 let checkLastRefreshedBlockHeight = if (((an - lastRefreshedBlockHeight) >= dLpRefreshDelay))
13921392 then unit
13931393 else throwErr(makeString([toString(dLpRefreshDelay), " blocks have not passed since the previous call"], ""))
13941394 if ((checkLastRefreshedBlockHeight == checkLastRefreshedBlockHeight))
13951395 then {
13961396 let dLp = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, keyDLp), "0")), fmtErr("invalid dLp"))
13971397 let $t04723447298 = refreshDLpInternal(0, 0, 0)
13981398 let dLpUpdateActions = $t04723447298._1
13991399 let updatedDLp = $t04723447298._2
14001400 let actions = if ((dLp != updatedDLp))
14011401 then dLpUpdateActions
14021402 else throwErr("nothing to refresh")
14031403 $Tuple2(actions, toString(updatedDLp))
14041404 }
14051405 else throw("Strict value is not equal to itself.")
14061406 }
14071407
14081408
14091409
14101410 @Callable(i)
14111411 func getOneTknV2READONLY (outAssetId,lpAssetAmount) = {
14121412 let amId = toBase58String(value(cfgAmountAssetId))
14131413 let prId = toBase58String(value(cfgPriceAssetId))
14141414 let lpId = toBase58String(value(cfgLpAssetId))
14151415 let xp = [toBigInt(getAccBalance(amId)), toBigInt(getAccBalance(prId))]
14161416 let lpEmission = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(lpId)), "invalid lp asset").quantity)
14171417 let D0 = getD(xp)
14181418 let D1 = (D0 - fraction(toBigInt(lpAssetAmount), D0, lpEmission))
14191419 let index = if ((outAssetId == amId))
14201420 then 0
14211421 else if ((outAssetId == prId))
14221422 then 1
14231423 else throw("invalid out asset id")
14241424 let newY = getYD(xp, index, D1)
14251425 let dy = (xp[index] - newY)
14261426 let totalGetRaw = max([0, toInt((dy - big1))])
14271427 let $t04830848363 = takeFee(totalGetRaw, outFee)
14281428 let totalGet = $t04830848363._1
14291429 let feeAmount = $t04830848363._2
14301430 $Tuple2(nil, $Tuple2(totalGet, feeAmount))
14311431 }
14321432
14331433
14341434
14351435 @Callable(i)
14361436 func getOneTknV2WithBonusREADONLY (outAssetId,lpAssetAmount) = {
14371437 let amId = toBase58String(value(cfgAmountAssetId))
14381438 let prId = toBase58String(value(cfgPriceAssetId))
14391439 let lpId = toBase58String(value(cfgLpAssetId))
14401440 let amBalance = getAccBalance(amId)
14411441 let prBalance = getAccBalance(prId)
14421442 let $t04873848853 = {
14431443 let @ = invoke(this, "getOneTknV2READONLY", [outAssetId, lpAssetAmount], nil)
14441444 if ($isInstanceOf(@, "(Int, Int)"))
14451445 then @
14461446 else throw(($getType(@) + " couldn't be cast to (Int, Int)"))
14471447 }
14481448 let totalGet = $t04873848853._1
14491449 let feeAmount = $t04873848853._2
14501450 let r = ego("", lpId, lpAssetAmount, this)
14511451 let outAmAmt = r._1
14521452 let outPrAmt = r._2
14531453 let sumOfGetAssets = (outAmAmt + outPrAmt)
14541454 let bonus = if ((sumOfGetAssets == 0))
14551455 then if ((totalGet == 0))
14561456 then 0
14571457 else throw("bonus calculation error")
14581458 else fraction((totalGet - sumOfGetAssets), scale8, sumOfGetAssets)
14591459 $Tuple2(nil, $Tuple3(totalGet, feeAmount, bonus))
14601460 }
14611461
14621462
14631463
14641464 @Callable(i)
14651465 func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = {
14661466 let r = cg(i)
14671467 let outAmAmt = r._1
14681468 let outPrAmt = r._2
14691469 let pmtAmt = r._3
14701470 let pmtAssetId = r._4
14711471 let state = r._5
14721472 if ((noLessThenAmtAsset > outAmAmt))
14731473 then throw(((("Failed: " + toString(outAmAmt)) + " < ") + toString(noLessThenAmtAsset)))
14741474 else if ((noLessThenPriceAsset > outPrAmt))
14751475 then throw(((("Failed: " + toString(outPrAmt)) + " < ") + toString(noLessThenPriceAsset)))
14761476 else {
14771477 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
14781478 if ((currentDLp == currentDLp))
14791479 then {
14801480 let burnLPAssetOnFactory = invoke(fca, "burn", [pmtAmt], [AttachedPayment(pmtAssetId, pmtAmt)])
14811481 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
14821482 then {
14831483 let $t04993350014 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
14841484 let refreshDLpActions = $t04993350014._1
14851485 let updatedDLp = $t04993350014._2
14861486 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
14871487 if ((isUpdatedDLpValid == isUpdatedDLpValid))
14881488 then (state ++ refreshDLpActions)
14891489 else throw("Strict value is not equal to itself.")
14901490 }
14911491 else throw("Strict value is not equal to itself.")
14921492 }
14931493 else throw("Strict value is not equal to itself.")
14941494 }
14951495 }
14961496
14971497
14981498
14991499 @Callable(i)
15001500 func unstakeAndGet (amount) = {
15011501 let checkPayments = if ((size(i.payments) != 0))
15021502 then throw("No pmnts expd")
15031503 else true
15041504 if ((checkPayments == checkPayments))
15051505 then {
15061506 let factoryCfg = gfc()
15071507 let lpAssetId = cfgLpAssetId
15081508 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
15091509 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15101510 if ((currentDLp == currentDLp))
15111511 then {
15121512 let unstakeInv = invoke(staking, "unstake", [toBase58String(lpAssetId), amount], nil)
15131513 if ((unstakeInv == unstakeInv))
15141514 then {
15151515 let r = ego(toBase58String(i.transactionId), toBase58String(lpAssetId), amount, i.caller)
15161516 let outAmAmt = r._1
15171517 let outPrAmt = r._2
15181518 let sts = parseIntValue(r._9)
15191519 let state = r._10
15201520 let v = if (if (igs())
15211521 then true
15221522 else (sts == PoolShutdown))
15231523 then throw(("Blocked: " + toString(sts)))
15241524 else true
15251525 if ((v == v))
15261526 then {
15271527 let burnA = invoke(fca, "burn", [amount], [AttachedPayment(lpAssetId, amount)])
15281528 if ((burnA == burnA))
15291529 then {
15301530 let $t05104551126 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
15311531 let refreshDLpActions = $t05104551126._1
15321532 let updatedDLp = $t05104551126._2
15331533 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15341534 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15351535 then (state ++ refreshDLpActions)
15361536 else throw("Strict value is not equal to itself.")
15371537 }
15381538 else throw("Strict value is not equal to itself.")
15391539 }
15401540 else throw("Strict value is not equal to itself.")
15411541 }
15421542 else throw("Strict value is not equal to itself.")
15431543 }
15441544 else throw("Strict value is not equal to itself.")
15451545 }
15461546 else throw("Strict value is not equal to itself.")
15471547 }
15481548
15491549
15501550
15511551 @Callable(i)
15521552 func unstakeAndGetNoLess (unstakeAmount,noLessThenAmountAsset,noLessThenPriceAsset) = {
15531553 let isGetDisabled = if (igs())
15541554 then true
15551555 else (cfgPoolStatus == PoolShutdown)
15561556 let checks = [if (!(isGetDisabled))
15571557 then true
15581558 else throw("get operation is blocked by admin"), if ((size(i.payments) == 0))
15591559 then true
15601560 else throw("no payments are expected")]
15611561 if ((checks == checks))
15621562 then {
15631563 let currentDLp = calcCurrentDLp(toBigInt(0), toBigInt(0), toBigInt(0))
15641564 if ((currentDLp == currentDLp))
15651565 then {
15661566 let unstakeInv = invoke(stakingContract, "unstake", [toBase58String(cfgLpAssetId), unstakeAmount], nil)
15671567 if ((unstakeInv == unstakeInv))
15681568 then {
15691569 let res = ego(toBase58String(i.transactionId), toBase58String(cfgLpAssetId), unstakeAmount, i.caller)
15701570 let outAmAmt = res._1
15711571 let outPrAmt = res._2
15721572 let state = res._10
15731573 let checkAmounts = [if ((outAmAmt >= noLessThenAmountAsset))
15741574 then true
15751575 else throw(makeString(["amount asset amount to receive is less than ", toString(noLessThenAmountAsset)], "")), if ((outPrAmt >= noLessThenPriceAsset))
15761576 then true
15771577 else throw(makeString(["price asset amount to receive is less than ", toString(noLessThenPriceAsset)], ""))]
15781578 if ((checkAmounts == checkAmounts))
15791579 then {
15801580 let burnLPAssetOnFactory = invoke(fca, "burn", [unstakeAmount], [AttachedPayment(cfgLpAssetId, unstakeAmount)])
15811581 if ((burnLPAssetOnFactory == burnLPAssetOnFactory))
15821582 then {
15831583 let $t05237752458 = refreshDLpInternal(-(outAmAmt), -(outPrAmt), 0)
15841584 let refreshDLpActions = $t05237752458._1
15851585 let updatedDLp = $t05237752458._2
15861586 let isUpdatedDLpValid = validateUpdatedDLp(currentDLp, updatedDLp)
15871587 if ((isUpdatedDLpValid == isUpdatedDLpValid))
15881588 then (state ++ refreshDLpActions)
15891589 else throw("Strict value is not equal to itself.")
15901590 }
15911591 else throw("Strict value is not equal to itself.")
15921592 }
15931593 else throw("Strict value is not equal to itself.")
15941594 }
15951595 else throw("Strict value is not equal to itself.")
15961596 }
15971597 else throw("Strict value is not equal to itself.")
15981598 }
15991599 else throw("Strict value is not equal to itself.")
16001600 }
16011601
16021602
16031603
16041604 @Callable(i)
16051605 func unstakeAndGetOneTknV2 (unstakeAmount,outAssetId,minOutAmount) = {
16061606 let isPoolOneTokenOperationsDisabled = {
16071607 let @ = invoke(fca, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
16081608 if ($isInstanceOf(@, "Boolean"))
16091609 then @
16101610 else throw(($getType(@) + " couldn't be cast to Boolean"))
16111611 }
16121612 let isGetDisabled = if (if (igs())
16131613 then true
16141614 else (cfgPoolStatus == PoolShutdown))
16151615 then true
16161616 else isPoolOneTokenOperationsDisabled
16171617 let checks = [if (if (!(isGetDisabled))
16181618 then true
16191619 else isManager(i))
16201620 then true
16211621 else throwErr("get operation is blocked by admin"), if ((size(i.payments) == 0))
16221622 then true
16231623 else throwErr("no payments are expected")]
16241624 if ((checks == checks))
16251625 then {
16261626 let factoryCfg = gfc()
16271627 let lpAssetId = cfgLpAssetId
16281628 let staking = valueOrErrorMessage(addressFromString(factoryCfg[idxFactStakCntr]), "Wr st addr")
16291629 let userAddress = i.caller
16301630 let lpAssetRecipientAddress = this
16311631 let unstakeInv = invoke(staking, "unstakeINTERNAL", [lpAssetId, unstakeAmount, userAddress.bytes, lpAssetRecipientAddress.bytes], nil)
16321632 if ((unstakeInv == unstakeInv))
16331633 then {
16341634 let $t05348053668 = getOneTknV2Internal(outAssetId, minOutAmount, [AttachedPayment(lpAssetId, unstakeAmount)], i.caller, i.originCaller, i.transactionId)
16351635 let state = $t05348053668._1
16361636 let totalAmount = $t05348053668._2
16371637 $Tuple2(state, totalAmount)
16381638 }
16391639 else throw("Strict value is not equal to itself.")
16401640 }
16411641 else throw("Strict value is not equal to itself.")
16421642 }
16431643
16441644
16451645
16461646 @Callable(i)
16471647 func putOneTknV2WithBonusREADONLY (paymentAmountRaw,paymentAssetId) = {
16481648 let $t05379653899 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", true)
16491649 let lpAmount = $t05379653899._1
16501650 let state = $t05379653899._2
16511651 let feeAmount = $t05379653899._3
16521652 let bonus = $t05379653899._4
16531653 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16541654 }
16551655
16561656
16571657
16581658 @Callable(i)
16591659 func putOneTknV2WithoutTakeFeeREADONLY (paymentAmountRaw,paymentAssetId) = {
16601660 let $t05404754151 = calcPutOneTkn(paymentAmountRaw, paymentAssetId, "", "", false)
16611661 let lpAmount = $t05404754151._1
16621662 let state = $t05404754151._2
16631663 let feeAmount = $t05404754151._3
16641664 let bonus = $t05404754151._4
16651665 $Tuple2(nil, $Tuple3(lpAmount, feeAmount, bonus))
16661666 }
16671667
16681668
16691669
16701670 @Callable(i)
16711671 func activate (amtAsStr,prAsStr) = if ((toString(i.caller) != toString(fca)))
16721672 then throw("denied")
16731673 else $Tuple2([StringEntry(aa(), amtAsStr), StringEntry(pa(), prAsStr)], "success")
16741674
16751675
16761676
16771677 @Callable(i)
16781678 func setS (k,v) = if ((toString(i.caller) != strf(this, ada())))
16791679 then pd
16801680 else [StringEntry(k, v)]
16811681
16821682
16831683
16841684 @Callable(i)
16851685 func setI (k,v) = if ((toString(i.caller) != strf(this, ada())))
16861686 then pd
16871687 else [IntegerEntry(k, v)]
16881688
16891689
16901690
16911691 @Callable(i)
16921692 func getPoolConfigWrapperREADONLY () = $Tuple2(nil, gpc())
16931693
16941694
16951695
16961696 @Callable(i)
16971697 func getAccBalanceWrapperREADONLY (assetId) = $Tuple2(nil, getAccBalance(assetId))
16981698
16991699
17001700
17011701 @Callable(i)
17021702 func calcPricesWrapperREADONLY (amAmt,prAmt,lpAmt) = {
17031703 let pr = calcPrices(amAmt, prAmt, lpAmt)
17041704 $Tuple2(nil, [toString(pr[0]), toString(pr[1]), toString(pr[2])])
17051705 }
17061706
17071707
17081708
17091709 @Callable(i)
17101710 func fromX18WrapperREADONLY (val,resScaleMult) = $Tuple2(nil, f1(parseBigIntValue(val), resScaleMult))
17111711
17121712
17131713
17141714 @Callable(i)
17151715 func toX18WrapperREADONLY (origVal,origScaleMult) = $Tuple2(nil, toString(t1(origVal, origScaleMult)))
17161716
17171717
17181718
17191719 @Callable(i)
17201720 func calcPriceBigIntWrapperREADONLY (prAmtX18,amAmtX18) = $Tuple2(nil, toString(cpbi(parseBigIntValue(prAmtX18), parseBigIntValue(amAmtX18))))
17211721
17221722
17231723
17241724 @Callable(i)
17251725 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, ""))
17261726
17271727
17281728
17291729 @Callable(i)
17301730 func estimateGetOperationWrapperREADONLY (txId58,pmtAsId,pmtLpAmt,usrAddr) = {
17311731 let r = ego(txId58, pmtAsId, pmtLpAmt, addressFromStringValue(usrAddr))
17321732 $Tuple2(nil, $Tuple10(r._1, r._2, r._3, r._4, r._5, r._6, r._7, toString(r._8), r._9, r._10))
17331733 }
17341734
17351735
17361736
17371737 @Callable(i)
17381738 func changeAmp () = {
1739- let $t05682257134 = match "1__2__3" {
1740- case str: String =>
1739+ let str = match "1__2__3" {
1740+ case s: String =>
1741+ s
1742+ case _ =>
1743+ throw("invalid entry type")
1744+ }
1745+ if ((str == str))
1746+ then {
17411747 let list = split(str, SEP)
17421748 if ((list == list))
17431749 then {
1744- let v1 = parseIntValue(list[0])
1745- if ((v1 == v1))
1750+ let delay = parseIntValue(list[0])
1751+ if ((delay == delay))
17461752 then {
1747- let v2 = parseIntValue(list[1])
1748- if ((v2 == v2))
1753+ let delta = parseIntValue(list[1])
1754+ if ((delta == delta))
17491755 then {
1750- let v3 = parseIntValue(list[2])
1751- if ((v3 == v3))
1752- then $Tuple3(v1, v2, v3)
1753- else throw("Strict value is not equal to itself.")
1754- }
1755- else throw("Strict value is not equal to itself.")
1756- }
1757- else throw("Strict value is not equal to itself.")
1758- }
1759- else throw("Strict value is not equal to itself.")
1760- case _ =>
1761- throw("invalid entry type")
1762- }
1763- if (($t05682257134 == $t05682257134))
1764- then {
1765- let target = $t05682257134._3
1766- let delta = $t05682257134._2
1767- let delay = $t05682257134._1
1768- let curAmp = parseIntValue(getStringValue(amp()))
1769- if ((curAmp == curAmp))
1770- then {
1771- let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1772- if ((lastCall == lastCall))
1773- then {
1774- let newAmpRaw = (curAmp + delta)
1775- if ((newAmpRaw == newAmpRaw))
1776- then {
1777- let newAmp = if ((0 > delta))
1778- then if ((target > newAmpRaw))
1779- then target
1780- else newAmpRaw
1781- else if ((newAmpRaw > target))
1782- then target
1783- else newAmpRaw
1784- if ((newAmp == newAmp))
1756+ let target = parseIntValue(list[2])
1757+ if ((target == target))
17851758 then {
1786- let wait = (1 + 1)
1787- if ((wait == wait))
1759+ let curAmp = parseIntValue(getStringValue(amp()))
1760+ if ((curAmp == curAmp))
17881761 then {
1789- let checks = [if ((an > wait))
1790- then true
1791- else throwErr("try again in few blocks"), if ((curAmp != newAmp))
1792- then true
1793- else throwErr("already reached target")]
1794- if ((checks == checks))
1762+ let lastCall = valueOrElse(getInteger(keyChangeAmpLastCall()), 0)
1763+ if ((lastCall == lastCall))
17951764 then {
1796- let t6 = throw("6")
1797- if ((t6 == t6))
1798- then [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
1765+ let newAmpRaw = (curAmp + delta)
1766+ if ((newAmpRaw == newAmpRaw))
1767+ then {
1768+ let newAmp = if ((0 > delta))
1769+ then if ((target > newAmpRaw))
1770+ then target
1771+ else newAmpRaw
1772+ else if ((newAmpRaw > target))
1773+ then target
1774+ else newAmpRaw
1775+ if ((newAmp == newAmp))
1776+ then {
1777+ let wait = (lastCall + delay)
1778+ if ((wait == wait))
1779+ then {
1780+ let checks = [if ((curAmp != newAmp))
1781+ then true
1782+ else throwErr("already reached target")]
1783+ if ((checks == checks))
1784+ then {
1785+ let t6 = throw("6")
1786+ if ((t6 == t6))
1787+ then [IntegerEntry(keyChangeAmpLastCall(), an), StringEntry(amp(), toString(newAmp)), StringEntry(keyAmpHistory(an), toString(newAmp))]
1788+ else throw("Strict value is not equal to itself.")
1789+ }
1790+ else throw("Strict value is not equal to itself.")
1791+ }
1792+ else throw("Strict value is not equal to itself.")
1793+ }
1794+ else throw("Strict value is not equal to itself.")
1795+ }
17991796 else throw("Strict value is not equal to itself.")
18001797 }
18011798 else throw("Strict value is not equal to itself.")
18021799 }
18031800 else throw("Strict value is not equal to itself.")
18041801 }
18051802 else throw("Strict value is not equal to itself.")
18061803 }
18071804 else throw("Strict value is not equal to itself.")
18081805 }
18091806 else throw("Strict value is not equal to itself.")
18101807 }
18111808 else throw("Strict value is not equal to itself.")
18121809 }
18131810 else throw("Strict value is not equal to itself.")
18141811 }
18151812
18161813
18171814 @Verifier(tx)
18181815 func verify () = {
18191816 let targetPublicKey = match m() {
18201817 case pk: ByteVector =>
18211818 pk
18221819 case _: Unit =>
18231820 tx.senderPublicKey
18241821 case _ =>
18251822 throw("Match error")
18261823 }
18271824 match tx {
18281825 case order: Order =>
18291826 let matcherPub = mp()
1830- let $t05807958196 = if (skipOrderValidation())
1827+ let $t05803758154 = if (skipOrderValidation())
18311828 then $Tuple2(true, "")
18321829 else validateMatcherOrderAllowed(order)
1833- let orderValid = $t05807958196._1
1834- let orderValidInfo = $t05807958196._2
1830+ let orderValid = $t05803758154._1
1831+ let orderValidInfo = $t05803758154._2
18351832 let senderValid = sigVerify(order.bodyBytes, order.proofs[0], order.senderPublicKey)
18361833 let matcherValid = sigVerify(order.bodyBytes, order.proofs[1], matcherPub)
18371834 if (if (if (orderValid)
18381835 then senderValid
18391836 else false)
18401837 then matcherValid
18411838 else false)
18421839 then true
18431840 else throwOrderError(orderValid, orderValidInfo, senderValid, matcherValid)
18441841 case s: SetScriptTransaction =>
18451842 if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
18461843 then true
18471844 else {
18481845 let newHash = blake2b256(value(s.script))
18491846 let allowedHash = fromBase64String(value(getString(fca, keyAllowedLpStableScriptHash())))
18501847 let currentHash = scriptHash(this)
18511848 if ((allowedHash == newHash))
18521849 then (currentHash != newHash)
18531850 else false
18541851 }
18551852 case _ =>
18561853 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
18571854 }
18581855 }
18591856

github/deemru/w8io/026f985 
157.07 ms