tx · 9YDuFcb4KH94A61b2iK6U6nfQELgaqdKkxgNYbt8S9TE

3N74GDduMoMAhHk7dApH6P9VDWKhFZ417FD:  -0.04300000 Waves

2023.04.24 11:38 [2548400] smart account 3N74GDduMoMAhHk7dApH6P9VDWKhFZ417FD > SELF 0.00000000 Waves

{ "type": 13, "id": "9YDuFcb4KH94A61b2iK6U6nfQELgaqdKkxgNYbt8S9TE", "fee": 4300000, "feeAssetId": null, "timestamp": 1682325602361, "version": 2, "chainId": 84, "sender": "3N74GDduMoMAhHk7dApH6P9VDWKhFZ417FD", "senderPublicKey": "C94AxUmoNDGMx49Ry1Q3s6UNv8WgGMUeBb6zhLbfFk8v", "proofs": [ "2sw1yDpY4RCieZZX8gogr3TSKVbPdU9UKzeXm9zn2M5ytTy7SRusYnUAdwwP3YnAoXyZKCh1XXCNVuKcGLqWgkbR" ], "script": "base64:BgL3NwgCEgASBQoDAQQBEgcKBQEEAQgBEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlk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mltAwMDBQJhSwUCYU0HBQJhTgcGCQECYUoEBQJhSwUCYUwFAmFNBQJhTgMJAAECBQJiVgIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmdpBQJiVgMJAPQDAwgFAmlqCWJvZHlCeXRlcwkAkQMCCAUCaWoGcHJvb2ZzAAAFAmlsBgQCaW8JAPYDAQkBBXZhbHVlAQgFAmdpBnNjcmlwdAQCaXAJANsEAQkBBXZhbHVlAQkAnQgCBQJhVgkBAmFGAAQCaXEJAPEHAQUEdGhpcwMJAAACBQJpcAUCaW8JAQIhPQIFAmlxBQJpbwcJAPQDAwgFAmlqCWJvZHlCeXRlcwkAkQMCCAUCaWoGcHJvb2ZzAAAFAmlsLmY3kQ==", "height": 2548400, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C9w26qg2W4oAte8wXCCxar2tVxHtPF7PVDyCUgWKbm8Y Next: ETBDUffvCQ52TJhx7QgEZAdRLDQ6y8XDZQi7bu5GKZ8t Diff:
OldNewDifferences
130130
131131 let an = valueOrElse(getInteger(this, al), am)
132132
133-func ao () = "%s__factoryConfig"
133+func ao (ap) = makeString(["%s%s", "stakedBalance", ap], j)
134134
135135
136-func ap () = "%s%s__matcher__publicKey"
136+func aq (ap) = makeString(["%s%s", "shareAssetBalance", ap], j)
137137
138138
139-func aq (ar) = (("%s%s%s__" + ar) + "__mappings__poolContract2LpAsset")
139+func ar (ap) = valueOrElse(getInteger(this, ao(ap)), 0)
140140
141141
142-func as (at,au) = (((("%d%d%s__" + at) + "__") + au) + "__config")
142+func as (ap) = valueOrElse(getInteger(this, aq(ap)), 0)
143143
144144
145-func av (aw) = ("%s%s%s__mappings__baseAsset2internalId__" + aw)
145+func at () = "%s__factoryConfig"
146146
147147
148-func ax () = "%s__shutdown"
148+func au () = "%s%s__matcher__publicKey"
149149
150150
151-func ay (az) = ("%s%s__poolWeight__" + az)
151+func av (aw) = (("%s%s%s__" + aw) + "__mappings__poolContract2LpAsset")
152152
153153
154-func aA () = "%s__allowedLpScriptHash"
154+func ax (ay,az) = (((("%d%d%s__" + ay) + "__") + az) + "__config")
155155
156156
157-let aB = "%s__feeCollectorAddress"
158-
159-func aC (aD,aE,aF,aG) = throw((((((((("order validation failed: orderValid=" + toString(aD)) + " (") + aE) + ")") + " senderValid=") + toString(aF)) + " matcherValid=") + toString(aG)))
157+func aA (aB) = ("%s%s%s__mappings__baseAsset2internalId__" + aB)
160158
161159
162-func aH (aI,aJ) = valueOrErrorMessage(getString(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
160+func aC () = "%s__shutdown"
163161
164162
165-func aK (aI,aJ) = valueOrErrorMessage(getInteger(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
163+func aD (aE) = ("%s%s__poolWeight__" + aE)
166164
167165
168-func aL (aM) = throw(makeString(["lp.ride:", aM], " "))
166+func aF () = "%s__allowedLpScriptHash"
169167
170168
171-func aN (aM) = makeString(["lp.ride:", aM], " ")
169+let aG = "%s__feeCollectorAddress"
170+
171+func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
172172
173173
174-let aO = addressFromStringValue(aH(this, T()))
174+func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
175175
176-let aP = addressFromStringValue(aH(aO, aB))
177176
178-let aQ = {
179- let aR = invoke(aO, "getInFeeREADONLY", [toString(this)], nil)
180- if ($isInstanceOf(aR, "Int"))
181- then aR
182- else throw(($getType(aR) + " couldn't be cast to Int"))
177+func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], ""))
178+
179+
180+func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], ""))
181+
182+
183+func aS (aT) = throw(makeString(["lp.ride:", aT], " "))
184+
185+
186+func aU (aT) = makeString(["lp.ride:", aT], " ")
187+
188+
189+let aV = addressFromStringValue(aO(this, T()))
190+
191+let aW = addressFromStringValue(aO(aV, aG))
192+
193+let aX = {
194+ let aY = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
195+ if ($isInstanceOf(aY, "Int"))
196+ then aY
197+ else throw(($getType(aY) + " couldn't be cast to Int"))
183198 }
184199
185-let aS = {
186- let aR = invoke(aO, "getOutFeeREADONLY", [toString(this)], nil)
187- if ($isInstanceOf(aR, "Int"))
188- then aR
189- else throw(($getType(aR) + " couldn't be cast to Int"))
200+let aZ = {
201+ let aY = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
202+ if ($isInstanceOf(aY, "Int"))
203+ then aY
204+ else throw(($getType(aY) + " couldn't be cast to Int"))
190205 }
191206
192-func aT () = valueOrElse(getBoolean(aO, ax()), false)
207+func ba () = valueOrElse(getBoolean(aV, aC()), false)
193208
194209
195-func aU () = fromBase58String(aH(aO, ap()))
210+func bb () = fromBase58String(aO(aV, au()))
196211
197212
198-func aV () = {
199- let aW = aH(this, ae())
200- let aX = aH(this, af())
201- let au = aK(aO, av(aX))
202- let at = aK(aO, av(aW))
203- split(aH(aO, as(toString(at), toString(au))), j)
213+func bc () = {
214+ let bd = aO(this, ae())
215+ let be = aO(this, af())
216+ let az = aR(aV, aA(be))
217+ let ay = aR(aV, aA(bd))
218+ split(aO(aV, ax(toString(ay), toString(az))), j)
204219 }
205220
206221
207-func aY (aZ) = if ((aZ == i))
222+func bf (bg) = if ((bg == i))
208223 then unit
209- else fromBase58String(aZ)
224+ else fromBase58String(bg)
210225
211226
212-func ba (aZ) = if ((aZ == unit))
227+func bh (bg) = if ((bg == unit))
213228 then i
214- else toBase58String(value(aZ))
229+ else toBase58String(value(bg))
215230
216231
217-func bb (bc) = $Tuple7(addressFromStringValue(bc[o]), parseIntValue(bc[p]), fromBase58String(bc[q]), aY(bc[r]), aY(bc[s]), parseIntValue(bc[t]), parseIntValue(bc[u]))
232+func bi (bj) = $Tuple7(addressFromStringValue(bj[o]), parseIntValue(bj[p]), fromBase58String(bj[q]), bf(bj[r]), bf(bj[s]), parseIntValue(bj[t]), parseIntValue(bj[u]))
218233
219234
220-let bd = bb(aV())
235+let bk = bi(bc())
221236
222-let be = bd
237+let bl = bk
223238
224-let bf = be._1
239+let bm = bl._1
225240
226-let bg = be._2
241+let bn = bl._2
227242
228-let bh = be._3
243+let bo = bl._3
229244
230-let bi = be._4
245+let bp = bl._4
231246
232-let bj = be._5
247+let bq = bl._5
233248
234-let bk = be._6
249+let br = bl._6
235250
236-let bl = be._7
251+let bs = bl._7
237252
238-func bm () = split(aH(aO, ao()), j)
253+func bt () = split(aO(aV, at()), j)
239254
240255
241-let bn = valueOrErrorMessage(addressFromString(bm()[B]), "incorrect staking address")
256+let bu = valueOrErrorMessage(addressFromString(bt()[B]), "incorrect staking address")
242257
243-let bo = valueOrErrorMessage(addressFromString(bm()[C]), "incorrect staking address")
258+let bv = valueOrErrorMessage(addressFromString(bt()[C]), "incorrect staking address")
244259
245-func bp (bq,br,bs,bt,bu,bv,bw,bx,by,bz) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by), toString(bz)], j)
260+func bw (bx,by,bz,bA,bB,bC,bD,bE,bF,bG) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bx), toString(by), toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG)], j)
246261
247262
248-func bA (bB,bC,bD,bt,bw,bx) = makeString(["%d%d%d%d%d%d", toString(bB), toString(bC), toString(bD), toString(bt), toString(bw), toString(bx)], j)
263+func bH (bI,bJ,bK,bA,bD,bE) = makeString(["%d%d%d%d%d%d", toString(bI), toString(bJ), toString(bK), toString(bA), toString(bD), toString(bE)], j)
249264
250265
251-func bE (bF) = if ((bF == "WAVES"))
252- then wavesBalance(this).available
253- else assetBalance(this, fromBase58String(bF))
254-
255-
256-func bG (bH,bI) = fraction(bH, d, bI)
257-
258-
259-func bJ (bH,bI,L) = fraction(bH, d, bI, L)
260-
261-
262-func bK (bL,bM,bN,bO) = {
263- let bP = D(bN, bL)
264- let bQ = D(bO, bM)
265- bG(bQ, bP)
266+func bL (ap) = {
267+ let bM = if ((ap == "WAVES"))
268+ then wavesBalance(this).available
269+ else assetBalance(this, fromBase58String(ap))
270+ let bN = ((bM + ar(ap)) - as(ap))
271+ max([0, bN])
266272 }
267273
268274
269-func bR (bN,bO,bS) = {
270- let bT = aV()
271- let bU = parseIntValue(bT[t])
272- let bV = parseIntValue(bT[u])
273- let bW = bK(bU, bV, bN, bO)
274- let bI = D(bN, bU)
275- let bH = D(bO, bV)
276- let bX = D(bS, b)
277- let bY = bG(bI, bX)
278- let bZ = bG(bH, bX)
279-[bW, bY, bZ]
275+func bO (bP,bQ) = fraction(bP, d, bQ)
276+
277+
278+func bR (bP,bQ,L) = fraction(bP, d, bQ, L)
279+
280+
281+func bS (bT) = {
282+ let bU = invoke(bT, "getRate", nil, nil)
283+ if ((bU == bU))
284+ then {
285+ let bV = bU
286+ if ($isInstanceOf(bV, "Int"))
287+ then {
288+ let bW = bV
289+ bW
290+ }
291+ else aS("proxy.getRate() unexpected value")
292+ }
293+ else throw("Strict value is not equal to itself.")
280294 }
281295
282296
283-func ca (bN,bO,bS) = {
284- let cb = bR(bN, bO, bS)
285-[H(cb[0], b), H(cb[1], b), H(cb[2], b)]
286- }
287-
288-
289-func cc (cd,ce,cf,ab) = {
290- let bT = aV()
291- let cg = bT[q]
292- let ch = bT[r]
293- let ci = bT[s]
294- let bL = parseIntValue(bT[t])
295- let bM = parseIntValue(bT[u])
296- let cj = bT[p]
297- let ck = valueOrErrorMessage(assetInfo(fromBase58String(cg)), (("Asset " + cg) + " doesn't exist")).quantity
298- if ((cg != ce))
299- then throw("Invalid asset passed.")
300- else {
301- let cl = bE(ch)
302- let cm = D(cl, bL)
303- let cn = bE(ci)
304- let co = D(cn, bM)
305- let cp = bG(co, cm)
306- let cq = H(cp, b)
307- let cr = D(cf, b)
308- let cs = D(ck, b)
309- let ct = fraction(cm, cr, cs)
310- let cu = fraction(co, cr, cs)
311- let cv = K(ct, bL, FLOOR)
312- let cw = K(cu, bM, FLOOR)
313- let cx = if ((cd == ""))
314- then nil
315- else [ScriptTransfer(ab, cv, if ((ch == "WAVES"))
316- then unit
317- else fromBase58String(ch)), ScriptTransfer(ab, cw, if ((ci == "WAVES"))
318- then unit
319- else fromBase58String(ci)), StringEntry(ad(toString(ab), cd), bA(cv, cw, cf, cq, height, lastBlock.timestamp)), IntegerEntry(W(), cq), IntegerEntry(X(height, lastBlock.timestamp), cq)]
320- $Tuple10(cv, cw, ch, ci, cl, cn, ck, cp, cj, cx)
321- }
322- }
323-
324-
325-func cy (cd,cz,cA,cB,cC,cD,ab,cE,cF) = {
326- let bT = aV()
327- let cg = fromBase58String(bT[q])
328- let cG = bT[r]
329- let cH = bT[s]
330- let cI = bT[v]
331- let cJ = bT[w]
332- let bU = parseIntValue(bT[t])
333- let bV = parseIntValue(bT[u])
334- let cj = bT[p]
335- let ck = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
336- let cK = toBase58String(valueOrElse(cB, fromBase58String("WAVES")))
337- let cL = toBase58String(valueOrElse(cD, fromBase58String("WAVES")))
338- if (if ((cG != cK))
339- then true
340- else (cH != cL))
341- then throw("Invalid amt or price asset passed.")
342- else {
343- let cl = if (cE)
344- then bE(cG)
345- else (bE(cG) - cA)
346- let cn = if (cE)
347- then bE(cH)
348- else (bE(cH) - cC)
349- let cM = D(cA, bU)
350- let cN = D(cC, bV)
351- let cO = bG(cN, cM)
352- let cm = D(cl, bU)
353- let co = D(cn, bV)
354- let cP = if ((ck == 0))
297+func bX (ap,bY,bZ,bT) = {
298+ let ca = ar(ap)
299+ if ((ca == ca))
300+ then {
301+ let cb = as(bZ)
302+ if ((cb == cb))
355303 then {
356- let cp = e
357- let cQ = e
358- let bX = pow((cM * cN), 0, toBigInt(5), 1, 0, DOWN)
359- $Tuple5(H(bX, b), H(cM, bU), H(cN, bV), bG((co + cN), (cm + cM)), cQ)
304+ let cc = bf(ap)
305+ if ((bY > 0))
306+ then {
307+ let cd = invoke(bT, "deposit", nil, [AttachedPayment(cc, bY)])
308+ if ((cd == cd))
309+ then {
310+ let bV = cd
311+ if ($isInstanceOf(bV, "Int"))
312+ then {
313+ let ce = bV
314+ let cf = (ca + bY)
315+ let cg = (cb + ce)
316+[IntegerEntry(ao(ap), cf), IntegerEntry(aq(bZ), cg)]
317+ }
318+ else nil
319+ }
320+ else throw("Strict value is not equal to itself.")
321+ }
322+ else nil
360323 }
361- else {
362- let cp = bG(co, cm)
363- let cQ = fraction(R((cp - cO)), d, cp)
364- let cR = D(cz, b)
365- if (if ((cp != e))
366- then (cQ > cR)
367- else false)
368- then throw(((("Price slippage " + toString(cQ)) + " exceeded the passed limit of ") + toString(cR)))
369- else {
370- let cs = D(ck, b)
371- let cS = fraction(cM, bJ(co, cm, CEILING), d, CEILING)
372- let cT = fraction(cN, d, bJ(co, cm, FLOOR), CEILING)
373- let cU = if ((cS > cN))
374- then $Tuple2(cT, cN)
375- else $Tuple2(cM, cS)
376- let cV = cU._1
377- let cW = cU._2
378- let bX = fraction(cs, cW, co, FLOOR)
379- $Tuple5(K(bX, b, FLOOR), K(cV, bU, CEILING), K(cW, bV, CEILING), cp, cQ)
380- }
381- }
382- let cX = cP._1
383- let cY = cP._2
384- let cZ = cP._3
385- let cq = H(cP._4, b)
386- let da = H(cP._5, b)
387- if ((0 >= cX))
388- then throw("Invalid calculations. LP calculated is less than zero.")
389- else {
390- let db = if (!(cF))
391- then 0
392- else cX
393- let dc = (cA - cY)
394- let dd = (cC - cZ)
395- let de = [IntegerEntry(W(), cq), IntegerEntry(X(height, lastBlock.timestamp), cq), StringEntry(aa(ab, cd), bp(cY, cZ, db, cq, cz, da, height, lastBlock.timestamp, dc, dd))]
396- $Tuple13(cX, db, cq, cl, cn, ck, cg, cj, de, dc, dd, cB, cD)
397- }
398- }
399- }
400-
401-
402-func df (dg,dh,ck) = {
403- let di = G(dg, toBigInt(bk))
404- let dj = G(dh, toBigInt(bl))
405- let dk = fraction(pow((di * dj), 0, toBigInt(5), 1, 18, DOWN), g, ck)
406- if ((ck == f))
407- then f
408- else dk
409- }
410-
411-
412-func dl (dm,dn,do) = {
413- let dp = (toBigInt(bE(ba(bi))) - dm)
414- let dq = (toBigInt(bE(ba(bj))) - dn)
415- let dr = (toBigInt(value(assetInfo(bh)).quantity) - do)
416- let ds = df(dp, dq, dr)
417- ds
418- }
419-
420-
421-func dt (du,dv,do) = {
422- let dp = (bE(ba(bi)) + du)
423- let dq = (bE(ba(bj)) + dv)
424- let dr = (value(assetInfo(bh)).quantity + do)
425- let dk = df(toBigInt(dp), toBigInt(dq), toBigInt(dr))
426- let dw = [IntegerEntry(ak, height), StringEntry(aj, toString(dk))]
427- $Tuple2(dw, dk)
428- }
429-
430-
431-func dx (dy,dk) = if ((dk >= dy))
432- then true
433- else aL(makeString(["updated KLp lower than current KLp", toString(dy), toString(dk)], " "))
434-
435-
436-func dz (dA) = {
437- let dp = bE(ba(bi))
438- let dq = bE(ba(bj))
439- let dB = dA.amount
440- let dC = fraction(dA.amount, dA.price, b, FLOOR)
441- let dD = if ((dA.orderType == Buy))
442- then $Tuple2(dB, -(dC))
443- else $Tuple2(-(dB), dC)
444- let du = dD._1
445- let dv = dD._2
446- if (if (if (aT())
447- then true
448- else (bg == m))
449- then true
450- else (bg == n))
451- then throw("Exchange operations disabled")
452- else if (if ((dA.assetPair.amountAsset != bi))
453- then true
454- else (dA.assetPair.priceAsset != bj))
455- then throw("Wrong order assets.")
456- else {
457- let dE = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aN("invalid kLp"))
458- let dF = dt(du, dv, 0)
459- let dG = dF._1
460- let dH = dF._2
461- let dI = (dH >= dE)
462- let dJ = makeString(["kLp=", toString(dE), " kLpNew=", toString(dH), " amountAssetBalance=", toString(dp), " priceAssetBalance=", toString(dq), " amountAssetBalanceDelta=", toString(du), " priceAssetBalanceDelta=", toString(dv), " height=", toString(height)], "")
463- $Tuple2(dI, dJ)
464- }
465- }
466-
467-
468-func dK (dL) = if ((size(dL.payments) != 1))
469- then throw("exactly 1 payment is expected")
470- else {
471- let dM = value(dL.payments[0])
472- let ce = value(dM.assetId)
473- let dN = dM.amount
474- let cP = cc(toBase58String(dL.transactionId), toBase58String(ce), dN, dL.caller)
475- let cv = cP._1
476- let cw = cP._2
477- let cj = parseIntValue(cP._9)
478- let cx = cP._10
479- if (if (aT())
480- then true
481- else (cj == n))
482- then throw(("Get operation is blocked by admin. Status = " + toString(cj)))
483- else $Tuple5(cv, cw, dN, ce, cx)
484- }
485-
486-
487-func dO (dL,cz,cF) = if ((size(dL.payments) != 2))
488- then throw("exactly 2 payments are expected")
489- else {
490- let dP = value(dL.payments[0])
491- let dQ = value(dL.payments[1])
492- let dR = cy(toBase58String(dL.transactionId), cz, dP.amount, dP.assetId, dQ.amount, dQ.assetId, toString(dL.caller), false, cF)
493- let cj = parseIntValue(dR._8)
494- if (if (if (aT())
495- then true
496- else (cj == l))
497- then true
498- else (cj == n))
499- then throw(("Put operation is blocked by admin. Status = " + toString(cj)))
500- else dR
501- }
502-
503-
504-func dS (dT) = {
505- let dU = invoke(aO, "emit", [dT], nil)
506- if ((dU == dU))
507- then {
508- let dV = {
509- let dW = dU
510- if ($isInstanceOf(dW, "Address"))
511- then {
512- let dX = dW
513- invoke(dX, "emit", [dT], nil)
514- }
515- else unit
516- }
517- if ((dV == dV))
518- then dT
519324 else throw("Strict value is not equal to itself.")
520325 }
521326 else throw("Strict value is not equal to itself.")
522327 }
523328
524329
525-func dY (dT,ai) = {
526- let dZ = if ((ai == 0))
527- then 0
528- else fraction(dT, ai, b)
529- $Tuple2((dT - dZ), dZ)
530- }
531-
532-
533-func ea (eb,ec,ab,ac) = {
534- let ed = (ac == unit)
535- let ee = bE(ba(bi))
536- let ef = bE(ba(bj))
537- let eg = if ((ec == bi))
538- then true
539- else if ((ec == bj))
540- then false
541- else aL("invalid asset")
542- let eh = if (ed)
543- then $Tuple2(ee, ef)
544- else if (eg)
545- then $Tuple2((ee - eb), ef)
546- else $Tuple2(ee, (ef - eb))
547- let ei = eh._1
548- let ej = eh._2
549- let ek = if (eg)
550- then $Tuple2(eb, 0)
551- else $Tuple2(0, eb)
552- let el = ek._1
553- let em = ek._2
554- let dB = dY(el, aQ)._1
555- let dC = dY(em, aQ)._1
556- let en = dY(eb, aQ)
557- let eo = en._1
558- let dZ = en._2
559- let ep = (ei + dB)
560- let eq = (ej + dC)
561- let er = bG(D(eq, bl), D(ep, bk))
562- let es = H(er, b)
563- let et = if (eg)
564- then ei
565- else ej
566- let eu = toBigInt(et)
567- let ev = toBigInt(valueOrErrorMessage(assetInfo(bh), (("asset " + toBase58String(bh)) + " doesn't exist")).quantity)
568- let ew = if ((ev > f))
569- then true
570- else aL("initial deposit requires all coins")
571- if ((ew == ew))
330+func ch (ap,bY,bZ,bT,ci,cj) = {
331+ let ca = ar(ap)
332+ if ((ca == ca))
572333 then {
573- let ex = toBigInt(eo)
574- let ey = max([0, toInt(((ev * (sqrtBigInt((d + ((ex * d) / eu)), 18, 18, DOWN) - d)) / d))])
575- let de = if (ed)
576- then nil
577- else [IntegerEntry(W(), es), IntegerEntry(X(height, lastBlock.timestamp), es), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bp(el, em, ey, es, 0, 0, height, lastBlock.timestamp, 0, 0))]
578- let ez = bG(D(ej, bl), D(ei, bk))
579- let eA = H(ez, b)
580- let eB = {
581- let eC = if (eg)
582- then $Tuple2(el, ei)
583- else $Tuple2(em, ej)
584- let dT = eC._1
585- let eD = eC._2
586- let eE = toInt(fraction(ev, toBigInt((dT / 2)), toBigInt(eD)))
587- fraction((ey - eE), b, eE)
588- }
589- $Tuple5(ey, de, dZ, eB, eg)
334+ let cb = as(bZ)
335+ if ((cb == cb))
336+ then {
337+ let ck = bS(bT)
338+ if ((ck == ck))
339+ then {
340+ let cl = fraction(ci, ca, cb)
341+ let cm = bf(bZ)
342+ let cn = fraction(ci, bY, cl)
343+ let co = fraction(ci, bY, ck)
344+ let cp = max([0, (cn - co)])
345+ if ((co > 0))
346+ then {
347+ let cq = invoke(bT, "withdraw", nil, [AttachedPayment(cm, co)])
348+ if ((cq == cq))
349+ then {
350+ let bV = cq
351+ if ($isInstanceOf(bV, "Int"))
352+ then {
353+ let cr = bV
354+ let cf = (ca - cr)
355+ let cg = ((cb - co) - cp)
356+[IntegerEntry(ao(ap), cf), IntegerEntry(aq(bZ), cg), ScriptTransfer(cj, cp, bf(bZ))]
357+ }
358+ else nil
359+ }
360+ else throw("Strict value is not equal to itself.")
361+ }
362+ else nil
363+ }
364+ else throw("Strict value is not equal to itself.")
365+ }
366+ else throw("Strict value is not equal to itself.")
590367 }
591368 else throw("Strict value is not equal to itself.")
592369 }
593370
594371
595-func eF (eG,eo,ec,ab,ac) = {
596- let ed = (ac == unit)
597- let bT = aV()
598- let bU = parseIntValue(bT[t])
599- let bV = parseIntValue(bT[u])
600- let eH = [if ((ec == bh))
601- then true
602- else aL("invalid lp asset")]
603- if ((eH == eH))
372+func cs (ap) = {
373+ let bV = invoke(aV, "getPoolLeaseConfigREADONLY", [toString(this), ap], nil)
374+ if ($isInstanceOf(bV, "(Boolean, Int, Int, String, String, Int, String)"))
604375 then {
605- let eI = if ((eG == bi))
606- then true
607- else if ((eG == bj))
608- then false
609- else aL("invalid asset")
610- let eJ = if (eI)
611- then toBigInt(bE(ba(bi)))
612- else toBigInt(bE(ba(bj)))
613- let eK = if (eI)
614- then bU
615- else bV
616- let eL = bE(ba(bi))
617- let eM = bE(ba(bj))
618- let eN = if (eI)
619- then eL
620- else eM
621- let eO = toBigInt(eN)
622- let ev = toBigInt(valueOrErrorMessage(assetInfo(bh), (("asset " + toBase58String(bh)) + " doesn't exist")).quantity)
623- let eP = toBigInt(eo)
624- let eQ = max([0, toInt(((eJ * (d - pow((d - ((eP * d) / ev)), 18, h, 0, 18, DOWN))) / d))])
625- let eR = dY(eQ, aS)
626- let eS = eR._1
627- let dZ = eR._2
628- let eT = if (eI)
629- then $Tuple4(eS, 0, (eL - eQ), eM)
630- else $Tuple4(0, eS, eL, (eM - eQ))
631- let eU = eT._1
632- let eV = eT._2
633- let eW = eT._3
634- let eX = eT._4
635- let er = bG(D(eX, bl), D(eW, bk))
636- let es = H(er, b)
637- let de = if (ed)
638- then nil
639- else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bA(eU, eV, eo, es, height, lastBlock.timestamp)), IntegerEntry(W(), es), IntegerEntry(X(height, lastBlock.timestamp), es)]
640- let ez = bG(D(eM, bl), D(eL, bk))
641- let eA = H(ez, b)
642- let eB = {
643- let eY = (toInt(fraction(eJ, eP, ev)) * 2)
644- fraction((eS - eY), b, eY)
645- }
646- $Tuple5(eS, de, dZ, eB, eI)
376+ let ct = bV
377+ ct
378+ }
379+ else aS((("[" + ap) + "] getLeaseProxyConfig() error"))
380+ }
381+
382+
383+func cu (cv,ap,bZ,cw,bT,ci,cj) = {
384+ let ca = ar(ap)
385+ if ((ca == ca))
386+ then {
387+ let cb = as(bZ)
388+ if ((cb == cb))
389+ then {
390+ let cx = max([0, (bL(ap) - cw)])
391+ let cy = fraction(cv, cx, 100)
392+ let cz = (ca - cy)
393+ if ((cz == 0))
394+ then nil
395+ else if ((0 > cz))
396+ then {
397+ let cA = -(cz)
398+ bX(ap, cA, bZ, bT)
399+ }
400+ else {
401+ let cB = cz
402+ ch(ap, cB, bZ, bT, ci, cj)
403+ }
404+ }
405+ else throw("Strict value is not equal to itself.")
647406 }
648407 else throw("Strict value is not equal to itself.")
649408 }
650409
651410
652-func eZ () = {
653- let dW = getString(U())
654- if ($isInstanceOf(dW, "String"))
411+func cC (ap) = {
412+ let cD = cs(ap)
413+ let cE = cD._1
414+ let cF = cD._2
415+ let cw = cD._3
416+ let cG = cD._4
417+ let cH = cD._5
418+ let ci = cD._6
419+ let cI = cD._7
420+ if (cE)
421+ then cu(cF, ap, cH, cw, addressFromStringValue(cG), ci, addressFromStringValue(cI))
422+ else nil
423+ }
424+
425+
426+func cJ (ap,cK) = {
427+ let cL = cs(ap)
428+ let cE = cL._1
429+ let cF = cL._2
430+ let cw = cL._3
431+ let cG = cL._4
432+ let cH = cL._5
433+ let ci = cL._6
434+ let cI = cL._7
435+ if (cE)
655436 then {
656- let fa = dW
657- fromBase58String(fa)
437+ let cM = max([0, ((bL(ap) - cK) - cw)])
438+ if ((cM == cM))
439+ then {
440+ let cf = fraction(cF, cM, 100)
441+ if ((cf == cf))
442+ then {
443+ let cN = (ar(ap) - cf)
444+ if ((cN == cN))
445+ then if ((0 > cN))
446+ then bX(ap, -(cN), cH, addressFromStringValue(cG))
447+ else ch(ap, cN, cH, addressFromStringValue(cG), ci, addressFromStringValue(cI))
448+ else throw("Strict value is not equal to itself.")
449+ }
450+ else throw("Strict value is not equal to itself.")
451+ }
452+ else throw("Strict value is not equal to itself.")
658453 }
659- else if ($isInstanceOf(dW, "Unit"))
454+ else nil
455+ }
456+
457+
458+func cO (cP,cQ) = {
459+ let cR = cJ(aO(this, ae()), cP)
460+ let cS = cJ(aO(this, af()), cQ)
461+ (cR ++ cS)
462+ }
463+
464+
465+func cT (cU,cV,cW,cX) = {
466+ let cY = D(cW, cU)
467+ let cZ = D(cX, cV)
468+ bO(cZ, cY)
469+ }
470+
471+
472+func da (cW,cX,db) = {
473+ let dc = bc()
474+ let dd = parseIntValue(dc[t])
475+ let de = parseIntValue(dc[u])
476+ let df = cT(dd, de, cW, cX)
477+ let bQ = D(cW, dd)
478+ let bP = D(cX, de)
479+ let dg = D(db, b)
480+ let dh = bO(bQ, dg)
481+ let di = bO(bP, dg)
482+[df, dh, di]
483+ }
484+
485+
486+func dj (cW,cX,db) = {
487+ let dk = da(cW, cX, db)
488+[H(dk[0], b), H(dk[1], b), H(dk[2], b)]
489+ }
490+
491+
492+func dl (dm,dn,do,ab) = {
493+ let dc = bc()
494+ let dp = dc[q]
495+ let dq = dc[r]
496+ let dr = dc[s]
497+ let cU = parseIntValue(dc[t])
498+ let cV = parseIntValue(dc[u])
499+ let ds = dc[p]
500+ let dt = valueOrErrorMessage(assetInfo(fromBase58String(dp)), (("Asset " + dp) + " doesn't exist")).quantity
501+ if ((dp != dn))
502+ then throw("Invalid asset passed.")
503+ else {
504+ let du = bL(dq)
505+ let dv = D(du, cU)
506+ let dw = bL(dr)
507+ let dx = D(dw, cV)
508+ let dy = bO(dx, dv)
509+ let dz = H(dy, b)
510+ let dA = D(do, b)
511+ let dB = D(dt, b)
512+ let dC = fraction(dv, dA, dB)
513+ let dD = fraction(dx, dA, dB)
514+ let dE = K(dC, cU, FLOOR)
515+ let dF = K(dD, cV, FLOOR)
516+ let dG = if ((dm == ""))
517+ then nil
518+ else [ScriptTransfer(ab, dE, if ((dq == "WAVES"))
519+ then unit
520+ else fromBase58String(dq)), ScriptTransfer(ab, dF, if ((dr == "WAVES"))
521+ then unit
522+ else fromBase58String(dr)), StringEntry(ad(toString(ab), dm), bH(dE, dF, do, dz, height, lastBlock.timestamp)), IntegerEntry(W(), dz), IntegerEntry(X(height, lastBlock.timestamp), dz)]
523+ $Tuple10(dE, dF, dq, dr, du, dw, dt, dy, ds, dG)
524+ }
525+ }
526+
527+
528+func dH (dm,dI,dJ,dK,dL,dM,ab,dN,dO) = {
529+ let dc = bc()
530+ let dp = fromBase58String(dc[q])
531+ let dP = dc[r]
532+ let dQ = dc[s]
533+ let dR = dc[v]
534+ let dS = dc[w]
535+ let dd = parseIntValue(dc[t])
536+ let de = parseIntValue(dc[u])
537+ let ds = dc[p]
538+ let dt = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity
539+ let dT = toBase58String(valueOrElse(dK, fromBase58String("WAVES")))
540+ let dU = toBase58String(valueOrElse(dM, fromBase58String("WAVES")))
541+ if (if ((dP != dT))
542+ then true
543+ else (dQ != dU))
544+ then throw("Invalid amt or price asset passed.")
545+ else {
546+ let du = if (dN)
547+ then bL(dP)
548+ else (bL(dP) - dJ)
549+ let dw = if (dN)
550+ then bL(dQ)
551+ else (bL(dQ) - dL)
552+ let dV = D(dJ, dd)
553+ let dW = D(dL, de)
554+ let dX = bO(dW, dV)
555+ let dv = D(du, dd)
556+ let dx = D(dw, de)
557+ let dY = if ((dt == 0))
558+ then {
559+ let dy = e
560+ let dZ = e
561+ let dg = pow((dV * dW), 0, toBigInt(5), 1, 0, DOWN)
562+ $Tuple5(H(dg, b), H(dV, dd), H(dW, de), bO((dx + dW), (dv + dV)), dZ)
563+ }
564+ else {
565+ let dy = bO(dx, dv)
566+ let dZ = fraction(R((dy - dX)), d, dy)
567+ let ea = D(dI, b)
568+ if (if ((dy != e))
569+ then (dZ > ea)
570+ else false)
571+ then throw(((("Price slippage " + toString(dZ)) + " exceeded the passed limit of ") + toString(ea)))
572+ else {
573+ let dB = D(dt, b)
574+ let eb = fraction(dV, bR(dx, dv, CEILING), d, CEILING)
575+ let ec = fraction(dW, d, bR(dx, dv, FLOOR), CEILING)
576+ let ed = if ((eb > dW))
577+ then $Tuple2(ec, dW)
578+ else $Tuple2(dV, eb)
579+ let ee = ed._1
580+ let ef = ed._2
581+ let dg = fraction(dB, ef, dx, FLOOR)
582+ $Tuple5(K(dg, b, FLOOR), K(ee, dd, CEILING), K(ef, de, CEILING), dy, dZ)
583+ }
584+ }
585+ let eg = dY._1
586+ let eh = dY._2
587+ let ei = dY._3
588+ let dz = H(dY._4, b)
589+ let ej = H(dY._5, b)
590+ if ((0 >= eg))
591+ then throw("Invalid calculations. LP calculated is less than zero.")
592+ else {
593+ let ek = if (!(dO))
594+ then 0
595+ else eg
596+ let el = (dJ - eh)
597+ let em = (dL - ei)
598+ let en = [IntegerEntry(W(), dz), IntegerEntry(X(height, lastBlock.timestamp), dz), StringEntry(aa(ab, dm), bw(eh, ei, ek, dz, dI, ej, height, lastBlock.timestamp, el, em))]
599+ $Tuple13(eg, ek, dz, du, dw, dt, dp, ds, en, el, em, dK, dM)
600+ }
601+ }
602+ }
603+
604+
605+func eo (ep,eq,dt) = {
606+ let er = G(ep, toBigInt(br))
607+ let es = G(eq, toBigInt(bs))
608+ let et = fraction(pow((er * es), 0, toBigInt(5), 1, 18, DOWN), g, dt)
609+ if ((dt == f))
610+ then f
611+ else et
612+ }
613+
614+
615+func eu (ev,ew,ex) = {
616+ let ey = (toBigInt(bL(bh(bp))) - ev)
617+ let ez = (toBigInt(bL(bh(bq))) - ew)
618+ let eA = (toBigInt(value(assetInfo(bo)).quantity) - ex)
619+ let eB = eo(ey, ez, eA)
620+ eB
621+ }
622+
623+
624+func eC (eD,eE,ex) = {
625+ let ey = (bL(bh(bp)) + eD)
626+ let ez = (bL(bh(bq)) + eE)
627+ let eA = (value(assetInfo(bo)).quantity + ex)
628+ let et = eo(toBigInt(ey), toBigInt(ez), toBigInt(eA))
629+ let eF = [IntegerEntry(ak, height), StringEntry(aj, toString(et))]
630+ $Tuple2(eF, et)
631+ }
632+
633+
634+func eG () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
635+
636+
637+func eH (eI,et) = if ((et >= eI))
638+ then true
639+ else aS(makeString(["updated KLp lower than current KLp", toString(eI), toString(et)], " "))
640+
641+
642+func eJ (eK) = {
643+ let ey = bL(bh(bp))
644+ let ez = bL(bh(bq))
645+ let eL = eK.amount
646+ let eM = fraction(eK.amount, eK.price, b, FLOOR)
647+ let eN = if ((eK.orderType == Buy))
648+ then $Tuple2(eL, -(eM))
649+ else $Tuple2(-(eL), eM)
650+ let eD = eN._1
651+ let eE = eN._2
652+ if (if (if (ba())
653+ then true
654+ else (bn == m))
655+ then true
656+ else (bn == n))
657+ then throw("Exchange operations disabled")
658+ else if (if ((eK.assetPair.amountAsset != bp))
659+ then true
660+ else (eK.assetPair.priceAsset != bq))
661+ then throw("Wrong order assets.")
662+ else {
663+ let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp"))
664+ let eP = eC(eD, eE, 0)
665+ let eQ = eP._1
666+ let eR = eP._2
667+ let eS = (eR >= eO)
668+ let eT = makeString(["kLp=", toString(eO), " kLpNew=", toString(eR), " amountAssetBalance=", toString(ey), " priceAssetBalance=", toString(ez), " amountAssetBalanceDelta=", toString(eD), " priceAssetBalanceDelta=", toString(eE), " height=", toString(height)], "")
669+ $Tuple2(eS, eT)
670+ }
671+ }
672+
673+
674+func eU (eV) = if ((size(eV.payments) != 1))
675+ then throw("exactly 1 payment is expected")
676+ else {
677+ let eW = value(eV.payments[0])
678+ let dn = value(eW.assetId)
679+ let eX = eW.amount
680+ let dY = dl(toBase58String(eV.transactionId), toBase58String(dn), eX, eV.caller)
681+ let dE = dY._1
682+ let dF = dY._2
683+ let ds = parseIntValue(dY._9)
684+ let dG = dY._10
685+ if (if (ba())
686+ then true
687+ else (ds == n))
688+ then throw(("Get operation is blocked by admin. Status = " + toString(ds)))
689+ else $Tuple5(dE, dF, eX, dn, dG)
690+ }
691+
692+
693+func eY (eV,dI,dO) = if ((size(eV.payments) != 2))
694+ then throw("exactly 2 payments are expected")
695+ else {
696+ let eZ = value(eV.payments[0])
697+ let fa = value(eV.payments[1])
698+ let fb = dH(toBase58String(eV.transactionId), dI, eZ.amount, eZ.assetId, fa.amount, fa.assetId, toString(eV.caller), false, dO)
699+ let ds = parseIntValue(fb._8)
700+ if (if (if (ba())
701+ then true
702+ else (ds == l))
703+ then true
704+ else (ds == n))
705+ then throw(("Put operation is blocked by admin. Status = " + toString(ds)))
706+ else fb
707+ }
708+
709+
710+func fc (bY) = {
711+ let fd = invoke(aV, "emit", [bY], nil)
712+ if ((fd == fd))
713+ then {
714+ let fe = {
715+ let bV = fd
716+ if ($isInstanceOf(bV, "Address"))
717+ then {
718+ let ff = bV
719+ invoke(ff, "emit", [bY], nil)
720+ }
721+ else unit
722+ }
723+ if ((fe == fe))
724+ then bY
725+ else throw("Strict value is not equal to itself.")
726+ }
727+ else throw("Strict value is not equal to itself.")
728+ }
729+
730+
731+func fg (bY,ai) = {
732+ let fh = if ((ai == 0))
733+ then 0
734+ else fraction(bY, ai, b)
735+ $Tuple2((bY - fh), fh)
736+ }
737+
738+
739+func fi (fj,fk,ab,ac) = {
740+ let fl = (ac == unit)
741+ let fm = bL(bh(bp))
742+ let fn = bL(bh(bq))
743+ let fo = if ((fk == bp))
744+ then true
745+ else if ((fk == bq))
746+ then false
747+ else aS("invalid asset")
748+ let fp = if (fl)
749+ then $Tuple2(fm, fn)
750+ else if (fo)
751+ then $Tuple2((fm - fj), fn)
752+ else $Tuple2(fm, (fn - fj))
753+ let fq = fp._1
754+ let fr = fp._2
755+ let fs = if (fo)
756+ then $Tuple2(fj, 0)
757+ else $Tuple2(0, fj)
758+ let ft = fs._1
759+ let fu = fs._2
760+ let eL = fg(ft, aX)._1
761+ let eM = fg(fu, aX)._1
762+ let fv = fg(fj, aX)
763+ let fw = fv._1
764+ let fh = fv._2
765+ let fx = (fq + eL)
766+ let fy = (fr + eM)
767+ let fz = bO(D(fy, bs), D(fx, br))
768+ let fA = H(fz, b)
769+ let fB = if (fo)
770+ then fq
771+ else fr
772+ let fC = toBigInt(fB)
773+ let fD = toBigInt(valueOrErrorMessage(assetInfo(bo), (("asset " + toBase58String(bo)) + " doesn't exist")).quantity)
774+ let fE = if ((fD > f))
775+ then true
776+ else aS("initial deposit requires all coins")
777+ if ((fE == fE))
778+ then {
779+ let fF = toBigInt(fw)
780+ let fG = max([0, toInt(((fD * (sqrtBigInt((d + ((fF * d) / fC)), 18, 18, DOWN) - d)) / d))])
781+ let en = if (fl)
782+ then nil
783+ else [IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bw(ft, fu, fG, fA, 0, 0, height, lastBlock.timestamp, 0, 0))]
784+ let fH = bO(D(fr, bs), D(fq, br))
785+ let fI = H(fH, b)
786+ let fJ = {
787+ let fK = if (fo)
788+ then $Tuple2(ft, fq)
789+ else $Tuple2(fu, fr)
790+ let bY = fK._1
791+ let fL = fK._2
792+ let fM = toInt(fraction(fD, toBigInt((bY / 2)), toBigInt(fL)))
793+ fraction((fG - fM), b, fM)
794+ }
795+ $Tuple5(fG, en, fh, fJ, fo)
796+ }
797+ else throw("Strict value is not equal to itself.")
798+ }
799+
800+
801+func fN (fO,fw,fk,ab,ac) = {
802+ let fl = (ac == unit)
803+ let dc = bc()
804+ let dd = parseIntValue(dc[t])
805+ let de = parseIntValue(dc[u])
806+ let fP = [if ((fk == bo))
807+ then true
808+ else aS("invalid lp asset")]
809+ if ((fP == fP))
810+ then {
811+ let fQ = if ((fO == bp))
812+ then true
813+ else if ((fO == bq))
814+ then false
815+ else aS("invalid asset")
816+ let fR = if (fQ)
817+ then toBigInt(bL(bh(bp)))
818+ else toBigInt(bL(bh(bq)))
819+ let fS = if (fQ)
820+ then dd
821+ else de
822+ let fT = bL(bh(bp))
823+ let fU = bL(bh(bq))
824+ let fV = if (fQ)
825+ then fT
826+ else fU
827+ let fW = toBigInt(fV)
828+ let fD = toBigInt(valueOrErrorMessage(assetInfo(bo), (("asset " + toBase58String(bo)) + " doesn't exist")).quantity)
829+ let fX = toBigInt(fw)
830+ let fY = max([0, toInt(((fR * (d - pow((d - ((fX * d) / fD)), 18, h, 0, 18, DOWN))) / d))])
831+ let fZ = fg(fY, aZ)
832+ let ga = fZ._1
833+ let fh = fZ._2
834+ let gb = if (fQ)
835+ then $Tuple4(ga, 0, (fT - fY), fU)
836+ else $Tuple4(0, ga, fT, (fU - fY))
837+ let gc = gb._1
838+ let gd = gb._2
839+ let ge = gb._3
840+ let gf = gb._4
841+ let fz = bO(D(gf, bs), D(ge, br))
842+ let fA = H(fz, b)
843+ let en = if (fl)
844+ then nil
845+ else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bH(gc, gd, fw, fA, height, lastBlock.timestamp)), IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA)]
846+ let fH = bO(D(fU, bs), D(fT, br))
847+ let fI = H(fH, b)
848+ let fJ = {
849+ let gg = (toInt(fraction(fR, fX, fD)) * 2)
850+ fraction((ga - gg), b, gg)
851+ }
852+ $Tuple5(ga, en, fh, fJ, fQ)
853+ }
854+ else throw("Strict value is not equal to itself.")
855+ }
856+
857+
858+func gh () = {
859+ let bV = getString(U())
860+ if ($isInstanceOf(bV, "String"))
861+ then {
862+ let gi = bV
863+ fromBase58String(gi)
864+ }
865+ else if ($isInstanceOf(bV, "Unit"))
660866 then unit
661867 else throw("Match error")
662868 }
663869
664870
665-func fb () = {
666- let dW = getString(V())
667- if ($isInstanceOf(dW, "String"))
871+func gj () = {
872+ let bV = getString(V())
873+ if ($isInstanceOf(bV, "String"))
668874 then {
669- let fa = dW
670- fromBase58String(fa)
875+ let gi = bV
876+ fromBase58String(gi)
671877 }
672- else if ($isInstanceOf(dW, "Unit"))
878+ else if ($isInstanceOf(bV, "Unit"))
673879 then unit
674880 else throw("Match error")
675881 }
676882
677883
678-func fc (dL) = {
679- let dW = eZ()
680- if ($isInstanceOf(dW, "ByteVector"))
884+func gk (eV) = {
885+ let bV = gh()
886+ if ($isInstanceOf(bV, "ByteVector"))
681887 then {
682- let fd = dW
683- (dL.callerPublicKey == fd)
888+ let gl = bV
889+ (eV.callerPublicKey == gl)
684890 }
685- else if ($isInstanceOf(dW, "Unit"))
686- then (dL.caller == this)
891+ else if ($isInstanceOf(bV, "Unit"))
892+ then (eV.caller == this)
687893 else throw("Match error")
688894 }
689895
690896
691-func fe (dL) = {
692- let ff = throw("Permission denied")
693- let dW = eZ()
694- if ($isInstanceOf(dW, "ByteVector"))
897+func gm (eV) = {
898+ let gn = throw("Permission denied")
899+ let bV = gh()
900+ if ($isInstanceOf(bV, "ByteVector"))
695901 then {
696- let fd = dW
697- if ((dL.callerPublicKey == fd))
902+ let gl = bV
903+ if ((eV.callerPublicKey == gl))
698904 then true
699- else ff
905+ else gn
700906 }
701- else if ($isInstanceOf(dW, "Unit"))
702- then if ((dL.caller == this))
907+ else if ($isInstanceOf(bV, "Unit"))
908+ then if ((eV.caller == this))
703909 then true
704- else ff
910+ else gn
705911 else throw("Match error")
706912 }
707913
708914
709-@Callable(dL)
710-func calculateAmountOutForSwapREADONLY (fg,fh,fi) = {
711- let fj = if ((fh == false))
915+@Callable(eV)
916+func rebalance () = (cC(aO(this, ae())) ++ cC(aO(this, af())))
917+
918+
919+
920+@Callable(eV)
921+func calculateAmountOutForSwapREADONLY (go,gp,gq) = {
922+ let gr = if ((gp == false))
712923 then {
713- let fk = aH(this, af())
714- let fl = aH(this, ae())
715- $Tuple2(fk, fl)
924+ let gs = aO(this, af())
925+ let gt = aO(this, ae())
926+ $Tuple2(gs, gt)
716927 }
717928 else {
718- let fk = aH(this, ae())
719- let fl = aH(this, af())
720- $Tuple2(fk, fl)
929+ let gs = aO(this, ae())
930+ let gt = aO(this, af())
931+ $Tuple2(gs, gt)
721932 }
722- let fk = fj._1
723- let fl = fj._2
724- let fm = bE(fl)
725- let fn = bE(fk)
726- let fo = fraction(fn, fg, (fm + fg))
727- let fp = (toBigInt(fm) * toBigInt(fn))
728- let fq = (((toBigInt(bE(fl)) + toBigInt(fg)) + toBigInt(fi)) * (toBigInt(bE(fk)) - toBigInt(fo)))
729- let fr = if ((fq >= fp))
933+ let gs = gr._1
934+ let gt = gr._2
935+ let gu = bL(gt)
936+ let gv = bL(gs)
937+ let gw = fraction(gv, go, (gu + go))
938+ let gx = (toBigInt(gu) * toBigInt(gv))
939+ let gy = (((toBigInt(bL(gt)) + toBigInt(go)) + toBigInt(gq)) * (toBigInt(bL(gs)) - toBigInt(gw)))
940+ let gz = if ((gy >= gx))
730941 then true
731942 else throw("new K is fewer error")
732- if ((fr == fr))
733- then $Tuple2(nil, fo)
943+ if ((gz == gz))
944+ then $Tuple2(nil, gw)
734945 else throw("Strict value is not equal to itself.")
735946 }
736947
737948
738949
739-@Callable(dL)
740-func calculateAmountOutForSwapAndSendTokens (fg,fh,fs,ft,fi) = {
741- let fu = {
742- let aR = invoke(aO, "getSwapContractREADONLY", nil, nil)
743- if ($isInstanceOf(aR, "String"))
744- then aR
745- else throw(($getType(aR) + " couldn't be cast to String"))
950+@Callable(eV)
951+func calculateAmountOutForSwapAndSendTokens (go,gp,gA,gB,gq) = {
952+ let gC = {
953+ let aY = invoke(aV, "getSwapContractREADONLY", nil, nil)
954+ if ($isInstanceOf(aY, "String"))
955+ then aY
956+ else throw(($getType(aY) + " couldn't be cast to String"))
746957 }
747- let eH = [if ((value(dL.payments[0]).amount >= fg))
958+ let fP = [if ((value(eV.payments[0]).amount >= go))
748959 then true
749- else aL("Wrong amount"), if ((dL.caller == addressFromStringValue(fu)))
960+ else aS("Wrong amount"), if ((eV.caller == addressFromStringValue(gC)))
750961 then true
751- else aL("Permission denied")]
752- if ((eH == eH))
962+ else aS("Permission denied")]
963+ if ((fP == fP))
753964 then {
754- let dM = value(dL.payments[0])
755- let fl = ba(dM.assetId)
756- let fk = if ((fh == false))
757- then aH(this, af())
758- else aH(this, ae())
759- let fm = (bE(fl) - value(dL.payments[0]).amount)
760- let fn = bE(fk)
761- let fo = fraction(fn, fg, (fm + fg))
762- let fp = (toBigInt(fm) * toBigInt(fn))
763- let fq = ((toBigInt(bE(fl)) + toBigInt(fi)) * (toBigInt(bE(fk)) - toBigInt(fo)))
764- let fr = if ((fq >= fp))
965+ let eW = value(eV.payments[0])
966+ let gt = bh(eW.assetId)
967+ let gs = if ((gp == false))
968+ then aO(this, af())
969+ else aO(this, ae())
970+ let gu = (bL(gt) - value(eV.payments[0]).amount)
971+ let gv = bL(gs)
972+ let gw = fraction(gv, go, (gu + go))
973+ let gx = (toBigInt(gu) * toBigInt(gv))
974+ let gy = ((toBigInt(bL(gt)) + toBigInt(gq)) * (toBigInt(bL(gs)) - toBigInt(gw)))
975+ let gz = if ((gy >= gx))
765976 then true
766977 else throw("new K is fewer error")
767- if ((fr == fr))
978+ if ((gz == gz))
768979 then {
769- let fv = if ((fo >= fs))
980+ let gD = if ((gw >= gA))
770981 then true
771982 else throw("Exchange result is fewer coins than expected")
772- if ((fv == fv))
773- then $Tuple2([ScriptTransfer(addressFromStringValue(ft), fo, aY(fk))], fo)
983+ if ((gD == gD))
984+ then {
985+ let gE = cC(gt)
986+ if ((gE == gE))
987+ then {
988+ let gF = cJ(gs, gw)
989+ if ((gF == gF))
990+ then $Tuple2(((gF ++ gE) ++ [ScriptTransfer(addressFromStringValue(gB), gw, bf(gs))]), gw)
991+ else throw("Strict value is not equal to itself.")
992+ }
993+ else throw("Strict value is not equal to itself.")
994+ }
774995 else throw("Strict value is not equal to itself.")
775996 }
776997 else throw("Strict value is not equal to itself.")
7801001
7811002
7821003
783-@Callable(dL)
784-func setManager (fw) = {
785- let fx = fe(dL)
786- if ((fx == fx))
1004+@Callable(eV)
1005+func setManager (gG) = {
1006+ let gH = gm(eV)
1007+ if ((gH == gH))
7871008 then {
788- let fy = fromBase58String(fw)
789- if ((fy == fy))
790- then [StringEntry(V(), fw)]
1009+ let gI = fromBase58String(gG)
1010+ if ((gI == gI))
1011+ then [StringEntry(V(), gG)]
7911012 else throw("Strict value is not equal to itself.")
7921013 }
7931014 else throw("Strict value is not equal to itself.")
7951016
7961017
7971018
798-@Callable(dL)
1019+@Callable(eV)
7991020 func confirmManager () = {
800- let fz = fb()
801- let fA = if (isDefined(fz))
1021+ let gJ = gj()
1022+ let gK = if (isDefined(gJ))
8021023 then true
8031024 else throw("No pending manager")
804- if ((fA == fA))
1025+ if ((gK == gK))
8051026 then {
806- let fB = if ((dL.callerPublicKey == value(fz)))
1027+ let gL = if ((eV.callerPublicKey == value(gJ)))
8071028 then true
8081029 else throw("You are not pending manager")
809- if ((fB == fB))
810- then [StringEntry(U(), toBase58String(value(fz))), DeleteEntry(V())]
1030+ if ((gL == gL))
1031+ then [StringEntry(U(), toBase58String(value(gJ))), DeleteEntry(V())]
8111032 else throw("Strict value is not equal to itself.")
8121033 }
8131034 else throw("Strict value is not equal to itself.")
8151036
8161037
8171038
818-@Callable(dL)
819-func put (cz,fC) = if ((0 > cz))
1039+@Callable(eV)
1040+func put (dI,gM) = if ((0 > dI))
8201041 then throw("Invalid slippageTolerance passed")
8211042 else {
822- let dR = dO(dL, cz, true)
823- let db = dR._2
824- let cg = dR._7
825- let cx = dR._9
826- let dc = dR._10
827- let dd = dR._11
828- let fD = dR._12
829- let fE = dR._13
830- let dP = toBigInt(value(dL.payments[0]).amount)
831- let dQ = toBigInt(value(dL.payments[1]).amount)
832- let ds = dl(dP, dQ, toBigInt(0))
833- if ((ds == ds))
1043+ let fb = eY(eV, dI, true)
1044+ let ek = fb._2
1045+ let dp = fb._7
1046+ let dG = fb._9
1047+ let el = fb._10
1048+ let em = fb._11
1049+ let gN = fb._12
1050+ let gO = fb._13
1051+ let eZ = toBigInt(value(eV.payments[0]).amount)
1052+ let fa = toBigInt(value(eV.payments[1]).amount)
1053+ let eB = eu(eZ, fa, toBigInt(0))
1054+ if ((eB == eB))
8341055 then {
835- let dU = invoke(aO, "emit", [db], nil)
836- if ((dU == dU))
1056+ let fd = invoke(aV, "emit", [ek], nil)
1057+ if ((fd == fd))
8371058 then {
838- let dV = {
839- let dW = dU
840- if ($isInstanceOf(dW, "Address"))
1059+ let fe = {
1060+ let bV = fd
1061+ if ($isInstanceOf(bV, "Address"))
8411062 then {
842- let dX = dW
843- invoke(dX, "emit", [db], nil)
1063+ let ff = bV
1064+ invoke(ff, "emit", [ek], nil)
8441065 }
8451066 else unit
8461067 }
847- if ((dV == dV))
1068+ if ((fe == fe))
8481069 then {
849- let fF = if ((dc > 0))
850- then invoke(bo, "put", nil, [AttachedPayment(fD, dc)])
1070+ let gP = if ((el > 0))
1071+ then invoke(bv, "put", nil, [AttachedPayment(gN, el)])
8511072 else nil
852- if ((fF == fF))
1073+ if ((gP == gP))
8531074 then {
854- let fG = if ((dd > 0))
855- then invoke(bo, "put", nil, [AttachedPayment(fE, dd)])
1075+ let gQ = if ((em > 0))
1076+ then invoke(bv, "put", nil, [AttachedPayment(gO, em)])
8561077 else nil
857- if ((fG == fG))
1078+ if ((gQ == gQ))
8581079 then {
859- let fH = if (fC)
1080+ let gR = if (gM)
8601081 then {
861- let fI = invoke(bn, "stake", nil, [AttachedPayment(cg, db)])
862- if ((fI == fI))
1082+ let gS = invoke(bu, "stake", nil, [AttachedPayment(dp, ek)])
1083+ if ((gS == gS))
8631084 then nil
8641085 else throw("Strict value is not equal to itself.")
8651086 }
866- else [ScriptTransfer(dL.caller, db, cg)]
867- let fJ = dt(0, 0, 0)
868- if ((fJ == fJ))
1087+ else [ScriptTransfer(eV.caller, ek, dp)]
1088+ let gT = eC(0, 0, 0)
1089+ if ((gT == gT))
8691090 then {
870- let dk = fJ._2
871- let fK = fJ._1
872- let fL = dx(ds, dk)
873- if ((fL == fL))
874- then ((cx ++ fH) ++ fK)
1091+ let et = gT._2
1092+ let gU = gT._1
1093+ let gV = eH(eB, et)
1094+ if ((gV == gV))
1095+ then {
1096+ let gW = invoke(this, "rebalance", nil, nil)
1097+ if ((gW == gW))
1098+ then ((dG ++ gR) ++ gU)
1099+ else throw("Strict value is not equal to itself.")
1100+ }
8751101 else throw("Strict value is not equal to itself.")
8761102 }
8771103 else throw("Strict value is not equal to itself.")
8891115
8901116
8911117
892-@Callable(dL)
893-func putForFree (fM) = if ((0 > fM))
1118+@Callable(eV)
1119+func putForFree (gX) = if ((0 > gX))
8941120 then throw("Invalid value passed")
8951121 else {
896- let dR = dO(dL, fM, false)
897- let cx = dR._9
898- let dP = toBigInt(value(dL.payments[0]).amount)
899- let dQ = toBigInt(value(dL.payments[1]).amount)
900- let ds = dl(dP, dQ, toBigInt(0))
901- if ((ds == ds))
1122+ let fb = eY(eV, gX, false)
1123+ let dG = fb._9
1124+ let eZ = toBigInt(value(eV.payments[0]).amount)
1125+ let fa = toBigInt(value(eV.payments[1]).amount)
1126+ let eB = eu(eZ, fa, toBigInt(0))
1127+ if ((eB == eB))
9021128 then {
903- let fN = dt(0, 0, 0)
904- let fK = fN._1
905- let dk = fN._2
906- let fL = dx(ds, dk)
907- if ((fL == fL))
908- then (cx ++ fK)
1129+ let gY = eC(0, 0, 0)
1130+ let gU = gY._1
1131+ let et = gY._2
1132+ let gV = eH(eB, et)
1133+ if ((gV == gV))
1134+ then (dG ++ gU)
9091135 else throw("Strict value is not equal to itself.")
9101136 }
9111137 else throw("Strict value is not equal to itself.")
9131139
9141140
9151141
916-@Callable(dL)
917-func putOneTkn (fO,fP) = {
918- let fQ = {
919- let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
920- if ($isInstanceOf(aR, "Boolean"))
921- then aR
922- else throw(($getType(aR) + " couldn't be cast to Boolean"))
1142+@Callable(eV)
1143+func putOneTkn (gZ,ha) = {
1144+ let hb = {
1145+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1146+ if ($isInstanceOf(aY, "Boolean"))
1147+ then aY
1148+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
9231149 }
924- let fR = if (if (if (aT())
1150+ let hc = if (if (if (ba())
9251151 then true
926- else (bg == l))
1152+ else (bn == l))
9271153 then true
928- else (bg == n))
1154+ else (bn == n))
9291155 then true
930- else fQ
931- let eH = [if (if (!(fR))
1156+ else hb
1157+ let fP = [if (if (!(hc))
9321158 then true
933- else fc(dL))
1159+ else gk(eV))
9341160 then true
935- else aL("put operation is blocked by admin"), if ((size(dL.payments) == 1))
1161+ else aS("put operation is blocked by admin"), if ((size(eV.payments) == 1))
9361162 then true
937- else aL("exactly 1 payment are expected")]
938- if ((eH == eH))
1163+ else aS("exactly 1 payment are expected")]
1164+ if ((fP == fP))
9391165 then {
940- let fS = dL.payments[0]
941- let ec = fS.assetId
942- let eb = fS.amount
943- let ds = if ((ec == bi))
944- then dl(toBigInt(eb), toBigInt(0), toBigInt(0))
945- else if ((ec == bj))
946- then dl(toBigInt(0), toBigInt(eb), toBigInt(0))
947- else aL("payment asset is not supported")
948- if ((ds == ds))
1166+ let hd = eV.payments[0]
1167+ let fk = hd.assetId
1168+ let fj = hd.amount
1169+ let eB = if ((fk == bp))
1170+ then eu(toBigInt(fj), toBigInt(0), toBigInt(0))
1171+ else if ((fk == bq))
1172+ then eu(toBigInt(0), toBigInt(fj), toBigInt(0))
1173+ else aS("payment asset is not supported")
1174+ if ((eB == eB))
9491175 then {
950- let ab = dL.caller
951- let ac = dL.transactionId
952- let fT = ea(eb, ec, ab, ac)
953- if ((fT == fT))
1176+ let ab = eV.caller
1177+ let ac = eV.transactionId
1178+ let he = fi(fj, fk, ab, ac)
1179+ if ((he == he))
9541180 then {
955- let eg = fT._5
956- let fU = fT._4
957- let dZ = fT._3
958- let de = fT._2
959- let fV = fT._1
960- let fW = if (if ((fO > 0))
961- then (fO > fV)
1181+ let fo = he._5
1182+ let hf = he._4
1183+ let fh = he._3
1184+ let en = he._2
1185+ let hg = he._1
1186+ let hh = if (if ((gZ > 0))
1187+ then (gZ > hg)
9621188 else false)
963- then aL(makeString(["amount to receive is less than ", toString(fO)], ""))
964- else fV
965- let dU = dS(fW)
966- if ((dU == dU))
1189+ then aS(makeString(["amount to receive is less than ", toString(gZ)], ""))
1190+ else hg
1191+ let fd = fc(hh)
1192+ if ((fd == fd))
9671193 then {
968- let fH = if (fP)
1194+ let gR = if (ha)
9691195 then {
970- let fX = invoke(bn, "stake", nil, [AttachedPayment(bh, fW)])
971- if ((fX == fX))
1196+ let hi = invoke(bu, "stake", nil, [AttachedPayment(bo, hh)])
1197+ if ((hi == hi))
9721198 then nil
9731199 else throw("Strict value is not equal to itself.")
9741200 }
975- else [ScriptTransfer(dL.caller, fW, bh)]
976- let fY = if ((dZ > 0))
977- then [ScriptTransfer(aP, dZ, ec)]
1201+ else [ScriptTransfer(eV.caller, hh, bo)]
1202+ let hj = if ((fh > 0))
1203+ then [ScriptTransfer(aW, fh, fk)]
9781204 else nil
979- let fZ = if ((this == aP))
1205+ let hk = if ((this == aW))
9801206 then $Tuple2(0, 0)
981- else if (eg)
982- then $Tuple2(-(dZ), 0)
983- else $Tuple2(0, -(dZ))
984- let du = fZ._1
985- let dv = fZ._2
986- let ga = dt(du, dv, 0)
987- let fK = ga._1
988- let dk = ga._2
989- let dE = value(getString(aj))
990- let fL = dx(ds, dk)
991- if ((fL == fL))
992- then $Tuple2((((de ++ fH) ++ fY) ++ fK), fW)
993- else throw("Strict value is not equal to itself.")
994- }
995- else throw("Strict value is not equal to itself.")
996- }
997- else throw("Strict value is not equal to itself.")
998- }
999- else throw("Strict value is not equal to itself.")
1000- }
1001- else throw("Strict value is not equal to itself.")
1002- }
1003-
1004-
1005-
1006-@Callable(dL)
1007-func putOneTknREADONLY (ec,eb) = {
1008- let gb = ea(eb, aY(ec), unit, unit)
1009- let fV = gb._1
1010- let de = gb._2
1011- let dZ = gb._3
1012- let fU = gb._4
1013- let eg = gb._5
1014- $Tuple2(nil, $Tuple3(fV, dZ, fU))
1015- }
1016-
1017-
1018-
1019-@Callable(dL)
1020-func getOneTkn (gc,fO) = {
1021- let fQ = {
1022- let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1023- if ($isInstanceOf(aR, "Boolean"))
1024- then aR
1025- else throw(($getType(aR) + " couldn't be cast to Boolean"))
1026- }
1027- let gd = if (if (aT())
1028- then true
1029- else (bg == n))
1030- then true
1031- else fQ
1032- let eH = [if (if (!(gd))
1033- then true
1034- else fc(dL))
1035- then true
1036- else aL("get operation is blocked by admin"), if ((size(dL.payments) == 1))
1037- then true
1038- else aL("exactly 1 payment are expected")]
1039- if ((eH == eH))
1040- then {
1041- let eG = aY(gc)
1042- let fS = dL.payments[0]
1043- let ec = fS.assetId
1044- let eo = fS.amount
1045- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1046- if ((ds == ds))
1047- then {
1048- let ab = dL.caller
1049- let ac = dL.transactionId
1050- let ge = eF(eG, eo, ec, ab, ac)
1051- if ((ge == ge))
1052- then {
1053- let eI = ge._5
1054- let fU = ge._4
1055- let dZ = ge._3
1056- let de = ge._2
1057- let gf = ge._1
1058- let dT = if (if ((fO > 0))
1059- then (fO > gf)
1060- else false)
1061- then aL(makeString(["amount to receive is less than ", toString(fO)], ""))
1062- else gf
1063- let gg = invoke(aO, "burn", [eo], [AttachedPayment(ec, eo)])
1064- if ((gg == gg))
1065- then {
1066- let gh = [ScriptTransfer(ab, dT, eG)]
1067- let fY = if ((dZ > 0))
1068- then [ScriptTransfer(aP, dZ, eG)]
1069- else nil
1070- let gi = {
1071- let gj = if ((this == aP))
1072- then 0
1073- else dZ
1074- if (eI)
1075- then $Tuple2(-((dT + gj)), 0)
1076- else $Tuple2(0, -((dT + gj)))
1077- }
1078- let du = gi._1
1079- let dv = gi._2
1080- let gk = dt(du, dv, 0)
1081- let fK = gk._1
1082- let dk = gk._2
1083- let fL = dx(ds, dk)
1084- if ((fL == fL))
1085- then $Tuple2((((de ++ gh) ++ fY) ++ fK), dT)
1086- else throw("Strict value is not equal to itself.")
1087- }
1088- else throw("Strict value is not equal to itself.")
1089- }
1090- else throw("Strict value is not equal to itself.")
1091- }
1092- else throw("Strict value is not equal to itself.")
1093- }
1094- else throw("Strict value is not equal to itself.")
1095- }
1096-
1097-
1098-
1099-@Callable(dL)
1100-func getOneTknREADONLY (eG,eo) = {
1101- let gl = eF(aY(eG), eo, bh, unit, unit)
1102- let gf = gl._1
1103- let de = gl._2
1104- let dZ = gl._3
1105- let fU = gl._4
1106- let eI = gl._5
1107- $Tuple2(nil, $Tuple3(gf, dZ, fU))
1108- }
1109-
1110-
1111-
1112-@Callable(dL)
1113-func unstakeAndGetOneTkn (gm,gc,fO) = {
1114- let fQ = {
1115- let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1116- if ($isInstanceOf(aR, "Boolean"))
1117- then aR
1118- else throw(($getType(aR) + " couldn't be cast to Boolean"))
1119- }
1120- let gd = if (if (aT())
1121- then true
1122- else (bg == n))
1123- then true
1124- else fQ
1125- let eH = [if (if (!(gd))
1126- then true
1127- else fc(dL))
1128- then true
1129- else aL("get operation is blocked by admin"), if ((size(dL.payments) == 0))
1130- then true
1131- else aL("no payments are expected")]
1132- if ((eH == eH))
1133- then {
1134- let eG = aY(gc)
1135- let ab = dL.caller
1136- let ac = dL.transactionId
1137- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1138- if ((ds == ds))
1139- then {
1140- let gn = invoke(bn, "unstake", [toBase58String(bh), gm], nil)
1141- if ((gn == gn))
1142- then {
1143- let go = eF(eG, gm, bh, ab, ac)
1144- if ((go == go))
1145- then {
1146- let eI = go._5
1147- let fU = go._4
1148- let dZ = go._3
1149- let de = go._2
1150- let gf = go._1
1151- let dT = if (if ((fO > 0))
1152- then (fO > gf)
1153- else false)
1154- then aL(makeString(["amount to receive is less than ", toString(fO)], ""))
1155- else gf
1156- let gg = invoke(aO, "burn", [gm], [AttachedPayment(bh, gm)])
1157- if ((gg == gg))
1207+ else if (fo)
1208+ then $Tuple2(-(fh), 0)
1209+ else $Tuple2(0, -(fh))
1210+ let eD = hk._1
1211+ let eE = hk._2
1212+ let hl = eC(eD, eE, 0)
1213+ let gU = hl._1
1214+ let et = hl._2
1215+ let eO = value(getString(aj))
1216+ let gV = eH(eB, et)
1217+ if ((gV == gV))
11581218 then {
1159- let gh = [ScriptTransfer(dL.caller, dT, eG)]
1160- let fY = if ((dZ > 0))
1161- then [ScriptTransfer(aP, dZ, eG)]
1162- else nil
1163- let gp = {
1164- let gj = if ((this == aP))
1165- then 0
1166- else dZ
1167- if (eI)
1168- then $Tuple2(-((dT + gj)), 0)
1169- else $Tuple2(0, -((dT + gj)))
1170- }
1171- let du = gp._1
1172- let dv = gp._2
1173- let gq = dt(du, dv, 0)
1174- let fK = gq._1
1175- let dk = gq._2
1176- let fL = dx(ds, dk)
1177- if ((fL == fL))
1178- then $Tuple2((((de ++ gh) ++ fY) ++ fK), dT)
1219+ let gW = invoke(this, "rebalance", nil, nil)
1220+ if ((gW == gW))
1221+ then $Tuple2((((en ++ gR) ++ hj) ++ gU), hh)
11791222 else throw("Strict value is not equal to itself.")
11801223 }
11811224 else throw("Strict value is not equal to itself.")
11911234
11921235
11931236
1194-@Callable(dL)
1195-func get () = {
1196- let cP = dK(dL)
1197- let gr = cP._1
1198- let cw = cP._2
1199- let dN = cP._3
1200- let ce = cP._4
1201- let cx = cP._5
1202- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1203- if ((ds == ds))
1237+@Callable(eV)
1238+func putOneTknREADONLY (fk,fj) = {
1239+ let hm = fi(fj, bf(fk), unit, unit)
1240+ let hg = hm._1
1241+ let en = hm._2
1242+ let fh = hm._3
1243+ let hf = hm._4
1244+ let fo = hm._5
1245+ $Tuple2(nil, $Tuple3(hg, fh, hf))
1246+ }
1247+
1248+
1249+
1250+@Callable(eV)
1251+func getOneTkn (hn,gZ) = {
1252+ let hb = {
1253+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1254+ if ($isInstanceOf(aY, "Boolean"))
1255+ then aY
1256+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
1257+ }
1258+ let ho = if (if (ba())
1259+ then true
1260+ else (bn == n))
1261+ then true
1262+ else hb
1263+ let fP = [if (if (!(ho))
1264+ then true
1265+ else gk(eV))
1266+ then true
1267+ else aS("get operation is blocked by admin"), if ((size(eV.payments) == 1))
1268+ then true
1269+ else aS("exactly 1 payment are expected")]
1270+ if ((fP == fP))
12041271 then {
1205- let gs = invoke(aO, "burn", [dN], [AttachedPayment(ce, dN)])
1206- if ((gs == gs))
1272+ let fO = bf(hn)
1273+ let hd = eV.payments[0]
1274+ let fk = hd.assetId
1275+ let fw = hd.amount
1276+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1277+ if ((eB == eB))
12071278 then {
1208- let gt = dt(-(gr), -(cw), 0)
1209- let fK = gt._1
1210- let dk = gt._2
1211- let fL = dx(ds, dk)
1212- if ((fL == fL))
1213- then (cx ++ fK)
1279+ let ab = eV.caller
1280+ let ac = eV.transactionId
1281+ let hp = fN(fO, fw, fk, ab, ac)
1282+ if ((hp == hp))
1283+ then {
1284+ let fQ = hp._5
1285+ let hf = hp._4
1286+ let fh = hp._3
1287+ let en = hp._2
1288+ let hq = hp._1
1289+ let bY = if (if ((gZ > 0))
1290+ then (gZ > hq)
1291+ else false)
1292+ then aS(makeString(["amount to receive is less than ", toString(gZ)], ""))
1293+ else hq
1294+ let hr = invoke(aV, "burn", [fw], [AttachedPayment(fk, fw)])
1295+ if ((hr == hr))
1296+ then {
1297+ let gF = cJ(hn, (bY + max([0, fh])))
1298+ let hs = [ScriptTransfer(ab, bY, fO)]
1299+ let hj = if ((fh > 0))
1300+ then [ScriptTransfer(aW, fh, fO)]
1301+ else nil
1302+ let ht = {
1303+ let hu = if ((this == aW))
1304+ then 0
1305+ else fh
1306+ if (fQ)
1307+ then $Tuple2(-((bY + hu)), 0)
1308+ else $Tuple2(0, -((bY + hu)))
1309+ }
1310+ let eD = ht._1
1311+ let eE = ht._2
1312+ let hv = eC(eD, eE, 0)
1313+ let gU = hv._1
1314+ let et = hv._2
1315+ let gV = eH(eB, et)
1316+ if ((gV == gV))
1317+ then $Tuple2(((((en ++ gF) ++ hs) ++ hj) ++ gU), bY)
1318+ else throw("Strict value is not equal to itself.")
1319+ }
1320+ else throw("Strict value is not equal to itself.")
1321+ }
12141322 else throw("Strict value is not equal to itself.")
12151323 }
12161324 else throw("Strict value is not equal to itself.")
12201328
12211329
12221330
1223-@Callable(dL)
1224-func getNoLess (gu,gv) = {
1225- let cP = dK(dL)
1226- let cv = cP._1
1227- let cw = cP._2
1228- let dN = cP._3
1229- let ce = cP._4
1230- let cx = cP._5
1231- if ((gu > cv))
1232- then throw(((("noLessThenAmtAsset failed: " + toString(cv)) + " < ") + toString(gu)))
1233- else if ((gv > cw))
1234- then throw(((("noLessThenPriceAsset failed: " + toString(cw)) + " < ") + toString(gv)))
1235- else {
1236- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1237- if ((ds == ds))
1238- then {
1239- let gs = invoke(aO, "burn", [dN], [AttachedPayment(ce, dN)])
1240- if ((gs == gs))
1241- then {
1242- let gw = dt(-(cv), -(cw), 0)
1243- let fK = gw._1
1244- let dk = gw._2
1245- let fL = dx(ds, dk)
1246- if ((fL == fL))
1247- then (cx ++ fK)
1248- else throw("Strict value is not equal to itself.")
1249- }
1250- else throw("Strict value is not equal to itself.")
1251- }
1252- else throw("Strict value is not equal to itself.")
1253- }
1331+@Callable(eV)
1332+func getOneTknREADONLY (fO,fw) = {
1333+ let hw = fN(bf(fO), fw, bo, unit, unit)
1334+ let hq = hw._1
1335+ let en = hw._2
1336+ let fh = hw._3
1337+ let hf = hw._4
1338+ let fQ = hw._5
1339+ $Tuple2(nil, $Tuple3(hq, fh, hf))
12541340 }
12551341
12561342
12571343
1258-@Callable(dL)
1259-func unstakeAndGet (dT) = {
1260- let gx = if ((size(dL.payments) != 0))
1261- then throw("No payments are expected")
1262- else true
1263- if ((gx == gx))
1344+@Callable(eV)
1345+func unstakeAndGetOneTkn (hx,hn,gZ) = {
1346+ let hb = {
1347+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1348+ if ($isInstanceOf(aY, "Boolean"))
1349+ then aY
1350+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
1351+ }
1352+ let ho = if (if (ba())
1353+ then true
1354+ else (bn == n))
1355+ then true
1356+ else hb
1357+ let fP = [if (if (!(ho))
1358+ then true
1359+ else gk(eV))
1360+ then true
1361+ else aS("get operation is blocked by admin"), if ((size(eV.payments) == 0))
1362+ then true
1363+ else aS("no payments are expected")]
1364+ if ((fP == fP))
12641365 then {
1265- let bT = aV()
1266- let cg = fromBase58String(bT[q])
1267- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1268- if ((ds == ds))
1366+ let fO = bf(hn)
1367+ let ab = eV.caller
1368+ let ac = eV.transactionId
1369+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1370+ if ((eB == eB))
12691371 then {
1270- let gn = invoke(bn, "unstake", [toBase58String(cg), dT], nil)
1271- if ((gn == gn))
1372+ let hy = invoke(bu, "unstake", [toBase58String(bo), hx], nil)
1373+ if ((hy == hy))
12721374 then {
1273- let cP = cc(toBase58String(dL.transactionId), toBase58String(cg), dT, dL.caller)
1274- let cv = cP._1
1275- let cw = cP._2
1276- let cj = parseIntValue(cP._9)
1277- let cx = cP._10
1278- let gy = if (if (aT())
1279- then true
1280- else (cj == n))
1281- then throw(("Get operation is blocked by admin. Status = " + toString(cj)))
1282- else true
1283- if ((gy == gy))
1375+ let hz = fN(fO, hx, bo, ab, ac)
1376+ if ((hz == hz))
12841377 then {
1285- let gs = invoke(aO, "burn", [dT], [AttachedPayment(cg, dT)])
1286- if ((gs == gs))
1378+ let fQ = hz._5
1379+ let hf = hz._4
1380+ let fh = hz._3
1381+ let en = hz._2
1382+ let hq = hz._1
1383+ let bY = if (if ((gZ > 0))
1384+ then (gZ > hq)
1385+ else false)
1386+ then aS(makeString(["amount to receive is less than ", toString(gZ)], ""))
1387+ else hq
1388+ let hr = invoke(aV, "burn", [hx], [AttachedPayment(bo, hx)])
1389+ if ((hr == hr))
12871390 then {
1288- let gz = dt(-(cv), -(cw), 0)
1289- let fK = gz._1
1290- let dk = gz._2
1291- let fL = dx(ds, dk)
1292- if ((fL == fL))
1293- then (cx ++ fK)
1391+ let gF = cJ(hn, (bY + max([0, fh])))
1392+ let hs = [ScriptTransfer(eV.caller, bY, fO)]
1393+ let hj = if ((fh > 0))
1394+ then [ScriptTransfer(aW, fh, fO)]
1395+ else nil
1396+ let hA = {
1397+ let hu = if ((this == aW))
1398+ then 0
1399+ else fh
1400+ if (fQ)
1401+ then $Tuple2(-((bY + hu)), 0)
1402+ else $Tuple2(0, -((bY + hu)))
1403+ }
1404+ let eD = hA._1
1405+ let eE = hA._2
1406+ let hB = eC(eD, eE, 0)
1407+ let gU = hB._1
1408+ let et = hB._2
1409+ let gV = eH(eB, et)
1410+ if ((gV == gV))
1411+ then $Tuple2(((((en ++ gF) ++ hs) ++ hj) ++ gU), bY)
12941412 else throw("Strict value is not equal to itself.")
12951413 }
12961414 else throw("Strict value is not equal to itself.")
13061424
13071425
13081426
1309-@Callable(dL)
1310-func unstakeAndGetNoLess (gm,gA,gv) = {
1311- let gd = if (aT())
1312- then true
1313- else (bg == n)
1314- let eH = [if (!(gd))
1315- then true
1316- else throw("get operation is blocked by admin"), if ((size(dL.payments) == 0))
1317- then true
1318- else throw("no payments are expected")]
1319- if ((eH == eH))
1427+@Callable(eV)
1428+func get () = {
1429+ let dY = eU(eV)
1430+ let dE = dY._1
1431+ let dF = dY._2
1432+ let eX = dY._3
1433+ let dn = dY._4
1434+ let dG = dY._5
1435+ let gF = cO(dE, dF)
1436+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1437+ if ((eB == eB))
13201438 then {
1321- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1322- if ((ds == ds))
1439+ let hC = invoke(aV, "burn", [eX], [AttachedPayment(dn, eX)])
1440+ if ((hC == hC))
13231441 then {
1324- let gn = invoke(bn, "unstake", [toBase58String(bh), gm], nil)
1325- if ((gn == gn))
1442+ let hD = eC(-(dE), -(dF), 0)
1443+ let gU = hD._1
1444+ let et = hD._2
1445+ let gV = eH(eB, et)
1446+ if ((gV == gV))
1447+ then ((gF ++ dG) ++ gU)
1448+ else throw("Strict value is not equal to itself.")
1449+ }
1450+ else throw("Strict value is not equal to itself.")
1451+ }
1452+ else throw("Strict value is not equal to itself.")
1453+ }
1454+
1455+
1456+
1457+@Callable(eV)
1458+func getNoLess (hE,hF) = {
1459+ let dY = eU(eV)
1460+ let dE = dY._1
1461+ let dF = dY._2
1462+ let eX = dY._3
1463+ let dn = dY._4
1464+ let dG = dY._5
1465+ if ((hE > dE))
1466+ then throw(((("noLessThenAmtAsset failed: " + toString(dE)) + " < ") + toString(hE)))
1467+ else if ((hF > dF))
1468+ then throw(((("noLessThenPriceAsset failed: " + toString(dF)) + " < ") + toString(hF)))
1469+ else {
1470+ let gF = cO(dE, dF)
1471+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1472+ if ((eB == eB))
1473+ then {
1474+ let hC = invoke(aV, "burn", [eX], [AttachedPayment(dn, eX)])
1475+ if ((hC == hC))
1476+ then {
1477+ let hG = eC(-(dE), -(dF), 0)
1478+ let gU = hG._1
1479+ let et = hG._2
1480+ let gV = eH(eB, et)
1481+ if ((gV == gV))
1482+ then ((gF ++ dG) ++ gU)
1483+ else throw("Strict value is not equal to itself.")
1484+ }
1485+ else throw("Strict value is not equal to itself.")
1486+ }
1487+ else throw("Strict value is not equal to itself.")
1488+ }
1489+ }
1490+
1491+
1492+
1493+@Callable(eV)
1494+func unstakeAndGet (bY) = {
1495+ let hH = if ((size(eV.payments) != 0))
1496+ then throw("No payments are expected")
1497+ else true
1498+ if ((hH == hH))
1499+ then {
1500+ let dc = bc()
1501+ let dp = fromBase58String(dc[q])
1502+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1503+ if ((eB == eB))
1504+ then {
1505+ let hy = invoke(bu, "unstake", [toBase58String(dp), bY], nil)
1506+ if ((hy == hy))
13261507 then {
1327- let cP = cc(toBase58String(dL.transactionId), toBase58String(bh), gm, dL.caller)
1328- let cv = cP._1
1329- let cw = cP._2
1330- let cx = cP._10
1331- let gB = [if ((cv >= gA))
1508+ let dY = dl(toBase58String(eV.transactionId), toBase58String(dp), bY, eV.caller)
1509+ let dE = dY._1
1510+ let dF = dY._2
1511+ let ds = parseIntValue(dY._9)
1512+ let dG = dY._10
1513+ let gF = cO(dE, dF)
1514+ let hI = if (if (ba())
13321515 then true
1333- else throw(makeString(["amount asset amount to receive is less than ", toString(gA)], "")), if ((cw >= gv))
1334- then true
1335- else throw(makeString(["price asset amount to receive is less than ", toString(gv)], ""))]
1336- if ((gB == gB))
1516+ else (ds == n))
1517+ then throw(("Get operation is blocked by admin. Status = " + toString(ds)))
1518+ else true
1519+ if ((hI == hI))
13371520 then {
1338- let gs = invoke(aO, "burn", [gm], [AttachedPayment(bh, gm)])
1339- if ((gs == gs))
1521+ let hC = invoke(aV, "burn", [bY], [AttachedPayment(dp, bY)])
1522+ if ((hC == hC))
13401523 then {
1341- let gC = dt(-(cv), -(cw), 0)
1342- let fK = gC._1
1343- let dk = gC._2
1344- let fL = dx(ds, dk)
1345- if ((fL == fL))
1346- then (cx ++ fK)
1524+ let hJ = eC(-(dE), -(dF), 0)
1525+ let gU = hJ._1
1526+ let et = hJ._2
1527+ let gV = eH(eB, et)
1528+ if ((gV == gV))
1529+ then ((gF ++ dG) ++ gU)
13471530 else throw("Strict value is not equal to itself.")
13481531 }
13491532 else throw("Strict value is not equal to itself.")
13591542
13601543
13611544
1362-@Callable(dL)
1363-func activate (gD,gE) = if ((toString(dL.caller) != toString(aO)))
1364- then throw("permissions denied")
1365- else $Tuple2([StringEntry(ae(), gD), StringEntry(af(), gE)], "success")
1366-
1367-
1368-
1369-@Callable(dL)
1370-func refreshKLp () = {
1371- let gF = valueOrElse(getInteger(ak), 0)
1372- let gG = if (((height - gF) >= an))
1373- then unit
1374- else aL(makeString([toString(an), " blocks have not passed since the previous call"], ""))
1375- if ((gG == gG))
1545+@Callable(eV)
1546+func unstakeAndGetNoLess (hx,hK,hF) = {
1547+ let ho = if (ba())
1548+ then true
1549+ else (bn == n)
1550+ let fP = [if (!(ho))
1551+ then true
1552+ else throw("get operation is blocked by admin"), if ((size(eV.payments) == 0))
1553+ then true
1554+ else throw("no payments are expected")]
1555+ if ((fP == fP))
13761556 then {
1377- let dE = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aN("invalid kLp"))
1378- let gH = dt(0, 0, 0)
1379- let gI = gH._1
1380- let dk = gH._2
1381- let dw = if ((dE != dk))
1382- then gI
1383- else aL("nothing to refresh")
1384- $Tuple2(dw, toString(dk))
1557+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1558+ if ((eB == eB))
1559+ then {
1560+ let hy = invoke(bu, "unstake", [toBase58String(bo), hx], nil)
1561+ if ((hy == hy))
1562+ then {
1563+ let dY = dl(toBase58String(eV.transactionId), toBase58String(bo), hx, eV.caller)
1564+ let dE = dY._1
1565+ let dF = dY._2
1566+ let dG = dY._10
1567+ let gF = cO(dE, dF)
1568+ let hL = [if ((dE >= hK))
1569+ then true
1570+ else throw(makeString(["amount asset amount to receive is less than ", toString(hK)], "")), if ((dF >= hF))
1571+ then true
1572+ else throw(makeString(["price asset amount to receive is less than ", toString(hF)], ""))]
1573+ if ((hL == hL))
1574+ then {
1575+ let hC = invoke(aV, "burn", [hx], [AttachedPayment(bo, hx)])
1576+ if ((hC == hC))
1577+ then {
1578+ let hM = eC(-(dE), -(dF), 0)
1579+ let gU = hM._1
1580+ let et = hM._2
1581+ let gV = eH(eB, et)
1582+ if ((gV == gV))
1583+ then ((gF ++ dG) ++ gU)
1584+ else throw("Strict value is not equal to itself.")
1585+ }
1586+ else throw("Strict value is not equal to itself.")
1587+ }
1588+ else throw("Strict value is not equal to itself.")
1589+ }
1590+ else throw("Strict value is not equal to itself.")
1591+ }
1592+ else throw("Strict value is not equal to itself.")
13851593 }
13861594 else throw("Strict value is not equal to itself.")
13871595 }
13881596
13891597
13901598
1391-@Callable(dL)
1392-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aV())
1599+@Callable(eV)
1600+func activate (hN,hO) = if ((toString(eV.caller) != toString(aV)))
1601+ then throw("permissions denied")
1602+ else $Tuple2([StringEntry(ae(), hN), StringEntry(af(), hO)], "success")
13931603
13941604
13951605
1396-@Callable(dL)
1397-func getAccBalanceWrapperREADONLY (bF) = $Tuple2(nil, bE(bF))
1398-
1399-
1400-
1401-@Callable(dL)
1402-func calcPricesWrapperREADONLY (bN,bO,bS) = {
1403- let cb = bR(bN, bO, bS)
1404- $Tuple2(nil, [toString(cb[0]), toString(cb[1]), toString(cb[2])])
1606+@Callable(eV)
1607+func refreshKLp () = {
1608+ let hP = valueOrElse(getInteger(ak), 0)
1609+ let hQ = if (((height - hP) >= an))
1610+ then unit
1611+ else aS(makeString([toString(an), " blocks have not passed since the previous call"], ""))
1612+ if ((hQ == hQ))
1613+ then {
1614+ let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp"))
1615+ let hR = eC(0, 0, 0)
1616+ let hS = hR._1
1617+ let et = hR._2
1618+ let eF = if ((eO != et))
1619+ then hS
1620+ else aS("nothing to refresh")
1621+ $Tuple2(eF, toString(et))
1622+ }
1623+ else throw("Strict value is not equal to itself.")
14051624 }
14061625
14071626
14081627
1409-@Callable(dL)
1628+@Callable(eV)
1629+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bc())
1630+
1631+
1632+
1633+@Callable(eV)
1634+func getAccBalanceWrapperREADONLY (ap) = $Tuple2(nil, bL(ap))
1635+
1636+
1637+
1638+@Callable(eV)
1639+func calcPricesWrapperREADONLY (cW,cX,db) = {
1640+ let dk = da(cW, cX, db)
1641+ $Tuple2(nil, [toString(dk[0]), toString(dk[1]), toString(dk[2])])
1642+ }
1643+
1644+
1645+
1646+@Callable(eV)
14101647 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
14111648
14121649
14131650
1414-@Callable(dL)
1651+@Callable(eV)
14151652 func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J))
14161653
14171654
14181655
1419-@Callable(dL)
1420-func calcPriceBigIntWrapperREADONLY (bH,bI) = $Tuple2(nil, toString(bG(parseBigIntValue(bH), parseBigIntValue(bI))))
1656+@Callable(eV)
1657+func calcPriceBigIntWrapperREADONLY (bP,bQ) = $Tuple2(nil, toString(bO(parseBigIntValue(bP), parseBigIntValue(bQ))))
14211658
14221659
14231660
1424-@Callable(dL)
1425-func estimatePutOperationWrapperREADONLY (cd,cz,cA,cB,cC,cD,ab,cE,cF) = $Tuple2(nil, cy(cd, cz, cA, cB, cC, cD, ab, cE, cF))
1661+@Callable(eV)
1662+func estimatePutOperationWrapperREADONLY (dm,dI,dJ,dK,dL,dM,ab,dN,dO) = $Tuple2(nil, dH(dm, dI, dJ, dK, dL, dM, ab, dN, dO))
14261663
14271664
14281665
1429-@Callable(dL)
1430-func estimateGetOperationWrapperREADONLY (cd,ce,cf,ab) = {
1431- let cP = cc(cd, ce, cf, addressFromStringValue(ab))
1432- $Tuple2(nil, $Tuple10(cP._1, cP._2, cP._3, cP._4, cP._5, cP._6, cP._7, toString(cP._8), cP._9, cP._10))
1666+@Callable(eV)
1667+func estimateGetOperationWrapperREADONLY (dm,dn,do,ab) = {
1668+ let dY = dl(dm, dn, do, addressFromStringValue(ab))
1669+ $Tuple2(nil, $Tuple10(dY._1, dY._2, dY._3, dY._4, dY._5, dY._6, dY._7, toString(dY._8), dY._9, dY._10))
14331670 }
14341671
14351672
14361673
1437-@Callable(dL)
1674+@Callable(eV)
14381675 func statsREADONLY () = {
1439- let bT = aV()
1440- let cg = fromBase58String(bT[q])
1441- let gJ = bT[r]
1442- let gK = bT[s]
1443- let cI = bT[v]
1444- let cJ = bT[w]
1445- let bU = parseIntValue(bT[t])
1446- let bV = parseIntValue(bT[u])
1447- let gL = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1448- let gM = bE(gJ)
1449- let gN = bE(gK)
1450- let gO = if ((gL == 0))
1676+ let dc = bc()
1677+ let dp = fromBase58String(dc[q])
1678+ let hT = dc[r]
1679+ let hU = dc[s]
1680+ let dR = dc[v]
1681+ let dS = dc[w]
1682+ let dd = parseIntValue(dc[t])
1683+ let de = parseIntValue(dc[u])
1684+ let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity
1685+ let hW = bL(hT)
1686+ let hX = bL(hU)
1687+ let hY = if ((hV == 0))
14511688 then [e, e, e]
1452- else bR(gM, gN, gL)
1453- let cq = 0
1454- let gP = H(gO[1], b)
1455- let gQ = H(gO[2], b)
1456- let gR = value(getInteger(aO, ay(toString(this))))
1457- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gM), toString(gN), toString(gL), toString(cq), toString(gP), toString(gQ), toString(gR)], j))
1689+ else da(hW, hX, hV)
1690+ let dz = 0
1691+ let hZ = H(hY[1], b)
1692+ let ia = H(hY[2], b)
1693+ let ib = value(getInteger(aV, aD(toString(this))))
1694+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hW), toString(hX), toString(hV), toString(dz), toString(hZ), toString(ia), toString(ib)], j))
14581695 }
14591696
14601697
14611698
1462-@Callable(dL)
1463-func evaluatePutByAmountAssetREADONLY (cA) = {
1464- let bT = aV()
1465- let cg = fromBase58String(bT[q])
1466- let cG = bT[r]
1467- let ch = fromBase58String(cG)
1468- let cH = bT[s]
1469- let ci = fromBase58String(cH)
1470- let bU = parseIntValue(bT[t])
1471- let bV = parseIntValue(bT[u])
1472- let cj = bT[p]
1473- let gL = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1474- let gM = bE(cG)
1475- let gN = bE(cH)
1476- let bP = D(gM, bU)
1477- let bQ = D(gN, bV)
1478- let cp = if ((gL == 0))
1699+@Callable(eV)
1700+func evaluatePutByAmountAssetREADONLY (dJ) = {
1701+ let dc = bc()
1702+ let dp = fromBase58String(dc[q])
1703+ let dP = dc[r]
1704+ let dq = fromBase58String(dP)
1705+ let dQ = dc[s]
1706+ let dr = fromBase58String(dQ)
1707+ let dd = parseIntValue(dc[t])
1708+ let de = parseIntValue(dc[u])
1709+ let ds = dc[p]
1710+ let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity
1711+ let hW = bL(dP)
1712+ let hX = bL(dQ)
1713+ let cY = D(hW, dd)
1714+ let cZ = D(hX, de)
1715+ let dy = if ((hV == 0))
14791716 then e
1480- else bG(bQ, bP)
1481- let cM = D(cA, bU)
1482- let cN = fraction(cM, cp, d)
1483- let cC = H(cN, bV)
1484- let dR = cy("", 500000, cA, ch, cC, ci, "", true, false)
1485- let cX = dR._1
1486- let gS = dR._3
1487- let cl = dR._4
1488- let cn = dR._5
1489- let ck = dR._6
1490- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cX), toString(H(cp, b)), toString(cl), toString(cn), toString(ck), cj, toString(cA), toString(cC)], j))
1717+ else bO(cZ, cY)
1718+ let dV = D(dJ, dd)
1719+ let dW = fraction(dV, dy, d)
1720+ let dL = H(dW, de)
1721+ let fb = dH("", 500000, dJ, dq, dL, dr, "", true, false)
1722+ let eg = fb._1
1723+ let ic = fb._3
1724+ let du = fb._4
1725+ let dw = fb._5
1726+ let dt = fb._6
1727+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eg), toString(H(dy, b)), toString(du), toString(dw), toString(dt), ds, toString(dJ), toString(dL)], j))
14911728 }
14921729
14931730
14941731
1495-@Callable(dL)
1496-func evaluatePutByPriceAssetREADONLY (cC) = {
1497- let bT = aV()
1498- let cg = fromBase58String(bT[q])
1499- let cG = bT[r]
1500- let ch = fromBase58String(cG)
1501- let cH = bT[s]
1502- let ci = fromBase58String(cH)
1503- let bU = parseIntValue(bT[t])
1504- let bV = parseIntValue(bT[u])
1505- let cj = bT[p]
1506- let gL = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1507- let gT = bE(cG)
1508- let gU = bE(cH)
1509- let gV = D(gT, bU)
1510- let gW = D(gU, bV)
1511- let cp = if ((gL == 0))
1732+@Callable(eV)
1733+func evaluatePutByPriceAssetREADONLY (dL) = {
1734+ let dc = bc()
1735+ let dp = fromBase58String(dc[q])
1736+ let dP = dc[r]
1737+ let dq = fromBase58String(dP)
1738+ let dQ = dc[s]
1739+ let dr = fromBase58String(dQ)
1740+ let dd = parseIntValue(dc[t])
1741+ let de = parseIntValue(dc[u])
1742+ let ds = dc[p]
1743+ let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity
1744+ let id = bL(dP)
1745+ let ie = bL(dQ)
1746+ let if = D(id, dd)
1747+ let ig = D(ie, de)
1748+ let dy = if ((hV == 0))
15121749 then e
1513- else bG(gW, gV)
1514- let cN = D(cC, bV)
1515- let cM = fraction(cN, d, cp)
1516- let cA = H(cM, bU)
1517- let dR = cy("", 500000, cA, ch, cC, ci, "", true, false)
1518- let cX = dR._1
1519- let gS = dR._3
1520- let cl = dR._4
1521- let cn = dR._5
1522- let ck = dR._6
1523- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cX), toString(H(cp, b)), toString(cl), toString(cn), toString(ck), cj, toString(cA), toString(cC)], j))
1750+ else bO(ig, if)
1751+ let dW = D(dL, de)
1752+ let dV = fraction(dW, d, dy)
1753+ let dJ = H(dV, dd)
1754+ let fb = dH("", 500000, dJ, dq, dL, dr, "", true, false)
1755+ let eg = fb._1
1756+ let ic = fb._3
1757+ let du = fb._4
1758+ let dw = fb._5
1759+ let dt = fb._6
1760+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eg), toString(H(dy, b)), toString(du), toString(dw), toString(dt), ds, toString(dJ), toString(dL)], j))
15241761 }
15251762
15261763
15271764
1528-@Callable(dL)
1529-func evaluateGetREADONLY (gX,gY) = {
1530- let cP = cc("", gX, gY, this)
1531- let cv = cP._1
1532- let cw = cP._2
1533- let cl = cP._5
1534- let cn = cP._6
1535- let ck = cP._7
1536- let cq = cP._8
1537- let cj = parseIntValue(cP._9)
1538- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cv), toString(cw), toString(cl), toString(cn), toString(ck), toString(cq), toString(cj)], j))
1765+@Callable(eV)
1766+func evaluateGetREADONLY (ih,ii) = {
1767+ let dY = dl("", ih, ii, this)
1768+ let dE = dY._1
1769+ let dF = dY._2
1770+ let du = dY._5
1771+ let dw = dY._6
1772+ let dt = dY._7
1773+ let dz = dY._8
1774+ let ds = parseIntValue(dY._9)
1775+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dE), toString(dF), toString(du), toString(dw), toString(dt), toString(dz), toString(ds)], j))
15391776 }
15401777
15411778
1542-@Verifier(gZ)
1543-func ha () = {
1544- let hb = {
1545- let dW = eZ()
1546- if ($isInstanceOf(dW, "ByteVector"))
1779+@Verifier(ij)
1780+func ik () = {
1781+ let il = {
1782+ let bV = gh()
1783+ if ($isInstanceOf(bV, "ByteVector"))
15471784 then {
1548- let fd = dW
1549- fd
1785+ let gl = bV
1786+ gl
15501787 }
1551- else if ($isInstanceOf(dW, "Unit"))
1552- then gZ.senderPublicKey
1788+ else if ($isInstanceOf(bV, "Unit"))
1789+ then ij.senderPublicKey
15531790 else throw("Match error")
15541791 }
1555- let dW = gZ
1556- if ($isInstanceOf(dW, "Order"))
1792+ let bV = ij
1793+ if ($isInstanceOf(bV, "Order"))
15571794 then {
1558- let dA = dW
1559- let hc = aU()
1560- let hd = dz(dA)
1561- let aD = hd._1
1562- let aE = hd._2
1563- let aF = sigVerify(dA.bodyBytes, dA.proofs[0], dA.senderPublicKey)
1564- let aG = sigVerify(dA.bodyBytes, dA.proofs[1], hc)
1565- if (if (if (aD)
1566- then aF
1795+ let eK = bV
1796+ let im = bb()
1797+ let in = if (eG())
1798+ then $Tuple2(true, "")
1799+ else eJ(eK)
1800+ let aK = in._1
1801+ let aL = in._2
1802+ let aM = sigVerify(eK.bodyBytes, eK.proofs[0], eK.senderPublicKey)
1803+ let aN = sigVerify(eK.bodyBytes, eK.proofs[1], im)
1804+ if (if (if (aK)
1805+ then aM
15671806 else false)
1568- then aG
1807+ then aN
15691808 else false)
15701809 then true
1571- else aC(aD, aE, aF, aG)
1810+ else aJ(aK, aL, aM, aN)
15721811 }
1573- else if ($isInstanceOf(dW, "SetScriptTransaction"))
1812+ else if ($isInstanceOf(bV, "SetScriptTransaction"))
15741813 then {
1575- let fa = dW
1576- if (sigVerify(gZ.bodyBytes, gZ.proofs[0], hb))
1814+ let gi = bV
1815+ if (sigVerify(ij.bodyBytes, ij.proofs[0], il))
15771816 then true
15781817 else {
1579- let he = blake2b256(value(fa.script))
1580- let hf = fromBase64String(value(getString(aO, aA())))
1581- let hg = scriptHash(this)
1582- if ((hf == he))
1583- then (hg != he)
1818+ let io = blake2b256(value(gi.script))
1819+ let ip = fromBase64String(value(getString(aV, aF())))
1820+ let iq = scriptHash(this)
1821+ if ((ip == io))
1822+ then (iq != io)
15841823 else false
15851824 }
15861825 }
1587- else sigVerify(gZ.bodyBytes, gZ.proofs[0], hb)
1826+ else sigVerify(ij.bodyBytes, ij.proofs[0], il)
15881827 }
15891828
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 8
55
66 let b = 100000000
77
88 let c = toBigInt(100000000)
99
1010 let d = toBigInt(1000000000000000000)
1111
1212 let e = toBigInt(0)
1313
1414 let f = toBigInt(0)
1515
1616 let g = toBigInt(1)
1717
1818 let h = toBigInt(2)
1919
2020 let i = "WAVES"
2121
2222 let j = "__"
2323
2424 let k = 1
2525
2626 let l = 2
2727
2828 let m = 3
2929
3030 let n = 4
3131
3232 let o = 1
3333
3434 let p = 2
3535
3636 let q = 3
3737
3838 let r = 4
3939
4040 let s = 5
4141
4242 let t = 6
4343
4444 let u = 7
4545
4646 let v = 8
4747
4848 let w = 9
4949
5050 let x = 10
5151
5252 let y = 1
5353
5454 let z = 2
5555
5656 let A = 3
5757
5858 let B = 1
5959
6060 let C = 7
6161
6262 func D (E,F) = fraction(toBigInt(E), d, toBigInt(F))
6363
6464
6565 func G (E,F) = fraction(E, d, F)
6666
6767
6868 func H (I,J) = toInt(fraction(I, toBigInt(J), d))
6969
7070
7171 func K (I,J,L) = toInt(fraction(I, toBigInt(J), d, L))
7272
7373
7474 func M (N,O,P) = fraction(N, O, P)
7575
7676
7777 func Q (I) = if ((0 > I))
7878 then -(I)
7979 else I
8080
8181
8282 func R (I) = if ((e > I))
8383 then -(I)
8484 else I
8585
8686
8787 func S () = "%s__swapContract"
8888
8989
9090 func T () = "%s__factoryContract"
9191
9292
9393 func U () = "%s__managerPublicKey"
9494
9595
9696 func V () = "%s__pendingManagerPublicKey"
9797
9898
9999 func W () = "%s%s__price__last"
100100
101101
102102 func X (Y,Z) = makeString(["%s%s%d%d__price__history", toString(Y), toString(Z)], j)
103103
104104
105105 func aa (ab,ac) = ((("%s%s%s__P__" + ab) + "__") + ac)
106106
107107
108108 func ad (ab,ac) = ((("%s%s%s__G__" + ab) + "__") + ac)
109109
110110
111111 func ae () = "%s__amountAsset"
112112
113113
114114 func af () = "%s__priceAsset"
115115
116116
117117 let ag = "%s__fee"
118118
119119 let ah = fraction(10, b, 10000)
120120
121121 let ai = valueOrElse(getInteger(this, ag), ah)
122122
123123 let aj = makeString(["%s", "kLp"], j)
124124
125125 let ak = makeString(["%s", "kLpRefreshedHeight"], j)
126126
127127 let al = makeString(["%s", "refreshKLpDelay"], j)
128128
129129 let am = 30
130130
131131 let an = valueOrElse(getInteger(this, al), am)
132132
133-func ao () = "%s__factoryConfig"
133+func ao (ap) = makeString(["%s%s", "stakedBalance", ap], j)
134134
135135
136-func ap () = "%s%s__matcher__publicKey"
136+func aq (ap) = makeString(["%s%s", "shareAssetBalance", ap], j)
137137
138138
139-func aq (ar) = (("%s%s%s__" + ar) + "__mappings__poolContract2LpAsset")
139+func ar (ap) = valueOrElse(getInteger(this, ao(ap)), 0)
140140
141141
142-func as (at,au) = (((("%d%d%s__" + at) + "__") + au) + "__config")
142+func as (ap) = valueOrElse(getInteger(this, aq(ap)), 0)
143143
144144
145-func av (aw) = ("%s%s%s__mappings__baseAsset2internalId__" + aw)
145+func at () = "%s__factoryConfig"
146146
147147
148-func ax () = "%s__shutdown"
148+func au () = "%s%s__matcher__publicKey"
149149
150150
151-func ay (az) = ("%s%s__poolWeight__" + az)
151+func av (aw) = (("%s%s%s__" + aw) + "__mappings__poolContract2LpAsset")
152152
153153
154-func aA () = "%s__allowedLpScriptHash"
154+func ax (ay,az) = (((("%d%d%s__" + ay) + "__") + az) + "__config")
155155
156156
157-let aB = "%s__feeCollectorAddress"
158-
159-func aC (aD,aE,aF,aG) = throw((((((((("order validation failed: orderValid=" + toString(aD)) + " (") + aE) + ")") + " senderValid=") + toString(aF)) + " matcherValid=") + toString(aG)))
157+func aA (aB) = ("%s%s%s__mappings__baseAsset2internalId__" + aB)
160158
161159
162-func aH (aI,aJ) = valueOrErrorMessage(getString(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
160+func aC () = "%s__shutdown"
163161
164162
165-func aK (aI,aJ) = valueOrErrorMessage(getInteger(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
163+func aD (aE) = ("%s%s__poolWeight__" + aE)
166164
167165
168-func aL (aM) = throw(makeString(["lp.ride:", aM], " "))
166+func aF () = "%s__allowedLpScriptHash"
169167
170168
171-func aN (aM) = makeString(["lp.ride:", aM], " ")
169+let aG = "%s__feeCollectorAddress"
170+
171+func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
172172
173173
174-let aO = addressFromStringValue(aH(this, T()))
174+func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
175175
176-let aP = addressFromStringValue(aH(aO, aB))
177176
178-let aQ = {
179- let aR = invoke(aO, "getInFeeREADONLY", [toString(this)], nil)
180- if ($isInstanceOf(aR, "Int"))
181- then aR
182- else throw(($getType(aR) + " couldn't be cast to Int"))
177+func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], ""))
178+
179+
180+func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], ""))
181+
182+
183+func aS (aT) = throw(makeString(["lp.ride:", aT], " "))
184+
185+
186+func aU (aT) = makeString(["lp.ride:", aT], " ")
187+
188+
189+let aV = addressFromStringValue(aO(this, T()))
190+
191+let aW = addressFromStringValue(aO(aV, aG))
192+
193+let aX = {
194+ let aY = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
195+ if ($isInstanceOf(aY, "Int"))
196+ then aY
197+ else throw(($getType(aY) + " couldn't be cast to Int"))
183198 }
184199
185-let aS = {
186- let aR = invoke(aO, "getOutFeeREADONLY", [toString(this)], nil)
187- if ($isInstanceOf(aR, "Int"))
188- then aR
189- else throw(($getType(aR) + " couldn't be cast to Int"))
200+let aZ = {
201+ let aY = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
202+ if ($isInstanceOf(aY, "Int"))
203+ then aY
204+ else throw(($getType(aY) + " couldn't be cast to Int"))
190205 }
191206
192-func aT () = valueOrElse(getBoolean(aO, ax()), false)
207+func ba () = valueOrElse(getBoolean(aV, aC()), false)
193208
194209
195-func aU () = fromBase58String(aH(aO, ap()))
210+func bb () = fromBase58String(aO(aV, au()))
196211
197212
198-func aV () = {
199- let aW = aH(this, ae())
200- let aX = aH(this, af())
201- let au = aK(aO, av(aX))
202- let at = aK(aO, av(aW))
203- split(aH(aO, as(toString(at), toString(au))), j)
213+func bc () = {
214+ let bd = aO(this, ae())
215+ let be = aO(this, af())
216+ let az = aR(aV, aA(be))
217+ let ay = aR(aV, aA(bd))
218+ split(aO(aV, ax(toString(ay), toString(az))), j)
204219 }
205220
206221
207-func aY (aZ) = if ((aZ == i))
222+func bf (bg) = if ((bg == i))
208223 then unit
209- else fromBase58String(aZ)
224+ else fromBase58String(bg)
210225
211226
212-func ba (aZ) = if ((aZ == unit))
227+func bh (bg) = if ((bg == unit))
213228 then i
214- else toBase58String(value(aZ))
229+ else toBase58String(value(bg))
215230
216231
217-func bb (bc) = $Tuple7(addressFromStringValue(bc[o]), parseIntValue(bc[p]), fromBase58String(bc[q]), aY(bc[r]), aY(bc[s]), parseIntValue(bc[t]), parseIntValue(bc[u]))
232+func bi (bj) = $Tuple7(addressFromStringValue(bj[o]), parseIntValue(bj[p]), fromBase58String(bj[q]), bf(bj[r]), bf(bj[s]), parseIntValue(bj[t]), parseIntValue(bj[u]))
218233
219234
220-let bd = bb(aV())
235+let bk = bi(bc())
221236
222-let be = bd
237+let bl = bk
223238
224-let bf = be._1
239+let bm = bl._1
225240
226-let bg = be._2
241+let bn = bl._2
227242
228-let bh = be._3
243+let bo = bl._3
229244
230-let bi = be._4
245+let bp = bl._4
231246
232-let bj = be._5
247+let bq = bl._5
233248
234-let bk = be._6
249+let br = bl._6
235250
236-let bl = be._7
251+let bs = bl._7
237252
238-func bm () = split(aH(aO, ao()), j)
253+func bt () = split(aO(aV, at()), j)
239254
240255
241-let bn = valueOrErrorMessage(addressFromString(bm()[B]), "incorrect staking address")
256+let bu = valueOrErrorMessage(addressFromString(bt()[B]), "incorrect staking address")
242257
243-let bo = valueOrErrorMessage(addressFromString(bm()[C]), "incorrect staking address")
258+let bv = valueOrErrorMessage(addressFromString(bt()[C]), "incorrect staking address")
244259
245-func bp (bq,br,bs,bt,bu,bv,bw,bx,by,bz) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by), toString(bz)], j)
260+func bw (bx,by,bz,bA,bB,bC,bD,bE,bF,bG) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bx), toString(by), toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG)], j)
246261
247262
248-func bA (bB,bC,bD,bt,bw,bx) = makeString(["%d%d%d%d%d%d", toString(bB), toString(bC), toString(bD), toString(bt), toString(bw), toString(bx)], j)
263+func bH (bI,bJ,bK,bA,bD,bE) = makeString(["%d%d%d%d%d%d", toString(bI), toString(bJ), toString(bK), toString(bA), toString(bD), toString(bE)], j)
249264
250265
251-func bE (bF) = if ((bF == "WAVES"))
252- then wavesBalance(this).available
253- else assetBalance(this, fromBase58String(bF))
254-
255-
256-func bG (bH,bI) = fraction(bH, d, bI)
257-
258-
259-func bJ (bH,bI,L) = fraction(bH, d, bI, L)
260-
261-
262-func bK (bL,bM,bN,bO) = {
263- let bP = D(bN, bL)
264- let bQ = D(bO, bM)
265- bG(bQ, bP)
266+func bL (ap) = {
267+ let bM = if ((ap == "WAVES"))
268+ then wavesBalance(this).available
269+ else assetBalance(this, fromBase58String(ap))
270+ let bN = ((bM + ar(ap)) - as(ap))
271+ max([0, bN])
266272 }
267273
268274
269-func bR (bN,bO,bS) = {
270- let bT = aV()
271- let bU = parseIntValue(bT[t])
272- let bV = parseIntValue(bT[u])
273- let bW = bK(bU, bV, bN, bO)
274- let bI = D(bN, bU)
275- let bH = D(bO, bV)
276- let bX = D(bS, b)
277- let bY = bG(bI, bX)
278- let bZ = bG(bH, bX)
279-[bW, bY, bZ]
275+func bO (bP,bQ) = fraction(bP, d, bQ)
276+
277+
278+func bR (bP,bQ,L) = fraction(bP, d, bQ, L)
279+
280+
281+func bS (bT) = {
282+ let bU = invoke(bT, "getRate", nil, nil)
283+ if ((bU == bU))
284+ then {
285+ let bV = bU
286+ if ($isInstanceOf(bV, "Int"))
287+ then {
288+ let bW = bV
289+ bW
290+ }
291+ else aS("proxy.getRate() unexpected value")
292+ }
293+ else throw("Strict value is not equal to itself.")
280294 }
281295
282296
283-func ca (bN,bO,bS) = {
284- let cb = bR(bN, bO, bS)
285-[H(cb[0], b), H(cb[1], b), H(cb[2], b)]
286- }
287-
288-
289-func cc (cd,ce,cf,ab) = {
290- let bT = aV()
291- let cg = bT[q]
292- let ch = bT[r]
293- let ci = bT[s]
294- let bL = parseIntValue(bT[t])
295- let bM = parseIntValue(bT[u])
296- let cj = bT[p]
297- let ck = valueOrErrorMessage(assetInfo(fromBase58String(cg)), (("Asset " + cg) + " doesn't exist")).quantity
298- if ((cg != ce))
299- then throw("Invalid asset passed.")
300- else {
301- let cl = bE(ch)
302- let cm = D(cl, bL)
303- let cn = bE(ci)
304- let co = D(cn, bM)
305- let cp = bG(co, cm)
306- let cq = H(cp, b)
307- let cr = D(cf, b)
308- let cs = D(ck, b)
309- let ct = fraction(cm, cr, cs)
310- let cu = fraction(co, cr, cs)
311- let cv = K(ct, bL, FLOOR)
312- let cw = K(cu, bM, FLOOR)
313- let cx = if ((cd == ""))
314- then nil
315- else [ScriptTransfer(ab, cv, if ((ch == "WAVES"))
316- then unit
317- else fromBase58String(ch)), ScriptTransfer(ab, cw, if ((ci == "WAVES"))
318- then unit
319- else fromBase58String(ci)), StringEntry(ad(toString(ab), cd), bA(cv, cw, cf, cq, height, lastBlock.timestamp)), IntegerEntry(W(), cq), IntegerEntry(X(height, lastBlock.timestamp), cq)]
320- $Tuple10(cv, cw, ch, ci, cl, cn, ck, cp, cj, cx)
321- }
322- }
323-
324-
325-func cy (cd,cz,cA,cB,cC,cD,ab,cE,cF) = {
326- let bT = aV()
327- let cg = fromBase58String(bT[q])
328- let cG = bT[r]
329- let cH = bT[s]
330- let cI = bT[v]
331- let cJ = bT[w]
332- let bU = parseIntValue(bT[t])
333- let bV = parseIntValue(bT[u])
334- let cj = bT[p]
335- let ck = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
336- let cK = toBase58String(valueOrElse(cB, fromBase58String("WAVES")))
337- let cL = toBase58String(valueOrElse(cD, fromBase58String("WAVES")))
338- if (if ((cG != cK))
339- then true
340- else (cH != cL))
341- then throw("Invalid amt or price asset passed.")
342- else {
343- let cl = if (cE)
344- then bE(cG)
345- else (bE(cG) - cA)
346- let cn = if (cE)
347- then bE(cH)
348- else (bE(cH) - cC)
349- let cM = D(cA, bU)
350- let cN = D(cC, bV)
351- let cO = bG(cN, cM)
352- let cm = D(cl, bU)
353- let co = D(cn, bV)
354- let cP = if ((ck == 0))
297+func bX (ap,bY,bZ,bT) = {
298+ let ca = ar(ap)
299+ if ((ca == ca))
300+ then {
301+ let cb = as(bZ)
302+ if ((cb == cb))
355303 then {
356- let cp = e
357- let cQ = e
358- let bX = pow((cM * cN), 0, toBigInt(5), 1, 0, DOWN)
359- $Tuple5(H(bX, b), H(cM, bU), H(cN, bV), bG((co + cN), (cm + cM)), cQ)
304+ let cc = bf(ap)
305+ if ((bY > 0))
306+ then {
307+ let cd = invoke(bT, "deposit", nil, [AttachedPayment(cc, bY)])
308+ if ((cd == cd))
309+ then {
310+ let bV = cd
311+ if ($isInstanceOf(bV, "Int"))
312+ then {
313+ let ce = bV
314+ let cf = (ca + bY)
315+ let cg = (cb + ce)
316+[IntegerEntry(ao(ap), cf), IntegerEntry(aq(bZ), cg)]
317+ }
318+ else nil
319+ }
320+ else throw("Strict value is not equal to itself.")
321+ }
322+ else nil
360323 }
361- else {
362- let cp = bG(co, cm)
363- let cQ = fraction(R((cp - cO)), d, cp)
364- let cR = D(cz, b)
365- if (if ((cp != e))
366- then (cQ > cR)
367- else false)
368- then throw(((("Price slippage " + toString(cQ)) + " exceeded the passed limit of ") + toString(cR)))
369- else {
370- let cs = D(ck, b)
371- let cS = fraction(cM, bJ(co, cm, CEILING), d, CEILING)
372- let cT = fraction(cN, d, bJ(co, cm, FLOOR), CEILING)
373- let cU = if ((cS > cN))
374- then $Tuple2(cT, cN)
375- else $Tuple2(cM, cS)
376- let cV = cU._1
377- let cW = cU._2
378- let bX = fraction(cs, cW, co, FLOOR)
379- $Tuple5(K(bX, b, FLOOR), K(cV, bU, CEILING), K(cW, bV, CEILING), cp, cQ)
380- }
381- }
382- let cX = cP._1
383- let cY = cP._2
384- let cZ = cP._3
385- let cq = H(cP._4, b)
386- let da = H(cP._5, b)
387- if ((0 >= cX))
388- then throw("Invalid calculations. LP calculated is less than zero.")
389- else {
390- let db = if (!(cF))
391- then 0
392- else cX
393- let dc = (cA - cY)
394- let dd = (cC - cZ)
395- let de = [IntegerEntry(W(), cq), IntegerEntry(X(height, lastBlock.timestamp), cq), StringEntry(aa(ab, cd), bp(cY, cZ, db, cq, cz, da, height, lastBlock.timestamp, dc, dd))]
396- $Tuple13(cX, db, cq, cl, cn, ck, cg, cj, de, dc, dd, cB, cD)
397- }
398- }
399- }
400-
401-
402-func df (dg,dh,ck) = {
403- let di = G(dg, toBigInt(bk))
404- let dj = G(dh, toBigInt(bl))
405- let dk = fraction(pow((di * dj), 0, toBigInt(5), 1, 18, DOWN), g, ck)
406- if ((ck == f))
407- then f
408- else dk
409- }
410-
411-
412-func dl (dm,dn,do) = {
413- let dp = (toBigInt(bE(ba(bi))) - dm)
414- let dq = (toBigInt(bE(ba(bj))) - dn)
415- let dr = (toBigInt(value(assetInfo(bh)).quantity) - do)
416- let ds = df(dp, dq, dr)
417- ds
418- }
419-
420-
421-func dt (du,dv,do) = {
422- let dp = (bE(ba(bi)) + du)
423- let dq = (bE(ba(bj)) + dv)
424- let dr = (value(assetInfo(bh)).quantity + do)
425- let dk = df(toBigInt(dp), toBigInt(dq), toBigInt(dr))
426- let dw = [IntegerEntry(ak, height), StringEntry(aj, toString(dk))]
427- $Tuple2(dw, dk)
428- }
429-
430-
431-func dx (dy,dk) = if ((dk >= dy))
432- then true
433- else aL(makeString(["updated KLp lower than current KLp", toString(dy), toString(dk)], " "))
434-
435-
436-func dz (dA) = {
437- let dp = bE(ba(bi))
438- let dq = bE(ba(bj))
439- let dB = dA.amount
440- let dC = fraction(dA.amount, dA.price, b, FLOOR)
441- let dD = if ((dA.orderType == Buy))
442- then $Tuple2(dB, -(dC))
443- else $Tuple2(-(dB), dC)
444- let du = dD._1
445- let dv = dD._2
446- if (if (if (aT())
447- then true
448- else (bg == m))
449- then true
450- else (bg == n))
451- then throw("Exchange operations disabled")
452- else if (if ((dA.assetPair.amountAsset != bi))
453- then true
454- else (dA.assetPair.priceAsset != bj))
455- then throw("Wrong order assets.")
456- else {
457- let dE = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aN("invalid kLp"))
458- let dF = dt(du, dv, 0)
459- let dG = dF._1
460- let dH = dF._2
461- let dI = (dH >= dE)
462- let dJ = makeString(["kLp=", toString(dE), " kLpNew=", toString(dH), " amountAssetBalance=", toString(dp), " priceAssetBalance=", toString(dq), " amountAssetBalanceDelta=", toString(du), " priceAssetBalanceDelta=", toString(dv), " height=", toString(height)], "")
463- $Tuple2(dI, dJ)
464- }
465- }
466-
467-
468-func dK (dL) = if ((size(dL.payments) != 1))
469- then throw("exactly 1 payment is expected")
470- else {
471- let dM = value(dL.payments[0])
472- let ce = value(dM.assetId)
473- let dN = dM.amount
474- let cP = cc(toBase58String(dL.transactionId), toBase58String(ce), dN, dL.caller)
475- let cv = cP._1
476- let cw = cP._2
477- let cj = parseIntValue(cP._9)
478- let cx = cP._10
479- if (if (aT())
480- then true
481- else (cj == n))
482- then throw(("Get operation is blocked by admin. Status = " + toString(cj)))
483- else $Tuple5(cv, cw, dN, ce, cx)
484- }
485-
486-
487-func dO (dL,cz,cF) = if ((size(dL.payments) != 2))
488- then throw("exactly 2 payments are expected")
489- else {
490- let dP = value(dL.payments[0])
491- let dQ = value(dL.payments[1])
492- let dR = cy(toBase58String(dL.transactionId), cz, dP.amount, dP.assetId, dQ.amount, dQ.assetId, toString(dL.caller), false, cF)
493- let cj = parseIntValue(dR._8)
494- if (if (if (aT())
495- then true
496- else (cj == l))
497- then true
498- else (cj == n))
499- then throw(("Put operation is blocked by admin. Status = " + toString(cj)))
500- else dR
501- }
502-
503-
504-func dS (dT) = {
505- let dU = invoke(aO, "emit", [dT], nil)
506- if ((dU == dU))
507- then {
508- let dV = {
509- let dW = dU
510- if ($isInstanceOf(dW, "Address"))
511- then {
512- let dX = dW
513- invoke(dX, "emit", [dT], nil)
514- }
515- else unit
516- }
517- if ((dV == dV))
518- then dT
519324 else throw("Strict value is not equal to itself.")
520325 }
521326 else throw("Strict value is not equal to itself.")
522327 }
523328
524329
525-func dY (dT,ai) = {
526- let dZ = if ((ai == 0))
527- then 0
528- else fraction(dT, ai, b)
529- $Tuple2((dT - dZ), dZ)
530- }
531-
532-
533-func ea (eb,ec,ab,ac) = {
534- let ed = (ac == unit)
535- let ee = bE(ba(bi))
536- let ef = bE(ba(bj))
537- let eg = if ((ec == bi))
538- then true
539- else if ((ec == bj))
540- then false
541- else aL("invalid asset")
542- let eh = if (ed)
543- then $Tuple2(ee, ef)
544- else if (eg)
545- then $Tuple2((ee - eb), ef)
546- else $Tuple2(ee, (ef - eb))
547- let ei = eh._1
548- let ej = eh._2
549- let ek = if (eg)
550- then $Tuple2(eb, 0)
551- else $Tuple2(0, eb)
552- let el = ek._1
553- let em = ek._2
554- let dB = dY(el, aQ)._1
555- let dC = dY(em, aQ)._1
556- let en = dY(eb, aQ)
557- let eo = en._1
558- let dZ = en._2
559- let ep = (ei + dB)
560- let eq = (ej + dC)
561- let er = bG(D(eq, bl), D(ep, bk))
562- let es = H(er, b)
563- let et = if (eg)
564- then ei
565- else ej
566- let eu = toBigInt(et)
567- let ev = toBigInt(valueOrErrorMessage(assetInfo(bh), (("asset " + toBase58String(bh)) + " doesn't exist")).quantity)
568- let ew = if ((ev > f))
569- then true
570- else aL("initial deposit requires all coins")
571- if ((ew == ew))
330+func ch (ap,bY,bZ,bT,ci,cj) = {
331+ let ca = ar(ap)
332+ if ((ca == ca))
572333 then {
573- let ex = toBigInt(eo)
574- let ey = max([0, toInt(((ev * (sqrtBigInt((d + ((ex * d) / eu)), 18, 18, DOWN) - d)) / d))])
575- let de = if (ed)
576- then nil
577- else [IntegerEntry(W(), es), IntegerEntry(X(height, lastBlock.timestamp), es), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bp(el, em, ey, es, 0, 0, height, lastBlock.timestamp, 0, 0))]
578- let ez = bG(D(ej, bl), D(ei, bk))
579- let eA = H(ez, b)
580- let eB = {
581- let eC = if (eg)
582- then $Tuple2(el, ei)
583- else $Tuple2(em, ej)
584- let dT = eC._1
585- let eD = eC._2
586- let eE = toInt(fraction(ev, toBigInt((dT / 2)), toBigInt(eD)))
587- fraction((ey - eE), b, eE)
588- }
589- $Tuple5(ey, de, dZ, eB, eg)
334+ let cb = as(bZ)
335+ if ((cb == cb))
336+ then {
337+ let ck = bS(bT)
338+ if ((ck == ck))
339+ then {
340+ let cl = fraction(ci, ca, cb)
341+ let cm = bf(bZ)
342+ let cn = fraction(ci, bY, cl)
343+ let co = fraction(ci, bY, ck)
344+ let cp = max([0, (cn - co)])
345+ if ((co > 0))
346+ then {
347+ let cq = invoke(bT, "withdraw", nil, [AttachedPayment(cm, co)])
348+ if ((cq == cq))
349+ then {
350+ let bV = cq
351+ if ($isInstanceOf(bV, "Int"))
352+ then {
353+ let cr = bV
354+ let cf = (ca - cr)
355+ let cg = ((cb - co) - cp)
356+[IntegerEntry(ao(ap), cf), IntegerEntry(aq(bZ), cg), ScriptTransfer(cj, cp, bf(bZ))]
357+ }
358+ else nil
359+ }
360+ else throw("Strict value is not equal to itself.")
361+ }
362+ else nil
363+ }
364+ else throw("Strict value is not equal to itself.")
365+ }
366+ else throw("Strict value is not equal to itself.")
590367 }
591368 else throw("Strict value is not equal to itself.")
592369 }
593370
594371
595-func eF (eG,eo,ec,ab,ac) = {
596- let ed = (ac == unit)
597- let bT = aV()
598- let bU = parseIntValue(bT[t])
599- let bV = parseIntValue(bT[u])
600- let eH = [if ((ec == bh))
601- then true
602- else aL("invalid lp asset")]
603- if ((eH == eH))
372+func cs (ap) = {
373+ let bV = invoke(aV, "getPoolLeaseConfigREADONLY", [toString(this), ap], nil)
374+ if ($isInstanceOf(bV, "(Boolean, Int, Int, String, String, Int, String)"))
604375 then {
605- let eI = if ((eG == bi))
606- then true
607- else if ((eG == bj))
608- then false
609- else aL("invalid asset")
610- let eJ = if (eI)
611- then toBigInt(bE(ba(bi)))
612- else toBigInt(bE(ba(bj)))
613- let eK = if (eI)
614- then bU
615- else bV
616- let eL = bE(ba(bi))
617- let eM = bE(ba(bj))
618- let eN = if (eI)
619- then eL
620- else eM
621- let eO = toBigInt(eN)
622- let ev = toBigInt(valueOrErrorMessage(assetInfo(bh), (("asset " + toBase58String(bh)) + " doesn't exist")).quantity)
623- let eP = toBigInt(eo)
624- let eQ = max([0, toInt(((eJ * (d - pow((d - ((eP * d) / ev)), 18, h, 0, 18, DOWN))) / d))])
625- let eR = dY(eQ, aS)
626- let eS = eR._1
627- let dZ = eR._2
628- let eT = if (eI)
629- then $Tuple4(eS, 0, (eL - eQ), eM)
630- else $Tuple4(0, eS, eL, (eM - eQ))
631- let eU = eT._1
632- let eV = eT._2
633- let eW = eT._3
634- let eX = eT._4
635- let er = bG(D(eX, bl), D(eW, bk))
636- let es = H(er, b)
637- let de = if (ed)
638- then nil
639- else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bA(eU, eV, eo, es, height, lastBlock.timestamp)), IntegerEntry(W(), es), IntegerEntry(X(height, lastBlock.timestamp), es)]
640- let ez = bG(D(eM, bl), D(eL, bk))
641- let eA = H(ez, b)
642- let eB = {
643- let eY = (toInt(fraction(eJ, eP, ev)) * 2)
644- fraction((eS - eY), b, eY)
645- }
646- $Tuple5(eS, de, dZ, eB, eI)
376+ let ct = bV
377+ ct
378+ }
379+ else aS((("[" + ap) + "] getLeaseProxyConfig() error"))
380+ }
381+
382+
383+func cu (cv,ap,bZ,cw,bT,ci,cj) = {
384+ let ca = ar(ap)
385+ if ((ca == ca))
386+ then {
387+ let cb = as(bZ)
388+ if ((cb == cb))
389+ then {
390+ let cx = max([0, (bL(ap) - cw)])
391+ let cy = fraction(cv, cx, 100)
392+ let cz = (ca - cy)
393+ if ((cz == 0))
394+ then nil
395+ else if ((0 > cz))
396+ then {
397+ let cA = -(cz)
398+ bX(ap, cA, bZ, bT)
399+ }
400+ else {
401+ let cB = cz
402+ ch(ap, cB, bZ, bT, ci, cj)
403+ }
404+ }
405+ else throw("Strict value is not equal to itself.")
647406 }
648407 else throw("Strict value is not equal to itself.")
649408 }
650409
651410
652-func eZ () = {
653- let dW = getString(U())
654- if ($isInstanceOf(dW, "String"))
411+func cC (ap) = {
412+ let cD = cs(ap)
413+ let cE = cD._1
414+ let cF = cD._2
415+ let cw = cD._3
416+ let cG = cD._4
417+ let cH = cD._5
418+ let ci = cD._6
419+ let cI = cD._7
420+ if (cE)
421+ then cu(cF, ap, cH, cw, addressFromStringValue(cG), ci, addressFromStringValue(cI))
422+ else nil
423+ }
424+
425+
426+func cJ (ap,cK) = {
427+ let cL = cs(ap)
428+ let cE = cL._1
429+ let cF = cL._2
430+ let cw = cL._3
431+ let cG = cL._4
432+ let cH = cL._5
433+ let ci = cL._6
434+ let cI = cL._7
435+ if (cE)
655436 then {
656- let fa = dW
657- fromBase58String(fa)
437+ let cM = max([0, ((bL(ap) - cK) - cw)])
438+ if ((cM == cM))
439+ then {
440+ let cf = fraction(cF, cM, 100)
441+ if ((cf == cf))
442+ then {
443+ let cN = (ar(ap) - cf)
444+ if ((cN == cN))
445+ then if ((0 > cN))
446+ then bX(ap, -(cN), cH, addressFromStringValue(cG))
447+ else ch(ap, cN, cH, addressFromStringValue(cG), ci, addressFromStringValue(cI))
448+ else throw("Strict value is not equal to itself.")
449+ }
450+ else throw("Strict value is not equal to itself.")
451+ }
452+ else throw("Strict value is not equal to itself.")
658453 }
659- else if ($isInstanceOf(dW, "Unit"))
454+ else nil
455+ }
456+
457+
458+func cO (cP,cQ) = {
459+ let cR = cJ(aO(this, ae()), cP)
460+ let cS = cJ(aO(this, af()), cQ)
461+ (cR ++ cS)
462+ }
463+
464+
465+func cT (cU,cV,cW,cX) = {
466+ let cY = D(cW, cU)
467+ let cZ = D(cX, cV)
468+ bO(cZ, cY)
469+ }
470+
471+
472+func da (cW,cX,db) = {
473+ let dc = bc()
474+ let dd = parseIntValue(dc[t])
475+ let de = parseIntValue(dc[u])
476+ let df = cT(dd, de, cW, cX)
477+ let bQ = D(cW, dd)
478+ let bP = D(cX, de)
479+ let dg = D(db, b)
480+ let dh = bO(bQ, dg)
481+ let di = bO(bP, dg)
482+[df, dh, di]
483+ }
484+
485+
486+func dj (cW,cX,db) = {
487+ let dk = da(cW, cX, db)
488+[H(dk[0], b), H(dk[1], b), H(dk[2], b)]
489+ }
490+
491+
492+func dl (dm,dn,do,ab) = {
493+ let dc = bc()
494+ let dp = dc[q]
495+ let dq = dc[r]
496+ let dr = dc[s]
497+ let cU = parseIntValue(dc[t])
498+ let cV = parseIntValue(dc[u])
499+ let ds = dc[p]
500+ let dt = valueOrErrorMessage(assetInfo(fromBase58String(dp)), (("Asset " + dp) + " doesn't exist")).quantity
501+ if ((dp != dn))
502+ then throw("Invalid asset passed.")
503+ else {
504+ let du = bL(dq)
505+ let dv = D(du, cU)
506+ let dw = bL(dr)
507+ let dx = D(dw, cV)
508+ let dy = bO(dx, dv)
509+ let dz = H(dy, b)
510+ let dA = D(do, b)
511+ let dB = D(dt, b)
512+ let dC = fraction(dv, dA, dB)
513+ let dD = fraction(dx, dA, dB)
514+ let dE = K(dC, cU, FLOOR)
515+ let dF = K(dD, cV, FLOOR)
516+ let dG = if ((dm == ""))
517+ then nil
518+ else [ScriptTransfer(ab, dE, if ((dq == "WAVES"))
519+ then unit
520+ else fromBase58String(dq)), ScriptTransfer(ab, dF, if ((dr == "WAVES"))
521+ then unit
522+ else fromBase58String(dr)), StringEntry(ad(toString(ab), dm), bH(dE, dF, do, dz, height, lastBlock.timestamp)), IntegerEntry(W(), dz), IntegerEntry(X(height, lastBlock.timestamp), dz)]
523+ $Tuple10(dE, dF, dq, dr, du, dw, dt, dy, ds, dG)
524+ }
525+ }
526+
527+
528+func dH (dm,dI,dJ,dK,dL,dM,ab,dN,dO) = {
529+ let dc = bc()
530+ let dp = fromBase58String(dc[q])
531+ let dP = dc[r]
532+ let dQ = dc[s]
533+ let dR = dc[v]
534+ let dS = dc[w]
535+ let dd = parseIntValue(dc[t])
536+ let de = parseIntValue(dc[u])
537+ let ds = dc[p]
538+ let dt = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity
539+ let dT = toBase58String(valueOrElse(dK, fromBase58String("WAVES")))
540+ let dU = toBase58String(valueOrElse(dM, fromBase58String("WAVES")))
541+ if (if ((dP != dT))
542+ then true
543+ else (dQ != dU))
544+ then throw("Invalid amt or price asset passed.")
545+ else {
546+ let du = if (dN)
547+ then bL(dP)
548+ else (bL(dP) - dJ)
549+ let dw = if (dN)
550+ then bL(dQ)
551+ else (bL(dQ) - dL)
552+ let dV = D(dJ, dd)
553+ let dW = D(dL, de)
554+ let dX = bO(dW, dV)
555+ let dv = D(du, dd)
556+ let dx = D(dw, de)
557+ let dY = if ((dt == 0))
558+ then {
559+ let dy = e
560+ let dZ = e
561+ let dg = pow((dV * dW), 0, toBigInt(5), 1, 0, DOWN)
562+ $Tuple5(H(dg, b), H(dV, dd), H(dW, de), bO((dx + dW), (dv + dV)), dZ)
563+ }
564+ else {
565+ let dy = bO(dx, dv)
566+ let dZ = fraction(R((dy - dX)), d, dy)
567+ let ea = D(dI, b)
568+ if (if ((dy != e))
569+ then (dZ > ea)
570+ else false)
571+ then throw(((("Price slippage " + toString(dZ)) + " exceeded the passed limit of ") + toString(ea)))
572+ else {
573+ let dB = D(dt, b)
574+ let eb = fraction(dV, bR(dx, dv, CEILING), d, CEILING)
575+ let ec = fraction(dW, d, bR(dx, dv, FLOOR), CEILING)
576+ let ed = if ((eb > dW))
577+ then $Tuple2(ec, dW)
578+ else $Tuple2(dV, eb)
579+ let ee = ed._1
580+ let ef = ed._2
581+ let dg = fraction(dB, ef, dx, FLOOR)
582+ $Tuple5(K(dg, b, FLOOR), K(ee, dd, CEILING), K(ef, de, CEILING), dy, dZ)
583+ }
584+ }
585+ let eg = dY._1
586+ let eh = dY._2
587+ let ei = dY._3
588+ let dz = H(dY._4, b)
589+ let ej = H(dY._5, b)
590+ if ((0 >= eg))
591+ then throw("Invalid calculations. LP calculated is less than zero.")
592+ else {
593+ let ek = if (!(dO))
594+ then 0
595+ else eg
596+ let el = (dJ - eh)
597+ let em = (dL - ei)
598+ let en = [IntegerEntry(W(), dz), IntegerEntry(X(height, lastBlock.timestamp), dz), StringEntry(aa(ab, dm), bw(eh, ei, ek, dz, dI, ej, height, lastBlock.timestamp, el, em))]
599+ $Tuple13(eg, ek, dz, du, dw, dt, dp, ds, en, el, em, dK, dM)
600+ }
601+ }
602+ }
603+
604+
605+func eo (ep,eq,dt) = {
606+ let er = G(ep, toBigInt(br))
607+ let es = G(eq, toBigInt(bs))
608+ let et = fraction(pow((er * es), 0, toBigInt(5), 1, 18, DOWN), g, dt)
609+ if ((dt == f))
610+ then f
611+ else et
612+ }
613+
614+
615+func eu (ev,ew,ex) = {
616+ let ey = (toBigInt(bL(bh(bp))) - ev)
617+ let ez = (toBigInt(bL(bh(bq))) - ew)
618+ let eA = (toBigInt(value(assetInfo(bo)).quantity) - ex)
619+ let eB = eo(ey, ez, eA)
620+ eB
621+ }
622+
623+
624+func eC (eD,eE,ex) = {
625+ let ey = (bL(bh(bp)) + eD)
626+ let ez = (bL(bh(bq)) + eE)
627+ let eA = (value(assetInfo(bo)).quantity + ex)
628+ let et = eo(toBigInt(ey), toBigInt(ez), toBigInt(eA))
629+ let eF = [IntegerEntry(ak, height), StringEntry(aj, toString(et))]
630+ $Tuple2(eF, et)
631+ }
632+
633+
634+func eG () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
635+
636+
637+func eH (eI,et) = if ((et >= eI))
638+ then true
639+ else aS(makeString(["updated KLp lower than current KLp", toString(eI), toString(et)], " "))
640+
641+
642+func eJ (eK) = {
643+ let ey = bL(bh(bp))
644+ let ez = bL(bh(bq))
645+ let eL = eK.amount
646+ let eM = fraction(eK.amount, eK.price, b, FLOOR)
647+ let eN = if ((eK.orderType == Buy))
648+ then $Tuple2(eL, -(eM))
649+ else $Tuple2(-(eL), eM)
650+ let eD = eN._1
651+ let eE = eN._2
652+ if (if (if (ba())
653+ then true
654+ else (bn == m))
655+ then true
656+ else (bn == n))
657+ then throw("Exchange operations disabled")
658+ else if (if ((eK.assetPair.amountAsset != bp))
659+ then true
660+ else (eK.assetPair.priceAsset != bq))
661+ then throw("Wrong order assets.")
662+ else {
663+ let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp"))
664+ let eP = eC(eD, eE, 0)
665+ let eQ = eP._1
666+ let eR = eP._2
667+ let eS = (eR >= eO)
668+ let eT = makeString(["kLp=", toString(eO), " kLpNew=", toString(eR), " amountAssetBalance=", toString(ey), " priceAssetBalance=", toString(ez), " amountAssetBalanceDelta=", toString(eD), " priceAssetBalanceDelta=", toString(eE), " height=", toString(height)], "")
669+ $Tuple2(eS, eT)
670+ }
671+ }
672+
673+
674+func eU (eV) = if ((size(eV.payments) != 1))
675+ then throw("exactly 1 payment is expected")
676+ else {
677+ let eW = value(eV.payments[0])
678+ let dn = value(eW.assetId)
679+ let eX = eW.amount
680+ let dY = dl(toBase58String(eV.transactionId), toBase58String(dn), eX, eV.caller)
681+ let dE = dY._1
682+ let dF = dY._2
683+ let ds = parseIntValue(dY._9)
684+ let dG = dY._10
685+ if (if (ba())
686+ then true
687+ else (ds == n))
688+ then throw(("Get operation is blocked by admin. Status = " + toString(ds)))
689+ else $Tuple5(dE, dF, eX, dn, dG)
690+ }
691+
692+
693+func eY (eV,dI,dO) = if ((size(eV.payments) != 2))
694+ then throw("exactly 2 payments are expected")
695+ else {
696+ let eZ = value(eV.payments[0])
697+ let fa = value(eV.payments[1])
698+ let fb = dH(toBase58String(eV.transactionId), dI, eZ.amount, eZ.assetId, fa.amount, fa.assetId, toString(eV.caller), false, dO)
699+ let ds = parseIntValue(fb._8)
700+ if (if (if (ba())
701+ then true
702+ else (ds == l))
703+ then true
704+ else (ds == n))
705+ then throw(("Put operation is blocked by admin. Status = " + toString(ds)))
706+ else fb
707+ }
708+
709+
710+func fc (bY) = {
711+ let fd = invoke(aV, "emit", [bY], nil)
712+ if ((fd == fd))
713+ then {
714+ let fe = {
715+ let bV = fd
716+ if ($isInstanceOf(bV, "Address"))
717+ then {
718+ let ff = bV
719+ invoke(ff, "emit", [bY], nil)
720+ }
721+ else unit
722+ }
723+ if ((fe == fe))
724+ then bY
725+ else throw("Strict value is not equal to itself.")
726+ }
727+ else throw("Strict value is not equal to itself.")
728+ }
729+
730+
731+func fg (bY,ai) = {
732+ let fh = if ((ai == 0))
733+ then 0
734+ else fraction(bY, ai, b)
735+ $Tuple2((bY - fh), fh)
736+ }
737+
738+
739+func fi (fj,fk,ab,ac) = {
740+ let fl = (ac == unit)
741+ let fm = bL(bh(bp))
742+ let fn = bL(bh(bq))
743+ let fo = if ((fk == bp))
744+ then true
745+ else if ((fk == bq))
746+ then false
747+ else aS("invalid asset")
748+ let fp = if (fl)
749+ then $Tuple2(fm, fn)
750+ else if (fo)
751+ then $Tuple2((fm - fj), fn)
752+ else $Tuple2(fm, (fn - fj))
753+ let fq = fp._1
754+ let fr = fp._2
755+ let fs = if (fo)
756+ then $Tuple2(fj, 0)
757+ else $Tuple2(0, fj)
758+ let ft = fs._1
759+ let fu = fs._2
760+ let eL = fg(ft, aX)._1
761+ let eM = fg(fu, aX)._1
762+ let fv = fg(fj, aX)
763+ let fw = fv._1
764+ let fh = fv._2
765+ let fx = (fq + eL)
766+ let fy = (fr + eM)
767+ let fz = bO(D(fy, bs), D(fx, br))
768+ let fA = H(fz, b)
769+ let fB = if (fo)
770+ then fq
771+ else fr
772+ let fC = toBigInt(fB)
773+ let fD = toBigInt(valueOrErrorMessage(assetInfo(bo), (("asset " + toBase58String(bo)) + " doesn't exist")).quantity)
774+ let fE = if ((fD > f))
775+ then true
776+ else aS("initial deposit requires all coins")
777+ if ((fE == fE))
778+ then {
779+ let fF = toBigInt(fw)
780+ let fG = max([0, toInt(((fD * (sqrtBigInt((d + ((fF * d) / fC)), 18, 18, DOWN) - d)) / d))])
781+ let en = if (fl)
782+ then nil
783+ else [IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bw(ft, fu, fG, fA, 0, 0, height, lastBlock.timestamp, 0, 0))]
784+ let fH = bO(D(fr, bs), D(fq, br))
785+ let fI = H(fH, b)
786+ let fJ = {
787+ let fK = if (fo)
788+ then $Tuple2(ft, fq)
789+ else $Tuple2(fu, fr)
790+ let bY = fK._1
791+ let fL = fK._2
792+ let fM = toInt(fraction(fD, toBigInt((bY / 2)), toBigInt(fL)))
793+ fraction((fG - fM), b, fM)
794+ }
795+ $Tuple5(fG, en, fh, fJ, fo)
796+ }
797+ else throw("Strict value is not equal to itself.")
798+ }
799+
800+
801+func fN (fO,fw,fk,ab,ac) = {
802+ let fl = (ac == unit)
803+ let dc = bc()
804+ let dd = parseIntValue(dc[t])
805+ let de = parseIntValue(dc[u])
806+ let fP = [if ((fk == bo))
807+ then true
808+ else aS("invalid lp asset")]
809+ if ((fP == fP))
810+ then {
811+ let fQ = if ((fO == bp))
812+ then true
813+ else if ((fO == bq))
814+ then false
815+ else aS("invalid asset")
816+ let fR = if (fQ)
817+ then toBigInt(bL(bh(bp)))
818+ else toBigInt(bL(bh(bq)))
819+ let fS = if (fQ)
820+ then dd
821+ else de
822+ let fT = bL(bh(bp))
823+ let fU = bL(bh(bq))
824+ let fV = if (fQ)
825+ then fT
826+ else fU
827+ let fW = toBigInt(fV)
828+ let fD = toBigInt(valueOrErrorMessage(assetInfo(bo), (("asset " + toBase58String(bo)) + " doesn't exist")).quantity)
829+ let fX = toBigInt(fw)
830+ let fY = max([0, toInt(((fR * (d - pow((d - ((fX * d) / fD)), 18, h, 0, 18, DOWN))) / d))])
831+ let fZ = fg(fY, aZ)
832+ let ga = fZ._1
833+ let fh = fZ._2
834+ let gb = if (fQ)
835+ then $Tuple4(ga, 0, (fT - fY), fU)
836+ else $Tuple4(0, ga, fT, (fU - fY))
837+ let gc = gb._1
838+ let gd = gb._2
839+ let ge = gb._3
840+ let gf = gb._4
841+ let fz = bO(D(gf, bs), D(ge, br))
842+ let fA = H(fz, b)
843+ let en = if (fl)
844+ then nil
845+ else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bH(gc, gd, fw, fA, height, lastBlock.timestamp)), IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA)]
846+ let fH = bO(D(fU, bs), D(fT, br))
847+ let fI = H(fH, b)
848+ let fJ = {
849+ let gg = (toInt(fraction(fR, fX, fD)) * 2)
850+ fraction((ga - gg), b, gg)
851+ }
852+ $Tuple5(ga, en, fh, fJ, fQ)
853+ }
854+ else throw("Strict value is not equal to itself.")
855+ }
856+
857+
858+func gh () = {
859+ let bV = getString(U())
860+ if ($isInstanceOf(bV, "String"))
861+ then {
862+ let gi = bV
863+ fromBase58String(gi)
864+ }
865+ else if ($isInstanceOf(bV, "Unit"))
660866 then unit
661867 else throw("Match error")
662868 }
663869
664870
665-func fb () = {
666- let dW = getString(V())
667- if ($isInstanceOf(dW, "String"))
871+func gj () = {
872+ let bV = getString(V())
873+ if ($isInstanceOf(bV, "String"))
668874 then {
669- let fa = dW
670- fromBase58String(fa)
875+ let gi = bV
876+ fromBase58String(gi)
671877 }
672- else if ($isInstanceOf(dW, "Unit"))
878+ else if ($isInstanceOf(bV, "Unit"))
673879 then unit
674880 else throw("Match error")
675881 }
676882
677883
678-func fc (dL) = {
679- let dW = eZ()
680- if ($isInstanceOf(dW, "ByteVector"))
884+func gk (eV) = {
885+ let bV = gh()
886+ if ($isInstanceOf(bV, "ByteVector"))
681887 then {
682- let fd = dW
683- (dL.callerPublicKey == fd)
888+ let gl = bV
889+ (eV.callerPublicKey == gl)
684890 }
685- else if ($isInstanceOf(dW, "Unit"))
686- then (dL.caller == this)
891+ else if ($isInstanceOf(bV, "Unit"))
892+ then (eV.caller == this)
687893 else throw("Match error")
688894 }
689895
690896
691-func fe (dL) = {
692- let ff = throw("Permission denied")
693- let dW = eZ()
694- if ($isInstanceOf(dW, "ByteVector"))
897+func gm (eV) = {
898+ let gn = throw("Permission denied")
899+ let bV = gh()
900+ if ($isInstanceOf(bV, "ByteVector"))
695901 then {
696- let fd = dW
697- if ((dL.callerPublicKey == fd))
902+ let gl = bV
903+ if ((eV.callerPublicKey == gl))
698904 then true
699- else ff
905+ else gn
700906 }
701- else if ($isInstanceOf(dW, "Unit"))
702- then if ((dL.caller == this))
907+ else if ($isInstanceOf(bV, "Unit"))
908+ then if ((eV.caller == this))
703909 then true
704- else ff
910+ else gn
705911 else throw("Match error")
706912 }
707913
708914
709-@Callable(dL)
710-func calculateAmountOutForSwapREADONLY (fg,fh,fi) = {
711- let fj = if ((fh == false))
915+@Callable(eV)
916+func rebalance () = (cC(aO(this, ae())) ++ cC(aO(this, af())))
917+
918+
919+
920+@Callable(eV)
921+func calculateAmountOutForSwapREADONLY (go,gp,gq) = {
922+ let gr = if ((gp == false))
712923 then {
713- let fk = aH(this, af())
714- let fl = aH(this, ae())
715- $Tuple2(fk, fl)
924+ let gs = aO(this, af())
925+ let gt = aO(this, ae())
926+ $Tuple2(gs, gt)
716927 }
717928 else {
718- let fk = aH(this, ae())
719- let fl = aH(this, af())
720- $Tuple2(fk, fl)
929+ let gs = aO(this, ae())
930+ let gt = aO(this, af())
931+ $Tuple2(gs, gt)
721932 }
722- let fk = fj._1
723- let fl = fj._2
724- let fm = bE(fl)
725- let fn = bE(fk)
726- let fo = fraction(fn, fg, (fm + fg))
727- let fp = (toBigInt(fm) * toBigInt(fn))
728- let fq = (((toBigInt(bE(fl)) + toBigInt(fg)) + toBigInt(fi)) * (toBigInt(bE(fk)) - toBigInt(fo)))
729- let fr = if ((fq >= fp))
933+ let gs = gr._1
934+ let gt = gr._2
935+ let gu = bL(gt)
936+ let gv = bL(gs)
937+ let gw = fraction(gv, go, (gu + go))
938+ let gx = (toBigInt(gu) * toBigInt(gv))
939+ let gy = (((toBigInt(bL(gt)) + toBigInt(go)) + toBigInt(gq)) * (toBigInt(bL(gs)) - toBigInt(gw)))
940+ let gz = if ((gy >= gx))
730941 then true
731942 else throw("new K is fewer error")
732- if ((fr == fr))
733- then $Tuple2(nil, fo)
943+ if ((gz == gz))
944+ then $Tuple2(nil, gw)
734945 else throw("Strict value is not equal to itself.")
735946 }
736947
737948
738949
739-@Callable(dL)
740-func calculateAmountOutForSwapAndSendTokens (fg,fh,fs,ft,fi) = {
741- let fu = {
742- let aR = invoke(aO, "getSwapContractREADONLY", nil, nil)
743- if ($isInstanceOf(aR, "String"))
744- then aR
745- else throw(($getType(aR) + " couldn't be cast to String"))
950+@Callable(eV)
951+func calculateAmountOutForSwapAndSendTokens (go,gp,gA,gB,gq) = {
952+ let gC = {
953+ let aY = invoke(aV, "getSwapContractREADONLY", nil, nil)
954+ if ($isInstanceOf(aY, "String"))
955+ then aY
956+ else throw(($getType(aY) + " couldn't be cast to String"))
746957 }
747- let eH = [if ((value(dL.payments[0]).amount >= fg))
958+ let fP = [if ((value(eV.payments[0]).amount >= go))
748959 then true
749- else aL("Wrong amount"), if ((dL.caller == addressFromStringValue(fu)))
960+ else aS("Wrong amount"), if ((eV.caller == addressFromStringValue(gC)))
750961 then true
751- else aL("Permission denied")]
752- if ((eH == eH))
962+ else aS("Permission denied")]
963+ if ((fP == fP))
753964 then {
754- let dM = value(dL.payments[0])
755- let fl = ba(dM.assetId)
756- let fk = if ((fh == false))
757- then aH(this, af())
758- else aH(this, ae())
759- let fm = (bE(fl) - value(dL.payments[0]).amount)
760- let fn = bE(fk)
761- let fo = fraction(fn, fg, (fm + fg))
762- let fp = (toBigInt(fm) * toBigInt(fn))
763- let fq = ((toBigInt(bE(fl)) + toBigInt(fi)) * (toBigInt(bE(fk)) - toBigInt(fo)))
764- let fr = if ((fq >= fp))
965+ let eW = value(eV.payments[0])
966+ let gt = bh(eW.assetId)
967+ let gs = if ((gp == false))
968+ then aO(this, af())
969+ else aO(this, ae())
970+ let gu = (bL(gt) - value(eV.payments[0]).amount)
971+ let gv = bL(gs)
972+ let gw = fraction(gv, go, (gu + go))
973+ let gx = (toBigInt(gu) * toBigInt(gv))
974+ let gy = ((toBigInt(bL(gt)) + toBigInt(gq)) * (toBigInt(bL(gs)) - toBigInt(gw)))
975+ let gz = if ((gy >= gx))
765976 then true
766977 else throw("new K is fewer error")
767- if ((fr == fr))
978+ if ((gz == gz))
768979 then {
769- let fv = if ((fo >= fs))
980+ let gD = if ((gw >= gA))
770981 then true
771982 else throw("Exchange result is fewer coins than expected")
772- if ((fv == fv))
773- then $Tuple2([ScriptTransfer(addressFromStringValue(ft), fo, aY(fk))], fo)
983+ if ((gD == gD))
984+ then {
985+ let gE = cC(gt)
986+ if ((gE == gE))
987+ then {
988+ let gF = cJ(gs, gw)
989+ if ((gF == gF))
990+ then $Tuple2(((gF ++ gE) ++ [ScriptTransfer(addressFromStringValue(gB), gw, bf(gs))]), gw)
991+ else throw("Strict value is not equal to itself.")
992+ }
993+ else throw("Strict value is not equal to itself.")
994+ }
774995 else throw("Strict value is not equal to itself.")
775996 }
776997 else throw("Strict value is not equal to itself.")
777998 }
778999 else throw("Strict value is not equal to itself.")
7791000 }
7801001
7811002
7821003
783-@Callable(dL)
784-func setManager (fw) = {
785- let fx = fe(dL)
786- if ((fx == fx))
1004+@Callable(eV)
1005+func setManager (gG) = {
1006+ let gH = gm(eV)
1007+ if ((gH == gH))
7871008 then {
788- let fy = fromBase58String(fw)
789- if ((fy == fy))
790- then [StringEntry(V(), fw)]
1009+ let gI = fromBase58String(gG)
1010+ if ((gI == gI))
1011+ then [StringEntry(V(), gG)]
7911012 else throw("Strict value is not equal to itself.")
7921013 }
7931014 else throw("Strict value is not equal to itself.")
7941015 }
7951016
7961017
7971018
798-@Callable(dL)
1019+@Callable(eV)
7991020 func confirmManager () = {
800- let fz = fb()
801- let fA = if (isDefined(fz))
1021+ let gJ = gj()
1022+ let gK = if (isDefined(gJ))
8021023 then true
8031024 else throw("No pending manager")
804- if ((fA == fA))
1025+ if ((gK == gK))
8051026 then {
806- let fB = if ((dL.callerPublicKey == value(fz)))
1027+ let gL = if ((eV.callerPublicKey == value(gJ)))
8071028 then true
8081029 else throw("You are not pending manager")
809- if ((fB == fB))
810- then [StringEntry(U(), toBase58String(value(fz))), DeleteEntry(V())]
1030+ if ((gL == gL))
1031+ then [StringEntry(U(), toBase58String(value(gJ))), DeleteEntry(V())]
8111032 else throw("Strict value is not equal to itself.")
8121033 }
8131034 else throw("Strict value is not equal to itself.")
8141035 }
8151036
8161037
8171038
818-@Callable(dL)
819-func put (cz,fC) = if ((0 > cz))
1039+@Callable(eV)
1040+func put (dI,gM) = if ((0 > dI))
8201041 then throw("Invalid slippageTolerance passed")
8211042 else {
822- let dR = dO(dL, cz, true)
823- let db = dR._2
824- let cg = dR._7
825- let cx = dR._9
826- let dc = dR._10
827- let dd = dR._11
828- let fD = dR._12
829- let fE = dR._13
830- let dP = toBigInt(value(dL.payments[0]).amount)
831- let dQ = toBigInt(value(dL.payments[1]).amount)
832- let ds = dl(dP, dQ, toBigInt(0))
833- if ((ds == ds))
1043+ let fb = eY(eV, dI, true)
1044+ let ek = fb._2
1045+ let dp = fb._7
1046+ let dG = fb._9
1047+ let el = fb._10
1048+ let em = fb._11
1049+ let gN = fb._12
1050+ let gO = fb._13
1051+ let eZ = toBigInt(value(eV.payments[0]).amount)
1052+ let fa = toBigInt(value(eV.payments[1]).amount)
1053+ let eB = eu(eZ, fa, toBigInt(0))
1054+ if ((eB == eB))
8341055 then {
835- let dU = invoke(aO, "emit", [db], nil)
836- if ((dU == dU))
1056+ let fd = invoke(aV, "emit", [ek], nil)
1057+ if ((fd == fd))
8371058 then {
838- let dV = {
839- let dW = dU
840- if ($isInstanceOf(dW, "Address"))
1059+ let fe = {
1060+ let bV = fd
1061+ if ($isInstanceOf(bV, "Address"))
8411062 then {
842- let dX = dW
843- invoke(dX, "emit", [db], nil)
1063+ let ff = bV
1064+ invoke(ff, "emit", [ek], nil)
8441065 }
8451066 else unit
8461067 }
847- if ((dV == dV))
1068+ if ((fe == fe))
8481069 then {
849- let fF = if ((dc > 0))
850- then invoke(bo, "put", nil, [AttachedPayment(fD, dc)])
1070+ let gP = if ((el > 0))
1071+ then invoke(bv, "put", nil, [AttachedPayment(gN, el)])
8511072 else nil
852- if ((fF == fF))
1073+ if ((gP == gP))
8531074 then {
854- let fG = if ((dd > 0))
855- then invoke(bo, "put", nil, [AttachedPayment(fE, dd)])
1075+ let gQ = if ((em > 0))
1076+ then invoke(bv, "put", nil, [AttachedPayment(gO, em)])
8561077 else nil
857- if ((fG == fG))
1078+ if ((gQ == gQ))
8581079 then {
859- let fH = if (fC)
1080+ let gR = if (gM)
8601081 then {
861- let fI = invoke(bn, "stake", nil, [AttachedPayment(cg, db)])
862- if ((fI == fI))
1082+ let gS = invoke(bu, "stake", nil, [AttachedPayment(dp, ek)])
1083+ if ((gS == gS))
8631084 then nil
8641085 else throw("Strict value is not equal to itself.")
8651086 }
866- else [ScriptTransfer(dL.caller, db, cg)]
867- let fJ = dt(0, 0, 0)
868- if ((fJ == fJ))
1087+ else [ScriptTransfer(eV.caller, ek, dp)]
1088+ let gT = eC(0, 0, 0)
1089+ if ((gT == gT))
8691090 then {
870- let dk = fJ._2
871- let fK = fJ._1
872- let fL = dx(ds, dk)
873- if ((fL == fL))
874- then ((cx ++ fH) ++ fK)
1091+ let et = gT._2
1092+ let gU = gT._1
1093+ let gV = eH(eB, et)
1094+ if ((gV == gV))
1095+ then {
1096+ let gW = invoke(this, "rebalance", nil, nil)
1097+ if ((gW == gW))
1098+ then ((dG ++ gR) ++ gU)
1099+ else throw("Strict value is not equal to itself.")
1100+ }
8751101 else throw("Strict value is not equal to itself.")
8761102 }
8771103 else throw("Strict value is not equal to itself.")
8781104 }
8791105 else throw("Strict value is not equal to itself.")
8801106 }
8811107 else throw("Strict value is not equal to itself.")
8821108 }
8831109 else throw("Strict value is not equal to itself.")
8841110 }
8851111 else throw("Strict value is not equal to itself.")
8861112 }
8871113 else throw("Strict value is not equal to itself.")
8881114 }
8891115
8901116
8911117
892-@Callable(dL)
893-func putForFree (fM) = if ((0 > fM))
1118+@Callable(eV)
1119+func putForFree (gX) = if ((0 > gX))
8941120 then throw("Invalid value passed")
8951121 else {
896- let dR = dO(dL, fM, false)
897- let cx = dR._9
898- let dP = toBigInt(value(dL.payments[0]).amount)
899- let dQ = toBigInt(value(dL.payments[1]).amount)
900- let ds = dl(dP, dQ, toBigInt(0))
901- if ((ds == ds))
1122+ let fb = eY(eV, gX, false)
1123+ let dG = fb._9
1124+ let eZ = toBigInt(value(eV.payments[0]).amount)
1125+ let fa = toBigInt(value(eV.payments[1]).amount)
1126+ let eB = eu(eZ, fa, toBigInt(0))
1127+ if ((eB == eB))
9021128 then {
903- let fN = dt(0, 0, 0)
904- let fK = fN._1
905- let dk = fN._2
906- let fL = dx(ds, dk)
907- if ((fL == fL))
908- then (cx ++ fK)
1129+ let gY = eC(0, 0, 0)
1130+ let gU = gY._1
1131+ let et = gY._2
1132+ let gV = eH(eB, et)
1133+ if ((gV == gV))
1134+ then (dG ++ gU)
9091135 else throw("Strict value is not equal to itself.")
9101136 }
9111137 else throw("Strict value is not equal to itself.")
9121138 }
9131139
9141140
9151141
916-@Callable(dL)
917-func putOneTkn (fO,fP) = {
918- let fQ = {
919- let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
920- if ($isInstanceOf(aR, "Boolean"))
921- then aR
922- else throw(($getType(aR) + " couldn't be cast to Boolean"))
1142+@Callable(eV)
1143+func putOneTkn (gZ,ha) = {
1144+ let hb = {
1145+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1146+ if ($isInstanceOf(aY, "Boolean"))
1147+ then aY
1148+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
9231149 }
924- let fR = if (if (if (aT())
1150+ let hc = if (if (if (ba())
9251151 then true
926- else (bg == l))
1152+ else (bn == l))
9271153 then true
928- else (bg == n))
1154+ else (bn == n))
9291155 then true
930- else fQ
931- let eH = [if (if (!(fR))
1156+ else hb
1157+ let fP = [if (if (!(hc))
9321158 then true
933- else fc(dL))
1159+ else gk(eV))
9341160 then true
935- else aL("put operation is blocked by admin"), if ((size(dL.payments) == 1))
1161+ else aS("put operation is blocked by admin"), if ((size(eV.payments) == 1))
9361162 then true
937- else aL("exactly 1 payment are expected")]
938- if ((eH == eH))
1163+ else aS("exactly 1 payment are expected")]
1164+ if ((fP == fP))
9391165 then {
940- let fS = dL.payments[0]
941- let ec = fS.assetId
942- let eb = fS.amount
943- let ds = if ((ec == bi))
944- then dl(toBigInt(eb), toBigInt(0), toBigInt(0))
945- else if ((ec == bj))
946- then dl(toBigInt(0), toBigInt(eb), toBigInt(0))
947- else aL("payment asset is not supported")
948- if ((ds == ds))
1166+ let hd = eV.payments[0]
1167+ let fk = hd.assetId
1168+ let fj = hd.amount
1169+ let eB = if ((fk == bp))
1170+ then eu(toBigInt(fj), toBigInt(0), toBigInt(0))
1171+ else if ((fk == bq))
1172+ then eu(toBigInt(0), toBigInt(fj), toBigInt(0))
1173+ else aS("payment asset is not supported")
1174+ if ((eB == eB))
9491175 then {
950- let ab = dL.caller
951- let ac = dL.transactionId
952- let fT = ea(eb, ec, ab, ac)
953- if ((fT == fT))
1176+ let ab = eV.caller
1177+ let ac = eV.transactionId
1178+ let he = fi(fj, fk, ab, ac)
1179+ if ((he == he))
9541180 then {
955- let eg = fT._5
956- let fU = fT._4
957- let dZ = fT._3
958- let de = fT._2
959- let fV = fT._1
960- let fW = if (if ((fO > 0))
961- then (fO > fV)
1181+ let fo = he._5
1182+ let hf = he._4
1183+ let fh = he._3
1184+ let en = he._2
1185+ let hg = he._1
1186+ let hh = if (if ((gZ > 0))
1187+ then (gZ > hg)
9621188 else false)
963- then aL(makeString(["amount to receive is less than ", toString(fO)], ""))
964- else fV
965- let dU = dS(fW)
966- if ((dU == dU))
1189+ then aS(makeString(["amount to receive is less than ", toString(gZ)], ""))
1190+ else hg
1191+ let fd = fc(hh)
1192+ if ((fd == fd))
9671193 then {
968- let fH = if (fP)
1194+ let gR = if (ha)
9691195 then {
970- let fX = invoke(bn, "stake", nil, [AttachedPayment(bh, fW)])
971- if ((fX == fX))
1196+ let hi = invoke(bu, "stake", nil, [AttachedPayment(bo, hh)])
1197+ if ((hi == hi))
9721198 then nil
9731199 else throw("Strict value is not equal to itself.")
9741200 }
975- else [ScriptTransfer(dL.caller, fW, bh)]
976- let fY = if ((dZ > 0))
977- then [ScriptTransfer(aP, dZ, ec)]
1201+ else [ScriptTransfer(eV.caller, hh, bo)]
1202+ let hj = if ((fh > 0))
1203+ then [ScriptTransfer(aW, fh, fk)]
9781204 else nil
979- let fZ = if ((this == aP))
1205+ let hk = if ((this == aW))
9801206 then $Tuple2(0, 0)
981- else if (eg)
982- then $Tuple2(-(dZ), 0)
983- else $Tuple2(0, -(dZ))
984- let du = fZ._1
985- let dv = fZ._2
986- let ga = dt(du, dv, 0)
987- let fK = ga._1
988- let dk = ga._2
989- let dE = value(getString(aj))
990- let fL = dx(ds, dk)
991- if ((fL == fL))
992- then $Tuple2((((de ++ fH) ++ fY) ++ fK), fW)
993- else throw("Strict value is not equal to itself.")
994- }
995- else throw("Strict value is not equal to itself.")
996- }
997- else throw("Strict value is not equal to itself.")
998- }
999- else throw("Strict value is not equal to itself.")
1000- }
1001- else throw("Strict value is not equal to itself.")
1002- }
1003-
1004-
1005-
1006-@Callable(dL)
1007-func putOneTknREADONLY (ec,eb) = {
1008- let gb = ea(eb, aY(ec), unit, unit)
1009- let fV = gb._1
1010- let de = gb._2
1011- let dZ = gb._3
1012- let fU = gb._4
1013- let eg = gb._5
1014- $Tuple2(nil, $Tuple3(fV, dZ, fU))
1015- }
1016-
1017-
1018-
1019-@Callable(dL)
1020-func getOneTkn (gc,fO) = {
1021- let fQ = {
1022- let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1023- if ($isInstanceOf(aR, "Boolean"))
1024- then aR
1025- else throw(($getType(aR) + " couldn't be cast to Boolean"))
1026- }
1027- let gd = if (if (aT())
1028- then true
1029- else (bg == n))
1030- then true
1031- else fQ
1032- let eH = [if (if (!(gd))
1033- then true
1034- else fc(dL))
1035- then true
1036- else aL("get operation is blocked by admin"), if ((size(dL.payments) == 1))
1037- then true
1038- else aL("exactly 1 payment are expected")]
1039- if ((eH == eH))
1040- then {
1041- let eG = aY(gc)
1042- let fS = dL.payments[0]
1043- let ec = fS.assetId
1044- let eo = fS.amount
1045- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1046- if ((ds == ds))
1047- then {
1048- let ab = dL.caller
1049- let ac = dL.transactionId
1050- let ge = eF(eG, eo, ec, ab, ac)
1051- if ((ge == ge))
1052- then {
1053- let eI = ge._5
1054- let fU = ge._4
1055- let dZ = ge._3
1056- let de = ge._2
1057- let gf = ge._1
1058- let dT = if (if ((fO > 0))
1059- then (fO > gf)
1060- else false)
1061- then aL(makeString(["amount to receive is less than ", toString(fO)], ""))
1062- else gf
1063- let gg = invoke(aO, "burn", [eo], [AttachedPayment(ec, eo)])
1064- if ((gg == gg))
1065- then {
1066- let gh = [ScriptTransfer(ab, dT, eG)]
1067- let fY = if ((dZ > 0))
1068- then [ScriptTransfer(aP, dZ, eG)]
1069- else nil
1070- let gi = {
1071- let gj = if ((this == aP))
1072- then 0
1073- else dZ
1074- if (eI)
1075- then $Tuple2(-((dT + gj)), 0)
1076- else $Tuple2(0, -((dT + gj)))
1077- }
1078- let du = gi._1
1079- let dv = gi._2
1080- let gk = dt(du, dv, 0)
1081- let fK = gk._1
1082- let dk = gk._2
1083- let fL = dx(ds, dk)
1084- if ((fL == fL))
1085- then $Tuple2((((de ++ gh) ++ fY) ++ fK), dT)
1086- else throw("Strict value is not equal to itself.")
1087- }
1088- else throw("Strict value is not equal to itself.")
1089- }
1090- else throw("Strict value is not equal to itself.")
1091- }
1092- else throw("Strict value is not equal to itself.")
1093- }
1094- else throw("Strict value is not equal to itself.")
1095- }
1096-
1097-
1098-
1099-@Callable(dL)
1100-func getOneTknREADONLY (eG,eo) = {
1101- let gl = eF(aY(eG), eo, bh, unit, unit)
1102- let gf = gl._1
1103- let de = gl._2
1104- let dZ = gl._3
1105- let fU = gl._4
1106- let eI = gl._5
1107- $Tuple2(nil, $Tuple3(gf, dZ, fU))
1108- }
1109-
1110-
1111-
1112-@Callable(dL)
1113-func unstakeAndGetOneTkn (gm,gc,fO) = {
1114- let fQ = {
1115- let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1116- if ($isInstanceOf(aR, "Boolean"))
1117- then aR
1118- else throw(($getType(aR) + " couldn't be cast to Boolean"))
1119- }
1120- let gd = if (if (aT())
1121- then true
1122- else (bg == n))
1123- then true
1124- else fQ
1125- let eH = [if (if (!(gd))
1126- then true
1127- else fc(dL))
1128- then true
1129- else aL("get operation is blocked by admin"), if ((size(dL.payments) == 0))
1130- then true
1131- else aL("no payments are expected")]
1132- if ((eH == eH))
1133- then {
1134- let eG = aY(gc)
1135- let ab = dL.caller
1136- let ac = dL.transactionId
1137- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1138- if ((ds == ds))
1139- then {
1140- let gn = invoke(bn, "unstake", [toBase58String(bh), gm], nil)
1141- if ((gn == gn))
1142- then {
1143- let go = eF(eG, gm, bh, ab, ac)
1144- if ((go == go))
1145- then {
1146- let eI = go._5
1147- let fU = go._4
1148- let dZ = go._3
1149- let de = go._2
1150- let gf = go._1
1151- let dT = if (if ((fO > 0))
1152- then (fO > gf)
1153- else false)
1154- then aL(makeString(["amount to receive is less than ", toString(fO)], ""))
1155- else gf
1156- let gg = invoke(aO, "burn", [gm], [AttachedPayment(bh, gm)])
1157- if ((gg == gg))
1207+ else if (fo)
1208+ then $Tuple2(-(fh), 0)
1209+ else $Tuple2(0, -(fh))
1210+ let eD = hk._1
1211+ let eE = hk._2
1212+ let hl = eC(eD, eE, 0)
1213+ let gU = hl._1
1214+ let et = hl._2
1215+ let eO = value(getString(aj))
1216+ let gV = eH(eB, et)
1217+ if ((gV == gV))
11581218 then {
1159- let gh = [ScriptTransfer(dL.caller, dT, eG)]
1160- let fY = if ((dZ > 0))
1161- then [ScriptTransfer(aP, dZ, eG)]
1162- else nil
1163- let gp = {
1164- let gj = if ((this == aP))
1165- then 0
1166- else dZ
1167- if (eI)
1168- then $Tuple2(-((dT + gj)), 0)
1169- else $Tuple2(0, -((dT + gj)))
1170- }
1171- let du = gp._1
1172- let dv = gp._2
1173- let gq = dt(du, dv, 0)
1174- let fK = gq._1
1175- let dk = gq._2
1176- let fL = dx(ds, dk)
1177- if ((fL == fL))
1178- then $Tuple2((((de ++ gh) ++ fY) ++ fK), dT)
1219+ let gW = invoke(this, "rebalance", nil, nil)
1220+ if ((gW == gW))
1221+ then $Tuple2((((en ++ gR) ++ hj) ++ gU), hh)
11791222 else throw("Strict value is not equal to itself.")
11801223 }
11811224 else throw("Strict value is not equal to itself.")
11821225 }
11831226 else throw("Strict value is not equal to itself.")
11841227 }
11851228 else throw("Strict value is not equal to itself.")
11861229 }
11871230 else throw("Strict value is not equal to itself.")
11881231 }
11891232 else throw("Strict value is not equal to itself.")
11901233 }
11911234
11921235
11931236
1194-@Callable(dL)
1195-func get () = {
1196- let cP = dK(dL)
1197- let gr = cP._1
1198- let cw = cP._2
1199- let dN = cP._3
1200- let ce = cP._4
1201- let cx = cP._5
1202- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1203- if ((ds == ds))
1237+@Callable(eV)
1238+func putOneTknREADONLY (fk,fj) = {
1239+ let hm = fi(fj, bf(fk), unit, unit)
1240+ let hg = hm._1
1241+ let en = hm._2
1242+ let fh = hm._3
1243+ let hf = hm._4
1244+ let fo = hm._5
1245+ $Tuple2(nil, $Tuple3(hg, fh, hf))
1246+ }
1247+
1248+
1249+
1250+@Callable(eV)
1251+func getOneTkn (hn,gZ) = {
1252+ let hb = {
1253+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1254+ if ($isInstanceOf(aY, "Boolean"))
1255+ then aY
1256+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
1257+ }
1258+ let ho = if (if (ba())
1259+ then true
1260+ else (bn == n))
1261+ then true
1262+ else hb
1263+ let fP = [if (if (!(ho))
1264+ then true
1265+ else gk(eV))
1266+ then true
1267+ else aS("get operation is blocked by admin"), if ((size(eV.payments) == 1))
1268+ then true
1269+ else aS("exactly 1 payment are expected")]
1270+ if ((fP == fP))
12041271 then {
1205- let gs = invoke(aO, "burn", [dN], [AttachedPayment(ce, dN)])
1206- if ((gs == gs))
1272+ let fO = bf(hn)
1273+ let hd = eV.payments[0]
1274+ let fk = hd.assetId
1275+ let fw = hd.amount
1276+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1277+ if ((eB == eB))
12071278 then {
1208- let gt = dt(-(gr), -(cw), 0)
1209- let fK = gt._1
1210- let dk = gt._2
1211- let fL = dx(ds, dk)
1212- if ((fL == fL))
1213- then (cx ++ fK)
1279+ let ab = eV.caller
1280+ let ac = eV.transactionId
1281+ let hp = fN(fO, fw, fk, ab, ac)
1282+ if ((hp == hp))
1283+ then {
1284+ let fQ = hp._5
1285+ let hf = hp._4
1286+ let fh = hp._3
1287+ let en = hp._2
1288+ let hq = hp._1
1289+ let bY = if (if ((gZ > 0))
1290+ then (gZ > hq)
1291+ else false)
1292+ then aS(makeString(["amount to receive is less than ", toString(gZ)], ""))
1293+ else hq
1294+ let hr = invoke(aV, "burn", [fw], [AttachedPayment(fk, fw)])
1295+ if ((hr == hr))
1296+ then {
1297+ let gF = cJ(hn, (bY + max([0, fh])))
1298+ let hs = [ScriptTransfer(ab, bY, fO)]
1299+ let hj = if ((fh > 0))
1300+ then [ScriptTransfer(aW, fh, fO)]
1301+ else nil
1302+ let ht = {
1303+ let hu = if ((this == aW))
1304+ then 0
1305+ else fh
1306+ if (fQ)
1307+ then $Tuple2(-((bY + hu)), 0)
1308+ else $Tuple2(0, -((bY + hu)))
1309+ }
1310+ let eD = ht._1
1311+ let eE = ht._2
1312+ let hv = eC(eD, eE, 0)
1313+ let gU = hv._1
1314+ let et = hv._2
1315+ let gV = eH(eB, et)
1316+ if ((gV == gV))
1317+ then $Tuple2(((((en ++ gF) ++ hs) ++ hj) ++ gU), bY)
1318+ else throw("Strict value is not equal to itself.")
1319+ }
1320+ else throw("Strict value is not equal to itself.")
1321+ }
12141322 else throw("Strict value is not equal to itself.")
12151323 }
12161324 else throw("Strict value is not equal to itself.")
12171325 }
12181326 else throw("Strict value is not equal to itself.")
12191327 }
12201328
12211329
12221330
1223-@Callable(dL)
1224-func getNoLess (gu,gv) = {
1225- let cP = dK(dL)
1226- let cv = cP._1
1227- let cw = cP._2
1228- let dN = cP._3
1229- let ce = cP._4
1230- let cx = cP._5
1231- if ((gu > cv))
1232- then throw(((("noLessThenAmtAsset failed: " + toString(cv)) + " < ") + toString(gu)))
1233- else if ((gv > cw))
1234- then throw(((("noLessThenPriceAsset failed: " + toString(cw)) + " < ") + toString(gv)))
1235- else {
1236- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1237- if ((ds == ds))
1238- then {
1239- let gs = invoke(aO, "burn", [dN], [AttachedPayment(ce, dN)])
1240- if ((gs == gs))
1241- then {
1242- let gw = dt(-(cv), -(cw), 0)
1243- let fK = gw._1
1244- let dk = gw._2
1245- let fL = dx(ds, dk)
1246- if ((fL == fL))
1247- then (cx ++ fK)
1248- else throw("Strict value is not equal to itself.")
1249- }
1250- else throw("Strict value is not equal to itself.")
1251- }
1252- else throw("Strict value is not equal to itself.")
1253- }
1331+@Callable(eV)
1332+func getOneTknREADONLY (fO,fw) = {
1333+ let hw = fN(bf(fO), fw, bo, unit, unit)
1334+ let hq = hw._1
1335+ let en = hw._2
1336+ let fh = hw._3
1337+ let hf = hw._4
1338+ let fQ = hw._5
1339+ $Tuple2(nil, $Tuple3(hq, fh, hf))
12541340 }
12551341
12561342
12571343
1258-@Callable(dL)
1259-func unstakeAndGet (dT) = {
1260- let gx = if ((size(dL.payments) != 0))
1261- then throw("No payments are expected")
1262- else true
1263- if ((gx == gx))
1344+@Callable(eV)
1345+func unstakeAndGetOneTkn (hx,hn,gZ) = {
1346+ let hb = {
1347+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1348+ if ($isInstanceOf(aY, "Boolean"))
1349+ then aY
1350+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
1351+ }
1352+ let ho = if (if (ba())
1353+ then true
1354+ else (bn == n))
1355+ then true
1356+ else hb
1357+ let fP = [if (if (!(ho))
1358+ then true
1359+ else gk(eV))
1360+ then true
1361+ else aS("get operation is blocked by admin"), if ((size(eV.payments) == 0))
1362+ then true
1363+ else aS("no payments are expected")]
1364+ if ((fP == fP))
12641365 then {
1265- let bT = aV()
1266- let cg = fromBase58String(bT[q])
1267- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1268- if ((ds == ds))
1366+ let fO = bf(hn)
1367+ let ab = eV.caller
1368+ let ac = eV.transactionId
1369+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1370+ if ((eB == eB))
12691371 then {
1270- let gn = invoke(bn, "unstake", [toBase58String(cg), dT], nil)
1271- if ((gn == gn))
1372+ let hy = invoke(bu, "unstake", [toBase58String(bo), hx], nil)
1373+ if ((hy == hy))
12721374 then {
1273- let cP = cc(toBase58String(dL.transactionId), toBase58String(cg), dT, dL.caller)
1274- let cv = cP._1
1275- let cw = cP._2
1276- let cj = parseIntValue(cP._9)
1277- let cx = cP._10
1278- let gy = if (if (aT())
1279- then true
1280- else (cj == n))
1281- then throw(("Get operation is blocked by admin. Status = " + toString(cj)))
1282- else true
1283- if ((gy == gy))
1375+ let hz = fN(fO, hx, bo, ab, ac)
1376+ if ((hz == hz))
12841377 then {
1285- let gs = invoke(aO, "burn", [dT], [AttachedPayment(cg, dT)])
1286- if ((gs == gs))
1378+ let fQ = hz._5
1379+ let hf = hz._4
1380+ let fh = hz._3
1381+ let en = hz._2
1382+ let hq = hz._1
1383+ let bY = if (if ((gZ > 0))
1384+ then (gZ > hq)
1385+ else false)
1386+ then aS(makeString(["amount to receive is less than ", toString(gZ)], ""))
1387+ else hq
1388+ let hr = invoke(aV, "burn", [hx], [AttachedPayment(bo, hx)])
1389+ if ((hr == hr))
12871390 then {
1288- let gz = dt(-(cv), -(cw), 0)
1289- let fK = gz._1
1290- let dk = gz._2
1291- let fL = dx(ds, dk)
1292- if ((fL == fL))
1293- then (cx ++ fK)
1391+ let gF = cJ(hn, (bY + max([0, fh])))
1392+ let hs = [ScriptTransfer(eV.caller, bY, fO)]
1393+ let hj = if ((fh > 0))
1394+ then [ScriptTransfer(aW, fh, fO)]
1395+ else nil
1396+ let hA = {
1397+ let hu = if ((this == aW))
1398+ then 0
1399+ else fh
1400+ if (fQ)
1401+ then $Tuple2(-((bY + hu)), 0)
1402+ else $Tuple2(0, -((bY + hu)))
1403+ }
1404+ let eD = hA._1
1405+ let eE = hA._2
1406+ let hB = eC(eD, eE, 0)
1407+ let gU = hB._1
1408+ let et = hB._2
1409+ let gV = eH(eB, et)
1410+ if ((gV == gV))
1411+ then $Tuple2(((((en ++ gF) ++ hs) ++ hj) ++ gU), bY)
12941412 else throw("Strict value is not equal to itself.")
12951413 }
12961414 else throw("Strict value is not equal to itself.")
12971415 }
12981416 else throw("Strict value is not equal to itself.")
12991417 }
13001418 else throw("Strict value is not equal to itself.")
13011419 }
13021420 else throw("Strict value is not equal to itself.")
13031421 }
13041422 else throw("Strict value is not equal to itself.")
13051423 }
13061424
13071425
13081426
1309-@Callable(dL)
1310-func unstakeAndGetNoLess (gm,gA,gv) = {
1311- let gd = if (aT())
1312- then true
1313- else (bg == n)
1314- let eH = [if (!(gd))
1315- then true
1316- else throw("get operation is blocked by admin"), if ((size(dL.payments) == 0))
1317- then true
1318- else throw("no payments are expected")]
1319- if ((eH == eH))
1427+@Callable(eV)
1428+func get () = {
1429+ let dY = eU(eV)
1430+ let dE = dY._1
1431+ let dF = dY._2
1432+ let eX = dY._3
1433+ let dn = dY._4
1434+ let dG = dY._5
1435+ let gF = cO(dE, dF)
1436+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1437+ if ((eB == eB))
13201438 then {
1321- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1322- if ((ds == ds))
1439+ let hC = invoke(aV, "burn", [eX], [AttachedPayment(dn, eX)])
1440+ if ((hC == hC))
13231441 then {
1324- let gn = invoke(bn, "unstake", [toBase58String(bh), gm], nil)
1325- if ((gn == gn))
1442+ let hD = eC(-(dE), -(dF), 0)
1443+ let gU = hD._1
1444+ let et = hD._2
1445+ let gV = eH(eB, et)
1446+ if ((gV == gV))
1447+ then ((gF ++ dG) ++ gU)
1448+ else throw("Strict value is not equal to itself.")
1449+ }
1450+ else throw("Strict value is not equal to itself.")
1451+ }
1452+ else throw("Strict value is not equal to itself.")
1453+ }
1454+
1455+
1456+
1457+@Callable(eV)
1458+func getNoLess (hE,hF) = {
1459+ let dY = eU(eV)
1460+ let dE = dY._1
1461+ let dF = dY._2
1462+ let eX = dY._3
1463+ let dn = dY._4
1464+ let dG = dY._5
1465+ if ((hE > dE))
1466+ then throw(((("noLessThenAmtAsset failed: " + toString(dE)) + " < ") + toString(hE)))
1467+ else if ((hF > dF))
1468+ then throw(((("noLessThenPriceAsset failed: " + toString(dF)) + " < ") + toString(hF)))
1469+ else {
1470+ let gF = cO(dE, dF)
1471+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1472+ if ((eB == eB))
1473+ then {
1474+ let hC = invoke(aV, "burn", [eX], [AttachedPayment(dn, eX)])
1475+ if ((hC == hC))
1476+ then {
1477+ let hG = eC(-(dE), -(dF), 0)
1478+ let gU = hG._1
1479+ let et = hG._2
1480+ let gV = eH(eB, et)
1481+ if ((gV == gV))
1482+ then ((gF ++ dG) ++ gU)
1483+ else throw("Strict value is not equal to itself.")
1484+ }
1485+ else throw("Strict value is not equal to itself.")
1486+ }
1487+ else throw("Strict value is not equal to itself.")
1488+ }
1489+ }
1490+
1491+
1492+
1493+@Callable(eV)
1494+func unstakeAndGet (bY) = {
1495+ let hH = if ((size(eV.payments) != 0))
1496+ then throw("No payments are expected")
1497+ else true
1498+ if ((hH == hH))
1499+ then {
1500+ let dc = bc()
1501+ let dp = fromBase58String(dc[q])
1502+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1503+ if ((eB == eB))
1504+ then {
1505+ let hy = invoke(bu, "unstake", [toBase58String(dp), bY], nil)
1506+ if ((hy == hy))
13261507 then {
1327- let cP = cc(toBase58String(dL.transactionId), toBase58String(bh), gm, dL.caller)
1328- let cv = cP._1
1329- let cw = cP._2
1330- let cx = cP._10
1331- let gB = [if ((cv >= gA))
1508+ let dY = dl(toBase58String(eV.transactionId), toBase58String(dp), bY, eV.caller)
1509+ let dE = dY._1
1510+ let dF = dY._2
1511+ let ds = parseIntValue(dY._9)
1512+ let dG = dY._10
1513+ let gF = cO(dE, dF)
1514+ let hI = if (if (ba())
13321515 then true
1333- else throw(makeString(["amount asset amount to receive is less than ", toString(gA)], "")), if ((cw >= gv))
1334- then true
1335- else throw(makeString(["price asset amount to receive is less than ", toString(gv)], ""))]
1336- if ((gB == gB))
1516+ else (ds == n))
1517+ then throw(("Get operation is blocked by admin. Status = " + toString(ds)))
1518+ else true
1519+ if ((hI == hI))
13371520 then {
1338- let gs = invoke(aO, "burn", [gm], [AttachedPayment(bh, gm)])
1339- if ((gs == gs))
1521+ let hC = invoke(aV, "burn", [bY], [AttachedPayment(dp, bY)])
1522+ if ((hC == hC))
13401523 then {
1341- let gC = dt(-(cv), -(cw), 0)
1342- let fK = gC._1
1343- let dk = gC._2
1344- let fL = dx(ds, dk)
1345- if ((fL == fL))
1346- then (cx ++ fK)
1524+ let hJ = eC(-(dE), -(dF), 0)
1525+ let gU = hJ._1
1526+ let et = hJ._2
1527+ let gV = eH(eB, et)
1528+ if ((gV == gV))
1529+ then ((gF ++ dG) ++ gU)
13471530 else throw("Strict value is not equal to itself.")
13481531 }
13491532 else throw("Strict value is not equal to itself.")
13501533 }
13511534 else throw("Strict value is not equal to itself.")
13521535 }
13531536 else throw("Strict value is not equal to itself.")
13541537 }
13551538 else throw("Strict value is not equal to itself.")
13561539 }
13571540 else throw("Strict value is not equal to itself.")
13581541 }
13591542
13601543
13611544
1362-@Callable(dL)
1363-func activate (gD,gE) = if ((toString(dL.caller) != toString(aO)))
1364- then throw("permissions denied")
1365- else $Tuple2([StringEntry(ae(), gD), StringEntry(af(), gE)], "success")
1366-
1367-
1368-
1369-@Callable(dL)
1370-func refreshKLp () = {
1371- let gF = valueOrElse(getInteger(ak), 0)
1372- let gG = if (((height - gF) >= an))
1373- then unit
1374- else aL(makeString([toString(an), " blocks have not passed since the previous call"], ""))
1375- if ((gG == gG))
1545+@Callable(eV)
1546+func unstakeAndGetNoLess (hx,hK,hF) = {
1547+ let ho = if (ba())
1548+ then true
1549+ else (bn == n)
1550+ let fP = [if (!(ho))
1551+ then true
1552+ else throw("get operation is blocked by admin"), if ((size(eV.payments) == 0))
1553+ then true
1554+ else throw("no payments are expected")]
1555+ if ((fP == fP))
13761556 then {
1377- let dE = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aN("invalid kLp"))
1378- let gH = dt(0, 0, 0)
1379- let gI = gH._1
1380- let dk = gH._2
1381- let dw = if ((dE != dk))
1382- then gI
1383- else aL("nothing to refresh")
1384- $Tuple2(dw, toString(dk))
1557+ let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0))
1558+ if ((eB == eB))
1559+ then {
1560+ let hy = invoke(bu, "unstake", [toBase58String(bo), hx], nil)
1561+ if ((hy == hy))
1562+ then {
1563+ let dY = dl(toBase58String(eV.transactionId), toBase58String(bo), hx, eV.caller)
1564+ let dE = dY._1
1565+ let dF = dY._2
1566+ let dG = dY._10
1567+ let gF = cO(dE, dF)
1568+ let hL = [if ((dE >= hK))
1569+ then true
1570+ else throw(makeString(["amount asset amount to receive is less than ", toString(hK)], "")), if ((dF >= hF))
1571+ then true
1572+ else throw(makeString(["price asset amount to receive is less than ", toString(hF)], ""))]
1573+ if ((hL == hL))
1574+ then {
1575+ let hC = invoke(aV, "burn", [hx], [AttachedPayment(bo, hx)])
1576+ if ((hC == hC))
1577+ then {
1578+ let hM = eC(-(dE), -(dF), 0)
1579+ let gU = hM._1
1580+ let et = hM._2
1581+ let gV = eH(eB, et)
1582+ if ((gV == gV))
1583+ then ((gF ++ dG) ++ gU)
1584+ else throw("Strict value is not equal to itself.")
1585+ }
1586+ else throw("Strict value is not equal to itself.")
1587+ }
1588+ else throw("Strict value is not equal to itself.")
1589+ }
1590+ else throw("Strict value is not equal to itself.")
1591+ }
1592+ else throw("Strict value is not equal to itself.")
13851593 }
13861594 else throw("Strict value is not equal to itself.")
13871595 }
13881596
13891597
13901598
1391-@Callable(dL)
1392-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aV())
1599+@Callable(eV)
1600+func activate (hN,hO) = if ((toString(eV.caller) != toString(aV)))
1601+ then throw("permissions denied")
1602+ else $Tuple2([StringEntry(ae(), hN), StringEntry(af(), hO)], "success")
13931603
13941604
13951605
1396-@Callable(dL)
1397-func getAccBalanceWrapperREADONLY (bF) = $Tuple2(nil, bE(bF))
1398-
1399-
1400-
1401-@Callable(dL)
1402-func calcPricesWrapperREADONLY (bN,bO,bS) = {
1403- let cb = bR(bN, bO, bS)
1404- $Tuple2(nil, [toString(cb[0]), toString(cb[1]), toString(cb[2])])
1606+@Callable(eV)
1607+func refreshKLp () = {
1608+ let hP = valueOrElse(getInteger(ak), 0)
1609+ let hQ = if (((height - hP) >= an))
1610+ then unit
1611+ else aS(makeString([toString(an), " blocks have not passed since the previous call"], ""))
1612+ if ((hQ == hQ))
1613+ then {
1614+ let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp"))
1615+ let hR = eC(0, 0, 0)
1616+ let hS = hR._1
1617+ let et = hR._2
1618+ let eF = if ((eO != et))
1619+ then hS
1620+ else aS("nothing to refresh")
1621+ $Tuple2(eF, toString(et))
1622+ }
1623+ else throw("Strict value is not equal to itself.")
14051624 }
14061625
14071626
14081627
1409-@Callable(dL)
1628+@Callable(eV)
1629+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bc())
1630+
1631+
1632+
1633+@Callable(eV)
1634+func getAccBalanceWrapperREADONLY (ap) = $Tuple2(nil, bL(ap))
1635+
1636+
1637+
1638+@Callable(eV)
1639+func calcPricesWrapperREADONLY (cW,cX,db) = {
1640+ let dk = da(cW, cX, db)
1641+ $Tuple2(nil, [toString(dk[0]), toString(dk[1]), toString(dk[2])])
1642+ }
1643+
1644+
1645+
1646+@Callable(eV)
14101647 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
14111648
14121649
14131650
1414-@Callable(dL)
1651+@Callable(eV)
14151652 func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J))
14161653
14171654
14181655
1419-@Callable(dL)
1420-func calcPriceBigIntWrapperREADONLY (bH,bI) = $Tuple2(nil, toString(bG(parseBigIntValue(bH), parseBigIntValue(bI))))
1656+@Callable(eV)
1657+func calcPriceBigIntWrapperREADONLY (bP,bQ) = $Tuple2(nil, toString(bO(parseBigIntValue(bP), parseBigIntValue(bQ))))
14211658
14221659
14231660
1424-@Callable(dL)
1425-func estimatePutOperationWrapperREADONLY (cd,cz,cA,cB,cC,cD,ab,cE,cF) = $Tuple2(nil, cy(cd, cz, cA, cB, cC, cD, ab, cE, cF))
1661+@Callable(eV)
1662+func estimatePutOperationWrapperREADONLY (dm,dI,dJ,dK,dL,dM,ab,dN,dO) = $Tuple2(nil, dH(dm, dI, dJ, dK, dL, dM, ab, dN, dO))
14261663
14271664
14281665
1429-@Callable(dL)
1430-func estimateGetOperationWrapperREADONLY (cd,ce,cf,ab) = {
1431- let cP = cc(cd, ce, cf, addressFromStringValue(ab))
1432- $Tuple2(nil, $Tuple10(cP._1, cP._2, cP._3, cP._4, cP._5, cP._6, cP._7, toString(cP._8), cP._9, cP._10))
1666+@Callable(eV)
1667+func estimateGetOperationWrapperREADONLY (dm,dn,do,ab) = {
1668+ let dY = dl(dm, dn, do, addressFromStringValue(ab))
1669+ $Tuple2(nil, $Tuple10(dY._1, dY._2, dY._3, dY._4, dY._5, dY._6, dY._7, toString(dY._8), dY._9, dY._10))
14331670 }
14341671
14351672
14361673
1437-@Callable(dL)
1674+@Callable(eV)
14381675 func statsREADONLY () = {
1439- let bT = aV()
1440- let cg = fromBase58String(bT[q])
1441- let gJ = bT[r]
1442- let gK = bT[s]
1443- let cI = bT[v]
1444- let cJ = bT[w]
1445- let bU = parseIntValue(bT[t])
1446- let bV = parseIntValue(bT[u])
1447- let gL = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1448- let gM = bE(gJ)
1449- let gN = bE(gK)
1450- let gO = if ((gL == 0))
1676+ let dc = bc()
1677+ let dp = fromBase58String(dc[q])
1678+ let hT = dc[r]
1679+ let hU = dc[s]
1680+ let dR = dc[v]
1681+ let dS = dc[w]
1682+ let dd = parseIntValue(dc[t])
1683+ let de = parseIntValue(dc[u])
1684+ let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity
1685+ let hW = bL(hT)
1686+ let hX = bL(hU)
1687+ let hY = if ((hV == 0))
14511688 then [e, e, e]
1452- else bR(gM, gN, gL)
1453- let cq = 0
1454- let gP = H(gO[1], b)
1455- let gQ = H(gO[2], b)
1456- let gR = value(getInteger(aO, ay(toString(this))))
1457- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gM), toString(gN), toString(gL), toString(cq), toString(gP), toString(gQ), toString(gR)], j))
1689+ else da(hW, hX, hV)
1690+ let dz = 0
1691+ let hZ = H(hY[1], b)
1692+ let ia = H(hY[2], b)
1693+ let ib = value(getInteger(aV, aD(toString(this))))
1694+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hW), toString(hX), toString(hV), toString(dz), toString(hZ), toString(ia), toString(ib)], j))
14581695 }
14591696
14601697
14611698
1462-@Callable(dL)
1463-func evaluatePutByAmountAssetREADONLY (cA) = {
1464- let bT = aV()
1465- let cg = fromBase58String(bT[q])
1466- let cG = bT[r]
1467- let ch = fromBase58String(cG)
1468- let cH = bT[s]
1469- let ci = fromBase58String(cH)
1470- let bU = parseIntValue(bT[t])
1471- let bV = parseIntValue(bT[u])
1472- let cj = bT[p]
1473- let gL = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1474- let gM = bE(cG)
1475- let gN = bE(cH)
1476- let bP = D(gM, bU)
1477- let bQ = D(gN, bV)
1478- let cp = if ((gL == 0))
1699+@Callable(eV)
1700+func evaluatePutByAmountAssetREADONLY (dJ) = {
1701+ let dc = bc()
1702+ let dp = fromBase58String(dc[q])
1703+ let dP = dc[r]
1704+ let dq = fromBase58String(dP)
1705+ let dQ = dc[s]
1706+ let dr = fromBase58String(dQ)
1707+ let dd = parseIntValue(dc[t])
1708+ let de = parseIntValue(dc[u])
1709+ let ds = dc[p]
1710+ let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity
1711+ let hW = bL(dP)
1712+ let hX = bL(dQ)
1713+ let cY = D(hW, dd)
1714+ let cZ = D(hX, de)
1715+ let dy = if ((hV == 0))
14791716 then e
1480- else bG(bQ, bP)
1481- let cM = D(cA, bU)
1482- let cN = fraction(cM, cp, d)
1483- let cC = H(cN, bV)
1484- let dR = cy("", 500000, cA, ch, cC, ci, "", true, false)
1485- let cX = dR._1
1486- let gS = dR._3
1487- let cl = dR._4
1488- let cn = dR._5
1489- let ck = dR._6
1490- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cX), toString(H(cp, b)), toString(cl), toString(cn), toString(ck), cj, toString(cA), toString(cC)], j))
1717+ else bO(cZ, cY)
1718+ let dV = D(dJ, dd)
1719+ let dW = fraction(dV, dy, d)
1720+ let dL = H(dW, de)
1721+ let fb = dH("", 500000, dJ, dq, dL, dr, "", true, false)
1722+ let eg = fb._1
1723+ let ic = fb._3
1724+ let du = fb._4
1725+ let dw = fb._5
1726+ let dt = fb._6
1727+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eg), toString(H(dy, b)), toString(du), toString(dw), toString(dt), ds, toString(dJ), toString(dL)], j))
14911728 }
14921729
14931730
14941731
1495-@Callable(dL)
1496-func evaluatePutByPriceAssetREADONLY (cC) = {
1497- let bT = aV()
1498- let cg = fromBase58String(bT[q])
1499- let cG = bT[r]
1500- let ch = fromBase58String(cG)
1501- let cH = bT[s]
1502- let ci = fromBase58String(cH)
1503- let bU = parseIntValue(bT[t])
1504- let bV = parseIntValue(bT[u])
1505- let cj = bT[p]
1506- let gL = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1507- let gT = bE(cG)
1508- let gU = bE(cH)
1509- let gV = D(gT, bU)
1510- let gW = D(gU, bV)
1511- let cp = if ((gL == 0))
1732+@Callable(eV)
1733+func evaluatePutByPriceAssetREADONLY (dL) = {
1734+ let dc = bc()
1735+ let dp = fromBase58String(dc[q])
1736+ let dP = dc[r]
1737+ let dq = fromBase58String(dP)
1738+ let dQ = dc[s]
1739+ let dr = fromBase58String(dQ)
1740+ let dd = parseIntValue(dc[t])
1741+ let de = parseIntValue(dc[u])
1742+ let ds = dc[p]
1743+ let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity
1744+ let id = bL(dP)
1745+ let ie = bL(dQ)
1746+ let if = D(id, dd)
1747+ let ig = D(ie, de)
1748+ let dy = if ((hV == 0))
15121749 then e
1513- else bG(gW, gV)
1514- let cN = D(cC, bV)
1515- let cM = fraction(cN, d, cp)
1516- let cA = H(cM, bU)
1517- let dR = cy("", 500000, cA, ch, cC, ci, "", true, false)
1518- let cX = dR._1
1519- let gS = dR._3
1520- let cl = dR._4
1521- let cn = dR._5
1522- let ck = dR._6
1523- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cX), toString(H(cp, b)), toString(cl), toString(cn), toString(ck), cj, toString(cA), toString(cC)], j))
1750+ else bO(ig, if)
1751+ let dW = D(dL, de)
1752+ let dV = fraction(dW, d, dy)
1753+ let dJ = H(dV, dd)
1754+ let fb = dH("", 500000, dJ, dq, dL, dr, "", true, false)
1755+ let eg = fb._1
1756+ let ic = fb._3
1757+ let du = fb._4
1758+ let dw = fb._5
1759+ let dt = fb._6
1760+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eg), toString(H(dy, b)), toString(du), toString(dw), toString(dt), ds, toString(dJ), toString(dL)], j))
15241761 }
15251762
15261763
15271764
1528-@Callable(dL)
1529-func evaluateGetREADONLY (gX,gY) = {
1530- let cP = cc("", gX, gY, this)
1531- let cv = cP._1
1532- let cw = cP._2
1533- let cl = cP._5
1534- let cn = cP._6
1535- let ck = cP._7
1536- let cq = cP._8
1537- let cj = parseIntValue(cP._9)
1538- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cv), toString(cw), toString(cl), toString(cn), toString(ck), toString(cq), toString(cj)], j))
1765+@Callable(eV)
1766+func evaluateGetREADONLY (ih,ii) = {
1767+ let dY = dl("", ih, ii, this)
1768+ let dE = dY._1
1769+ let dF = dY._2
1770+ let du = dY._5
1771+ let dw = dY._6
1772+ let dt = dY._7
1773+ let dz = dY._8
1774+ let ds = parseIntValue(dY._9)
1775+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dE), toString(dF), toString(du), toString(dw), toString(dt), toString(dz), toString(ds)], j))
15391776 }
15401777
15411778
1542-@Verifier(gZ)
1543-func ha () = {
1544- let hb = {
1545- let dW = eZ()
1546- if ($isInstanceOf(dW, "ByteVector"))
1779+@Verifier(ij)
1780+func ik () = {
1781+ let il = {
1782+ let bV = gh()
1783+ if ($isInstanceOf(bV, "ByteVector"))
15471784 then {
1548- let fd = dW
1549- fd
1785+ let gl = bV
1786+ gl
15501787 }
1551- else if ($isInstanceOf(dW, "Unit"))
1552- then gZ.senderPublicKey
1788+ else if ($isInstanceOf(bV, "Unit"))
1789+ then ij.senderPublicKey
15531790 else throw("Match error")
15541791 }
1555- let dW = gZ
1556- if ($isInstanceOf(dW, "Order"))
1792+ let bV = ij
1793+ if ($isInstanceOf(bV, "Order"))
15571794 then {
1558- let dA = dW
1559- let hc = aU()
1560- let hd = dz(dA)
1561- let aD = hd._1
1562- let aE = hd._2
1563- let aF = sigVerify(dA.bodyBytes, dA.proofs[0], dA.senderPublicKey)
1564- let aG = sigVerify(dA.bodyBytes, dA.proofs[1], hc)
1565- if (if (if (aD)
1566- then aF
1795+ let eK = bV
1796+ let im = bb()
1797+ let in = if (eG())
1798+ then $Tuple2(true, "")
1799+ else eJ(eK)
1800+ let aK = in._1
1801+ let aL = in._2
1802+ let aM = sigVerify(eK.bodyBytes, eK.proofs[0], eK.senderPublicKey)
1803+ let aN = sigVerify(eK.bodyBytes, eK.proofs[1], im)
1804+ if (if (if (aK)
1805+ then aM
15671806 else false)
1568- then aG
1807+ then aN
15691808 else false)
15701809 then true
1571- else aC(aD, aE, aF, aG)
1810+ else aJ(aK, aL, aM, aN)
15721811 }
1573- else if ($isInstanceOf(dW, "SetScriptTransaction"))
1812+ else if ($isInstanceOf(bV, "SetScriptTransaction"))
15741813 then {
1575- let fa = dW
1576- if (sigVerify(gZ.bodyBytes, gZ.proofs[0], hb))
1814+ let gi = bV
1815+ if (sigVerify(ij.bodyBytes, ij.proofs[0], il))
15771816 then true
15781817 else {
1579- let he = blake2b256(value(fa.script))
1580- let hf = fromBase64String(value(getString(aO, aA())))
1581- let hg = scriptHash(this)
1582- if ((hf == he))
1583- then (hg != he)
1818+ let io = blake2b256(value(gi.script))
1819+ let ip = fromBase64String(value(getString(aV, aF())))
1820+ let iq = scriptHash(this)
1821+ if ((ip == io))
1822+ then (iq != io)
15841823 else false
15851824 }
15861825 }
1587- else sigVerify(gZ.bodyBytes, gZ.proofs[0], hb)
1826+ else sigVerify(ij.bodyBytes, ij.proofs[0], il)
15881827 }
15891828

github/deemru/w8io/fabc49c 
334.36 ms