tx · EZMvj2m1oh5YJpKww5WieUP77CjQgxPQpbLSXbNQyq4

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04000000 Waves

2023.03.22 13:32 [2501114] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "EZMvj2m1oh5YJpKww5WieUP77CjQgxPQpbLSXbNQyq4", "fee": 4000000, "feeAssetId": null, "timestamp": 1679481206060, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "HGt3tjrdYEnTWLSGsimuLoQT1iLHqJhh98EB9FbATB8PF1Kzd5Zv7emNkRuZ11rgxQru4vvQ4YXG2N18tGWxNgx" ], "script": "base64:BgKCKwgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCCIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiBGJpZzMiBGJpZzQiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZC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BAJlWgUCZ2wEAmlsCQECYVcABAJpbQkBAmVZAQUCZVoEAmFGCAUCaW0CXzEEAmFHCAUCaW0CXzIEAmFICQD0AwMIBQJlWglib2R5Qnl0ZXMJAJEDAggFAmVaBnByb29mcwAACAUCZVoPc2VuZGVyUHVibGljS2V5BAJhSQkA9AMDCAUCZVoJYm9keUJ5dGVzCQCRAwIIBQJlWgZwcm9vZnMAAQUCaWwDAwMFAmFGBQJhSAcFAmFJBwYJAQJhRQQFAmFGBQJhRwUCYUgFAmFJAwkAAQIFAmdsAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCY0MFAmdsAwkA9AMDCAUCaWkJYm9keUJ5dGVzCQCRAwIIBQJpaQZwcm9vZnMAAAUCaWsGBAJpbgkA9gMBCQEFdmFsdWUBCAUCY0MGc2NyaXB0BAJpbwkA2wQBCQEFdmFsdWUBCQCdCAIFAmFRCQECYUMABAJpcAkA8QcBBQR0aGlzAwkAAAIFAmlvBQJpbgkBAiE9AgUCaXAFAmluBwkA9AMDCAUCaWkJYm9keUJ5dGVzCQCRAwIIBQJpaQZwcm9vZnMAAAUCaWso85DP", "height": 2501114, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9yi73B8L9tyhLcBjCmEBiMe291ZPiqL75Y7odWKPVeup Next: 2iEA3YKceXiVoeaJ1oir6mQv7kESks2LVeGPtAauBsjV Diff:
OldNewDifferences
166166 func aD () = "%s__feeCollectorAddress"
167167
168168
169-func aE (aF) = ("%s%s__skipOrderValidation__" + aF)
169+func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI)))
170170
171171
172-func aG (aH,aI,aJ,aK) = throw((((((((("order validation failed: orderValid=" + toString(aH)) + " (") + aI) + ")") + " senderValid=") + toString(aJ)) + " matcherValid=") + toString(aK)))
172+func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
173173
174174
175-func aL (aM,aN) = valueOrErrorMessage(getString(aM, aN), makeString(["mandatory ", toString(aM), ".", aN, " not defined"], ""))
175+func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
176176
177177
178-func aO (aM,aN) = valueOrErrorMessage(getInteger(aM, aN), makeString(["mandatory ", toString(aM), ".", aN, " not defined"], ""))
178+func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
179179
180180
181-func aP (aQ) = throw(makeString(["lp_stable.ride:", aQ], " "))
181+func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
182182
183183
184-func aR (aQ) = makeString(["lp_stable.ride:", aQ], " ")
184+let aQ = addressFromStringValue(aJ(this, Y()))
185+
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"))
191+ }
192+
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"))
198+ }
199+
200+let aU = aJ(this, al())
201+
202+func aV () = valueOrElse(getBoolean(aQ, aB()), false)
185203
186204
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"))
194- }
195-
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"))
201- }
202-
203-let aW = aL(this, al())
204-
205-func aX () = valueOrElse(getBoolean(aS, aB()), false)
205+func aW () = fromBase58String(aJ(aQ, av()))
206206
207207
208-func aY () = fromBase58String(aL(aS, av()))
208+let aX = addressFromStringValue(aJ(aQ, aD()))
209209
210-
211-let aZ = addressFromStringValue(aL(aS, aD()))
212-
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)
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)
219216 }
220217
221218
222-func be (bf) = if ((bf == k))
219+func bc (bd) = if ((bd == k))
223220 then unit
224- else fromBase58String(bf)
221+ else fromBase58String(bd)
225222
226223
227-func bg (bf) = if ((bf == unit))
224+func be (bd) = if ((bd == unit))
228225 then k
229- else toBase58String(value(bf))
226+ else toBase58String(value(bd))
230227
231228
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]))
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]))
233230
234231
235-let bj = bh(ba())
232+let bh = bf(aY())
236233
237-let bk = bj
234+let bi = bh
238235
239-let bl = bk._1
236+let bj = bi._1
240237
241-let bm = bk._2
238+let bk = bi._2
242239
243-let bn = bk._3
240+let bl = bi._3
244241
245-let bo = bk._4
242+let bm = bi._4
246243
247-let bp = bk._5
244+let bn = bi._5
248245
249-let bq = bk._6
246+let bo = bi._6
250247
251-let br = bk._7
248+let bp = bi._7
252249
253-let bs = bk._8
250+let bq = bi._8
254251
255-let bt = bk._9
252+let br = bi._9
256253
257-func bu () = split(aL(aS, au()), n)
254+func bs () = split(aJ(aQ, au()), n)
258255
259256
260-let bv = bu()
257+let bt = bs()
261258
262-let bw = valueOrErrorMessage(addressFromString(bv[C]), "Invalid staking contract address")
259+let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
263260
264-let bx = valueOrErrorMessage(addressFromString(bv[E]), "Invalid slipage contract address")
261+let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
265262
266-let by = valueOrErrorMessage(addressFromString(bv[F]), "Invalid gwx contract address")
263+let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
267264
268-let bz = valueOrErrorMessage(addressFromString(bv[D]), "Invalid gwx contract address")
265+let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
269266
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)
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)
271268
272269
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)
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)
274271
275272
276-func bP (bQ) = if ((bQ == "WAVES"))
273+func bN (bO) = if ((bO == "WAVES"))
277274 then wavesBalance(this).available
278- else assetBalance(this, fromBase58String(bQ))
275+ else assetBalance(this, fromBase58String(bO))
279276
280277
281-func bR (bS,bT) = fraction(bS, c, bT)
278+func bP (bQ,bR) = fraction(bQ, c, bR)
282279
283280
284-func bU (bS,bT,P) = fraction(bS, c, bT, P)
281+func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
285282
286283
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]))
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]))
293290 }
294291
295292
296-func cb (cc,cd,ce) = {
297- let bZ = fraction(cd, b, cc)
298- let cf = (ce > bZ)
299- if (if (cf)
293+func bZ (ca,cb,cc) = {
294+ let bX = fraction(cb, b, ca)
295+ let cd = (cc > bX)
296+ if (if (cd)
300297 then true
301- else (cd > cc))
302- then throw(((((((toString(cd) + " ") + toString(cc)) + " ") + toString(bZ)) + " ") + toString(ce)))
303- else cf
298+ else (cb > ca))
299+ then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300+ else cd
304301 }
305302
306303
307-func cg (ch,ci,cj,ck) = {
308- let cl = H(cj, ch)
309- let cm = H(ck, ci)
310- bR(cm, cl)
304+func ce (cf,cg,ch,ci) = {
305+ let cj = H(ch, cf)
306+ let ck = H(ci, cg)
307+ bP(ck, cj)
311308 }
312309
313310
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]
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]
324321 }
325322
326323
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)]
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)]
330327 }
331328
332329
333-func cx (cy,ao) = {
334- let cz = if ((ao == 0))
330+func cv (cw,ao) = {
331+ let cx = if ((ao == 0))
335332 then 0
336- else fraction(cy, ao, a)
337- $Tuple2((cy - cz), cz)
333+ else fraction(cw, ao, a)
334+ $Tuple2((cw - cx), cx)
338335 }
339336
340337
341-func cA (cB) = {
342- let cC = cB[0]
343- let cD = cB[1]
344- let cE = (cC + cD)
345- if ((cE == e))
338+func cy (cz) = {
339+ let cA = cz[0]
340+ let cB = cz[1]
341+ let cC = (cA + cB)
342+ if ((cC == e))
346343 then e
347344 else {
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)))
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)))
359356 }
360357
361- func cP (cQ,cR) = if (cQ._2)
362- then cQ
358+ func cN (cO,cP) = if (cO._2)
359+ then cO
363360 else {
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)
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)
373370 }
374371
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])
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])
383380
384- func dd (db,dc) = if ((dc >= cY))
385- then db
386- else throw("List size exceeds 17")
381+ func db (cZ,da) = if ((da >= cW))
382+ then cZ
383+ else throw("List size exceeds 18")
387384
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)
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)
389386 }
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)))
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)))
395392 }
396393 }
397394
398395
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))
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))
408405 then throw("Wrong pmt asset")
409406 else {
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 == ""))
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 == ""))
423420 then nil
424- else [ScriptTransfer(dj, dB, if ((dl == "WAVES"))
421+ else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
425422 then unit
426- else fromBase58String(dl)), ScriptTransfer(dj, dC, if ((dm == "WAVES"))
423+ else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
427424 then unit
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)
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)
430427 }
431428 }
432429
433430
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)
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)
448445 else false)
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)
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)
457454 else false)
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))
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))
469466 then {
470- let cc = cA([(ds + dW), (du + dX)])
471- let ea = if ((cc > cd))
467+ let ca = cy([(dq + dU), (ds + dV)])
468+ let dY = if ((ca > cb))
472469 then true
473470 else throw("D1 should be greater than D0")
474- if ((ea == ea))
471+ if ((dY == dY))
475472 then {
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)
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)
480477 }
481478 else throw("Strict value is not equal to itself.")
482479 }
483480 else {
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)
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)
489486 else false)
490- then (ec > eb)
487+ then (ea > dZ)
491488 else false)
492- then throw(((("Price slippage " + toString(ec)) + " > ") + toString(eb)))
489+ then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
493490 else {
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))
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))
504501 then true
505502 else throw("D1 should be greater than D0")
506- if ((ea == ea))
503+ if ((dY == dY))
507504 then {
508- let cs = fraction(ed, (cc - cd), cd)
509- $Tuple5(O(cs, a, FLOOR), O(eh, dT, CEILING), O(ei, dU, CEILING), dv, eb)
505+ let cq = fraction(eb, (ca - cb), cb)
506+ $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ)
510507 }
511508 else throw("Strict value is not equal to itself.")
512509 }
513510 }
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))
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))
520517 then throw("LP <= 0")
521518 else {
522- let en = if (!(dK))
519+ let el = if (!(dI))
523520 then 0
524- else ej
525- let eo = (dF - ek)
526- let ep = (dH - el)
527- let eq = if (if (dL)
528- then (dO == dP)
521+ else eh
522+ let em = (dD - ei)
523+ let en = (dF - ej)
524+ let eo = if (if (dJ)
525+ then (dM == dN)
529526 else false)
530- then $Tuple2(dN, 0)
531- else if (if (dL)
532- then (dO == dQ)
527+ then $Tuple2(dL, 0)
528+ else if (if (dJ)
529+ then (dM == dO)
533530 else false)
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)
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)
540537 }
541538 }
542539
543540
544-func eu (cB,cR,ev) = {
545- let ew = g
546- let ex = cB[if ((cR == 0))
541+func es (cz,cP,et) = {
542+ let eu = g
543+ let ev = cz[if ((cP == 0))
547544 then 1
548545 else 0]
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
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
561558 else {
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)
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)
567564 }
568565 }
569566
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])
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])
578575
579- func dd (db,dc) = if ((dc >= cY))
580- then db
576+ func db (cZ,da) = if ((da >= cW))
577+ then cZ
581578 else throw("List size exceeds 15")
582579
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)
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)
584581 }
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)))
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)))
590587 }
591588
592589
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))
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))
596593 then e
597- else eL
594+ else eJ
598595 }
599596
600597
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
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
607604 }
608605
609606
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)
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)
617614 }
618615
619616
620-func eY (eZ,eL) = if ((eL >= eZ))
617+func eW (eX,eJ) = if ((eJ >= eX))
621618 then true
622- else aP("updated DLp lower than current DLp")
619+ else aN("updated DLp lower than current DLp")
623620
624621
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())
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())
636633 then true
637- else (bm == r))
634+ else (bk == r))
638635 then true
639- else (bm == s))
636+ else (bk == s))
640637 then throw("Admin blocked")
641- else if (if ((fb.assetPair.amountAsset != bo))
638+ else if (if ((eZ.assetPair.amountAsset != bm))
642639 then true
643- else (fb.assetPair.priceAsset != bp))
640+ else (eZ.assetPair.priceAsset != bn))
644641 then throw("Wr assets")
645642 else {
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)
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)
653650 }
654651 }
655652
656653
657-func fl (cR) = if ((size(cR.payments) != 1))
654+func fj (cP) = if ((size(cP.payments) != 1))
658655 then throw("1 pmnt exp")
659656 else {
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())
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())
669666 then true
670- else (dp == s))
671- then throw(("Admin blocked: " + toString(dp)))
672- else $Tuple5(dB, dC, dN, dh, dD)
667+ else (dn == s))
668+ then throw(("Admin blocked: " + toString(dn)))
669+ else $Tuple5(dz, dA, dL, df, dB)
673670 }
674671
675672
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())
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())
680677 then true
681- else (dp == q))
678+ else (dn == q))
682679 then true
683- else (dp == s))
684- then throw(("Blocked:" + toString(dp)))
685- else dZ
680+ else (dn == s))
681+ then throw(("Blocked:" + toString(dn)))
682+ else dX
686683 }
687684
688685
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))
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))
697694 then true
698695 else throw("initial deposit requires all coins")
699- if ((fu == fu))
696+ if ((fs == fs))
700697 then {
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))
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))
707704 then throw("invalid payment amount")
708- else $Tuple2((dr - fs), dt)
709- else if ((dh == dm))
710- then if ((fs > dt))
705+ else $Tuple2((dp - fq), dr)
706+ else if ((df == dk))
707+ then if ((fq > dr))
711708 then throw("invalid payment amount")
712- else $Tuple2(dr, (dt - fs))
709+ else $Tuple2(dp, (dr - fq))
713710 else throw("wrong pmtAssetId")
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)
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)
720717 else throw("invalid payment")
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))
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))
734731 then true
735732 else throw()
736- if ((ea == ea))
733+ if ((dY == dY))
737734 then {
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)
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)
747744 }
748745 else throw("Strict value is not equal to itself.")
749746 }
751748 }
752749
753750
754-func fM (fN,fO,fP,fo,fQ,fR) = {
751+func fK (fL,fM,fN,fm,fO,fP) = {
752+ let di = toBase58String(value(bl))
753+ let dj = toBase58String(value(bm))
755754 let dk = toBase58String(value(bn))
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))
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))
769766 then {
770- let dg = toBase58String(fR)
771- if ((dk != toBase58String(dh)))
767+ let de = toBase58String(fP)
768+ if ((di != toBase58String(df)))
772769 then throw("Wrong LP")
773770 else {
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)"))
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)"))
781778 }
782- if ((fV == fV))
779+ if ((fT == fT))
783780 then {
784- let cz = fV._2
785- let fW = fV._1
786- let fX = if (if ((fO > 0))
787- then (fO > fW)
781+ let cx = fT._2
782+ let fU = fT._1
783+ let fV = if (if ((fM > 0))
784+ then (fM > fU)
788785 else false)
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))
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))
795792 else throw("invalid out asset id")
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"))
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"))
803800 then unit
804- else fromBase58String(fN)
805- let ge = if ((cz > 0))
806- then [ScriptTransfer(aZ, cz, gd)]
801+ else fromBase58String(fL)
802+ let gc = if ((cx > 0))
803+ then [ScriptTransfer(aX, cx, gb)]
807804 else nil
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))
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))
810807 then {
811- let gf = invoke(aS, "burn", [dN], [AttachedPayment(dh, dN)])
812- if ((gf == gf))
808+ let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809+ if ((gd == gd))
813810 then {
814- let gg = {
815- let gh = if ((this == aZ))
811+ let ge = {
812+ let gf = if ((this == aX))
816813 then 0
817- else cz
818- let gi = if ((be(fN) == bo))
814+ else cx
815+ let gg = if ((bc(fL) == bm))
819816 then true
820817 else false
821- if (gi)
822- then $Tuple2(-((fW + gh)), 0)
823- else $Tuple2(0, -((fW + gh)))
818+ if (gg)
819+ then $Tuple2(-((fU + gf)), 0)
820+ else $Tuple2(0, -((fU + gf)))
824821 }
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)
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)
833830 else throw("Strict value is not equal to itself.")
834831 }
835832 else throw("Strict value is not equal to itself.")
843840 }
844841
845842
846-func gm () = {
847- let gn = getString(Z())
848- if ($isInstanceOf(gn, "String"))
843+func gk () = {
844+ let gl = getString(Z())
845+ if ($isInstanceOf(gl, "String"))
849846 then {
850- let cE = gn
851- fromBase58String(cE)
847+ let cC = gl
848+ fromBase58String(cC)
852849 }
853- else if ($isInstanceOf(gn, "Unit"))
850+ else if ($isInstanceOf(gl, "Unit"))
854851 then unit
855852 else throw("Match error")
856853 }
857854
858855
859-func go () = {
860- let gn = getString(aa())
861- if ($isInstanceOf(gn, "String"))
856+func gm () = {
857+ let gl = getString(aa())
858+ if ($isInstanceOf(gl, "String"))
862859 then {
863- let cE = gn
864- fromBase58String(cE)
860+ let cC = gl
861+ fromBase58String(cC)
865862 }
866- else if ($isInstanceOf(gn, "Unit"))
863+ else if ($isInstanceOf(gl, "Unit"))
867864 then unit
868865 else throw("Match error")
869866 }
870867
871868
872-let gp = throw("Permission denied")
869+let gn = throw("Permission denied")
873870
874-func gq (cR) = {
875- let gn = gm()
876- if ($isInstanceOf(gn, "ByteVector"))
871+func go (cP) = {
872+ let gl = gk()
873+ if ($isInstanceOf(gl, "ByteVector"))
877874 then {
878- let gr = gn
879- (cR.callerPublicKey == gr)
875+ let gp = gl
876+ (cP.callerPublicKey == gp)
880877 }
881- else if ($isInstanceOf(gn, "Unit"))
882- then (cR.caller == this)
878+ else if ($isInstanceOf(gl, "Unit"))
879+ then (cP.caller == this)
883880 else throw("Match error")
884881 }
885882
886883
887-func gs (cR) = {
888- let gn = gm()
889- if ($isInstanceOf(gn, "ByteVector"))
884+func gq (cP) = {
885+ let gl = gk()
886+ if ($isInstanceOf(gl, "ByteVector"))
890887 then {
891- let gr = gn
892- if ((cR.callerPublicKey == gr))
888+ let gp = gl
889+ if ((cP.callerPublicKey == gp))
893890 then true
894- else gp
891+ else gn
895892 }
896- else if ($isInstanceOf(gn, "Unit"))
897- then if ((cR.caller == this))
893+ else if ($isInstanceOf(gl, "Unit"))
894+ then if ((cP.caller == this))
898895 then true
899- else gp
896+ else gn
900897 else throw("Match error")
901898 }
902899
903900
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
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
925922 else {
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)
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)
931928 }
932929 }
933930
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])
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])
942939
943- func dd (db,dc) = if ((dc >= cY))
944- then db
940+ func db (cZ,da) = if ((da >= cW))
941+ then cZ
945942 else throw("List size exceeds 15")
946943
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)
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)
948945 }
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)))
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)))
954951 }
955952
956953
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))
954+@Callable(cP)
955+func calculateAmountOutForSwapREADONLY (gw,gs,gx) = {
956+ let gy = if ((gs == false))
963957 then {
964- let gC = aL(this, ak())
965- let gv = (toBigInt(bP(aL(this, aj()))) + toBigInt(gz))
966- $Tuple2(gC, gv)
958+ let gz = aJ(this, ak())
959+ let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960+ $Tuple2(gz, gt)
967961 }
968962 else {
969- let gC = aL(this, aj())
970- let gv = (toBigInt(bP(aL(this, ak()))) + toBigInt(gz))
971- $Tuple2(gC, gv)
963+ let gz = aJ(this, aj())
964+ let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965+ $Tuple2(gz, gt)
972966 }
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))
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))
988982 then true
989- else throw(makeString(["new D is fewer error", toString(ev), toString(gG)], "__"))
990- if ((ea == ea))
991- then $Tuple2(nil, gE)
983+ else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__"))
984+ if ((dY == dY))
985+ then $Tuple2(nil, gB)
992986 else throw("Strict value is not equal to itself.")
993987 }
994988
995989
996990
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"))
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"))
1004998 }
1005- let gK = [if ((value(cR.payments[0]).amount >= gz))
999+ let gH = [if ((value(cP.payments[0]).amount >= gw))
10061000 then true
1007- else aP("Wrong amount"), if ((cR.caller == addressFromStringValue(gJ)))
1001+ else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG)))
10081002 then true
1009- else aP("Permission denied")]
1010- if ((gK == gK))
1003+ else aN("Permission denied")]
1004+ if ((gH == gH))
10111005 then {
1012- let fm = value(cR.payments[0])
1013- let gL = bg(fm.assetId)
1014- let gM = if ((gu == false))
1006+ let fk = value(cP.payments[0])
1007+ let gI = be(fk.assetId)
1008+ let gJ = if ((gs == false))
10151009 then {
1016- let gC = aL(this, ak())
1017- let gv = (bP(gL) - value(cR.payments[0]).amount)
1018- $Tuple2(gC, gv)
1010+ let gz = aJ(this, ak())
1011+ let gt = (bN(gI) - value(cP.payments[0]).amount)
1012+ $Tuple2(gz, gt)
10191013 }
10201014 else {
1021- let gC = aL(this, aj())
1022- let gv = (bP(gL) - value(cR.payments[0]).amount)
1023- $Tuple2(gC, gv)
1015+ let gz = aJ(this, aj())
1016+ let gt = (bN(gI) - value(cP.payments[0]).amount)
1017+ $Tuple2(gz, gt)
10241018 }
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))
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))
10381032 then true
10391033 else throw("Exchange result is fewer coins than expected")
1040- if ((gN == gN))
1034+ if ((gK == gK))
10411035 then {
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))
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))
10471041 then true
10481042 else throw("new D is fewer error")
1049- if ((ea == ea))
1050- then $Tuple2([ScriptTransfer(addressFromStringValue(gI), gE, be(gC))], gE)
1043+ if ((dY == dY))
1044+ then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB)
10511045 else throw("Strict value is not equal to itself.")
10521046 }
10531047 else throw("Strict value is not equal to itself.")
10571051
10581052
10591053
1060-@Callable(cR)
1054+@Callable(cP)
10611055 func constructor (Y) = {
1062- let ez = gs(cR)
1063- if ((ez == ez))
1056+ let ex = gq(cP)
1057+ if ((ex == ex))
10641058 then [StringEntry(Y(), Y)]
10651059 else throw("Strict value is not equal to itself.")
10661060 }
10671061
10681062
10691063
1070-@Callable(cR)
1071-func setManager (gO) = {
1072- let ez = gs(cR)
1073- if ((ez == ez))
1064+@Callable(cP)
1065+func setManager (gL) = {
1066+ let ex = gq(cP)
1067+ if ((ex == ex))
10741068 then {
1075- let gP = fromBase58String(gO)
1076- if ((gP == gP))
1077- then [StringEntry(aa(), gO)]
1069+ let gM = fromBase58String(gL)
1070+ if ((gM == gM))
1071+ then [StringEntry(aa(), gL)]
10781072 else throw("Strict value is not equal to itself.")
10791073 }
10801074 else throw("Strict value is not equal to itself.")
10821076
10831077
10841078
1085-@Callable(cR)
1079+@Callable(cP)
10861080 func confirmManager () = {
1087- let cw = go()
1088- let gQ = if (isDefined(cw))
1081+ let cu = gm()
1082+ let gN = if (isDefined(cu))
10891083 then true
10901084 else throw("No pending manager")
1091- if ((gQ == gQ))
1085+ if ((gN == gN))
10921086 then {
1093- let gR = if ((cR.callerPublicKey == value(cw)))
1087+ let gO = if ((cP.callerPublicKey == value(cu)))
10941088 then true
10951089 else throw("You are not pending manager")
1096- if ((gR == gR))
1097- then [StringEntry(Z(), toBase58String(value(cw))), DeleteEntry(aa())]
1090+ if ((gO == gO))
1091+ then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
10981092 else throw("Strict value is not equal to itself.")
10991093 }
11001094 else throw("Strict value is not equal to itself.")
11021096
11031097
11041098
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))
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))
11111105 then throw("Wrong slippage")
1112- else if ((size(cR.payments) != 2))
1106+ else if ((size(cP.payments) != 2))
11131107 then throw("2 pmnts expd")
11141108 else {
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))
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))
11191113 then {
1120- let eR = (toBigInt(bP(bg(bp))) - gY)
1121- if ((eR == eR))
1114+ let eP = (toBigInt(bN(be(bn))) - gV)
1115+ if ((eP == eP))
11221116 then {
1123- let eS = toBigInt(value(assetInfo(bn)).quantity)
1124- if ((eS == eS))
1117+ let eQ = toBigInt(value(assetInfo(bl)).quantity)
1118+ if ((eQ == eQ))
11251119 then {
1126- let eT = eM(gX, gY, toBigInt(0))
1127- if ((eT == eT))
1120+ let eR = eK(gU, gV, toBigInt(0))
1121+ if ((eR == eR))
11281122 then {
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))
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))
11391133 then {
1140- let hb = {
1141- let gn = dZ
1142- if ($isInstanceOf(gn, "Address"))
1134+ let gY = {
1135+ let gl = dX
1136+ if ($isInstanceOf(gl, "Address"))
11431137 then {
1144- let hc = gn
1145- invoke(hc, "emit", [en], nil)
1138+ let gZ = gl
1139+ invoke(gZ, "emit", [el], nil)
11461140 }
11471141 else unit
11481142 }
1149- if ((hb == hb))
1143+ if ((gY == gY))
11501144 then {
1151- let hd = if ((eo > 0))
1152- then invoke(gW, "put", nil, [AttachedPayment(dl, eo)])
1145+ let ha = if ((em > 0))
1146+ then invoke(gT, "put", nil, [AttachedPayment(dj, em)])
11531147 else nil
1154- if ((hd == hd))
1148+ if ((ha == ha))
11551149 then {
1156- let he = if ((ep > 0))
1157- then invoke(gW, "put", nil, [AttachedPayment(dm, ep)])
1150+ let hb = if ((en > 0))
1151+ then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
11581152 else nil
1159- if ((he == he))
1153+ if ((hb == hb))
11601154 then {
1161- let hf = if (gT)
1155+ let hc = if (gQ)
11621156 then {
1163- let hg = invoke(gV, "stake", nil, [AttachedPayment(ha, en)])
1164- if ((hg == hg))
1157+ let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)])
1158+ if ((hd == hd))
11651159 then nil
11661160 else throw("Strict value is not equal to itself.")
11671161 }
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))
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))
11731167 then true
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))
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))
11761170 then {
1177- let hj = value(assetInfo(bn)).quantity
1178- if ((hj == hj))
1179- then ((dD ++ hf) ++ gk)
1171+ let hg = value(assetInfo(bl)).quantity
1172+ if ((hg == hg))
1173+ then ((dB ++ hc) ++ gi)
11801174 else throw("Strict value is not equal to itself.")
11811175 }
11821176 else throw("Strict value is not equal to itself.")
12011195
12021196
12031197
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"))
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"))
12111205 }
1212- let hl = if (if (if (aX())
1206+ let hi = if (if (if (aV())
12131207 then true
1214- else (bm == q))
1208+ else (bk == q))
12151209 then true
1216- else (bm == s))
1210+ else (bk == s))
12171211 then true
1218- else hk
1219- let gK = [if (if (!(hl))
1212+ else hh
1213+ let gH = [if (if (!(hi))
12201214 then true
1221- else gq(cR))
1215+ else go(cP))
12221216 then true
1223- else aP("put operation is blocked by admin"), if ((size(cR.payments) == 1))
1217+ else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
12241218 then true
1225- else aP("exactly 1 payment are expected")]
1226- if ((gK == gK))
1219+ else aN("exactly 1 payment are expected")]
1220+ if ((gH == gH))
12271221 then {
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))
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))
12431237 then {
1244- let hm = fr(dN, dh, toString(dj), toBase58String(cR.transactionId), true)
1245- if ((hm == hm))
1238+ let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1239+ if ((hj == hj))
12461240 then {
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)
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)
12521246 else false)
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))
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))
12571251 then {
1258- let hb = {
1259- let gn = gZ
1260- if ($isInstanceOf(gn, "Address"))
1252+ let gY = {
1253+ let gl = gW
1254+ if ($isInstanceOf(gl, "Address"))
12611255 then {
1262- let hc = gn
1263- invoke(hc, "emit", [en], nil)
1256+ let gZ = gl
1257+ invoke(gZ, "emit", [el], nil)
12641258 }
12651259 else unit
12661260 }
1267- if ((hb == hb))
1261+ if ((gY == gY))
12681262 then {
1269- let hf = if (gT)
1263+ let hc = if (gQ)
12701264 then {
1271- let hg = invoke(bw, "stakeFor", [toString(cR.caller)], [AttachedPayment(dk, en)])
1272- if ((hg == hg))
1265+ let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1266+ if ((hd == hd))
12731267 then nil
12741268 else throw("Strict value is not equal to itself.")
12751269 }
1276- else [ScriptTransfer(cR.caller, en, dk)]
1277- let ge = if ((cz > 0))
1278- then [ScriptTransfer(aZ, cz, fromBase58String(dh))]
1270+ else [ScriptTransfer(cP.caller, el, di)]
1271+ let gc = if ((cx > 0))
1272+ then [ScriptTransfer(aX, cx, fromBase58String(df))]
12791273 else nil
1280- let ho = if ((this == aZ))
1274+ let hl = if ((this == aX))
12811275 then $Tuple2(0, 0)
12821276 else {
1283- let hp = if ((fm.assetId == bo))
1277+ let hm = if ((fk.assetId == bm))
12841278 then true
12851279 else false
1286- if (hp)
1287- then $Tuple2(-(cz), 0)
1288- else $Tuple2(0, -(cz))
1280+ if (hm)
1281+ then $Tuple2(-(cx), 0)
1282+ else $Tuple2(0, -(cx))
12891283 }
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)
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)
12981292 else throw("Strict value is not equal to itself.")
12991293 }
13001294 else throw("Strict value is not equal to itself.")
13101304
13111305
13121306
1313-@Callable(cR)
1314-func putForFree (hr) = if ((0 > hr))
1307+@Callable(cP)
1308+func putForFree (ho) = if ((0 > ho))
13151309 then throw("Wrong slpg")
1316- else if ((size(cR.payments) != 2))
1310+ else if ((size(cP.payments) != 2))
13171311 then throw("2 pmnts expd")
13181312 else {
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))
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))
13251319 then {
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)
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)
13321326 else throw("Strict value is not equal to itself.")
13331327 }
13341328 else throw("Strict value is not equal to itself.")
13361330
13371331
13381332
1339-@Callable(cR)
1333+@Callable(cP)
13401334 func get () = {
1341- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1342- if ((eT == eT))
1335+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1336+ if ((eR == eR))
13431337 then {
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))
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))
13521346 then {
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)
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)
13591353 else throw("Strict value is not equal to itself.")
13601354 }
13611355 else throw("Strict value is not equal to itself.")
13651359
13661360
13671361
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"))
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"))
13751369 }
1376- let hw = if (if (aX())
1370+ let ht = if (if (aV())
13771371 then true
1378- else (bm == s))
1372+ else (bk == s))
13791373 then true
1380- else hk
1381- let gK = [if (if (!(hw))
1374+ else hh
1375+ let gH = [if (if (!(ht))
13821376 then true
1383- else gq(cR))
1377+ else go(cP))
13841378 then true
1385- else aP("get operation is blocked by admin"), if ((size(cR.payments) == 1))
1379+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
13861380 then true
1387- else aP("exactly 1 payment are expected")]
1388- if ((gK == gK))
1381+ else aN("exactly 1 payment are expected")]
1382+ if ((gH == gH))
13891383 then {
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)
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)
13941388 }
13951389 else throw("Strict value is not equal to itself.")
13961390 }
13971391
13981392
13991393
1400-@Callable(cR)
1394+@Callable(cP)
14011395 func refreshDLp () = {
1402- let hy = valueOrElse(getInteger(aq), 0)
1403- let hz = if (((height - hy) >= at))
1396+ let hv = valueOrElse(getInteger(aq), 0)
1397+ let hw = if (((height - hv) >= at))
14041398 then unit
1405- else aP(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1406- if ((hz == hz))
1399+ else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1400+ if ((hw == hw))
14071401 then {
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))
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))
14161410 }
14171411 else throw("Strict value is not equal to itself.")
14181412 }
14191413
14201414
14211415
1422-@Callable(cR)
1423-func getOneTknV2READONLY (fN,hC) = {
1424- let dl = toBase58String(value(bo))
1425- let dm = toBase58String(value(bp))
1416+@Callable(cP)
1417+func getOneTknV2READONLY (fL,hz) = {
1418+ let dj = toBase58String(value(bm))
14261419 let dk = toBase58String(value(bn))
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))
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))
14321426 then 0
1433- else if ((fN == dm))
1427+ else if ((fL == dk))
14341428 then 1
14351429 else throw("invalid out asset id")
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))
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))
14431437 }
14441438
14451439
14461440
1447-@Callable(cR)
1448-func getOneTknV2WithBonusREADONLY (fN,hC) = {
1449- let dl = toBase58String(value(bo))
1450- let dm = toBase58String(value(bp))
1441+@Callable(cP)
1442+func getOneTknV2WithBonusREADONLY (fL,hz) = {
1443+ let dj = toBase58String(value(bm))
14511444 let dk = toBase58String(value(bn))
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)"))
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)"))
14591453 }
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))
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))
14681462 then 0
14691463 else throw("bonus calculation error")
1470- else fraction((fW - hH), a, hH)
1471- $Tuple2(nil, $Tuple3(fW, cz, fL))
1464+ else fraction((fU - hE), a, hE)
1465+ $Tuple2(nil, $Tuple3(fU, cx, fJ))
14721466 }
14731467
14741468
14751469
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)))
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)))
14881482 else {
1489- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1490- if ((eT == eT))
1483+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1484+ if ((eR == eR))
14911485 then {
1492- let hK = invoke(aS, "burn", [dN], [AttachedPayment(dh, dN)])
1493- if ((hK == hK))
1486+ let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1487+ if ((hH == hH))
14941488 then {
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)
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)
15011495 else throw("Strict value is not equal to itself.")
15021496 }
15031497 else throw("Strict value is not equal to itself.")
15081502
15091503
15101504
1511-@Callable(cR)
1512-func unstakeAndGet (cy) = {
1513- let hM = if ((size(cR.payments) != 0))
1505+@Callable(cP)
1506+func unstakeAndGet (cw) = {
1507+ let hJ = if ((size(cP.payments) != 0))
15141508 then throw("No pmnts expd")
15151509 else true
1516- if ((hM == hM))
1510+ if ((hJ == hJ))
15171511 then {
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))
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))
15231517 then {
1524- let hP = invoke(hO, "unstake", [toBase58String(ha), cy], nil)
1525- if ((hP == hP))
1518+ let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil)
1519+ if ((hM == hM))
15261520 then {
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())
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())
15331527 then true
1534- else (dp == s))
1535- then throw(("Blocked: " + toString(dp)))
1528+ else (dn == s))
1529+ then throw(("Blocked: " + toString(dn)))
15361530 else true
1537- if ((hQ == hQ))
1531+ if ((hN == hN))
15381532 then {
1539- let hR = invoke(aS, "burn", [cy], [AttachedPayment(ha, cy)])
1540- if ((hR == hR))
1533+ let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)])
1534+ if ((hO == hO))
15411535 then {
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)
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)
15481542 else throw("Strict value is not equal to itself.")
15491543 }
15501544 else throw("Strict value is not equal to itself.")
15601554
15611555
15621556
1563-@Callable(cR)
1564-func unstakeAndGetNoLess (hT,hU,hJ) = {
1565- let hw = if (aX())
1557+@Callable(cP)
1558+func unstakeAndGetNoLess (hQ,hR,hG) = {
1559+ let ht = if (aV())
15661560 then true
1567- else (bm == s)
1568- let gK = [if (!(hw))
1561+ else (bk == s)
1562+ let gH = [if (!(ht))
15691563 then true
1570- else throw("get operation is blocked by admin"), if ((size(cR.payments) == 0))
1564+ else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
15711565 then true
15721566 else throw("no payments are expected")]
1573- if ((gK == gK))
1567+ if ((gH == gH))
15741568 then {
1575- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1576- if ((eT == eT))
1569+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1570+ if ((eR == eR))
15771571 then {
1578- let hP = invoke(bw, "unstake", [toBase58String(bn), hT], nil)
1579- if ((hP == hP))
1572+ let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil)
1573+ if ((hM == hM))
15801574 then {
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))
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))
15861580 then true
1587- else throw(makeString(["amount asset amount to receive is less than ", toString(hU)], "")), if ((dC >= hJ))
1581+ else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG))
15881582 then true
1589- else throw(makeString(["price asset amount to receive is less than ", toString(hJ)], ""))]
1590- if ((hW == hW))
1583+ else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1584+ if ((hT == hT))
15911585 then {
1592- let hK = invoke(aS, "burn", [hT], [AttachedPayment(bn, hT)])
1593- if ((hK == hK))
1586+ let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)])
1587+ if ((hH == hH))
15941588 then {
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)
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)
16011595 else throw("Strict value is not equal to itself.")
16021596 }
16031597 else throw("Strict value is not equal to itself.")
16131607
16141608
16151609
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"))
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"))
16231617 }
1624- let hw = if (if (aX())
1618+ let ht = if (if (aV())
16251619 then true
1626- else (bm == s))
1620+ else (bk == s))
16271621 then true
1628- else hk
1629- let gK = [if (if (!(hw))
1622+ else hh
1623+ let gH = [if (if (!(ht))
16301624 then true
1631- else gq(cR))
1625+ else go(cP))
16321626 then true
1633- else aP("get operation is blocked by admin"), if ((size(cR.payments) == 0))
1627+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
16341628 then true
1635- else aP("no payments are expected")]
1636- if ((gK == gK))
1629+ else aN("no payments are expected")]
1630+ if ((gH == gH))
16371631 then {
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))
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))
16451639 then {
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)
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)
16501644 }
16511645 else throw("Strict value is not equal to itself.")
16521646 }
16551649
16561650
16571651
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))
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))
16661660 }
16671661
16681662
16691663
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))
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))
16781672 }
16791673
16801674
16811675
1682-@Callable(cR)
1683-func activate (ie,if) = if ((toString(cR.caller) != toString(aS)))
1676+@Callable(cP)
1677+func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ)))
16841678 then throw("denied")
1685- else $Tuple2([StringEntry(aj(), ie), StringEntry(ak(), if)], "success")
1679+ else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
16861680
16871681
16881682
1689-@Callable(cR)
1690-func setS (ig,hQ) = if ((toString(cR.caller) != aL(this, am())))
1691- then gp
1692- else [StringEntry(ig, hQ)]
1683+@Callable(cP)
1684+func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1685+ then gn
1686+ else [StringEntry(id, hN)]
16931687
16941688
16951689
1696-@Callable(cR)
1697-func setI (ig,hQ) = if ((toString(cR.caller) != aL(this, am())))
1698- then gp
1699- else [IntegerEntry(ig, hQ)]
1690+@Callable(cP)
1691+func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1692+ then gn
1693+ else [IntegerEntry(id, hN)]
17001694
17011695
17021696
1703-@Callable(cR)
1704-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, ba())
1697+@Callable(cP)
1698+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
17051699
17061700
17071701
1708-@Callable(cR)
1709-func getAccBalanceWrapperREADONLY (bQ) = $Tuple2(nil, bP(bQ))
1702+@Callable(cP)
1703+func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
17101704
17111705
17121706
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])])
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])])
17171711 }
17181712
17191713
17201714
1721-@Callable(cR)
1722-func fromX18WrapperREADONLY (M,ii) = $Tuple2(nil, L(parseBigIntValue(M), ii))
1715+@Callable(cP)
1716+func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if))
17231717
17241718
17251719
1726-@Callable(cR)
1720+@Callable(cP)
17271721 func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
17281722
17291723
17301724
1731-@Callable(cR)
1732-func calcPriceBigIntWrapperREADONLY (bS,bT) = $Tuple2(nil, toString(bR(parseBigIntValue(bS), parseBigIntValue(bT))))
1725+@Callable(cP)
1726+func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
17331727
17341728
17351729
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, ""))
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, ""))
17381732
17391733
17401734
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))
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))
17451739 }
17461740
17471741
1748-@Verifier(il)
1749-func im () = {
1750- let in = {
1751- let gn = gm()
1752- if ($isInstanceOf(gn, "ByteVector"))
1742+@Verifier(ii)
1743+func ij () = {
1744+ let ik = {
1745+ let gl = gk()
1746+ if ($isInstanceOf(gl, "ByteVector"))
17531747 then {
1754- let gr = gn
1755- gr
1748+ let gp = gl
1749+ gp
17561750 }
1757- else if ($isInstanceOf(gn, "Unit"))
1758- then il.senderPublicKey
1751+ else if ($isInstanceOf(gl, "Unit"))
1752+ then ii.senderPublicKey
17591753 else throw("Match error")
17601754 }
1761- let gn = il
1762- if ($isInstanceOf(gn, "Order"))
1755+ let gl = ii
1756+ if ($isInstanceOf(gl, "Order"))
17631757 then {
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
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
17751767 else false)
1776- then aK
1768+ then aI
17771769 else false)
17781770 then true
1779- else aG(aH, aI, aJ, aK)
1771+ else aE(aF, aG, aH, aI)
17801772 }
1781- else if ($isInstanceOf(gn, "SetScriptTransaction"))
1773+ else if ($isInstanceOf(gl, "SetScriptTransaction"))
17821774 then {
1783- let cE = gn
1784- if (sigVerify(il.bodyBytes, il.proofs[0], in))
1775+ let cC = gl
1776+ if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
17851777 then true
17861778 else {
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)
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)
17921784 else false
17931785 }
17941786 }
1795- else sigVerify(il.bodyBytes, il.proofs[0], in)
1787+ else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
17961788 }
17971789
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) = ("%s%s__skipOrderValidation__" + aF)
169+func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI)))
170170
171171
172-func aG (aH,aI,aJ,aK) = throw((((((((("order validation failed: orderValid=" + toString(aH)) + " (") + aI) + ")") + " senderValid=") + toString(aJ)) + " matcherValid=") + toString(aK)))
172+func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
173173
174174
175-func aL (aM,aN) = valueOrErrorMessage(getString(aM, aN), makeString(["mandatory ", toString(aM), ".", aN, " not defined"], ""))
175+func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
176176
177177
178-func aO (aM,aN) = valueOrErrorMessage(getInteger(aM, aN), makeString(["mandatory ", toString(aM), ".", aN, " not defined"], ""))
178+func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
179179
180180
181-func aP (aQ) = throw(makeString(["lp_stable.ride:", aQ], " "))
181+func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
182182
183183
184-func aR (aQ) = makeString(["lp_stable.ride:", aQ], " ")
184+let aQ = addressFromStringValue(aJ(this, Y()))
185+
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"))
191+ }
192+
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"))
198+ }
199+
200+let aU = aJ(this, al())
201+
202+func aV () = valueOrElse(getBoolean(aQ, aB()), false)
185203
186204
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"))
194- }
195-
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"))
201- }
202-
203-let aW = aL(this, al())
204-
205-func aX () = valueOrElse(getBoolean(aS, aB()), false)
205+func aW () = fromBase58String(aJ(aQ, av()))
206206
207207
208-func aY () = fromBase58String(aL(aS, av()))
208+let aX = addressFromStringValue(aJ(aQ, aD()))
209209
210-
211-let aZ = addressFromStringValue(aL(aS, aD()))
212-
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)
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)
219216 }
220217
221218
222-func be (bf) = if ((bf == k))
219+func bc (bd) = if ((bd == k))
223220 then unit
224- else fromBase58String(bf)
221+ else fromBase58String(bd)
225222
226223
227-func bg (bf) = if ((bf == unit))
224+func be (bd) = if ((bd == unit))
228225 then k
229- else toBase58String(value(bf))
226+ else toBase58String(value(bd))
230227
231228
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]))
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]))
233230
234231
235-let bj = bh(ba())
232+let bh = bf(aY())
236233
237-let bk = bj
234+let bi = bh
238235
239-let bl = bk._1
236+let bj = bi._1
240237
241-let bm = bk._2
238+let bk = bi._2
242239
243-let bn = bk._3
240+let bl = bi._3
244241
245-let bo = bk._4
242+let bm = bi._4
246243
247-let bp = bk._5
244+let bn = bi._5
248245
249-let bq = bk._6
246+let bo = bi._6
250247
251-let br = bk._7
248+let bp = bi._7
252249
253-let bs = bk._8
250+let bq = bi._8
254251
255-let bt = bk._9
252+let br = bi._9
256253
257-func bu () = split(aL(aS, au()), n)
254+func bs () = split(aJ(aQ, au()), n)
258255
259256
260-let bv = bu()
257+let bt = bs()
261258
262-let bw = valueOrErrorMessage(addressFromString(bv[C]), "Invalid staking contract address")
259+let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
263260
264-let bx = valueOrErrorMessage(addressFromString(bv[E]), "Invalid slipage contract address")
261+let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
265262
266-let by = valueOrErrorMessage(addressFromString(bv[F]), "Invalid gwx contract address")
263+let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
267264
268-let bz = valueOrErrorMessage(addressFromString(bv[D]), "Invalid gwx contract address")
265+let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
269266
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)
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)
271268
272269
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)
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)
274271
275272
276-func bP (bQ) = if ((bQ == "WAVES"))
273+func bN (bO) = if ((bO == "WAVES"))
277274 then wavesBalance(this).available
278- else assetBalance(this, fromBase58String(bQ))
275+ else assetBalance(this, fromBase58String(bO))
279276
280277
281-func bR (bS,bT) = fraction(bS, c, bT)
278+func bP (bQ,bR) = fraction(bQ, c, bR)
282279
283280
284-func bU (bS,bT,P) = fraction(bS, c, bT, P)
281+func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
285282
286283
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]))
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]))
293290 }
294291
295292
296-func cb (cc,cd,ce) = {
297- let bZ = fraction(cd, b, cc)
298- let cf = (ce > bZ)
299- if (if (cf)
293+func bZ (ca,cb,cc) = {
294+ let bX = fraction(cb, b, ca)
295+ let cd = (cc > bX)
296+ if (if (cd)
300297 then true
301- else (cd > cc))
302- then throw(((((((toString(cd) + " ") + toString(cc)) + " ") + toString(bZ)) + " ") + toString(ce)))
303- else cf
298+ else (cb > ca))
299+ then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300+ else cd
304301 }
305302
306303
307-func cg (ch,ci,cj,ck) = {
308- let cl = H(cj, ch)
309- let cm = H(ck, ci)
310- bR(cm, cl)
304+func ce (cf,cg,ch,ci) = {
305+ let cj = H(ch, cf)
306+ let ck = H(ci, cg)
307+ bP(ck, cj)
311308 }
312309
313310
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]
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]
324321 }
325322
326323
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)]
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)]
330327 }
331328
332329
333-func cx (cy,ao) = {
334- let cz = if ((ao == 0))
330+func cv (cw,ao) = {
331+ let cx = if ((ao == 0))
335332 then 0
336- else fraction(cy, ao, a)
337- $Tuple2((cy - cz), cz)
333+ else fraction(cw, ao, a)
334+ $Tuple2((cw - cx), cx)
338335 }
339336
340337
341-func cA (cB) = {
342- let cC = cB[0]
343- let cD = cB[1]
344- let cE = (cC + cD)
345- if ((cE == e))
338+func cy (cz) = {
339+ let cA = cz[0]
340+ let cB = cz[1]
341+ let cC = (cA + cB)
342+ if ((cC == e))
346343 then e
347344 else {
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)))
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)))
359356 }
360357
361- func cP (cQ,cR) = if (cQ._2)
362- then cQ
358+ func cN (cO,cP) = if (cO._2)
359+ then cO
363360 else {
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)
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)
373370 }
374371
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])
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])
383380
384- func dd (db,dc) = if ((dc >= cY))
385- then db
386- else throw("List size exceeds 17")
381+ func db (cZ,da) = if ((da >= cW))
382+ then cZ
383+ else throw("List size exceeds 18")
387384
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)
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)
389386 }
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)))
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)))
395392 }
396393 }
397394
398395
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))
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))
408405 then throw("Wrong pmt asset")
409406 else {
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 == ""))
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 == ""))
423420 then nil
424- else [ScriptTransfer(dj, dB, if ((dl == "WAVES"))
421+ else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
425422 then unit
426- else fromBase58String(dl)), ScriptTransfer(dj, dC, if ((dm == "WAVES"))
423+ else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
427424 then unit
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)
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)
430427 }
431428 }
432429
433430
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)
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)
448445 else false)
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)
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)
457454 else false)
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))
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))
469466 then {
470- let cc = cA([(ds + dW), (du + dX)])
471- let ea = if ((cc > cd))
467+ let ca = cy([(dq + dU), (ds + dV)])
468+ let dY = if ((ca > cb))
472469 then true
473470 else throw("D1 should be greater than D0")
474- if ((ea == ea))
471+ if ((dY == dY))
475472 then {
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)
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)
480477 }
481478 else throw("Strict value is not equal to itself.")
482479 }
483480 else {
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)
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)
489486 else false)
490- then (ec > eb)
487+ then (ea > dZ)
491488 else false)
492- then throw(((("Price slippage " + toString(ec)) + " > ") + toString(eb)))
489+ then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
493490 else {
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))
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))
504501 then true
505502 else throw("D1 should be greater than D0")
506- if ((ea == ea))
503+ if ((dY == dY))
507504 then {
508- let cs = fraction(ed, (cc - cd), cd)
509- $Tuple5(O(cs, a, FLOOR), O(eh, dT, CEILING), O(ei, dU, CEILING), dv, eb)
505+ let cq = fraction(eb, (ca - cb), cb)
506+ $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ)
510507 }
511508 else throw("Strict value is not equal to itself.")
512509 }
513510 }
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))
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))
520517 then throw("LP <= 0")
521518 else {
522- let en = if (!(dK))
519+ let el = if (!(dI))
523520 then 0
524- else ej
525- let eo = (dF - ek)
526- let ep = (dH - el)
527- let eq = if (if (dL)
528- then (dO == dP)
521+ else eh
522+ let em = (dD - ei)
523+ let en = (dF - ej)
524+ let eo = if (if (dJ)
525+ then (dM == dN)
529526 else false)
530- then $Tuple2(dN, 0)
531- else if (if (dL)
532- then (dO == dQ)
527+ then $Tuple2(dL, 0)
528+ else if (if (dJ)
529+ then (dM == dO)
533530 else false)
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)
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)
540537 }
541538 }
542539
543540
544-func eu (cB,cR,ev) = {
545- let ew = g
546- let ex = cB[if ((cR == 0))
541+func es (cz,cP,et) = {
542+ let eu = g
543+ let ev = cz[if ((cP == 0))
547544 then 1
548545 else 0]
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
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
561558 else {
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)
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)
567564 }
568565 }
569566
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])
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])
578575
579- func dd (db,dc) = if ((dc >= cY))
580- then db
576+ func db (cZ,da) = if ((da >= cW))
577+ then cZ
581578 else throw("List size exceeds 15")
582579
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)
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)
584581 }
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)))
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)))
590587 }
591588
592589
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))
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))
596593 then e
597- else eL
594+ else eJ
598595 }
599596
600597
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
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
607604 }
608605
609606
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)
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)
617614 }
618615
619616
620-func eY (eZ,eL) = if ((eL >= eZ))
617+func eW (eX,eJ) = if ((eJ >= eX))
621618 then true
622- else aP("updated DLp lower than current DLp")
619+ else aN("updated DLp lower than current DLp")
623620
624621
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())
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())
636633 then true
637- else (bm == r))
634+ else (bk == r))
638635 then true
639- else (bm == s))
636+ else (bk == s))
640637 then throw("Admin blocked")
641- else if (if ((fb.assetPair.amountAsset != bo))
638+ else if (if ((eZ.assetPair.amountAsset != bm))
642639 then true
643- else (fb.assetPair.priceAsset != bp))
640+ else (eZ.assetPair.priceAsset != bn))
644641 then throw("Wr assets")
645642 else {
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)
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)
653650 }
654651 }
655652
656653
657-func fl (cR) = if ((size(cR.payments) != 1))
654+func fj (cP) = if ((size(cP.payments) != 1))
658655 then throw("1 pmnt exp")
659656 else {
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())
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())
669666 then true
670- else (dp == s))
671- then throw(("Admin blocked: " + toString(dp)))
672- else $Tuple5(dB, dC, dN, dh, dD)
667+ else (dn == s))
668+ then throw(("Admin blocked: " + toString(dn)))
669+ else $Tuple5(dz, dA, dL, df, dB)
673670 }
674671
675672
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())
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())
680677 then true
681- else (dp == q))
678+ else (dn == q))
682679 then true
683- else (dp == s))
684- then throw(("Blocked:" + toString(dp)))
685- else dZ
680+ else (dn == s))
681+ then throw(("Blocked:" + toString(dn)))
682+ else dX
686683 }
687684
688685
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))
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))
697694 then true
698695 else throw("initial deposit requires all coins")
699- if ((fu == fu))
696+ if ((fs == fs))
700697 then {
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))
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))
707704 then throw("invalid payment amount")
708- else $Tuple2((dr - fs), dt)
709- else if ((dh == dm))
710- then if ((fs > dt))
705+ else $Tuple2((dp - fq), dr)
706+ else if ((df == dk))
707+ then if ((fq > dr))
711708 then throw("invalid payment amount")
712- else $Tuple2(dr, (dt - fs))
709+ else $Tuple2(dp, (dr - fq))
713710 else throw("wrong pmtAssetId")
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)
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)
720717 else throw("invalid payment")
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))
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))
734731 then true
735732 else throw()
736- if ((ea == ea))
733+ if ((dY == dY))
737734 then {
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)
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)
747744 }
748745 else throw("Strict value is not equal to itself.")
749746 }
750747 else throw("Strict value is not equal to itself.")
751748 }
752749
753750
754-func fM (fN,fO,fP,fo,fQ,fR) = {
751+func fK (fL,fM,fN,fm,fO,fP) = {
752+ let di = toBase58String(value(bl))
753+ let dj = toBase58String(value(bm))
755754 let dk = toBase58String(value(bn))
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))
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))
769766 then {
770- let dg = toBase58String(fR)
771- if ((dk != toBase58String(dh)))
767+ let de = toBase58String(fP)
768+ if ((di != toBase58String(df)))
772769 then throw("Wrong LP")
773770 else {
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)"))
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)"))
781778 }
782- if ((fV == fV))
779+ if ((fT == fT))
783780 then {
784- let cz = fV._2
785- let fW = fV._1
786- let fX = if (if ((fO > 0))
787- then (fO > fW)
781+ let cx = fT._2
782+ let fU = fT._1
783+ let fV = if (if ((fM > 0))
784+ then (fM > fU)
788785 else false)
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))
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))
795792 else throw("invalid out asset id")
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"))
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"))
803800 then unit
804- else fromBase58String(fN)
805- let ge = if ((cz > 0))
806- then [ScriptTransfer(aZ, cz, gd)]
801+ else fromBase58String(fL)
802+ let gc = if ((cx > 0))
803+ then [ScriptTransfer(aX, cx, gb)]
807804 else nil
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))
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))
810807 then {
811- let gf = invoke(aS, "burn", [dN], [AttachedPayment(dh, dN)])
812- if ((gf == gf))
808+ let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809+ if ((gd == gd))
813810 then {
814- let gg = {
815- let gh = if ((this == aZ))
811+ let ge = {
812+ let gf = if ((this == aX))
816813 then 0
817- else cz
818- let gi = if ((be(fN) == bo))
814+ else cx
815+ let gg = if ((bc(fL) == bm))
819816 then true
820817 else false
821- if (gi)
822- then $Tuple2(-((fW + gh)), 0)
823- else $Tuple2(0, -((fW + gh)))
818+ if (gg)
819+ then $Tuple2(-((fU + gf)), 0)
820+ else $Tuple2(0, -((fU + gf)))
824821 }
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)
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)
833830 else throw("Strict value is not equal to itself.")
834831 }
835832 else throw("Strict value is not equal to itself.")
836833 }
837834 else throw("Strict value is not equal to itself.")
838835 }
839836 else throw("Strict value is not equal to itself.")
840837 }
841838 }
842839 else throw("Strict value is not equal to itself.")
843840 }
844841
845842
846-func gm () = {
847- let gn = getString(Z())
848- if ($isInstanceOf(gn, "String"))
843+func gk () = {
844+ let gl = getString(Z())
845+ if ($isInstanceOf(gl, "String"))
849846 then {
850- let cE = gn
851- fromBase58String(cE)
847+ let cC = gl
848+ fromBase58String(cC)
852849 }
853- else if ($isInstanceOf(gn, "Unit"))
850+ else if ($isInstanceOf(gl, "Unit"))
854851 then unit
855852 else throw("Match error")
856853 }
857854
858855
859-func go () = {
860- let gn = getString(aa())
861- if ($isInstanceOf(gn, "String"))
856+func gm () = {
857+ let gl = getString(aa())
858+ if ($isInstanceOf(gl, "String"))
862859 then {
863- let cE = gn
864- fromBase58String(cE)
860+ let cC = gl
861+ fromBase58String(cC)
865862 }
866- else if ($isInstanceOf(gn, "Unit"))
863+ else if ($isInstanceOf(gl, "Unit"))
867864 then unit
868865 else throw("Match error")
869866 }
870867
871868
872-let gp = throw("Permission denied")
869+let gn = throw("Permission denied")
873870
874-func gq (cR) = {
875- let gn = gm()
876- if ($isInstanceOf(gn, "ByteVector"))
871+func go (cP) = {
872+ let gl = gk()
873+ if ($isInstanceOf(gl, "ByteVector"))
877874 then {
878- let gr = gn
879- (cR.callerPublicKey == gr)
875+ let gp = gl
876+ (cP.callerPublicKey == gp)
880877 }
881- else if ($isInstanceOf(gn, "Unit"))
882- then (cR.caller == this)
878+ else if ($isInstanceOf(gl, "Unit"))
879+ then (cP.caller == this)
883880 else throw("Match error")
884881 }
885882
886883
887-func gs (cR) = {
888- let gn = gm()
889- if ($isInstanceOf(gn, "ByteVector"))
884+func gq (cP) = {
885+ let gl = gk()
886+ if ($isInstanceOf(gl, "ByteVector"))
890887 then {
891- let gr = gn
892- if ((cR.callerPublicKey == gr))
888+ let gp = gl
889+ if ((cP.callerPublicKey == gp))
893890 then true
894- else gp
891+ else gn
895892 }
896- else if ($isInstanceOf(gn, "Unit"))
897- then if ((cR.caller == this))
893+ else if ($isInstanceOf(gl, "Unit"))
894+ then if ((cP.caller == this))
898895 then true
899- else gp
896+ else gn
900897 else throw("Match error")
901898 }
902899
903900
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
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
925922 else {
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)
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)
931928 }
932929 }
933930
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])
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])
942939
943- func dd (db,dc) = if ((dc >= cY))
944- then db
940+ func db (cZ,da) = if ((da >= cW))
941+ then cZ
945942 else throw("List size exceeds 15")
946943
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)
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)
948945 }
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)))
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)))
954951 }
955952
956953
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))
954+@Callable(cP)
955+func calculateAmountOutForSwapREADONLY (gw,gs,gx) = {
956+ let gy = if ((gs == false))
963957 then {
964- let gC = aL(this, ak())
965- let gv = (toBigInt(bP(aL(this, aj()))) + toBigInt(gz))
966- $Tuple2(gC, gv)
958+ let gz = aJ(this, ak())
959+ let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960+ $Tuple2(gz, gt)
967961 }
968962 else {
969- let gC = aL(this, aj())
970- let gv = (toBigInt(bP(aL(this, ak()))) + toBigInt(gz))
971- $Tuple2(gC, gv)
963+ let gz = aJ(this, aj())
964+ let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965+ $Tuple2(gz, gt)
972966 }
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))
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))
988982 then true
989- else throw(makeString(["new D is fewer error", toString(ev), toString(gG)], "__"))
990- if ((ea == ea))
991- then $Tuple2(nil, gE)
983+ else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__"))
984+ if ((dY == dY))
985+ then $Tuple2(nil, gB)
992986 else throw("Strict value is not equal to itself.")
993987 }
994988
995989
996990
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"))
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"))
1004998 }
1005- let gK = [if ((value(cR.payments[0]).amount >= gz))
999+ let gH = [if ((value(cP.payments[0]).amount >= gw))
10061000 then true
1007- else aP("Wrong amount"), if ((cR.caller == addressFromStringValue(gJ)))
1001+ else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG)))
10081002 then true
1009- else aP("Permission denied")]
1010- if ((gK == gK))
1003+ else aN("Permission denied")]
1004+ if ((gH == gH))
10111005 then {
1012- let fm = value(cR.payments[0])
1013- let gL = bg(fm.assetId)
1014- let gM = if ((gu == false))
1006+ let fk = value(cP.payments[0])
1007+ let gI = be(fk.assetId)
1008+ let gJ = if ((gs == false))
10151009 then {
1016- let gC = aL(this, ak())
1017- let gv = (bP(gL) - value(cR.payments[0]).amount)
1018- $Tuple2(gC, gv)
1010+ let gz = aJ(this, ak())
1011+ let gt = (bN(gI) - value(cP.payments[0]).amount)
1012+ $Tuple2(gz, gt)
10191013 }
10201014 else {
1021- let gC = aL(this, aj())
1022- let gv = (bP(gL) - value(cR.payments[0]).amount)
1023- $Tuple2(gC, gv)
1015+ let gz = aJ(this, aj())
1016+ let gt = (bN(gI) - value(cP.payments[0]).amount)
1017+ $Tuple2(gz, gt)
10241018 }
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))
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))
10381032 then true
10391033 else throw("Exchange result is fewer coins than expected")
1040- if ((gN == gN))
1034+ if ((gK == gK))
10411035 then {
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))
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))
10471041 then true
10481042 else throw("new D is fewer error")
1049- if ((ea == ea))
1050- then $Tuple2([ScriptTransfer(addressFromStringValue(gI), gE, be(gC))], gE)
1043+ if ((dY == dY))
1044+ then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB)
10511045 else throw("Strict value is not equal to itself.")
10521046 }
10531047 else throw("Strict value is not equal to itself.")
10541048 }
10551049 else throw("Strict value is not equal to itself.")
10561050 }
10571051
10581052
10591053
1060-@Callable(cR)
1054+@Callable(cP)
10611055 func constructor (Y) = {
1062- let ez = gs(cR)
1063- if ((ez == ez))
1056+ let ex = gq(cP)
1057+ if ((ex == ex))
10641058 then [StringEntry(Y(), Y)]
10651059 else throw("Strict value is not equal to itself.")
10661060 }
10671061
10681062
10691063
1070-@Callable(cR)
1071-func setManager (gO) = {
1072- let ez = gs(cR)
1073- if ((ez == ez))
1064+@Callable(cP)
1065+func setManager (gL) = {
1066+ let ex = gq(cP)
1067+ if ((ex == ex))
10741068 then {
1075- let gP = fromBase58String(gO)
1076- if ((gP == gP))
1077- then [StringEntry(aa(), gO)]
1069+ let gM = fromBase58String(gL)
1070+ if ((gM == gM))
1071+ then [StringEntry(aa(), gL)]
10781072 else throw("Strict value is not equal to itself.")
10791073 }
10801074 else throw("Strict value is not equal to itself.")
10811075 }
10821076
10831077
10841078
1085-@Callable(cR)
1079+@Callable(cP)
10861080 func confirmManager () = {
1087- let cw = go()
1088- let gQ = if (isDefined(cw))
1081+ let cu = gm()
1082+ let gN = if (isDefined(cu))
10891083 then true
10901084 else throw("No pending manager")
1091- if ((gQ == gQ))
1085+ if ((gN == gN))
10921086 then {
1093- let gR = if ((cR.callerPublicKey == value(cw)))
1087+ let gO = if ((cP.callerPublicKey == value(cu)))
10941088 then true
10951089 else throw("You are not pending manager")
1096- if ((gR == gR))
1097- then [StringEntry(Z(), toBase58String(value(cw))), DeleteEntry(aa())]
1090+ if ((gO == gO))
1091+ then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
10981092 else throw("Strict value is not equal to itself.")
10991093 }
11001094 else throw("Strict value is not equal to itself.")
11011095 }
11021096
11031097
11041098
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))
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))
11111105 then throw("Wrong slippage")
1112- else if ((size(cR.payments) != 2))
1106+ else if ((size(cP.payments) != 2))
11131107 then throw("2 pmnts expd")
11141108 else {
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))
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))
11191113 then {
1120- let eR = (toBigInt(bP(bg(bp))) - gY)
1121- if ((eR == eR))
1114+ let eP = (toBigInt(bN(be(bn))) - gV)
1115+ if ((eP == eP))
11221116 then {
1123- let eS = toBigInt(value(assetInfo(bn)).quantity)
1124- if ((eS == eS))
1117+ let eQ = toBigInt(value(assetInfo(bl)).quantity)
1118+ if ((eQ == eQ))
11251119 then {
1126- let eT = eM(gX, gY, toBigInt(0))
1127- if ((eT == eT))
1120+ let eR = eK(gU, gV, toBigInt(0))
1121+ if ((eR == eR))
11281122 then {
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))
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))
11391133 then {
1140- let hb = {
1141- let gn = dZ
1142- if ($isInstanceOf(gn, "Address"))
1134+ let gY = {
1135+ let gl = dX
1136+ if ($isInstanceOf(gl, "Address"))
11431137 then {
1144- let hc = gn
1145- invoke(hc, "emit", [en], nil)
1138+ let gZ = gl
1139+ invoke(gZ, "emit", [el], nil)
11461140 }
11471141 else unit
11481142 }
1149- if ((hb == hb))
1143+ if ((gY == gY))
11501144 then {
1151- let hd = if ((eo > 0))
1152- then invoke(gW, "put", nil, [AttachedPayment(dl, eo)])
1145+ let ha = if ((em > 0))
1146+ then invoke(gT, "put", nil, [AttachedPayment(dj, em)])
11531147 else nil
1154- if ((hd == hd))
1148+ if ((ha == ha))
11551149 then {
1156- let he = if ((ep > 0))
1157- then invoke(gW, "put", nil, [AttachedPayment(dm, ep)])
1150+ let hb = if ((en > 0))
1151+ then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
11581152 else nil
1159- if ((he == he))
1153+ if ((hb == hb))
11601154 then {
1161- let hf = if (gT)
1155+ let hc = if (gQ)
11621156 then {
1163- let hg = invoke(gV, "stake", nil, [AttachedPayment(ha, en)])
1164- if ((hg == hg))
1157+ let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)])
1158+ if ((hd == hd))
11651159 then nil
11661160 else throw("Strict value is not equal to itself.")
11671161 }
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))
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))
11731167 then true
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))
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))
11761170 then {
1177- let hj = value(assetInfo(bn)).quantity
1178- if ((hj == hj))
1179- then ((dD ++ hf) ++ gk)
1171+ let hg = value(assetInfo(bl)).quantity
1172+ if ((hg == hg))
1173+ then ((dB ++ hc) ++ gi)
11801174 else throw("Strict value is not equal to itself.")
11811175 }
11821176 else throw("Strict value is not equal to itself.")
11831177 }
11841178 else throw("Strict value is not equal to itself.")
11851179 }
11861180 else throw("Strict value is not equal to itself.")
11871181 }
11881182 else throw("Strict value is not equal to itself.")
11891183 }
11901184 else throw("Strict value is not equal to itself.")
11911185 }
11921186 else throw("Strict value is not equal to itself.")
11931187 }
11941188 else throw("Strict value is not equal to itself.")
11951189 }
11961190 else throw("Strict value is not equal to itself.")
11971191 }
11981192 else throw("Strict value is not equal to itself.")
11991193 }
12001194 }
12011195
12021196
12031197
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"))
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"))
12111205 }
1212- let hl = if (if (if (aX())
1206+ let hi = if (if (if (aV())
12131207 then true
1214- else (bm == q))
1208+ else (bk == q))
12151209 then true
1216- else (bm == s))
1210+ else (bk == s))
12171211 then true
1218- else hk
1219- let gK = [if (if (!(hl))
1212+ else hh
1213+ let gH = [if (if (!(hi))
12201214 then true
1221- else gq(cR))
1215+ else go(cP))
12221216 then true
1223- else aP("put operation is blocked by admin"), if ((size(cR.payments) == 1))
1217+ else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
12241218 then true
1225- else aP("exactly 1 payment are expected")]
1226- if ((gK == gK))
1219+ else aN("exactly 1 payment are expected")]
1220+ if ((gH == gH))
12271221 then {
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))
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))
12431237 then {
1244- let hm = fr(dN, dh, toString(dj), toBase58String(cR.transactionId), true)
1245- if ((hm == hm))
1238+ let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1239+ if ((hj == hj))
12461240 then {
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)
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)
12521246 else false)
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))
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))
12571251 then {
1258- let hb = {
1259- let gn = gZ
1260- if ($isInstanceOf(gn, "Address"))
1252+ let gY = {
1253+ let gl = gW
1254+ if ($isInstanceOf(gl, "Address"))
12611255 then {
1262- let hc = gn
1263- invoke(hc, "emit", [en], nil)
1256+ let gZ = gl
1257+ invoke(gZ, "emit", [el], nil)
12641258 }
12651259 else unit
12661260 }
1267- if ((hb == hb))
1261+ if ((gY == gY))
12681262 then {
1269- let hf = if (gT)
1263+ let hc = if (gQ)
12701264 then {
1271- let hg = invoke(bw, "stakeFor", [toString(cR.caller)], [AttachedPayment(dk, en)])
1272- if ((hg == hg))
1265+ let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1266+ if ((hd == hd))
12731267 then nil
12741268 else throw("Strict value is not equal to itself.")
12751269 }
1276- else [ScriptTransfer(cR.caller, en, dk)]
1277- let ge = if ((cz > 0))
1278- then [ScriptTransfer(aZ, cz, fromBase58String(dh))]
1270+ else [ScriptTransfer(cP.caller, el, di)]
1271+ let gc = if ((cx > 0))
1272+ then [ScriptTransfer(aX, cx, fromBase58String(df))]
12791273 else nil
1280- let ho = if ((this == aZ))
1274+ let hl = if ((this == aX))
12811275 then $Tuple2(0, 0)
12821276 else {
1283- let hp = if ((fm.assetId == bo))
1277+ let hm = if ((fk.assetId == bm))
12841278 then true
12851279 else false
1286- if (hp)
1287- then $Tuple2(-(cz), 0)
1288- else $Tuple2(0, -(cz))
1280+ if (hm)
1281+ then $Tuple2(-(cx), 0)
1282+ else $Tuple2(0, -(cx))
12891283 }
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)
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)
12981292 else throw("Strict value is not equal to itself.")
12991293 }
13001294 else throw("Strict value is not equal to itself.")
13011295 }
13021296 else throw("Strict value is not equal to itself.")
13031297 }
13041298 else throw("Strict value is not equal to itself.")
13051299 }
13061300 else throw("Strict value is not equal to itself.")
13071301 }
13081302 else throw("Strict value is not equal to itself.")
13091303 }
13101304
13111305
13121306
1313-@Callable(cR)
1314-func putForFree (hr) = if ((0 > hr))
1307+@Callable(cP)
1308+func putForFree (ho) = if ((0 > ho))
13151309 then throw("Wrong slpg")
1316- else if ((size(cR.payments) != 2))
1310+ else if ((size(cP.payments) != 2))
13171311 then throw("2 pmnts expd")
13181312 else {
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))
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))
13251319 then {
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)
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)
13321326 else throw("Strict value is not equal to itself.")
13331327 }
13341328 else throw("Strict value is not equal to itself.")
13351329 }
13361330
13371331
13381332
1339-@Callable(cR)
1333+@Callable(cP)
13401334 func get () = {
1341- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1342- if ((eT == eT))
1335+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1336+ if ((eR == eR))
13431337 then {
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))
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))
13521346 then {
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)
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)
13591353 else throw("Strict value is not equal to itself.")
13601354 }
13611355 else throw("Strict value is not equal to itself.")
13621356 }
13631357 else throw("Strict value is not equal to itself.")
13641358 }
13651359
13661360
13671361
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"))
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"))
13751369 }
1376- let hw = if (if (aX())
1370+ let ht = if (if (aV())
13771371 then true
1378- else (bm == s))
1372+ else (bk == s))
13791373 then true
1380- else hk
1381- let gK = [if (if (!(hw))
1374+ else hh
1375+ let gH = [if (if (!(ht))
13821376 then true
1383- else gq(cR))
1377+ else go(cP))
13841378 then true
1385- else aP("get operation is blocked by admin"), if ((size(cR.payments) == 1))
1379+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
13861380 then true
1387- else aP("exactly 1 payment are expected")]
1388- if ((gK == gK))
1381+ else aN("exactly 1 payment are expected")]
1382+ if ((gH == gH))
13891383 then {
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)
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)
13941388 }
13951389 else throw("Strict value is not equal to itself.")
13961390 }
13971391
13981392
13991393
1400-@Callable(cR)
1394+@Callable(cP)
14011395 func refreshDLp () = {
1402- let hy = valueOrElse(getInteger(aq), 0)
1403- let hz = if (((height - hy) >= at))
1396+ let hv = valueOrElse(getInteger(aq), 0)
1397+ let hw = if (((height - hv) >= at))
14041398 then unit
1405- else aP(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1406- if ((hz == hz))
1399+ else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1400+ if ((hw == hw))
14071401 then {
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))
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))
14161410 }
14171411 else throw("Strict value is not equal to itself.")
14181412 }
14191413
14201414
14211415
1422-@Callable(cR)
1423-func getOneTknV2READONLY (fN,hC) = {
1424- let dl = toBase58String(value(bo))
1425- let dm = toBase58String(value(bp))
1416+@Callable(cP)
1417+func getOneTknV2READONLY (fL,hz) = {
1418+ let dj = toBase58String(value(bm))
14261419 let dk = toBase58String(value(bn))
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))
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))
14321426 then 0
1433- else if ((fN == dm))
1427+ else if ((fL == dk))
14341428 then 1
14351429 else throw("invalid out asset id")
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))
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))
14431437 }
14441438
14451439
14461440
1447-@Callable(cR)
1448-func getOneTknV2WithBonusREADONLY (fN,hC) = {
1449- let dl = toBase58String(value(bo))
1450- let dm = toBase58String(value(bp))
1441+@Callable(cP)
1442+func getOneTknV2WithBonusREADONLY (fL,hz) = {
1443+ let dj = toBase58String(value(bm))
14511444 let dk = toBase58String(value(bn))
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)"))
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)"))
14591453 }
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))
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))
14681462 then 0
14691463 else throw("bonus calculation error")
1470- else fraction((fW - hH), a, hH)
1471- $Tuple2(nil, $Tuple3(fW, cz, fL))
1464+ else fraction((fU - hE), a, hE)
1465+ $Tuple2(nil, $Tuple3(fU, cx, fJ))
14721466 }
14731467
14741468
14751469
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)))
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)))
14881482 else {
1489- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1490- if ((eT == eT))
1483+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1484+ if ((eR == eR))
14911485 then {
1492- let hK = invoke(aS, "burn", [dN], [AttachedPayment(dh, dN)])
1493- if ((hK == hK))
1486+ let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1487+ if ((hH == hH))
14941488 then {
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)
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)
15011495 else throw("Strict value is not equal to itself.")
15021496 }
15031497 else throw("Strict value is not equal to itself.")
15041498 }
15051499 else throw("Strict value is not equal to itself.")
15061500 }
15071501 }
15081502
15091503
15101504
1511-@Callable(cR)
1512-func unstakeAndGet (cy) = {
1513- let hM = if ((size(cR.payments) != 0))
1505+@Callable(cP)
1506+func unstakeAndGet (cw) = {
1507+ let hJ = if ((size(cP.payments) != 0))
15141508 then throw("No pmnts expd")
15151509 else true
1516- if ((hM == hM))
1510+ if ((hJ == hJ))
15171511 then {
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))
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))
15231517 then {
1524- let hP = invoke(hO, "unstake", [toBase58String(ha), cy], nil)
1525- if ((hP == hP))
1518+ let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil)
1519+ if ((hM == hM))
15261520 then {
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())
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())
15331527 then true
1534- else (dp == s))
1535- then throw(("Blocked: " + toString(dp)))
1528+ else (dn == s))
1529+ then throw(("Blocked: " + toString(dn)))
15361530 else true
1537- if ((hQ == hQ))
1531+ if ((hN == hN))
15381532 then {
1539- let hR = invoke(aS, "burn", [cy], [AttachedPayment(ha, cy)])
1540- if ((hR == hR))
1533+ let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)])
1534+ if ((hO == hO))
15411535 then {
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)
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)
15481542 else throw("Strict value is not equal to itself.")
15491543 }
15501544 else throw("Strict value is not equal to itself.")
15511545 }
15521546 else throw("Strict value is not equal to itself.")
15531547 }
15541548 else throw("Strict value is not equal to itself.")
15551549 }
15561550 else throw("Strict value is not equal to itself.")
15571551 }
15581552 else throw("Strict value is not equal to itself.")
15591553 }
15601554
15611555
15621556
1563-@Callable(cR)
1564-func unstakeAndGetNoLess (hT,hU,hJ) = {
1565- let hw = if (aX())
1557+@Callable(cP)
1558+func unstakeAndGetNoLess (hQ,hR,hG) = {
1559+ let ht = if (aV())
15661560 then true
1567- else (bm == s)
1568- let gK = [if (!(hw))
1561+ else (bk == s)
1562+ let gH = [if (!(ht))
15691563 then true
1570- else throw("get operation is blocked by admin"), if ((size(cR.payments) == 0))
1564+ else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
15711565 then true
15721566 else throw("no payments are expected")]
1573- if ((gK == gK))
1567+ if ((gH == gH))
15741568 then {
1575- let eT = eM(toBigInt(0), toBigInt(0), toBigInt(0))
1576- if ((eT == eT))
1569+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1570+ if ((eR == eR))
15771571 then {
1578- let hP = invoke(bw, "unstake", [toBase58String(bn), hT], nil)
1579- if ((hP == hP))
1572+ let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil)
1573+ if ((hM == hM))
15801574 then {
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))
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))
15861580 then true
1587- else throw(makeString(["amount asset amount to receive is less than ", toString(hU)], "")), if ((dC >= hJ))
1581+ else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG))
15881582 then true
1589- else throw(makeString(["price asset amount to receive is less than ", toString(hJ)], ""))]
1590- if ((hW == hW))
1583+ else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1584+ if ((hT == hT))
15911585 then {
1592- let hK = invoke(aS, "burn", [hT], [AttachedPayment(bn, hT)])
1593- if ((hK == hK))
1586+ let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)])
1587+ if ((hH == hH))
15941588 then {
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)
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)
16011595 else throw("Strict value is not equal to itself.")
16021596 }
16031597 else throw("Strict value is not equal to itself.")
16041598 }
16051599 else throw("Strict value is not equal to itself.")
16061600 }
16071601 else throw("Strict value is not equal to itself.")
16081602 }
16091603 else throw("Strict value is not equal to itself.")
16101604 }
16111605 else throw("Strict value is not equal to itself.")
16121606 }
16131607
16141608
16151609
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"))
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"))
16231617 }
1624- let hw = if (if (aX())
1618+ let ht = if (if (aV())
16251619 then true
1626- else (bm == s))
1620+ else (bk == s))
16271621 then true
1628- else hk
1629- let gK = [if (if (!(hw))
1622+ else hh
1623+ let gH = [if (if (!(ht))
16301624 then true
1631- else gq(cR))
1625+ else go(cP))
16321626 then true
1633- else aP("get operation is blocked by admin"), if ((size(cR.payments) == 0))
1627+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
16341628 then true
1635- else aP("no payments are expected")]
1636- if ((gK == gK))
1629+ else aN("no payments are expected")]
1630+ if ((gH == gH))
16371631 then {
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))
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))
16451639 then {
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)
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)
16501644 }
16511645 else throw("Strict value is not equal to itself.")
16521646 }
16531647 else throw("Strict value is not equal to itself.")
16541648 }
16551649
16561650
16571651
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))
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))
16661660 }
16671661
16681662
16691663
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))
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))
16781672 }
16791673
16801674
16811675
1682-@Callable(cR)
1683-func activate (ie,if) = if ((toString(cR.caller) != toString(aS)))
1676+@Callable(cP)
1677+func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ)))
16841678 then throw("denied")
1685- else $Tuple2([StringEntry(aj(), ie), StringEntry(ak(), if)], "success")
1679+ else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
16861680
16871681
16881682
1689-@Callable(cR)
1690-func setS (ig,hQ) = if ((toString(cR.caller) != aL(this, am())))
1691- then gp
1692- else [StringEntry(ig, hQ)]
1683+@Callable(cP)
1684+func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1685+ then gn
1686+ else [StringEntry(id, hN)]
16931687
16941688
16951689
1696-@Callable(cR)
1697-func setI (ig,hQ) = if ((toString(cR.caller) != aL(this, am())))
1698- then gp
1699- else [IntegerEntry(ig, hQ)]
1690+@Callable(cP)
1691+func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1692+ then gn
1693+ else [IntegerEntry(id, hN)]
17001694
17011695
17021696
1703-@Callable(cR)
1704-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, ba())
1697+@Callable(cP)
1698+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
17051699
17061700
17071701
1708-@Callable(cR)
1709-func getAccBalanceWrapperREADONLY (bQ) = $Tuple2(nil, bP(bQ))
1702+@Callable(cP)
1703+func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
17101704
17111705
17121706
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])])
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])])
17171711 }
17181712
17191713
17201714
1721-@Callable(cR)
1722-func fromX18WrapperREADONLY (M,ii) = $Tuple2(nil, L(parseBigIntValue(M), ii))
1715+@Callable(cP)
1716+func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if))
17231717
17241718
17251719
1726-@Callable(cR)
1720+@Callable(cP)
17271721 func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
17281722
17291723
17301724
1731-@Callable(cR)
1732-func calcPriceBigIntWrapperREADONLY (bS,bT) = $Tuple2(nil, toString(bR(parseBigIntValue(bS), parseBigIntValue(bT))))
1725+@Callable(cP)
1726+func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
17331727
17341728
17351729
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, ""))
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, ""))
17381732
17391733
17401734
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))
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))
17451739 }
17461740
17471741
1748-@Verifier(il)
1749-func im () = {
1750- let in = {
1751- let gn = gm()
1752- if ($isInstanceOf(gn, "ByteVector"))
1742+@Verifier(ii)
1743+func ij () = {
1744+ let ik = {
1745+ let gl = gk()
1746+ if ($isInstanceOf(gl, "ByteVector"))
17531747 then {
1754- let gr = gn
1755- gr
1748+ let gp = gl
1749+ gp
17561750 }
1757- else if ($isInstanceOf(gn, "Unit"))
1758- then il.senderPublicKey
1751+ else if ($isInstanceOf(gl, "Unit"))
1752+ then ii.senderPublicKey
17591753 else throw("Match error")
17601754 }
1761- let gn = il
1762- if ($isInstanceOf(gn, "Order"))
1755+ let gl = ii
1756+ if ($isInstanceOf(gl, "Order"))
17631757 then {
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
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
17751767 else false)
1776- then aK
1768+ then aI
17771769 else false)
17781770 then true
1779- else aG(aH, aI, aJ, aK)
1771+ else aE(aF, aG, aH, aI)
17801772 }
1781- else if ($isInstanceOf(gn, "SetScriptTransaction"))
1773+ else if ($isInstanceOf(gl, "SetScriptTransaction"))
17821774 then {
1783- let cE = gn
1784- if (sigVerify(il.bodyBytes, il.proofs[0], in))
1775+ let cC = gl
1776+ if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
17851777 then true
17861778 else {
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)
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)
17921784 else false
17931785 }
17941786 }
1795- else sigVerify(il.bodyBytes, il.proofs[0], in)
1787+ else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
17961788 }
17971789

github/deemru/w8io/026f985 
674.20 ms