tx · 4G5uEwuwQbGAqyyJMdUqYmJRuUf71B7zvB62s4PKtN22

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04100000 Waves

2023.03.22 10:52 [2500954] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "4G5uEwuwQbGAqyyJMdUqYmJRuUf71B7zvB62s4PKtN22", "fee": 4100000, "feeAssetId": null, "timestamp": 1679471539486, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "2am8KEhCp28bzGN6Gt83pNaXFrkLLBYZb8rDjp7vtwM5a7UxWmaNuvLgcJHK8gvb71qLfvVkneocLSxaGJzSMAMt" ], "script": "base64:BgK8KwgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCCIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiBGJpZzMiBGJpZzQiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCINaWR4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CXzMIBQJkWgJfNAgFAmRaAl81CAUCZFoCXzYIBQJkWgJfNwkApgMBCAUCZFoCXzgIBQJkWgJfOQgFAmRaA18xMAECaWwBAmltAAQCaW4EAmduCQECZ20AAwkAAQIFAmduAgpCeXRlVmVjdG9yBAJncgUCZ24FAmdyAwkAAQIFAmduAgRVbml0CAUCaWwPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmduBQJpbAMJAAECBQJnbgIFT3JkZXIEAmZiBQJnbgQCaW8JAQJhWQAEAmlwAwkBAmd5AAkAlAoCBgIACQECZmEBBQJmYgQCYUgIBQJpcAJfMQQCYUkIBQJpcAJfMgQCYUoJAPQDAwgFAmZiCWJvZHlCeXRlcwkAkQMCCAUCZmIGcHJvb2ZzAAAIBQJmYg9zZW5kZXJQdWJsaWNLZXkEAmFLCQD0AwMIBQJmYglib2R5Qnl0ZXMJAJEDAggFAmZiBnByb29mcwABBQJpbwMDAwUCYUgFAmFKBwUCYUsHBgkBAmFHBAUCYUgFAmFJBQJhSgUCYUsDCQABAgUCZ24CFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJjRQUCZ24DCQD0AwMIBQJpbAlib2R5Qnl0ZXMJAJEDAggFAmlsBnByb29mcwAABQJpbgYEAmlxCQD2AwEJAQV2YWx1ZQEIBQJjRQZzY3JpcHQEAmlyCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVMJAQJhQwAEAmlzCQDxBwEFBHRoaXMDCQAAAgUCaXIFAmlxCQECIT0CBQJpcwUCaXEHCQD0AwMIBQJpbAlib2R5Qnl0ZXMJAJEDAggFAmlsBnByb29mcwAABQJpbutAyXM=", "height": 2500954, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2cKxTt2mHuKKWD66mfUZaj7PtULHrjQD3wnhg5Xpdfpf Next: 7CuTaJ4zfQNSWaXNdEAnwTRptVxekAbLXBxp3cp2xvtH Diff:
OldNewDifferences
166166 func aD () = "%s__feeCollectorAddress"
167167
168168
169-func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI)))
169+func aE (aF) = ("%s%s__skipOrderValidation__" + aF)
170170
171171
172-func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
172+func aG (aH,aI,aJ,aK) = throw((((((((("order validation failed: orderValid=" + toString(aH)) + " (") + aI) + ")") + " senderValid=") + toString(aJ)) + " matcherValid=") + toString(aK)))
173173
174174
175-func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
175+func aL (aM,aN) = valueOrErrorMessage(getString(aM, aN), makeString(["mandatory ", toString(aM), ".", aN, " not defined"], ""))
176176
177177
178-func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
178+func aO (aM,aN) = valueOrErrorMessage(getInteger(aM, aN), makeString(["mandatory ", toString(aM), ".", aN, " not defined"], ""))
179179
180180
181-func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
181+func aP (aQ) = throw(makeString(["lp_stable.ride:", aQ], " "))
182182
183183
184-let aQ = addressFromStringValue(aJ(this, Y()))
184+func aR (aQ) = makeString(["lp_stable.ride:", aQ], " ")
185185
186-let aR = {
187- let aS = invoke(aQ, "getInFeeREADONLY", [toString(this)], nil)
188- if ($isInstanceOf(aS, "Int"))
189- then aS
190- else throw(($getType(aS) + " couldn't be cast to Int"))
186+
187+let aS = addressFromStringValue(aL(this, Y()))
188+
189+let aT = {
190+ let aU = invoke(aS, "getInFeeREADONLY", [toString(this)], nil)
191+ if ($isInstanceOf(aU, "Int"))
192+ then aU
193+ else throw(($getType(aU) + " couldn't be cast to Int"))
191194 }
192195
193-let aT = {
194- let aS = invoke(aQ, "getOutFeeREADONLY", [toString(this)], nil)
195- if ($isInstanceOf(aS, "Int"))
196- then aS
197- else throw(($getType(aS) + " couldn't be cast to Int"))
196+let aV = {
197+ let aU = invoke(aS, "getOutFeeREADONLY", [toString(this)], nil)
198+ if ($isInstanceOf(aU, "Int"))
199+ then aU
200+ else throw(($getType(aU) + " couldn't be cast to Int"))
198201 }
199202
200-let aU = aJ(this, al())
203+let aW = aL(this, al())
201204
202-func aV () = valueOrElse(getBoolean(aQ, aB()), false)
205+func aX () = valueOrElse(getBoolean(aS, aB()), false)
203206
204207
205-func aW () = fromBase58String(aJ(aQ, av()))
208+func aY () = fromBase58String(aL(aS, av()))
206209
207210
208-let aX = addressFromStringValue(aJ(aQ, aD()))
211+let aZ = addressFromStringValue(aL(aS, aD()))
209212
210-func aY () = {
211- let aZ = aJ(this, aj())
212- let ba = aJ(this, ak())
213- let bb = aM(aQ, az(ba))
214- let ax = aM(aQ, az(aZ))
215- split(aJ(aQ, aw(toString(ax), toString(bb))), n)
213+func ba () = {
214+ let bb = aL(this, aj())
215+ let bc = aL(this, ak())
216+ let bd = aO(aS, az(bc))
217+ let ax = aO(aS, az(bb))
218+ split(aL(aS, aw(toString(ax), toString(bd))), n)
216219 }
217220
218221
219-func bc (bd) = if ((bd == k))
222+func be (bf) = if ((bf == k))
220223 then unit
221- else fromBase58String(bd)
224+ else fromBase58String(bf)
222225
223226
224-func be (bd) = if ((bd == unit))
227+func bg (bf) = if ((bf == unit))
225228 then k
226- else toBase58String(value(bd))
229+ else toBase58String(value(bf))
227230
228231
229-func bf (bg) = $Tuple9(addressFromStringValue(bg[t]), parseIntValue(bg[u]), fromBase58String(bg[v]), bc(bg[w]), bc(bg[x]), parseIntValue(bg[y]), parseIntValue(bg[z]), fromBase58String(bg[A]), fromBase58String(bg[B]))
232+func bh (bi) = $Tuple9(addressFromStringValue(bi[t]), parseIntValue(bi[u]), fromBase58String(bi[v]), be(bi[w]), be(bi[x]), parseIntValue(bi[y]), parseIntValue(bi[z]), fromBase58String(bi[A]), fromBase58String(bi[B]))
230233
231234
232-let bh = bf(aY())
235+let bj = bh(ba())
233236
234-let bi = bh
237+let bk = bj
235238
236-let bj = bi._1
239+let bl = bk._1
237240
238-let bk = bi._2
241+let bm = bk._2
239242
240-let bl = bi._3
243+let bn = bk._3
241244
242-let bm = bi._4
245+let bo = bk._4
243246
244-let bn = bi._5
247+let bp = bk._5
245248
246-let bo = bi._6
249+let bq = bk._6
247250
248-let bp = bi._7
251+let br = bk._7
249252
250-let bq = bi._8
253+let bs = bk._8
251254
252-let br = bi._9
255+let bt = bk._9
253256
254-func bs () = split(aJ(aQ, au()), n)
257+func bu () = split(aL(aS, au()), n)
255258
256259
257-let bt = bs()
260+let bv = bu()
258261
259-let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
262+let bw = valueOrErrorMessage(addressFromString(bv[C]), "Invalid staking contract address")
260263
261-let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
264+let bx = valueOrErrorMessage(addressFromString(bv[E]), "Invalid slipage contract address")
262265
263-let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
266+let by = valueOrErrorMessage(addressFromString(bv[F]), "Invalid gwx contract address")
264267
265-let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
268+let bz = valueOrErrorMessage(addressFromString(bv[D]), "Invalid gwx contract address")
266269
267-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)], n)
270+func bA (bB,bC,bD,bE,bF,bG,bH,bI,bJ,bK) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK)], n)
268271
269272
270-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)], n)
273+func bL (bM,bN,bO,bE,bH,bI) = makeString(["%d%d%d%d%d%d", toString(bM), toString(bN), toString(bO), toString(bE), toString(bH), toString(bI)], n)
271274
272275
273-func bN (bO) = if ((bO == "WAVES"))
276+func bP (bQ) = if ((bQ == "WAVES"))
274277 then wavesBalance(this).available
275- else assetBalance(this, fromBase58String(bO))
278+ else assetBalance(this, fromBase58String(bQ))
276279
277280
278-func bP (bQ,bR) = fraction(bQ, c, bR)
281+func bR (bS,bT) = fraction(bS, c, bT)
279282
280283
281-func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
284+func bU (bS,bT,P) = fraction(bS, c, bT, P)
282285
283286
284-func bT (bU,bV,bW) = {
285- let bX = fraction((bU - bV), b, bV)
286- let bY = ((bW - W(bX)) > d)
287- if (!(bY))
288- then throw(("Big slpg: " + toString(bX)))
289- else $Tuple2(bY, min([bU, bV]))
287+func bV (bW,bX,bY) = {
288+ let bZ = fraction((bW - bX), b, bX)
289+ let ca = ((bY - W(bZ)) > d)
290+ if (!(ca))
291+ then throw(("Big slpg: " + toString(bZ)))
292+ else $Tuple2(ca, min([bW, bX]))
290293 }
291294
292295
293-func bZ (ca,cb,cc) = {
294- let bX = fraction(cb, b, ca)
295- let cd = (cc > bX)
296- if (if (cd)
296+func cb (cc,cd,ce) = {
297+ let bZ = fraction(cd, b, cc)
298+ let cf = (ce > bZ)
299+ if (if (cf)
297300 then true
298- else (cb > ca))
299- then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300- else cd
301+ else (cd > cc))
302+ then throw(((((((toString(cd) + " ") + toString(cc)) + " ") + toString(bZ)) + " ") + toString(ce)))
303+ else cf
301304 }
302305
303306
304-func ce (cf,cg,ch,ci) = {
305- let cj = H(ch, cf)
306- let ck = H(ci, cg)
307- bP(ck, cj)
307+func cg (ch,ci,cj,ck) = {
308+ let cl = H(cj, ch)
309+ let cm = H(ck, ci)
310+ bR(cm, cl)
308311 }
309312
310313
311-func cl (ch,ci,cm) = {
312- let cn = bo
313- let co = bp
314- let cp = ce(cn, co, ch, ci)
315- let bR = H(ch, cn)
316- let bQ = H(ci, co)
317- let cq = H(cm, a)
318- let cr = bP(bR, cq)
319- let cs = bP(bQ, cq)
320-[cp, cr, cs]
314+func cn (cj,ck,co) = {
315+ let cp = bq
316+ let cq = br
317+ let cr = cg(cp, cq, cj, ck)
318+ let bT = H(cj, cp)
319+ let bS = H(ck, cq)
320+ let cs = H(co, a)
321+ let ct = bR(bT, cs)
322+ let cu = bR(bS, cs)
323+[cr, ct, cu]
321324 }
322325
323326
324-func ct (ch,ci,cm) = {
325- let cu = cl(ch, ci, cm)
326-[L(cu[0], a), L(cu[1], a), L(cu[2], a)]
327+func cv (cj,ck,co) = {
328+ let cw = cn(cj, ck, co)
329+[L(cw[0], a), L(cw[1], a), L(cw[2], a)]
327330 }
328331
329332
330-func cv (cw,ao) = {
331- let cx = if ((ao == 0))
333+func cx (cy,ao) = {
334+ let cz = if ((ao == 0))
332335 then 0
333- else fraction(cw, ao, a)
334- $Tuple2((cw - cx), cx)
336+ else fraction(cy, ao, a)
337+ $Tuple2((cy - cz), cz)
335338 }
336339
337340
338-func cy (cz) = {
339- let cA = cz[0]
340- let cB = cz[1]
341- let cC = (cA + cB)
342- if ((cC == e))
341+func cA (cB) = {
342+ let cC = cB[0]
343+ let cD = cB[1]
344+ let cE = (cC + cD)
345+ if ((cE == e))
343346 then e
344347 else {
345- let cD = parseIntValue(aU)
346- let cE = (cD * 2)
347- let cu = fraction(cA, cB, f)
348- let cF = fraction(cu, i, f)
349- let cG = fraction(toBigInt(cE), cC, f)
350- let cH = toBigInt((cE - 1))
351- func cI (cJ) = {
352- let cK = fraction(cJ, cJ, f)
353- let cL = fraction(cK, cJ, f)
354- let cM = fraction(cL, f, cF)
355- fraction((cG + fraction(cM, g, f)), cJ, (fraction(cH, cJ, f) + fraction(h, cM, f)))
348+ let cF = parseIntValue(aW)
349+ let cG = (cF * 2)
350+ let cw = fraction(cC, cD, f)
351+ let cH = fraction(cw, i, f)
352+ let cI = fraction(toBigInt(cG), cE, f)
353+ let cJ = toBigInt((cG - 1))
354+ func cK (cL) = {
355+ let cM = fraction(cL, cL, f)
356+ let cN = fraction(cM, cL, f)
357+ let cO = fraction(cN, f, cH)
358+ fraction((cI + fraction(cO, g, f)), cL, (fraction(cJ, cL, f) + fraction(h, cO, f)))
356359 }
357360
358- func cN (cO,cP) = if (cO._2)
359- then cO
361+ func cP (cQ,cR) = if (cQ._2)
362+ then cQ
360363 else {
361- let cJ = cO._1
362- let cQ = cI(cJ)
363- let cR = (cQ - value(cJ))
364- let cS = if ((e > cR))
365- then -(cR)
366- else cR
367- if ((f >= cS))
368- then $Tuple2(cQ, true)
369- else $Tuple2(cQ, false)
364+ let cL = cQ._1
365+ let cS = cK(cL)
366+ let cT = (cS - value(cL))
367+ let cU = if ((e > cT))
368+ then -(cT)
369+ else cT
370+ if ((f >= cU))
371+ then $Tuple2(cS, true)
372+ else $Tuple2(cS, false)
370373 }
371374
372- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373- let cU = {
374- let cV = cT
375- let cW = size(cV)
376- let cX = $Tuple2(cC, false)
377- func cY (cZ,da) = if ((da >= cW))
378- then cZ
379- else cN(cZ, cV[da])
375+ let cV = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
376+ let cW = {
377+ let cX = cV
378+ let cY = size(cX)
379+ let cZ = $Tuple2(cE, false)
380+ func da (db,dc) = if ((dc >= cY))
381+ then db
382+ else cP(db, cX[dc])
380383
381- func db (cZ,da) = if ((da >= cW))
382- then cZ
383- else throw("List size exceeds 18")
384+ func dd (db,dc) = if ((dc >= cY))
385+ then db
386+ else throw("List size exceeds 17")
384387
385- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
388+ dd(da(da(da(da(da(da(da(da(da(da(da(da(da(da(da(da(da(cZ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
386389 }
387- let cJ = cU._1
388- let dc = cU._2
389- if (dc)
390- then cJ
391- else throw(("D calculation error, D = " + toString(cJ)))
390+ let cL = cW._1
391+ let de = cW._2
392+ if (de)
393+ then cL
394+ else throw(("D calculation error, D = " + toString(cL)))
392395 }
393396 }
394397
395398
396-func dd (de,df,dg,dh) = {
397- let di = bl
398- let dj = toBase58String(value(bm))
399- let dk = toBase58String(value(bn))
400- let dl = bo
401- let dm = bp
402- let dn = toString(bk)
403- let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity
404- if ((toBase58String(di) != df))
399+func df (dg,dh,di,dj) = {
400+ let dk = bn
401+ let dl = toBase58String(value(bo))
402+ let dm = toBase58String(value(bp))
403+ let dn = bq
404+ let do = br
405+ let dp = toString(bm)
406+ let dq = valueOrErrorMessage(assetInfo(dk), "Wrong LP id").quantity
407+ if ((toBase58String(dk) != dh))
405408 then throw("Wrong pmt asset")
406409 else {
407- let dp = bN(dj)
408- let dq = H(dp, dl)
409- let dr = bN(dk)
410- let ds = H(dr, dm)
411- let dt = bP(ds, dq)
412- let du = L(dt, a)
413- let dv = H(dg, a)
414- let dw = H(do, a)
415- let dx = fraction(dq, dv, dw)
416- let dy = fraction(ds, dv, dw)
417- let dz = O(dx, dl, FLOOR)
418- let dA = O(dy, dm, FLOOR)
419- let dB = if ((de == ""))
410+ let dr = bP(dl)
411+ let ds = H(dr, dn)
412+ let dt = bP(dm)
413+ let du = H(dt, do)
414+ let dv = bR(du, ds)
415+ let dw = L(dv, a)
416+ let dx = H(di, a)
417+ let dy = H(dq, a)
418+ let dz = fraction(ds, dx, dy)
419+ let dA = fraction(du, dx, dy)
420+ let dB = O(dz, dn, FLOOR)
421+ let dC = O(dA, do, FLOOR)
422+ let dD = if ((dg == ""))
420423 then nil
421- else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
424+ else [ScriptTransfer(dj, dB, if ((dl == "WAVES"))
422425 then unit
423- else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
426+ else fromBase58String(dl)), ScriptTransfer(dj, dC, if ((dm == "WAVES"))
424427 then unit
425- else fromBase58String(dk)), StringEntry(ai(toString(dh), de), bJ(dz, dA, dg, du, height, lastBlock.timestamp)), IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du)]
426- $Tuple10(dz, dA, dj, dk, dp, dr, do, dt, dn, dB)
428+ else fromBase58String(dm)), StringEntry(ai(toString(dj), dg), bL(dB, dC, di, dw, height, lastBlock.timestamp)), IntegerEntry(ab(), dw), IntegerEntry(ac(height, lastBlock.timestamp), dw)]
429+ $Tuple10(dB, dC, dl, dm, dr, dt, dq, dv, dp, dD)
427430 }
428431 }
429432
430433
431-func dC (de,bW,dD,dE,dF,dG,dh,dH,dI,dJ,dK,dL,dM) = {
432- let di = bl
433- let dN = toBase58String(value(bm))
434- let dO = toBase58String(value(bn))
435- let dP = bq
436- let dQ = br
437- let dR = bo
438- let dS = bp
439- let dn = toString(bk)
440- let dT = valueOrErrorMessage(assetInfo(di), "Wr lp as").quantity
441- let dp = if (dH)
442- then bN(dN)
443- else if (if (dJ)
444- then (dM == dN)
434+func dE (dg,bY,dF,dG,dH,dI,dj,dJ,dK,dL,dM,dN,dO) = {
435+ let dk = bn
436+ let dP = toBase58String(value(bo))
437+ let dQ = toBase58String(value(bp))
438+ let dR = bs
439+ let dS = bt
440+ let dT = bq
441+ let dU = br
442+ let dp = toString(bm)
443+ let dV = valueOrErrorMessage(assetInfo(dk), "Wr lp as").quantity
444+ let dr = if (dJ)
445+ then bP(dP)
446+ else if (if (dL)
447+ then (dO == dP)
445448 else false)
446- then (bN(dN) - dL)
447- else if (dJ)
448- then bN(dN)
449- else (bN(dN) - dD)
450- let dr = if (dH)
451- then bN(dO)
452- else if (if (dJ)
453- then (dM == dO)
449+ then (bP(dP) - dN)
450+ else if (dL)
451+ then bP(dP)
452+ else (bP(dP) - dF)
453+ let dt = if (dJ)
454+ then bP(dQ)
455+ else if (if (dL)
456+ then (dO == dQ)
454457 else false)
455- then (bN(dO) - dL)
456- else if (dJ)
457- then bN(dO)
458- else (bN(dO) - dF)
459- let dU = H(dD, dR)
460- let dV = H(dF, dS)
461- let dW = bP(dV, dU)
462- let dq = H(dp, dR)
463- let ds = H(dr, dS)
464- let cb = cy([dq, ds])
465- let dX = if ((dT == 0))
458+ then (bP(dQ) - dN)
459+ else if (dL)
460+ then bP(dQ)
461+ else (bP(dQ) - dH)
462+ let dW = H(dF, dT)
463+ let dX = H(dH, dU)
464+ let dY = bR(dX, dW)
465+ let ds = H(dr, dT)
466+ let du = H(dt, dU)
467+ let cd = cA([ds, du])
468+ let dZ = if ((dV == 0))
466469 then {
467- let ca = cy([(dq + dU), (ds + dV)])
468- let dY = if ((ca > cb))
470+ let cc = cA([(ds + dW), (du + dX)])
471+ let ea = if ((cc > cd))
469472 then true
470473 else throw("D1 should be greater than D0")
471- if ((dY == dY))
474+ if ((ea == ea))
472475 then {
473- let dt = d
474- let dZ = d
475- let cq = ca
476- $Tuple5(L(cq, a), L(dU, dR), L(dV, dS), bP((ds + dV), (dq + dU)), dZ)
476+ let dv = d
477+ let eb = d
478+ let cs = cc
479+ $Tuple5(L(cs, a), L(dW, dT), L(dX, dU), bR((du + dX), (ds + dW)), eb)
477480 }
478481 else throw("Strict value is not equal to itself.")
479482 }
480483 else {
481- let dt = bP(ds, dq)
482- let ea = fraction(W((dt - dW)), c, dt)
483- let dZ = H(bW, a)
484- if (if (if (dK)
485- then (dt != d)
484+ let dv = bR(du, ds)
485+ let ec = fraction(W((dv - dY)), c, dv)
486+ let eb = H(bY, a)
487+ if (if (if (dM)
488+ then (dv != d)
486489 else false)
487- then (ea > dZ)
490+ then (ec > eb)
488491 else false)
489- then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
492+ then throw(((("Price slippage " + toString(ec)) + " > ") + toString(eb)))
490493 else {
491- let eb = H(dT, a)
492- let ec = fraction(dU, bS(ds, dq, CEILING), c, CEILING)
493- let ed = fraction(dV, c, bS(ds, dq, FLOOR), CEILING)
494- let ee = if ((ec > dV))
495- then $Tuple2(ed, dV)
496- else $Tuple2(dU, ec)
497- let ef = ee._1
498- let eg = ee._2
499- let ca = cy([(dq + ef), (ds + eg)])
500- let dY = if ((ca > cb))
494+ let ed = H(dV, a)
495+ let ee = fraction(dW, bU(du, ds, CEILING), c, CEILING)
496+ let ef = fraction(dX, c, bU(du, ds, FLOOR), CEILING)
497+ let eg = if ((ee > dX))
498+ then $Tuple2(ef, dX)
499+ else $Tuple2(dW, ee)
500+ let eh = eg._1
501+ let ei = eg._2
502+ let cc = cA([(ds + eh), (du + ei)])
503+ let ea = if ((cc > cd))
501504 then true
502505 else throw("D1 should be greater than D0")
503- if ((dY == dY))
506+ if ((ea == ea))
504507 then {
505- let cq = fraction(eb, (ca - cb), cb)
506- $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ)
508+ let cs = fraction(ed, (cc - cd), cd)
509+ $Tuple5(O(cs, a, FLOOR), O(eh, dT, CEILING), O(ei, dU, CEILING), dv, eb)
507510 }
508511 else throw("Strict value is not equal to itself.")
509512 }
510513 }
511- let eh = dX._1
512- let ei = dX._2
513- let ej = dX._3
514- let du = L(dX._4, a)
515- let ek = L(dX._5, a)
516- if ((0 >= eh))
514+ let ej = dZ._1
515+ let ek = dZ._2
516+ let el = dZ._3
517+ let dw = L(dZ._4, a)
518+ let em = L(dZ._5, a)
519+ if ((0 >= ej))
517520 then throw("LP <= 0")
518521 else {
519- let el = if (!(dI))
522+ let en = if (!(dK))
520523 then 0
521- else eh
522- let em = (dD - ei)
523- let en = (dF - ej)
524- let eo = if (if (dJ)
525- then (dM == dN)
524+ else ej
525+ let eo = (dF - ek)
526+ let ep = (dH - el)
527+ let eq = if (if (dL)
528+ then (dO == dP)
526529 else false)
527- then $Tuple2(dL, 0)
528- else if (if (dJ)
529- then (dM == dO)
530+ then $Tuple2(dN, 0)
531+ else if (if (dL)
532+ then (dO == dQ)
530533 else false)
531- then $Tuple2(0, dL)
532- else $Tuple2(ei, ej)
533- let ep = eo._1
534- let eq = eo._2
535- let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, de), by(ep, eq, el, du, bW, ek, height, lastBlock.timestamp, em, en))]
536- $Tuple13(eh, el, du, dp, dr, dT, di, dn, er, em, en, dE, dG)
534+ then $Tuple2(0, dN)
535+ else $Tuple2(ek, el)
536+ let er = eq._1
537+ let es = eq._2
538+ let et = [IntegerEntry(ab(), dw), IntegerEntry(ac(height, lastBlock.timestamp), dw), StringEntry(af(dj, dg), bA(er, es, en, dw, bY, em, height, lastBlock.timestamp, eo, ep))]
539+ $Tuple13(ej, en, dw, dr, dt, dV, dk, dp, et, eo, ep, dG, dI)
537540 }
538541 }
539542
540543
541-func es (cz,cP,et) = {
542- let eu = g
543- let ev = cz[if ((cP == 0))
544+func eu (cB,cR,ev) = {
545+ let ew = g
546+ let ex = cB[if ((cR == 0))
544547 then 1
545548 else 0]
546- let ew = parseBigIntValue(l)
547- let cD = (parseBigIntValue(aU) * ew)
548- let cC = ev
549- let cE = (cD * eu)
550- let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
551- let ey = ((cC + ((et * ew) / cE)) - et)
552- func cN (cO,ez) = {
553- let eA = cO
554- let eB = eA._1
555- let dc = eA._2
556- if ((dc != unit))
557- then cO
549+ let ey = parseBigIntValue(l)
550+ let cF = (parseBigIntValue(aW) * ey)
551+ let cE = ex
552+ let cG = (cF * ew)
553+ let ez = (((((ev * ev) / (ex * ew)) * ev) * ey) / (cG * ew))
554+ let eA = ((cE + ((ev * ey) / cG)) - ev)
555+ func cP (cQ,eB) = {
556+ let eC = cQ
557+ let eD = eC._1
558+ let de = eC._2
559+ if ((de != unit))
560+ then cQ
558561 else {
559- let eC = (((eB * eB) + ex) / ((g * eB) + ey))
560- let eD = X((eC - value(eB)))
561- if ((f >= eD))
562- then $Tuple2(eC, ez)
563- else $Tuple2(eC, unit)
562+ let eE = (((eD * eD) + ez) / ((g * eD) + eA))
563+ let eF = X((eE - value(eD)))
564+ if ((f >= eF))
565+ then $Tuple2(eE, eB)
566+ else $Tuple2(eE, unit)
564567 }
565568 }
566569
567- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let eE = {
569- let cV = cT
570- let cW = size(cV)
571- let cX = $Tuple2(et, unit)
572- func cY (cZ,da) = if ((da >= cW))
573- then cZ
574- else cN(cZ, cV[da])
570+ let cV = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
571+ let eG = {
572+ let cX = cV
573+ let cY = size(cX)
574+ let cZ = $Tuple2(ev, unit)
575+ func da (db,dc) = if ((dc >= cY))
576+ then db
577+ else cP(db, cX[dc])
575578
576- func db (cZ,da) = if ((da >= cW))
577- then cZ
579+ func dd (db,dc) = if ((dc >= cY))
580+ then db
578581 else throw("List size exceeds 15")
579582
580- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
583+ dd(da(da(da(da(da(da(da(da(da(da(da(da(da(da(da(cZ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581584 }
582- let eB = eE._1
583- let dc = eE._2
584- if ((dc != unit))
585- then eB
586- else throw(("Y calculation error, Y = " + toString(eB)))
585+ let eD = eG._1
586+ let de = eG._2
587+ if ((de != unit))
588+ then eD
589+ else throw(("Y calculation error, Y = " + toString(eD)))
587590 }
588591
589592
590-func eF (eG,eH,eI) = {
591- let eJ = fraction(cy([K(eG, toBigInt(bo)), K(eH, toBigInt(bp))]), c, eI)
592- if ((eI == e))
593+func eH (eI,eJ,eK) = {
594+ let eL = fraction(cA([K(eI, toBigInt(bq)), K(eJ, toBigInt(br))]), c, eK)
595+ if ((eK == e))
593596 then e
594- else eJ
597+ else eL
595598 }
596599
597600
598-func eK (eL,eM,eN) = {
599- let eO = (toBigInt(bN(be(bm))) - eL)
600- let eP = (toBigInt(bN(be(bn))) - eM)
601- let eQ = (toBigInt(value(assetInfo(bl)).quantity) - eN)
602- let eR = eF(eO, eP, eQ)
603- eR
601+func eM (eN,eO,eP) = {
602+ let eQ = (toBigInt(bP(bg(bo))) - eN)
603+ let eR = (toBigInt(bP(bg(bp))) - eO)
604+ let eS = (toBigInt(value(assetInfo(bn)).quantity) - eP)
605+ let eT = eH(eQ, eR, eS)
606+ eT
604607 }
605608
606609
607-func eS (eT,eU,eN) = {
608- let eO = (bN(be(bm)) + eT)
609- let eP = (bN(be(bn)) + eU)
610- let eQ = (value(assetInfo(bl)).quantity + eN)
611- let eJ = eF(toBigInt(eO), toBigInt(eP), toBigInt(eQ))
612- let eV = [IntegerEntry(aq, height), StringEntry(ap, toString(eJ))]
613- $Tuple2(eV, eJ)
610+func eU (eV,eW,eP) = {
611+ let eQ = (bP(bg(bo)) + eV)
612+ let eR = (bP(bg(bp)) + eW)
613+ let eS = (value(assetInfo(bn)).quantity + eP)
614+ let eL = eH(toBigInt(eQ), toBigInt(eR), toBigInt(eS))
615+ let eX = [IntegerEntry(aq, height), StringEntry(ap, toString(eL))]
616+ $Tuple2(eX, eL)
614617 }
615618
616619
617-func eW (eX,eJ) = if ((eJ >= eX))
620+func eY (eZ,eL) = if ((eL >= eZ))
618621 then true
619- else aN("updated DLp lower than current DLp")
622+ else aP("updated DLp lower than current DLp")
620623
621624
622-func eY (eZ) = {
623- let eO = bN(be(bm))
624- let eP = bN(be(bn))
625- let fa = eZ.amount
626- let fb = fraction(eZ.amount, eZ.price, a, FLOOR)
627- let fc = if ((eZ.orderType == Buy))
628- then $Tuple2(fa, -(fb))
629- else $Tuple2(-(fa), fb)
630- let eT = fc._1
631- let eU = fc._2
632- if (if (if (aV())
625+func fa (fb) = {
626+ let eQ = bP(bg(bo))
627+ let eR = bP(bg(bp))
628+ let fc = fb.amount
629+ let fd = fraction(fb.amount, fb.price, a, FLOOR)
630+ let fe = if ((fb.orderType == Buy))
631+ then $Tuple2(fc, -(fd))
632+ else $Tuple2(-(fc), fd)
633+ let eV = fe._1
634+ let eW = fe._2
635+ if (if (if (aX())
633636 then true
634- else (bk == r))
637+ else (bm == r))
635638 then true
636- else (bk == s))
639+ else (bm == s))
637640 then throw("Admin blocked")
638- else if (if ((eZ.assetPair.amountAsset != bm))
641+ else if (if ((fb.assetPair.amountAsset != bo))
639642 then true
640- else (eZ.assetPair.priceAsset != bn))
643+ else (fb.assetPair.priceAsset != bp))
641644 then throw("Wr assets")
642645 else {
643- let fd = parseBigIntValue(valueOrElse(getString(this, ap), "0"))
644- let fe = eS(eT, eU, 0)
645- let ff = fe._1
646- let fg = fe._2
647- let fh = (fg >= fd)
648- let fi = makeString(["dLp=", toString(fd), " dLpNew=", toString(fg), " amountAssetBalance=", toString(eO), " priceAssetBalance=", toString(eP), " amountAssetBalanceDelta=", toString(eT), " priceAssetBalanceDelta=", toString(eU), " height=", toString(height)], "")
649- $Tuple2(fh, fi)
646+ let ff = parseBigIntValue(valueOrElse(getString(this, ap), "0"))
647+ let fg = eU(eV, eW, 0)
648+ let fh = fg._1
649+ let fi = fg._2
650+ let fj = (fi >= ff)
651+ let fk = makeString(["dLp=", toString(ff), " dLpNew=", toString(fi), " amountAssetBalance=", toString(eQ), " priceAssetBalance=", toString(eR), " amountAssetBalanceDelta=", toString(eV), " priceAssetBalanceDelta=", toString(eW), " height=", toString(height)], "")
652+ $Tuple2(fj, fk)
650653 }
651654 }
652655
653656
654-func fj (cP) = if ((size(cP.payments) != 1))
657+func fl (cR) = if ((size(cR.payments) != 1))
655658 then throw("1 pmnt exp")
656659 else {
657- let fk = value(cP.payments[0])
658- let df = value(fk.assetId)
659- let dL = fk.amount
660- let dX = dd(toBase58String(cP.transactionId), toBase58String(df), dL, cP.caller)
661- let dz = dX._1
662- let dA = dX._2
663- let dn = parseIntValue(dX._9)
664- let dB = dX._10
665- if (if (aV())
660+ let fm = value(cR.payments[0])
661+ let dh = value(fm.assetId)
662+ let dN = fm.amount
663+ let dZ = df(toBase58String(cR.transactionId), toBase58String(dh), dN, cR.caller)
664+ let dB = dZ._1
665+ let dC = dZ._2
666+ let dp = parseIntValue(dZ._9)
667+ let dD = dZ._10
668+ if (if (aX())
666669 then true
667- else (dn == s))
668- then throw(("Admin blocked: " + toString(dn)))
669- else $Tuple5(dz, dA, dL, df, dB)
670+ else (dp == s))
671+ then throw(("Admin blocked: " + toString(dp)))
672+ else $Tuple5(dB, dC, dN, dh, dD)
670673 }
671674
672675
673-func fl (fm,ah,fn,fo,bW,dI,dJ,dK,dL,dM) = {
674- let dX = dC(ah, bW, value(fn).amount, value(fn).assetId, value(fo).amount, value(fo).assetId, fm, (ah == ""), dI, dJ, dK, dL, dM)
675- let dn = parseIntValue(dX._8)
676- if (if (if (aV())
676+func fn (fo,ah,fp,fq,bY,dK,dL,dM,dN,dO) = {
677+ let dZ = dE(ah, bY, value(fp).amount, value(fp).assetId, value(fq).amount, value(fq).assetId, fo, (ah == ""), dK, dL, dM, dN, dO)
678+ let dp = parseIntValue(dZ._8)
679+ if (if (if (aX())
677680 then true
678- else (dn == q))
681+ else (dp == q))
679682 then true
680- else (dn == s))
681- then throw(("Blocked:" + toString(dn)))
682- else dX
683+ else (dp == s))
684+ then throw(("Blocked:" + toString(dp)))
685+ else dZ
683686 }
684687
685688
686-func fp (fq,df,dh,ah,fr) = {
687- let dj = toBase58String(value(bm))
688- let dk = toBase58String(value(bn))
689- let di = bl
690- let dR = bo
691- let dS = bp
692- let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity)
693- let fs = if ((eQ > e))
689+func fr (fs,dh,dj,ah,ft) = {
690+ let dl = toBase58String(value(bo))
691+ let dm = toBase58String(value(bp))
692+ let dk = bn
693+ let dT = bq
694+ let dU = br
695+ let eS = toBigInt(valueOrErrorMessage(assetInfo(dk), "invalid lp asset").quantity)
696+ let fu = if ((eS > e))
694697 then true
695698 else throw("initial deposit requires all coins")
696- if ((fs == fs))
699+ if ((fu == fu))
697700 then {
698- let dp = bN(dj)
699- let dr = bN(dk)
700- let ft = if ((ah == ""))
701- then $Tuple2(dp, dr)
702- else if ((df == dj))
703- then if ((fq > dp))
701+ let dr = bP(dl)
702+ let dt = bP(dm)
703+ let fv = if ((ah == ""))
704+ then $Tuple2(dr, dt)
705+ else if ((dh == dl))
706+ then if ((fs > dr))
704707 then throw("invalid payment amount")
705- else $Tuple2((dp - fq), dr)
706- else if ((df == dk))
707- then if ((fq > dr))
708+ else $Tuple2((dr - fs), dt)
709+ else if ((dh == dm))
710+ then if ((fs > dt))
708711 then throw("invalid payment amount")
709- else $Tuple2(dp, (dr - fq))
712+ else $Tuple2(dr, (dt - fs))
710713 else throw("wrong pmtAssetId")
711- let fu = ft._1
712- let fv = ft._2
713- let fw = if ((df == dj))
714- then $Tuple2(fq, 0)
715- else if ((df == dk))
716- then $Tuple2(0, fq)
714+ let fw = fv._1
715+ let fx = fv._2
716+ let fy = if ((dh == dl))
717+ then $Tuple2(fs, 0)
718+ else if ((dh == dm))
719+ then $Tuple2(0, fs)
717720 else throw("invalid payment")
718- let fx = fw._1
719- let fy = fw._2
720- let fz = if (fr)
721- then $Tuple3(cv(fx, aR)._1, cv(fy, aR)._1, cv(fq, aR)._2)
722- else $Tuple3(fx, fy, 0)
723- let fA = fz._1
724- let fB = fz._2
725- let cx = fz._3
726- let fC = (fu + fA)
727- let fD = (fv + fB)
728- let cb = cy([H(fu, bo), H(fv, bp)])
729- let ca = cy([H(fC, bo), H(fD, bp)])
730- let dY = if ((ca > cb))
721+ let fz = fy._1
722+ let fA = fy._2
723+ let fB = if (ft)
724+ then $Tuple3(cx(fz, aT)._1, cx(fA, aT)._1, cx(fs, aT)._2)
725+ else $Tuple3(fz, fA, 0)
726+ let fC = fB._1
727+ let fD = fB._2
728+ let cz = fB._3
729+ let fE = (fw + fC)
730+ let fF = (fx + fD)
731+ let cd = cA([H(fw, bq), H(fx, br)])
732+ let cc = cA([H(fE, bq), H(fF, br)])
733+ let ea = if ((cc > cd))
731734 then true
732735 else throw()
733- if ((dY == dY))
736+ if ((ea == ea))
734737 then {
735- let fE = fraction(eQ, (ca - cb), cb, FLOOR)
736- let du = L(bP(H(fD, dS), H(fC, dR)), a)
737- let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, ah), by(fx, fy, toInt(fE), du, 0, 0, height, lastBlock.timestamp, 0, 0))]
738- let fF = fraction(fv, a, fu)
739- let fG = fraction(fq, a, (fF + a))
740- let fH = (fq - fG)
741- let fI = fraction(eQ, toBigInt(fH), toBigInt(fv))
742- let fJ = toInt(fraction((fE - fI), b, fI))
743- $Tuple4(toInt(fE), er, cx, fJ)
738+ let fG = fraction(eS, (cc - cd), cd, FLOOR)
739+ let dw = L(bR(H(fF, dU), H(fE, dT)), a)
740+ let et = [IntegerEntry(ab(), dw), IntegerEntry(ac(height, lastBlock.timestamp), dw), StringEntry(af(dj, ah), bA(fz, fA, toInt(fG), dw, 0, 0, height, lastBlock.timestamp, 0, 0))]
741+ let fH = fraction(fx, a, fw)
742+ let fI = fraction(fs, a, (fH + a))
743+ let fJ = (fs - fI)
744+ let fK = fraction(eS, toBigInt(fJ), toBigInt(fx))
745+ let fL = toInt(fraction((fG - fK), b, fK))
746+ $Tuple4(toInt(fG), et, cz, fL)
744747 }
745748 else throw("Strict value is not equal to itself.")
746749 }
748751 }
749752
750753
751-func fK (fL,fM,fN,fm,fO,fP) = {
752- let di = toBase58String(value(bl))
753- let dj = toBase58String(value(bm))
754+func fM (fN,fO,fP,fo,fQ,fR) = {
754755 let dk = toBase58String(value(bn))
755- let fQ = bo
756- let fR = bp
757- let fS = bk
758- let dh = if ((fm == bx))
759- then fO
760- else fm
761- let fk = value(fN[0])
762- let df = value(fk.assetId)
763- let dL = fk.amount
764- let eR = eK(e, e, e)
765- if ((eR == eR))
756+ let dl = toBase58String(value(bo))
757+ let dm = toBase58String(value(bp))
758+ let fS = bq
759+ let fT = br
760+ let fU = bm
761+ let dj = if ((fo == bz))
762+ then fQ
763+ else fo
764+ let fm = value(fP[0])
765+ let dh = value(fm.assetId)
766+ let dN = fm.amount
767+ let eT = eM(e, e, e)
768+ if ((eT == eT))
766769 then {
767- let de = toBase58String(fP)
768- if ((di != toBase58String(df)))
770+ let dg = toBase58String(fR)
771+ if ((dk != toBase58String(dh)))
769772 then throw("Wrong LP")
770773 else {
771- let dp = bN(dj)
772- let dr = bN(dk)
773- let fT = {
774- let aS = invoke(this, "getOneTknV2READONLY", [fL, dL], nil)
775- if ($isInstanceOf(aS, "(Int, Int)"))
776- then aS
777- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
774+ let dr = bP(dl)
775+ let dt = bP(dm)
776+ let fV = {
777+ let aU = invoke(this, "getOneTknV2READONLY", [fN, dN], nil)
778+ if ($isInstanceOf(aU, "(Int, Int)"))
779+ then aU
780+ else throw(($getType(aU) + " couldn't be cast to (Int, Int)"))
778781 }
779- if ((fT == fT))
782+ if ((fV == fV))
780783 then {
781- let cx = fT._2
782- let fU = fT._1
783- let fV = if (if ((fM > 0))
784- then (fM > fU)
784+ let cz = fV._2
785+ let fW = fV._1
786+ let fX = if (if ((fO > 0))
787+ then (fO > fW)
785788 else false)
786- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
787- else fU
788- let fW = if ((fL == dj))
789- then $Tuple4(fV, 0, ((dp - fV) - cx), dr)
790- else if ((fL == dk))
791- then $Tuple4(0, fV, dp, ((dr - fV) - cx))
789+ then aP(makeString(["amount to receive is less than ", toString(fO)], ""))
790+ else fW
791+ let fY = if ((fN == dl))
792+ then $Tuple4(fX, 0, ((dr - fX) - cz), dt)
793+ else if ((fN == dm))
794+ then $Tuple4(0, fX, dr, ((dt - fX) - cz))
792795 else throw("invalid out asset id")
793- let fX = fW._1
794- let fY = fW._2
795- let fC = fW._3
796- let fD = fW._4
797- let fZ = bP(H(fD, fR), H(fC, fQ))
798- let ga = L(fZ, a)
799- let gb = if ((fL == "WAVES"))
796+ let fZ = fY._1
797+ let ga = fY._2
798+ let fE = fY._3
799+ let fF = fY._4
800+ let gb = bR(H(fF, fT), H(fE, fS))
801+ let gc = L(gb, a)
802+ let gd = if ((fN == "WAVES"))
800803 then unit
801- else fromBase58String(fL)
802- let gc = if ((cx > 0))
803- then [ScriptTransfer(aX, cx, gb)]
804+ else fromBase58String(fN)
805+ let ge = if ((cz > 0))
806+ then [ScriptTransfer(aZ, cz, gd)]
804807 else nil
805- let dB = ([ScriptTransfer(dh, fV, gb), StringEntry(ai(toString(dh), de), bJ(fX, fY, dL, ga, height, lastBlock.timestamp)), IntegerEntry(ab(), ga), IntegerEntry(ac(height, lastBlock.timestamp), ga)] ++ gc)
806- if ((dB == dB))
808+ let dD = ([ScriptTransfer(dj, fX, gd), StringEntry(ai(toString(dj), dg), bL(fZ, ga, dN, gc, height, lastBlock.timestamp)), IntegerEntry(ab(), gc), IntegerEntry(ac(height, lastBlock.timestamp), gc)] ++ ge)
809+ if ((dD == dD))
807810 then {
808- let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809- if ((gd == gd))
811+ let gf = invoke(aS, "burn", [dN], [AttachedPayment(dh, dN)])
812+ if ((gf == gf))
810813 then {
811- let ge = {
812- let gf = if ((this == aX))
814+ let gg = {
815+ let gh = if ((this == aZ))
813816 then 0
814- else cx
815- let gg = if ((bc(fL) == bm))
817+ else cz
818+ let gi = if ((be(fN) == bo))
816819 then true
817820 else false
818- if (gg)
819- then $Tuple2(-((fU + gf)), 0)
820- else $Tuple2(0, -((fU + gf)))
821+ if (gi)
822+ then $Tuple2(-((fW + gh)), 0)
823+ else $Tuple2(0, -((fW + gh)))
821824 }
822- let eT = ge._1
823- let eU = ge._2
824- let gh = eS(eT, eU, 0)
825- let gi = gh._1
826- let eJ = gh._2
827- let gj = eW(eR, eJ)
828- if ((gj == gj))
829- then $Tuple2((dB ++ gi), fV)
825+ let eV = gg._1
826+ let eW = gg._2
827+ let gj = eU(eV, eW, 0)
828+ let gk = gj._1
829+ let eL = gj._2
830+ let gl = eY(eT, eL)
831+ if ((gl == gl))
832+ then $Tuple2((dD ++ gk), fX)
830833 else throw("Strict value is not equal to itself.")
831834 }
832835 else throw("Strict value is not equal to itself.")
840843 }
841844
842845
843-func gk () = {
844- let gl = getString(Z())
845- if ($isInstanceOf(gl, "String"))
846+func gm () = {
847+ let gn = getString(Z())
848+ if ($isInstanceOf(gn, "String"))
846849 then {
847- let cC = gl
848- fromBase58String(cC)
850+ let cE = gn
851+ fromBase58String(cE)
849852 }
850- else if ($isInstanceOf(gl, "Unit"))
853+ else if ($isInstanceOf(gn, "Unit"))
851854 then unit
852855 else throw("Match error")
853856 }
854857
855858
856-func gm () = {
857- let gl = getString(aa())
858- if ($isInstanceOf(gl, "String"))
859+func go () = {
860+ let gn = getString(aa())
861+ if ($isInstanceOf(gn, "String"))
859862 then {
860- let cC = gl
861- fromBase58String(cC)
863+ let cE = gn
864+ fromBase58String(cE)
862865 }
863- else if ($isInstanceOf(gl, "Unit"))
866+ else if ($isInstanceOf(gn, "Unit"))
864867 then unit
865868 else throw("Match error")
866869 }
867870
868871
869-let gn = throw("Permission denied")
872+let gp = throw("Permission denied")
870873
871-func go (cP) = {
872- let gl = gk()
873- if ($isInstanceOf(gl, "ByteVector"))
874+func gq (cR) = {
875+ let gn = gm()
876+ if ($isInstanceOf(gn, "ByteVector"))
874877 then {
875- let gp = gl
876- (cP.callerPublicKey == gp)
878+ let gr = gn
879+ (cR.callerPublicKey == gr)
877880 }
878- else if ($isInstanceOf(gl, "Unit"))
879- then (cP.caller == this)
881+ else if ($isInstanceOf(gn, "Unit"))
882+ then (cR.caller == this)
880883 else throw("Match error")
881884 }
882885
883886
884-func gq (cP) = {
885- let gl = gk()
886- if ($isInstanceOf(gl, "ByteVector"))
887+func gs (cR) = {
888+ let gn = gm()
889+ if ($isInstanceOf(gn, "ByteVector"))
887890 then {
888- let gp = gl
889- if ((cP.callerPublicKey == gp))
891+ let gr = gn
892+ if ((cR.callerPublicKey == gr))
890893 then true
891- else gn
894+ else gp
892895 }
893- else if ($isInstanceOf(gl, "Unit"))
894- then if ((cP.caller == this))
896+ else if ($isInstanceOf(gn, "Unit"))
897+ then if ((cR.caller == this))
895898 then true
896- else gn
899+ else gp
897900 else throw("Match error")
898901 }
899902
900903
901-func gr (gs,et,gt) = {
902- let bg = aY()
903- let dj = bg[w]
904- let dk = bg[x]
905- let eu = g
906- let ew = parseBigIntValue(l)
907- let cD = (parseBigIntValue(aU) * ew)
908- let cz = if ((gs == false))
909- then [(toBigInt(bN(dj)) + gt), toBigInt(bN(dk))]
910- else [(toBigInt(bN(dk)) + gt), toBigInt(bN(dj))]
911- let ev = cz[0]
912- let cC = ev
913- let cE = (cD * eu)
914- let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
915- let ey = ((cC + ((et * ew) / cE)) - et)
916- func cN (cO,ez) = {
917- let gu = cO
918- let eB = gu._1
919- let dc = gu._2
920- if ((dc != unit))
921- then cO
904+func gt (gu,ev,gv) = {
905+ let bi = ba()
906+ let dl = bi[w]
907+ let dm = bi[x]
908+ let ew = g
909+ let ey = parseBigIntValue(l)
910+ let cF = (parseBigIntValue(aW) * ey)
911+ let cB = if ((gu == false))
912+ then [(toBigInt(bP(dl)) + gv), toBigInt(bP(dm))]
913+ else [(toBigInt(bP(dm)) + gv), toBigInt(bP(dl))]
914+ let ex = cB[0]
915+ let cE = ex
916+ let cG = (cF * ew)
917+ let ez = (((((ev * ev) / (ex * ew)) * ev) * ey) / (cG * ew))
918+ let eA = ((cE + ((ev * ey) / cG)) - ev)
919+ func cP (cQ,eB) = {
920+ let gw = cQ
921+ let eD = gw._1
922+ let de = gw._2
923+ if ((de != unit))
924+ then cQ
922925 else {
923- let eC = (((eB * eB) + ex) / ((g * eB) + ey))
924- let eD = X((eC - value(eB)))
925- if ((f >= eD))
926- then $Tuple2(eC, ez)
927- else $Tuple2(eC, unit)
926+ let eE = (((eD * eD) + ez) / ((g * eD) + eA))
927+ let eF = X((eE - value(eD)))
928+ if ((f >= eF))
929+ then $Tuple2(eE, eB)
930+ else $Tuple2(eE, unit)
928931 }
929932 }
930933
931- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
932- let gv = {
933- let cV = cT
934- let cW = size(cV)
935- let cX = $Tuple2(et, unit)
936- func cY (cZ,da) = if ((da >= cW))
937- then cZ
938- else cN(cZ, cV[da])
934+ let cV = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
935+ let gx = {
936+ let cX = cV
937+ let cY = size(cX)
938+ let cZ = $Tuple2(ev, unit)
939+ func da (db,dc) = if ((dc >= cY))
940+ then db
941+ else cP(db, cX[dc])
939942
940- func db (cZ,da) = if ((da >= cW))
941- then cZ
943+ func dd (db,dc) = if ((dc >= cY))
944+ then db
942945 else throw("List size exceeds 15")
943946
944- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
947+ dd(da(da(da(da(da(da(da(da(da(da(da(da(da(da(da(cZ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
945948 }
946- let eB = gv._1
947- let dc = gv._2
948- if ((dc != unit))
949- then eB
950- else throw(("Y calculation error, Y = " + toString(eB)))
949+ let eD = gx._1
950+ let de = gx._2
951+ if ((de != unit))
952+ then eD
953+ else throw(("Y calculation error, Y = " + toString(eD)))
951954 }
952955
953956
954-@Callable(cP)
955-func calculateAmountOutForSwapREADONLY (gw,gs,gx) = {
956- let gy = if ((gs == false))
957+func gy () = valueOrElse(getBoolean(aS, aE(toString(this))), false)
958+
959+
960+@Callable(cR)
961+func calculateAmountOutForSwapREADONLY (gz,gu,gA) = {
962+ let gB = if ((gu == false))
957963 then {
958- let gz = aJ(this, ak())
959- let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960- $Tuple2(gz, gt)
964+ let gC = aL(this, ak())
965+ let gv = (toBigInt(bP(aL(this, aj()))) + toBigInt(gz))
966+ $Tuple2(gC, gv)
961967 }
962968 else {
963- let gz = aJ(this, aj())
964- let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965- $Tuple2(gz, gt)
969+ let gC = aL(this, aj())
970+ let gv = (toBigInt(bP(aL(this, ak()))) + toBigInt(gz))
971+ $Tuple2(gC, gv)
966972 }
967- let gz = gy._1
968- let gt = gy._2
969- let bg = aY()
970- let dj = bg[w]
971- let dk = bg[x]
972- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
973- let et = cy(cz)
974- let eB = gr(gs, et, toBigInt(gw))
975- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
976- let gB = max([0, toInt(gA)])
977- let gC = if ((gs == false))
978- then [((toBigInt(bN(dj)) + toBigInt(gw)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
979- else [(toBigInt(bN(dj)) - gA), ((toBigInt(bN(dk)) + toBigInt(gw)) + toBigInt(gx))]
980- let gD = cy(gC)
981- let dY = if ((gD >= et))
973+ let gC = gB._1
974+ let gv = gB._2
975+ let bi = ba()
976+ let dl = bi[w]
977+ let dm = bi[x]
978+ let cB = [toBigInt(bP(dl)), toBigInt(bP(dm))]
979+ let ev = cA(cB)
980+ let eD = gt(gu, ev, toBigInt(gz))
981+ let gD = ((toBigInt(bP(gC)) - eD) - toBigInt(1))
982+ let gE = max([0, toInt(gD)])
983+ let gF = if ((gu == false))
984+ then [((toBigInt(bP(dl)) + toBigInt(gz)) + toBigInt(gA)), (toBigInt(bP(dm)) - gD)]
985+ else [(toBigInt(bP(dl)) - gD), ((toBigInt(bP(dm)) + toBigInt(gz)) + toBigInt(gA))]
986+ let gG = cA(gF)
987+ let ea = if ((gG >= ev))
982988 then true
983- else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__"))
984- if ((dY == dY))
985- then $Tuple2(nil, gB)
989+ else throw(makeString(["new D is fewer error", toString(ev), toString(gG)], "__"))
990+ if ((ea == ea))
991+ then $Tuple2(nil, gE)
986992 else throw("Strict value is not equal to itself.")
987993 }
988994
989995
990996
991-@Callable(cP)
992-func calculateAmountOutForSwapAndSendTokens (gw,gs,gE,gF,gx) = {
993- let gG = {
994- let aS = invoke(aQ, "getSwapContractREADONLY", nil, nil)
995- if ($isInstanceOf(aS, "String"))
996- then aS
997- else throw(($getType(aS) + " couldn't be cast to String"))
997+@Callable(cR)
998+func calculateAmountOutForSwapAndSendTokens (gz,gu,gH,gI,gA) = {
999+ let gJ = {
1000+ let aU = invoke(aS, "getSwapContractREADONLY", nil, nil)
1001+ if ($isInstanceOf(aU, "String"))
1002+ then aU
1003+ else throw(($getType(aU) + " couldn't be cast to String"))
9981004 }
999- let gH = [if ((value(cP.payments[0]).amount >= gw))
1005+ let gK = [if ((value(cR.payments[0]).amount >= gz))
10001006 then true
1001- else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG)))
1007+ else aP("Wrong amount"), if ((cR.caller == addressFromStringValue(gJ)))
10021008 then true
1003- else aN("Permission denied")]
1004- if ((gH == gH))
1009+ else aP("Permission denied")]
1010+ if ((gK == gK))
10051011 then {
1006- let fk = value(cP.payments[0])
1007- let gI = be(fk.assetId)
1008- let gJ = if ((gs == false))
1012+ let fm = value(cR.payments[0])
1013+ let gL = bg(fm.assetId)
1014+ let gM = if ((gu == false))
10091015 then {
1010- let gz = aJ(this, ak())
1011- let gt = (bN(gI) - value(cP.payments[0]).amount)
1012- $Tuple2(gz, gt)
1016+ let gC = aL(this, ak())
1017+ let gv = (bP(gL) - value(cR.payments[0]).amount)
1018+ $Tuple2(gC, gv)
10131019 }
10141020 else {
1015- let gz = aJ(this, aj())
1016- let gt = (bN(gI) - value(cP.payments[0]).amount)
1017- $Tuple2(gz, gt)
1021+ let gC = aL(this, aj())
1022+ let gv = (bP(gL) - value(cR.payments[0]).amount)
1023+ $Tuple2(gC, gv)
10181024 }
1019- let gz = gJ._1
1020- let gt = gJ._2
1021- let bg = aY()
1022- let dj = bg[w]
1023- let dk = bg[x]
1024- let cz = if ((gs == false))
1025- then [(toBigInt(bN(dj)) - toBigInt(value(cP.payments[0]).amount)), toBigInt(bN(dk))]
1026- else [toBigInt(bN(dj)), (toBigInt(bN(dk)) - toBigInt(value(cP.payments[0]).amount))]
1027- let et = cy(cz)
1028- let eB = gr(gs, et, toBigInt(0))
1029- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
1030- let gB = max([0, toInt(gA)])
1031- let gK = if ((gB >= gE))
1025+ let gC = gM._1
1026+ let gv = gM._2
1027+ let bi = ba()
1028+ let dl = bi[w]
1029+ let dm = bi[x]
1030+ let cB = if ((gu == false))
1031+ then [(toBigInt(bP(dl)) - toBigInt(value(cR.payments[0]).amount)), toBigInt(bP(dm))]
1032+ else [toBigInt(bP(dl)), (toBigInt(bP(dm)) - toBigInt(value(cR.payments[0]).amount))]
1033+ let ev = cA(cB)
1034+ let eD = gt(gu, ev, toBigInt(0))
1035+ let gD = ((toBigInt(bP(gC)) - eD) - toBigInt(1))
1036+ let gE = max([0, toInt(gD)])
1037+ let gN = if ((gE >= gH))
10321038 then true
10331039 else throw("Exchange result is fewer coins than expected")
1034- if ((gK == gK))
1040+ if ((gN == gN))
10351041 then {
1036- let gC = if ((gs == false))
1037- then [(toBigInt(bN(dj)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
1038- else [(toBigInt(bN(dj)) - gA), (toBigInt(bN(dk)) + toBigInt(gx))]
1039- let gD = cy(gC)
1040- let dY = if ((gD >= et))
1042+ let gF = if ((gu == false))
1043+ then [(toBigInt(bP(dl)) + toBigInt(gA)), (toBigInt(bP(dm)) - gD)]
1044+ else [(toBigInt(bP(dl)) - gD), (toBigInt(bP(dm)) + toBigInt(gA))]
1045+ let gG = cA(gF)
1046+ let ea = if ((gG >= ev))
10411047 then true
10421048 else throw("new D is fewer error")
1043- if ((dY == dY))
1044- then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB)
1049+ if ((ea == ea))
1050+ then $Tuple2([ScriptTransfer(addressFromStringValue(gI), gE, be(gC))], gE)
10451051 else throw("Strict value is not equal to itself.")
10461052 }
10471053 else throw("Strict value is not equal to itself.")
10511057
10521058
10531059
1054-@Callable(cP)
1060+@Callable(cR)
10551061 func constructor (Y) = {
1056- let ex = gq(cP)
1057- if ((ex == ex))
1062+ let ez = gs(cR)
1063+ if ((ez == ez))
10581064 then [StringEntry(Y(), Y)]
10591065 else throw("Strict value is not equal to itself.")
10601066 }
10611067
10621068
10631069
1064-@Callable(cP)
1065-func setManager (gL) = {
1066- let ex = gq(cP)
1067- if ((ex == ex))
1070+@Callable(cR)
1071+func setManager (gO) = {
1072+ let ez = gs(cR)
1073+ if ((ez == ez))
10681074 then {
1069- let gM = fromBase58String(gL)
1070- if ((gM == gM))
1071- then [StringEntry(aa(), gL)]
1075+ let gP = fromBase58String(gO)
1076+ if ((gP == gP))
1077+ then [StringEntry(aa(), gO)]
10721078 else throw("Strict value is not equal to itself.")
10731079 }
10741080 else throw("Strict value is not equal to itself.")
10761082
10771083
10781084
1079-@Callable(cP)
1085+@Callable(cR)
10801086 func confirmManager () = {
1081- let cu = gm()
1082- let gN = if (isDefined(cu))
1087+ let cw = go()
1088+ let gQ = if (isDefined(cw))
10831089 then true
10841090 else throw("No pending manager")
1085- if ((gN == gN))
1091+ if ((gQ == gQ))
10861092 then {
1087- let gO = if ((cP.callerPublicKey == value(cu)))
1093+ let gR = if ((cR.callerPublicKey == value(cw)))
10881094 then true
10891095 else throw("You are not pending manager")
1090- if ((gO == gO))
1091- then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
1096+ if ((gR == gR))
1097+ then [StringEntry(Z(), toBase58String(value(cw))), DeleteEntry(aa())]
10921098 else throw("Strict value is not equal to itself.")
10931099 }
10941100 else throw("Strict value is not equal to itself.")
10961102
10971103
10981104
1099-@Callable(cP)
1100-func put (gP,gQ) = {
1101- let gR = bs()
1102- let gS = valueOrErrorMessage(addressFromString(gR[C]), "Wr st addr")
1103- let gT = valueOrErrorMessage(addressFromString(gR[E]), "Wr sl addr")
1104- if ((0 > gP))
1105+@Callable(cR)
1106+func put (gS,gT) = {
1107+ let gU = bu()
1108+ let gV = valueOrErrorMessage(addressFromString(gU[C]), "Wr st addr")
1109+ let gW = valueOrErrorMessage(addressFromString(gU[E]), "Wr sl addr")
1110+ if ((0 > gS))
11051111 then throw("Wrong slippage")
1106- else if ((size(cP.payments) != 2))
1112+ else if ((size(cR.payments) != 2))
11071113 then throw("2 pmnts expd")
11081114 else {
1109- let gU = toBigInt(value(cP.payments[0]).amount)
1110- let gV = toBigInt(value(cP.payments[1]).amount)
1111- let eO = (toBigInt(bN(be(bm))) - gU)
1112- if ((eO == eO))
1115+ let gX = toBigInt(value(cR.payments[0]).amount)
1116+ let gY = toBigInt(value(cR.payments[1]).amount)
1117+ let eQ = (toBigInt(bP(bg(bo))) - gX)
1118+ if ((eQ == eQ))
11131119 then {
1114- let eP = (toBigInt(bN(be(bn))) - gV)
1115- if ((eP == eP))
1120+ let eR = (toBigInt(bP(bg(bp))) - gY)
1121+ if ((eR == eR))
11161122 then {
1117- let eQ = toBigInt(value(assetInfo(bl)).quantity)
1118- if ((eQ == eQ))
1123+ let eS = toBigInt(value(assetInfo(bn)).quantity)
1124+ if ((eS == eS))
11191125 then {
1120- let eR = eK(gU, gV, toBigInt(0))
1121- if ((eR == eR))
1126+ let eT = eM(gX, gY, toBigInt(0))
1127+ if ((eT == eT))
11221128 then {
1123- let gW = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gP, true, false, true, 0, "")
1124- let el = gW._2
1125- let gX = gW._7
1126- let dB = gW._9
1127- let em = gW._10
1128- let en = gW._11
1129- let dj = gW._12
1130- let dk = gW._13
1131- let dX = invoke(aQ, "emit", [el], nil)
1132- if ((dX == dX))
1129+ let gZ = fn(toString(cR.caller), toBase58String(cR.transactionId), AttachedPayment(value(cR.payments[0]).assetId, value(cR.payments[0]).amount), cR.payments[1], gS, true, false, true, 0, "")
1130+ let en = gZ._2
1131+ let ha = gZ._7
1132+ let dD = gZ._9
1133+ let eo = gZ._10
1134+ let ep = gZ._11
1135+ let dl = gZ._12
1136+ let dm = gZ._13
1137+ let dZ = invoke(aS, "emit", [en], nil)
1138+ if ((dZ == dZ))
11331139 then {
1134- let gY = {
1135- let gl = dX
1136- if ($isInstanceOf(gl, "Address"))
1140+ let hb = {
1141+ let gn = dZ
1142+ if ($isInstanceOf(gn, "Address"))
11371143 then {
1138- let gZ = gl
1139- invoke(gZ, "emit", [el], nil)
1144+ let hc = gn
1145+ invoke(hc, "emit", [en], nil)
11401146 }
11411147 else unit
11421148 }
1143- if ((gY == gY))
1149+ if ((hb == hb))
11441150 then {
1145- let ha = if ((em > 0))
1146- then invoke(gT, "put", nil, [AttachedPayment(dj, em)])
1151+ let hd = if ((eo > 0))
1152+ then invoke(gW, "put", nil, [AttachedPayment(dl, eo)])
11471153 else nil
1148- if ((ha == ha))
1154+ if ((hd == hd))
11491155 then {
1150- let hb = if ((en > 0))
1151- then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
1156+ let he = if ((ep > 0))
1157+ then invoke(gW, "put", nil, [AttachedPayment(dm, ep)])
11521158 else nil
1153- if ((hb == hb))
1159+ if ((he == he))
11541160 then {
1155- let hc = if (gQ)
1161+ let hf = if (gT)
11561162 then {
1157- let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)])
1158- if ((hd == hd))
1163+ let hg = invoke(gV, "stake", nil, [AttachedPayment(ha, en)])
1164+ if ((hg == hg))
11591165 then nil
11601166 else throw("Strict value is not equal to itself.")
11611167 }
1162- else [ScriptTransfer(cP.caller, el, gX)]
1163- let he = eS(0, 0, 0)
1164- let gi = he._1
1165- let eJ = he._2
1166- let hf = if ((eJ >= eR))
1168+ else [ScriptTransfer(cR.caller, en, ha)]
1169+ let hh = eU(0, 0, 0)
1170+ let gk = hh._1
1171+ let eL = hh._2
1172+ let hi = if ((eL >= eT))
11671173 then true
1168- else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " "))
1169- if ((hf == hf))
1174+ else aP(makeString(["updated DLp lower than current DLp", toString(eQ), toString(eR), toString(eS), toString(eT), toString(eL), toString(eo), toString(ep)], " "))
1175+ if ((hi == hi))
11701176 then {
1171- let hg = value(assetInfo(bl)).quantity
1172- if ((hg == hg))
1173- then ((dB ++ hc) ++ gi)
1177+ let hj = value(assetInfo(bn)).quantity
1178+ if ((hj == hj))
1179+ then ((dD ++ hf) ++ gk)
11741180 else throw("Strict value is not equal to itself.")
11751181 }
11761182 else throw("Strict value is not equal to itself.")
11951201
11961202
11971203
1198-@Callable(cP)
1199-func putOneTknV2 (fM,gQ) = {
1200- let hh = {
1201- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1202- if ($isInstanceOf(aS, "Boolean"))
1203- then aS
1204- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1204+@Callable(cR)
1205+func putOneTknV2 (fO,gT) = {
1206+ let hk = {
1207+ let aU = invoke(aS, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1208+ if ($isInstanceOf(aU, "Boolean"))
1209+ then aU
1210+ else throw(($getType(aU) + " couldn't be cast to Boolean"))
12051211 }
1206- let hi = if (if (if (aV())
1212+ let hl = if (if (if (aX())
12071213 then true
1208- else (bk == q))
1214+ else (bm == q))
12091215 then true
1210- else (bk == s))
1216+ else (bm == s))
12111217 then true
1212- else hh
1213- let gH = [if (if (!(hi))
1218+ else hk
1219+ let gK = [if (if (!(hl))
12141220 then true
1215- else go(cP))
1221+ else gq(cR))
12161222 then true
1217- else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
1223+ else aP("put operation is blocked by admin"), if ((size(cR.payments) == 1))
12181224 then true
1219- else aN("exactly 1 payment are expected")]
1220- if ((gH == gH))
1225+ else aP("exactly 1 payment are expected")]
1226+ if ((gK == gK))
12211227 then {
1222- let dj = toBase58String(value(bm))
1223- let dk = toBase58String(value(bn))
1224- let di = bl
1225- let fQ = bo
1226- let fR = bp
1227- let dh = if ((cP.caller == this))
1228- then cP.originCaller
1229- else cP.caller
1230- let fk = value(cP.payments[0])
1231- let df = toBase58String(value(fk.assetId))
1232- let dL = fk.amount
1233- let eR = if ((fk.assetId == bm))
1234- then eK(toBigInt(dL), toBigInt(0), toBigInt(0))
1235- else eK(toBigInt(0), toBigInt(dL), toBigInt(0))
1236- if ((eR == eR))
1228+ let dl = toBase58String(value(bo))
1229+ let dm = toBase58String(value(bp))
1230+ let dk = bn
1231+ let fS = bq
1232+ let fT = br
1233+ let dj = if ((cR.caller == this))
1234+ then cR.originCaller
1235+ else cR.caller
1236+ let fm = value(cR.payments[0])
1237+ let dh = toBase58String(value(fm.assetId))
1238+ let dN = fm.amount
1239+ let eT = if ((fm.assetId == bo))
1240+ then eM(toBigInt(dN), toBigInt(0), toBigInt(0))
1241+ else eM(toBigInt(0), toBigInt(dN), toBigInt(0))
1242+ if ((eT == eT))
12371243 then {
1238- let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1239- if ((hj == hj))
1244+ let hm = fr(dN, dh, toString(dj), toBase58String(cR.transactionId), true)
1245+ if ((hm == hm))
12401246 then {
1241- let cx = hj._3
1242- let dB = hj._2
1243- let hk = hj._1
1244- let el = if (if ((fM > 0))
1245- then (fM > hk)
1247+ let cz = hm._3
1248+ let dD = hm._2
1249+ let hn = hm._1
1250+ let en = if (if ((fO > 0))
1251+ then (fO > hn)
12461252 else false)
1247- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
1248- else hk
1249- let gW = invoke(aQ, "emit", [el], nil)
1250- if ((gW == gW))
1253+ then aP(makeString(["amount to receive is less than ", toString(fO)], ""))
1254+ else hn
1255+ let gZ = invoke(aS, "emit", [en], nil)
1256+ if ((gZ == gZ))
12511257 then {
1252- let gY = {
1253- let gl = gW
1254- if ($isInstanceOf(gl, "Address"))
1258+ let hb = {
1259+ let gn = gZ
1260+ if ($isInstanceOf(gn, "Address"))
12551261 then {
1256- let gZ = gl
1257- invoke(gZ, "emit", [el], nil)
1262+ let hc = gn
1263+ invoke(hc, "emit", [en], nil)
12581264 }
12591265 else unit
12601266 }
1261- if ((gY == gY))
1267+ if ((hb == hb))
12621268 then {
1263- let hc = if (gQ)
1269+ let hf = if (gT)
12641270 then {
1265- let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1266- if ((hd == hd))
1271+ let hg = invoke(bw, "stakeFor", [toString(cR.caller)], [AttachedPayment(dk, en)])
1272+ if ((hg == hg))
12671273 then nil
12681274 else throw("Strict value is not equal to itself.")
12691275 }
1270- else [ScriptTransfer(cP.caller, el, di)]
1271- let gc = if ((cx > 0))
1272- then [ScriptTransfer(aX, cx, fromBase58String(df))]
1276+ else [ScriptTransfer(cR.caller, en, dk)]
1277+ let ge = if ((cz > 0))
1278+ then [ScriptTransfer(aZ, cz, fromBase58String(dh))]
12731279 else nil
1274- let hl = if ((this == aX))
1280+ let ho = if ((this == aZ))
12751281 then $Tuple2(0, 0)
12761282 else {
1277- let hm = if ((fk.assetId == bm))
1283+ let hp = if ((fm.assetId == bo))
12781284 then true
12791285 else false
1280- if (hm)
1281- then $Tuple2(-(cx), 0)
1282- else $Tuple2(0, -(cx))
1286+ if (hp)
1287+ then $Tuple2(-(cz), 0)
1288+ else $Tuple2(0, -(cz))
12831289 }
1284- let eT = hl._1
1285- let eU = hl._2
1286- let hn = eS(eT, eU, 0)
1287- let gi = hn._1
1288- let eJ = hn._2
1289- let gj = eW(eR, eJ)
1290- if ((gj == gj))
1291- then $Tuple2((((dB ++ hc) ++ gc) ++ gi), el)
1290+ let eV = ho._1
1291+ let eW = ho._2
1292+ let hq = eU(eV, eW, 0)
1293+ let gk = hq._1
1294+ let eL = hq._2
1295+ let gl = eY(eT, eL)
1296+ if ((gl == gl))
1297+ then $Tuple2((((dD ++ hf) ++ ge) ++ gk), en)
12921298 else throw("Strict value is not equal to itself.")
12931299 }
12941300 else throw("Strict value is not equal to itself.")
13041310
13051311
13061312
1307-@Callable(cP)
1308-func putForFree (ho) = if ((0 > ho))
1313+@Callable(cR)
1314+func putForFree (hr) = if ((0 > hr))
13091315 then throw("Wrong slpg")
1310- else if ((size(cP.payments) != 2))
1316+ else if ((size(cR.payments) != 2))
13111317 then throw("2 pmnts expd")
13121318 else {
1313- let hp = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], ho, false, false, true, 0, "")
1314- let dB = hp._9
1315- let gU = toBigInt(value(cP.payments[0]).amount)
1316- let gV = toBigInt(value(cP.payments[1]).amount)
1317- let eR = eK(gU, gV, toBigInt(0))
1318- if ((eR == eR))
1319+ let hs = fn(toString(cR.caller), toBase58String(cR.transactionId), AttachedPayment(value(cR.payments[0]).assetId, value(cR.payments[0]).amount), cR.payments[1], hr, false, false, true, 0, "")
1320+ let dD = hs._9
1321+ let gX = toBigInt(value(cR.payments[0]).amount)
1322+ let gY = toBigInt(value(cR.payments[1]).amount)
1323+ let eT = eM(gX, gY, toBigInt(0))
1324+ if ((eT == eT))
13191325 then {
1320- let hq = eS(0, 0, 0)
1321- let gi = hq._1
1322- let eJ = hq._2
1323- let gj = eW(eR, eJ)
1324- if ((gj == gj))
1325- then (dB ++ gi)
1326+ let ht = eU(0, 0, 0)
1327+ let gk = ht._1
1328+ let eL = ht._2
1329+ let gl = eY(eT, eL)
1330+ if ((gl == gl))
1331+ then (dD ++ gk)
13261332 else throw("Strict value is not equal to itself.")
13271333 }
13281334 else throw("Strict value is not equal to itself.")
13301336
13311337
13321338
1333-@Callable(cP)
1339+@Callable(cR)
13341340 func get () = {
1335- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1336- if ((eR == eR))
1341+ let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1342+ if ((eT == eT))
13371343 then {
1338- let dX = fj(cP)
1339- let hr = dX._1
1340- let dA = dX._2
1341- let dL = dX._3
1342- let df = dX._4
1343- let dB = dX._5
1344- let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1345- if ((ey == ey))
1344+ let dZ = fl(cR)
1345+ let hu = dZ._1
1346+ let dC = dZ._2
1347+ let dN = dZ._3
1348+ let dh = dZ._4
1349+ let dD = dZ._5
1350+ let eA = invoke(aS, "burn", [dN], [AttachedPayment(dh, dN)])
1351+ if ((eA == eA))
13461352 then {
1347- let hs = eS(-(hr), -(dA), 0)
1348- let gi = hs._1
1349- let eJ = hs._2
1350- let gj = eW(eR, eJ)
1351- if ((gj == gj))
1352- then (dB ++ gi)
1353+ let hv = eU(-(hu), -(dC), 0)
1354+ let gk = hv._1
1355+ let eL = hv._2
1356+ let gl = eY(eT, eL)
1357+ if ((gl == gl))
1358+ then (dD ++ gk)
13531359 else throw("Strict value is not equal to itself.")
13541360 }
13551361 else throw("Strict value is not equal to itself.")
13591365
13601366
13611367
1362-@Callable(cP)
1363-func getOneTknV2 (fL,fM) = {
1364- let hh = {
1365- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1366- if ($isInstanceOf(aS, "Boolean"))
1367- then aS
1368- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1368+@Callable(cR)
1369+func getOneTknV2 (fN,fO) = {
1370+ let hk = {
1371+ let aU = invoke(aS, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1372+ if ($isInstanceOf(aU, "Boolean"))
1373+ then aU
1374+ else throw(($getType(aU) + " couldn't be cast to Boolean"))
13691375 }
1370- let ht = if (if (aV())
1376+ let hw = if (if (aX())
13711377 then true
1372- else (bk == s))
1378+ else (bm == s))
13731379 then true
1374- else hh
1375- let gH = [if (if (!(ht))
1380+ else hk
1381+ let gK = [if (if (!(hw))
13761382 then true
1377- else go(cP))
1383+ else gq(cR))
13781384 then true
1379- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
1385+ else aP("get operation is blocked by admin"), if ((size(cR.payments) == 1))
13801386 then true
1381- else aN("exactly 1 payment are expected")]
1382- if ((gH == gH))
1387+ else aP("exactly 1 payment are expected")]
1388+ if ((gK == gK))
13831389 then {
1384- let hu = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId)
1385- let dB = hu._1
1386- let fV = hu._2
1387- $Tuple2(dB, fV)
1390+ let hx = fM(fN, fO, cR.payments, cR.caller, cR.originCaller, cR.transactionId)
1391+ let dD = hx._1
1392+ let fX = hx._2
1393+ $Tuple2(dD, fX)
13881394 }
13891395 else throw("Strict value is not equal to itself.")
13901396 }
13911397
13921398
13931399
1394-@Callable(cP)
1400+@Callable(cR)
13951401 func refreshDLp () = {
1396- let hv = valueOrElse(getInteger(aq), 0)
1397- let hw = if (((height - hv) >= at))
1402+ let hy = valueOrElse(getInteger(aq), 0)
1403+ let hz = if (((height - hy) >= at))
13981404 then unit
1399- else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1400- if ((hw == hw))
1405+ else aP(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1406+ if ((hz == hz))
14011407 then {
1402- let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp"))
1403- let hx = eS(0, 0, 0)
1404- let hy = hx._1
1405- let eJ = hx._2
1406- let eV = if ((fd != eJ))
1407- then hy
1408- else aN("nothing to refresh")
1409- $Tuple2(eV, toString(eJ))
1408+ let ff = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aR("invalid dLp"))
1409+ let hA = eU(0, 0, 0)
1410+ let hB = hA._1
1411+ let eL = hA._2
1412+ let eX = if ((ff != eL))
1413+ then hB
1414+ else aP("nothing to refresh")
1415+ $Tuple2(eX, toString(eL))
14101416 }
14111417 else throw("Strict value is not equal to itself.")
14121418 }
14131419
14141420
14151421
1416-@Callable(cP)
1417-func getOneTknV2READONLY (fL,hz) = {
1418- let dj = toBase58String(value(bm))
1422+@Callable(cR)
1423+func getOneTknV2READONLY (fN,hC) = {
1424+ let dl = toBase58String(value(bo))
1425+ let dm = toBase58String(value(bp))
14191426 let dk = toBase58String(value(bn))
1420- let di = toBase58String(value(bl))
1421- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1422- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1423- let cb = cy(cz)
1424- let ca = (cb - fraction(toBigInt(hz), cb, eI))
1425- let hA = if ((fL == dj))
1427+ let cB = [toBigInt(bP(dl)), toBigInt(bP(dm))]
1428+ let eK = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dk)), "invalid lp asset").quantity)
1429+ let cd = cA(cB)
1430+ let cc = (cd - fraction(toBigInt(hC), cd, eK))
1431+ let hD = if ((fN == dl))
14261432 then 0
1427- else if ((fL == dk))
1433+ else if ((fN == dm))
14281434 then 1
14291435 else throw("invalid out asset id")
1430- let hB = es(cz, hA, ca)
1431- let gA = (cz[hA] - hB)
1432- let gB = max([0, toInt((gA - f))])
1433- let hC = cv(gB, aT)
1434- let fU = hC._1
1435- let cx = hC._2
1436- $Tuple2(nil, $Tuple2(fU, cx))
1436+ let hE = eu(cB, hD, cc)
1437+ let gD = (cB[hD] - hE)
1438+ let gE = max([0, toInt((gD - f))])
1439+ let hF = cx(gE, aV)
1440+ let fW = hF._1
1441+ let cz = hF._2
1442+ $Tuple2(nil, $Tuple2(fW, cz))
14371443 }
14381444
14391445
14401446
1441-@Callable(cP)
1442-func getOneTknV2WithBonusREADONLY (fL,hz) = {
1443- let dj = toBase58String(value(bm))
1447+@Callable(cR)
1448+func getOneTknV2WithBonusREADONLY (fN,hC) = {
1449+ let dl = toBase58String(value(bo))
1450+ let dm = toBase58String(value(bp))
14441451 let dk = toBase58String(value(bn))
1445- let di = toBase58String(value(bl))
1446- let dp = bN(dj)
1447- let dr = bN(dk)
1448- let hD = {
1449- let aS = invoke(this, "getOneTknV2READONLY", [fL, hz], nil)
1450- if ($isInstanceOf(aS, "(Int, Int)"))
1451- then aS
1452- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
1452+ let dr = bP(dl)
1453+ let dt = bP(dm)
1454+ let hG = {
1455+ let aU = invoke(this, "getOneTknV2READONLY", [fN, hC], nil)
1456+ if ($isInstanceOf(aU, "(Int, Int)"))
1457+ then aU
1458+ else throw(($getType(aU) + " couldn't be cast to (Int, Int)"))
14531459 }
1454- let fU = hD._1
1455- let cx = hD._2
1456- let dX = dd("", di, hz, this)
1457- let dz = dX._1
1458- let dA = dX._2
1459- let hE = (dz + dA)
1460- let fJ = if ((hE == 0))
1461- then if ((fU == 0))
1460+ let fW = hG._1
1461+ let cz = hG._2
1462+ let dZ = df("", dk, hC, this)
1463+ let dB = dZ._1
1464+ let dC = dZ._2
1465+ let hH = (dB + dC)
1466+ let fL = if ((hH == 0))
1467+ then if ((fW == 0))
14621468 then 0
14631469 else throw("bonus calculation error")
1464- else fraction((fU - hE), a, hE)
1465- $Tuple2(nil, $Tuple3(fU, cx, fJ))
1470+ else fraction((fW - hH), a, hH)
1471+ $Tuple2(nil, $Tuple3(fW, cz, fL))
14661472 }
14671473
14681474
14691475
1470-@Callable(cP)
1471-func getNoLess (hF,hG) = {
1472- let dX = fj(cP)
1473- let dz = dX._1
1474- let dA = dX._2
1475- let dL = dX._3
1476- let df = dX._4
1477- let dB = dX._5
1478- if ((hF > dz))
1479- then throw(((("Failed: " + toString(dz)) + " < ") + toString(hF)))
1480- else if ((hG > dA))
1481- then throw(((("Failed: " + toString(dA)) + " < ") + toString(hG)))
1476+@Callable(cR)
1477+func getNoLess (hI,hJ) = {
1478+ let dZ = fl(cR)
1479+ let dB = dZ._1
1480+ let dC = dZ._2
1481+ let dN = dZ._3
1482+ let dh = dZ._4
1483+ let dD = dZ._5
1484+ if ((hI > dB))
1485+ then throw(((("Failed: " + toString(dB)) + " < ") + toString(hI)))
1486+ else if ((hJ > dC))
1487+ then throw(((("Failed: " + toString(dC)) + " < ") + toString(hJ)))
14821488 else {
1483- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1484- if ((eR == eR))
1489+ let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1490+ if ((eT == eT))
14851491 then {
1486- let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1487- if ((hH == hH))
1492+ let hK = invoke(aS, "burn", [dN], [AttachedPayment(dh, dN)])
1493+ if ((hK == hK))
14881494 then {
1489- let hI = eS(-(dz), -(dA), 0)
1490- let gi = hI._1
1491- let eJ = hI._2
1492- let gj = eW(eR, eJ)
1493- if ((gj == gj))
1494- then (dB ++ gi)
1495+ let hL = eU(-(dB), -(dC), 0)
1496+ let gk = hL._1
1497+ let eL = hL._2
1498+ let gl = eY(eT, eL)
1499+ if ((gl == gl))
1500+ then (dD ++ gk)
14951501 else throw("Strict value is not equal to itself.")
14961502 }
14971503 else throw("Strict value is not equal to itself.")
15021508
15031509
15041510
1505-@Callable(cP)
1506-func unstakeAndGet (cw) = {
1507- let hJ = if ((size(cP.payments) != 0))
1511+@Callable(cR)
1512+func unstakeAndGet (cy) = {
1513+ let hM = if ((size(cR.payments) != 0))
15081514 then throw("No pmnts expd")
15091515 else true
1510- if ((hJ == hJ))
1516+ if ((hM == hM))
15111517 then {
1512- let hK = bs()
1513- let gX = bl
1514- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1515- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1516- if ((eR == eR))
1518+ let hN = bu()
1519+ let ha = bn
1520+ let hO = valueOrErrorMessage(addressFromString(hN[C]), "Wr st addr")
1521+ let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1522+ if ((eT == eT))
15171523 then {
1518- let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil)
1519- if ((hM == hM))
1524+ let hP = invoke(hO, "unstake", [toBase58String(ha), cy], nil)
1525+ if ((hP == hP))
15201526 then {
1521- let dX = dd(toBase58String(cP.transactionId), toBase58String(gX), cw, cP.caller)
1522- let dz = dX._1
1523- let dA = dX._2
1524- let dn = parseIntValue(dX._9)
1525- let dB = dX._10
1526- let hN = if (if (aV())
1527+ let dZ = df(toBase58String(cR.transactionId), toBase58String(ha), cy, cR.caller)
1528+ let dB = dZ._1
1529+ let dC = dZ._2
1530+ let dp = parseIntValue(dZ._9)
1531+ let dD = dZ._10
1532+ let hQ = if (if (aX())
15271533 then true
1528- else (dn == s))
1529- then throw(("Blocked: " + toString(dn)))
1534+ else (dp == s))
1535+ then throw(("Blocked: " + toString(dp)))
15301536 else true
1531- if ((hN == hN))
1537+ if ((hQ == hQ))
15321538 then {
1533- let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)])
1534- if ((hO == hO))
1539+ let hR = invoke(aS, "burn", [cy], [AttachedPayment(ha, cy)])
1540+ if ((hR == hR))
15351541 then {
1536- let hP = eS(-(dz), -(dA), 0)
1537- let gi = hP._1
1538- let eJ = hP._2
1539- let gj = eW(eR, eJ)
1540- if ((gj == gj))
1541- then (dB ++ gi)
1542+ let hS = eU(-(dB), -(dC), 0)
1543+ let gk = hS._1
1544+ let eL = hS._2
1545+ let gl = eY(eT, eL)
1546+ if ((gl == gl))
1547+ then (dD ++ gk)
15421548 else throw("Strict value is not equal to itself.")
15431549 }
15441550 else throw("Strict value is not equal to itself.")
15541560
15551561
15561562
1557-@Callable(cP)
1558-func unstakeAndGetNoLess (hQ,hR,hG) = {
1559- let ht = if (aV())
1563+@Callable(cR)
1564+func unstakeAndGetNoLess (hT,hU,hJ) = {
1565+ let hw = if (aX())
15601566 then true
1561- else (bk == s)
1562- let gH = [if (!(ht))
1567+ else (bm == s)
1568+ let gK = [if (!(hw))
15631569 then true
1564- else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1570+ else throw("get operation is blocked by admin"), if ((size(cR.payments) == 0))
15651571 then true
15661572 else throw("no payments are expected")]
1567- if ((gH == gH))
1573+ if ((gK == gK))
15681574 then {
1569- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1570- if ((eR == eR))
1575+ let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1576+ if ((eT == eT))
15711577 then {
1572- let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil)
1573- if ((hM == hM))
1578+ let hP = invoke(bw, "unstake", [toBase58String(bn), hT], nil)
1579+ if ((hP == hP))
15741580 then {
1575- let hS = dd(toBase58String(cP.transactionId), toBase58String(bl), hQ, cP.caller)
1576- let dz = hS._1
1577- let dA = hS._2
1578- let dB = hS._10
1579- let hT = [if ((dz >= hR))
1581+ let hV = df(toBase58String(cR.transactionId), toBase58String(bn), hT, cR.caller)
1582+ let dB = hV._1
1583+ let dC = hV._2
1584+ let dD = hV._10
1585+ let hW = [if ((dB >= hU))
15801586 then true
1581- else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG))
1587+ else throw(makeString(["amount asset amount to receive is less than ", toString(hU)], "")), if ((dC >= hJ))
15821588 then true
1583- else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1584- if ((hT == hT))
1589+ else throw(makeString(["price asset amount to receive is less than ", toString(hJ)], ""))]
1590+ if ((hW == hW))
15851591 then {
1586- let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)])
1587- if ((hH == hH))
1592+ let hK = invoke(aS, "burn", [hT], [AttachedPayment(bn, hT)])
1593+ if ((hK == hK))
15881594 then {
1589- let hU = eS(-(dz), -(dA), 0)
1590- let gi = hU._1
1591- let eJ = hU._2
1592- let gj = eW(eR, eJ)
1593- if ((gj == gj))
1594- then (dB ++ gi)
1595+ let hX = eU(-(dB), -(dC), 0)
1596+ let gk = hX._1
1597+ let eL = hX._2
1598+ let gl = eY(eT, eL)
1599+ if ((gl == gl))
1600+ then (dD ++ gk)
15951601 else throw("Strict value is not equal to itself.")
15961602 }
15971603 else throw("Strict value is not equal to itself.")
16071613
16081614
16091615
1610-@Callable(cP)
1611-func unstakeAndGetOneTknV2 (hQ,fL,fM) = {
1612- let hh = {
1613- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1614- if ($isInstanceOf(aS, "Boolean"))
1615- then aS
1616- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1616+@Callable(cR)
1617+func unstakeAndGetOneTknV2 (hT,fN,fO) = {
1618+ let hk = {
1619+ let aU = invoke(aS, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1620+ if ($isInstanceOf(aU, "Boolean"))
1621+ then aU
1622+ else throw(($getType(aU) + " couldn't be cast to Boolean"))
16171623 }
1618- let ht = if (if (aV())
1624+ let hw = if (if (aX())
16191625 then true
1620- else (bk == s))
1626+ else (bm == s))
16211627 then true
1622- else hh
1623- let gH = [if (if (!(ht))
1628+ else hk
1629+ let gK = [if (if (!(hw))
16241630 then true
1625- else go(cP))
1631+ else gq(cR))
16261632 then true
1627- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1633+ else aP("get operation is blocked by admin"), if ((size(cR.payments) == 0))
16281634 then true
1629- else aN("no payments are expected")]
1630- if ((gH == gH))
1635+ else aP("no payments are expected")]
1636+ if ((gK == gK))
16311637 then {
1632- let hK = bs()
1633- let gX = bl
1634- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1635- let dh = cP.caller
1636- let hV = this
1637- let hM = invoke(hL, "unstakeINTERNAL", [gX, hQ, dh.bytes, hV.bytes], nil)
1638- if ((hM == hM))
1638+ let hN = bu()
1639+ let ha = bn
1640+ let hO = valueOrErrorMessage(addressFromString(hN[C]), "Wr st addr")
1641+ let dj = cR.caller
1642+ let hY = this
1643+ let hP = invoke(hO, "unstakeINTERNAL", [ha, hT, dj.bytes, hY.bytes], nil)
1644+ if ((hP == hP))
16391645 then {
1640- let hW = fK(fL, fM, [AttachedPayment(gX, hQ)], cP.caller, cP.originCaller, cP.transactionId)
1641- let dB = hW._1
1642- let fV = hW._2
1643- $Tuple2(dB, fV)
1646+ let hZ = fM(fN, fO, [AttachedPayment(ha, hT)], cR.caller, cR.originCaller, cR.transactionId)
1647+ let dD = hZ._1
1648+ let fX = hZ._2
1649+ $Tuple2(dD, fX)
16441650 }
16451651 else throw("Strict value is not equal to itself.")
16461652 }
16491655
16501656
16511657
1652-@Callable(cP)
1653-func putOneTknV2WithBonusREADONLY (hX,hY) = {
1654- let hZ = fp(hX, hY, "", "", true)
1655- let fE = hZ._1
1656- let dB = hZ._2
1657- let cx = hZ._3
1658- let fJ = hZ._4
1659- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1658+@Callable(cR)
1659+func putOneTknV2WithBonusREADONLY (ia,ib) = {
1660+ let ic = fr(ia, ib, "", "", true)
1661+ let fG = ic._1
1662+ let dD = ic._2
1663+ let cz = ic._3
1664+ let fL = ic._4
1665+ $Tuple2(nil, $Tuple3(fG, cz, fL))
16601666 }
16611667
16621668
16631669
1664-@Callable(cP)
1665-func putOneTknV2WithoutTakeFeeREADONLY (hX,hY) = {
1666- let ia = fp(hX, hY, "", "", false)
1667- let fE = ia._1
1668- let dB = ia._2
1669- let cx = ia._3
1670- let fJ = ia._4
1671- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1670+@Callable(cR)
1671+func putOneTknV2WithoutTakeFeeREADONLY (ia,ib) = {
1672+ let id = fr(ia, ib, "", "", false)
1673+ let fG = id._1
1674+ let dD = id._2
1675+ let cz = id._3
1676+ let fL = id._4
1677+ $Tuple2(nil, $Tuple3(fG, cz, fL))
16721678 }
16731679
16741680
16751681
1676-@Callable(cP)
1677-func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ)))
1682+@Callable(cR)
1683+func activate (ie,if) = if ((toString(cR.caller) != toString(aS)))
16781684 then throw("denied")
1679- else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
1685+ else $Tuple2([StringEntry(aj(), ie), StringEntry(ak(), if)], "success")
16801686
16811687
16821688
1683-@Callable(cP)
1684-func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1685- then gn
1686- else [StringEntry(id, hN)]
1689+@Callable(cR)
1690+func setS (ig,hQ) = if ((toString(cR.caller) != aL(this, am())))
1691+ then gp
1692+ else [StringEntry(ig, hQ)]
16871693
16881694
16891695
1690-@Callable(cP)
1691-func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1692- then gn
1693- else [IntegerEntry(id, hN)]
1696+@Callable(cR)
1697+func setI (ig,hQ) = if ((toString(cR.caller) != aL(this, am())))
1698+ then gp
1699+ else [IntegerEntry(ig, hQ)]
16941700
16951701
16961702
1697-@Callable(cP)
1698-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
1703+@Callable(cR)
1704+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, ba())
16991705
17001706
17011707
1702-@Callable(cP)
1703-func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
1708+@Callable(cR)
1709+func getAccBalanceWrapperREADONLY (bQ) = $Tuple2(nil, bP(bQ))
17041710
17051711
17061712
1707-@Callable(cP)
1708-func calcPricesWrapperREADONLY (ch,ci,cm) = {
1709- let ie = cl(ch, ci, cm)
1710- $Tuple2(nil, [toString(ie[0]), toString(ie[1]), toString(ie[2])])
1713+@Callable(cR)
1714+func calcPricesWrapperREADONLY (cj,ck,co) = {
1715+ let ih = cn(cj, ck, co)
1716+ $Tuple2(nil, [toString(ih[0]), toString(ih[1]), toString(ih[2])])
17111717 }
17121718
17131719
17141720
1715-@Callable(cP)
1716-func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if))
1721+@Callable(cR)
1722+func fromX18WrapperREADONLY (M,ii) = $Tuple2(nil, L(parseBigIntValue(M), ii))
17171723
17181724
17191725
1720-@Callable(cP)
1726+@Callable(cR)
17211727 func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
17221728
17231729
17241730
1725-@Callable(cP)
1726-func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
1731+@Callable(cR)
1732+func calcPriceBigIntWrapperREADONLY (bS,bT) = $Tuple2(nil, toString(bR(parseBigIntValue(bS), parseBigIntValue(bT))))
17271733
17281734
17291735
1730-@Callable(cP)
1731-func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,ig,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, ig, dH, dI, true, false, 0, ""))
1736+@Callable(cR)
1737+func estimatePutOperationWrapperREADONLY (dg,bY,dF,dG,dH,dI,ij,dJ,dK) = $Tuple2(nil, dE(dg, bY, dF, dG, dH, dI, ij, dJ, dK, true, false, 0, ""))
17321738
17331739
17341740
1735-@Callable(cP)
1736-func estimateGetOperationWrapperREADONLY (de,ih,dg,ig) = {
1737- let dX = dd(de, ih, dg, addressFromStringValue(ig))
1738- $Tuple2(nil, $Tuple10(dX._1, dX._2, dX._3, dX._4, dX._5, dX._6, dX._7, toString(dX._8), dX._9, dX._10))
1741+@Callable(cR)
1742+func estimateGetOperationWrapperREADONLY (dg,ik,di,ij) = {
1743+ let dZ = df(dg, ik, di, addressFromStringValue(ij))
1744+ $Tuple2(nil, $Tuple10(dZ._1, dZ._2, dZ._3, dZ._4, dZ._5, dZ._6, dZ._7, toString(dZ._8), dZ._9, dZ._10))
17391745 }
17401746
17411747
1742-@Verifier(ii)
1743-func ij () = {
1744- let ik = {
1745- let gl = gk()
1746- if ($isInstanceOf(gl, "ByteVector"))
1748+@Verifier(il)
1749+func im () = {
1750+ let in = {
1751+ let gn = gm()
1752+ if ($isInstanceOf(gn, "ByteVector"))
17471753 then {
1748- let gp = gl
1749- gp
1754+ let gr = gn
1755+ gr
17501756 }
1751- else if ($isInstanceOf(gl, "Unit"))
1752- then ii.senderPublicKey
1757+ else if ($isInstanceOf(gn, "Unit"))
1758+ then il.senderPublicKey
17531759 else throw("Match error")
17541760 }
1755- let gl = ii
1756- if ($isInstanceOf(gl, "Order"))
1761+ let gn = il
1762+ if ($isInstanceOf(gn, "Order"))
17571763 then {
1758- let eZ = gl
1759- let il = aW()
1760- let im = eY(eZ)
1761- let aF = im._1
1762- let aG = im._2
1763- let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey)
1764- let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], il)
1765- if (if (if (aF)
1766- then aH
1764+ let fb = gn
1765+ let io = aY()
1766+ let ip = if (gy())
1767+ then $Tuple2(true, "")
1768+ else fa(fb)
1769+ let aH = ip._1
1770+ let aI = ip._2
1771+ let aJ = sigVerify(fb.bodyBytes, fb.proofs[0], fb.senderPublicKey)
1772+ let aK = sigVerify(fb.bodyBytes, fb.proofs[1], io)
1773+ if (if (if (aH)
1774+ then aJ
17671775 else false)
1768- then aI
1776+ then aK
17691777 else false)
17701778 then true
1771- else aE(aF, aG, aH, aI)
1779+ else aG(aH, aI, aJ, aK)
17721780 }
1773- else if ($isInstanceOf(gl, "SetScriptTransaction"))
1781+ else if ($isInstanceOf(gn, "SetScriptTransaction"))
17741782 then {
1775- let cC = gl
1776- if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
1783+ let cE = gn
1784+ if (sigVerify(il.bodyBytes, il.proofs[0], in))
17771785 then true
17781786 else {
1779- let in = blake2b256(value(cC.script))
1780- let io = fromBase64String(value(getString(aQ, aC())))
1781- let ip = scriptHash(this)
1782- if ((io == in))
1783- then (ip != in)
1787+ let iq = blake2b256(value(cE.script))
1788+ let ir = fromBase64String(value(getString(aS, aC())))
1789+ let is = scriptHash(this)
1790+ if ((ir == iq))
1791+ then (is != iq)
17841792 else false
17851793 }
17861794 }
1787- else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
1795+ else sigVerify(il.bodyBytes, il.proofs[0], in)
17881796 }
17891797
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = toBigInt(100000000)
77
88 let c = toBigInt(1000000000000000000)
99
1010 let d = toBigInt(0)
1111
1212 let e = toBigInt(0)
1313
1414 let f = toBigInt(1)
1515
1616 let g = toBigInt(2)
1717
1818 let h = toBigInt(3)
1919
2020 let i = toBigInt(4)
2121
2222 let j = toBigInt((a - ((a * 1) / a)))
2323
2424 let k = "WAVES"
2525
2626 let l = "100"
2727
2828 let m = "1"
2929
3030 let n = "__"
3131
3232 let o = ""
3333
3434 let p = 1
3535
3636 let q = 2
3737
3838 let r = 3
3939
4040 let s = 4
4141
4242 let t = 1
4343
4444 let u = 2
4545
4646 let v = 3
4747
4848 let w = 4
4949
5050 let x = 5
5151
5252 let y = 6
5353
5454 let z = 7
5555
5656 let A = 8
5757
5858 let B = 9
5959
6060 let C = 1
6161
6262 let D = 6
6363
6464 let E = 7
6565
6666 let F = 10
6767
6868 let G = fraction(10, a, 10000)
6969
7070 func H (I,J) = fraction(toBigInt(I), c, toBigInt(J))
7171
7272
7373 func K (I,J) = fraction(I, c, J)
7474
7575
7676 func L (M,N) = toInt(fraction(M, toBigInt(N), c))
7777
7878
7979 func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P))
8080
8181
8282 func Q (I,J) = fraction(I, c, toBigInt(J))
8383
8484
8585 func R (M,N) = fraction(M, toBigInt(N), c)
8686
8787
8888 func S (T,U,V) = fraction(T, U, V)
8989
9090
9191 func W (M) = if ((d > M))
9292 then -(M)
9393 else M
9494
9595
9696 func X (M) = if ((d > M))
9797 then -(M)
9898 else M
9999
100100
101101 func Y () = "%s__factoryContract"
102102
103103
104104 func Z () = "%s__managerPublicKey"
105105
106106
107107 func aa () = "%s__pendingManagerPublicKey"
108108
109109
110110 func ab () = "%s%s__price__last"
111111
112112
113113 func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n)
114114
115115
116116 func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah)
117117
118118
119119 func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah)
120120
121121
122122 func aj () = "%s__amountAsset"
123123
124124
125125 func ak () = "%s__priceAsset"
126126
127127
128128 func al () = "%s__amp"
129129
130130
131131 func am () = "%s__addonAddr"
132132
133133
134134 let an = "%s__fee"
135135
136136 let ao = valueOrElse(getInteger(this, an), G)
137137
138138 let ap = makeString(["%s", "dLp"], n)
139139
140140 let aq = makeString(["%s", "dLpRefreshedHeight"], n)
141141
142142 let ar = makeString(["%s", "refreshDLpDelay"], n)
143143
144144 let as = 30
145145
146146 let at = valueOrElse(getInteger(this, ar), as)
147147
148148 func au () = "%s__factoryConfig"
149149
150150
151151 func av () = "%s%s__matcher__publicKey"
152152
153153
154154 func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
155155
156156
157157 func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
158158
159159
160160 func aB () = "%s__shutdown"
161161
162162
163163 func aC () = "%s__allowedLpStableScriptHash"
164164
165165
166166 func aD () = "%s__feeCollectorAddress"
167167
168168
169-func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI)))
169+func aE (aF) = ("%s%s__skipOrderValidation__" + aF)
170170
171171
172-func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
172+func aG (aH,aI,aJ,aK) = throw((((((((("order validation failed: orderValid=" + toString(aH)) + " (") + aI) + ")") + " senderValid=") + toString(aJ)) + " matcherValid=") + toString(aK)))
173173
174174
175-func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
175+func aL (aM,aN) = valueOrErrorMessage(getString(aM, aN), makeString(["mandatory ", toString(aM), ".", aN, " not defined"], ""))
176176
177177
178-func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
178+func aO (aM,aN) = valueOrErrorMessage(getInteger(aM, aN), makeString(["mandatory ", toString(aM), ".", aN, " not defined"], ""))
179179
180180
181-func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
181+func aP (aQ) = throw(makeString(["lp_stable.ride:", aQ], " "))
182182
183183
184-let aQ = addressFromStringValue(aJ(this, Y()))
184+func aR (aQ) = makeString(["lp_stable.ride:", aQ], " ")
185185
186-let aR = {
187- let aS = invoke(aQ, "getInFeeREADONLY", [toString(this)], nil)
188- if ($isInstanceOf(aS, "Int"))
189- then aS
190- else throw(($getType(aS) + " couldn't be cast to Int"))
186+
187+let aS = addressFromStringValue(aL(this, Y()))
188+
189+let aT = {
190+ let aU = invoke(aS, "getInFeeREADONLY", [toString(this)], nil)
191+ if ($isInstanceOf(aU, "Int"))
192+ then aU
193+ else throw(($getType(aU) + " couldn't be cast to Int"))
191194 }
192195
193-let aT = {
194- let aS = invoke(aQ, "getOutFeeREADONLY", [toString(this)], nil)
195- if ($isInstanceOf(aS, "Int"))
196- then aS
197- else throw(($getType(aS) + " couldn't be cast to Int"))
196+let aV = {
197+ let aU = invoke(aS, "getOutFeeREADONLY", [toString(this)], nil)
198+ if ($isInstanceOf(aU, "Int"))
199+ then aU
200+ else throw(($getType(aU) + " couldn't be cast to Int"))
198201 }
199202
200-let aU = aJ(this, al())
203+let aW = aL(this, al())
201204
202-func aV () = valueOrElse(getBoolean(aQ, aB()), false)
205+func aX () = valueOrElse(getBoolean(aS, aB()), false)
203206
204207
205-func aW () = fromBase58String(aJ(aQ, av()))
208+func aY () = fromBase58String(aL(aS, av()))
206209
207210
208-let aX = addressFromStringValue(aJ(aQ, aD()))
211+let aZ = addressFromStringValue(aL(aS, aD()))
209212
210-func aY () = {
211- let aZ = aJ(this, aj())
212- let ba = aJ(this, ak())
213- let bb = aM(aQ, az(ba))
214- let ax = aM(aQ, az(aZ))
215- split(aJ(aQ, aw(toString(ax), toString(bb))), n)
213+func ba () = {
214+ let bb = aL(this, aj())
215+ let bc = aL(this, ak())
216+ let bd = aO(aS, az(bc))
217+ let ax = aO(aS, az(bb))
218+ split(aL(aS, aw(toString(ax), toString(bd))), n)
216219 }
217220
218221
219-func bc (bd) = if ((bd == k))
222+func be (bf) = if ((bf == k))
220223 then unit
221- else fromBase58String(bd)
224+ else fromBase58String(bf)
222225
223226
224-func be (bd) = if ((bd == unit))
227+func bg (bf) = if ((bf == unit))
225228 then k
226- else toBase58String(value(bd))
229+ else toBase58String(value(bf))
227230
228231
229-func bf (bg) = $Tuple9(addressFromStringValue(bg[t]), parseIntValue(bg[u]), fromBase58String(bg[v]), bc(bg[w]), bc(bg[x]), parseIntValue(bg[y]), parseIntValue(bg[z]), fromBase58String(bg[A]), fromBase58String(bg[B]))
232+func bh (bi) = $Tuple9(addressFromStringValue(bi[t]), parseIntValue(bi[u]), fromBase58String(bi[v]), be(bi[w]), be(bi[x]), parseIntValue(bi[y]), parseIntValue(bi[z]), fromBase58String(bi[A]), fromBase58String(bi[B]))
230233
231234
232-let bh = bf(aY())
235+let bj = bh(ba())
233236
234-let bi = bh
237+let bk = bj
235238
236-let bj = bi._1
239+let bl = bk._1
237240
238-let bk = bi._2
241+let bm = bk._2
239242
240-let bl = bi._3
243+let bn = bk._3
241244
242-let bm = bi._4
245+let bo = bk._4
243246
244-let bn = bi._5
247+let bp = bk._5
245248
246-let bo = bi._6
249+let bq = bk._6
247250
248-let bp = bi._7
251+let br = bk._7
249252
250-let bq = bi._8
253+let bs = bk._8
251254
252-let br = bi._9
255+let bt = bk._9
253256
254-func bs () = split(aJ(aQ, au()), n)
257+func bu () = split(aL(aS, au()), n)
255258
256259
257-let bt = bs()
260+let bv = bu()
258261
259-let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
262+let bw = valueOrErrorMessage(addressFromString(bv[C]), "Invalid staking contract address")
260263
261-let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
264+let bx = valueOrErrorMessage(addressFromString(bv[E]), "Invalid slipage contract address")
262265
263-let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
266+let by = valueOrErrorMessage(addressFromString(bv[F]), "Invalid gwx contract address")
264267
265-let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
268+let bz = valueOrErrorMessage(addressFromString(bv[D]), "Invalid gwx contract address")
266269
267-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)], n)
270+func bA (bB,bC,bD,bE,bF,bG,bH,bI,bJ,bK) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK)], n)
268271
269272
270-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)], n)
273+func bL (bM,bN,bO,bE,bH,bI) = makeString(["%d%d%d%d%d%d", toString(bM), toString(bN), toString(bO), toString(bE), toString(bH), toString(bI)], n)
271274
272275
273-func bN (bO) = if ((bO == "WAVES"))
276+func bP (bQ) = if ((bQ == "WAVES"))
274277 then wavesBalance(this).available
275- else assetBalance(this, fromBase58String(bO))
278+ else assetBalance(this, fromBase58String(bQ))
276279
277280
278-func bP (bQ,bR) = fraction(bQ, c, bR)
281+func bR (bS,bT) = fraction(bS, c, bT)
279282
280283
281-func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
284+func bU (bS,bT,P) = fraction(bS, c, bT, P)
282285
283286
284-func bT (bU,bV,bW) = {
285- let bX = fraction((bU - bV), b, bV)
286- let bY = ((bW - W(bX)) > d)
287- if (!(bY))
288- then throw(("Big slpg: " + toString(bX)))
289- else $Tuple2(bY, min([bU, bV]))
287+func bV (bW,bX,bY) = {
288+ let bZ = fraction((bW - bX), b, bX)
289+ let ca = ((bY - W(bZ)) > d)
290+ if (!(ca))
291+ then throw(("Big slpg: " + toString(bZ)))
292+ else $Tuple2(ca, min([bW, bX]))
290293 }
291294
292295
293-func bZ (ca,cb,cc) = {
294- let bX = fraction(cb, b, ca)
295- let cd = (cc > bX)
296- if (if (cd)
296+func cb (cc,cd,ce) = {
297+ let bZ = fraction(cd, b, cc)
298+ let cf = (ce > bZ)
299+ if (if (cf)
297300 then true
298- else (cb > ca))
299- then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300- else cd
301+ else (cd > cc))
302+ then throw(((((((toString(cd) + " ") + toString(cc)) + " ") + toString(bZ)) + " ") + toString(ce)))
303+ else cf
301304 }
302305
303306
304-func ce (cf,cg,ch,ci) = {
305- let cj = H(ch, cf)
306- let ck = H(ci, cg)
307- bP(ck, cj)
307+func cg (ch,ci,cj,ck) = {
308+ let cl = H(cj, ch)
309+ let cm = H(ck, ci)
310+ bR(cm, cl)
308311 }
309312
310313
311-func cl (ch,ci,cm) = {
312- let cn = bo
313- let co = bp
314- let cp = ce(cn, co, ch, ci)
315- let bR = H(ch, cn)
316- let bQ = H(ci, co)
317- let cq = H(cm, a)
318- let cr = bP(bR, cq)
319- let cs = bP(bQ, cq)
320-[cp, cr, cs]
314+func cn (cj,ck,co) = {
315+ let cp = bq
316+ let cq = br
317+ let cr = cg(cp, cq, cj, ck)
318+ let bT = H(cj, cp)
319+ let bS = H(ck, cq)
320+ let cs = H(co, a)
321+ let ct = bR(bT, cs)
322+ let cu = bR(bS, cs)
323+[cr, ct, cu]
321324 }
322325
323326
324-func ct (ch,ci,cm) = {
325- let cu = cl(ch, ci, cm)
326-[L(cu[0], a), L(cu[1], a), L(cu[2], a)]
327+func cv (cj,ck,co) = {
328+ let cw = cn(cj, ck, co)
329+[L(cw[0], a), L(cw[1], a), L(cw[2], a)]
327330 }
328331
329332
330-func cv (cw,ao) = {
331- let cx = if ((ao == 0))
333+func cx (cy,ao) = {
334+ let cz = if ((ao == 0))
332335 then 0
333- else fraction(cw, ao, a)
334- $Tuple2((cw - cx), cx)
336+ else fraction(cy, ao, a)
337+ $Tuple2((cy - cz), cz)
335338 }
336339
337340
338-func cy (cz) = {
339- let cA = cz[0]
340- let cB = cz[1]
341- let cC = (cA + cB)
342- if ((cC == e))
341+func cA (cB) = {
342+ let cC = cB[0]
343+ let cD = cB[1]
344+ let cE = (cC + cD)
345+ if ((cE == e))
343346 then e
344347 else {
345- let cD = parseIntValue(aU)
346- let cE = (cD * 2)
347- let cu = fraction(cA, cB, f)
348- let cF = fraction(cu, i, f)
349- let cG = fraction(toBigInt(cE), cC, f)
350- let cH = toBigInt((cE - 1))
351- func cI (cJ) = {
352- let cK = fraction(cJ, cJ, f)
353- let cL = fraction(cK, cJ, f)
354- let cM = fraction(cL, f, cF)
355- fraction((cG + fraction(cM, g, f)), cJ, (fraction(cH, cJ, f) + fraction(h, cM, f)))
348+ let cF = parseIntValue(aW)
349+ let cG = (cF * 2)
350+ let cw = fraction(cC, cD, f)
351+ let cH = fraction(cw, i, f)
352+ let cI = fraction(toBigInt(cG), cE, f)
353+ let cJ = toBigInt((cG - 1))
354+ func cK (cL) = {
355+ let cM = fraction(cL, cL, f)
356+ let cN = fraction(cM, cL, f)
357+ let cO = fraction(cN, f, cH)
358+ fraction((cI + fraction(cO, g, f)), cL, (fraction(cJ, cL, f) + fraction(h, cO, f)))
356359 }
357360
358- func cN (cO,cP) = if (cO._2)
359- then cO
361+ func cP (cQ,cR) = if (cQ._2)
362+ then cQ
360363 else {
361- let cJ = cO._1
362- let cQ = cI(cJ)
363- let cR = (cQ - value(cJ))
364- let cS = if ((e > cR))
365- then -(cR)
366- else cR
367- if ((f >= cS))
368- then $Tuple2(cQ, true)
369- else $Tuple2(cQ, false)
364+ let cL = cQ._1
365+ let cS = cK(cL)
366+ let cT = (cS - value(cL))
367+ let cU = if ((e > cT))
368+ then -(cT)
369+ else cT
370+ if ((f >= cU))
371+ then $Tuple2(cS, true)
372+ else $Tuple2(cS, false)
370373 }
371374
372- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373- let cU = {
374- let cV = cT
375- let cW = size(cV)
376- let cX = $Tuple2(cC, false)
377- func cY (cZ,da) = if ((da >= cW))
378- then cZ
379- else cN(cZ, cV[da])
375+ let cV = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
376+ let cW = {
377+ let cX = cV
378+ let cY = size(cX)
379+ let cZ = $Tuple2(cE, false)
380+ func da (db,dc) = if ((dc >= cY))
381+ then db
382+ else cP(db, cX[dc])
380383
381- func db (cZ,da) = if ((da >= cW))
382- then cZ
383- else throw("List size exceeds 18")
384+ func dd (db,dc) = if ((dc >= cY))
385+ then db
386+ else throw("List size exceeds 17")
384387
385- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
388+ dd(da(da(da(da(da(da(da(da(da(da(da(da(da(da(da(da(da(cZ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
386389 }
387- let cJ = cU._1
388- let dc = cU._2
389- if (dc)
390- then cJ
391- else throw(("D calculation error, D = " + toString(cJ)))
390+ let cL = cW._1
391+ let de = cW._2
392+ if (de)
393+ then cL
394+ else throw(("D calculation error, D = " + toString(cL)))
392395 }
393396 }
394397
395398
396-func dd (de,df,dg,dh) = {
397- let di = bl
398- let dj = toBase58String(value(bm))
399- let dk = toBase58String(value(bn))
400- let dl = bo
401- let dm = bp
402- let dn = toString(bk)
403- let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity
404- if ((toBase58String(di) != df))
399+func df (dg,dh,di,dj) = {
400+ let dk = bn
401+ let dl = toBase58String(value(bo))
402+ let dm = toBase58String(value(bp))
403+ let dn = bq
404+ let do = br
405+ let dp = toString(bm)
406+ let dq = valueOrErrorMessage(assetInfo(dk), "Wrong LP id").quantity
407+ if ((toBase58String(dk) != dh))
405408 then throw("Wrong pmt asset")
406409 else {
407- let dp = bN(dj)
408- let dq = H(dp, dl)
409- let dr = bN(dk)
410- let ds = H(dr, dm)
411- let dt = bP(ds, dq)
412- let du = L(dt, a)
413- let dv = H(dg, a)
414- let dw = H(do, a)
415- let dx = fraction(dq, dv, dw)
416- let dy = fraction(ds, dv, dw)
417- let dz = O(dx, dl, FLOOR)
418- let dA = O(dy, dm, FLOOR)
419- let dB = if ((de == ""))
410+ let dr = bP(dl)
411+ let ds = H(dr, dn)
412+ let dt = bP(dm)
413+ let du = H(dt, do)
414+ let dv = bR(du, ds)
415+ let dw = L(dv, a)
416+ let dx = H(di, a)
417+ let dy = H(dq, a)
418+ let dz = fraction(ds, dx, dy)
419+ let dA = fraction(du, dx, dy)
420+ let dB = O(dz, dn, FLOOR)
421+ let dC = O(dA, do, FLOOR)
422+ let dD = if ((dg == ""))
420423 then nil
421- else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
424+ else [ScriptTransfer(dj, dB, if ((dl == "WAVES"))
422425 then unit
423- else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
426+ else fromBase58String(dl)), ScriptTransfer(dj, dC, if ((dm == "WAVES"))
424427 then unit
425- else fromBase58String(dk)), StringEntry(ai(toString(dh), de), bJ(dz, dA, dg, du, height, lastBlock.timestamp)), IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du)]
426- $Tuple10(dz, dA, dj, dk, dp, dr, do, dt, dn, dB)
428+ else fromBase58String(dm)), StringEntry(ai(toString(dj), dg), bL(dB, dC, di, dw, height, lastBlock.timestamp)), IntegerEntry(ab(), dw), IntegerEntry(ac(height, lastBlock.timestamp), dw)]
429+ $Tuple10(dB, dC, dl, dm, dr, dt, dq, dv, dp, dD)
427430 }
428431 }
429432
430433
431-func dC (de,bW,dD,dE,dF,dG,dh,dH,dI,dJ,dK,dL,dM) = {
432- let di = bl
433- let dN = toBase58String(value(bm))
434- let dO = toBase58String(value(bn))
435- let dP = bq
436- let dQ = br
437- let dR = bo
438- let dS = bp
439- let dn = toString(bk)
440- let dT = valueOrErrorMessage(assetInfo(di), "Wr lp as").quantity
441- let dp = if (dH)
442- then bN(dN)
443- else if (if (dJ)
444- then (dM == dN)
434+func dE (dg,bY,dF,dG,dH,dI,dj,dJ,dK,dL,dM,dN,dO) = {
435+ let dk = bn
436+ let dP = toBase58String(value(bo))
437+ let dQ = toBase58String(value(bp))
438+ let dR = bs
439+ let dS = bt
440+ let dT = bq
441+ let dU = br
442+ let dp = toString(bm)
443+ let dV = valueOrErrorMessage(assetInfo(dk), "Wr lp as").quantity
444+ let dr = if (dJ)
445+ then bP(dP)
446+ else if (if (dL)
447+ then (dO == dP)
445448 else false)
446- then (bN(dN) - dL)
447- else if (dJ)
448- then bN(dN)
449- else (bN(dN) - dD)
450- let dr = if (dH)
451- then bN(dO)
452- else if (if (dJ)
453- then (dM == dO)
449+ then (bP(dP) - dN)
450+ else if (dL)
451+ then bP(dP)
452+ else (bP(dP) - dF)
453+ let dt = if (dJ)
454+ then bP(dQ)
455+ else if (if (dL)
456+ then (dO == dQ)
454457 else false)
455- then (bN(dO) - dL)
456- else if (dJ)
457- then bN(dO)
458- else (bN(dO) - dF)
459- let dU = H(dD, dR)
460- let dV = H(dF, dS)
461- let dW = bP(dV, dU)
462- let dq = H(dp, dR)
463- let ds = H(dr, dS)
464- let cb = cy([dq, ds])
465- let dX = if ((dT == 0))
458+ then (bP(dQ) - dN)
459+ else if (dL)
460+ then bP(dQ)
461+ else (bP(dQ) - dH)
462+ let dW = H(dF, dT)
463+ let dX = H(dH, dU)
464+ let dY = bR(dX, dW)
465+ let ds = H(dr, dT)
466+ let du = H(dt, dU)
467+ let cd = cA([ds, du])
468+ let dZ = if ((dV == 0))
466469 then {
467- let ca = cy([(dq + dU), (ds + dV)])
468- let dY = if ((ca > cb))
470+ let cc = cA([(ds + dW), (du + dX)])
471+ let ea = if ((cc > cd))
469472 then true
470473 else throw("D1 should be greater than D0")
471- if ((dY == dY))
474+ if ((ea == ea))
472475 then {
473- let dt = d
474- let dZ = d
475- let cq = ca
476- $Tuple5(L(cq, a), L(dU, dR), L(dV, dS), bP((ds + dV), (dq + dU)), dZ)
476+ let dv = d
477+ let eb = d
478+ let cs = cc
479+ $Tuple5(L(cs, a), L(dW, dT), L(dX, dU), bR((du + dX), (ds + dW)), eb)
477480 }
478481 else throw("Strict value is not equal to itself.")
479482 }
480483 else {
481- let dt = bP(ds, dq)
482- let ea = fraction(W((dt - dW)), c, dt)
483- let dZ = H(bW, a)
484- if (if (if (dK)
485- then (dt != d)
484+ let dv = bR(du, ds)
485+ let ec = fraction(W((dv - dY)), c, dv)
486+ let eb = H(bY, a)
487+ if (if (if (dM)
488+ then (dv != d)
486489 else false)
487- then (ea > dZ)
490+ then (ec > eb)
488491 else false)
489- then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
492+ then throw(((("Price slippage " + toString(ec)) + " > ") + toString(eb)))
490493 else {
491- let eb = H(dT, a)
492- let ec = fraction(dU, bS(ds, dq, CEILING), c, CEILING)
493- let ed = fraction(dV, c, bS(ds, dq, FLOOR), CEILING)
494- let ee = if ((ec > dV))
495- then $Tuple2(ed, dV)
496- else $Tuple2(dU, ec)
497- let ef = ee._1
498- let eg = ee._2
499- let ca = cy([(dq + ef), (ds + eg)])
500- let dY = if ((ca > cb))
494+ let ed = H(dV, a)
495+ let ee = fraction(dW, bU(du, ds, CEILING), c, CEILING)
496+ let ef = fraction(dX, c, bU(du, ds, FLOOR), CEILING)
497+ let eg = if ((ee > dX))
498+ then $Tuple2(ef, dX)
499+ else $Tuple2(dW, ee)
500+ let eh = eg._1
501+ let ei = eg._2
502+ let cc = cA([(ds + eh), (du + ei)])
503+ let ea = if ((cc > cd))
501504 then true
502505 else throw("D1 should be greater than D0")
503- if ((dY == dY))
506+ if ((ea == ea))
504507 then {
505- let cq = fraction(eb, (ca - cb), cb)
506- $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ)
508+ let cs = fraction(ed, (cc - cd), cd)
509+ $Tuple5(O(cs, a, FLOOR), O(eh, dT, CEILING), O(ei, dU, CEILING), dv, eb)
507510 }
508511 else throw("Strict value is not equal to itself.")
509512 }
510513 }
511- let eh = dX._1
512- let ei = dX._2
513- let ej = dX._3
514- let du = L(dX._4, a)
515- let ek = L(dX._5, a)
516- if ((0 >= eh))
514+ let ej = dZ._1
515+ let ek = dZ._2
516+ let el = dZ._3
517+ let dw = L(dZ._4, a)
518+ let em = L(dZ._5, a)
519+ if ((0 >= ej))
517520 then throw("LP <= 0")
518521 else {
519- let el = if (!(dI))
522+ let en = if (!(dK))
520523 then 0
521- else eh
522- let em = (dD - ei)
523- let en = (dF - ej)
524- let eo = if (if (dJ)
525- then (dM == dN)
524+ else ej
525+ let eo = (dF - ek)
526+ let ep = (dH - el)
527+ let eq = if (if (dL)
528+ then (dO == dP)
526529 else false)
527- then $Tuple2(dL, 0)
528- else if (if (dJ)
529- then (dM == dO)
530+ then $Tuple2(dN, 0)
531+ else if (if (dL)
532+ then (dO == dQ)
530533 else false)
531- then $Tuple2(0, dL)
532- else $Tuple2(ei, ej)
533- let ep = eo._1
534- let eq = eo._2
535- let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, de), by(ep, eq, el, du, bW, ek, height, lastBlock.timestamp, em, en))]
536- $Tuple13(eh, el, du, dp, dr, dT, di, dn, er, em, en, dE, dG)
534+ then $Tuple2(0, dN)
535+ else $Tuple2(ek, el)
536+ let er = eq._1
537+ let es = eq._2
538+ let et = [IntegerEntry(ab(), dw), IntegerEntry(ac(height, lastBlock.timestamp), dw), StringEntry(af(dj, dg), bA(er, es, en, dw, bY, em, height, lastBlock.timestamp, eo, ep))]
539+ $Tuple13(ej, en, dw, dr, dt, dV, dk, dp, et, eo, ep, dG, dI)
537540 }
538541 }
539542
540543
541-func es (cz,cP,et) = {
542- let eu = g
543- let ev = cz[if ((cP == 0))
544+func eu (cB,cR,ev) = {
545+ let ew = g
546+ let ex = cB[if ((cR == 0))
544547 then 1
545548 else 0]
546- let ew = parseBigIntValue(l)
547- let cD = (parseBigIntValue(aU) * ew)
548- let cC = ev
549- let cE = (cD * eu)
550- let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
551- let ey = ((cC + ((et * ew) / cE)) - et)
552- func cN (cO,ez) = {
553- let eA = cO
554- let eB = eA._1
555- let dc = eA._2
556- if ((dc != unit))
557- then cO
549+ let ey = parseBigIntValue(l)
550+ let cF = (parseBigIntValue(aW) * ey)
551+ let cE = ex
552+ let cG = (cF * ew)
553+ let ez = (((((ev * ev) / (ex * ew)) * ev) * ey) / (cG * ew))
554+ let eA = ((cE + ((ev * ey) / cG)) - ev)
555+ func cP (cQ,eB) = {
556+ let eC = cQ
557+ let eD = eC._1
558+ let de = eC._2
559+ if ((de != unit))
560+ then cQ
558561 else {
559- let eC = (((eB * eB) + ex) / ((g * eB) + ey))
560- let eD = X((eC - value(eB)))
561- if ((f >= eD))
562- then $Tuple2(eC, ez)
563- else $Tuple2(eC, unit)
562+ let eE = (((eD * eD) + ez) / ((g * eD) + eA))
563+ let eF = X((eE - value(eD)))
564+ if ((f >= eF))
565+ then $Tuple2(eE, eB)
566+ else $Tuple2(eE, unit)
564567 }
565568 }
566569
567- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let eE = {
569- let cV = cT
570- let cW = size(cV)
571- let cX = $Tuple2(et, unit)
572- func cY (cZ,da) = if ((da >= cW))
573- then cZ
574- else cN(cZ, cV[da])
570+ let cV = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
571+ let eG = {
572+ let cX = cV
573+ let cY = size(cX)
574+ let cZ = $Tuple2(ev, unit)
575+ func da (db,dc) = if ((dc >= cY))
576+ then db
577+ else cP(db, cX[dc])
575578
576- func db (cZ,da) = if ((da >= cW))
577- then cZ
579+ func dd (db,dc) = if ((dc >= cY))
580+ then db
578581 else throw("List size exceeds 15")
579582
580- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
583+ dd(da(da(da(da(da(da(da(da(da(da(da(da(da(da(da(cZ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581584 }
582- let eB = eE._1
583- let dc = eE._2
584- if ((dc != unit))
585- then eB
586- else throw(("Y calculation error, Y = " + toString(eB)))
585+ let eD = eG._1
586+ let de = eG._2
587+ if ((de != unit))
588+ then eD
589+ else throw(("Y calculation error, Y = " + toString(eD)))
587590 }
588591
589592
590-func eF (eG,eH,eI) = {
591- let eJ = fraction(cy([K(eG, toBigInt(bo)), K(eH, toBigInt(bp))]), c, eI)
592- if ((eI == e))
593+func eH (eI,eJ,eK) = {
594+ let eL = fraction(cA([K(eI, toBigInt(bq)), K(eJ, toBigInt(br))]), c, eK)
595+ if ((eK == e))
593596 then e
594- else eJ
597+ else eL
595598 }
596599
597600
598-func eK (eL,eM,eN) = {
599- let eO = (toBigInt(bN(be(bm))) - eL)
600- let eP = (toBigInt(bN(be(bn))) - eM)
601- let eQ = (toBigInt(value(assetInfo(bl)).quantity) - eN)
602- let eR = eF(eO, eP, eQ)
603- eR
601+func eM (eN,eO,eP) = {
602+ let eQ = (toBigInt(bP(bg(bo))) - eN)
603+ let eR = (toBigInt(bP(bg(bp))) - eO)
604+ let eS = (toBigInt(value(assetInfo(bn)).quantity) - eP)
605+ let eT = eH(eQ, eR, eS)
606+ eT
604607 }
605608
606609
607-func eS (eT,eU,eN) = {
608- let eO = (bN(be(bm)) + eT)
609- let eP = (bN(be(bn)) + eU)
610- let eQ = (value(assetInfo(bl)).quantity + eN)
611- let eJ = eF(toBigInt(eO), toBigInt(eP), toBigInt(eQ))
612- let eV = [IntegerEntry(aq, height), StringEntry(ap, toString(eJ))]
613- $Tuple2(eV, eJ)
610+func eU (eV,eW,eP) = {
611+ let eQ = (bP(bg(bo)) + eV)
612+ let eR = (bP(bg(bp)) + eW)
613+ let eS = (value(assetInfo(bn)).quantity + eP)
614+ let eL = eH(toBigInt(eQ), toBigInt(eR), toBigInt(eS))
615+ let eX = [IntegerEntry(aq, height), StringEntry(ap, toString(eL))]
616+ $Tuple2(eX, eL)
614617 }
615618
616619
617-func eW (eX,eJ) = if ((eJ >= eX))
620+func eY (eZ,eL) = if ((eL >= eZ))
618621 then true
619- else aN("updated DLp lower than current DLp")
622+ else aP("updated DLp lower than current DLp")
620623
621624
622-func eY (eZ) = {
623- let eO = bN(be(bm))
624- let eP = bN(be(bn))
625- let fa = eZ.amount
626- let fb = fraction(eZ.amount, eZ.price, a, FLOOR)
627- let fc = if ((eZ.orderType == Buy))
628- then $Tuple2(fa, -(fb))
629- else $Tuple2(-(fa), fb)
630- let eT = fc._1
631- let eU = fc._2
632- if (if (if (aV())
625+func fa (fb) = {
626+ let eQ = bP(bg(bo))
627+ let eR = bP(bg(bp))
628+ let fc = fb.amount
629+ let fd = fraction(fb.amount, fb.price, a, FLOOR)
630+ let fe = if ((fb.orderType == Buy))
631+ then $Tuple2(fc, -(fd))
632+ else $Tuple2(-(fc), fd)
633+ let eV = fe._1
634+ let eW = fe._2
635+ if (if (if (aX())
633636 then true
634- else (bk == r))
637+ else (bm == r))
635638 then true
636- else (bk == s))
639+ else (bm == s))
637640 then throw("Admin blocked")
638- else if (if ((eZ.assetPair.amountAsset != bm))
641+ else if (if ((fb.assetPair.amountAsset != bo))
639642 then true
640- else (eZ.assetPair.priceAsset != bn))
643+ else (fb.assetPair.priceAsset != bp))
641644 then throw("Wr assets")
642645 else {
643- let fd = parseBigIntValue(valueOrElse(getString(this, ap), "0"))
644- let fe = eS(eT, eU, 0)
645- let ff = fe._1
646- let fg = fe._2
647- let fh = (fg >= fd)
648- let fi = makeString(["dLp=", toString(fd), " dLpNew=", toString(fg), " amountAssetBalance=", toString(eO), " priceAssetBalance=", toString(eP), " amountAssetBalanceDelta=", toString(eT), " priceAssetBalanceDelta=", toString(eU), " height=", toString(height)], "")
649- $Tuple2(fh, fi)
646+ let ff = parseBigIntValue(valueOrElse(getString(this, ap), "0"))
647+ let fg = eU(eV, eW, 0)
648+ let fh = fg._1
649+ let fi = fg._2
650+ let fj = (fi >= ff)
651+ let fk = makeString(["dLp=", toString(ff), " dLpNew=", toString(fi), " amountAssetBalance=", toString(eQ), " priceAssetBalance=", toString(eR), " amountAssetBalanceDelta=", toString(eV), " priceAssetBalanceDelta=", toString(eW), " height=", toString(height)], "")
652+ $Tuple2(fj, fk)
650653 }
651654 }
652655
653656
654-func fj (cP) = if ((size(cP.payments) != 1))
657+func fl (cR) = if ((size(cR.payments) != 1))
655658 then throw("1 pmnt exp")
656659 else {
657- let fk = value(cP.payments[0])
658- let df = value(fk.assetId)
659- let dL = fk.amount
660- let dX = dd(toBase58String(cP.transactionId), toBase58String(df), dL, cP.caller)
661- let dz = dX._1
662- let dA = dX._2
663- let dn = parseIntValue(dX._9)
664- let dB = dX._10
665- if (if (aV())
660+ let fm = value(cR.payments[0])
661+ let dh = value(fm.assetId)
662+ let dN = fm.amount
663+ let dZ = df(toBase58String(cR.transactionId), toBase58String(dh), dN, cR.caller)
664+ let dB = dZ._1
665+ let dC = dZ._2
666+ let dp = parseIntValue(dZ._9)
667+ let dD = dZ._10
668+ if (if (aX())
666669 then true
667- else (dn == s))
668- then throw(("Admin blocked: " + toString(dn)))
669- else $Tuple5(dz, dA, dL, df, dB)
670+ else (dp == s))
671+ then throw(("Admin blocked: " + toString(dp)))
672+ else $Tuple5(dB, dC, dN, dh, dD)
670673 }
671674
672675
673-func fl (fm,ah,fn,fo,bW,dI,dJ,dK,dL,dM) = {
674- let dX = dC(ah, bW, value(fn).amount, value(fn).assetId, value(fo).amount, value(fo).assetId, fm, (ah == ""), dI, dJ, dK, dL, dM)
675- let dn = parseIntValue(dX._8)
676- if (if (if (aV())
676+func fn (fo,ah,fp,fq,bY,dK,dL,dM,dN,dO) = {
677+ let dZ = dE(ah, bY, value(fp).amount, value(fp).assetId, value(fq).amount, value(fq).assetId, fo, (ah == ""), dK, dL, dM, dN, dO)
678+ let dp = parseIntValue(dZ._8)
679+ if (if (if (aX())
677680 then true
678- else (dn == q))
681+ else (dp == q))
679682 then true
680- else (dn == s))
681- then throw(("Blocked:" + toString(dn)))
682- else dX
683+ else (dp == s))
684+ then throw(("Blocked:" + toString(dp)))
685+ else dZ
683686 }
684687
685688
686-func fp (fq,df,dh,ah,fr) = {
687- let dj = toBase58String(value(bm))
688- let dk = toBase58String(value(bn))
689- let di = bl
690- let dR = bo
691- let dS = bp
692- let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity)
693- let fs = if ((eQ > e))
689+func fr (fs,dh,dj,ah,ft) = {
690+ let dl = toBase58String(value(bo))
691+ let dm = toBase58String(value(bp))
692+ let dk = bn
693+ let dT = bq
694+ let dU = br
695+ let eS = toBigInt(valueOrErrorMessage(assetInfo(dk), "invalid lp asset").quantity)
696+ let fu = if ((eS > e))
694697 then true
695698 else throw("initial deposit requires all coins")
696- if ((fs == fs))
699+ if ((fu == fu))
697700 then {
698- let dp = bN(dj)
699- let dr = bN(dk)
700- let ft = if ((ah == ""))
701- then $Tuple2(dp, dr)
702- else if ((df == dj))
703- then if ((fq > dp))
701+ let dr = bP(dl)
702+ let dt = bP(dm)
703+ let fv = if ((ah == ""))
704+ then $Tuple2(dr, dt)
705+ else if ((dh == dl))
706+ then if ((fs > dr))
704707 then throw("invalid payment amount")
705- else $Tuple2((dp - fq), dr)
706- else if ((df == dk))
707- then if ((fq > dr))
708+ else $Tuple2((dr - fs), dt)
709+ else if ((dh == dm))
710+ then if ((fs > dt))
708711 then throw("invalid payment amount")
709- else $Tuple2(dp, (dr - fq))
712+ else $Tuple2(dr, (dt - fs))
710713 else throw("wrong pmtAssetId")
711- let fu = ft._1
712- let fv = ft._2
713- let fw = if ((df == dj))
714- then $Tuple2(fq, 0)
715- else if ((df == dk))
716- then $Tuple2(0, fq)
714+ let fw = fv._1
715+ let fx = fv._2
716+ let fy = if ((dh == dl))
717+ then $Tuple2(fs, 0)
718+ else if ((dh == dm))
719+ then $Tuple2(0, fs)
717720 else throw("invalid payment")
718- let fx = fw._1
719- let fy = fw._2
720- let fz = if (fr)
721- then $Tuple3(cv(fx, aR)._1, cv(fy, aR)._1, cv(fq, aR)._2)
722- else $Tuple3(fx, fy, 0)
723- let fA = fz._1
724- let fB = fz._2
725- let cx = fz._3
726- let fC = (fu + fA)
727- let fD = (fv + fB)
728- let cb = cy([H(fu, bo), H(fv, bp)])
729- let ca = cy([H(fC, bo), H(fD, bp)])
730- let dY = if ((ca > cb))
721+ let fz = fy._1
722+ let fA = fy._2
723+ let fB = if (ft)
724+ then $Tuple3(cx(fz, aT)._1, cx(fA, aT)._1, cx(fs, aT)._2)
725+ else $Tuple3(fz, fA, 0)
726+ let fC = fB._1
727+ let fD = fB._2
728+ let cz = fB._3
729+ let fE = (fw + fC)
730+ let fF = (fx + fD)
731+ let cd = cA([H(fw, bq), H(fx, br)])
732+ let cc = cA([H(fE, bq), H(fF, br)])
733+ let ea = if ((cc > cd))
731734 then true
732735 else throw()
733- if ((dY == dY))
736+ if ((ea == ea))
734737 then {
735- let fE = fraction(eQ, (ca - cb), cb, FLOOR)
736- let du = L(bP(H(fD, dS), H(fC, dR)), a)
737- let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, ah), by(fx, fy, toInt(fE), du, 0, 0, height, lastBlock.timestamp, 0, 0))]
738- let fF = fraction(fv, a, fu)
739- let fG = fraction(fq, a, (fF + a))
740- let fH = (fq - fG)
741- let fI = fraction(eQ, toBigInt(fH), toBigInt(fv))
742- let fJ = toInt(fraction((fE - fI), b, fI))
743- $Tuple4(toInt(fE), er, cx, fJ)
738+ let fG = fraction(eS, (cc - cd), cd, FLOOR)
739+ let dw = L(bR(H(fF, dU), H(fE, dT)), a)
740+ let et = [IntegerEntry(ab(), dw), IntegerEntry(ac(height, lastBlock.timestamp), dw), StringEntry(af(dj, ah), bA(fz, fA, toInt(fG), dw, 0, 0, height, lastBlock.timestamp, 0, 0))]
741+ let fH = fraction(fx, a, fw)
742+ let fI = fraction(fs, a, (fH + a))
743+ let fJ = (fs - fI)
744+ let fK = fraction(eS, toBigInt(fJ), toBigInt(fx))
745+ let fL = toInt(fraction((fG - fK), b, fK))
746+ $Tuple4(toInt(fG), et, cz, fL)
744747 }
745748 else throw("Strict value is not equal to itself.")
746749 }
747750 else throw("Strict value is not equal to itself.")
748751 }
749752
750753
751-func fK (fL,fM,fN,fm,fO,fP) = {
752- let di = toBase58String(value(bl))
753- let dj = toBase58String(value(bm))
754+func fM (fN,fO,fP,fo,fQ,fR) = {
754755 let dk = toBase58String(value(bn))
755- let fQ = bo
756- let fR = bp
757- let fS = bk
758- let dh = if ((fm == bx))
759- then fO
760- else fm
761- let fk = value(fN[0])
762- let df = value(fk.assetId)
763- let dL = fk.amount
764- let eR = eK(e, e, e)
765- if ((eR == eR))
756+ let dl = toBase58String(value(bo))
757+ let dm = toBase58String(value(bp))
758+ let fS = bq
759+ let fT = br
760+ let fU = bm
761+ let dj = if ((fo == bz))
762+ then fQ
763+ else fo
764+ let fm = value(fP[0])
765+ let dh = value(fm.assetId)
766+ let dN = fm.amount
767+ let eT = eM(e, e, e)
768+ if ((eT == eT))
766769 then {
767- let de = toBase58String(fP)
768- if ((di != toBase58String(df)))
770+ let dg = toBase58String(fR)
771+ if ((dk != toBase58String(dh)))
769772 then throw("Wrong LP")
770773 else {
771- let dp = bN(dj)
772- let dr = bN(dk)
773- let fT = {
774- let aS = invoke(this, "getOneTknV2READONLY", [fL, dL], nil)
775- if ($isInstanceOf(aS, "(Int, Int)"))
776- then aS
777- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
774+ let dr = bP(dl)
775+ let dt = bP(dm)
776+ let fV = {
777+ let aU = invoke(this, "getOneTknV2READONLY", [fN, dN], nil)
778+ if ($isInstanceOf(aU, "(Int, Int)"))
779+ then aU
780+ else throw(($getType(aU) + " couldn't be cast to (Int, Int)"))
778781 }
779- if ((fT == fT))
782+ if ((fV == fV))
780783 then {
781- let cx = fT._2
782- let fU = fT._1
783- let fV = if (if ((fM > 0))
784- then (fM > fU)
784+ let cz = fV._2
785+ let fW = fV._1
786+ let fX = if (if ((fO > 0))
787+ then (fO > fW)
785788 else false)
786- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
787- else fU
788- let fW = if ((fL == dj))
789- then $Tuple4(fV, 0, ((dp - fV) - cx), dr)
790- else if ((fL == dk))
791- then $Tuple4(0, fV, dp, ((dr - fV) - cx))
789+ then aP(makeString(["amount to receive is less than ", toString(fO)], ""))
790+ else fW
791+ let fY = if ((fN == dl))
792+ then $Tuple4(fX, 0, ((dr - fX) - cz), dt)
793+ else if ((fN == dm))
794+ then $Tuple4(0, fX, dr, ((dt - fX) - cz))
792795 else throw("invalid out asset id")
793- let fX = fW._1
794- let fY = fW._2
795- let fC = fW._3
796- let fD = fW._4
797- let fZ = bP(H(fD, fR), H(fC, fQ))
798- let ga = L(fZ, a)
799- let gb = if ((fL == "WAVES"))
796+ let fZ = fY._1
797+ let ga = fY._2
798+ let fE = fY._3
799+ let fF = fY._4
800+ let gb = bR(H(fF, fT), H(fE, fS))
801+ let gc = L(gb, a)
802+ let gd = if ((fN == "WAVES"))
800803 then unit
801- else fromBase58String(fL)
802- let gc = if ((cx > 0))
803- then [ScriptTransfer(aX, cx, gb)]
804+ else fromBase58String(fN)
805+ let ge = if ((cz > 0))
806+ then [ScriptTransfer(aZ, cz, gd)]
804807 else nil
805- let dB = ([ScriptTransfer(dh, fV, gb), StringEntry(ai(toString(dh), de), bJ(fX, fY, dL, ga, height, lastBlock.timestamp)), IntegerEntry(ab(), ga), IntegerEntry(ac(height, lastBlock.timestamp), ga)] ++ gc)
806- if ((dB == dB))
808+ let dD = ([ScriptTransfer(dj, fX, gd), StringEntry(ai(toString(dj), dg), bL(fZ, ga, dN, gc, height, lastBlock.timestamp)), IntegerEntry(ab(), gc), IntegerEntry(ac(height, lastBlock.timestamp), gc)] ++ ge)
809+ if ((dD == dD))
807810 then {
808- let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809- if ((gd == gd))
811+ let gf = invoke(aS, "burn", [dN], [AttachedPayment(dh, dN)])
812+ if ((gf == gf))
810813 then {
811- let ge = {
812- let gf = if ((this == aX))
814+ let gg = {
815+ let gh = if ((this == aZ))
813816 then 0
814- else cx
815- let gg = if ((bc(fL) == bm))
817+ else cz
818+ let gi = if ((be(fN) == bo))
816819 then true
817820 else false
818- if (gg)
819- then $Tuple2(-((fU + gf)), 0)
820- else $Tuple2(0, -((fU + gf)))
821+ if (gi)
822+ then $Tuple2(-((fW + gh)), 0)
823+ else $Tuple2(0, -((fW + gh)))
821824 }
822- let eT = ge._1
823- let eU = ge._2
824- let gh = eS(eT, eU, 0)
825- let gi = gh._1
826- let eJ = gh._2
827- let gj = eW(eR, eJ)
828- if ((gj == gj))
829- then $Tuple2((dB ++ gi), fV)
825+ let eV = gg._1
826+ let eW = gg._2
827+ let gj = eU(eV, eW, 0)
828+ let gk = gj._1
829+ let eL = gj._2
830+ let gl = eY(eT, eL)
831+ if ((gl == gl))
832+ then $Tuple2((dD ++ gk), fX)
830833 else throw("Strict value is not equal to itself.")
831834 }
832835 else throw("Strict value is not equal to itself.")
833836 }
834837 else throw("Strict value is not equal to itself.")
835838 }
836839 else throw("Strict value is not equal to itself.")
837840 }
838841 }
839842 else throw("Strict value is not equal to itself.")
840843 }
841844
842845
843-func gk () = {
844- let gl = getString(Z())
845- if ($isInstanceOf(gl, "String"))
846+func gm () = {
847+ let gn = getString(Z())
848+ if ($isInstanceOf(gn, "String"))
846849 then {
847- let cC = gl
848- fromBase58String(cC)
850+ let cE = gn
851+ fromBase58String(cE)
849852 }
850- else if ($isInstanceOf(gl, "Unit"))
853+ else if ($isInstanceOf(gn, "Unit"))
851854 then unit
852855 else throw("Match error")
853856 }
854857
855858
856-func gm () = {
857- let gl = getString(aa())
858- if ($isInstanceOf(gl, "String"))
859+func go () = {
860+ let gn = getString(aa())
861+ if ($isInstanceOf(gn, "String"))
859862 then {
860- let cC = gl
861- fromBase58String(cC)
863+ let cE = gn
864+ fromBase58String(cE)
862865 }
863- else if ($isInstanceOf(gl, "Unit"))
866+ else if ($isInstanceOf(gn, "Unit"))
864867 then unit
865868 else throw("Match error")
866869 }
867870
868871
869-let gn = throw("Permission denied")
872+let gp = throw("Permission denied")
870873
871-func go (cP) = {
872- let gl = gk()
873- if ($isInstanceOf(gl, "ByteVector"))
874+func gq (cR) = {
875+ let gn = gm()
876+ if ($isInstanceOf(gn, "ByteVector"))
874877 then {
875- let gp = gl
876- (cP.callerPublicKey == gp)
878+ let gr = gn
879+ (cR.callerPublicKey == gr)
877880 }
878- else if ($isInstanceOf(gl, "Unit"))
879- then (cP.caller == this)
881+ else if ($isInstanceOf(gn, "Unit"))
882+ then (cR.caller == this)
880883 else throw("Match error")
881884 }
882885
883886
884-func gq (cP) = {
885- let gl = gk()
886- if ($isInstanceOf(gl, "ByteVector"))
887+func gs (cR) = {
888+ let gn = gm()
889+ if ($isInstanceOf(gn, "ByteVector"))
887890 then {
888- let gp = gl
889- if ((cP.callerPublicKey == gp))
891+ let gr = gn
892+ if ((cR.callerPublicKey == gr))
890893 then true
891- else gn
894+ else gp
892895 }
893- else if ($isInstanceOf(gl, "Unit"))
894- then if ((cP.caller == this))
896+ else if ($isInstanceOf(gn, "Unit"))
897+ then if ((cR.caller == this))
895898 then true
896- else gn
899+ else gp
897900 else throw("Match error")
898901 }
899902
900903
901-func gr (gs,et,gt) = {
902- let bg = aY()
903- let dj = bg[w]
904- let dk = bg[x]
905- let eu = g
906- let ew = parseBigIntValue(l)
907- let cD = (parseBigIntValue(aU) * ew)
908- let cz = if ((gs == false))
909- then [(toBigInt(bN(dj)) + gt), toBigInt(bN(dk))]
910- else [(toBigInt(bN(dk)) + gt), toBigInt(bN(dj))]
911- let ev = cz[0]
912- let cC = ev
913- let cE = (cD * eu)
914- let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
915- let ey = ((cC + ((et * ew) / cE)) - et)
916- func cN (cO,ez) = {
917- let gu = cO
918- let eB = gu._1
919- let dc = gu._2
920- if ((dc != unit))
921- then cO
904+func gt (gu,ev,gv) = {
905+ let bi = ba()
906+ let dl = bi[w]
907+ let dm = bi[x]
908+ let ew = g
909+ let ey = parseBigIntValue(l)
910+ let cF = (parseBigIntValue(aW) * ey)
911+ let cB = if ((gu == false))
912+ then [(toBigInt(bP(dl)) + gv), toBigInt(bP(dm))]
913+ else [(toBigInt(bP(dm)) + gv), toBigInt(bP(dl))]
914+ let ex = cB[0]
915+ let cE = ex
916+ let cG = (cF * ew)
917+ let ez = (((((ev * ev) / (ex * ew)) * ev) * ey) / (cG * ew))
918+ let eA = ((cE + ((ev * ey) / cG)) - ev)
919+ func cP (cQ,eB) = {
920+ let gw = cQ
921+ let eD = gw._1
922+ let de = gw._2
923+ if ((de != unit))
924+ then cQ
922925 else {
923- let eC = (((eB * eB) + ex) / ((g * eB) + ey))
924- let eD = X((eC - value(eB)))
925- if ((f >= eD))
926- then $Tuple2(eC, ez)
927- else $Tuple2(eC, unit)
926+ let eE = (((eD * eD) + ez) / ((g * eD) + eA))
927+ let eF = X((eE - value(eD)))
928+ if ((f >= eF))
929+ then $Tuple2(eE, eB)
930+ else $Tuple2(eE, unit)
928931 }
929932 }
930933
931- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
932- let gv = {
933- let cV = cT
934- let cW = size(cV)
935- let cX = $Tuple2(et, unit)
936- func cY (cZ,da) = if ((da >= cW))
937- then cZ
938- else cN(cZ, cV[da])
934+ let cV = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
935+ let gx = {
936+ let cX = cV
937+ let cY = size(cX)
938+ let cZ = $Tuple2(ev, unit)
939+ func da (db,dc) = if ((dc >= cY))
940+ then db
941+ else cP(db, cX[dc])
939942
940- func db (cZ,da) = if ((da >= cW))
941- then cZ
943+ func dd (db,dc) = if ((dc >= cY))
944+ then db
942945 else throw("List size exceeds 15")
943946
944- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
947+ dd(da(da(da(da(da(da(da(da(da(da(da(da(da(da(da(cZ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
945948 }
946- let eB = gv._1
947- let dc = gv._2
948- if ((dc != unit))
949- then eB
950- else throw(("Y calculation error, Y = " + toString(eB)))
949+ let eD = gx._1
950+ let de = gx._2
951+ if ((de != unit))
952+ then eD
953+ else throw(("Y calculation error, Y = " + toString(eD)))
951954 }
952955
953956
954-@Callable(cP)
955-func calculateAmountOutForSwapREADONLY (gw,gs,gx) = {
956- let gy = if ((gs == false))
957+func gy () = valueOrElse(getBoolean(aS, aE(toString(this))), false)
958+
959+
960+@Callable(cR)
961+func calculateAmountOutForSwapREADONLY (gz,gu,gA) = {
962+ let gB = if ((gu == false))
957963 then {
958- let gz = aJ(this, ak())
959- let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960- $Tuple2(gz, gt)
964+ let gC = aL(this, ak())
965+ let gv = (toBigInt(bP(aL(this, aj()))) + toBigInt(gz))
966+ $Tuple2(gC, gv)
961967 }
962968 else {
963- let gz = aJ(this, aj())
964- let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965- $Tuple2(gz, gt)
969+ let gC = aL(this, aj())
970+ let gv = (toBigInt(bP(aL(this, ak()))) + toBigInt(gz))
971+ $Tuple2(gC, gv)
966972 }
967- let gz = gy._1
968- let gt = gy._2
969- let bg = aY()
970- let dj = bg[w]
971- let dk = bg[x]
972- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
973- let et = cy(cz)
974- let eB = gr(gs, et, toBigInt(gw))
975- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
976- let gB = max([0, toInt(gA)])
977- let gC = if ((gs == false))
978- then [((toBigInt(bN(dj)) + toBigInt(gw)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
979- else [(toBigInt(bN(dj)) - gA), ((toBigInt(bN(dk)) + toBigInt(gw)) + toBigInt(gx))]
980- let gD = cy(gC)
981- let dY = if ((gD >= et))
973+ let gC = gB._1
974+ let gv = gB._2
975+ let bi = ba()
976+ let dl = bi[w]
977+ let dm = bi[x]
978+ let cB = [toBigInt(bP(dl)), toBigInt(bP(dm))]
979+ let ev = cA(cB)
980+ let eD = gt(gu, ev, toBigInt(gz))
981+ let gD = ((toBigInt(bP(gC)) - eD) - toBigInt(1))
982+ let gE = max([0, toInt(gD)])
983+ let gF = if ((gu == false))
984+ then [((toBigInt(bP(dl)) + toBigInt(gz)) + toBigInt(gA)), (toBigInt(bP(dm)) - gD)]
985+ else [(toBigInt(bP(dl)) - gD), ((toBigInt(bP(dm)) + toBigInt(gz)) + toBigInt(gA))]
986+ let gG = cA(gF)
987+ let ea = if ((gG >= ev))
982988 then true
983- else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__"))
984- if ((dY == dY))
985- then $Tuple2(nil, gB)
989+ else throw(makeString(["new D is fewer error", toString(ev), toString(gG)], "__"))
990+ if ((ea == ea))
991+ then $Tuple2(nil, gE)
986992 else throw("Strict value is not equal to itself.")
987993 }
988994
989995
990996
991-@Callable(cP)
992-func calculateAmountOutForSwapAndSendTokens (gw,gs,gE,gF,gx) = {
993- let gG = {
994- let aS = invoke(aQ, "getSwapContractREADONLY", nil, nil)
995- if ($isInstanceOf(aS, "String"))
996- then aS
997- else throw(($getType(aS) + " couldn't be cast to String"))
997+@Callable(cR)
998+func calculateAmountOutForSwapAndSendTokens (gz,gu,gH,gI,gA) = {
999+ let gJ = {
1000+ let aU = invoke(aS, "getSwapContractREADONLY", nil, nil)
1001+ if ($isInstanceOf(aU, "String"))
1002+ then aU
1003+ else throw(($getType(aU) + " couldn't be cast to String"))
9981004 }
999- let gH = [if ((value(cP.payments[0]).amount >= gw))
1005+ let gK = [if ((value(cR.payments[0]).amount >= gz))
10001006 then true
1001- else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG)))
1007+ else aP("Wrong amount"), if ((cR.caller == addressFromStringValue(gJ)))
10021008 then true
1003- else aN("Permission denied")]
1004- if ((gH == gH))
1009+ else aP("Permission denied")]
1010+ if ((gK == gK))
10051011 then {
1006- let fk = value(cP.payments[0])
1007- let gI = be(fk.assetId)
1008- let gJ = if ((gs == false))
1012+ let fm = value(cR.payments[0])
1013+ let gL = bg(fm.assetId)
1014+ let gM = if ((gu == false))
10091015 then {
1010- let gz = aJ(this, ak())
1011- let gt = (bN(gI) - value(cP.payments[0]).amount)
1012- $Tuple2(gz, gt)
1016+ let gC = aL(this, ak())
1017+ let gv = (bP(gL) - value(cR.payments[0]).amount)
1018+ $Tuple2(gC, gv)
10131019 }
10141020 else {
1015- let gz = aJ(this, aj())
1016- let gt = (bN(gI) - value(cP.payments[0]).amount)
1017- $Tuple2(gz, gt)
1021+ let gC = aL(this, aj())
1022+ let gv = (bP(gL) - value(cR.payments[0]).amount)
1023+ $Tuple2(gC, gv)
10181024 }
1019- let gz = gJ._1
1020- let gt = gJ._2
1021- let bg = aY()
1022- let dj = bg[w]
1023- let dk = bg[x]
1024- let cz = if ((gs == false))
1025- then [(toBigInt(bN(dj)) - toBigInt(value(cP.payments[0]).amount)), toBigInt(bN(dk))]
1026- else [toBigInt(bN(dj)), (toBigInt(bN(dk)) - toBigInt(value(cP.payments[0]).amount))]
1027- let et = cy(cz)
1028- let eB = gr(gs, et, toBigInt(0))
1029- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
1030- let gB = max([0, toInt(gA)])
1031- let gK = if ((gB >= gE))
1025+ let gC = gM._1
1026+ let gv = gM._2
1027+ let bi = ba()
1028+ let dl = bi[w]
1029+ let dm = bi[x]
1030+ let cB = if ((gu == false))
1031+ then [(toBigInt(bP(dl)) - toBigInt(value(cR.payments[0]).amount)), toBigInt(bP(dm))]
1032+ else [toBigInt(bP(dl)), (toBigInt(bP(dm)) - toBigInt(value(cR.payments[0]).amount))]
1033+ let ev = cA(cB)
1034+ let eD = gt(gu, ev, toBigInt(0))
1035+ let gD = ((toBigInt(bP(gC)) - eD) - toBigInt(1))
1036+ let gE = max([0, toInt(gD)])
1037+ let gN = if ((gE >= gH))
10321038 then true
10331039 else throw("Exchange result is fewer coins than expected")
1034- if ((gK == gK))
1040+ if ((gN == gN))
10351041 then {
1036- let gC = if ((gs == false))
1037- then [(toBigInt(bN(dj)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
1038- else [(toBigInt(bN(dj)) - gA), (toBigInt(bN(dk)) + toBigInt(gx))]
1039- let gD = cy(gC)
1040- let dY = if ((gD >= et))
1042+ let gF = if ((gu == false))
1043+ then [(toBigInt(bP(dl)) + toBigInt(gA)), (toBigInt(bP(dm)) - gD)]
1044+ else [(toBigInt(bP(dl)) - gD), (toBigInt(bP(dm)) + toBigInt(gA))]
1045+ let gG = cA(gF)
1046+ let ea = if ((gG >= ev))
10411047 then true
10421048 else throw("new D is fewer error")
1043- if ((dY == dY))
1044- then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB)
1049+ if ((ea == ea))
1050+ then $Tuple2([ScriptTransfer(addressFromStringValue(gI), gE, be(gC))], gE)
10451051 else throw("Strict value is not equal to itself.")
10461052 }
10471053 else throw("Strict value is not equal to itself.")
10481054 }
10491055 else throw("Strict value is not equal to itself.")
10501056 }
10511057
10521058
10531059
1054-@Callable(cP)
1060+@Callable(cR)
10551061 func constructor (Y) = {
1056- let ex = gq(cP)
1057- if ((ex == ex))
1062+ let ez = gs(cR)
1063+ if ((ez == ez))
10581064 then [StringEntry(Y(), Y)]
10591065 else throw("Strict value is not equal to itself.")
10601066 }
10611067
10621068
10631069
1064-@Callable(cP)
1065-func setManager (gL) = {
1066- let ex = gq(cP)
1067- if ((ex == ex))
1070+@Callable(cR)
1071+func setManager (gO) = {
1072+ let ez = gs(cR)
1073+ if ((ez == ez))
10681074 then {
1069- let gM = fromBase58String(gL)
1070- if ((gM == gM))
1071- then [StringEntry(aa(), gL)]
1075+ let gP = fromBase58String(gO)
1076+ if ((gP == gP))
1077+ then [StringEntry(aa(), gO)]
10721078 else throw("Strict value is not equal to itself.")
10731079 }
10741080 else throw("Strict value is not equal to itself.")
10751081 }
10761082
10771083
10781084
1079-@Callable(cP)
1085+@Callable(cR)
10801086 func confirmManager () = {
1081- let cu = gm()
1082- let gN = if (isDefined(cu))
1087+ let cw = go()
1088+ let gQ = if (isDefined(cw))
10831089 then true
10841090 else throw("No pending manager")
1085- if ((gN == gN))
1091+ if ((gQ == gQ))
10861092 then {
1087- let gO = if ((cP.callerPublicKey == value(cu)))
1093+ let gR = if ((cR.callerPublicKey == value(cw)))
10881094 then true
10891095 else throw("You are not pending manager")
1090- if ((gO == gO))
1091- then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
1096+ if ((gR == gR))
1097+ then [StringEntry(Z(), toBase58String(value(cw))), DeleteEntry(aa())]
10921098 else throw("Strict value is not equal to itself.")
10931099 }
10941100 else throw("Strict value is not equal to itself.")
10951101 }
10961102
10971103
10981104
1099-@Callable(cP)
1100-func put (gP,gQ) = {
1101- let gR = bs()
1102- let gS = valueOrErrorMessage(addressFromString(gR[C]), "Wr st addr")
1103- let gT = valueOrErrorMessage(addressFromString(gR[E]), "Wr sl addr")
1104- if ((0 > gP))
1105+@Callable(cR)
1106+func put (gS,gT) = {
1107+ let gU = bu()
1108+ let gV = valueOrErrorMessage(addressFromString(gU[C]), "Wr st addr")
1109+ let gW = valueOrErrorMessage(addressFromString(gU[E]), "Wr sl addr")
1110+ if ((0 > gS))
11051111 then throw("Wrong slippage")
1106- else if ((size(cP.payments) != 2))
1112+ else if ((size(cR.payments) != 2))
11071113 then throw("2 pmnts expd")
11081114 else {
1109- let gU = toBigInt(value(cP.payments[0]).amount)
1110- let gV = toBigInt(value(cP.payments[1]).amount)
1111- let eO = (toBigInt(bN(be(bm))) - gU)
1112- if ((eO == eO))
1115+ let gX = toBigInt(value(cR.payments[0]).amount)
1116+ let gY = toBigInt(value(cR.payments[1]).amount)
1117+ let eQ = (toBigInt(bP(bg(bo))) - gX)
1118+ if ((eQ == eQ))
11131119 then {
1114- let eP = (toBigInt(bN(be(bn))) - gV)
1115- if ((eP == eP))
1120+ let eR = (toBigInt(bP(bg(bp))) - gY)
1121+ if ((eR == eR))
11161122 then {
1117- let eQ = toBigInt(value(assetInfo(bl)).quantity)
1118- if ((eQ == eQ))
1123+ let eS = toBigInt(value(assetInfo(bn)).quantity)
1124+ if ((eS == eS))
11191125 then {
1120- let eR = eK(gU, gV, toBigInt(0))
1121- if ((eR == eR))
1126+ let eT = eM(gX, gY, toBigInt(0))
1127+ if ((eT == eT))
11221128 then {
1123- let gW = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gP, true, false, true, 0, "")
1124- let el = gW._2
1125- let gX = gW._7
1126- let dB = gW._9
1127- let em = gW._10
1128- let en = gW._11
1129- let dj = gW._12
1130- let dk = gW._13
1131- let dX = invoke(aQ, "emit", [el], nil)
1132- if ((dX == dX))
1129+ let gZ = fn(toString(cR.caller), toBase58String(cR.transactionId), AttachedPayment(value(cR.payments[0]).assetId, value(cR.payments[0]).amount), cR.payments[1], gS, true, false, true, 0, "")
1130+ let en = gZ._2
1131+ let ha = gZ._7
1132+ let dD = gZ._9
1133+ let eo = gZ._10
1134+ let ep = gZ._11
1135+ let dl = gZ._12
1136+ let dm = gZ._13
1137+ let dZ = invoke(aS, "emit", [en], nil)
1138+ if ((dZ == dZ))
11331139 then {
1134- let gY = {
1135- let gl = dX
1136- if ($isInstanceOf(gl, "Address"))
1140+ let hb = {
1141+ let gn = dZ
1142+ if ($isInstanceOf(gn, "Address"))
11371143 then {
1138- let gZ = gl
1139- invoke(gZ, "emit", [el], nil)
1144+ let hc = gn
1145+ invoke(hc, "emit", [en], nil)
11401146 }
11411147 else unit
11421148 }
1143- if ((gY == gY))
1149+ if ((hb == hb))
11441150 then {
1145- let ha = if ((em > 0))
1146- then invoke(gT, "put", nil, [AttachedPayment(dj, em)])
1151+ let hd = if ((eo > 0))
1152+ then invoke(gW, "put", nil, [AttachedPayment(dl, eo)])
11471153 else nil
1148- if ((ha == ha))
1154+ if ((hd == hd))
11491155 then {
1150- let hb = if ((en > 0))
1151- then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
1156+ let he = if ((ep > 0))
1157+ then invoke(gW, "put", nil, [AttachedPayment(dm, ep)])
11521158 else nil
1153- if ((hb == hb))
1159+ if ((he == he))
11541160 then {
1155- let hc = if (gQ)
1161+ let hf = if (gT)
11561162 then {
1157- let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)])
1158- if ((hd == hd))
1163+ let hg = invoke(gV, "stake", nil, [AttachedPayment(ha, en)])
1164+ if ((hg == hg))
11591165 then nil
11601166 else throw("Strict value is not equal to itself.")
11611167 }
1162- else [ScriptTransfer(cP.caller, el, gX)]
1163- let he = eS(0, 0, 0)
1164- let gi = he._1
1165- let eJ = he._2
1166- let hf = if ((eJ >= eR))
1168+ else [ScriptTransfer(cR.caller, en, ha)]
1169+ let hh = eU(0, 0, 0)
1170+ let gk = hh._1
1171+ let eL = hh._2
1172+ let hi = if ((eL >= eT))
11671173 then true
1168- else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " "))
1169- if ((hf == hf))
1174+ else aP(makeString(["updated DLp lower than current DLp", toString(eQ), toString(eR), toString(eS), toString(eT), toString(eL), toString(eo), toString(ep)], " "))
1175+ if ((hi == hi))
11701176 then {
1171- let hg = value(assetInfo(bl)).quantity
1172- if ((hg == hg))
1173- then ((dB ++ hc) ++ gi)
1177+ let hj = value(assetInfo(bn)).quantity
1178+ if ((hj == hj))
1179+ then ((dD ++ hf) ++ gk)
11741180 else throw("Strict value is not equal to itself.")
11751181 }
11761182 else throw("Strict value is not equal to itself.")
11771183 }
11781184 else throw("Strict value is not equal to itself.")
11791185 }
11801186 else throw("Strict value is not equal to itself.")
11811187 }
11821188 else throw("Strict value is not equal to itself.")
11831189 }
11841190 else throw("Strict value is not equal to itself.")
11851191 }
11861192 else throw("Strict value is not equal to itself.")
11871193 }
11881194 else throw("Strict value is not equal to itself.")
11891195 }
11901196 else throw("Strict value is not equal to itself.")
11911197 }
11921198 else throw("Strict value is not equal to itself.")
11931199 }
11941200 }
11951201
11961202
11971203
1198-@Callable(cP)
1199-func putOneTknV2 (fM,gQ) = {
1200- let hh = {
1201- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1202- if ($isInstanceOf(aS, "Boolean"))
1203- then aS
1204- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1204+@Callable(cR)
1205+func putOneTknV2 (fO,gT) = {
1206+ let hk = {
1207+ let aU = invoke(aS, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1208+ if ($isInstanceOf(aU, "Boolean"))
1209+ then aU
1210+ else throw(($getType(aU) + " couldn't be cast to Boolean"))
12051211 }
1206- let hi = if (if (if (aV())
1212+ let hl = if (if (if (aX())
12071213 then true
1208- else (bk == q))
1214+ else (bm == q))
12091215 then true
1210- else (bk == s))
1216+ else (bm == s))
12111217 then true
1212- else hh
1213- let gH = [if (if (!(hi))
1218+ else hk
1219+ let gK = [if (if (!(hl))
12141220 then true
1215- else go(cP))
1221+ else gq(cR))
12161222 then true
1217- else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
1223+ else aP("put operation is blocked by admin"), if ((size(cR.payments) == 1))
12181224 then true
1219- else aN("exactly 1 payment are expected")]
1220- if ((gH == gH))
1225+ else aP("exactly 1 payment are expected")]
1226+ if ((gK == gK))
12211227 then {
1222- let dj = toBase58String(value(bm))
1223- let dk = toBase58String(value(bn))
1224- let di = bl
1225- let fQ = bo
1226- let fR = bp
1227- let dh = if ((cP.caller == this))
1228- then cP.originCaller
1229- else cP.caller
1230- let fk = value(cP.payments[0])
1231- let df = toBase58String(value(fk.assetId))
1232- let dL = fk.amount
1233- let eR = if ((fk.assetId == bm))
1234- then eK(toBigInt(dL), toBigInt(0), toBigInt(0))
1235- else eK(toBigInt(0), toBigInt(dL), toBigInt(0))
1236- if ((eR == eR))
1228+ let dl = toBase58String(value(bo))
1229+ let dm = toBase58String(value(bp))
1230+ let dk = bn
1231+ let fS = bq
1232+ let fT = br
1233+ let dj = if ((cR.caller == this))
1234+ then cR.originCaller
1235+ else cR.caller
1236+ let fm = value(cR.payments[0])
1237+ let dh = toBase58String(value(fm.assetId))
1238+ let dN = fm.amount
1239+ let eT = if ((fm.assetId == bo))
1240+ then eM(toBigInt(dN), toBigInt(0), toBigInt(0))
1241+ else eM(toBigInt(0), toBigInt(dN), toBigInt(0))
1242+ if ((eT == eT))
12371243 then {
1238- let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1239- if ((hj == hj))
1244+ let hm = fr(dN, dh, toString(dj), toBase58String(cR.transactionId), true)
1245+ if ((hm == hm))
12401246 then {
1241- let cx = hj._3
1242- let dB = hj._2
1243- let hk = hj._1
1244- let el = if (if ((fM > 0))
1245- then (fM > hk)
1247+ let cz = hm._3
1248+ let dD = hm._2
1249+ let hn = hm._1
1250+ let en = if (if ((fO > 0))
1251+ then (fO > hn)
12461252 else false)
1247- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
1248- else hk
1249- let gW = invoke(aQ, "emit", [el], nil)
1250- if ((gW == gW))
1253+ then aP(makeString(["amount to receive is less than ", toString(fO)], ""))
1254+ else hn
1255+ let gZ = invoke(aS, "emit", [en], nil)
1256+ if ((gZ == gZ))
12511257 then {
1252- let gY = {
1253- let gl = gW
1254- if ($isInstanceOf(gl, "Address"))
1258+ let hb = {
1259+ let gn = gZ
1260+ if ($isInstanceOf(gn, "Address"))
12551261 then {
1256- let gZ = gl
1257- invoke(gZ, "emit", [el], nil)
1262+ let hc = gn
1263+ invoke(hc, "emit", [en], nil)
12581264 }
12591265 else unit
12601266 }
1261- if ((gY == gY))
1267+ if ((hb == hb))
12621268 then {
1263- let hc = if (gQ)
1269+ let hf = if (gT)
12641270 then {
1265- let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1266- if ((hd == hd))
1271+ let hg = invoke(bw, "stakeFor", [toString(cR.caller)], [AttachedPayment(dk, en)])
1272+ if ((hg == hg))
12671273 then nil
12681274 else throw("Strict value is not equal to itself.")
12691275 }
1270- else [ScriptTransfer(cP.caller, el, di)]
1271- let gc = if ((cx > 0))
1272- then [ScriptTransfer(aX, cx, fromBase58String(df))]
1276+ else [ScriptTransfer(cR.caller, en, dk)]
1277+ let ge = if ((cz > 0))
1278+ then [ScriptTransfer(aZ, cz, fromBase58String(dh))]
12731279 else nil
1274- let hl = if ((this == aX))
1280+ let ho = if ((this == aZ))
12751281 then $Tuple2(0, 0)
12761282 else {
1277- let hm = if ((fk.assetId == bm))
1283+ let hp = if ((fm.assetId == bo))
12781284 then true
12791285 else false
1280- if (hm)
1281- then $Tuple2(-(cx), 0)
1282- else $Tuple2(0, -(cx))
1286+ if (hp)
1287+ then $Tuple2(-(cz), 0)
1288+ else $Tuple2(0, -(cz))
12831289 }
1284- let eT = hl._1
1285- let eU = hl._2
1286- let hn = eS(eT, eU, 0)
1287- let gi = hn._1
1288- let eJ = hn._2
1289- let gj = eW(eR, eJ)
1290- if ((gj == gj))
1291- then $Tuple2((((dB ++ hc) ++ gc) ++ gi), el)
1290+ let eV = ho._1
1291+ let eW = ho._2
1292+ let hq = eU(eV, eW, 0)
1293+ let gk = hq._1
1294+ let eL = hq._2
1295+ let gl = eY(eT, eL)
1296+ if ((gl == gl))
1297+ then $Tuple2((((dD ++ hf) ++ ge) ++ gk), en)
12921298 else throw("Strict value is not equal to itself.")
12931299 }
12941300 else throw("Strict value is not equal to itself.")
12951301 }
12961302 else throw("Strict value is not equal to itself.")
12971303 }
12981304 else throw("Strict value is not equal to itself.")
12991305 }
13001306 else throw("Strict value is not equal to itself.")
13011307 }
13021308 else throw("Strict value is not equal to itself.")
13031309 }
13041310
13051311
13061312
1307-@Callable(cP)
1308-func putForFree (ho) = if ((0 > ho))
1313+@Callable(cR)
1314+func putForFree (hr) = if ((0 > hr))
13091315 then throw("Wrong slpg")
1310- else if ((size(cP.payments) != 2))
1316+ else if ((size(cR.payments) != 2))
13111317 then throw("2 pmnts expd")
13121318 else {
1313- let hp = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], ho, false, false, true, 0, "")
1314- let dB = hp._9
1315- let gU = toBigInt(value(cP.payments[0]).amount)
1316- let gV = toBigInt(value(cP.payments[1]).amount)
1317- let eR = eK(gU, gV, toBigInt(0))
1318- if ((eR == eR))
1319+ let hs = fn(toString(cR.caller), toBase58String(cR.transactionId), AttachedPayment(value(cR.payments[0]).assetId, value(cR.payments[0]).amount), cR.payments[1], hr, false, false, true, 0, "")
1320+ let dD = hs._9
1321+ let gX = toBigInt(value(cR.payments[0]).amount)
1322+ let gY = toBigInt(value(cR.payments[1]).amount)
1323+ let eT = eM(gX, gY, toBigInt(0))
1324+ if ((eT == eT))
13191325 then {
1320- let hq = eS(0, 0, 0)
1321- let gi = hq._1
1322- let eJ = hq._2
1323- let gj = eW(eR, eJ)
1324- if ((gj == gj))
1325- then (dB ++ gi)
1326+ let ht = eU(0, 0, 0)
1327+ let gk = ht._1
1328+ let eL = ht._2
1329+ let gl = eY(eT, eL)
1330+ if ((gl == gl))
1331+ then (dD ++ gk)
13261332 else throw("Strict value is not equal to itself.")
13271333 }
13281334 else throw("Strict value is not equal to itself.")
13291335 }
13301336
13311337
13321338
1333-@Callable(cP)
1339+@Callable(cR)
13341340 func get () = {
1335- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1336- if ((eR == eR))
1341+ let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1342+ if ((eT == eT))
13371343 then {
1338- let dX = fj(cP)
1339- let hr = dX._1
1340- let dA = dX._2
1341- let dL = dX._3
1342- let df = dX._4
1343- let dB = dX._5
1344- let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1345- if ((ey == ey))
1344+ let dZ = fl(cR)
1345+ let hu = dZ._1
1346+ let dC = dZ._2
1347+ let dN = dZ._3
1348+ let dh = dZ._4
1349+ let dD = dZ._5
1350+ let eA = invoke(aS, "burn", [dN], [AttachedPayment(dh, dN)])
1351+ if ((eA == eA))
13461352 then {
1347- let hs = eS(-(hr), -(dA), 0)
1348- let gi = hs._1
1349- let eJ = hs._2
1350- let gj = eW(eR, eJ)
1351- if ((gj == gj))
1352- then (dB ++ gi)
1353+ let hv = eU(-(hu), -(dC), 0)
1354+ let gk = hv._1
1355+ let eL = hv._2
1356+ let gl = eY(eT, eL)
1357+ if ((gl == gl))
1358+ then (dD ++ gk)
13531359 else throw("Strict value is not equal to itself.")
13541360 }
13551361 else throw("Strict value is not equal to itself.")
13561362 }
13571363 else throw("Strict value is not equal to itself.")
13581364 }
13591365
13601366
13611367
1362-@Callable(cP)
1363-func getOneTknV2 (fL,fM) = {
1364- let hh = {
1365- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1366- if ($isInstanceOf(aS, "Boolean"))
1367- then aS
1368- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1368+@Callable(cR)
1369+func getOneTknV2 (fN,fO) = {
1370+ let hk = {
1371+ let aU = invoke(aS, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1372+ if ($isInstanceOf(aU, "Boolean"))
1373+ then aU
1374+ else throw(($getType(aU) + " couldn't be cast to Boolean"))
13691375 }
1370- let ht = if (if (aV())
1376+ let hw = if (if (aX())
13711377 then true
1372- else (bk == s))
1378+ else (bm == s))
13731379 then true
1374- else hh
1375- let gH = [if (if (!(ht))
1380+ else hk
1381+ let gK = [if (if (!(hw))
13761382 then true
1377- else go(cP))
1383+ else gq(cR))
13781384 then true
1379- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
1385+ else aP("get operation is blocked by admin"), if ((size(cR.payments) == 1))
13801386 then true
1381- else aN("exactly 1 payment are expected")]
1382- if ((gH == gH))
1387+ else aP("exactly 1 payment are expected")]
1388+ if ((gK == gK))
13831389 then {
1384- let hu = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId)
1385- let dB = hu._1
1386- let fV = hu._2
1387- $Tuple2(dB, fV)
1390+ let hx = fM(fN, fO, cR.payments, cR.caller, cR.originCaller, cR.transactionId)
1391+ let dD = hx._1
1392+ let fX = hx._2
1393+ $Tuple2(dD, fX)
13881394 }
13891395 else throw("Strict value is not equal to itself.")
13901396 }
13911397
13921398
13931399
1394-@Callable(cP)
1400+@Callable(cR)
13951401 func refreshDLp () = {
1396- let hv = valueOrElse(getInteger(aq), 0)
1397- let hw = if (((height - hv) >= at))
1402+ let hy = valueOrElse(getInteger(aq), 0)
1403+ let hz = if (((height - hy) >= at))
13981404 then unit
1399- else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1400- if ((hw == hw))
1405+ else aP(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1406+ if ((hz == hz))
14011407 then {
1402- let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp"))
1403- let hx = eS(0, 0, 0)
1404- let hy = hx._1
1405- let eJ = hx._2
1406- let eV = if ((fd != eJ))
1407- then hy
1408- else aN("nothing to refresh")
1409- $Tuple2(eV, toString(eJ))
1408+ let ff = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aR("invalid dLp"))
1409+ let hA = eU(0, 0, 0)
1410+ let hB = hA._1
1411+ let eL = hA._2
1412+ let eX = if ((ff != eL))
1413+ then hB
1414+ else aP("nothing to refresh")
1415+ $Tuple2(eX, toString(eL))
14101416 }
14111417 else throw("Strict value is not equal to itself.")
14121418 }
14131419
14141420
14151421
1416-@Callable(cP)
1417-func getOneTknV2READONLY (fL,hz) = {
1418- let dj = toBase58String(value(bm))
1422+@Callable(cR)
1423+func getOneTknV2READONLY (fN,hC) = {
1424+ let dl = toBase58String(value(bo))
1425+ let dm = toBase58String(value(bp))
14191426 let dk = toBase58String(value(bn))
1420- let di = toBase58String(value(bl))
1421- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1422- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1423- let cb = cy(cz)
1424- let ca = (cb - fraction(toBigInt(hz), cb, eI))
1425- let hA = if ((fL == dj))
1427+ let cB = [toBigInt(bP(dl)), toBigInt(bP(dm))]
1428+ let eK = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dk)), "invalid lp asset").quantity)
1429+ let cd = cA(cB)
1430+ let cc = (cd - fraction(toBigInt(hC), cd, eK))
1431+ let hD = if ((fN == dl))
14261432 then 0
1427- else if ((fL == dk))
1433+ else if ((fN == dm))
14281434 then 1
14291435 else throw("invalid out asset id")
1430- let hB = es(cz, hA, ca)
1431- let gA = (cz[hA] - hB)
1432- let gB = max([0, toInt((gA - f))])
1433- let hC = cv(gB, aT)
1434- let fU = hC._1
1435- let cx = hC._2
1436- $Tuple2(nil, $Tuple2(fU, cx))
1436+ let hE = eu(cB, hD, cc)
1437+ let gD = (cB[hD] - hE)
1438+ let gE = max([0, toInt((gD - f))])
1439+ let hF = cx(gE, aV)
1440+ let fW = hF._1
1441+ let cz = hF._2
1442+ $Tuple2(nil, $Tuple2(fW, cz))
14371443 }
14381444
14391445
14401446
1441-@Callable(cP)
1442-func getOneTknV2WithBonusREADONLY (fL,hz) = {
1443- let dj = toBase58String(value(bm))
1447+@Callable(cR)
1448+func getOneTknV2WithBonusREADONLY (fN,hC) = {
1449+ let dl = toBase58String(value(bo))
1450+ let dm = toBase58String(value(bp))
14441451 let dk = toBase58String(value(bn))
1445- let di = toBase58String(value(bl))
1446- let dp = bN(dj)
1447- let dr = bN(dk)
1448- let hD = {
1449- let aS = invoke(this, "getOneTknV2READONLY", [fL, hz], nil)
1450- if ($isInstanceOf(aS, "(Int, Int)"))
1451- then aS
1452- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
1452+ let dr = bP(dl)
1453+ let dt = bP(dm)
1454+ let hG = {
1455+ let aU = invoke(this, "getOneTknV2READONLY", [fN, hC], nil)
1456+ if ($isInstanceOf(aU, "(Int, Int)"))
1457+ then aU
1458+ else throw(($getType(aU) + " couldn't be cast to (Int, Int)"))
14531459 }
1454- let fU = hD._1
1455- let cx = hD._2
1456- let dX = dd("", di, hz, this)
1457- let dz = dX._1
1458- let dA = dX._2
1459- let hE = (dz + dA)
1460- let fJ = if ((hE == 0))
1461- then if ((fU == 0))
1460+ let fW = hG._1
1461+ let cz = hG._2
1462+ let dZ = df("", dk, hC, this)
1463+ let dB = dZ._1
1464+ let dC = dZ._2
1465+ let hH = (dB + dC)
1466+ let fL = if ((hH == 0))
1467+ then if ((fW == 0))
14621468 then 0
14631469 else throw("bonus calculation error")
1464- else fraction((fU - hE), a, hE)
1465- $Tuple2(nil, $Tuple3(fU, cx, fJ))
1470+ else fraction((fW - hH), a, hH)
1471+ $Tuple2(nil, $Tuple3(fW, cz, fL))
14661472 }
14671473
14681474
14691475
1470-@Callable(cP)
1471-func getNoLess (hF,hG) = {
1472- let dX = fj(cP)
1473- let dz = dX._1
1474- let dA = dX._2
1475- let dL = dX._3
1476- let df = dX._4
1477- let dB = dX._5
1478- if ((hF > dz))
1479- then throw(((("Failed: " + toString(dz)) + " < ") + toString(hF)))
1480- else if ((hG > dA))
1481- then throw(((("Failed: " + toString(dA)) + " < ") + toString(hG)))
1476+@Callable(cR)
1477+func getNoLess (hI,hJ) = {
1478+ let dZ = fl(cR)
1479+ let dB = dZ._1
1480+ let dC = dZ._2
1481+ let dN = dZ._3
1482+ let dh = dZ._4
1483+ let dD = dZ._5
1484+ if ((hI > dB))
1485+ then throw(((("Failed: " + toString(dB)) + " < ") + toString(hI)))
1486+ else if ((hJ > dC))
1487+ then throw(((("Failed: " + toString(dC)) + " < ") + toString(hJ)))
14821488 else {
1483- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1484- if ((eR == eR))
1489+ let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1490+ if ((eT == eT))
14851491 then {
1486- let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1487- if ((hH == hH))
1492+ let hK = invoke(aS, "burn", [dN], [AttachedPayment(dh, dN)])
1493+ if ((hK == hK))
14881494 then {
1489- let hI = eS(-(dz), -(dA), 0)
1490- let gi = hI._1
1491- let eJ = hI._2
1492- let gj = eW(eR, eJ)
1493- if ((gj == gj))
1494- then (dB ++ gi)
1495+ let hL = eU(-(dB), -(dC), 0)
1496+ let gk = hL._1
1497+ let eL = hL._2
1498+ let gl = eY(eT, eL)
1499+ if ((gl == gl))
1500+ then (dD ++ gk)
14951501 else throw("Strict value is not equal to itself.")
14961502 }
14971503 else throw("Strict value is not equal to itself.")
14981504 }
14991505 else throw("Strict value is not equal to itself.")
15001506 }
15011507 }
15021508
15031509
15041510
1505-@Callable(cP)
1506-func unstakeAndGet (cw) = {
1507- let hJ = if ((size(cP.payments) != 0))
1511+@Callable(cR)
1512+func unstakeAndGet (cy) = {
1513+ let hM = if ((size(cR.payments) != 0))
15081514 then throw("No pmnts expd")
15091515 else true
1510- if ((hJ == hJ))
1516+ if ((hM == hM))
15111517 then {
1512- let hK = bs()
1513- let gX = bl
1514- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1515- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1516- if ((eR == eR))
1518+ let hN = bu()
1519+ let ha = bn
1520+ let hO = valueOrErrorMessage(addressFromString(hN[C]), "Wr st addr")
1521+ let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1522+ if ((eT == eT))
15171523 then {
1518- let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil)
1519- if ((hM == hM))
1524+ let hP = invoke(hO, "unstake", [toBase58String(ha), cy], nil)
1525+ if ((hP == hP))
15201526 then {
1521- let dX = dd(toBase58String(cP.transactionId), toBase58String(gX), cw, cP.caller)
1522- let dz = dX._1
1523- let dA = dX._2
1524- let dn = parseIntValue(dX._9)
1525- let dB = dX._10
1526- let hN = if (if (aV())
1527+ let dZ = df(toBase58String(cR.transactionId), toBase58String(ha), cy, cR.caller)
1528+ let dB = dZ._1
1529+ let dC = dZ._2
1530+ let dp = parseIntValue(dZ._9)
1531+ let dD = dZ._10
1532+ let hQ = if (if (aX())
15271533 then true
1528- else (dn == s))
1529- then throw(("Blocked: " + toString(dn)))
1534+ else (dp == s))
1535+ then throw(("Blocked: " + toString(dp)))
15301536 else true
1531- if ((hN == hN))
1537+ if ((hQ == hQ))
15321538 then {
1533- let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)])
1534- if ((hO == hO))
1539+ let hR = invoke(aS, "burn", [cy], [AttachedPayment(ha, cy)])
1540+ if ((hR == hR))
15351541 then {
1536- let hP = eS(-(dz), -(dA), 0)
1537- let gi = hP._1
1538- let eJ = hP._2
1539- let gj = eW(eR, eJ)
1540- if ((gj == gj))
1541- then (dB ++ gi)
1542+ let hS = eU(-(dB), -(dC), 0)
1543+ let gk = hS._1
1544+ let eL = hS._2
1545+ let gl = eY(eT, eL)
1546+ if ((gl == gl))
1547+ then (dD ++ gk)
15421548 else throw("Strict value is not equal to itself.")
15431549 }
15441550 else throw("Strict value is not equal to itself.")
15451551 }
15461552 else throw("Strict value is not equal to itself.")
15471553 }
15481554 else throw("Strict value is not equal to itself.")
15491555 }
15501556 else throw("Strict value is not equal to itself.")
15511557 }
15521558 else throw("Strict value is not equal to itself.")
15531559 }
15541560
15551561
15561562
1557-@Callable(cP)
1558-func unstakeAndGetNoLess (hQ,hR,hG) = {
1559- let ht = if (aV())
1563+@Callable(cR)
1564+func unstakeAndGetNoLess (hT,hU,hJ) = {
1565+ let hw = if (aX())
15601566 then true
1561- else (bk == s)
1562- let gH = [if (!(ht))
1567+ else (bm == s)
1568+ let gK = [if (!(hw))
15631569 then true
1564- else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1570+ else throw("get operation is blocked by admin"), if ((size(cR.payments) == 0))
15651571 then true
15661572 else throw("no payments are expected")]
1567- if ((gH == gH))
1573+ if ((gK == gK))
15681574 then {
1569- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1570- if ((eR == eR))
1575+ let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1576+ if ((eT == eT))
15711577 then {
1572- let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil)
1573- if ((hM == hM))
1578+ let hP = invoke(bw, "unstake", [toBase58String(bn), hT], nil)
1579+ if ((hP == hP))
15741580 then {
1575- let hS = dd(toBase58String(cP.transactionId), toBase58String(bl), hQ, cP.caller)
1576- let dz = hS._1
1577- let dA = hS._2
1578- let dB = hS._10
1579- let hT = [if ((dz >= hR))
1581+ let hV = df(toBase58String(cR.transactionId), toBase58String(bn), hT, cR.caller)
1582+ let dB = hV._1
1583+ let dC = hV._2
1584+ let dD = hV._10
1585+ let hW = [if ((dB >= hU))
15801586 then true
1581- else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG))
1587+ else throw(makeString(["amount asset amount to receive is less than ", toString(hU)], "")), if ((dC >= hJ))
15821588 then true
1583- else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1584- if ((hT == hT))
1589+ else throw(makeString(["price asset amount to receive is less than ", toString(hJ)], ""))]
1590+ if ((hW == hW))
15851591 then {
1586- let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)])
1587- if ((hH == hH))
1592+ let hK = invoke(aS, "burn", [hT], [AttachedPayment(bn, hT)])
1593+ if ((hK == hK))
15881594 then {
1589- let hU = eS(-(dz), -(dA), 0)
1590- let gi = hU._1
1591- let eJ = hU._2
1592- let gj = eW(eR, eJ)
1593- if ((gj == gj))
1594- then (dB ++ gi)
1595+ let hX = eU(-(dB), -(dC), 0)
1596+ let gk = hX._1
1597+ let eL = hX._2
1598+ let gl = eY(eT, eL)
1599+ if ((gl == gl))
1600+ then (dD ++ gk)
15951601 else throw("Strict value is not equal to itself.")
15961602 }
15971603 else throw("Strict value is not equal to itself.")
15981604 }
15991605 else throw("Strict value is not equal to itself.")
16001606 }
16011607 else throw("Strict value is not equal to itself.")
16021608 }
16031609 else throw("Strict value is not equal to itself.")
16041610 }
16051611 else throw("Strict value is not equal to itself.")
16061612 }
16071613
16081614
16091615
1610-@Callable(cP)
1611-func unstakeAndGetOneTknV2 (hQ,fL,fM) = {
1612- let hh = {
1613- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1614- if ($isInstanceOf(aS, "Boolean"))
1615- then aS
1616- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1616+@Callable(cR)
1617+func unstakeAndGetOneTknV2 (hT,fN,fO) = {
1618+ let hk = {
1619+ let aU = invoke(aS, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1620+ if ($isInstanceOf(aU, "Boolean"))
1621+ then aU
1622+ else throw(($getType(aU) + " couldn't be cast to Boolean"))
16171623 }
1618- let ht = if (if (aV())
1624+ let hw = if (if (aX())
16191625 then true
1620- else (bk == s))
1626+ else (bm == s))
16211627 then true
1622- else hh
1623- let gH = [if (if (!(ht))
1628+ else hk
1629+ let gK = [if (if (!(hw))
16241630 then true
1625- else go(cP))
1631+ else gq(cR))
16261632 then true
1627- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1633+ else aP("get operation is blocked by admin"), if ((size(cR.payments) == 0))
16281634 then true
1629- else aN("no payments are expected")]
1630- if ((gH == gH))
1635+ else aP("no payments are expected")]
1636+ if ((gK == gK))
16311637 then {
1632- let hK = bs()
1633- let gX = bl
1634- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1635- let dh = cP.caller
1636- let hV = this
1637- let hM = invoke(hL, "unstakeINTERNAL", [gX, hQ, dh.bytes, hV.bytes], nil)
1638- if ((hM == hM))
1638+ let hN = bu()
1639+ let ha = bn
1640+ let hO = valueOrErrorMessage(addressFromString(hN[C]), "Wr st addr")
1641+ let dj = cR.caller
1642+ let hY = this
1643+ let hP = invoke(hO, "unstakeINTERNAL", [ha, hT, dj.bytes, hY.bytes], nil)
1644+ if ((hP == hP))
16391645 then {
1640- let hW = fK(fL, fM, [AttachedPayment(gX, hQ)], cP.caller, cP.originCaller, cP.transactionId)
1641- let dB = hW._1
1642- let fV = hW._2
1643- $Tuple2(dB, fV)
1646+ let hZ = fM(fN, fO, [AttachedPayment(ha, hT)], cR.caller, cR.originCaller, cR.transactionId)
1647+ let dD = hZ._1
1648+ let fX = hZ._2
1649+ $Tuple2(dD, fX)
16441650 }
16451651 else throw("Strict value is not equal to itself.")
16461652 }
16471653 else throw("Strict value is not equal to itself.")
16481654 }
16491655
16501656
16511657
1652-@Callable(cP)
1653-func putOneTknV2WithBonusREADONLY (hX,hY) = {
1654- let hZ = fp(hX, hY, "", "", true)
1655- let fE = hZ._1
1656- let dB = hZ._2
1657- let cx = hZ._3
1658- let fJ = hZ._4
1659- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1658+@Callable(cR)
1659+func putOneTknV2WithBonusREADONLY (ia,ib) = {
1660+ let ic = fr(ia, ib, "", "", true)
1661+ let fG = ic._1
1662+ let dD = ic._2
1663+ let cz = ic._3
1664+ let fL = ic._4
1665+ $Tuple2(nil, $Tuple3(fG, cz, fL))
16601666 }
16611667
16621668
16631669
1664-@Callable(cP)
1665-func putOneTknV2WithoutTakeFeeREADONLY (hX,hY) = {
1666- let ia = fp(hX, hY, "", "", false)
1667- let fE = ia._1
1668- let dB = ia._2
1669- let cx = ia._3
1670- let fJ = ia._4
1671- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1670+@Callable(cR)
1671+func putOneTknV2WithoutTakeFeeREADONLY (ia,ib) = {
1672+ let id = fr(ia, ib, "", "", false)
1673+ let fG = id._1
1674+ let dD = id._2
1675+ let cz = id._3
1676+ let fL = id._4
1677+ $Tuple2(nil, $Tuple3(fG, cz, fL))
16721678 }
16731679
16741680
16751681
1676-@Callable(cP)
1677-func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ)))
1682+@Callable(cR)
1683+func activate (ie,if) = if ((toString(cR.caller) != toString(aS)))
16781684 then throw("denied")
1679- else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
1685+ else $Tuple2([StringEntry(aj(), ie), StringEntry(ak(), if)], "success")
16801686
16811687
16821688
1683-@Callable(cP)
1684-func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1685- then gn
1686- else [StringEntry(id, hN)]
1689+@Callable(cR)
1690+func setS (ig,hQ) = if ((toString(cR.caller) != aL(this, am())))
1691+ then gp
1692+ else [StringEntry(ig, hQ)]
16871693
16881694
16891695
1690-@Callable(cP)
1691-func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1692- then gn
1693- else [IntegerEntry(id, hN)]
1696+@Callable(cR)
1697+func setI (ig,hQ) = if ((toString(cR.caller) != aL(this, am())))
1698+ then gp
1699+ else [IntegerEntry(ig, hQ)]
16941700
16951701
16961702
1697-@Callable(cP)
1698-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
1703+@Callable(cR)
1704+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, ba())
16991705
17001706
17011707
1702-@Callable(cP)
1703-func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
1708+@Callable(cR)
1709+func getAccBalanceWrapperREADONLY (bQ) = $Tuple2(nil, bP(bQ))
17041710
17051711
17061712
1707-@Callable(cP)
1708-func calcPricesWrapperREADONLY (ch,ci,cm) = {
1709- let ie = cl(ch, ci, cm)
1710- $Tuple2(nil, [toString(ie[0]), toString(ie[1]), toString(ie[2])])
1713+@Callable(cR)
1714+func calcPricesWrapperREADONLY (cj,ck,co) = {
1715+ let ih = cn(cj, ck, co)
1716+ $Tuple2(nil, [toString(ih[0]), toString(ih[1]), toString(ih[2])])
17111717 }
17121718
17131719
17141720
1715-@Callable(cP)
1716-func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if))
1721+@Callable(cR)
1722+func fromX18WrapperREADONLY (M,ii) = $Tuple2(nil, L(parseBigIntValue(M), ii))
17171723
17181724
17191725
1720-@Callable(cP)
1726+@Callable(cR)
17211727 func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
17221728
17231729
17241730
1725-@Callable(cP)
1726-func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
1731+@Callable(cR)
1732+func calcPriceBigIntWrapperREADONLY (bS,bT) = $Tuple2(nil, toString(bR(parseBigIntValue(bS), parseBigIntValue(bT))))
17271733
17281734
17291735
1730-@Callable(cP)
1731-func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,ig,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, ig, dH, dI, true, false, 0, ""))
1736+@Callable(cR)
1737+func estimatePutOperationWrapperREADONLY (dg,bY,dF,dG,dH,dI,ij,dJ,dK) = $Tuple2(nil, dE(dg, bY, dF, dG, dH, dI, ij, dJ, dK, true, false, 0, ""))
17321738
17331739
17341740
1735-@Callable(cP)
1736-func estimateGetOperationWrapperREADONLY (de,ih,dg,ig) = {
1737- let dX = dd(de, ih, dg, addressFromStringValue(ig))
1738- $Tuple2(nil, $Tuple10(dX._1, dX._2, dX._3, dX._4, dX._5, dX._6, dX._7, toString(dX._8), dX._9, dX._10))
1741+@Callable(cR)
1742+func estimateGetOperationWrapperREADONLY (dg,ik,di,ij) = {
1743+ let dZ = df(dg, ik, di, addressFromStringValue(ij))
1744+ $Tuple2(nil, $Tuple10(dZ._1, dZ._2, dZ._3, dZ._4, dZ._5, dZ._6, dZ._7, toString(dZ._8), dZ._9, dZ._10))
17391745 }
17401746
17411747
1742-@Verifier(ii)
1743-func ij () = {
1744- let ik = {
1745- let gl = gk()
1746- if ($isInstanceOf(gl, "ByteVector"))
1748+@Verifier(il)
1749+func im () = {
1750+ let in = {
1751+ let gn = gm()
1752+ if ($isInstanceOf(gn, "ByteVector"))
17471753 then {
1748- let gp = gl
1749- gp
1754+ let gr = gn
1755+ gr
17501756 }
1751- else if ($isInstanceOf(gl, "Unit"))
1752- then ii.senderPublicKey
1757+ else if ($isInstanceOf(gn, "Unit"))
1758+ then il.senderPublicKey
17531759 else throw("Match error")
17541760 }
1755- let gl = ii
1756- if ($isInstanceOf(gl, "Order"))
1761+ let gn = il
1762+ if ($isInstanceOf(gn, "Order"))
17571763 then {
1758- let eZ = gl
1759- let il = aW()
1760- let im = eY(eZ)
1761- let aF = im._1
1762- let aG = im._2
1763- let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey)
1764- let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], il)
1765- if (if (if (aF)
1766- then aH
1764+ let fb = gn
1765+ let io = aY()
1766+ let ip = if (gy())
1767+ then $Tuple2(true, "")
1768+ else fa(fb)
1769+ let aH = ip._1
1770+ let aI = ip._2
1771+ let aJ = sigVerify(fb.bodyBytes, fb.proofs[0], fb.senderPublicKey)
1772+ let aK = sigVerify(fb.bodyBytes, fb.proofs[1], io)
1773+ if (if (if (aH)
1774+ then aJ
17671775 else false)
1768- then aI
1776+ then aK
17691777 else false)
17701778 then true
1771- else aE(aF, aG, aH, aI)
1779+ else aG(aH, aI, aJ, aK)
17721780 }
1773- else if ($isInstanceOf(gl, "SetScriptTransaction"))
1781+ else if ($isInstanceOf(gn, "SetScriptTransaction"))
17741782 then {
1775- let cC = gl
1776- if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
1783+ let cE = gn
1784+ if (sigVerify(il.bodyBytes, il.proofs[0], in))
17771785 then true
17781786 else {
1779- let in = blake2b256(value(cC.script))
1780- let io = fromBase64String(value(getString(aQ, aC())))
1781- let ip = scriptHash(this)
1782- if ((io == in))
1783- then (ip != in)
1787+ let iq = blake2b256(value(cE.script))
1788+ let ir = fromBase64String(value(getString(aS, aC())))
1789+ let is = scriptHash(this)
1790+ if ((ir == iq))
1791+ then (is != iq)
17841792 else false
17851793 }
17861794 }
1787- else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
1795+ else sigVerify(il.bodyBytes, il.proofs[0], in)
17881796 }
17891797

github/deemru/w8io/026f985 
686.54 ms