tx · GE24pgEr6yjW1wACdqv9tTWNNUStTC1HyubAKEgNJsuD

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.03200000 Waves

2022.11.29 18:48 [2338589] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "GE24pgEr6yjW1wACdqv9tTWNNUStTC1HyubAKEgNJsuD", "fee": 3200000, "feeAssetId": null, "timestamp": 1669736951429, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "22X97hAjr45GjKyW7TDcGYDb5vdmFiQjcnkTQHkijf1MZoEifDaETdjN7r2DP9iFqLpofa4v53xedAv5PwziqWHe" ], "script": "base64:BgLEJAgCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIECgIICBIECgIIARIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2lkeEZhY3RTdGFrQ250ciISaWR4RmFjd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UMCFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJlcQUCYUMEAmhrCQD2AwEJAQV2YWx1ZQEIBQJlcQZzY3JpcHQEAmhsCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYUwJAQJhdgAEAmhtCQDxBwEFBHRoaXMDAwkAAAIFAmhsBQJoawkBAiE9AgUCaG0FAmhrBwYJAPQDAwgFAmhkCWJvZHlCeXRlcwkAkQMCCAUCaGQGcHJvb2ZzAAAFAmhmCQD0AwMIBQJoZAlib2R5Qnl0ZXMJAJEDAggFAmhkBnByb29mcwAABQJoZnDQvME=", "chainId": 84, "height": 2338589, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7qeTDJZn4LaYsgJzFkLvUDfohq4PyThmF9agu58eqZ9N Next: 8rK5KoYi8F3fGjzvSu5FwGmBFHYG6WoL3ToAbYnfgLoC Diff:
OldNewDifferences
119119
120120 let ah = valueOrElse(getInteger(this, ag), E)
121121
122-func ai () = "%s__factoryConfig"
122+let ai = makeString(["%s", "dLp"], l)
123+
124+let aj = makeString(["%s", "dLpRefreshedHeight"], l)
125+
126+let ak = makeString(["%s", "refreshDLpDelay"], l)
127+
128+let al = 30
129+
130+let am = valueOrElse(getInteger(this, ak), al)
131+
132+func an () = "%s__factoryConfig"
123133
124134
125-func aj () = "%s%s__matcher__publicKey"
135+func ao () = "%s%s__matcher__publicKey"
126136
127137
128-func ak (al,am) = (((("%d%d%s__" + al) + "__") + am) + "__config")
138+func ap (aq,ar) = (((("%d%d%s__" + aq) + "__") + ar) + "__config")
129139
130140
131-func an (ao) = ("%s%s%s__mappings__baseAsset2internalId__" + ao)
141+func as (at) = ("%s%s%s__mappings__baseAsset2internalId__" + at)
132142
133143
134-func ap () = "%s__shutdown"
144+func au () = "%s__shutdown"
135145
136146
137-func aq () = "%s__allowedLpStableScriptHash"
147+func av () = "%s__allowedLpStableScriptHash"
138148
139149
140-func ar () = "%s__feeCollectorAddress"
150+func aw () = "%s__feeCollectorAddress"
141151
142152
143-func as (at,au,av) = throw(((((("Failed: ordValid=" + toString(at)) + " sndrValid=") + toString(au)) + " mtchrValid=") + toString(av)))
153+func ax (ay,az,aA) = throw(((((("Failed: ordValid=" + toString(ay)) + " sndrValid=") + toString(az)) + " mtchrValid=") + toString(aA)))
144154
145155
146-func aw (J) = {
147- let ax = J
148- if ($isInstanceOf(ax, "String"))
156+func aB (J) = {
157+ let aC = J
158+ if ($isInstanceOf(aC, "String"))
149159 then {
150- let ay = ax
151- ay
160+ let aD = aC
161+ aD
152162 }
153163 else throw("fail cast to String")
154164 }
155165
156166
157-func az (aA,aB) = valueOrErrorMessage(getString(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
167+func aE (aF,aG) = valueOrErrorMessage(getString(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " not defined"], ""))
158168
159169
160-func aC (aA,aB) = valueOrErrorMessage(getInteger(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
170+func aH (aF,aG) = valueOrErrorMessage(getInteger(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " not defined"], ""))
161171
162172
163-func aD (aE) = throw(makeString(["lp_stable.ride:", aE], " "))
173+func aI (aJ) = throw(makeString(["lp_stable.ride:", aJ], " "))
164174
165175
166-let aF = addressFromStringValue(az(this, R()))
167-
168-let aG = az(this, ae())
169-
170-func aH () = valueOrElse(getBoolean(aF, ap()), false)
176+func aK (aJ) = makeString(["lp_stable.ride:", aJ], " ")
171177
172178
173-func aI () = fromBase58String(az(aF, aj()))
179+let aL = addressFromStringValue(aE(this, R()))
180+
181+let aM = aE(this, ae())
182+
183+func aN () = valueOrElse(getBoolean(aL, au()), false)
174184
175185
176-let aJ = addressFromStringValue(az(aF, ar()))
186+func aO () = fromBase58String(aE(aL, ao()))
177187
178-func aK () = {
179- let aL = az(this, ac())
180- let aM = az(this, ad())
181- let aN = aC(aF, an(aM))
182- let al = aC(aF, an(aL))
183- split(az(aF, ak(toString(al), toString(aN))), l)
188+
189+let aP = addressFromStringValue(aE(aL, aw()))
190+
191+func aQ () = {
192+ let aR = aE(this, ac())
193+ let aS = aE(this, ad())
194+ let aT = aH(aL, as(aS))
195+ let aq = aH(aL, as(aR))
196+ split(aE(aL, ap(toString(aq), toString(aT))), l)
184197 }
185198
186199
187-func aO (aP) = if ((aP == i))
200+func aU (aV) = if ((aV == i))
188201 then unit
189- else fromBase58String(aP)
202+ else fromBase58String(aV)
190203
191204
192-func aQ (aP) = if ((aP == unit))
205+func aW (aV) = if ((aV == unit))
193206 then i
194- else toBase58String(value(aP))
207+ else toBase58String(value(aV))
195208
196209
197-func aR (aS) = $Tuple7(addressFromStringValue(aS[r]), parseIntValue(aS[s]), fromBase58String(aS[t]), aO(aS[u]), aO(aS[v]), parseIntValue(aS[w]), parseIntValue(aS[x]))
210+func aX (aY) = $Tuple7(addressFromStringValue(aY[r]), parseIntValue(aY[s]), fromBase58String(aY[t]), aU(aY[u]), aU(aY[v]), parseIntValue(aY[w]), parseIntValue(aY[x]))
198211
199212
200-let aT = aR(aK())
213+let aZ = aX(aQ())
201214
202-let aU = aT
215+let ba = aZ
203216
204-let aV = aU._1
217+let bb = ba._1
205218
206-let aW = aU._2
219+let bc = ba._2
207220
208-let aX = aU._3
221+let bd = ba._3
209222
210-let aY = aU._4
223+let be = ba._4
211224
212-let aZ = aU._5
225+let bf = ba._5
213226
214-let ba = aU._6
227+let bg = ba._6
215228
216-let bb = aU._7
229+let bh = ba._7
217230
218-func bc () = split(az(aF, ai()), l)
231+func bi () = split(aE(aL, an()), l)
219232
220233
221-let bd = bc()
234+let bj = bi()
222235
223-let be = valueOrErrorMessage(addressFromString(bd[A]), "Invalid staking contract address")
236+let bk = valueOrErrorMessage(addressFromString(bj[A]), "Invalid staking contract address")
224237
225-let bf = valueOrErrorMessage(addressFromString(bd[C]), "Invalid slipage contract address")
238+let bl = valueOrErrorMessage(addressFromString(bj[C]), "Invalid slipage contract address")
226239
227-let bg = valueOrErrorMessage(addressFromString(bd[D]), "Invalid gwx contract address")
240+let bm = valueOrErrorMessage(addressFromString(bj[D]), "Invalid gwx contract address")
228241
229-let bh = valueOrErrorMessage(addressFromString(bd[B]), "Invalid gwx contract address")
242+let bn = valueOrErrorMessage(addressFromString(bj[B]), "Invalid gwx contract address")
230243
231-func bi (bj,bk,bl,bm,bn,bo,bp,bq,br,bs) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bj), toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs)], l)
244+func bo (bp,bq,br,bs,bt,bu,bv,bw,bx,by) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bp), toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by)], l)
232245
233246
234-func bt (bu,bv,bw,bm,bp,bq) = makeString(["%d%d%d%d%d%d", toString(bu), toString(bv), toString(bw), toString(bm), toString(bp), toString(bq)], l)
247+func bz (bA,bB,bC,bs,bv,bw) = makeString(["%d%d%d%d%d%d", toString(bA), toString(bB), toString(bC), toString(bs), toString(bv), toString(bw)], l)
235248
236249
237-func bx (by) = if ((by == "WAVES"))
250+func bD (bE) = if ((bE == "WAVES"))
238251 then wavesBalance(this).available
239- else assetBalance(this, fromBase58String(by))
252+ else assetBalance(this, fromBase58String(bE))
240253
241254
242-func bz (bA,bB) = fraction(bA, c, bB)
255+func bF (bG,bH) = fraction(bG, c, bH)
243256
244257
245-func bC (bD,bE,bF) = {
246- let bG = fraction((bD - bE), b, bE)
247- let bH = ((bF - P(bG)) > d)
248- if (!(bH))
249- then throw(("Big slpg: " + toString(bG)))
250- else $Tuple2(bH, min([bD, bE]))
258+func bI (bJ,bK,bL) = {
259+ let bM = fraction((bJ - bK), b, bK)
260+ let bN = ((bL - P(bM)) > d)
261+ if (!(bN))
262+ then throw(("Big slpg: " + toString(bM)))
263+ else $Tuple2(bN, min([bJ, bK]))
251264 }
252265
253266
254-func bI (bJ,bK,bL) = {
255- let bG = fraction(bK, b, bJ)
256- let bM = (bL > bG)
257- if (if (bM)
267+func bO (bP,bQ,bR) = {
268+ let bM = fraction(bQ, b, bP)
269+ let bS = (bR > bM)
270+ if (if (bS)
258271 then true
259- else (bK > bJ))
260- then throw(((((((toString(bK) + " ") + toString(bJ)) + " ") + toString(bG)) + " ") + toString(bL)))
261- else bM
272+ else (bQ > bP))
273+ then throw(((((((toString(bQ) + " ") + toString(bP)) + " ") + toString(bM)) + " ") + toString(bR)))
274+ else bS
262275 }
263276
264277
265-func bN (bO,bP,bQ,bR) = {
266- let bS = F(bQ, bO)
267- let bT = F(bR, bP)
268- bz(bT, bS)
278+func bT (bU,bV,bW,bX) = {
279+ let bY = F(bW, bU)
280+ let bZ = F(bX, bV)
281+ bF(bZ, bY)
269282 }
270283
271284
272-func bU (bQ,bR,bV) = {
273- let bW = aK()
274- let bX = parseIntValue(bW[w])
275- let bY = parseIntValue(bW[x])
276- let bZ = bN(bX, bY, bQ, bR)
277- let bB = F(bQ, bX)
278- let bA = F(bR, bY)
279- let ca = F(bV, a)
280- let cb = bz(bB, ca)
281- let cc = bz(bA, ca)
282-[bZ, cb, cc]
285+func ca (bW,bX,cb) = {
286+ let cc = aQ()
287+ let cd = parseIntValue(cc[w])
288+ let ce = parseIntValue(cc[x])
289+ let cf = bT(cd, ce, bW, bX)
290+ let bH = F(bW, cd)
291+ let bG = F(bX, ce)
292+ let cg = F(cb, a)
293+ let ch = bF(bH, cg)
294+ let ci = bF(bG, cg)
295+[cf, ch, ci]
283296 }
284297
285298
286-func cd (bQ,bR,bV) = {
287- let ce = bU(bQ, bR, bV)
288-[I(ce[0], a), I(ce[1], a), I(ce[2], a)]
299+func cj (bW,bX,cb) = {
300+ let ck = ca(bW, bX, cb)
301+[I(ck[0], a), I(ck[1], a), I(ck[2], a)]
289302 }
290303
291304
292-func cf (cg) = {
293- let ch = fraction(cg, ah, a)
294- $Tuple2((cg - ch), ch)
305+func cl (cm) = {
306+ let cn = fraction(cm, ah, a)
307+ $Tuple2((cm - cn), cn)
295308 }
296309
297310
298-func ci (cj,ck,cl,cm) = {
299- let bW = aK()
300- let cn = bW[t]
301- let co = bW[u]
302- let cp = bW[v]
303- let cq = parseIntValue(bW[w])
304- let cr = parseIntValue(bW[x])
305- let cs = bW[s]
306- let ct = valueOrErrorMessage(assetInfo(fromBase58String(cn)), "Wrong LP id").quantity
307- if ((cn != ck))
311+func co (cp,cq,cr,cs) = {
312+ let cc = aQ()
313+ let ct = cc[t]
314+ let cu = cc[u]
315+ let cv = cc[v]
316+ let cw = parseIntValue(cc[w])
317+ let cx = parseIntValue(cc[x])
318+ let cy = cc[s]
319+ let cz = valueOrErrorMessage(assetInfo(fromBase58String(ct)), "Wrong LP id").quantity
320+ if ((ct != cq))
308321 then throw("Wrong pmt asset")
309322 else {
310- let cu = bx(co)
311- let cv = F(cu, cq)
312- let cw = bx(cp)
313- let cx = F(cw, cr)
314- let cy = bz(cx, cv)
315- let cz = I(cy, a)
316- let cA = F(cl, a)
317- let cB = F(ct, a)
318- let cC = fraction(cv, cA, cB)
319- let cD = fraction(cx, cA, cB)
320- let cE = I(cC, cq)
321- let cF = I(cD, cr)
322- let cG = if ((cj == ""))
323+ let cA = bD(cu)
324+ let cB = F(cA, cw)
325+ let cC = bD(cv)
326+ let cD = F(cC, cx)
327+ let cE = bF(cD, cB)
328+ let cF = I(cE, a)
329+ let cG = F(cr, a)
330+ let cH = F(cz, a)
331+ let cI = fraction(cB, cG, cH)
332+ let cJ = fraction(cD, cG, cH)
333+ let cK = I(cI, cw)
334+ let cL = I(cJ, cx)
335+ let cM = if ((cp == ""))
323336 then nil
324- else [ScriptTransfer(cm, cE, if ((co == "WAVES"))
337+ else [ScriptTransfer(cs, cK, if ((cu == "WAVES"))
325338 then unit
326- else fromBase58String(co)), ScriptTransfer(cm, cF, if ((cp == "WAVES"))
339+ else fromBase58String(cu)), ScriptTransfer(cs, cL, if ((cv == "WAVES"))
327340 then unit
328- else fromBase58String(cp)), StringEntry(ab(toString(cm), cj), bt(cE, cF, cl, cz, height, lastBlock.timestamp)), IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz)]
329- $Tuple10(cE, cF, co, cp, cu, cw, ct, cy, cs, cG)
341+ else fromBase58String(cv)), StringEntry(ab(toString(cs), cp), bz(cK, cL, cr, cF, height, lastBlock.timestamp)), IntegerEntry(U(), cF), IntegerEntry(V(height, lastBlock.timestamp), cF)]
342+ $Tuple10(cK, cL, cu, cv, cA, cC, cz, cE, cy, cM)
330343 }
331344 }
332345
333346
334-func cH (cj,bF,cI,cJ,cK,cL,cm,cM,cN,cO,cP,cQ,cR) = {
335- let bW = aK()
336- let cn = fromBase58String(bW[t])
337- let cS = bW[u]
338- let cT = bW[v]
339- let cU = bW[y]
340- let cV = bW[z]
341- let cW = parseIntValue(bW[w])
342- let cX = parseIntValue(bW[x])
343- let cs = bW[s]
344- let cY = valueOrErrorMessage(assetInfo(cn), "Wr lp as").quantity
345- let cu = if (cM)
346- then bx(cS)
347- else if (if (cO)
348- then (cR == cS)
347+func cN (cp,bL,cO,cP,cQ,cR,cs,cS,cT,cU,cV,cW,cX) = {
348+ let cc = aQ()
349+ let ct = fromBase58String(cc[t])
350+ let cY = cc[u]
351+ let cZ = cc[v]
352+ let da = cc[y]
353+ let db = cc[z]
354+ let dc = parseIntValue(cc[w])
355+ let dd = parseIntValue(cc[x])
356+ let cy = cc[s]
357+ let de = valueOrErrorMessage(assetInfo(ct), "Wr lp as").quantity
358+ let cA = if (cS)
359+ then bD(cY)
360+ else if (if (cU)
361+ then (cX == cY)
349362 else false)
350- then (bx(cS) - cQ)
351- else if (cO)
352- then bx(cS)
353- else (bx(cS) - cI)
354- let cw = if (cM)
355- then bx(cT)
356- else if (if (cO)
357- then (cR == cT)
363+ then (bD(cY) - cW)
364+ else if (cU)
365+ then bD(cY)
366+ else (bD(cY) - cO)
367+ let cC = if (cS)
368+ then bD(cZ)
369+ else if (if (cU)
370+ then (cX == cZ)
358371 else false)
359- then (bx(cT) - cQ)
360- else if (cO)
361- then bx(cT)
362- else (bx(cT) - cK)
363- let cZ = F(cI, cW)
364- let da = F(cK, cX)
365- let db = bz(da, cZ)
366- let cv = F(cu, cW)
367- let cx = F(cw, cX)
368- let dc = if ((cY == 0))
372+ then (bD(cZ) - cW)
373+ else if (cU)
374+ then bD(cZ)
375+ else (bD(cZ) - cQ)
376+ let df = F(cO, dc)
377+ let dg = F(cQ, dd)
378+ let dh = bF(dg, df)
379+ let cB = F(cA, dc)
380+ let cD = F(cC, dd)
381+ let di = if ((de == 0))
369382 then {
370- let cy = d
371- let dd = d
372- let ca = pow((cZ * da), 0, toBigInt(5), 1, 0, DOWN)
373- $Tuple5(I(ca, a), I(cZ, cW), I(da, cX), bz((cx + da), (cv + cZ)), dd)
383+ let cE = d
384+ let dj = d
385+ let cg = pow((df * dg), 0, toBigInt(5), 1, 0, DOWN)
386+ $Tuple5(I(cg, a), I(df, dc), I(dg, dd), bF((cD + dg), (cB + df)), dj)
374387 }
375388 else {
376- let cy = bz(cx, cv)
377- let de = fraction(P((cy - db)), c, cy)
378- let dd = F(bF, a)
379- if (if (if (cP)
380- then (cy != d)
389+ let cE = bF(cD, cB)
390+ let dk = fraction(P((cE - dh)), c, cE)
391+ let dj = F(bL, a)
392+ if (if (if (cV)
393+ then (cE != d)
381394 else false)
382- then (de > dd)
395+ then (dk > dj)
383396 else false)
384- then throw(((("Price slippage " + toString(de)) + " > ") + toString(dd)))
397+ then throw(((("Price slippage " + toString(dk)) + " > ") + toString(dj)))
385398 else {
386- let df = F(cY, a)
387- let dg = fraction(cZ, cy, c)
388- let dh = fraction(da, c, cy)
389- let di = if ((dg > da))
390- then $Tuple2(dh, da)
391- else $Tuple2(cZ, dg)
392- let dj = di._1
393- let dk = di._2
394- let ca = fraction(df, dk, cx)
395- $Tuple5(I(ca, a), I(dj, cW), I(dk, cX), cy, dd)
399+ let dl = F(de, a)
400+ let dm = fraction(df, cE, c)
401+ let dn = fraction(dg, c, cE)
402+ let do = if ((dm > dg))
403+ then $Tuple2(dn, dg)
404+ else $Tuple2(df, dm)
405+ let dp = do._1
406+ let dq = do._2
407+ let cg = fraction(dl, dq, cD)
408+ $Tuple5(I(cg, a), I(dp, dc), I(dq, dd), cE, dj)
396409 }
397410 }
398- let dl = dc._1
399- let dm = dc._2
400- let dn = dc._3
401- let cz = I(dc._4, a)
402- let do = I(dc._5, a)
403- if ((0 >= dl))
411+ let dr = di._1
412+ let ds = di._2
413+ let dt = di._3
414+ let cF = I(di._4, a)
415+ let du = I(di._5, a)
416+ if ((0 >= dr))
404417 then throw("LP <= 0")
405418 else {
406- let dp = if (!(cN))
419+ let dv = if (!(cT))
407420 then 0
408- else dl
409- let dq = (cI - dm)
410- let dr = (cK - dn)
411- let ds = if (if (cO)
412- then (cR == cS)
421+ else dr
422+ let dw = (cO - ds)
423+ let dx = (cQ - dt)
424+ let dy = if (if (cU)
425+ then (cX == cY)
413426 else false)
414- then $Tuple2(cQ, 0)
415- else if (if (cO)
416- then (cR == cT)
427+ then $Tuple2(cW, 0)
428+ else if (if (cU)
429+ then (cX == cZ)
417430 else false)
418- then $Tuple2(0, cQ)
419- else $Tuple2(dm, dn)
420- let dt = ds._1
421- let du = ds._2
422- let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, cj), bi(dt, du, dp, cz, bF, do, height, lastBlock.timestamp, dq, dr))]
423- $Tuple13(dl, dp, cz, cu, cw, cY, cn, cs, dv, dq, dr, cJ, cL)
431+ then $Tuple2(0, cW)
432+ else $Tuple2(ds, dt)
433+ let dz = dy._1
434+ let dA = dy._2
435+ let dB = [IntegerEntry(U(), cF), IntegerEntry(V(height, lastBlock.timestamp), cF), StringEntry(Y(cs, cp), bo(dz, dA, dv, cF, bL, du, height, lastBlock.timestamp, dw, dx))]
436+ $Tuple13(dr, dv, cF, cA, cC, de, ct, cy, dB, dw, dx, cP, cR)
424437 }
425438 }
426439
427440
428-func dw (dx) = {
429- let bW = aK()
430- let dy = bW[u]
431- let dz = bW[v]
432- let cs = parseIntValue(bW[s])
433- let bX = parseIntValue(bW[w])
434- let bY = parseIntValue(bW[x])
435- let dA = bx(dy)
436- let dB = bx(dz)
437- let cy = if ((dx.orderType == Buy))
438- then bN(bX, bY, (dA + dx.amount), dB)
439- else bN(bX, bY, (dA - dx.amount), dB)
440- let cz = I(cy, a)
441- if (if (if (aH())
441+func dC (dD,dE,dF) = {
442+ let dG = fraction((dD * dE), c, dF)
443+ dG
444+ }
445+
446+
447+func dH (dI,dJ,dK) = {
448+ let dL = (bD(aW(be)) + dI)
449+ let dM = (bD(aW(bf)) + dJ)
450+ let dN = (value(assetInfo(bd)).quantity + dK)
451+ let dG = dC(toBigInt(dL), toBigInt(dM), toBigInt(dN))
452+ let dO = [IntegerEntry(aj, height), StringEntry(ai, toString(dG))]
453+ $Tuple2(dO, dG)
454+ }
455+
456+
457+func dP (dQ) = {
458+ let cc = aQ()
459+ let dR = cc[u]
460+ let dS = cc[v]
461+ let cy = parseIntValue(cc[s])
462+ let cd = parseIntValue(cc[w])
463+ let ce = parseIntValue(cc[x])
464+ let dT = bD(dR)
465+ let dU = bD(dS)
466+ let cE = if ((dQ.orderType == Buy))
467+ then bT(cd, ce, (dT + dQ.amount), dU)
468+ else bT(cd, ce, (dT - dQ.amount), dU)
469+ let cF = I(cE, a)
470+ if (if (if (aN())
442471 then true
443- else (cs == p))
472+ else (cy == p))
444473 then true
445- else (cs == q))
474+ else (cy == q))
446475 then throw("Admin blocked")
447476 else {
448- let dC = dx.assetPair.amountAsset
449- let dD = if ((dC == unit))
477+ let dV = dQ.assetPair.amountAsset
478+ let dW = if ((dV == unit))
450479 then "WAVES"
451- else toBase58String(value(dC))
452- let dE = dx.assetPair.priceAsset
453- let dF = if ((dE == unit))
480+ else toBase58String(value(dV))
481+ let dX = dQ.assetPair.priceAsset
482+ let dY = if ((dX == unit))
454483 then "WAVES"
455- else toBase58String(value(dE))
456- if (if ((dD != dy))
484+ else toBase58String(value(dX))
485+ if (if ((dW != dR))
457486 then true
458- else (dF != dz))
487+ else (dY != dS))
459488 then throw("Wr assets")
460489 else {
461- let dG = dx.price
462- let cX = fraction(a, bY, bX)
463- let dH = L(dG, a, cX)
464- let dI = if ((dx.orderType == Buy))
465- then (cz >= dH)
466- else (dH >= cz)
490+ let dZ = dQ.price
491+ let dd = fraction(a, ce, cd)
492+ let ea = L(dZ, a, dd)
493+ let eb = if ((dQ.orderType == Buy))
494+ then (cF >= ea)
495+ else (ea >= cF)
467496 true
468497 }
469498 }
470499 }
471500
472501
473-func dJ (dK) = if ((size(dK.payments) != 1))
502+func ec (ed) = if ((size(ed.payments) != 1))
474503 then throw("1 pmnt exp")
475504 else {
476- let dL = value(dK.payments[0])
477- let ck = value(dL.assetId)
478- let cQ = dL.amount
479- let dc = ci(toBase58String(dK.transactionId), toBase58String(ck), cQ, dK.caller)
480- let cE = dc._1
481- let cF = dc._2
482- let cs = parseIntValue(dc._9)
483- let cG = dc._10
484- if (if (aH())
505+ let ee = value(ed.payments[0])
506+ let cq = value(ee.assetId)
507+ let cW = ee.amount
508+ let di = co(toBase58String(ed.transactionId), toBase58String(cq), cW, ed.caller)
509+ let cK = di._1
510+ let cL = di._2
511+ let cy = parseIntValue(di._9)
512+ let cM = di._10
513+ if (if (aN())
485514 then true
486- else (cs == q))
487- then throw(("Admin blocked: " + toString(cs)))
488- else $Tuple5(cE, cF, cQ, ck, cG)
515+ else (cy == q))
516+ then throw(("Admin blocked: " + toString(cy)))
517+ else $Tuple5(cK, cL, cW, cq, cM)
489518 }
490519
491520
492-func dM (dN,aa,dO,dP,bF,cN,cO,cP,cQ,cR) = {
493- let dc = cH(aa, bF, value(dO).amount, value(dO).assetId, value(dP).amount, value(dP).assetId, dN, (aa == ""), cN, cO, cP, cQ, cR)
494- let cs = parseIntValue(dc._8)
495- if (if (if (aH())
521+func ef (eg,aa,eh,ei,bL,cT,cU,cV,cW,cX) = {
522+ let di = cN(aa, bL, value(eh).amount, value(eh).assetId, value(ei).amount, value(ei).assetId, eg, (aa == ""), cT, cU, cV, cW, cX)
523+ let cy = parseIntValue(di._8)
524+ if (if (if (aN())
496525 then true
497- else (cs == o))
526+ else (cy == o))
498527 then true
499- else (cs == q))
500- then throw(("Blocked:" + toString(cs)))
501- else dc
528+ else (cy == q))
529+ then throw(("Blocked:" + toString(cy)))
530+ else di
502531 }
503532
504533
505-func dQ (dR) = {
506- let dS = g
507- let dT = dR[0]
508- let dU = dR[1]
509- let dV = parseBigIntValue(j)
510- let dW = (parseBigIntValue(aG) * dV)
511- let dX = (dT + dU)
512- if ((dX == e))
534+func ej (ek) = {
535+ let el = g
536+ let em = ek[0]
537+ let en = ek[1]
538+ let eo = parseBigIntValue(j)
539+ let ep = (parseBigIntValue(aM) * eo)
540+ let eq = (em + en)
541+ if ((eq == e))
513542 then e
514543 else {
515- let dY = (dW * dS)
516- let dZ = (((dT * dU) * dS) * dS)
517- let ea = ((dY * dX) / dV)
518- let eb = (dY - dV)
519- let ec = (dS + f)
520- func ed (ee,ef) = {
521- let eg = ee
522- let eh = eg._1
523- let ei = eg._2
524- if ((ei != unit))
525- then ee
544+ let er = (ep * el)
545+ let es = (((em * en) * el) * el)
546+ let et = ((er * eq) / eo)
547+ let eu = (er - eo)
548+ let ev = (el + f)
549+ func ew (ex,ey) = {
550+ let ez = ex
551+ let eA = ez._1
552+ let eB = ez._2
553+ if ((eB != unit))
554+ then ex
526555 else {
527- let ej = (((eh * eh) * eh) / dZ)
528- let ek = (((ea + (ej * dS)) * eh) / (((eb * eh) / dV) + (ec * ej)))
529- let el = Q((ek - value(eh)))
530- if ((f >= el))
531- then $Tuple2(ek, ef)
532- else $Tuple2(ek, unit)
556+ let eC = (((eA * eA) * eA) / es)
557+ let eD = (((et + (eC * el)) * eA) / (((eu * eA) / eo) + (ev * eC)))
558+ let eE = Q((eD - value(eA)))
559+ if ((f >= eE))
560+ then $Tuple2(eD, ey)
561+ else $Tuple2(eD, unit)
533562 }
534563 }
535564
536- let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
537- let en = {
538- let eo = em
539- let ep = size(eo)
540- let eq = $Tuple2(dX, unit)
541- func er (es,et) = if ((et >= ep))
542- then es
543- else ed(es, eo[et])
565+ let eF = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
566+ let eG = {
567+ let eH = eF
568+ let eI = size(eH)
569+ let eJ = $Tuple2(eq, unit)
570+ func eK (eL,eM) = if ((eM >= eI))
571+ then eL
572+ else ew(eL, eH[eM])
544573
545- func eu (es,et) = if ((et >= ep))
546- then es
574+ func eN (eL,eM) = if ((eM >= eI))
575+ then eL
547576 else throw("List size exceeds 15")
548577
549- eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
578+ eN(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
550579 }
551- let eh = en._1
552- let ei = en._2
553- if ((ei != unit))
554- then eh
555- else throw(("D calculation error, D = " + toString(eh)))
580+ let eA = eG._1
581+ let eB = eG._2
582+ if ((eB != unit))
583+ then eA
584+ else throw(("D calculation error, D = " + toString(eA)))
556585 }
557586 }
558587
559588
560-func ev (dR,dK,ew) = {
561- let dS = g
562- let ex = dR[if ((dK == 0))
589+func eO (ek,ed,eP) = {
590+ let el = g
591+ let eQ = ek[if ((ed == 0))
563592 then 1
564593 else 0]
565- let dV = parseBigIntValue(j)
566- let dW = (parseBigIntValue(aG) * dV)
567- let dX = ex
568- let dY = (dW * dS)
569- let ey = (((((ew * ew) / (ex * dS)) * ew) * dV) / (dY * dS))
570- let ez = ((dX + ((ew * dV) / dY)) - ew)
571- func ed (ee,ef) = {
572- let eA = ee
573- let eB = eA._1
574- let ei = eA._2
575- if ((ei != unit))
576- then ee
594+ let eo = parseBigIntValue(j)
595+ let ep = (parseBigIntValue(aM) * eo)
596+ let eq = eQ
597+ let er = (ep * el)
598+ let eR = (((((eP * eP) / (eQ * el)) * eP) * eo) / (er * el))
599+ let eS = ((eq + ((eP * eo) / er)) - eP)
600+ func ew (ex,ey) = {
601+ let eT = ex
602+ let eU = eT._1
603+ let eB = eT._2
604+ if ((eB != unit))
605+ then ex
577606 else {
578- let eC = (((eB * eB) + ey) / ((g * eB) + ez))
579- let eD = Q((eC - value(eB)))
580- if ((f >= eD))
581- then $Tuple2(eC, ef)
582- else $Tuple2(eC, unit)
607+ let eV = (((eU * eU) + eR) / ((g * eU) + eS))
608+ let eW = Q((eV - value(eU)))
609+ if ((f >= eW))
610+ then $Tuple2(eV, ey)
611+ else $Tuple2(eV, unit)
583612 }
584613 }
585614
586- let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
587- let eE = {
588- let eo = em
589- let ep = size(eo)
590- let eq = $Tuple2(ew, unit)
591- func er (es,et) = if ((et >= ep))
592- then es
593- else ed(es, eo[et])
615+ let eF = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
616+ let eX = {
617+ let eH = eF
618+ let eI = size(eH)
619+ let eJ = $Tuple2(eP, unit)
620+ func eK (eL,eM) = if ((eM >= eI))
621+ then eL
622+ else ew(eL, eH[eM])
594623
595- func eu (es,et) = if ((et >= ep))
596- then es
624+ func eN (eL,eM) = if ((eM >= eI))
625+ then eL
597626 else throw("List size exceeds 15")
598627
599- eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
628+ eN(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
600629 }
601- let eB = eE._1
602- let ei = eE._2
603- if ((ei != unit))
604- then eB
605- else throw(("Y calculation error, Y = " + toString(eB)))
630+ let eU = eX._1
631+ let eB = eX._2
632+ if ((eB != unit))
633+ then eU
634+ else throw(("Y calculation error, Y = " + toString(eU)))
606635 }
607636
608637
609-func eF (eG,ck,cm,aa,eH) = {
610- let aS = aK()
611- let co = aS[u]
612- let cp = aS[v]
613- let cn = aS[t]
614- let cW = parseIntValue(aS[w])
615- let cX = parseIntValue(aS[x])
616- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
617- let eJ = if ((eI > e))
638+func eY (eZ,cq,cs,aa,fa) = {
639+ let aY = aQ()
640+ let cu = aY[u]
641+ let cv = aY[v]
642+ let ct = aY[t]
643+ let dc = parseIntValue(aY[w])
644+ let dd = parseIntValue(aY[x])
645+ let dN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(ct)), "invalid lp asset").quantity)
646+ let fb = if ((dN > e))
618647 then true
619648 else throw("initial deposit requires all coins")
620- if ((eJ == eJ))
649+ if ((fb == fb))
621650 then {
622- let cu = bx(co)
623- let cw = bx(cp)
624- let eK = if ((aa == ""))
625- then $Tuple2(cu, cw)
626- else if ((ck == co))
627- then if ((eG > cu))
651+ let cA = bD(cu)
652+ let cC = bD(cv)
653+ let fc = if ((aa == ""))
654+ then $Tuple2(cA, cC)
655+ else if ((cq == cu))
656+ then if ((eZ > cA))
628657 then throw("invalid payment amount")
629- else $Tuple2((cu - eG), cw)
630- else if ((ck == cp))
631- then if ((eG > cw))
658+ else $Tuple2((cA - eZ), cC)
659+ else if ((cq == cv))
660+ then if ((eZ > cC))
632661 then throw("invalid payment amount")
633- else $Tuple2(cu, (cw - eG))
662+ else $Tuple2(cA, (cC - eZ))
634663 else throw("wrong pmtAssetId")
635- let eL = eK._1
636- let eM = eK._2
637- let eN = if ((ck == co))
638- then $Tuple2(eG, 0)
639- else if ((ck == cp))
640- then $Tuple2(0, eG)
664+ let fd = fc._1
665+ let fe = fc._2
666+ let ff = if ((cq == cu))
667+ then $Tuple2(eZ, 0)
668+ else if ((cq == cv))
669+ then $Tuple2(0, eZ)
641670 else throw("invalid payment")
642- let eO = eN._1
643- let eP = eN._2
644- let eQ = if (eH)
645- then $Tuple3(cf(eO)._1, cf(eP)._1, cf(eG)._2)
646- else $Tuple3(eO, eP, 0)
647- let eR = eQ._1
648- let eS = eQ._2
649- let ch = eQ._3
650- let eT = (eL + eR)
651- let eU = (eM + eS)
652- let bK = dQ([toBigInt(eL), toBigInt(eM)])
653- let bJ = dQ([toBigInt(eT), toBigInt(eU)])
654- let eV = if ((bJ > bK))
671+ let fg = ff._1
672+ let fh = ff._2
673+ let fi = if (fa)
674+ then $Tuple3(cl(fg)._1, cl(fh)._1, cl(eZ)._2)
675+ else $Tuple3(fg, fh, 0)
676+ let fj = fi._1
677+ let fk = fi._2
678+ let cn = fi._3
679+ let fl = (fd + fj)
680+ let fm = (fe + fk)
681+ let bQ = ej([toBigInt(fd), toBigInt(fe)])
682+ let bP = ej([toBigInt(fl), toBigInt(fm)])
683+ let fn = if ((bP > bQ))
655684 then true
656685 else throw()
657- if ((eV == eV))
686+ if ((fn == fn))
658687 then {
659- let eW = fraction(eI, (bJ - bK), bK)
660- let cz = I(bz(F(eU, cX), F(eT, cW)), a)
661- let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, aa), bi(eO, eP, toInt(eW), cz, 0, 0, height, lastBlock.timestamp, 0, 0))]
662- let eX = fraction(eM, a, eL)
663- let eY = fraction(eG, a, (eX + a))
664- let eZ = (eG - eY)
665- let fa = fraction(eI, toBigInt(eZ), toBigInt(eM))
666- let fb = toInt(fraction((eW - fa), b, fa))
667- $Tuple4(toInt(eW), dv, ch, fb)
688+ let fo = fraction(dN, (bP - bQ), bQ)
689+ let cF = I(bF(F(fm, dd), F(fl, dc)), a)
690+ let dB = [IntegerEntry(U(), cF), IntegerEntry(V(height, lastBlock.timestamp), cF), StringEntry(Y(cs, aa), bo(fg, fh, toInt(fo), cF, 0, 0, height, lastBlock.timestamp, 0, 0))]
691+ let fp = fraction(fe, a, fd)
692+ let fq = fraction(eZ, a, (fp + a))
693+ let fr = (eZ - fq)
694+ let fs = fraction(dN, toBigInt(fr), toBigInt(fe))
695+ let ft = toInt(fraction((fo - fs), b, fs))
696+ $Tuple4(toInt(fo), dB, cn, ft)
668697 }
669698 else throw("Strict value is not equal to itself.")
670699 }
672701 }
673702
674703
675-func fc (fd,fe,ff,dN,fg,fh) = {
676- let aS = aK()
677- let cn = aS[t]
678- let co = aS[u]
679- let cp = aS[v]
680- let fi = parseIntValue(aS[w])
681- let fj = parseIntValue(aS[x])
682- let fk = aS[s]
683- let cm = if ((dN == bh))
684- then fg
685- else dN
686- let dL = value(ff[0])
687- let ck = value(dL.assetId)
688- let cQ = dL.amount
689- let cj = toBase58String(fh)
690- if ((cn != toBase58String(ck)))
704+func fu (fv,fw,fx,eg,fy,fz) = {
705+ let aY = aQ()
706+ let ct = aY[t]
707+ let cu = aY[u]
708+ let cv = aY[v]
709+ let fA = parseIntValue(aY[w])
710+ let fB = parseIntValue(aY[x])
711+ let fC = aY[s]
712+ let cs = if ((eg == bn))
713+ then fy
714+ else eg
715+ let ee = value(fx[0])
716+ let cq = value(ee.assetId)
717+ let cW = ee.amount
718+ let cp = toBase58String(fz)
719+ if ((ct != toBase58String(cq)))
691720 then throw("Wrong LP")
692721 else {
693- let cu = bx(co)
694- let cw = bx(cp)
695- let fl = {
696- let fm = invoke(this, "getOneTknV2READONLY", [fd, cQ], nil)
697- if ($isInstanceOf(fm, "(Int, Int)"))
698- then fm
699- else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
722+ let cA = bD(cu)
723+ let cC = bD(cv)
724+ let fD = {
725+ let fE = invoke(this, "getOneTknV2READONLY", [fv, cW], nil)
726+ if ($isInstanceOf(fE, "(Int, Int)"))
727+ then fE
728+ else throw(($getType(fE) + " couldn't be cast to (Int, Int)"))
700729 }
701- if ((fl == fl))
730+ if ((fD == fD))
702731 then {
703- let ch = fl._2
704- let fn = fl._1
705- let fo = if (if ((fe > 0))
706- then (fe > fn)
732+ let cn = fD._2
733+ let fF = fD._1
734+ let fG = if (if ((fw > 0))
735+ then (fw > fF)
707736 else false)
708- then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
709- else fn
710- let fp = if ((fd == co))
711- then $Tuple4(fo, 0, ((cu - fo) - ch), cw)
712- else if ((fd == cp))
713- then $Tuple4(0, fo, cu, ((cw - fo) - ch))
737+ then aI(makeString(["amount to receive is less than ", toString(fw)], ""))
738+ else fF
739+ let fH = if ((fv == cu))
740+ then $Tuple4(fG, 0, ((cA - fG) - cn), cC)
741+ else if ((fv == cv))
742+ then $Tuple4(0, fG, cA, ((cC - fG) - cn))
714743 else throw("invalid out asset id")
715- let fq = fp._1
716- let fr = fp._2
717- let eT = fp._3
718- let eU = fp._4
719- let fs = bz(F(eU, fj), F(eT, fi))
720- let ft = I(fs, a)
721- let fu = if ((fd == "WAVES"))
744+ let fI = fH._1
745+ let fJ = fH._2
746+ let fl = fH._3
747+ let fm = fH._4
748+ let fK = bF(F(fm, fB), F(fl, fA))
749+ let fL = I(fK, a)
750+ let fM = if ((fv == "WAVES"))
722751 then unit
723- else fromBase58String(fd)
724- let fv = if ((ch > 0))
725- then [ScriptTransfer(aJ, ch, fu)]
752+ else fromBase58String(fv)
753+ let fN = if ((cn > 0))
754+ then [ScriptTransfer(aP, cn, fM)]
726755 else nil
727- let cG = ([ScriptTransfer(cm, fo, fu), StringEntry(ab(toString(cm), cj), bt(fq, fr, cQ, ft, height, lastBlock.timestamp)), IntegerEntry(U(), ft), IntegerEntry(V(height, lastBlock.timestamp), ft)] ++ fv)
728- if ((cG == cG))
756+ let cM = ([ScriptTransfer(cs, fG, fM), StringEntry(ab(toString(cs), cp), bz(fI, fJ, cW, fL, height, lastBlock.timestamp)), IntegerEntry(U(), fL), IntegerEntry(V(height, lastBlock.timestamp), fL)] ++ fN)
757+ if ((cM == cM))
729758 then {
730- let fw = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
731- if ((fw == fw))
732- then $Tuple2(cG, fo)
759+ let fO = invoke(aL, "burn", [cW], [AttachedPayment(cq, cW)])
760+ if ((fO == fO))
761+ then $Tuple2(cM, fG)
733762 else throw("Strict value is not equal to itself.")
734763 }
735764 else throw("Strict value is not equal to itself.")
739768 }
740769
741770
742-func fx () = {
743- let ax = getString(S())
744- if ($isInstanceOf(ax, "String"))
771+func fP () = {
772+ let aC = getString(S())
773+ if ($isInstanceOf(aC, "String"))
745774 then {
746- let dX = ax
747- fromBase58String(dX)
775+ let eq = aC
776+ fromBase58String(eq)
748777 }
749- else if ($isInstanceOf(ax, "Unit"))
778+ else if ($isInstanceOf(aC, "Unit"))
750779 then unit
751780 else throw("Match error")
752781 }
753782
754783
755-func fy () = {
756- let ax = getString(T())
757- if ($isInstanceOf(ax, "String"))
784+func fQ () = {
785+ let aC = getString(T())
786+ if ($isInstanceOf(aC, "String"))
758787 then {
759- let dX = ax
760- fromBase58String(dX)
788+ let eq = aC
789+ fromBase58String(eq)
761790 }
762- else if ($isInstanceOf(ax, "Unit"))
791+ else if ($isInstanceOf(aC, "Unit"))
763792 then unit
764793 else throw("Match error")
765794 }
766795
767796
768-let fz = throw("Permission denied")
797+let fR = throw("Permission denied")
769798
770-func fA (dK) = {
771- let ax = fx()
772- if ($isInstanceOf(ax, "ByteVector"))
799+func fS (ed) = {
800+ let aC = fP()
801+ if ($isInstanceOf(aC, "ByteVector"))
773802 then {
774- let fB = ax
775- (dK.callerPublicKey == fB)
803+ let fT = aC
804+ (ed.callerPublicKey == fT)
776805 }
777- else if ($isInstanceOf(ax, "Unit"))
778- then (dK.caller == this)
806+ else if ($isInstanceOf(aC, "Unit"))
807+ then (ed.caller == this)
779808 else throw("Match error")
780809 }
781810
782811
783-func fC (dK) = {
784- let ax = fx()
785- if ($isInstanceOf(ax, "ByteVector"))
812+func fU (ed) = {
813+ let aC = fP()
814+ if ($isInstanceOf(aC, "ByteVector"))
786815 then {
787- let fB = ax
788- if ((dK.callerPublicKey == fB))
816+ let fT = aC
817+ if ((ed.callerPublicKey == fT))
789818 then true
790- else fz
819+ else fR
791820 }
792- else if ($isInstanceOf(ax, "Unit"))
793- then if ((dK.caller == this))
821+ else if ($isInstanceOf(aC, "Unit"))
822+ then if ((ed.caller == this))
794823 then true
795- else fz
824+ else fR
796825 else throw("Match error")
797826 }
798827
799828
800-@Callable(dK)
829+@Callable(ed)
801830 func constructor (R) = {
802- let ey = fC(dK)
803- if ((ey == ey))
831+ let eR = fU(ed)
832+ if ((eR == eR))
804833 then [StringEntry(R(), R)]
805834 else throw("Strict value is not equal to itself.")
806835 }
807836
808837
809838
810-@Callable(dK)
811-func setManager (fD) = {
812- let ey = fC(dK)
813- if ((ey == ey))
839+@Callable(ed)
840+func setManager (fV) = {
841+ let eR = fU(ed)
842+ if ((eR == eR))
814843 then {
815- let fE = fromBase58String(fD)
816- if ((fE == fE))
817- then [StringEntry(T(), fD)]
844+ let fW = fromBase58String(fV)
845+ if ((fW == fW))
846+ then [StringEntry(T(), fV)]
818847 else throw("Strict value is not equal to itself.")
819848 }
820849 else throw("Strict value is not equal to itself.")
822851
823852
824853
825-@Callable(dK)
854+@Callable(ed)
826855 func confirmManager () = {
827- let ce = fy()
828- let fF = if (isDefined(ce))
856+ let ck = fQ()
857+ let fX = if (isDefined(ck))
829858 then true
830859 else throw("No pending manager")
831- if ((fF == fF))
860+ if ((fX == fX))
832861 then {
833- let fG = if ((dK.callerPublicKey == value(ce)))
862+ let fY = if ((ed.callerPublicKey == value(ck)))
834863 then true
835864 else throw("You are not pending manager")
836- if ((fG == fG))
837- then [StringEntry(S(), toBase58String(value(ce))), DeleteEntry(T())]
865+ if ((fY == fY))
866+ then [StringEntry(S(), toBase58String(value(ck))), DeleteEntry(T())]
838867 else throw("Strict value is not equal to itself.")
839868 }
840869 else throw("Strict value is not equal to itself.")
842871
843872
844873
845-@Callable(dK)
846-func put (fH,fI) = {
847- let fJ = bc()
848- let fK = valueOrErrorMessage(addressFromString(fJ[A]), "Wr st addr")
849- let fL = valueOrErrorMessage(addressFromString(fJ[C]), "Wr sl addr")
850- if ((0 > fH))
874+@Callable(ed)
875+func put (fZ,ga) = {
876+ let gb = bi()
877+ let gc = valueOrErrorMessage(addressFromString(gb[A]), "Wr st addr")
878+ let gd = valueOrErrorMessage(addressFromString(gb[C]), "Wr sl addr")
879+ if ((0 > fZ))
851880 then throw("Wrong slippage")
852- else if ((size(dK.payments) != 2))
881+ else if ((size(ed.payments) != 2))
853882 then throw("2 pmnts expd")
854883 else {
855- let fM = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fH, true, false, true, 0, "")
856- let dp = fM._2
857- let fN = fM._7
858- let cG = fM._9
859- let dq = fM._10
860- let dr = fM._11
861- let co = fM._12
862- let cp = fM._13
863- let dc = invoke(aF, "emit", [dp], nil)
864- if ((dc == dc))
884+ let ge = ef(toString(ed.caller), toBase58String(ed.transactionId), AttachedPayment(value(ed.payments[0]).assetId, value(ed.payments[0]).amount), ed.payments[1], fZ, true, false, true, 0, "")
885+ let dv = ge._2
886+ let gf = ge._7
887+ let cM = ge._9
888+ let dw = ge._10
889+ let dx = ge._11
890+ let cu = ge._12
891+ let cv = ge._13
892+ let di = invoke(aL, "emit", [dv], nil)
893+ if ((di == di))
865894 then {
866- let fO = {
867- let ax = dc
868- if ($isInstanceOf(ax, "Address"))
895+ let gg = {
896+ let aC = di
897+ if ($isInstanceOf(aC, "Address"))
869898 then {
870- let fP = ax
871- invoke(fP, "emit", [dp], nil)
899+ let gh = aC
900+ invoke(gh, "emit", [dv], nil)
872901 }
873902 else unit
874903 }
875- if ((fO == fO))
904+ if ((gg == gg))
876905 then {
877- let fQ = if ((dq > 0))
878- then invoke(fL, "put", nil, [AttachedPayment(co, dq)])
906+ let gi = if ((dw > 0))
907+ then invoke(gd, "put", nil, [AttachedPayment(cu, dw)])
879908 else nil
880- if ((fQ == fQ))
909+ if ((gi == gi))
881910 then {
882- let fR = if ((dr > 0))
883- then invoke(fL, "put", nil, [AttachedPayment(cp, dr)])
911+ let gj = if ((dx > 0))
912+ then invoke(gd, "put", nil, [AttachedPayment(cv, dx)])
884913 else nil
885- if ((fR == fR))
914+ if ((gj == gj))
886915 then {
887- let fS = if (fI)
916+ let gk = if (ga)
888917 then {
889- let fT = invoke(fK, "stake", nil, [AttachedPayment(fN, dp)])
890- if ((fT == fT))
918+ let gl = invoke(gc, "stake", nil, [AttachedPayment(gf, dv)])
919+ if ((gl == gl))
891920 then nil
892921 else throw("Strict value is not equal to itself.")
893922 }
894- else [ScriptTransfer(dK.caller, dp, fN)]
895- (cG ++ fS)
923+ else [ScriptTransfer(ed.caller, dv, gf)]
924+ (cM ++ gk)
896925 }
897926 else throw("Strict value is not equal to itself.")
898927 }
906935
907936
908937
909-@Callable(dK)
910-func putOneTknV2 (fe,fI) = {
911- let fU = {
912- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
913- if ($isInstanceOf(fm, "Boolean"))
914- then fm
915- else throw(($getType(fm) + " couldn't be cast to Boolean"))
938+@Callable(ed)
939+func putOneTknV2 (fw,ga) = {
940+ let gm = {
941+ let fE = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
942+ if ($isInstanceOf(fE, "Boolean"))
943+ then fE
944+ else throw(($getType(fE) + " couldn't be cast to Boolean"))
916945 }
917- let fV = if (if (if (aH())
946+ let gn = if (if (if (aN())
918947 then true
919- else (aW == o))
948+ else (bc == o))
920949 then true
921- else (aW == q))
950+ else (bc == q))
922951 then true
923- else fU
924- let fW = [if (if (!(fV))
952+ else gm
953+ let go = [if (if (!(gn))
925954 then true
926- else fA(dK))
955+ else fS(ed))
927956 then true
928- else aD("put operation is blocked by admin"), if ((size(dK.payments) == 1))
957+ else aI("put operation is blocked by admin"), if ((size(ed.payments) == 1))
929958 then true
930- else aD("exactly 1 payment are expected")]
931- if ((fW == fW))
959+ else aI("exactly 1 payment are expected")]
960+ if ((go == go))
932961 then {
933- let aS = aK()
934- let co = aS[u]
935- let cp = aS[v]
936- let cn = fromBase58String(aS[t])
937- let fi = parseIntValue(aS[w])
938- let fj = parseIntValue(aS[x])
939- let cm = if ((dK.caller == this))
940- then dK.originCaller
941- else dK.caller
942- let dL = value(dK.payments[0])
943- let ck = toBase58String(value(dL.assetId))
944- let cQ = dL.amount
945- let fX = eF(cQ, ck, toString(cm), toBase58String(dK.transactionId), true)
946- if ((fX == fX))
962+ let aY = aQ()
963+ let cu = aY[u]
964+ let cv = aY[v]
965+ let ct = fromBase58String(aY[t])
966+ let fA = parseIntValue(aY[w])
967+ let fB = parseIntValue(aY[x])
968+ let cs = if ((ed.caller == this))
969+ then ed.originCaller
970+ else ed.caller
971+ let ee = value(ed.payments[0])
972+ let cq = toBase58String(value(ee.assetId))
973+ let cW = ee.amount
974+ let gp = eY(cW, cq, toString(cs), toBase58String(ed.transactionId), true)
975+ if ((gp == gp))
947976 then {
948- let ch = fX._3
949- let cG = fX._2
950- let fY = fX._1
951- let dp = if (if ((fe > 0))
952- then (fe > fY)
977+ let cn = gp._3
978+ let cM = gp._2
979+ let gq = gp._1
980+ let dv = if (if ((fw > 0))
981+ then (fw > gq)
953982 else false)
954- then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
955- else fY
956- let fM = invoke(aF, "emit", [dp], nil)
957- if ((fM == fM))
983+ then aI(makeString(["amount to receive is less than ", toString(fw)], ""))
984+ else gq
985+ let ge = invoke(aL, "emit", [dv], nil)
986+ if ((ge == ge))
958987 then {
959- let fO = {
960- let ax = fM
961- if ($isInstanceOf(ax, "Address"))
988+ let gg = {
989+ let aC = ge
990+ if ($isInstanceOf(aC, "Address"))
962991 then {
963- let fP = ax
964- invoke(fP, "emit", [dp], nil)
992+ let gh = aC
993+ invoke(gh, "emit", [dv], nil)
965994 }
966995 else unit
967996 }
968- if ((fO == fO))
997+ if ((gg == gg))
969998 then {
970- let fS = if (fI)
999+ let gk = if (ga)
9711000 then {
972- let fT = invoke(be, "stake", nil, [AttachedPayment(cn, dp)])
973- if ((fT == fT))
1001+ let gl = invoke(bk, "stake", nil, [AttachedPayment(ct, dv)])
1002+ if ((gl == gl))
9741003 then nil
9751004 else throw("Strict value is not equal to itself.")
9761005 }
977- else [ScriptTransfer(dK.caller, dp, cn)]
978- let fv = if ((ch > 0))
979- then [ScriptTransfer(aJ, ch, fromBase58String(ck))]
1006+ else [ScriptTransfer(ed.caller, dv, ct)]
1007+ let fN = if ((cn > 0))
1008+ then [ScriptTransfer(aP, cn, fromBase58String(cq))]
9801009 else nil
981- $Tuple2(((cG ++ fS) ++ fv), dp)
1010+ $Tuple2(((cM ++ gk) ++ fN), dv)
9821011 }
9831012 else throw("Strict value is not equal to itself.")
9841013 }
9911020
9921021
9931022
994-@Callable(dK)
995-func putForFree (fZ) = if ((0 > fZ))
1023+@Callable(ed)
1024+func putForFree (gr) = if ((0 > gr))
9961025 then throw("Wrong slpg")
997- else if ((size(dK.payments) != 2))
1026+ else if ((size(ed.payments) != 2))
9981027 then throw("2 pmnts expd")
9991028 else {
1000- let ga = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fZ, false, false, true, 0, "")
1001- ga._9
1029+ let gs = ef(toString(ed.caller), toBase58String(ed.transactionId), AttachedPayment(value(ed.payments[0]).assetId, value(ed.payments[0]).amount), ed.payments[1], gr, false, false, true, 0, "")
1030+ gs._9
10021031 }
10031032
10041033
10051034
1006-@Callable(dK)
1035+@Callable(ed)
10071036 func get () = {
1008- let dc = dJ(dK)
1009- let gb = dc._1
1010- let cF = dc._2
1011- let cQ = dc._3
1012- let ck = dc._4
1013- let cG = dc._5
1014- let ez = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1015- if ((ez == ez))
1016- then cG
1037+ let di = ec(ed)
1038+ let gt = di._1
1039+ let cL = di._2
1040+ let cW = di._3
1041+ let cq = di._4
1042+ let cM = di._5
1043+ let eS = invoke(aL, "burn", [cW], [AttachedPayment(cq, cW)])
1044+ if ((eS == eS))
1045+ then cM
10171046 else throw("Strict value is not equal to itself.")
10181047 }
10191048
10201049
10211050
1022-@Callable(dK)
1023-func getOneTknV2 (fd,fe) = {
1024- let fU = {
1025- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1026- if ($isInstanceOf(fm, "Boolean"))
1027- then fm
1028- else throw(($getType(fm) + " couldn't be cast to Boolean"))
1051+@Callable(ed)
1052+func getOneTknV2 (fv,fw) = {
1053+ let gm = {
1054+ let fE = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1055+ if ($isInstanceOf(fE, "Boolean"))
1056+ then fE
1057+ else throw(($getType(fE) + " couldn't be cast to Boolean"))
10291058 }
1030- let gc = if (if (aH())
1059+ let gu = if (if (aN())
10311060 then true
1032- else (aW == q))
1061+ else (bc == q))
10331062 then true
1034- else fU
1035- let fW = [if (if (!(gc))
1063+ else gm
1064+ let go = [if (if (!(gu))
10361065 then true
1037- else fA(dK))
1066+ else fS(ed))
10381067 then true
1039- else aD("get operation is blocked by admin"), if ((size(dK.payments) == 1))
1068+ else aI("get operation is blocked by admin"), if ((size(ed.payments) == 1))
10401069 then true
1041- else aD("exactly 1 payment are expected")]
1042- if ((fW == fW))
1070+ else aI("exactly 1 payment are expected")]
1071+ if ((go == go))
10431072 then {
1044- let gd = fc(fd, fe, dK.payments, dK.caller, dK.originCaller, dK.transactionId)
1045- let cG = gd._1
1046- let fo = gd._2
1047- $Tuple2(cG, fo)
1073+ let gv = fu(fv, fw, ed.payments, ed.caller, ed.originCaller, ed.transactionId)
1074+ let cM = gv._1
1075+ let fG = gv._2
1076+ $Tuple2(cM, fG)
10481077 }
10491078 else throw("Strict value is not equal to itself.")
10501079 }
10511080
10521081
10531082
1054-@Callable(dK)
1083+@Callable(ed)
10551084 func refreshDlp () = nil
10561085
10571086
10581087
1059-@Callable(dK)
1060-func getOneTknV2READONLY (fd,ge) = {
1061- let aS = aK()
1062- let co = aS[u]
1063- let cp = aS[v]
1064- let cn = aS[t]
1065- let dR = [toBigInt(bx(co)), toBigInt(bx(cp))]
1066- let gf = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
1067- let bK = dQ(dR)
1068- let bJ = (bK - fraction(toBigInt(ge), bK, gf))
1069- let gg = if ((fd == co))
1088+@Callable(ed)
1089+func getOneTknV2READONLY (fv,gw) = {
1090+ let aY = aQ()
1091+ let cu = aY[u]
1092+ let cv = aY[v]
1093+ let ct = aY[t]
1094+ let ek = [toBigInt(bD(cu)), toBigInt(bD(cv))]
1095+ let dF = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(ct)), "invalid lp asset").quantity)
1096+ let bQ = ej(ek)
1097+ let bP = (bQ - fraction(toBigInt(gw), bQ, dF))
1098+ let gx = if ((fv == cu))
10701099 then 0
1071- else if ((fd == cp))
1100+ else if ((fv == cv))
10721101 then 1
10731102 else throw("invalid out asset id")
1074- let gh = ev(dR, gg, bJ)
1075- let gi = (dR[gg] - gh)
1076- let gj = max([0, toInt((gi - f))])
1077- let gk = cf(gj)
1078- let fn = gk._1
1079- let ch = gk._2
1080- $Tuple2(nil, $Tuple2(fn, ch))
1103+ let gy = eO(ek, gx, bP)
1104+ let gz = (ek[gx] - gy)
1105+ let gA = max([0, toInt((gz - f))])
1106+ let gB = cl(gA)
1107+ let fF = gB._1
1108+ let cn = gB._2
1109+ $Tuple2(nil, $Tuple2(fF, cn))
10811110 }
10821111
10831112
10841113
1085-@Callable(dK)
1086-func getOneTknV2WithBonusREADONLY (fd,ge) = {
1087- let aS = aK()
1088- let co = aS[u]
1089- let cp = aS[v]
1090- let cn = aS[t]
1091- let cu = bx(co)
1092- let cw = bx(cp)
1093- let gl = {
1094- let fm = invoke(this, "getOneTknV2READONLY", [fd, ge], nil)
1095- if ($isInstanceOf(fm, "(Int, Int)"))
1096- then fm
1097- else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
1114+@Callable(ed)
1115+func getOneTknV2WithBonusREADONLY (fv,gw) = {
1116+ let aY = aQ()
1117+ let cu = aY[u]
1118+ let cv = aY[v]
1119+ let ct = aY[t]
1120+ let cA = bD(cu)
1121+ let cC = bD(cv)
1122+ let gC = {
1123+ let fE = invoke(this, "getOneTknV2READONLY", [fv, gw], nil)
1124+ if ($isInstanceOf(fE, "(Int, Int)"))
1125+ then fE
1126+ else throw(($getType(fE) + " couldn't be cast to (Int, Int)"))
10981127 }
1099- let fn = gl._1
1100- let ch = gl._2
1101- let dc = ci("", cn, ge, this)
1102- let cE = dc._1
1103- let cF = dc._2
1104- let gm = (cE + cF)
1105- let fb = if ((gm == 0))
1106- then if ((fn == 0))
1128+ let fF = gC._1
1129+ let cn = gC._2
1130+ let di = co("", ct, gw, this)
1131+ let cK = di._1
1132+ let cL = di._2
1133+ let gD = (cK + cL)
1134+ let ft = if ((gD == 0))
1135+ then if ((fF == 0))
11071136 then 0
11081137 else throw("bonus calculation error")
1109- else fraction((fn - gm), a, gm)
1110- $Tuple2(nil, $Tuple3(fn, ch, fb))
1138+ else fraction((fF - gD), a, gD)
1139+ $Tuple2(nil, $Tuple3(fF, cn, ft))
11111140 }
11121141
11131142
11141143
1115-@Callable(dK)
1116-func getNoLess (gn,go) = {
1117- let dc = dJ(dK)
1118- let cE = dc._1
1119- let cF = dc._2
1120- let cQ = dc._3
1121- let ck = dc._4
1122- let cG = dc._5
1123- if ((gn > cE))
1124- then throw(((("Failed: " + toString(cE)) + " < ") + toString(gn)))
1125- else if ((go > cF))
1126- then throw(((("Failed: " + toString(cF)) + " < ") + toString(go)))
1144+@Callable(ed)
1145+func getNoLess (gE,gF) = {
1146+ let di = ec(ed)
1147+ let cK = di._1
1148+ let cL = di._2
1149+ let cW = di._3
1150+ let cq = di._4
1151+ let cM = di._5
1152+ if ((gE > cK))
1153+ then throw(((("Failed: " + toString(cK)) + " < ") + toString(gE)))
1154+ else if ((gF > cL))
1155+ then throw(((("Failed: " + toString(cL)) + " < ") + toString(gF)))
11271156 else {
1128- let gp = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1129- if ((gp == gp))
1130- then cG
1157+ let gG = invoke(aL, "burn", [cW], [AttachedPayment(cq, cW)])
1158+ if ((gG == gG))
1159+ then cM
11311160 else throw("Strict value is not equal to itself.")
11321161 }
11331162 }
11341163
11351164
11361165
1137-@Callable(dK)
1138-func unstakeAndGet (cg) = {
1139- let gq = if ((size(dK.payments) != 0))
1166+@Callable(ed)
1167+func unstakeAndGet (cm) = {
1168+ let gH = if ((size(ed.payments) != 0))
11401169 then throw("No pmnts expd")
11411170 else true
1142- if ((gq == gq))
1171+ if ((gH == gH))
11431172 then {
1144- let bW = aK()
1145- let gr = bc()
1146- let fN = fromBase58String(bW[t])
1147- let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1148- let gt = invoke(gs, "unstake", [toBase58String(fN), cg], nil)
1149- if ((gt == gt))
1173+ let cc = aQ()
1174+ let gI = bi()
1175+ let gf = fromBase58String(cc[t])
1176+ let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1177+ let gK = invoke(gJ, "unstake", [toBase58String(gf), cm], nil)
1178+ if ((gK == gK))
11501179 then {
1151- let dc = ci(toBase58String(dK.transactionId), toBase58String(fN), cg, dK.caller)
1152- let cs = parseIntValue(dc._9)
1153- let cG = dc._10
1154- let gu = if (if (aH())
1180+ let di = co(toBase58String(ed.transactionId), toBase58String(gf), cm, ed.caller)
1181+ let cy = parseIntValue(di._9)
1182+ let cM = di._10
1183+ let gL = if (if (aN())
11551184 then true
1156- else (cs == q))
1157- then throw(("Blocked: " + toString(cs)))
1185+ else (cy == q))
1186+ then throw(("Blocked: " + toString(cy)))
11581187 else true
1159- if ((gu == gu))
1188+ if ((gL == gL))
11601189 then {
1161- let gv = invoke(aF, "burn", [cg], [AttachedPayment(fN, cg)])
1162- if ((gv == gv))
1163- then cG
1190+ let gM = invoke(aL, "burn", [cm], [AttachedPayment(gf, cm)])
1191+ if ((gM == gM))
1192+ then cM
11641193 else throw("Strict value is not equal to itself.")
11651194 }
11661195 else throw("Strict value is not equal to itself.")
11721201
11731202
11741203
1175-@Callable(dK)
1176-func unstakeAndGetNoLess (gw,gx,go) = {
1177- let gc = if (aH())
1204+@Callable(ed)
1205+func unstakeAndGetNoLess (gN,gO,gF) = {
1206+ let gu = if (aN())
11781207 then true
1179- else (aW == q)
1180- let fW = [if (!(gc))
1208+ else (bc == q)
1209+ let go = [if (!(gu))
11811210 then true
1182- else throw("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1211+ else throw("get operation is blocked by admin"), if ((size(ed.payments) == 0))
11831212 then true
11841213 else throw("no payments are expected")]
1185- if ((fW == fW))
1214+ if ((go == go))
11861215 then {
1187- let gt = invoke(be, "unstake", [toBase58String(aX), gw], nil)
1188- if ((gt == gt))
1216+ let gK = invoke(bk, "unstake", [toBase58String(bd), gN], nil)
1217+ if ((gK == gK))
11891218 then {
1190- let gy = ci(toBase58String(dK.transactionId), toBase58String(aX), gw, dK.caller)
1191- let cE = gy._1
1192- let cF = gy._2
1193- let cG = gy._10
1194- let gz = [if ((cE >= gx))
1219+ let gP = co(toBase58String(ed.transactionId), toBase58String(bd), gN, ed.caller)
1220+ let cK = gP._1
1221+ let cL = gP._2
1222+ let cM = gP._10
1223+ let gQ = [if ((cK >= gO))
11951224 then true
1196- else throw(makeString(["amount asset amount to receive is less than ", toString(gx)], "")), if ((cF >= go))
1225+ else throw(makeString(["amount asset amount to receive is less than ", toString(gO)], "")), if ((cL >= gF))
11971226 then true
1198- else throw(makeString(["price asset amount to receive is less than ", toString(go)], ""))]
1199- if ((gz == gz))
1227+ else throw(makeString(["price asset amount to receive is less than ", toString(gF)], ""))]
1228+ if ((gQ == gQ))
12001229 then {
1201- let gp = invoke(aF, "burn", [gw], [AttachedPayment(aX, gw)])
1202- if ((gp == gp))
1203- then cG
1230+ let gG = invoke(aL, "burn", [gN], [AttachedPayment(bd, gN)])
1231+ if ((gG == gG))
1232+ then cM
12041233 else throw("Strict value is not equal to itself.")
12051234 }
12061235 else throw("Strict value is not equal to itself.")
12121241
12131242
12141243
1215-@Callable(dK)
1216-func unstakeAndGetOneTknV2 (gw,fd,fe) = {
1217- let fU = {
1218- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1219- if ($isInstanceOf(fm, "Boolean"))
1220- then fm
1221- else throw(($getType(fm) + " couldn't be cast to Boolean"))
1244+@Callable(ed)
1245+func unstakeAndGetOneTknV2 (gN,fv,fw) = {
1246+ let gm = {
1247+ let fE = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1248+ if ($isInstanceOf(fE, "Boolean"))
1249+ then fE
1250+ else throw(($getType(fE) + " couldn't be cast to Boolean"))
12221251 }
1223- let gc = if (if (aH())
1252+ let gu = if (if (aN())
12241253 then true
1225- else (aW == q))
1254+ else (bc == q))
12261255 then true
1227- else fU
1228- let fW = [if (if (!(gc))
1256+ else gm
1257+ let go = [if (if (!(gu))
12291258 then true
1230- else fA(dK))
1259+ else fS(ed))
12311260 then true
1232- else aD("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1261+ else aI("get operation is blocked by admin"), if ((size(ed.payments) == 0))
12331262 then true
1234- else aD("no payments are expected")]
1235- if ((fW == fW))
1263+ else aI("no payments are expected")]
1264+ if ((go == go))
12361265 then {
1237- let bW = aK()
1238- let gr = bc()
1239- let fN = fromBase58String(bW[t])
1240- let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1241- let gt = invoke(gs, "unstake", [toBase58String(fN), gw], nil)
1242- if ((gt == gt))
1266+ let cc = aQ()
1267+ let gI = bi()
1268+ let gf = fromBase58String(cc[t])
1269+ let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1270+ let gK = invoke(gJ, "unstake", [toBase58String(gf), gN], nil)
1271+ if ((gK == gK))
12431272 then {
1244- let gA = fc(fd, fe, [AttachedPayment(fN, gw)], dK.caller, dK.originCaller, dK.transactionId)
1245- let cG = gA._1
1246- let fo = gA._2
1247- $Tuple2(cG, fo)
1273+ let gR = fu(fv, fw, [AttachedPayment(gf, gN)], ed.caller, ed.originCaller, ed.transactionId)
1274+ let cM = gR._1
1275+ let fG = gR._2
1276+ $Tuple2(cM, fG)
12481277 }
12491278 else throw("Strict value is not equal to itself.")
12501279 }
12531282
12541283
12551284
1256-@Callable(dK)
1257-func putOneTknV2WithBonusREADONLY (gB,gC) = {
1258- let aS = aK()
1259- let co = aS[u]
1260- let cp = aS[v]
1261- let cn = aS[t]
1262- let gD = eF(gB, gC, "", "", true)
1263- let eW = gD._1
1264- let cG = gD._2
1265- let ch = gD._3
1266- let fb = gD._4
1267- $Tuple2(nil, $Tuple3(eW, ch, fb))
1285+@Callable(ed)
1286+func putOneTknV2WithBonusREADONLY (gS,gT) = {
1287+ let aY = aQ()
1288+ let cu = aY[u]
1289+ let cv = aY[v]
1290+ let ct = aY[t]
1291+ let gU = eY(gS, gT, "", "", true)
1292+ let fo = gU._1
1293+ let cM = gU._2
1294+ let cn = gU._3
1295+ let ft = gU._4
1296+ $Tuple2(nil, $Tuple3(fo, cn, ft))
12681297 }
12691298
12701299
12711300
1272-@Callable(dK)
1273-func putOneTknV2WithoutTakeFeeREADONLY (gB,gC) = {
1274- let aS = aK()
1275- let co = aS[u]
1276- let cp = aS[v]
1277- let cn = aS[t]
1278- let gE = eF(gB, gC, "", "", false)
1279- let eW = gE._1
1280- let cG = gE._2
1281- let ch = gE._3
1282- let fb = gE._4
1283- $Tuple2(nil, $Tuple3(eW, ch, fb))
1301+@Callable(ed)
1302+func putOneTknV2WithoutTakeFeeREADONLY (gS,gT) = {
1303+ let aY = aQ()
1304+ let cu = aY[u]
1305+ let cv = aY[v]
1306+ let ct = aY[t]
1307+ let gV = eY(gS, gT, "", "", false)
1308+ let fo = gV._1
1309+ let cM = gV._2
1310+ let cn = gV._3
1311+ let ft = gV._4
1312+ $Tuple2(nil, $Tuple3(fo, cn, ft))
12841313 }
12851314
12861315
12871316
1288-@Callable(dK)
1289-func activate (gF,gG) = if ((toString(dK.caller) != toString(aF)))
1317+@Callable(ed)
1318+func activate (gW,gX) = if ((toString(ed.caller) != toString(aL)))
12901319 then throw("denied")
1291- else $Tuple2([StringEntry(ac(), gF), StringEntry(ad(), gG)], "success")
1320+ else $Tuple2([StringEntry(ac(), gW), StringEntry(ad(), gX)], "success")
12921321
12931322
12941323
1295-@Callable(dK)
1296-func setS (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1297- then fz
1298- else [StringEntry(gH, gu)]
1324+@Callable(ed)
1325+func setS (gY,gL) = if ((toString(ed.caller) != aE(this, af())))
1326+ then fR
1327+ else [StringEntry(gY, gL)]
12991328
13001329
13011330
1302-@Callable(dK)
1303-func setI (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1304- then fz
1305- else [IntegerEntry(gH, gu)]
1331+@Callable(ed)
1332+func setI (gY,gL) = if ((toString(ed.caller) != aE(this, af())))
1333+ then fR
1334+ else [IntegerEntry(gY, gL)]
13061335
13071336
13081337
1309-@Callable(dK)
1310-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aK())
1338+@Callable(ed)
1339+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aQ())
13111340
13121341
13131342
1314-@Callable(dK)
1315-func getAccBalanceWrapperREADONLY (by) = $Tuple2(nil, bx(by))
1343+@Callable(ed)
1344+func getAccBalanceWrapperREADONLY (bE) = $Tuple2(nil, bD(bE))
13161345
13171346
13181347
1319-@Callable(dK)
1320-func calcPricesWrapperREADONLY (bQ,bR,bV) = {
1321- let gI = bU(bQ, bR, bV)
1322- $Tuple2(nil, [toString(gI[0]), toString(gI[1]), toString(gI[2])])
1348+@Callable(ed)
1349+func calcPricesWrapperREADONLY (bW,bX,cb) = {
1350+ let gZ = ca(bW, bX, cb)
1351+ $Tuple2(nil, [toString(gZ[0]), toString(gZ[1]), toString(gZ[2])])
13231352 }
13241353
13251354
13261355
1327-@Callable(dK)
1328-func fromX18WrapperREADONLY (J,gJ) = $Tuple2(nil, I(parseBigIntValue(J), gJ))
1356+@Callable(ed)
1357+func fromX18WrapperREADONLY (J,ha) = $Tuple2(nil, I(parseBigIntValue(J), ha))
13291358
13301359
13311360
1332-@Callable(dK)
1361+@Callable(ed)
13331362 func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H)))
13341363
13351364
13361365
1337-@Callable(dK)
1338-func calcPriceBigIntWrapperREADONLY (bA,bB) = $Tuple2(nil, toString(bz(parseBigIntValue(bA), parseBigIntValue(bB))))
1366+@Callable(ed)
1367+func calcPriceBigIntWrapperREADONLY (bG,bH) = $Tuple2(nil, toString(bF(parseBigIntValue(bG), parseBigIntValue(bH))))
13391368
13401369
13411370
1342-@Callable(dK)
1343-func estimatePutOperationWrapperREADONLY (cj,bF,cI,cJ,cK,cL,gK,cM,cN) = $Tuple2(nil, cH(cj, bF, cI, cJ, cK, cL, gK, cM, cN, true, false, 0, ""))
1371+@Callable(ed)
1372+func estimatePutOperationWrapperREADONLY (cp,bL,cO,cP,cQ,cR,hb,cS,cT) = $Tuple2(nil, cN(cp, bL, cO, cP, cQ, cR, hb, cS, cT, true, false, 0, ""))
13441373
13451374
13461375
1347-@Callable(dK)
1348-func estimateGetOperationWrapperREADONLY (cj,gL,cl,gK) = {
1349- let dc = ci(cj, gL, cl, addressFromStringValue(gK))
1350- $Tuple2(nil, $Tuple10(dc._1, dc._2, dc._3, dc._4, dc._5, dc._6, dc._7, toString(dc._8), dc._9, dc._10))
1376+@Callable(ed)
1377+func estimateGetOperationWrapperREADONLY (cp,hc,cr,hb) = {
1378+ let di = co(cp, hc, cr, addressFromStringValue(hb))
1379+ $Tuple2(nil, $Tuple10(di._1, di._2, di._3, di._4, di._5, di._6, di._7, toString(di._8), di._9, di._10))
13511380 }
13521381
13531382
13541383
1355-@Callable(dK)
1384+@Callable(ed)
13561385 func getFeeREADONLY () = $Tuple2(nil, ah)
13571386
13581387
1359-@Verifier(gM)
1360-func gN () = {
1361- let gO = {
1362- let ax = fx()
1363- if ($isInstanceOf(ax, "ByteVector"))
1388+@Verifier(hd)
1389+func he () = {
1390+ let hf = {
1391+ let aC = fP()
1392+ if ($isInstanceOf(aC, "ByteVector"))
13641393 then {
1365- let fB = ax
1366- fB
1394+ let fT = aC
1395+ fT
13671396 }
1368- else if ($isInstanceOf(ax, "Unit"))
1369- then gM.senderPublicKey
1397+ else if ($isInstanceOf(aC, "Unit"))
1398+ then hd.senderPublicKey
13701399 else throw("Match error")
13711400 }
1372- let ax = gM
1373- if ($isInstanceOf(ax, "Order"))
1401+ let aC = hd
1402+ if ($isInstanceOf(aC, "Order"))
13741403 then {
1375- let dx = ax
1376- let gP = aI()
1377- let gQ = dw(dx)
1378- let gR = sigVerify(dx.bodyBytes, dx.proofs[0], dx.senderPublicKey)
1379- let gS = sigVerify(dx.bodyBytes, dx.proofs[1], gP)
1380- if (if (if (gQ)
1381- then gR
1404+ let dQ = aC
1405+ let hg = aO()
1406+ let hh = dP(dQ)
1407+ let hi = sigVerify(dQ.bodyBytes, dQ.proofs[0], dQ.senderPublicKey)
1408+ let hj = sigVerify(dQ.bodyBytes, dQ.proofs[1], hg)
1409+ if (if (if (hh)
1410+ then hi
13821411 else false)
1383- then gS
1412+ then hj
13841413 else false)
13851414 then true
1386- else as(gQ, gR, gS)
1415+ else ax(hh, hi, hj)
13871416 }
1388- else if ($isInstanceOf(ax, "SetScriptTransaction"))
1417+ else if ($isInstanceOf(aC, "SetScriptTransaction"))
13891418 then {
1390- let dX = ax
1391- let gT = blake2b256(value(dX.script))
1392- let gU = fromBase64String(value(getString(aF, aq())))
1393- let gV = scriptHash(this)
1394- if (if ((gU == gT))
1395- then (gV != gT)
1419+ let eq = aC
1420+ let hk = blake2b256(value(eq.script))
1421+ let hl = fromBase64String(value(getString(aL, av())))
1422+ let hm = scriptHash(this)
1423+ if (if ((hl == hk))
1424+ then (hm != hk)
13961425 else false)
13971426 then true
1398- else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
1427+ else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
13991428 }
1400- else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
1429+ else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
14011430 }
14021431
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = toBigInt(100000000)
77
88 let c = toBigInt(1000000000000000000)
99
1010 let d = toBigInt(0)
1111
1212 let e = toBigInt(0)
1313
1414 let f = toBigInt(1)
1515
1616 let g = toBigInt(2)
1717
1818 let h = toBigInt((a - ((a * 1) / a)))
1919
2020 let i = "WAVES"
2121
2222 let j = "100"
2323
2424 let k = "1"
2525
2626 let l = "__"
2727
2828 let m = ""
2929
3030 let n = 1
3131
3232 let o = 2
3333
3434 let p = 3
3535
3636 let q = 4
3737
3838 let r = 1
3939
4040 let s = 2
4141
4242 let t = 3
4343
4444 let u = 4
4545
4646 let v = 5
4747
4848 let w = 6
4949
5050 let x = 7
5151
5252 let y = 8
5353
5454 let z = 9
5555
5656 let A = 1
5757
5858 let B = 6
5959
6060 let C = 7
6161
6262 let D = 10
6363
6464 let E = fraction(10, a, 10000)
6565
6666 func F (G,H) = fraction(toBigInt(G), c, toBigInt(H))
6767
6868
6969 func I (J,K) = toInt(fraction(J, toBigInt(K), c))
7070
7171
7272 func L (M,N,O) = fraction(M, N, O)
7373
7474
7575 func P (J) = if ((d > J))
7676 then -(J)
7777 else J
7878
7979
8080 func Q (J) = if ((d > J))
8181 then -(J)
8282 else J
8383
8484
8585 func R () = "%s__factoryContract"
8686
8787
8888 func S () = "%s__managerPublicKey"
8989
9090
9191 func T () = "%s__pendingManagerPublicKey"
9292
9393
9494 func U () = "%s%s__price__last"
9595
9696
9797 func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], l)
9898
9999
100100 func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
101101
102102
103103 func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
104104
105105
106106 func ac () = "%s__amountAsset"
107107
108108
109109 func ad () = "%s__priceAsset"
110110
111111
112112 func ae () = "%s__amp"
113113
114114
115115 func af () = "%s__addonAddr"
116116
117117
118118 let ag = "%s__fee"
119119
120120 let ah = valueOrElse(getInteger(this, ag), E)
121121
122-func ai () = "%s__factoryConfig"
122+let ai = makeString(["%s", "dLp"], l)
123+
124+let aj = makeString(["%s", "dLpRefreshedHeight"], l)
125+
126+let ak = makeString(["%s", "refreshDLpDelay"], l)
127+
128+let al = 30
129+
130+let am = valueOrElse(getInteger(this, ak), al)
131+
132+func an () = "%s__factoryConfig"
123133
124134
125-func aj () = "%s%s__matcher__publicKey"
135+func ao () = "%s%s__matcher__publicKey"
126136
127137
128-func ak (al,am) = (((("%d%d%s__" + al) + "__") + am) + "__config")
138+func ap (aq,ar) = (((("%d%d%s__" + aq) + "__") + ar) + "__config")
129139
130140
131-func an (ao) = ("%s%s%s__mappings__baseAsset2internalId__" + ao)
141+func as (at) = ("%s%s%s__mappings__baseAsset2internalId__" + at)
132142
133143
134-func ap () = "%s__shutdown"
144+func au () = "%s__shutdown"
135145
136146
137-func aq () = "%s__allowedLpStableScriptHash"
147+func av () = "%s__allowedLpStableScriptHash"
138148
139149
140-func ar () = "%s__feeCollectorAddress"
150+func aw () = "%s__feeCollectorAddress"
141151
142152
143-func as (at,au,av) = throw(((((("Failed: ordValid=" + toString(at)) + " sndrValid=") + toString(au)) + " mtchrValid=") + toString(av)))
153+func ax (ay,az,aA) = throw(((((("Failed: ordValid=" + toString(ay)) + " sndrValid=") + toString(az)) + " mtchrValid=") + toString(aA)))
144154
145155
146-func aw (J) = {
147- let ax = J
148- if ($isInstanceOf(ax, "String"))
156+func aB (J) = {
157+ let aC = J
158+ if ($isInstanceOf(aC, "String"))
149159 then {
150- let ay = ax
151- ay
160+ let aD = aC
161+ aD
152162 }
153163 else throw("fail cast to String")
154164 }
155165
156166
157-func az (aA,aB) = valueOrErrorMessage(getString(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
167+func aE (aF,aG) = valueOrErrorMessage(getString(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " not defined"], ""))
158168
159169
160-func aC (aA,aB) = valueOrErrorMessage(getInteger(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
170+func aH (aF,aG) = valueOrErrorMessage(getInteger(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " not defined"], ""))
161171
162172
163-func aD (aE) = throw(makeString(["lp_stable.ride:", aE], " "))
173+func aI (aJ) = throw(makeString(["lp_stable.ride:", aJ], " "))
164174
165175
166-let aF = addressFromStringValue(az(this, R()))
167-
168-let aG = az(this, ae())
169-
170-func aH () = valueOrElse(getBoolean(aF, ap()), false)
176+func aK (aJ) = makeString(["lp_stable.ride:", aJ], " ")
171177
172178
173-func aI () = fromBase58String(az(aF, aj()))
179+let aL = addressFromStringValue(aE(this, R()))
180+
181+let aM = aE(this, ae())
182+
183+func aN () = valueOrElse(getBoolean(aL, au()), false)
174184
175185
176-let aJ = addressFromStringValue(az(aF, ar()))
186+func aO () = fromBase58String(aE(aL, ao()))
177187
178-func aK () = {
179- let aL = az(this, ac())
180- let aM = az(this, ad())
181- let aN = aC(aF, an(aM))
182- let al = aC(aF, an(aL))
183- split(az(aF, ak(toString(al), toString(aN))), l)
188+
189+let aP = addressFromStringValue(aE(aL, aw()))
190+
191+func aQ () = {
192+ let aR = aE(this, ac())
193+ let aS = aE(this, ad())
194+ let aT = aH(aL, as(aS))
195+ let aq = aH(aL, as(aR))
196+ split(aE(aL, ap(toString(aq), toString(aT))), l)
184197 }
185198
186199
187-func aO (aP) = if ((aP == i))
200+func aU (aV) = if ((aV == i))
188201 then unit
189- else fromBase58String(aP)
202+ else fromBase58String(aV)
190203
191204
192-func aQ (aP) = if ((aP == unit))
205+func aW (aV) = if ((aV == unit))
193206 then i
194- else toBase58String(value(aP))
207+ else toBase58String(value(aV))
195208
196209
197-func aR (aS) = $Tuple7(addressFromStringValue(aS[r]), parseIntValue(aS[s]), fromBase58String(aS[t]), aO(aS[u]), aO(aS[v]), parseIntValue(aS[w]), parseIntValue(aS[x]))
210+func aX (aY) = $Tuple7(addressFromStringValue(aY[r]), parseIntValue(aY[s]), fromBase58String(aY[t]), aU(aY[u]), aU(aY[v]), parseIntValue(aY[w]), parseIntValue(aY[x]))
198211
199212
200-let aT = aR(aK())
213+let aZ = aX(aQ())
201214
202-let aU = aT
215+let ba = aZ
203216
204-let aV = aU._1
217+let bb = ba._1
205218
206-let aW = aU._2
219+let bc = ba._2
207220
208-let aX = aU._3
221+let bd = ba._3
209222
210-let aY = aU._4
223+let be = ba._4
211224
212-let aZ = aU._5
225+let bf = ba._5
213226
214-let ba = aU._6
227+let bg = ba._6
215228
216-let bb = aU._7
229+let bh = ba._7
217230
218-func bc () = split(az(aF, ai()), l)
231+func bi () = split(aE(aL, an()), l)
219232
220233
221-let bd = bc()
234+let bj = bi()
222235
223-let be = valueOrErrorMessage(addressFromString(bd[A]), "Invalid staking contract address")
236+let bk = valueOrErrorMessage(addressFromString(bj[A]), "Invalid staking contract address")
224237
225-let bf = valueOrErrorMessage(addressFromString(bd[C]), "Invalid slipage contract address")
238+let bl = valueOrErrorMessage(addressFromString(bj[C]), "Invalid slipage contract address")
226239
227-let bg = valueOrErrorMessage(addressFromString(bd[D]), "Invalid gwx contract address")
240+let bm = valueOrErrorMessage(addressFromString(bj[D]), "Invalid gwx contract address")
228241
229-let bh = valueOrErrorMessage(addressFromString(bd[B]), "Invalid gwx contract address")
242+let bn = valueOrErrorMessage(addressFromString(bj[B]), "Invalid gwx contract address")
230243
231-func bi (bj,bk,bl,bm,bn,bo,bp,bq,br,bs) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bj), toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs)], l)
244+func bo (bp,bq,br,bs,bt,bu,bv,bw,bx,by) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bp), toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by)], l)
232245
233246
234-func bt (bu,bv,bw,bm,bp,bq) = makeString(["%d%d%d%d%d%d", toString(bu), toString(bv), toString(bw), toString(bm), toString(bp), toString(bq)], l)
247+func bz (bA,bB,bC,bs,bv,bw) = makeString(["%d%d%d%d%d%d", toString(bA), toString(bB), toString(bC), toString(bs), toString(bv), toString(bw)], l)
235248
236249
237-func bx (by) = if ((by == "WAVES"))
250+func bD (bE) = if ((bE == "WAVES"))
238251 then wavesBalance(this).available
239- else assetBalance(this, fromBase58String(by))
252+ else assetBalance(this, fromBase58String(bE))
240253
241254
242-func bz (bA,bB) = fraction(bA, c, bB)
255+func bF (bG,bH) = fraction(bG, c, bH)
243256
244257
245-func bC (bD,bE,bF) = {
246- let bG = fraction((bD - bE), b, bE)
247- let bH = ((bF - P(bG)) > d)
248- if (!(bH))
249- then throw(("Big slpg: " + toString(bG)))
250- else $Tuple2(bH, min([bD, bE]))
258+func bI (bJ,bK,bL) = {
259+ let bM = fraction((bJ - bK), b, bK)
260+ let bN = ((bL - P(bM)) > d)
261+ if (!(bN))
262+ then throw(("Big slpg: " + toString(bM)))
263+ else $Tuple2(bN, min([bJ, bK]))
251264 }
252265
253266
254-func bI (bJ,bK,bL) = {
255- let bG = fraction(bK, b, bJ)
256- let bM = (bL > bG)
257- if (if (bM)
267+func bO (bP,bQ,bR) = {
268+ let bM = fraction(bQ, b, bP)
269+ let bS = (bR > bM)
270+ if (if (bS)
258271 then true
259- else (bK > bJ))
260- then throw(((((((toString(bK) + " ") + toString(bJ)) + " ") + toString(bG)) + " ") + toString(bL)))
261- else bM
272+ else (bQ > bP))
273+ then throw(((((((toString(bQ) + " ") + toString(bP)) + " ") + toString(bM)) + " ") + toString(bR)))
274+ else bS
262275 }
263276
264277
265-func bN (bO,bP,bQ,bR) = {
266- let bS = F(bQ, bO)
267- let bT = F(bR, bP)
268- bz(bT, bS)
278+func bT (bU,bV,bW,bX) = {
279+ let bY = F(bW, bU)
280+ let bZ = F(bX, bV)
281+ bF(bZ, bY)
269282 }
270283
271284
272-func bU (bQ,bR,bV) = {
273- let bW = aK()
274- let bX = parseIntValue(bW[w])
275- let bY = parseIntValue(bW[x])
276- let bZ = bN(bX, bY, bQ, bR)
277- let bB = F(bQ, bX)
278- let bA = F(bR, bY)
279- let ca = F(bV, a)
280- let cb = bz(bB, ca)
281- let cc = bz(bA, ca)
282-[bZ, cb, cc]
285+func ca (bW,bX,cb) = {
286+ let cc = aQ()
287+ let cd = parseIntValue(cc[w])
288+ let ce = parseIntValue(cc[x])
289+ let cf = bT(cd, ce, bW, bX)
290+ let bH = F(bW, cd)
291+ let bG = F(bX, ce)
292+ let cg = F(cb, a)
293+ let ch = bF(bH, cg)
294+ let ci = bF(bG, cg)
295+[cf, ch, ci]
283296 }
284297
285298
286-func cd (bQ,bR,bV) = {
287- let ce = bU(bQ, bR, bV)
288-[I(ce[0], a), I(ce[1], a), I(ce[2], a)]
299+func cj (bW,bX,cb) = {
300+ let ck = ca(bW, bX, cb)
301+[I(ck[0], a), I(ck[1], a), I(ck[2], a)]
289302 }
290303
291304
292-func cf (cg) = {
293- let ch = fraction(cg, ah, a)
294- $Tuple2((cg - ch), ch)
305+func cl (cm) = {
306+ let cn = fraction(cm, ah, a)
307+ $Tuple2((cm - cn), cn)
295308 }
296309
297310
298-func ci (cj,ck,cl,cm) = {
299- let bW = aK()
300- let cn = bW[t]
301- let co = bW[u]
302- let cp = bW[v]
303- let cq = parseIntValue(bW[w])
304- let cr = parseIntValue(bW[x])
305- let cs = bW[s]
306- let ct = valueOrErrorMessage(assetInfo(fromBase58String(cn)), "Wrong LP id").quantity
307- if ((cn != ck))
311+func co (cp,cq,cr,cs) = {
312+ let cc = aQ()
313+ let ct = cc[t]
314+ let cu = cc[u]
315+ let cv = cc[v]
316+ let cw = parseIntValue(cc[w])
317+ let cx = parseIntValue(cc[x])
318+ let cy = cc[s]
319+ let cz = valueOrErrorMessage(assetInfo(fromBase58String(ct)), "Wrong LP id").quantity
320+ if ((ct != cq))
308321 then throw("Wrong pmt asset")
309322 else {
310- let cu = bx(co)
311- let cv = F(cu, cq)
312- let cw = bx(cp)
313- let cx = F(cw, cr)
314- let cy = bz(cx, cv)
315- let cz = I(cy, a)
316- let cA = F(cl, a)
317- let cB = F(ct, a)
318- let cC = fraction(cv, cA, cB)
319- let cD = fraction(cx, cA, cB)
320- let cE = I(cC, cq)
321- let cF = I(cD, cr)
322- let cG = if ((cj == ""))
323+ let cA = bD(cu)
324+ let cB = F(cA, cw)
325+ let cC = bD(cv)
326+ let cD = F(cC, cx)
327+ let cE = bF(cD, cB)
328+ let cF = I(cE, a)
329+ let cG = F(cr, a)
330+ let cH = F(cz, a)
331+ let cI = fraction(cB, cG, cH)
332+ let cJ = fraction(cD, cG, cH)
333+ let cK = I(cI, cw)
334+ let cL = I(cJ, cx)
335+ let cM = if ((cp == ""))
323336 then nil
324- else [ScriptTransfer(cm, cE, if ((co == "WAVES"))
337+ else [ScriptTransfer(cs, cK, if ((cu == "WAVES"))
325338 then unit
326- else fromBase58String(co)), ScriptTransfer(cm, cF, if ((cp == "WAVES"))
339+ else fromBase58String(cu)), ScriptTransfer(cs, cL, if ((cv == "WAVES"))
327340 then unit
328- else fromBase58String(cp)), StringEntry(ab(toString(cm), cj), bt(cE, cF, cl, cz, height, lastBlock.timestamp)), IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz)]
329- $Tuple10(cE, cF, co, cp, cu, cw, ct, cy, cs, cG)
341+ else fromBase58String(cv)), StringEntry(ab(toString(cs), cp), bz(cK, cL, cr, cF, height, lastBlock.timestamp)), IntegerEntry(U(), cF), IntegerEntry(V(height, lastBlock.timestamp), cF)]
342+ $Tuple10(cK, cL, cu, cv, cA, cC, cz, cE, cy, cM)
330343 }
331344 }
332345
333346
334-func cH (cj,bF,cI,cJ,cK,cL,cm,cM,cN,cO,cP,cQ,cR) = {
335- let bW = aK()
336- let cn = fromBase58String(bW[t])
337- let cS = bW[u]
338- let cT = bW[v]
339- let cU = bW[y]
340- let cV = bW[z]
341- let cW = parseIntValue(bW[w])
342- let cX = parseIntValue(bW[x])
343- let cs = bW[s]
344- let cY = valueOrErrorMessage(assetInfo(cn), "Wr lp as").quantity
345- let cu = if (cM)
346- then bx(cS)
347- else if (if (cO)
348- then (cR == cS)
347+func cN (cp,bL,cO,cP,cQ,cR,cs,cS,cT,cU,cV,cW,cX) = {
348+ let cc = aQ()
349+ let ct = fromBase58String(cc[t])
350+ let cY = cc[u]
351+ let cZ = cc[v]
352+ let da = cc[y]
353+ let db = cc[z]
354+ let dc = parseIntValue(cc[w])
355+ let dd = parseIntValue(cc[x])
356+ let cy = cc[s]
357+ let de = valueOrErrorMessage(assetInfo(ct), "Wr lp as").quantity
358+ let cA = if (cS)
359+ then bD(cY)
360+ else if (if (cU)
361+ then (cX == cY)
349362 else false)
350- then (bx(cS) - cQ)
351- else if (cO)
352- then bx(cS)
353- else (bx(cS) - cI)
354- let cw = if (cM)
355- then bx(cT)
356- else if (if (cO)
357- then (cR == cT)
363+ then (bD(cY) - cW)
364+ else if (cU)
365+ then bD(cY)
366+ else (bD(cY) - cO)
367+ let cC = if (cS)
368+ then bD(cZ)
369+ else if (if (cU)
370+ then (cX == cZ)
358371 else false)
359- then (bx(cT) - cQ)
360- else if (cO)
361- then bx(cT)
362- else (bx(cT) - cK)
363- let cZ = F(cI, cW)
364- let da = F(cK, cX)
365- let db = bz(da, cZ)
366- let cv = F(cu, cW)
367- let cx = F(cw, cX)
368- let dc = if ((cY == 0))
372+ then (bD(cZ) - cW)
373+ else if (cU)
374+ then bD(cZ)
375+ else (bD(cZ) - cQ)
376+ let df = F(cO, dc)
377+ let dg = F(cQ, dd)
378+ let dh = bF(dg, df)
379+ let cB = F(cA, dc)
380+ let cD = F(cC, dd)
381+ let di = if ((de == 0))
369382 then {
370- let cy = d
371- let dd = d
372- let ca = pow((cZ * da), 0, toBigInt(5), 1, 0, DOWN)
373- $Tuple5(I(ca, a), I(cZ, cW), I(da, cX), bz((cx + da), (cv + cZ)), dd)
383+ let cE = d
384+ let dj = d
385+ let cg = pow((df * dg), 0, toBigInt(5), 1, 0, DOWN)
386+ $Tuple5(I(cg, a), I(df, dc), I(dg, dd), bF((cD + dg), (cB + df)), dj)
374387 }
375388 else {
376- let cy = bz(cx, cv)
377- let de = fraction(P((cy - db)), c, cy)
378- let dd = F(bF, a)
379- if (if (if (cP)
380- then (cy != d)
389+ let cE = bF(cD, cB)
390+ let dk = fraction(P((cE - dh)), c, cE)
391+ let dj = F(bL, a)
392+ if (if (if (cV)
393+ then (cE != d)
381394 else false)
382- then (de > dd)
395+ then (dk > dj)
383396 else false)
384- then throw(((("Price slippage " + toString(de)) + " > ") + toString(dd)))
397+ then throw(((("Price slippage " + toString(dk)) + " > ") + toString(dj)))
385398 else {
386- let df = F(cY, a)
387- let dg = fraction(cZ, cy, c)
388- let dh = fraction(da, c, cy)
389- let di = if ((dg > da))
390- then $Tuple2(dh, da)
391- else $Tuple2(cZ, dg)
392- let dj = di._1
393- let dk = di._2
394- let ca = fraction(df, dk, cx)
395- $Tuple5(I(ca, a), I(dj, cW), I(dk, cX), cy, dd)
399+ let dl = F(de, a)
400+ let dm = fraction(df, cE, c)
401+ let dn = fraction(dg, c, cE)
402+ let do = if ((dm > dg))
403+ then $Tuple2(dn, dg)
404+ else $Tuple2(df, dm)
405+ let dp = do._1
406+ let dq = do._2
407+ let cg = fraction(dl, dq, cD)
408+ $Tuple5(I(cg, a), I(dp, dc), I(dq, dd), cE, dj)
396409 }
397410 }
398- let dl = dc._1
399- let dm = dc._2
400- let dn = dc._3
401- let cz = I(dc._4, a)
402- let do = I(dc._5, a)
403- if ((0 >= dl))
411+ let dr = di._1
412+ let ds = di._2
413+ let dt = di._3
414+ let cF = I(di._4, a)
415+ let du = I(di._5, a)
416+ if ((0 >= dr))
404417 then throw("LP <= 0")
405418 else {
406- let dp = if (!(cN))
419+ let dv = if (!(cT))
407420 then 0
408- else dl
409- let dq = (cI - dm)
410- let dr = (cK - dn)
411- let ds = if (if (cO)
412- then (cR == cS)
421+ else dr
422+ let dw = (cO - ds)
423+ let dx = (cQ - dt)
424+ let dy = if (if (cU)
425+ then (cX == cY)
413426 else false)
414- then $Tuple2(cQ, 0)
415- else if (if (cO)
416- then (cR == cT)
427+ then $Tuple2(cW, 0)
428+ else if (if (cU)
429+ then (cX == cZ)
417430 else false)
418- then $Tuple2(0, cQ)
419- else $Tuple2(dm, dn)
420- let dt = ds._1
421- let du = ds._2
422- let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, cj), bi(dt, du, dp, cz, bF, do, height, lastBlock.timestamp, dq, dr))]
423- $Tuple13(dl, dp, cz, cu, cw, cY, cn, cs, dv, dq, dr, cJ, cL)
431+ then $Tuple2(0, cW)
432+ else $Tuple2(ds, dt)
433+ let dz = dy._1
434+ let dA = dy._2
435+ let dB = [IntegerEntry(U(), cF), IntegerEntry(V(height, lastBlock.timestamp), cF), StringEntry(Y(cs, cp), bo(dz, dA, dv, cF, bL, du, height, lastBlock.timestamp, dw, dx))]
436+ $Tuple13(dr, dv, cF, cA, cC, de, ct, cy, dB, dw, dx, cP, cR)
424437 }
425438 }
426439
427440
428-func dw (dx) = {
429- let bW = aK()
430- let dy = bW[u]
431- let dz = bW[v]
432- let cs = parseIntValue(bW[s])
433- let bX = parseIntValue(bW[w])
434- let bY = parseIntValue(bW[x])
435- let dA = bx(dy)
436- let dB = bx(dz)
437- let cy = if ((dx.orderType == Buy))
438- then bN(bX, bY, (dA + dx.amount), dB)
439- else bN(bX, bY, (dA - dx.amount), dB)
440- let cz = I(cy, a)
441- if (if (if (aH())
441+func dC (dD,dE,dF) = {
442+ let dG = fraction((dD * dE), c, dF)
443+ dG
444+ }
445+
446+
447+func dH (dI,dJ,dK) = {
448+ let dL = (bD(aW(be)) + dI)
449+ let dM = (bD(aW(bf)) + dJ)
450+ let dN = (value(assetInfo(bd)).quantity + dK)
451+ let dG = dC(toBigInt(dL), toBigInt(dM), toBigInt(dN))
452+ let dO = [IntegerEntry(aj, height), StringEntry(ai, toString(dG))]
453+ $Tuple2(dO, dG)
454+ }
455+
456+
457+func dP (dQ) = {
458+ let cc = aQ()
459+ let dR = cc[u]
460+ let dS = cc[v]
461+ let cy = parseIntValue(cc[s])
462+ let cd = parseIntValue(cc[w])
463+ let ce = parseIntValue(cc[x])
464+ let dT = bD(dR)
465+ let dU = bD(dS)
466+ let cE = if ((dQ.orderType == Buy))
467+ then bT(cd, ce, (dT + dQ.amount), dU)
468+ else bT(cd, ce, (dT - dQ.amount), dU)
469+ let cF = I(cE, a)
470+ if (if (if (aN())
442471 then true
443- else (cs == p))
472+ else (cy == p))
444473 then true
445- else (cs == q))
474+ else (cy == q))
446475 then throw("Admin blocked")
447476 else {
448- let dC = dx.assetPair.amountAsset
449- let dD = if ((dC == unit))
477+ let dV = dQ.assetPair.amountAsset
478+ let dW = if ((dV == unit))
450479 then "WAVES"
451- else toBase58String(value(dC))
452- let dE = dx.assetPair.priceAsset
453- let dF = if ((dE == unit))
480+ else toBase58String(value(dV))
481+ let dX = dQ.assetPair.priceAsset
482+ let dY = if ((dX == unit))
454483 then "WAVES"
455- else toBase58String(value(dE))
456- if (if ((dD != dy))
484+ else toBase58String(value(dX))
485+ if (if ((dW != dR))
457486 then true
458- else (dF != dz))
487+ else (dY != dS))
459488 then throw("Wr assets")
460489 else {
461- let dG = dx.price
462- let cX = fraction(a, bY, bX)
463- let dH = L(dG, a, cX)
464- let dI = if ((dx.orderType == Buy))
465- then (cz >= dH)
466- else (dH >= cz)
490+ let dZ = dQ.price
491+ let dd = fraction(a, ce, cd)
492+ let ea = L(dZ, a, dd)
493+ let eb = if ((dQ.orderType == Buy))
494+ then (cF >= ea)
495+ else (ea >= cF)
467496 true
468497 }
469498 }
470499 }
471500
472501
473-func dJ (dK) = if ((size(dK.payments) != 1))
502+func ec (ed) = if ((size(ed.payments) != 1))
474503 then throw("1 pmnt exp")
475504 else {
476- let dL = value(dK.payments[0])
477- let ck = value(dL.assetId)
478- let cQ = dL.amount
479- let dc = ci(toBase58String(dK.transactionId), toBase58String(ck), cQ, dK.caller)
480- let cE = dc._1
481- let cF = dc._2
482- let cs = parseIntValue(dc._9)
483- let cG = dc._10
484- if (if (aH())
505+ let ee = value(ed.payments[0])
506+ let cq = value(ee.assetId)
507+ let cW = ee.amount
508+ let di = co(toBase58String(ed.transactionId), toBase58String(cq), cW, ed.caller)
509+ let cK = di._1
510+ let cL = di._2
511+ let cy = parseIntValue(di._9)
512+ let cM = di._10
513+ if (if (aN())
485514 then true
486- else (cs == q))
487- then throw(("Admin blocked: " + toString(cs)))
488- else $Tuple5(cE, cF, cQ, ck, cG)
515+ else (cy == q))
516+ then throw(("Admin blocked: " + toString(cy)))
517+ else $Tuple5(cK, cL, cW, cq, cM)
489518 }
490519
491520
492-func dM (dN,aa,dO,dP,bF,cN,cO,cP,cQ,cR) = {
493- let dc = cH(aa, bF, value(dO).amount, value(dO).assetId, value(dP).amount, value(dP).assetId, dN, (aa == ""), cN, cO, cP, cQ, cR)
494- let cs = parseIntValue(dc._8)
495- if (if (if (aH())
521+func ef (eg,aa,eh,ei,bL,cT,cU,cV,cW,cX) = {
522+ let di = cN(aa, bL, value(eh).amount, value(eh).assetId, value(ei).amount, value(ei).assetId, eg, (aa == ""), cT, cU, cV, cW, cX)
523+ let cy = parseIntValue(di._8)
524+ if (if (if (aN())
496525 then true
497- else (cs == o))
526+ else (cy == o))
498527 then true
499- else (cs == q))
500- then throw(("Blocked:" + toString(cs)))
501- else dc
528+ else (cy == q))
529+ then throw(("Blocked:" + toString(cy)))
530+ else di
502531 }
503532
504533
505-func dQ (dR) = {
506- let dS = g
507- let dT = dR[0]
508- let dU = dR[1]
509- let dV = parseBigIntValue(j)
510- let dW = (parseBigIntValue(aG) * dV)
511- let dX = (dT + dU)
512- if ((dX == e))
534+func ej (ek) = {
535+ let el = g
536+ let em = ek[0]
537+ let en = ek[1]
538+ let eo = parseBigIntValue(j)
539+ let ep = (parseBigIntValue(aM) * eo)
540+ let eq = (em + en)
541+ if ((eq == e))
513542 then e
514543 else {
515- let dY = (dW * dS)
516- let dZ = (((dT * dU) * dS) * dS)
517- let ea = ((dY * dX) / dV)
518- let eb = (dY - dV)
519- let ec = (dS + f)
520- func ed (ee,ef) = {
521- let eg = ee
522- let eh = eg._1
523- let ei = eg._2
524- if ((ei != unit))
525- then ee
544+ let er = (ep * el)
545+ let es = (((em * en) * el) * el)
546+ let et = ((er * eq) / eo)
547+ let eu = (er - eo)
548+ let ev = (el + f)
549+ func ew (ex,ey) = {
550+ let ez = ex
551+ let eA = ez._1
552+ let eB = ez._2
553+ if ((eB != unit))
554+ then ex
526555 else {
527- let ej = (((eh * eh) * eh) / dZ)
528- let ek = (((ea + (ej * dS)) * eh) / (((eb * eh) / dV) + (ec * ej)))
529- let el = Q((ek - value(eh)))
530- if ((f >= el))
531- then $Tuple2(ek, ef)
532- else $Tuple2(ek, unit)
556+ let eC = (((eA * eA) * eA) / es)
557+ let eD = (((et + (eC * el)) * eA) / (((eu * eA) / eo) + (ev * eC)))
558+ let eE = Q((eD - value(eA)))
559+ if ((f >= eE))
560+ then $Tuple2(eD, ey)
561+ else $Tuple2(eD, unit)
533562 }
534563 }
535564
536- let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
537- let en = {
538- let eo = em
539- let ep = size(eo)
540- let eq = $Tuple2(dX, unit)
541- func er (es,et) = if ((et >= ep))
542- then es
543- else ed(es, eo[et])
565+ let eF = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
566+ let eG = {
567+ let eH = eF
568+ let eI = size(eH)
569+ let eJ = $Tuple2(eq, unit)
570+ func eK (eL,eM) = if ((eM >= eI))
571+ then eL
572+ else ew(eL, eH[eM])
544573
545- func eu (es,et) = if ((et >= ep))
546- then es
574+ func eN (eL,eM) = if ((eM >= eI))
575+ then eL
547576 else throw("List size exceeds 15")
548577
549- eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
578+ eN(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
550579 }
551- let eh = en._1
552- let ei = en._2
553- if ((ei != unit))
554- then eh
555- else throw(("D calculation error, D = " + toString(eh)))
580+ let eA = eG._1
581+ let eB = eG._2
582+ if ((eB != unit))
583+ then eA
584+ else throw(("D calculation error, D = " + toString(eA)))
556585 }
557586 }
558587
559588
560-func ev (dR,dK,ew) = {
561- let dS = g
562- let ex = dR[if ((dK == 0))
589+func eO (ek,ed,eP) = {
590+ let el = g
591+ let eQ = ek[if ((ed == 0))
563592 then 1
564593 else 0]
565- let dV = parseBigIntValue(j)
566- let dW = (parseBigIntValue(aG) * dV)
567- let dX = ex
568- let dY = (dW * dS)
569- let ey = (((((ew * ew) / (ex * dS)) * ew) * dV) / (dY * dS))
570- let ez = ((dX + ((ew * dV) / dY)) - ew)
571- func ed (ee,ef) = {
572- let eA = ee
573- let eB = eA._1
574- let ei = eA._2
575- if ((ei != unit))
576- then ee
594+ let eo = parseBigIntValue(j)
595+ let ep = (parseBigIntValue(aM) * eo)
596+ let eq = eQ
597+ let er = (ep * el)
598+ let eR = (((((eP * eP) / (eQ * el)) * eP) * eo) / (er * el))
599+ let eS = ((eq + ((eP * eo) / er)) - eP)
600+ func ew (ex,ey) = {
601+ let eT = ex
602+ let eU = eT._1
603+ let eB = eT._2
604+ if ((eB != unit))
605+ then ex
577606 else {
578- let eC = (((eB * eB) + ey) / ((g * eB) + ez))
579- let eD = Q((eC - value(eB)))
580- if ((f >= eD))
581- then $Tuple2(eC, ef)
582- else $Tuple2(eC, unit)
607+ let eV = (((eU * eU) + eR) / ((g * eU) + eS))
608+ let eW = Q((eV - value(eU)))
609+ if ((f >= eW))
610+ then $Tuple2(eV, ey)
611+ else $Tuple2(eV, unit)
583612 }
584613 }
585614
586- let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
587- let eE = {
588- let eo = em
589- let ep = size(eo)
590- let eq = $Tuple2(ew, unit)
591- func er (es,et) = if ((et >= ep))
592- then es
593- else ed(es, eo[et])
615+ let eF = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
616+ let eX = {
617+ let eH = eF
618+ let eI = size(eH)
619+ let eJ = $Tuple2(eP, unit)
620+ func eK (eL,eM) = if ((eM >= eI))
621+ then eL
622+ else ew(eL, eH[eM])
594623
595- func eu (es,et) = if ((et >= ep))
596- then es
624+ func eN (eL,eM) = if ((eM >= eI))
625+ then eL
597626 else throw("List size exceeds 15")
598627
599- eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
628+ eN(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eK(eJ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
600629 }
601- let eB = eE._1
602- let ei = eE._2
603- if ((ei != unit))
604- then eB
605- else throw(("Y calculation error, Y = " + toString(eB)))
630+ let eU = eX._1
631+ let eB = eX._2
632+ if ((eB != unit))
633+ then eU
634+ else throw(("Y calculation error, Y = " + toString(eU)))
606635 }
607636
608637
609-func eF (eG,ck,cm,aa,eH) = {
610- let aS = aK()
611- let co = aS[u]
612- let cp = aS[v]
613- let cn = aS[t]
614- let cW = parseIntValue(aS[w])
615- let cX = parseIntValue(aS[x])
616- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
617- let eJ = if ((eI > e))
638+func eY (eZ,cq,cs,aa,fa) = {
639+ let aY = aQ()
640+ let cu = aY[u]
641+ let cv = aY[v]
642+ let ct = aY[t]
643+ let dc = parseIntValue(aY[w])
644+ let dd = parseIntValue(aY[x])
645+ let dN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(ct)), "invalid lp asset").quantity)
646+ let fb = if ((dN > e))
618647 then true
619648 else throw("initial deposit requires all coins")
620- if ((eJ == eJ))
649+ if ((fb == fb))
621650 then {
622- let cu = bx(co)
623- let cw = bx(cp)
624- let eK = if ((aa == ""))
625- then $Tuple2(cu, cw)
626- else if ((ck == co))
627- then if ((eG > cu))
651+ let cA = bD(cu)
652+ let cC = bD(cv)
653+ let fc = if ((aa == ""))
654+ then $Tuple2(cA, cC)
655+ else if ((cq == cu))
656+ then if ((eZ > cA))
628657 then throw("invalid payment amount")
629- else $Tuple2((cu - eG), cw)
630- else if ((ck == cp))
631- then if ((eG > cw))
658+ else $Tuple2((cA - eZ), cC)
659+ else if ((cq == cv))
660+ then if ((eZ > cC))
632661 then throw("invalid payment amount")
633- else $Tuple2(cu, (cw - eG))
662+ else $Tuple2(cA, (cC - eZ))
634663 else throw("wrong pmtAssetId")
635- let eL = eK._1
636- let eM = eK._2
637- let eN = if ((ck == co))
638- then $Tuple2(eG, 0)
639- else if ((ck == cp))
640- then $Tuple2(0, eG)
664+ let fd = fc._1
665+ let fe = fc._2
666+ let ff = if ((cq == cu))
667+ then $Tuple2(eZ, 0)
668+ else if ((cq == cv))
669+ then $Tuple2(0, eZ)
641670 else throw("invalid payment")
642- let eO = eN._1
643- let eP = eN._2
644- let eQ = if (eH)
645- then $Tuple3(cf(eO)._1, cf(eP)._1, cf(eG)._2)
646- else $Tuple3(eO, eP, 0)
647- let eR = eQ._1
648- let eS = eQ._2
649- let ch = eQ._3
650- let eT = (eL + eR)
651- let eU = (eM + eS)
652- let bK = dQ([toBigInt(eL), toBigInt(eM)])
653- let bJ = dQ([toBigInt(eT), toBigInt(eU)])
654- let eV = if ((bJ > bK))
671+ let fg = ff._1
672+ let fh = ff._2
673+ let fi = if (fa)
674+ then $Tuple3(cl(fg)._1, cl(fh)._1, cl(eZ)._2)
675+ else $Tuple3(fg, fh, 0)
676+ let fj = fi._1
677+ let fk = fi._2
678+ let cn = fi._3
679+ let fl = (fd + fj)
680+ let fm = (fe + fk)
681+ let bQ = ej([toBigInt(fd), toBigInt(fe)])
682+ let bP = ej([toBigInt(fl), toBigInt(fm)])
683+ let fn = if ((bP > bQ))
655684 then true
656685 else throw()
657- if ((eV == eV))
686+ if ((fn == fn))
658687 then {
659- let eW = fraction(eI, (bJ - bK), bK)
660- let cz = I(bz(F(eU, cX), F(eT, cW)), a)
661- let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, aa), bi(eO, eP, toInt(eW), cz, 0, 0, height, lastBlock.timestamp, 0, 0))]
662- let eX = fraction(eM, a, eL)
663- let eY = fraction(eG, a, (eX + a))
664- let eZ = (eG - eY)
665- let fa = fraction(eI, toBigInt(eZ), toBigInt(eM))
666- let fb = toInt(fraction((eW - fa), b, fa))
667- $Tuple4(toInt(eW), dv, ch, fb)
688+ let fo = fraction(dN, (bP - bQ), bQ)
689+ let cF = I(bF(F(fm, dd), F(fl, dc)), a)
690+ let dB = [IntegerEntry(U(), cF), IntegerEntry(V(height, lastBlock.timestamp), cF), StringEntry(Y(cs, aa), bo(fg, fh, toInt(fo), cF, 0, 0, height, lastBlock.timestamp, 0, 0))]
691+ let fp = fraction(fe, a, fd)
692+ let fq = fraction(eZ, a, (fp + a))
693+ let fr = (eZ - fq)
694+ let fs = fraction(dN, toBigInt(fr), toBigInt(fe))
695+ let ft = toInt(fraction((fo - fs), b, fs))
696+ $Tuple4(toInt(fo), dB, cn, ft)
668697 }
669698 else throw("Strict value is not equal to itself.")
670699 }
671700 else throw("Strict value is not equal to itself.")
672701 }
673702
674703
675-func fc (fd,fe,ff,dN,fg,fh) = {
676- let aS = aK()
677- let cn = aS[t]
678- let co = aS[u]
679- let cp = aS[v]
680- let fi = parseIntValue(aS[w])
681- let fj = parseIntValue(aS[x])
682- let fk = aS[s]
683- let cm = if ((dN == bh))
684- then fg
685- else dN
686- let dL = value(ff[0])
687- let ck = value(dL.assetId)
688- let cQ = dL.amount
689- let cj = toBase58String(fh)
690- if ((cn != toBase58String(ck)))
704+func fu (fv,fw,fx,eg,fy,fz) = {
705+ let aY = aQ()
706+ let ct = aY[t]
707+ let cu = aY[u]
708+ let cv = aY[v]
709+ let fA = parseIntValue(aY[w])
710+ let fB = parseIntValue(aY[x])
711+ let fC = aY[s]
712+ let cs = if ((eg == bn))
713+ then fy
714+ else eg
715+ let ee = value(fx[0])
716+ let cq = value(ee.assetId)
717+ let cW = ee.amount
718+ let cp = toBase58String(fz)
719+ if ((ct != toBase58String(cq)))
691720 then throw("Wrong LP")
692721 else {
693- let cu = bx(co)
694- let cw = bx(cp)
695- let fl = {
696- let fm = invoke(this, "getOneTknV2READONLY", [fd, cQ], nil)
697- if ($isInstanceOf(fm, "(Int, Int)"))
698- then fm
699- else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
722+ let cA = bD(cu)
723+ let cC = bD(cv)
724+ let fD = {
725+ let fE = invoke(this, "getOneTknV2READONLY", [fv, cW], nil)
726+ if ($isInstanceOf(fE, "(Int, Int)"))
727+ then fE
728+ else throw(($getType(fE) + " couldn't be cast to (Int, Int)"))
700729 }
701- if ((fl == fl))
730+ if ((fD == fD))
702731 then {
703- let ch = fl._2
704- let fn = fl._1
705- let fo = if (if ((fe > 0))
706- then (fe > fn)
732+ let cn = fD._2
733+ let fF = fD._1
734+ let fG = if (if ((fw > 0))
735+ then (fw > fF)
707736 else false)
708- then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
709- else fn
710- let fp = if ((fd == co))
711- then $Tuple4(fo, 0, ((cu - fo) - ch), cw)
712- else if ((fd == cp))
713- then $Tuple4(0, fo, cu, ((cw - fo) - ch))
737+ then aI(makeString(["amount to receive is less than ", toString(fw)], ""))
738+ else fF
739+ let fH = if ((fv == cu))
740+ then $Tuple4(fG, 0, ((cA - fG) - cn), cC)
741+ else if ((fv == cv))
742+ then $Tuple4(0, fG, cA, ((cC - fG) - cn))
714743 else throw("invalid out asset id")
715- let fq = fp._1
716- let fr = fp._2
717- let eT = fp._3
718- let eU = fp._4
719- let fs = bz(F(eU, fj), F(eT, fi))
720- let ft = I(fs, a)
721- let fu = if ((fd == "WAVES"))
744+ let fI = fH._1
745+ let fJ = fH._2
746+ let fl = fH._3
747+ let fm = fH._4
748+ let fK = bF(F(fm, fB), F(fl, fA))
749+ let fL = I(fK, a)
750+ let fM = if ((fv == "WAVES"))
722751 then unit
723- else fromBase58String(fd)
724- let fv = if ((ch > 0))
725- then [ScriptTransfer(aJ, ch, fu)]
752+ else fromBase58String(fv)
753+ let fN = if ((cn > 0))
754+ then [ScriptTransfer(aP, cn, fM)]
726755 else nil
727- let cG = ([ScriptTransfer(cm, fo, fu), StringEntry(ab(toString(cm), cj), bt(fq, fr, cQ, ft, height, lastBlock.timestamp)), IntegerEntry(U(), ft), IntegerEntry(V(height, lastBlock.timestamp), ft)] ++ fv)
728- if ((cG == cG))
756+ let cM = ([ScriptTransfer(cs, fG, fM), StringEntry(ab(toString(cs), cp), bz(fI, fJ, cW, fL, height, lastBlock.timestamp)), IntegerEntry(U(), fL), IntegerEntry(V(height, lastBlock.timestamp), fL)] ++ fN)
757+ if ((cM == cM))
729758 then {
730- let fw = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
731- if ((fw == fw))
732- then $Tuple2(cG, fo)
759+ let fO = invoke(aL, "burn", [cW], [AttachedPayment(cq, cW)])
760+ if ((fO == fO))
761+ then $Tuple2(cM, fG)
733762 else throw("Strict value is not equal to itself.")
734763 }
735764 else throw("Strict value is not equal to itself.")
736765 }
737766 else throw("Strict value is not equal to itself.")
738767 }
739768 }
740769
741770
742-func fx () = {
743- let ax = getString(S())
744- if ($isInstanceOf(ax, "String"))
771+func fP () = {
772+ let aC = getString(S())
773+ if ($isInstanceOf(aC, "String"))
745774 then {
746- let dX = ax
747- fromBase58String(dX)
775+ let eq = aC
776+ fromBase58String(eq)
748777 }
749- else if ($isInstanceOf(ax, "Unit"))
778+ else if ($isInstanceOf(aC, "Unit"))
750779 then unit
751780 else throw("Match error")
752781 }
753782
754783
755-func fy () = {
756- let ax = getString(T())
757- if ($isInstanceOf(ax, "String"))
784+func fQ () = {
785+ let aC = getString(T())
786+ if ($isInstanceOf(aC, "String"))
758787 then {
759- let dX = ax
760- fromBase58String(dX)
788+ let eq = aC
789+ fromBase58String(eq)
761790 }
762- else if ($isInstanceOf(ax, "Unit"))
791+ else if ($isInstanceOf(aC, "Unit"))
763792 then unit
764793 else throw("Match error")
765794 }
766795
767796
768-let fz = throw("Permission denied")
797+let fR = throw("Permission denied")
769798
770-func fA (dK) = {
771- let ax = fx()
772- if ($isInstanceOf(ax, "ByteVector"))
799+func fS (ed) = {
800+ let aC = fP()
801+ if ($isInstanceOf(aC, "ByteVector"))
773802 then {
774- let fB = ax
775- (dK.callerPublicKey == fB)
803+ let fT = aC
804+ (ed.callerPublicKey == fT)
776805 }
777- else if ($isInstanceOf(ax, "Unit"))
778- then (dK.caller == this)
806+ else if ($isInstanceOf(aC, "Unit"))
807+ then (ed.caller == this)
779808 else throw("Match error")
780809 }
781810
782811
783-func fC (dK) = {
784- let ax = fx()
785- if ($isInstanceOf(ax, "ByteVector"))
812+func fU (ed) = {
813+ let aC = fP()
814+ if ($isInstanceOf(aC, "ByteVector"))
786815 then {
787- let fB = ax
788- if ((dK.callerPublicKey == fB))
816+ let fT = aC
817+ if ((ed.callerPublicKey == fT))
789818 then true
790- else fz
819+ else fR
791820 }
792- else if ($isInstanceOf(ax, "Unit"))
793- then if ((dK.caller == this))
821+ else if ($isInstanceOf(aC, "Unit"))
822+ then if ((ed.caller == this))
794823 then true
795- else fz
824+ else fR
796825 else throw("Match error")
797826 }
798827
799828
800-@Callable(dK)
829+@Callable(ed)
801830 func constructor (R) = {
802- let ey = fC(dK)
803- if ((ey == ey))
831+ let eR = fU(ed)
832+ if ((eR == eR))
804833 then [StringEntry(R(), R)]
805834 else throw("Strict value is not equal to itself.")
806835 }
807836
808837
809838
810-@Callable(dK)
811-func setManager (fD) = {
812- let ey = fC(dK)
813- if ((ey == ey))
839+@Callable(ed)
840+func setManager (fV) = {
841+ let eR = fU(ed)
842+ if ((eR == eR))
814843 then {
815- let fE = fromBase58String(fD)
816- if ((fE == fE))
817- then [StringEntry(T(), fD)]
844+ let fW = fromBase58String(fV)
845+ if ((fW == fW))
846+ then [StringEntry(T(), fV)]
818847 else throw("Strict value is not equal to itself.")
819848 }
820849 else throw("Strict value is not equal to itself.")
821850 }
822851
823852
824853
825-@Callable(dK)
854+@Callable(ed)
826855 func confirmManager () = {
827- let ce = fy()
828- let fF = if (isDefined(ce))
856+ let ck = fQ()
857+ let fX = if (isDefined(ck))
829858 then true
830859 else throw("No pending manager")
831- if ((fF == fF))
860+ if ((fX == fX))
832861 then {
833- let fG = if ((dK.callerPublicKey == value(ce)))
862+ let fY = if ((ed.callerPublicKey == value(ck)))
834863 then true
835864 else throw("You are not pending manager")
836- if ((fG == fG))
837- then [StringEntry(S(), toBase58String(value(ce))), DeleteEntry(T())]
865+ if ((fY == fY))
866+ then [StringEntry(S(), toBase58String(value(ck))), DeleteEntry(T())]
838867 else throw("Strict value is not equal to itself.")
839868 }
840869 else throw("Strict value is not equal to itself.")
841870 }
842871
843872
844873
845-@Callable(dK)
846-func put (fH,fI) = {
847- let fJ = bc()
848- let fK = valueOrErrorMessage(addressFromString(fJ[A]), "Wr st addr")
849- let fL = valueOrErrorMessage(addressFromString(fJ[C]), "Wr sl addr")
850- if ((0 > fH))
874+@Callable(ed)
875+func put (fZ,ga) = {
876+ let gb = bi()
877+ let gc = valueOrErrorMessage(addressFromString(gb[A]), "Wr st addr")
878+ let gd = valueOrErrorMessage(addressFromString(gb[C]), "Wr sl addr")
879+ if ((0 > fZ))
851880 then throw("Wrong slippage")
852- else if ((size(dK.payments) != 2))
881+ else if ((size(ed.payments) != 2))
853882 then throw("2 pmnts expd")
854883 else {
855- let fM = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fH, true, false, true, 0, "")
856- let dp = fM._2
857- let fN = fM._7
858- let cG = fM._9
859- let dq = fM._10
860- let dr = fM._11
861- let co = fM._12
862- let cp = fM._13
863- let dc = invoke(aF, "emit", [dp], nil)
864- if ((dc == dc))
884+ let ge = ef(toString(ed.caller), toBase58String(ed.transactionId), AttachedPayment(value(ed.payments[0]).assetId, value(ed.payments[0]).amount), ed.payments[1], fZ, true, false, true, 0, "")
885+ let dv = ge._2
886+ let gf = ge._7
887+ let cM = ge._9
888+ let dw = ge._10
889+ let dx = ge._11
890+ let cu = ge._12
891+ let cv = ge._13
892+ let di = invoke(aL, "emit", [dv], nil)
893+ if ((di == di))
865894 then {
866- let fO = {
867- let ax = dc
868- if ($isInstanceOf(ax, "Address"))
895+ let gg = {
896+ let aC = di
897+ if ($isInstanceOf(aC, "Address"))
869898 then {
870- let fP = ax
871- invoke(fP, "emit", [dp], nil)
899+ let gh = aC
900+ invoke(gh, "emit", [dv], nil)
872901 }
873902 else unit
874903 }
875- if ((fO == fO))
904+ if ((gg == gg))
876905 then {
877- let fQ = if ((dq > 0))
878- then invoke(fL, "put", nil, [AttachedPayment(co, dq)])
906+ let gi = if ((dw > 0))
907+ then invoke(gd, "put", nil, [AttachedPayment(cu, dw)])
879908 else nil
880- if ((fQ == fQ))
909+ if ((gi == gi))
881910 then {
882- let fR = if ((dr > 0))
883- then invoke(fL, "put", nil, [AttachedPayment(cp, dr)])
911+ let gj = if ((dx > 0))
912+ then invoke(gd, "put", nil, [AttachedPayment(cv, dx)])
884913 else nil
885- if ((fR == fR))
914+ if ((gj == gj))
886915 then {
887- let fS = if (fI)
916+ let gk = if (ga)
888917 then {
889- let fT = invoke(fK, "stake", nil, [AttachedPayment(fN, dp)])
890- if ((fT == fT))
918+ let gl = invoke(gc, "stake", nil, [AttachedPayment(gf, dv)])
919+ if ((gl == gl))
891920 then nil
892921 else throw("Strict value is not equal to itself.")
893922 }
894- else [ScriptTransfer(dK.caller, dp, fN)]
895- (cG ++ fS)
923+ else [ScriptTransfer(ed.caller, dv, gf)]
924+ (cM ++ gk)
896925 }
897926 else throw("Strict value is not equal to itself.")
898927 }
899928 else throw("Strict value is not equal to itself.")
900929 }
901930 else throw("Strict value is not equal to itself.")
902931 }
903932 else throw("Strict value is not equal to itself.")
904933 }
905934 }
906935
907936
908937
909-@Callable(dK)
910-func putOneTknV2 (fe,fI) = {
911- let fU = {
912- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
913- if ($isInstanceOf(fm, "Boolean"))
914- then fm
915- else throw(($getType(fm) + " couldn't be cast to Boolean"))
938+@Callable(ed)
939+func putOneTknV2 (fw,ga) = {
940+ let gm = {
941+ let fE = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
942+ if ($isInstanceOf(fE, "Boolean"))
943+ then fE
944+ else throw(($getType(fE) + " couldn't be cast to Boolean"))
916945 }
917- let fV = if (if (if (aH())
946+ let gn = if (if (if (aN())
918947 then true
919- else (aW == o))
948+ else (bc == o))
920949 then true
921- else (aW == q))
950+ else (bc == q))
922951 then true
923- else fU
924- let fW = [if (if (!(fV))
952+ else gm
953+ let go = [if (if (!(gn))
925954 then true
926- else fA(dK))
955+ else fS(ed))
927956 then true
928- else aD("put operation is blocked by admin"), if ((size(dK.payments) == 1))
957+ else aI("put operation is blocked by admin"), if ((size(ed.payments) == 1))
929958 then true
930- else aD("exactly 1 payment are expected")]
931- if ((fW == fW))
959+ else aI("exactly 1 payment are expected")]
960+ if ((go == go))
932961 then {
933- let aS = aK()
934- let co = aS[u]
935- let cp = aS[v]
936- let cn = fromBase58String(aS[t])
937- let fi = parseIntValue(aS[w])
938- let fj = parseIntValue(aS[x])
939- let cm = if ((dK.caller == this))
940- then dK.originCaller
941- else dK.caller
942- let dL = value(dK.payments[0])
943- let ck = toBase58String(value(dL.assetId))
944- let cQ = dL.amount
945- let fX = eF(cQ, ck, toString(cm), toBase58String(dK.transactionId), true)
946- if ((fX == fX))
962+ let aY = aQ()
963+ let cu = aY[u]
964+ let cv = aY[v]
965+ let ct = fromBase58String(aY[t])
966+ let fA = parseIntValue(aY[w])
967+ let fB = parseIntValue(aY[x])
968+ let cs = if ((ed.caller == this))
969+ then ed.originCaller
970+ else ed.caller
971+ let ee = value(ed.payments[0])
972+ let cq = toBase58String(value(ee.assetId))
973+ let cW = ee.amount
974+ let gp = eY(cW, cq, toString(cs), toBase58String(ed.transactionId), true)
975+ if ((gp == gp))
947976 then {
948- let ch = fX._3
949- let cG = fX._2
950- let fY = fX._1
951- let dp = if (if ((fe > 0))
952- then (fe > fY)
977+ let cn = gp._3
978+ let cM = gp._2
979+ let gq = gp._1
980+ let dv = if (if ((fw > 0))
981+ then (fw > gq)
953982 else false)
954- then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
955- else fY
956- let fM = invoke(aF, "emit", [dp], nil)
957- if ((fM == fM))
983+ then aI(makeString(["amount to receive is less than ", toString(fw)], ""))
984+ else gq
985+ let ge = invoke(aL, "emit", [dv], nil)
986+ if ((ge == ge))
958987 then {
959- let fO = {
960- let ax = fM
961- if ($isInstanceOf(ax, "Address"))
988+ let gg = {
989+ let aC = ge
990+ if ($isInstanceOf(aC, "Address"))
962991 then {
963- let fP = ax
964- invoke(fP, "emit", [dp], nil)
992+ let gh = aC
993+ invoke(gh, "emit", [dv], nil)
965994 }
966995 else unit
967996 }
968- if ((fO == fO))
997+ if ((gg == gg))
969998 then {
970- let fS = if (fI)
999+ let gk = if (ga)
9711000 then {
972- let fT = invoke(be, "stake", nil, [AttachedPayment(cn, dp)])
973- if ((fT == fT))
1001+ let gl = invoke(bk, "stake", nil, [AttachedPayment(ct, dv)])
1002+ if ((gl == gl))
9741003 then nil
9751004 else throw("Strict value is not equal to itself.")
9761005 }
977- else [ScriptTransfer(dK.caller, dp, cn)]
978- let fv = if ((ch > 0))
979- then [ScriptTransfer(aJ, ch, fromBase58String(ck))]
1006+ else [ScriptTransfer(ed.caller, dv, ct)]
1007+ let fN = if ((cn > 0))
1008+ then [ScriptTransfer(aP, cn, fromBase58String(cq))]
9801009 else nil
981- $Tuple2(((cG ++ fS) ++ fv), dp)
1010+ $Tuple2(((cM ++ gk) ++ fN), dv)
9821011 }
9831012 else throw("Strict value is not equal to itself.")
9841013 }
9851014 else throw("Strict value is not equal to itself.")
9861015 }
9871016 else throw("Strict value is not equal to itself.")
9881017 }
9891018 else throw("Strict value is not equal to itself.")
9901019 }
9911020
9921021
9931022
994-@Callable(dK)
995-func putForFree (fZ) = if ((0 > fZ))
1023+@Callable(ed)
1024+func putForFree (gr) = if ((0 > gr))
9961025 then throw("Wrong slpg")
997- else if ((size(dK.payments) != 2))
1026+ else if ((size(ed.payments) != 2))
9981027 then throw("2 pmnts expd")
9991028 else {
1000- let ga = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fZ, false, false, true, 0, "")
1001- ga._9
1029+ let gs = ef(toString(ed.caller), toBase58String(ed.transactionId), AttachedPayment(value(ed.payments[0]).assetId, value(ed.payments[0]).amount), ed.payments[1], gr, false, false, true, 0, "")
1030+ gs._9
10021031 }
10031032
10041033
10051034
1006-@Callable(dK)
1035+@Callable(ed)
10071036 func get () = {
1008- let dc = dJ(dK)
1009- let gb = dc._1
1010- let cF = dc._2
1011- let cQ = dc._3
1012- let ck = dc._4
1013- let cG = dc._5
1014- let ez = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1015- if ((ez == ez))
1016- then cG
1037+ let di = ec(ed)
1038+ let gt = di._1
1039+ let cL = di._2
1040+ let cW = di._3
1041+ let cq = di._4
1042+ let cM = di._5
1043+ let eS = invoke(aL, "burn", [cW], [AttachedPayment(cq, cW)])
1044+ if ((eS == eS))
1045+ then cM
10171046 else throw("Strict value is not equal to itself.")
10181047 }
10191048
10201049
10211050
1022-@Callable(dK)
1023-func getOneTknV2 (fd,fe) = {
1024- let fU = {
1025- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1026- if ($isInstanceOf(fm, "Boolean"))
1027- then fm
1028- else throw(($getType(fm) + " couldn't be cast to Boolean"))
1051+@Callable(ed)
1052+func getOneTknV2 (fv,fw) = {
1053+ let gm = {
1054+ let fE = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1055+ if ($isInstanceOf(fE, "Boolean"))
1056+ then fE
1057+ else throw(($getType(fE) + " couldn't be cast to Boolean"))
10291058 }
1030- let gc = if (if (aH())
1059+ let gu = if (if (aN())
10311060 then true
1032- else (aW == q))
1061+ else (bc == q))
10331062 then true
1034- else fU
1035- let fW = [if (if (!(gc))
1063+ else gm
1064+ let go = [if (if (!(gu))
10361065 then true
1037- else fA(dK))
1066+ else fS(ed))
10381067 then true
1039- else aD("get operation is blocked by admin"), if ((size(dK.payments) == 1))
1068+ else aI("get operation is blocked by admin"), if ((size(ed.payments) == 1))
10401069 then true
1041- else aD("exactly 1 payment are expected")]
1042- if ((fW == fW))
1070+ else aI("exactly 1 payment are expected")]
1071+ if ((go == go))
10431072 then {
1044- let gd = fc(fd, fe, dK.payments, dK.caller, dK.originCaller, dK.transactionId)
1045- let cG = gd._1
1046- let fo = gd._2
1047- $Tuple2(cG, fo)
1073+ let gv = fu(fv, fw, ed.payments, ed.caller, ed.originCaller, ed.transactionId)
1074+ let cM = gv._1
1075+ let fG = gv._2
1076+ $Tuple2(cM, fG)
10481077 }
10491078 else throw("Strict value is not equal to itself.")
10501079 }
10511080
10521081
10531082
1054-@Callable(dK)
1083+@Callable(ed)
10551084 func refreshDlp () = nil
10561085
10571086
10581087
1059-@Callable(dK)
1060-func getOneTknV2READONLY (fd,ge) = {
1061- let aS = aK()
1062- let co = aS[u]
1063- let cp = aS[v]
1064- let cn = aS[t]
1065- let dR = [toBigInt(bx(co)), toBigInt(bx(cp))]
1066- let gf = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
1067- let bK = dQ(dR)
1068- let bJ = (bK - fraction(toBigInt(ge), bK, gf))
1069- let gg = if ((fd == co))
1088+@Callable(ed)
1089+func getOneTknV2READONLY (fv,gw) = {
1090+ let aY = aQ()
1091+ let cu = aY[u]
1092+ let cv = aY[v]
1093+ let ct = aY[t]
1094+ let ek = [toBigInt(bD(cu)), toBigInt(bD(cv))]
1095+ let dF = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(ct)), "invalid lp asset").quantity)
1096+ let bQ = ej(ek)
1097+ let bP = (bQ - fraction(toBigInt(gw), bQ, dF))
1098+ let gx = if ((fv == cu))
10701099 then 0
1071- else if ((fd == cp))
1100+ else if ((fv == cv))
10721101 then 1
10731102 else throw("invalid out asset id")
1074- let gh = ev(dR, gg, bJ)
1075- let gi = (dR[gg] - gh)
1076- let gj = max([0, toInt((gi - f))])
1077- let gk = cf(gj)
1078- let fn = gk._1
1079- let ch = gk._2
1080- $Tuple2(nil, $Tuple2(fn, ch))
1103+ let gy = eO(ek, gx, bP)
1104+ let gz = (ek[gx] - gy)
1105+ let gA = max([0, toInt((gz - f))])
1106+ let gB = cl(gA)
1107+ let fF = gB._1
1108+ let cn = gB._2
1109+ $Tuple2(nil, $Tuple2(fF, cn))
10811110 }
10821111
10831112
10841113
1085-@Callable(dK)
1086-func getOneTknV2WithBonusREADONLY (fd,ge) = {
1087- let aS = aK()
1088- let co = aS[u]
1089- let cp = aS[v]
1090- let cn = aS[t]
1091- let cu = bx(co)
1092- let cw = bx(cp)
1093- let gl = {
1094- let fm = invoke(this, "getOneTknV2READONLY", [fd, ge], nil)
1095- if ($isInstanceOf(fm, "(Int, Int)"))
1096- then fm
1097- else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
1114+@Callable(ed)
1115+func getOneTknV2WithBonusREADONLY (fv,gw) = {
1116+ let aY = aQ()
1117+ let cu = aY[u]
1118+ let cv = aY[v]
1119+ let ct = aY[t]
1120+ let cA = bD(cu)
1121+ let cC = bD(cv)
1122+ let gC = {
1123+ let fE = invoke(this, "getOneTknV2READONLY", [fv, gw], nil)
1124+ if ($isInstanceOf(fE, "(Int, Int)"))
1125+ then fE
1126+ else throw(($getType(fE) + " couldn't be cast to (Int, Int)"))
10981127 }
1099- let fn = gl._1
1100- let ch = gl._2
1101- let dc = ci("", cn, ge, this)
1102- let cE = dc._1
1103- let cF = dc._2
1104- let gm = (cE + cF)
1105- let fb = if ((gm == 0))
1106- then if ((fn == 0))
1128+ let fF = gC._1
1129+ let cn = gC._2
1130+ let di = co("", ct, gw, this)
1131+ let cK = di._1
1132+ let cL = di._2
1133+ let gD = (cK + cL)
1134+ let ft = if ((gD == 0))
1135+ then if ((fF == 0))
11071136 then 0
11081137 else throw("bonus calculation error")
1109- else fraction((fn - gm), a, gm)
1110- $Tuple2(nil, $Tuple3(fn, ch, fb))
1138+ else fraction((fF - gD), a, gD)
1139+ $Tuple2(nil, $Tuple3(fF, cn, ft))
11111140 }
11121141
11131142
11141143
1115-@Callable(dK)
1116-func getNoLess (gn,go) = {
1117- let dc = dJ(dK)
1118- let cE = dc._1
1119- let cF = dc._2
1120- let cQ = dc._3
1121- let ck = dc._4
1122- let cG = dc._5
1123- if ((gn > cE))
1124- then throw(((("Failed: " + toString(cE)) + " < ") + toString(gn)))
1125- else if ((go > cF))
1126- then throw(((("Failed: " + toString(cF)) + " < ") + toString(go)))
1144+@Callable(ed)
1145+func getNoLess (gE,gF) = {
1146+ let di = ec(ed)
1147+ let cK = di._1
1148+ let cL = di._2
1149+ let cW = di._3
1150+ let cq = di._4
1151+ let cM = di._5
1152+ if ((gE > cK))
1153+ then throw(((("Failed: " + toString(cK)) + " < ") + toString(gE)))
1154+ else if ((gF > cL))
1155+ then throw(((("Failed: " + toString(cL)) + " < ") + toString(gF)))
11271156 else {
1128- let gp = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1129- if ((gp == gp))
1130- then cG
1157+ let gG = invoke(aL, "burn", [cW], [AttachedPayment(cq, cW)])
1158+ if ((gG == gG))
1159+ then cM
11311160 else throw("Strict value is not equal to itself.")
11321161 }
11331162 }
11341163
11351164
11361165
1137-@Callable(dK)
1138-func unstakeAndGet (cg) = {
1139- let gq = if ((size(dK.payments) != 0))
1166+@Callable(ed)
1167+func unstakeAndGet (cm) = {
1168+ let gH = if ((size(ed.payments) != 0))
11401169 then throw("No pmnts expd")
11411170 else true
1142- if ((gq == gq))
1171+ if ((gH == gH))
11431172 then {
1144- let bW = aK()
1145- let gr = bc()
1146- let fN = fromBase58String(bW[t])
1147- let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1148- let gt = invoke(gs, "unstake", [toBase58String(fN), cg], nil)
1149- if ((gt == gt))
1173+ let cc = aQ()
1174+ let gI = bi()
1175+ let gf = fromBase58String(cc[t])
1176+ let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1177+ let gK = invoke(gJ, "unstake", [toBase58String(gf), cm], nil)
1178+ if ((gK == gK))
11501179 then {
1151- let dc = ci(toBase58String(dK.transactionId), toBase58String(fN), cg, dK.caller)
1152- let cs = parseIntValue(dc._9)
1153- let cG = dc._10
1154- let gu = if (if (aH())
1180+ let di = co(toBase58String(ed.transactionId), toBase58String(gf), cm, ed.caller)
1181+ let cy = parseIntValue(di._9)
1182+ let cM = di._10
1183+ let gL = if (if (aN())
11551184 then true
1156- else (cs == q))
1157- then throw(("Blocked: " + toString(cs)))
1185+ else (cy == q))
1186+ then throw(("Blocked: " + toString(cy)))
11581187 else true
1159- if ((gu == gu))
1188+ if ((gL == gL))
11601189 then {
1161- let gv = invoke(aF, "burn", [cg], [AttachedPayment(fN, cg)])
1162- if ((gv == gv))
1163- then cG
1190+ let gM = invoke(aL, "burn", [cm], [AttachedPayment(gf, cm)])
1191+ if ((gM == gM))
1192+ then cM
11641193 else throw("Strict value is not equal to itself.")
11651194 }
11661195 else throw("Strict value is not equal to itself.")
11671196 }
11681197 else throw("Strict value is not equal to itself.")
11691198 }
11701199 else throw("Strict value is not equal to itself.")
11711200 }
11721201
11731202
11741203
1175-@Callable(dK)
1176-func unstakeAndGetNoLess (gw,gx,go) = {
1177- let gc = if (aH())
1204+@Callable(ed)
1205+func unstakeAndGetNoLess (gN,gO,gF) = {
1206+ let gu = if (aN())
11781207 then true
1179- else (aW == q)
1180- let fW = [if (!(gc))
1208+ else (bc == q)
1209+ let go = [if (!(gu))
11811210 then true
1182- else throw("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1211+ else throw("get operation is blocked by admin"), if ((size(ed.payments) == 0))
11831212 then true
11841213 else throw("no payments are expected")]
1185- if ((fW == fW))
1214+ if ((go == go))
11861215 then {
1187- let gt = invoke(be, "unstake", [toBase58String(aX), gw], nil)
1188- if ((gt == gt))
1216+ let gK = invoke(bk, "unstake", [toBase58String(bd), gN], nil)
1217+ if ((gK == gK))
11891218 then {
1190- let gy = ci(toBase58String(dK.transactionId), toBase58String(aX), gw, dK.caller)
1191- let cE = gy._1
1192- let cF = gy._2
1193- let cG = gy._10
1194- let gz = [if ((cE >= gx))
1219+ let gP = co(toBase58String(ed.transactionId), toBase58String(bd), gN, ed.caller)
1220+ let cK = gP._1
1221+ let cL = gP._2
1222+ let cM = gP._10
1223+ let gQ = [if ((cK >= gO))
11951224 then true
1196- else throw(makeString(["amount asset amount to receive is less than ", toString(gx)], "")), if ((cF >= go))
1225+ else throw(makeString(["amount asset amount to receive is less than ", toString(gO)], "")), if ((cL >= gF))
11971226 then true
1198- else throw(makeString(["price asset amount to receive is less than ", toString(go)], ""))]
1199- if ((gz == gz))
1227+ else throw(makeString(["price asset amount to receive is less than ", toString(gF)], ""))]
1228+ if ((gQ == gQ))
12001229 then {
1201- let gp = invoke(aF, "burn", [gw], [AttachedPayment(aX, gw)])
1202- if ((gp == gp))
1203- then cG
1230+ let gG = invoke(aL, "burn", [gN], [AttachedPayment(bd, gN)])
1231+ if ((gG == gG))
1232+ then cM
12041233 else throw("Strict value is not equal to itself.")
12051234 }
12061235 else throw("Strict value is not equal to itself.")
12071236 }
12081237 else throw("Strict value is not equal to itself.")
12091238 }
12101239 else throw("Strict value is not equal to itself.")
12111240 }
12121241
12131242
12141243
1215-@Callable(dK)
1216-func unstakeAndGetOneTknV2 (gw,fd,fe) = {
1217- let fU = {
1218- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1219- if ($isInstanceOf(fm, "Boolean"))
1220- then fm
1221- else throw(($getType(fm) + " couldn't be cast to Boolean"))
1244+@Callable(ed)
1245+func unstakeAndGetOneTknV2 (gN,fv,fw) = {
1246+ let gm = {
1247+ let fE = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1248+ if ($isInstanceOf(fE, "Boolean"))
1249+ then fE
1250+ else throw(($getType(fE) + " couldn't be cast to Boolean"))
12221251 }
1223- let gc = if (if (aH())
1252+ let gu = if (if (aN())
12241253 then true
1225- else (aW == q))
1254+ else (bc == q))
12261255 then true
1227- else fU
1228- let fW = [if (if (!(gc))
1256+ else gm
1257+ let go = [if (if (!(gu))
12291258 then true
1230- else fA(dK))
1259+ else fS(ed))
12311260 then true
1232- else aD("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1261+ else aI("get operation is blocked by admin"), if ((size(ed.payments) == 0))
12331262 then true
1234- else aD("no payments are expected")]
1235- if ((fW == fW))
1263+ else aI("no payments are expected")]
1264+ if ((go == go))
12361265 then {
1237- let bW = aK()
1238- let gr = bc()
1239- let fN = fromBase58String(bW[t])
1240- let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1241- let gt = invoke(gs, "unstake", [toBase58String(fN), gw], nil)
1242- if ((gt == gt))
1266+ let cc = aQ()
1267+ let gI = bi()
1268+ let gf = fromBase58String(cc[t])
1269+ let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1270+ let gK = invoke(gJ, "unstake", [toBase58String(gf), gN], nil)
1271+ if ((gK == gK))
12431272 then {
1244- let gA = fc(fd, fe, [AttachedPayment(fN, gw)], dK.caller, dK.originCaller, dK.transactionId)
1245- let cG = gA._1
1246- let fo = gA._2
1247- $Tuple2(cG, fo)
1273+ let gR = fu(fv, fw, [AttachedPayment(gf, gN)], ed.caller, ed.originCaller, ed.transactionId)
1274+ let cM = gR._1
1275+ let fG = gR._2
1276+ $Tuple2(cM, fG)
12481277 }
12491278 else throw("Strict value is not equal to itself.")
12501279 }
12511280 else throw("Strict value is not equal to itself.")
12521281 }
12531282
12541283
12551284
1256-@Callable(dK)
1257-func putOneTknV2WithBonusREADONLY (gB,gC) = {
1258- let aS = aK()
1259- let co = aS[u]
1260- let cp = aS[v]
1261- let cn = aS[t]
1262- let gD = eF(gB, gC, "", "", true)
1263- let eW = gD._1
1264- let cG = gD._2
1265- let ch = gD._3
1266- let fb = gD._4
1267- $Tuple2(nil, $Tuple3(eW, ch, fb))
1285+@Callable(ed)
1286+func putOneTknV2WithBonusREADONLY (gS,gT) = {
1287+ let aY = aQ()
1288+ let cu = aY[u]
1289+ let cv = aY[v]
1290+ let ct = aY[t]
1291+ let gU = eY(gS, gT, "", "", true)
1292+ let fo = gU._1
1293+ let cM = gU._2
1294+ let cn = gU._3
1295+ let ft = gU._4
1296+ $Tuple2(nil, $Tuple3(fo, cn, ft))
12681297 }
12691298
12701299
12711300
1272-@Callable(dK)
1273-func putOneTknV2WithoutTakeFeeREADONLY (gB,gC) = {
1274- let aS = aK()
1275- let co = aS[u]
1276- let cp = aS[v]
1277- let cn = aS[t]
1278- let gE = eF(gB, gC, "", "", false)
1279- let eW = gE._1
1280- let cG = gE._2
1281- let ch = gE._3
1282- let fb = gE._4
1283- $Tuple2(nil, $Tuple3(eW, ch, fb))
1301+@Callable(ed)
1302+func putOneTknV2WithoutTakeFeeREADONLY (gS,gT) = {
1303+ let aY = aQ()
1304+ let cu = aY[u]
1305+ let cv = aY[v]
1306+ let ct = aY[t]
1307+ let gV = eY(gS, gT, "", "", false)
1308+ let fo = gV._1
1309+ let cM = gV._2
1310+ let cn = gV._3
1311+ let ft = gV._4
1312+ $Tuple2(nil, $Tuple3(fo, cn, ft))
12841313 }
12851314
12861315
12871316
1288-@Callable(dK)
1289-func activate (gF,gG) = if ((toString(dK.caller) != toString(aF)))
1317+@Callable(ed)
1318+func activate (gW,gX) = if ((toString(ed.caller) != toString(aL)))
12901319 then throw("denied")
1291- else $Tuple2([StringEntry(ac(), gF), StringEntry(ad(), gG)], "success")
1320+ else $Tuple2([StringEntry(ac(), gW), StringEntry(ad(), gX)], "success")
12921321
12931322
12941323
1295-@Callable(dK)
1296-func setS (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1297- then fz
1298- else [StringEntry(gH, gu)]
1324+@Callable(ed)
1325+func setS (gY,gL) = if ((toString(ed.caller) != aE(this, af())))
1326+ then fR
1327+ else [StringEntry(gY, gL)]
12991328
13001329
13011330
1302-@Callable(dK)
1303-func setI (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1304- then fz
1305- else [IntegerEntry(gH, gu)]
1331+@Callable(ed)
1332+func setI (gY,gL) = if ((toString(ed.caller) != aE(this, af())))
1333+ then fR
1334+ else [IntegerEntry(gY, gL)]
13061335
13071336
13081337
1309-@Callable(dK)
1310-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aK())
1338+@Callable(ed)
1339+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aQ())
13111340
13121341
13131342
1314-@Callable(dK)
1315-func getAccBalanceWrapperREADONLY (by) = $Tuple2(nil, bx(by))
1343+@Callable(ed)
1344+func getAccBalanceWrapperREADONLY (bE) = $Tuple2(nil, bD(bE))
13161345
13171346
13181347
1319-@Callable(dK)
1320-func calcPricesWrapperREADONLY (bQ,bR,bV) = {
1321- let gI = bU(bQ, bR, bV)
1322- $Tuple2(nil, [toString(gI[0]), toString(gI[1]), toString(gI[2])])
1348+@Callable(ed)
1349+func calcPricesWrapperREADONLY (bW,bX,cb) = {
1350+ let gZ = ca(bW, bX, cb)
1351+ $Tuple2(nil, [toString(gZ[0]), toString(gZ[1]), toString(gZ[2])])
13231352 }
13241353
13251354
13261355
1327-@Callable(dK)
1328-func fromX18WrapperREADONLY (J,gJ) = $Tuple2(nil, I(parseBigIntValue(J), gJ))
1356+@Callable(ed)
1357+func fromX18WrapperREADONLY (J,ha) = $Tuple2(nil, I(parseBigIntValue(J), ha))
13291358
13301359
13311360
1332-@Callable(dK)
1361+@Callable(ed)
13331362 func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H)))
13341363
13351364
13361365
1337-@Callable(dK)
1338-func calcPriceBigIntWrapperREADONLY (bA,bB) = $Tuple2(nil, toString(bz(parseBigIntValue(bA), parseBigIntValue(bB))))
1366+@Callable(ed)
1367+func calcPriceBigIntWrapperREADONLY (bG,bH) = $Tuple2(nil, toString(bF(parseBigIntValue(bG), parseBigIntValue(bH))))
13391368
13401369
13411370
1342-@Callable(dK)
1343-func estimatePutOperationWrapperREADONLY (cj,bF,cI,cJ,cK,cL,gK,cM,cN) = $Tuple2(nil, cH(cj, bF, cI, cJ, cK, cL, gK, cM, cN, true, false, 0, ""))
1371+@Callable(ed)
1372+func estimatePutOperationWrapperREADONLY (cp,bL,cO,cP,cQ,cR,hb,cS,cT) = $Tuple2(nil, cN(cp, bL, cO, cP, cQ, cR, hb, cS, cT, true, false, 0, ""))
13441373
13451374
13461375
1347-@Callable(dK)
1348-func estimateGetOperationWrapperREADONLY (cj,gL,cl,gK) = {
1349- let dc = ci(cj, gL, cl, addressFromStringValue(gK))
1350- $Tuple2(nil, $Tuple10(dc._1, dc._2, dc._3, dc._4, dc._5, dc._6, dc._7, toString(dc._8), dc._9, dc._10))
1376+@Callable(ed)
1377+func estimateGetOperationWrapperREADONLY (cp,hc,cr,hb) = {
1378+ let di = co(cp, hc, cr, addressFromStringValue(hb))
1379+ $Tuple2(nil, $Tuple10(di._1, di._2, di._3, di._4, di._5, di._6, di._7, toString(di._8), di._9, di._10))
13511380 }
13521381
13531382
13541383
1355-@Callable(dK)
1384+@Callable(ed)
13561385 func getFeeREADONLY () = $Tuple2(nil, ah)
13571386
13581387
1359-@Verifier(gM)
1360-func gN () = {
1361- let gO = {
1362- let ax = fx()
1363- if ($isInstanceOf(ax, "ByteVector"))
1388+@Verifier(hd)
1389+func he () = {
1390+ let hf = {
1391+ let aC = fP()
1392+ if ($isInstanceOf(aC, "ByteVector"))
13641393 then {
1365- let fB = ax
1366- fB
1394+ let fT = aC
1395+ fT
13671396 }
1368- else if ($isInstanceOf(ax, "Unit"))
1369- then gM.senderPublicKey
1397+ else if ($isInstanceOf(aC, "Unit"))
1398+ then hd.senderPublicKey
13701399 else throw("Match error")
13711400 }
1372- let ax = gM
1373- if ($isInstanceOf(ax, "Order"))
1401+ let aC = hd
1402+ if ($isInstanceOf(aC, "Order"))
13741403 then {
1375- let dx = ax
1376- let gP = aI()
1377- let gQ = dw(dx)
1378- let gR = sigVerify(dx.bodyBytes, dx.proofs[0], dx.senderPublicKey)
1379- let gS = sigVerify(dx.bodyBytes, dx.proofs[1], gP)
1380- if (if (if (gQ)
1381- then gR
1404+ let dQ = aC
1405+ let hg = aO()
1406+ let hh = dP(dQ)
1407+ let hi = sigVerify(dQ.bodyBytes, dQ.proofs[0], dQ.senderPublicKey)
1408+ let hj = sigVerify(dQ.bodyBytes, dQ.proofs[1], hg)
1409+ if (if (if (hh)
1410+ then hi
13821411 else false)
1383- then gS
1412+ then hj
13841413 else false)
13851414 then true
1386- else as(gQ, gR, gS)
1415+ else ax(hh, hi, hj)
13871416 }
1388- else if ($isInstanceOf(ax, "SetScriptTransaction"))
1417+ else if ($isInstanceOf(aC, "SetScriptTransaction"))
13891418 then {
1390- let dX = ax
1391- let gT = blake2b256(value(dX.script))
1392- let gU = fromBase64String(value(getString(aF, aq())))
1393- let gV = scriptHash(this)
1394- if (if ((gU == gT))
1395- then (gV != gT)
1419+ let eq = aC
1420+ let hk = blake2b256(value(eq.script))
1421+ let hl = fromBase64String(value(getString(aL, av())))
1422+ let hm = scriptHash(this)
1423+ if (if ((hl == hk))
1424+ then (hm != hk)
13961425 else false)
13971426 then true
1398- else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
1427+ else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
13991428 }
1400- else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
1429+ else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
14011430 }
14021431

github/deemru/w8io/169f3d6 
482.85 ms