tx · HjChptALr9tRyXGFEShfvS97J8eCfevzcgEDsgVqamto

3N23sqNJqpVXnHxv4nKXriWA8N6QLsPKd5K:  -0.03100000 Waves

2022.11.24 17:14 [2331285] smart account 3N23sqNJqpVXnHxv4nKXriWA8N6QLsPKd5K > SELF 0.00000000 Waves

{ "type": 13, "id": "HjChptALr9tRyXGFEShfvS97J8eCfevzcgEDsgVqamto", "fee": 3100000, "feeAssetId": null, "timestamp": 1669299322172, "version": 1, "sender": "3N23sqNJqpVXnHxv4nKXriWA8N6QLsPKd5K", "senderPublicKey": "2fTQW76r4FCNaSvj5ycqdyqgJWWapZ2m25zmQLckTQwJ", "proofs": [ "5Defofnt8Co22ucamX6VNo2yH4fQ6m172zRbX9Lttztcwud58ak1RC7PhGziGitcr1A9iCR2uXHhQxLg63A58x2K" ], "script": "base64:BgLYKQgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXNzZXREY20iEmlkeFBvb2xB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UCY1kJYm9keUJ5dGVzCQCRAwIIBQJjWQZwcm9vZnMAAQUCZ2MDAwMFAmF4BQJheQcFAmF6BwYJAQJhdwMFAmF4BQJheQUCYXoDCQABAgUCYUkCFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJlSgUCYUkEAmdkCQD2AwEJAQV2YWx1ZQEIBQJlSgZzY3JpcHQEAmdlCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYUsJAQJhdQAEAmdmCQDxBwEFBHRoaXMDAwkAAAIFAmdlBQJnZAkBAiE9AgUCZ2YFAmdkBwYJAPQDAwgFAmZaCWJvZHlCeXRlcwkAkQMCCAUCZloGcHJvb2ZzAAAFAmdiCQD0AwMIBQJmWglib2R5Qnl0ZXMJAJEDAggFAmZaBnByb29mcwAABQJnYl7L510=", "chainId": 84, "height": 2331285, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9ADhBbfmiu2udLDwVor2tsNh7PtYmvijaaoWRuV7cRQ5 Next: 5XNHwEbaZgFzanzbwAPvmUvy9HqHE5Z8cf4YCsjzUWdN Diff:
OldNewDifferences
111111
112112 let ae = valueOrElse(getInteger(this, ac), ad)
113113
114-func af () = "%s__factoryConfig"
114+let af = makeString(["%s", "keyKlp"], j)
115+
116+let ag = makeString(["%s", "keyLastKLpRefreshed"], j)
117+
118+let ah = makeString(["%s", "keyRefreshKLpDelay"], j)
119+
120+func ai () = "%s__factoryConfig"
115121
116122
117-func ag () = "%s%s__matcher__publicKey"
123+func aj () = "%s%s__matcher__publicKey"
118124
119125
120-func ah (ai) = (("%s%s%s__" + ai) + "__mappings__poolContract2LpAsset")
126+func ak (al) = (("%s%s%s__" + al) + "__mappings__poolContract2LpAsset")
121127
122128
123-func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config")
129+func am (an,ao) = (((("%d%d%s__" + an) + "__") + ao) + "__config")
124130
125131
126-func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an)
132+func ap (aq) = ("%s%s%s__mappings__baseAsset2internalId__" + aq)
127133
128134
129-func ao () = "%s__shutdown"
135+func ar () = "%s__shutdown"
130136
131137
132-func ap (aq) = ("%s%s__poolWeight__" + aq)
138+func as (at) = ("%s%s__poolWeight__" + at)
133139
134140
135-func ar () = "%s__allowedLpScriptHash"
141+func au () = "%s__allowedLpScriptHash"
136142
137143
138-let as = "%s__feeCollectorAddress"
144+let av = "%s__feeCollectorAddress"
139145
140-func at (au,av,aw) = throw(((((("order validation failed: orderValid=" + toString(au)) + " senderValid=") + toString(av)) + " matcherValid=") + toString(aw)))
146+func aw (ax,ay,az) = throw(((((("order validation failed: orderValid=" + toString(ax)) + " senderValid=") + toString(ay)) + " matcherValid=") + toString(az)))
141147
142148
143-func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
149+func aA (aB,aC) = valueOrErrorMessage(getString(aB, aC), makeString(["mandatory ", toString(aB), ".", aC, " is not defined"], ""))
144150
145151
146-func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
152+func aD (aB,aC) = valueOrErrorMessage(getInteger(aB, aC), makeString(["mandatory ", toString(aB), ".", aC, " is not defined"], ""))
147153
148154
149-func aB (aC) = throw(makeString(["lp.ride:", aC], " "))
155+func aE (aF) = throw(makeString(["lp.ride:", aF], " "))
150156
151157
152-let aD = addressFromStringValue(ax(this, P()))
153-
154-let aE = addressFromStringValue(ax(aD, as))
155-
156-func aF () = valueOrElse(getBoolean(aD, ao()), false)
158+func aG (aF) = makeString(["lp.ride:", aF], " ")
157159
158160
159-func aG () = fromBase58String(ax(aD, ag()))
160-
161-
162-func aH () = {
163- let aI = ax(this, aa())
164- let aJ = ax(this, ab())
165- let al = aA(aD, am(aJ))
166- let ak = aA(aD, am(aI))
167- split(ax(aD, aj(toString(ak), toString(al))), j)
161+func aH (H) = {
162+ let aI = H
163+ if ($isInstanceOf(aI, "Int"))
164+ then {
165+ let aJ = aI
166+ aJ
167+ }
168+ else throw("fail to cast into Int")
168169 }
169170
170171
171-func aK (aL) = if ((aL == i))
172- then unit
173- else fromBase58String(aL)
172+let aK = addressFromStringValue(aA(this, P()))
173+
174+let aL = addressFromStringValue(aA(aK, av))
175+
176+func aM () = valueOrElse(getBoolean(aK, ar()), false)
174177
175178
176-func aM (aL) = if ((aL == unit))
177- then i
178- else toBase58String(value(aL))
179+func aN () = fromBase58String(aA(aK, aj()))
179180
180181
181-func aN (aO) = $Tuple7(addressFromStringValue(aO[o]), parseIntValue(aO[p]), fromBase58String(aO[q]), aK(aO[r]), aK(aO[s]), parseIntValue(aO[t]), parseIntValue(aO[u]))
182-
183-
184-let aP = aN(aH())
185-
186-let aQ = aP
187-
188-let aR = aQ._1
189-
190-let aS = aQ._2
191-
192-let aT = aQ._3
193-
194-let aU = aQ._4
195-
196-let aV = aQ._5
197-
198-let aW = aQ._6
199-
200-let aX = aQ._7
201-
202-func aY () = split(ax(aD, af()), j)
203-
204-
205-let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
206-
207-let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
208-
209-func bb (bc,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl)], j)
210-
211-
212-func bm (bn,bo,bp,bf,bi,bj) = makeString(["%d%d%d%d%d%d", toString(bn), toString(bo), toString(bp), toString(bf), toString(bi), toString(bj)], j)
213-
214-
215-func bq (br) = if ((br == "WAVES"))
216- then wavesBalance(this).available
217- else assetBalance(this, fromBase58String(br))
218-
219-
220-func bs (bt,bu) = fraction(bt, d, bu)
221-
222-
223-func bv (bw,bx,by,bz) = {
224- let bA = D(by, bw)
225- let bB = D(bz, bx)
226- bs(bB, bA)
182+func aO () = {
183+ let aP = aA(this, aa())
184+ let aQ = aA(this, ab())
185+ let ao = aD(aK, ap(aQ))
186+ let an = aD(aK, ap(aP))
187+ split(aA(aK, am(toString(an), toString(ao))), j)
227188 }
228189
229190
230-func bC (by,bz,bD) = {
231- let bE = aH()
232- let bF = parseIntValue(bE[t])
233- let bG = parseIntValue(bE[u])
234- let bH = bv(bF, bG, by, bz)
235- let bu = D(by, bF)
236- let bt = D(bz, bG)
237- let bI = D(bD, b)
238- let bJ = bs(bu, bI)
239- let bK = bs(bt, bI)
240-[bH, bJ, bK]
191+func aR (aS) = if ((aS == i))
192+ then unit
193+ else fromBase58String(aS)
194+
195+
196+func aT (aS) = if ((aS == unit))
197+ then i
198+ else toBase58String(value(aS))
199+
200+
201+func aU (aV) = $Tuple7(addressFromStringValue(aV[o]), parseIntValue(aV[p]), fromBase58String(aV[q]), aR(aV[r]), aR(aV[s]), parseIntValue(aV[t]), parseIntValue(aV[u]))
202+
203+
204+let aW = aU(aO())
205+
206+let aX = aW
207+
208+let aY = aX._1
209+
210+let aZ = aX._2
211+
212+let ba = aX._3
213+
214+let bb = aX._4
215+
216+let bc = aX._5
217+
218+let bd = aX._6
219+
220+let be = aX._7
221+
222+func bf () = split(aA(aK, ai()), j)
223+
224+
225+let bg = valueOrErrorMessage(addressFromString(bf()[B]), "incorrect staking address")
226+
227+let bh = valueOrErrorMessage(addressFromString(bf()[C]), "incorrect staking address")
228+
229+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)], j)
230+
231+
232+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)], j)
233+
234+
235+func bx (by) = if ((by == "WAVES"))
236+ then wavesBalance(this).available
237+ else assetBalance(this, fromBase58String(by))
238+
239+
240+func bz (bA,bB) = fraction(bA, d, bB)
241+
242+
243+func bC (bD,bE,bF,bG) = {
244+ let bH = D(bF, bD)
245+ let bI = D(bG, bE)
246+ bz(bI, bH)
241247 }
242248
243249
244-func bL (by,bz,bD) = {
245- let bM = bC(by, bz, bD)
246-[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
250+func bJ (bF,bG,bK) = {
251+ let bL = aO()
252+ let bM = parseIntValue(bL[t])
253+ let bN = parseIntValue(bL[u])
254+ let bO = bC(bM, bN, bF, bG)
255+ let bB = D(bF, bM)
256+ let bA = D(bG, bN)
257+ let bP = D(bK, b)
258+ let bQ = bz(bB, bP)
259+ let bR = bz(bA, bP)
260+[bO, bQ, bR]
247261 }
248262
249263
250-func bN (bO,bP,bQ,X) = {
251- let bE = aH()
252- let bR = bE[q]
253- let bS = bE[r]
254- let bT = bE[s]
255- let bw = parseIntValue(bE[t])
256- let bx = parseIntValue(bE[u])
257- let bU = bE[p]
258- let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
259- if ((bR != bP))
264+func bS (bF,bG,bK) = {
265+ let bT = bJ(bF, bG, bK)
266+[G(bT[0], b), G(bT[1], b), G(bT[2], b)]
267+ }
268+
269+
270+func bU (bV,bW,bX,X) = {
271+ let bL = aO()
272+ let bY = bL[q]
273+ let bZ = bL[r]
274+ let ca = bL[s]
275+ let bD = parseIntValue(bL[t])
276+ let bE = parseIntValue(bL[u])
277+ let cb = bL[p]
278+ let cc = valueOrErrorMessage(assetInfo(fromBase58String(bY)), (("Asset " + bY) + " doesn't exist")).quantity
279+ if ((bY != bW))
260280 then throw("Invalid asset passed.")
261281 else {
262- let bW = bq(bS)
263- let bX = D(bW, bw)
264- let bY = bq(bT)
265- let bZ = D(bY, bx)
266- let ca = bs(bZ, bX)
267- let cb = G(ca, b)
268- let cc = D(bQ, b)
269- let cd = D(bV, b)
270- let ce = fraction(bX, cc, cd)
271- let cf = fraction(bZ, cc, cd)
272- let cg = G(ce, bw)
273- let ch = G(cf, bx)
274- let ci = if ((bO == ""))
282+ let cd = bx(bZ)
283+ let ce = D(cd, bD)
284+ let cf = bx(ca)
285+ let cg = D(cf, bE)
286+ let ch = bz(cg, ce)
287+ let ci = G(ch, b)
288+ let cj = D(bX, b)
289+ let ck = D(cc, b)
290+ let cl = fraction(ce, cj, ck)
291+ let cm = fraction(cg, cj, ck)
292+ let cn = G(cl, bD)
293+ let co = G(cm, bE)
294+ let cp = if ((bV == ""))
275295 then nil
276- else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
296+ else [ScriptTransfer(X, cn, if ((bZ == "WAVES"))
277297 then unit
278- else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
298+ else fromBase58String(bZ)), ScriptTransfer(X, co, if ((ca == "WAVES"))
279299 then unit
280- else fromBase58String(bT)), StringEntry(Z(toString(X), bO), bm(cg, ch, bQ, cb, height, lastBlock.timestamp)), IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb)]
281- $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
300+ else fromBase58String(ca)), StringEntry(Z(toString(X), bV), bt(cn, co, bX, ci, height, lastBlock.timestamp)), IntegerEntry(S(), ci), IntegerEntry(T(height, lastBlock.timestamp), ci)]
301+ $Tuple10(cn, co, bZ, ca, cd, cf, cc, ch, cb, cp)
282302 }
283303 }
284304
285305
286-func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
287- let bE = aH()
288- let bR = fromBase58String(bE[q])
289- let cr = bE[r]
290- let cs = bE[s]
291- let ct = bE[v]
292- let cu = bE[w]
293- let bF = parseIntValue(bE[t])
294- let bG = parseIntValue(bE[u])
295- let bU = bE[p]
296- let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
297- let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
298- let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
299- if (if ((cr != cv))
306+func cq (bV,cr,cs,ct,cu,cv,X,cw,cx) = {
307+ let bL = aO()
308+ let bY = fromBase58String(bL[q])
309+ let cy = bL[r]
310+ let cz = bL[s]
311+ let cA = bL[v]
312+ let cB = bL[w]
313+ let bM = parseIntValue(bL[t])
314+ let bN = parseIntValue(bL[u])
315+ let cb = bL[p]
316+ let cc = valueOrErrorMessage(assetInfo(bY), (("Asset " + toBase58String(bY)) + " doesn't exist")).quantity
317+ let cC = toBase58String(valueOrElse(ct, fromBase58String("WAVES")))
318+ let cD = toBase58String(valueOrElse(cv, fromBase58String("WAVES")))
319+ if (if ((cy != cC))
300320 then true
301- else (cs != cw))
321+ else (cz != cD))
302322 then throw("Invalid amt or price asset passed.")
303323 else {
304- let bW = if (cp)
305- then bq(cr)
306- else (bq(cr) - cl)
307- let bY = if (cp)
308- then bq(cs)
309- else (bq(cs) - cn)
310- let cx = D(cl, bF)
311- let cy = D(cn, bG)
312- let cz = bs(cy, cx)
313- let bX = D(bW, bF)
314- let bZ = D(bY, bG)
315- let cA = if ((bV == 0))
324+ let cd = if (cw)
325+ then bx(cy)
326+ else (bx(cy) - cs)
327+ let cf = if (cw)
328+ then bx(cz)
329+ else (bx(cz) - cu)
330+ let cE = D(cs, bM)
331+ let cF = D(cu, bN)
332+ let cG = bz(cF, cE)
333+ let ce = D(cd, bM)
334+ let cg = D(cf, bN)
335+ let cH = if ((cc == 0))
316336 then {
317- let ca = e
318- let cB = e
319- let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
320- $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
337+ let ch = e
338+ let cI = e
339+ let bP = pow((cE * cF), 0, toBigInt(5), 1, 0, DOWN)
340+ $Tuple5(G(bP, b), G(cE, bM), G(cF, bN), bz((cg + cF), (ce + cE)), cI)
321341 }
322342 else {
323- let ca = bs(bZ, bX)
324- let cB = fraction(O((ca - cz)), d, ca)
325- let cC = D(ck, b)
326- if (if ((ca != e))
327- then (cB > cC)
343+ let ch = bz(cg, ce)
344+ let cI = fraction(O((ch - cG)), d, ch)
345+ let cJ = D(cr, b)
346+ if (if ((ch != e))
347+ then (cI > cJ)
328348 else false)
329- then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
349+ then throw(((("Price slippage " + toString(cI)) + " exceeded the passed limit of ") + toString(cJ)))
330350 else {
331- let cd = D(bV, b)
332- let cD = fraction(cx, ca, d)
333- let cE = fraction(cy, d, ca)
334- let cF = if ((cD > cy))
335- then $Tuple2(cE, cy)
336- else $Tuple2(cx, cD)
337- let cG = cF._1
338- let cH = cF._2
339- let bI = fraction(cd, cH, bZ)
340- $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
351+ let ck = D(cc, b)
352+ let cK = fraction(cE, ch, d)
353+ let cL = fraction(cF, d, ch)
354+ let cM = if ((cK > cF))
355+ then $Tuple2(cL, cF)
356+ else $Tuple2(cE, cK)
357+ let cN = cM._1
358+ let cO = cM._2
359+ let bP = fraction(ck, cO, cg)
360+ $Tuple5(G(bP, b), G(cN, bM), G(cO, bN), ch, cI)
341361 }
342362 }
343- let cI = cA._1
344- let cJ = cA._2
345- let cK = cA._3
346- let cb = G(cA._4, b)
347- let cL = G(cA._5, b)
348- if ((0 >= cI))
363+ let cP = cH._1
364+ let cQ = cH._2
365+ let cR = cH._3
366+ let ci = G(cH._4, b)
367+ let cS = G(cH._5, b)
368+ if ((0 >= cP))
349369 then throw("Invalid calculations. LP calculated is less than zero.")
350370 else {
351- let cM = if (!(cq))
371+ let cT = if (!(cx))
352372 then 0
353- else cI
354- let cN = (cl - cJ)
355- let cO = (cn - cK)
356- let cP = [IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb), StringEntry(W(X, bO), bb(cJ, cK, cM, cb, ck, cL, height, lastBlock.timestamp, cN, cO))]
357- $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
373+ else cP
374+ let cU = (cs - cQ)
375+ let cV = (cu - cR)
376+ let cW = [IntegerEntry(S(), ci), IntegerEntry(T(height, lastBlock.timestamp), ci), StringEntry(W(X, bV), bi(cQ, cR, cT, ci, cr, cS, height, lastBlock.timestamp, cU, cV))]
377+ $Tuple13(cP, cT, ci, cd, cf, cc, bY, cb, cW, cU, cV, ct, cv)
358378 }
359379 }
360380 }
361381
362382
363-func cQ (cR) = {
364- let bE = aH()
365- let cS = bE[r]
366- let cT = bE[s]
367- let bU = parseIntValue(bE[p])
368- let bF = parseIntValue(bE[t])
369- let bG = parseIntValue(bE[u])
370- let cU = bq(cS)
371- let cV = bq(cT)
372- let ca = if ((cR.orderType == Buy))
373- then bv(bF, bG, (cU + cR.amount), cV)
374- else bv(bF, bG, (cU - cR.amount), cV)
375- let cb = G(ca, b)
376- if (if (if (aF())
383+func cX (cY) = {
384+ let bL = aO()
385+ let cZ = bL[r]
386+ let da = bL[s]
387+ let cb = parseIntValue(bL[p])
388+ let bM = parseIntValue(bL[t])
389+ let bN = parseIntValue(bL[u])
390+ let db = bx(cZ)
391+ let dc = bx(da)
392+ let ch = if ((cY.orderType == Buy))
393+ then bC(bM, bN, (db + cY.amount), dc)
394+ else bC(bM, bN, (db - cY.amount), dc)
395+ let ci = G(ch, b)
396+ if (if (if (aM())
377397 then true
378- else (bU == m))
398+ else (cb == m))
379399 then true
380- else (bU == n))
400+ else (cb == n))
381401 then throw("Exchange operations disabled")
382402 else {
383- let cW = cR.assetPair.amountAsset
384- let cX = if ((cW == unit))
403+ let dd = cY.assetPair.amountAsset
404+ let de = if ((dd == unit))
385405 then "WAVES"
386- else toBase58String(value(cW))
387- let cY = cR.assetPair.priceAsset
388- let cZ = if ((cY == unit))
406+ else toBase58String(value(dd))
407+ let df = cY.assetPair.priceAsset
408+ let dg = if ((df == unit))
389409 then "WAVES"
390- else toBase58String(value(cY))
391- if (if ((cX != cS))
410+ else toBase58String(value(df))
411+ if (if ((de != cZ))
392412 then true
393- else (cZ != cT))
413+ else (dg != da))
394414 then throw("Wrong order assets.")
395415 else {
396- let da = cR.price
397- let db = fraction(b, bG, bF)
398- let dc = J(da, b, db)
399- let dd = if ((cR.orderType == Buy))
400- then (cb >= dc)
401- else (dc >= cb)
416+ let dh = cY.price
417+ let di = fraction(b, bN, bM)
418+ let dj = J(dh, b, di)
419+ let dk = if ((cY.orderType == Buy))
420+ then (ci >= dj)
421+ else (dj >= ci)
402422 true
403423 }
404424 }
405425 }
406426
407427
408-func de (df) = if ((size(df.payments) != 1))
428+func dl (dm) = if ((size(dm.payments) != 1))
409429 then throw("exactly 1 payment is expected")
410430 else {
411- let dg = value(df.payments[0])
412- let bP = value(dg.assetId)
413- let dh = dg.amount
414- let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
415- let cg = cA._1
416- let ch = cA._2
417- let bU = parseIntValue(cA._9)
418- let ci = cA._10
419- if (if (aF())
431+ let dn = value(dm.payments[0])
432+ let bW = value(dn.assetId)
433+ let do = dn.amount
434+ let cH = bU(toBase58String(dm.transactionId), toBase58String(bW), do, dm.caller)
435+ let cn = cH._1
436+ let co = cH._2
437+ let cb = parseIntValue(cH._9)
438+ let cp = cH._10
439+ if (if (aM())
420440 then true
421- else (bU == n))
422- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
423- else $Tuple5(cg, ch, dh, bP, ci)
441+ else (cb == n))
442+ then throw(("Get operation is blocked by admin. Status = " + toString(cb)))
443+ else $Tuple5(cn, co, do, bW, cp)
424444 }
425445
426446
427-func di (df,ck,cq) = if ((size(df.payments) != 2))
447+func dp (dm,cr,cx) = if ((size(dm.payments) != 2))
428448 then throw("exactly 2 payments are expected")
429449 else {
430- let dj = value(df.payments[0])
431- let dk = value(df.payments[1])
432- let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
433- let bU = parseIntValue(dl._8)
434- if (if (if (aF())
450+ let dq = value(dm.payments[0])
451+ let dr = value(dm.payments[1])
452+ let ds = cq(toBase58String(dm.transactionId), cr, dq.amount, dq.assetId, dr.amount, dr.assetId, toString(dm.caller), false, cx)
453+ let cb = parseIntValue(ds._8)
454+ if (if (if (aM())
435455 then true
436- else (bU == l))
456+ else (cb == l))
437457 then true
438- else (bU == n))
439- then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
440- else dl
458+ else (cb == n))
459+ then throw(("Put operation is blocked by admin. Status = " + toString(cb)))
460+ else ds
441461 }
442462
443463
444-func dm (dn) = {
445- let do = invoke(aD, "emit", [dn], nil)
446- if ((do == do))
464+func dt (du) = {
465+ let dv = invoke(aK, "emit", [du], nil)
466+ if ((dv == dv))
447467 then {
448- let dp = {
449- let dq = do
450- if ($isInstanceOf(dq, "Address"))
468+ let dw = {
469+ let aI = dv
470+ if ($isInstanceOf(aI, "Address"))
451471 then {
452- let dr = dq
453- invoke(dr, "emit", [dn], nil)
472+ let dx = aI
473+ invoke(dx, "emit", [du], nil)
454474 }
455475 else unit
456476 }
457- if ((dp == dp))
458- then dn
477+ if ((dw == dw))
478+ then du
459479 else throw("Strict value is not equal to itself.")
460480 }
461481 else throw("Strict value is not equal to itself.")
462482 }
463483
464484
465-func ds (dn) = {
466- let dt = fraction(dn, ae, b)
467- $Tuple2((dn - dt), dt)
485+func dy (du) = {
486+ let dz = fraction(du, ae, b)
487+ $Tuple2((du - dz), dz)
468488 }
469489
470490
471-func du (dv,dw,X,Y) = {
472- let dx = (Y == unit)
473- let dy = bq(aM(aU))
474- let dz = bq(aM(aV))
475- let dA = if ((dw == aU))
491+func dA (dB,dC,X,Y) = {
492+ let dD = (Y == unit)
493+ let dE = bx(aT(bb))
494+ let dF = bx(aT(bc))
495+ let dG = if ((dC == bb))
476496 then true
477- else if ((dw == aV))
497+ else if ((dC == bc))
478498 then false
479- else aB("invalid asset")
480- let dB = if (dx)
481- then $Tuple2(dy, dz)
482- else if (dA)
483- then $Tuple2((dy - dv), dz)
484- else $Tuple2(dy, (dz - dv))
485- let dC = dB._1
486- let dD = dB._2
487- let dE = if (dA)
488- then $Tuple2(dv, 0)
489- else $Tuple2(0, dv)
490- let dF = dE._1
491- let dG = dE._2
492- let dH = ds(dF)._1
493- let dI = ds(dG)._1
494- let dJ = ds(dv)
495- let dK = dJ._1
496- let dt = dJ._2
497- let dL = (dC + dH)
498- let dM = (dD + dI)
499- let dN = bs(D(dM, aX), D(dL, aW))
500- let dO = G(dN, b)
501- let dP = if (dA)
502- then dC
503- else dD
504- let dQ = toBigInt(dP)
505- let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
506- let dS = if ((dR > f))
499+ else aE("invalid asset")
500+ let dH = if (dD)
501+ then $Tuple2(dE, dF)
502+ else if (dG)
503+ then $Tuple2((dE - dB), dF)
504+ else $Tuple2(dE, (dF - dB))
505+ let dI = dH._1
506+ let dJ = dH._2
507+ let dK = if (dG)
508+ then $Tuple2(dB, 0)
509+ else $Tuple2(0, dB)
510+ let dL = dK._1
511+ let dM = dK._2
512+ let dN = dy(dL)._1
513+ let dO = dy(dM)._1
514+ let dP = dy(dB)
515+ let dQ = dP._1
516+ let dz = dP._2
517+ let dR = (dI + dN)
518+ let dS = (dJ + dO)
519+ let dT = bz(D(dS, be), D(dR, bd))
520+ let dU = G(dT, b)
521+ let dV = if (dG)
522+ then dI
523+ else dJ
524+ let dW = toBigInt(dV)
525+ let dX = toBigInt(valueOrErrorMessage(assetInfo(ba), (("asset " + toBase58String(ba)) + " doesn't exist")).quantity)
526+ let dY = if ((dX > f))
507527 then true
508- else aB("initial deposit requires all coins")
509- if ((dS == dS))
528+ else aE("initial deposit requires all coins")
529+ if ((dY == dY))
510530 then {
511- let dT = toBigInt(dK)
512- let dU = max([0, toInt(((dR * (sqrtBigInt((d + ((dT * d) / dQ)), 18, 18, DOWN) - d)) / d))])
513- let cP = if (dx)
531+ let dZ = toBigInt(dQ)
532+ let ea = max([0, toInt(((dX * (sqrtBigInt((d + ((dZ * d) / dW)), 18, 18, DOWN) - d)) / d))])
533+ let cW = if (dD)
514534 then nil
515- else [IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dF, dG, dU, dO, 0, 0, height, lastBlock.timestamp, 0, 0))]
516- let dV = bs(D(dD, aX), D(dC, aW))
517- let dW = G(dV, b)
518- let dX = {
519- let dY = if (dA)
520- then $Tuple2(dF, dC)
521- else $Tuple2(dG, dD)
522- let dn = dY._1
523- let dZ = dY._2
524- let ea = toInt(fraction(dR, toBigInt((dn / 2)), toBigInt(dZ)))
525- fraction((dU - ea), b, ea)
535+ else [IntegerEntry(S(), dU), IntegerEntry(T(height, lastBlock.timestamp), dU), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bi(dL, dM, ea, dU, 0, 0, height, lastBlock.timestamp, 0, 0))]
536+ let eb = bz(D(dJ, be), D(dI, bd))
537+ let ec = G(eb, b)
538+ let ed = {
539+ let ee = if (dG)
540+ then $Tuple2(dL, dI)
541+ else $Tuple2(dM, dJ)
542+ let du = ee._1
543+ let ef = ee._2
544+ let eg = toInt(fraction(dX, toBigInt((du / 2)), toBigInt(ef)))
545+ fraction((ea - eg), b, eg)
526546 }
527- $Tuple4(dU, cP, dt, dX)
547+ $Tuple4(ea, cW, dz, ed)
528548 }
529549 else throw("Strict value is not equal to itself.")
530550 }
531551
532552
533-func eb (ec,dK,dw,X,Y) = {
534- let dx = (Y == unit)
535- let ed = [if ((dw == aT))
553+func eh (ei,dQ,dC,X,Y) = {
554+ let dD = (Y == unit)
555+ let ej = [if ((dC == ba))
536556 then true
537- else aB("invalid lp asset")]
538- if ((ed == ed))
557+ else aE("invalid lp asset")]
558+ if ((ej == ej))
539559 then {
540- let ee = if ((ec == aU))
560+ let ek = if ((ei == bb))
541561 then true
542- else if ((ec == aV))
562+ else if ((ei == bc))
543563 then false
544- else aB("invalid asset")
545- let ef = if (ee)
546- then toBigInt(bq(aM(aU)))
547- else toBigInt(bq(aM(aV)))
548- let eg = bq(aM(aU))
549- let eh = bq(aM(aV))
550- let ei = if (ee)
551- then eg
552- else eh
553- let ej = toBigInt(ei)
554- let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
555- let ek = toBigInt(dK)
556- let el = max([0, toInt(((ef * (d - pow((d - ((ek * d) / dR)), 18, h, 0, 18, DOWN))) / d))])
557- let em = ds(el)
558- let en = em._1
559- let dt = em._2
560- let eo = if (ee)
561- then $Tuple4(en, 0, (eg - el), eh)
562- else $Tuple4(0, en, eg, (eh - el))
563- let ep = eo._1
564- let eq = eo._2
565- let er = eo._3
566- let es = eo._4
567- let dN = bs(D(es, aX), D(er, aW))
568- let dO = G(dN, b)
569- let cP = if (dx)
564+ else aE("invalid asset")
565+ let el = if (ek)
566+ then toBigInt(bx(aT(bb)))
567+ else toBigInt(bx(aT(bc)))
568+ let em = bx(aT(bb))
569+ let en = bx(aT(bc))
570+ let eo = if (ek)
571+ then em
572+ else en
573+ let ep = toBigInt(eo)
574+ let dX = toBigInt(valueOrErrorMessage(assetInfo(ba), (("asset " + toBase58String(ba)) + " doesn't exist")).quantity)
575+ let eq = toBigInt(dQ)
576+ let er = max([0, toInt(((el * (d - pow((d - ((eq * d) / dX)), 18, h, 0, 18, DOWN))) / d))])
577+ let es = dy(er)
578+ let et = es._1
579+ let dz = es._2
580+ let eu = if (ek)
581+ then $Tuple4(et, 0, (em - er), en)
582+ else $Tuple4(0, et, em, (en - er))
583+ let ev = eu._1
584+ let ew = eu._2
585+ let ex = eu._3
586+ let ey = eu._4
587+ let dT = bz(D(ey, be), D(ex, bd))
588+ let dU = G(dT, b)
589+ let cW = if (dD)
570590 then nil
571- else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(ep, eq, dK, dO, height, lastBlock.timestamp)), IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO)]
572- let dV = bs(D(eh, aX), D(eg, aW))
573- let dW = G(dV, b)
574- let dX = {
575- let et = (toInt(fraction(ef, ek, dR)) * 2)
576- fraction((en - et), b, et)
591+ else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bt(ev, ew, dQ, dU, height, lastBlock.timestamp)), IntegerEntry(S(), dU), IntegerEntry(T(height, lastBlock.timestamp), dU)]
592+ let eb = bz(D(en, be), D(em, bd))
593+ let ec = G(eb, b)
594+ let ed = {
595+ let ez = (toInt(fraction(el, eq, dX)) * 2)
596+ fraction((et - ez), b, ez)
577597 }
578- $Tuple4(en, cP, dt, dX)
598+ $Tuple4(et, cW, dz, ed)
579599 }
580600 else throw("Strict value is not equal to itself.")
581601 }
582602
583603
584-func eu () = {
585- let dq = getString(Q())
586- if ($isInstanceOf(dq, "String"))
604+func eA (eB,eC,cc) = {
605+ let eD = (pow((eB * eC), 0, 5, 1, 0, DOWN) / cc)
606+ eD
607+ }
608+
609+
610+func eE () = {
611+ let bL = aO()
612+ let bY = fromBase58String(bL[q])
613+ let eF = bL[r]
614+ let da = bL[s]
615+ let eG = bx(eF)
616+ let eH = bx(da)
617+ let cc = valueOrErrorMessage(assetInfo(bY), (("Asset " + toBase58String(bY)) + " doesn't exist")).quantity
618+ let eD = eA(eG, eH, cc)
619+ eD
620+ }
621+
622+
623+func eI () = {
624+ let aI = getString(Q())
625+ if ($isInstanceOf(aI, "String"))
587626 then {
588- let ev = dq
589- fromBase58String(ev)
627+ let eJ = aI
628+ fromBase58String(eJ)
590629 }
591- else if ($isInstanceOf(dq, "Unit"))
630+ else if ($isInstanceOf(aI, "Unit"))
592631 then unit
593632 else throw("Match error")
594633 }
595634
596635
597-func ew () = {
598- let dq = getString(R())
599- if ($isInstanceOf(dq, "String"))
636+func eK () = {
637+ let aI = getString(R())
638+ if ($isInstanceOf(aI, "String"))
600639 then {
601- let ev = dq
602- fromBase58String(ev)
640+ let eJ = aI
641+ fromBase58String(eJ)
603642 }
604- else if ($isInstanceOf(dq, "Unit"))
643+ else if ($isInstanceOf(aI, "Unit"))
605644 then unit
606645 else throw("Match error")
607646 }
608647
609648
610-func ex (df) = {
611- let dq = eu()
612- if ($isInstanceOf(dq, "ByteVector"))
649+func eL (dm) = {
650+ let aI = eI()
651+ if ($isInstanceOf(aI, "ByteVector"))
613652 then {
614- let ey = dq
615- (df.callerPublicKey == ey)
653+ let eM = aI
654+ (dm.callerPublicKey == eM)
616655 }
617- else if ($isInstanceOf(dq, "Unit"))
618- then (df.caller == this)
656+ else if ($isInstanceOf(aI, "Unit"))
657+ then (dm.caller == this)
619658 else throw("Match error")
620659 }
621660
622661
623-func ez (df) = {
624- let eA = throw("Permission denied")
625- let dq = eu()
626- if ($isInstanceOf(dq, "ByteVector"))
662+func eN (dm) = {
663+ let eO = throw("Permission denied")
664+ let aI = eI()
665+ if ($isInstanceOf(aI, "ByteVector"))
627666 then {
628- let ey = dq
629- if ((df.callerPublicKey == ey))
667+ let eM = aI
668+ if ((dm.callerPublicKey == eM))
630669 then true
631- else eA
670+ else eO
632671 }
633- else if ($isInstanceOf(dq, "Unit"))
634- then if ((df.caller == this))
672+ else if ($isInstanceOf(aI, "Unit"))
673+ then if ((dm.caller == this))
635674 then true
636- else eA
675+ else eO
637676 else throw("Match error")
638677 }
639678
640679
641-@Callable(df)
642-func setManager (eB) = {
643- let eC = ez(df)
644- if ((eC == eC))
680+@Callable(dm)
681+func setManager (eP) = {
682+ let eQ = eN(dm)
683+ if ((eQ == eQ))
645684 then {
646- let eD = fromBase58String(eB)
647- if ((eD == eD))
648- then [StringEntry(R(), eB)]
685+ let eR = fromBase58String(eP)
686+ if ((eR == eR))
687+ then [StringEntry(R(), eP)]
649688 else throw("Strict value is not equal to itself.")
650689 }
651690 else throw("Strict value is not equal to itself.")
653692
654693
655694
656-@Callable(df)
695+@Callable(dm)
657696 func confirmManager () = {
658- let eE = ew()
659- let eF = if (isDefined(eE))
697+ let eS = eK()
698+ let eT = if (isDefined(eS))
660699 then true
661700 else throw("No pending manager")
662- if ((eF == eF))
701+ if ((eT == eT))
663702 then {
664- let eG = if ((df.callerPublicKey == value(eE)))
703+ let eU = if ((dm.callerPublicKey == value(eS)))
665704 then true
666705 else throw("You are not pending manager")
667- if ((eG == eG))
668- then [StringEntry(Q(), toBase58String(value(eE))), DeleteEntry(R())]
706+ if ((eU == eU))
707+ then [StringEntry(Q(), toBase58String(value(eS))), DeleteEntry(R())]
669708 else throw("Strict value is not equal to itself.")
670709 }
671710 else throw("Strict value is not equal to itself.")
673712
674713
675714
676-@Callable(df)
677-func put (ck,eH) = if ((0 > ck))
715+@Callable(dm)
716+func put (cr,eV) = if ((0 > cr))
678717 then throw("Invalid slippageTolerance passed")
679718 else {
680- let dl = di(df, ck, true)
681- let cM = dl._2
682- let bR = dl._7
683- let ci = dl._9
684- let cN = dl._10
685- let cO = dl._11
686- let eI = dl._12
687- let eJ = dl._13
688- let do = invoke(aD, "emit", [cM], nil)
689- if ((do == do))
719+ let ds = dp(dm, cr, true)
720+ let cT = ds._2
721+ let bY = ds._7
722+ let cp = ds._9
723+ let cU = ds._10
724+ let cV = ds._11
725+ let eW = ds._12
726+ let eX = ds._13
727+ let dv = invoke(aK, "emit", [cT], nil)
728+ if ((dv == dv))
690729 then {
691- let dp = {
692- let dq = do
693- if ($isInstanceOf(dq, "Address"))
730+ let dw = {
731+ let aI = dv
732+ if ($isInstanceOf(aI, "Address"))
694733 then {
695- let dr = dq
696- invoke(dr, "emit", [cM], nil)
734+ let dx = aI
735+ invoke(dx, "emit", [cT], nil)
697736 }
698737 else unit
699738 }
700- if ((dp == dp))
739+ if ((dw == dw))
701740 then {
702- let eK = if ((cN > 0))
703- then invoke(ba, "put", nil, [AttachedPayment(eI, cN)])
741+ let eY = if ((cU > 0))
742+ then invoke(bh, "put", nil, [AttachedPayment(eW, cU)])
704743 else nil
705- if ((eK == eK))
744+ if ((eY == eY))
706745 then {
707- let eL = if ((cO > 0))
708- then invoke(ba, "put", nil, [AttachedPayment(eJ, cO)])
746+ let eZ = if ((cV > 0))
747+ then invoke(bh, "put", nil, [AttachedPayment(eX, cV)])
709748 else nil
710- if ((eL == eL))
749+ if ((eZ == eZ))
711750 then {
712- let eM = if (eH)
751+ let fa = if (eV)
713752 then {
714- let eN = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
715- if ((eN == eN))
753+ let fb = invoke(bg, "stake", nil, [AttachedPayment(bY, cT)])
754+ if ((fb == fb))
716755 then nil
717756 else throw("Strict value is not equal to itself.")
718757 }
719- else [ScriptTransfer(df.caller, cM, bR)]
720- (ci ++ eM)
758+ else [ScriptTransfer(dm.caller, cT, bY)]
759+ (cp ++ fa)
721760 }
722761 else throw("Strict value is not equal to itself.")
723762 }
730769
731770
732771
733-@Callable(df)
734-func putForFree (eO) = if ((0 > eO))
772+@Callable(dm)
773+func putForFree (fc) = if ((0 > fc))
735774 then throw("Invalid value passed")
736775 else {
737- let dl = di(df, eO, false)
738- dl._9
776+ let ds = dp(dm, fc, false)
777+ ds._9
739778 }
740779
741780
742781
743-@Callable(df)
744-func putOneTkn (eP,eQ) = {
745- let eR = {
746- let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
747- if ($isInstanceOf(eS, "Boolean"))
748- then eS
749- else throw(($getType(eS) + " couldn't be cast to Boolean"))
782+@Callable(dm)
783+func putOneTkn (fd,fe) = {
784+ let ff = {
785+ let fg = invoke(aK, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
786+ if ($isInstanceOf(fg, "Boolean"))
787+ then fg
788+ else throw(($getType(fg) + " couldn't be cast to Boolean"))
750789 }
751- let eT = if (if (if (aF())
790+ let fh = if (if (if (aM())
752791 then true
753- else (aS == l))
792+ else (aZ == l))
754793 then true
755- else (aS == n))
794+ else (aZ == n))
756795 then true
757- else eR
758- let ed = [if (if (!(eT))
796+ else ff
797+ let ej = [if (if (!(fh))
759798 then true
760- else ex(df))
799+ else eL(dm))
761800 then true
762- else aB("put operation is blocked by admin"), if ((size(df.payments) == 1))
801+ else aE("put operation is blocked by admin"), if ((size(dm.payments) == 1))
763802 then true
764- else aB("exactly 1 payment are expected")]
765- if ((ed == ed))
803+ else aE("exactly 1 payment are expected")]
804+ if ((ej == ej))
766805 then {
767- let eU = df.payments[0]
768- let dw = eU.assetId
769- let dv = eU.amount
770- let X = df.caller
771- let Y = df.transactionId
772- let eV = du(dv, dw, X, Y)
773- if ((eV == eV))
806+ let fi = dm.payments[0]
807+ let dC = fi.assetId
808+ let dB = fi.amount
809+ let X = dm.caller
810+ let Y = dm.transactionId
811+ let fj = dA(dB, dC, X, Y)
812+ let fk = fj._1
813+ let cW = fj._2
814+ let dz = fj._3
815+ let fl = fj._4
816+ let fm = if (if ((fd > 0))
817+ then (fd > fk)
818+ else false)
819+ then aE(makeString(["amount to receive is less than ", toString(fd)], ""))
820+ else fk
821+ let dv = dt(fm)
822+ if ((dv == dv))
774823 then {
775- let eW = eV._4
776- let dt = eV._3
777- let cP = eV._2
778- let eX = eV._1
779- let eY = if (if ((eP > 0))
780- then (eP > eX)
824+ let fa = if (fe)
825+ then {
826+ let fn = invoke(bg, "stake", nil, [AttachedPayment(ba, fm)])
827+ if ((fn == fn))
828+ then nil
829+ else throw("Strict value is not equal to itself.")
830+ }
831+ else [ScriptTransfer(dm.caller, fm, ba)]
832+ let fo = if ((dz > 0))
833+ then [ScriptTransfer(aL, dz, dC)]
834+ else nil
835+ $Tuple2(((cW ++ fa) ++ fo), fm)
836+ }
837+ else throw("Strict value is not equal to itself.")
838+ }
839+ else throw("Strict value is not equal to itself.")
840+ }
841+
842+
843+
844+@Callable(dm)
845+func putOneTknREADONLY (dC,dB) = {
846+ let fp = dA(dB, aR(dC), unit, unit)
847+ let fk = fp._1
848+ let cW = fp._2
849+ let dz = fp._3
850+ let fl = fp._4
851+ $Tuple2(nil, $Tuple3(fk, dz, fl))
852+ }
853+
854+
855+
856+@Callable(dm)
857+func getOneTkn (fq,fd) = {
858+ let ff = {
859+ let fg = invoke(aK, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
860+ if ($isInstanceOf(fg, "Boolean"))
861+ then fg
862+ else throw(($getType(fg) + " couldn't be cast to Boolean"))
863+ }
864+ let fr = if (if (aM())
865+ then true
866+ else (aZ == n))
867+ then true
868+ else ff
869+ let ej = [if (if (!(fr))
870+ then true
871+ else eL(dm))
872+ then true
873+ else aE("get operation is blocked by admin"), if ((size(dm.payments) == 1))
874+ then true
875+ else aE("exactly 1 payment are expected")]
876+ if ((ej == ej))
877+ then {
878+ let ei = aR(fq)
879+ let fi = dm.payments[0]
880+ let dC = fi.assetId
881+ let dQ = fi.amount
882+ let X = dm.caller
883+ let Y = dm.transactionId
884+ let fs = eh(ei, dQ, dC, X, Y)
885+ let ft = fs._1
886+ let cW = fs._2
887+ let dz = fs._3
888+ let fl = fs._4
889+ let du = if (if ((fd > 0))
890+ then (fd > ft)
891+ else false)
892+ then aE(makeString(["amount to receive is less than ", toString(fd)], ""))
893+ else ft
894+ let fu = invoke(aK, "burn", [dQ], [AttachedPayment(dC, dQ)])
895+ if ((fu == fu))
896+ then {
897+ let fv = [ScriptTransfer(X, du, ei)]
898+ let fo = if ((dz > 0))
899+ then [ScriptTransfer(aL, dz, ei)]
900+ else nil
901+ $Tuple2(((cW ++ fv) ++ fo), du)
902+ }
903+ else throw("Strict value is not equal to itself.")
904+ }
905+ else throw("Strict value is not equal to itself.")
906+ }
907+
908+
909+
910+@Callable(dm)
911+func getOneTknREADONLY (ei,dQ) = {
912+ let fw = eh(aR(ei), dQ, ba, unit, unit)
913+ let ft = fw._1
914+ let cW = fw._2
915+ let dz = fw._3
916+ let fl = fw._4
917+ $Tuple2(nil, $Tuple3(ft, dz, fl))
918+ }
919+
920+
921+
922+@Callable(dm)
923+func unstakeAndGetOneTkn (fx,fq,fd) = {
924+ let ff = {
925+ let fg = invoke(aK, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
926+ if ($isInstanceOf(fg, "Boolean"))
927+ then fg
928+ else throw(($getType(fg) + " couldn't be cast to Boolean"))
929+ }
930+ let fr = if (if (aM())
931+ then true
932+ else (aZ == n))
933+ then true
934+ else ff
935+ let ej = [if (if (!(fr))
936+ then true
937+ else eL(dm))
938+ then true
939+ else aE("get operation is blocked by admin"), if ((size(dm.payments) == 0))
940+ then true
941+ else aE("no payments are expected")]
942+ if ((ej == ej))
943+ then {
944+ let ei = aR(fq)
945+ let X = dm.caller
946+ let Y = dm.transactionId
947+ let fy = invoke(bg, "unstake", [toBase58String(ba), fx], nil)
948+ if ((fy == fy))
949+ then {
950+ let fz = eh(ei, fx, ba, X, Y)
951+ let ft = fz._1
952+ let cW = fz._2
953+ let dz = fz._3
954+ let fl = fz._4
955+ let du = if (if ((fd > 0))
956+ then (fd > ft)
781957 else false)
782- then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
783- else eX
784- let do = dm(eY)
785- if ((do == do))
958+ then aE(makeString(["amount to receive is less than ", toString(fd)], ""))
959+ else ft
960+ let fu = invoke(aK, "burn", [fx], [AttachedPayment(ba, fx)])
961+ if ((fu == fu))
786962 then {
787- let eM = if (eQ)
788- then {
789- let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
790- if ((eZ == eZ))
791- then nil
792- else throw("Strict value is not equal to itself.")
793- }
794- else [ScriptTransfer(df.caller, eY, aT)]
795- let fa = if ((dt > 0))
796- then [ScriptTransfer(aE, dt, dw)]
963+ let fv = [ScriptTransfer(dm.caller, du, ei)]
964+ let fo = if ((dz > 0))
965+ then [ScriptTransfer(aL, dz, ei)]
797966 else nil
798- $Tuple2(((cP ++ eM) ++ fa), eY)
967+ $Tuple2(((cW ++ fv) ++ fo), du)
799968 }
800969 else throw("Strict value is not equal to itself.")
801970 }
806975
807976
808977
809-@Callable(df)
810-func putOneTknREADONLY (dw,dv) = {
811- let fb = du(dv, aK(dw), unit, unit)
812- let eX = fb._1
813- let cP = fb._2
814- let dt = fb._3
815- let eW = fb._4
816- $Tuple2(nil, $Tuple3(eX, dt, eW))
817- }
818-
819-
820-
821-@Callable(df)
822-func getOneTkn (fc,eP) = {
823- let eR = {
824- let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
825- if ($isInstanceOf(eS, "Boolean"))
826- then eS
827- else throw(($getType(eS) + " couldn't be cast to Boolean"))
828- }
829- let fd = if (if (aF())
830- then true
831- else (aS == n))
832- then true
833- else eR
834- let ed = [if (if (!(fd))
835- then true
836- else ex(df))
837- then true
838- else aB("get operation is blocked by admin"), if ((size(df.payments) == 1))
839- then true
840- else aB("exactly 1 payment are expected")]
841- if ((ed == ed))
842- then {
843- let ec = aK(fc)
844- let eU = df.payments[0]
845- let dw = eU.assetId
846- let dK = eU.amount
847- let X = df.caller
848- let Y = df.transactionId
849- let fe = eb(ec, dK, dw, X, Y)
850- if ((fe == fe))
851- then {
852- let eW = fe._4
853- let dt = fe._3
854- let cP = fe._2
855- let ff = fe._1
856- let dn = if (if ((eP > 0))
857- then (eP > ff)
858- else false)
859- then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
860- else ff
861- let fg = invoke(aD, "burn", [dK], [AttachedPayment(dw, dK)])
862- if ((fg == fg))
863- then {
864- let fh = [ScriptTransfer(X, dn, ec)]
865- let fa = if ((dt > 0))
866- then [ScriptTransfer(aE, dt, ec)]
867- else nil
868- $Tuple2(((cP ++ fh) ++ fa), dn)
869- }
870- else throw("Strict value is not equal to itself.")
871- }
872- else throw("Strict value is not equal to itself.")
873- }
978+@Callable(dm)
979+func get () = {
980+ let cH = dl(dm)
981+ let fA = cH._1
982+ let co = cH._2
983+ let do = cH._3
984+ let bW = cH._4
985+ let cp = cH._5
986+ let fB = invoke(aK, "burn", [do], [AttachedPayment(bW, do)])
987+ if ((fB == fB))
988+ then cp
874989 else throw("Strict value is not equal to itself.")
875990 }
876991
877992
878993
879-@Callable(df)
880-func getOneTknREADONLY (ec,dK) = {
881- let fi = eb(aK(ec), dK, aT, unit, unit)
882- let ff = fi._1
883- let cP = fi._2
884- let dt = fi._3
885- let eW = fi._4
886- $Tuple2(nil, $Tuple3(ff, dt, eW))
994+@Callable(dm)
995+func getNoLess (fC,fD) = {
996+ let cH = dl(dm)
997+ let cn = cH._1
998+ let co = cH._2
999+ let do = cH._3
1000+ let bW = cH._4
1001+ let cp = cH._5
1002+ if ((fC > cn))
1003+ then throw(((("noLessThenAmtAsset failed: " + toString(cn)) + " < ") + toString(fC)))
1004+ else if ((fD > co))
1005+ then throw(((("noLessThenPriceAsset failed: " + toString(co)) + " < ") + toString(fD)))
1006+ else {
1007+ let fB = invoke(aK, "burn", [do], [AttachedPayment(bW, do)])
1008+ if ((fB == fB))
1009+ then cp
1010+ else throw("Strict value is not equal to itself.")
1011+ }
8871012 }
8881013
8891014
8901015
891-@Callable(df)
892-func unstakeAndGetOneTkn (fj,fc,eP) = {
893- let eR = {
894- let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
895- if ($isInstanceOf(eS, "Boolean"))
896- then eS
897- else throw(($getType(eS) + " couldn't be cast to Boolean"))
898- }
899- let fd = if (if (aF())
900- then true
901- else (aS == n))
902- then true
903- else eR
904- let ed = [if (if (!(fd))
905- then true
906- else ex(df))
907- then true
908- else aB("get operation is blocked by admin"), if ((size(df.payments) == 0))
909- then true
910- else aB("no payments are expected")]
911- if ((ed == ed))
1016+@Callable(dm)
1017+func unstakeAndGet (du) = {
1018+ let fE = if ((size(dm.payments) != 0))
1019+ then throw("No payments are expected")
1020+ else true
1021+ if ((fE == fE))
9121022 then {
913- let ec = aK(fc)
914- let X = df.caller
915- let Y = df.transactionId
916- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
917- if ((fk == fk))
1023+ let bL = aO()
1024+ let bY = fromBase58String(bL[q])
1025+ let fy = invoke(bg, "unstake", [toBase58String(bY), du], nil)
1026+ if ((fy == fy))
9181027 then {
919- let fl = eb(ec, fj, aT, X, Y)
920- if ((fl == fl))
1028+ let cH = bU(toBase58String(dm.transactionId), toBase58String(bY), du, dm.caller)
1029+ let cb = parseIntValue(cH._9)
1030+ let cp = cH._10
1031+ let fF = if (if (aM())
1032+ then true
1033+ else (cb == n))
1034+ then throw(("Get operation is blocked by admin. Status = " + toString(cb)))
1035+ else true
1036+ if ((fF == fF))
9211037 then {
922- let eW = fl._4
923- let dt = fl._3
924- let cP = fl._2
925- let ff = fl._1
926- let dn = if (if ((eP > 0))
927- then (eP > ff)
928- else false)
929- then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
930- else ff
931- let fg = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)])
932- if ((fg == fg))
933- then {
934- let fh = [ScriptTransfer(df.caller, dn, ec)]
935- let fa = if ((dt > 0))
936- then [ScriptTransfer(aE, dt, ec)]
937- else nil
938- $Tuple2(((cP ++ fh) ++ fa), dn)
939- }
1038+ let fB = invoke(aK, "burn", [du], [AttachedPayment(bY, du)])
1039+ if ((fB == fB))
1040+ then cp
9401041 else throw("Strict value is not equal to itself.")
9411042 }
9421043 else throw("Strict value is not equal to itself.")
9481049
9491050
9501051
951-@Callable(df)
952-func get () = {
953- let cA = de(df)
954- let fm = cA._1
955- let ch = cA._2
956- let dh = cA._3
957- let bP = cA._4
958- let ci = cA._5
959- let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
960- if ((fn == fn))
961- then ci
962- else throw("Strict value is not equal to itself.")
963- }
964-
965-
966-
967-@Callable(df)
968-func getNoLess (fo,fp) = {
969- let cA = de(df)
970- let cg = cA._1
971- let ch = cA._2
972- let dh = cA._3
973- let bP = cA._4
974- let ci = cA._5
975- if ((fo > cg))
976- then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo)))
977- else if ((fp > ch))
978- then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp)))
979- else {
980- let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
981- if ((fn == fn))
982- then ci
983- else throw("Strict value is not equal to itself.")
984- }
985- }
986-
987-
988-
989-@Callable(df)
990-func unstakeAndGet (dn) = {
991- let fq = if ((size(df.payments) != 0))
992- then throw("No payments are expected")
993- else true
994- if ((fq == fq))
1052+@Callable(dm)
1053+func unstakeAndGetNoLess (fx,fG,fD) = {
1054+ let fr = if (aM())
1055+ then true
1056+ else (aZ == n)
1057+ let ej = [if (!(fr))
1058+ then true
1059+ else throw("get operation is blocked by admin"), if ((size(dm.payments) == 0))
1060+ then true
1061+ else throw("no payments are expected")]
1062+ if ((ej == ej))
9951063 then {
996- let bE = aH()
997- let bR = fromBase58String(bE[q])
998- let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
999- if ((fk == fk))
1064+ let fy = invoke(bg, "unstake", [toBase58String(ba), fx], nil)
1065+ if ((fy == fy))
10001066 then {
1001- let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
1002- let bU = parseIntValue(cA._9)
1003- let ci = cA._10
1004- let fr = if (if (aF())
1067+ let cH = bU(toBase58String(dm.transactionId), toBase58String(ba), fx, dm.caller)
1068+ let cn = cH._1
1069+ let co = cH._2
1070+ let cp = cH._10
1071+ let fH = [if ((cn >= fG))
10051072 then true
1006- else (bU == n))
1007- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
1008- else true
1009- if ((fr == fr))
1073+ else throw(makeString(["amount asset amount to receive is less than ", toString(fG)], "")), if ((co >= fD))
1074+ then true
1075+ else throw(makeString(["price asset amount to receive is less than ", toString(fD)], ""))]
1076+ if ((fH == fH))
10101077 then {
1011- let fn = invoke(aD, "burn", [dn], [AttachedPayment(bR, dn)])
1012- if ((fn == fn))
1013- then ci
1078+ let fB = invoke(aK, "burn", [fx], [AttachedPayment(ba, fx)])
1079+ if ((fB == fB))
1080+ then cp
10141081 else throw("Strict value is not equal to itself.")
10151082 }
10161083 else throw("Strict value is not equal to itself.")
10221089
10231090
10241091
1025-@Callable(df)
1026-func unstakeAndGetNoLess (fj,fs,fp) = {
1027- let fd = if (aF())
1092+@Callable(dm)
1093+func activate (fI,fJ) = if ((toString(dm.caller) != toString(aK)))
1094+ then throw("permissions denied")
1095+ else $Tuple2([StringEntry(aa(), fI), StringEntry(ab(), fJ)], "success")
1096+
1097+
1098+
1099+@Callable(dm)
1100+func refreshKLp () = {
1101+ let fK = valueOrElse(getInteger(ag), 0)
1102+ let fL = aE(makeString([value(getString(ah)), "blocks have not passed since the previous call"], " "))
1103+ let fM = if (((height - fK) >= 30))
10281104 then true
1029- else (aS == n)
1030- let ed = [if (!(fd))
1031- then true
1032- else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
1033- then true
1034- else throw("no payments are expected")]
1035- if ((ed == ed))
1105+ else fL
1106+ if ((fM == fM))
10361107 then {
1037- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1038- if ((fk == fk))
1039- then {
1040- let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller)
1041- let cg = cA._1
1042- let ch = cA._2
1043- let ci = cA._10
1044- let ft = [if ((cg >= fs))
1045- then true
1046- else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
1047- then true
1048- else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1049- if ((ft == ft))
1050- then {
1051- let fn = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)])
1052- if ((fn == fn))
1053- then ci
1054- else throw("Strict value is not equal to itself.")
1055- }
1056- else throw("Strict value is not equal to itself.")
1057- }
1058- else throw("Strict value is not equal to itself.")
1108+ let eD = aH(eE())
1109+[IntegerEntry(ag, height), IntegerEntry(af, eD)]
10591110 }
10601111 else throw("Strict value is not equal to itself.")
10611112 }
10621113
10631114
10641115
1065-@Callable(df)
1066-func activate (fu,fv) = if ((toString(df.caller) != toString(aD)))
1067- then throw("permissions denied")
1068- else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
1116+@Callable(dm)
1117+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aO())
10691118
10701119
10711120
1072-@Callable(df)
1073-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
1121+@Callable(dm)
1122+func getAccBalanceWrapperREADONLY (by) = $Tuple2(nil, bx(by))
10741123
10751124
10761125
1077-@Callable(df)
1078-func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
1079-
1080-
1081-
1082-@Callable(df)
1083-func calcPricesWrapperREADONLY (by,bz,bD) = {
1084- let bM = bC(by, bz, bD)
1085- $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
1126+@Callable(dm)
1127+func calcPricesWrapperREADONLY (bF,bG,bK) = {
1128+ let bT = bJ(bF, bG, bK)
1129+ $Tuple2(nil, [toString(bT[0]), toString(bT[1]), toString(bT[2])])
10861130 }
10871131
10881132
10891133
1090-@Callable(df)
1134+@Callable(dm)
10911135 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
10921136
10931137
10941138
1095-@Callable(df)
1139+@Callable(dm)
10961140 func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
10971141
10981142
10991143
1100-@Callable(df)
1101-func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
1144+@Callable(dm)
1145+func calcPriceBigIntWrapperREADONLY (bA,bB) = $Tuple2(nil, toString(bz(parseBigIntValue(bA), parseBigIntValue(bB))))
11021146
11031147
11041148
1105-@Callable(df)
1106-func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
1149+@Callable(dm)
1150+func estimatePutOperationWrapperREADONLY (bV,cr,cs,ct,cu,cv,X,cw,cx) = $Tuple2(nil, cq(bV, cr, cs, ct, cu, cv, X, cw, cx))
11071151
11081152
11091153
1110-@Callable(df)
1111-func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1112- let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1113- $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
1154+@Callable(dm)
1155+func estimateGetOperationWrapperREADONLY (bV,bW,bX,X) = {
1156+ let cH = bU(bV, bW, bX, addressFromStringValue(X))
1157+ $Tuple2(nil, $Tuple10(cH._1, cH._2, cH._3, cH._4, cH._5, cH._6, cH._7, toString(cH._8), cH._9, cH._10))
11141158 }
11151159
11161160
11171161
1118-@Callable(df)
1162+@Callable(dm)
11191163 func statsREADONLY () = {
1120- let bE = aH()
1121- let bR = fromBase58String(bE[q])
1122- let cS = bE[r]
1123- let cT = bE[s]
1124- let ct = bE[v]
1125- let cu = bE[w]
1126- let bF = parseIntValue(bE[t])
1127- let bG = parseIntValue(bE[u])
1128- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1129- let cU = bq(cS)
1130- let cV = bq(cT)
1131- let fx = if ((fw == 0))
1164+ let bL = aO()
1165+ let bY = fromBase58String(bL[q])
1166+ let cZ = bL[r]
1167+ let da = bL[s]
1168+ let cA = bL[v]
1169+ let cB = bL[w]
1170+ let bM = parseIntValue(bL[t])
1171+ let bN = parseIntValue(bL[u])
1172+ let fN = valueOrErrorMessage(assetInfo(bY), (("Asset " + toBase58String(bY)) + " doesn't exist")).quantity
1173+ let db = bx(cZ)
1174+ let dc = bx(da)
1175+ let fO = if ((fN == 0))
11321176 then [e, e, e]
1133- else bC(cU, cV, fw)
1134- let cb = 0
1135- let fy = G(fx[1], b)
1136- let fz = G(fx[2], b)
1137- let fA = value(getInteger(aD, ap(toString(this))))
1138- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fw), toString(cb), toString(fy), toString(fz), toString(fA)], j))
1177+ else bJ(db, dc, fN)
1178+ let ci = 0
1179+ let fP = G(fO[1], b)
1180+ let fQ = G(fO[2], b)
1181+ let fR = value(getInteger(aK, as(toString(this))))
1182+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(db), toString(dc), toString(fN), toString(ci), toString(fP), toString(fQ), toString(fR)], j))
11391183 }
11401184
11411185
11421186
1143-@Callable(df)
1144-func evaluatePutByAmountAssetREADONLY (cl) = {
1145- let bE = aH()
1146- let bR = fromBase58String(bE[q])
1147- let cr = bE[r]
1148- let bS = fromBase58String(cr)
1149- let cs = bE[s]
1150- let bT = fromBase58String(cs)
1151- let bF = parseIntValue(bE[t])
1152- let bG = parseIntValue(bE[u])
1153- let bU = bE[p]
1154- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1155- let cU = bq(cr)
1156- let cV = bq(cs)
1157- let bA = D(cU, bF)
1158- let bB = D(cV, bG)
1159- let ca = if ((fw == 0))
1187+@Callable(dm)
1188+func evaluatePutByAmountAssetREADONLY (cs) = {
1189+ let bL = aO()
1190+ let bY = fromBase58String(bL[q])
1191+ let cy = bL[r]
1192+ let bZ = fromBase58String(cy)
1193+ let cz = bL[s]
1194+ let ca = fromBase58String(cz)
1195+ let bM = parseIntValue(bL[t])
1196+ let bN = parseIntValue(bL[u])
1197+ let cb = bL[p]
1198+ let fN = valueOrErrorMessage(assetInfo(bY), (("Asset " + toBase58String(bY)) + " doesn't exist")).quantity
1199+ let db = bx(cy)
1200+ let dc = bx(cz)
1201+ let bH = D(db, bM)
1202+ let bI = D(dc, bN)
1203+ let ch = if ((fN == 0))
11601204 then e
1161- else bs(bB, bA)
1162- let cx = D(cl, bF)
1163- let cy = fraction(cx, ca, d)
1164- let cn = G(cy, bG)
1165- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1166- let cI = dl._1
1167- let fB = dl._3
1168- let bW = dl._4
1169- let bY = dl._5
1170- let bV = dl._6
1171- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1205+ else bz(bI, bH)
1206+ let cE = D(cs, bM)
1207+ let cF = fraction(cE, ch, d)
1208+ let cu = G(cF, bN)
1209+ let ds = cq("", 500000, cs, bZ, cu, ca, "", true, false)
1210+ let cP = ds._1
1211+ let fS = ds._3
1212+ let cd = ds._4
1213+ let cf = ds._5
1214+ let cc = ds._6
1215+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cP), toString(G(ch, b)), toString(cd), toString(cf), toString(cc), cb, toString(cs), toString(cu)], j))
11721216 }
11731217
11741218
11751219
1176-@Callable(df)
1177-func evaluatePutByPriceAssetREADONLY (cn) = {
1178- let bE = aH()
1179- let bR = fromBase58String(bE[q])
1180- let cr = bE[r]
1181- let bS = fromBase58String(cr)
1182- let cs = bE[s]
1183- let bT = fromBase58String(cs)
1184- let bF = parseIntValue(bE[t])
1185- let bG = parseIntValue(bE[u])
1186- let bU = bE[p]
1187- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1188- let fC = bq(cr)
1189- let fD = bq(cs)
1190- let fE = D(fC, bF)
1191- let fF = D(fD, bG)
1192- let ca = if ((fw == 0))
1220+@Callable(dm)
1221+func evaluatePutByPriceAssetREADONLY (cu) = {
1222+ let bL = aO()
1223+ let bY = fromBase58String(bL[q])
1224+ let cy = bL[r]
1225+ let bZ = fromBase58String(cy)
1226+ let cz = bL[s]
1227+ let ca = fromBase58String(cz)
1228+ let bM = parseIntValue(bL[t])
1229+ let bN = parseIntValue(bL[u])
1230+ let cb = bL[p]
1231+ let fN = valueOrErrorMessage(assetInfo(bY), (("Asset " + toBase58String(bY)) + " doesn't exist")).quantity
1232+ let fT = bx(cy)
1233+ let fU = bx(cz)
1234+ let fV = D(fT, bM)
1235+ let fW = D(fU, bN)
1236+ let ch = if ((fN == 0))
11931237 then e
1194- else bs(fF, fE)
1195- let cy = D(cn, bG)
1196- let cx = fraction(cy, d, ca)
1197- let cl = G(cx, bF)
1198- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1199- let cI = dl._1
1200- let fB = dl._3
1201- let bW = dl._4
1202- let bY = dl._5
1203- let bV = dl._6
1204- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1238+ else bz(fW, fV)
1239+ let cF = D(cu, bN)
1240+ let cE = fraction(cF, d, ch)
1241+ let cs = G(cE, bM)
1242+ let ds = cq("", 500000, cs, bZ, cu, ca, "", true, false)
1243+ let cP = ds._1
1244+ let fS = ds._3
1245+ let cd = ds._4
1246+ let cf = ds._5
1247+ let cc = ds._6
1248+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cP), toString(G(ch, b)), toString(cd), toString(cf), toString(cc), cb, toString(cs), toString(cu)], j))
12051249 }
12061250
12071251
12081252
1209-@Callable(df)
1210-func evaluateGetREADONLY (fG,fH) = {
1211- let cA = bN("", fG, fH, this)
1212- let cg = cA._1
1213- let ch = cA._2
1214- let bW = cA._5
1215- let bY = cA._6
1216- let bV = cA._7
1217- let cb = cA._8
1218- let bU = parseIntValue(cA._9)
1219- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cg), toString(ch), toString(bW), toString(bY), toString(bV), toString(cb), toString(bU)], j))
1253+@Callable(dm)
1254+func evaluateGetREADONLY (fX,fY) = {
1255+ let cH = bU("", fX, fY, this)
1256+ let cn = cH._1
1257+ let co = cH._2
1258+ let cd = cH._5
1259+ let cf = cH._6
1260+ let cc = cH._7
1261+ let ci = cH._8
1262+ let cb = parseIntValue(cH._9)
1263+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cn), toString(co), toString(cd), toString(cf), toString(cc), toString(ci), toString(cb)], j))
12201264 }
12211265
12221266
1223-@Verifier(fI)
1224-func fJ () = {
1225- let fK = {
1226- let dq = eu()
1227- if ($isInstanceOf(dq, "ByteVector"))
1267+@Verifier(fZ)
1268+func ga () = {
1269+ let gb = {
1270+ let aI = eI()
1271+ if ($isInstanceOf(aI, "ByteVector"))
12281272 then {
1229- let ey = dq
1230- ey
1273+ let eM = aI
1274+ eM
12311275 }
1232- else if ($isInstanceOf(dq, "Unit"))
1233- then fI.senderPublicKey
1276+ else if ($isInstanceOf(aI, "Unit"))
1277+ then fZ.senderPublicKey
12341278 else throw("Match error")
12351279 }
1236- let dq = fI
1237- if ($isInstanceOf(dq, "Order"))
1280+ let aI = fZ
1281+ if ($isInstanceOf(aI, "Order"))
12381282 then {
1239- let cR = dq
1240- let fL = aG()
1241- let au = cQ(cR)
1242- let av = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1243- let aw = sigVerify(cR.bodyBytes, cR.proofs[1], fL)
1244- if (if (if (au)
1245- then av
1283+ let cY = aI
1284+ let gc = aN()
1285+ let ax = cX(cY)
1286+ let ay = sigVerify(cY.bodyBytes, cY.proofs[0], cY.senderPublicKey)
1287+ let az = sigVerify(cY.bodyBytes, cY.proofs[1], gc)
1288+ if (if (if (ax)
1289+ then ay
12461290 else false)
1247- then aw
1291+ then az
12481292 else false)
12491293 then true
1250- else at(au, av, aw)
1294+ else aw(ax, ay, az)
12511295 }
1252- else if ($isInstanceOf(dq, "SetScriptTransaction"))
1296+ else if ($isInstanceOf(aI, "SetScriptTransaction"))
12531297 then {
1254- let ev = dq
1255- let fM = blake2b256(value(ev.script))
1256- let fN = fromBase64String(value(getString(aD, ar())))
1257- let fO = scriptHash(this)
1258- if (if ((fN == fM))
1259- then (fO != fM)
1298+ let eJ = aI
1299+ let gd = blake2b256(value(eJ.script))
1300+ let ge = fromBase64String(value(getString(aK, au())))
1301+ let gf = scriptHash(this)
1302+ if (if ((ge == gd))
1303+ then (gf != gd)
12601304 else false)
12611305 then true
1262- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1306+ else sigVerify(fZ.bodyBytes, fZ.proofs[0], gb)
12631307 }
1264- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1308+ else sigVerify(fZ.bodyBytes, fZ.proofs[0], gb)
12651309 }
12661310
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 8
55
66 let b = 100000000
77
88 let c = toBigInt(100000000)
99
1010 let d = toBigInt(1000000000000000000)
1111
1212 let e = toBigInt(0)
1313
1414 let f = toBigInt(0)
1515
1616 let g = toBigInt(1)
1717
1818 let h = toBigInt(2)
1919
2020 let i = "WAVES"
2121
2222 let j = "__"
2323
2424 let k = 1
2525
2626 let l = 2
2727
2828 let m = 3
2929
3030 let n = 4
3131
3232 let o = 1
3333
3434 let p = 2
3535
3636 let q = 3
3737
3838 let r = 4
3939
4040 let s = 5
4141
4242 let t = 6
4343
4444 let u = 7
4545
4646 let v = 8
4747
4848 let w = 9
4949
5050 let x = 10
5151
5252 let y = 1
5353
5454 let z = 2
5555
5656 let A = 3
5757
5858 let B = 1
5959
6060 let C = 7
6161
6262 func D (E,F) = fraction(toBigInt(E), d, toBigInt(F))
6363
6464
6565 func G (H,I) = toInt(fraction(H, toBigInt(I), d))
6666
6767
6868 func J (K,L,M) = fraction(K, L, M)
6969
7070
7171 func N (H) = if ((0 > H))
7272 then -(H)
7373 else H
7474
7575
7676 func O (H) = if ((e > H))
7777 then -(H)
7878 else H
7979
8080
8181 func P () = "%s__factoryContract"
8282
8383
8484 func Q () = "%s__managerPublicKey"
8585
8686
8787 func R () = "%s__pendingManagerPublicKey"
8888
8989
9090 func S () = "%s%s__price__last"
9191
9292
9393 func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j)
9494
9595
9696 func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y)
9797
9898
9999 func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y)
100100
101101
102102 func aa () = "%s__amountAsset"
103103
104104
105105 func ab () = "%s__priceAsset"
106106
107107
108108 let ac = "%s__fee"
109109
110110 let ad = fraction(10, b, 10000)
111111
112112 let ae = valueOrElse(getInteger(this, ac), ad)
113113
114-func af () = "%s__factoryConfig"
114+let af = makeString(["%s", "keyKlp"], j)
115+
116+let ag = makeString(["%s", "keyLastKLpRefreshed"], j)
117+
118+let ah = makeString(["%s", "keyRefreshKLpDelay"], j)
119+
120+func ai () = "%s__factoryConfig"
115121
116122
117-func ag () = "%s%s__matcher__publicKey"
123+func aj () = "%s%s__matcher__publicKey"
118124
119125
120-func ah (ai) = (("%s%s%s__" + ai) + "__mappings__poolContract2LpAsset")
126+func ak (al) = (("%s%s%s__" + al) + "__mappings__poolContract2LpAsset")
121127
122128
123-func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config")
129+func am (an,ao) = (((("%d%d%s__" + an) + "__") + ao) + "__config")
124130
125131
126-func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an)
132+func ap (aq) = ("%s%s%s__mappings__baseAsset2internalId__" + aq)
127133
128134
129-func ao () = "%s__shutdown"
135+func ar () = "%s__shutdown"
130136
131137
132-func ap (aq) = ("%s%s__poolWeight__" + aq)
138+func as (at) = ("%s%s__poolWeight__" + at)
133139
134140
135-func ar () = "%s__allowedLpScriptHash"
141+func au () = "%s__allowedLpScriptHash"
136142
137143
138-let as = "%s__feeCollectorAddress"
144+let av = "%s__feeCollectorAddress"
139145
140-func at (au,av,aw) = throw(((((("order validation failed: orderValid=" + toString(au)) + " senderValid=") + toString(av)) + " matcherValid=") + toString(aw)))
146+func aw (ax,ay,az) = throw(((((("order validation failed: orderValid=" + toString(ax)) + " senderValid=") + toString(ay)) + " matcherValid=") + toString(az)))
141147
142148
143-func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
149+func aA (aB,aC) = valueOrErrorMessage(getString(aB, aC), makeString(["mandatory ", toString(aB), ".", aC, " is not defined"], ""))
144150
145151
146-func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
152+func aD (aB,aC) = valueOrErrorMessage(getInteger(aB, aC), makeString(["mandatory ", toString(aB), ".", aC, " is not defined"], ""))
147153
148154
149-func aB (aC) = throw(makeString(["lp.ride:", aC], " "))
155+func aE (aF) = throw(makeString(["lp.ride:", aF], " "))
150156
151157
152-let aD = addressFromStringValue(ax(this, P()))
153-
154-let aE = addressFromStringValue(ax(aD, as))
155-
156-func aF () = valueOrElse(getBoolean(aD, ao()), false)
158+func aG (aF) = makeString(["lp.ride:", aF], " ")
157159
158160
159-func aG () = fromBase58String(ax(aD, ag()))
160-
161-
162-func aH () = {
163- let aI = ax(this, aa())
164- let aJ = ax(this, ab())
165- let al = aA(aD, am(aJ))
166- let ak = aA(aD, am(aI))
167- split(ax(aD, aj(toString(ak), toString(al))), j)
161+func aH (H) = {
162+ let aI = H
163+ if ($isInstanceOf(aI, "Int"))
164+ then {
165+ let aJ = aI
166+ aJ
167+ }
168+ else throw("fail to cast into Int")
168169 }
169170
170171
171-func aK (aL) = if ((aL == i))
172- then unit
173- else fromBase58String(aL)
172+let aK = addressFromStringValue(aA(this, P()))
173+
174+let aL = addressFromStringValue(aA(aK, av))
175+
176+func aM () = valueOrElse(getBoolean(aK, ar()), false)
174177
175178
176-func aM (aL) = if ((aL == unit))
177- then i
178- else toBase58String(value(aL))
179+func aN () = fromBase58String(aA(aK, aj()))
179180
180181
181-func aN (aO) = $Tuple7(addressFromStringValue(aO[o]), parseIntValue(aO[p]), fromBase58String(aO[q]), aK(aO[r]), aK(aO[s]), parseIntValue(aO[t]), parseIntValue(aO[u]))
182-
183-
184-let aP = aN(aH())
185-
186-let aQ = aP
187-
188-let aR = aQ._1
189-
190-let aS = aQ._2
191-
192-let aT = aQ._3
193-
194-let aU = aQ._4
195-
196-let aV = aQ._5
197-
198-let aW = aQ._6
199-
200-let aX = aQ._7
201-
202-func aY () = split(ax(aD, af()), j)
203-
204-
205-let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
206-
207-let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
208-
209-func bb (bc,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl)], j)
210-
211-
212-func bm (bn,bo,bp,bf,bi,bj) = makeString(["%d%d%d%d%d%d", toString(bn), toString(bo), toString(bp), toString(bf), toString(bi), toString(bj)], j)
213-
214-
215-func bq (br) = if ((br == "WAVES"))
216- then wavesBalance(this).available
217- else assetBalance(this, fromBase58String(br))
218-
219-
220-func bs (bt,bu) = fraction(bt, d, bu)
221-
222-
223-func bv (bw,bx,by,bz) = {
224- let bA = D(by, bw)
225- let bB = D(bz, bx)
226- bs(bB, bA)
182+func aO () = {
183+ let aP = aA(this, aa())
184+ let aQ = aA(this, ab())
185+ let ao = aD(aK, ap(aQ))
186+ let an = aD(aK, ap(aP))
187+ split(aA(aK, am(toString(an), toString(ao))), j)
227188 }
228189
229190
230-func bC (by,bz,bD) = {
231- let bE = aH()
232- let bF = parseIntValue(bE[t])
233- let bG = parseIntValue(bE[u])
234- let bH = bv(bF, bG, by, bz)
235- let bu = D(by, bF)
236- let bt = D(bz, bG)
237- let bI = D(bD, b)
238- let bJ = bs(bu, bI)
239- let bK = bs(bt, bI)
240-[bH, bJ, bK]
191+func aR (aS) = if ((aS == i))
192+ then unit
193+ else fromBase58String(aS)
194+
195+
196+func aT (aS) = if ((aS == unit))
197+ then i
198+ else toBase58String(value(aS))
199+
200+
201+func aU (aV) = $Tuple7(addressFromStringValue(aV[o]), parseIntValue(aV[p]), fromBase58String(aV[q]), aR(aV[r]), aR(aV[s]), parseIntValue(aV[t]), parseIntValue(aV[u]))
202+
203+
204+let aW = aU(aO())
205+
206+let aX = aW
207+
208+let aY = aX._1
209+
210+let aZ = aX._2
211+
212+let ba = aX._3
213+
214+let bb = aX._4
215+
216+let bc = aX._5
217+
218+let bd = aX._6
219+
220+let be = aX._7
221+
222+func bf () = split(aA(aK, ai()), j)
223+
224+
225+let bg = valueOrErrorMessage(addressFromString(bf()[B]), "incorrect staking address")
226+
227+let bh = valueOrErrorMessage(addressFromString(bf()[C]), "incorrect staking address")
228+
229+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)], j)
230+
231+
232+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)], j)
233+
234+
235+func bx (by) = if ((by == "WAVES"))
236+ then wavesBalance(this).available
237+ else assetBalance(this, fromBase58String(by))
238+
239+
240+func bz (bA,bB) = fraction(bA, d, bB)
241+
242+
243+func bC (bD,bE,bF,bG) = {
244+ let bH = D(bF, bD)
245+ let bI = D(bG, bE)
246+ bz(bI, bH)
241247 }
242248
243249
244-func bL (by,bz,bD) = {
245- let bM = bC(by, bz, bD)
246-[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
250+func bJ (bF,bG,bK) = {
251+ let bL = aO()
252+ let bM = parseIntValue(bL[t])
253+ let bN = parseIntValue(bL[u])
254+ let bO = bC(bM, bN, bF, bG)
255+ let bB = D(bF, bM)
256+ let bA = D(bG, bN)
257+ let bP = D(bK, b)
258+ let bQ = bz(bB, bP)
259+ let bR = bz(bA, bP)
260+[bO, bQ, bR]
247261 }
248262
249263
250-func bN (bO,bP,bQ,X) = {
251- let bE = aH()
252- let bR = bE[q]
253- let bS = bE[r]
254- let bT = bE[s]
255- let bw = parseIntValue(bE[t])
256- let bx = parseIntValue(bE[u])
257- let bU = bE[p]
258- let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
259- if ((bR != bP))
264+func bS (bF,bG,bK) = {
265+ let bT = bJ(bF, bG, bK)
266+[G(bT[0], b), G(bT[1], b), G(bT[2], b)]
267+ }
268+
269+
270+func bU (bV,bW,bX,X) = {
271+ let bL = aO()
272+ let bY = bL[q]
273+ let bZ = bL[r]
274+ let ca = bL[s]
275+ let bD = parseIntValue(bL[t])
276+ let bE = parseIntValue(bL[u])
277+ let cb = bL[p]
278+ let cc = valueOrErrorMessage(assetInfo(fromBase58String(bY)), (("Asset " + bY) + " doesn't exist")).quantity
279+ if ((bY != bW))
260280 then throw("Invalid asset passed.")
261281 else {
262- let bW = bq(bS)
263- let bX = D(bW, bw)
264- let bY = bq(bT)
265- let bZ = D(bY, bx)
266- let ca = bs(bZ, bX)
267- let cb = G(ca, b)
268- let cc = D(bQ, b)
269- let cd = D(bV, b)
270- let ce = fraction(bX, cc, cd)
271- let cf = fraction(bZ, cc, cd)
272- let cg = G(ce, bw)
273- let ch = G(cf, bx)
274- let ci = if ((bO == ""))
282+ let cd = bx(bZ)
283+ let ce = D(cd, bD)
284+ let cf = bx(ca)
285+ let cg = D(cf, bE)
286+ let ch = bz(cg, ce)
287+ let ci = G(ch, b)
288+ let cj = D(bX, b)
289+ let ck = D(cc, b)
290+ let cl = fraction(ce, cj, ck)
291+ let cm = fraction(cg, cj, ck)
292+ let cn = G(cl, bD)
293+ let co = G(cm, bE)
294+ let cp = if ((bV == ""))
275295 then nil
276- else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
296+ else [ScriptTransfer(X, cn, if ((bZ == "WAVES"))
277297 then unit
278- else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
298+ else fromBase58String(bZ)), ScriptTransfer(X, co, if ((ca == "WAVES"))
279299 then unit
280- else fromBase58String(bT)), StringEntry(Z(toString(X), bO), bm(cg, ch, bQ, cb, height, lastBlock.timestamp)), IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb)]
281- $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
300+ else fromBase58String(ca)), StringEntry(Z(toString(X), bV), bt(cn, co, bX, ci, height, lastBlock.timestamp)), IntegerEntry(S(), ci), IntegerEntry(T(height, lastBlock.timestamp), ci)]
301+ $Tuple10(cn, co, bZ, ca, cd, cf, cc, ch, cb, cp)
282302 }
283303 }
284304
285305
286-func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
287- let bE = aH()
288- let bR = fromBase58String(bE[q])
289- let cr = bE[r]
290- let cs = bE[s]
291- let ct = bE[v]
292- let cu = bE[w]
293- let bF = parseIntValue(bE[t])
294- let bG = parseIntValue(bE[u])
295- let bU = bE[p]
296- let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
297- let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
298- let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
299- if (if ((cr != cv))
306+func cq (bV,cr,cs,ct,cu,cv,X,cw,cx) = {
307+ let bL = aO()
308+ let bY = fromBase58String(bL[q])
309+ let cy = bL[r]
310+ let cz = bL[s]
311+ let cA = bL[v]
312+ let cB = bL[w]
313+ let bM = parseIntValue(bL[t])
314+ let bN = parseIntValue(bL[u])
315+ let cb = bL[p]
316+ let cc = valueOrErrorMessage(assetInfo(bY), (("Asset " + toBase58String(bY)) + " doesn't exist")).quantity
317+ let cC = toBase58String(valueOrElse(ct, fromBase58String("WAVES")))
318+ let cD = toBase58String(valueOrElse(cv, fromBase58String("WAVES")))
319+ if (if ((cy != cC))
300320 then true
301- else (cs != cw))
321+ else (cz != cD))
302322 then throw("Invalid amt or price asset passed.")
303323 else {
304- let bW = if (cp)
305- then bq(cr)
306- else (bq(cr) - cl)
307- let bY = if (cp)
308- then bq(cs)
309- else (bq(cs) - cn)
310- let cx = D(cl, bF)
311- let cy = D(cn, bG)
312- let cz = bs(cy, cx)
313- let bX = D(bW, bF)
314- let bZ = D(bY, bG)
315- let cA = if ((bV == 0))
324+ let cd = if (cw)
325+ then bx(cy)
326+ else (bx(cy) - cs)
327+ let cf = if (cw)
328+ then bx(cz)
329+ else (bx(cz) - cu)
330+ let cE = D(cs, bM)
331+ let cF = D(cu, bN)
332+ let cG = bz(cF, cE)
333+ let ce = D(cd, bM)
334+ let cg = D(cf, bN)
335+ let cH = if ((cc == 0))
316336 then {
317- let ca = e
318- let cB = e
319- let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
320- $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
337+ let ch = e
338+ let cI = e
339+ let bP = pow((cE * cF), 0, toBigInt(5), 1, 0, DOWN)
340+ $Tuple5(G(bP, b), G(cE, bM), G(cF, bN), bz((cg + cF), (ce + cE)), cI)
321341 }
322342 else {
323- let ca = bs(bZ, bX)
324- let cB = fraction(O((ca - cz)), d, ca)
325- let cC = D(ck, b)
326- if (if ((ca != e))
327- then (cB > cC)
343+ let ch = bz(cg, ce)
344+ let cI = fraction(O((ch - cG)), d, ch)
345+ let cJ = D(cr, b)
346+ if (if ((ch != e))
347+ then (cI > cJ)
328348 else false)
329- then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
349+ then throw(((("Price slippage " + toString(cI)) + " exceeded the passed limit of ") + toString(cJ)))
330350 else {
331- let cd = D(bV, b)
332- let cD = fraction(cx, ca, d)
333- let cE = fraction(cy, d, ca)
334- let cF = if ((cD > cy))
335- then $Tuple2(cE, cy)
336- else $Tuple2(cx, cD)
337- let cG = cF._1
338- let cH = cF._2
339- let bI = fraction(cd, cH, bZ)
340- $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
351+ let ck = D(cc, b)
352+ let cK = fraction(cE, ch, d)
353+ let cL = fraction(cF, d, ch)
354+ let cM = if ((cK > cF))
355+ then $Tuple2(cL, cF)
356+ else $Tuple2(cE, cK)
357+ let cN = cM._1
358+ let cO = cM._2
359+ let bP = fraction(ck, cO, cg)
360+ $Tuple5(G(bP, b), G(cN, bM), G(cO, bN), ch, cI)
341361 }
342362 }
343- let cI = cA._1
344- let cJ = cA._2
345- let cK = cA._3
346- let cb = G(cA._4, b)
347- let cL = G(cA._5, b)
348- if ((0 >= cI))
363+ let cP = cH._1
364+ let cQ = cH._2
365+ let cR = cH._3
366+ let ci = G(cH._4, b)
367+ let cS = G(cH._5, b)
368+ if ((0 >= cP))
349369 then throw("Invalid calculations. LP calculated is less than zero.")
350370 else {
351- let cM = if (!(cq))
371+ let cT = if (!(cx))
352372 then 0
353- else cI
354- let cN = (cl - cJ)
355- let cO = (cn - cK)
356- let cP = [IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb), StringEntry(W(X, bO), bb(cJ, cK, cM, cb, ck, cL, height, lastBlock.timestamp, cN, cO))]
357- $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
373+ else cP
374+ let cU = (cs - cQ)
375+ let cV = (cu - cR)
376+ let cW = [IntegerEntry(S(), ci), IntegerEntry(T(height, lastBlock.timestamp), ci), StringEntry(W(X, bV), bi(cQ, cR, cT, ci, cr, cS, height, lastBlock.timestamp, cU, cV))]
377+ $Tuple13(cP, cT, ci, cd, cf, cc, bY, cb, cW, cU, cV, ct, cv)
358378 }
359379 }
360380 }
361381
362382
363-func cQ (cR) = {
364- let bE = aH()
365- let cS = bE[r]
366- let cT = bE[s]
367- let bU = parseIntValue(bE[p])
368- let bF = parseIntValue(bE[t])
369- let bG = parseIntValue(bE[u])
370- let cU = bq(cS)
371- let cV = bq(cT)
372- let ca = if ((cR.orderType == Buy))
373- then bv(bF, bG, (cU + cR.amount), cV)
374- else bv(bF, bG, (cU - cR.amount), cV)
375- let cb = G(ca, b)
376- if (if (if (aF())
383+func cX (cY) = {
384+ let bL = aO()
385+ let cZ = bL[r]
386+ let da = bL[s]
387+ let cb = parseIntValue(bL[p])
388+ let bM = parseIntValue(bL[t])
389+ let bN = parseIntValue(bL[u])
390+ let db = bx(cZ)
391+ let dc = bx(da)
392+ let ch = if ((cY.orderType == Buy))
393+ then bC(bM, bN, (db + cY.amount), dc)
394+ else bC(bM, bN, (db - cY.amount), dc)
395+ let ci = G(ch, b)
396+ if (if (if (aM())
377397 then true
378- else (bU == m))
398+ else (cb == m))
379399 then true
380- else (bU == n))
400+ else (cb == n))
381401 then throw("Exchange operations disabled")
382402 else {
383- let cW = cR.assetPair.amountAsset
384- let cX = if ((cW == unit))
403+ let dd = cY.assetPair.amountAsset
404+ let de = if ((dd == unit))
385405 then "WAVES"
386- else toBase58String(value(cW))
387- let cY = cR.assetPair.priceAsset
388- let cZ = if ((cY == unit))
406+ else toBase58String(value(dd))
407+ let df = cY.assetPair.priceAsset
408+ let dg = if ((df == unit))
389409 then "WAVES"
390- else toBase58String(value(cY))
391- if (if ((cX != cS))
410+ else toBase58String(value(df))
411+ if (if ((de != cZ))
392412 then true
393- else (cZ != cT))
413+ else (dg != da))
394414 then throw("Wrong order assets.")
395415 else {
396- let da = cR.price
397- let db = fraction(b, bG, bF)
398- let dc = J(da, b, db)
399- let dd = if ((cR.orderType == Buy))
400- then (cb >= dc)
401- else (dc >= cb)
416+ let dh = cY.price
417+ let di = fraction(b, bN, bM)
418+ let dj = J(dh, b, di)
419+ let dk = if ((cY.orderType == Buy))
420+ then (ci >= dj)
421+ else (dj >= ci)
402422 true
403423 }
404424 }
405425 }
406426
407427
408-func de (df) = if ((size(df.payments) != 1))
428+func dl (dm) = if ((size(dm.payments) != 1))
409429 then throw("exactly 1 payment is expected")
410430 else {
411- let dg = value(df.payments[0])
412- let bP = value(dg.assetId)
413- let dh = dg.amount
414- let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
415- let cg = cA._1
416- let ch = cA._2
417- let bU = parseIntValue(cA._9)
418- let ci = cA._10
419- if (if (aF())
431+ let dn = value(dm.payments[0])
432+ let bW = value(dn.assetId)
433+ let do = dn.amount
434+ let cH = bU(toBase58String(dm.transactionId), toBase58String(bW), do, dm.caller)
435+ let cn = cH._1
436+ let co = cH._2
437+ let cb = parseIntValue(cH._9)
438+ let cp = cH._10
439+ if (if (aM())
420440 then true
421- else (bU == n))
422- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
423- else $Tuple5(cg, ch, dh, bP, ci)
441+ else (cb == n))
442+ then throw(("Get operation is blocked by admin. Status = " + toString(cb)))
443+ else $Tuple5(cn, co, do, bW, cp)
424444 }
425445
426446
427-func di (df,ck,cq) = if ((size(df.payments) != 2))
447+func dp (dm,cr,cx) = if ((size(dm.payments) != 2))
428448 then throw("exactly 2 payments are expected")
429449 else {
430- let dj = value(df.payments[0])
431- let dk = value(df.payments[1])
432- let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
433- let bU = parseIntValue(dl._8)
434- if (if (if (aF())
450+ let dq = value(dm.payments[0])
451+ let dr = value(dm.payments[1])
452+ let ds = cq(toBase58String(dm.transactionId), cr, dq.amount, dq.assetId, dr.amount, dr.assetId, toString(dm.caller), false, cx)
453+ let cb = parseIntValue(ds._8)
454+ if (if (if (aM())
435455 then true
436- else (bU == l))
456+ else (cb == l))
437457 then true
438- else (bU == n))
439- then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
440- else dl
458+ else (cb == n))
459+ then throw(("Put operation is blocked by admin. Status = " + toString(cb)))
460+ else ds
441461 }
442462
443463
444-func dm (dn) = {
445- let do = invoke(aD, "emit", [dn], nil)
446- if ((do == do))
464+func dt (du) = {
465+ let dv = invoke(aK, "emit", [du], nil)
466+ if ((dv == dv))
447467 then {
448- let dp = {
449- let dq = do
450- if ($isInstanceOf(dq, "Address"))
468+ let dw = {
469+ let aI = dv
470+ if ($isInstanceOf(aI, "Address"))
451471 then {
452- let dr = dq
453- invoke(dr, "emit", [dn], nil)
472+ let dx = aI
473+ invoke(dx, "emit", [du], nil)
454474 }
455475 else unit
456476 }
457- if ((dp == dp))
458- then dn
477+ if ((dw == dw))
478+ then du
459479 else throw("Strict value is not equal to itself.")
460480 }
461481 else throw("Strict value is not equal to itself.")
462482 }
463483
464484
465-func ds (dn) = {
466- let dt = fraction(dn, ae, b)
467- $Tuple2((dn - dt), dt)
485+func dy (du) = {
486+ let dz = fraction(du, ae, b)
487+ $Tuple2((du - dz), dz)
468488 }
469489
470490
471-func du (dv,dw,X,Y) = {
472- let dx = (Y == unit)
473- let dy = bq(aM(aU))
474- let dz = bq(aM(aV))
475- let dA = if ((dw == aU))
491+func dA (dB,dC,X,Y) = {
492+ let dD = (Y == unit)
493+ let dE = bx(aT(bb))
494+ let dF = bx(aT(bc))
495+ let dG = if ((dC == bb))
476496 then true
477- else if ((dw == aV))
497+ else if ((dC == bc))
478498 then false
479- else aB("invalid asset")
480- let dB = if (dx)
481- then $Tuple2(dy, dz)
482- else if (dA)
483- then $Tuple2((dy - dv), dz)
484- else $Tuple2(dy, (dz - dv))
485- let dC = dB._1
486- let dD = dB._2
487- let dE = if (dA)
488- then $Tuple2(dv, 0)
489- else $Tuple2(0, dv)
490- let dF = dE._1
491- let dG = dE._2
492- let dH = ds(dF)._1
493- let dI = ds(dG)._1
494- let dJ = ds(dv)
495- let dK = dJ._1
496- let dt = dJ._2
497- let dL = (dC + dH)
498- let dM = (dD + dI)
499- let dN = bs(D(dM, aX), D(dL, aW))
500- let dO = G(dN, b)
501- let dP = if (dA)
502- then dC
503- else dD
504- let dQ = toBigInt(dP)
505- let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
506- let dS = if ((dR > f))
499+ else aE("invalid asset")
500+ let dH = if (dD)
501+ then $Tuple2(dE, dF)
502+ else if (dG)
503+ then $Tuple2((dE - dB), dF)
504+ else $Tuple2(dE, (dF - dB))
505+ let dI = dH._1
506+ let dJ = dH._2
507+ let dK = if (dG)
508+ then $Tuple2(dB, 0)
509+ else $Tuple2(0, dB)
510+ let dL = dK._1
511+ let dM = dK._2
512+ let dN = dy(dL)._1
513+ let dO = dy(dM)._1
514+ let dP = dy(dB)
515+ let dQ = dP._1
516+ let dz = dP._2
517+ let dR = (dI + dN)
518+ let dS = (dJ + dO)
519+ let dT = bz(D(dS, be), D(dR, bd))
520+ let dU = G(dT, b)
521+ let dV = if (dG)
522+ then dI
523+ else dJ
524+ let dW = toBigInt(dV)
525+ let dX = toBigInt(valueOrErrorMessage(assetInfo(ba), (("asset " + toBase58String(ba)) + " doesn't exist")).quantity)
526+ let dY = if ((dX > f))
507527 then true
508- else aB("initial deposit requires all coins")
509- if ((dS == dS))
528+ else aE("initial deposit requires all coins")
529+ if ((dY == dY))
510530 then {
511- let dT = toBigInt(dK)
512- let dU = max([0, toInt(((dR * (sqrtBigInt((d + ((dT * d) / dQ)), 18, 18, DOWN) - d)) / d))])
513- let cP = if (dx)
531+ let dZ = toBigInt(dQ)
532+ let ea = max([0, toInt(((dX * (sqrtBigInt((d + ((dZ * d) / dW)), 18, 18, DOWN) - d)) / d))])
533+ let cW = if (dD)
514534 then nil
515- else [IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dF, dG, dU, dO, 0, 0, height, lastBlock.timestamp, 0, 0))]
516- let dV = bs(D(dD, aX), D(dC, aW))
517- let dW = G(dV, b)
518- let dX = {
519- let dY = if (dA)
520- then $Tuple2(dF, dC)
521- else $Tuple2(dG, dD)
522- let dn = dY._1
523- let dZ = dY._2
524- let ea = toInt(fraction(dR, toBigInt((dn / 2)), toBigInt(dZ)))
525- fraction((dU - ea), b, ea)
535+ else [IntegerEntry(S(), dU), IntegerEntry(T(height, lastBlock.timestamp), dU), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bi(dL, dM, ea, dU, 0, 0, height, lastBlock.timestamp, 0, 0))]
536+ let eb = bz(D(dJ, be), D(dI, bd))
537+ let ec = G(eb, b)
538+ let ed = {
539+ let ee = if (dG)
540+ then $Tuple2(dL, dI)
541+ else $Tuple2(dM, dJ)
542+ let du = ee._1
543+ let ef = ee._2
544+ let eg = toInt(fraction(dX, toBigInt((du / 2)), toBigInt(ef)))
545+ fraction((ea - eg), b, eg)
526546 }
527- $Tuple4(dU, cP, dt, dX)
547+ $Tuple4(ea, cW, dz, ed)
528548 }
529549 else throw("Strict value is not equal to itself.")
530550 }
531551
532552
533-func eb (ec,dK,dw,X,Y) = {
534- let dx = (Y == unit)
535- let ed = [if ((dw == aT))
553+func eh (ei,dQ,dC,X,Y) = {
554+ let dD = (Y == unit)
555+ let ej = [if ((dC == ba))
536556 then true
537- else aB("invalid lp asset")]
538- if ((ed == ed))
557+ else aE("invalid lp asset")]
558+ if ((ej == ej))
539559 then {
540- let ee = if ((ec == aU))
560+ let ek = if ((ei == bb))
541561 then true
542- else if ((ec == aV))
562+ else if ((ei == bc))
543563 then false
544- else aB("invalid asset")
545- let ef = if (ee)
546- then toBigInt(bq(aM(aU)))
547- else toBigInt(bq(aM(aV)))
548- let eg = bq(aM(aU))
549- let eh = bq(aM(aV))
550- let ei = if (ee)
551- then eg
552- else eh
553- let ej = toBigInt(ei)
554- let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
555- let ek = toBigInt(dK)
556- let el = max([0, toInt(((ef * (d - pow((d - ((ek * d) / dR)), 18, h, 0, 18, DOWN))) / d))])
557- let em = ds(el)
558- let en = em._1
559- let dt = em._2
560- let eo = if (ee)
561- then $Tuple4(en, 0, (eg - el), eh)
562- else $Tuple4(0, en, eg, (eh - el))
563- let ep = eo._1
564- let eq = eo._2
565- let er = eo._3
566- let es = eo._4
567- let dN = bs(D(es, aX), D(er, aW))
568- let dO = G(dN, b)
569- let cP = if (dx)
564+ else aE("invalid asset")
565+ let el = if (ek)
566+ then toBigInt(bx(aT(bb)))
567+ else toBigInt(bx(aT(bc)))
568+ let em = bx(aT(bb))
569+ let en = bx(aT(bc))
570+ let eo = if (ek)
571+ then em
572+ else en
573+ let ep = toBigInt(eo)
574+ let dX = toBigInt(valueOrErrorMessage(assetInfo(ba), (("asset " + toBase58String(ba)) + " doesn't exist")).quantity)
575+ let eq = toBigInt(dQ)
576+ let er = max([0, toInt(((el * (d - pow((d - ((eq * d) / dX)), 18, h, 0, 18, DOWN))) / d))])
577+ let es = dy(er)
578+ let et = es._1
579+ let dz = es._2
580+ let eu = if (ek)
581+ then $Tuple4(et, 0, (em - er), en)
582+ else $Tuple4(0, et, em, (en - er))
583+ let ev = eu._1
584+ let ew = eu._2
585+ let ex = eu._3
586+ let ey = eu._4
587+ let dT = bz(D(ey, be), D(ex, bd))
588+ let dU = G(dT, b)
589+ let cW = if (dD)
570590 then nil
571- else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(ep, eq, dK, dO, height, lastBlock.timestamp)), IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO)]
572- let dV = bs(D(eh, aX), D(eg, aW))
573- let dW = G(dV, b)
574- let dX = {
575- let et = (toInt(fraction(ef, ek, dR)) * 2)
576- fraction((en - et), b, et)
591+ else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bt(ev, ew, dQ, dU, height, lastBlock.timestamp)), IntegerEntry(S(), dU), IntegerEntry(T(height, lastBlock.timestamp), dU)]
592+ let eb = bz(D(en, be), D(em, bd))
593+ let ec = G(eb, b)
594+ let ed = {
595+ let ez = (toInt(fraction(el, eq, dX)) * 2)
596+ fraction((et - ez), b, ez)
577597 }
578- $Tuple4(en, cP, dt, dX)
598+ $Tuple4(et, cW, dz, ed)
579599 }
580600 else throw("Strict value is not equal to itself.")
581601 }
582602
583603
584-func eu () = {
585- let dq = getString(Q())
586- if ($isInstanceOf(dq, "String"))
604+func eA (eB,eC,cc) = {
605+ let eD = (pow((eB * eC), 0, 5, 1, 0, DOWN) / cc)
606+ eD
607+ }
608+
609+
610+func eE () = {
611+ let bL = aO()
612+ let bY = fromBase58String(bL[q])
613+ let eF = bL[r]
614+ let da = bL[s]
615+ let eG = bx(eF)
616+ let eH = bx(da)
617+ let cc = valueOrErrorMessage(assetInfo(bY), (("Asset " + toBase58String(bY)) + " doesn't exist")).quantity
618+ let eD = eA(eG, eH, cc)
619+ eD
620+ }
621+
622+
623+func eI () = {
624+ let aI = getString(Q())
625+ if ($isInstanceOf(aI, "String"))
587626 then {
588- let ev = dq
589- fromBase58String(ev)
627+ let eJ = aI
628+ fromBase58String(eJ)
590629 }
591- else if ($isInstanceOf(dq, "Unit"))
630+ else if ($isInstanceOf(aI, "Unit"))
592631 then unit
593632 else throw("Match error")
594633 }
595634
596635
597-func ew () = {
598- let dq = getString(R())
599- if ($isInstanceOf(dq, "String"))
636+func eK () = {
637+ let aI = getString(R())
638+ if ($isInstanceOf(aI, "String"))
600639 then {
601- let ev = dq
602- fromBase58String(ev)
640+ let eJ = aI
641+ fromBase58String(eJ)
603642 }
604- else if ($isInstanceOf(dq, "Unit"))
643+ else if ($isInstanceOf(aI, "Unit"))
605644 then unit
606645 else throw("Match error")
607646 }
608647
609648
610-func ex (df) = {
611- let dq = eu()
612- if ($isInstanceOf(dq, "ByteVector"))
649+func eL (dm) = {
650+ let aI = eI()
651+ if ($isInstanceOf(aI, "ByteVector"))
613652 then {
614- let ey = dq
615- (df.callerPublicKey == ey)
653+ let eM = aI
654+ (dm.callerPublicKey == eM)
616655 }
617- else if ($isInstanceOf(dq, "Unit"))
618- then (df.caller == this)
656+ else if ($isInstanceOf(aI, "Unit"))
657+ then (dm.caller == this)
619658 else throw("Match error")
620659 }
621660
622661
623-func ez (df) = {
624- let eA = throw("Permission denied")
625- let dq = eu()
626- if ($isInstanceOf(dq, "ByteVector"))
662+func eN (dm) = {
663+ let eO = throw("Permission denied")
664+ let aI = eI()
665+ if ($isInstanceOf(aI, "ByteVector"))
627666 then {
628- let ey = dq
629- if ((df.callerPublicKey == ey))
667+ let eM = aI
668+ if ((dm.callerPublicKey == eM))
630669 then true
631- else eA
670+ else eO
632671 }
633- else if ($isInstanceOf(dq, "Unit"))
634- then if ((df.caller == this))
672+ else if ($isInstanceOf(aI, "Unit"))
673+ then if ((dm.caller == this))
635674 then true
636- else eA
675+ else eO
637676 else throw("Match error")
638677 }
639678
640679
641-@Callable(df)
642-func setManager (eB) = {
643- let eC = ez(df)
644- if ((eC == eC))
680+@Callable(dm)
681+func setManager (eP) = {
682+ let eQ = eN(dm)
683+ if ((eQ == eQ))
645684 then {
646- let eD = fromBase58String(eB)
647- if ((eD == eD))
648- then [StringEntry(R(), eB)]
685+ let eR = fromBase58String(eP)
686+ if ((eR == eR))
687+ then [StringEntry(R(), eP)]
649688 else throw("Strict value is not equal to itself.")
650689 }
651690 else throw("Strict value is not equal to itself.")
652691 }
653692
654693
655694
656-@Callable(df)
695+@Callable(dm)
657696 func confirmManager () = {
658- let eE = ew()
659- let eF = if (isDefined(eE))
697+ let eS = eK()
698+ let eT = if (isDefined(eS))
660699 then true
661700 else throw("No pending manager")
662- if ((eF == eF))
701+ if ((eT == eT))
663702 then {
664- let eG = if ((df.callerPublicKey == value(eE)))
703+ let eU = if ((dm.callerPublicKey == value(eS)))
665704 then true
666705 else throw("You are not pending manager")
667- if ((eG == eG))
668- then [StringEntry(Q(), toBase58String(value(eE))), DeleteEntry(R())]
706+ if ((eU == eU))
707+ then [StringEntry(Q(), toBase58String(value(eS))), DeleteEntry(R())]
669708 else throw("Strict value is not equal to itself.")
670709 }
671710 else throw("Strict value is not equal to itself.")
672711 }
673712
674713
675714
676-@Callable(df)
677-func put (ck,eH) = if ((0 > ck))
715+@Callable(dm)
716+func put (cr,eV) = if ((0 > cr))
678717 then throw("Invalid slippageTolerance passed")
679718 else {
680- let dl = di(df, ck, true)
681- let cM = dl._2
682- let bR = dl._7
683- let ci = dl._9
684- let cN = dl._10
685- let cO = dl._11
686- let eI = dl._12
687- let eJ = dl._13
688- let do = invoke(aD, "emit", [cM], nil)
689- if ((do == do))
719+ let ds = dp(dm, cr, true)
720+ let cT = ds._2
721+ let bY = ds._7
722+ let cp = ds._9
723+ let cU = ds._10
724+ let cV = ds._11
725+ let eW = ds._12
726+ let eX = ds._13
727+ let dv = invoke(aK, "emit", [cT], nil)
728+ if ((dv == dv))
690729 then {
691- let dp = {
692- let dq = do
693- if ($isInstanceOf(dq, "Address"))
730+ let dw = {
731+ let aI = dv
732+ if ($isInstanceOf(aI, "Address"))
694733 then {
695- let dr = dq
696- invoke(dr, "emit", [cM], nil)
734+ let dx = aI
735+ invoke(dx, "emit", [cT], nil)
697736 }
698737 else unit
699738 }
700- if ((dp == dp))
739+ if ((dw == dw))
701740 then {
702- let eK = if ((cN > 0))
703- then invoke(ba, "put", nil, [AttachedPayment(eI, cN)])
741+ let eY = if ((cU > 0))
742+ then invoke(bh, "put", nil, [AttachedPayment(eW, cU)])
704743 else nil
705- if ((eK == eK))
744+ if ((eY == eY))
706745 then {
707- let eL = if ((cO > 0))
708- then invoke(ba, "put", nil, [AttachedPayment(eJ, cO)])
746+ let eZ = if ((cV > 0))
747+ then invoke(bh, "put", nil, [AttachedPayment(eX, cV)])
709748 else nil
710- if ((eL == eL))
749+ if ((eZ == eZ))
711750 then {
712- let eM = if (eH)
751+ let fa = if (eV)
713752 then {
714- let eN = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
715- if ((eN == eN))
753+ let fb = invoke(bg, "stake", nil, [AttachedPayment(bY, cT)])
754+ if ((fb == fb))
716755 then nil
717756 else throw("Strict value is not equal to itself.")
718757 }
719- else [ScriptTransfer(df.caller, cM, bR)]
720- (ci ++ eM)
758+ else [ScriptTransfer(dm.caller, cT, bY)]
759+ (cp ++ fa)
721760 }
722761 else throw("Strict value is not equal to itself.")
723762 }
724763 else throw("Strict value is not equal to itself.")
725764 }
726765 else throw("Strict value is not equal to itself.")
727766 }
728767 else throw("Strict value is not equal to itself.")
729768 }
730769
731770
732771
733-@Callable(df)
734-func putForFree (eO) = if ((0 > eO))
772+@Callable(dm)
773+func putForFree (fc) = if ((0 > fc))
735774 then throw("Invalid value passed")
736775 else {
737- let dl = di(df, eO, false)
738- dl._9
776+ let ds = dp(dm, fc, false)
777+ ds._9
739778 }
740779
741780
742781
743-@Callable(df)
744-func putOneTkn (eP,eQ) = {
745- let eR = {
746- let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
747- if ($isInstanceOf(eS, "Boolean"))
748- then eS
749- else throw(($getType(eS) + " couldn't be cast to Boolean"))
782+@Callable(dm)
783+func putOneTkn (fd,fe) = {
784+ let ff = {
785+ let fg = invoke(aK, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
786+ if ($isInstanceOf(fg, "Boolean"))
787+ then fg
788+ else throw(($getType(fg) + " couldn't be cast to Boolean"))
750789 }
751- let eT = if (if (if (aF())
790+ let fh = if (if (if (aM())
752791 then true
753- else (aS == l))
792+ else (aZ == l))
754793 then true
755- else (aS == n))
794+ else (aZ == n))
756795 then true
757- else eR
758- let ed = [if (if (!(eT))
796+ else ff
797+ let ej = [if (if (!(fh))
759798 then true
760- else ex(df))
799+ else eL(dm))
761800 then true
762- else aB("put operation is blocked by admin"), if ((size(df.payments) == 1))
801+ else aE("put operation is blocked by admin"), if ((size(dm.payments) == 1))
763802 then true
764- else aB("exactly 1 payment are expected")]
765- if ((ed == ed))
803+ else aE("exactly 1 payment are expected")]
804+ if ((ej == ej))
766805 then {
767- let eU = df.payments[0]
768- let dw = eU.assetId
769- let dv = eU.amount
770- let X = df.caller
771- let Y = df.transactionId
772- let eV = du(dv, dw, X, Y)
773- if ((eV == eV))
806+ let fi = dm.payments[0]
807+ let dC = fi.assetId
808+ let dB = fi.amount
809+ let X = dm.caller
810+ let Y = dm.transactionId
811+ let fj = dA(dB, dC, X, Y)
812+ let fk = fj._1
813+ let cW = fj._2
814+ let dz = fj._3
815+ let fl = fj._4
816+ let fm = if (if ((fd > 0))
817+ then (fd > fk)
818+ else false)
819+ then aE(makeString(["amount to receive is less than ", toString(fd)], ""))
820+ else fk
821+ let dv = dt(fm)
822+ if ((dv == dv))
774823 then {
775- let eW = eV._4
776- let dt = eV._3
777- let cP = eV._2
778- let eX = eV._1
779- let eY = if (if ((eP > 0))
780- then (eP > eX)
824+ let fa = if (fe)
825+ then {
826+ let fn = invoke(bg, "stake", nil, [AttachedPayment(ba, fm)])
827+ if ((fn == fn))
828+ then nil
829+ else throw("Strict value is not equal to itself.")
830+ }
831+ else [ScriptTransfer(dm.caller, fm, ba)]
832+ let fo = if ((dz > 0))
833+ then [ScriptTransfer(aL, dz, dC)]
834+ else nil
835+ $Tuple2(((cW ++ fa) ++ fo), fm)
836+ }
837+ else throw("Strict value is not equal to itself.")
838+ }
839+ else throw("Strict value is not equal to itself.")
840+ }
841+
842+
843+
844+@Callable(dm)
845+func putOneTknREADONLY (dC,dB) = {
846+ let fp = dA(dB, aR(dC), unit, unit)
847+ let fk = fp._1
848+ let cW = fp._2
849+ let dz = fp._3
850+ let fl = fp._4
851+ $Tuple2(nil, $Tuple3(fk, dz, fl))
852+ }
853+
854+
855+
856+@Callable(dm)
857+func getOneTkn (fq,fd) = {
858+ let ff = {
859+ let fg = invoke(aK, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
860+ if ($isInstanceOf(fg, "Boolean"))
861+ then fg
862+ else throw(($getType(fg) + " couldn't be cast to Boolean"))
863+ }
864+ let fr = if (if (aM())
865+ then true
866+ else (aZ == n))
867+ then true
868+ else ff
869+ let ej = [if (if (!(fr))
870+ then true
871+ else eL(dm))
872+ then true
873+ else aE("get operation is blocked by admin"), if ((size(dm.payments) == 1))
874+ then true
875+ else aE("exactly 1 payment are expected")]
876+ if ((ej == ej))
877+ then {
878+ let ei = aR(fq)
879+ let fi = dm.payments[0]
880+ let dC = fi.assetId
881+ let dQ = fi.amount
882+ let X = dm.caller
883+ let Y = dm.transactionId
884+ let fs = eh(ei, dQ, dC, X, Y)
885+ let ft = fs._1
886+ let cW = fs._2
887+ let dz = fs._3
888+ let fl = fs._4
889+ let du = if (if ((fd > 0))
890+ then (fd > ft)
891+ else false)
892+ then aE(makeString(["amount to receive is less than ", toString(fd)], ""))
893+ else ft
894+ let fu = invoke(aK, "burn", [dQ], [AttachedPayment(dC, dQ)])
895+ if ((fu == fu))
896+ then {
897+ let fv = [ScriptTransfer(X, du, ei)]
898+ let fo = if ((dz > 0))
899+ then [ScriptTransfer(aL, dz, ei)]
900+ else nil
901+ $Tuple2(((cW ++ fv) ++ fo), du)
902+ }
903+ else throw("Strict value is not equal to itself.")
904+ }
905+ else throw("Strict value is not equal to itself.")
906+ }
907+
908+
909+
910+@Callable(dm)
911+func getOneTknREADONLY (ei,dQ) = {
912+ let fw = eh(aR(ei), dQ, ba, unit, unit)
913+ let ft = fw._1
914+ let cW = fw._2
915+ let dz = fw._3
916+ let fl = fw._4
917+ $Tuple2(nil, $Tuple3(ft, dz, fl))
918+ }
919+
920+
921+
922+@Callable(dm)
923+func unstakeAndGetOneTkn (fx,fq,fd) = {
924+ let ff = {
925+ let fg = invoke(aK, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
926+ if ($isInstanceOf(fg, "Boolean"))
927+ then fg
928+ else throw(($getType(fg) + " couldn't be cast to Boolean"))
929+ }
930+ let fr = if (if (aM())
931+ then true
932+ else (aZ == n))
933+ then true
934+ else ff
935+ let ej = [if (if (!(fr))
936+ then true
937+ else eL(dm))
938+ then true
939+ else aE("get operation is blocked by admin"), if ((size(dm.payments) == 0))
940+ then true
941+ else aE("no payments are expected")]
942+ if ((ej == ej))
943+ then {
944+ let ei = aR(fq)
945+ let X = dm.caller
946+ let Y = dm.transactionId
947+ let fy = invoke(bg, "unstake", [toBase58String(ba), fx], nil)
948+ if ((fy == fy))
949+ then {
950+ let fz = eh(ei, fx, ba, X, Y)
951+ let ft = fz._1
952+ let cW = fz._2
953+ let dz = fz._3
954+ let fl = fz._4
955+ let du = if (if ((fd > 0))
956+ then (fd > ft)
781957 else false)
782- then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
783- else eX
784- let do = dm(eY)
785- if ((do == do))
958+ then aE(makeString(["amount to receive is less than ", toString(fd)], ""))
959+ else ft
960+ let fu = invoke(aK, "burn", [fx], [AttachedPayment(ba, fx)])
961+ if ((fu == fu))
786962 then {
787- let eM = if (eQ)
788- then {
789- let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
790- if ((eZ == eZ))
791- then nil
792- else throw("Strict value is not equal to itself.")
793- }
794- else [ScriptTransfer(df.caller, eY, aT)]
795- let fa = if ((dt > 0))
796- then [ScriptTransfer(aE, dt, dw)]
963+ let fv = [ScriptTransfer(dm.caller, du, ei)]
964+ let fo = if ((dz > 0))
965+ then [ScriptTransfer(aL, dz, ei)]
797966 else nil
798- $Tuple2(((cP ++ eM) ++ fa), eY)
967+ $Tuple2(((cW ++ fv) ++ fo), du)
799968 }
800969 else throw("Strict value is not equal to itself.")
801970 }
802971 else throw("Strict value is not equal to itself.")
803972 }
804973 else throw("Strict value is not equal to itself.")
805974 }
806975
807976
808977
809-@Callable(df)
810-func putOneTknREADONLY (dw,dv) = {
811- let fb = du(dv, aK(dw), unit, unit)
812- let eX = fb._1
813- let cP = fb._2
814- let dt = fb._3
815- let eW = fb._4
816- $Tuple2(nil, $Tuple3(eX, dt, eW))
817- }
818-
819-
820-
821-@Callable(df)
822-func getOneTkn (fc,eP) = {
823- let eR = {
824- let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
825- if ($isInstanceOf(eS, "Boolean"))
826- then eS
827- else throw(($getType(eS) + " couldn't be cast to Boolean"))
828- }
829- let fd = if (if (aF())
830- then true
831- else (aS == n))
832- then true
833- else eR
834- let ed = [if (if (!(fd))
835- then true
836- else ex(df))
837- then true
838- else aB("get operation is blocked by admin"), if ((size(df.payments) == 1))
839- then true
840- else aB("exactly 1 payment are expected")]
841- if ((ed == ed))
842- then {
843- let ec = aK(fc)
844- let eU = df.payments[0]
845- let dw = eU.assetId
846- let dK = eU.amount
847- let X = df.caller
848- let Y = df.transactionId
849- let fe = eb(ec, dK, dw, X, Y)
850- if ((fe == fe))
851- then {
852- let eW = fe._4
853- let dt = fe._3
854- let cP = fe._2
855- let ff = fe._1
856- let dn = if (if ((eP > 0))
857- then (eP > ff)
858- else false)
859- then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
860- else ff
861- let fg = invoke(aD, "burn", [dK], [AttachedPayment(dw, dK)])
862- if ((fg == fg))
863- then {
864- let fh = [ScriptTransfer(X, dn, ec)]
865- let fa = if ((dt > 0))
866- then [ScriptTransfer(aE, dt, ec)]
867- else nil
868- $Tuple2(((cP ++ fh) ++ fa), dn)
869- }
870- else throw("Strict value is not equal to itself.")
871- }
872- else throw("Strict value is not equal to itself.")
873- }
978+@Callable(dm)
979+func get () = {
980+ let cH = dl(dm)
981+ let fA = cH._1
982+ let co = cH._2
983+ let do = cH._3
984+ let bW = cH._4
985+ let cp = cH._5
986+ let fB = invoke(aK, "burn", [do], [AttachedPayment(bW, do)])
987+ if ((fB == fB))
988+ then cp
874989 else throw("Strict value is not equal to itself.")
875990 }
876991
877992
878993
879-@Callable(df)
880-func getOneTknREADONLY (ec,dK) = {
881- let fi = eb(aK(ec), dK, aT, unit, unit)
882- let ff = fi._1
883- let cP = fi._2
884- let dt = fi._3
885- let eW = fi._4
886- $Tuple2(nil, $Tuple3(ff, dt, eW))
994+@Callable(dm)
995+func getNoLess (fC,fD) = {
996+ let cH = dl(dm)
997+ let cn = cH._1
998+ let co = cH._2
999+ let do = cH._3
1000+ let bW = cH._4
1001+ let cp = cH._5
1002+ if ((fC > cn))
1003+ then throw(((("noLessThenAmtAsset failed: " + toString(cn)) + " < ") + toString(fC)))
1004+ else if ((fD > co))
1005+ then throw(((("noLessThenPriceAsset failed: " + toString(co)) + " < ") + toString(fD)))
1006+ else {
1007+ let fB = invoke(aK, "burn", [do], [AttachedPayment(bW, do)])
1008+ if ((fB == fB))
1009+ then cp
1010+ else throw("Strict value is not equal to itself.")
1011+ }
8871012 }
8881013
8891014
8901015
891-@Callable(df)
892-func unstakeAndGetOneTkn (fj,fc,eP) = {
893- let eR = {
894- let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
895- if ($isInstanceOf(eS, "Boolean"))
896- then eS
897- else throw(($getType(eS) + " couldn't be cast to Boolean"))
898- }
899- let fd = if (if (aF())
900- then true
901- else (aS == n))
902- then true
903- else eR
904- let ed = [if (if (!(fd))
905- then true
906- else ex(df))
907- then true
908- else aB("get operation is blocked by admin"), if ((size(df.payments) == 0))
909- then true
910- else aB("no payments are expected")]
911- if ((ed == ed))
1016+@Callable(dm)
1017+func unstakeAndGet (du) = {
1018+ let fE = if ((size(dm.payments) != 0))
1019+ then throw("No payments are expected")
1020+ else true
1021+ if ((fE == fE))
9121022 then {
913- let ec = aK(fc)
914- let X = df.caller
915- let Y = df.transactionId
916- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
917- if ((fk == fk))
1023+ let bL = aO()
1024+ let bY = fromBase58String(bL[q])
1025+ let fy = invoke(bg, "unstake", [toBase58String(bY), du], nil)
1026+ if ((fy == fy))
9181027 then {
919- let fl = eb(ec, fj, aT, X, Y)
920- if ((fl == fl))
1028+ let cH = bU(toBase58String(dm.transactionId), toBase58String(bY), du, dm.caller)
1029+ let cb = parseIntValue(cH._9)
1030+ let cp = cH._10
1031+ let fF = if (if (aM())
1032+ then true
1033+ else (cb == n))
1034+ then throw(("Get operation is blocked by admin. Status = " + toString(cb)))
1035+ else true
1036+ if ((fF == fF))
9211037 then {
922- let eW = fl._4
923- let dt = fl._3
924- let cP = fl._2
925- let ff = fl._1
926- let dn = if (if ((eP > 0))
927- then (eP > ff)
928- else false)
929- then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
930- else ff
931- let fg = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)])
932- if ((fg == fg))
933- then {
934- let fh = [ScriptTransfer(df.caller, dn, ec)]
935- let fa = if ((dt > 0))
936- then [ScriptTransfer(aE, dt, ec)]
937- else nil
938- $Tuple2(((cP ++ fh) ++ fa), dn)
939- }
1038+ let fB = invoke(aK, "burn", [du], [AttachedPayment(bY, du)])
1039+ if ((fB == fB))
1040+ then cp
9401041 else throw("Strict value is not equal to itself.")
9411042 }
9421043 else throw("Strict value is not equal to itself.")
9431044 }
9441045 else throw("Strict value is not equal to itself.")
9451046 }
9461047 else throw("Strict value is not equal to itself.")
9471048 }
9481049
9491050
9501051
951-@Callable(df)
952-func get () = {
953- let cA = de(df)
954- let fm = cA._1
955- let ch = cA._2
956- let dh = cA._3
957- let bP = cA._4
958- let ci = cA._5
959- let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
960- if ((fn == fn))
961- then ci
962- else throw("Strict value is not equal to itself.")
963- }
964-
965-
966-
967-@Callable(df)
968-func getNoLess (fo,fp) = {
969- let cA = de(df)
970- let cg = cA._1
971- let ch = cA._2
972- let dh = cA._3
973- let bP = cA._4
974- let ci = cA._5
975- if ((fo > cg))
976- then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo)))
977- else if ((fp > ch))
978- then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp)))
979- else {
980- let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
981- if ((fn == fn))
982- then ci
983- else throw("Strict value is not equal to itself.")
984- }
985- }
986-
987-
988-
989-@Callable(df)
990-func unstakeAndGet (dn) = {
991- let fq = if ((size(df.payments) != 0))
992- then throw("No payments are expected")
993- else true
994- if ((fq == fq))
1052+@Callable(dm)
1053+func unstakeAndGetNoLess (fx,fG,fD) = {
1054+ let fr = if (aM())
1055+ then true
1056+ else (aZ == n)
1057+ let ej = [if (!(fr))
1058+ then true
1059+ else throw("get operation is blocked by admin"), if ((size(dm.payments) == 0))
1060+ then true
1061+ else throw("no payments are expected")]
1062+ if ((ej == ej))
9951063 then {
996- let bE = aH()
997- let bR = fromBase58String(bE[q])
998- let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
999- if ((fk == fk))
1064+ let fy = invoke(bg, "unstake", [toBase58String(ba), fx], nil)
1065+ if ((fy == fy))
10001066 then {
1001- let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
1002- let bU = parseIntValue(cA._9)
1003- let ci = cA._10
1004- let fr = if (if (aF())
1067+ let cH = bU(toBase58String(dm.transactionId), toBase58String(ba), fx, dm.caller)
1068+ let cn = cH._1
1069+ let co = cH._2
1070+ let cp = cH._10
1071+ let fH = [if ((cn >= fG))
10051072 then true
1006- else (bU == n))
1007- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
1008- else true
1009- if ((fr == fr))
1073+ else throw(makeString(["amount asset amount to receive is less than ", toString(fG)], "")), if ((co >= fD))
1074+ then true
1075+ else throw(makeString(["price asset amount to receive is less than ", toString(fD)], ""))]
1076+ if ((fH == fH))
10101077 then {
1011- let fn = invoke(aD, "burn", [dn], [AttachedPayment(bR, dn)])
1012- if ((fn == fn))
1013- then ci
1078+ let fB = invoke(aK, "burn", [fx], [AttachedPayment(ba, fx)])
1079+ if ((fB == fB))
1080+ then cp
10141081 else throw("Strict value is not equal to itself.")
10151082 }
10161083 else throw("Strict value is not equal to itself.")
10171084 }
10181085 else throw("Strict value is not equal to itself.")
10191086 }
10201087 else throw("Strict value is not equal to itself.")
10211088 }
10221089
10231090
10241091
1025-@Callable(df)
1026-func unstakeAndGetNoLess (fj,fs,fp) = {
1027- let fd = if (aF())
1092+@Callable(dm)
1093+func activate (fI,fJ) = if ((toString(dm.caller) != toString(aK)))
1094+ then throw("permissions denied")
1095+ else $Tuple2([StringEntry(aa(), fI), StringEntry(ab(), fJ)], "success")
1096+
1097+
1098+
1099+@Callable(dm)
1100+func refreshKLp () = {
1101+ let fK = valueOrElse(getInteger(ag), 0)
1102+ let fL = aE(makeString([value(getString(ah)), "blocks have not passed since the previous call"], " "))
1103+ let fM = if (((height - fK) >= 30))
10281104 then true
1029- else (aS == n)
1030- let ed = [if (!(fd))
1031- then true
1032- else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
1033- then true
1034- else throw("no payments are expected")]
1035- if ((ed == ed))
1105+ else fL
1106+ if ((fM == fM))
10361107 then {
1037- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1038- if ((fk == fk))
1039- then {
1040- let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller)
1041- let cg = cA._1
1042- let ch = cA._2
1043- let ci = cA._10
1044- let ft = [if ((cg >= fs))
1045- then true
1046- else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
1047- then true
1048- else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1049- if ((ft == ft))
1050- then {
1051- let fn = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)])
1052- if ((fn == fn))
1053- then ci
1054- else throw("Strict value is not equal to itself.")
1055- }
1056- else throw("Strict value is not equal to itself.")
1057- }
1058- else throw("Strict value is not equal to itself.")
1108+ let eD = aH(eE())
1109+[IntegerEntry(ag, height), IntegerEntry(af, eD)]
10591110 }
10601111 else throw("Strict value is not equal to itself.")
10611112 }
10621113
10631114
10641115
1065-@Callable(df)
1066-func activate (fu,fv) = if ((toString(df.caller) != toString(aD)))
1067- then throw("permissions denied")
1068- else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
1116+@Callable(dm)
1117+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aO())
10691118
10701119
10711120
1072-@Callable(df)
1073-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
1121+@Callable(dm)
1122+func getAccBalanceWrapperREADONLY (by) = $Tuple2(nil, bx(by))
10741123
10751124
10761125
1077-@Callable(df)
1078-func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
1079-
1080-
1081-
1082-@Callable(df)
1083-func calcPricesWrapperREADONLY (by,bz,bD) = {
1084- let bM = bC(by, bz, bD)
1085- $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
1126+@Callable(dm)
1127+func calcPricesWrapperREADONLY (bF,bG,bK) = {
1128+ let bT = bJ(bF, bG, bK)
1129+ $Tuple2(nil, [toString(bT[0]), toString(bT[1]), toString(bT[2])])
10861130 }
10871131
10881132
10891133
1090-@Callable(df)
1134+@Callable(dm)
10911135 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
10921136
10931137
10941138
1095-@Callable(df)
1139+@Callable(dm)
10961140 func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
10971141
10981142
10991143
1100-@Callable(df)
1101-func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
1144+@Callable(dm)
1145+func calcPriceBigIntWrapperREADONLY (bA,bB) = $Tuple2(nil, toString(bz(parseBigIntValue(bA), parseBigIntValue(bB))))
11021146
11031147
11041148
1105-@Callable(df)
1106-func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
1149+@Callable(dm)
1150+func estimatePutOperationWrapperREADONLY (bV,cr,cs,ct,cu,cv,X,cw,cx) = $Tuple2(nil, cq(bV, cr, cs, ct, cu, cv, X, cw, cx))
11071151
11081152
11091153
1110-@Callable(df)
1111-func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1112- let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1113- $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
1154+@Callable(dm)
1155+func estimateGetOperationWrapperREADONLY (bV,bW,bX,X) = {
1156+ let cH = bU(bV, bW, bX, addressFromStringValue(X))
1157+ $Tuple2(nil, $Tuple10(cH._1, cH._2, cH._3, cH._4, cH._5, cH._6, cH._7, toString(cH._8), cH._9, cH._10))
11141158 }
11151159
11161160
11171161
1118-@Callable(df)
1162+@Callable(dm)
11191163 func statsREADONLY () = {
1120- let bE = aH()
1121- let bR = fromBase58String(bE[q])
1122- let cS = bE[r]
1123- let cT = bE[s]
1124- let ct = bE[v]
1125- let cu = bE[w]
1126- let bF = parseIntValue(bE[t])
1127- let bG = parseIntValue(bE[u])
1128- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1129- let cU = bq(cS)
1130- let cV = bq(cT)
1131- let fx = if ((fw == 0))
1164+ let bL = aO()
1165+ let bY = fromBase58String(bL[q])
1166+ let cZ = bL[r]
1167+ let da = bL[s]
1168+ let cA = bL[v]
1169+ let cB = bL[w]
1170+ let bM = parseIntValue(bL[t])
1171+ let bN = parseIntValue(bL[u])
1172+ let fN = valueOrErrorMessage(assetInfo(bY), (("Asset " + toBase58String(bY)) + " doesn't exist")).quantity
1173+ let db = bx(cZ)
1174+ let dc = bx(da)
1175+ let fO = if ((fN == 0))
11321176 then [e, e, e]
1133- else bC(cU, cV, fw)
1134- let cb = 0
1135- let fy = G(fx[1], b)
1136- let fz = G(fx[2], b)
1137- let fA = value(getInteger(aD, ap(toString(this))))
1138- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fw), toString(cb), toString(fy), toString(fz), toString(fA)], j))
1177+ else bJ(db, dc, fN)
1178+ let ci = 0
1179+ let fP = G(fO[1], b)
1180+ let fQ = G(fO[2], b)
1181+ let fR = value(getInteger(aK, as(toString(this))))
1182+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(db), toString(dc), toString(fN), toString(ci), toString(fP), toString(fQ), toString(fR)], j))
11391183 }
11401184
11411185
11421186
1143-@Callable(df)
1144-func evaluatePutByAmountAssetREADONLY (cl) = {
1145- let bE = aH()
1146- let bR = fromBase58String(bE[q])
1147- let cr = bE[r]
1148- let bS = fromBase58String(cr)
1149- let cs = bE[s]
1150- let bT = fromBase58String(cs)
1151- let bF = parseIntValue(bE[t])
1152- let bG = parseIntValue(bE[u])
1153- let bU = bE[p]
1154- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1155- let cU = bq(cr)
1156- let cV = bq(cs)
1157- let bA = D(cU, bF)
1158- let bB = D(cV, bG)
1159- let ca = if ((fw == 0))
1187+@Callable(dm)
1188+func evaluatePutByAmountAssetREADONLY (cs) = {
1189+ let bL = aO()
1190+ let bY = fromBase58String(bL[q])
1191+ let cy = bL[r]
1192+ let bZ = fromBase58String(cy)
1193+ let cz = bL[s]
1194+ let ca = fromBase58String(cz)
1195+ let bM = parseIntValue(bL[t])
1196+ let bN = parseIntValue(bL[u])
1197+ let cb = bL[p]
1198+ let fN = valueOrErrorMessage(assetInfo(bY), (("Asset " + toBase58String(bY)) + " doesn't exist")).quantity
1199+ let db = bx(cy)
1200+ let dc = bx(cz)
1201+ let bH = D(db, bM)
1202+ let bI = D(dc, bN)
1203+ let ch = if ((fN == 0))
11601204 then e
1161- else bs(bB, bA)
1162- let cx = D(cl, bF)
1163- let cy = fraction(cx, ca, d)
1164- let cn = G(cy, bG)
1165- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1166- let cI = dl._1
1167- let fB = dl._3
1168- let bW = dl._4
1169- let bY = dl._5
1170- let bV = dl._6
1171- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1205+ else bz(bI, bH)
1206+ let cE = D(cs, bM)
1207+ let cF = fraction(cE, ch, d)
1208+ let cu = G(cF, bN)
1209+ let ds = cq("", 500000, cs, bZ, cu, ca, "", true, false)
1210+ let cP = ds._1
1211+ let fS = ds._3
1212+ let cd = ds._4
1213+ let cf = ds._5
1214+ let cc = ds._6
1215+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cP), toString(G(ch, b)), toString(cd), toString(cf), toString(cc), cb, toString(cs), toString(cu)], j))
11721216 }
11731217
11741218
11751219
1176-@Callable(df)
1177-func evaluatePutByPriceAssetREADONLY (cn) = {
1178- let bE = aH()
1179- let bR = fromBase58String(bE[q])
1180- let cr = bE[r]
1181- let bS = fromBase58String(cr)
1182- let cs = bE[s]
1183- let bT = fromBase58String(cs)
1184- let bF = parseIntValue(bE[t])
1185- let bG = parseIntValue(bE[u])
1186- let bU = bE[p]
1187- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1188- let fC = bq(cr)
1189- let fD = bq(cs)
1190- let fE = D(fC, bF)
1191- let fF = D(fD, bG)
1192- let ca = if ((fw == 0))
1220+@Callable(dm)
1221+func evaluatePutByPriceAssetREADONLY (cu) = {
1222+ let bL = aO()
1223+ let bY = fromBase58String(bL[q])
1224+ let cy = bL[r]
1225+ let bZ = fromBase58String(cy)
1226+ let cz = bL[s]
1227+ let ca = fromBase58String(cz)
1228+ let bM = parseIntValue(bL[t])
1229+ let bN = parseIntValue(bL[u])
1230+ let cb = bL[p]
1231+ let fN = valueOrErrorMessage(assetInfo(bY), (("Asset " + toBase58String(bY)) + " doesn't exist")).quantity
1232+ let fT = bx(cy)
1233+ let fU = bx(cz)
1234+ let fV = D(fT, bM)
1235+ let fW = D(fU, bN)
1236+ let ch = if ((fN == 0))
11931237 then e
1194- else bs(fF, fE)
1195- let cy = D(cn, bG)
1196- let cx = fraction(cy, d, ca)
1197- let cl = G(cx, bF)
1198- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1199- let cI = dl._1
1200- let fB = dl._3
1201- let bW = dl._4
1202- let bY = dl._5
1203- let bV = dl._6
1204- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1238+ else bz(fW, fV)
1239+ let cF = D(cu, bN)
1240+ let cE = fraction(cF, d, ch)
1241+ let cs = G(cE, bM)
1242+ let ds = cq("", 500000, cs, bZ, cu, ca, "", true, false)
1243+ let cP = ds._1
1244+ let fS = ds._3
1245+ let cd = ds._4
1246+ let cf = ds._5
1247+ let cc = ds._6
1248+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cP), toString(G(ch, b)), toString(cd), toString(cf), toString(cc), cb, toString(cs), toString(cu)], j))
12051249 }
12061250
12071251
12081252
1209-@Callable(df)
1210-func evaluateGetREADONLY (fG,fH) = {
1211- let cA = bN("", fG, fH, this)
1212- let cg = cA._1
1213- let ch = cA._2
1214- let bW = cA._5
1215- let bY = cA._6
1216- let bV = cA._7
1217- let cb = cA._8
1218- let bU = parseIntValue(cA._9)
1219- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cg), toString(ch), toString(bW), toString(bY), toString(bV), toString(cb), toString(bU)], j))
1253+@Callable(dm)
1254+func evaluateGetREADONLY (fX,fY) = {
1255+ let cH = bU("", fX, fY, this)
1256+ let cn = cH._1
1257+ let co = cH._2
1258+ let cd = cH._5
1259+ let cf = cH._6
1260+ let cc = cH._7
1261+ let ci = cH._8
1262+ let cb = parseIntValue(cH._9)
1263+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cn), toString(co), toString(cd), toString(cf), toString(cc), toString(ci), toString(cb)], j))
12201264 }
12211265
12221266
1223-@Verifier(fI)
1224-func fJ () = {
1225- let fK = {
1226- let dq = eu()
1227- if ($isInstanceOf(dq, "ByteVector"))
1267+@Verifier(fZ)
1268+func ga () = {
1269+ let gb = {
1270+ let aI = eI()
1271+ if ($isInstanceOf(aI, "ByteVector"))
12281272 then {
1229- let ey = dq
1230- ey
1273+ let eM = aI
1274+ eM
12311275 }
1232- else if ($isInstanceOf(dq, "Unit"))
1233- then fI.senderPublicKey
1276+ else if ($isInstanceOf(aI, "Unit"))
1277+ then fZ.senderPublicKey
12341278 else throw("Match error")
12351279 }
1236- let dq = fI
1237- if ($isInstanceOf(dq, "Order"))
1280+ let aI = fZ
1281+ if ($isInstanceOf(aI, "Order"))
12381282 then {
1239- let cR = dq
1240- let fL = aG()
1241- let au = cQ(cR)
1242- let av = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1243- let aw = sigVerify(cR.bodyBytes, cR.proofs[1], fL)
1244- if (if (if (au)
1245- then av
1283+ let cY = aI
1284+ let gc = aN()
1285+ let ax = cX(cY)
1286+ let ay = sigVerify(cY.bodyBytes, cY.proofs[0], cY.senderPublicKey)
1287+ let az = sigVerify(cY.bodyBytes, cY.proofs[1], gc)
1288+ if (if (if (ax)
1289+ then ay
12461290 else false)
1247- then aw
1291+ then az
12481292 else false)
12491293 then true
1250- else at(au, av, aw)
1294+ else aw(ax, ay, az)
12511295 }
1252- else if ($isInstanceOf(dq, "SetScriptTransaction"))
1296+ else if ($isInstanceOf(aI, "SetScriptTransaction"))
12531297 then {
1254- let ev = dq
1255- let fM = blake2b256(value(ev.script))
1256- let fN = fromBase64String(value(getString(aD, ar())))
1257- let fO = scriptHash(this)
1258- if (if ((fN == fM))
1259- then (fO != fM)
1298+ let eJ = aI
1299+ let gd = blake2b256(value(eJ.script))
1300+ let ge = fromBase64String(value(getString(aK, au())))
1301+ let gf = scriptHash(this)
1302+ if (if ((ge == gd))
1303+ then (gf != gd)
12601304 else false)
12611305 then true
1262- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1306+ else sigVerify(fZ.bodyBytes, fZ.proofs[0], gb)
12631307 }
1264- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1308+ else sigVerify(fZ.bodyBytes, fZ.proofs[0], gb)
12651309 }
12661310

github/deemru/w8io/026f985 
354.55 ms