tx · 7H7PFEizq66vK856b2PANgiYbvGLVrMixjzFMaamd9G2

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.03200000 Waves

2022.12.14 13:36 [2359865] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "7H7PFEizq66vK856b2PANgiYbvGLVrMixjzFMaamd9G2", "fee": 3200000, "feeAssetId": null, "timestamp": 1671014104829, "version": 1, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "3m7dQBqDHyQRnE9pTxYrGVdUgiFAk93KwaAv7bLsmg9gTYWeyCoaLL2xBHipBVBds5XLHUwYgNrLH5pkaDusCT7q" ], "script": "base64:BgKmIggCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCCIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCINaWR4SVByaWNlQXNJZCIPaWR4RmFjdFN0YWtDbnRyIhJpZHhGYW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QJhdgIFT3JkZXIEAmR6BQJhdgQCZ1EJAQJhSgAEAmdSCQECZHkBBQJkegQCZ1MJAPQDAwgFAmR6CWJvZHlCeXRlcwkAkQMCCAUCZHoGcHJvb2ZzAAAIBQJkeg9zZW5kZXJQdWJsaWNLZXkEAmdUCQD0AwMIBQJkeglib2R5Qnl0ZXMJAJEDAggFAmR6BnByb29mcwABBQJnUQMDAwUCZ1IFAmdTBwUCZ1QHBgkBAmFxAwUCZ1IFAmdTBQJnVAMJAAECBQJhdgIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmRaBQJhdgQCZ1UJAPYDAQkBBXZhbHVlAQgFAmRaBnNjcmlwdAQCZ1YJANsEAQkBBXZhbHVlAQkAnQgCBQJhRAkBAmFvAAQCZ1cJAPEHAQUEdGhpcwMDCQAAAgUCZ1YFAmdVCQECIT0CBQJnVwUCZ1UHBgkA9AMDCAUCZ04JYm9keUJ5dGVzCQCRAwIIBQJnTgZwcm9vZnMAAAUCZ1AJAPQDAwgFAmdOCWJvZHlCeXRlcwkAkQMCCAUCZ04GcHJvb2ZzAAAFAmdQf6Cfrw==", "chainId": 84, "height": 2359865, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3BugBsnBmDagVWkrYEuEEMFLFHLuuoTLejxhNZqoBMPP Next: HaCm9rH4DQY94cT8vVtvKsaUsAHAQdqTassK9GhdcJqb Diff:
OldNewDifferences
115115 func af () = "%s__addonAddr"
116116
117117
118-let ag = "%s__fee"
119-
120-let ah = valueOrElse(getInteger(this, ag), E)
121-
122-func ai () = "%s__factoryConfig"
118+func ag () = "%s__factoryConfig"
123119
124120
125-func aj () = "%s%s__matcher__publicKey"
121+func ah () = "%s%s__matcher__publicKey"
126122
127123
128-func ak (al,am) = (((("%d%d%s__" + al) + "__") + am) + "__config")
124+func ai (aj,ak) = (((("%d%d%s__" + aj) + "__") + ak) + "__config")
129125
130126
131-func an (ao) = ("%s%s%s__mappings__baseAsset2internalId__" + ao)
127+func al (am) = ("%s%s%s__mappings__baseAsset2internalId__" + am)
132128
133129
134-func ap () = "%s__shutdown"
130+func an () = "%s__shutdown"
135131
136132
137-func aq () = "%s__allowedLpStableScriptHash"
133+func ao () = "%s__allowedLpStableScriptHash"
138134
139135
140-func ar () = "%s__feeCollectorAddress"
136+func ap () = "%s__feeCollectorAddress"
141137
142138
143-func as (at,au,av) = throw(((((("Failed: ordValid=" + toString(at)) + " sndrValid=") + toString(au)) + " mtchrValid=") + toString(av)))
139+func aq (ar,as,at) = throw(((((("Failed: ordValid=" + toString(ar)) + " sndrValid=") + toString(as)) + " mtchrValid=") + toString(at)))
144140
145141
146-func aw (J) = {
147- let ax = J
148- if ($isInstanceOf(ax, "String"))
142+func au (J) = {
143+ let av = J
144+ if ($isInstanceOf(av, "String"))
149145 then {
150- let ay = ax
151- ay
146+ let aw = av
147+ aw
152148 }
153149 else throw("fail cast to String")
154150 }
155151
156152
157-func az (aA,aB) = valueOrErrorMessage(getString(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
153+func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], ""))
158154
159155
160-func aC (aA,aB) = valueOrErrorMessage(getInteger(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
156+func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], ""))
161157
162158
163-func aD (aE) = throw(makeString(["lp_stable.ride:", aE], " "))
159+func aB (aC) = throw(makeString(["lp_stable.ride:", aC], " "))
164160
165161
166-let aF = addressFromStringValue(az(this, R()))
162+let aD = addressFromStringValue(ax(this, R()))
167163
168-let aG = az(this, ae())
164+let aE = {
165+ let aF = invoke(aD, "getInFeeREADONLY", [toString(this)], nil)
166+ if ($isInstanceOf(aF, "Int"))
167+ then aF
168+ else throw(($getType(aF) + " couldn't be cast to Int"))
169+ }
169170
170-func aH () = valueOrElse(getBoolean(aF, ap()), false)
171+let aG = {
172+ let aF = invoke(aD, "getOutFeeREADONLY", [toString(this)], nil)
173+ if ($isInstanceOf(aF, "Int"))
174+ then aF
175+ else throw(($getType(aF) + " couldn't be cast to Int"))
176+ }
177+
178+let aH = ax(this, ae())
179+
180+func aI () = valueOrElse(getBoolean(aD, an()), false)
171181
172182
173-func aI () = fromBase58String(az(aF, aj()))
183+func aJ () = fromBase58String(ax(aD, ah()))
174184
175185
176-let aJ = addressFromStringValue(az(aF, ar()))
186+let aK = addressFromStringValue(ax(aD, ap()))
177187
178-func aK () = {
179- let aL = az(this, ac())
180- let aM = az(this, ad())
181- let aN = aC(aF, an(aM))
182- let al = aC(aF, an(aL))
183- split(az(aF, ak(toString(al), toString(aN))), l)
188+func aL () = {
189+ let aM = ax(this, ac())
190+ let aN = ax(this, ad())
191+ let aO = aA(aD, al(aN))
192+ let aj = aA(aD, al(aM))
193+ split(ax(aD, ai(toString(aj), toString(aO))), l)
184194 }
185195
186196
187-func aO (aP) = if ((aP == i))
197+func aP (aQ) = if ((aQ == i))
188198 then unit
189- else fromBase58String(aP)
199+ else fromBase58String(aQ)
190200
191201
192-func aQ (aP) = if ((aP == unit))
202+func aR (aQ) = if ((aQ == unit))
193203 then i
194- else toBase58String(value(aP))
204+ else toBase58String(value(aQ))
195205
196206
197-func aR (aS) = $Tuple7(addressFromStringValue(aS[r]), parseIntValue(aS[s]), fromBase58String(aS[t]), aO(aS[u]), aO(aS[v]), parseIntValue(aS[w]), parseIntValue(aS[x]))
207+func aS (aT) = $Tuple7(addressFromStringValue(aT[r]), parseIntValue(aT[s]), fromBase58String(aT[t]), aP(aT[u]), aP(aT[v]), parseIntValue(aT[w]), parseIntValue(aT[x]))
198208
199209
200-let aT = aR(aK())
210+let aU = aS(aL())
201211
202-let aU = aT
212+let aV = aU
203213
204-let aV = aU._1
214+let aW = aV._1
205215
206-let aW = aU._2
216+let aX = aV._2
207217
208-let aX = aU._3
218+let aY = aV._3
209219
210-let aY = aU._4
220+let aZ = aV._4
211221
212-let aZ = aU._5
222+let ba = aV._5
213223
214-let ba = aU._6
224+let bb = aV._6
215225
216-let bb = aU._7
226+let bc = aV._7
217227
218-func bc () = split(az(aF, ai()), l)
228+func bd () = split(ax(aD, ag()), l)
219229
220230
221-let bd = bc()
231+let be = bd()
222232
223-let be = valueOrErrorMessage(addressFromString(bd[A]), "Invalid staking contract address")
233+let bf = valueOrErrorMessage(addressFromString(be[A]), "Invalid staking contract address")
224234
225-let bf = valueOrErrorMessage(addressFromString(bd[C]), "Invalid slipage contract address")
235+let bg = valueOrErrorMessage(addressFromString(be[C]), "Invalid slipage contract address")
226236
227-let bg = valueOrErrorMessage(addressFromString(bd[D]), "Invalid gwx contract address")
237+let bh = valueOrErrorMessage(addressFromString(be[D]), "Invalid gwx contract address")
228238
229-let bh = valueOrErrorMessage(addressFromString(bd[B]), "Invalid gwx contract address")
239+let bi = valueOrErrorMessage(addressFromString(be[B]), "Invalid gwx contract address")
230240
231-func bi (bj,bk,bl,bm,bn,bo,bp,bq,br,bs) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bj), toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs)], l)
241+func bj (bk,bl,bm,bn,bo,bp,bq,br,bs,bt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt)], l)
232242
233243
234-func bt (bu,bv,bw,bm,bp,bq) = makeString(["%d%d%d%d%d%d", toString(bu), toString(bv), toString(bw), toString(bm), toString(bp), toString(bq)], l)
244+func bu (bv,bw,bx,bn,bq,br) = makeString(["%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(bn), toString(bq), toString(br)], l)
235245
236246
237-func bx (by) = if ((by == "WAVES"))
247+func by (bz) = if ((bz == "WAVES"))
238248 then wavesBalance(this).available
239- else assetBalance(this, fromBase58String(by))
249+ else assetBalance(this, fromBase58String(bz))
240250
241251
242-func bz (bA,bB) = fraction(bA, c, bB)
252+func bA (bB,bC) = fraction(bB, c, bC)
243253
244254
245-func bC (bD,bE,bF) = {
246- let bG = fraction((bD - bE), b, bE)
247- let bH = ((bF - P(bG)) > d)
248- if (!(bH))
249- then throw(("Big slpg: " + toString(bG)))
250- else $Tuple2(bH, min([bD, bE]))
255+func bD (bE,bF,bG) = {
256+ let bH = fraction((bE - bF), b, bF)
257+ let bI = ((bG - P(bH)) > d)
258+ if (!(bI))
259+ then throw(("Big slpg: " + toString(bH)))
260+ else $Tuple2(bI, min([bE, bF]))
251261 }
252262
253263
254-func bI (bJ,bK,bL) = {
255- let bG = fraction(bK, b, bJ)
256- let bM = (bL > bG)
257- if (if (bM)
264+func bJ (bK,bL,bM) = {
265+ let bH = fraction(bL, b, bK)
266+ let bN = (bM > bH)
267+ if (if (bN)
258268 then true
259- else (bK > bJ))
260- then throw(((((((toString(bK) + " ") + toString(bJ)) + " ") + toString(bG)) + " ") + toString(bL)))
261- else bM
269+ else (bL > bK))
270+ then throw(((((((toString(bL) + " ") + toString(bK)) + " ") + toString(bH)) + " ") + toString(bM)))
271+ else bN
262272 }
263273
264274
265-func bN (bO,bP,bQ,bR) = {
266- let bS = F(bQ, bO)
275+func bO (bP,bQ,bR,bS) = {
267276 let bT = F(bR, bP)
268- bz(bT, bS)
277+ let bU = F(bS, bQ)
278+ bA(bU, bT)
269279 }
270280
271281
272-func bU (bQ,bR,bV) = {
273- let bW = aK()
274- let bX = parseIntValue(bW[w])
275- let bY = parseIntValue(bW[x])
276- let bZ = bN(bX, bY, bQ, bR)
277- let bB = F(bQ, bX)
278- let bA = F(bR, bY)
279- let ca = F(bV, a)
280- let cb = bz(bB, ca)
281- let cc = bz(bA, ca)
282-[bZ, cb, cc]
282+func bV (bR,bS,bW) = {
283+ let bX = aL()
284+ let bY = parseIntValue(bX[w])
285+ let bZ = parseIntValue(bX[x])
286+ let ca = bO(bY, bZ, bR, bS)
287+ let bC = F(bR, bY)
288+ let bB = F(bS, bZ)
289+ let cb = F(bW, a)
290+ let cc = bA(bC, cb)
291+ let cd = bA(bB, cb)
292+[ca, cc, cd]
283293 }
284294
285295
286-func cd (bQ,bR,bV) = {
287- let ce = bU(bQ, bR, bV)
288-[I(ce[0], a), I(ce[1], a), I(ce[2], a)]
296+func ce (bR,bS,bW) = {
297+ let cf = bV(bR, bS, bW)
298+[I(cf[0], a), I(cf[1], a), I(cf[2], a)]
289299 }
290300
291301
292-func cf (cg) = {
293- let ch = fraction(cg, ah, a)
294- $Tuple2((cg - ch), ch)
302+func cg (ch,ci) = {
303+ let cj = if ((ci == 0))
304+ then 0
305+ else fraction(ch, ci, a)
306+ $Tuple2((ch - cj), cj)
295307 }
296308
297309
298-func ci (cj,ck,cl,cm) = {
299- let bW = aK()
300- let cn = bW[t]
301- let co = bW[u]
302- let cp = bW[v]
303- let cq = parseIntValue(bW[w])
304- let cr = parseIntValue(bW[x])
305- let cs = bW[s]
306- let ct = valueOrErrorMessage(assetInfo(fromBase58String(cn)), "Wrong LP id").quantity
307- if ((cn != ck))
310+func ck (cl,cm,cn,co) = {
311+ let bX = aL()
312+ let cp = bX[t]
313+ let cq = bX[u]
314+ let cr = bX[v]
315+ let cs = parseIntValue(bX[w])
316+ let ct = parseIntValue(bX[x])
317+ let cu = bX[s]
318+ let cv = valueOrErrorMessage(assetInfo(fromBase58String(cp)), "Wrong LP id").quantity
319+ if ((cp != cm))
308320 then throw("Wrong pmt asset")
309321 else {
310- let cu = bx(co)
311- let cv = F(cu, cq)
312- let cw = bx(cp)
313- let cx = F(cw, cr)
314- let cy = bz(cx, cv)
315- let cz = I(cy, a)
316- let cA = F(cl, a)
317- let cB = F(ct, a)
318- let cC = fraction(cv, cA, cB)
319- let cD = fraction(cx, cA, cB)
320- let cE = I(cC, cq)
321- let cF = I(cD, cr)
322- let cG = if ((cj == ""))
322+ let cw = by(cq)
323+ let cx = F(cw, cs)
324+ let cy = by(cr)
325+ let cz = F(cy, ct)
326+ let cA = bA(cz, cx)
327+ let cB = I(cA, a)
328+ let cC = F(cn, a)
329+ let cD = F(cv, a)
330+ let cE = fraction(cx, cC, cD)
331+ let cF = fraction(cz, cC, cD)
332+ let cG = I(cE, cs)
333+ let cH = I(cF, ct)
334+ let cI = if ((cl == ""))
323335 then nil
324- else [ScriptTransfer(cm, cE, if ((co == "WAVES"))
336+ else [ScriptTransfer(co, cG, if ((cq == "WAVES"))
325337 then unit
326- else fromBase58String(co)), ScriptTransfer(cm, cF, if ((cp == "WAVES"))
338+ else fromBase58String(cq)), ScriptTransfer(co, cH, if ((cr == "WAVES"))
327339 then unit
328- else fromBase58String(cp)), StringEntry(ab(toString(cm), cj), bt(cE, cF, cl, cz, height, lastBlock.timestamp)), IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz)]
329- $Tuple10(cE, cF, co, cp, cu, cw, ct, cy, cs, cG)
340+ else fromBase58String(cr)), StringEntry(ab(toString(co), cl), bu(cG, cH, cn, cB, height, lastBlock.timestamp)), IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB)]
341+ $Tuple10(cG, cH, cq, cr, cw, cy, cv, cA, cu, cI)
330342 }
331343 }
332344
333345
334-func cH (cj,bF,cI,cJ,cK,cL,cm,cM,cN,cO,cP,cQ,cR) = {
335- let bW = aK()
336- let cn = fromBase58String(bW[t])
337- let cS = bW[u]
338- let cT = bW[v]
339- let cU = bW[y]
340- let cV = bW[z]
341- let cW = parseIntValue(bW[w])
342- let cX = parseIntValue(bW[x])
343- let cs = bW[s]
344- let cY = valueOrErrorMessage(assetInfo(cn), "Wr lp as").quantity
345- let cu = if (cM)
346- then bx(cS)
347- else if (if (cO)
348- then (cR == cS)
346+func cJ (cl,bG,cK,cL,cM,cN,co,cO,cP,cQ,cR,cS,cT) = {
347+ let bX = aL()
348+ let cp = fromBase58String(bX[t])
349+ let cU = bX[u]
350+ let cV = bX[v]
351+ let cW = bX[y]
352+ let cX = bX[z]
353+ let cY = parseIntValue(bX[w])
354+ let cZ = parseIntValue(bX[x])
355+ let cu = bX[s]
356+ let da = valueOrErrorMessage(assetInfo(cp), "Wr lp as").quantity
357+ let cw = if (cO)
358+ then by(cU)
359+ else if (if (cQ)
360+ then (cT == cU)
349361 else false)
350- then (bx(cS) - cQ)
351- else if (cO)
352- then bx(cS)
353- else (bx(cS) - cI)
354- let cw = if (cM)
355- then bx(cT)
356- else if (if (cO)
357- then (cR == cT)
362+ then (by(cU) - cS)
363+ else if (cQ)
364+ then by(cU)
365+ else (by(cU) - cK)
366+ let cy = if (cO)
367+ then by(cV)
368+ else if (if (cQ)
369+ then (cT == cV)
358370 else false)
359- then (bx(cT) - cQ)
360- else if (cO)
361- then bx(cT)
362- else (bx(cT) - cK)
363- let cZ = F(cI, cW)
364- let da = F(cK, cX)
365- let db = bz(da, cZ)
366- let cv = F(cu, cW)
367- let cx = F(cw, cX)
368- let dc = if ((cY == 0))
371+ then (by(cV) - cS)
372+ else if (cQ)
373+ then by(cV)
374+ else (by(cV) - cM)
375+ let db = F(cK, cY)
376+ let dc = F(cM, cZ)
377+ let dd = bA(dc, db)
378+ let cx = F(cw, cY)
379+ let cz = F(cy, cZ)
380+ let de = if ((da == 0))
369381 then {
370- let cy = d
371- let dd = d
372- let ca = pow((cZ * da), 0, toBigInt(5), 1, 0, DOWN)
373- $Tuple5(I(ca, a), I(cZ, cW), I(da, cX), bz((cx + da), (cv + cZ)), dd)
382+ let cA = d
383+ let df = d
384+ let cb = pow((db * dc), 0, toBigInt(5), 1, 0, DOWN)
385+ $Tuple5(I(cb, a), I(db, cY), I(dc, cZ), bA((cz + dc), (cx + db)), df)
374386 }
375387 else {
376- let cy = bz(cx, cv)
377- let de = fraction(P((cy - db)), c, cy)
378- let dd = F(bF, a)
379- if (if (if (cP)
380- then (cy != d)
388+ let cA = bA(cz, cx)
389+ let dg = fraction(P((cA - dd)), c, cA)
390+ let df = F(bG, a)
391+ if (if (if (cR)
392+ then (cA != d)
381393 else false)
382- then (de > dd)
394+ then (dg > df)
383395 else false)
384- then throw(((("Price slippage " + toString(de)) + " > ") + toString(dd)))
396+ then throw(((("Price slippage " + toString(dg)) + " > ") + toString(df)))
385397 else {
386- let df = F(cY, a)
387- let dg = fraction(cZ, cy, c)
388- let dh = fraction(da, c, cy)
389- let di = if ((dg > da))
390- then $Tuple2(dh, da)
391- else $Tuple2(cZ, dg)
392- let dj = di._1
393- let dk = di._2
394- let ca = fraction(df, dk, cx)
395- $Tuple5(I(ca, a), I(dj, cW), I(dk, cX), cy, dd)
398+ let dh = F(da, a)
399+ let di = fraction(db, cA, c)
400+ let dj = fraction(dc, c, cA)
401+ let dk = if ((di > dc))
402+ then $Tuple2(dj, dc)
403+ else $Tuple2(db, di)
404+ let dl = dk._1
405+ let dm = dk._2
406+ let cb = fraction(dh, dm, cz)
407+ $Tuple5(I(cb, a), I(dl, cY), I(dm, cZ), cA, df)
396408 }
397409 }
398- let dl = dc._1
399- let dm = dc._2
400- let dn = dc._3
401- let cz = I(dc._4, a)
402- let do = I(dc._5, a)
403- if ((0 >= dl))
410+ let dn = de._1
411+ let do = de._2
412+ let dp = de._3
413+ let cB = I(de._4, a)
414+ let dq = I(de._5, a)
415+ if ((0 >= dn))
404416 then throw("LP <= 0")
405417 else {
406- let dp = if (!(cN))
418+ let dr = if (!(cP))
407419 then 0
408- else dl
409- let dq = (cI - dm)
410- let dr = (cK - dn)
411- let ds = if (if (cO)
412- then (cR == cS)
420+ else dn
421+ let ds = (cK - do)
422+ let dt = (cM - dp)
423+ let du = if (if (cQ)
424+ then (cT == cU)
413425 else false)
414- then $Tuple2(cQ, 0)
415- else if (if (cO)
416- then (cR == cT)
426+ then $Tuple2(cS, 0)
427+ else if (if (cQ)
428+ then (cT == cV)
417429 else false)
418- then $Tuple2(0, cQ)
419- else $Tuple2(dm, dn)
420- let dt = ds._1
421- let du = ds._2
422- let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, cj), bi(dt, du, dp, cz, bF, do, height, lastBlock.timestamp, dq, dr))]
423- $Tuple13(dl, dp, cz, cu, cw, cY, cn, cs, dv, dq, dr, cJ, cL)
430+ then $Tuple2(0, cS)
431+ else $Tuple2(do, dp)
432+ let dv = du._1
433+ let dw = du._2
434+ let dx = [IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB), StringEntry(Y(co, cl), bj(dv, dw, dr, cB, bG, dq, height, lastBlock.timestamp, ds, dt))]
435+ $Tuple13(dn, dr, cB, cw, cy, da, cp, cu, dx, ds, dt, cL, cN)
424436 }
425437 }
426438
427439
428-func dw (dx) = {
429- let bW = aK()
430- let dy = bW[u]
431- let dz = bW[v]
432- let cs = parseIntValue(bW[s])
433- let bX = parseIntValue(bW[w])
434- let bY = parseIntValue(bW[x])
435- let dA = bx(dy)
436- let dB = bx(dz)
437- let cy = if ((dx.orderType == Buy))
438- then bN(bX, bY, (dA + dx.amount), dB)
439- else bN(bX, bY, (dA - dx.amount), dB)
440- let cz = I(cy, a)
441- if (if (if (aH())
440+func dy (dz) = {
441+ let bX = aL()
442+ let dA = bX[u]
443+ let dB = bX[v]
444+ let cu = parseIntValue(bX[s])
445+ let bY = parseIntValue(bX[w])
446+ let bZ = parseIntValue(bX[x])
447+ let dC = by(dA)
448+ let dD = by(dB)
449+ let cA = if ((dz.orderType == Buy))
450+ then bO(bY, bZ, (dC + dz.amount), dD)
451+ else bO(bY, bZ, (dC - dz.amount), dD)
452+ let cB = I(cA, a)
453+ if (if (if (aI())
442454 then true
443- else (cs == p))
455+ else (cu == p))
444456 then true
445- else (cs == q))
457+ else (cu == q))
446458 then throw("Admin blocked")
447459 else {
448- let dC = dx.assetPair.amountAsset
449- let dD = if ((dC == unit))
450- then "WAVES"
451- else toBase58String(value(dC))
452- let dE = dx.assetPair.priceAsset
460+ let dE = dz.assetPair.amountAsset
453461 let dF = if ((dE == unit))
454462 then "WAVES"
455463 else toBase58String(value(dE))
456- if (if ((dD != dy))
464+ let dG = dz.assetPair.priceAsset
465+ let dH = if ((dG == unit))
466+ then "WAVES"
467+ else toBase58String(value(dG))
468+ if (if ((dF != dA))
457469 then true
458- else (dF != dz))
470+ else (dH != dB))
459471 then throw("Wr assets")
460472 else {
461- let dG = dx.price
462- let cX = fraction(a, bY, bX)
463- let dH = L(dG, a, cX)
464- let dI = if ((dx.orderType == Buy))
465- then (cz >= dH)
466- else (dH >= cz)
473+ let dI = dz.price
474+ let cZ = fraction(a, bZ, bY)
475+ let dJ = L(dI, a, cZ)
476+ let dK = if ((dz.orderType == Buy))
477+ then (cB >= dJ)
478+ else (dJ >= cB)
467479 true
468480 }
469481 }
470482 }
471483
472484
473-func dJ (dK) = if ((size(dK.payments) != 1))
485+func dL (dM) = if ((size(dM.payments) != 1))
474486 then throw("1 pmnt exp")
475487 else {
476- let dL = value(dK.payments[0])
477- let ck = value(dL.assetId)
478- let cQ = dL.amount
479- let dc = ci(toBase58String(dK.transactionId), toBase58String(ck), cQ, dK.caller)
480- let cE = dc._1
481- let cF = dc._2
482- let cs = parseIntValue(dc._9)
483- let cG = dc._10
484- if (if (aH())
488+ let dN = value(dM.payments[0])
489+ let cm = value(dN.assetId)
490+ let cS = dN.amount
491+ let de = ck(toBase58String(dM.transactionId), toBase58String(cm), cS, dM.caller)
492+ let cG = de._1
493+ let cH = de._2
494+ let cu = parseIntValue(de._9)
495+ let cI = de._10
496+ if (if (aI())
485497 then true
486- else (cs == q))
487- then throw(("Admin blocked: " + toString(cs)))
488- else $Tuple5(cE, cF, cQ, ck, cG)
498+ else (cu == q))
499+ then throw(("Admin blocked: " + toString(cu)))
500+ else $Tuple5(cG, cH, cS, cm, cI)
489501 }
490502
491503
492-func dM (dN,aa,dO,dP,bF,cN,cO,cP,cQ,cR) = {
493- let dc = cH(aa, bF, value(dO).amount, value(dO).assetId, value(dP).amount, value(dP).assetId, dN, (aa == ""), cN, cO, cP, cQ, cR)
494- let cs = parseIntValue(dc._8)
495- if (if (if (aH())
504+func dO (dP,aa,dQ,dR,bG,cP,cQ,cR,cS,cT) = {
505+ let de = cJ(aa, bG, value(dQ).amount, value(dQ).assetId, value(dR).amount, value(dR).assetId, dP, (aa == ""), cP, cQ, cR, cS, cT)
506+ let cu = parseIntValue(de._8)
507+ if (if (if (aI())
496508 then true
497- else (cs == o))
509+ else (cu == o))
498510 then true
499- else (cs == q))
500- then throw(("Blocked:" + toString(cs)))
501- else dc
511+ else (cu == q))
512+ then throw(("Blocked:" + toString(cu)))
513+ else de
502514 }
503515
504516
505-func dQ (dR) = {
506- let dS = g
507- let dT = dR[0]
508- let dU = dR[1]
509- let dV = parseBigIntValue(j)
510- let dW = (parseBigIntValue(aG) * dV)
511- let dX = (dT + dU)
512- if ((dX == e))
517+func dS (dT) = {
518+ let dU = g
519+ let dV = dT[0]
520+ let dW = dT[1]
521+ let dX = parseBigIntValue(j)
522+ let dY = (parseBigIntValue(aH) * dX)
523+ let dZ = (dV + dW)
524+ if ((dZ == e))
513525 then e
514526 else {
515- let dY = (dW * dS)
516- let dZ = (((dT * dU) * dS) * dS)
517- let ea = ((dY * dX) / dV)
518- let eb = (dY - dV)
519- let ec = (dS + f)
520- func ed (ee,ef) = {
521- let eg = ee
522- let eh = eg._1
523- let ei = eg._2
524- if ((ei != unit))
525- then ee
527+ let ea = (dY * dU)
528+ let eb = (((dV * dW) * dU) * dU)
529+ let ec = ((ea * dZ) / dX)
530+ let ed = (ea - dX)
531+ let ee = (dU + f)
532+ func ef (eg,eh) = {
533+ let ei = eg
534+ let ej = ei._1
535+ let ek = ei._2
536+ if ((ek != unit))
537+ then eg
526538 else {
527- let ej = (((eh * eh) * eh) / dZ)
528- let ek = (((ea + (ej * dS)) * eh) / (((eb * eh) / dV) + (ec * ej)))
529- let el = Q((ek - value(eh)))
530- if ((f >= el))
531- then $Tuple2(ek, ef)
532- else $Tuple2(ek, unit)
539+ let el = (((ej * ej) * ej) / eb)
540+ let em = (((ec + (el * dU)) * ej) / (((ed * ej) / dX) + (ee * el)))
541+ let en = Q((em - value(ej)))
542+ if ((f >= en))
543+ then $Tuple2(em, eh)
544+ else $Tuple2(em, unit)
533545 }
534546 }
535547
536- let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
537- let en = {
538- let eo = em
539- let ep = size(eo)
540- let eq = $Tuple2(dX, unit)
541- func er (es,et) = if ((et >= ep))
542- then es
543- else ed(es, eo[et])
548+ let eo = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
549+ let ep = {
550+ let eq = eo
551+ let er = size(eq)
552+ let es = $Tuple2(dZ, unit)
553+ func et (eu,ev) = if ((ev >= er))
554+ then eu
555+ else ef(eu, eq[ev])
544556
545- func eu (es,et) = if ((et >= ep))
546- then es
557+ func ew (eu,ev) = if ((ev >= er))
558+ then eu
547559 else throw("List size exceeds 15")
548560
549- eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
561+ ew(et(et(et(et(et(et(et(et(et(et(et(et(et(et(et(es, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
550562 }
551- let eh = en._1
552- let ei = en._2
553- if ((ei != unit))
554- then eh
555- else throw(("D calculation error, D = " + toString(eh)))
563+ let ej = ep._1
564+ let ek = ep._2
565+ if ((ek != unit))
566+ then ej
567+ else throw(("D calculation error, D = " + toString(ej)))
556568 }
557569 }
558570
559571
560-func ev (dR,dK,ew) = {
561- let dS = g
562- let ex = dR[if ((dK == 0))
572+func ex (dT,dM,ey) = {
573+ let dU = g
574+ let ez = dT[if ((dM == 0))
563575 then 1
564576 else 0]
565- let dV = parseBigIntValue(j)
566- let dW = (parseBigIntValue(aG) * dV)
567- let dX = ex
568- let dY = (dW * dS)
569- let ey = (((((ew * ew) / (ex * dS)) * ew) * dV) / (dY * dS))
570- let ez = ((dX + ((ew * dV) / dY)) - ew)
571- func ed (ee,ef) = {
572- let eA = ee
573- let eB = eA._1
574- let ei = eA._2
575- if ((ei != unit))
576- then ee
577+ let dX = parseBigIntValue(j)
578+ let dY = (parseBigIntValue(aH) * dX)
579+ let dZ = ez
580+ let ea = (dY * dU)
581+ let eA = (((((ey * ey) / (ez * dU)) * ey) * dX) / (ea * dU))
582+ let eB = ((dZ + ((ey * dX) / ea)) - ey)
583+ func ef (eg,eh) = {
584+ let eC = eg
585+ let eD = eC._1
586+ let ek = eC._2
587+ if ((ek != unit))
588+ then eg
577589 else {
578- let eC = (((eB * eB) + ey) / ((g * eB) + ez))
579- let eD = Q((eC - value(eB)))
580- if ((f >= eD))
581- then $Tuple2(eC, ef)
582- else $Tuple2(eC, unit)
590+ let eE = (((eD * eD) + eA) / ((g * eD) + eB))
591+ let eF = Q((eE - value(eD)))
592+ if ((f >= eF))
593+ then $Tuple2(eE, eh)
594+ else $Tuple2(eE, unit)
583595 }
584596 }
585597
586- let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
587- let eE = {
588- let eo = em
589- let ep = size(eo)
590- let eq = $Tuple2(ew, unit)
591- func er (es,et) = if ((et >= ep))
592- then es
593- else ed(es, eo[et])
598+ let eo = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
599+ let eG = {
600+ let eq = eo
601+ let er = size(eq)
602+ let es = $Tuple2(ey, unit)
603+ func et (eu,ev) = if ((ev >= er))
604+ then eu
605+ else ef(eu, eq[ev])
594606
595- func eu (es,et) = if ((et >= ep))
596- then es
607+ func ew (eu,ev) = if ((ev >= er))
608+ then eu
597609 else throw("List size exceeds 15")
598610
599- eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
611+ ew(et(et(et(et(et(et(et(et(et(et(et(et(et(et(et(es, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
600612 }
601- let eB = eE._1
602- let ei = eE._2
603- if ((ei != unit))
604- then eB
605- else throw(("Y calculation error, Y = " + toString(eB)))
613+ let eD = eG._1
614+ let ek = eG._2
615+ if ((ek != unit))
616+ then eD
617+ else throw(("Y calculation error, Y = " + toString(eD)))
606618 }
607619
608620
609-func eF (eG,ck,cm,aa,eH) = {
610- let aS = aK()
611- let co = aS[u]
612- let cp = aS[v]
613- let cn = aS[t]
614- let cW = parseIntValue(aS[w])
615- let cX = parseIntValue(aS[x])
616- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
617- let eJ = if ((eI > e))
621+func eH (eI,cm,co,aa,eJ) = {
622+ let aT = aL()
623+ let cq = aT[u]
624+ let cr = aT[v]
625+ let cp = aT[t]
626+ let cY = parseIntValue(aT[w])
627+ let cZ = parseIntValue(aT[x])
628+ let eK = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cp)), "invalid lp asset").quantity)
629+ let eL = if ((eK > e))
618630 then true
619631 else throw("initial deposit requires all coins")
620- if ((eJ == eJ))
632+ if ((eL == eL))
621633 then {
622- let cu = bx(co)
623- let cw = bx(cp)
624- let eK = if ((aa == ""))
625- then $Tuple2(cu, cw)
626- else if ((ck == co))
627- then if ((eG > cu))
634+ let cw = by(cq)
635+ let cy = by(cr)
636+ let eM = if ((aa == ""))
637+ then $Tuple2(cw, cy)
638+ else if ((cm == cq))
639+ then if ((eI > cw))
628640 then throw("invalid payment amount")
629- else $Tuple2((cu - eG), cw)
630- else if ((ck == cp))
631- then if ((eG > cw))
641+ else $Tuple2((cw - eI), cy)
642+ else if ((cm == cr))
643+ then if ((eI > cy))
632644 then throw("invalid payment amount")
633- else $Tuple2(cu, (cw - eG))
645+ else $Tuple2(cw, (cy - eI))
634646 else throw("wrong pmtAssetId")
635- let eL = eK._1
636- let eM = eK._2
637- let eN = if ((ck == co))
638- then $Tuple2(eG, 0)
639- else if ((ck == cp))
640- then $Tuple2(0, eG)
647+ let eN = eM._1
648+ let eO = eM._2
649+ let eP = if ((cm == cq))
650+ then $Tuple2(eI, 0)
651+ else if ((cm == cr))
652+ then $Tuple2(0, eI)
641653 else throw("invalid payment")
642- let eO = eN._1
643- let eP = eN._2
644- let eQ = if (eH)
645- then $Tuple3(cf(eO)._1, cf(eP)._1, cf(eG)._2)
646- else $Tuple3(eO, eP, 0)
647- let eR = eQ._1
648- let eS = eQ._2
649- let ch = eQ._3
650- let eT = (eL + eR)
651- let eU = (eM + eS)
652- let bK = dQ([toBigInt(eL), toBigInt(eM)])
653- let bJ = dQ([toBigInt(eT), toBigInt(eU)])
654- let eV = if ((bJ > bK))
654+ let eQ = eP._1
655+ let eR = eP._2
656+ let eS = if (eJ)
657+ then $Tuple3(cg(eQ, aE)._1, cg(eR, aE)._1, cg(eI, aE)._2)
658+ else $Tuple3(eQ, eR, 0)
659+ let eT = eS._1
660+ let eU = eS._2
661+ let cj = eS._3
662+ let eV = (eN + eT)
663+ let eW = (eO + eU)
664+ let bL = dS([toBigInt(eN), toBigInt(eO)])
665+ let bK = dS([toBigInt(eV), toBigInt(eW)])
666+ let eX = if ((bK > bL))
655667 then true
656668 else throw()
657- if ((eV == eV))
669+ if ((eX == eX))
658670 then {
659- let eW = fraction(eI, (bJ - bK), bK)
660- let cz = I(bz(F(eU, cX), F(eT, cW)), a)
661- let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, aa), bi(eO, eP, toInt(eW), cz, 0, 0, height, lastBlock.timestamp, 0, 0))]
662- let eX = fraction(eM, a, eL)
663- let eY = fraction(eG, a, (eX + a))
664- let eZ = (eG - eY)
665- let fa = fraction(eI, toBigInt(eZ), toBigInt(eM))
666- let fb = toInt(fraction((eW - fa), b, fa))
667- $Tuple4(toInt(eW), dv, ch, fb)
671+ let eY = fraction(eK, (bK - bL), bL)
672+ let cB = I(bA(F(eW, cZ), F(eV, cY)), a)
673+ let dx = [IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB), StringEntry(Y(co, aa), bj(eQ, eR, toInt(eY), cB, 0, 0, height, lastBlock.timestamp, 0, 0))]
674+ let eZ = fraction(eO, a, eN)
675+ let fa = fraction(eI, a, (eZ + a))
676+ let fb = (eI - fa)
677+ let fc = fraction(eK, toBigInt(fb), toBigInt(eO))
678+ let fd = toInt(fraction((eY - fc), b, fc))
679+ $Tuple4(toInt(eY), dx, cj, fd)
668680 }
669681 else throw("Strict value is not equal to itself.")
670682 }
672684 }
673685
674686
675-func fc (fd,fe,ff,dN,fg,fh) = {
676- let aS = aK()
677- let cn = aS[t]
678- let co = aS[u]
679- let cp = aS[v]
680- let fi = parseIntValue(aS[w])
681- let fj = parseIntValue(aS[x])
682- let fk = aS[s]
683- let cm = if ((dN == bh))
684- then fg
685- else dN
686- let dL = value(ff[0])
687- let ck = value(dL.assetId)
688- let cQ = dL.amount
689- let cj = toBase58String(fh)
690- if ((cn != toBase58String(ck)))
687+func fe (ff,fg,fh,dP,fi,fj) = {
688+ let aT = aL()
689+ let cp = aT[t]
690+ let cq = aT[u]
691+ let cr = aT[v]
692+ let fk = parseIntValue(aT[w])
693+ let fl = parseIntValue(aT[x])
694+ let fm = aT[s]
695+ let co = if ((dP == bi))
696+ then fi
697+ else dP
698+ let dN = value(fh[0])
699+ let cm = value(dN.assetId)
700+ let cS = dN.amount
701+ let cl = toBase58String(fj)
702+ if ((cp != toBase58String(cm)))
691703 then throw("Wrong LP")
692704 else {
693- let cu = bx(co)
694- let cw = bx(cp)
695- let fl = {
696- let fm = invoke(this, "getOneTknV2READONLY", [fd, cQ], nil)
697- if ($isInstanceOf(fm, "(Int, Int)"))
698- then fm
699- else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
705+ let cw = by(cq)
706+ let cy = by(cr)
707+ let fn = {
708+ let aF = invoke(this, "getOneTknV2READONLY", [ff, cS], nil)
709+ if ($isInstanceOf(aF, "(Int, Int)"))
710+ then aF
711+ else throw(($getType(aF) + " couldn't be cast to (Int, Int)"))
700712 }
701- if ((fl == fl))
713+ if ((fn == fn))
702714 then {
703- let ch = fl._2
704- let fn = fl._1
705- let fo = if (if ((fe > 0))
706- then (fe > fn)
715+ let cj = fn._2
716+ let fo = fn._1
717+ let fp = if (if ((fg > 0))
718+ then (fg > fo)
707719 else false)
708- then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
709- else fn
710- let fp = if ((fd == co))
711- then $Tuple4(fo, 0, ((cu - fo) - ch), cw)
712- else if ((fd == cp))
713- then $Tuple4(0, fo, cu, ((cw - fo) - ch))
720+ then aB(makeString(["amount to receive is less than ", toString(fg)], ""))
721+ else fo
722+ let fq = if ((ff == cq))
723+ then $Tuple4(fp, 0, ((cw - fp) - cj), cy)
724+ else if ((ff == cr))
725+ then $Tuple4(0, fp, cw, ((cy - fp) - cj))
714726 else throw("invalid out asset id")
715- let fq = fp._1
716- let fr = fp._2
717- let eT = fp._3
718- let eU = fp._4
719- let fs = bz(F(eU, fj), F(eT, fi))
720- let ft = I(fs, a)
721- let fu = if ((fd == "WAVES"))
727+ let fr = fq._1
728+ let fs = fq._2
729+ let eV = fq._3
730+ let eW = fq._4
731+ let ft = bA(F(eW, fl), F(eV, fk))
732+ let fu = I(ft, a)
733+ let fv = if ((ff == "WAVES"))
722734 then unit
723- else fromBase58String(fd)
724- let fv = if ((ch > 0))
725- then [ScriptTransfer(aJ, ch, fu)]
735+ else fromBase58String(ff)
736+ let fw = if ((cj > 0))
737+ then [ScriptTransfer(aK, cj, fv)]
726738 else nil
727- let cG = ([ScriptTransfer(cm, fo, fu), StringEntry(ab(toString(cm), cj), bt(fq, fr, cQ, ft, height, lastBlock.timestamp)), IntegerEntry(U(), ft), IntegerEntry(V(height, lastBlock.timestamp), ft)] ++ fv)
728- if ((cG == cG))
739+ let cI = ([ScriptTransfer(co, fp, fv), StringEntry(ab(toString(co), cl), bu(fr, fs, cS, fu, height, lastBlock.timestamp)), IntegerEntry(U(), fu), IntegerEntry(V(height, lastBlock.timestamp), fu)] ++ fw)
740+ if ((cI == cI))
729741 then {
730- let fw = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
731- if ((fw == fw))
732- then $Tuple2(cG, fo)
742+ let fx = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)])
743+ if ((fx == fx))
744+ then $Tuple2(cI, fp)
733745 else throw("Strict value is not equal to itself.")
734746 }
735747 else throw("Strict value is not equal to itself.")
739751 }
740752
741753
742-func fx () = {
743- let ax = getString(S())
744- if ($isInstanceOf(ax, "String"))
754+func fy () = {
755+ let av = getString(S())
756+ if ($isInstanceOf(av, "String"))
745757 then {
746- let dX = ax
747- fromBase58String(dX)
758+ let dZ = av
759+ fromBase58String(dZ)
748760 }
749- else if ($isInstanceOf(ax, "Unit"))
761+ else if ($isInstanceOf(av, "Unit"))
750762 then unit
751763 else throw("Match error")
752764 }
753765
754766
755-func fy () = {
756- let ax = getString(T())
757- if ($isInstanceOf(ax, "String"))
767+func fz () = {
768+ let av = getString(T())
769+ if ($isInstanceOf(av, "String"))
758770 then {
759- let dX = ax
760- fromBase58String(dX)
771+ let dZ = av
772+ fromBase58String(dZ)
761773 }
762- else if ($isInstanceOf(ax, "Unit"))
774+ else if ($isInstanceOf(av, "Unit"))
763775 then unit
764776 else throw("Match error")
765777 }
766778
767779
768-let fz = throw("Permission denied")
780+let fA = throw("Permission denied")
769781
770-func fA (dK) = {
771- let ax = fx()
772- if ($isInstanceOf(ax, "ByteVector"))
782+func fB (dM) = {
783+ let av = fy()
784+ if ($isInstanceOf(av, "ByteVector"))
773785 then {
774- let fB = ax
775- (dK.callerPublicKey == fB)
786+ let fC = av
787+ (dM.callerPublicKey == fC)
776788 }
777- else if ($isInstanceOf(ax, "Unit"))
778- then (dK.caller == this)
789+ else if ($isInstanceOf(av, "Unit"))
790+ then (dM.caller == this)
779791 else throw("Match error")
780792 }
781793
782794
783-func fC (dK) = {
784- let ax = fx()
785- if ($isInstanceOf(ax, "ByteVector"))
795+func fD (dM) = {
796+ let av = fy()
797+ if ($isInstanceOf(av, "ByteVector"))
786798 then {
787- let fB = ax
788- if ((dK.callerPublicKey == fB))
799+ let fC = av
800+ if ((dM.callerPublicKey == fC))
789801 then true
790- else fz
802+ else fA
791803 }
792- else if ($isInstanceOf(ax, "Unit"))
793- then if ((dK.caller == this))
804+ else if ($isInstanceOf(av, "Unit"))
805+ then if ((dM.caller == this))
794806 then true
795- else fz
807+ else fA
796808 else throw("Match error")
797809 }
798810
799811
800-@Callable(dK)
812+@Callable(dM)
801813 func constructor (R) = {
802- let ey = fC(dK)
803- if ((ey == ey))
814+ let eA = fD(dM)
815+ if ((eA == eA))
804816 then [StringEntry(R(), R)]
805817 else throw("Strict value is not equal to itself.")
806818 }
807819
808820
809821
810-@Callable(dK)
811-func setManager (fD) = {
812- let ey = fC(dK)
813- if ((ey == ey))
822+@Callable(dM)
823+func setManager (fE) = {
824+ let eA = fD(dM)
825+ if ((eA == eA))
814826 then {
815- let fE = fromBase58String(fD)
816- if ((fE == fE))
817- then [StringEntry(T(), fD)]
827+ let fF = fromBase58String(fE)
828+ if ((fF == fF))
829+ then [StringEntry(T(), fE)]
818830 else throw("Strict value is not equal to itself.")
819831 }
820832 else throw("Strict value is not equal to itself.")
822834
823835
824836
825-@Callable(dK)
837+@Callable(dM)
826838 func confirmManager () = {
827- let ce = fy()
828- let fF = if (isDefined(ce))
839+ let cf = fz()
840+ let fG = if (isDefined(cf))
829841 then true
830842 else throw("No pending manager")
831- if ((fF == fF))
843+ if ((fG == fG))
832844 then {
833- let fG = if ((dK.callerPublicKey == value(ce)))
845+ let fH = if ((dM.callerPublicKey == value(cf)))
834846 then true
835847 else throw("You are not pending manager")
836- if ((fG == fG))
837- then [StringEntry(S(), toBase58String(value(ce))), DeleteEntry(T())]
848+ if ((fH == fH))
849+ then [StringEntry(S(), toBase58String(value(cf))), DeleteEntry(T())]
838850 else throw("Strict value is not equal to itself.")
839851 }
840852 else throw("Strict value is not equal to itself.")
842854
843855
844856
845-@Callable(dK)
846-func put (fH,fI) = {
847- let fJ = bc()
848- let fK = valueOrErrorMessage(addressFromString(fJ[A]), "Wr st addr")
849- let fL = valueOrErrorMessage(addressFromString(fJ[C]), "Wr sl addr")
850- if ((0 > fH))
857+@Callable(dM)
858+func put (fI,fJ) = {
859+ let fK = bd()
860+ let fL = valueOrErrorMessage(addressFromString(fK[A]), "Wr st addr")
861+ let fM = valueOrErrorMessage(addressFromString(fK[C]), "Wr sl addr")
862+ if ((0 > fI))
851863 then throw("Wrong slippage")
852- else if ((size(dK.payments) != 2))
864+ else if ((size(dM.payments) != 2))
853865 then throw("2 pmnts expd")
854866 else {
855- let fM = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fH, true, false, true, 0, "")
856- let dp = fM._2
857- let fN = fM._7
858- let cG = fM._9
859- let dq = fM._10
860- let dr = fM._11
861- let co = fM._12
862- let cp = fM._13
863- let dc = invoke(aF, "emit", [dp], nil)
864- if ((dc == dc))
867+ let fN = dO(toString(dM.caller), toBase58String(dM.transactionId), AttachedPayment(value(dM.payments[0]).assetId, value(dM.payments[0]).amount), dM.payments[1], fI, true, false, true, 0, "")
868+ let dr = fN._2
869+ let fO = fN._7
870+ let cI = fN._9
871+ let ds = fN._10
872+ let dt = fN._11
873+ let cq = fN._12
874+ let cr = fN._13
875+ let de = invoke(aD, "emit", [dr], nil)
876+ if ((de == de))
865877 then {
866- let fO = {
867- let ax = dc
868- if ($isInstanceOf(ax, "Address"))
878+ let fP = {
879+ let av = de
880+ if ($isInstanceOf(av, "Address"))
869881 then {
870- let fP = ax
871- invoke(fP, "emit", [dp], nil)
882+ let fQ = av
883+ invoke(fQ, "emit", [dr], nil)
872884 }
873885 else unit
874886 }
875- if ((fO == fO))
887+ if ((fP == fP))
876888 then {
877- let fQ = if ((dq > 0))
878- then invoke(fL, "put", nil, [AttachedPayment(co, dq)])
889+ let fR = if ((ds > 0))
890+ then invoke(fM, "put", nil, [AttachedPayment(cq, ds)])
879891 else nil
880- if ((fQ == fQ))
892+ if ((fR == fR))
881893 then {
882- let fR = if ((dr > 0))
883- then invoke(fL, "put", nil, [AttachedPayment(cp, dr)])
894+ let fS = if ((dt > 0))
895+ then invoke(fM, "put", nil, [AttachedPayment(cr, dt)])
884896 else nil
885- if ((fR == fR))
897+ if ((fS == fS))
886898 then {
887- let fS = if (fI)
899+ let fT = if (fJ)
888900 then {
889- let fT = invoke(fK, "stake", nil, [AttachedPayment(fN, dp)])
890- if ((fT == fT))
901+ let fU = invoke(fL, "stake", nil, [AttachedPayment(fO, dr)])
902+ if ((fU == fU))
891903 then nil
892904 else throw("Strict value is not equal to itself.")
893905 }
894- else [ScriptTransfer(dK.caller, dp, fN)]
895- (cG ++ fS)
906+ else [ScriptTransfer(dM.caller, dr, fO)]
907+ (cI ++ fT)
896908 }
897909 else throw("Strict value is not equal to itself.")
898910 }
906918
907919
908920
909-@Callable(dK)
910-func putOneTknV2 (fe,fI) = {
911- let fU = {
912- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
913- if ($isInstanceOf(fm, "Boolean"))
914- then fm
915- else throw(($getType(fm) + " couldn't be cast to Boolean"))
921+@Callable(dM)
922+func putOneTknV2 (fg,fJ) = {
923+ let fV = {
924+ let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
925+ if ($isInstanceOf(aF, "Boolean"))
926+ then aF
927+ else throw(($getType(aF) + " couldn't be cast to Boolean"))
916928 }
917- let fV = if (if (if (aH())
929+ let fW = if (if (if (aI())
918930 then true
919- else (aW == o))
931+ else (aX == o))
920932 then true
921- else (aW == q))
933+ else (aX == q))
922934 then true
923- else fU
924- let fW = [if (if (!(fV))
935+ else fV
936+ let fX = [if (if (!(fW))
925937 then true
926- else fA(dK))
938+ else fB(dM))
927939 then true
928- else aD("put operation is blocked by admin"), if ((size(dK.payments) == 1))
940+ else aB("put operation is blocked by admin"), if ((size(dM.payments) == 1))
929941 then true
930- else aD("exactly 1 payment are expected")]
931- if ((fW == fW))
942+ else aB("exactly 1 payment are expected")]
943+ if ((fX == fX))
932944 then {
933- let aS = aK()
934- let co = aS[u]
935- let cp = aS[v]
936- let cn = fromBase58String(aS[t])
937- let fi = parseIntValue(aS[w])
938- let fj = parseIntValue(aS[x])
939- let cm = if ((dK.caller == this))
940- then dK.originCaller
941- else dK.caller
942- let dL = value(dK.payments[0])
943- let ck = toBase58String(value(dL.assetId))
944- let cQ = dL.amount
945- let fX = eF(cQ, ck, toString(cm), toBase58String(dK.transactionId), true)
946- if ((fX == fX))
945+ let aT = aL()
946+ let cq = aT[u]
947+ let cr = aT[v]
948+ let cp = fromBase58String(aT[t])
949+ let fk = parseIntValue(aT[w])
950+ let fl = parseIntValue(aT[x])
951+ let co = if ((dM.caller == this))
952+ then dM.originCaller
953+ else dM.caller
954+ let dN = value(dM.payments[0])
955+ let cm = toBase58String(value(dN.assetId))
956+ let cS = dN.amount
957+ let fY = eH(cS, cm, toString(co), toBase58String(dM.transactionId), true)
958+ if ((fY == fY))
947959 then {
948- let ch = fX._3
949- let cG = fX._2
950- let fY = fX._1
951- let dp = if (if ((fe > 0))
952- then (fe > fY)
960+ let cj = fY._3
961+ let cI = fY._2
962+ let fZ = fY._1
963+ let dr = if (if ((fg > 0))
964+ then (fg > fZ)
953965 else false)
954- then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
955- else fY
956- let fM = invoke(aF, "emit", [dp], nil)
957- if ((fM == fM))
966+ then aB(makeString(["amount to receive is less than ", toString(fg)], ""))
967+ else fZ
968+ let fN = invoke(aD, "emit", [dr], nil)
969+ if ((fN == fN))
958970 then {
959- let fO = {
960- let ax = fM
961- if ($isInstanceOf(ax, "Address"))
971+ let fP = {
972+ let av = fN
973+ if ($isInstanceOf(av, "Address"))
962974 then {
963- let fP = ax
964- invoke(fP, "emit", [dp], nil)
975+ let fQ = av
976+ invoke(fQ, "emit", [dr], nil)
965977 }
966978 else unit
967979 }
968- if ((fO == fO))
980+ if ((fP == fP))
969981 then {
970- let fS = if (fI)
982+ let fT = if (fJ)
971983 then {
972- let fT = invoke(be, "stake", nil, [AttachedPayment(cn, dp)])
973- if ((fT == fT))
984+ let fU = invoke(bf, "stake", nil, [AttachedPayment(cp, dr)])
985+ if ((fU == fU))
974986 then nil
975987 else throw("Strict value is not equal to itself.")
976988 }
977- else [ScriptTransfer(dK.caller, dp, cn)]
978- let fv = if ((ch > 0))
979- then [ScriptTransfer(aJ, ch, fromBase58String(ck))]
989+ else [ScriptTransfer(dM.caller, dr, cp)]
990+ let fw = if ((cj > 0))
991+ then [ScriptTransfer(aK, cj, fromBase58String(cm))]
980992 else nil
981- $Tuple2(((cG ++ fS) ++ fv), dp)
993+ $Tuple2(((cI ++ fT) ++ fw), dr)
982994 }
983995 else throw("Strict value is not equal to itself.")
984996 }
9911003
9921004
9931005
994-@Callable(dK)
995-func putForFree (fZ) = if ((0 > fZ))
1006+@Callable(dM)
1007+func putForFree (ga) = if ((0 > ga))
9961008 then throw("Wrong slpg")
997- else if ((size(dK.payments) != 2))
1009+ else if ((size(dM.payments) != 2))
9981010 then throw("2 pmnts expd")
9991011 else {
1000- let ga = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fZ, false, false, true, 0, "")
1001- ga._9
1012+ let gb = dO(toString(dM.caller), toBase58String(dM.transactionId), AttachedPayment(value(dM.payments[0]).assetId, value(dM.payments[0]).amount), dM.payments[1], ga, false, false, true, 0, "")
1013+ gb._9
10021014 }
10031015
10041016
10051017
1006-@Callable(dK)
1018+@Callable(dM)
10071019 func get () = {
1008- let dc = dJ(dK)
1009- let gb = dc._1
1010- let cF = dc._2
1011- let cQ = dc._3
1012- let ck = dc._4
1013- let cG = dc._5
1014- let ez = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1015- if ((ez == ez))
1016- then cG
1020+ let de = dL(dM)
1021+ let gc = de._1
1022+ let cH = de._2
1023+ let cS = de._3
1024+ let cm = de._4
1025+ let cI = de._5
1026+ let eB = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)])
1027+ if ((eB == eB))
1028+ then cI
10171029 else throw("Strict value is not equal to itself.")
10181030 }
10191031
10201032
10211033
1022-@Callable(dK)
1023-func getOneTknV2 (fd,fe) = {
1024- let fU = {
1025- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1026- if ($isInstanceOf(fm, "Boolean"))
1027- then fm
1028- else throw(($getType(fm) + " couldn't be cast to Boolean"))
1034+@Callable(dM)
1035+func getOneTknV2 (ff,fg) = {
1036+ let fV = {
1037+ let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1038+ if ($isInstanceOf(aF, "Boolean"))
1039+ then aF
1040+ else throw(($getType(aF) + " couldn't be cast to Boolean"))
10291041 }
1030- let gc = if (if (aH())
1042+ let gd = if (if (aI())
10311043 then true
1032- else (aW == q))
1044+ else (aX == q))
10331045 then true
1034- else fU
1035- let fW = [if (if (!(gc))
1046+ else fV
1047+ let fX = [if (if (!(gd))
10361048 then true
1037- else fA(dK))
1049+ else fB(dM))
10381050 then true
1039- else aD("get operation is blocked by admin"), if ((size(dK.payments) == 1))
1051+ else aB("get operation is blocked by admin"), if ((size(dM.payments) == 1))
10401052 then true
1041- else aD("exactly 1 payment are expected")]
1042- if ((fW == fW))
1053+ else aB("exactly 1 payment are expected")]
1054+ if ((fX == fX))
10431055 then {
1044- let gd = fc(fd, fe, dK.payments, dK.caller, dK.originCaller, dK.transactionId)
1045- let cG = gd._1
1046- let fo = gd._2
1047- $Tuple2(cG, fo)
1056+ let ge = fe(ff, fg, dM.payments, dM.caller, dM.originCaller, dM.transactionId)
1057+ let cI = ge._1
1058+ let fp = ge._2
1059+ $Tuple2(cI, fp)
10481060 }
10491061 else throw("Strict value is not equal to itself.")
10501062 }
10511063
10521064
10531065
1054-@Callable(dK)
1055-func getOneTknV2READONLY (fd,ge) = {
1056- let aS = aK()
1057- let co = aS[u]
1058- let cp = aS[v]
1059- let cn = aS[t]
1060- let dR = [toBigInt(bx(co)), toBigInt(bx(cp))]
1061- let gf = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
1062- let bK = dQ(dR)
1063- let bJ = (bK - fraction(toBigInt(ge), bK, gf))
1064- let gg = if ((fd == co))
1066+@Callable(dM)
1067+func getOneTknV2READONLY (ff,gf) = {
1068+ let aT = aL()
1069+ let cq = aT[u]
1070+ let cr = aT[v]
1071+ let cp = aT[t]
1072+ let dT = [toBigInt(by(cq)), toBigInt(by(cr))]
1073+ let gg = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cp)), "invalid lp asset").quantity)
1074+ let bL = dS(dT)
1075+ let bK = (bL - fraction(toBigInt(gf), bL, gg))
1076+ let gh = if ((ff == cq))
10651077 then 0
1066- else if ((fd == cp))
1078+ else if ((ff == cr))
10671079 then 1
10681080 else throw("invalid out asset id")
1069- let gh = ev(dR, gg, bJ)
1070- let gi = (dR[gg] - gh)
1071- let gj = max([0, toInt((gi - f))])
1072- let gk = cf(gj)
1073- let fn = gk._1
1074- let ch = gk._2
1075- $Tuple2(nil, $Tuple2(fn, ch))
1081+ let gi = ex(dT, gh, bK)
1082+ let gj = (dT[gh] - gi)
1083+ let gk = max([0, toInt((gj - f))])
1084+ let gl = cg(gk, aG)
1085+ let fo = gl._1
1086+ let cj = gl._2
1087+ $Tuple2(nil, $Tuple2(fo, cj))
10761088 }
10771089
10781090
10791091
1080-@Callable(dK)
1081-func getOneTknV2WithBonusREADONLY (fd,ge) = {
1082- let aS = aK()
1083- let co = aS[u]
1084- let cp = aS[v]
1085- let cn = aS[t]
1086- let cu = bx(co)
1087- let cw = bx(cp)
1088- let gl = {
1089- let fm = invoke(this, "getOneTknV2READONLY", [fd, ge], nil)
1090- if ($isInstanceOf(fm, "(Int, Int)"))
1091- then fm
1092- else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
1092+@Callable(dM)
1093+func getOneTknV2WithBonusREADONLY (ff,gf) = {
1094+ let aT = aL()
1095+ let cq = aT[u]
1096+ let cr = aT[v]
1097+ let cp = aT[t]
1098+ let cw = by(cq)
1099+ let cy = by(cr)
1100+ let gm = {
1101+ let aF = invoke(this, "getOneTknV2READONLY", [ff, gf], nil)
1102+ if ($isInstanceOf(aF, "(Int, Int)"))
1103+ then aF
1104+ else throw(($getType(aF) + " couldn't be cast to (Int, Int)"))
10931105 }
1094- let fn = gl._1
1095- let ch = gl._2
1096- let dc = ci("", cn, ge, this)
1097- let cE = dc._1
1098- let cF = dc._2
1099- let gm = (cE + cF)
1100- let fb = if ((gm == 0))
1101- then if ((fn == 0))
1106+ let fo = gm._1
1107+ let cj = gm._2
1108+ let de = ck("", cp, gf, this)
1109+ let cG = de._1
1110+ let cH = de._2
1111+ let gn = (cG + cH)
1112+ let fd = if ((gn == 0))
1113+ then if ((fo == 0))
11021114 then 0
11031115 else throw("bonus calculation error")
1104- else fraction((fn - gm), a, gm)
1105- $Tuple2(nil, $Tuple3(fn, ch, fb))
1116+ else fraction((fo - gn), a, gn)
1117+ $Tuple2(nil, $Tuple3(fo, cj, fd))
11061118 }
11071119
11081120
11091121
1110-@Callable(dK)
1111-func getNoLess (gn,go) = {
1112- let dc = dJ(dK)
1113- let cE = dc._1
1114- let cF = dc._2
1115- let cQ = dc._3
1116- let ck = dc._4
1117- let cG = dc._5
1118- if ((gn > cE))
1119- then throw(((("Failed: " + toString(cE)) + " < ") + toString(gn)))
1120- else if ((go > cF))
1121- then throw(((("Failed: " + toString(cF)) + " < ") + toString(go)))
1122+@Callable(dM)
1123+func getNoLess (go,gp) = {
1124+ let de = dL(dM)
1125+ let cG = de._1
1126+ let cH = de._2
1127+ let cS = de._3
1128+ let cm = de._4
1129+ let cI = de._5
1130+ if ((go > cG))
1131+ then throw(((("Failed: " + toString(cG)) + " < ") + toString(go)))
1132+ else if ((gp > cH))
1133+ then throw(((("Failed: " + toString(cH)) + " < ") + toString(gp)))
11221134 else {
1123- let gp = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1124- if ((gp == gp))
1125- then cG
1135+ let gq = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)])
1136+ if ((gq == gq))
1137+ then cI
11261138 else throw("Strict value is not equal to itself.")
11271139 }
11281140 }
11291141
11301142
11311143
1132-@Callable(dK)
1133-func unstakeAndGet (cg) = {
1134- let gq = if ((size(dK.payments) != 0))
1144+@Callable(dM)
1145+func unstakeAndGet (ch) = {
1146+ let gr = if ((size(dM.payments) != 0))
11351147 then throw("No pmnts expd")
11361148 else true
1137- if ((gq == gq))
1149+ if ((gr == gr))
11381150 then {
1139- let bW = aK()
1140- let gr = bc()
1141- let fN = fromBase58String(bW[t])
1142- let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1143- let gt = invoke(gs, "unstake", [toBase58String(fN), cg], nil)
1144- if ((gt == gt))
1151+ let bX = aL()
1152+ let gs = bd()
1153+ let fO = fromBase58String(bX[t])
1154+ let gt = valueOrErrorMessage(addressFromString(gs[A]), "Wr st addr")
1155+ let gu = invoke(gt, "unstake", [toBase58String(fO), ch], nil)
1156+ if ((gu == gu))
11451157 then {
1146- let dc = ci(toBase58String(dK.transactionId), toBase58String(fN), cg, dK.caller)
1147- let cs = parseIntValue(dc._9)
1148- let cG = dc._10
1149- let gu = if (if (aH())
1158+ let de = ck(toBase58String(dM.transactionId), toBase58String(fO), ch, dM.caller)
1159+ let cu = parseIntValue(de._9)
1160+ let cI = de._10
1161+ let gv = if (if (aI())
11501162 then true
1151- else (cs == q))
1152- then throw(("Blocked: " + toString(cs)))
1163+ else (cu == q))
1164+ then throw(("Blocked: " + toString(cu)))
11531165 else true
1154- if ((gu == gu))
1166+ if ((gv == gv))
11551167 then {
1156- let gv = invoke(aF, "burn", [cg], [AttachedPayment(fN, cg)])
1157- if ((gv == gv))
1158- then cG
1168+ let gw = invoke(aD, "burn", [ch], [AttachedPayment(fO, ch)])
1169+ if ((gw == gw))
1170+ then cI
11591171 else throw("Strict value is not equal to itself.")
11601172 }
11611173 else throw("Strict value is not equal to itself.")
11671179
11681180
11691181
1170-@Callable(dK)
1171-func unstakeAndGetNoLess (gw,gx,go) = {
1172- let gc = if (aH())
1182+@Callable(dM)
1183+func unstakeAndGetNoLess (gx,gy,gp) = {
1184+ let gd = if (aI())
11731185 then true
1174- else (aW == q)
1175- let fW = [if (!(gc))
1186+ else (aX == q)
1187+ let fX = [if (!(gd))
11761188 then true
1177- else throw("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1189+ else throw("get operation is blocked by admin"), if ((size(dM.payments) == 0))
11781190 then true
11791191 else throw("no payments are expected")]
1180- if ((fW == fW))
1192+ if ((fX == fX))
11811193 then {
1182- let gt = invoke(be, "unstake", [toBase58String(aX), gw], nil)
1183- if ((gt == gt))
1194+ let gu = invoke(bf, "unstake", [toBase58String(aY), gx], nil)
1195+ if ((gu == gu))
11841196 then {
1185- let gy = ci(toBase58String(dK.transactionId), toBase58String(aX), gw, dK.caller)
1186- let cE = gy._1
1187- let cF = gy._2
1188- let cG = gy._10
1189- let gz = [if ((cE >= gx))
1197+ let gz = ck(toBase58String(dM.transactionId), toBase58String(aY), gx, dM.caller)
1198+ let cG = gz._1
1199+ let cH = gz._2
1200+ let cI = gz._10
1201+ let gA = [if ((cG >= gy))
11901202 then true
1191- else throw(makeString(["amount asset amount to receive is less than ", toString(gx)], "")), if ((cF >= go))
1203+ else throw(makeString(["amount asset amount to receive is less than ", toString(gy)], "")), if ((cH >= gp))
11921204 then true
1193- else throw(makeString(["price asset amount to receive is less than ", toString(go)], ""))]
1194- if ((gz == gz))
1205+ else throw(makeString(["price asset amount to receive is less than ", toString(gp)], ""))]
1206+ if ((gA == gA))
11951207 then {
1196- let gp = invoke(aF, "burn", [gw], [AttachedPayment(aX, gw)])
1197- if ((gp == gp))
1198- then cG
1208+ let gq = invoke(aD, "burn", [gx], [AttachedPayment(aY, gx)])
1209+ if ((gq == gq))
1210+ then cI
11991211 else throw("Strict value is not equal to itself.")
12001212 }
12011213 else throw("Strict value is not equal to itself.")
12071219
12081220
12091221
1210-@Callable(dK)
1211-func unstakeAndGetOneTknV2 (gw,fd,fe) = {
1212- let fU = {
1213- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1214- if ($isInstanceOf(fm, "Boolean"))
1215- then fm
1216- else throw(($getType(fm) + " couldn't be cast to Boolean"))
1222+@Callable(dM)
1223+func unstakeAndGetOneTknV2 (gx,ff,fg) = {
1224+ let fV = {
1225+ let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1226+ if ($isInstanceOf(aF, "Boolean"))
1227+ then aF
1228+ else throw(($getType(aF) + " couldn't be cast to Boolean"))
12171229 }
1218- let gc = if (if (aH())
1230+ let gd = if (if (aI())
12191231 then true
1220- else (aW == q))
1232+ else (aX == q))
12211233 then true
1222- else fU
1223- let fW = [if (if (!(gc))
1234+ else fV
1235+ let fX = [if (if (!(gd))
12241236 then true
1225- else fA(dK))
1237+ else fB(dM))
12261238 then true
1227- else aD("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1239+ else aB("get operation is blocked by admin"), if ((size(dM.payments) == 0))
12281240 then true
1229- else aD("no payments are expected")]
1230- if ((fW == fW))
1241+ else aB("no payments are expected")]
1242+ if ((fX == fX))
12311243 then {
1232- let bW = aK()
1233- let gr = bc()
1234- let fN = fromBase58String(bW[t])
1235- let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1236- let gt = invoke(gs, "unstake", [toBase58String(fN), gw], nil)
1237- if ((gt == gt))
1244+ let bX = aL()
1245+ let gs = bd()
1246+ let fO = fromBase58String(bX[t])
1247+ let gt = valueOrErrorMessage(addressFromString(gs[A]), "Wr st addr")
1248+ let gu = invoke(gt, "unstake", [toBase58String(fO), gx], nil)
1249+ if ((gu == gu))
12381250 then {
1239- let gA = fc(fd, fe, [AttachedPayment(fN, gw)], dK.caller, dK.originCaller, dK.transactionId)
1240- let cG = gA._1
1241- let fo = gA._2
1242- $Tuple2(cG, fo)
1251+ let gB = fe(ff, fg, [AttachedPayment(fO, gx)], dM.caller, dM.originCaller, dM.transactionId)
1252+ let cI = gB._1
1253+ let fp = gB._2
1254+ $Tuple2(cI, fp)
12431255 }
12441256 else throw("Strict value is not equal to itself.")
12451257 }
12481260
12491261
12501262
1251-@Callable(dK)
1252-func putOneTknV2WithBonusREADONLY (gB,gC) = {
1253- let aS = aK()
1254- let co = aS[u]
1255- let cp = aS[v]
1256- let cn = aS[t]
1257- let gD = eF(gB, gC, "", "", true)
1258- let eW = gD._1
1259- let cG = gD._2
1260- let ch = gD._3
1261- let fb = gD._4
1262- $Tuple2(nil, $Tuple3(eW, ch, fb))
1263+@Callable(dM)
1264+func putOneTknV2WithBonusREADONLY (gC,gD) = {
1265+ let aT = aL()
1266+ let cq = aT[u]
1267+ let cr = aT[v]
1268+ let cp = aT[t]
1269+ let gE = eH(gC, gD, "", "", true)
1270+ let eY = gE._1
1271+ let cI = gE._2
1272+ let cj = gE._3
1273+ let fd = gE._4
1274+ $Tuple2(nil, $Tuple3(eY, cj, fd))
12631275 }
12641276
12651277
12661278
1267-@Callable(dK)
1268-func putOneTknV2WithoutTakeFeeREADONLY (gB,gC) = {
1269- let aS = aK()
1270- let co = aS[u]
1271- let cp = aS[v]
1272- let cn = aS[t]
1273- let gE = eF(gB, gC, "", "", false)
1274- let eW = gE._1
1275- let cG = gE._2
1276- let ch = gE._3
1277- let fb = gE._4
1278- $Tuple2(nil, $Tuple3(eW, ch, fb))
1279+@Callable(dM)
1280+func putOneTknV2WithoutTakeFeeREADONLY (gC,gD) = {
1281+ let aT = aL()
1282+ let cq = aT[u]
1283+ let cr = aT[v]
1284+ let cp = aT[t]
1285+ let gF = eH(gC, gD, "", "", false)
1286+ let eY = gF._1
1287+ let cI = gF._2
1288+ let cj = gF._3
1289+ let fd = gF._4
1290+ $Tuple2(nil, $Tuple3(eY, cj, fd))
12791291 }
12801292
12811293
12821294
1283-@Callable(dK)
1284-func activate (gF,gG) = if ((toString(dK.caller) != toString(aF)))
1295+@Callable(dM)
1296+func activate (gG,gH) = if ((toString(dM.caller) != toString(aD)))
12851297 then throw("denied")
1286- else $Tuple2([StringEntry(ac(), gF), StringEntry(ad(), gG)], "success")
1298+ else $Tuple2([StringEntry(ac(), gG), StringEntry(ad(), gH)], "success")
12871299
12881300
12891301
1290-@Callable(dK)
1291-func setS (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1292- then fz
1293- else [StringEntry(gH, gu)]
1302+@Callable(dM)
1303+func setS (gI,gv) = if ((toString(dM.caller) != ax(this, af())))
1304+ then fA
1305+ else [StringEntry(gI, gv)]
12941306
12951307
12961308
1297-@Callable(dK)
1298-func setI (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1299- then fz
1300- else [IntegerEntry(gH, gu)]
1309+@Callable(dM)
1310+func setI (gI,gv) = if ((toString(dM.caller) != ax(this, af())))
1311+ then fA
1312+ else [IntegerEntry(gI, gv)]
13011313
13021314
13031315
1304-@Callable(dK)
1305-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aK())
1316+@Callable(dM)
1317+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aL())
13061318
13071319
13081320
1309-@Callable(dK)
1310-func getAccBalanceWrapperREADONLY (by) = $Tuple2(nil, bx(by))
1321+@Callable(dM)
1322+func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
13111323
13121324
13131325
1314-@Callable(dK)
1315-func calcPricesWrapperREADONLY (bQ,bR,bV) = {
1316- let gI = bU(bQ, bR, bV)
1317- $Tuple2(nil, [toString(gI[0]), toString(gI[1]), toString(gI[2])])
1326+@Callable(dM)
1327+func calcPricesWrapperREADONLY (bR,bS,bW) = {
1328+ let gJ = bV(bR, bS, bW)
1329+ $Tuple2(nil, [toString(gJ[0]), toString(gJ[1]), toString(gJ[2])])
13181330 }
13191331
13201332
13211333
1322-@Callable(dK)
1323-func fromX18WrapperREADONLY (J,gJ) = $Tuple2(nil, I(parseBigIntValue(J), gJ))
1334+@Callable(dM)
1335+func fromX18WrapperREADONLY (J,gK) = $Tuple2(nil, I(parseBigIntValue(J), gK))
13241336
13251337
13261338
1327-@Callable(dK)
1339+@Callable(dM)
13281340 func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H)))
13291341
13301342
13311343
1332-@Callable(dK)
1333-func calcPriceBigIntWrapperREADONLY (bA,bB) = $Tuple2(nil, toString(bz(parseBigIntValue(bA), parseBigIntValue(bB))))
1344+@Callable(dM)
1345+func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC))))
13341346
13351347
13361348
1337-@Callable(dK)
1338-func estimatePutOperationWrapperREADONLY (cj,bF,cI,cJ,cK,cL,gK,cM,cN) = $Tuple2(nil, cH(cj, bF, cI, cJ, cK, cL, gK, cM, cN, true, false, 0, ""))
1349+@Callable(dM)
1350+func estimatePutOperationWrapperREADONLY (cl,bG,cK,cL,cM,cN,gL,cO,cP) = $Tuple2(nil, cJ(cl, bG, cK, cL, cM, cN, gL, cO, cP, true, false, 0, ""))
13391351
13401352
13411353
1342-@Callable(dK)
1343-func estimateGetOperationWrapperREADONLY (cj,gL,cl,gK) = {
1344- let dc = ci(cj, gL, cl, addressFromStringValue(gK))
1345- $Tuple2(nil, $Tuple10(dc._1, dc._2, dc._3, dc._4, dc._5, dc._6, dc._7, toString(dc._8), dc._9, dc._10))
1354+@Callable(dM)
1355+func estimateGetOperationWrapperREADONLY (cl,gM,cn,gL) = {
1356+ let de = ck(cl, gM, cn, addressFromStringValue(gL))
1357+ $Tuple2(nil, $Tuple10(de._1, de._2, de._3, de._4, de._5, de._6, de._7, toString(de._8), de._9, de._10))
13461358 }
13471359
13481360
1349-
1350-@Callable(dK)
1351-func getFeeREADONLY () = $Tuple2(nil, ah)
1352-
1353-
1354-@Verifier(gM)
1355-func gN () = {
1356- let gO = {
1357- let ax = fx()
1358- if ($isInstanceOf(ax, "ByteVector"))
1361+@Verifier(gN)
1362+func gO () = {
1363+ let gP = {
1364+ let av = fy()
1365+ if ($isInstanceOf(av, "ByteVector"))
13591366 then {
1360- let fB = ax
1361- fB
1367+ let fC = av
1368+ fC
13621369 }
1363- else if ($isInstanceOf(ax, "Unit"))
1364- then gM.senderPublicKey
1370+ else if ($isInstanceOf(av, "Unit"))
1371+ then gN.senderPublicKey
13651372 else throw("Match error")
13661373 }
1367- let ax = gM
1368- if ($isInstanceOf(ax, "Order"))
1374+ let av = gN
1375+ if ($isInstanceOf(av, "Order"))
13691376 then {
1370- let dx = ax
1371- let gP = aI()
1372- let gQ = dw(dx)
1373- let gR = sigVerify(dx.bodyBytes, dx.proofs[0], dx.senderPublicKey)
1374- let gS = sigVerify(dx.bodyBytes, dx.proofs[1], gP)
1375- if (if (if (gQ)
1376- then gR
1377- else false)
1377+ let dz = av
1378+ let gQ = aJ()
1379+ let gR = dy(dz)
1380+ let gS = sigVerify(dz.bodyBytes, dz.proofs[0], dz.senderPublicKey)
1381+ let gT = sigVerify(dz.bodyBytes, dz.proofs[1], gQ)
1382+ if (if (if (gR)
13781383 then gS
13791384 else false)
1385+ then gT
1386+ else false)
13801387 then true
1381- else as(gQ, gR, gS)
1388+ else aq(gR, gS, gT)
13821389 }
1383- else if ($isInstanceOf(ax, "SetScriptTransaction"))
1390+ else if ($isInstanceOf(av, "SetScriptTransaction"))
13841391 then {
1385- let dX = ax
1386- let gT = blake2b256(value(dX.script))
1387- let gU = fromBase64String(value(getString(aF, aq())))
1388- let gV = scriptHash(this)
1389- if (if ((gU == gT))
1390- then (gV != gT)
1392+ let dZ = av
1393+ let gU = blake2b256(value(dZ.script))
1394+ let gV = fromBase64String(value(getString(aD, ao())))
1395+ let gW = scriptHash(this)
1396+ if (if ((gV == gU))
1397+ then (gW != gU)
13911398 else false)
13921399 then true
1393- else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
1400+ else sigVerify(gN.bodyBytes, gN.proofs[0], gP)
13941401 }
1395- else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
1402+ else sigVerify(gN.bodyBytes, gN.proofs[0], gP)
13961403 }
13971404
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((a - ((a * 1) / a)))
1919
2020 let i = "WAVES"
2121
2222 let j = "100"
2323
2424 let k = "1"
2525
2626 let l = "__"
2727
2828 let m = ""
2929
3030 let n = 1
3131
3232 let o = 2
3333
3434 let p = 3
3535
3636 let q = 4
3737
3838 let r = 1
3939
4040 let s = 2
4141
4242 let t = 3
4343
4444 let u = 4
4545
4646 let v = 5
4747
4848 let w = 6
4949
5050 let x = 7
5151
5252 let y = 8
5353
5454 let z = 9
5555
5656 let A = 1
5757
5858 let B = 6
5959
6060 let C = 7
6161
6262 let D = 10
6363
6464 let E = fraction(10, a, 10000)
6565
6666 func F (G,H) = fraction(toBigInt(G), c, toBigInt(H))
6767
6868
6969 func I (J,K) = toInt(fraction(J, toBigInt(K), c))
7070
7171
7272 func L (M,N,O) = fraction(M, N, O)
7373
7474
7575 func P (J) = if ((d > J))
7676 then -(J)
7777 else J
7878
7979
8080 func Q (J) = if ((d > J))
8181 then -(J)
8282 else J
8383
8484
8585 func R () = "%s__factoryContract"
8686
8787
8888 func S () = "%s__managerPublicKey"
8989
9090
9191 func T () = "%s__pendingManagerPublicKey"
9292
9393
9494 func U () = "%s%s__price__last"
9595
9696
9797 func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], l)
9898
9999
100100 func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
101101
102102
103103 func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
104104
105105
106106 func ac () = "%s__amountAsset"
107107
108108
109109 func ad () = "%s__priceAsset"
110110
111111
112112 func ae () = "%s__amp"
113113
114114
115115 func af () = "%s__addonAddr"
116116
117117
118-let ag = "%s__fee"
119-
120-let ah = valueOrElse(getInteger(this, ag), E)
121-
122-func ai () = "%s__factoryConfig"
118+func ag () = "%s__factoryConfig"
123119
124120
125-func aj () = "%s%s__matcher__publicKey"
121+func ah () = "%s%s__matcher__publicKey"
126122
127123
128-func ak (al,am) = (((("%d%d%s__" + al) + "__") + am) + "__config")
124+func ai (aj,ak) = (((("%d%d%s__" + aj) + "__") + ak) + "__config")
129125
130126
131-func an (ao) = ("%s%s%s__mappings__baseAsset2internalId__" + ao)
127+func al (am) = ("%s%s%s__mappings__baseAsset2internalId__" + am)
132128
133129
134-func ap () = "%s__shutdown"
130+func an () = "%s__shutdown"
135131
136132
137-func aq () = "%s__allowedLpStableScriptHash"
133+func ao () = "%s__allowedLpStableScriptHash"
138134
139135
140-func ar () = "%s__feeCollectorAddress"
136+func ap () = "%s__feeCollectorAddress"
141137
142138
143-func as (at,au,av) = throw(((((("Failed: ordValid=" + toString(at)) + " sndrValid=") + toString(au)) + " mtchrValid=") + toString(av)))
139+func aq (ar,as,at) = throw(((((("Failed: ordValid=" + toString(ar)) + " sndrValid=") + toString(as)) + " mtchrValid=") + toString(at)))
144140
145141
146-func aw (J) = {
147- let ax = J
148- if ($isInstanceOf(ax, "String"))
142+func au (J) = {
143+ let av = J
144+ if ($isInstanceOf(av, "String"))
149145 then {
150- let ay = ax
151- ay
146+ let aw = av
147+ aw
152148 }
153149 else throw("fail cast to String")
154150 }
155151
156152
157-func az (aA,aB) = valueOrErrorMessage(getString(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
153+func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], ""))
158154
159155
160-func aC (aA,aB) = valueOrErrorMessage(getInteger(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
156+func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], ""))
161157
162158
163-func aD (aE) = throw(makeString(["lp_stable.ride:", aE], " "))
159+func aB (aC) = throw(makeString(["lp_stable.ride:", aC], " "))
164160
165161
166-let aF = addressFromStringValue(az(this, R()))
162+let aD = addressFromStringValue(ax(this, R()))
167163
168-let aG = az(this, ae())
164+let aE = {
165+ let aF = invoke(aD, "getInFeeREADONLY", [toString(this)], nil)
166+ if ($isInstanceOf(aF, "Int"))
167+ then aF
168+ else throw(($getType(aF) + " couldn't be cast to Int"))
169+ }
169170
170-func aH () = valueOrElse(getBoolean(aF, ap()), false)
171+let aG = {
172+ let aF = invoke(aD, "getOutFeeREADONLY", [toString(this)], nil)
173+ if ($isInstanceOf(aF, "Int"))
174+ then aF
175+ else throw(($getType(aF) + " couldn't be cast to Int"))
176+ }
177+
178+let aH = ax(this, ae())
179+
180+func aI () = valueOrElse(getBoolean(aD, an()), false)
171181
172182
173-func aI () = fromBase58String(az(aF, aj()))
183+func aJ () = fromBase58String(ax(aD, ah()))
174184
175185
176-let aJ = addressFromStringValue(az(aF, ar()))
186+let aK = addressFromStringValue(ax(aD, ap()))
177187
178-func aK () = {
179- let aL = az(this, ac())
180- let aM = az(this, ad())
181- let aN = aC(aF, an(aM))
182- let al = aC(aF, an(aL))
183- split(az(aF, ak(toString(al), toString(aN))), l)
188+func aL () = {
189+ let aM = ax(this, ac())
190+ let aN = ax(this, ad())
191+ let aO = aA(aD, al(aN))
192+ let aj = aA(aD, al(aM))
193+ split(ax(aD, ai(toString(aj), toString(aO))), l)
184194 }
185195
186196
187-func aO (aP) = if ((aP == i))
197+func aP (aQ) = if ((aQ == i))
188198 then unit
189- else fromBase58String(aP)
199+ else fromBase58String(aQ)
190200
191201
192-func aQ (aP) = if ((aP == unit))
202+func aR (aQ) = if ((aQ == unit))
193203 then i
194- else toBase58String(value(aP))
204+ else toBase58String(value(aQ))
195205
196206
197-func aR (aS) = $Tuple7(addressFromStringValue(aS[r]), parseIntValue(aS[s]), fromBase58String(aS[t]), aO(aS[u]), aO(aS[v]), parseIntValue(aS[w]), parseIntValue(aS[x]))
207+func aS (aT) = $Tuple7(addressFromStringValue(aT[r]), parseIntValue(aT[s]), fromBase58String(aT[t]), aP(aT[u]), aP(aT[v]), parseIntValue(aT[w]), parseIntValue(aT[x]))
198208
199209
200-let aT = aR(aK())
210+let aU = aS(aL())
201211
202-let aU = aT
212+let aV = aU
203213
204-let aV = aU._1
214+let aW = aV._1
205215
206-let aW = aU._2
216+let aX = aV._2
207217
208-let aX = aU._3
218+let aY = aV._3
209219
210-let aY = aU._4
220+let aZ = aV._4
211221
212-let aZ = aU._5
222+let ba = aV._5
213223
214-let ba = aU._6
224+let bb = aV._6
215225
216-let bb = aU._7
226+let bc = aV._7
217227
218-func bc () = split(az(aF, ai()), l)
228+func bd () = split(ax(aD, ag()), l)
219229
220230
221-let bd = bc()
231+let be = bd()
222232
223-let be = valueOrErrorMessage(addressFromString(bd[A]), "Invalid staking contract address")
233+let bf = valueOrErrorMessage(addressFromString(be[A]), "Invalid staking contract address")
224234
225-let bf = valueOrErrorMessage(addressFromString(bd[C]), "Invalid slipage contract address")
235+let bg = valueOrErrorMessage(addressFromString(be[C]), "Invalid slipage contract address")
226236
227-let bg = valueOrErrorMessage(addressFromString(bd[D]), "Invalid gwx contract address")
237+let bh = valueOrErrorMessage(addressFromString(be[D]), "Invalid gwx contract address")
228238
229-let bh = valueOrErrorMessage(addressFromString(bd[B]), "Invalid gwx contract address")
239+let bi = valueOrErrorMessage(addressFromString(be[B]), "Invalid gwx contract address")
230240
231-func bi (bj,bk,bl,bm,bn,bo,bp,bq,br,bs) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bj), toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs)], l)
241+func bj (bk,bl,bm,bn,bo,bp,bq,br,bs,bt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt)], l)
232242
233243
234-func bt (bu,bv,bw,bm,bp,bq) = makeString(["%d%d%d%d%d%d", toString(bu), toString(bv), toString(bw), toString(bm), toString(bp), toString(bq)], l)
244+func bu (bv,bw,bx,bn,bq,br) = makeString(["%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(bn), toString(bq), toString(br)], l)
235245
236246
237-func bx (by) = if ((by == "WAVES"))
247+func by (bz) = if ((bz == "WAVES"))
238248 then wavesBalance(this).available
239- else assetBalance(this, fromBase58String(by))
249+ else assetBalance(this, fromBase58String(bz))
240250
241251
242-func bz (bA,bB) = fraction(bA, c, bB)
252+func bA (bB,bC) = fraction(bB, c, bC)
243253
244254
245-func bC (bD,bE,bF) = {
246- let bG = fraction((bD - bE), b, bE)
247- let bH = ((bF - P(bG)) > d)
248- if (!(bH))
249- then throw(("Big slpg: " + toString(bG)))
250- else $Tuple2(bH, min([bD, bE]))
255+func bD (bE,bF,bG) = {
256+ let bH = fraction((bE - bF), b, bF)
257+ let bI = ((bG - P(bH)) > d)
258+ if (!(bI))
259+ then throw(("Big slpg: " + toString(bH)))
260+ else $Tuple2(bI, min([bE, bF]))
251261 }
252262
253263
254-func bI (bJ,bK,bL) = {
255- let bG = fraction(bK, b, bJ)
256- let bM = (bL > bG)
257- if (if (bM)
264+func bJ (bK,bL,bM) = {
265+ let bH = fraction(bL, b, bK)
266+ let bN = (bM > bH)
267+ if (if (bN)
258268 then true
259- else (bK > bJ))
260- then throw(((((((toString(bK) + " ") + toString(bJ)) + " ") + toString(bG)) + " ") + toString(bL)))
261- else bM
269+ else (bL > bK))
270+ then throw(((((((toString(bL) + " ") + toString(bK)) + " ") + toString(bH)) + " ") + toString(bM)))
271+ else bN
262272 }
263273
264274
265-func bN (bO,bP,bQ,bR) = {
266- let bS = F(bQ, bO)
275+func bO (bP,bQ,bR,bS) = {
267276 let bT = F(bR, bP)
268- bz(bT, bS)
277+ let bU = F(bS, bQ)
278+ bA(bU, bT)
269279 }
270280
271281
272-func bU (bQ,bR,bV) = {
273- let bW = aK()
274- let bX = parseIntValue(bW[w])
275- let bY = parseIntValue(bW[x])
276- let bZ = bN(bX, bY, bQ, bR)
277- let bB = F(bQ, bX)
278- let bA = F(bR, bY)
279- let ca = F(bV, a)
280- let cb = bz(bB, ca)
281- let cc = bz(bA, ca)
282-[bZ, cb, cc]
282+func bV (bR,bS,bW) = {
283+ let bX = aL()
284+ let bY = parseIntValue(bX[w])
285+ let bZ = parseIntValue(bX[x])
286+ let ca = bO(bY, bZ, bR, bS)
287+ let bC = F(bR, bY)
288+ let bB = F(bS, bZ)
289+ let cb = F(bW, a)
290+ let cc = bA(bC, cb)
291+ let cd = bA(bB, cb)
292+[ca, cc, cd]
283293 }
284294
285295
286-func cd (bQ,bR,bV) = {
287- let ce = bU(bQ, bR, bV)
288-[I(ce[0], a), I(ce[1], a), I(ce[2], a)]
296+func ce (bR,bS,bW) = {
297+ let cf = bV(bR, bS, bW)
298+[I(cf[0], a), I(cf[1], a), I(cf[2], a)]
289299 }
290300
291301
292-func cf (cg) = {
293- let ch = fraction(cg, ah, a)
294- $Tuple2((cg - ch), ch)
302+func cg (ch,ci) = {
303+ let cj = if ((ci == 0))
304+ then 0
305+ else fraction(ch, ci, a)
306+ $Tuple2((ch - cj), cj)
295307 }
296308
297309
298-func ci (cj,ck,cl,cm) = {
299- let bW = aK()
300- let cn = bW[t]
301- let co = bW[u]
302- let cp = bW[v]
303- let cq = parseIntValue(bW[w])
304- let cr = parseIntValue(bW[x])
305- let cs = bW[s]
306- let ct = valueOrErrorMessage(assetInfo(fromBase58String(cn)), "Wrong LP id").quantity
307- if ((cn != ck))
310+func ck (cl,cm,cn,co) = {
311+ let bX = aL()
312+ let cp = bX[t]
313+ let cq = bX[u]
314+ let cr = bX[v]
315+ let cs = parseIntValue(bX[w])
316+ let ct = parseIntValue(bX[x])
317+ let cu = bX[s]
318+ let cv = valueOrErrorMessage(assetInfo(fromBase58String(cp)), "Wrong LP id").quantity
319+ if ((cp != cm))
308320 then throw("Wrong pmt asset")
309321 else {
310- let cu = bx(co)
311- let cv = F(cu, cq)
312- let cw = bx(cp)
313- let cx = F(cw, cr)
314- let cy = bz(cx, cv)
315- let cz = I(cy, a)
316- let cA = F(cl, a)
317- let cB = F(ct, a)
318- let cC = fraction(cv, cA, cB)
319- let cD = fraction(cx, cA, cB)
320- let cE = I(cC, cq)
321- let cF = I(cD, cr)
322- let cG = if ((cj == ""))
322+ let cw = by(cq)
323+ let cx = F(cw, cs)
324+ let cy = by(cr)
325+ let cz = F(cy, ct)
326+ let cA = bA(cz, cx)
327+ let cB = I(cA, a)
328+ let cC = F(cn, a)
329+ let cD = F(cv, a)
330+ let cE = fraction(cx, cC, cD)
331+ let cF = fraction(cz, cC, cD)
332+ let cG = I(cE, cs)
333+ let cH = I(cF, ct)
334+ let cI = if ((cl == ""))
323335 then nil
324- else [ScriptTransfer(cm, cE, if ((co == "WAVES"))
336+ else [ScriptTransfer(co, cG, if ((cq == "WAVES"))
325337 then unit
326- else fromBase58String(co)), ScriptTransfer(cm, cF, if ((cp == "WAVES"))
338+ else fromBase58String(cq)), ScriptTransfer(co, cH, if ((cr == "WAVES"))
327339 then unit
328- else fromBase58String(cp)), StringEntry(ab(toString(cm), cj), bt(cE, cF, cl, cz, height, lastBlock.timestamp)), IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz)]
329- $Tuple10(cE, cF, co, cp, cu, cw, ct, cy, cs, cG)
340+ else fromBase58String(cr)), StringEntry(ab(toString(co), cl), bu(cG, cH, cn, cB, height, lastBlock.timestamp)), IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB)]
341+ $Tuple10(cG, cH, cq, cr, cw, cy, cv, cA, cu, cI)
330342 }
331343 }
332344
333345
334-func cH (cj,bF,cI,cJ,cK,cL,cm,cM,cN,cO,cP,cQ,cR) = {
335- let bW = aK()
336- let cn = fromBase58String(bW[t])
337- let cS = bW[u]
338- let cT = bW[v]
339- let cU = bW[y]
340- let cV = bW[z]
341- let cW = parseIntValue(bW[w])
342- let cX = parseIntValue(bW[x])
343- let cs = bW[s]
344- let cY = valueOrErrorMessage(assetInfo(cn), "Wr lp as").quantity
345- let cu = if (cM)
346- then bx(cS)
347- else if (if (cO)
348- then (cR == cS)
346+func cJ (cl,bG,cK,cL,cM,cN,co,cO,cP,cQ,cR,cS,cT) = {
347+ let bX = aL()
348+ let cp = fromBase58String(bX[t])
349+ let cU = bX[u]
350+ let cV = bX[v]
351+ let cW = bX[y]
352+ let cX = bX[z]
353+ let cY = parseIntValue(bX[w])
354+ let cZ = parseIntValue(bX[x])
355+ let cu = bX[s]
356+ let da = valueOrErrorMessage(assetInfo(cp), "Wr lp as").quantity
357+ let cw = if (cO)
358+ then by(cU)
359+ else if (if (cQ)
360+ then (cT == cU)
349361 else false)
350- then (bx(cS) - cQ)
351- else if (cO)
352- then bx(cS)
353- else (bx(cS) - cI)
354- let cw = if (cM)
355- then bx(cT)
356- else if (if (cO)
357- then (cR == cT)
362+ then (by(cU) - cS)
363+ else if (cQ)
364+ then by(cU)
365+ else (by(cU) - cK)
366+ let cy = if (cO)
367+ then by(cV)
368+ else if (if (cQ)
369+ then (cT == cV)
358370 else false)
359- then (bx(cT) - cQ)
360- else if (cO)
361- then bx(cT)
362- else (bx(cT) - cK)
363- let cZ = F(cI, cW)
364- let da = F(cK, cX)
365- let db = bz(da, cZ)
366- let cv = F(cu, cW)
367- let cx = F(cw, cX)
368- let dc = if ((cY == 0))
371+ then (by(cV) - cS)
372+ else if (cQ)
373+ then by(cV)
374+ else (by(cV) - cM)
375+ let db = F(cK, cY)
376+ let dc = F(cM, cZ)
377+ let dd = bA(dc, db)
378+ let cx = F(cw, cY)
379+ let cz = F(cy, cZ)
380+ let de = if ((da == 0))
369381 then {
370- let cy = d
371- let dd = d
372- let ca = pow((cZ * da), 0, toBigInt(5), 1, 0, DOWN)
373- $Tuple5(I(ca, a), I(cZ, cW), I(da, cX), bz((cx + da), (cv + cZ)), dd)
382+ let cA = d
383+ let df = d
384+ let cb = pow((db * dc), 0, toBigInt(5), 1, 0, DOWN)
385+ $Tuple5(I(cb, a), I(db, cY), I(dc, cZ), bA((cz + dc), (cx + db)), df)
374386 }
375387 else {
376- let cy = bz(cx, cv)
377- let de = fraction(P((cy - db)), c, cy)
378- let dd = F(bF, a)
379- if (if (if (cP)
380- then (cy != d)
388+ let cA = bA(cz, cx)
389+ let dg = fraction(P((cA - dd)), c, cA)
390+ let df = F(bG, a)
391+ if (if (if (cR)
392+ then (cA != d)
381393 else false)
382- then (de > dd)
394+ then (dg > df)
383395 else false)
384- then throw(((("Price slippage " + toString(de)) + " > ") + toString(dd)))
396+ then throw(((("Price slippage " + toString(dg)) + " > ") + toString(df)))
385397 else {
386- let df = F(cY, a)
387- let dg = fraction(cZ, cy, c)
388- let dh = fraction(da, c, cy)
389- let di = if ((dg > da))
390- then $Tuple2(dh, da)
391- else $Tuple2(cZ, dg)
392- let dj = di._1
393- let dk = di._2
394- let ca = fraction(df, dk, cx)
395- $Tuple5(I(ca, a), I(dj, cW), I(dk, cX), cy, dd)
398+ let dh = F(da, a)
399+ let di = fraction(db, cA, c)
400+ let dj = fraction(dc, c, cA)
401+ let dk = if ((di > dc))
402+ then $Tuple2(dj, dc)
403+ else $Tuple2(db, di)
404+ let dl = dk._1
405+ let dm = dk._2
406+ let cb = fraction(dh, dm, cz)
407+ $Tuple5(I(cb, a), I(dl, cY), I(dm, cZ), cA, df)
396408 }
397409 }
398- let dl = dc._1
399- let dm = dc._2
400- let dn = dc._3
401- let cz = I(dc._4, a)
402- let do = I(dc._5, a)
403- if ((0 >= dl))
410+ let dn = de._1
411+ let do = de._2
412+ let dp = de._3
413+ let cB = I(de._4, a)
414+ let dq = I(de._5, a)
415+ if ((0 >= dn))
404416 then throw("LP <= 0")
405417 else {
406- let dp = if (!(cN))
418+ let dr = if (!(cP))
407419 then 0
408- else dl
409- let dq = (cI - dm)
410- let dr = (cK - dn)
411- let ds = if (if (cO)
412- then (cR == cS)
420+ else dn
421+ let ds = (cK - do)
422+ let dt = (cM - dp)
423+ let du = if (if (cQ)
424+ then (cT == cU)
413425 else false)
414- then $Tuple2(cQ, 0)
415- else if (if (cO)
416- then (cR == cT)
426+ then $Tuple2(cS, 0)
427+ else if (if (cQ)
428+ then (cT == cV)
417429 else false)
418- then $Tuple2(0, cQ)
419- else $Tuple2(dm, dn)
420- let dt = ds._1
421- let du = ds._2
422- let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, cj), bi(dt, du, dp, cz, bF, do, height, lastBlock.timestamp, dq, dr))]
423- $Tuple13(dl, dp, cz, cu, cw, cY, cn, cs, dv, dq, dr, cJ, cL)
430+ then $Tuple2(0, cS)
431+ else $Tuple2(do, dp)
432+ let dv = du._1
433+ let dw = du._2
434+ let dx = [IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB), StringEntry(Y(co, cl), bj(dv, dw, dr, cB, bG, dq, height, lastBlock.timestamp, ds, dt))]
435+ $Tuple13(dn, dr, cB, cw, cy, da, cp, cu, dx, ds, dt, cL, cN)
424436 }
425437 }
426438
427439
428-func dw (dx) = {
429- let bW = aK()
430- let dy = bW[u]
431- let dz = bW[v]
432- let cs = parseIntValue(bW[s])
433- let bX = parseIntValue(bW[w])
434- let bY = parseIntValue(bW[x])
435- let dA = bx(dy)
436- let dB = bx(dz)
437- let cy = if ((dx.orderType == Buy))
438- then bN(bX, bY, (dA + dx.amount), dB)
439- else bN(bX, bY, (dA - dx.amount), dB)
440- let cz = I(cy, a)
441- if (if (if (aH())
440+func dy (dz) = {
441+ let bX = aL()
442+ let dA = bX[u]
443+ let dB = bX[v]
444+ let cu = parseIntValue(bX[s])
445+ let bY = parseIntValue(bX[w])
446+ let bZ = parseIntValue(bX[x])
447+ let dC = by(dA)
448+ let dD = by(dB)
449+ let cA = if ((dz.orderType == Buy))
450+ then bO(bY, bZ, (dC + dz.amount), dD)
451+ else bO(bY, bZ, (dC - dz.amount), dD)
452+ let cB = I(cA, a)
453+ if (if (if (aI())
442454 then true
443- else (cs == p))
455+ else (cu == p))
444456 then true
445- else (cs == q))
457+ else (cu == q))
446458 then throw("Admin blocked")
447459 else {
448- let dC = dx.assetPair.amountAsset
449- let dD = if ((dC == unit))
450- then "WAVES"
451- else toBase58String(value(dC))
452- let dE = dx.assetPair.priceAsset
460+ let dE = dz.assetPair.amountAsset
453461 let dF = if ((dE == unit))
454462 then "WAVES"
455463 else toBase58String(value(dE))
456- if (if ((dD != dy))
464+ let dG = dz.assetPair.priceAsset
465+ let dH = if ((dG == unit))
466+ then "WAVES"
467+ else toBase58String(value(dG))
468+ if (if ((dF != dA))
457469 then true
458- else (dF != dz))
470+ else (dH != dB))
459471 then throw("Wr assets")
460472 else {
461- let dG = dx.price
462- let cX = fraction(a, bY, bX)
463- let dH = L(dG, a, cX)
464- let dI = if ((dx.orderType == Buy))
465- then (cz >= dH)
466- else (dH >= cz)
473+ let dI = dz.price
474+ let cZ = fraction(a, bZ, bY)
475+ let dJ = L(dI, a, cZ)
476+ let dK = if ((dz.orderType == Buy))
477+ then (cB >= dJ)
478+ else (dJ >= cB)
467479 true
468480 }
469481 }
470482 }
471483
472484
473-func dJ (dK) = if ((size(dK.payments) != 1))
485+func dL (dM) = if ((size(dM.payments) != 1))
474486 then throw("1 pmnt exp")
475487 else {
476- let dL = value(dK.payments[0])
477- let ck = value(dL.assetId)
478- let cQ = dL.amount
479- let dc = ci(toBase58String(dK.transactionId), toBase58String(ck), cQ, dK.caller)
480- let cE = dc._1
481- let cF = dc._2
482- let cs = parseIntValue(dc._9)
483- let cG = dc._10
484- if (if (aH())
488+ let dN = value(dM.payments[0])
489+ let cm = value(dN.assetId)
490+ let cS = dN.amount
491+ let de = ck(toBase58String(dM.transactionId), toBase58String(cm), cS, dM.caller)
492+ let cG = de._1
493+ let cH = de._2
494+ let cu = parseIntValue(de._9)
495+ let cI = de._10
496+ if (if (aI())
485497 then true
486- else (cs == q))
487- then throw(("Admin blocked: " + toString(cs)))
488- else $Tuple5(cE, cF, cQ, ck, cG)
498+ else (cu == q))
499+ then throw(("Admin blocked: " + toString(cu)))
500+ else $Tuple5(cG, cH, cS, cm, cI)
489501 }
490502
491503
492-func dM (dN,aa,dO,dP,bF,cN,cO,cP,cQ,cR) = {
493- let dc = cH(aa, bF, value(dO).amount, value(dO).assetId, value(dP).amount, value(dP).assetId, dN, (aa == ""), cN, cO, cP, cQ, cR)
494- let cs = parseIntValue(dc._8)
495- if (if (if (aH())
504+func dO (dP,aa,dQ,dR,bG,cP,cQ,cR,cS,cT) = {
505+ let de = cJ(aa, bG, value(dQ).amount, value(dQ).assetId, value(dR).amount, value(dR).assetId, dP, (aa == ""), cP, cQ, cR, cS, cT)
506+ let cu = parseIntValue(de._8)
507+ if (if (if (aI())
496508 then true
497- else (cs == o))
509+ else (cu == o))
498510 then true
499- else (cs == q))
500- then throw(("Blocked:" + toString(cs)))
501- else dc
511+ else (cu == q))
512+ then throw(("Blocked:" + toString(cu)))
513+ else de
502514 }
503515
504516
505-func dQ (dR) = {
506- let dS = g
507- let dT = dR[0]
508- let dU = dR[1]
509- let dV = parseBigIntValue(j)
510- let dW = (parseBigIntValue(aG) * dV)
511- let dX = (dT + dU)
512- if ((dX == e))
517+func dS (dT) = {
518+ let dU = g
519+ let dV = dT[0]
520+ let dW = dT[1]
521+ let dX = parseBigIntValue(j)
522+ let dY = (parseBigIntValue(aH) * dX)
523+ let dZ = (dV + dW)
524+ if ((dZ == e))
513525 then e
514526 else {
515- let dY = (dW * dS)
516- let dZ = (((dT * dU) * dS) * dS)
517- let ea = ((dY * dX) / dV)
518- let eb = (dY - dV)
519- let ec = (dS + f)
520- func ed (ee,ef) = {
521- let eg = ee
522- let eh = eg._1
523- let ei = eg._2
524- if ((ei != unit))
525- then ee
527+ let ea = (dY * dU)
528+ let eb = (((dV * dW) * dU) * dU)
529+ let ec = ((ea * dZ) / dX)
530+ let ed = (ea - dX)
531+ let ee = (dU + f)
532+ func ef (eg,eh) = {
533+ let ei = eg
534+ let ej = ei._1
535+ let ek = ei._2
536+ if ((ek != unit))
537+ then eg
526538 else {
527- let ej = (((eh * eh) * eh) / dZ)
528- let ek = (((ea + (ej * dS)) * eh) / (((eb * eh) / dV) + (ec * ej)))
529- let el = Q((ek - value(eh)))
530- if ((f >= el))
531- then $Tuple2(ek, ef)
532- else $Tuple2(ek, unit)
539+ let el = (((ej * ej) * ej) / eb)
540+ let em = (((ec + (el * dU)) * ej) / (((ed * ej) / dX) + (ee * el)))
541+ let en = Q((em - value(ej)))
542+ if ((f >= en))
543+ then $Tuple2(em, eh)
544+ else $Tuple2(em, unit)
533545 }
534546 }
535547
536- let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
537- let en = {
538- let eo = em
539- let ep = size(eo)
540- let eq = $Tuple2(dX, unit)
541- func er (es,et) = if ((et >= ep))
542- then es
543- else ed(es, eo[et])
548+ let eo = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
549+ let ep = {
550+ let eq = eo
551+ let er = size(eq)
552+ let es = $Tuple2(dZ, unit)
553+ func et (eu,ev) = if ((ev >= er))
554+ then eu
555+ else ef(eu, eq[ev])
544556
545- func eu (es,et) = if ((et >= ep))
546- then es
557+ func ew (eu,ev) = if ((ev >= er))
558+ then eu
547559 else throw("List size exceeds 15")
548560
549- eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
561+ ew(et(et(et(et(et(et(et(et(et(et(et(et(et(et(et(es, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
550562 }
551- let eh = en._1
552- let ei = en._2
553- if ((ei != unit))
554- then eh
555- else throw(("D calculation error, D = " + toString(eh)))
563+ let ej = ep._1
564+ let ek = ep._2
565+ if ((ek != unit))
566+ then ej
567+ else throw(("D calculation error, D = " + toString(ej)))
556568 }
557569 }
558570
559571
560-func ev (dR,dK,ew) = {
561- let dS = g
562- let ex = dR[if ((dK == 0))
572+func ex (dT,dM,ey) = {
573+ let dU = g
574+ let ez = dT[if ((dM == 0))
563575 then 1
564576 else 0]
565- let dV = parseBigIntValue(j)
566- let dW = (parseBigIntValue(aG) * dV)
567- let dX = ex
568- let dY = (dW * dS)
569- let ey = (((((ew * ew) / (ex * dS)) * ew) * dV) / (dY * dS))
570- let ez = ((dX + ((ew * dV) / dY)) - ew)
571- func ed (ee,ef) = {
572- let eA = ee
573- let eB = eA._1
574- let ei = eA._2
575- if ((ei != unit))
576- then ee
577+ let dX = parseBigIntValue(j)
578+ let dY = (parseBigIntValue(aH) * dX)
579+ let dZ = ez
580+ let ea = (dY * dU)
581+ let eA = (((((ey * ey) / (ez * dU)) * ey) * dX) / (ea * dU))
582+ let eB = ((dZ + ((ey * dX) / ea)) - ey)
583+ func ef (eg,eh) = {
584+ let eC = eg
585+ let eD = eC._1
586+ let ek = eC._2
587+ if ((ek != unit))
588+ then eg
577589 else {
578- let eC = (((eB * eB) + ey) / ((g * eB) + ez))
579- let eD = Q((eC - value(eB)))
580- if ((f >= eD))
581- then $Tuple2(eC, ef)
582- else $Tuple2(eC, unit)
590+ let eE = (((eD * eD) + eA) / ((g * eD) + eB))
591+ let eF = Q((eE - value(eD)))
592+ if ((f >= eF))
593+ then $Tuple2(eE, eh)
594+ else $Tuple2(eE, unit)
583595 }
584596 }
585597
586- let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
587- let eE = {
588- let eo = em
589- let ep = size(eo)
590- let eq = $Tuple2(ew, unit)
591- func er (es,et) = if ((et >= ep))
592- then es
593- else ed(es, eo[et])
598+ let eo = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
599+ let eG = {
600+ let eq = eo
601+ let er = size(eq)
602+ let es = $Tuple2(ey, unit)
603+ func et (eu,ev) = if ((ev >= er))
604+ then eu
605+ else ef(eu, eq[ev])
594606
595- func eu (es,et) = if ((et >= ep))
596- then es
607+ func ew (eu,ev) = if ((ev >= er))
608+ then eu
597609 else throw("List size exceeds 15")
598610
599- eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
611+ ew(et(et(et(et(et(et(et(et(et(et(et(et(et(et(et(es, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
600612 }
601- let eB = eE._1
602- let ei = eE._2
603- if ((ei != unit))
604- then eB
605- else throw(("Y calculation error, Y = " + toString(eB)))
613+ let eD = eG._1
614+ let ek = eG._2
615+ if ((ek != unit))
616+ then eD
617+ else throw(("Y calculation error, Y = " + toString(eD)))
606618 }
607619
608620
609-func eF (eG,ck,cm,aa,eH) = {
610- let aS = aK()
611- let co = aS[u]
612- let cp = aS[v]
613- let cn = aS[t]
614- let cW = parseIntValue(aS[w])
615- let cX = parseIntValue(aS[x])
616- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
617- let eJ = if ((eI > e))
621+func eH (eI,cm,co,aa,eJ) = {
622+ let aT = aL()
623+ let cq = aT[u]
624+ let cr = aT[v]
625+ let cp = aT[t]
626+ let cY = parseIntValue(aT[w])
627+ let cZ = parseIntValue(aT[x])
628+ let eK = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cp)), "invalid lp asset").quantity)
629+ let eL = if ((eK > e))
618630 then true
619631 else throw("initial deposit requires all coins")
620- if ((eJ == eJ))
632+ if ((eL == eL))
621633 then {
622- let cu = bx(co)
623- let cw = bx(cp)
624- let eK = if ((aa == ""))
625- then $Tuple2(cu, cw)
626- else if ((ck == co))
627- then if ((eG > cu))
634+ let cw = by(cq)
635+ let cy = by(cr)
636+ let eM = if ((aa == ""))
637+ then $Tuple2(cw, cy)
638+ else if ((cm == cq))
639+ then if ((eI > cw))
628640 then throw("invalid payment amount")
629- else $Tuple2((cu - eG), cw)
630- else if ((ck == cp))
631- then if ((eG > cw))
641+ else $Tuple2((cw - eI), cy)
642+ else if ((cm == cr))
643+ then if ((eI > cy))
632644 then throw("invalid payment amount")
633- else $Tuple2(cu, (cw - eG))
645+ else $Tuple2(cw, (cy - eI))
634646 else throw("wrong pmtAssetId")
635- let eL = eK._1
636- let eM = eK._2
637- let eN = if ((ck == co))
638- then $Tuple2(eG, 0)
639- else if ((ck == cp))
640- then $Tuple2(0, eG)
647+ let eN = eM._1
648+ let eO = eM._2
649+ let eP = if ((cm == cq))
650+ then $Tuple2(eI, 0)
651+ else if ((cm == cr))
652+ then $Tuple2(0, eI)
641653 else throw("invalid payment")
642- let eO = eN._1
643- let eP = eN._2
644- let eQ = if (eH)
645- then $Tuple3(cf(eO)._1, cf(eP)._1, cf(eG)._2)
646- else $Tuple3(eO, eP, 0)
647- let eR = eQ._1
648- let eS = eQ._2
649- let ch = eQ._3
650- let eT = (eL + eR)
651- let eU = (eM + eS)
652- let bK = dQ([toBigInt(eL), toBigInt(eM)])
653- let bJ = dQ([toBigInt(eT), toBigInt(eU)])
654- let eV = if ((bJ > bK))
654+ let eQ = eP._1
655+ let eR = eP._2
656+ let eS = if (eJ)
657+ then $Tuple3(cg(eQ, aE)._1, cg(eR, aE)._1, cg(eI, aE)._2)
658+ else $Tuple3(eQ, eR, 0)
659+ let eT = eS._1
660+ let eU = eS._2
661+ let cj = eS._3
662+ let eV = (eN + eT)
663+ let eW = (eO + eU)
664+ let bL = dS([toBigInt(eN), toBigInt(eO)])
665+ let bK = dS([toBigInt(eV), toBigInt(eW)])
666+ let eX = if ((bK > bL))
655667 then true
656668 else throw()
657- if ((eV == eV))
669+ if ((eX == eX))
658670 then {
659- let eW = fraction(eI, (bJ - bK), bK)
660- let cz = I(bz(F(eU, cX), F(eT, cW)), a)
661- let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, aa), bi(eO, eP, toInt(eW), cz, 0, 0, height, lastBlock.timestamp, 0, 0))]
662- let eX = fraction(eM, a, eL)
663- let eY = fraction(eG, a, (eX + a))
664- let eZ = (eG - eY)
665- let fa = fraction(eI, toBigInt(eZ), toBigInt(eM))
666- let fb = toInt(fraction((eW - fa), b, fa))
667- $Tuple4(toInt(eW), dv, ch, fb)
671+ let eY = fraction(eK, (bK - bL), bL)
672+ let cB = I(bA(F(eW, cZ), F(eV, cY)), a)
673+ let dx = [IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB), StringEntry(Y(co, aa), bj(eQ, eR, toInt(eY), cB, 0, 0, height, lastBlock.timestamp, 0, 0))]
674+ let eZ = fraction(eO, a, eN)
675+ let fa = fraction(eI, a, (eZ + a))
676+ let fb = (eI - fa)
677+ let fc = fraction(eK, toBigInt(fb), toBigInt(eO))
678+ let fd = toInt(fraction((eY - fc), b, fc))
679+ $Tuple4(toInt(eY), dx, cj, fd)
668680 }
669681 else throw("Strict value is not equal to itself.")
670682 }
671683 else throw("Strict value is not equal to itself.")
672684 }
673685
674686
675-func fc (fd,fe,ff,dN,fg,fh) = {
676- let aS = aK()
677- let cn = aS[t]
678- let co = aS[u]
679- let cp = aS[v]
680- let fi = parseIntValue(aS[w])
681- let fj = parseIntValue(aS[x])
682- let fk = aS[s]
683- let cm = if ((dN == bh))
684- then fg
685- else dN
686- let dL = value(ff[0])
687- let ck = value(dL.assetId)
688- let cQ = dL.amount
689- let cj = toBase58String(fh)
690- if ((cn != toBase58String(ck)))
687+func fe (ff,fg,fh,dP,fi,fj) = {
688+ let aT = aL()
689+ let cp = aT[t]
690+ let cq = aT[u]
691+ let cr = aT[v]
692+ let fk = parseIntValue(aT[w])
693+ let fl = parseIntValue(aT[x])
694+ let fm = aT[s]
695+ let co = if ((dP == bi))
696+ then fi
697+ else dP
698+ let dN = value(fh[0])
699+ let cm = value(dN.assetId)
700+ let cS = dN.amount
701+ let cl = toBase58String(fj)
702+ if ((cp != toBase58String(cm)))
691703 then throw("Wrong LP")
692704 else {
693- let cu = bx(co)
694- let cw = bx(cp)
695- let fl = {
696- let fm = invoke(this, "getOneTknV2READONLY", [fd, cQ], nil)
697- if ($isInstanceOf(fm, "(Int, Int)"))
698- then fm
699- else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
705+ let cw = by(cq)
706+ let cy = by(cr)
707+ let fn = {
708+ let aF = invoke(this, "getOneTknV2READONLY", [ff, cS], nil)
709+ if ($isInstanceOf(aF, "(Int, Int)"))
710+ then aF
711+ else throw(($getType(aF) + " couldn't be cast to (Int, Int)"))
700712 }
701- if ((fl == fl))
713+ if ((fn == fn))
702714 then {
703- let ch = fl._2
704- let fn = fl._1
705- let fo = if (if ((fe > 0))
706- then (fe > fn)
715+ let cj = fn._2
716+ let fo = fn._1
717+ let fp = if (if ((fg > 0))
718+ then (fg > fo)
707719 else false)
708- then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
709- else fn
710- let fp = if ((fd == co))
711- then $Tuple4(fo, 0, ((cu - fo) - ch), cw)
712- else if ((fd == cp))
713- then $Tuple4(0, fo, cu, ((cw - fo) - ch))
720+ then aB(makeString(["amount to receive is less than ", toString(fg)], ""))
721+ else fo
722+ let fq = if ((ff == cq))
723+ then $Tuple4(fp, 0, ((cw - fp) - cj), cy)
724+ else if ((ff == cr))
725+ then $Tuple4(0, fp, cw, ((cy - fp) - cj))
714726 else throw("invalid out asset id")
715- let fq = fp._1
716- let fr = fp._2
717- let eT = fp._3
718- let eU = fp._4
719- let fs = bz(F(eU, fj), F(eT, fi))
720- let ft = I(fs, a)
721- let fu = if ((fd == "WAVES"))
727+ let fr = fq._1
728+ let fs = fq._2
729+ let eV = fq._3
730+ let eW = fq._4
731+ let ft = bA(F(eW, fl), F(eV, fk))
732+ let fu = I(ft, a)
733+ let fv = if ((ff == "WAVES"))
722734 then unit
723- else fromBase58String(fd)
724- let fv = if ((ch > 0))
725- then [ScriptTransfer(aJ, ch, fu)]
735+ else fromBase58String(ff)
736+ let fw = if ((cj > 0))
737+ then [ScriptTransfer(aK, cj, fv)]
726738 else nil
727- let cG = ([ScriptTransfer(cm, fo, fu), StringEntry(ab(toString(cm), cj), bt(fq, fr, cQ, ft, height, lastBlock.timestamp)), IntegerEntry(U(), ft), IntegerEntry(V(height, lastBlock.timestamp), ft)] ++ fv)
728- if ((cG == cG))
739+ let cI = ([ScriptTransfer(co, fp, fv), StringEntry(ab(toString(co), cl), bu(fr, fs, cS, fu, height, lastBlock.timestamp)), IntegerEntry(U(), fu), IntegerEntry(V(height, lastBlock.timestamp), fu)] ++ fw)
740+ if ((cI == cI))
729741 then {
730- let fw = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
731- if ((fw == fw))
732- then $Tuple2(cG, fo)
742+ let fx = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)])
743+ if ((fx == fx))
744+ then $Tuple2(cI, fp)
733745 else throw("Strict value is not equal to itself.")
734746 }
735747 else throw("Strict value is not equal to itself.")
736748 }
737749 else throw("Strict value is not equal to itself.")
738750 }
739751 }
740752
741753
742-func fx () = {
743- let ax = getString(S())
744- if ($isInstanceOf(ax, "String"))
754+func fy () = {
755+ let av = getString(S())
756+ if ($isInstanceOf(av, "String"))
745757 then {
746- let dX = ax
747- fromBase58String(dX)
758+ let dZ = av
759+ fromBase58String(dZ)
748760 }
749- else if ($isInstanceOf(ax, "Unit"))
761+ else if ($isInstanceOf(av, "Unit"))
750762 then unit
751763 else throw("Match error")
752764 }
753765
754766
755-func fy () = {
756- let ax = getString(T())
757- if ($isInstanceOf(ax, "String"))
767+func fz () = {
768+ let av = getString(T())
769+ if ($isInstanceOf(av, "String"))
758770 then {
759- let dX = ax
760- fromBase58String(dX)
771+ let dZ = av
772+ fromBase58String(dZ)
761773 }
762- else if ($isInstanceOf(ax, "Unit"))
774+ else if ($isInstanceOf(av, "Unit"))
763775 then unit
764776 else throw("Match error")
765777 }
766778
767779
768-let fz = throw("Permission denied")
780+let fA = throw("Permission denied")
769781
770-func fA (dK) = {
771- let ax = fx()
772- if ($isInstanceOf(ax, "ByteVector"))
782+func fB (dM) = {
783+ let av = fy()
784+ if ($isInstanceOf(av, "ByteVector"))
773785 then {
774- let fB = ax
775- (dK.callerPublicKey == fB)
786+ let fC = av
787+ (dM.callerPublicKey == fC)
776788 }
777- else if ($isInstanceOf(ax, "Unit"))
778- then (dK.caller == this)
789+ else if ($isInstanceOf(av, "Unit"))
790+ then (dM.caller == this)
779791 else throw("Match error")
780792 }
781793
782794
783-func fC (dK) = {
784- let ax = fx()
785- if ($isInstanceOf(ax, "ByteVector"))
795+func fD (dM) = {
796+ let av = fy()
797+ if ($isInstanceOf(av, "ByteVector"))
786798 then {
787- let fB = ax
788- if ((dK.callerPublicKey == fB))
799+ let fC = av
800+ if ((dM.callerPublicKey == fC))
789801 then true
790- else fz
802+ else fA
791803 }
792- else if ($isInstanceOf(ax, "Unit"))
793- then if ((dK.caller == this))
804+ else if ($isInstanceOf(av, "Unit"))
805+ then if ((dM.caller == this))
794806 then true
795- else fz
807+ else fA
796808 else throw("Match error")
797809 }
798810
799811
800-@Callable(dK)
812+@Callable(dM)
801813 func constructor (R) = {
802- let ey = fC(dK)
803- if ((ey == ey))
814+ let eA = fD(dM)
815+ if ((eA == eA))
804816 then [StringEntry(R(), R)]
805817 else throw("Strict value is not equal to itself.")
806818 }
807819
808820
809821
810-@Callable(dK)
811-func setManager (fD) = {
812- let ey = fC(dK)
813- if ((ey == ey))
822+@Callable(dM)
823+func setManager (fE) = {
824+ let eA = fD(dM)
825+ if ((eA == eA))
814826 then {
815- let fE = fromBase58String(fD)
816- if ((fE == fE))
817- then [StringEntry(T(), fD)]
827+ let fF = fromBase58String(fE)
828+ if ((fF == fF))
829+ then [StringEntry(T(), fE)]
818830 else throw("Strict value is not equal to itself.")
819831 }
820832 else throw("Strict value is not equal to itself.")
821833 }
822834
823835
824836
825-@Callable(dK)
837+@Callable(dM)
826838 func confirmManager () = {
827- let ce = fy()
828- let fF = if (isDefined(ce))
839+ let cf = fz()
840+ let fG = if (isDefined(cf))
829841 then true
830842 else throw("No pending manager")
831- if ((fF == fF))
843+ if ((fG == fG))
832844 then {
833- let fG = if ((dK.callerPublicKey == value(ce)))
845+ let fH = if ((dM.callerPublicKey == value(cf)))
834846 then true
835847 else throw("You are not pending manager")
836- if ((fG == fG))
837- then [StringEntry(S(), toBase58String(value(ce))), DeleteEntry(T())]
848+ if ((fH == fH))
849+ then [StringEntry(S(), toBase58String(value(cf))), DeleteEntry(T())]
838850 else throw("Strict value is not equal to itself.")
839851 }
840852 else throw("Strict value is not equal to itself.")
841853 }
842854
843855
844856
845-@Callable(dK)
846-func put (fH,fI) = {
847- let fJ = bc()
848- let fK = valueOrErrorMessage(addressFromString(fJ[A]), "Wr st addr")
849- let fL = valueOrErrorMessage(addressFromString(fJ[C]), "Wr sl addr")
850- if ((0 > fH))
857+@Callable(dM)
858+func put (fI,fJ) = {
859+ let fK = bd()
860+ let fL = valueOrErrorMessage(addressFromString(fK[A]), "Wr st addr")
861+ let fM = valueOrErrorMessage(addressFromString(fK[C]), "Wr sl addr")
862+ if ((0 > fI))
851863 then throw("Wrong slippage")
852- else if ((size(dK.payments) != 2))
864+ else if ((size(dM.payments) != 2))
853865 then throw("2 pmnts expd")
854866 else {
855- let fM = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fH, true, false, true, 0, "")
856- let dp = fM._2
857- let fN = fM._7
858- let cG = fM._9
859- let dq = fM._10
860- let dr = fM._11
861- let co = fM._12
862- let cp = fM._13
863- let dc = invoke(aF, "emit", [dp], nil)
864- if ((dc == dc))
867+ let fN = dO(toString(dM.caller), toBase58String(dM.transactionId), AttachedPayment(value(dM.payments[0]).assetId, value(dM.payments[0]).amount), dM.payments[1], fI, true, false, true, 0, "")
868+ let dr = fN._2
869+ let fO = fN._7
870+ let cI = fN._9
871+ let ds = fN._10
872+ let dt = fN._11
873+ let cq = fN._12
874+ let cr = fN._13
875+ let de = invoke(aD, "emit", [dr], nil)
876+ if ((de == de))
865877 then {
866- let fO = {
867- let ax = dc
868- if ($isInstanceOf(ax, "Address"))
878+ let fP = {
879+ let av = de
880+ if ($isInstanceOf(av, "Address"))
869881 then {
870- let fP = ax
871- invoke(fP, "emit", [dp], nil)
882+ let fQ = av
883+ invoke(fQ, "emit", [dr], nil)
872884 }
873885 else unit
874886 }
875- if ((fO == fO))
887+ if ((fP == fP))
876888 then {
877- let fQ = if ((dq > 0))
878- then invoke(fL, "put", nil, [AttachedPayment(co, dq)])
889+ let fR = if ((ds > 0))
890+ then invoke(fM, "put", nil, [AttachedPayment(cq, ds)])
879891 else nil
880- if ((fQ == fQ))
892+ if ((fR == fR))
881893 then {
882- let fR = if ((dr > 0))
883- then invoke(fL, "put", nil, [AttachedPayment(cp, dr)])
894+ let fS = if ((dt > 0))
895+ then invoke(fM, "put", nil, [AttachedPayment(cr, dt)])
884896 else nil
885- if ((fR == fR))
897+ if ((fS == fS))
886898 then {
887- let fS = if (fI)
899+ let fT = if (fJ)
888900 then {
889- let fT = invoke(fK, "stake", nil, [AttachedPayment(fN, dp)])
890- if ((fT == fT))
901+ let fU = invoke(fL, "stake", nil, [AttachedPayment(fO, dr)])
902+ if ((fU == fU))
891903 then nil
892904 else throw("Strict value is not equal to itself.")
893905 }
894- else [ScriptTransfer(dK.caller, dp, fN)]
895- (cG ++ fS)
906+ else [ScriptTransfer(dM.caller, dr, fO)]
907+ (cI ++ fT)
896908 }
897909 else throw("Strict value is not equal to itself.")
898910 }
899911 else throw("Strict value is not equal to itself.")
900912 }
901913 else throw("Strict value is not equal to itself.")
902914 }
903915 else throw("Strict value is not equal to itself.")
904916 }
905917 }
906918
907919
908920
909-@Callable(dK)
910-func putOneTknV2 (fe,fI) = {
911- let fU = {
912- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
913- if ($isInstanceOf(fm, "Boolean"))
914- then fm
915- else throw(($getType(fm) + " couldn't be cast to Boolean"))
921+@Callable(dM)
922+func putOneTknV2 (fg,fJ) = {
923+ let fV = {
924+ let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
925+ if ($isInstanceOf(aF, "Boolean"))
926+ then aF
927+ else throw(($getType(aF) + " couldn't be cast to Boolean"))
916928 }
917- let fV = if (if (if (aH())
929+ let fW = if (if (if (aI())
918930 then true
919- else (aW == o))
931+ else (aX == o))
920932 then true
921- else (aW == q))
933+ else (aX == q))
922934 then true
923- else fU
924- let fW = [if (if (!(fV))
935+ else fV
936+ let fX = [if (if (!(fW))
925937 then true
926- else fA(dK))
938+ else fB(dM))
927939 then true
928- else aD("put operation is blocked by admin"), if ((size(dK.payments) == 1))
940+ else aB("put operation is blocked by admin"), if ((size(dM.payments) == 1))
929941 then true
930- else aD("exactly 1 payment are expected")]
931- if ((fW == fW))
942+ else aB("exactly 1 payment are expected")]
943+ if ((fX == fX))
932944 then {
933- let aS = aK()
934- let co = aS[u]
935- let cp = aS[v]
936- let cn = fromBase58String(aS[t])
937- let fi = parseIntValue(aS[w])
938- let fj = parseIntValue(aS[x])
939- let cm = if ((dK.caller == this))
940- then dK.originCaller
941- else dK.caller
942- let dL = value(dK.payments[0])
943- let ck = toBase58String(value(dL.assetId))
944- let cQ = dL.amount
945- let fX = eF(cQ, ck, toString(cm), toBase58String(dK.transactionId), true)
946- if ((fX == fX))
945+ let aT = aL()
946+ let cq = aT[u]
947+ let cr = aT[v]
948+ let cp = fromBase58String(aT[t])
949+ let fk = parseIntValue(aT[w])
950+ let fl = parseIntValue(aT[x])
951+ let co = if ((dM.caller == this))
952+ then dM.originCaller
953+ else dM.caller
954+ let dN = value(dM.payments[0])
955+ let cm = toBase58String(value(dN.assetId))
956+ let cS = dN.amount
957+ let fY = eH(cS, cm, toString(co), toBase58String(dM.transactionId), true)
958+ if ((fY == fY))
947959 then {
948- let ch = fX._3
949- let cG = fX._2
950- let fY = fX._1
951- let dp = if (if ((fe > 0))
952- then (fe > fY)
960+ let cj = fY._3
961+ let cI = fY._2
962+ let fZ = fY._1
963+ let dr = if (if ((fg > 0))
964+ then (fg > fZ)
953965 else false)
954- then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
955- else fY
956- let fM = invoke(aF, "emit", [dp], nil)
957- if ((fM == fM))
966+ then aB(makeString(["amount to receive is less than ", toString(fg)], ""))
967+ else fZ
968+ let fN = invoke(aD, "emit", [dr], nil)
969+ if ((fN == fN))
958970 then {
959- let fO = {
960- let ax = fM
961- if ($isInstanceOf(ax, "Address"))
971+ let fP = {
972+ let av = fN
973+ if ($isInstanceOf(av, "Address"))
962974 then {
963- let fP = ax
964- invoke(fP, "emit", [dp], nil)
975+ let fQ = av
976+ invoke(fQ, "emit", [dr], nil)
965977 }
966978 else unit
967979 }
968- if ((fO == fO))
980+ if ((fP == fP))
969981 then {
970- let fS = if (fI)
982+ let fT = if (fJ)
971983 then {
972- let fT = invoke(be, "stake", nil, [AttachedPayment(cn, dp)])
973- if ((fT == fT))
984+ let fU = invoke(bf, "stake", nil, [AttachedPayment(cp, dr)])
985+ if ((fU == fU))
974986 then nil
975987 else throw("Strict value is not equal to itself.")
976988 }
977- else [ScriptTransfer(dK.caller, dp, cn)]
978- let fv = if ((ch > 0))
979- then [ScriptTransfer(aJ, ch, fromBase58String(ck))]
989+ else [ScriptTransfer(dM.caller, dr, cp)]
990+ let fw = if ((cj > 0))
991+ then [ScriptTransfer(aK, cj, fromBase58String(cm))]
980992 else nil
981- $Tuple2(((cG ++ fS) ++ fv), dp)
993+ $Tuple2(((cI ++ fT) ++ fw), dr)
982994 }
983995 else throw("Strict value is not equal to itself.")
984996 }
985997 else throw("Strict value is not equal to itself.")
986998 }
987999 else throw("Strict value is not equal to itself.")
9881000 }
9891001 else throw("Strict value is not equal to itself.")
9901002 }
9911003
9921004
9931005
994-@Callable(dK)
995-func putForFree (fZ) = if ((0 > fZ))
1006+@Callable(dM)
1007+func putForFree (ga) = if ((0 > ga))
9961008 then throw("Wrong slpg")
997- else if ((size(dK.payments) != 2))
1009+ else if ((size(dM.payments) != 2))
9981010 then throw("2 pmnts expd")
9991011 else {
1000- let ga = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fZ, false, false, true, 0, "")
1001- ga._9
1012+ let gb = dO(toString(dM.caller), toBase58String(dM.transactionId), AttachedPayment(value(dM.payments[0]).assetId, value(dM.payments[0]).amount), dM.payments[1], ga, false, false, true, 0, "")
1013+ gb._9
10021014 }
10031015
10041016
10051017
1006-@Callable(dK)
1018+@Callable(dM)
10071019 func get () = {
1008- let dc = dJ(dK)
1009- let gb = dc._1
1010- let cF = dc._2
1011- let cQ = dc._3
1012- let ck = dc._4
1013- let cG = dc._5
1014- let ez = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1015- if ((ez == ez))
1016- then cG
1020+ let de = dL(dM)
1021+ let gc = de._1
1022+ let cH = de._2
1023+ let cS = de._3
1024+ let cm = de._4
1025+ let cI = de._5
1026+ let eB = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)])
1027+ if ((eB == eB))
1028+ then cI
10171029 else throw("Strict value is not equal to itself.")
10181030 }
10191031
10201032
10211033
1022-@Callable(dK)
1023-func getOneTknV2 (fd,fe) = {
1024- let fU = {
1025- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1026- if ($isInstanceOf(fm, "Boolean"))
1027- then fm
1028- else throw(($getType(fm) + " couldn't be cast to Boolean"))
1034+@Callable(dM)
1035+func getOneTknV2 (ff,fg) = {
1036+ let fV = {
1037+ let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1038+ if ($isInstanceOf(aF, "Boolean"))
1039+ then aF
1040+ else throw(($getType(aF) + " couldn't be cast to Boolean"))
10291041 }
1030- let gc = if (if (aH())
1042+ let gd = if (if (aI())
10311043 then true
1032- else (aW == q))
1044+ else (aX == q))
10331045 then true
1034- else fU
1035- let fW = [if (if (!(gc))
1046+ else fV
1047+ let fX = [if (if (!(gd))
10361048 then true
1037- else fA(dK))
1049+ else fB(dM))
10381050 then true
1039- else aD("get operation is blocked by admin"), if ((size(dK.payments) == 1))
1051+ else aB("get operation is blocked by admin"), if ((size(dM.payments) == 1))
10401052 then true
1041- else aD("exactly 1 payment are expected")]
1042- if ((fW == fW))
1053+ else aB("exactly 1 payment are expected")]
1054+ if ((fX == fX))
10431055 then {
1044- let gd = fc(fd, fe, dK.payments, dK.caller, dK.originCaller, dK.transactionId)
1045- let cG = gd._1
1046- let fo = gd._2
1047- $Tuple2(cG, fo)
1056+ let ge = fe(ff, fg, dM.payments, dM.caller, dM.originCaller, dM.transactionId)
1057+ let cI = ge._1
1058+ let fp = ge._2
1059+ $Tuple2(cI, fp)
10481060 }
10491061 else throw("Strict value is not equal to itself.")
10501062 }
10511063
10521064
10531065
1054-@Callable(dK)
1055-func getOneTknV2READONLY (fd,ge) = {
1056- let aS = aK()
1057- let co = aS[u]
1058- let cp = aS[v]
1059- let cn = aS[t]
1060- let dR = [toBigInt(bx(co)), toBigInt(bx(cp))]
1061- let gf = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
1062- let bK = dQ(dR)
1063- let bJ = (bK - fraction(toBigInt(ge), bK, gf))
1064- let gg = if ((fd == co))
1066+@Callable(dM)
1067+func getOneTknV2READONLY (ff,gf) = {
1068+ let aT = aL()
1069+ let cq = aT[u]
1070+ let cr = aT[v]
1071+ let cp = aT[t]
1072+ let dT = [toBigInt(by(cq)), toBigInt(by(cr))]
1073+ let gg = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cp)), "invalid lp asset").quantity)
1074+ let bL = dS(dT)
1075+ let bK = (bL - fraction(toBigInt(gf), bL, gg))
1076+ let gh = if ((ff == cq))
10651077 then 0
1066- else if ((fd == cp))
1078+ else if ((ff == cr))
10671079 then 1
10681080 else throw("invalid out asset id")
1069- let gh = ev(dR, gg, bJ)
1070- let gi = (dR[gg] - gh)
1071- let gj = max([0, toInt((gi - f))])
1072- let gk = cf(gj)
1073- let fn = gk._1
1074- let ch = gk._2
1075- $Tuple2(nil, $Tuple2(fn, ch))
1081+ let gi = ex(dT, gh, bK)
1082+ let gj = (dT[gh] - gi)
1083+ let gk = max([0, toInt((gj - f))])
1084+ let gl = cg(gk, aG)
1085+ let fo = gl._1
1086+ let cj = gl._2
1087+ $Tuple2(nil, $Tuple2(fo, cj))
10761088 }
10771089
10781090
10791091
1080-@Callable(dK)
1081-func getOneTknV2WithBonusREADONLY (fd,ge) = {
1082- let aS = aK()
1083- let co = aS[u]
1084- let cp = aS[v]
1085- let cn = aS[t]
1086- let cu = bx(co)
1087- let cw = bx(cp)
1088- let gl = {
1089- let fm = invoke(this, "getOneTknV2READONLY", [fd, ge], nil)
1090- if ($isInstanceOf(fm, "(Int, Int)"))
1091- then fm
1092- else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
1092+@Callable(dM)
1093+func getOneTknV2WithBonusREADONLY (ff,gf) = {
1094+ let aT = aL()
1095+ let cq = aT[u]
1096+ let cr = aT[v]
1097+ let cp = aT[t]
1098+ let cw = by(cq)
1099+ let cy = by(cr)
1100+ let gm = {
1101+ let aF = invoke(this, "getOneTknV2READONLY", [ff, gf], nil)
1102+ if ($isInstanceOf(aF, "(Int, Int)"))
1103+ then aF
1104+ else throw(($getType(aF) + " couldn't be cast to (Int, Int)"))
10931105 }
1094- let fn = gl._1
1095- let ch = gl._2
1096- let dc = ci("", cn, ge, this)
1097- let cE = dc._1
1098- let cF = dc._2
1099- let gm = (cE + cF)
1100- let fb = if ((gm == 0))
1101- then if ((fn == 0))
1106+ let fo = gm._1
1107+ let cj = gm._2
1108+ let de = ck("", cp, gf, this)
1109+ let cG = de._1
1110+ let cH = de._2
1111+ let gn = (cG + cH)
1112+ let fd = if ((gn == 0))
1113+ then if ((fo == 0))
11021114 then 0
11031115 else throw("bonus calculation error")
1104- else fraction((fn - gm), a, gm)
1105- $Tuple2(nil, $Tuple3(fn, ch, fb))
1116+ else fraction((fo - gn), a, gn)
1117+ $Tuple2(nil, $Tuple3(fo, cj, fd))
11061118 }
11071119
11081120
11091121
1110-@Callable(dK)
1111-func getNoLess (gn,go) = {
1112- let dc = dJ(dK)
1113- let cE = dc._1
1114- let cF = dc._2
1115- let cQ = dc._3
1116- let ck = dc._4
1117- let cG = dc._5
1118- if ((gn > cE))
1119- then throw(((("Failed: " + toString(cE)) + " < ") + toString(gn)))
1120- else if ((go > cF))
1121- then throw(((("Failed: " + toString(cF)) + " < ") + toString(go)))
1122+@Callable(dM)
1123+func getNoLess (go,gp) = {
1124+ let de = dL(dM)
1125+ let cG = de._1
1126+ let cH = de._2
1127+ let cS = de._3
1128+ let cm = de._4
1129+ let cI = de._5
1130+ if ((go > cG))
1131+ then throw(((("Failed: " + toString(cG)) + " < ") + toString(go)))
1132+ else if ((gp > cH))
1133+ then throw(((("Failed: " + toString(cH)) + " < ") + toString(gp)))
11221134 else {
1123- let gp = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1124- if ((gp == gp))
1125- then cG
1135+ let gq = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)])
1136+ if ((gq == gq))
1137+ then cI
11261138 else throw("Strict value is not equal to itself.")
11271139 }
11281140 }
11291141
11301142
11311143
1132-@Callable(dK)
1133-func unstakeAndGet (cg) = {
1134- let gq = if ((size(dK.payments) != 0))
1144+@Callable(dM)
1145+func unstakeAndGet (ch) = {
1146+ let gr = if ((size(dM.payments) != 0))
11351147 then throw("No pmnts expd")
11361148 else true
1137- if ((gq == gq))
1149+ if ((gr == gr))
11381150 then {
1139- let bW = aK()
1140- let gr = bc()
1141- let fN = fromBase58String(bW[t])
1142- let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1143- let gt = invoke(gs, "unstake", [toBase58String(fN), cg], nil)
1144- if ((gt == gt))
1151+ let bX = aL()
1152+ let gs = bd()
1153+ let fO = fromBase58String(bX[t])
1154+ let gt = valueOrErrorMessage(addressFromString(gs[A]), "Wr st addr")
1155+ let gu = invoke(gt, "unstake", [toBase58String(fO), ch], nil)
1156+ if ((gu == gu))
11451157 then {
1146- let dc = ci(toBase58String(dK.transactionId), toBase58String(fN), cg, dK.caller)
1147- let cs = parseIntValue(dc._9)
1148- let cG = dc._10
1149- let gu = if (if (aH())
1158+ let de = ck(toBase58String(dM.transactionId), toBase58String(fO), ch, dM.caller)
1159+ let cu = parseIntValue(de._9)
1160+ let cI = de._10
1161+ let gv = if (if (aI())
11501162 then true
1151- else (cs == q))
1152- then throw(("Blocked: " + toString(cs)))
1163+ else (cu == q))
1164+ then throw(("Blocked: " + toString(cu)))
11531165 else true
1154- if ((gu == gu))
1166+ if ((gv == gv))
11551167 then {
1156- let gv = invoke(aF, "burn", [cg], [AttachedPayment(fN, cg)])
1157- if ((gv == gv))
1158- then cG
1168+ let gw = invoke(aD, "burn", [ch], [AttachedPayment(fO, ch)])
1169+ if ((gw == gw))
1170+ then cI
11591171 else throw("Strict value is not equal to itself.")
11601172 }
11611173 else throw("Strict value is not equal to itself.")
11621174 }
11631175 else throw("Strict value is not equal to itself.")
11641176 }
11651177 else throw("Strict value is not equal to itself.")
11661178 }
11671179
11681180
11691181
1170-@Callable(dK)
1171-func unstakeAndGetNoLess (gw,gx,go) = {
1172- let gc = if (aH())
1182+@Callable(dM)
1183+func unstakeAndGetNoLess (gx,gy,gp) = {
1184+ let gd = if (aI())
11731185 then true
1174- else (aW == q)
1175- let fW = [if (!(gc))
1186+ else (aX == q)
1187+ let fX = [if (!(gd))
11761188 then true
1177- else throw("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1189+ else throw("get operation is blocked by admin"), if ((size(dM.payments) == 0))
11781190 then true
11791191 else throw("no payments are expected")]
1180- if ((fW == fW))
1192+ if ((fX == fX))
11811193 then {
1182- let gt = invoke(be, "unstake", [toBase58String(aX), gw], nil)
1183- if ((gt == gt))
1194+ let gu = invoke(bf, "unstake", [toBase58String(aY), gx], nil)
1195+ if ((gu == gu))
11841196 then {
1185- let gy = ci(toBase58String(dK.transactionId), toBase58String(aX), gw, dK.caller)
1186- let cE = gy._1
1187- let cF = gy._2
1188- let cG = gy._10
1189- let gz = [if ((cE >= gx))
1197+ let gz = ck(toBase58String(dM.transactionId), toBase58String(aY), gx, dM.caller)
1198+ let cG = gz._1
1199+ let cH = gz._2
1200+ let cI = gz._10
1201+ let gA = [if ((cG >= gy))
11901202 then true
1191- else throw(makeString(["amount asset amount to receive is less than ", toString(gx)], "")), if ((cF >= go))
1203+ else throw(makeString(["amount asset amount to receive is less than ", toString(gy)], "")), if ((cH >= gp))
11921204 then true
1193- else throw(makeString(["price asset amount to receive is less than ", toString(go)], ""))]
1194- if ((gz == gz))
1205+ else throw(makeString(["price asset amount to receive is less than ", toString(gp)], ""))]
1206+ if ((gA == gA))
11951207 then {
1196- let gp = invoke(aF, "burn", [gw], [AttachedPayment(aX, gw)])
1197- if ((gp == gp))
1198- then cG
1208+ let gq = invoke(aD, "burn", [gx], [AttachedPayment(aY, gx)])
1209+ if ((gq == gq))
1210+ then cI
11991211 else throw("Strict value is not equal to itself.")
12001212 }
12011213 else throw("Strict value is not equal to itself.")
12021214 }
12031215 else throw("Strict value is not equal to itself.")
12041216 }
12051217 else throw("Strict value is not equal to itself.")
12061218 }
12071219
12081220
12091221
1210-@Callable(dK)
1211-func unstakeAndGetOneTknV2 (gw,fd,fe) = {
1212- let fU = {
1213- let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1214- if ($isInstanceOf(fm, "Boolean"))
1215- then fm
1216- else throw(($getType(fm) + " couldn't be cast to Boolean"))
1222+@Callable(dM)
1223+func unstakeAndGetOneTknV2 (gx,ff,fg) = {
1224+ let fV = {
1225+ let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1226+ if ($isInstanceOf(aF, "Boolean"))
1227+ then aF
1228+ else throw(($getType(aF) + " couldn't be cast to Boolean"))
12171229 }
1218- let gc = if (if (aH())
1230+ let gd = if (if (aI())
12191231 then true
1220- else (aW == q))
1232+ else (aX == q))
12211233 then true
1222- else fU
1223- let fW = [if (if (!(gc))
1234+ else fV
1235+ let fX = [if (if (!(gd))
12241236 then true
1225- else fA(dK))
1237+ else fB(dM))
12261238 then true
1227- else aD("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1239+ else aB("get operation is blocked by admin"), if ((size(dM.payments) == 0))
12281240 then true
1229- else aD("no payments are expected")]
1230- if ((fW == fW))
1241+ else aB("no payments are expected")]
1242+ if ((fX == fX))
12311243 then {
1232- let bW = aK()
1233- let gr = bc()
1234- let fN = fromBase58String(bW[t])
1235- let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1236- let gt = invoke(gs, "unstake", [toBase58String(fN), gw], nil)
1237- if ((gt == gt))
1244+ let bX = aL()
1245+ let gs = bd()
1246+ let fO = fromBase58String(bX[t])
1247+ let gt = valueOrErrorMessage(addressFromString(gs[A]), "Wr st addr")
1248+ let gu = invoke(gt, "unstake", [toBase58String(fO), gx], nil)
1249+ if ((gu == gu))
12381250 then {
1239- let gA = fc(fd, fe, [AttachedPayment(fN, gw)], dK.caller, dK.originCaller, dK.transactionId)
1240- let cG = gA._1
1241- let fo = gA._2
1242- $Tuple2(cG, fo)
1251+ let gB = fe(ff, fg, [AttachedPayment(fO, gx)], dM.caller, dM.originCaller, dM.transactionId)
1252+ let cI = gB._1
1253+ let fp = gB._2
1254+ $Tuple2(cI, fp)
12431255 }
12441256 else throw("Strict value is not equal to itself.")
12451257 }
12461258 else throw("Strict value is not equal to itself.")
12471259 }
12481260
12491261
12501262
1251-@Callable(dK)
1252-func putOneTknV2WithBonusREADONLY (gB,gC) = {
1253- let aS = aK()
1254- let co = aS[u]
1255- let cp = aS[v]
1256- let cn = aS[t]
1257- let gD = eF(gB, gC, "", "", true)
1258- let eW = gD._1
1259- let cG = gD._2
1260- let ch = gD._3
1261- let fb = gD._4
1262- $Tuple2(nil, $Tuple3(eW, ch, fb))
1263+@Callable(dM)
1264+func putOneTknV2WithBonusREADONLY (gC,gD) = {
1265+ let aT = aL()
1266+ let cq = aT[u]
1267+ let cr = aT[v]
1268+ let cp = aT[t]
1269+ let gE = eH(gC, gD, "", "", true)
1270+ let eY = gE._1
1271+ let cI = gE._2
1272+ let cj = gE._3
1273+ let fd = gE._4
1274+ $Tuple2(nil, $Tuple3(eY, cj, fd))
12631275 }
12641276
12651277
12661278
1267-@Callable(dK)
1268-func putOneTknV2WithoutTakeFeeREADONLY (gB,gC) = {
1269- let aS = aK()
1270- let co = aS[u]
1271- let cp = aS[v]
1272- let cn = aS[t]
1273- let gE = eF(gB, gC, "", "", false)
1274- let eW = gE._1
1275- let cG = gE._2
1276- let ch = gE._3
1277- let fb = gE._4
1278- $Tuple2(nil, $Tuple3(eW, ch, fb))
1279+@Callable(dM)
1280+func putOneTknV2WithoutTakeFeeREADONLY (gC,gD) = {
1281+ let aT = aL()
1282+ let cq = aT[u]
1283+ let cr = aT[v]
1284+ let cp = aT[t]
1285+ let gF = eH(gC, gD, "", "", false)
1286+ let eY = gF._1
1287+ let cI = gF._2
1288+ let cj = gF._3
1289+ let fd = gF._4
1290+ $Tuple2(nil, $Tuple3(eY, cj, fd))
12791291 }
12801292
12811293
12821294
1283-@Callable(dK)
1284-func activate (gF,gG) = if ((toString(dK.caller) != toString(aF)))
1295+@Callable(dM)
1296+func activate (gG,gH) = if ((toString(dM.caller) != toString(aD)))
12851297 then throw("denied")
1286- else $Tuple2([StringEntry(ac(), gF), StringEntry(ad(), gG)], "success")
1298+ else $Tuple2([StringEntry(ac(), gG), StringEntry(ad(), gH)], "success")
12871299
12881300
12891301
1290-@Callable(dK)
1291-func setS (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1292- then fz
1293- else [StringEntry(gH, gu)]
1302+@Callable(dM)
1303+func setS (gI,gv) = if ((toString(dM.caller) != ax(this, af())))
1304+ then fA
1305+ else [StringEntry(gI, gv)]
12941306
12951307
12961308
1297-@Callable(dK)
1298-func setI (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1299- then fz
1300- else [IntegerEntry(gH, gu)]
1309+@Callable(dM)
1310+func setI (gI,gv) = if ((toString(dM.caller) != ax(this, af())))
1311+ then fA
1312+ else [IntegerEntry(gI, gv)]
13011313
13021314
13031315
1304-@Callable(dK)
1305-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aK())
1316+@Callable(dM)
1317+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aL())
13061318
13071319
13081320
1309-@Callable(dK)
1310-func getAccBalanceWrapperREADONLY (by) = $Tuple2(nil, bx(by))
1321+@Callable(dM)
1322+func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
13111323
13121324
13131325
1314-@Callable(dK)
1315-func calcPricesWrapperREADONLY (bQ,bR,bV) = {
1316- let gI = bU(bQ, bR, bV)
1317- $Tuple2(nil, [toString(gI[0]), toString(gI[1]), toString(gI[2])])
1326+@Callable(dM)
1327+func calcPricesWrapperREADONLY (bR,bS,bW) = {
1328+ let gJ = bV(bR, bS, bW)
1329+ $Tuple2(nil, [toString(gJ[0]), toString(gJ[1]), toString(gJ[2])])
13181330 }
13191331
13201332
13211333
1322-@Callable(dK)
1323-func fromX18WrapperREADONLY (J,gJ) = $Tuple2(nil, I(parseBigIntValue(J), gJ))
1334+@Callable(dM)
1335+func fromX18WrapperREADONLY (J,gK) = $Tuple2(nil, I(parseBigIntValue(J), gK))
13241336
13251337
13261338
1327-@Callable(dK)
1339+@Callable(dM)
13281340 func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H)))
13291341
13301342
13311343
1332-@Callable(dK)
1333-func calcPriceBigIntWrapperREADONLY (bA,bB) = $Tuple2(nil, toString(bz(parseBigIntValue(bA), parseBigIntValue(bB))))
1344+@Callable(dM)
1345+func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC))))
13341346
13351347
13361348
1337-@Callable(dK)
1338-func estimatePutOperationWrapperREADONLY (cj,bF,cI,cJ,cK,cL,gK,cM,cN) = $Tuple2(nil, cH(cj, bF, cI, cJ, cK, cL, gK, cM, cN, true, false, 0, ""))
1349+@Callable(dM)
1350+func estimatePutOperationWrapperREADONLY (cl,bG,cK,cL,cM,cN,gL,cO,cP) = $Tuple2(nil, cJ(cl, bG, cK, cL, cM, cN, gL, cO, cP, true, false, 0, ""))
13391351
13401352
13411353
1342-@Callable(dK)
1343-func estimateGetOperationWrapperREADONLY (cj,gL,cl,gK) = {
1344- let dc = ci(cj, gL, cl, addressFromStringValue(gK))
1345- $Tuple2(nil, $Tuple10(dc._1, dc._2, dc._3, dc._4, dc._5, dc._6, dc._7, toString(dc._8), dc._9, dc._10))
1354+@Callable(dM)
1355+func estimateGetOperationWrapperREADONLY (cl,gM,cn,gL) = {
1356+ let de = ck(cl, gM, cn, addressFromStringValue(gL))
1357+ $Tuple2(nil, $Tuple10(de._1, de._2, de._3, de._4, de._5, de._6, de._7, toString(de._8), de._9, de._10))
13461358 }
13471359
13481360
1349-
1350-@Callable(dK)
1351-func getFeeREADONLY () = $Tuple2(nil, ah)
1352-
1353-
1354-@Verifier(gM)
1355-func gN () = {
1356- let gO = {
1357- let ax = fx()
1358- if ($isInstanceOf(ax, "ByteVector"))
1361+@Verifier(gN)
1362+func gO () = {
1363+ let gP = {
1364+ let av = fy()
1365+ if ($isInstanceOf(av, "ByteVector"))
13591366 then {
1360- let fB = ax
1361- fB
1367+ let fC = av
1368+ fC
13621369 }
1363- else if ($isInstanceOf(ax, "Unit"))
1364- then gM.senderPublicKey
1370+ else if ($isInstanceOf(av, "Unit"))
1371+ then gN.senderPublicKey
13651372 else throw("Match error")
13661373 }
1367- let ax = gM
1368- if ($isInstanceOf(ax, "Order"))
1374+ let av = gN
1375+ if ($isInstanceOf(av, "Order"))
13691376 then {
1370- let dx = ax
1371- let gP = aI()
1372- let gQ = dw(dx)
1373- let gR = sigVerify(dx.bodyBytes, dx.proofs[0], dx.senderPublicKey)
1374- let gS = sigVerify(dx.bodyBytes, dx.proofs[1], gP)
1375- if (if (if (gQ)
1376- then gR
1377- else false)
1377+ let dz = av
1378+ let gQ = aJ()
1379+ let gR = dy(dz)
1380+ let gS = sigVerify(dz.bodyBytes, dz.proofs[0], dz.senderPublicKey)
1381+ let gT = sigVerify(dz.bodyBytes, dz.proofs[1], gQ)
1382+ if (if (if (gR)
13781383 then gS
13791384 else false)
1385+ then gT
1386+ else false)
13801387 then true
1381- else as(gQ, gR, gS)
1388+ else aq(gR, gS, gT)
13821389 }
1383- else if ($isInstanceOf(ax, "SetScriptTransaction"))
1390+ else if ($isInstanceOf(av, "SetScriptTransaction"))
13841391 then {
1385- let dX = ax
1386- let gT = blake2b256(value(dX.script))
1387- let gU = fromBase64String(value(getString(aF, aq())))
1388- let gV = scriptHash(this)
1389- if (if ((gU == gT))
1390- then (gV != gT)
1392+ let dZ = av
1393+ let gU = blake2b256(value(dZ.script))
1394+ let gV = fromBase64String(value(getString(aD, ao())))
1395+ let gW = scriptHash(this)
1396+ if (if ((gV == gU))
1397+ then (gW != gU)
13911398 else false)
13921399 then true
1393- else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
1400+ else sigVerify(gN.bodyBytes, gN.proofs[0], gP)
13941401 }
1395- else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
1402+ else sigVerify(gN.bodyBytes, gN.proofs[0], gP)
13961403 }
13971404

github/deemru/w8io/169f3d6 
476.74 ms