tx · HSfdGnuCToxuFZSFt8BWwPYjGpb5y5kG6uy4KZt4UeFZ

3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh:  -0.04300000 Waves

2023.04.03 15:46 [2518409] smart account 3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh > SELF 0.00000000 Waves

{ "type": 13, "id": "HSfdGnuCToxuFZSFt8BWwPYjGpb5y5kG6uy4KZt4UeFZ", "fee": 4300000, "feeAssetId": null, "timestamp": 1680525988395, "version": 2, "chainId": 84, "sender": "3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh", "senderPublicKey": "Cr8D7eozSzJh7XHsYTjBinPpo3SS83BrCGiBAJsjGxBo", "proofs": [ "4x9yxWpo2ST9aS1etnVqSAJsNwdbRZVkCmzHbRv4rTLjXbxGiDECBdBwZmW2JtwQansu9EJ5ftBRhdoYYkgL3wdd" ], "script": "base64:BgLsNggCEgASBQoDAQQBEgcKBQEEAQgBEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUF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aWkBAmlqAAQCaWsEAmJWCQECZlYAAwkAAQIFAmJWAgpCeXRlVmVjdG9yBAJmWgUCYlYFAmZaAwkAAQIFAmJWAgRVbml0CAUCaWkPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmJWBQJpaQMJAAECBQJiVgIFT3JkZXIEAmV5BQJiVgQCaWwJAQJiZAAEAmltCQECZXgBBQJleQQCYUsIBQJpbQJfMQQCYUwIBQJpbQJfMgQCYU0JAPQDAwgFAmV5CWJvZHlCeXRlcwkAkQMCCAUCZXkGcHJvb2ZzAAAIBQJleQ9zZW5kZXJQdWJsaWNLZXkEAmFOCQD0AwMIBQJleQlib2R5Qnl0ZXMJAJEDAggFAmV5BnByb29mcwABBQJpbAMDAwUCYUsFAmFNBwUCYU4HBgkBAmFKBAUCYUsFAmFMBQJhTQUCYU4DCQABAgUCYlYCFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJmVwUCYlYDCQD0AwMIBQJpaQlib2R5Qnl0ZXMJAJEDAggFAmlpBnByb29mcwAABQJpawYEAmluCQD2AwEJAQV2YWx1ZQEIBQJmVwZzY3JpcHQEAmlvCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVYJAQJhSAAEAmlwCQDxBwEFBHRoaXMDCQAAAgUCaW8FAmluCQECIT0CBQJpcAUCaW4HCQD0AwMIBQJpaQlib2R5Qnl0ZXMJAJEDAggFAmlpBnByb29mcwAABQJpa8WmiLQ=", "height": 2518409, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9kcVgc9W2TN2smasocKHfHKdzLeCfb69WFd3XB4NyvVV Next: AW4YZ4n3KvY1AESN4Bn2s1bqSuz6BoA7oyMXT9XohiUK Diff:
OldNewDifferences
130130
131131 let an = valueOrElse(getInteger(this, al), am)
132132
133-func ao () = "%s__factoryConfig"
133+func ao () = "%s__sWavesAssetId"
134134
135135
136-func ap () = "%s%s__matcher__publicKey"
136+func ap () = "%s__sWavesProxyAddress"
137137
138138
139-func aq (ar) = (("%s%s%s__" + ar) + "__mappings__poolContract2LpAsset")
139+func aq (ar) = makeString(["%s%s", "additionalBalance", ar], j)
140140
141141
142-func as (at,au) = (((("%d%d%s__" + at) + "__") + au) + "__config")
142+func as (ar) = makeString(["%s%s", "stakingAssetBalance", ar], j)
143143
144144
145-func av (aw) = ("%s%s%s__mappings__baseAsset2internalId__" + aw)
145+func at (ar) = valueOrElse(getInteger(this, aq(ar)), 0)
146146
147147
148-func ax () = "%s__shutdown"
148+func au (ar) = valueOrElse(getInteger(this, as(ar)), 0)
149149
150150
151-func ay (az) = ("%s%s__poolWeight__" + az)
151+func av () = "%s__factoryConfig"
152152
153153
154-func aA () = "%s__allowedLpScriptHash"
154+func aw () = "%s%s__matcher__publicKey"
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 ax (ay) = (("%s%s%s__" + ay) + "__mappings__poolContract2LpAsset")
160158
161159
162-func aH (aI,aJ) = valueOrErrorMessage(getString(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
160+func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
163161
164162
165-func aK (aI,aJ) = valueOrErrorMessage(getInteger(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
163+func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
166164
167165
168-func aL (aM) = throw(makeString(["lp.ride:", aM], " "))
166+func aE () = "%s__shutdown"
169167
170168
171-func aN (aM) = makeString(["lp.ride:", aM], " ")
169+func aF (aG) = ("%s%s__poolWeight__" + aG)
172170
173171
174-let aO = addressFromStringValue(aH(this, T()))
172+func aH () = "%s__allowedLpScriptHash"
175173
176-let aP = addressFromStringValue(aH(aO, aB))
177174
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"))
175+let aI = "%s__feeCollectorAddress"
176+
177+func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
178+
179+
180+func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], ""))
181+
182+
183+func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], ""))
184+
185+
186+func aS (aT) = throw(makeString(["lp.ride:", aT], " "))
187+
188+
189+func aU (aT) = makeString(["lp.ride:", aT], " ")
190+
191+
192+let aV = addressFromStringValue(aO(this, T()))
193+
194+let aW = addressFromStringValue(aO(aV, aI))
195+
196+let aX = {
197+ let aY = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
198+ if ($isInstanceOf(aY, "Int"))
199+ then aY
200+ else throw(($getType(aY) + " couldn't be cast to Int"))
183201 }
184202
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"))
203+let aZ = {
204+ let aY = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
205+ if ($isInstanceOf(aY, "Int"))
206+ then aY
207+ else throw(($getType(aY) + " couldn't be cast to Int"))
190208 }
191209
192-func aT () = valueOrElse(getBoolean(aO, ax()), false)
210+func ba () = aO(aV, ao())
193211
194212
195-func aU () = fromBase58String(aH(aO, ap()))
213+func bb () = aO(aV, ap())
196214
197215
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)
216+func bc () = valueOrElse(getBoolean(aV, aE()), false)
217+
218+
219+func bd () = fromBase58String(aO(aV, aw()))
220+
221+
222+func be () = {
223+ let bf = aO(this, ae())
224+ let bg = aO(this, af())
225+ let aB = aR(aV, aC(bg))
226+ let aA = aR(aV, aC(bf))
227+ split(aO(aV, az(toString(aA), toString(aB))), j)
204228 }
205229
206230
207-func aY (aZ) = if ((aZ == i))
231+func bh (bi) = if ((bi == i))
208232 then unit
209- else fromBase58String(aZ)
233+ else fromBase58String(bi)
210234
211235
212-func ba (aZ) = if ((aZ == unit))
236+func bj (bi) = if ((bi == unit))
213237 then i
214- else toBase58String(value(aZ))
238+ else toBase58String(value(bi))
215239
216240
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]))
241+func bk (bl) = $Tuple7(addressFromStringValue(bl[o]), parseIntValue(bl[p]), fromBase58String(bl[q]), bh(bl[r]), bh(bl[s]), parseIntValue(bl[t]), parseIntValue(bl[u]))
218242
219243
220-let bd = bb(aV())
244+let bm = bk(be())
221245
222-let be = bd
246+let bn = bm
223247
224-let bf = be._1
248+let bo = bn._1
225249
226-let bg = be._2
250+let bp = bn._2
227251
228-let bh = be._3
252+let bq = bn._3
229253
230-let bi = be._4
254+let br = bn._4
231255
232-let bj = be._5
256+let bs = bn._5
233257
234-let bk = be._6
258+let bt = bn._6
235259
236-let bl = be._7
260+let bu = bn._7
237261
238-func bm () = split(aH(aO, ao()), j)
262+func bv () = split(aO(aV, av()), j)
239263
240264
241-let bn = valueOrErrorMessage(addressFromString(bm()[B]), "incorrect staking address")
265+let bw = valueOrErrorMessage(addressFromString(bv()[B]), "incorrect staking address")
242266
243-let bo = valueOrErrorMessage(addressFromString(bm()[C]), "incorrect staking address")
267+let bx = valueOrErrorMessage(addressFromString(bv()[C]), "incorrect staking address")
244268
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)
269+func by (bz,bA,bB,bC,bD,bE,bF,bG,bH,bI) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI)], j)
246270
247271
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)
272+func bJ (bK,bL,bM,bC,bF,bG) = makeString(["%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bC), toString(bF), toString(bG)], j)
249273
250274
251-func bE (bF) = if ((bF == "WAVES"))
252- then wavesBalance(this).available
253- else assetBalance(this, fromBase58String(bF))
275+func bN (ar) = if ((ar == "WAVES"))
276+ then (wavesBalance(this).available + at(ar))
277+ else if ((ar == ba()))
278+ then {
279+ let bf = aO(this, ae())
280+ let bg = aO(this, af())
281+ if (if (if ((bf == "WAVES"))
282+ then (bg == ba())
283+ else false)
284+ then true
285+ else if ((bg == "WAVES"))
286+ then (bf == ba())
287+ else false)
288+ then assetBalance(this, fromBase58String(ar))
289+ else (assetBalance(this, fromBase58String(ar)) + au(ar))
290+ }
291+ else assetBalance(this, fromBase58String(ar))
254292
255293
256-func bG (bH,bI) = fraction(bH, d, bI)
294+func bO (bP,bQ) = fraction(bP, d, bQ)
257295
258296
259-func bJ (bH,bI,L) = fraction(bH, d, bI, L)
297+func bR (bP,bQ,L) = fraction(bP, d, bQ, L)
260298
261299
262-func bK (bL,bM,bN,bO) = {
263- let bP = D(bN, bL)
264- let bQ = D(bO, bM)
265- bG(bQ, bP)
300+func bS (bT) = {
301+ let bU = invoke(bT, "getRate", nil, nil)
302+ if ((bU == bU))
303+ then {
304+ let bV = bU
305+ if ($isInstanceOf(bV, "Int"))
306+ then {
307+ let bW = bV
308+ bW
309+ }
310+ else aS("proxy.getRate() unexpected value")
311+ }
312+ else throw("Strict value is not equal to itself.")
266313 }
267314
268315
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]
280- }
281-
282-
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))
316+func bX (ar,bY,bZ,bT) = {
317+ let ca = at(ar)
318+ if ((ca == ca))
319+ then {
320+ let cb = au(bZ)
321+ if ((cb == cb))
355322 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)
323+ let cc = bh(ar)
324+ if ((bY > 0))
325+ then {
326+ let cd = invoke(bT, "deposit", nil, [AttachedPayment(cc, bY)])
327+ if ((cd == cd))
328+ then {
329+ let bV = cd
330+ if ($isInstanceOf(bV, "Int"))
331+ then {
332+ let ce = bV
333+ let cf = (ca + bY)
334+ let cg = (cb + ce)
335+[IntegerEntry(aq(ar), cf), IntegerEntry(as(bZ), cg)]
336+ }
337+ else nil
338+ }
339+ else throw("Strict value is not equal to itself.")
340+ }
341+ else nil
360342 }
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
519343 else throw("Strict value is not equal to itself.")
520344 }
521345 else throw("Strict value is not equal to itself.")
522346 }
523347
524348
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))
349+func ch (ar,bY,bZ,bT,ci) = {
350+ let ca = at(ar)
351+ if ((ca == ca))
572352 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)
353+ let cb = au(bZ)
354+ if ((cb == cb))
355+ then {
356+ let cj = bS(bT)
357+ if ((cj == cj))
358+ then {
359+ let ck = bh(bZ)
360+ let cl = fraction(ci, bY, cj)
361+ if ((cl > 0))
362+ then {
363+ let cm = invoke(bT, "withdraw", nil, [AttachedPayment(ck, cl)])
364+ if ((cm == cm))
365+ then {
366+ let bV = cm
367+ if ($isInstanceOf(bV, "Int"))
368+ then {
369+ let cn = bV
370+ let cf = (ca - cn)
371+ let cg = (cb - cl)
372+[IntegerEntry(aq(ar), cf), IntegerEntry(as(bZ), cg)]
373+ }
374+ else nil
375+ }
376+ else throw("Strict value is not equal to itself.")
377+ }
378+ else nil
379+ }
380+ else throw("Strict value is not equal to itself.")
381+ }
382+ else throw("Strict value is not equal to itself.")
590383 }
591384 else throw("Strict value is not equal to itself.")
592385 }
593386
594387
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))
388+func co (ar) = invoke(aV, "getPoolLeaseConfigREADONLY", [toString(this), ar], nil)
389+
390+
391+func cp (cq,ar,bZ,cr,bT,ci) = {
392+ let ca = at(ar)
393+ if ((ca == ca))
604394 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)
395+ let cb = au(bZ)
396+ if ((cb == cb))
397+ then {
398+ let cs = {
399+ let bV = bh(ar)
400+ if ($isInstanceOf(bV, "ByteVector"))
401+ then {
402+ let ct = bV
403+ assetBalance(this, ct)
404+ }
405+ else if ($isInstanceOf(bV, "Unit"))
406+ then {
407+ let cu = bV
408+ wavesBalance(this).available
409+ }
410+ else throw("Match error")
411+ }
412+ if ((cs == cs))
413+ then {
414+ let cv = max([0, ((cs + ca) - cr)])
415+ let cw = fraction(cq, cv, 100)
416+ let cx = (ca - cw)
417+ if ((cx == 0))
418+ then nil
419+ else if ((0 > cx))
420+ then {
421+ let cy = -(cx)
422+ bX(ar, cy, bZ, bT)
423+ }
424+ else {
425+ let cz = cx
426+ ch(ar, cz, bZ, bT, ci)
427+ }
428+ }
429+ else throw("Strict value is not equal to itself.")
430+ }
431+ else throw("Strict value is not equal to itself.")
647432 }
648433 else throw("Strict value is not equal to itself.")
649434 }
650435
651436
652-func eZ () = {
653- let dW = getString(U())
654- if ($isInstanceOf(dW, "String"))
437+func cA (ar) = {
438+ let bV = co(ar)
439+ if ($isInstanceOf(bV, "(Boolean, Int, Int, String, String, Int, String)"))
655440 then {
656- let fa = dW
657- fromBase58String(fa)
441+ let cB = bV
442+ let cC = cB
443+ let cD = cC._1
444+ let cE = cC._2
445+ let cr = cC._3
446+ let cF = cC._4
447+ let cG = cC._5
448+ let ci = cC._6
449+ let cH = cC._7
450+ if (cD)
451+ then cp(cE, ar, cG, cr, addressFromStringValue(cF), ci)
452+ else nil
658453 }
659- else if ($isInstanceOf(dW, "Unit"))
454+ else aS((("[" + ar) + "] Rebalance error"))
455+ }
456+
457+
458+func cI (cJ,cK,cL,cM) = {
459+ let cN = D(cL, cJ)
460+ let cO = D(cM, cK)
461+ bO(cO, cN)
462+ }
463+
464+
465+func cP (cL,cM,cQ) = {
466+ let cR = be()
467+ let cS = parseIntValue(cR[t])
468+ let cT = parseIntValue(cR[u])
469+ let cU = cI(cS, cT, cL, cM)
470+ let bQ = D(cL, cS)
471+ let bP = D(cM, cT)
472+ let cV = D(cQ, b)
473+ let cW = bO(bQ, cV)
474+ let cX = bO(bP, cV)
475+[cU, cW, cX]
476+ }
477+
478+
479+func cY (cL,cM,cQ) = {
480+ let cZ = cP(cL, cM, cQ)
481+[H(cZ[0], b), H(cZ[1], b), H(cZ[2], b)]
482+ }
483+
484+
485+func da (db,dc,dd,ab) = {
486+ let cR = be()
487+ let de = cR[q]
488+ let df = cR[r]
489+ let dg = cR[s]
490+ let cJ = parseIntValue(cR[t])
491+ let cK = parseIntValue(cR[u])
492+ let dh = cR[p]
493+ let di = valueOrErrorMessage(assetInfo(fromBase58String(de)), (("Asset " + de) + " doesn't exist")).quantity
494+ if ((de != dc))
495+ then throw("Invalid asset passed.")
496+ else {
497+ let dj = bN(df)
498+ let dk = D(dj, cJ)
499+ let dl = bN(dg)
500+ let dm = D(dl, cK)
501+ let dn = bO(dm, dk)
502+ let do = H(dn, b)
503+ let dp = D(dd, b)
504+ let dq = D(di, b)
505+ let dr = fraction(dk, dp, dq)
506+ let ds = fraction(dm, dp, dq)
507+ let dt = K(dr, cJ, FLOOR)
508+ let du = K(ds, cK, FLOOR)
509+ let dv = if ((db == ""))
510+ then nil
511+ else [ScriptTransfer(ab, dt, if ((df == "WAVES"))
512+ then unit
513+ else fromBase58String(df)), ScriptTransfer(ab, du, if ((dg == "WAVES"))
514+ then unit
515+ else fromBase58String(dg)), StringEntry(ad(toString(ab), db), bJ(dt, du, dd, do, height, lastBlock.timestamp)), IntegerEntry(W(), do), IntegerEntry(X(height, lastBlock.timestamp), do)]
516+ $Tuple10(dt, du, df, dg, dj, dl, di, dn, dh, dv)
517+ }
518+ }
519+
520+
521+func dw (db,dx,dy,dz,dA,dB,ab,dC,dD) = {
522+ let cR = be()
523+ let de = fromBase58String(cR[q])
524+ let dE = cR[r]
525+ let dF = cR[s]
526+ let dG = cR[v]
527+ let dH = cR[w]
528+ let cS = parseIntValue(cR[t])
529+ let cT = parseIntValue(cR[u])
530+ let dh = cR[p]
531+ let di = valueOrErrorMessage(assetInfo(de), (("Asset " + toBase58String(de)) + " doesn't exist")).quantity
532+ let dI = toBase58String(valueOrElse(dz, fromBase58String("WAVES")))
533+ let dJ = toBase58String(valueOrElse(dB, fromBase58String("WAVES")))
534+ if (if ((dE != dI))
535+ then true
536+ else (dF != dJ))
537+ then throw("Invalid amt or price asset passed.")
538+ else {
539+ let dj = if (dC)
540+ then bN(dE)
541+ else (bN(dE) - dy)
542+ let dl = if (dC)
543+ then bN(dF)
544+ else (bN(dF) - dA)
545+ let dK = D(dy, cS)
546+ let dL = D(dA, cT)
547+ let dM = bO(dL, dK)
548+ let dk = D(dj, cS)
549+ let dm = D(dl, cT)
550+ let dN = if ((di == 0))
551+ then {
552+ let dn = e
553+ let dO = e
554+ let cV = pow((dK * dL), 0, toBigInt(5), 1, 0, DOWN)
555+ $Tuple5(H(cV, b), H(dK, cS), H(dL, cT), bO((dm + dL), (dk + dK)), dO)
556+ }
557+ else {
558+ let dn = bO(dm, dk)
559+ let dO = fraction(R((dn - dM)), d, dn)
560+ let dP = D(dx, b)
561+ if (if ((dn != e))
562+ then (dO > dP)
563+ else false)
564+ then throw(((("Price slippage " + toString(dO)) + " exceeded the passed limit of ") + toString(dP)))
565+ else {
566+ let dq = D(di, b)
567+ let dQ = fraction(dK, bR(dm, dk, CEILING), d, CEILING)
568+ let dR = fraction(dL, d, bR(dm, dk, FLOOR), CEILING)
569+ let dS = if ((dQ > dL))
570+ then $Tuple2(dR, dL)
571+ else $Tuple2(dK, dQ)
572+ let dT = dS._1
573+ let dU = dS._2
574+ let cV = fraction(dq, dU, dm, FLOOR)
575+ $Tuple5(K(cV, b, FLOOR), K(dT, cS, CEILING), K(dU, cT, CEILING), dn, dO)
576+ }
577+ }
578+ let dV = dN._1
579+ let dW = dN._2
580+ let dX = dN._3
581+ let do = H(dN._4, b)
582+ let dY = H(dN._5, b)
583+ if ((0 >= dV))
584+ then throw("Invalid calculations. LP calculated is less than zero.")
585+ else {
586+ let dZ = if (!(dD))
587+ then 0
588+ else dV
589+ let ea = (dy - dW)
590+ let eb = (dA - dX)
591+ let ec = [IntegerEntry(W(), do), IntegerEntry(X(height, lastBlock.timestamp), do), StringEntry(aa(ab, db), by(dW, dX, dZ, do, dx, dY, height, lastBlock.timestamp, ea, eb))]
592+ $Tuple13(dV, dZ, do, dj, dl, di, de, dh, ec, ea, eb, dz, dB)
593+ }
594+ }
595+ }
596+
597+
598+func ed (ee,ef,di) = {
599+ let eg = G(ee, toBigInt(bt))
600+ let eh = G(ef, toBigInt(bu))
601+ let ei = fraction(pow((eg * eh), 0, toBigInt(5), 1, 18, DOWN), g, di)
602+ if ((di == f))
603+ then f
604+ else ei
605+ }
606+
607+
608+func ej (ek,el,em) = {
609+ let en = (toBigInt(bN(bj(br))) - ek)
610+ let eo = (toBigInt(bN(bj(bs))) - el)
611+ let ep = (toBigInt(value(assetInfo(bq)).quantity) - em)
612+ let eq = ed(en, eo, ep)
613+ eq
614+ }
615+
616+
617+func er (es,et,em) = {
618+ let en = (bN(bj(br)) + es)
619+ let eo = (bN(bj(bs)) + et)
620+ let ep = (value(assetInfo(bq)).quantity + em)
621+ let ei = ed(toBigInt(en), toBigInt(eo), toBigInt(ep))
622+ let eu = [IntegerEntry(ak, height), StringEntry(aj, toString(ei))]
623+ $Tuple2(eu, ei)
624+ }
625+
626+
627+func ev (ew,ei) = if ((ei >= ew))
628+ then true
629+ else aS(makeString(["updated KLp lower than current KLp", toString(ew), toString(ei)], " "))
630+
631+
632+func ex (ey) = {
633+ let en = bN(bj(br))
634+ let eo = bN(bj(bs))
635+ let ez = ey.amount
636+ let eA = fraction(ey.amount, ey.price, b, FLOOR)
637+ let eB = if ((ey.orderType == Buy))
638+ then $Tuple2(ez, -(eA))
639+ else $Tuple2(-(ez), eA)
640+ let es = eB._1
641+ let et = eB._2
642+ if (if (if (bc())
643+ then true
644+ else (bp == m))
645+ then true
646+ else (bp == n))
647+ then throw("Exchange operations disabled")
648+ else if (if ((ey.assetPair.amountAsset != br))
649+ then true
650+ else (ey.assetPair.priceAsset != bs))
651+ then throw("Wrong order assets.")
652+ else {
653+ let eC = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp"))
654+ let eD = er(es, et, 0)
655+ let eE = eD._1
656+ let eF = eD._2
657+ let eG = (eF >= eC)
658+ let eH = makeString(["kLp=", toString(eC), " kLpNew=", toString(eF), " amountAssetBalance=", toString(en), " priceAssetBalance=", toString(eo), " amountAssetBalanceDelta=", toString(es), " priceAssetBalanceDelta=", toString(et), " height=", toString(height)], "")
659+ $Tuple2(eG, eH)
660+ }
661+ }
662+
663+
664+func eI (eJ) = if ((size(eJ.payments) != 1))
665+ then throw("exactly 1 payment is expected")
666+ else {
667+ let eK = value(eJ.payments[0])
668+ let dc = value(eK.assetId)
669+ let eL = eK.amount
670+ let dN = da(toBase58String(eJ.transactionId), toBase58String(dc), eL, eJ.caller)
671+ let dt = dN._1
672+ let du = dN._2
673+ let dh = parseIntValue(dN._9)
674+ let dv = dN._10
675+ if (if (bc())
676+ then true
677+ else (dh == n))
678+ then throw(("Get operation is blocked by admin. Status = " + toString(dh)))
679+ else $Tuple5(dt, du, eL, dc, dv)
680+ }
681+
682+
683+func eM (eJ,dx,dD) = if ((size(eJ.payments) != 2))
684+ then throw("exactly 2 payments are expected")
685+ else {
686+ let eN = value(eJ.payments[0])
687+ let eO = value(eJ.payments[1])
688+ let eP = dw(toBase58String(eJ.transactionId), dx, eN.amount, eN.assetId, eO.amount, eO.assetId, toString(eJ.caller), false, dD)
689+ let dh = parseIntValue(eP._8)
690+ if (if (if (bc())
691+ then true
692+ else (dh == l))
693+ then true
694+ else (dh == n))
695+ then throw(("Put operation is blocked by admin. Status = " + toString(dh)))
696+ else eP
697+ }
698+
699+
700+func eQ (bY) = {
701+ let eR = invoke(aV, "emit", [bY], nil)
702+ if ((eR == eR))
703+ then {
704+ let eS = {
705+ let bV = eR
706+ if ($isInstanceOf(bV, "Address"))
707+ then {
708+ let eT = bV
709+ invoke(eT, "emit", [bY], nil)
710+ }
711+ else unit
712+ }
713+ if ((eS == eS))
714+ then bY
715+ else throw("Strict value is not equal to itself.")
716+ }
717+ else throw("Strict value is not equal to itself.")
718+ }
719+
720+
721+func eU (bY,ai) = {
722+ let eV = if ((ai == 0))
723+ then 0
724+ else fraction(bY, ai, b)
725+ $Tuple2((bY - eV), eV)
726+ }
727+
728+
729+func eW (eX,eY,ab,ac) = {
730+ let eZ = (ac == unit)
731+ let fa = bN(bj(br))
732+ let fb = bN(bj(bs))
733+ let fc = if ((eY == br))
734+ then true
735+ else if ((eY == bs))
736+ then false
737+ else aS("invalid asset")
738+ let fd = if (eZ)
739+ then $Tuple2(fa, fb)
740+ else if (fc)
741+ then $Tuple2((fa - eX), fb)
742+ else $Tuple2(fa, (fb - eX))
743+ let fe = fd._1
744+ let ff = fd._2
745+ let fg = if (fc)
746+ then $Tuple2(eX, 0)
747+ else $Tuple2(0, eX)
748+ let fh = fg._1
749+ let fi = fg._2
750+ let ez = eU(fh, aX)._1
751+ let eA = eU(fi, aX)._1
752+ let fj = eU(eX, aX)
753+ let fk = fj._1
754+ let eV = fj._2
755+ let fl = (fe + ez)
756+ let fm = (ff + eA)
757+ let fn = bO(D(fm, bu), D(fl, bt))
758+ let fo = H(fn, b)
759+ let fp = if (fc)
760+ then fe
761+ else ff
762+ let fq = toBigInt(fp)
763+ let fr = toBigInt(valueOrErrorMessage(assetInfo(bq), (("asset " + toBase58String(bq)) + " doesn't exist")).quantity)
764+ let fs = if ((fr > f))
765+ then true
766+ else aS("initial deposit requires all coins")
767+ if ((fs == fs))
768+ then {
769+ let ft = toBigInt(fk)
770+ let fu = max([0, toInt(((fr * (sqrtBigInt((d + ((ft * d) / fq)), 18, 18, DOWN) - d)) / d))])
771+ let ec = if (eZ)
772+ then nil
773+ else [IntegerEntry(W(), fo), IntegerEntry(X(height, lastBlock.timestamp), fo), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), by(fh, fi, fu, fo, 0, 0, height, lastBlock.timestamp, 0, 0))]
774+ let fv = bO(D(ff, bu), D(fe, bt))
775+ let fw = H(fv, b)
776+ let fx = {
777+ let fy = if (fc)
778+ then $Tuple2(fh, fe)
779+ else $Tuple2(fi, ff)
780+ let bY = fy._1
781+ let fz = fy._2
782+ let fA = toInt(fraction(fr, toBigInt((bY / 2)), toBigInt(fz)))
783+ fraction((fu - fA), b, fA)
784+ }
785+ $Tuple5(fu, ec, eV, fx, fc)
786+ }
787+ else throw("Strict value is not equal to itself.")
788+ }
789+
790+
791+func fB (fC,fk,eY,ab,ac) = {
792+ let eZ = (ac == unit)
793+ let cR = be()
794+ let cS = parseIntValue(cR[t])
795+ let cT = parseIntValue(cR[u])
796+ let fD = [if ((eY == bq))
797+ then true
798+ else aS("invalid lp asset")]
799+ if ((fD == fD))
800+ then {
801+ let fE = if ((fC == br))
802+ then true
803+ else if ((fC == bs))
804+ then false
805+ else aS("invalid asset")
806+ let fF = if (fE)
807+ then toBigInt(bN(bj(br)))
808+ else toBigInt(bN(bj(bs)))
809+ let fG = if (fE)
810+ then cS
811+ else cT
812+ let fH = bN(bj(br))
813+ let fI = bN(bj(bs))
814+ let fJ = if (fE)
815+ then fH
816+ else fI
817+ let fK = toBigInt(fJ)
818+ let fr = toBigInt(valueOrErrorMessage(assetInfo(bq), (("asset " + toBase58String(bq)) + " doesn't exist")).quantity)
819+ let fL = toBigInt(fk)
820+ let fM = max([0, toInt(((fF * (d - pow((d - ((fL * d) / fr)), 18, h, 0, 18, DOWN))) / d))])
821+ let fN = eU(fM, aZ)
822+ let fO = fN._1
823+ let eV = fN._2
824+ let fP = if (fE)
825+ then $Tuple4(fO, 0, (fH - fM), fI)
826+ else $Tuple4(0, fO, fH, (fI - fM))
827+ let fQ = fP._1
828+ let fR = fP._2
829+ let fS = fP._3
830+ let fT = fP._4
831+ let fn = bO(D(fT, bu), D(fS, bt))
832+ let fo = H(fn, b)
833+ let ec = if (eZ)
834+ then nil
835+ else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bJ(fQ, fR, fk, fo, height, lastBlock.timestamp)), IntegerEntry(W(), fo), IntegerEntry(X(height, lastBlock.timestamp), fo)]
836+ let fv = bO(D(fI, bu), D(fH, bt))
837+ let fw = H(fv, b)
838+ let fx = {
839+ let fU = (toInt(fraction(fF, fL, fr)) * 2)
840+ fraction((fO - fU), b, fU)
841+ }
842+ $Tuple5(fO, ec, eV, fx, fE)
843+ }
844+ else throw("Strict value is not equal to itself.")
845+ }
846+
847+
848+func fV () = {
849+ let bV = getString(U())
850+ if ($isInstanceOf(bV, "String"))
851+ then {
852+ let fW = bV
853+ fromBase58String(fW)
854+ }
855+ else if ($isInstanceOf(bV, "Unit"))
660856 then unit
661857 else throw("Match error")
662858 }
663859
664860
665-func fb () = {
666- let dW = getString(V())
667- if ($isInstanceOf(dW, "String"))
861+func fX () = {
862+ let bV = getString(V())
863+ if ($isInstanceOf(bV, "String"))
668864 then {
669- let fa = dW
670- fromBase58String(fa)
865+ let fW = bV
866+ fromBase58String(fW)
671867 }
672- else if ($isInstanceOf(dW, "Unit"))
868+ else if ($isInstanceOf(bV, "Unit"))
673869 then unit
674870 else throw("Match error")
675871 }
676872
677873
678-func fc (dL) = {
679- let dW = eZ()
680- if ($isInstanceOf(dW, "ByteVector"))
874+func fY (eJ) = {
875+ let bV = fV()
876+ if ($isInstanceOf(bV, "ByteVector"))
681877 then {
682- let fd = dW
683- (dL.callerPublicKey == fd)
878+ let fZ = bV
879+ (eJ.callerPublicKey == fZ)
684880 }
685- else if ($isInstanceOf(dW, "Unit"))
686- then (dL.caller == this)
881+ else if ($isInstanceOf(bV, "Unit"))
882+ then (eJ.caller == this)
687883 else throw("Match error")
688884 }
689885
690886
691-func fe (dL) = {
692- let ff = throw("Permission denied")
693- let dW = eZ()
694- if ($isInstanceOf(dW, "ByteVector"))
887+func ga (eJ) = {
888+ let gb = throw("Permission denied")
889+ let bV = fV()
890+ if ($isInstanceOf(bV, "ByteVector"))
695891 then {
696- let fd = dW
697- if ((dL.callerPublicKey == fd))
892+ let fZ = bV
893+ if ((eJ.callerPublicKey == fZ))
698894 then true
699- else ff
895+ else gb
700896 }
701- else if ($isInstanceOf(dW, "Unit"))
702- then if ((dL.caller == this))
897+ else if ($isInstanceOf(bV, "Unit"))
898+ then if ((eJ.caller == this))
703899 then true
704- else ff
900+ else gb
705901 else throw("Match error")
706902 }
707903
708904
709-@Callable(dL)
710-func calculateAmountOutForSwapREADONLY (fg,fh,fi) = {
711- let fj = if ((fh == false))
905+@Callable(eJ)
906+func rebalance () = (cA(ae()) ++ cA(af()))
907+
908+
909+
910+@Callable(eJ)
911+func calculateAmountOutForSwapREADONLY (gc,gd,ge) = {
912+ let gf = if ((gd == false))
712913 then {
713- let fk = aH(this, af())
714- let fl = aH(this, ae())
715- $Tuple2(fk, fl)
914+ let gg = aO(this, af())
915+ let gh = aO(this, ae())
916+ $Tuple2(gg, gh)
716917 }
717918 else {
718- let fk = aH(this, ae())
719- let fl = aH(this, af())
720- $Tuple2(fk, fl)
919+ let gg = aO(this, ae())
920+ let gh = aO(this, af())
921+ $Tuple2(gg, gh)
721922 }
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))
923+ let gg = gf._1
924+ let gh = gf._2
925+ let gi = bN(gh)
926+ let gj = bN(gg)
927+ let gk = fraction(gj, gc, (gi + gc))
928+ let gl = (toBigInt(gi) * toBigInt(gj))
929+ let gm = (((toBigInt(bN(gh)) + toBigInt(gc)) + toBigInt(ge)) * (toBigInt(bN(gg)) - toBigInt(gk)))
930+ let gn = if ((gm >= gl))
730931 then true
731932 else throw("new K is fewer error")
732- if ((fr == fr))
733- then $Tuple2(nil, fo)
933+ if ((gn == gn))
934+ then $Tuple2(nil, gk)
734935 else throw("Strict value is not equal to itself.")
735936 }
736937
737938
738939
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"))
940+@Callable(eJ)
941+func calculateAmountOutForSwapAndSendTokens (gc,gd,go,gp,ge) = {
942+ let gq = {
943+ let aY = invoke(aV, "getSwapContractREADONLY", nil, nil)
944+ if ($isInstanceOf(aY, "String"))
945+ then aY
946+ else throw(($getType(aY) + " couldn't be cast to String"))
746947 }
747- let eH = [if ((value(dL.payments[0]).amount >= fg))
948+ let fD = [if ((value(eJ.payments[0]).amount >= gc))
748949 then true
749- else aL("Wrong amount"), if ((dL.caller == addressFromStringValue(fu)))
950+ else aS("Wrong amount"), if ((eJ.caller == addressFromStringValue(gq)))
750951 then true
751- else aL("Permission denied")]
752- if ((eH == eH))
952+ else aS("Permission denied")]
953+ if ((fD == fD))
753954 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))
955+ let eK = value(eJ.payments[0])
956+ let gh = bj(eK.assetId)
957+ let gg = if ((gd == false))
958+ then aO(this, af())
959+ else aO(this, ae())
960+ let gi = (bN(gh) - value(eJ.payments[0]).amount)
961+ let gj = bN(gg)
962+ let gk = fraction(gj, gc, (gi + gc))
963+ let gl = (toBigInt(gi) * toBigInt(gj))
964+ let gm = ((toBigInt(bN(gh)) + toBigInt(ge)) * (toBigInt(bN(gg)) - toBigInt(gk)))
965+ let gn = if ((gm >= gl))
765966 then true
766967 else throw("new K is fewer error")
767- if ((fr == fr))
968+ if ((gn == gn))
768969 then {
769- let fv = if ((fo >= fs))
970+ let gr = if ((gk >= go))
770971 then true
771972 else throw("Exchange result is fewer coins than expected")
772- if ((fv == fv))
773- then $Tuple2([ScriptTransfer(addressFromStringValue(ft), fo, aY(fk))], fo)
973+ if ((gr == gr))
974+ then {
975+ let gs = {
976+ let bV = co(gg)
977+ if ($isInstanceOf(bV, "(Boolean, Int, Int, String, String, Int, String)"))
978+ then {
979+ let cB = bV
980+ cB
981+ }
982+ else throw("error lease config")
983+ }
984+ let gt = gs
985+ let cD = gt._1
986+ let cE = gt._2
987+ let cr = gt._3
988+ let cF = gt._4
989+ let cG = gt._5
990+ let ci = gt._6
991+ let cH = gt._7
992+ let gu = assetBalance(this, fromBase58String(gg))
993+ let gv = if (if ((gg == "WAVES"))
994+ then (gk > gu)
995+ else false)
996+ then {
997+ let gw = (gk - gu)
998+ let gx = (at(gg) / au(ba()))
999+ let gy = wavesBalance(this).available
1000+ let gz = invoke(this, "withdraw", [gg, gw, ba(), bb(), ci], nil)
1001+ if ((gz == gz))
1002+ then {
1003+ let gA = wavesBalance(this).available
1004+ let gB = (gA - gy)
1005+ (gB - gw)
1006+ }
1007+ else throw("Strict value is not equal to itself.")
1008+ }
1009+ else 0
1010+ let gC = invoke(this, "rebalance", nil, nil)
1011+ if ((gC == gC))
1012+ then $Tuple2([ScriptTransfer(addressFromStringValue(cH), gv, unit), ScriptTransfer(addressFromStringValue(gp), gk, bh(gg))], gk)
1013+ else throw("Strict value is not equal to itself.")
1014+ }
7741015 else throw("Strict value is not equal to itself.")
7751016 }
7761017 else throw("Strict value is not equal to itself.")
7801021
7811022
7821023
783-@Callable(dL)
784-func setManager (fw) = {
785- let fx = fe(dL)
786- if ((fx == fx))
1024+@Callable(eJ)
1025+func setManager (gD) = {
1026+ let gE = ga(eJ)
1027+ if ((gE == gE))
7871028 then {
788- let fy = fromBase58String(fw)
789- if ((fy == fy))
790- then [StringEntry(V(), fw)]
1029+ let gF = fromBase58String(gD)
1030+ if ((gF == gF))
1031+ then [StringEntry(V(), gD)]
7911032 else throw("Strict value is not equal to itself.")
7921033 }
7931034 else throw("Strict value is not equal to itself.")
7951036
7961037
7971038
798-@Callable(dL)
1039+@Callable(eJ)
7991040 func confirmManager () = {
800- let fz = fb()
801- let fA = if (isDefined(fz))
1041+ let gG = fX()
1042+ let gH = if (isDefined(gG))
8021043 then true
8031044 else throw("No pending manager")
804- if ((fA == fA))
1045+ if ((gH == gH))
8051046 then {
806- let fB = if ((dL.callerPublicKey == value(fz)))
1047+ let gI = if ((eJ.callerPublicKey == value(gG)))
8071048 then true
8081049 else throw("You are not pending manager")
809- if ((fB == fB))
810- then [StringEntry(U(), toBase58String(value(fz))), DeleteEntry(V())]
1050+ if ((gI == gI))
1051+ then [StringEntry(U(), toBase58String(value(gG))), DeleteEntry(V())]
8111052 else throw("Strict value is not equal to itself.")
8121053 }
8131054 else throw("Strict value is not equal to itself.")
8151056
8161057
8171058
818-@Callable(dL)
819-func put (cz,fC) = if ((0 > cz))
1059+@Callable(eJ)
1060+func put (dx,gJ) = if ((0 > dx))
8201061 then throw("Invalid slippageTolerance passed")
8211062 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))
1063+ let eP = eM(eJ, dx, true)
1064+ let dZ = eP._2
1065+ let de = eP._7
1066+ let dv = eP._9
1067+ let ea = eP._10
1068+ let eb = eP._11
1069+ let gK = eP._12
1070+ let gL = eP._13
1071+ let eN = toBigInt(value(eJ.payments[0]).amount)
1072+ let eO = toBigInt(value(eJ.payments[1]).amount)
1073+ let eq = ej(eN, eO, toBigInt(0))
1074+ if ((eq == eq))
8341075 then {
835- let dU = invoke(aO, "emit", [db], nil)
836- if ((dU == dU))
1076+ let eR = invoke(aV, "emit", [dZ], nil)
1077+ if ((eR == eR))
8371078 then {
838- let dV = {
839- let dW = dU
840- if ($isInstanceOf(dW, "Address"))
1079+ let eS = {
1080+ let bV = eR
1081+ if ($isInstanceOf(bV, "Address"))
8411082 then {
842- let dX = dW
843- invoke(dX, "emit", [db], nil)
1083+ let eT = bV
1084+ invoke(eT, "emit", [dZ], nil)
8441085 }
8451086 else unit
8461087 }
847- if ((dV == dV))
1088+ if ((eS == eS))
8481089 then {
849- let fF = if ((dc > 0))
850- then invoke(bo, "put", nil, [AttachedPayment(fD, dc)])
1090+ let gM = if ((ea > 0))
1091+ then invoke(bx, "put", nil, [AttachedPayment(gK, ea)])
8511092 else nil
852- if ((fF == fF))
1093+ if ((gM == gM))
8531094 then {
854- let fG = if ((dd > 0))
855- then invoke(bo, "put", nil, [AttachedPayment(fE, dd)])
1095+ let gN = if ((eb > 0))
1096+ then invoke(bx, "put", nil, [AttachedPayment(gL, eb)])
8561097 else nil
857- if ((fG == fG))
1098+ if ((gN == gN))
8581099 then {
859- let fH = if (fC)
1100+ let gO = if (gJ)
8601101 then {
861- let fI = invoke(bn, "stake", nil, [AttachedPayment(cg, db)])
862- if ((fI == fI))
1102+ let gP = invoke(bw, "stake", nil, [AttachedPayment(de, dZ)])
1103+ if ((gP == gP))
8631104 then nil
8641105 else throw("Strict value is not equal to itself.")
8651106 }
866- else [ScriptTransfer(dL.caller, db, cg)]
867- let fJ = dt(0, 0, 0)
868- if ((fJ == fJ))
1107+ else [ScriptTransfer(eJ.caller, dZ, de)]
1108+ let gQ = er(0, 0, 0)
1109+ if ((gQ == gQ))
8691110 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)
1111+ let ei = gQ._2
1112+ let gR = gQ._1
1113+ let gS = ev(eq, ei)
1114+ if ((gS == gS))
1115+ then ((dv ++ gO) ++ gR)
8751116 else throw("Strict value is not equal to itself.")
8761117 }
8771118 else throw("Strict value is not equal to itself.")
8891130
8901131
8911132
892-@Callable(dL)
893-func putForFree (fM) = if ((0 > fM))
1133+@Callable(eJ)
1134+func putForFree (gT) = if ((0 > gT))
8941135 then throw("Invalid value passed")
8951136 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))
1137+ let eP = eM(eJ, gT, false)
1138+ let dv = eP._9
1139+ let eN = toBigInt(value(eJ.payments[0]).amount)
1140+ let eO = toBigInt(value(eJ.payments[1]).amount)
1141+ let eq = ej(eN, eO, toBigInt(0))
1142+ if ((eq == eq))
9021143 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)
1144+ let gU = er(0, 0, 0)
1145+ let gR = gU._1
1146+ let ei = gU._2
1147+ let gS = ev(eq, ei)
1148+ if ((gS == gS))
1149+ then (dv ++ gR)
9091150 else throw("Strict value is not equal to itself.")
9101151 }
9111152 else throw("Strict value is not equal to itself.")
9131154
9141155
9151156
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"))
1157+@Callable(eJ)
1158+func putOneTkn (gV,gW) = {
1159+ let gX = {
1160+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1161+ if ($isInstanceOf(aY, "Boolean"))
1162+ then aY
1163+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
9231164 }
924- let fR = if (if (if (aT())
1165+ let gY = if (if (if (bc())
9251166 then true
926- else (bg == l))
1167+ else (bp == l))
9271168 then true
928- else (bg == n))
1169+ else (bp == n))
9291170 then true
930- else fQ
931- let eH = [if (if (!(fR))
1171+ else gX
1172+ let fD = [if (if (!(gY))
9321173 then true
933- else fc(dL))
1174+ else fY(eJ))
9341175 then true
935- else aL("put operation is blocked by admin"), if ((size(dL.payments) == 1))
1176+ else aS("put operation is blocked by admin"), if ((size(eJ.payments) == 1))
9361177 then true
937- else aL("exactly 1 payment are expected")]
938- if ((eH == eH))
1178+ else aS("exactly 1 payment are expected")]
1179+ if ((fD == fD))
9391180 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))
1181+ let gZ = eJ.payments[0]
1182+ let eY = gZ.assetId
1183+ let eX = gZ.amount
1184+ let eq = if ((eY == br))
1185+ then ej(toBigInt(eX), toBigInt(0), toBigInt(0))
1186+ else if ((eY == bs))
1187+ then ej(toBigInt(0), toBigInt(eX), toBigInt(0))
1188+ else aS("payment asset is not supported")
1189+ if ((eq == eq))
9491190 then {
950- let ab = dL.caller
951- let ac = dL.transactionId
952- let fT = ea(eb, ec, ab, ac)
953- if ((fT == fT))
1191+ let ab = eJ.caller
1192+ let ac = eJ.transactionId
1193+ let ha = eW(eX, eY, ab, ac)
1194+ if ((ha == ha))
9541195 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)
1196+ let fc = ha._5
1197+ let hb = ha._4
1198+ let eV = ha._3
1199+ let ec = ha._2
1200+ let hc = ha._1
1201+ let hd = if (if ((gV > 0))
1202+ then (gV > hc)
9621203 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))
1204+ then aS(makeString(["amount to receive is less than ", toString(gV)], ""))
1205+ else hc
1206+ let eR = eQ(hd)
1207+ if ((eR == eR))
9671208 then {
968- let fH = if (fP)
1209+ let gO = if (gW)
9691210 then {
970- let fX = invoke(bn, "stake", nil, [AttachedPayment(bh, fW)])
971- if ((fX == fX))
1211+ let he = invoke(bw, "stake", nil, [AttachedPayment(bq, hd)])
1212+ if ((he == he))
9721213 then nil
9731214 else throw("Strict value is not equal to itself.")
9741215 }
975- else [ScriptTransfer(dL.caller, fW, bh)]
976- let fY = if ((dZ > 0))
977- then [ScriptTransfer(aP, dZ, ec)]
1216+ else [ScriptTransfer(eJ.caller, hd, bq)]
1217+ let hf = if ((eV > 0))
1218+ then [ScriptTransfer(aW, eV, eY)]
9781219 else nil
979- let fZ = if ((this == aP))
1220+ let hg = if ((this == aW))
9801221 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))
1222+ else if (fc)
1223+ then $Tuple2(-(eV), 0)
1224+ else $Tuple2(0, -(eV))
1225+ let es = hg._1
1226+ let et = hg._2
1227+ let hh = er(es, et, 0)
1228+ let gR = hh._1
1229+ let ei = hh._2
1230+ let eC = value(getString(aj))
1231+ let gS = ev(eq, ei)
1232+ if ((gS == gS))
11581233 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)
1234+ let gC = invoke(this, "rebalance", nil, nil)
1235+ if ((gC == gC))
1236+ then $Tuple2((((ec ++ gO) ++ hf) ++ gR), hd)
11791237 else throw("Strict value is not equal to itself.")
11801238 }
11811239 else throw("Strict value is not equal to itself.")
11911249
11921250
11931251
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))
1204- then {
1205- let gs = invoke(aO, "burn", [dN], [AttachedPayment(ce, dN)])
1206- if ((gs == gs))
1207- 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)
1214- else throw("Strict value is not equal to itself.")
1215- }
1216- else throw("Strict value is not equal to itself.")
1217- }
1218- else throw("Strict value is not equal to itself.")
1252+@Callable(eJ)
1253+func putOneTknREADONLY (eY,eX) = {
1254+ let hi = eW(eX, bh(eY), unit, unit)
1255+ let hc = hi._1
1256+ let ec = hi._2
1257+ let eV = hi._3
1258+ let hb = hi._4
1259+ let fc = hi._5
1260+ $Tuple2(nil, $Tuple3(hc, eV, hb))
12191261 }
12201262
12211263
12221264
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.")
1265+@Callable(eJ)
1266+func getOneTkn (hj,gV) = {
1267+ let gX = {
1268+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1269+ if ($isInstanceOf(aY, "Boolean"))
1270+ then aY
1271+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
1272+ }
1273+ let hk = if (if (bc())
1274+ then true
1275+ else (bp == n))
1276+ then true
1277+ else gX
1278+ let fD = [if (if (!(hk))
1279+ then true
1280+ else fY(eJ))
1281+ then true
1282+ else aS("get operation is blocked by admin"), if ((size(eJ.payments) == 1))
1283+ then true
1284+ else aS("exactly 1 payment are expected")]
1285+ if ((fD == fD))
1286+ then {
1287+ let fC = bh(hj)
1288+ let gZ = eJ.payments[0]
1289+ let eY = gZ.assetId
1290+ let fk = gZ.amount
1291+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1292+ if ((eq == eq))
1293+ then {
1294+ let ab = eJ.caller
1295+ let ac = eJ.transactionId
1296+ let hl = fB(fC, fk, eY, ab, ac)
1297+ if ((hl == hl))
1298+ then {
1299+ let fE = hl._5
1300+ let hb = hl._4
1301+ let eV = hl._3
1302+ let ec = hl._2
1303+ let hm = hl._1
1304+ let bY = if (if ((gV > 0))
1305+ then (gV > hm)
1306+ else false)
1307+ then aS(makeString(["amount to receive is less than ", toString(gV)], ""))
1308+ else hm
1309+ let gs = {
1310+ let bV = co(hj)
1311+ if ($isInstanceOf(bV, "(Boolean, Int, Int, String, String, Int, String)"))
1312+ then {
1313+ let cB = bV
1314+ cB
1315+ }
1316+ else throw("error lease config")
12491317 }
1250- else throw("Strict value is not equal to itself.")
1251- }
1252- else throw("Strict value is not equal to itself.")
1253- }
1254- }
1255-
1256-
1257-
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))
1264- 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))
1269- then {
1270- let gn = invoke(bn, "unstake", [toBase58String(cg), dT], nil)
1271- if ((gn == gn))
1272- 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))
1318+ let hn = gs
1319+ let cD = hn._1
1320+ let cE = hn._2
1321+ let cr = hn._3
1322+ let cF = hn._4
1323+ let cG = hn._5
1324+ let ci = hn._6
1325+ let cH = hn._7
1326+ let gu = assetBalance(this, fromBase58String(hj))
1327+ let gv = if (if ((hj == "WAVES"))
1328+ then (bY > gu)
1329+ else false)
12841330 then {
1285- let gs = invoke(aO, "burn", [dT], [AttachedPayment(cg, dT)])
1286- if ((gs == gs))
1331+ let gw = (bY - gu)
1332+ let gx = (at(hj) / au(ba()))
1333+ let gy = wavesBalance(this).available
1334+ let gz = invoke(this, "withdraw", [hj, gw, ba(), bb(), ci], nil)
1335+ if ((gz == gz))
12871336 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)
1337+ let gA = wavesBalance(this).available
1338+ let gB = (gA - gy)
1339+ (gB - gw)
1340+ }
1341+ else throw("Strict value is not equal to itself.")
1342+ }
1343+ else 0
1344+ let ho = [ScriptTransfer(addressFromStringValue(cH), gv, unit)]
1345+ let hp = invoke(aV, "burn", [fk], [AttachedPayment(eY, fk)])
1346+ if ((hp == hp))
1347+ then {
1348+ let hq = [ScriptTransfer(ab, bY, fC)]
1349+ let hf = if ((eV > 0))
1350+ then [ScriptTransfer(aW, eV, fC)]
1351+ else nil
1352+ let hr = {
1353+ let hs = if ((this == aW))
1354+ then 0
1355+ else eV
1356+ if (fE)
1357+ then $Tuple2(-((bY + hs)), 0)
1358+ else $Tuple2(0, -((bY + hs)))
1359+ }
1360+ let es = hr._1
1361+ let et = hr._2
1362+ let ht = er(es, et, 0)
1363+ let gR = ht._1
1364+ let ei = ht._2
1365+ let gS = ev(eq, ei)
1366+ if ((gS == gS))
1367+ then {
1368+ let gC = invoke(this, "rebalance", nil, nil)
1369+ if ((gC == gC))
1370+ then $Tuple2(((((ec ++ hq) ++ ho) ++ hf) ++ gR), bY)
12941371 else throw("Strict value is not equal to itself.")
12951372 }
12961373 else throw("Strict value is not equal to itself.")
13061383
13071384
13081385
1309-@Callable(dL)
1310-func unstakeAndGetNoLess (gm,gA,gv) = {
1311- let gd = if (aT())
1386+@Callable(eJ)
1387+func getOneTknREADONLY (fC,fk) = {
1388+ let hu = fB(bh(fC), fk, bq, unit, unit)
1389+ let hm = hu._1
1390+ let ec = hu._2
1391+ let eV = hu._3
1392+ let hb = hu._4
1393+ let fE = hu._5
1394+ $Tuple2(nil, $Tuple3(hm, eV, hb))
1395+ }
1396+
1397+
1398+
1399+@Callable(eJ)
1400+func unstakeAndGetOneTkn (hv,hj,gV) = {
1401+ let gX = {
1402+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1403+ if ($isInstanceOf(aY, "Boolean"))
1404+ then aY
1405+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
1406+ }
1407+ let hk = if (if (bc())
13121408 then true
1313- else (bg == n)
1314- let eH = [if (!(gd))
1409+ else (bp == n))
13151410 then true
1316- else throw("get operation is blocked by admin"), if ((size(dL.payments) == 0))
1411+ else gX
1412+ let fD = [if (if (!(hk))
13171413 then true
1318- else throw("no payments are expected")]
1319- if ((eH == eH))
1414+ else fY(eJ))
1415+ then true
1416+ else aS("get operation is blocked by admin"), if ((size(eJ.payments) == 0))
1417+ then true
1418+ else aS("no payments are expected")]
1419+ if ((fD == fD))
13201420 then {
1321- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1322- if ((ds == ds))
1421+ let fC = bh(hj)
1422+ let ab = eJ.caller
1423+ let ac = eJ.transactionId
1424+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1425+ if ((eq == eq))
13231426 then {
1324- let gn = invoke(bn, "unstake", [toBase58String(bh), gm], nil)
1325- if ((gn == gn))
1427+ let hw = invoke(bw, "unstake", [toBase58String(bq), hv], nil)
1428+ if ((hw == hw))
13261429 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))
1332- 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))
1430+ let hx = fB(fC, hv, bq, ab, ac)
1431+ if ((hx == hx))
13371432 then {
1338- let gs = invoke(aO, "burn", [gm], [AttachedPayment(bh, gm)])
1339- if ((gs == gs))
1433+ let fE = hx._5
1434+ let hb = hx._4
1435+ let eV = hx._3
1436+ let ec = hx._2
1437+ let hm = hx._1
1438+ let bY = if (if ((gV > 0))
1439+ then (gV > hm)
1440+ else false)
1441+ then aS(makeString(["amount to receive is less than ", toString(gV)], ""))
1442+ else hm
1443+ let hp = invoke(aV, "burn", [hv], [AttachedPayment(bq, hv)])
1444+ if ((hp == hp))
13401445 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)
1446+ let hq = [ScriptTransfer(eJ.caller, bY, fC)]
1447+ let hf = if ((eV > 0))
1448+ then [ScriptTransfer(aW, eV, fC)]
1449+ else nil
1450+ let hy = {
1451+ let hs = if ((this == aW))
1452+ then 0
1453+ else eV
1454+ if (fE)
1455+ then $Tuple2(-((bY + hs)), 0)
1456+ else $Tuple2(0, -((bY + hs)))
1457+ }
1458+ let es = hy._1
1459+ let et = hy._2
1460+ let hz = er(es, et, 0)
1461+ let gR = hz._1
1462+ let ei = hz._2
1463+ let gS = ev(eq, ei)
1464+ if ((gS == gS))
1465+ then $Tuple2((((ec ++ hq) ++ hf) ++ gR), bY)
13471466 else throw("Strict value is not equal to itself.")
13481467 }
13491468 else throw("Strict value is not equal to itself.")
13591478
13601479
13611480
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))
1481+@Callable(eJ)
1482+func get () = {
1483+ let dN = eI(eJ)
1484+ let hA = dN._1
1485+ let du = dN._2
1486+ let eL = dN._3
1487+ let dc = dN._4
1488+ let dv = dN._5
1489+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1490+ if ((eq == eq))
13761491 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))
1492+ let hB = invoke(aV, "burn", [eL], [AttachedPayment(dc, eL)])
1493+ if ((hB == hB))
1494+ then {
1495+ let hC = er(-(hA), -(du), 0)
1496+ let gR = hC._1
1497+ let ei = hC._2
1498+ let gS = ev(eq, ei)
1499+ if ((gS == gS))
1500+ then (dv ++ gR)
1501+ else throw("Strict value is not equal to itself.")
1502+ }
1503+ else throw("Strict value is not equal to itself.")
13851504 }
13861505 else throw("Strict value is not equal to itself.")
13871506 }
13881507
13891508
13901509
1391-@Callable(dL)
1392-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aV())
1393-
1394-
1395-
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])])
1510+@Callable(eJ)
1511+func getNoLess (hD,hE) = {
1512+ let dN = eI(eJ)
1513+ let dt = dN._1
1514+ let du = dN._2
1515+ let eL = dN._3
1516+ let dc = dN._4
1517+ let dv = dN._5
1518+ if ((hD > dt))
1519+ then throw(((("noLessThenAmtAsset failed: " + toString(dt)) + " < ") + toString(hD)))
1520+ else if ((hE > du))
1521+ then throw(((("noLessThenPriceAsset failed: " + toString(du)) + " < ") + toString(hE)))
1522+ else {
1523+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1524+ if ((eq == eq))
1525+ then {
1526+ let hB = invoke(aV, "burn", [eL], [AttachedPayment(dc, eL)])
1527+ if ((hB == hB))
1528+ then {
1529+ let hF = er(-(dt), -(du), 0)
1530+ let gR = hF._1
1531+ let ei = hF._2
1532+ let gS = ev(eq, ei)
1533+ if ((gS == gS))
1534+ then (dv ++ gR)
1535+ else throw("Strict value is not equal to itself.")
1536+ }
1537+ else throw("Strict value is not equal to itself.")
1538+ }
1539+ else throw("Strict value is not equal to itself.")
1540+ }
14051541 }
14061542
14071543
14081544
1409-@Callable(dL)
1545+@Callable(eJ)
1546+func unstakeAndGet (bY) = {
1547+ let hG = if ((size(eJ.payments) != 0))
1548+ then throw("No payments are expected")
1549+ else true
1550+ if ((hG == hG))
1551+ then {
1552+ let cR = be()
1553+ let de = fromBase58String(cR[q])
1554+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1555+ if ((eq == eq))
1556+ then {
1557+ let hw = invoke(bw, "unstake", [toBase58String(de), bY], nil)
1558+ if ((hw == hw))
1559+ then {
1560+ let dN = da(toBase58String(eJ.transactionId), toBase58String(de), bY, eJ.caller)
1561+ let dt = dN._1
1562+ let du = dN._2
1563+ let dh = parseIntValue(dN._9)
1564+ let dv = dN._10
1565+ let hH = if (if (bc())
1566+ then true
1567+ else (dh == n))
1568+ then throw(("Get operation is blocked by admin. Status = " + toString(dh)))
1569+ else true
1570+ if ((hH == hH))
1571+ then {
1572+ let hB = invoke(aV, "burn", [bY], [AttachedPayment(de, bY)])
1573+ if ((hB == hB))
1574+ then {
1575+ let hI = er(-(dt), -(du), 0)
1576+ let gR = hI._1
1577+ let ei = hI._2
1578+ let gS = ev(eq, ei)
1579+ if ((gS == gS))
1580+ then (dv ++ gR)
1581+ else throw("Strict value is not equal to itself.")
1582+ }
1583+ else throw("Strict value is not equal to itself.")
1584+ }
1585+ else throw("Strict value is not equal to itself.")
1586+ }
1587+ else throw("Strict value is not equal to itself.")
1588+ }
1589+ else throw("Strict value is not equal to itself.")
1590+ }
1591+ else throw("Strict value is not equal to itself.")
1592+ }
1593+
1594+
1595+
1596+@Callable(eJ)
1597+func unstakeAndGetNoLess (hv,hJ,hE) = {
1598+ let hk = if (bc())
1599+ then true
1600+ else (bp == n)
1601+ let fD = [if (!(hk))
1602+ then true
1603+ else throw("get operation is blocked by admin"), if ((size(eJ.payments) == 0))
1604+ then true
1605+ else throw("no payments are expected")]
1606+ if ((fD == fD))
1607+ then {
1608+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1609+ if ((eq == eq))
1610+ then {
1611+ let hw = invoke(bw, "unstake", [toBase58String(bq), hv], nil)
1612+ if ((hw == hw))
1613+ then {
1614+ let dN = da(toBase58String(eJ.transactionId), toBase58String(bq), hv, eJ.caller)
1615+ let dt = dN._1
1616+ let du = dN._2
1617+ let dv = dN._10
1618+ let hK = [if ((dt >= hJ))
1619+ then true
1620+ else throw(makeString(["amount asset amount to receive is less than ", toString(hJ)], "")), if ((du >= hE))
1621+ then true
1622+ else throw(makeString(["price asset amount to receive is less than ", toString(hE)], ""))]
1623+ if ((hK == hK))
1624+ then {
1625+ let hB = invoke(aV, "burn", [hv], [AttachedPayment(bq, hv)])
1626+ if ((hB == hB))
1627+ then {
1628+ let hL = er(-(dt), -(du), 0)
1629+ let gR = hL._1
1630+ let ei = hL._2
1631+ let gS = ev(eq, ei)
1632+ if ((gS == gS))
1633+ then (dv ++ gR)
1634+ else throw("Strict value is not equal to itself.")
1635+ }
1636+ else throw("Strict value is not equal to itself.")
1637+ }
1638+ else throw("Strict value is not equal to itself.")
1639+ }
1640+ else throw("Strict value is not equal to itself.")
1641+ }
1642+ else throw("Strict value is not equal to itself.")
1643+ }
1644+ else throw("Strict value is not equal to itself.")
1645+ }
1646+
1647+
1648+
1649+@Callable(eJ)
1650+func activate (hM,hN) = if ((toString(eJ.caller) != toString(aV)))
1651+ then throw("permissions denied")
1652+ else $Tuple2([StringEntry(ae(), hM), StringEntry(af(), hN)], "success")
1653+
1654+
1655+
1656+@Callable(eJ)
1657+func refreshKLp () = {
1658+ let hO = valueOrElse(getInteger(ak), 0)
1659+ let hP = if (((height - hO) >= an))
1660+ then unit
1661+ else aS(makeString([toString(an), " blocks have not passed since the previous call"], ""))
1662+ if ((hP == hP))
1663+ then {
1664+ let eC = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp"))
1665+ let hQ = er(0, 0, 0)
1666+ let hR = hQ._1
1667+ let ei = hQ._2
1668+ let eu = if ((eC != ei))
1669+ then hR
1670+ else aS("nothing to refresh")
1671+ $Tuple2(eu, toString(ei))
1672+ }
1673+ else throw("Strict value is not equal to itself.")
1674+ }
1675+
1676+
1677+
1678+@Callable(eJ)
1679+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, be())
1680+
1681+
1682+
1683+@Callable(eJ)
1684+func getAccBalanceWrapperREADONLY (ar) = $Tuple2(nil, bN(ar))
1685+
1686+
1687+
1688+@Callable(eJ)
1689+func calcPricesWrapperREADONLY (cL,cM,cQ) = {
1690+ let cZ = cP(cL, cM, cQ)
1691+ $Tuple2(nil, [toString(cZ[0]), toString(cZ[1]), toString(cZ[2])])
1692+ }
1693+
1694+
1695+
1696+@Callable(eJ)
14101697 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
14111698
14121699
14131700
1414-@Callable(dL)
1701+@Callable(eJ)
14151702 func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J))
14161703
14171704
14181705
1419-@Callable(dL)
1420-func calcPriceBigIntWrapperREADONLY (bH,bI) = $Tuple2(nil, toString(bG(parseBigIntValue(bH), parseBigIntValue(bI))))
1706+@Callable(eJ)
1707+func calcPriceBigIntWrapperREADONLY (bP,bQ) = $Tuple2(nil, toString(bO(parseBigIntValue(bP), parseBigIntValue(bQ))))
14211708
14221709
14231710
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))
1711+@Callable(eJ)
1712+func estimatePutOperationWrapperREADONLY (db,dx,dy,dz,dA,dB,ab,dC,dD) = $Tuple2(nil, dw(db, dx, dy, dz, dA, dB, ab, dC, dD))
14261713
14271714
14281715
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))
1716+@Callable(eJ)
1717+func estimateGetOperationWrapperREADONLY (db,dc,dd,ab) = {
1718+ let dN = da(db, dc, dd, addressFromStringValue(ab))
1719+ $Tuple2(nil, $Tuple10(dN._1, dN._2, dN._3, dN._4, dN._5, dN._6, dN._7, toString(dN._8), dN._9, dN._10))
14331720 }
14341721
14351722
14361723
1437-@Callable(dL)
1724+@Callable(eJ)
14381725 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))
1726+ let cR = be()
1727+ let de = fromBase58String(cR[q])
1728+ let hS = cR[r]
1729+ let hT = cR[s]
1730+ let dG = cR[v]
1731+ let dH = cR[w]
1732+ let cS = parseIntValue(cR[t])
1733+ let cT = parseIntValue(cR[u])
1734+ let hU = valueOrErrorMessage(assetInfo(de), (("Asset " + toBase58String(de)) + " doesn't exist")).quantity
1735+ let hV = bN(hS)
1736+ let hW = bN(hT)
1737+ let hX = if ((hU == 0))
14511738 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))
1739+ else cP(hV, hW, hU)
1740+ let do = 0
1741+ let hY = H(hX[1], b)
1742+ let hZ = H(hX[2], b)
1743+ let ia = value(getInteger(aV, aF(toString(this))))
1744+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hV), toString(hW), toString(hU), toString(do), toString(hY), toString(hZ), toString(ia)], j))
14581745 }
14591746
14601747
14611748
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))
1749+@Callable(eJ)
1750+func evaluatePutByAmountAssetREADONLY (dy) = {
1751+ let cR = be()
1752+ let de = fromBase58String(cR[q])
1753+ let dE = cR[r]
1754+ let df = fromBase58String(dE)
1755+ let dF = cR[s]
1756+ let dg = fromBase58String(dF)
1757+ let cS = parseIntValue(cR[t])
1758+ let cT = parseIntValue(cR[u])
1759+ let dh = cR[p]
1760+ let hU = valueOrErrorMessage(assetInfo(de), (("Asset " + toBase58String(de)) + " doesn't exist")).quantity
1761+ let hV = bN(dE)
1762+ let hW = bN(dF)
1763+ let cN = D(hV, cS)
1764+ let cO = D(hW, cT)
1765+ let dn = if ((hU == 0))
14791766 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))
1767+ else bO(cO, cN)
1768+ let dK = D(dy, cS)
1769+ let dL = fraction(dK, dn, d)
1770+ let dA = H(dL, cT)
1771+ let eP = dw("", 500000, dy, df, dA, dg, "", true, false)
1772+ let dV = eP._1
1773+ let ib = eP._3
1774+ let dj = eP._4
1775+ let dl = eP._5
1776+ let di = eP._6
1777+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(dV), toString(H(dn, b)), toString(dj), toString(dl), toString(di), dh, toString(dy), toString(dA)], j))
14911778 }
14921779
14931780
14941781
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))
1782+@Callable(eJ)
1783+func evaluatePutByPriceAssetREADONLY (dA) = {
1784+ let cR = be()
1785+ let de = fromBase58String(cR[q])
1786+ let dE = cR[r]
1787+ let df = fromBase58String(dE)
1788+ let dF = cR[s]
1789+ let dg = fromBase58String(dF)
1790+ let cS = parseIntValue(cR[t])
1791+ let cT = parseIntValue(cR[u])
1792+ let dh = cR[p]
1793+ let hU = valueOrErrorMessage(assetInfo(de), (("Asset " + toBase58String(de)) + " doesn't exist")).quantity
1794+ let ic = bN(dE)
1795+ let id = bN(dF)
1796+ let ie = D(ic, cS)
1797+ let if = D(id, cT)
1798+ let dn = if ((hU == 0))
15121799 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))
1800+ else bO(if, ie)
1801+ let dL = D(dA, cT)
1802+ let dK = fraction(dL, d, dn)
1803+ let dy = H(dK, cS)
1804+ let eP = dw("", 500000, dy, df, dA, dg, "", true, false)
1805+ let dV = eP._1
1806+ let ib = eP._3
1807+ let dj = eP._4
1808+ let dl = eP._5
1809+ let di = eP._6
1810+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(dV), toString(H(dn, b)), toString(dj), toString(dl), toString(di), dh, toString(dy), toString(dA)], j))
15241811 }
15251812
15261813
15271814
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))
1815+@Callable(eJ)
1816+func evaluateGetREADONLY (ig,ih) = {
1817+ let dN = da("", ig, ih, this)
1818+ let dt = dN._1
1819+ let du = dN._2
1820+ let dj = dN._5
1821+ let dl = dN._6
1822+ let di = dN._7
1823+ let do = dN._8
1824+ let dh = parseIntValue(dN._9)
1825+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dt), toString(du), toString(dj), toString(dl), toString(di), toString(do), toString(dh)], j))
15391826 }
15401827
15411828
1542-@Verifier(gZ)
1543-func ha () = {
1544- let hb = {
1545- let dW = eZ()
1546- if ($isInstanceOf(dW, "ByteVector"))
1829+@Verifier(ii)
1830+func ij () = {
1831+ let ik = {
1832+ let bV = fV()
1833+ if ($isInstanceOf(bV, "ByteVector"))
15471834 then {
1548- let fd = dW
1549- fd
1835+ let fZ = bV
1836+ fZ
15501837 }
1551- else if ($isInstanceOf(dW, "Unit"))
1552- then gZ.senderPublicKey
1838+ else if ($isInstanceOf(bV, "Unit"))
1839+ then ii.senderPublicKey
15531840 else throw("Match error")
15541841 }
1555- let dW = gZ
1556- if ($isInstanceOf(dW, "Order"))
1842+ let bV = ii
1843+ if ($isInstanceOf(bV, "Order"))
15571844 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
1845+ let ey = bV
1846+ let il = bd()
1847+ let im = ex(ey)
1848+ let aK = im._1
1849+ let aL = im._2
1850+ let aM = sigVerify(ey.bodyBytes, ey.proofs[0], ey.senderPublicKey)
1851+ let aN = sigVerify(ey.bodyBytes, ey.proofs[1], il)
1852+ if (if (if (aK)
1853+ then aM
15671854 else false)
1568- then aG
1855+ then aN
15691856 else false)
15701857 then true
1571- else aC(aD, aE, aF, aG)
1858+ else aJ(aK, aL, aM, aN)
15721859 }
1573- else if ($isInstanceOf(dW, "SetScriptTransaction"))
1860+ else if ($isInstanceOf(bV, "SetScriptTransaction"))
15741861 then {
1575- let fa = dW
1576- if (sigVerify(gZ.bodyBytes, gZ.proofs[0], hb))
1862+ let fW = bV
1863+ if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
15771864 then true
15781865 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)
1866+ let in = blake2b256(value(fW.script))
1867+ let io = fromBase64String(value(getString(aV, aH())))
1868+ let ip = scriptHash(this)
1869+ if ((io == in))
1870+ then (ip != in)
15841871 else false
15851872 }
15861873 }
1587- else sigVerify(gZ.bodyBytes, gZ.proofs[0], hb)
1874+ else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
15881875 }
15891876
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 () = "%s__sWavesAssetId"
134134
135135
136-func ap () = "%s%s__matcher__publicKey"
136+func ap () = "%s__sWavesProxyAddress"
137137
138138
139-func aq (ar) = (("%s%s%s__" + ar) + "__mappings__poolContract2LpAsset")
139+func aq (ar) = makeString(["%s%s", "additionalBalance", ar], j)
140140
141141
142-func as (at,au) = (((("%d%d%s__" + at) + "__") + au) + "__config")
142+func as (ar) = makeString(["%s%s", "stakingAssetBalance", ar], j)
143143
144144
145-func av (aw) = ("%s%s%s__mappings__baseAsset2internalId__" + aw)
145+func at (ar) = valueOrElse(getInteger(this, aq(ar)), 0)
146146
147147
148-func ax () = "%s__shutdown"
148+func au (ar) = valueOrElse(getInteger(this, as(ar)), 0)
149149
150150
151-func ay (az) = ("%s%s__poolWeight__" + az)
151+func av () = "%s__factoryConfig"
152152
153153
154-func aA () = "%s__allowedLpScriptHash"
154+func aw () = "%s%s__matcher__publicKey"
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 ax (ay) = (("%s%s%s__" + ay) + "__mappings__poolContract2LpAsset")
160158
161159
162-func aH (aI,aJ) = valueOrErrorMessage(getString(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
160+func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
163161
164162
165-func aK (aI,aJ) = valueOrErrorMessage(getInteger(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
163+func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
166164
167165
168-func aL (aM) = throw(makeString(["lp.ride:", aM], " "))
166+func aE () = "%s__shutdown"
169167
170168
171-func aN (aM) = makeString(["lp.ride:", aM], " ")
169+func aF (aG) = ("%s%s__poolWeight__" + aG)
172170
173171
174-let aO = addressFromStringValue(aH(this, T()))
172+func aH () = "%s__allowedLpScriptHash"
175173
176-let aP = addressFromStringValue(aH(aO, aB))
177174
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"))
175+let aI = "%s__feeCollectorAddress"
176+
177+func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
178+
179+
180+func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], ""))
181+
182+
183+func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], ""))
184+
185+
186+func aS (aT) = throw(makeString(["lp.ride:", aT], " "))
187+
188+
189+func aU (aT) = makeString(["lp.ride:", aT], " ")
190+
191+
192+let aV = addressFromStringValue(aO(this, T()))
193+
194+let aW = addressFromStringValue(aO(aV, aI))
195+
196+let aX = {
197+ let aY = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
198+ if ($isInstanceOf(aY, "Int"))
199+ then aY
200+ else throw(($getType(aY) + " couldn't be cast to Int"))
183201 }
184202
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"))
203+let aZ = {
204+ let aY = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
205+ if ($isInstanceOf(aY, "Int"))
206+ then aY
207+ else throw(($getType(aY) + " couldn't be cast to Int"))
190208 }
191209
192-func aT () = valueOrElse(getBoolean(aO, ax()), false)
210+func ba () = aO(aV, ao())
193211
194212
195-func aU () = fromBase58String(aH(aO, ap()))
213+func bb () = aO(aV, ap())
196214
197215
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)
216+func bc () = valueOrElse(getBoolean(aV, aE()), false)
217+
218+
219+func bd () = fromBase58String(aO(aV, aw()))
220+
221+
222+func be () = {
223+ let bf = aO(this, ae())
224+ let bg = aO(this, af())
225+ let aB = aR(aV, aC(bg))
226+ let aA = aR(aV, aC(bf))
227+ split(aO(aV, az(toString(aA), toString(aB))), j)
204228 }
205229
206230
207-func aY (aZ) = if ((aZ == i))
231+func bh (bi) = if ((bi == i))
208232 then unit
209- else fromBase58String(aZ)
233+ else fromBase58String(bi)
210234
211235
212-func ba (aZ) = if ((aZ == unit))
236+func bj (bi) = if ((bi == unit))
213237 then i
214- else toBase58String(value(aZ))
238+ else toBase58String(value(bi))
215239
216240
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]))
241+func bk (bl) = $Tuple7(addressFromStringValue(bl[o]), parseIntValue(bl[p]), fromBase58String(bl[q]), bh(bl[r]), bh(bl[s]), parseIntValue(bl[t]), parseIntValue(bl[u]))
218242
219243
220-let bd = bb(aV())
244+let bm = bk(be())
221245
222-let be = bd
246+let bn = bm
223247
224-let bf = be._1
248+let bo = bn._1
225249
226-let bg = be._2
250+let bp = bn._2
227251
228-let bh = be._3
252+let bq = bn._3
229253
230-let bi = be._4
254+let br = bn._4
231255
232-let bj = be._5
256+let bs = bn._5
233257
234-let bk = be._6
258+let bt = bn._6
235259
236-let bl = be._7
260+let bu = bn._7
237261
238-func bm () = split(aH(aO, ao()), j)
262+func bv () = split(aO(aV, av()), j)
239263
240264
241-let bn = valueOrErrorMessage(addressFromString(bm()[B]), "incorrect staking address")
265+let bw = valueOrErrorMessage(addressFromString(bv()[B]), "incorrect staking address")
242266
243-let bo = valueOrErrorMessage(addressFromString(bm()[C]), "incorrect staking address")
267+let bx = valueOrErrorMessage(addressFromString(bv()[C]), "incorrect staking address")
244268
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)
269+func by (bz,bA,bB,bC,bD,bE,bF,bG,bH,bI) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI)], j)
246270
247271
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)
272+func bJ (bK,bL,bM,bC,bF,bG) = makeString(["%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bC), toString(bF), toString(bG)], j)
249273
250274
251-func bE (bF) = if ((bF == "WAVES"))
252- then wavesBalance(this).available
253- else assetBalance(this, fromBase58String(bF))
275+func bN (ar) = if ((ar == "WAVES"))
276+ then (wavesBalance(this).available + at(ar))
277+ else if ((ar == ba()))
278+ then {
279+ let bf = aO(this, ae())
280+ let bg = aO(this, af())
281+ if (if (if ((bf == "WAVES"))
282+ then (bg == ba())
283+ else false)
284+ then true
285+ else if ((bg == "WAVES"))
286+ then (bf == ba())
287+ else false)
288+ then assetBalance(this, fromBase58String(ar))
289+ else (assetBalance(this, fromBase58String(ar)) + au(ar))
290+ }
291+ else assetBalance(this, fromBase58String(ar))
254292
255293
256-func bG (bH,bI) = fraction(bH, d, bI)
294+func bO (bP,bQ) = fraction(bP, d, bQ)
257295
258296
259-func bJ (bH,bI,L) = fraction(bH, d, bI, L)
297+func bR (bP,bQ,L) = fraction(bP, d, bQ, L)
260298
261299
262-func bK (bL,bM,bN,bO) = {
263- let bP = D(bN, bL)
264- let bQ = D(bO, bM)
265- bG(bQ, bP)
300+func bS (bT) = {
301+ let bU = invoke(bT, "getRate", nil, nil)
302+ if ((bU == bU))
303+ then {
304+ let bV = bU
305+ if ($isInstanceOf(bV, "Int"))
306+ then {
307+ let bW = bV
308+ bW
309+ }
310+ else aS("proxy.getRate() unexpected value")
311+ }
312+ else throw("Strict value is not equal to itself.")
266313 }
267314
268315
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]
280- }
281-
282-
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))
316+func bX (ar,bY,bZ,bT) = {
317+ let ca = at(ar)
318+ if ((ca == ca))
319+ then {
320+ let cb = au(bZ)
321+ if ((cb == cb))
355322 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)
323+ let cc = bh(ar)
324+ if ((bY > 0))
325+ then {
326+ let cd = invoke(bT, "deposit", nil, [AttachedPayment(cc, bY)])
327+ if ((cd == cd))
328+ then {
329+ let bV = cd
330+ if ($isInstanceOf(bV, "Int"))
331+ then {
332+ let ce = bV
333+ let cf = (ca + bY)
334+ let cg = (cb + ce)
335+[IntegerEntry(aq(ar), cf), IntegerEntry(as(bZ), cg)]
336+ }
337+ else nil
338+ }
339+ else throw("Strict value is not equal to itself.")
340+ }
341+ else nil
360342 }
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
519343 else throw("Strict value is not equal to itself.")
520344 }
521345 else throw("Strict value is not equal to itself.")
522346 }
523347
524348
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))
349+func ch (ar,bY,bZ,bT,ci) = {
350+ let ca = at(ar)
351+ if ((ca == ca))
572352 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)
353+ let cb = au(bZ)
354+ if ((cb == cb))
355+ then {
356+ let cj = bS(bT)
357+ if ((cj == cj))
358+ then {
359+ let ck = bh(bZ)
360+ let cl = fraction(ci, bY, cj)
361+ if ((cl > 0))
362+ then {
363+ let cm = invoke(bT, "withdraw", nil, [AttachedPayment(ck, cl)])
364+ if ((cm == cm))
365+ then {
366+ let bV = cm
367+ if ($isInstanceOf(bV, "Int"))
368+ then {
369+ let cn = bV
370+ let cf = (ca - cn)
371+ let cg = (cb - cl)
372+[IntegerEntry(aq(ar), cf), IntegerEntry(as(bZ), cg)]
373+ }
374+ else nil
375+ }
376+ else throw("Strict value is not equal to itself.")
377+ }
378+ else nil
379+ }
380+ else throw("Strict value is not equal to itself.")
381+ }
382+ else throw("Strict value is not equal to itself.")
590383 }
591384 else throw("Strict value is not equal to itself.")
592385 }
593386
594387
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))
388+func co (ar) = invoke(aV, "getPoolLeaseConfigREADONLY", [toString(this), ar], nil)
389+
390+
391+func cp (cq,ar,bZ,cr,bT,ci) = {
392+ let ca = at(ar)
393+ if ((ca == ca))
604394 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)
395+ let cb = au(bZ)
396+ if ((cb == cb))
397+ then {
398+ let cs = {
399+ let bV = bh(ar)
400+ if ($isInstanceOf(bV, "ByteVector"))
401+ then {
402+ let ct = bV
403+ assetBalance(this, ct)
404+ }
405+ else if ($isInstanceOf(bV, "Unit"))
406+ then {
407+ let cu = bV
408+ wavesBalance(this).available
409+ }
410+ else throw("Match error")
411+ }
412+ if ((cs == cs))
413+ then {
414+ let cv = max([0, ((cs + ca) - cr)])
415+ let cw = fraction(cq, cv, 100)
416+ let cx = (ca - cw)
417+ if ((cx == 0))
418+ then nil
419+ else if ((0 > cx))
420+ then {
421+ let cy = -(cx)
422+ bX(ar, cy, bZ, bT)
423+ }
424+ else {
425+ let cz = cx
426+ ch(ar, cz, bZ, bT, ci)
427+ }
428+ }
429+ else throw("Strict value is not equal to itself.")
430+ }
431+ else throw("Strict value is not equal to itself.")
647432 }
648433 else throw("Strict value is not equal to itself.")
649434 }
650435
651436
652-func eZ () = {
653- let dW = getString(U())
654- if ($isInstanceOf(dW, "String"))
437+func cA (ar) = {
438+ let bV = co(ar)
439+ if ($isInstanceOf(bV, "(Boolean, Int, Int, String, String, Int, String)"))
655440 then {
656- let fa = dW
657- fromBase58String(fa)
441+ let cB = bV
442+ let cC = cB
443+ let cD = cC._1
444+ let cE = cC._2
445+ let cr = cC._3
446+ let cF = cC._4
447+ let cG = cC._5
448+ let ci = cC._6
449+ let cH = cC._7
450+ if (cD)
451+ then cp(cE, ar, cG, cr, addressFromStringValue(cF), ci)
452+ else nil
658453 }
659- else if ($isInstanceOf(dW, "Unit"))
454+ else aS((("[" + ar) + "] Rebalance error"))
455+ }
456+
457+
458+func cI (cJ,cK,cL,cM) = {
459+ let cN = D(cL, cJ)
460+ let cO = D(cM, cK)
461+ bO(cO, cN)
462+ }
463+
464+
465+func cP (cL,cM,cQ) = {
466+ let cR = be()
467+ let cS = parseIntValue(cR[t])
468+ let cT = parseIntValue(cR[u])
469+ let cU = cI(cS, cT, cL, cM)
470+ let bQ = D(cL, cS)
471+ let bP = D(cM, cT)
472+ let cV = D(cQ, b)
473+ let cW = bO(bQ, cV)
474+ let cX = bO(bP, cV)
475+[cU, cW, cX]
476+ }
477+
478+
479+func cY (cL,cM,cQ) = {
480+ let cZ = cP(cL, cM, cQ)
481+[H(cZ[0], b), H(cZ[1], b), H(cZ[2], b)]
482+ }
483+
484+
485+func da (db,dc,dd,ab) = {
486+ let cR = be()
487+ let de = cR[q]
488+ let df = cR[r]
489+ let dg = cR[s]
490+ let cJ = parseIntValue(cR[t])
491+ let cK = parseIntValue(cR[u])
492+ let dh = cR[p]
493+ let di = valueOrErrorMessage(assetInfo(fromBase58String(de)), (("Asset " + de) + " doesn't exist")).quantity
494+ if ((de != dc))
495+ then throw("Invalid asset passed.")
496+ else {
497+ let dj = bN(df)
498+ let dk = D(dj, cJ)
499+ let dl = bN(dg)
500+ let dm = D(dl, cK)
501+ let dn = bO(dm, dk)
502+ let do = H(dn, b)
503+ let dp = D(dd, b)
504+ let dq = D(di, b)
505+ let dr = fraction(dk, dp, dq)
506+ let ds = fraction(dm, dp, dq)
507+ let dt = K(dr, cJ, FLOOR)
508+ let du = K(ds, cK, FLOOR)
509+ let dv = if ((db == ""))
510+ then nil
511+ else [ScriptTransfer(ab, dt, if ((df == "WAVES"))
512+ then unit
513+ else fromBase58String(df)), ScriptTransfer(ab, du, if ((dg == "WAVES"))
514+ then unit
515+ else fromBase58String(dg)), StringEntry(ad(toString(ab), db), bJ(dt, du, dd, do, height, lastBlock.timestamp)), IntegerEntry(W(), do), IntegerEntry(X(height, lastBlock.timestamp), do)]
516+ $Tuple10(dt, du, df, dg, dj, dl, di, dn, dh, dv)
517+ }
518+ }
519+
520+
521+func dw (db,dx,dy,dz,dA,dB,ab,dC,dD) = {
522+ let cR = be()
523+ let de = fromBase58String(cR[q])
524+ let dE = cR[r]
525+ let dF = cR[s]
526+ let dG = cR[v]
527+ let dH = cR[w]
528+ let cS = parseIntValue(cR[t])
529+ let cT = parseIntValue(cR[u])
530+ let dh = cR[p]
531+ let di = valueOrErrorMessage(assetInfo(de), (("Asset " + toBase58String(de)) + " doesn't exist")).quantity
532+ let dI = toBase58String(valueOrElse(dz, fromBase58String("WAVES")))
533+ let dJ = toBase58String(valueOrElse(dB, fromBase58String("WAVES")))
534+ if (if ((dE != dI))
535+ then true
536+ else (dF != dJ))
537+ then throw("Invalid amt or price asset passed.")
538+ else {
539+ let dj = if (dC)
540+ then bN(dE)
541+ else (bN(dE) - dy)
542+ let dl = if (dC)
543+ then bN(dF)
544+ else (bN(dF) - dA)
545+ let dK = D(dy, cS)
546+ let dL = D(dA, cT)
547+ let dM = bO(dL, dK)
548+ let dk = D(dj, cS)
549+ let dm = D(dl, cT)
550+ let dN = if ((di == 0))
551+ then {
552+ let dn = e
553+ let dO = e
554+ let cV = pow((dK * dL), 0, toBigInt(5), 1, 0, DOWN)
555+ $Tuple5(H(cV, b), H(dK, cS), H(dL, cT), bO((dm + dL), (dk + dK)), dO)
556+ }
557+ else {
558+ let dn = bO(dm, dk)
559+ let dO = fraction(R((dn - dM)), d, dn)
560+ let dP = D(dx, b)
561+ if (if ((dn != e))
562+ then (dO > dP)
563+ else false)
564+ then throw(((("Price slippage " + toString(dO)) + " exceeded the passed limit of ") + toString(dP)))
565+ else {
566+ let dq = D(di, b)
567+ let dQ = fraction(dK, bR(dm, dk, CEILING), d, CEILING)
568+ let dR = fraction(dL, d, bR(dm, dk, FLOOR), CEILING)
569+ let dS = if ((dQ > dL))
570+ then $Tuple2(dR, dL)
571+ else $Tuple2(dK, dQ)
572+ let dT = dS._1
573+ let dU = dS._2
574+ let cV = fraction(dq, dU, dm, FLOOR)
575+ $Tuple5(K(cV, b, FLOOR), K(dT, cS, CEILING), K(dU, cT, CEILING), dn, dO)
576+ }
577+ }
578+ let dV = dN._1
579+ let dW = dN._2
580+ let dX = dN._3
581+ let do = H(dN._4, b)
582+ let dY = H(dN._5, b)
583+ if ((0 >= dV))
584+ then throw("Invalid calculations. LP calculated is less than zero.")
585+ else {
586+ let dZ = if (!(dD))
587+ then 0
588+ else dV
589+ let ea = (dy - dW)
590+ let eb = (dA - dX)
591+ let ec = [IntegerEntry(W(), do), IntegerEntry(X(height, lastBlock.timestamp), do), StringEntry(aa(ab, db), by(dW, dX, dZ, do, dx, dY, height, lastBlock.timestamp, ea, eb))]
592+ $Tuple13(dV, dZ, do, dj, dl, di, de, dh, ec, ea, eb, dz, dB)
593+ }
594+ }
595+ }
596+
597+
598+func ed (ee,ef,di) = {
599+ let eg = G(ee, toBigInt(bt))
600+ let eh = G(ef, toBigInt(bu))
601+ let ei = fraction(pow((eg * eh), 0, toBigInt(5), 1, 18, DOWN), g, di)
602+ if ((di == f))
603+ then f
604+ else ei
605+ }
606+
607+
608+func ej (ek,el,em) = {
609+ let en = (toBigInt(bN(bj(br))) - ek)
610+ let eo = (toBigInt(bN(bj(bs))) - el)
611+ let ep = (toBigInt(value(assetInfo(bq)).quantity) - em)
612+ let eq = ed(en, eo, ep)
613+ eq
614+ }
615+
616+
617+func er (es,et,em) = {
618+ let en = (bN(bj(br)) + es)
619+ let eo = (bN(bj(bs)) + et)
620+ let ep = (value(assetInfo(bq)).quantity + em)
621+ let ei = ed(toBigInt(en), toBigInt(eo), toBigInt(ep))
622+ let eu = [IntegerEntry(ak, height), StringEntry(aj, toString(ei))]
623+ $Tuple2(eu, ei)
624+ }
625+
626+
627+func ev (ew,ei) = if ((ei >= ew))
628+ then true
629+ else aS(makeString(["updated KLp lower than current KLp", toString(ew), toString(ei)], " "))
630+
631+
632+func ex (ey) = {
633+ let en = bN(bj(br))
634+ let eo = bN(bj(bs))
635+ let ez = ey.amount
636+ let eA = fraction(ey.amount, ey.price, b, FLOOR)
637+ let eB = if ((ey.orderType == Buy))
638+ then $Tuple2(ez, -(eA))
639+ else $Tuple2(-(ez), eA)
640+ let es = eB._1
641+ let et = eB._2
642+ if (if (if (bc())
643+ then true
644+ else (bp == m))
645+ then true
646+ else (bp == n))
647+ then throw("Exchange operations disabled")
648+ else if (if ((ey.assetPair.amountAsset != br))
649+ then true
650+ else (ey.assetPair.priceAsset != bs))
651+ then throw("Wrong order assets.")
652+ else {
653+ let eC = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp"))
654+ let eD = er(es, et, 0)
655+ let eE = eD._1
656+ let eF = eD._2
657+ let eG = (eF >= eC)
658+ let eH = makeString(["kLp=", toString(eC), " kLpNew=", toString(eF), " amountAssetBalance=", toString(en), " priceAssetBalance=", toString(eo), " amountAssetBalanceDelta=", toString(es), " priceAssetBalanceDelta=", toString(et), " height=", toString(height)], "")
659+ $Tuple2(eG, eH)
660+ }
661+ }
662+
663+
664+func eI (eJ) = if ((size(eJ.payments) != 1))
665+ then throw("exactly 1 payment is expected")
666+ else {
667+ let eK = value(eJ.payments[0])
668+ let dc = value(eK.assetId)
669+ let eL = eK.amount
670+ let dN = da(toBase58String(eJ.transactionId), toBase58String(dc), eL, eJ.caller)
671+ let dt = dN._1
672+ let du = dN._2
673+ let dh = parseIntValue(dN._9)
674+ let dv = dN._10
675+ if (if (bc())
676+ then true
677+ else (dh == n))
678+ then throw(("Get operation is blocked by admin. Status = " + toString(dh)))
679+ else $Tuple5(dt, du, eL, dc, dv)
680+ }
681+
682+
683+func eM (eJ,dx,dD) = if ((size(eJ.payments) != 2))
684+ then throw("exactly 2 payments are expected")
685+ else {
686+ let eN = value(eJ.payments[0])
687+ let eO = value(eJ.payments[1])
688+ let eP = dw(toBase58String(eJ.transactionId), dx, eN.amount, eN.assetId, eO.amount, eO.assetId, toString(eJ.caller), false, dD)
689+ let dh = parseIntValue(eP._8)
690+ if (if (if (bc())
691+ then true
692+ else (dh == l))
693+ then true
694+ else (dh == n))
695+ then throw(("Put operation is blocked by admin. Status = " + toString(dh)))
696+ else eP
697+ }
698+
699+
700+func eQ (bY) = {
701+ let eR = invoke(aV, "emit", [bY], nil)
702+ if ((eR == eR))
703+ then {
704+ let eS = {
705+ let bV = eR
706+ if ($isInstanceOf(bV, "Address"))
707+ then {
708+ let eT = bV
709+ invoke(eT, "emit", [bY], nil)
710+ }
711+ else unit
712+ }
713+ if ((eS == eS))
714+ then bY
715+ else throw("Strict value is not equal to itself.")
716+ }
717+ else throw("Strict value is not equal to itself.")
718+ }
719+
720+
721+func eU (bY,ai) = {
722+ let eV = if ((ai == 0))
723+ then 0
724+ else fraction(bY, ai, b)
725+ $Tuple2((bY - eV), eV)
726+ }
727+
728+
729+func eW (eX,eY,ab,ac) = {
730+ let eZ = (ac == unit)
731+ let fa = bN(bj(br))
732+ let fb = bN(bj(bs))
733+ let fc = if ((eY == br))
734+ then true
735+ else if ((eY == bs))
736+ then false
737+ else aS("invalid asset")
738+ let fd = if (eZ)
739+ then $Tuple2(fa, fb)
740+ else if (fc)
741+ then $Tuple2((fa - eX), fb)
742+ else $Tuple2(fa, (fb - eX))
743+ let fe = fd._1
744+ let ff = fd._2
745+ let fg = if (fc)
746+ then $Tuple2(eX, 0)
747+ else $Tuple2(0, eX)
748+ let fh = fg._1
749+ let fi = fg._2
750+ let ez = eU(fh, aX)._1
751+ let eA = eU(fi, aX)._1
752+ let fj = eU(eX, aX)
753+ let fk = fj._1
754+ let eV = fj._2
755+ let fl = (fe + ez)
756+ let fm = (ff + eA)
757+ let fn = bO(D(fm, bu), D(fl, bt))
758+ let fo = H(fn, b)
759+ let fp = if (fc)
760+ then fe
761+ else ff
762+ let fq = toBigInt(fp)
763+ let fr = toBigInt(valueOrErrorMessage(assetInfo(bq), (("asset " + toBase58String(bq)) + " doesn't exist")).quantity)
764+ let fs = if ((fr > f))
765+ then true
766+ else aS("initial deposit requires all coins")
767+ if ((fs == fs))
768+ then {
769+ let ft = toBigInt(fk)
770+ let fu = max([0, toInt(((fr * (sqrtBigInt((d + ((ft * d) / fq)), 18, 18, DOWN) - d)) / d))])
771+ let ec = if (eZ)
772+ then nil
773+ else [IntegerEntry(W(), fo), IntegerEntry(X(height, lastBlock.timestamp), fo), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), by(fh, fi, fu, fo, 0, 0, height, lastBlock.timestamp, 0, 0))]
774+ let fv = bO(D(ff, bu), D(fe, bt))
775+ let fw = H(fv, b)
776+ let fx = {
777+ let fy = if (fc)
778+ then $Tuple2(fh, fe)
779+ else $Tuple2(fi, ff)
780+ let bY = fy._1
781+ let fz = fy._2
782+ let fA = toInt(fraction(fr, toBigInt((bY / 2)), toBigInt(fz)))
783+ fraction((fu - fA), b, fA)
784+ }
785+ $Tuple5(fu, ec, eV, fx, fc)
786+ }
787+ else throw("Strict value is not equal to itself.")
788+ }
789+
790+
791+func fB (fC,fk,eY,ab,ac) = {
792+ let eZ = (ac == unit)
793+ let cR = be()
794+ let cS = parseIntValue(cR[t])
795+ let cT = parseIntValue(cR[u])
796+ let fD = [if ((eY == bq))
797+ then true
798+ else aS("invalid lp asset")]
799+ if ((fD == fD))
800+ then {
801+ let fE = if ((fC == br))
802+ then true
803+ else if ((fC == bs))
804+ then false
805+ else aS("invalid asset")
806+ let fF = if (fE)
807+ then toBigInt(bN(bj(br)))
808+ else toBigInt(bN(bj(bs)))
809+ let fG = if (fE)
810+ then cS
811+ else cT
812+ let fH = bN(bj(br))
813+ let fI = bN(bj(bs))
814+ let fJ = if (fE)
815+ then fH
816+ else fI
817+ let fK = toBigInt(fJ)
818+ let fr = toBigInt(valueOrErrorMessage(assetInfo(bq), (("asset " + toBase58String(bq)) + " doesn't exist")).quantity)
819+ let fL = toBigInt(fk)
820+ let fM = max([0, toInt(((fF * (d - pow((d - ((fL * d) / fr)), 18, h, 0, 18, DOWN))) / d))])
821+ let fN = eU(fM, aZ)
822+ let fO = fN._1
823+ let eV = fN._2
824+ let fP = if (fE)
825+ then $Tuple4(fO, 0, (fH - fM), fI)
826+ else $Tuple4(0, fO, fH, (fI - fM))
827+ let fQ = fP._1
828+ let fR = fP._2
829+ let fS = fP._3
830+ let fT = fP._4
831+ let fn = bO(D(fT, bu), D(fS, bt))
832+ let fo = H(fn, b)
833+ let ec = if (eZ)
834+ then nil
835+ else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bJ(fQ, fR, fk, fo, height, lastBlock.timestamp)), IntegerEntry(W(), fo), IntegerEntry(X(height, lastBlock.timestamp), fo)]
836+ let fv = bO(D(fI, bu), D(fH, bt))
837+ let fw = H(fv, b)
838+ let fx = {
839+ let fU = (toInt(fraction(fF, fL, fr)) * 2)
840+ fraction((fO - fU), b, fU)
841+ }
842+ $Tuple5(fO, ec, eV, fx, fE)
843+ }
844+ else throw("Strict value is not equal to itself.")
845+ }
846+
847+
848+func fV () = {
849+ let bV = getString(U())
850+ if ($isInstanceOf(bV, "String"))
851+ then {
852+ let fW = bV
853+ fromBase58String(fW)
854+ }
855+ else if ($isInstanceOf(bV, "Unit"))
660856 then unit
661857 else throw("Match error")
662858 }
663859
664860
665-func fb () = {
666- let dW = getString(V())
667- if ($isInstanceOf(dW, "String"))
861+func fX () = {
862+ let bV = getString(V())
863+ if ($isInstanceOf(bV, "String"))
668864 then {
669- let fa = dW
670- fromBase58String(fa)
865+ let fW = bV
866+ fromBase58String(fW)
671867 }
672- else if ($isInstanceOf(dW, "Unit"))
868+ else if ($isInstanceOf(bV, "Unit"))
673869 then unit
674870 else throw("Match error")
675871 }
676872
677873
678-func fc (dL) = {
679- let dW = eZ()
680- if ($isInstanceOf(dW, "ByteVector"))
874+func fY (eJ) = {
875+ let bV = fV()
876+ if ($isInstanceOf(bV, "ByteVector"))
681877 then {
682- let fd = dW
683- (dL.callerPublicKey == fd)
878+ let fZ = bV
879+ (eJ.callerPublicKey == fZ)
684880 }
685- else if ($isInstanceOf(dW, "Unit"))
686- then (dL.caller == this)
881+ else if ($isInstanceOf(bV, "Unit"))
882+ then (eJ.caller == this)
687883 else throw("Match error")
688884 }
689885
690886
691-func fe (dL) = {
692- let ff = throw("Permission denied")
693- let dW = eZ()
694- if ($isInstanceOf(dW, "ByteVector"))
887+func ga (eJ) = {
888+ let gb = throw("Permission denied")
889+ let bV = fV()
890+ if ($isInstanceOf(bV, "ByteVector"))
695891 then {
696- let fd = dW
697- if ((dL.callerPublicKey == fd))
892+ let fZ = bV
893+ if ((eJ.callerPublicKey == fZ))
698894 then true
699- else ff
895+ else gb
700896 }
701- else if ($isInstanceOf(dW, "Unit"))
702- then if ((dL.caller == this))
897+ else if ($isInstanceOf(bV, "Unit"))
898+ then if ((eJ.caller == this))
703899 then true
704- else ff
900+ else gb
705901 else throw("Match error")
706902 }
707903
708904
709-@Callable(dL)
710-func calculateAmountOutForSwapREADONLY (fg,fh,fi) = {
711- let fj = if ((fh == false))
905+@Callable(eJ)
906+func rebalance () = (cA(ae()) ++ cA(af()))
907+
908+
909+
910+@Callable(eJ)
911+func calculateAmountOutForSwapREADONLY (gc,gd,ge) = {
912+ let gf = if ((gd == false))
712913 then {
713- let fk = aH(this, af())
714- let fl = aH(this, ae())
715- $Tuple2(fk, fl)
914+ let gg = aO(this, af())
915+ let gh = aO(this, ae())
916+ $Tuple2(gg, gh)
716917 }
717918 else {
718- let fk = aH(this, ae())
719- let fl = aH(this, af())
720- $Tuple2(fk, fl)
919+ let gg = aO(this, ae())
920+ let gh = aO(this, af())
921+ $Tuple2(gg, gh)
721922 }
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))
923+ let gg = gf._1
924+ let gh = gf._2
925+ let gi = bN(gh)
926+ let gj = bN(gg)
927+ let gk = fraction(gj, gc, (gi + gc))
928+ let gl = (toBigInt(gi) * toBigInt(gj))
929+ let gm = (((toBigInt(bN(gh)) + toBigInt(gc)) + toBigInt(ge)) * (toBigInt(bN(gg)) - toBigInt(gk)))
930+ let gn = if ((gm >= gl))
730931 then true
731932 else throw("new K is fewer error")
732- if ((fr == fr))
733- then $Tuple2(nil, fo)
933+ if ((gn == gn))
934+ then $Tuple2(nil, gk)
734935 else throw("Strict value is not equal to itself.")
735936 }
736937
737938
738939
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"))
940+@Callable(eJ)
941+func calculateAmountOutForSwapAndSendTokens (gc,gd,go,gp,ge) = {
942+ let gq = {
943+ let aY = invoke(aV, "getSwapContractREADONLY", nil, nil)
944+ if ($isInstanceOf(aY, "String"))
945+ then aY
946+ else throw(($getType(aY) + " couldn't be cast to String"))
746947 }
747- let eH = [if ((value(dL.payments[0]).amount >= fg))
948+ let fD = [if ((value(eJ.payments[0]).amount >= gc))
748949 then true
749- else aL("Wrong amount"), if ((dL.caller == addressFromStringValue(fu)))
950+ else aS("Wrong amount"), if ((eJ.caller == addressFromStringValue(gq)))
750951 then true
751- else aL("Permission denied")]
752- if ((eH == eH))
952+ else aS("Permission denied")]
953+ if ((fD == fD))
753954 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))
955+ let eK = value(eJ.payments[0])
956+ let gh = bj(eK.assetId)
957+ let gg = if ((gd == false))
958+ then aO(this, af())
959+ else aO(this, ae())
960+ let gi = (bN(gh) - value(eJ.payments[0]).amount)
961+ let gj = bN(gg)
962+ let gk = fraction(gj, gc, (gi + gc))
963+ let gl = (toBigInt(gi) * toBigInt(gj))
964+ let gm = ((toBigInt(bN(gh)) + toBigInt(ge)) * (toBigInt(bN(gg)) - toBigInt(gk)))
965+ let gn = if ((gm >= gl))
765966 then true
766967 else throw("new K is fewer error")
767- if ((fr == fr))
968+ if ((gn == gn))
768969 then {
769- let fv = if ((fo >= fs))
970+ let gr = if ((gk >= go))
770971 then true
771972 else throw("Exchange result is fewer coins than expected")
772- if ((fv == fv))
773- then $Tuple2([ScriptTransfer(addressFromStringValue(ft), fo, aY(fk))], fo)
973+ if ((gr == gr))
974+ then {
975+ let gs = {
976+ let bV = co(gg)
977+ if ($isInstanceOf(bV, "(Boolean, Int, Int, String, String, Int, String)"))
978+ then {
979+ let cB = bV
980+ cB
981+ }
982+ else throw("error lease config")
983+ }
984+ let gt = gs
985+ let cD = gt._1
986+ let cE = gt._2
987+ let cr = gt._3
988+ let cF = gt._4
989+ let cG = gt._5
990+ let ci = gt._6
991+ let cH = gt._7
992+ let gu = assetBalance(this, fromBase58String(gg))
993+ let gv = if (if ((gg == "WAVES"))
994+ then (gk > gu)
995+ else false)
996+ then {
997+ let gw = (gk - gu)
998+ let gx = (at(gg) / au(ba()))
999+ let gy = wavesBalance(this).available
1000+ let gz = invoke(this, "withdraw", [gg, gw, ba(), bb(), ci], nil)
1001+ if ((gz == gz))
1002+ then {
1003+ let gA = wavesBalance(this).available
1004+ let gB = (gA - gy)
1005+ (gB - gw)
1006+ }
1007+ else throw("Strict value is not equal to itself.")
1008+ }
1009+ else 0
1010+ let gC = invoke(this, "rebalance", nil, nil)
1011+ if ((gC == gC))
1012+ then $Tuple2([ScriptTransfer(addressFromStringValue(cH), gv, unit), ScriptTransfer(addressFromStringValue(gp), gk, bh(gg))], gk)
1013+ else throw("Strict value is not equal to itself.")
1014+ }
7741015 else throw("Strict value is not equal to itself.")
7751016 }
7761017 else throw("Strict value is not equal to itself.")
7771018 }
7781019 else throw("Strict value is not equal to itself.")
7791020 }
7801021
7811022
7821023
783-@Callable(dL)
784-func setManager (fw) = {
785- let fx = fe(dL)
786- if ((fx == fx))
1024+@Callable(eJ)
1025+func setManager (gD) = {
1026+ let gE = ga(eJ)
1027+ if ((gE == gE))
7871028 then {
788- let fy = fromBase58String(fw)
789- if ((fy == fy))
790- then [StringEntry(V(), fw)]
1029+ let gF = fromBase58String(gD)
1030+ if ((gF == gF))
1031+ then [StringEntry(V(), gD)]
7911032 else throw("Strict value is not equal to itself.")
7921033 }
7931034 else throw("Strict value is not equal to itself.")
7941035 }
7951036
7961037
7971038
798-@Callable(dL)
1039+@Callable(eJ)
7991040 func confirmManager () = {
800- let fz = fb()
801- let fA = if (isDefined(fz))
1041+ let gG = fX()
1042+ let gH = if (isDefined(gG))
8021043 then true
8031044 else throw("No pending manager")
804- if ((fA == fA))
1045+ if ((gH == gH))
8051046 then {
806- let fB = if ((dL.callerPublicKey == value(fz)))
1047+ let gI = if ((eJ.callerPublicKey == value(gG)))
8071048 then true
8081049 else throw("You are not pending manager")
809- if ((fB == fB))
810- then [StringEntry(U(), toBase58String(value(fz))), DeleteEntry(V())]
1050+ if ((gI == gI))
1051+ then [StringEntry(U(), toBase58String(value(gG))), DeleteEntry(V())]
8111052 else throw("Strict value is not equal to itself.")
8121053 }
8131054 else throw("Strict value is not equal to itself.")
8141055 }
8151056
8161057
8171058
818-@Callable(dL)
819-func put (cz,fC) = if ((0 > cz))
1059+@Callable(eJ)
1060+func put (dx,gJ) = if ((0 > dx))
8201061 then throw("Invalid slippageTolerance passed")
8211062 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))
1063+ let eP = eM(eJ, dx, true)
1064+ let dZ = eP._2
1065+ let de = eP._7
1066+ let dv = eP._9
1067+ let ea = eP._10
1068+ let eb = eP._11
1069+ let gK = eP._12
1070+ let gL = eP._13
1071+ let eN = toBigInt(value(eJ.payments[0]).amount)
1072+ let eO = toBigInt(value(eJ.payments[1]).amount)
1073+ let eq = ej(eN, eO, toBigInt(0))
1074+ if ((eq == eq))
8341075 then {
835- let dU = invoke(aO, "emit", [db], nil)
836- if ((dU == dU))
1076+ let eR = invoke(aV, "emit", [dZ], nil)
1077+ if ((eR == eR))
8371078 then {
838- let dV = {
839- let dW = dU
840- if ($isInstanceOf(dW, "Address"))
1079+ let eS = {
1080+ let bV = eR
1081+ if ($isInstanceOf(bV, "Address"))
8411082 then {
842- let dX = dW
843- invoke(dX, "emit", [db], nil)
1083+ let eT = bV
1084+ invoke(eT, "emit", [dZ], nil)
8441085 }
8451086 else unit
8461087 }
847- if ((dV == dV))
1088+ if ((eS == eS))
8481089 then {
849- let fF = if ((dc > 0))
850- then invoke(bo, "put", nil, [AttachedPayment(fD, dc)])
1090+ let gM = if ((ea > 0))
1091+ then invoke(bx, "put", nil, [AttachedPayment(gK, ea)])
8511092 else nil
852- if ((fF == fF))
1093+ if ((gM == gM))
8531094 then {
854- let fG = if ((dd > 0))
855- then invoke(bo, "put", nil, [AttachedPayment(fE, dd)])
1095+ let gN = if ((eb > 0))
1096+ then invoke(bx, "put", nil, [AttachedPayment(gL, eb)])
8561097 else nil
857- if ((fG == fG))
1098+ if ((gN == gN))
8581099 then {
859- let fH = if (fC)
1100+ let gO = if (gJ)
8601101 then {
861- let fI = invoke(bn, "stake", nil, [AttachedPayment(cg, db)])
862- if ((fI == fI))
1102+ let gP = invoke(bw, "stake", nil, [AttachedPayment(de, dZ)])
1103+ if ((gP == gP))
8631104 then nil
8641105 else throw("Strict value is not equal to itself.")
8651106 }
866- else [ScriptTransfer(dL.caller, db, cg)]
867- let fJ = dt(0, 0, 0)
868- if ((fJ == fJ))
1107+ else [ScriptTransfer(eJ.caller, dZ, de)]
1108+ let gQ = er(0, 0, 0)
1109+ if ((gQ == gQ))
8691110 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)
1111+ let ei = gQ._2
1112+ let gR = gQ._1
1113+ let gS = ev(eq, ei)
1114+ if ((gS == gS))
1115+ then ((dv ++ gO) ++ gR)
8751116 else throw("Strict value is not equal to itself.")
8761117 }
8771118 else throw("Strict value is not equal to itself.")
8781119 }
8791120 else throw("Strict value is not equal to itself.")
8801121 }
8811122 else throw("Strict value is not equal to itself.")
8821123 }
8831124 else throw("Strict value is not equal to itself.")
8841125 }
8851126 else throw("Strict value is not equal to itself.")
8861127 }
8871128 else throw("Strict value is not equal to itself.")
8881129 }
8891130
8901131
8911132
892-@Callable(dL)
893-func putForFree (fM) = if ((0 > fM))
1133+@Callable(eJ)
1134+func putForFree (gT) = if ((0 > gT))
8941135 then throw("Invalid value passed")
8951136 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))
1137+ let eP = eM(eJ, gT, false)
1138+ let dv = eP._9
1139+ let eN = toBigInt(value(eJ.payments[0]).amount)
1140+ let eO = toBigInt(value(eJ.payments[1]).amount)
1141+ let eq = ej(eN, eO, toBigInt(0))
1142+ if ((eq == eq))
9021143 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)
1144+ let gU = er(0, 0, 0)
1145+ let gR = gU._1
1146+ let ei = gU._2
1147+ let gS = ev(eq, ei)
1148+ if ((gS == gS))
1149+ then (dv ++ gR)
9091150 else throw("Strict value is not equal to itself.")
9101151 }
9111152 else throw("Strict value is not equal to itself.")
9121153 }
9131154
9141155
9151156
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"))
1157+@Callable(eJ)
1158+func putOneTkn (gV,gW) = {
1159+ let gX = {
1160+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1161+ if ($isInstanceOf(aY, "Boolean"))
1162+ then aY
1163+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
9231164 }
924- let fR = if (if (if (aT())
1165+ let gY = if (if (if (bc())
9251166 then true
926- else (bg == l))
1167+ else (bp == l))
9271168 then true
928- else (bg == n))
1169+ else (bp == n))
9291170 then true
930- else fQ
931- let eH = [if (if (!(fR))
1171+ else gX
1172+ let fD = [if (if (!(gY))
9321173 then true
933- else fc(dL))
1174+ else fY(eJ))
9341175 then true
935- else aL("put operation is blocked by admin"), if ((size(dL.payments) == 1))
1176+ else aS("put operation is blocked by admin"), if ((size(eJ.payments) == 1))
9361177 then true
937- else aL("exactly 1 payment are expected")]
938- if ((eH == eH))
1178+ else aS("exactly 1 payment are expected")]
1179+ if ((fD == fD))
9391180 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))
1181+ let gZ = eJ.payments[0]
1182+ let eY = gZ.assetId
1183+ let eX = gZ.amount
1184+ let eq = if ((eY == br))
1185+ then ej(toBigInt(eX), toBigInt(0), toBigInt(0))
1186+ else if ((eY == bs))
1187+ then ej(toBigInt(0), toBigInt(eX), toBigInt(0))
1188+ else aS("payment asset is not supported")
1189+ if ((eq == eq))
9491190 then {
950- let ab = dL.caller
951- let ac = dL.transactionId
952- let fT = ea(eb, ec, ab, ac)
953- if ((fT == fT))
1191+ let ab = eJ.caller
1192+ let ac = eJ.transactionId
1193+ let ha = eW(eX, eY, ab, ac)
1194+ if ((ha == ha))
9541195 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)
1196+ let fc = ha._5
1197+ let hb = ha._4
1198+ let eV = ha._3
1199+ let ec = ha._2
1200+ let hc = ha._1
1201+ let hd = if (if ((gV > 0))
1202+ then (gV > hc)
9621203 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))
1204+ then aS(makeString(["amount to receive is less than ", toString(gV)], ""))
1205+ else hc
1206+ let eR = eQ(hd)
1207+ if ((eR == eR))
9671208 then {
968- let fH = if (fP)
1209+ let gO = if (gW)
9691210 then {
970- let fX = invoke(bn, "stake", nil, [AttachedPayment(bh, fW)])
971- if ((fX == fX))
1211+ let he = invoke(bw, "stake", nil, [AttachedPayment(bq, hd)])
1212+ if ((he == he))
9721213 then nil
9731214 else throw("Strict value is not equal to itself.")
9741215 }
975- else [ScriptTransfer(dL.caller, fW, bh)]
976- let fY = if ((dZ > 0))
977- then [ScriptTransfer(aP, dZ, ec)]
1216+ else [ScriptTransfer(eJ.caller, hd, bq)]
1217+ let hf = if ((eV > 0))
1218+ then [ScriptTransfer(aW, eV, eY)]
9781219 else nil
979- let fZ = if ((this == aP))
1220+ let hg = if ((this == aW))
9801221 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))
1222+ else if (fc)
1223+ then $Tuple2(-(eV), 0)
1224+ else $Tuple2(0, -(eV))
1225+ let es = hg._1
1226+ let et = hg._2
1227+ let hh = er(es, et, 0)
1228+ let gR = hh._1
1229+ let ei = hh._2
1230+ let eC = value(getString(aj))
1231+ let gS = ev(eq, ei)
1232+ if ((gS == gS))
11581233 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)
1234+ let gC = invoke(this, "rebalance", nil, nil)
1235+ if ((gC == gC))
1236+ then $Tuple2((((ec ++ gO) ++ hf) ++ gR), hd)
11791237 else throw("Strict value is not equal to itself.")
11801238 }
11811239 else throw("Strict value is not equal to itself.")
11821240 }
11831241 else throw("Strict value is not equal to itself.")
11841242 }
11851243 else throw("Strict value is not equal to itself.")
11861244 }
11871245 else throw("Strict value is not equal to itself.")
11881246 }
11891247 else throw("Strict value is not equal to itself.")
11901248 }
11911249
11921250
11931251
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))
1204- then {
1205- let gs = invoke(aO, "burn", [dN], [AttachedPayment(ce, dN)])
1206- if ((gs == gs))
1207- 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)
1214- else throw("Strict value is not equal to itself.")
1215- }
1216- else throw("Strict value is not equal to itself.")
1217- }
1218- else throw("Strict value is not equal to itself.")
1252+@Callable(eJ)
1253+func putOneTknREADONLY (eY,eX) = {
1254+ let hi = eW(eX, bh(eY), unit, unit)
1255+ let hc = hi._1
1256+ let ec = hi._2
1257+ let eV = hi._3
1258+ let hb = hi._4
1259+ let fc = hi._5
1260+ $Tuple2(nil, $Tuple3(hc, eV, hb))
12191261 }
12201262
12211263
12221264
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.")
1265+@Callable(eJ)
1266+func getOneTkn (hj,gV) = {
1267+ let gX = {
1268+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1269+ if ($isInstanceOf(aY, "Boolean"))
1270+ then aY
1271+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
1272+ }
1273+ let hk = if (if (bc())
1274+ then true
1275+ else (bp == n))
1276+ then true
1277+ else gX
1278+ let fD = [if (if (!(hk))
1279+ then true
1280+ else fY(eJ))
1281+ then true
1282+ else aS("get operation is blocked by admin"), if ((size(eJ.payments) == 1))
1283+ then true
1284+ else aS("exactly 1 payment are expected")]
1285+ if ((fD == fD))
1286+ then {
1287+ let fC = bh(hj)
1288+ let gZ = eJ.payments[0]
1289+ let eY = gZ.assetId
1290+ let fk = gZ.amount
1291+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1292+ if ((eq == eq))
1293+ then {
1294+ let ab = eJ.caller
1295+ let ac = eJ.transactionId
1296+ let hl = fB(fC, fk, eY, ab, ac)
1297+ if ((hl == hl))
1298+ then {
1299+ let fE = hl._5
1300+ let hb = hl._4
1301+ let eV = hl._3
1302+ let ec = hl._2
1303+ let hm = hl._1
1304+ let bY = if (if ((gV > 0))
1305+ then (gV > hm)
1306+ else false)
1307+ then aS(makeString(["amount to receive is less than ", toString(gV)], ""))
1308+ else hm
1309+ let gs = {
1310+ let bV = co(hj)
1311+ if ($isInstanceOf(bV, "(Boolean, Int, Int, String, String, Int, String)"))
1312+ then {
1313+ let cB = bV
1314+ cB
1315+ }
1316+ else throw("error lease config")
12491317 }
1250- else throw("Strict value is not equal to itself.")
1251- }
1252- else throw("Strict value is not equal to itself.")
1253- }
1254- }
1255-
1256-
1257-
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))
1264- 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))
1269- then {
1270- let gn = invoke(bn, "unstake", [toBase58String(cg), dT], nil)
1271- if ((gn == gn))
1272- 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))
1318+ let hn = gs
1319+ let cD = hn._1
1320+ let cE = hn._2
1321+ let cr = hn._3
1322+ let cF = hn._4
1323+ let cG = hn._5
1324+ let ci = hn._6
1325+ let cH = hn._7
1326+ let gu = assetBalance(this, fromBase58String(hj))
1327+ let gv = if (if ((hj == "WAVES"))
1328+ then (bY > gu)
1329+ else false)
12841330 then {
1285- let gs = invoke(aO, "burn", [dT], [AttachedPayment(cg, dT)])
1286- if ((gs == gs))
1331+ let gw = (bY - gu)
1332+ let gx = (at(hj) / au(ba()))
1333+ let gy = wavesBalance(this).available
1334+ let gz = invoke(this, "withdraw", [hj, gw, ba(), bb(), ci], nil)
1335+ if ((gz == gz))
12871336 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)
1337+ let gA = wavesBalance(this).available
1338+ let gB = (gA - gy)
1339+ (gB - gw)
1340+ }
1341+ else throw("Strict value is not equal to itself.")
1342+ }
1343+ else 0
1344+ let ho = [ScriptTransfer(addressFromStringValue(cH), gv, unit)]
1345+ let hp = invoke(aV, "burn", [fk], [AttachedPayment(eY, fk)])
1346+ if ((hp == hp))
1347+ then {
1348+ let hq = [ScriptTransfer(ab, bY, fC)]
1349+ let hf = if ((eV > 0))
1350+ then [ScriptTransfer(aW, eV, fC)]
1351+ else nil
1352+ let hr = {
1353+ let hs = if ((this == aW))
1354+ then 0
1355+ else eV
1356+ if (fE)
1357+ then $Tuple2(-((bY + hs)), 0)
1358+ else $Tuple2(0, -((bY + hs)))
1359+ }
1360+ let es = hr._1
1361+ let et = hr._2
1362+ let ht = er(es, et, 0)
1363+ let gR = ht._1
1364+ let ei = ht._2
1365+ let gS = ev(eq, ei)
1366+ if ((gS == gS))
1367+ then {
1368+ let gC = invoke(this, "rebalance", nil, nil)
1369+ if ((gC == gC))
1370+ then $Tuple2(((((ec ++ hq) ++ ho) ++ hf) ++ gR), bY)
12941371 else throw("Strict value is not equal to itself.")
12951372 }
12961373 else throw("Strict value is not equal to itself.")
12971374 }
12981375 else throw("Strict value is not equal to itself.")
12991376 }
13001377 else throw("Strict value is not equal to itself.")
13011378 }
13021379 else throw("Strict value is not equal to itself.")
13031380 }
13041381 else throw("Strict value is not equal to itself.")
13051382 }
13061383
13071384
13081385
1309-@Callable(dL)
1310-func unstakeAndGetNoLess (gm,gA,gv) = {
1311- let gd = if (aT())
1386+@Callable(eJ)
1387+func getOneTknREADONLY (fC,fk) = {
1388+ let hu = fB(bh(fC), fk, bq, unit, unit)
1389+ let hm = hu._1
1390+ let ec = hu._2
1391+ let eV = hu._3
1392+ let hb = hu._4
1393+ let fE = hu._5
1394+ $Tuple2(nil, $Tuple3(hm, eV, hb))
1395+ }
1396+
1397+
1398+
1399+@Callable(eJ)
1400+func unstakeAndGetOneTkn (hv,hj,gV) = {
1401+ let gX = {
1402+ let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1403+ if ($isInstanceOf(aY, "Boolean"))
1404+ then aY
1405+ else throw(($getType(aY) + " couldn't be cast to Boolean"))
1406+ }
1407+ let hk = if (if (bc())
13121408 then true
1313- else (bg == n)
1314- let eH = [if (!(gd))
1409+ else (bp == n))
13151410 then true
1316- else throw("get operation is blocked by admin"), if ((size(dL.payments) == 0))
1411+ else gX
1412+ let fD = [if (if (!(hk))
13171413 then true
1318- else throw("no payments are expected")]
1319- if ((eH == eH))
1414+ else fY(eJ))
1415+ then true
1416+ else aS("get operation is blocked by admin"), if ((size(eJ.payments) == 0))
1417+ then true
1418+ else aS("no payments are expected")]
1419+ if ((fD == fD))
13201420 then {
1321- let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1322- if ((ds == ds))
1421+ let fC = bh(hj)
1422+ let ab = eJ.caller
1423+ let ac = eJ.transactionId
1424+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1425+ if ((eq == eq))
13231426 then {
1324- let gn = invoke(bn, "unstake", [toBase58String(bh), gm], nil)
1325- if ((gn == gn))
1427+ let hw = invoke(bw, "unstake", [toBase58String(bq), hv], nil)
1428+ if ((hw == hw))
13261429 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))
1332- 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))
1430+ let hx = fB(fC, hv, bq, ab, ac)
1431+ if ((hx == hx))
13371432 then {
1338- let gs = invoke(aO, "burn", [gm], [AttachedPayment(bh, gm)])
1339- if ((gs == gs))
1433+ let fE = hx._5
1434+ let hb = hx._4
1435+ let eV = hx._3
1436+ let ec = hx._2
1437+ let hm = hx._1
1438+ let bY = if (if ((gV > 0))
1439+ then (gV > hm)
1440+ else false)
1441+ then aS(makeString(["amount to receive is less than ", toString(gV)], ""))
1442+ else hm
1443+ let hp = invoke(aV, "burn", [hv], [AttachedPayment(bq, hv)])
1444+ if ((hp == hp))
13401445 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)
1446+ let hq = [ScriptTransfer(eJ.caller, bY, fC)]
1447+ let hf = if ((eV > 0))
1448+ then [ScriptTransfer(aW, eV, fC)]
1449+ else nil
1450+ let hy = {
1451+ let hs = if ((this == aW))
1452+ then 0
1453+ else eV
1454+ if (fE)
1455+ then $Tuple2(-((bY + hs)), 0)
1456+ else $Tuple2(0, -((bY + hs)))
1457+ }
1458+ let es = hy._1
1459+ let et = hy._2
1460+ let hz = er(es, et, 0)
1461+ let gR = hz._1
1462+ let ei = hz._2
1463+ let gS = ev(eq, ei)
1464+ if ((gS == gS))
1465+ then $Tuple2((((ec ++ hq) ++ hf) ++ gR), bY)
13471466 else throw("Strict value is not equal to itself.")
13481467 }
13491468 else throw("Strict value is not equal to itself.")
13501469 }
13511470 else throw("Strict value is not equal to itself.")
13521471 }
13531472 else throw("Strict value is not equal to itself.")
13541473 }
13551474 else throw("Strict value is not equal to itself.")
13561475 }
13571476 else throw("Strict value is not equal to itself.")
13581477 }
13591478
13601479
13611480
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))
1481+@Callable(eJ)
1482+func get () = {
1483+ let dN = eI(eJ)
1484+ let hA = dN._1
1485+ let du = dN._2
1486+ let eL = dN._3
1487+ let dc = dN._4
1488+ let dv = dN._5
1489+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1490+ if ((eq == eq))
13761491 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))
1492+ let hB = invoke(aV, "burn", [eL], [AttachedPayment(dc, eL)])
1493+ if ((hB == hB))
1494+ then {
1495+ let hC = er(-(hA), -(du), 0)
1496+ let gR = hC._1
1497+ let ei = hC._2
1498+ let gS = ev(eq, ei)
1499+ if ((gS == gS))
1500+ then (dv ++ gR)
1501+ else throw("Strict value is not equal to itself.")
1502+ }
1503+ else throw("Strict value is not equal to itself.")
13851504 }
13861505 else throw("Strict value is not equal to itself.")
13871506 }
13881507
13891508
13901509
1391-@Callable(dL)
1392-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aV())
1393-
1394-
1395-
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])])
1510+@Callable(eJ)
1511+func getNoLess (hD,hE) = {
1512+ let dN = eI(eJ)
1513+ let dt = dN._1
1514+ let du = dN._2
1515+ let eL = dN._3
1516+ let dc = dN._4
1517+ let dv = dN._5
1518+ if ((hD > dt))
1519+ then throw(((("noLessThenAmtAsset failed: " + toString(dt)) + " < ") + toString(hD)))
1520+ else if ((hE > du))
1521+ then throw(((("noLessThenPriceAsset failed: " + toString(du)) + " < ") + toString(hE)))
1522+ else {
1523+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1524+ if ((eq == eq))
1525+ then {
1526+ let hB = invoke(aV, "burn", [eL], [AttachedPayment(dc, eL)])
1527+ if ((hB == hB))
1528+ then {
1529+ let hF = er(-(dt), -(du), 0)
1530+ let gR = hF._1
1531+ let ei = hF._2
1532+ let gS = ev(eq, ei)
1533+ if ((gS == gS))
1534+ then (dv ++ gR)
1535+ else throw("Strict value is not equal to itself.")
1536+ }
1537+ else throw("Strict value is not equal to itself.")
1538+ }
1539+ else throw("Strict value is not equal to itself.")
1540+ }
14051541 }
14061542
14071543
14081544
1409-@Callable(dL)
1545+@Callable(eJ)
1546+func unstakeAndGet (bY) = {
1547+ let hG = if ((size(eJ.payments) != 0))
1548+ then throw("No payments are expected")
1549+ else true
1550+ if ((hG == hG))
1551+ then {
1552+ let cR = be()
1553+ let de = fromBase58String(cR[q])
1554+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1555+ if ((eq == eq))
1556+ then {
1557+ let hw = invoke(bw, "unstake", [toBase58String(de), bY], nil)
1558+ if ((hw == hw))
1559+ then {
1560+ let dN = da(toBase58String(eJ.transactionId), toBase58String(de), bY, eJ.caller)
1561+ let dt = dN._1
1562+ let du = dN._2
1563+ let dh = parseIntValue(dN._9)
1564+ let dv = dN._10
1565+ let hH = if (if (bc())
1566+ then true
1567+ else (dh == n))
1568+ then throw(("Get operation is blocked by admin. Status = " + toString(dh)))
1569+ else true
1570+ if ((hH == hH))
1571+ then {
1572+ let hB = invoke(aV, "burn", [bY], [AttachedPayment(de, bY)])
1573+ if ((hB == hB))
1574+ then {
1575+ let hI = er(-(dt), -(du), 0)
1576+ let gR = hI._1
1577+ let ei = hI._2
1578+ let gS = ev(eq, ei)
1579+ if ((gS == gS))
1580+ then (dv ++ gR)
1581+ else throw("Strict value is not equal to itself.")
1582+ }
1583+ else throw("Strict value is not equal to itself.")
1584+ }
1585+ else throw("Strict value is not equal to itself.")
1586+ }
1587+ else throw("Strict value is not equal to itself.")
1588+ }
1589+ else throw("Strict value is not equal to itself.")
1590+ }
1591+ else throw("Strict value is not equal to itself.")
1592+ }
1593+
1594+
1595+
1596+@Callable(eJ)
1597+func unstakeAndGetNoLess (hv,hJ,hE) = {
1598+ let hk = if (bc())
1599+ then true
1600+ else (bp == n)
1601+ let fD = [if (!(hk))
1602+ then true
1603+ else throw("get operation is blocked by admin"), if ((size(eJ.payments) == 0))
1604+ then true
1605+ else throw("no payments are expected")]
1606+ if ((fD == fD))
1607+ then {
1608+ let eq = ej(toBigInt(0), toBigInt(0), toBigInt(0))
1609+ if ((eq == eq))
1610+ then {
1611+ let hw = invoke(bw, "unstake", [toBase58String(bq), hv], nil)
1612+ if ((hw == hw))
1613+ then {
1614+ let dN = da(toBase58String(eJ.transactionId), toBase58String(bq), hv, eJ.caller)
1615+ let dt = dN._1
1616+ let du = dN._2
1617+ let dv = dN._10
1618+ let hK = [if ((dt >= hJ))
1619+ then true
1620+ else throw(makeString(["amount asset amount to receive is less than ", toString(hJ)], "")), if ((du >= hE))
1621+ then true
1622+ else throw(makeString(["price asset amount to receive is less than ", toString(hE)], ""))]
1623+ if ((hK == hK))
1624+ then {
1625+ let hB = invoke(aV, "burn", [hv], [AttachedPayment(bq, hv)])
1626+ if ((hB == hB))
1627+ then {
1628+ let hL = er(-(dt), -(du), 0)
1629+ let gR = hL._1
1630+ let ei = hL._2
1631+ let gS = ev(eq, ei)
1632+ if ((gS == gS))
1633+ then (dv ++ gR)
1634+ else throw("Strict value is not equal to itself.")
1635+ }
1636+ else throw("Strict value is not equal to itself.")
1637+ }
1638+ else throw("Strict value is not equal to itself.")
1639+ }
1640+ else throw("Strict value is not equal to itself.")
1641+ }
1642+ else throw("Strict value is not equal to itself.")
1643+ }
1644+ else throw("Strict value is not equal to itself.")
1645+ }
1646+
1647+
1648+
1649+@Callable(eJ)
1650+func activate (hM,hN) = if ((toString(eJ.caller) != toString(aV)))
1651+ then throw("permissions denied")
1652+ else $Tuple2([StringEntry(ae(), hM), StringEntry(af(), hN)], "success")
1653+
1654+
1655+
1656+@Callable(eJ)
1657+func refreshKLp () = {
1658+ let hO = valueOrElse(getInteger(ak), 0)
1659+ let hP = if (((height - hO) >= an))
1660+ then unit
1661+ else aS(makeString([toString(an), " blocks have not passed since the previous call"], ""))
1662+ if ((hP == hP))
1663+ then {
1664+ let eC = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp"))
1665+ let hQ = er(0, 0, 0)
1666+ let hR = hQ._1
1667+ let ei = hQ._2
1668+ let eu = if ((eC != ei))
1669+ then hR
1670+ else aS("nothing to refresh")
1671+ $Tuple2(eu, toString(ei))
1672+ }
1673+ else throw("Strict value is not equal to itself.")
1674+ }
1675+
1676+
1677+
1678+@Callable(eJ)
1679+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, be())
1680+
1681+
1682+
1683+@Callable(eJ)
1684+func getAccBalanceWrapperREADONLY (ar) = $Tuple2(nil, bN(ar))
1685+
1686+
1687+
1688+@Callable(eJ)
1689+func calcPricesWrapperREADONLY (cL,cM,cQ) = {
1690+ let cZ = cP(cL, cM, cQ)
1691+ $Tuple2(nil, [toString(cZ[0]), toString(cZ[1]), toString(cZ[2])])
1692+ }
1693+
1694+
1695+
1696+@Callable(eJ)
14101697 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
14111698
14121699
14131700
1414-@Callable(dL)
1701+@Callable(eJ)
14151702 func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J))
14161703
14171704
14181705
1419-@Callable(dL)
1420-func calcPriceBigIntWrapperREADONLY (bH,bI) = $Tuple2(nil, toString(bG(parseBigIntValue(bH), parseBigIntValue(bI))))
1706+@Callable(eJ)
1707+func calcPriceBigIntWrapperREADONLY (bP,bQ) = $Tuple2(nil, toString(bO(parseBigIntValue(bP), parseBigIntValue(bQ))))
14211708
14221709
14231710
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))
1711+@Callable(eJ)
1712+func estimatePutOperationWrapperREADONLY (db,dx,dy,dz,dA,dB,ab,dC,dD) = $Tuple2(nil, dw(db, dx, dy, dz, dA, dB, ab, dC, dD))
14261713
14271714
14281715
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))
1716+@Callable(eJ)
1717+func estimateGetOperationWrapperREADONLY (db,dc,dd,ab) = {
1718+ let dN = da(db, dc, dd, addressFromStringValue(ab))
1719+ $Tuple2(nil, $Tuple10(dN._1, dN._2, dN._3, dN._4, dN._5, dN._6, dN._7, toString(dN._8), dN._9, dN._10))
14331720 }
14341721
14351722
14361723
1437-@Callable(dL)
1724+@Callable(eJ)
14381725 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))
1726+ let cR = be()
1727+ let de = fromBase58String(cR[q])
1728+ let hS = cR[r]
1729+ let hT = cR[s]
1730+ let dG = cR[v]
1731+ let dH = cR[w]
1732+ let cS = parseIntValue(cR[t])
1733+ let cT = parseIntValue(cR[u])
1734+ let hU = valueOrErrorMessage(assetInfo(de), (("Asset " + toBase58String(de)) + " doesn't exist")).quantity
1735+ let hV = bN(hS)
1736+ let hW = bN(hT)
1737+ let hX = if ((hU == 0))
14511738 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))
1739+ else cP(hV, hW, hU)
1740+ let do = 0
1741+ let hY = H(hX[1], b)
1742+ let hZ = H(hX[2], b)
1743+ let ia = value(getInteger(aV, aF(toString(this))))
1744+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hV), toString(hW), toString(hU), toString(do), toString(hY), toString(hZ), toString(ia)], j))
14581745 }
14591746
14601747
14611748
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))
1749+@Callable(eJ)
1750+func evaluatePutByAmountAssetREADONLY (dy) = {
1751+ let cR = be()
1752+ let de = fromBase58String(cR[q])
1753+ let dE = cR[r]
1754+ let df = fromBase58String(dE)
1755+ let dF = cR[s]
1756+ let dg = fromBase58String(dF)
1757+ let cS = parseIntValue(cR[t])
1758+ let cT = parseIntValue(cR[u])
1759+ let dh = cR[p]
1760+ let hU = valueOrErrorMessage(assetInfo(de), (("Asset " + toBase58String(de)) + " doesn't exist")).quantity
1761+ let hV = bN(dE)
1762+ let hW = bN(dF)
1763+ let cN = D(hV, cS)
1764+ let cO = D(hW, cT)
1765+ let dn = if ((hU == 0))
14791766 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))
1767+ else bO(cO, cN)
1768+ let dK = D(dy, cS)
1769+ let dL = fraction(dK, dn, d)
1770+ let dA = H(dL, cT)
1771+ let eP = dw("", 500000, dy, df, dA, dg, "", true, false)
1772+ let dV = eP._1
1773+ let ib = eP._3
1774+ let dj = eP._4
1775+ let dl = eP._5
1776+ let di = eP._6
1777+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(dV), toString(H(dn, b)), toString(dj), toString(dl), toString(di), dh, toString(dy), toString(dA)], j))
14911778 }
14921779
14931780
14941781
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))
1782+@Callable(eJ)
1783+func evaluatePutByPriceAssetREADONLY (dA) = {
1784+ let cR = be()
1785+ let de = fromBase58String(cR[q])
1786+ let dE = cR[r]
1787+ let df = fromBase58String(dE)
1788+ let dF = cR[s]
1789+ let dg = fromBase58String(dF)
1790+ let cS = parseIntValue(cR[t])
1791+ let cT = parseIntValue(cR[u])
1792+ let dh = cR[p]
1793+ let hU = valueOrErrorMessage(assetInfo(de), (("Asset " + toBase58String(de)) + " doesn't exist")).quantity
1794+ let ic = bN(dE)
1795+ let id = bN(dF)
1796+ let ie = D(ic, cS)
1797+ let if = D(id, cT)
1798+ let dn = if ((hU == 0))
15121799 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))
1800+ else bO(if, ie)
1801+ let dL = D(dA, cT)
1802+ let dK = fraction(dL, d, dn)
1803+ let dy = H(dK, cS)
1804+ let eP = dw("", 500000, dy, df, dA, dg, "", true, false)
1805+ let dV = eP._1
1806+ let ib = eP._3
1807+ let dj = eP._4
1808+ let dl = eP._5
1809+ let di = eP._6
1810+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(dV), toString(H(dn, b)), toString(dj), toString(dl), toString(di), dh, toString(dy), toString(dA)], j))
15241811 }
15251812
15261813
15271814
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))
1815+@Callable(eJ)
1816+func evaluateGetREADONLY (ig,ih) = {
1817+ let dN = da("", ig, ih, this)
1818+ let dt = dN._1
1819+ let du = dN._2
1820+ let dj = dN._5
1821+ let dl = dN._6
1822+ let di = dN._7
1823+ let do = dN._8
1824+ let dh = parseIntValue(dN._9)
1825+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dt), toString(du), toString(dj), toString(dl), toString(di), toString(do), toString(dh)], j))
15391826 }
15401827
15411828
1542-@Verifier(gZ)
1543-func ha () = {
1544- let hb = {
1545- let dW = eZ()
1546- if ($isInstanceOf(dW, "ByteVector"))
1829+@Verifier(ii)
1830+func ij () = {
1831+ let ik = {
1832+ let bV = fV()
1833+ if ($isInstanceOf(bV, "ByteVector"))
15471834 then {
1548- let fd = dW
1549- fd
1835+ let fZ = bV
1836+ fZ
15501837 }
1551- else if ($isInstanceOf(dW, "Unit"))
1552- then gZ.senderPublicKey
1838+ else if ($isInstanceOf(bV, "Unit"))
1839+ then ii.senderPublicKey
15531840 else throw("Match error")
15541841 }
1555- let dW = gZ
1556- if ($isInstanceOf(dW, "Order"))
1842+ let bV = ii
1843+ if ($isInstanceOf(bV, "Order"))
15571844 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
1845+ let ey = bV
1846+ let il = bd()
1847+ let im = ex(ey)
1848+ let aK = im._1
1849+ let aL = im._2
1850+ let aM = sigVerify(ey.bodyBytes, ey.proofs[0], ey.senderPublicKey)
1851+ let aN = sigVerify(ey.bodyBytes, ey.proofs[1], il)
1852+ if (if (if (aK)
1853+ then aM
15671854 else false)
1568- then aG
1855+ then aN
15691856 else false)
15701857 then true
1571- else aC(aD, aE, aF, aG)
1858+ else aJ(aK, aL, aM, aN)
15721859 }
1573- else if ($isInstanceOf(dW, "SetScriptTransaction"))
1860+ else if ($isInstanceOf(bV, "SetScriptTransaction"))
15741861 then {
1575- let fa = dW
1576- if (sigVerify(gZ.bodyBytes, gZ.proofs[0], hb))
1862+ let fW = bV
1863+ if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
15771864 then true
15781865 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)
1866+ let in = blake2b256(value(fW.script))
1867+ let io = fromBase64String(value(getString(aV, aH())))
1868+ let ip = scriptHash(this)
1869+ if ((io == in))
1870+ then (ip != in)
15841871 else false
15851872 }
15861873 }
1587- else sigVerify(gZ.bodyBytes, gZ.proofs[0], hb)
1874+ else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
15881875 }
15891876

github/deemru/w8io/026f985 
411.64 ms