tx · D3zXNhuxNQLwU8LtbrQbEhuME8qYeC1ECv5gCz9up5GD

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.04000000 Waves

2023.03.22 22:27 [2501640] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "D3zXNhuxNQLwU8LtbrQbEhuME8qYeC1ECv5gCz9up5GD", "fee": 4000000, "feeAssetId": null, "timestamp": 1679513203693, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "2QQf5UfDUbvkPHMqnYdtBeAUQoTPokfmQkcBXFvX98w7rYgJSSYBoqVtQSC4L2y6ZF8SyiavrdAh42hjZYKxx4W5" ], "script": "base64:BgKCKwgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCCIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiBGJpZzMiBGJpZzQiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCINa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JlWgUCZ2wEAmlsCQECYVcABAJpbQkBAmVZAQUCZVoEAmFGCAUCaW0CXzEEAmFHCAUCaW0CXzIEAmFICQD0AwMIBQJlWglib2R5Qnl0ZXMJAJEDAggFAmVaBnByb29mcwAACAUCZVoPc2VuZGVyUHVibGljS2V5BAJhSQkA9AMDCAUCZVoJYm9keUJ5dGVzCQCRAwIIBQJlWgZwcm9vZnMAAQUCaWwDAwMFAmFGBQJhSAcFAmFJBwYJAQJhRQQFAmFGBQJhRwUCYUgFAmFJAwkAAQIFAmdsAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCY0MFAmdsAwkA9AMDCAUCaWkJYm9keUJ5dGVzCQCRAwIIBQJpaQZwcm9vZnMAAAUCaWsGBAJpbgkA9gMBCQEFdmFsdWUBCAUCY0MGc2NyaXB0BAJpbwkA2wQBCQEFdmFsdWUBCQCdCAIFAmFRCQECYUMABAJpcAkA8QcBBQR0aGlzAwkAAAIFAmlvBQJpbgkBAiE9AgUCaXAFAmluBwkA9AMDCAUCaWkJYm9keUJ5dGVzCQCRAwIIBQJpaQZwcm9vZnMAAAUCaWso85DP", "height": 2501640, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FDphvQf1J6s9jxqdXJw57RKAvzZRJ4MK4vncNG47YRoS Next: 9wxxp9zeii9c6x5mca2jJ9m6mV9Q4nf6xDbbqzqVFSBR Diff:
OldNewDifferences
128128 func al () = "%s__amp"
129129
130130
131-func am (an) = ("%s%d__amp__" + toString(an))
131+func am () = "%s__addonAddr"
132132
133133
134-func ao () = "%s__addonAddr"
134+let an = "%s__fee"
135+
136+let ao = valueOrElse(getInteger(this, an), G)
137+
138+let ap = makeString(["%s", "dLp"], n)
139+
140+let aq = makeString(["%s", "dLpRefreshedHeight"], n)
141+
142+let ar = makeString(["%s", "refreshDLpDelay"], n)
143+
144+let as = 30
145+
146+let at = valueOrElse(getInteger(this, ar), as)
147+
148+func au () = "%s__factoryConfig"
135149
136150
137-func ap () = "%s__changeAmpLastCall"
151+func av () = "%s%s__matcher__publicKey"
138152
139153
140-let aq = "%s__fee"
141-
142-let ar = valueOrElse(getInteger(this, aq), G)
143-
144-let as = makeString(["%s", "dLp"], n)
145-
146-let at = makeString(["%s", "dLpRefreshedHeight"], n)
147-
148-let au = makeString(["%s", "refreshDLpDelay"], n)
149-
150-let av = 30
151-
152-let aw = valueOrElse(getInteger(this, au), av)
153-
154-func ax () = "%s__factoryConfig"
154+func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
155155
156156
157-func ay () = "%s%s__matcher__publicKey"
157+func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
158158
159159
160-func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
160+func aB () = "%s__shutdown"
161161
162162
163-func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
163+func aC () = "%s__allowedLpStableScriptHash"
164164
165165
166-func aE () = "%s__shutdown"
166+func aD () = "%s__feeCollectorAddress"
167167
168168
169-func aF () = "%s__allowedLpStableScriptHash"
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 () = "%s__feeCollectorAddress"
172+func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
173173
174174
175-func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
175+func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
176176
177177
178-func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
178+func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
179179
180180
181-func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
181+func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
182182
183183
184-func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
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-func aS (aT) = throw(makeString(["lp_stable.ride:", aT], " "))
205+func aW () = fromBase58String(aJ(aQ, av()))
188206
189207
190-func aU (aT) = makeString(["lp_stable.ride:", aT], " ")
208+let aX = addressFromStringValue(aJ(aQ, aD()))
191209
192-
193-let aV = addressFromStringValue(aO(this, Y()))
194-
195-let aW = {
196- let aX = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
197- if ($isInstanceOf(aX, "Int"))
198- then aX
199- else throw(($getType(aX) + " couldn't be cast to Int"))
200- }
201-
202-let aY = {
203- let aX = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
204- if ($isInstanceOf(aX, "Int"))
205- then aX
206- else throw(($getType(aX) + " couldn't be cast to Int"))
207- }
208-
209-let aZ = aO(this, al())
210-
211-func ba () = valueOrElse(getBoolean(aV, aE()), false)
212-
213-
214-func bb () = fromBase58String(aO(aV, ay()))
215-
216-
217-let bc = addressFromStringValue(aO(aV, aG()))
218-
219-func bd () = {
220- let be = aO(this, aj())
221- let bf = aO(this, ak())
222- let bg = aR(aV, aC(bf))
223- let aA = aR(aV, aC(be))
224- split(aO(aV, az(toString(aA), toString(bg))), 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)
225216 }
226217
227218
228-func bh (bi) = if ((bi == k))
219+func bc (bd) = if ((bd == k))
229220 then unit
230- else fromBase58String(bi)
221+ else fromBase58String(bd)
231222
232223
233-func bj (bi) = if ((bi == unit))
224+func be (bd) = if ((bd == unit))
234225 then k
235- else toBase58String(value(bi))
226+ else toBase58String(value(bd))
236227
237228
238-func bk (bl) = $Tuple9(addressFromStringValue(bl[t]), parseIntValue(bl[u]), fromBase58String(bl[v]), bh(bl[w]), bh(bl[x]), parseIntValue(bl[y]), parseIntValue(bl[z]), fromBase58String(bl[A]), fromBase58String(bl[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]))
239230
240231
241-let bm = bk(bd())
232+let bh = bf(aY())
242233
243-let bn = bm
234+let bi = bh
244235
245-let bo = bn._1
236+let bj = bi._1
246237
247-let bp = bn._2
238+let bk = bi._2
248239
249-let bq = bn._3
240+let bl = bi._3
250241
251-let br = bn._4
242+let bm = bi._4
252243
253-let bs = bn._5
244+let bn = bi._5
254245
255-let bt = bn._6
246+let bo = bi._6
256247
257-let bu = bn._7
248+let bp = bi._7
258249
259-let bv = bn._8
250+let bq = bi._8
260251
261-let bw = bn._9
252+let br = bi._9
262253
263-func bx () = split(aO(aV, ax()), n)
254+func bs () = split(aJ(aQ, au()), n)
264255
265256
266-let by = bx()
257+let bt = bs()
267258
268-let bz = valueOrErrorMessage(addressFromString(by[C]), "Invalid staking contract address")
259+let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
269260
270-let bA = valueOrErrorMessage(addressFromString(by[E]), "Invalid slipage contract address")
261+let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
271262
272-let bB = valueOrErrorMessage(addressFromString(by[F]), "Invalid gwx contract address")
263+let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
273264
274-let bC = valueOrErrorMessage(addressFromString(by[D]), "Invalid gwx contract address")
265+let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
275266
276-func bD (bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN)], 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)
277268
278269
279-func bO (bP,bQ,bR,bH,bK,bL) = makeString(["%d%d%d%d%d%d", toString(bP), toString(bQ), toString(bR), toString(bH), toString(bK), toString(bL)], 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)
280271
281272
282-func bS (bT) = if ((bT == "WAVES"))
273+func bN (bO) = if ((bO == "WAVES"))
283274 then wavesBalance(this).available
284- else assetBalance(this, fromBase58String(bT))
275+ else assetBalance(this, fromBase58String(bO))
285276
286277
287-func bU (bV,bW) = fraction(bV, c, bW)
278+func bP (bQ,bR) = fraction(bQ, c, bR)
288279
289280
290-func bX (bV,bW,P) = fraction(bV, c, bW, P)
281+func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
291282
292283
293-func bY (bZ,ca,cb) = {
294- let cc = fraction((bZ - ca), b, ca)
295- let cd = ((cb - W(cc)) > d)
296- if (!(cd))
297- then throw(("Big slpg: " + toString(cc)))
298- else $Tuple2(cd, min([bZ, ca]))
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]))
299290 }
300291
301292
302-func ce (cf,cg,ch) = {
303- let cc = fraction(cg, b, cf)
304- let ci = (ch > cc)
305- if (if (ci)
293+func bZ (ca,cb,cc) = {
294+ let bX = fraction(cb, b, ca)
295+ let cd = (cc > bX)
296+ if (if (cd)
306297 then true
307- else (cg > cf))
308- then throw(((((((toString(cg) + " ") + toString(cf)) + " ") + toString(cc)) + " ") + toString(ch)))
309- else ci
298+ else (cb > ca))
299+ then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300+ else cd
310301 }
311302
312303
313-func cj (ck,cl,cm,cn) = {
314- let co = H(cm, ck)
315- let cp = H(cn, cl)
316- bU(cp, co)
304+func ce (cf,cg,ch,ci) = {
305+ let cj = H(ch, cf)
306+ let ck = H(ci, cg)
307+ bP(ck, cj)
317308 }
318309
319310
320-func cq (cm,cn,cr) = {
321- let cs = bt
322- let ct = bu
323- let cu = cj(cs, ct, cm, cn)
324- let bW = H(cm, cs)
325- let bV = H(cn, ct)
326- let cv = H(cr, a)
327- let cw = bU(bW, cv)
328- let cx = bU(bV, cv)
329-[cu, cw, cx]
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]
330321 }
331322
332323
333-func cy (cm,cn,cr) = {
334- let cz = cq(cm, cn, cr)
335-[L(cz[0], a), L(cz[1], a), L(cz[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)]
336327 }
337328
338329
339-func cA (cB,ar) = {
340- let cC = if ((ar == 0))
330+func cv (cw,ao) = {
331+ let cx = if ((ao == 0))
341332 then 0
342- else fraction(cB, ar, a)
343- $Tuple2((cB - cC), cC)
333+ else fraction(cw, ao, a)
334+ $Tuple2((cw - cx), cx)
344335 }
345336
346337
347-func cD (cE) = {
348- let cF = cE[0]
349- let cG = cE[1]
350- let cH = (cF + cG)
351- if ((cH == e))
338+func cy (cz) = {
339+ let cA = cz[0]
340+ let cB = cz[1]
341+ let cC = (cA + cB)
342+ if ((cC == e))
352343 then e
353344 else {
354- let cI = parseIntValue(aZ)
355- let cJ = (cI * 2)
356- let cz = fraction(cF, cG, f)
357- let cK = fraction(cz, i, f)
358- let cL = fraction(toBigInt(cJ), cH, f)
359- let cM = toBigInt((cJ - 1))
360- func cN (cO) = {
361- let cP = fraction(cO, cO, f)
362- let cQ = fraction(cP, cO, f)
363- let cR = fraction(cQ, f, cK)
364- fraction((cL + fraction(cR, g, f)), cO, (fraction(cM, cO, f) + fraction(h, cR, 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)))
365356 }
366357
367- func cS (cT,cU) = if (cT._2)
368- then cT
358+ func cN (cO,cP) = if (cO._2)
359+ then cO
369360 else {
370- let cO = cT._1
371- let cV = cN(cO)
372- let cW = (cV - value(cO))
373- let cX = if ((e > cW))
374- then -(cW)
375- else cW
376- if ((f >= cX))
377- then $Tuple2(cV, true)
378- else $Tuple2(cV, 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)
379370 }
380371
381- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382- let cZ = {
383- let da = cY
384- let db = size(da)
385- let dc = $Tuple2(cH, false)
386- func dd (de,df) = if ((df >= db))
387- then de
388- else cS(de, da[df])
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])
389380
390- func dg (de,df) = if ((df >= db))
391- then de
392- else throw("List size exceeds 17")
381+ func db (cZ,da) = if ((da >= cW))
382+ then cZ
383+ else throw("List size exceeds 18")
393384
394- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 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)
395386 }
396- let cO = cZ._1
397- let dh = cZ._2
398- if (dh)
399- then cO
400- else throw(("D calculation error, D = " + toString(cO)))
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)))
401392 }
402393 }
403394
404395
405-func di (dj,dk,dl,dm) = {
406- let dn = bq
407- let do = toBase58String(value(br))
408- let dp = toBase58String(value(bs))
409- let dq = bt
410- let dr = bu
411- let ds = toString(bp)
412- let dt = valueOrErrorMessage(assetInfo(dn), "Wrong LP id").quantity
413- if ((toBase58String(dn) != dk))
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))
414405 then throw("Wrong pmt asset")
415406 else {
416- let du = bS(do)
417- let dv = H(du, dq)
418- let dw = bS(dp)
419- let dx = H(dw, dr)
420- let dy = bU(dx, dv)
421- let dz = L(dy, a)
422- let dA = H(dl, a)
423- let dB = H(dt, a)
424- let dC = fraction(dv, dA, dB)
425- let dD = fraction(dx, dA, dB)
426- let dE = O(dC, dq, FLOOR)
427- let dF = O(dD, dr, FLOOR)
428- let dG = if ((dj == ""))
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 == ""))
429420 then nil
430- else [ScriptTransfer(dm, dE, if ((do == "WAVES"))
421+ else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
431422 then unit
432- else fromBase58String(do)), ScriptTransfer(dm, dF, if ((dp == "WAVES"))
423+ else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
433424 then unit
434- else fromBase58String(dp)), StringEntry(ai(toString(dm), dj), bO(dE, dF, dl, dz, height, lastBlock.timestamp)), IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz)]
435- $Tuple10(dE, dF, do, dp, du, dw, dt, dy, ds, dG)
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)
436427 }
437428 }
438429
439430
440-func dH (dj,cb,dI,dJ,dK,dL,dm,dM,dN,dO,dP,dQ,dR) = {
441- let dn = bq
442- let dS = toBase58String(value(br))
443- let dT = toBase58String(value(bs))
444- let dU = bv
445- let dV = bw
446- let dW = bt
447- let dX = bu
448- let ds = toString(bp)
449- let dY = valueOrErrorMessage(assetInfo(dn), "Wr lp as").quantity
450- let du = if (dM)
451- then bS(dS)
452- else if (if (dO)
453- then (dR == dS)
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)
454445 else false)
455- then (bS(dS) - dQ)
456- else if (dO)
457- then bS(dS)
458- else (bS(dS) - dI)
459- let dw = if (dM)
460- then bS(dT)
461- else if (if (dO)
462- then (dR == dT)
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)
463454 else false)
464- then (bS(dT) - dQ)
465- else if (dO)
466- then bS(dT)
467- else (bS(dT) - dK)
468- let dZ = H(dI, dW)
469- let ea = H(dK, dX)
470- let eb = bU(ea, dZ)
471- let dv = H(du, dW)
472- let dx = H(dw, dX)
473- let cg = cD([dv, dx])
474- let ec = if ((dY == 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))
475466 then {
476- let cf = cD([(dv + dZ), (dx + ea)])
477- let ed = if ((cf > cg))
467+ let ca = cy([(dq + dU), (ds + dV)])
468+ let dY = if ((ca > cb))
478469 then true
479470 else throw("D1 should be greater than D0")
480- if ((ed == ed))
471+ if ((dY == dY))
481472 then {
482- let dy = d
483- let ee = d
484- let cv = cf
485- $Tuple5(L(cv, a), L(dZ, dW), L(ea, dX), bU((dx + ea), (dv + dZ)), ee)
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)
486477 }
487478 else throw("Strict value is not equal to itself.")
488479 }
489480 else {
490- let dy = bU(dx, dv)
491- let ef = fraction(W((dy - eb)), c, dy)
492- let ee = H(cb, a)
493- if (if (if (dP)
494- then (dy != 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)
495486 else false)
496- then (ef > ee)
487+ then (ea > dZ)
497488 else false)
498- then throw(((("Price slippage " + toString(ef)) + " > ") + toString(ee)))
489+ then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
499490 else {
500- let eg = H(dY, a)
501- let eh = fraction(dZ, bX(dx, dv, CEILING), c, CEILING)
502- let ei = fraction(ea, c, bX(dx, dv, FLOOR), CEILING)
503- let ej = if ((eh > ea))
504- then $Tuple2(ei, ea)
505- else $Tuple2(dZ, eh)
506- let ek = ej._1
507- let el = ej._2
508- let cf = cD([(dv + ek), (dx + el)])
509- let ed = if ((cf > cg))
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))
510501 then true
511502 else throw("D1 should be greater than D0")
512- if ((ed == ed))
503+ if ((dY == dY))
513504 then {
514- let cv = fraction(eg, (cf - cg), cg)
515- $Tuple5(O(cv, a, FLOOR), O(ek, dW, CEILING), O(el, dX, CEILING), dy, ee)
505+ let cq = fraction(eb, (ca - cb), cb)
506+ $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ)
516507 }
517508 else throw("Strict value is not equal to itself.")
518509 }
519510 }
520- let em = ec._1
521- let en = ec._2
522- let eo = ec._3
523- let dz = L(ec._4, a)
524- let ep = L(ec._5, a)
525- if ((0 >= em))
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))
526517 then throw("LP <= 0")
527518 else {
528- let eq = if (!(dN))
519+ let el = if (!(dI))
529520 then 0
530- else em
531- let er = (dI - en)
532- let es = (dK - eo)
533- let et = if (if (dO)
534- then (dR == dS)
521+ else eh
522+ let em = (dD - ei)
523+ let en = (dF - ej)
524+ let eo = if (if (dJ)
525+ then (dM == dN)
535526 else false)
536- then $Tuple2(dQ, 0)
537- else if (if (dO)
538- then (dR == dT)
527+ then $Tuple2(dL, 0)
528+ else if (if (dJ)
529+ then (dM == dO)
539530 else false)
540- then $Tuple2(0, dQ)
541- else $Tuple2(en, eo)
542- let eu = et._1
543- let ev = et._2
544- let ew = [IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz), StringEntry(af(dm, dj), bD(eu, ev, eq, dz, cb, ep, height, lastBlock.timestamp, er, es))]
545- $Tuple13(em, eq, dz, du, dw, dY, dn, ds, ew, er, es, dJ, dL)
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)
546537 }
547538 }
548539
549540
550-func ex (cE,cU,ey) = {
551- let ez = g
552- let eA = cE[if ((cU == 0))
541+func es (cz,cP,et) = {
542+ let eu = g
543+ let ev = cz[if ((cP == 0))
553544 then 1
554545 else 0]
555- let eB = parseBigIntValue(l)
556- let cI = (parseBigIntValue(aZ) * eB)
557- let cH = eA
558- let cJ = (cI * ez)
559- let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
560- let eD = ((cH + ((ey * eB) / cJ)) - ey)
561- func cS (cT,eE) = {
562- let eF = cT
563- let eG = eF._1
564- let dh = eF._2
565- if ((dh != unit))
566- then cT
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
567558 else {
568- let eH = (((eG * eG) + eC) / ((g * eG) + eD))
569- let eI = X((eH - value(eG)))
570- if ((f >= eI))
571- then $Tuple2(eH, eE)
572- else $Tuple2(eH, 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)
573564 }
574565 }
575566
576- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
577- let eJ = {
578- let da = cY
579- let db = size(da)
580- let dc = $Tuple2(ey, unit)
581- func dd (de,df) = if ((df >= db))
582- then de
583- else cS(de, da[df])
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])
584575
585- func dg (de,df) = if ((df >= db))
586- then de
576+ func db (cZ,da) = if ((da >= cW))
577+ then cZ
587578 else throw("List size exceeds 15")
588579
589- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 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)
590581 }
591- let eG = eJ._1
592- let dh = eJ._2
593- if ((dh != unit))
594- then eG
595- else throw(("Y calculation error, Y = " + toString(eG)))
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)))
587+ }
588+
589+
590+func eF (eG,eH,eI) = {
591+ let eJ = fraction(cy([K(eG, toBigInt(bo)), K(eH, toBigInt(bp))]), c, eI)
592+ if ((eI == e))
593+ then e
594+ else eJ
596595 }
597596
598597
599598 func eK (eL,eM,eN) = {
600- let eO = fraction(cD([K(eL, toBigInt(bt)), K(eM, toBigInt(bu))]), c, eN)
601- if ((eN == e))
602- then e
603- else eO
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
604604 }
605605
606606
607-func eP (eQ,eR,eS) = {
608- let eT = (toBigInt(bS(bj(br))) - eQ)
609- let eU = (toBigInt(bS(bj(bs))) - eR)
610- let eV = (toBigInt(value(assetInfo(bq)).quantity) - eS)
611- let eW = eK(eT, eU, eV)
612- eW
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)
613614 }
614615
615616
616-func eX (eY,eZ,eS) = {
617- let eT = (bS(bj(br)) + eY)
618- let eU = (bS(bj(bs)) + eZ)
619- let eV = (value(assetInfo(bq)).quantity + eS)
620- let eO = eK(toBigInt(eT), toBigInt(eU), toBigInt(eV))
621- let fa = [IntegerEntry(at, height), StringEntry(as, toString(eO))]
622- $Tuple2(fa, eO)
623- }
617+func eW (eX,eJ) = if ((eJ >= eX))
618+ then true
619+ else aN("updated DLp lower than current DLp")
624620
625621
626-func fb (fc,eO) = if ((eO >= fc))
627- then true
628- else aS("updated DLp lower than current DLp")
629-
630-
631-func fd (fe) = {
632- let eT = bS(bj(br))
633- let eU = bS(bj(bs))
634- let ff = fe.amount
635- let fg = fraction(fe.amount, fe.price, a, FLOOR)
636- let fh = if ((fe.orderType == Buy))
637- then $Tuple2(ff, -(fg))
638- else $Tuple2(-(ff), fg)
639- let eY = fh._1
640- let eZ = fh._2
641- if (if (if (ba())
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())
642633 then true
643- else (bp == r))
634+ else (bk == r))
644635 then true
645- else (bp == s))
636+ else (bk == s))
646637 then throw("Admin blocked")
647- else if (if ((fe.assetPair.amountAsset != br))
638+ else if (if ((eZ.assetPair.amountAsset != bm))
648639 then true
649- else (fe.assetPair.priceAsset != bs))
640+ else (eZ.assetPair.priceAsset != bn))
650641 then throw("Wr assets")
651642 else {
652- let fi = parseBigIntValue(valueOrElse(getString(this, as), "0"))
653- let fj = eX(eY, eZ, 0)
654- let fk = fj._1
655- let fl = fj._2
656- let fm = (fl >= fi)
657- let fn = makeString(["dLp=", toString(fi), " dLpNew=", toString(fl), " amountAssetBalance=", toString(eT), " priceAssetBalance=", toString(eU), " amountAssetBalanceDelta=", toString(eY), " priceAssetBalanceDelta=", toString(eZ), " height=", toString(height)], "")
658- $Tuple2(fm, fn)
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)
659650 }
660651 }
661652
662653
663-func fo (cU) = if ((size(cU.payments) != 1))
654+func fj (cP) = if ((size(cP.payments) != 1))
664655 then throw("1 pmnt exp")
665656 else {
666- let fp = value(cU.payments[0])
667- let dk = value(fp.assetId)
668- let dQ = fp.amount
669- let ec = di(toBase58String(cU.transactionId), toBase58String(dk), dQ, cU.caller)
670- let dE = ec._1
671- let dF = ec._2
672- let ds = parseIntValue(ec._9)
673- let dG = ec._10
674- if (if (ba())
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())
675666 then true
676- else (ds == s))
677- then throw(("Admin blocked: " + toString(ds)))
678- else $Tuple5(dE, dF, dQ, dk, dG)
667+ else (dn == s))
668+ then throw(("Admin blocked: " + toString(dn)))
669+ else $Tuple5(dz, dA, dL, df, dB)
679670 }
680671
681672
682-func fq (fr,ah,fs,ft,cb,dN,dO,dP,dQ,dR) = {
683- let ec = dH(ah, cb, value(fs).amount, value(fs).assetId, value(ft).amount, value(ft).assetId, fr, (ah == ""), dN, dO, dP, dQ, dR)
684- let ds = parseIntValue(ec._8)
685- if (if (if (ba())
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())
686677 then true
687- else (ds == q))
678+ else (dn == q))
688679 then true
689- else (ds == s))
690- then throw(("Blocked:" + toString(ds)))
691- else ec
680+ else (dn == s))
681+ then throw(("Blocked:" + toString(dn)))
682+ else dX
692683 }
693684
694685
695-func fu (fv,dk,dm,ah,fw) = {
696- let do = toBase58String(value(br))
697- let dp = toBase58String(value(bs))
698- let dn = bq
699- let dW = bt
700- let dX = bu
701- let eV = toBigInt(valueOrErrorMessage(assetInfo(dn), "invalid lp asset").quantity)
702- let fx = if ((eV > 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))
703694 then true
704695 else throw("initial deposit requires all coins")
705- if ((fx == fx))
696+ if ((fs == fs))
706697 then {
707- let du = bS(do)
708- let dw = bS(dp)
709- let fy = if ((ah == ""))
710- then $Tuple2(du, dw)
711- else if ((dk == do))
712- then if ((fv > du))
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))
713704 then throw("invalid payment amount")
714- else $Tuple2((du - fv), dw)
715- else if ((dk == dp))
716- then if ((fv > dw))
705+ else $Tuple2((dp - fq), dr)
706+ else if ((df == dk))
707+ then if ((fq > dr))
717708 then throw("invalid payment amount")
718- else $Tuple2(du, (dw - fv))
709+ else $Tuple2(dp, (dr - fq))
719710 else throw("wrong pmtAssetId")
720- let fz = fy._1
721- let fA = fy._2
722- let fB = if ((dk == do))
723- then $Tuple2(fv, 0)
724- else if ((dk == dp))
725- then $Tuple2(0, fv)
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)
726717 else throw("invalid payment")
727- let fC = fB._1
728- let fD = fB._2
729- let fE = if (fw)
730- then $Tuple3(cA(fC, aW)._1, cA(fD, aW)._1, cA(fv, aW)._2)
731- else $Tuple3(fC, fD, 0)
732- let fF = fE._1
733- let fG = fE._2
734- let cC = fE._3
735- let fH = (fz + fF)
736- let fI = (fA + fG)
737- let cg = cD([H(fz, bt), H(fA, bu)])
738- let cf = cD([H(fH, bt), H(fI, bu)])
739- let ed = if ((cf > cg))
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))
740731 then true
741732 else throw()
742- if ((ed == ed))
733+ if ((dY == dY))
743734 then {
744- let fJ = fraction(eV, (cf - cg), cg, FLOOR)
745- let dz = L(bU(H(fI, dX), H(fH, dW)), a)
746- let ew = [IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz), StringEntry(af(dm, ah), bD(fC, fD, toInt(fJ), dz, 0, 0, height, lastBlock.timestamp, 0, 0))]
747- let fK = fraction(fA, a, fz)
748- let fL = fraction(fv, a, (fK + a))
749- let fM = (fv - fL)
750- let fN = fraction(eV, toBigInt(fM), toBigInt(fA))
751- let fO = toInt(fraction((fJ - fN), b, fN))
752- $Tuple4(toInt(fJ), ew, cC, fO)
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)
753744 }
754745 else throw("Strict value is not equal to itself.")
755746 }
757748 }
758749
759750
760-func fP (fQ,fR,fS,fr,fT,fU) = {
761- let dn = toBase58String(value(bq))
762- let do = toBase58String(value(br))
763- let dp = toBase58String(value(bs))
764- let fV = bt
765- let fW = bu
766- let fX = bp
767- let dm = if ((fr == bC))
768- then fT
769- else fr
770- let fp = value(fS[0])
771- let dk = value(fp.assetId)
772- let dQ = fp.amount
773- let eW = eP(e, e, e)
774- if ((eW == eW))
751+func fK (fL,fM,fN,fm,fO,fP) = {
752+ let di = toBase58String(value(bl))
753+ let dj = toBase58String(value(bm))
754+ let dk = toBase58String(value(bn))
755+ let fQ = bo
756+ let fR = bp
757+ let fS = bk
758+ let dh = if ((fm == bx))
759+ then fO
760+ else fm
761+ let fk = value(fN[0])
762+ let df = value(fk.assetId)
763+ let dL = fk.amount
764+ let eR = eK(e, e, e)
765+ if ((eR == eR))
775766 then {
776- let dj = toBase58String(fU)
777- if ((dn != toBase58String(dk)))
767+ let de = toBase58String(fP)
768+ if ((di != toBase58String(df)))
778769 then throw("Wrong LP")
779770 else {
780- let du = bS(do)
781- let dw = bS(dp)
782- let fY = {
783- let aX = invoke(this, "getOneTknV2READONLY", [fQ, dQ], nil)
784- if ($isInstanceOf(aX, "(Int, Int)"))
785- then aX
786- else throw(($getType(aX) + " 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)"))
787778 }
788- if ((fY == fY))
779+ if ((fT == fT))
789780 then {
790- let cC = fY._2
791- let fZ = fY._1
792- let ga = if (if ((fR > 0))
793- then (fR > fZ)
781+ let cx = fT._2
782+ let fU = fT._1
783+ let fV = if (if ((fM > 0))
784+ then (fM > fU)
794785 else false)
795- then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
796- else fZ
797- let gb = if ((fQ == do))
798- then $Tuple4(ga, 0, ((du - ga) - cC), dw)
799- else if ((fQ == dp))
800- then $Tuple4(0, ga, du, ((dw - ga) - cC))
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))
801792 else throw("invalid out asset id")
802- let gc = gb._1
803- let gd = gb._2
804- let fH = gb._3
805- let fI = gb._4
806- let ge = bU(H(fI, fW), H(fH, fV))
807- let gf = L(ge, a)
808- let gg = if ((fQ == "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"))
809800 then unit
810- else fromBase58String(fQ)
811- let gh = if ((cC > 0))
812- then [ScriptTransfer(bc, cC, gg)]
801+ else fromBase58String(fL)
802+ let gc = if ((cx > 0))
803+ then [ScriptTransfer(aX, cx, gb)]
813804 else nil
814- let dG = ([ScriptTransfer(dm, ga, gg), StringEntry(ai(toString(dm), dj), bO(gc, gd, dQ, gf, height, lastBlock.timestamp)), IntegerEntry(ab(), gf), IntegerEntry(ac(height, lastBlock.timestamp), gf)] ++ gh)
815- if ((dG == dG))
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))
816807 then {
817- let gi = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
818- if ((gi == gi))
808+ let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809+ if ((gd == gd))
819810 then {
820- let gj = {
821- let gk = if ((this == bc))
811+ let ge = {
812+ let gf = if ((this == aX))
822813 then 0
823- else cC
824- let gl = if ((bh(fQ) == br))
814+ else cx
815+ let gg = if ((bc(fL) == bm))
825816 then true
826817 else false
827- if (gl)
828- then $Tuple2(-((fZ + gk)), 0)
829- else $Tuple2(0, -((fZ + gk)))
818+ if (gg)
819+ then $Tuple2(-((fU + gf)), 0)
820+ else $Tuple2(0, -((fU + gf)))
830821 }
831- let eY = gj._1
832- let eZ = gj._2
833- let gm = eX(eY, eZ, 0)
834- let gn = gm._1
835- let eO = gm._2
836- let go = fb(eW, eO)
837- if ((go == go))
838- then $Tuple2((dG ++ gn), ga)
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)
839830 else throw("Strict value is not equal to itself.")
840831 }
841832 else throw("Strict value is not equal to itself.")
849840 }
850841
851842
852-func gp () = {
853- let gq = getString(Z())
854- if ($isInstanceOf(gq, "String"))
843+func gk () = {
844+ let gl = getString(Z())
845+ if ($isInstanceOf(gl, "String"))
855846 then {
856- let cH = gq
857- fromBase58String(cH)
847+ let cC = gl
848+ fromBase58String(cC)
858849 }
859- else if ($isInstanceOf(gq, "Unit"))
850+ else if ($isInstanceOf(gl, "Unit"))
860851 then unit
861852 else throw("Match error")
862853 }
863854
864855
865-func gr () = {
866- let gq = getString(aa())
867- if ($isInstanceOf(gq, "String"))
856+func gm () = {
857+ let gl = getString(aa())
858+ if ($isInstanceOf(gl, "String"))
868859 then {
869- let cH = gq
870- fromBase58String(cH)
860+ let cC = gl
861+ fromBase58String(cC)
871862 }
872- else if ($isInstanceOf(gq, "Unit"))
863+ else if ($isInstanceOf(gl, "Unit"))
873864 then unit
874865 else throw("Match error")
875866 }
876867
877868
878-let gs = throw("Permission denied")
869+let gn = throw("Permission denied")
879870
880-func gt (cU) = {
881- let gq = gp()
882- if ($isInstanceOf(gq, "ByteVector"))
871+func go (cP) = {
872+ let gl = gk()
873+ if ($isInstanceOf(gl, "ByteVector"))
883874 then {
884- let gu = gq
885- (cU.callerPublicKey == gu)
875+ let gp = gl
876+ (cP.callerPublicKey == gp)
886877 }
887- else if ($isInstanceOf(gq, "Unit"))
888- then (cU.caller == this)
878+ else if ($isInstanceOf(gl, "Unit"))
879+ then (cP.caller == this)
889880 else throw("Match error")
890881 }
891882
892883
893-func gv (cU) = {
894- let gq = gp()
895- if ($isInstanceOf(gq, "ByteVector"))
884+func gq (cP) = {
885+ let gl = gk()
886+ if ($isInstanceOf(gl, "ByteVector"))
896887 then {
897- let gu = gq
898- if ((cU.callerPublicKey == gu))
888+ let gp = gl
889+ if ((cP.callerPublicKey == gp))
899890 then true
900- else gs
891+ else gn
901892 }
902- else if ($isInstanceOf(gq, "Unit"))
903- then if ((cU.caller == this))
893+ else if ($isInstanceOf(gl, "Unit"))
894+ then if ((cP.caller == this))
904895 then true
905- else gs
896+ else gn
906897 else throw("Match error")
907898 }
908899
909900
910-func gw (gx,ey,gy) = {
911- let bl = bd()
912- let do = bl[w]
913- let dp = bl[x]
914- let ez = g
915- let eB = parseBigIntValue(l)
916- let cI = (parseBigIntValue(aZ) * eB)
917- let cE = if ((gx == false))
918- then [(toBigInt(bS(do)) + gy), toBigInt(bS(dp))]
919- else [(toBigInt(bS(dp)) + gy), toBigInt(bS(do))]
920- let eA = cE[0]
921- let cH = eA
922- let cJ = (cI * ez)
923- let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
924- let eD = ((cH + ((ey * eB) / cJ)) - ey)
925- func cS (cT,eE) = {
926- let gz = cT
927- let eG = gz._1
928- let dh = gz._2
929- if ((dh != unit))
930- then cT
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
931922 else {
932- let eH = (((eG * eG) + eC) / ((g * eG) + eD))
933- let eI = X((eH - value(eG)))
934- if ((f >= eI))
935- then $Tuple2(eH, eE)
936- else $Tuple2(eH, 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)
937928 }
938929 }
939930
940- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
941- let gA = {
942- let da = cY
943- let db = size(da)
944- let dc = $Tuple2(ey, unit)
945- func dd (de,df) = if ((df >= db))
946- then de
947- else cS(de, da[df])
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])
948939
949- func dg (de,df) = if ((df >= db))
950- then de
940+ func db (cZ,da) = if ((da >= cW))
941+ then cZ
951942 else throw("List size exceeds 15")
952943
953- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 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)
954945 }
955- let eG = gA._1
956- let dh = gA._2
957- if ((dh != unit))
958- then eG
959- else throw(("Y calculation error, Y = " + toString(eG)))
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)))
960951 }
961952
962953
963-func gB () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
964-
965-
966-@Callable(cU)
967-func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
968- let gE = if ((gx == false))
954+@Callable(cP)
955+func calculateAmountOutForSwapREADONLY (gw,gs,gx) = {
956+ let gy = if ((gs == false))
969957 then {
970- let gF = aO(this, ak())
971- let gy = (toBigInt(bS(aO(this, aj()))) + toBigInt(gC))
972- $Tuple2(gF, gy)
958+ let gz = aJ(this, ak())
959+ let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960+ $Tuple2(gz, gt)
973961 }
974962 else {
975- let gF = aO(this, aj())
976- let gy = (toBigInt(bS(aO(this, ak()))) + toBigInt(gC))
977- $Tuple2(gF, gy)
963+ let gz = aJ(this, aj())
964+ let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965+ $Tuple2(gz, gt)
978966 }
979- let gF = gE._1
980- let gy = gE._2
981- let bl = bd()
982- let do = bl[w]
983- let dp = bl[x]
984- let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
985- let ey = cD(cE)
986- let eG = gw(gx, ey, toBigInt(gC))
987- let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
988- let gH = max([0, toInt(gG)])
989- let gI = if ((gx == false))
990- then [((toBigInt(bS(do)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
991- else [(toBigInt(bS(do)) - gG), ((toBigInt(bS(dp)) + toBigInt(gC)) + toBigInt(gD))]
992- let gJ = cD(gI)
993- let ed = if ((gJ >= ey))
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))
994982 then true
995- else throw(makeString(["new D is fewer error", toString(ey), toString(gJ)], "__"))
996- if ((ed == ed))
997- then $Tuple2(nil, gH)
983+ else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__"))
984+ if ((dY == dY))
985+ then $Tuple2(nil, gB)
998986 else throw("Strict value is not equal to itself.")
999987 }
1000988
1001989
1002990
1003-@Callable(cU)
1004-func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1005- let gM = {
1006- let aX = invoke(aV, "getSwapContractREADONLY", nil, nil)
1007- if ($isInstanceOf(aX, "String"))
1008- then aX
1009- else throw(($getType(aX) + " 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"))
1010998 }
1011- let gN = [if ((value(cU.payments[0]).amount >= gC))
999+ let gH = [if ((value(cP.payments[0]).amount >= gw))
10121000 then true
1013- else aS("Wrong amount"), if ((cU.caller == addressFromStringValue(gM)))
1001+ else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG)))
10141002 then true
1015- else aS("Permission denied")]
1016- if ((gN == gN))
1003+ else aN("Permission denied")]
1004+ if ((gH == gH))
10171005 then {
1018- let fp = value(cU.payments[0])
1019- let gO = bj(fp.assetId)
1020- let gP = if ((gx == false))
1006+ let fk = value(cP.payments[0])
1007+ let gI = be(fk.assetId)
1008+ let gJ = if ((gs == false))
10211009 then {
1022- let gF = aO(this, ak())
1023- let gy = (bS(gO) - value(cU.payments[0]).amount)
1024- $Tuple2(gF, gy)
1010+ let gz = aJ(this, ak())
1011+ let gt = (bN(gI) - value(cP.payments[0]).amount)
1012+ $Tuple2(gz, gt)
10251013 }
10261014 else {
1027- let gF = aO(this, aj())
1028- let gy = (bS(gO) - value(cU.payments[0]).amount)
1029- $Tuple2(gF, gy)
1015+ let gz = aJ(this, aj())
1016+ let gt = (bN(gI) - value(cP.payments[0]).amount)
1017+ $Tuple2(gz, gt)
10301018 }
1031- let gF = gP._1
1032- let gy = gP._2
1033- let bl = bd()
1034- let do = bl[w]
1035- let dp = bl[x]
1036- let cE = if ((gx == false))
1037- then [(toBigInt(bS(do)) - toBigInt(value(cU.payments[0]).amount)), toBigInt(bS(dp))]
1038- else [toBigInt(bS(do)), (toBigInt(bS(dp)) - toBigInt(value(cU.payments[0]).amount))]
1039- let ey = cD(cE)
1040- let eG = gw(gx, ey, toBigInt(0))
1041- let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
1042- let gH = max([0, toInt(gG)])
1043- let gQ = if ((gH >= gK))
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))
10441032 then true
10451033 else throw("Exchange result is fewer coins than expected")
1046- if ((gQ == gQ))
1034+ if ((gK == gK))
10471035 then {
1048- let gI = if ((gx == false))
1049- then [(toBigInt(bS(do)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
1050- else [(toBigInt(bS(do)) - gG), (toBigInt(bS(dp)) + toBigInt(gD))]
1051- let gJ = cD(gI)
1052- let ed = if ((gJ >= ey))
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))
10531041 then true
10541042 else throw("new D is fewer error")
1055- if ((ed == ed))
1056- then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bh(gF))], gH)
1043+ if ((dY == dY))
1044+ then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB)
10571045 else throw("Strict value is not equal to itself.")
10581046 }
10591047 else throw("Strict value is not equal to itself.")
10631051
10641052
10651053
1066-@Callable(cU)
1054+@Callable(cP)
10671055 func constructor (Y) = {
1068- let eC = gv(cU)
1069- if ((eC == eC))
1056+ let ex = gq(cP)
1057+ if ((ex == ex))
10701058 then [StringEntry(Y(), Y)]
10711059 else throw("Strict value is not equal to itself.")
10721060 }
10731061
10741062
10751063
1076-@Callable(cU)
1077-func setManager (gR) = {
1078- let eC = gv(cU)
1079- if ((eC == eC))
1064+@Callable(cP)
1065+func setManager (gL) = {
1066+ let ex = gq(cP)
1067+ if ((ex == ex))
10801068 then {
1081- let gS = fromBase58String(gR)
1082- if ((gS == gS))
1083- then [StringEntry(aa(), gR)]
1069+ let gM = fromBase58String(gL)
1070+ if ((gM == gM))
1071+ then [StringEntry(aa(), gL)]
10841072 else throw("Strict value is not equal to itself.")
10851073 }
10861074 else throw("Strict value is not equal to itself.")
10881076
10891077
10901078
1091-@Callable(cU)
1079+@Callable(cP)
10921080 func confirmManager () = {
1093- let cz = gr()
1094- let gT = if (isDefined(cz))
1081+ let cu = gm()
1082+ let gN = if (isDefined(cu))
10951083 then true
10961084 else throw("No pending manager")
1097- if ((gT == gT))
1085+ if ((gN == gN))
10981086 then {
1099- let gU = if ((cU.callerPublicKey == value(cz)))
1087+ let gO = if ((cP.callerPublicKey == value(cu)))
11001088 then true
11011089 else throw("You are not pending manager")
1102- if ((gU == gU))
1103- then [StringEntry(Z(), toBase58String(value(cz))), DeleteEntry(aa())]
1090+ if ((gO == gO))
1091+ then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
11041092 else throw("Strict value is not equal to itself.")
11051093 }
11061094 else throw("Strict value is not equal to itself.")
11081096
11091097
11101098
1111-@Callable(cU)
1112-func put (gV,gW) = {
1113- let gX = bx()
1114- let gY = valueOrErrorMessage(addressFromString(gX[C]), "Wr st addr")
1115- let gZ = valueOrErrorMessage(addressFromString(gX[E]), "Wr sl addr")
1116- if ((0 > gV))
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))
11171105 then throw("Wrong slippage")
1118- else if ((size(cU.payments) != 2))
1106+ else if ((size(cP.payments) != 2))
11191107 then throw("2 pmnts expd")
11201108 else {
1121- let ha = toBigInt(value(cU.payments[0]).amount)
1122- let hb = toBigInt(value(cU.payments[1]).amount)
1123- let eT = (toBigInt(bS(bj(br))) - ha)
1124- if ((eT == eT))
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))
11251113 then {
1126- let eU = (toBigInt(bS(bj(bs))) - hb)
1127- if ((eU == eU))
1114+ let eP = (toBigInt(bN(be(bn))) - gV)
1115+ if ((eP == eP))
11281116 then {
1129- let eV = toBigInt(value(assetInfo(bq)).quantity)
1130- if ((eV == eV))
1117+ let eQ = toBigInt(value(assetInfo(bl)).quantity)
1118+ if ((eQ == eQ))
11311119 then {
1132- let eW = eP(ha, hb, toBigInt(0))
1133- if ((eW == eW))
1120+ let eR = eK(gU, gV, toBigInt(0))
1121+ if ((eR == eR))
11341122 then {
1135- let hc = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], gV, true, false, true, 0, "")
1136- let eq = hc._2
1137- let hd = hc._7
1138- let dG = hc._9
1139- let er = hc._10
1140- let es = hc._11
1141- let do = hc._12
1142- let dp = hc._13
1143- let ec = invoke(aV, "emit", [eq], nil)
1144- if ((ec == ec))
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))
11451133 then {
1146- let he = {
1147- let gq = ec
1148- if ($isInstanceOf(gq, "Address"))
1134+ let gY = {
1135+ let gl = dX
1136+ if ($isInstanceOf(gl, "Address"))
11491137 then {
1150- let hf = gq
1151- invoke(hf, "emit", [eq], nil)
1138+ let gZ = gl
1139+ invoke(gZ, "emit", [el], nil)
11521140 }
11531141 else unit
11541142 }
1155- if ((he == he))
1143+ if ((gY == gY))
11561144 then {
1157- let hg = if ((er > 0))
1158- then invoke(gZ, "put", nil, [AttachedPayment(do, er)])
1145+ let ha = if ((em > 0))
1146+ then invoke(gT, "put", nil, [AttachedPayment(dj, em)])
11591147 else nil
1160- if ((hg == hg))
1148+ if ((ha == ha))
11611149 then {
1162- let hh = if ((es > 0))
1163- then invoke(gZ, "put", nil, [AttachedPayment(dp, es)])
1150+ let hb = if ((en > 0))
1151+ then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
11641152 else nil
1165- if ((hh == hh))
1153+ if ((hb == hb))
11661154 then {
1167- let hi = if (gW)
1155+ let hc = if (gQ)
11681156 then {
1169- let hj = invoke(gY, "stake", nil, [AttachedPayment(hd, eq)])
1170- if ((hj == hj))
1157+ let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)])
1158+ if ((hd == hd))
11711159 then nil
11721160 else throw("Strict value is not equal to itself.")
11731161 }
1174- else [ScriptTransfer(cU.caller, eq, hd)]
1175- let hk = eX(0, 0, 0)
1176- let gn = hk._1
1177- let eO = hk._2
1178- let hl = if ((eO >= eW))
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))
11791167 then true
1180- else aS(makeString(["updated DLp lower than current DLp", toString(eT), toString(eU), toString(eV), toString(eW), toString(eO), toString(er), toString(es)], " "))
1181- if ((hl == hl))
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))
11821170 then {
1183- let hm = value(assetInfo(bq)).quantity
1184- if ((hm == hm))
1185- then ((dG ++ hi) ++ gn)
1171+ let hg = value(assetInfo(bl)).quantity
1172+ if ((hg == hg))
1173+ then ((dB ++ hc) ++ gi)
11861174 else throw("Strict value is not equal to itself.")
11871175 }
11881176 else throw("Strict value is not equal to itself.")
12071195
12081196
12091197
1210-@Callable(cU)
1211-func putOneTknV2 (fR,gW) = {
1212- let hn = {
1213- let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1214- if ($isInstanceOf(aX, "Boolean"))
1215- then aX
1216- else throw(($getType(aX) + " 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"))
12171205 }
1218- let ho = if (if (if (ba())
1206+ let hi = if (if (if (aV())
12191207 then true
1220- else (bp == q))
1208+ else (bk == q))
12211209 then true
1222- else (bp == s))
1210+ else (bk == s))
12231211 then true
1224- else hn
1225- let gN = [if (if (!(ho))
1212+ else hh
1213+ let gH = [if (if (!(hi))
12261214 then true
1227- else gt(cU))
1215+ else go(cP))
12281216 then true
1229- else aS("put operation is blocked by admin"), if ((size(cU.payments) == 1))
1217+ else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
12301218 then true
1231- else aS("exactly 1 payment are expected")]
1232- if ((gN == gN))
1219+ else aN("exactly 1 payment are expected")]
1220+ if ((gH == gH))
12331221 then {
1234- let do = toBase58String(value(br))
1235- let dp = toBase58String(value(bs))
1236- let dn = bq
1237- let fV = bt
1238- let fW = bu
1239- let dm = if ((cU.caller == this))
1240- then cU.originCaller
1241- else cU.caller
1242- let fp = value(cU.payments[0])
1243- let dk = toBase58String(value(fp.assetId))
1244- let dQ = fp.amount
1245- let eW = if ((fp.assetId == br))
1246- then eP(toBigInt(dQ), toBigInt(0), toBigInt(0))
1247- else eP(toBigInt(0), toBigInt(dQ), toBigInt(0))
1248- if ((eW == eW))
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))
12491237 then {
1250- let hp = fu(dQ, dk, toString(dm), toBase58String(cU.transactionId), true)
1251- if ((hp == hp))
1238+ let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1239+ if ((hj == hj))
12521240 then {
1253- let cC = hp._3
1254- let dG = hp._2
1255- let hq = hp._1
1256- let eq = if (if ((fR > 0))
1257- then (fR > hq)
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)
12581246 else false)
1259- then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
1260- else hq
1261- let hc = invoke(aV, "emit", [eq], nil)
1262- if ((hc == hc))
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))
12631251 then {
1264- let he = {
1265- let gq = hc
1266- if ($isInstanceOf(gq, "Address"))
1252+ let gY = {
1253+ let gl = gW
1254+ if ($isInstanceOf(gl, "Address"))
12671255 then {
1268- let hf = gq
1269- invoke(hf, "emit", [eq], nil)
1256+ let gZ = gl
1257+ invoke(gZ, "emit", [el], nil)
12701258 }
12711259 else unit
12721260 }
1273- if ((he == he))
1261+ if ((gY == gY))
12741262 then {
1275- let hi = if (gW)
1263+ let hc = if (gQ)
12761264 then {
1277- let hj = invoke(bz, "stakeFor", [toString(cU.caller)], [AttachedPayment(dn, eq)])
1278- if ((hj == hj))
1265+ let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1266+ if ((hd == hd))
12791267 then nil
12801268 else throw("Strict value is not equal to itself.")
12811269 }
1282- else [ScriptTransfer(cU.caller, eq, dn)]
1283- let gh = if ((cC > 0))
1284- then [ScriptTransfer(bc, cC, fromBase58String(dk))]
1270+ else [ScriptTransfer(cP.caller, el, di)]
1271+ let gc = if ((cx > 0))
1272+ then [ScriptTransfer(aX, cx, fromBase58String(df))]
12851273 else nil
1286- let hr = if ((this == bc))
1274+ let hl = if ((this == aX))
12871275 then $Tuple2(0, 0)
12881276 else {
1289- let hs = if ((fp.assetId == br))
1277+ let hm = if ((fk.assetId == bm))
12901278 then true
12911279 else false
1292- if (hs)
1293- then $Tuple2(-(cC), 0)
1294- else $Tuple2(0, -(cC))
1280+ if (hm)
1281+ then $Tuple2(-(cx), 0)
1282+ else $Tuple2(0, -(cx))
12951283 }
1296- let eY = hr._1
1297- let eZ = hr._2
1298- let ht = eX(eY, eZ, 0)
1299- let gn = ht._1
1300- let eO = ht._2
1301- let go = fb(eW, eO)
1302- if ((go == go))
1303- then $Tuple2((((dG ++ hi) ++ gh) ++ gn), eq)
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)
13041292 else throw("Strict value is not equal to itself.")
13051293 }
13061294 else throw("Strict value is not equal to itself.")
13161304
13171305
13181306
1319-@Callable(cU)
1320-func putForFree (hu) = if ((0 > hu))
1307+@Callable(cP)
1308+func putForFree (ho) = if ((0 > ho))
13211309 then throw("Wrong slpg")
1322- else if ((size(cU.payments) != 2))
1310+ else if ((size(cP.payments) != 2))
13231311 then throw("2 pmnts expd")
13241312 else {
1325- let hv = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], hu, false, false, true, 0, "")
1326- let dG = hv._9
1327- let ha = toBigInt(value(cU.payments[0]).amount)
1328- let hb = toBigInt(value(cU.payments[1]).amount)
1329- let eW = eP(ha, hb, toBigInt(0))
1330- if ((eW == eW))
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))
13311319 then {
1332- let hw = eX(0, 0, 0)
1333- let gn = hw._1
1334- let eO = hw._2
1335- let go = fb(eW, eO)
1336- if ((go == go))
1337- then (dG ++ gn)
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)
13381326 else throw("Strict value is not equal to itself.")
13391327 }
13401328 else throw("Strict value is not equal to itself.")
13421330
13431331
13441332
1345-@Callable(cU)
1333+@Callable(cP)
13461334 func get () = {
1347- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1348- if ((eW == eW))
1335+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1336+ if ((eR == eR))
13491337 then {
1350- let ec = fo(cU)
1351- let hx = ec._1
1352- let dF = ec._2
1353- let dQ = ec._3
1354- let dk = ec._4
1355- let dG = ec._5
1356- let eD = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1357- if ((eD == eD))
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))
13581346 then {
1359- let hy = eX(-(hx), -(dF), 0)
1360- let gn = hy._1
1361- let eO = hy._2
1362- let go = fb(eW, eO)
1363- if ((go == go))
1364- then (dG ++ gn)
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)
13651353 else throw("Strict value is not equal to itself.")
13661354 }
13671355 else throw("Strict value is not equal to itself.")
13711359
13721360
13731361
1374-@Callable(cU)
1375-func getOneTknV2 (fQ,fR) = {
1376- let hn = {
1377- let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1378- if ($isInstanceOf(aX, "Boolean"))
1379- then aX
1380- else throw(($getType(aX) + " 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"))
13811369 }
1382- let hz = if (if (ba())
1370+ let ht = if (if (aV())
13831371 then true
1384- else (bp == s))
1372+ else (bk == s))
13851373 then true
1386- else hn
1387- let gN = [if (if (!(hz))
1374+ else hh
1375+ let gH = [if (if (!(ht))
13881376 then true
1389- else gt(cU))
1377+ else go(cP))
13901378 then true
1391- else aS("get operation is blocked by admin"), if ((size(cU.payments) == 1))
1379+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
13921380 then true
1393- else aS("exactly 1 payment are expected")]
1394- if ((gN == gN))
1381+ else aN("exactly 1 payment are expected")]
1382+ if ((gH == gH))
13951383 then {
1396- let hA = fP(fQ, fR, cU.payments, cU.caller, cU.originCaller, cU.transactionId)
1397- let dG = hA._1
1398- let ga = hA._2
1399- $Tuple2(dG, ga)
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)
14001388 }
14011389 else throw("Strict value is not equal to itself.")
14021390 }
14031391
14041392
14051393
1406-@Callable(cU)
1394+@Callable(cP)
14071395 func refreshDLp () = {
1408- let hB = valueOrElse(getInteger(at), 0)
1409- let hC = if (((height - hB) >= aw))
1396+ let hv = valueOrElse(getInteger(aq), 0)
1397+ let hw = if (((height - hv) >= at))
14101398 then unit
1411- else aS(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1412- if ((hC == hC))
1399+ else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1400+ if ((hw == hw))
14131401 then {
1414- let fi = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), aU("invalid dLp"))
1415- let hD = eX(0, 0, 0)
1416- let hE = hD._1
1417- let eO = hD._2
1418- let fa = if ((fi != eO))
1419- then hE
1420- else aS("nothing to refresh")
1421- $Tuple2(fa, toString(eO))
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))
14221410 }
14231411 else throw("Strict value is not equal to itself.")
14241412 }
14251413
14261414
14271415
1428-@Callable(cU)
1429-func getOneTknV2READONLY (fQ,hF) = {
1430- let do = toBase58String(value(br))
1431- let dp = toBase58String(value(bs))
1432- let dn = toBase58String(value(bq))
1433- let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
1434- let eN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dn)), "invalid lp asset").quantity)
1435- let cg = cD(cE)
1436- let cf = (cg - fraction(toBigInt(hF), cg, eN))
1437- let hG = if ((fQ == do))
1416+@Callable(cP)
1417+func getOneTknV2READONLY (fL,hz) = {
1418+ let dj = toBase58String(value(bm))
1419+ let dk = toBase58String(value(bn))
1420+ let di = toBase58String(value(bl))
1421+ let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1422+ let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1423+ let cb = cy(cz)
1424+ let ca = (cb - fraction(toBigInt(hz), cb, eI))
1425+ let hA = if ((fL == dj))
14381426 then 0
1439- else if ((fQ == dp))
1427+ else if ((fL == dk))
14401428 then 1
14411429 else throw("invalid out asset id")
1442- let hH = ex(cE, hG, cf)
1443- let gG = (cE[hG] - hH)
1444- let gH = max([0, toInt((gG - f))])
1445- let hI = cA(gH, aY)
1446- let fZ = hI._1
1447- let cC = hI._2
1448- $Tuple2(nil, $Tuple2(fZ, cC))
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))
14491437 }
14501438
14511439
14521440
1453-@Callable(cU)
1454-func getOneTknV2WithBonusREADONLY (fQ,hF) = {
1455- let do = toBase58String(value(br))
1456- let dp = toBase58String(value(bs))
1457- let dn = toBase58String(value(bq))
1458- let du = bS(do)
1459- let dw = bS(dp)
1460- let hJ = {
1461- let aX = invoke(this, "getOneTknV2READONLY", [fQ, hF], nil)
1462- if ($isInstanceOf(aX, "(Int, Int)"))
1463- then aX
1464- else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
1441+@Callable(cP)
1442+func getOneTknV2WithBonusREADONLY (fL,hz) = {
1443+ let dj = toBase58String(value(bm))
1444+ let dk = toBase58String(value(bn))
1445+ let di = toBase58String(value(bl))
1446+ let dp = bN(dj)
1447+ let dr = bN(dk)
1448+ let hD = {
1449+ let aS = invoke(this, "getOneTknV2READONLY", [fL, hz], nil)
1450+ if ($isInstanceOf(aS, "(Int, Int)"))
1451+ then aS
1452+ else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
14651453 }
1466- let fZ = hJ._1
1467- let cC = hJ._2
1468- let ec = di("", dn, hF, this)
1469- let dE = ec._1
1470- let dF = ec._2
1471- let hK = (dE + dF)
1472- let fO = if ((hK == 0))
1473- then if ((fZ == 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))
14741462 then 0
14751463 else throw("bonus calculation error")
1476- else fraction((fZ - hK), a, hK)
1477- $Tuple2(nil, $Tuple3(fZ, cC, fO))
1464+ else fraction((fU - hE), a, hE)
1465+ $Tuple2(nil, $Tuple3(fU, cx, fJ))
14781466 }
14791467
14801468
14811469
1482-@Callable(cU)
1483-func getNoLess (hL,hM) = {
1484- let ec = fo(cU)
1485- let dE = ec._1
1486- let dF = ec._2
1487- let dQ = ec._3
1488- let dk = ec._4
1489- let dG = ec._5
1490- if ((hL > dE))
1491- then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL)))
1492- else if ((hM > dF))
1493- then throw(((("Failed: " + toString(dF)) + " < ") + toString(hM)))
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)))
14941482 else {
1495- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1496- if ((eW == eW))
1483+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1484+ if ((eR == eR))
14971485 then {
1498- let hN = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1499- if ((hN == hN))
1486+ let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1487+ if ((hH == hH))
15001488 then {
1501- let hO = eX(-(dE), -(dF), 0)
1502- let gn = hO._1
1503- let eO = hO._2
1504- let go = fb(eW, eO)
1505- if ((go == go))
1506- then (dG ++ gn)
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)
15071495 else throw("Strict value is not equal to itself.")
15081496 }
15091497 else throw("Strict value is not equal to itself.")
15141502
15151503
15161504
1517-@Callable(cU)
1518-func unstakeAndGet (cB) = {
1519- let hP = if ((size(cU.payments) != 0))
1505+@Callable(cP)
1506+func unstakeAndGet (cw) = {
1507+ let hJ = if ((size(cP.payments) != 0))
15201508 then throw("No pmnts expd")
15211509 else true
1522- if ((hP == hP))
1510+ if ((hJ == hJ))
15231511 then {
1524- let hQ = bx()
1525- let hd = bq
1526- let hR = valueOrErrorMessage(addressFromString(hQ[C]), "Wr st addr")
1527- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1528- if ((eW == eW))
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))
15291517 then {
1530- let hS = invoke(hR, "unstake", [toBase58String(hd), cB], nil)
1531- if ((hS == hS))
1518+ let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil)
1519+ if ((hM == hM))
15321520 then {
1533- let ec = di(toBase58String(cU.transactionId), toBase58String(hd), cB, cU.caller)
1534- let dE = ec._1
1535- let dF = ec._2
1536- let ds = parseIntValue(ec._9)
1537- let dG = ec._10
1538- let hT = if (if (ba())
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())
15391527 then true
1540- else (ds == s))
1541- then throw(("Blocked: " + toString(ds)))
1528+ else (dn == s))
1529+ then throw(("Blocked: " + toString(dn)))
15421530 else true
1543- if ((hT == hT))
1531+ if ((hN == hN))
15441532 then {
1545- let hU = invoke(aV, "burn", [cB], [AttachedPayment(hd, cB)])
1546- if ((hU == hU))
1533+ let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)])
1534+ if ((hO == hO))
15471535 then {
1548- let hV = eX(-(dE), -(dF), 0)
1549- let gn = hV._1
1550- let eO = hV._2
1551- let go = fb(eW, eO)
1552- if ((go == go))
1553- then (dG ++ gn)
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)
15541542 else throw("Strict value is not equal to itself.")
15551543 }
15561544 else throw("Strict value is not equal to itself.")
15661554
15671555
15681556
1569-@Callable(cU)
1570-func unstakeAndGetNoLess (hW,hX,hM) = {
1571- let hz = if (ba())
1557+@Callable(cP)
1558+func unstakeAndGetNoLess (hQ,hR,hG) = {
1559+ let ht = if (aV())
15721560 then true
1573- else (bp == s)
1574- let gN = [if (!(hz))
1561+ else (bk == s)
1562+ let gH = [if (!(ht))
15751563 then true
1576- else throw("get operation is blocked by admin"), if ((size(cU.payments) == 0))
1564+ else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
15771565 then true
15781566 else throw("no payments are expected")]
1579- if ((gN == gN))
1567+ if ((gH == gH))
15801568 then {
1581- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1582- if ((eW == eW))
1569+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1570+ if ((eR == eR))
15831571 then {
1584- let hS = invoke(bz, "unstake", [toBase58String(bq), hW], nil)
1585- if ((hS == hS))
1572+ let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil)
1573+ if ((hM == hM))
15861574 then {
1587- let hY = di(toBase58String(cU.transactionId), toBase58String(bq), hW, cU.caller)
1588- let dE = hY._1
1589- let dF = hY._2
1590- let dG = hY._10
1591- let hZ = [if ((dE >= hX))
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))
15921580 then true
1593- else throw(makeString(["amount asset amount to receive is less than ", toString(hX)], "")), if ((dF >= hM))
1581+ else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG))
15941582 then true
1595- else throw(makeString(["price asset amount to receive is less than ", toString(hM)], ""))]
1596- if ((hZ == hZ))
1583+ else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1584+ if ((hT == hT))
15971585 then {
1598- let hN = invoke(aV, "burn", [hW], [AttachedPayment(bq, hW)])
1599- if ((hN == hN))
1586+ let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)])
1587+ if ((hH == hH))
16001588 then {
1601- let ia = eX(-(dE), -(dF), 0)
1602- let gn = ia._1
1603- let eO = ia._2
1604- let go = fb(eW, eO)
1605- if ((go == go))
1606- then (dG ++ gn)
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)
16071595 else throw("Strict value is not equal to itself.")
16081596 }
16091597 else throw("Strict value is not equal to itself.")
16191607
16201608
16211609
1622-@Callable(cU)
1623-func unstakeAndGetOneTknV2 (hW,fQ,fR) = {
1624- let hn = {
1625- let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1626- if ($isInstanceOf(aX, "Boolean"))
1627- then aX
1628- else throw(($getType(aX) + " 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"))
16291617 }
1630- let hz = if (if (ba())
1618+ let ht = if (if (aV())
16311619 then true
1632- else (bp == s))
1620+ else (bk == s))
16331621 then true
1634- else hn
1635- let gN = [if (if (!(hz))
1622+ else hh
1623+ let gH = [if (if (!(ht))
16361624 then true
1637- else gt(cU))
1625+ else go(cP))
16381626 then true
1639- else aS("get operation is blocked by admin"), if ((size(cU.payments) == 0))
1627+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
16401628 then true
1641- else aS("no payments are expected")]
1642- if ((gN == gN))
1629+ else aN("no payments are expected")]
1630+ if ((gH == gH))
16431631 then {
1644- let hQ = bx()
1645- let hd = bq
1646- let hR = valueOrErrorMessage(addressFromString(hQ[C]), "Wr st addr")
1647- let dm = cU.caller
1648- let ib = this
1649- let hS = invoke(hR, "unstakeINTERNAL", [hd, hW, dm.bytes, ib.bytes], nil)
1650- if ((hS == hS))
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))
16511639 then {
1652- let ic = fP(fQ, fR, [AttachedPayment(hd, hW)], cU.caller, cU.originCaller, cU.transactionId)
1653- let dG = ic._1
1654- let ga = ic._2
1655- $Tuple2(dG, ga)
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)
16561644 }
16571645 else throw("Strict value is not equal to itself.")
16581646 }
16611649
16621650
16631651
1664-@Callable(cU)
1665-func putOneTknV2WithBonusREADONLY (id,ie) = {
1666- let if = fu(id, ie, "", "", true)
1667- let fJ = if._1
1668- let dG = if._2
1669- let cC = if._3
1670- let fO = if._4
1671- $Tuple2(nil, $Tuple3(fJ, cC, fO))
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))
16721660 }
16731661
16741662
16751663
1676-@Callable(cU)
1677-func putOneTknV2WithoutTakeFeeREADONLY (id,ie) = {
1678- let ig = fu(id, ie, "", "", false)
1679- let fJ = ig._1
1680- let dG = ig._2
1681- let cC = ig._3
1682- let fO = ig._4
1683- $Tuple2(nil, $Tuple3(fJ, cC, fO))
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))
16841672 }
16851673
16861674
16871675
1688-@Callable(cU)
1689-func activate (ih,ii) = if ((toString(cU.caller) != toString(aV)))
1676+@Callable(cP)
1677+func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ)))
16901678 then throw("denied")
1691- else $Tuple2([StringEntry(aj(), ih), StringEntry(ak(), ii)], "success")
1679+ else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
16921680
16931681
16941682
1695-@Callable(cU)
1696-func setS (ij,hT) = if ((toString(cU.caller) != aO(this, ao())))
1697- then gs
1698- else [StringEntry(ij, hT)]
1683+@Callable(cP)
1684+func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1685+ then gn
1686+ else [StringEntry(id, hN)]
16991687
17001688
17011689
1702-@Callable(cU)
1703-func setI (ij,hT) = if ((toString(cU.caller) != aO(this, ao())))
1704- then gs
1705- else [IntegerEntry(ij, hT)]
1690+@Callable(cP)
1691+func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1692+ then gn
1693+ else [IntegerEntry(id, hN)]
17061694
17071695
17081696
1709-@Callable(cU)
1710-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bd())
1697+@Callable(cP)
1698+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
17111699
17121700
17131701
1714-@Callable(cU)
1715-func getAccBalanceWrapperREADONLY (bT) = $Tuple2(nil, bS(bT))
1702+@Callable(cP)
1703+func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
17161704
17171705
17181706
1719-@Callable(cU)
1720-func calcPricesWrapperREADONLY (cm,cn,cr) = {
1721- let ik = cq(cm, cn, cr)
1722- $Tuple2(nil, [toString(ik[0]), toString(ik[1]), toString(ik[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])])
17231711 }
17241712
17251713
17261714
1727-@Callable(cU)
1728-func fromX18WrapperREADONLY (M,il) = $Tuple2(nil, L(parseBigIntValue(M), il))
1715+@Callable(cP)
1716+func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if))
17291717
17301718
17311719
1732-@Callable(cU)
1720+@Callable(cP)
17331721 func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
17341722
17351723
17361724
1737-@Callable(cU)
1738-func calcPriceBigIntWrapperREADONLY (bV,bW) = $Tuple2(nil, toString(bU(parseBigIntValue(bV), parseBigIntValue(bW))))
1725+@Callable(cP)
1726+func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
17391727
17401728
17411729
1742-@Callable(cU)
1743-func estimatePutOperationWrapperREADONLY (dj,cb,dI,dJ,dK,dL,im,dM,dN) = $Tuple2(nil, dH(dj, cb, dI, dJ, dK, dL, im, dM, dN, 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, ""))
17441732
17451733
17461734
1747-@Callable(cU)
1748-func estimateGetOperationWrapperREADONLY (dj,in,dl,im) = {
1749- let ec = di(dj, in, dl, addressFromStringValue(im))
1750- $Tuple2(nil, $Tuple10(ec._1, ec._2, ec._3, ec._4, ec._5, ec._6, ec._7, toString(ec._8), ec._9, ec._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))
17511739 }
17521740
17531741
1754-
1755-@Callable(cU)
1756-func changeAmp () = {
1757- let io = invoke(aV, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1758- let ip = {
1759- let gq = io
1760- if ($isInstanceOf(gq, "List[Any]"))
1742+@Verifier(ii)
1743+func ij () = {
1744+ let ik = {
1745+ let gl = gk()
1746+ if ($isInstanceOf(gl, "ByteVector"))
17611747 then {
1762- let iq = gq
1763- $Tuple3({
1764- let aX = iq[0]
1765- if ($isInstanceOf(aX, "Int"))
1766- then aX
1767- else throw(($getType(aX) + " couldn't be cast to Int"))
1768- }, {
1769- let aX = iq[1]
1770- if ($isInstanceOf(aX, "Int"))
1771- then aX
1772- else throw(($getType(aX) + " couldn't be cast to Int"))
1773- }, {
1774- let aX = iq[2]
1775- if ($isInstanceOf(aX, "Int"))
1776- then aX
1777- else throw(($getType(aX) + " couldn't be cast to Int"))
1778- })
1748+ let gp = gl
1749+ gp
17791750 }
1780- else throw("invalid entry type")
1781- }
1782- let ir = ip._1
1783- let is = ip._2
1784- let it = ip._3
1785- let iu = parseIntValue(getStringValue(al()))
1786- let iv = (iu + is)
1787- let iw = if ((0 > is))
1788- then if ((it > iv))
1789- then it
1790- else iv
1791- else if ((iv > it))
1792- then it
1793- else iv
1794- let ix = valueOrElse(getInteger(ap()), 0)
1795- let iy = (ix + ir)
1796- let gN = [if ((height > iy))
1797- then true
1798- else aS("try again in few blocks"), if ((iu != iw))
1799- then true
1800- else aS("already reached target")]
1801- if ((gN == gN))
1802- then [IntegerEntry(ap(), height), StringEntry(al(), toString(iw)), StringEntry(am(height), toString(iw))]
1803- else throw("Strict value is not equal to itself.")
1804- }
1805-
1806-
1807-@Verifier(iz)
1808-func iA () = {
1809- let iB = {
1810- let gq = gp()
1811- if ($isInstanceOf(gq, "ByteVector"))
1812- then {
1813- let gu = gq
1814- gu
1815- }
1816- else if ($isInstanceOf(gq, "Unit"))
1817- then iz.senderPublicKey
1751+ else if ($isInstanceOf(gl, "Unit"))
1752+ then ii.senderPublicKey
18181753 else throw("Match error")
18191754 }
1820- let gq = iz
1821- if ($isInstanceOf(gq, "Order"))
1755+ let gl = ii
1756+ if ($isInstanceOf(gl, "Order"))
18221757 then {
1823- let fe = gq
1824- let iC = bb()
1825- let iD = if (gB())
1826- then $Tuple2(true, "")
1827- else fd(fe)
1828- let aK = iD._1
1829- let aL = iD._2
1830- let aM = sigVerify(fe.bodyBytes, fe.proofs[0], fe.senderPublicKey)
1831- let aN = sigVerify(fe.bodyBytes, fe.proofs[1], iC)
1832- if (if (if (aK)
1833- then aM
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
18341767 else false)
1835- then aN
1768+ then aI
18361769 else false)
18371770 then true
1838- else aJ(aK, aL, aM, aN)
1771+ else aE(aF, aG, aH, aI)
18391772 }
1840- else if ($isInstanceOf(gq, "SetScriptTransaction"))
1773+ else if ($isInstanceOf(gl, "SetScriptTransaction"))
18411774 then {
1842- let cH = gq
1843- if (sigVerify(iz.bodyBytes, iz.proofs[0], iB))
1775+ let cC = gl
1776+ if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
18441777 then true
18451778 else {
1846- let iE = blake2b256(value(cH.script))
1847- let iF = fromBase64String(value(getString(aV, aF())))
1848- let iG = scriptHash(this)
1849- if ((iF == iE))
1850- then (iG != iE)
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)
18511784 else false
18521785 }
18531786 }
1854- else sigVerify(iz.bodyBytes, iz.proofs[0], iB)
1787+ else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
18551788 }
18561789
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
131-func am (an) = ("%s%d__amp__" + toString(an))
131+func am () = "%s__addonAddr"
132132
133133
134-func ao () = "%s__addonAddr"
134+let an = "%s__fee"
135+
136+let ao = valueOrElse(getInteger(this, an), G)
137+
138+let ap = makeString(["%s", "dLp"], n)
139+
140+let aq = makeString(["%s", "dLpRefreshedHeight"], n)
141+
142+let ar = makeString(["%s", "refreshDLpDelay"], n)
143+
144+let as = 30
145+
146+let at = valueOrElse(getInteger(this, ar), as)
147+
148+func au () = "%s__factoryConfig"
135149
136150
137-func ap () = "%s__changeAmpLastCall"
151+func av () = "%s%s__matcher__publicKey"
138152
139153
140-let aq = "%s__fee"
141-
142-let ar = valueOrElse(getInteger(this, aq), G)
143-
144-let as = makeString(["%s", "dLp"], n)
145-
146-let at = makeString(["%s", "dLpRefreshedHeight"], n)
147-
148-let au = makeString(["%s", "refreshDLpDelay"], n)
149-
150-let av = 30
151-
152-let aw = valueOrElse(getInteger(this, au), av)
153-
154-func ax () = "%s__factoryConfig"
154+func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
155155
156156
157-func ay () = "%s%s__matcher__publicKey"
157+func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
158158
159159
160-func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
160+func aB () = "%s__shutdown"
161161
162162
163-func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
163+func aC () = "%s__allowedLpStableScriptHash"
164164
165165
166-func aE () = "%s__shutdown"
166+func aD () = "%s__feeCollectorAddress"
167167
168168
169-func aF () = "%s__allowedLpStableScriptHash"
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 () = "%s__feeCollectorAddress"
172+func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
173173
174174
175-func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
175+func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
176176
177177
178-func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
178+func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
179179
180180
181-func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
181+func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
182182
183183
184-func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
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-func aS (aT) = throw(makeString(["lp_stable.ride:", aT], " "))
205+func aW () = fromBase58String(aJ(aQ, av()))
188206
189207
190-func aU (aT) = makeString(["lp_stable.ride:", aT], " ")
208+let aX = addressFromStringValue(aJ(aQ, aD()))
191209
192-
193-let aV = addressFromStringValue(aO(this, Y()))
194-
195-let aW = {
196- let aX = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
197- if ($isInstanceOf(aX, "Int"))
198- then aX
199- else throw(($getType(aX) + " couldn't be cast to Int"))
200- }
201-
202-let aY = {
203- let aX = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
204- if ($isInstanceOf(aX, "Int"))
205- then aX
206- else throw(($getType(aX) + " couldn't be cast to Int"))
207- }
208-
209-let aZ = aO(this, al())
210-
211-func ba () = valueOrElse(getBoolean(aV, aE()), false)
212-
213-
214-func bb () = fromBase58String(aO(aV, ay()))
215-
216-
217-let bc = addressFromStringValue(aO(aV, aG()))
218-
219-func bd () = {
220- let be = aO(this, aj())
221- let bf = aO(this, ak())
222- let bg = aR(aV, aC(bf))
223- let aA = aR(aV, aC(be))
224- split(aO(aV, az(toString(aA), toString(bg))), 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)
225216 }
226217
227218
228-func bh (bi) = if ((bi == k))
219+func bc (bd) = if ((bd == k))
229220 then unit
230- else fromBase58String(bi)
221+ else fromBase58String(bd)
231222
232223
233-func bj (bi) = if ((bi == unit))
224+func be (bd) = if ((bd == unit))
234225 then k
235- else toBase58String(value(bi))
226+ else toBase58String(value(bd))
236227
237228
238-func bk (bl) = $Tuple9(addressFromStringValue(bl[t]), parseIntValue(bl[u]), fromBase58String(bl[v]), bh(bl[w]), bh(bl[x]), parseIntValue(bl[y]), parseIntValue(bl[z]), fromBase58String(bl[A]), fromBase58String(bl[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]))
239230
240231
241-let bm = bk(bd())
232+let bh = bf(aY())
242233
243-let bn = bm
234+let bi = bh
244235
245-let bo = bn._1
236+let bj = bi._1
246237
247-let bp = bn._2
238+let bk = bi._2
248239
249-let bq = bn._3
240+let bl = bi._3
250241
251-let br = bn._4
242+let bm = bi._4
252243
253-let bs = bn._5
244+let bn = bi._5
254245
255-let bt = bn._6
246+let bo = bi._6
256247
257-let bu = bn._7
248+let bp = bi._7
258249
259-let bv = bn._8
250+let bq = bi._8
260251
261-let bw = bn._9
252+let br = bi._9
262253
263-func bx () = split(aO(aV, ax()), n)
254+func bs () = split(aJ(aQ, au()), n)
264255
265256
266-let by = bx()
257+let bt = bs()
267258
268-let bz = valueOrErrorMessage(addressFromString(by[C]), "Invalid staking contract address")
259+let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
269260
270-let bA = valueOrErrorMessage(addressFromString(by[E]), "Invalid slipage contract address")
261+let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
271262
272-let bB = valueOrErrorMessage(addressFromString(by[F]), "Invalid gwx contract address")
263+let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
273264
274-let bC = valueOrErrorMessage(addressFromString(by[D]), "Invalid gwx contract address")
265+let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
275266
276-func bD (bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN)], 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)
277268
278269
279-func bO (bP,bQ,bR,bH,bK,bL) = makeString(["%d%d%d%d%d%d", toString(bP), toString(bQ), toString(bR), toString(bH), toString(bK), toString(bL)], 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)
280271
281272
282-func bS (bT) = if ((bT == "WAVES"))
273+func bN (bO) = if ((bO == "WAVES"))
283274 then wavesBalance(this).available
284- else assetBalance(this, fromBase58String(bT))
275+ else assetBalance(this, fromBase58String(bO))
285276
286277
287-func bU (bV,bW) = fraction(bV, c, bW)
278+func bP (bQ,bR) = fraction(bQ, c, bR)
288279
289280
290-func bX (bV,bW,P) = fraction(bV, c, bW, P)
281+func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
291282
292283
293-func bY (bZ,ca,cb) = {
294- let cc = fraction((bZ - ca), b, ca)
295- let cd = ((cb - W(cc)) > d)
296- if (!(cd))
297- then throw(("Big slpg: " + toString(cc)))
298- else $Tuple2(cd, min([bZ, ca]))
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]))
299290 }
300291
301292
302-func ce (cf,cg,ch) = {
303- let cc = fraction(cg, b, cf)
304- let ci = (ch > cc)
305- if (if (ci)
293+func bZ (ca,cb,cc) = {
294+ let bX = fraction(cb, b, ca)
295+ let cd = (cc > bX)
296+ if (if (cd)
306297 then true
307- else (cg > cf))
308- then throw(((((((toString(cg) + " ") + toString(cf)) + " ") + toString(cc)) + " ") + toString(ch)))
309- else ci
298+ else (cb > ca))
299+ then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300+ else cd
310301 }
311302
312303
313-func cj (ck,cl,cm,cn) = {
314- let co = H(cm, ck)
315- let cp = H(cn, cl)
316- bU(cp, co)
304+func ce (cf,cg,ch,ci) = {
305+ let cj = H(ch, cf)
306+ let ck = H(ci, cg)
307+ bP(ck, cj)
317308 }
318309
319310
320-func cq (cm,cn,cr) = {
321- let cs = bt
322- let ct = bu
323- let cu = cj(cs, ct, cm, cn)
324- let bW = H(cm, cs)
325- let bV = H(cn, ct)
326- let cv = H(cr, a)
327- let cw = bU(bW, cv)
328- let cx = bU(bV, cv)
329-[cu, cw, cx]
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]
330321 }
331322
332323
333-func cy (cm,cn,cr) = {
334- let cz = cq(cm, cn, cr)
335-[L(cz[0], a), L(cz[1], a), L(cz[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)]
336327 }
337328
338329
339-func cA (cB,ar) = {
340- let cC = if ((ar == 0))
330+func cv (cw,ao) = {
331+ let cx = if ((ao == 0))
341332 then 0
342- else fraction(cB, ar, a)
343- $Tuple2((cB - cC), cC)
333+ else fraction(cw, ao, a)
334+ $Tuple2((cw - cx), cx)
344335 }
345336
346337
347-func cD (cE) = {
348- let cF = cE[0]
349- let cG = cE[1]
350- let cH = (cF + cG)
351- if ((cH == e))
338+func cy (cz) = {
339+ let cA = cz[0]
340+ let cB = cz[1]
341+ let cC = (cA + cB)
342+ if ((cC == e))
352343 then e
353344 else {
354- let cI = parseIntValue(aZ)
355- let cJ = (cI * 2)
356- let cz = fraction(cF, cG, f)
357- let cK = fraction(cz, i, f)
358- let cL = fraction(toBigInt(cJ), cH, f)
359- let cM = toBigInt((cJ - 1))
360- func cN (cO) = {
361- let cP = fraction(cO, cO, f)
362- let cQ = fraction(cP, cO, f)
363- let cR = fraction(cQ, f, cK)
364- fraction((cL + fraction(cR, g, f)), cO, (fraction(cM, cO, f) + fraction(h, cR, 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)))
365356 }
366357
367- func cS (cT,cU) = if (cT._2)
368- then cT
358+ func cN (cO,cP) = if (cO._2)
359+ then cO
369360 else {
370- let cO = cT._1
371- let cV = cN(cO)
372- let cW = (cV - value(cO))
373- let cX = if ((e > cW))
374- then -(cW)
375- else cW
376- if ((f >= cX))
377- then $Tuple2(cV, true)
378- else $Tuple2(cV, 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)
379370 }
380371
381- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
382- let cZ = {
383- let da = cY
384- let db = size(da)
385- let dc = $Tuple2(cH, false)
386- func dd (de,df) = if ((df >= db))
387- then de
388- else cS(de, da[df])
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])
389380
390- func dg (de,df) = if ((df >= db))
391- then de
392- else throw("List size exceeds 17")
381+ func db (cZ,da) = if ((da >= cW))
382+ then cZ
383+ else throw("List size exceeds 18")
393384
394- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 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)
395386 }
396- let cO = cZ._1
397- let dh = cZ._2
398- if (dh)
399- then cO
400- else throw(("D calculation error, D = " + toString(cO)))
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)))
401392 }
402393 }
403394
404395
405-func di (dj,dk,dl,dm) = {
406- let dn = bq
407- let do = toBase58String(value(br))
408- let dp = toBase58String(value(bs))
409- let dq = bt
410- let dr = bu
411- let ds = toString(bp)
412- let dt = valueOrErrorMessage(assetInfo(dn), "Wrong LP id").quantity
413- if ((toBase58String(dn) != dk))
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))
414405 then throw("Wrong pmt asset")
415406 else {
416- let du = bS(do)
417- let dv = H(du, dq)
418- let dw = bS(dp)
419- let dx = H(dw, dr)
420- let dy = bU(dx, dv)
421- let dz = L(dy, a)
422- let dA = H(dl, a)
423- let dB = H(dt, a)
424- let dC = fraction(dv, dA, dB)
425- let dD = fraction(dx, dA, dB)
426- let dE = O(dC, dq, FLOOR)
427- let dF = O(dD, dr, FLOOR)
428- let dG = if ((dj == ""))
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 == ""))
429420 then nil
430- else [ScriptTransfer(dm, dE, if ((do == "WAVES"))
421+ else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
431422 then unit
432- else fromBase58String(do)), ScriptTransfer(dm, dF, if ((dp == "WAVES"))
423+ else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
433424 then unit
434- else fromBase58String(dp)), StringEntry(ai(toString(dm), dj), bO(dE, dF, dl, dz, height, lastBlock.timestamp)), IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz)]
435- $Tuple10(dE, dF, do, dp, du, dw, dt, dy, ds, dG)
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)
436427 }
437428 }
438429
439430
440-func dH (dj,cb,dI,dJ,dK,dL,dm,dM,dN,dO,dP,dQ,dR) = {
441- let dn = bq
442- let dS = toBase58String(value(br))
443- let dT = toBase58String(value(bs))
444- let dU = bv
445- let dV = bw
446- let dW = bt
447- let dX = bu
448- let ds = toString(bp)
449- let dY = valueOrErrorMessage(assetInfo(dn), "Wr lp as").quantity
450- let du = if (dM)
451- then bS(dS)
452- else if (if (dO)
453- then (dR == dS)
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)
454445 else false)
455- then (bS(dS) - dQ)
456- else if (dO)
457- then bS(dS)
458- else (bS(dS) - dI)
459- let dw = if (dM)
460- then bS(dT)
461- else if (if (dO)
462- then (dR == dT)
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)
463454 else false)
464- then (bS(dT) - dQ)
465- else if (dO)
466- then bS(dT)
467- else (bS(dT) - dK)
468- let dZ = H(dI, dW)
469- let ea = H(dK, dX)
470- let eb = bU(ea, dZ)
471- let dv = H(du, dW)
472- let dx = H(dw, dX)
473- let cg = cD([dv, dx])
474- let ec = if ((dY == 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))
475466 then {
476- let cf = cD([(dv + dZ), (dx + ea)])
477- let ed = if ((cf > cg))
467+ let ca = cy([(dq + dU), (ds + dV)])
468+ let dY = if ((ca > cb))
478469 then true
479470 else throw("D1 should be greater than D0")
480- if ((ed == ed))
471+ if ((dY == dY))
481472 then {
482- let dy = d
483- let ee = d
484- let cv = cf
485- $Tuple5(L(cv, a), L(dZ, dW), L(ea, dX), bU((dx + ea), (dv + dZ)), ee)
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)
486477 }
487478 else throw("Strict value is not equal to itself.")
488479 }
489480 else {
490- let dy = bU(dx, dv)
491- let ef = fraction(W((dy - eb)), c, dy)
492- let ee = H(cb, a)
493- if (if (if (dP)
494- then (dy != 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)
495486 else false)
496- then (ef > ee)
487+ then (ea > dZ)
497488 else false)
498- then throw(((("Price slippage " + toString(ef)) + " > ") + toString(ee)))
489+ then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
499490 else {
500- let eg = H(dY, a)
501- let eh = fraction(dZ, bX(dx, dv, CEILING), c, CEILING)
502- let ei = fraction(ea, c, bX(dx, dv, FLOOR), CEILING)
503- let ej = if ((eh > ea))
504- then $Tuple2(ei, ea)
505- else $Tuple2(dZ, eh)
506- let ek = ej._1
507- let el = ej._2
508- let cf = cD([(dv + ek), (dx + el)])
509- let ed = if ((cf > cg))
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))
510501 then true
511502 else throw("D1 should be greater than D0")
512- if ((ed == ed))
503+ if ((dY == dY))
513504 then {
514- let cv = fraction(eg, (cf - cg), cg)
515- $Tuple5(O(cv, a, FLOOR), O(ek, dW, CEILING), O(el, dX, CEILING), dy, ee)
505+ let cq = fraction(eb, (ca - cb), cb)
506+ $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ)
516507 }
517508 else throw("Strict value is not equal to itself.")
518509 }
519510 }
520- let em = ec._1
521- let en = ec._2
522- let eo = ec._3
523- let dz = L(ec._4, a)
524- let ep = L(ec._5, a)
525- if ((0 >= em))
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))
526517 then throw("LP <= 0")
527518 else {
528- let eq = if (!(dN))
519+ let el = if (!(dI))
529520 then 0
530- else em
531- let er = (dI - en)
532- let es = (dK - eo)
533- let et = if (if (dO)
534- then (dR == dS)
521+ else eh
522+ let em = (dD - ei)
523+ let en = (dF - ej)
524+ let eo = if (if (dJ)
525+ then (dM == dN)
535526 else false)
536- then $Tuple2(dQ, 0)
537- else if (if (dO)
538- then (dR == dT)
527+ then $Tuple2(dL, 0)
528+ else if (if (dJ)
529+ then (dM == dO)
539530 else false)
540- then $Tuple2(0, dQ)
541- else $Tuple2(en, eo)
542- let eu = et._1
543- let ev = et._2
544- let ew = [IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz), StringEntry(af(dm, dj), bD(eu, ev, eq, dz, cb, ep, height, lastBlock.timestamp, er, es))]
545- $Tuple13(em, eq, dz, du, dw, dY, dn, ds, ew, er, es, dJ, dL)
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)
546537 }
547538 }
548539
549540
550-func ex (cE,cU,ey) = {
551- let ez = g
552- let eA = cE[if ((cU == 0))
541+func es (cz,cP,et) = {
542+ let eu = g
543+ let ev = cz[if ((cP == 0))
553544 then 1
554545 else 0]
555- let eB = parseBigIntValue(l)
556- let cI = (parseBigIntValue(aZ) * eB)
557- let cH = eA
558- let cJ = (cI * ez)
559- let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
560- let eD = ((cH + ((ey * eB) / cJ)) - ey)
561- func cS (cT,eE) = {
562- let eF = cT
563- let eG = eF._1
564- let dh = eF._2
565- if ((dh != unit))
566- then cT
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
567558 else {
568- let eH = (((eG * eG) + eC) / ((g * eG) + eD))
569- let eI = X((eH - value(eG)))
570- if ((f >= eI))
571- then $Tuple2(eH, eE)
572- else $Tuple2(eH, 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)
573564 }
574565 }
575566
576- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
577- let eJ = {
578- let da = cY
579- let db = size(da)
580- let dc = $Tuple2(ey, unit)
581- func dd (de,df) = if ((df >= db))
582- then de
583- else cS(de, da[df])
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])
584575
585- func dg (de,df) = if ((df >= db))
586- then de
576+ func db (cZ,da) = if ((da >= cW))
577+ then cZ
587578 else throw("List size exceeds 15")
588579
589- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 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)
590581 }
591- let eG = eJ._1
592- let dh = eJ._2
593- if ((dh != unit))
594- then eG
595- else throw(("Y calculation error, Y = " + toString(eG)))
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)))
587+ }
588+
589+
590+func eF (eG,eH,eI) = {
591+ let eJ = fraction(cy([K(eG, toBigInt(bo)), K(eH, toBigInt(bp))]), c, eI)
592+ if ((eI == e))
593+ then e
594+ else eJ
596595 }
597596
598597
599598 func eK (eL,eM,eN) = {
600- let eO = fraction(cD([K(eL, toBigInt(bt)), K(eM, toBigInt(bu))]), c, eN)
601- if ((eN == e))
602- then e
603- else eO
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
604604 }
605605
606606
607-func eP (eQ,eR,eS) = {
608- let eT = (toBigInt(bS(bj(br))) - eQ)
609- let eU = (toBigInt(bS(bj(bs))) - eR)
610- let eV = (toBigInt(value(assetInfo(bq)).quantity) - eS)
611- let eW = eK(eT, eU, eV)
612- eW
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)
613614 }
614615
615616
616-func eX (eY,eZ,eS) = {
617- let eT = (bS(bj(br)) + eY)
618- let eU = (bS(bj(bs)) + eZ)
619- let eV = (value(assetInfo(bq)).quantity + eS)
620- let eO = eK(toBigInt(eT), toBigInt(eU), toBigInt(eV))
621- let fa = [IntegerEntry(at, height), StringEntry(as, toString(eO))]
622- $Tuple2(fa, eO)
623- }
617+func eW (eX,eJ) = if ((eJ >= eX))
618+ then true
619+ else aN("updated DLp lower than current DLp")
624620
625621
626-func fb (fc,eO) = if ((eO >= fc))
627- then true
628- else aS("updated DLp lower than current DLp")
629-
630-
631-func fd (fe) = {
632- let eT = bS(bj(br))
633- let eU = bS(bj(bs))
634- let ff = fe.amount
635- let fg = fraction(fe.amount, fe.price, a, FLOOR)
636- let fh = if ((fe.orderType == Buy))
637- then $Tuple2(ff, -(fg))
638- else $Tuple2(-(ff), fg)
639- let eY = fh._1
640- let eZ = fh._2
641- if (if (if (ba())
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())
642633 then true
643- else (bp == r))
634+ else (bk == r))
644635 then true
645- else (bp == s))
636+ else (bk == s))
646637 then throw("Admin blocked")
647- else if (if ((fe.assetPair.amountAsset != br))
638+ else if (if ((eZ.assetPair.amountAsset != bm))
648639 then true
649- else (fe.assetPair.priceAsset != bs))
640+ else (eZ.assetPair.priceAsset != bn))
650641 then throw("Wr assets")
651642 else {
652- let fi = parseBigIntValue(valueOrElse(getString(this, as), "0"))
653- let fj = eX(eY, eZ, 0)
654- let fk = fj._1
655- let fl = fj._2
656- let fm = (fl >= fi)
657- let fn = makeString(["dLp=", toString(fi), " dLpNew=", toString(fl), " amountAssetBalance=", toString(eT), " priceAssetBalance=", toString(eU), " amountAssetBalanceDelta=", toString(eY), " priceAssetBalanceDelta=", toString(eZ), " height=", toString(height)], "")
658- $Tuple2(fm, fn)
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)
659650 }
660651 }
661652
662653
663-func fo (cU) = if ((size(cU.payments) != 1))
654+func fj (cP) = if ((size(cP.payments) != 1))
664655 then throw("1 pmnt exp")
665656 else {
666- let fp = value(cU.payments[0])
667- let dk = value(fp.assetId)
668- let dQ = fp.amount
669- let ec = di(toBase58String(cU.transactionId), toBase58String(dk), dQ, cU.caller)
670- let dE = ec._1
671- let dF = ec._2
672- let ds = parseIntValue(ec._9)
673- let dG = ec._10
674- if (if (ba())
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())
675666 then true
676- else (ds == s))
677- then throw(("Admin blocked: " + toString(ds)))
678- else $Tuple5(dE, dF, dQ, dk, dG)
667+ else (dn == s))
668+ then throw(("Admin blocked: " + toString(dn)))
669+ else $Tuple5(dz, dA, dL, df, dB)
679670 }
680671
681672
682-func fq (fr,ah,fs,ft,cb,dN,dO,dP,dQ,dR) = {
683- let ec = dH(ah, cb, value(fs).amount, value(fs).assetId, value(ft).amount, value(ft).assetId, fr, (ah == ""), dN, dO, dP, dQ, dR)
684- let ds = parseIntValue(ec._8)
685- if (if (if (ba())
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())
686677 then true
687- else (ds == q))
678+ else (dn == q))
688679 then true
689- else (ds == s))
690- then throw(("Blocked:" + toString(ds)))
691- else ec
680+ else (dn == s))
681+ then throw(("Blocked:" + toString(dn)))
682+ else dX
692683 }
693684
694685
695-func fu (fv,dk,dm,ah,fw) = {
696- let do = toBase58String(value(br))
697- let dp = toBase58String(value(bs))
698- let dn = bq
699- let dW = bt
700- let dX = bu
701- let eV = toBigInt(valueOrErrorMessage(assetInfo(dn), "invalid lp asset").quantity)
702- let fx = if ((eV > 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))
703694 then true
704695 else throw("initial deposit requires all coins")
705- if ((fx == fx))
696+ if ((fs == fs))
706697 then {
707- let du = bS(do)
708- let dw = bS(dp)
709- let fy = if ((ah == ""))
710- then $Tuple2(du, dw)
711- else if ((dk == do))
712- then if ((fv > du))
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))
713704 then throw("invalid payment amount")
714- else $Tuple2((du - fv), dw)
715- else if ((dk == dp))
716- then if ((fv > dw))
705+ else $Tuple2((dp - fq), dr)
706+ else if ((df == dk))
707+ then if ((fq > dr))
717708 then throw("invalid payment amount")
718- else $Tuple2(du, (dw - fv))
709+ else $Tuple2(dp, (dr - fq))
719710 else throw("wrong pmtAssetId")
720- let fz = fy._1
721- let fA = fy._2
722- let fB = if ((dk == do))
723- then $Tuple2(fv, 0)
724- else if ((dk == dp))
725- then $Tuple2(0, fv)
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)
726717 else throw("invalid payment")
727- let fC = fB._1
728- let fD = fB._2
729- let fE = if (fw)
730- then $Tuple3(cA(fC, aW)._1, cA(fD, aW)._1, cA(fv, aW)._2)
731- else $Tuple3(fC, fD, 0)
732- let fF = fE._1
733- let fG = fE._2
734- let cC = fE._3
735- let fH = (fz + fF)
736- let fI = (fA + fG)
737- let cg = cD([H(fz, bt), H(fA, bu)])
738- let cf = cD([H(fH, bt), H(fI, bu)])
739- let ed = if ((cf > cg))
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))
740731 then true
741732 else throw()
742- if ((ed == ed))
733+ if ((dY == dY))
743734 then {
744- let fJ = fraction(eV, (cf - cg), cg, FLOOR)
745- let dz = L(bU(H(fI, dX), H(fH, dW)), a)
746- let ew = [IntegerEntry(ab(), dz), IntegerEntry(ac(height, lastBlock.timestamp), dz), StringEntry(af(dm, ah), bD(fC, fD, toInt(fJ), dz, 0, 0, height, lastBlock.timestamp, 0, 0))]
747- let fK = fraction(fA, a, fz)
748- let fL = fraction(fv, a, (fK + a))
749- let fM = (fv - fL)
750- let fN = fraction(eV, toBigInt(fM), toBigInt(fA))
751- let fO = toInt(fraction((fJ - fN), b, fN))
752- $Tuple4(toInt(fJ), ew, cC, fO)
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)
753744 }
754745 else throw("Strict value is not equal to itself.")
755746 }
756747 else throw("Strict value is not equal to itself.")
757748 }
758749
759750
760-func fP (fQ,fR,fS,fr,fT,fU) = {
761- let dn = toBase58String(value(bq))
762- let do = toBase58String(value(br))
763- let dp = toBase58String(value(bs))
764- let fV = bt
765- let fW = bu
766- let fX = bp
767- let dm = if ((fr == bC))
768- then fT
769- else fr
770- let fp = value(fS[0])
771- let dk = value(fp.assetId)
772- let dQ = fp.amount
773- let eW = eP(e, e, e)
774- if ((eW == eW))
751+func fK (fL,fM,fN,fm,fO,fP) = {
752+ let di = toBase58String(value(bl))
753+ let dj = toBase58String(value(bm))
754+ let dk = toBase58String(value(bn))
755+ let fQ = bo
756+ let fR = bp
757+ let fS = bk
758+ let dh = if ((fm == bx))
759+ then fO
760+ else fm
761+ let fk = value(fN[0])
762+ let df = value(fk.assetId)
763+ let dL = fk.amount
764+ let eR = eK(e, e, e)
765+ if ((eR == eR))
775766 then {
776- let dj = toBase58String(fU)
777- if ((dn != toBase58String(dk)))
767+ let de = toBase58String(fP)
768+ if ((di != toBase58String(df)))
778769 then throw("Wrong LP")
779770 else {
780- let du = bS(do)
781- let dw = bS(dp)
782- let fY = {
783- let aX = invoke(this, "getOneTknV2READONLY", [fQ, dQ], nil)
784- if ($isInstanceOf(aX, "(Int, Int)"))
785- then aX
786- else throw(($getType(aX) + " 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)"))
787778 }
788- if ((fY == fY))
779+ if ((fT == fT))
789780 then {
790- let cC = fY._2
791- let fZ = fY._1
792- let ga = if (if ((fR > 0))
793- then (fR > fZ)
781+ let cx = fT._2
782+ let fU = fT._1
783+ let fV = if (if ((fM > 0))
784+ then (fM > fU)
794785 else false)
795- then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
796- else fZ
797- let gb = if ((fQ == do))
798- then $Tuple4(ga, 0, ((du - ga) - cC), dw)
799- else if ((fQ == dp))
800- then $Tuple4(0, ga, du, ((dw - ga) - cC))
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))
801792 else throw("invalid out asset id")
802- let gc = gb._1
803- let gd = gb._2
804- let fH = gb._3
805- let fI = gb._4
806- let ge = bU(H(fI, fW), H(fH, fV))
807- let gf = L(ge, a)
808- let gg = if ((fQ == "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"))
809800 then unit
810- else fromBase58String(fQ)
811- let gh = if ((cC > 0))
812- then [ScriptTransfer(bc, cC, gg)]
801+ else fromBase58String(fL)
802+ let gc = if ((cx > 0))
803+ then [ScriptTransfer(aX, cx, gb)]
813804 else nil
814- let dG = ([ScriptTransfer(dm, ga, gg), StringEntry(ai(toString(dm), dj), bO(gc, gd, dQ, gf, height, lastBlock.timestamp)), IntegerEntry(ab(), gf), IntegerEntry(ac(height, lastBlock.timestamp), gf)] ++ gh)
815- if ((dG == dG))
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))
816807 then {
817- let gi = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
818- if ((gi == gi))
808+ let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809+ if ((gd == gd))
819810 then {
820- let gj = {
821- let gk = if ((this == bc))
811+ let ge = {
812+ let gf = if ((this == aX))
822813 then 0
823- else cC
824- let gl = if ((bh(fQ) == br))
814+ else cx
815+ let gg = if ((bc(fL) == bm))
825816 then true
826817 else false
827- if (gl)
828- then $Tuple2(-((fZ + gk)), 0)
829- else $Tuple2(0, -((fZ + gk)))
818+ if (gg)
819+ then $Tuple2(-((fU + gf)), 0)
820+ else $Tuple2(0, -((fU + gf)))
830821 }
831- let eY = gj._1
832- let eZ = gj._2
833- let gm = eX(eY, eZ, 0)
834- let gn = gm._1
835- let eO = gm._2
836- let go = fb(eW, eO)
837- if ((go == go))
838- then $Tuple2((dG ++ gn), ga)
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)
839830 else throw("Strict value is not equal to itself.")
840831 }
841832 else throw("Strict value is not equal to itself.")
842833 }
843834 else throw("Strict value is not equal to itself.")
844835 }
845836 else throw("Strict value is not equal to itself.")
846837 }
847838 }
848839 else throw("Strict value is not equal to itself.")
849840 }
850841
851842
852-func gp () = {
853- let gq = getString(Z())
854- if ($isInstanceOf(gq, "String"))
843+func gk () = {
844+ let gl = getString(Z())
845+ if ($isInstanceOf(gl, "String"))
855846 then {
856- let cH = gq
857- fromBase58String(cH)
847+ let cC = gl
848+ fromBase58String(cC)
858849 }
859- else if ($isInstanceOf(gq, "Unit"))
850+ else if ($isInstanceOf(gl, "Unit"))
860851 then unit
861852 else throw("Match error")
862853 }
863854
864855
865-func gr () = {
866- let gq = getString(aa())
867- if ($isInstanceOf(gq, "String"))
856+func gm () = {
857+ let gl = getString(aa())
858+ if ($isInstanceOf(gl, "String"))
868859 then {
869- let cH = gq
870- fromBase58String(cH)
860+ let cC = gl
861+ fromBase58String(cC)
871862 }
872- else if ($isInstanceOf(gq, "Unit"))
863+ else if ($isInstanceOf(gl, "Unit"))
873864 then unit
874865 else throw("Match error")
875866 }
876867
877868
878-let gs = throw("Permission denied")
869+let gn = throw("Permission denied")
879870
880-func gt (cU) = {
881- let gq = gp()
882- if ($isInstanceOf(gq, "ByteVector"))
871+func go (cP) = {
872+ let gl = gk()
873+ if ($isInstanceOf(gl, "ByteVector"))
883874 then {
884- let gu = gq
885- (cU.callerPublicKey == gu)
875+ let gp = gl
876+ (cP.callerPublicKey == gp)
886877 }
887- else if ($isInstanceOf(gq, "Unit"))
888- then (cU.caller == this)
878+ else if ($isInstanceOf(gl, "Unit"))
879+ then (cP.caller == this)
889880 else throw("Match error")
890881 }
891882
892883
893-func gv (cU) = {
894- let gq = gp()
895- if ($isInstanceOf(gq, "ByteVector"))
884+func gq (cP) = {
885+ let gl = gk()
886+ if ($isInstanceOf(gl, "ByteVector"))
896887 then {
897- let gu = gq
898- if ((cU.callerPublicKey == gu))
888+ let gp = gl
889+ if ((cP.callerPublicKey == gp))
899890 then true
900- else gs
891+ else gn
901892 }
902- else if ($isInstanceOf(gq, "Unit"))
903- then if ((cU.caller == this))
893+ else if ($isInstanceOf(gl, "Unit"))
894+ then if ((cP.caller == this))
904895 then true
905- else gs
896+ else gn
906897 else throw("Match error")
907898 }
908899
909900
910-func gw (gx,ey,gy) = {
911- let bl = bd()
912- let do = bl[w]
913- let dp = bl[x]
914- let ez = g
915- let eB = parseBigIntValue(l)
916- let cI = (parseBigIntValue(aZ) * eB)
917- let cE = if ((gx == false))
918- then [(toBigInt(bS(do)) + gy), toBigInt(bS(dp))]
919- else [(toBigInt(bS(dp)) + gy), toBigInt(bS(do))]
920- let eA = cE[0]
921- let cH = eA
922- let cJ = (cI * ez)
923- let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
924- let eD = ((cH + ((ey * eB) / cJ)) - ey)
925- func cS (cT,eE) = {
926- let gz = cT
927- let eG = gz._1
928- let dh = gz._2
929- if ((dh != unit))
930- then cT
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
931922 else {
932- let eH = (((eG * eG) + eC) / ((g * eG) + eD))
933- let eI = X((eH - value(eG)))
934- if ((f >= eI))
935- then $Tuple2(eH, eE)
936- else $Tuple2(eH, 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)
937928 }
938929 }
939930
940- let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
941- let gA = {
942- let da = cY
943- let db = size(da)
944- let dc = $Tuple2(ey, unit)
945- func dd (de,df) = if ((df >= db))
946- then de
947- else cS(de, da[df])
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])
948939
949- func dg (de,df) = if ((df >= db))
950- then de
940+ func db (cZ,da) = if ((da >= cW))
941+ then cZ
951942 else throw("List size exceeds 15")
952943
953- dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 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)
954945 }
955- let eG = gA._1
956- let dh = gA._2
957- if ((dh != unit))
958- then eG
959- else throw(("Y calculation error, Y = " + toString(eG)))
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)))
960951 }
961952
962953
963-func gB () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
964-
965-
966-@Callable(cU)
967-func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
968- let gE = if ((gx == false))
954+@Callable(cP)
955+func calculateAmountOutForSwapREADONLY (gw,gs,gx) = {
956+ let gy = if ((gs == false))
969957 then {
970- let gF = aO(this, ak())
971- let gy = (toBigInt(bS(aO(this, aj()))) + toBigInt(gC))
972- $Tuple2(gF, gy)
958+ let gz = aJ(this, ak())
959+ let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960+ $Tuple2(gz, gt)
973961 }
974962 else {
975- let gF = aO(this, aj())
976- let gy = (toBigInt(bS(aO(this, ak()))) + toBigInt(gC))
977- $Tuple2(gF, gy)
963+ let gz = aJ(this, aj())
964+ let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965+ $Tuple2(gz, gt)
978966 }
979- let gF = gE._1
980- let gy = gE._2
981- let bl = bd()
982- let do = bl[w]
983- let dp = bl[x]
984- let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
985- let ey = cD(cE)
986- let eG = gw(gx, ey, toBigInt(gC))
987- let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
988- let gH = max([0, toInt(gG)])
989- let gI = if ((gx == false))
990- then [((toBigInt(bS(do)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
991- else [(toBigInt(bS(do)) - gG), ((toBigInt(bS(dp)) + toBigInt(gC)) + toBigInt(gD))]
992- let gJ = cD(gI)
993- let ed = if ((gJ >= ey))
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))
994982 then true
995- else throw(makeString(["new D is fewer error", toString(ey), toString(gJ)], "__"))
996- if ((ed == ed))
997- then $Tuple2(nil, gH)
983+ else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__"))
984+ if ((dY == dY))
985+ then $Tuple2(nil, gB)
998986 else throw("Strict value is not equal to itself.")
999987 }
1000988
1001989
1002990
1003-@Callable(cU)
1004-func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1005- let gM = {
1006- let aX = invoke(aV, "getSwapContractREADONLY", nil, nil)
1007- if ($isInstanceOf(aX, "String"))
1008- then aX
1009- else throw(($getType(aX) + " 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"))
1010998 }
1011- let gN = [if ((value(cU.payments[0]).amount >= gC))
999+ let gH = [if ((value(cP.payments[0]).amount >= gw))
10121000 then true
1013- else aS("Wrong amount"), if ((cU.caller == addressFromStringValue(gM)))
1001+ else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG)))
10141002 then true
1015- else aS("Permission denied")]
1016- if ((gN == gN))
1003+ else aN("Permission denied")]
1004+ if ((gH == gH))
10171005 then {
1018- let fp = value(cU.payments[0])
1019- let gO = bj(fp.assetId)
1020- let gP = if ((gx == false))
1006+ let fk = value(cP.payments[0])
1007+ let gI = be(fk.assetId)
1008+ let gJ = if ((gs == false))
10211009 then {
1022- let gF = aO(this, ak())
1023- let gy = (bS(gO) - value(cU.payments[0]).amount)
1024- $Tuple2(gF, gy)
1010+ let gz = aJ(this, ak())
1011+ let gt = (bN(gI) - value(cP.payments[0]).amount)
1012+ $Tuple2(gz, gt)
10251013 }
10261014 else {
1027- let gF = aO(this, aj())
1028- let gy = (bS(gO) - value(cU.payments[0]).amount)
1029- $Tuple2(gF, gy)
1015+ let gz = aJ(this, aj())
1016+ let gt = (bN(gI) - value(cP.payments[0]).amount)
1017+ $Tuple2(gz, gt)
10301018 }
1031- let gF = gP._1
1032- let gy = gP._2
1033- let bl = bd()
1034- let do = bl[w]
1035- let dp = bl[x]
1036- let cE = if ((gx == false))
1037- then [(toBigInt(bS(do)) - toBigInt(value(cU.payments[0]).amount)), toBigInt(bS(dp))]
1038- else [toBigInt(bS(do)), (toBigInt(bS(dp)) - toBigInt(value(cU.payments[0]).amount))]
1039- let ey = cD(cE)
1040- let eG = gw(gx, ey, toBigInt(0))
1041- let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
1042- let gH = max([0, toInt(gG)])
1043- let gQ = if ((gH >= gK))
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))
10441032 then true
10451033 else throw("Exchange result is fewer coins than expected")
1046- if ((gQ == gQ))
1034+ if ((gK == gK))
10471035 then {
1048- let gI = if ((gx == false))
1049- then [(toBigInt(bS(do)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
1050- else [(toBigInt(bS(do)) - gG), (toBigInt(bS(dp)) + toBigInt(gD))]
1051- let gJ = cD(gI)
1052- let ed = if ((gJ >= ey))
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))
10531041 then true
10541042 else throw("new D is fewer error")
1055- if ((ed == ed))
1056- then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bh(gF))], gH)
1043+ if ((dY == dY))
1044+ then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB)
10571045 else throw("Strict value is not equal to itself.")
10581046 }
10591047 else throw("Strict value is not equal to itself.")
10601048 }
10611049 else throw("Strict value is not equal to itself.")
10621050 }
10631051
10641052
10651053
1066-@Callable(cU)
1054+@Callable(cP)
10671055 func constructor (Y) = {
1068- let eC = gv(cU)
1069- if ((eC == eC))
1056+ let ex = gq(cP)
1057+ if ((ex == ex))
10701058 then [StringEntry(Y(), Y)]
10711059 else throw("Strict value is not equal to itself.")
10721060 }
10731061
10741062
10751063
1076-@Callable(cU)
1077-func setManager (gR) = {
1078- let eC = gv(cU)
1079- if ((eC == eC))
1064+@Callable(cP)
1065+func setManager (gL) = {
1066+ let ex = gq(cP)
1067+ if ((ex == ex))
10801068 then {
1081- let gS = fromBase58String(gR)
1082- if ((gS == gS))
1083- then [StringEntry(aa(), gR)]
1069+ let gM = fromBase58String(gL)
1070+ if ((gM == gM))
1071+ then [StringEntry(aa(), gL)]
10841072 else throw("Strict value is not equal to itself.")
10851073 }
10861074 else throw("Strict value is not equal to itself.")
10871075 }
10881076
10891077
10901078
1091-@Callable(cU)
1079+@Callable(cP)
10921080 func confirmManager () = {
1093- let cz = gr()
1094- let gT = if (isDefined(cz))
1081+ let cu = gm()
1082+ let gN = if (isDefined(cu))
10951083 then true
10961084 else throw("No pending manager")
1097- if ((gT == gT))
1085+ if ((gN == gN))
10981086 then {
1099- let gU = if ((cU.callerPublicKey == value(cz)))
1087+ let gO = if ((cP.callerPublicKey == value(cu)))
11001088 then true
11011089 else throw("You are not pending manager")
1102- if ((gU == gU))
1103- then [StringEntry(Z(), toBase58String(value(cz))), DeleteEntry(aa())]
1090+ if ((gO == gO))
1091+ then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
11041092 else throw("Strict value is not equal to itself.")
11051093 }
11061094 else throw("Strict value is not equal to itself.")
11071095 }
11081096
11091097
11101098
1111-@Callable(cU)
1112-func put (gV,gW) = {
1113- let gX = bx()
1114- let gY = valueOrErrorMessage(addressFromString(gX[C]), "Wr st addr")
1115- let gZ = valueOrErrorMessage(addressFromString(gX[E]), "Wr sl addr")
1116- if ((0 > gV))
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))
11171105 then throw("Wrong slippage")
1118- else if ((size(cU.payments) != 2))
1106+ else if ((size(cP.payments) != 2))
11191107 then throw("2 pmnts expd")
11201108 else {
1121- let ha = toBigInt(value(cU.payments[0]).amount)
1122- let hb = toBigInt(value(cU.payments[1]).amount)
1123- let eT = (toBigInt(bS(bj(br))) - ha)
1124- if ((eT == eT))
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))
11251113 then {
1126- let eU = (toBigInt(bS(bj(bs))) - hb)
1127- if ((eU == eU))
1114+ let eP = (toBigInt(bN(be(bn))) - gV)
1115+ if ((eP == eP))
11281116 then {
1129- let eV = toBigInt(value(assetInfo(bq)).quantity)
1130- if ((eV == eV))
1117+ let eQ = toBigInt(value(assetInfo(bl)).quantity)
1118+ if ((eQ == eQ))
11311119 then {
1132- let eW = eP(ha, hb, toBigInt(0))
1133- if ((eW == eW))
1120+ let eR = eK(gU, gV, toBigInt(0))
1121+ if ((eR == eR))
11341122 then {
1135- let hc = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], gV, true, false, true, 0, "")
1136- let eq = hc._2
1137- let hd = hc._7
1138- let dG = hc._9
1139- let er = hc._10
1140- let es = hc._11
1141- let do = hc._12
1142- let dp = hc._13
1143- let ec = invoke(aV, "emit", [eq], nil)
1144- if ((ec == ec))
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))
11451133 then {
1146- let he = {
1147- let gq = ec
1148- if ($isInstanceOf(gq, "Address"))
1134+ let gY = {
1135+ let gl = dX
1136+ if ($isInstanceOf(gl, "Address"))
11491137 then {
1150- let hf = gq
1151- invoke(hf, "emit", [eq], nil)
1138+ let gZ = gl
1139+ invoke(gZ, "emit", [el], nil)
11521140 }
11531141 else unit
11541142 }
1155- if ((he == he))
1143+ if ((gY == gY))
11561144 then {
1157- let hg = if ((er > 0))
1158- then invoke(gZ, "put", nil, [AttachedPayment(do, er)])
1145+ let ha = if ((em > 0))
1146+ then invoke(gT, "put", nil, [AttachedPayment(dj, em)])
11591147 else nil
1160- if ((hg == hg))
1148+ if ((ha == ha))
11611149 then {
1162- let hh = if ((es > 0))
1163- then invoke(gZ, "put", nil, [AttachedPayment(dp, es)])
1150+ let hb = if ((en > 0))
1151+ then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
11641152 else nil
1165- if ((hh == hh))
1153+ if ((hb == hb))
11661154 then {
1167- let hi = if (gW)
1155+ let hc = if (gQ)
11681156 then {
1169- let hj = invoke(gY, "stake", nil, [AttachedPayment(hd, eq)])
1170- if ((hj == hj))
1157+ let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)])
1158+ if ((hd == hd))
11711159 then nil
11721160 else throw("Strict value is not equal to itself.")
11731161 }
1174- else [ScriptTransfer(cU.caller, eq, hd)]
1175- let hk = eX(0, 0, 0)
1176- let gn = hk._1
1177- let eO = hk._2
1178- let hl = if ((eO >= eW))
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))
11791167 then true
1180- else aS(makeString(["updated DLp lower than current DLp", toString(eT), toString(eU), toString(eV), toString(eW), toString(eO), toString(er), toString(es)], " "))
1181- if ((hl == hl))
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))
11821170 then {
1183- let hm = value(assetInfo(bq)).quantity
1184- if ((hm == hm))
1185- then ((dG ++ hi) ++ gn)
1171+ let hg = value(assetInfo(bl)).quantity
1172+ if ((hg == hg))
1173+ then ((dB ++ hc) ++ gi)
11861174 else throw("Strict value is not equal to itself.")
11871175 }
11881176 else throw("Strict value is not equal to itself.")
11891177 }
11901178 else throw("Strict value is not equal to itself.")
11911179 }
11921180 else throw("Strict value is not equal to itself.")
11931181 }
11941182 else throw("Strict value is not equal to itself.")
11951183 }
11961184 else throw("Strict value is not equal to itself.")
11971185 }
11981186 else throw("Strict value is not equal to itself.")
11991187 }
12001188 else throw("Strict value is not equal to itself.")
12011189 }
12021190 else throw("Strict value is not equal to itself.")
12031191 }
12041192 else throw("Strict value is not equal to itself.")
12051193 }
12061194 }
12071195
12081196
12091197
1210-@Callable(cU)
1211-func putOneTknV2 (fR,gW) = {
1212- let hn = {
1213- let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1214- if ($isInstanceOf(aX, "Boolean"))
1215- then aX
1216- else throw(($getType(aX) + " 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"))
12171205 }
1218- let ho = if (if (if (ba())
1206+ let hi = if (if (if (aV())
12191207 then true
1220- else (bp == q))
1208+ else (bk == q))
12211209 then true
1222- else (bp == s))
1210+ else (bk == s))
12231211 then true
1224- else hn
1225- let gN = [if (if (!(ho))
1212+ else hh
1213+ let gH = [if (if (!(hi))
12261214 then true
1227- else gt(cU))
1215+ else go(cP))
12281216 then true
1229- else aS("put operation is blocked by admin"), if ((size(cU.payments) == 1))
1217+ else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
12301218 then true
1231- else aS("exactly 1 payment are expected")]
1232- if ((gN == gN))
1219+ else aN("exactly 1 payment are expected")]
1220+ if ((gH == gH))
12331221 then {
1234- let do = toBase58String(value(br))
1235- let dp = toBase58String(value(bs))
1236- let dn = bq
1237- let fV = bt
1238- let fW = bu
1239- let dm = if ((cU.caller == this))
1240- then cU.originCaller
1241- else cU.caller
1242- let fp = value(cU.payments[0])
1243- let dk = toBase58String(value(fp.assetId))
1244- let dQ = fp.amount
1245- let eW = if ((fp.assetId == br))
1246- then eP(toBigInt(dQ), toBigInt(0), toBigInt(0))
1247- else eP(toBigInt(0), toBigInt(dQ), toBigInt(0))
1248- if ((eW == eW))
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))
12491237 then {
1250- let hp = fu(dQ, dk, toString(dm), toBase58String(cU.transactionId), true)
1251- if ((hp == hp))
1238+ let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1239+ if ((hj == hj))
12521240 then {
1253- let cC = hp._3
1254- let dG = hp._2
1255- let hq = hp._1
1256- let eq = if (if ((fR > 0))
1257- then (fR > hq)
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)
12581246 else false)
1259- then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
1260- else hq
1261- let hc = invoke(aV, "emit", [eq], nil)
1262- if ((hc == hc))
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))
12631251 then {
1264- let he = {
1265- let gq = hc
1266- if ($isInstanceOf(gq, "Address"))
1252+ let gY = {
1253+ let gl = gW
1254+ if ($isInstanceOf(gl, "Address"))
12671255 then {
1268- let hf = gq
1269- invoke(hf, "emit", [eq], nil)
1256+ let gZ = gl
1257+ invoke(gZ, "emit", [el], nil)
12701258 }
12711259 else unit
12721260 }
1273- if ((he == he))
1261+ if ((gY == gY))
12741262 then {
1275- let hi = if (gW)
1263+ let hc = if (gQ)
12761264 then {
1277- let hj = invoke(bz, "stakeFor", [toString(cU.caller)], [AttachedPayment(dn, eq)])
1278- if ((hj == hj))
1265+ let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1266+ if ((hd == hd))
12791267 then nil
12801268 else throw("Strict value is not equal to itself.")
12811269 }
1282- else [ScriptTransfer(cU.caller, eq, dn)]
1283- let gh = if ((cC > 0))
1284- then [ScriptTransfer(bc, cC, fromBase58String(dk))]
1270+ else [ScriptTransfer(cP.caller, el, di)]
1271+ let gc = if ((cx > 0))
1272+ then [ScriptTransfer(aX, cx, fromBase58String(df))]
12851273 else nil
1286- let hr = if ((this == bc))
1274+ let hl = if ((this == aX))
12871275 then $Tuple2(0, 0)
12881276 else {
1289- let hs = if ((fp.assetId == br))
1277+ let hm = if ((fk.assetId == bm))
12901278 then true
12911279 else false
1292- if (hs)
1293- then $Tuple2(-(cC), 0)
1294- else $Tuple2(0, -(cC))
1280+ if (hm)
1281+ then $Tuple2(-(cx), 0)
1282+ else $Tuple2(0, -(cx))
12951283 }
1296- let eY = hr._1
1297- let eZ = hr._2
1298- let ht = eX(eY, eZ, 0)
1299- let gn = ht._1
1300- let eO = ht._2
1301- let go = fb(eW, eO)
1302- if ((go == go))
1303- then $Tuple2((((dG ++ hi) ++ gh) ++ gn), eq)
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)
13041292 else throw("Strict value is not equal to itself.")
13051293 }
13061294 else throw("Strict value is not equal to itself.")
13071295 }
13081296 else throw("Strict value is not equal to itself.")
13091297 }
13101298 else throw("Strict value is not equal to itself.")
13111299 }
13121300 else throw("Strict value is not equal to itself.")
13131301 }
13141302 else throw("Strict value is not equal to itself.")
13151303 }
13161304
13171305
13181306
1319-@Callable(cU)
1320-func putForFree (hu) = if ((0 > hu))
1307+@Callable(cP)
1308+func putForFree (ho) = if ((0 > ho))
13211309 then throw("Wrong slpg")
1322- else if ((size(cU.payments) != 2))
1310+ else if ((size(cP.payments) != 2))
13231311 then throw("2 pmnts expd")
13241312 else {
1325- let hv = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], hu, false, false, true, 0, "")
1326- let dG = hv._9
1327- let ha = toBigInt(value(cU.payments[0]).amount)
1328- let hb = toBigInt(value(cU.payments[1]).amount)
1329- let eW = eP(ha, hb, toBigInt(0))
1330- if ((eW == eW))
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))
13311319 then {
1332- let hw = eX(0, 0, 0)
1333- let gn = hw._1
1334- let eO = hw._2
1335- let go = fb(eW, eO)
1336- if ((go == go))
1337- then (dG ++ gn)
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)
13381326 else throw("Strict value is not equal to itself.")
13391327 }
13401328 else throw("Strict value is not equal to itself.")
13411329 }
13421330
13431331
13441332
1345-@Callable(cU)
1333+@Callable(cP)
13461334 func get () = {
1347- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1348- if ((eW == eW))
1335+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1336+ if ((eR == eR))
13491337 then {
1350- let ec = fo(cU)
1351- let hx = ec._1
1352- let dF = ec._2
1353- let dQ = ec._3
1354- let dk = ec._4
1355- let dG = ec._5
1356- let eD = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1357- if ((eD == eD))
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))
13581346 then {
1359- let hy = eX(-(hx), -(dF), 0)
1360- let gn = hy._1
1361- let eO = hy._2
1362- let go = fb(eW, eO)
1363- if ((go == go))
1364- then (dG ++ gn)
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)
13651353 else throw("Strict value is not equal to itself.")
13661354 }
13671355 else throw("Strict value is not equal to itself.")
13681356 }
13691357 else throw("Strict value is not equal to itself.")
13701358 }
13711359
13721360
13731361
1374-@Callable(cU)
1375-func getOneTknV2 (fQ,fR) = {
1376- let hn = {
1377- let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1378- if ($isInstanceOf(aX, "Boolean"))
1379- then aX
1380- else throw(($getType(aX) + " 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"))
13811369 }
1382- let hz = if (if (ba())
1370+ let ht = if (if (aV())
13831371 then true
1384- else (bp == s))
1372+ else (bk == s))
13851373 then true
1386- else hn
1387- let gN = [if (if (!(hz))
1374+ else hh
1375+ let gH = [if (if (!(ht))
13881376 then true
1389- else gt(cU))
1377+ else go(cP))
13901378 then true
1391- else aS("get operation is blocked by admin"), if ((size(cU.payments) == 1))
1379+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
13921380 then true
1393- else aS("exactly 1 payment are expected")]
1394- if ((gN == gN))
1381+ else aN("exactly 1 payment are expected")]
1382+ if ((gH == gH))
13951383 then {
1396- let hA = fP(fQ, fR, cU.payments, cU.caller, cU.originCaller, cU.transactionId)
1397- let dG = hA._1
1398- let ga = hA._2
1399- $Tuple2(dG, ga)
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)
14001388 }
14011389 else throw("Strict value is not equal to itself.")
14021390 }
14031391
14041392
14051393
1406-@Callable(cU)
1394+@Callable(cP)
14071395 func refreshDLp () = {
1408- let hB = valueOrElse(getInteger(at), 0)
1409- let hC = if (((height - hB) >= aw))
1396+ let hv = valueOrElse(getInteger(aq), 0)
1397+ let hw = if (((height - hv) >= at))
14101398 then unit
1411- else aS(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1412- if ((hC == hC))
1399+ else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1400+ if ((hw == hw))
14131401 then {
1414- let fi = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), aU("invalid dLp"))
1415- let hD = eX(0, 0, 0)
1416- let hE = hD._1
1417- let eO = hD._2
1418- let fa = if ((fi != eO))
1419- then hE
1420- else aS("nothing to refresh")
1421- $Tuple2(fa, toString(eO))
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))
14221410 }
14231411 else throw("Strict value is not equal to itself.")
14241412 }
14251413
14261414
14271415
1428-@Callable(cU)
1429-func getOneTknV2READONLY (fQ,hF) = {
1430- let do = toBase58String(value(br))
1431- let dp = toBase58String(value(bs))
1432- let dn = toBase58String(value(bq))
1433- let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
1434- let eN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dn)), "invalid lp asset").quantity)
1435- let cg = cD(cE)
1436- let cf = (cg - fraction(toBigInt(hF), cg, eN))
1437- let hG = if ((fQ == do))
1416+@Callable(cP)
1417+func getOneTknV2READONLY (fL,hz) = {
1418+ let dj = toBase58String(value(bm))
1419+ let dk = toBase58String(value(bn))
1420+ let di = toBase58String(value(bl))
1421+ let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1422+ let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1423+ let cb = cy(cz)
1424+ let ca = (cb - fraction(toBigInt(hz), cb, eI))
1425+ let hA = if ((fL == dj))
14381426 then 0
1439- else if ((fQ == dp))
1427+ else if ((fL == dk))
14401428 then 1
14411429 else throw("invalid out asset id")
1442- let hH = ex(cE, hG, cf)
1443- let gG = (cE[hG] - hH)
1444- let gH = max([0, toInt((gG - f))])
1445- let hI = cA(gH, aY)
1446- let fZ = hI._1
1447- let cC = hI._2
1448- $Tuple2(nil, $Tuple2(fZ, cC))
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))
14491437 }
14501438
14511439
14521440
1453-@Callable(cU)
1454-func getOneTknV2WithBonusREADONLY (fQ,hF) = {
1455- let do = toBase58String(value(br))
1456- let dp = toBase58String(value(bs))
1457- let dn = toBase58String(value(bq))
1458- let du = bS(do)
1459- let dw = bS(dp)
1460- let hJ = {
1461- let aX = invoke(this, "getOneTknV2READONLY", [fQ, hF], nil)
1462- if ($isInstanceOf(aX, "(Int, Int)"))
1463- then aX
1464- else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
1441+@Callable(cP)
1442+func getOneTknV2WithBonusREADONLY (fL,hz) = {
1443+ let dj = toBase58String(value(bm))
1444+ let dk = toBase58String(value(bn))
1445+ let di = toBase58String(value(bl))
1446+ let dp = bN(dj)
1447+ let dr = bN(dk)
1448+ let hD = {
1449+ let aS = invoke(this, "getOneTknV2READONLY", [fL, hz], nil)
1450+ if ($isInstanceOf(aS, "(Int, Int)"))
1451+ then aS
1452+ else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
14651453 }
1466- let fZ = hJ._1
1467- let cC = hJ._2
1468- let ec = di("", dn, hF, this)
1469- let dE = ec._1
1470- let dF = ec._2
1471- let hK = (dE + dF)
1472- let fO = if ((hK == 0))
1473- then if ((fZ == 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))
14741462 then 0
14751463 else throw("bonus calculation error")
1476- else fraction((fZ - hK), a, hK)
1477- $Tuple2(nil, $Tuple3(fZ, cC, fO))
1464+ else fraction((fU - hE), a, hE)
1465+ $Tuple2(nil, $Tuple3(fU, cx, fJ))
14781466 }
14791467
14801468
14811469
1482-@Callable(cU)
1483-func getNoLess (hL,hM) = {
1484- let ec = fo(cU)
1485- let dE = ec._1
1486- let dF = ec._2
1487- let dQ = ec._3
1488- let dk = ec._4
1489- let dG = ec._5
1490- if ((hL > dE))
1491- then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL)))
1492- else if ((hM > dF))
1493- then throw(((("Failed: " + toString(dF)) + " < ") + toString(hM)))
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)))
14941482 else {
1495- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1496- if ((eW == eW))
1483+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1484+ if ((eR == eR))
14971485 then {
1498- let hN = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1499- if ((hN == hN))
1486+ let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1487+ if ((hH == hH))
15001488 then {
1501- let hO = eX(-(dE), -(dF), 0)
1502- let gn = hO._1
1503- let eO = hO._2
1504- let go = fb(eW, eO)
1505- if ((go == go))
1506- then (dG ++ gn)
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)
15071495 else throw("Strict value is not equal to itself.")
15081496 }
15091497 else throw("Strict value is not equal to itself.")
15101498 }
15111499 else throw("Strict value is not equal to itself.")
15121500 }
15131501 }
15141502
15151503
15161504
1517-@Callable(cU)
1518-func unstakeAndGet (cB) = {
1519- let hP = if ((size(cU.payments) != 0))
1505+@Callable(cP)
1506+func unstakeAndGet (cw) = {
1507+ let hJ = if ((size(cP.payments) != 0))
15201508 then throw("No pmnts expd")
15211509 else true
1522- if ((hP == hP))
1510+ if ((hJ == hJ))
15231511 then {
1524- let hQ = bx()
1525- let hd = bq
1526- let hR = valueOrErrorMessage(addressFromString(hQ[C]), "Wr st addr")
1527- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1528- if ((eW == eW))
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))
15291517 then {
1530- let hS = invoke(hR, "unstake", [toBase58String(hd), cB], nil)
1531- if ((hS == hS))
1518+ let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil)
1519+ if ((hM == hM))
15321520 then {
1533- let ec = di(toBase58String(cU.transactionId), toBase58String(hd), cB, cU.caller)
1534- let dE = ec._1
1535- let dF = ec._2
1536- let ds = parseIntValue(ec._9)
1537- let dG = ec._10
1538- let hT = if (if (ba())
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())
15391527 then true
1540- else (ds == s))
1541- then throw(("Blocked: " + toString(ds)))
1528+ else (dn == s))
1529+ then throw(("Blocked: " + toString(dn)))
15421530 else true
1543- if ((hT == hT))
1531+ if ((hN == hN))
15441532 then {
1545- let hU = invoke(aV, "burn", [cB], [AttachedPayment(hd, cB)])
1546- if ((hU == hU))
1533+ let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)])
1534+ if ((hO == hO))
15471535 then {
1548- let hV = eX(-(dE), -(dF), 0)
1549- let gn = hV._1
1550- let eO = hV._2
1551- let go = fb(eW, eO)
1552- if ((go == go))
1553- then (dG ++ gn)
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)
15541542 else throw("Strict value is not equal to itself.")
15551543 }
15561544 else throw("Strict value is not equal to itself.")
15571545 }
15581546 else throw("Strict value is not equal to itself.")
15591547 }
15601548 else throw("Strict value is not equal to itself.")
15611549 }
15621550 else throw("Strict value is not equal to itself.")
15631551 }
15641552 else throw("Strict value is not equal to itself.")
15651553 }
15661554
15671555
15681556
1569-@Callable(cU)
1570-func unstakeAndGetNoLess (hW,hX,hM) = {
1571- let hz = if (ba())
1557+@Callable(cP)
1558+func unstakeAndGetNoLess (hQ,hR,hG) = {
1559+ let ht = if (aV())
15721560 then true
1573- else (bp == s)
1574- let gN = [if (!(hz))
1561+ else (bk == s)
1562+ let gH = [if (!(ht))
15751563 then true
1576- else throw("get operation is blocked by admin"), if ((size(cU.payments) == 0))
1564+ else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
15771565 then true
15781566 else throw("no payments are expected")]
1579- if ((gN == gN))
1567+ if ((gH == gH))
15801568 then {
1581- let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1582- if ((eW == eW))
1569+ let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1570+ if ((eR == eR))
15831571 then {
1584- let hS = invoke(bz, "unstake", [toBase58String(bq), hW], nil)
1585- if ((hS == hS))
1572+ let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil)
1573+ if ((hM == hM))
15861574 then {
1587- let hY = di(toBase58String(cU.transactionId), toBase58String(bq), hW, cU.caller)
1588- let dE = hY._1
1589- let dF = hY._2
1590- let dG = hY._10
1591- let hZ = [if ((dE >= hX))
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))
15921580 then true
1593- else throw(makeString(["amount asset amount to receive is less than ", toString(hX)], "")), if ((dF >= hM))
1581+ else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG))
15941582 then true
1595- else throw(makeString(["price asset amount to receive is less than ", toString(hM)], ""))]
1596- if ((hZ == hZ))
1583+ else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1584+ if ((hT == hT))
15971585 then {
1598- let hN = invoke(aV, "burn", [hW], [AttachedPayment(bq, hW)])
1599- if ((hN == hN))
1586+ let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)])
1587+ if ((hH == hH))
16001588 then {
1601- let ia = eX(-(dE), -(dF), 0)
1602- let gn = ia._1
1603- let eO = ia._2
1604- let go = fb(eW, eO)
1605- if ((go == go))
1606- then (dG ++ gn)
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)
16071595 else throw("Strict value is not equal to itself.")
16081596 }
16091597 else throw("Strict value is not equal to itself.")
16101598 }
16111599 else throw("Strict value is not equal to itself.")
16121600 }
16131601 else throw("Strict value is not equal to itself.")
16141602 }
16151603 else throw("Strict value is not equal to itself.")
16161604 }
16171605 else throw("Strict value is not equal to itself.")
16181606 }
16191607
16201608
16211609
1622-@Callable(cU)
1623-func unstakeAndGetOneTknV2 (hW,fQ,fR) = {
1624- let hn = {
1625- let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1626- if ($isInstanceOf(aX, "Boolean"))
1627- then aX
1628- else throw(($getType(aX) + " 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"))
16291617 }
1630- let hz = if (if (ba())
1618+ let ht = if (if (aV())
16311619 then true
1632- else (bp == s))
1620+ else (bk == s))
16331621 then true
1634- else hn
1635- let gN = [if (if (!(hz))
1622+ else hh
1623+ let gH = [if (if (!(ht))
16361624 then true
1637- else gt(cU))
1625+ else go(cP))
16381626 then true
1639- else aS("get operation is blocked by admin"), if ((size(cU.payments) == 0))
1627+ else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
16401628 then true
1641- else aS("no payments are expected")]
1642- if ((gN == gN))
1629+ else aN("no payments are expected")]
1630+ if ((gH == gH))
16431631 then {
1644- let hQ = bx()
1645- let hd = bq
1646- let hR = valueOrErrorMessage(addressFromString(hQ[C]), "Wr st addr")
1647- let dm = cU.caller
1648- let ib = this
1649- let hS = invoke(hR, "unstakeINTERNAL", [hd, hW, dm.bytes, ib.bytes], nil)
1650- if ((hS == hS))
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))
16511639 then {
1652- let ic = fP(fQ, fR, [AttachedPayment(hd, hW)], cU.caller, cU.originCaller, cU.transactionId)
1653- let dG = ic._1
1654- let ga = ic._2
1655- $Tuple2(dG, ga)
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)
16561644 }
16571645 else throw("Strict value is not equal to itself.")
16581646 }
16591647 else throw("Strict value is not equal to itself.")
16601648 }
16611649
16621650
16631651
1664-@Callable(cU)
1665-func putOneTknV2WithBonusREADONLY (id,ie) = {
1666- let if = fu(id, ie, "", "", true)
1667- let fJ = if._1
1668- let dG = if._2
1669- let cC = if._3
1670- let fO = if._4
1671- $Tuple2(nil, $Tuple3(fJ, cC, fO))
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))
16721660 }
16731661
16741662
16751663
1676-@Callable(cU)
1677-func putOneTknV2WithoutTakeFeeREADONLY (id,ie) = {
1678- let ig = fu(id, ie, "", "", false)
1679- let fJ = ig._1
1680- let dG = ig._2
1681- let cC = ig._3
1682- let fO = ig._4
1683- $Tuple2(nil, $Tuple3(fJ, cC, fO))
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))
16841672 }
16851673
16861674
16871675
1688-@Callable(cU)
1689-func activate (ih,ii) = if ((toString(cU.caller) != toString(aV)))
1676+@Callable(cP)
1677+func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ)))
16901678 then throw("denied")
1691- else $Tuple2([StringEntry(aj(), ih), StringEntry(ak(), ii)], "success")
1679+ else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
16921680
16931681
16941682
1695-@Callable(cU)
1696-func setS (ij,hT) = if ((toString(cU.caller) != aO(this, ao())))
1697- then gs
1698- else [StringEntry(ij, hT)]
1683+@Callable(cP)
1684+func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1685+ then gn
1686+ else [StringEntry(id, hN)]
16991687
17001688
17011689
1702-@Callable(cU)
1703-func setI (ij,hT) = if ((toString(cU.caller) != aO(this, ao())))
1704- then gs
1705- else [IntegerEntry(ij, hT)]
1690+@Callable(cP)
1691+func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1692+ then gn
1693+ else [IntegerEntry(id, hN)]
17061694
17071695
17081696
1709-@Callable(cU)
1710-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bd())
1697+@Callable(cP)
1698+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
17111699
17121700
17131701
1714-@Callable(cU)
1715-func getAccBalanceWrapperREADONLY (bT) = $Tuple2(nil, bS(bT))
1702+@Callable(cP)
1703+func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
17161704
17171705
17181706
1719-@Callable(cU)
1720-func calcPricesWrapperREADONLY (cm,cn,cr) = {
1721- let ik = cq(cm, cn, cr)
1722- $Tuple2(nil, [toString(ik[0]), toString(ik[1]), toString(ik[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])])
17231711 }
17241712
17251713
17261714
1727-@Callable(cU)
1728-func fromX18WrapperREADONLY (M,il) = $Tuple2(nil, L(parseBigIntValue(M), il))
1715+@Callable(cP)
1716+func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if))
17291717
17301718
17311719
1732-@Callable(cU)
1720+@Callable(cP)
17331721 func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
17341722
17351723
17361724
1737-@Callable(cU)
1738-func calcPriceBigIntWrapperREADONLY (bV,bW) = $Tuple2(nil, toString(bU(parseBigIntValue(bV), parseBigIntValue(bW))))
1725+@Callable(cP)
1726+func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
17391727
17401728
17411729
1742-@Callable(cU)
1743-func estimatePutOperationWrapperREADONLY (dj,cb,dI,dJ,dK,dL,im,dM,dN) = $Tuple2(nil, dH(dj, cb, dI, dJ, dK, dL, im, dM, dN, 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, ""))
17441732
17451733
17461734
1747-@Callable(cU)
1748-func estimateGetOperationWrapperREADONLY (dj,in,dl,im) = {
1749- let ec = di(dj, in, dl, addressFromStringValue(im))
1750- $Tuple2(nil, $Tuple10(ec._1, ec._2, ec._3, ec._4, ec._5, ec._6, ec._7, toString(ec._8), ec._9, ec._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))
17511739 }
17521740
17531741
1754-
1755-@Callable(cU)
1756-func changeAmp () = {
1757- let io = invoke(aV, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1758- let ip = {
1759- let gq = io
1760- if ($isInstanceOf(gq, "List[Any]"))
1742+@Verifier(ii)
1743+func ij () = {
1744+ let ik = {
1745+ let gl = gk()
1746+ if ($isInstanceOf(gl, "ByteVector"))
17611747 then {
1762- let iq = gq
1763- $Tuple3({
1764- let aX = iq[0]
1765- if ($isInstanceOf(aX, "Int"))
1766- then aX
1767- else throw(($getType(aX) + " couldn't be cast to Int"))
1768- }, {
1769- let aX = iq[1]
1770- if ($isInstanceOf(aX, "Int"))
1771- then aX
1772- else throw(($getType(aX) + " couldn't be cast to Int"))
1773- }, {
1774- let aX = iq[2]
1775- if ($isInstanceOf(aX, "Int"))
1776- then aX
1777- else throw(($getType(aX) + " couldn't be cast to Int"))
1778- })
1748+ let gp = gl
1749+ gp
17791750 }
1780- else throw("invalid entry type")
1781- }
1782- let ir = ip._1
1783- let is = ip._2
1784- let it = ip._3
1785- let iu = parseIntValue(getStringValue(al()))
1786- let iv = (iu + is)
1787- let iw = if ((0 > is))
1788- then if ((it > iv))
1789- then it
1790- else iv
1791- else if ((iv > it))
1792- then it
1793- else iv
1794- let ix = valueOrElse(getInteger(ap()), 0)
1795- let iy = (ix + ir)
1796- let gN = [if ((height > iy))
1797- then true
1798- else aS("try again in few blocks"), if ((iu != iw))
1799- then true
1800- else aS("already reached target")]
1801- if ((gN == gN))
1802- then [IntegerEntry(ap(), height), StringEntry(al(), toString(iw)), StringEntry(am(height), toString(iw))]
1803- else throw("Strict value is not equal to itself.")
1804- }
1805-
1806-
1807-@Verifier(iz)
1808-func iA () = {
1809- let iB = {
1810- let gq = gp()
1811- if ($isInstanceOf(gq, "ByteVector"))
1812- then {
1813- let gu = gq
1814- gu
1815- }
1816- else if ($isInstanceOf(gq, "Unit"))
1817- then iz.senderPublicKey
1751+ else if ($isInstanceOf(gl, "Unit"))
1752+ then ii.senderPublicKey
18181753 else throw("Match error")
18191754 }
1820- let gq = iz
1821- if ($isInstanceOf(gq, "Order"))
1755+ let gl = ii
1756+ if ($isInstanceOf(gl, "Order"))
18221757 then {
1823- let fe = gq
1824- let iC = bb()
1825- let iD = if (gB())
1826- then $Tuple2(true, "")
1827- else fd(fe)
1828- let aK = iD._1
1829- let aL = iD._2
1830- let aM = sigVerify(fe.bodyBytes, fe.proofs[0], fe.senderPublicKey)
1831- let aN = sigVerify(fe.bodyBytes, fe.proofs[1], iC)
1832- if (if (if (aK)
1833- then aM
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
18341767 else false)
1835- then aN
1768+ then aI
18361769 else false)
18371770 then true
1838- else aJ(aK, aL, aM, aN)
1771+ else aE(aF, aG, aH, aI)
18391772 }
1840- else if ($isInstanceOf(gq, "SetScriptTransaction"))
1773+ else if ($isInstanceOf(gl, "SetScriptTransaction"))
18411774 then {
1842- let cH = gq
1843- if (sigVerify(iz.bodyBytes, iz.proofs[0], iB))
1775+ let cC = gl
1776+ if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
18441777 then true
18451778 else {
1846- let iE = blake2b256(value(cH.script))
1847- let iF = fromBase64String(value(getString(aV, aF())))
1848- let iG = scriptHash(this)
1849- if ((iF == iE))
1850- then (iG != iE)
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)
18511784 else false
18521785 }
18531786 }
1854- else sigVerify(iz.bodyBytes, iz.proofs[0], iB)
1787+ else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
18551788 }
18561789

github/deemru/w8io/169f3d6 
744.62 ms