tx · 2WgjaRzisTBEtqaBbJ5GRHrKKZ4zQjmWHNyXD59sVb7G

3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh:  -0.03900000 Waves

2023.02.09 13:40 [2441988] smart account 3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh > SELF 0.00000000 Waves

{ "type": 13, "id": "2WgjaRzisTBEtqaBbJ5GRHrKKZ4zQjmWHNyXD59sVb7G", "fee": 3900000, "feeAssetId": null, "timestamp": 1675939225308, "version": 2, "chainId": 84, "sender": "3N6wAa7PMFZJu4Zrmp3avXmMnRTrRpMM9Lh", "senderPublicKey": "Cr8D7eozSzJh7XHsYTjBinPpo3SS83BrCGiBAJsjGxBo", "proofs": [ "3sxBbuHB51gnTfaWbAj3R9QndCryTvq7VNi548Dyhx3vR4RCwpWX53jZ1bEWMuEQG7YY1aikf6tgnGqjq3MD2xVC" ], "script": "base64:BgLRLwgCEgQKAgEEEgYKBAEEAQgSAwoBCBIAEgQKAgEEEgMKAQESBAoCAQQSBAoCCAESBAoCCAESBAoCCAESBQoDAQgBEgASBAoCAQESAwoBARIFCgMBAQESBAoCCAgSABIAEgMKAQgSBQoDAQEBEgQKAgEBEgQKAggBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgASAwoBARIDCgEBEgQKAggBIgpsUGRlY2ltYWxzIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiILd2F2ZXNTdHJpbmciA1NFUCIKUG9vbEFjdGl2ZSIPUG9vbFB1dERpc2FibGVkIhNQb29sTWF0Y2hlckRpc2FibGVkIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIg1pZHhQb29sU3RhdHVzIhBpZHhQb29sTFBBc3NldElkIg1pZHhBbXRBc3NldElkIg9pZHhQcmljZUFzc2V0SWQiDmlkeEFtdEFzc2V0RGNtIhBpZHhQcmljZUFzc2V0RGNtIg5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Q9zZW5kZXJQdWJsaWNLZXkEAmFHCQD0AwMIBQJkQQlib2R5Qnl0ZXMJAJEDAggFAmRBBnByb29mcwABBQJoYgMDAwUCYUQFAmFGBwUCYUcHBgkBAmFDBAUCYUQFAmFFBQJhRgUCYUcDCQABAgUCZFcCFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJmYQUCZFcDCQD0AwMIBQJnWQlib2R5Qnl0ZXMJAJEDAggFAmdZBnByb29mcwAABQJoYQYEAmhkCQD2AwEJAQV2YWx1ZQEIBQJmYQZzY3JpcHQEAmhlCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYU8JAQJhQQAEAmhmCQDxBwEFBHRoaXMDCQAAAgUCaGUFAmhkCQECIT0CBQJoZgUCaGQHCQD0AwMIBQJnWQlib2R5Qnl0ZXMJAJEDAggFAmdZBnByb29mcwAABQJoYdSzfpw=", "height": 2441988, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D1PAW6mpJ54LFR4q6KnpGCasiyg8MFLCN9y6rVDJn6ys Next: 5B2GFR6f4TRhfJ5VQKTCccn2LRgsrjYU1kzLHNEy1rJw Diff:
OldNewDifferences
114114 func af () = "%s__priceAsset"
115115
116116
117-func ag () = "%s__factoryConfig"
117+let ag = "%s__fee"
118+
119+let ah = fraction(10, b, 10000)
120+
121+let ai = valueOrElse(getInteger(this, ag), ah)
122+
123+let aj = makeString(["%s", "kLp"], j)
124+
125+let ak = makeString(["%s", "kLpRefreshedHeight"], j)
126+
127+let al = makeString(["%s", "refreshKLpDelay"], j)
128+
129+let am = 30
130+
131+let an = valueOrElse(getInteger(this, al), am)
132+
133+func ao () = "%s__factoryConfig"
118134
119135
120-func ah () = "%s%s__matcher__publicKey"
136+func ap () = "%s%s__matcher__publicKey"
121137
122138
123-func ai (aj) = (("%s%s%s__" + aj) + "__mappings__poolContract2LpAsset")
139+func aq (ar) = (("%s%s%s__" + ar) + "__mappings__poolContract2LpAsset")
124140
125141
126-func ak (al,am) = (((("%d%d%s__" + al) + "__") + am) + "__config")
142+func as (at,au) = (((("%d%d%s__" + at) + "__") + au) + "__config")
127143
128144
129-func an (ao) = ("%s%s%s__mappings__baseAsset2internalId__" + ao)
145+func av (aw) = ("%s%s%s__mappings__baseAsset2internalId__" + aw)
130146
131147
132-func ap () = "%s__shutdown"
148+func ax () = "%s__shutdown"
133149
134150
135-func aq (ar) = ("%s%s__poolWeight__" + ar)
151+func ay (az) = ("%s%s__poolWeight__" + az)
136152
137153
138-func as () = "%s__allowedLpScriptHash"
154+func aA () = "%s__allowedLpScriptHash"
139155
140156
141-let at = "%s__feeCollectorAddress"
157+let aB = "%s__feeCollectorAddress"
142158
143-func au (av,aw,ax) = throw(((((("order validation failed: orderValid=" + toString(av)) + " senderValid=") + toString(aw)) + " matcherValid=") + toString(ax)))
159+func aC (aD,aE,aF,aG) = throw((((((((("order validation failed: orderValid=" + toString(aD)) + " (") + aE) + ")") + " senderValid=") + toString(aF)) + " matcherValid=") + toString(aG)))
144160
145161
146-func ay (az,aA) = valueOrErrorMessage(getString(az, aA), makeString(["mandatory ", toString(az), ".", aA, " is not defined"], ""))
162+func aH (aI,aJ) = valueOrErrorMessage(getString(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
147163
148164
149-func aB (az,aA) = valueOrErrorMessage(getInteger(az, aA), makeString(["mandatory ", toString(az), ".", aA, " is not defined"], ""))
165+func aK (aI,aJ) = valueOrErrorMessage(getInteger(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
150166
151167
152-func aC (aD) = throw(makeString(["lp.ride:", aD], " "))
168+func aL (aM) = throw(makeString(["lp.ride:", aM], " "))
153169
154170
155-let aE = addressFromStringValue(ay(this, T()))
171+func aN (aM) = makeString(["lp.ride:", aM], " ")
156172
157-let aF = addressFromStringValue(ay(aE, at))
158173
159-let aG = {
160- let aH = invoke(aE, "getInFeeREADONLY", [toString(this)], nil)
161- if ($isInstanceOf(aH, "Int"))
162- then aH
163- else throw(($getType(aH) + " couldn't be cast to Int"))
174+let aO = addressFromStringValue(aH(this, T()))
175+
176+let aP = addressFromStringValue(aH(aO, aB))
177+
178+let aQ = {
179+ let aR = invoke(aO, "getInFeeREADONLY", [toString(this)], nil)
180+ if ($isInstanceOf(aR, "Int"))
181+ then aR
182+ else throw(($getType(aR) + " couldn't be cast to Int"))
164183 }
165184
166-let aI = {
167- let aH = invoke(aE, "getOutFeeREADONLY", [toString(this)], nil)
168- if ($isInstanceOf(aH, "Int"))
169- then aH
170- else throw(($getType(aH) + " couldn't be cast to Int"))
185+let aS = {
186+ let aR = invoke(aO, "getOutFeeREADONLY", [toString(this)], nil)
187+ if ($isInstanceOf(aR, "Int"))
188+ then aR
189+ else throw(($getType(aR) + " couldn't be cast to Int"))
171190 }
172191
173-func aJ () = valueOrElse(getBoolean(aE, ap()), false)
192+func aT () = valueOrElse(getBoolean(aO, ax()), false)
174193
175194
176-func aK () = fromBase58String(ay(aE, ah()))
195+func aU () = fromBase58String(aH(aO, ap()))
177196
178197
179-func aL () = {
180- let aM = ay(this, ae())
181- let aN = ay(this, af())
182- let am = aB(aE, an(aN))
183- let al = aB(aE, an(aM))
184- split(ay(aE, ak(toString(al), toString(am))), j)
198+func aV () = {
199+ let aW = aH(this, ae())
200+ let aX = aH(this, af())
201+ let au = aK(aO, av(aX))
202+ let at = aK(aO, av(aW))
203+ split(aH(aO, as(toString(at), toString(au))), j)
185204 }
186205
187206
188-func aO (aP) = if ((aP == i))
207+func aY (aZ) = if ((aZ == i))
189208 then unit
190- else fromBase58String(aP)
209+ else fromBase58String(aZ)
191210
192211
193-func aQ (aP) = if ((aP == unit))
212+func ba (aZ) = if ((aZ == unit))
194213 then i
195- else toBase58String(value(aP))
214+ else toBase58String(value(aZ))
196215
197216
198-func aR (aS) = $Tuple7(addressFromStringValue(aS[o]), parseIntValue(aS[p]), fromBase58String(aS[q]), aO(aS[r]), aO(aS[s]), parseIntValue(aS[t]), parseIntValue(aS[u]))
217+func bb (bc) = $Tuple7(addressFromStringValue(bc[o]), parseIntValue(bc[p]), fromBase58String(bc[q]), aY(bc[r]), aY(bc[s]), parseIntValue(bc[t]), parseIntValue(bc[u]))
199218
200219
201-let aT = aR(aL())
220+let bd = bb(aV())
202221
203-let aU = aT
222+let be = bd
204223
205-let aV = aU._1
224+let bf = be._1
206225
207-let aW = aU._2
226+let bg = be._2
208227
209-let aX = aU._3
228+let bh = be._3
210229
211-let aY = aU._4
230+let bi = be._4
212231
213-let aZ = aU._5
232+let bj = be._5
214233
215-let ba = aU._6
234+let bk = be._6
216235
217-let bb = aU._7
236+let bl = be._7
218237
219-func bc () = split(ay(aE, ag()), j)
238+func bm () = split(aH(aO, ao()), j)
220239
221240
222-let bd = valueOrErrorMessage(addressFromString(bc()[B]), "incorrect staking address")
241+let bn = valueOrErrorMessage(addressFromString(bm()[B]), "incorrect staking address")
223242
224-let be = valueOrErrorMessage(addressFromString(bc()[C]), "incorrect staking address")
243+let bo = valueOrErrorMessage(addressFromString(bm()[C]), "incorrect staking address")
225244
226-func bf (bg,bh,bi,bj,bk,bl,bm,bn,bo,bp) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp)], j)
245+func bp (bq,br,bs,bt,bu,bv,bw,bx,by,bz) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by), toString(bz)], j)
227246
228247
229-func bq (br,bs,bt,bj,bm,bn) = makeString(["%d%d%d%d%d%d", toString(br), toString(bs), toString(bt), toString(bj), toString(bm), toString(bn)], j)
248+func bA (bB,bC,bD,bt,bw,bx) = makeString(["%d%d%d%d%d%d", toString(bB), toString(bC), toString(bD), toString(bt), toString(bw), toString(bx)], j)
230249
231250
232-func bu (bv) = if ((bv == "WAVES"))
251+func bE (bF) = if ((bF == "WAVES"))
233252 then wavesBalance(this).available
234- else assetBalance(this, fromBase58String(bv))
253+ else assetBalance(this, fromBase58String(bF))
235254
236255
237-func bw (bx,by) = fraction(bx, d, by)
256+func bG (bH,bI) = fraction(bH, d, bI)
238257
239258
240-func bz (bA,bB,bC,bD) = {
241- let bE = D(bC, bA)
242- let bF = D(bD, bB)
243- bw(bF, bE)
259+func bJ (bH,bI,L) = fraction(bH, d, bI, L)
260+
261+
262+func bK (bL,bM,bN,bO) = {
263+ let bP = D(bN, bL)
264+ let bQ = D(bO, bM)
265+ bG(bQ, bP)
244266 }
245267
246268
247-func bG (bC,bD,bH) = {
248- let bI = aL()
249- let bJ = parseIntValue(bI[t])
250- let bK = parseIntValue(bI[u])
251- let bL = bz(bJ, bK, bC, bD)
252- let by = D(bC, bJ)
253- let bx = D(bD, bK)
254- let bM = D(bH, b)
255- let bN = bw(by, bM)
256- let bO = bw(bx, bM)
257-[bL, bN, bO]
269+func bR (bN,bO,bS) = {
270+ let bT = aV()
271+ let bU = parseIntValue(bT[t])
272+ let bV = parseIntValue(bT[u])
273+ let bW = bK(bU, bV, bN, bO)
274+ let bI = D(bN, bU)
275+ let bH = D(bO, bV)
276+ let bX = D(bS, b)
277+ let bY = bG(bI, bX)
278+ let bZ = bG(bH, bX)
279+[bW, bY, bZ]
258280 }
259281
260282
261-func bP (bC,bD,bH) = {
262- let bQ = bG(bC, bD, bH)
263-[H(bQ[0], b), H(bQ[1], b), H(bQ[2], b)]
283+func ca (bN,bO,bS) = {
284+ let cb = bR(bN, bO, bS)
285+[H(cb[0], b), H(cb[1], b), H(cb[2], b)]
264286 }
265287
266288
267-func bR (bS,bT,bU,ab) = {
268- let bI = aL()
269- let bV = bI[q]
270- let bW = bI[r]
271- let bX = bI[s]
272- let bA = parseIntValue(bI[t])
273- let bB = parseIntValue(bI[u])
274- let bY = bI[p]
275- let bZ = valueOrErrorMessage(assetInfo(fromBase58String(bV)), (("Asset " + bV) + " doesn't exist")).quantity
276- if ((bV != bT))
289+func cc (cd,ce,cf,ab) = {
290+ let bT = aV()
291+ let cg = bT[q]
292+ let ch = bT[r]
293+ let ci = bT[s]
294+ let bL = parseIntValue(bT[t])
295+ let bM = parseIntValue(bT[u])
296+ let cj = bT[p]
297+ let ck = valueOrErrorMessage(assetInfo(fromBase58String(cg)), (("Asset " + cg) + " doesn't exist")).quantity
298+ if ((cg != ce))
277299 then throw("Invalid asset passed.")
278300 else {
279- let ca = bu(bW)
280- let cb = D(ca, bA)
281- let cc = bu(bX)
282- let cd = D(cc, bB)
283- let ce = bw(cd, cb)
284- let cf = H(ce, b)
285- let cg = D(bU, b)
286- let ch = D(bZ, b)
287- let ci = fraction(cb, cg, ch)
288- let cj = fraction(cd, cg, ch)
289- let ck = H(ci, bA)
290- let cl = H(cj, bB)
291- let cm = if ((bS == ""))
301+ let cl = bE(ch)
302+ let cm = D(cl, bL)
303+ let cn = bE(ci)
304+ let co = D(cn, bM)
305+ let cp = bG(co, cm)
306+ let cq = H(cp, b)
307+ let cr = D(cf, b)
308+ let cs = D(ck, b)
309+ let ct = fraction(cm, cr, cs)
310+ let cu = fraction(co, cr, cs)
311+ let cv = K(ct, bL, FLOOR)
312+ let cw = K(cu, bM, FLOOR)
313+ let cx = if ((cd == ""))
292314 then nil
293- else [ScriptTransfer(ab, ck, if ((bW == "WAVES"))
315+ else [ScriptTransfer(ab, cv, if ((ch == "WAVES"))
294316 then unit
295- else fromBase58String(bW)), ScriptTransfer(ab, cl, if ((bX == "WAVES"))
317+ else fromBase58String(ch)), ScriptTransfer(ab, cw, if ((ci == "WAVES"))
296318 then unit
297- else fromBase58String(bX)), StringEntry(ad(toString(ab), bS), bq(ck, cl, bU, cf, height, lastBlock.timestamp)), IntegerEntry(W(), cf), IntegerEntry(X(height, lastBlock.timestamp), cf)]
298- $Tuple10(ck, cl, bW, bX, ca, cc, bZ, ce, bY, cm)
319+ else fromBase58String(ci)), StringEntry(ad(toString(ab), cd), bA(cv, cw, cf, cq, height, lastBlock.timestamp)), IntegerEntry(W(), cq), IntegerEntry(X(height, lastBlock.timestamp), cq)]
320+ $Tuple10(cv, cw, ch, ci, cl, cn, ck, cp, cj, cx)
299321 }
300322 }
301323
302324
303-func cn (bS,co,cp,cq,cr,cs,ab,ct,cu) = {
304- let bI = aL()
305- let bV = fromBase58String(bI[q])
306- let cv = bI[r]
307- let cw = bI[s]
308- let cx = bI[v]
309- let cy = bI[w]
310- let bJ = parseIntValue(bI[t])
311- let bK = parseIntValue(bI[u])
312- let bY = bI[p]
313- let bZ = valueOrErrorMessage(assetInfo(bV), (("Asset " + toBase58String(bV)) + " doesn't exist")).quantity
314- let cz = toBase58String(valueOrElse(cq, fromBase58String("WAVES")))
315- let cA = toBase58String(valueOrElse(cs, fromBase58String("WAVES")))
316- if (if ((cv != cz))
325+func cy (cd,cz,cA,cB,cC,cD,ab,cE,cF) = {
326+ let bT = aV()
327+ let cg = fromBase58String(bT[q])
328+ let cG = bT[r]
329+ let cH = bT[s]
330+ let cI = bT[v]
331+ let cJ = bT[w]
332+ let bU = parseIntValue(bT[t])
333+ let bV = parseIntValue(bT[u])
334+ let cj = bT[p]
335+ let ck = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
336+ let cK = toBase58String(valueOrElse(cB, fromBase58String("WAVES")))
337+ let cL = toBase58String(valueOrElse(cD, fromBase58String("WAVES")))
338+ if (if ((cG != cK))
317339 then true
318- else (cw != cA))
340+ else (cH != cL))
319341 then throw("Invalid amt or price asset passed.")
320342 else {
321- let ca = if (ct)
322- then bu(cv)
323- else (bu(cv) - cp)
324- let cc = if (ct)
325- then bu(cw)
326- else (bu(cw) - cr)
327- let cB = D(cp, bJ)
328- let cC = D(cr, bK)
329- let cD = bw(cC, cB)
330- let cb = D(ca, bJ)
331- let cd = D(cc, bK)
332- let cE = if ((bZ == 0))
343+ let cl = if (cE)
344+ then bE(cG)
345+ else (bE(cG) - cA)
346+ let cn = if (cE)
347+ then bE(cH)
348+ else (bE(cH) - cC)
349+ let cM = D(cA, bU)
350+ let cN = D(cC, bV)
351+ let cO = bG(cN, cM)
352+ let cm = D(cl, bU)
353+ let co = D(cn, bV)
354+ let cP = if ((ck == 0))
333355 then {
334- let ce = e
335- let cF = e
336- let bM = pow((cB * cC), 0, toBigInt(5), 1, 0, DOWN)
337- $Tuple5(H(bM, b), H(cB, bJ), H(cC, bK), bw((cd + cC), (cb + cB)), cF)
356+ let cp = e
357+ let cQ = e
358+ let bX = pow((cM * cN), 0, toBigInt(5), 1, 0, DOWN)
359+ $Tuple5(H(bX, b), H(cM, bU), H(cN, bV), bG((co + cN), (cm + cM)), cQ)
338360 }
339361 else {
340- let ce = bw(cd, cb)
341- let cF = fraction(R((ce - cD)), d, ce)
342- let cG = D(co, b)
343- if (if ((ce != e))
344- then (cF > cG)
362+ let cp = bG(co, cm)
363+ let cQ = fraction(R((cp - cO)), d, cp)
364+ let cR = D(cz, b)
365+ if (if ((cp != e))
366+ then (cQ > cR)
345367 else false)
346- then throw(((("Price slippage " + toString(cF)) + " exceeded the passed limit of ") + toString(cG)))
368+ then throw(((("Price slippage " + toString(cQ)) + " exceeded the passed limit of ") + toString(cR)))
347369 else {
348- let ch = D(bZ, b)
349- let cH = fraction(cB, ce, d)
350- let cI = fraction(cC, d, ce)
351- let cJ = if ((cH > cC))
352- then $Tuple2(cI, cC)
353- else $Tuple2(cB, cH)
354- let cK = cJ._1
355- let cL = cJ._2
356- let bM = fraction(ch, cL, cd)
357- $Tuple5(H(bM, b), H(cK, bJ), H(cL, bK), ce, cF)
370+ let cs = D(ck, b)
371+ let cS = fraction(cM, bJ(co, cm, CEILING), d, CEILING)
372+ let cT = fraction(cN, d, bJ(co, cm, FLOOR), CEILING)
373+ let cU = if ((cS > cN))
374+ then $Tuple2(cT, cN)
375+ else $Tuple2(cM, cS)
376+ let cV = cU._1
377+ let cW = cU._2
378+ let bX = fraction(cs, cW, co, FLOOR)
379+ $Tuple5(K(bX, b, FLOOR), K(cV, bU, CEILING), K(cW, bV, CEILING), cp, cQ)
358380 }
359381 }
360- let cM = cE._1
361- let cN = cE._2
362- let cO = cE._3
363- let cf = H(cE._4, b)
364- let cP = H(cE._5, b)
365- if ((0 >= cM))
382+ let cX = cP._1
383+ let cY = cP._2
384+ let cZ = cP._3
385+ let cq = H(cP._4, b)
386+ let da = H(cP._5, b)
387+ if ((0 >= cX))
366388 then throw("Invalid calculations. LP calculated is less than zero.")
367389 else {
368- let cQ = if (!(cu))
390+ let db = if (!(cF))
369391 then 0
370- else cM
371- let cR = (cp - cN)
372- let cS = (cr - cO)
373- let cT = [IntegerEntry(W(), cf), IntegerEntry(X(height, lastBlock.timestamp), cf), StringEntry(aa(ab, bS), bf(cN, cO, cQ, cf, co, cP, height, lastBlock.timestamp, cR, cS))]
374- $Tuple13(cM, cQ, cf, ca, cc, bZ, bV, bY, cT, cR, cS, cq, cs)
392+ else cX
393+ let dc = (cA - cY)
394+ let dd = (cC - cZ)
395+ let de = [IntegerEntry(W(), cq), IntegerEntry(X(height, lastBlock.timestamp), cq), StringEntry(aa(ab, cd), bp(cY, cZ, db, cq, cz, da, height, lastBlock.timestamp, dc, dd))]
396+ $Tuple13(cX, db, cq, cl, cn, ck, cg, cj, de, dc, dd, cB, cD)
375397 }
376398 }
377399 }
378400
379401
380-func cU (cV) = {
381- let bI = aL()
382- let cW = bI[r]
383- let cX = bI[s]
384- let bY = parseIntValue(bI[p])
385- let bJ = parseIntValue(bI[t])
386- let bK = parseIntValue(bI[u])
387- let cY = bu(cW)
388- let cZ = bu(cX)
389- let ce = if ((cV.orderType == Buy))
390- then bz(bJ, bK, (cY + cV.amount), cZ)
391- else bz(bJ, bK, (cY - cV.amount), cZ)
392- let cf = H(ce, b)
393- if (if (if (aJ())
394- then true
395- else (bY == m))
396- then true
397- else (bY == n))
398- then throw("Exchange operations disabled")
399- else {
400- let da = cV.assetPair.amountAsset
401- let db = if ((da == unit))
402- then "WAVES"
403- else toBase58String(value(da))
404- let dc = cV.assetPair.priceAsset
405- let dd = if ((dc == unit))
406- then "WAVES"
407- else toBase58String(value(dc))
408- if (if ((db != cW))
409- then true
410- else (dd != cX))
411- then throw("Wrong order assets.")
412- else {
413- let de = cV.price
414- let df = fraction(b, bK, bJ)
415- let dg = M(de, b, df)
416- let dh = if ((cV.orderType == Buy))
417- then (cf >= dg)
418- else (dg >= cf)
419- true
420- }
421- }
402+func df (dg,dh,ck) = {
403+ let di = G(dg, toBigInt(bk))
404+ let dj = G(dh, toBigInt(bl))
405+ let dk = fraction(pow((di * dj), 0, toBigInt(5), 1, 18, DOWN), g, ck)
406+ if ((ck == f))
407+ then f
408+ else dk
422409 }
423410
424411
425-func di (dj) = if ((size(dj.payments) != 1))
412+func dl (dm,dn,do) = {
413+ let dp = (toBigInt(bE(ba(bi))) - dm)
414+ let dq = (toBigInt(bE(ba(bj))) - dn)
415+ let dr = (toBigInt(value(assetInfo(bh)).quantity) - do)
416+ let ds = df(dp, dq, dr)
417+ ds
418+ }
419+
420+
421+func dt (du,dv,do) = {
422+ let dp = (bE(ba(bi)) + du)
423+ let dq = (bE(ba(bj)) + dv)
424+ let dr = (value(assetInfo(bh)).quantity + do)
425+ let dk = df(toBigInt(dp), toBigInt(dq), toBigInt(dr))
426+ let dw = [IntegerEntry(ak, height), StringEntry(aj, toString(dk))]
427+ $Tuple2(dw, dk)
428+ }
429+
430+
431+func dx (dy,dk) = if ((dk >= dy))
432+ then true
433+ else aL(makeString(["updated KLp lower than current KLp", toString(dy), toString(dk)], " "))
434+
435+
436+func dz (dA) = {
437+ let dp = bE(ba(bi))
438+ let dq = bE(ba(bj))
439+ let dB = dA.amount
440+ let dC = fraction(dA.amount, dA.price, b, FLOOR)
441+ let dD = if ((dA.orderType == Buy))
442+ then $Tuple2(dB, -(dC))
443+ else $Tuple2(-(dB), dC)
444+ let du = dD._1
445+ let dv = dD._2
446+ if (if (if (aT())
447+ then true
448+ else (bg == m))
449+ then true
450+ else (bg == n))
451+ then throw("Exchange operations disabled")
452+ else if (if ((dA.assetPair.amountAsset != bi))
453+ then true
454+ else (dA.assetPair.priceAsset != bj))
455+ then throw("Wrong order assets.")
456+ else {
457+ let dE = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aN("invalid kLp"))
458+ let dF = dt(du, dv, 0)
459+ let dG = dF._1
460+ let dH = dF._2
461+ let dI = (dH >= dE)
462+ let dJ = makeString(["kLp=", toString(dE), " kLpNew=", toString(dH), " amountAssetBalance=", toString(dp), " priceAssetBalance=", toString(dq), " amountAssetBalanceDelta=", toString(du), " priceAssetBalanceDelta=", toString(dv), " height=", toString(height)], "")
463+ $Tuple2(dI, dJ)
464+ }
465+ }
466+
467+
468+func dK (dL) = if ((size(dL.payments) != 1))
426469 then throw("exactly 1 payment is expected")
427470 else {
428- let dk = value(dj.payments[0])
429- let bT = value(dk.assetId)
430- let dl = dk.amount
431- let cE = bR(toBase58String(dj.transactionId), toBase58String(bT), dl, dj.caller)
432- let ck = cE._1
433- let cl = cE._2
434- let bY = parseIntValue(cE._9)
435- let cm = cE._10
436- if (if (aJ())
471+ let dM = value(dL.payments[0])
472+ let ce = value(dM.assetId)
473+ let dN = dM.amount
474+ let cP = cc(toBase58String(dL.transactionId), toBase58String(ce), dN, dL.caller)
475+ let cv = cP._1
476+ let cw = cP._2
477+ let cj = parseIntValue(cP._9)
478+ let cx = cP._10
479+ if (if (aT())
437480 then true
438- else (bY == n))
439- then throw(("Get operation is blocked by admin. Status = " + toString(bY)))
440- else $Tuple5(ck, cl, dl, bT, cm)
481+ else (cj == n))
482+ then throw(("Get operation is blocked by admin. Status = " + toString(cj)))
483+ else $Tuple5(cv, cw, dN, ce, cx)
441484 }
442485
443486
444-func dm (dj,co,cu) = if ((size(dj.payments) != 2))
487+func dO (dL,cz,cF) = if ((size(dL.payments) != 2))
445488 then throw("exactly 2 payments are expected")
446489 else {
447- let dn = value(dj.payments[0])
448- let do = value(dj.payments[1])
449- let dp = cn(toBase58String(dj.transactionId), co, dn.amount, dn.assetId, do.amount, do.assetId, toString(dj.caller), false, cu)
450- let bY = parseIntValue(dp._8)
451- if (if (if (aJ())
490+ let dP = value(dL.payments[0])
491+ let dQ = value(dL.payments[1])
492+ let dR = cy(toBase58String(dL.transactionId), cz, dP.amount, dP.assetId, dQ.amount, dQ.assetId, toString(dL.caller), false, cF)
493+ let cj = parseIntValue(dR._8)
494+ if (if (if (aT())
452495 then true
453- else (bY == l))
496+ else (cj == l))
454497 then true
455- else (bY == n))
456- then throw(("Put operation is blocked by admin. Status = " + toString(bY)))
457- else dp
498+ else (cj == n))
499+ then throw(("Put operation is blocked by admin. Status = " + toString(cj)))
500+ else dR
458501 }
459502
460503
461-func dq (dr) = {
462- let ds = invoke(aE, "emit", [dr], nil)
463- if ((ds == ds))
504+func dS (dT) = {
505+ let dU = invoke(aO, "emit", [dT], nil)
506+ if ((dU == dU))
464507 then {
465- let dt = {
466- let du = ds
467- if ($isInstanceOf(du, "Address"))
508+ let dV = {
509+ let dW = dU
510+ if ($isInstanceOf(dW, "Address"))
468511 then {
469- let dv = du
470- invoke(dv, "emit", [dr], nil)
512+ let dX = dW
513+ invoke(dX, "emit", [dT], nil)
471514 }
472515 else unit
473516 }
474- if ((dt == dt))
475- then dr
517+ if ((dV == dV))
518+ then dT
476519 else throw("Strict value is not equal to itself.")
477520 }
478521 else throw("Strict value is not equal to itself.")
479522 }
480523
481524
482-func dw (dr,dx) = {
483- let dy = if ((dx == 0))
525+func dY (dT,ai) = {
526+ let dZ = if ((ai == 0))
484527 then 0
485- else fraction(dr, dx, b)
486- $Tuple2((dr - dy), dy)
528+ else fraction(dT, ai, b)
529+ $Tuple2((dT - dZ), dZ)
487530 }
488531
489532
490-func dz (dA,dB,ab,ac) = {
491- let dC = (ac == unit)
492- let dD = bu(aQ(aY))
493- let dE = bu(aQ(aZ))
494- let dF = if ((dB == aY))
533+func ea (eb,ec,ab,ac) = {
534+ let ed = (ac == unit)
535+ let ee = bE(ba(bi))
536+ let ef = bE(ba(bj))
537+ let eg = if ((ec == bi))
495538 then true
496- else if ((dB == aZ))
539+ else if ((ec == bj))
497540 then false
498- else aC("invalid asset")
499- let dG = if (dC)
500- then $Tuple2(dD, dE)
501- else if (dF)
502- then $Tuple2((dD - dA), dE)
503- else $Tuple2(dD, (dE - dA))
504- let dH = dG._1
505- let dI = dG._2
506- let dJ = if (dF)
507- then $Tuple2(dA, 0)
508- else $Tuple2(0, dA)
509- let dK = dJ._1
510- let dL = dJ._2
511- let dM = dw(dK, aG)._1
512- let dN = dw(dL, aG)._1
513- let dO = dw(dA, aG)
514- let dP = dO._1
515- let dy = dO._2
516- let dQ = (dH + dM)
517- let dR = (dI + dN)
518- let dS = bw(D(dR, bb), D(dQ, ba))
519- let dT = H(dS, b)
520- let dU = if (dF)
521- then dH
522- else dI
523- let dV = toBigInt(dU)
524- let dW = toBigInt(valueOrErrorMessage(assetInfo(aX), (("asset " + toBase58String(aX)) + " doesn't exist")).quantity)
525- let dX = if ((dW > f))
541+ else aL("invalid asset")
542+ let eh = if (ed)
543+ then $Tuple2(ee, ef)
544+ else if (eg)
545+ then $Tuple2((ee - eb), ef)
546+ else $Tuple2(ee, (ef - eb))
547+ let ei = eh._1
548+ let ej = eh._2
549+ let ek = if (eg)
550+ then $Tuple2(eb, 0)
551+ else $Tuple2(0, eb)
552+ let el = ek._1
553+ let em = ek._2
554+ let dB = dY(el, aQ)._1
555+ let dC = dY(em, aQ)._1
556+ let en = dY(eb, aQ)
557+ let eo = en._1
558+ let dZ = en._2
559+ let ep = (ei + dB)
560+ let eq = (ej + dC)
561+ let er = bG(D(eq, bl), D(ep, bk))
562+ let es = H(er, b)
563+ let et = if (eg)
564+ then ei
565+ else ej
566+ let eu = toBigInt(et)
567+ let ev = toBigInt(valueOrErrorMessage(assetInfo(bh), (("asset " + toBase58String(bh)) + " doesn't exist")).quantity)
568+ let ew = if ((ev > f))
526569 then true
527- else aC("initial deposit requires all coins")
528- if ((dX == dX))
570+ else aL("initial deposit requires all coins")
571+ if ((ew == ew))
529572 then {
530- let dY = toBigInt(dP)
531- let dZ = max([0, toInt(((dW * (sqrtBigInt((d + ((dY * d) / dV)), 18, 18, DOWN) - d)) / d))])
532- let cT = if (dC)
573+ let ex = toBigInt(eo)
574+ let ey = max([0, toInt(((ev * (sqrtBigInt((d + ((ex * d) / eu)), 18, 18, DOWN) - d)) / d))])
575+ let de = if (ed)
533576 then nil
534- else [IntegerEntry(W(), dT), IntegerEntry(X(height, lastBlock.timestamp), dT), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bf(dK, dL, dZ, dT, 0, 0, height, lastBlock.timestamp, 0, 0))]
535- let ea = bw(D(dI, bb), D(dH, ba))
536- let eb = H(ea, b)
537- let ec = {
538- let ed = if (dF)
539- then $Tuple2(dK, dH)
540- else $Tuple2(dL, dI)
541- let dr = ed._1
542- let ee = ed._2
543- let ef = toInt(fraction(dW, toBigInt((dr / 2)), toBigInt(ee)))
544- fraction((dZ - ef), b, ef)
577+ else [IntegerEntry(W(), es), IntegerEntry(X(height, lastBlock.timestamp), es), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bp(el, em, ey, es, 0, 0, height, lastBlock.timestamp, 0, 0))]
578+ let ez = bG(D(ej, bl), D(ei, bk))
579+ let eA = H(ez, b)
580+ let eB = {
581+ let eC = if (eg)
582+ then $Tuple2(el, ei)
583+ else $Tuple2(em, ej)
584+ let dT = eC._1
585+ let eD = eC._2
586+ let eE = toInt(fraction(ev, toBigInt((dT / 2)), toBigInt(eD)))
587+ fraction((ey - eE), b, eE)
545588 }
546- $Tuple4(dZ, cT, dy, ec)
589+ $Tuple5(ey, de, dZ, eB, eg)
547590 }
548591 else throw("Strict value is not equal to itself.")
549592 }
550593
551594
552-func eg (eh,dP,dB,ab,ac) = {
553- let dC = (ac == unit)
554- let ei = [if ((dB == aX))
595+func eF (eG,eo,ec,ab,ac) = {
596+ let ed = (ac == unit)
597+ let bT = aV()
598+ let bU = parseIntValue(bT[t])
599+ let bV = parseIntValue(bT[u])
600+ let eH = [if ((ec == bh))
555601 then true
556- else aC("invalid lp asset")]
557- if ((ei == ei))
602+ else aL("invalid lp asset")]
603+ if ((eH == eH))
558604 then {
559- let ej = if ((eh == aY))
605+ let eI = if ((eG == bi))
560606 then true
561- else if ((eh == aZ))
607+ else if ((eG == bj))
562608 then false
563- else aC("invalid asset")
564- let ek = if (ej)
565- then toBigInt(bu(aQ(aY)))
566- else toBigInt(bu(aQ(aZ)))
567- let el = bu(aQ(aY))
568- let em = bu(aQ(aZ))
569- let en = if (ej)
570- then el
571- else em
572- let eo = toBigInt(en)
573- let dW = toBigInt(valueOrErrorMessage(assetInfo(aX), (("asset " + toBase58String(aX)) + " doesn't exist")).quantity)
574- let ep = toBigInt(dP)
575- let eq = max([0, toInt(((ek * (d - pow((d - ((ep * d) / dW)), 18, h, 0, 18, DOWN))) / d))])
576- let er = dw(eq, aI)
577- let es = er._1
578- let dy = er._2
579- let et = if (ej)
580- then $Tuple4(es, 0, (el - eq), em)
581- else $Tuple4(0, es, el, (em - eq))
582- let eu = et._1
583- let ev = et._2
584- let ew = et._3
585- let ex = et._4
586- let dS = bw(D(ex, bb), D(ew, ba))
587- let dT = H(dS, b)
588- let cT = if (dC)
609+ else aL("invalid asset")
610+ let eJ = if (eI)
611+ then toBigInt(bE(ba(bi)))
612+ else toBigInt(bE(ba(bj)))
613+ let eK = if (eI)
614+ then bU
615+ else bV
616+ let eL = bE(ba(bi))
617+ let eM = bE(ba(bj))
618+ let eN = if (eI)
619+ then eL
620+ else eM
621+ let eO = toBigInt(eN)
622+ let ev = toBigInt(valueOrErrorMessage(assetInfo(bh), (("asset " + toBase58String(bh)) + " doesn't exist")).quantity)
623+ let eP = toBigInt(eo)
624+ let eQ = max([0, toInt(((eJ * (d - pow((d - ((eP * d) / ev)), 18, h, 0, 18, DOWN))) / d))])
625+ let eR = dY(eQ, aS)
626+ let eS = eR._1
627+ let dZ = eR._2
628+ let eT = if (eI)
629+ then $Tuple4(eS, 0, (eL - eQ), eM)
630+ else $Tuple4(0, eS, eL, (eM - eQ))
631+ let eU = eT._1
632+ let eV = eT._2
633+ let eW = eT._3
634+ let eX = eT._4
635+ let er = bG(D(eX, bl), D(eW, bk))
636+ let es = H(er, b)
637+ let de = if (ed)
589638 then nil
590- else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bq(eu, ev, dP, dT, height, lastBlock.timestamp)), IntegerEntry(W(), dT), IntegerEntry(X(height, lastBlock.timestamp), dT)]
591- let ea = bw(D(em, bb), D(el, ba))
592- let eb = H(ea, b)
593- let ec = {
594- let ey = (toInt(fraction(ek, ep, dW)) * 2)
595- fraction((es - ey), b, ey)
639+ else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bA(eU, eV, eo, es, height, lastBlock.timestamp)), IntegerEntry(W(), es), IntegerEntry(X(height, lastBlock.timestamp), es)]
640+ let ez = bG(D(eM, bl), D(eL, bk))
641+ let eA = H(ez, b)
642+ let eB = {
643+ let eY = (toInt(fraction(eJ, eP, ev)) * 2)
644+ fraction((eS - eY), b, eY)
596645 }
597- $Tuple4(es, cT, dy, ec)
646+ $Tuple5(eS, de, dZ, eB, eI)
598647 }
599648 else throw("Strict value is not equal to itself.")
600649 }
601650
602651
603-func ez () = {
604- let du = getString(U())
605- if ($isInstanceOf(du, "String"))
652+func eZ () = {
653+ let dW = getString(U())
654+ if ($isInstanceOf(dW, "String"))
606655 then {
607- let eA = du
608- fromBase58String(eA)
656+ let fa = dW
657+ fromBase58String(fa)
609658 }
610- else if ($isInstanceOf(du, "Unit"))
659+ else if ($isInstanceOf(dW, "Unit"))
611660 then unit
612661 else throw("Match error")
613662 }
614663
615664
616-func eB () = {
617- let du = getString(V())
618- if ($isInstanceOf(du, "String"))
665+func fb () = {
666+ let dW = getString(V())
667+ if ($isInstanceOf(dW, "String"))
619668 then {
620- let eA = du
621- fromBase58String(eA)
669+ let fa = dW
670+ fromBase58String(fa)
622671 }
623- else if ($isInstanceOf(du, "Unit"))
672+ else if ($isInstanceOf(dW, "Unit"))
624673 then unit
625674 else throw("Match error")
626675 }
627676
628677
629-func eC (dj) = {
630- let du = ez()
631- if ($isInstanceOf(du, "ByteVector"))
678+func fc (dL) = {
679+ let dW = eZ()
680+ if ($isInstanceOf(dW, "ByteVector"))
632681 then {
633- let eD = du
634- (dj.callerPublicKey == eD)
682+ let fd = dW
683+ (dL.callerPublicKey == fd)
635684 }
636- else if ($isInstanceOf(du, "Unit"))
637- then (dj.caller == this)
685+ else if ($isInstanceOf(dW, "Unit"))
686+ then (dL.caller == this)
638687 else throw("Match error")
639688 }
640689
641690
642-func eE (dj) = {
643- let eF = throw("Permission denied")
644- let du = ez()
645- if ($isInstanceOf(du, "ByteVector"))
691+func fe (dL) = {
692+ let ff = throw("Permission denied")
693+ let dW = eZ()
694+ if ($isInstanceOf(dW, "ByteVector"))
646695 then {
647- let eD = du
648- if ((dj.callerPublicKey == eD))
696+ let fd = dW
697+ if ((dL.callerPublicKey == fd))
649698 then true
650- else eF
699+ else ff
651700 }
652- else if ($isInstanceOf(du, "Unit"))
653- then if ((dj.caller == this))
701+ else if ($isInstanceOf(dW, "Unit"))
702+ then if ((dL.caller == this))
654703 then true
655- else eF
704+ else ff
656705 else throw("Match error")
657706 }
658707
659708
660-@Callable(dj)
661-func calculateAmountOutForSwapREADONLY (eG,eH) = {
662- let eI = if ((eH == false))
709+@Callable(dL)
710+func calculateAmountOutForSwapREADONLY (fg,fh) = {
711+ let fi = if ((fh == false))
663712 then {
664- let eJ = ay(this, af())
665- let eK = ay(this, ae())
666- $Tuple2(eJ, eK)
713+ let fj = aH(this, af())
714+ let fk = aH(this, ae())
715+ $Tuple2(fj, fk)
667716 }
668717 else {
669- let eJ = ay(this, ae())
670- let eK = ay(this, af())
671- $Tuple2(eJ, eK)
718+ let fj = aH(this, ae())
719+ let fk = aH(this, af())
720+ $Tuple2(fj, fk)
672721 }
673- let eJ = eI._1
674- let eK = eI._2
675- let eL = bu(eK)
676- let eM = bu(eJ)
677- let eN = fraction(eM, eG, (eL + eG))
678- let eO = (toBigInt(eL) * toBigInt(eM))
679- let eP = ((toBigInt(bu(eK)) + toBigInt(eG)) * (toBigInt(bu(eJ)) - toBigInt(eN)))
680- let eQ = if ((eP >= eO))
722+ let fj = fi._1
723+ let fk = fi._2
724+ let fl = bE(fk)
725+ let fm = bE(fj)
726+ let fn = fraction(fm, fg, (fl + fg))
727+ let fo = (toBigInt(fl) * toBigInt(fm))
728+ let fp = ((toBigInt(bE(fk)) + toBigInt(fg)) * (toBigInt(bE(fj)) - toBigInt(fn)))
729+ let fq = if ((fp >= fo))
681730 then true
682731 else throw("new K is fewer error")
683- if ((eQ == eQ))
684- then $Tuple2(nil, eN)
732+ if ((fq == fq))
733+ then $Tuple2(nil, fn)
685734 else throw("Strict value is not equal to itself.")
686735 }
687736
688737
689738
690-@Callable(dj)
691-func calculateAmountOutForSwapAndSendTokens (eG,eH,eR,eS) = {
692- let ei = [if ((value(dj.payments[0]).amount >= eG))
739+@Callable(dL)
740+func calculateAmountOutForSwapAndSendTokens (fg,fh,fr,fs) = {
741+ let ft = {
742+ let aR = invoke(aO, "getSwapContractREADONLY", nil, nil)
743+ if ($isInstanceOf(aR, "String"))
744+ then aR
745+ else throw(($getType(aR) + " couldn't be cast to String"))
746+ }
747+ let eH = [if ((value(dL.payments[0]).amount >= fg))
693748 then true
694- else aC("Wrong amount"), if ((dj.caller == addressFromStringValue(ay(this, S()))))
749+ else aL("Wrong amount"), if ((dL.caller == addressFromStringValue(ft)))
695750 then true
696- else aC("Permission denied")]
697- if ((ei == ei))
751+ else aL("Permission denied")]
752+ if ((eH == eH))
698753 then {
699- let dk = value(dj.payments[0])
700- let eK = if ((dk.assetId == unit))
754+ let dM = value(dL.payments[0])
755+ let fk = if ((dM.assetId == unit))
701756 then toBase58String(toBytes("WAVES"))
702- else toBase58String(value(dk.assetId))
703- let eJ = if ((eH == false))
704- then ay(this, af())
705- else ay(this, ae())
706- let eL = (bu(eK) - value(dj.payments[0]).amount)
707- let eM = bu(eJ)
708- let eN = ((eM * eG) / (eL + eG))
709- let eO = (eL * eM)
710- let eP = (bu(eK) * (bu(eJ) - eN))
711- let eQ = if ((eP >= eO))
757+ else toBase58String(value(dM.assetId))
758+ let fj = if ((fh == false))
759+ then aH(this, af())
760+ else aH(this, ae())
761+ let fl = (bE(fk) - value(dL.payments[0]).amount)
762+ let fm = bE(fj)
763+ let fn = fraction(fm, fg, (fl + fg))
764+ let fo = (toBigInt(fl) * toBigInt(fm))
765+ let fp = (toBigInt(bE(fk)) * (toBigInt(bE(fj)) - toBigInt(fn)))
766+ let fq = if ((fp >= fo))
712767 then true
713768 else throw("new K is fewer error")
714- if ((eQ == eQ))
769+ if ((fq == fq))
715770 then {
716- let eT = if ((eN >= eR))
771+ let fu = if ((fn >= fr))
717772 then true
718773 else throw("Exchange result is fewer coins than expected")
719- if ((eT == eT))
720- then [ScriptTransfer(addressFromStringValue(eS), eN, if ((eK == "WAVES"))
721- then unit
722- else fromBase58String(eJ))]
774+ if ((fu == fu))
775+ then $Tuple2([ScriptTransfer(addressFromStringValue(fs), fn, aY(fj))], fn)
723776 else throw("Strict value is not equal to itself.")
724777 }
725778 else throw("Strict value is not equal to itself.")
729782
730783
731784
732-@Callable(dj)
733-func setManager (eU) = {
734- let eV = eE(dj)
735- if ((eV == eV))
785+@Callable(dL)
786+func setManager (fv) = {
787+ let fw = fe(dL)
788+ if ((fw == fw))
736789 then {
737- let eW = fromBase58String(eU)
738- if ((eW == eW))
739- then [StringEntry(V(), eU)]
790+ let fx = fromBase58String(fv)
791+ if ((fx == fx))
792+ then [StringEntry(V(), fv)]
740793 else throw("Strict value is not equal to itself.")
741794 }
742795 else throw("Strict value is not equal to itself.")
744797
745798
746799
747-@Callable(dj)
800+@Callable(dL)
748801 func confirmManager () = {
749- let eX = eB()
750- let eY = if (isDefined(eX))
802+ let fy = fb()
803+ let fz = if (isDefined(fy))
751804 then true
752805 else throw("No pending manager")
753- if ((eY == eY))
806+ if ((fz == fz))
754807 then {
755- let eZ = if ((dj.callerPublicKey == value(eX)))
808+ let fA = if ((dL.callerPublicKey == value(fy)))
756809 then true
757810 else throw("You are not pending manager")
758- if ((eZ == eZ))
759- then [StringEntry(U(), toBase58String(value(eX))), DeleteEntry(V())]
811+ if ((fA == fA))
812+ then [StringEntry(U(), toBase58String(value(fy))), DeleteEntry(V())]
760813 else throw("Strict value is not equal to itself.")
761814 }
762815 else throw("Strict value is not equal to itself.")
764817
765818
766819
767-@Callable(dj)
768-func put (co,fa) = if ((0 > co))
820+@Callable(dL)
821+func put (cz,fB) = if ((0 > cz))
769822 then throw("Invalid slippageTolerance passed")
770823 else {
771- let dp = dm(dj, co, true)
772- let cQ = dp._2
773- let bV = dp._7
774- let cm = dp._9
775- let cR = dp._10
776- let cS = dp._11
777- let fb = dp._12
778- let fc = dp._13
779- let ds = invoke(aE, "emit", [cQ], nil)
824+ let dR = dO(dL, cz, true)
825+ let db = dR._2
826+ let cg = dR._7
827+ let cx = dR._9
828+ let dc = dR._10
829+ let dd = dR._11
830+ let fC = dR._12
831+ let fD = dR._13
832+ let dP = toBigInt(value(dL.payments[0]).amount)
833+ let dQ = toBigInt(value(dL.payments[1]).amount)
834+ let ds = dl(dP, dQ, toBigInt(0))
780835 if ((ds == ds))
781836 then {
782- let dt = {
783- let du = ds
784- if ($isInstanceOf(du, "Address"))
785- then {
786- let dv = du
787- invoke(dv, "emit", [cQ], nil)
837+ let dU = invoke(aO, "emit", [db], nil)
838+ if ((dU == dU))
839+ then {
840+ let dV = {
841+ let dW = dU
842+ if ($isInstanceOf(dW, "Address"))
843+ then {
844+ let dX = dW
845+ invoke(dX, "emit", [db], nil)
846+ }
847+ else unit
788848 }
789- else unit
790- }
791- if ((dt == dt))
792- then {
793- let fd = if ((cR > 0))
794- then invoke(be, "put", nil, [AttachedPayment(fb, cR)])
795- else nil
796- if ((fd == fd))
849+ if ((dV == dV))
797850 then {
798- let fe = if ((cS > 0))
799- then invoke(be, "put", nil, [AttachedPayment(fc, cS)])
851+ let fE = if ((dc > 0))
852+ then invoke(bo, "put", nil, [AttachedPayment(fC, dc)])
800853 else nil
801- if ((fe == fe))
854+ if ((fE == fE))
802855 then {
803- let ff = if (fa)
856+ let fF = if ((dd > 0))
857+ then invoke(bo, "put", nil, [AttachedPayment(fD, dd)])
858+ else nil
859+ if ((fF == fF))
804860 then {
805- let fg = invoke(bd, "stake", nil, [AttachedPayment(bV, cQ)])
806- if ((fg == fg))
807- then nil
861+ let fG = if (fB)
862+ then {
863+ let fH = invoke(bn, "stake", nil, [AttachedPayment(cg, db)])
864+ if ((fH == fH))
865+ then nil
866+ else throw("Strict value is not equal to itself.")
867+ }
868+ else [ScriptTransfer(dL.caller, db, cg)]
869+ let fI = dt(0, 0, 0)
870+ if ((fI == fI))
871+ then {
872+ let dk = fI._2
873+ let fJ = fI._1
874+ let fK = dx(ds, dk)
875+ if ((fK == fK))
876+ then ((cx ++ fG) ++ fJ)
877+ else throw("Strict value is not equal to itself.")
878+ }
808879 else throw("Strict value is not equal to itself.")
809880 }
810- else [ScriptTransfer(dj.caller, cQ, bV)]
811- (cm ++ ff)
881+ else throw("Strict value is not equal to itself.")
812882 }
813883 else throw("Strict value is not equal to itself.")
814884 }
821891
822892
823893
824-@Callable(dj)
825-func putForFree (fh) = if ((0 > fh))
894+@Callable(dL)
895+func putForFree (fL) = if ((0 > fL))
826896 then throw("Invalid value passed")
827897 else {
828- let dp = dm(dj, fh, false)
829- dp._9
898+ let dR = dO(dL, fL, false)
899+ let cx = dR._9
900+ let dP = toBigInt(value(dL.payments[0]).amount)
901+ let dQ = toBigInt(value(dL.payments[1]).amount)
902+ let ds = dl(dP, dQ, toBigInt(0))
903+ if ((ds == ds))
904+ then {
905+ let fM = dt(0, 0, 0)
906+ let fJ = fM._1
907+ let dk = fM._2
908+ let fK = dx(ds, dk)
909+ if ((fK == fK))
910+ then (cx ++ fJ)
911+ else throw("Strict value is not equal to itself.")
912+ }
913+ else throw("Strict value is not equal to itself.")
830914 }
831915
832916
833917
834-@Callable(dj)
835-func putOneTkn (fi,fj) = {
836- let fk = {
837- let aH = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
838- if ($isInstanceOf(aH, "Boolean"))
839- then aH
840- else throw(($getType(aH) + " couldn't be cast to Boolean"))
918+@Callable(dL)
919+func putOneTkn (fN,fO) = {
920+ let fP = {
921+ let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
922+ if ($isInstanceOf(aR, "Boolean"))
923+ then aR
924+ else throw(($getType(aR) + " couldn't be cast to Boolean"))
841925 }
842- let fl = if (if (if (aJ())
926+ let fQ = if (if (if (aT())
843927 then true
844- else (aW == l))
928+ else (bg == l))
845929 then true
846- else (aW == n))
930+ else (bg == n))
847931 then true
848- else fk
849- let ei = [if (if (!(fl))
932+ else fP
933+ let eH = [if (if (!(fQ))
850934 then true
851- else eC(dj))
935+ else fc(dL))
852936 then true
853- else aC("put operation is blocked by admin"), if ((size(dj.payments) == 1))
937+ else aL("put operation is blocked by admin"), if ((size(dL.payments) == 1))
854938 then true
855- else aC("exactly 1 payment are expected")]
856- if ((ei == ei))
939+ else aL("exactly 1 payment are expected")]
940+ if ((eH == eH))
857941 then {
858- let fm = dj.payments[0]
859- let dB = fm.assetId
860- let dA = fm.amount
861- let ab = dj.caller
862- let ac = dj.transactionId
863- let fn = dz(dA, dB, ab, ac)
864- if ((fn == fn))
942+ let fR = dL.payments[0]
943+ let ec = fR.assetId
944+ let eb = fR.amount
945+ let ds = if ((ec == bi))
946+ then dl(toBigInt(eb), toBigInt(0), toBigInt(0))
947+ else if ((ec == bj))
948+ then dl(toBigInt(0), toBigInt(eb), toBigInt(0))
949+ else aL("payment asset is not supported")
950+ if ((ds == ds))
865951 then {
866- let fo = fn._4
867- let dy = fn._3
868- let cT = fn._2
869- let fp = fn._1
870- let fq = if (if ((fi > 0))
871- then (fi > fp)
872- else false)
873- then aC(makeString(["amount to receive is less than ", toString(fi)], ""))
874- else fp
875- let ds = dq(fq)
876- if ((ds == ds))
952+ let ab = dL.caller
953+ let ac = dL.transactionId
954+ let fS = ea(eb, ec, ab, ac)
955+ if ((fS == fS))
877956 then {
878- let ff = if (fj)
957+ let eg = fS._5
958+ let fT = fS._4
959+ let dZ = fS._3
960+ let de = fS._2
961+ let fU = fS._1
962+ let fV = if (if ((fN > 0))
963+ then (fN > fU)
964+ else false)
965+ then aL(makeString(["amount to receive is less than ", toString(fN)], ""))
966+ else fU
967+ let dU = dS(fV)
968+ if ((dU == dU))
879969 then {
880- let fr = invoke(bd, "stake", nil, [AttachedPayment(aX, fq)])
881- if ((fr == fr))
882- then nil
970+ let fG = if (fO)
971+ then {
972+ let fW = invoke(bn, "stake", nil, [AttachedPayment(bh, fV)])
973+ if ((fW == fW))
974+ then nil
975+ else throw("Strict value is not equal to itself.")
976+ }
977+ else [ScriptTransfer(dL.caller, fV, bh)]
978+ let fX = if ((dZ > 0))
979+ then [ScriptTransfer(aP, dZ, ec)]
980+ else nil
981+ let fY = if ((this == aP))
982+ then $Tuple2(0, 0)
983+ else if (eg)
984+ then $Tuple2(-(dZ), 0)
985+ else $Tuple2(0, -(dZ))
986+ let du = fY._1
987+ let dv = fY._2
988+ let fZ = dt(du, dv, 0)
989+ let fJ = fZ._1
990+ let dk = fZ._2
991+ let dE = value(getString(aj))
992+ let fK = dx(ds, dk)
993+ if ((fK == fK))
994+ then $Tuple2((((de ++ fG) ++ fX) ++ fJ), fV)
883995 else throw("Strict value is not equal to itself.")
884- }
885- else [ScriptTransfer(dj.caller, fq, aX)]
886- let fs = if ((dy > 0))
887- then [ScriptTransfer(aF, dy, dB)]
888- else nil
889- $Tuple2(((cT ++ ff) ++ fs), fq)
890- }
891- else throw("Strict value is not equal to itself.")
892- }
893- else throw("Strict value is not equal to itself.")
894- }
895- else throw("Strict value is not equal to itself.")
896- }
897-
898-
899-
900-@Callable(dj)
901-func putOneTknREADONLY (dB,dA) = {
902- let ft = dz(dA, aO(dB), unit, unit)
903- let fp = ft._1
904- let cT = ft._2
905- let dy = ft._3
906- let fo = ft._4
907- $Tuple2(nil, $Tuple3(fp, dy, fo))
908- }
909-
910-
911-
912-@Callable(dj)
913-func getOneTkn (fu,fi) = {
914- let fk = {
915- let aH = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
916- if ($isInstanceOf(aH, "Boolean"))
917- then aH
918- else throw(($getType(aH) + " couldn't be cast to Boolean"))
919- }
920- let fv = if (if (aJ())
921- then true
922- else (aW == n))
923- then true
924- else fk
925- let ei = [if (if (!(fv))
926- then true
927- else eC(dj))
928- then true
929- else aC("get operation is blocked by admin"), if ((size(dj.payments) == 1))
930- then true
931- else aC("exactly 1 payment are expected")]
932- if ((ei == ei))
933- then {
934- let eh = aO(fu)
935- let fm = dj.payments[0]
936- let dB = fm.assetId
937- let dP = fm.amount
938- let ab = dj.caller
939- let ac = dj.transactionId
940- let fw = eg(eh, dP, dB, ab, ac)
941- if ((fw == fw))
942- then {
943- let fo = fw._4
944- let dy = fw._3
945- let cT = fw._2
946- let fx = fw._1
947- let dr = if (if ((fi > 0))
948- then (fi > fx)
949- else false)
950- then aC(makeString(["amount to receive is less than ", toString(fi)], ""))
951- else fx
952- let fy = invoke(aE, "burn", [dP], [AttachedPayment(dB, dP)])
953- if ((fy == fy))
954- then {
955- let fz = [ScriptTransfer(ab, dr, eh)]
956- let fs = if ((dy > 0))
957- then [ScriptTransfer(aF, dy, eh)]
958- else nil
959- $Tuple2(((cT ++ fz) ++ fs), dr)
960- }
961- else throw("Strict value is not equal to itself.")
962- }
963- else throw("Strict value is not equal to itself.")
964- }
965- else throw("Strict value is not equal to itself.")
966- }
967-
968-
969-
970-@Callable(dj)
971-func getOneTknREADONLY (eh,dP) = {
972- let fA = eg(aO(eh), dP, aX, unit, unit)
973- let fx = fA._1
974- let cT = fA._2
975- let dy = fA._3
976- let fo = fA._4
977- $Tuple2(nil, $Tuple3(fx, dy, fo))
978- }
979-
980-
981-
982-@Callable(dj)
983-func unstakeAndGetOneTkn (fB,fu,fi) = {
984- let fk = {
985- let aH = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
986- if ($isInstanceOf(aH, "Boolean"))
987- then aH
988- else throw(($getType(aH) + " couldn't be cast to Boolean"))
989- }
990- let fv = if (if (aJ())
991- then true
992- else (aW == n))
993- then true
994- else fk
995- let ei = [if (if (!(fv))
996- then true
997- else eC(dj))
998- then true
999- else aC("get operation is blocked by admin"), if ((size(dj.payments) == 0))
1000- then true
1001- else aC("no payments are expected")]
1002- if ((ei == ei))
1003- then {
1004- let eh = aO(fu)
1005- let ab = dj.caller
1006- let ac = dj.transactionId
1007- let fC = invoke(bd, "unstake", [toBase58String(aX), fB], nil)
1008- if ((fC == fC))
1009- then {
1010- let fD = eg(eh, fB, aX, ab, ac)
1011- if ((fD == fD))
1012- then {
1013- let fo = fD._4
1014- let dy = fD._3
1015- let cT = fD._2
1016- let fx = fD._1
1017- let dr = if (if ((fi > 0))
1018- then (fi > fx)
1019- else false)
1020- then aC(makeString(["amount to receive is less than ", toString(fi)], ""))
1021- else fx
1022- let fy = invoke(aE, "burn", [fB], [AttachedPayment(aX, fB)])
1023- if ((fy == fy))
1024- then {
1025- let fz = [ScriptTransfer(dj.caller, dr, eh)]
1026- let fs = if ((dy > 0))
1027- then [ScriptTransfer(aF, dy, eh)]
1028- else nil
1029- $Tuple2(((cT ++ fz) ++ fs), dr)
1030996 }
1031997 else throw("Strict value is not equal to itself.")
1032998 }
10391005
10401006
10411007
1042-@Callable(dj)
1043-func get () = {
1044- let cE = di(dj)
1045- let fE = cE._1
1046- let cl = cE._2
1047- let dl = cE._3
1048- let bT = cE._4
1049- let cm = cE._5
1050- let fF = invoke(aE, "burn", [dl], [AttachedPayment(bT, dl)])
1051- if ((fF == fF))
1052- then cm
1053- else throw("Strict value is not equal to itself.")
1008+@Callable(dL)
1009+func putOneTknREADONLY (ec,eb) = {
1010+ let ga = ea(eb, aY(ec), unit, unit)
1011+ let fU = ga._1
1012+ let de = ga._2
1013+ let dZ = ga._3
1014+ let fT = ga._4
1015+ let eg = ga._5
1016+ $Tuple2(nil, $Tuple3(fU, dZ, fT))
10541017 }
10551018
10561019
10571020
1058-@Callable(dj)
1059-func getNoLess (fG,fH) = {
1060- let cE = di(dj)
1061- let ck = cE._1
1062- let cl = cE._2
1063- let dl = cE._3
1064- let bT = cE._4
1065- let cm = cE._5
1066- if ((fG > ck))
1067- then throw(((("noLessThenAmtAsset failed: " + toString(ck)) + " < ") + toString(fG)))
1068- else if ((fH > cl))
1069- then throw(((("noLessThenPriceAsset failed: " + toString(cl)) + " < ") + toString(fH)))
1070- else {
1071- let fF = invoke(aE, "burn", [dl], [AttachedPayment(bT, dl)])
1072- if ((fF == fF))
1073- then cm
1074- else throw("Strict value is not equal to itself.")
1075- }
1076- }
1077-
1078-
1079-
1080-@Callable(dj)
1081-func unstakeAndGet (dr) = {
1082- let fI = if ((size(dj.payments) != 0))
1083- then throw("No payments are expected")
1084- else true
1085- if ((fI == fI))
1021+@Callable(dL)
1022+func getOneTkn (gb,fN) = {
1023+ let fP = {
1024+ let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1025+ if ($isInstanceOf(aR, "Boolean"))
1026+ then aR
1027+ else throw(($getType(aR) + " couldn't be cast to Boolean"))
1028+ }
1029+ let gc = if (if (aT())
1030+ then true
1031+ else (bg == n))
1032+ then true
1033+ else fP
1034+ let eH = [if (if (!(gc))
1035+ then true
1036+ else fc(dL))
1037+ then true
1038+ else aL("get operation is blocked by admin"), if ((size(dL.payments) == 1))
1039+ then true
1040+ else aL("exactly 1 payment are expected")]
1041+ if ((eH == eH))
10861042 then {
1087- let bI = aL()
1088- let bV = fromBase58String(bI[q])
1089- let fC = invoke(bd, "unstake", [toBase58String(bV), dr], nil)
1090- if ((fC == fC))
1043+ let eG = aY(gb)
1044+ let fR = dL.payments[0]
1045+ let ec = fR.assetId
1046+ let eo = fR.amount
1047+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1048+ if ((ds == ds))
10911049 then {
1092- let cE = bR(toBase58String(dj.transactionId), toBase58String(bV), dr, dj.caller)
1093- let bY = parseIntValue(cE._9)
1094- let cm = cE._10
1095- let fJ = if (if (aJ())
1096- then true
1097- else (bY == n))
1098- then throw(("Get operation is blocked by admin. Status = " + toString(bY)))
1099- else true
1100- if ((fJ == fJ))
1050+ let ab = dL.caller
1051+ let ac = dL.transactionId
1052+ let gd = eF(eG, eo, ec, ab, ac)
1053+ if ((gd == gd))
11011054 then {
1102- let fF = invoke(aE, "burn", [dr], [AttachedPayment(bV, dr)])
1103- if ((fF == fF))
1104- then cm
1055+ let eI = gd._5
1056+ let fT = gd._4
1057+ let dZ = gd._3
1058+ let de = gd._2
1059+ let ge = gd._1
1060+ let dT = if (if ((fN > 0))
1061+ then (fN > ge)
1062+ else false)
1063+ then aL(makeString(["amount to receive is less than ", toString(fN)], ""))
1064+ else ge
1065+ let gf = invoke(aO, "burn", [eo], [AttachedPayment(ec, eo)])
1066+ if ((gf == gf))
1067+ then {
1068+ let gg = [ScriptTransfer(ab, dT, eG)]
1069+ let fX = if ((dZ > 0))
1070+ then [ScriptTransfer(aP, dZ, eG)]
1071+ else nil
1072+ let gh = {
1073+ let gi = if ((this == aP))
1074+ then 0
1075+ else dZ
1076+ if (eI)
1077+ then $Tuple2(-((dT + gi)), 0)
1078+ else $Tuple2(0, -((dT + gi)))
1079+ }
1080+ let du = gh._1
1081+ let dv = gh._2
1082+ let gj = dt(du, dv, 0)
1083+ let fJ = gj._1
1084+ let dk = gj._2
1085+ let fK = dx(ds, dk)
1086+ if ((fK == fK))
1087+ then $Tuple2((((de ++ gg) ++ fX) ++ fJ), dT)
1088+ else throw("Strict value is not equal to itself.")
1089+ }
11051090 else throw("Strict value is not equal to itself.")
11061091 }
11071092 else throw("Strict value is not equal to itself.")
11131098
11141099
11151100
1116-@Callable(dj)
1117-func unstakeAndGetNoLess (fB,fK,fH) = {
1118- let fv = if (aJ())
1101+@Callable(dL)
1102+func getOneTknREADONLY (eG,eo) = {
1103+ let gk = eF(aY(eG), eo, bh, unit, unit)
1104+ let ge = gk._1
1105+ let de = gk._2
1106+ let dZ = gk._3
1107+ let fT = gk._4
1108+ let eI = gk._5
1109+ $Tuple2(nil, $Tuple3(ge, dZ, fT))
1110+ }
1111+
1112+
1113+
1114+@Callable(dL)
1115+func unstakeAndGetOneTkn (gl,gb,fN) = {
1116+ let fP = {
1117+ let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1118+ if ($isInstanceOf(aR, "Boolean"))
1119+ then aR
1120+ else throw(($getType(aR) + " couldn't be cast to Boolean"))
1121+ }
1122+ let gc = if (if (aT())
11191123 then true
1120- else (aW == n)
1121- let ei = [if (!(fv))
1124+ else (bg == n))
11221125 then true
1123- else throw("get operation is blocked by admin"), if ((size(dj.payments) == 0))
1126+ else fP
1127+ let eH = [if (if (!(gc))
11241128 then true
1125- else throw("no payments are expected")]
1126- if ((ei == ei))
1129+ else fc(dL))
1130+ then true
1131+ else aL("get operation is blocked by admin"), if ((size(dL.payments) == 0))
1132+ then true
1133+ else aL("no payments are expected")]
1134+ if ((eH == eH))
11271135 then {
1128- let fC = invoke(bd, "unstake", [toBase58String(aX), fB], nil)
1129- if ((fC == fC))
1136+ let eG = aY(gb)
1137+ let ab = dL.caller
1138+ let ac = dL.transactionId
1139+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1140+ if ((ds == ds))
11301141 then {
1131- let cE = bR(toBase58String(dj.transactionId), toBase58String(aX), fB, dj.caller)
1132- let ck = cE._1
1133- let cl = cE._2
1134- let cm = cE._10
1135- let fL = [if ((ck >= fK))
1136- then true
1137- else throw(makeString(["amount asset amount to receive is less than ", toString(fK)], "")), if ((cl >= fH))
1138- then true
1139- else throw(makeString(["price asset amount to receive is less than ", toString(fH)], ""))]
1140- if ((fL == fL))
1142+ let gm = invoke(bn, "unstake", [toBase58String(bh), gl], nil)
1143+ if ((gm == gm))
11411144 then {
1142- let fF = invoke(aE, "burn", [fB], [AttachedPayment(aX, fB)])
1143- if ((fF == fF))
1144- then cm
1145+ let gn = eF(eG, gl, bh, ab, ac)
1146+ if ((gn == gn))
1147+ then {
1148+ let eI = gn._5
1149+ let fT = gn._4
1150+ let dZ = gn._3
1151+ let de = gn._2
1152+ let ge = gn._1
1153+ let dT = if (if ((fN > 0))
1154+ then (fN > ge)
1155+ else false)
1156+ then aL(makeString(["amount to receive is less than ", toString(fN)], ""))
1157+ else ge
1158+ let gf = invoke(aO, "burn", [gl], [AttachedPayment(bh, gl)])
1159+ if ((gf == gf))
1160+ then {
1161+ let gg = [ScriptTransfer(dL.caller, dT, eG)]
1162+ let fX = if ((dZ > 0))
1163+ then [ScriptTransfer(aP, dZ, eG)]
1164+ else nil
1165+ let go = {
1166+ let gi = if ((this == aP))
1167+ then 0
1168+ else dZ
1169+ if (eI)
1170+ then $Tuple2(-((dT + gi)), 0)
1171+ else $Tuple2(0, -((dT + gi)))
1172+ }
1173+ let du = go._1
1174+ let dv = go._2
1175+ let gp = dt(du, dv, 0)
1176+ let fJ = gp._1
1177+ let dk = gp._2
1178+ let fK = dx(ds, dk)
1179+ if ((fK == fK))
1180+ then $Tuple2((((de ++ gg) ++ fX) ++ fJ), dT)
1181+ else throw("Strict value is not equal to itself.")
1182+ }
1183+ else throw("Strict value is not equal to itself.")
1184+ }
11451185 else throw("Strict value is not equal to itself.")
11461186 }
11471187 else throw("Strict value is not equal to itself.")
11531193
11541194
11551195
1156-@Callable(dj)
1157-func activate (fM,fN) = if ((toString(dj.caller) != toString(aE)))
1158- then throw("permissions denied")
1159- else $Tuple2([StringEntry(ae(), fM), StringEntry(af(), fN)], "success")
1160-
1161-
1162-
1163-@Callable(dj)
1164-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aL())
1165-
1166-
1167-
1168-@Callable(dj)
1169-func getAccBalanceWrapperREADONLY (bv) = $Tuple2(nil, bu(bv))
1170-
1171-
1172-
1173-@Callable(dj)
1174-func calcPricesWrapperREADONLY (bC,bD,bH) = {
1175- let bQ = bG(bC, bD, bH)
1176- $Tuple2(nil, [toString(bQ[0]), toString(bQ[1]), toString(bQ[2])])
1196+@Callable(dL)
1197+func get () = {
1198+ let cP = dK(dL)
1199+ let gq = cP._1
1200+ let cw = cP._2
1201+ let dN = cP._3
1202+ let ce = cP._4
1203+ let cx = cP._5
1204+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1205+ if ((ds == ds))
1206+ then {
1207+ let gr = invoke(aO, "burn", [dN], [AttachedPayment(ce, dN)])
1208+ if ((gr == gr))
1209+ then {
1210+ let gs = dt(-(gq), -(cw), 0)
1211+ let fJ = gs._1
1212+ let dk = gs._2
1213+ let fK = dx(ds, dk)
1214+ if ((fK == fK))
1215+ then (cx ++ fJ)
1216+ else throw("Strict value is not equal to itself.")
1217+ }
1218+ else throw("Strict value is not equal to itself.")
1219+ }
1220+ else throw("Strict value is not equal to itself.")
11771221 }
11781222
11791223
11801224
1181-@Callable(dj)
1225+@Callable(dL)
1226+func getNoLess (gt,gu) = {
1227+ let cP = dK(dL)
1228+ let cv = cP._1
1229+ let cw = cP._2
1230+ let dN = cP._3
1231+ let ce = cP._4
1232+ let cx = cP._5
1233+ if ((gt > cv))
1234+ then throw(((("noLessThenAmtAsset failed: " + toString(cv)) + " < ") + toString(gt)))
1235+ else if ((gu > cw))
1236+ then throw(((("noLessThenPriceAsset failed: " + toString(cw)) + " < ") + toString(gu)))
1237+ else {
1238+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1239+ if ((ds == ds))
1240+ then {
1241+ let gr = invoke(aO, "burn", [dN], [AttachedPayment(ce, dN)])
1242+ if ((gr == gr))
1243+ then {
1244+ let gv = dt(-(cv), -(cw), 0)
1245+ let fJ = gv._1
1246+ let dk = gv._2
1247+ let fK = dx(ds, dk)
1248+ if ((fK == fK))
1249+ then (cx ++ fJ)
1250+ else throw("Strict value is not equal to itself.")
1251+ }
1252+ else throw("Strict value is not equal to itself.")
1253+ }
1254+ else throw("Strict value is not equal to itself.")
1255+ }
1256+ }
1257+
1258+
1259+
1260+@Callable(dL)
1261+func unstakeAndGet (dT) = {
1262+ let gw = if ((size(dL.payments) != 0))
1263+ then throw("No payments are expected")
1264+ else true
1265+ if ((gw == gw))
1266+ then {
1267+ let bT = aV()
1268+ let cg = fromBase58String(bT[q])
1269+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1270+ if ((ds == ds))
1271+ then {
1272+ let gm = invoke(bn, "unstake", [toBase58String(cg), dT], nil)
1273+ if ((gm == gm))
1274+ then {
1275+ let cP = cc(toBase58String(dL.transactionId), toBase58String(cg), dT, dL.caller)
1276+ let cv = cP._1
1277+ let cw = cP._2
1278+ let cj = parseIntValue(cP._9)
1279+ let cx = cP._10
1280+ let gx = if (if (aT())
1281+ then true
1282+ else (cj == n))
1283+ then throw(("Get operation is blocked by admin. Status = " + toString(cj)))
1284+ else true
1285+ if ((gx == gx))
1286+ then {
1287+ let gr = invoke(aO, "burn", [dT], [AttachedPayment(cg, dT)])
1288+ if ((gr == gr))
1289+ then {
1290+ let gy = dt(-(cv), -(cw), 0)
1291+ let fJ = gy._1
1292+ let dk = gy._2
1293+ let fK = dx(ds, dk)
1294+ if ((fK == fK))
1295+ then (cx ++ fJ)
1296+ else throw("Strict value is not equal to itself.")
1297+ }
1298+ else throw("Strict value is not equal to itself.")
1299+ }
1300+ else throw("Strict value is not equal to itself.")
1301+ }
1302+ else throw("Strict value is not equal to itself.")
1303+ }
1304+ else throw("Strict value is not equal to itself.")
1305+ }
1306+ else throw("Strict value is not equal to itself.")
1307+ }
1308+
1309+
1310+
1311+@Callable(dL)
1312+func unstakeAndGetNoLess (gl,gz,gu) = {
1313+ let gc = if (aT())
1314+ then true
1315+ else (bg == n)
1316+ let eH = [if (!(gc))
1317+ then true
1318+ else throw("get operation is blocked by admin"), if ((size(dL.payments) == 0))
1319+ then true
1320+ else throw("no payments are expected")]
1321+ if ((eH == eH))
1322+ then {
1323+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1324+ if ((ds == ds))
1325+ then {
1326+ let gm = invoke(bn, "unstake", [toBase58String(bh), gl], nil)
1327+ if ((gm == gm))
1328+ then {
1329+ let cP = cc(toBase58String(dL.transactionId), toBase58String(bh), gl, dL.caller)
1330+ let cv = cP._1
1331+ let cw = cP._2
1332+ let cx = cP._10
1333+ let gA = [if ((cv >= gz))
1334+ then true
1335+ else throw(makeString(["amount asset amount to receive is less than ", toString(gz)], "")), if ((cw >= gu))
1336+ then true
1337+ else throw(makeString(["price asset amount to receive is less than ", toString(gu)], ""))]
1338+ if ((gA == gA))
1339+ then {
1340+ let gr = invoke(aO, "burn", [gl], [AttachedPayment(bh, gl)])
1341+ if ((gr == gr))
1342+ then {
1343+ let gB = dt(-(cv), -(cw), 0)
1344+ let fJ = gB._1
1345+ let dk = gB._2
1346+ let fK = dx(ds, dk)
1347+ if ((fK == fK))
1348+ then (cx ++ fJ)
1349+ else throw("Strict value is not equal to itself.")
1350+ }
1351+ else throw("Strict value is not equal to itself.")
1352+ }
1353+ else throw("Strict value is not equal to itself.")
1354+ }
1355+ else throw("Strict value is not equal to itself.")
1356+ }
1357+ else throw("Strict value is not equal to itself.")
1358+ }
1359+ else throw("Strict value is not equal to itself.")
1360+ }
1361+
1362+
1363+
1364+@Callable(dL)
1365+func activate (gC,gD) = if ((toString(dL.caller) != toString(aO)))
1366+ then throw("permissions denied")
1367+ else $Tuple2([StringEntry(ae(), gC), StringEntry(af(), gD)], "success")
1368+
1369+
1370+
1371+@Callable(dL)
1372+func refreshKLp () = {
1373+ let gE = valueOrElse(getInteger(ak), 0)
1374+ let gF = if (((height - gE) >= an))
1375+ then unit
1376+ else aL(makeString([toString(an), " blocks have not passed since the previous call"], ""))
1377+ if ((gF == gF))
1378+ then {
1379+ let dE = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aN("invalid kLp"))
1380+ let gG = dt(0, 0, 0)
1381+ let gH = gG._1
1382+ let dk = gG._2
1383+ let dw = if ((dE != dk))
1384+ then gH
1385+ else aL("nothing to refresh")
1386+ $Tuple2(dw, toString(dk))
1387+ }
1388+ else throw("Strict value is not equal to itself.")
1389+ }
1390+
1391+
1392+
1393+@Callable(dL)
1394+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aV())
1395+
1396+
1397+
1398+@Callable(dL)
1399+func getAccBalanceWrapperREADONLY (bF) = $Tuple2(nil, bE(bF))
1400+
1401+
1402+
1403+@Callable(dL)
1404+func calcPricesWrapperREADONLY (bN,bO,bS) = {
1405+ let cb = bR(bN, bO, bS)
1406+ $Tuple2(nil, [toString(cb[0]), toString(cb[1]), toString(cb[2])])
1407+ }
1408+
1409+
1410+
1411+@Callable(dL)
11821412 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
11831413
11841414
11851415
1186-@Callable(dj)
1416+@Callable(dL)
11871417 func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J))
11881418
11891419
11901420
1191-@Callable(dj)
1192-func calcPriceBigIntWrapperREADONLY (bx,by) = $Tuple2(nil, toString(bw(parseBigIntValue(bx), parseBigIntValue(by))))
1421+@Callable(dL)
1422+func calcPriceBigIntWrapperREADONLY (bH,bI) = $Tuple2(nil, toString(bG(parseBigIntValue(bH), parseBigIntValue(bI))))
11931423
11941424
11951425
1196-@Callable(dj)
1197-func estimatePutOperationWrapperREADONLY (bS,co,cp,cq,cr,cs,ab,ct,cu) = $Tuple2(nil, cn(bS, co, cp, cq, cr, cs, ab, ct, cu))
1426+@Callable(dL)
1427+func estimatePutOperationWrapperREADONLY (cd,cz,cA,cB,cC,cD,ab,cE,cF) = $Tuple2(nil, cy(cd, cz, cA, cB, cC, cD, ab, cE, cF))
11981428
11991429
12001430
1201-@Callable(dj)
1202-func estimateGetOperationWrapperREADONLY (bS,bT,bU,ab) = {
1203- let cE = bR(bS, bT, bU, addressFromStringValue(ab))
1204- $Tuple2(nil, $Tuple10(cE._1, cE._2, cE._3, cE._4, cE._5, cE._6, cE._7, toString(cE._8), cE._9, cE._10))
1431+@Callable(dL)
1432+func estimateGetOperationWrapperREADONLY (cd,ce,cf,ab) = {
1433+ let cP = cc(cd, ce, cf, addressFromStringValue(ab))
1434+ $Tuple2(nil, $Tuple10(cP._1, cP._2, cP._3, cP._4, cP._5, cP._6, cP._7, toString(cP._8), cP._9, cP._10))
12051435 }
12061436
12071437
12081438
1209-@Callable(dj)
1439+@Callable(dL)
12101440 func statsREADONLY () = {
1211- let bI = aL()
1212- let bV = fromBase58String(bI[q])
1213- let cW = bI[r]
1214- let cX = bI[s]
1215- let cx = bI[v]
1216- let cy = bI[w]
1217- let bJ = parseIntValue(bI[t])
1218- let bK = parseIntValue(bI[u])
1219- let fO = valueOrErrorMessage(assetInfo(bV), (("Asset " + toBase58String(bV)) + " doesn't exist")).quantity
1220- let cY = bu(cW)
1221- let cZ = bu(cX)
1222- let fP = if ((fO == 0))
1441+ let bT = aV()
1442+ let cg = fromBase58String(bT[q])
1443+ let gI = bT[r]
1444+ let gJ = bT[s]
1445+ let cI = bT[v]
1446+ let cJ = bT[w]
1447+ let bU = parseIntValue(bT[t])
1448+ let bV = parseIntValue(bT[u])
1449+ let gK = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1450+ let gL = bE(gI)
1451+ let gM = bE(gJ)
1452+ let gN = if ((gK == 0))
12231453 then [e, e, e]
1224- else bG(cY, cZ, fO)
1225- let cf = 0
1226- let fQ = H(fP[1], b)
1227- let fR = H(fP[2], b)
1228- let fS = value(getInteger(aE, aq(toString(this))))
1229- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cY), toString(cZ), toString(fO), toString(cf), toString(fQ), toString(fR), toString(fS)], j))
1454+ else bR(gL, gM, gK)
1455+ let cq = 0
1456+ let gO = H(gN[1], b)
1457+ let gP = H(gN[2], b)
1458+ let gQ = value(getInteger(aO, ay(toString(this))))
1459+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gL), toString(gM), toString(gK), toString(cq), toString(gO), toString(gP), toString(gQ)], j))
12301460 }
12311461
12321462
12331463
1234-@Callable(dj)
1235-func evaluatePutByAmountAssetREADONLY (cp) = {
1236- let bI = aL()
1237- let bV = fromBase58String(bI[q])
1238- let cv = bI[r]
1239- let bW = fromBase58String(cv)
1240- let cw = bI[s]
1241- let bX = fromBase58String(cw)
1242- let bJ = parseIntValue(bI[t])
1243- let bK = parseIntValue(bI[u])
1244- let bY = bI[p]
1245- let fO = valueOrErrorMessage(assetInfo(bV), (("Asset " + toBase58String(bV)) + " doesn't exist")).quantity
1246- let cY = bu(cv)
1247- let cZ = bu(cw)
1248- let bE = D(cY, bJ)
1249- let bF = D(cZ, bK)
1250- let ce = if ((fO == 0))
1464+@Callable(dL)
1465+func evaluatePutByAmountAssetREADONLY (cA) = {
1466+ let bT = aV()
1467+ let cg = fromBase58String(bT[q])
1468+ let cG = bT[r]
1469+ let ch = fromBase58String(cG)
1470+ let cH = bT[s]
1471+ let ci = fromBase58String(cH)
1472+ let bU = parseIntValue(bT[t])
1473+ let bV = parseIntValue(bT[u])
1474+ let cj = bT[p]
1475+ let gK = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1476+ let gL = bE(cG)
1477+ let gM = bE(cH)
1478+ let bP = D(gL, bU)
1479+ let bQ = D(gM, bV)
1480+ let cp = if ((gK == 0))
12511481 then e
1252- else bw(bF, bE)
1253- let cB = D(cp, bJ)
1254- let cC = fraction(cB, ce, d)
1255- let cr = H(cC, bK)
1256- let dp = cn("", 500000, cp, bW, cr, bX, "", true, false)
1257- let cM = dp._1
1258- let fT = dp._3
1259- let ca = dp._4
1260- let cc = dp._5
1261- let bZ = dp._6
1262- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cM), toString(H(ce, b)), toString(ca), toString(cc), toString(bZ), bY, toString(cp), toString(cr)], j))
1482+ else bG(bQ, bP)
1483+ let cM = D(cA, bU)
1484+ let cN = fraction(cM, cp, d)
1485+ let cC = H(cN, bV)
1486+ let dR = cy("", 500000, cA, ch, cC, ci, "", true, false)
1487+ let cX = dR._1
1488+ let gR = dR._3
1489+ let cl = dR._4
1490+ let cn = dR._5
1491+ let ck = dR._6
1492+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cX), toString(H(cp, b)), toString(cl), toString(cn), toString(ck), cj, toString(cA), toString(cC)], j))
12631493 }
12641494
12651495
12661496
1267-@Callable(dj)
1268-func evaluatePutByPriceAssetREADONLY (cr) = {
1269- let bI = aL()
1270- let bV = fromBase58String(bI[q])
1271- let cv = bI[r]
1272- let bW = fromBase58String(cv)
1273- let cw = bI[s]
1274- let bX = fromBase58String(cw)
1275- let bJ = parseIntValue(bI[t])
1276- let bK = parseIntValue(bI[u])
1277- let bY = bI[p]
1278- let fO = valueOrErrorMessage(assetInfo(bV), (("Asset " + toBase58String(bV)) + " doesn't exist")).quantity
1279- let fU = bu(cv)
1280- let fV = bu(cw)
1281- let fW = D(fU, bJ)
1282- let fX = D(fV, bK)
1283- let ce = if ((fO == 0))
1497+@Callable(dL)
1498+func evaluatePutByPriceAssetREADONLY (cC) = {
1499+ let bT = aV()
1500+ let cg = fromBase58String(bT[q])
1501+ let cG = bT[r]
1502+ let ch = fromBase58String(cG)
1503+ let cH = bT[s]
1504+ let ci = fromBase58String(cH)
1505+ let bU = parseIntValue(bT[t])
1506+ let bV = parseIntValue(bT[u])
1507+ let cj = bT[p]
1508+ let gK = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1509+ let gS = bE(cG)
1510+ let gT = bE(cH)
1511+ let gU = D(gS, bU)
1512+ let gV = D(gT, bV)
1513+ let cp = if ((gK == 0))
12841514 then e
1285- else bw(fX, fW)
1286- let cC = D(cr, bK)
1287- let cB = fraction(cC, d, ce)
1288- let cp = H(cB, bJ)
1289- let dp = cn("", 500000, cp, bW, cr, bX, "", true, false)
1290- let cM = dp._1
1291- let fT = dp._3
1292- let ca = dp._4
1293- let cc = dp._5
1294- let bZ = dp._6
1295- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cM), toString(H(ce, b)), toString(ca), toString(cc), toString(bZ), bY, toString(cp), toString(cr)], j))
1515+ else bG(gV, gU)
1516+ let cN = D(cC, bV)
1517+ let cM = fraction(cN, d, cp)
1518+ let cA = H(cM, bU)
1519+ let dR = cy("", 500000, cA, ch, cC, ci, "", true, false)
1520+ let cX = dR._1
1521+ let gR = dR._3
1522+ let cl = dR._4
1523+ let cn = dR._5
1524+ let ck = dR._6
1525+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cX), toString(H(cp, b)), toString(cl), toString(cn), toString(ck), cj, toString(cA), toString(cC)], j))
12961526 }
12971527
12981528
12991529
1300-@Callable(dj)
1301-func evaluateGetREADONLY (fY,fZ) = {
1302- let cE = bR("", fY, fZ, this)
1303- let ck = cE._1
1304- let cl = cE._2
1305- let ca = cE._5
1306- let cc = cE._6
1307- let bZ = cE._7
1308- let cf = cE._8
1309- let bY = parseIntValue(cE._9)
1310- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(ck), toString(cl), toString(ca), toString(cc), toString(bZ), toString(cf), toString(bY)], j))
1530+@Callable(dL)
1531+func evaluateGetREADONLY (gW,gX) = {
1532+ let cP = cc("", gW, gX, this)
1533+ let cv = cP._1
1534+ let cw = cP._2
1535+ let cl = cP._5
1536+ let cn = cP._6
1537+ let ck = cP._7
1538+ let cq = cP._8
1539+ let cj = parseIntValue(cP._9)
1540+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cv), toString(cw), toString(cl), toString(cn), toString(ck), toString(cq), toString(cj)], j))
13111541 }
13121542
13131543
1314-@Verifier(ga)
1315-func gb () = {
1316- let gc = {
1317- let du = ez()
1318- if ($isInstanceOf(du, "ByteVector"))
1544+@Verifier(gY)
1545+func gZ () = {
1546+ let ha = {
1547+ let dW = eZ()
1548+ if ($isInstanceOf(dW, "ByteVector"))
13191549 then {
1320- let eD = du
1321- eD
1550+ let fd = dW
1551+ fd
13221552 }
1323- else if ($isInstanceOf(du, "Unit"))
1324- then ga.senderPublicKey
1553+ else if ($isInstanceOf(dW, "Unit"))
1554+ then gY.senderPublicKey
13251555 else throw("Match error")
13261556 }
1327- let du = ga
1328- if ($isInstanceOf(du, "Order"))
1557+ let dW = gY
1558+ if ($isInstanceOf(dW, "Order"))
13291559 then {
1330- let cV = du
1331- let gd = aK()
1332- let av = cU(cV)
1333- let aw = sigVerify(cV.bodyBytes, cV.proofs[0], cV.senderPublicKey)
1334- let ax = sigVerify(cV.bodyBytes, cV.proofs[1], gd)
1335- if (if (if (av)
1336- then aw
1560+ let dA = dW
1561+ let hb = aU()
1562+ let hc = dz(dA)
1563+ let aD = hc._1
1564+ let aE = hc._2
1565+ let aF = sigVerify(dA.bodyBytes, dA.proofs[0], dA.senderPublicKey)
1566+ let aG = sigVerify(dA.bodyBytes, dA.proofs[1], hb)
1567+ if (if (if (aD)
1568+ then aF
13371569 else false)
1338- then ax
1570+ then aG
13391571 else false)
13401572 then true
1341- else au(av, aw, ax)
1573+ else aC(aD, aE, aF, aG)
13421574 }
1343- else if ($isInstanceOf(du, "SetScriptTransaction"))
1575+ else if ($isInstanceOf(dW, "SetScriptTransaction"))
13441576 then {
1345- let eA = du
1346- let ge = blake2b256(value(eA.script))
1347- let gf = fromBase64String(value(getString(aE, as())))
1348- let gg = scriptHash(this)
1349- if (if ((gf == ge))
1350- then (gg != ge)
1351- else false)
1577+ let fa = dW
1578+ if (sigVerify(gY.bodyBytes, gY.proofs[0], ha))
13521579 then true
1353- else sigVerify(ga.bodyBytes, ga.proofs[0], gc)
1580+ else {
1581+ let hd = blake2b256(value(fa.script))
1582+ let he = fromBase64String(value(getString(aO, aA())))
1583+ let hf = scriptHash(this)
1584+ if ((he == hd))
1585+ then (hf != hd)
1586+ else false
1587+ }
13541588 }
1355- else sigVerify(ga.bodyBytes, ga.proofs[0], gc)
1589+ else sigVerify(gY.bodyBytes, gY.proofs[0], ha)
13561590 }
13571591
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 (E,F) = fraction(E, d, F)
6666
6767
6868 func H (I,J) = toInt(fraction(I, toBigInt(J), d))
6969
7070
7171 func K (I,J,L) = toInt(fraction(I, toBigInt(J), d, L))
7272
7373
7474 func M (N,O,P) = fraction(N, O, P)
7575
7676
7777 func Q (I) = if ((0 > I))
7878 then -(I)
7979 else I
8080
8181
8282 func R (I) = if ((e > I))
8383 then -(I)
8484 else I
8585
8686
8787 func S () = "%s__swapContract"
8888
8989
9090 func T () = "%s__factoryContract"
9191
9292
9393 func U () = "%s__managerPublicKey"
9494
9595
9696 func V () = "%s__pendingManagerPublicKey"
9797
9898
9999 func W () = "%s%s__price__last"
100100
101101
102102 func X (Y,Z) = makeString(["%s%s%d%d__price__history", toString(Y), toString(Z)], j)
103103
104104
105105 func aa (ab,ac) = ((("%s%s%s__P__" + ab) + "__") + ac)
106106
107107
108108 func ad (ab,ac) = ((("%s%s%s__G__" + ab) + "__") + ac)
109109
110110
111111 func ae () = "%s__amountAsset"
112112
113113
114114 func af () = "%s__priceAsset"
115115
116116
117-func ag () = "%s__factoryConfig"
117+let ag = "%s__fee"
118+
119+let ah = fraction(10, b, 10000)
120+
121+let ai = valueOrElse(getInteger(this, ag), ah)
122+
123+let aj = makeString(["%s", "kLp"], j)
124+
125+let ak = makeString(["%s", "kLpRefreshedHeight"], j)
126+
127+let al = makeString(["%s", "refreshKLpDelay"], j)
128+
129+let am = 30
130+
131+let an = valueOrElse(getInteger(this, al), am)
132+
133+func ao () = "%s__factoryConfig"
118134
119135
120-func ah () = "%s%s__matcher__publicKey"
136+func ap () = "%s%s__matcher__publicKey"
121137
122138
123-func ai (aj) = (("%s%s%s__" + aj) + "__mappings__poolContract2LpAsset")
139+func aq (ar) = (("%s%s%s__" + ar) + "__mappings__poolContract2LpAsset")
124140
125141
126-func ak (al,am) = (((("%d%d%s__" + al) + "__") + am) + "__config")
142+func as (at,au) = (((("%d%d%s__" + at) + "__") + au) + "__config")
127143
128144
129-func an (ao) = ("%s%s%s__mappings__baseAsset2internalId__" + ao)
145+func av (aw) = ("%s%s%s__mappings__baseAsset2internalId__" + aw)
130146
131147
132-func ap () = "%s__shutdown"
148+func ax () = "%s__shutdown"
133149
134150
135-func aq (ar) = ("%s%s__poolWeight__" + ar)
151+func ay (az) = ("%s%s__poolWeight__" + az)
136152
137153
138-func as () = "%s__allowedLpScriptHash"
154+func aA () = "%s__allowedLpScriptHash"
139155
140156
141-let at = "%s__feeCollectorAddress"
157+let aB = "%s__feeCollectorAddress"
142158
143-func au (av,aw,ax) = throw(((((("order validation failed: orderValid=" + toString(av)) + " senderValid=") + toString(aw)) + " matcherValid=") + toString(ax)))
159+func aC (aD,aE,aF,aG) = throw((((((((("order validation failed: orderValid=" + toString(aD)) + " (") + aE) + ")") + " senderValid=") + toString(aF)) + " matcherValid=") + toString(aG)))
144160
145161
146-func ay (az,aA) = valueOrErrorMessage(getString(az, aA), makeString(["mandatory ", toString(az), ".", aA, " is not defined"], ""))
162+func aH (aI,aJ) = valueOrErrorMessage(getString(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
147163
148164
149-func aB (az,aA) = valueOrErrorMessage(getInteger(az, aA), makeString(["mandatory ", toString(az), ".", aA, " is not defined"], ""))
165+func aK (aI,aJ) = valueOrErrorMessage(getInteger(aI, aJ), makeString(["mandatory ", toString(aI), ".", aJ, " is not defined"], ""))
150166
151167
152-func aC (aD) = throw(makeString(["lp.ride:", aD], " "))
168+func aL (aM) = throw(makeString(["lp.ride:", aM], " "))
153169
154170
155-let aE = addressFromStringValue(ay(this, T()))
171+func aN (aM) = makeString(["lp.ride:", aM], " ")
156172
157-let aF = addressFromStringValue(ay(aE, at))
158173
159-let aG = {
160- let aH = invoke(aE, "getInFeeREADONLY", [toString(this)], nil)
161- if ($isInstanceOf(aH, "Int"))
162- then aH
163- else throw(($getType(aH) + " couldn't be cast to Int"))
174+let aO = addressFromStringValue(aH(this, T()))
175+
176+let aP = addressFromStringValue(aH(aO, aB))
177+
178+let aQ = {
179+ let aR = invoke(aO, "getInFeeREADONLY", [toString(this)], nil)
180+ if ($isInstanceOf(aR, "Int"))
181+ then aR
182+ else throw(($getType(aR) + " couldn't be cast to Int"))
164183 }
165184
166-let aI = {
167- let aH = invoke(aE, "getOutFeeREADONLY", [toString(this)], nil)
168- if ($isInstanceOf(aH, "Int"))
169- then aH
170- else throw(($getType(aH) + " couldn't be cast to Int"))
185+let aS = {
186+ let aR = invoke(aO, "getOutFeeREADONLY", [toString(this)], nil)
187+ if ($isInstanceOf(aR, "Int"))
188+ then aR
189+ else throw(($getType(aR) + " couldn't be cast to Int"))
171190 }
172191
173-func aJ () = valueOrElse(getBoolean(aE, ap()), false)
192+func aT () = valueOrElse(getBoolean(aO, ax()), false)
174193
175194
176-func aK () = fromBase58String(ay(aE, ah()))
195+func aU () = fromBase58String(aH(aO, ap()))
177196
178197
179-func aL () = {
180- let aM = ay(this, ae())
181- let aN = ay(this, af())
182- let am = aB(aE, an(aN))
183- let al = aB(aE, an(aM))
184- split(ay(aE, ak(toString(al), toString(am))), j)
198+func aV () = {
199+ let aW = aH(this, ae())
200+ let aX = aH(this, af())
201+ let au = aK(aO, av(aX))
202+ let at = aK(aO, av(aW))
203+ split(aH(aO, as(toString(at), toString(au))), j)
185204 }
186205
187206
188-func aO (aP) = if ((aP == i))
207+func aY (aZ) = if ((aZ == i))
189208 then unit
190- else fromBase58String(aP)
209+ else fromBase58String(aZ)
191210
192211
193-func aQ (aP) = if ((aP == unit))
212+func ba (aZ) = if ((aZ == unit))
194213 then i
195- else toBase58String(value(aP))
214+ else toBase58String(value(aZ))
196215
197216
198-func aR (aS) = $Tuple7(addressFromStringValue(aS[o]), parseIntValue(aS[p]), fromBase58String(aS[q]), aO(aS[r]), aO(aS[s]), parseIntValue(aS[t]), parseIntValue(aS[u]))
217+func bb (bc) = $Tuple7(addressFromStringValue(bc[o]), parseIntValue(bc[p]), fromBase58String(bc[q]), aY(bc[r]), aY(bc[s]), parseIntValue(bc[t]), parseIntValue(bc[u]))
199218
200219
201-let aT = aR(aL())
220+let bd = bb(aV())
202221
203-let aU = aT
222+let be = bd
204223
205-let aV = aU._1
224+let bf = be._1
206225
207-let aW = aU._2
226+let bg = be._2
208227
209-let aX = aU._3
228+let bh = be._3
210229
211-let aY = aU._4
230+let bi = be._4
212231
213-let aZ = aU._5
232+let bj = be._5
214233
215-let ba = aU._6
234+let bk = be._6
216235
217-let bb = aU._7
236+let bl = be._7
218237
219-func bc () = split(ay(aE, ag()), j)
238+func bm () = split(aH(aO, ao()), j)
220239
221240
222-let bd = valueOrErrorMessage(addressFromString(bc()[B]), "incorrect staking address")
241+let bn = valueOrErrorMessage(addressFromString(bm()[B]), "incorrect staking address")
223242
224-let be = valueOrErrorMessage(addressFromString(bc()[C]), "incorrect staking address")
243+let bo = valueOrErrorMessage(addressFromString(bm()[C]), "incorrect staking address")
225244
226-func bf (bg,bh,bi,bj,bk,bl,bm,bn,bo,bp) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp)], j)
245+func bp (bq,br,bs,bt,bu,bv,bw,bx,by,bz) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by), toString(bz)], j)
227246
228247
229-func bq (br,bs,bt,bj,bm,bn) = makeString(["%d%d%d%d%d%d", toString(br), toString(bs), toString(bt), toString(bj), toString(bm), toString(bn)], j)
248+func bA (bB,bC,bD,bt,bw,bx) = makeString(["%d%d%d%d%d%d", toString(bB), toString(bC), toString(bD), toString(bt), toString(bw), toString(bx)], j)
230249
231250
232-func bu (bv) = if ((bv == "WAVES"))
251+func bE (bF) = if ((bF == "WAVES"))
233252 then wavesBalance(this).available
234- else assetBalance(this, fromBase58String(bv))
253+ else assetBalance(this, fromBase58String(bF))
235254
236255
237-func bw (bx,by) = fraction(bx, d, by)
256+func bG (bH,bI) = fraction(bH, d, bI)
238257
239258
240-func bz (bA,bB,bC,bD) = {
241- let bE = D(bC, bA)
242- let bF = D(bD, bB)
243- bw(bF, bE)
259+func bJ (bH,bI,L) = fraction(bH, d, bI, L)
260+
261+
262+func bK (bL,bM,bN,bO) = {
263+ let bP = D(bN, bL)
264+ let bQ = D(bO, bM)
265+ bG(bQ, bP)
244266 }
245267
246268
247-func bG (bC,bD,bH) = {
248- let bI = aL()
249- let bJ = parseIntValue(bI[t])
250- let bK = parseIntValue(bI[u])
251- let bL = bz(bJ, bK, bC, bD)
252- let by = D(bC, bJ)
253- let bx = D(bD, bK)
254- let bM = D(bH, b)
255- let bN = bw(by, bM)
256- let bO = bw(bx, bM)
257-[bL, bN, bO]
269+func bR (bN,bO,bS) = {
270+ let bT = aV()
271+ let bU = parseIntValue(bT[t])
272+ let bV = parseIntValue(bT[u])
273+ let bW = bK(bU, bV, bN, bO)
274+ let bI = D(bN, bU)
275+ let bH = D(bO, bV)
276+ let bX = D(bS, b)
277+ let bY = bG(bI, bX)
278+ let bZ = bG(bH, bX)
279+[bW, bY, bZ]
258280 }
259281
260282
261-func bP (bC,bD,bH) = {
262- let bQ = bG(bC, bD, bH)
263-[H(bQ[0], b), H(bQ[1], b), H(bQ[2], b)]
283+func ca (bN,bO,bS) = {
284+ let cb = bR(bN, bO, bS)
285+[H(cb[0], b), H(cb[1], b), H(cb[2], b)]
264286 }
265287
266288
267-func bR (bS,bT,bU,ab) = {
268- let bI = aL()
269- let bV = bI[q]
270- let bW = bI[r]
271- let bX = bI[s]
272- let bA = parseIntValue(bI[t])
273- let bB = parseIntValue(bI[u])
274- let bY = bI[p]
275- let bZ = valueOrErrorMessage(assetInfo(fromBase58String(bV)), (("Asset " + bV) + " doesn't exist")).quantity
276- if ((bV != bT))
289+func cc (cd,ce,cf,ab) = {
290+ let bT = aV()
291+ let cg = bT[q]
292+ let ch = bT[r]
293+ let ci = bT[s]
294+ let bL = parseIntValue(bT[t])
295+ let bM = parseIntValue(bT[u])
296+ let cj = bT[p]
297+ let ck = valueOrErrorMessage(assetInfo(fromBase58String(cg)), (("Asset " + cg) + " doesn't exist")).quantity
298+ if ((cg != ce))
277299 then throw("Invalid asset passed.")
278300 else {
279- let ca = bu(bW)
280- let cb = D(ca, bA)
281- let cc = bu(bX)
282- let cd = D(cc, bB)
283- let ce = bw(cd, cb)
284- let cf = H(ce, b)
285- let cg = D(bU, b)
286- let ch = D(bZ, b)
287- let ci = fraction(cb, cg, ch)
288- let cj = fraction(cd, cg, ch)
289- let ck = H(ci, bA)
290- let cl = H(cj, bB)
291- let cm = if ((bS == ""))
301+ let cl = bE(ch)
302+ let cm = D(cl, bL)
303+ let cn = bE(ci)
304+ let co = D(cn, bM)
305+ let cp = bG(co, cm)
306+ let cq = H(cp, b)
307+ let cr = D(cf, b)
308+ let cs = D(ck, b)
309+ let ct = fraction(cm, cr, cs)
310+ let cu = fraction(co, cr, cs)
311+ let cv = K(ct, bL, FLOOR)
312+ let cw = K(cu, bM, FLOOR)
313+ let cx = if ((cd == ""))
292314 then nil
293- else [ScriptTransfer(ab, ck, if ((bW == "WAVES"))
315+ else [ScriptTransfer(ab, cv, if ((ch == "WAVES"))
294316 then unit
295- else fromBase58String(bW)), ScriptTransfer(ab, cl, if ((bX == "WAVES"))
317+ else fromBase58String(ch)), ScriptTransfer(ab, cw, if ((ci == "WAVES"))
296318 then unit
297- else fromBase58String(bX)), StringEntry(ad(toString(ab), bS), bq(ck, cl, bU, cf, height, lastBlock.timestamp)), IntegerEntry(W(), cf), IntegerEntry(X(height, lastBlock.timestamp), cf)]
298- $Tuple10(ck, cl, bW, bX, ca, cc, bZ, ce, bY, cm)
319+ else fromBase58String(ci)), StringEntry(ad(toString(ab), cd), bA(cv, cw, cf, cq, height, lastBlock.timestamp)), IntegerEntry(W(), cq), IntegerEntry(X(height, lastBlock.timestamp), cq)]
320+ $Tuple10(cv, cw, ch, ci, cl, cn, ck, cp, cj, cx)
299321 }
300322 }
301323
302324
303-func cn (bS,co,cp,cq,cr,cs,ab,ct,cu) = {
304- let bI = aL()
305- let bV = fromBase58String(bI[q])
306- let cv = bI[r]
307- let cw = bI[s]
308- let cx = bI[v]
309- let cy = bI[w]
310- let bJ = parseIntValue(bI[t])
311- let bK = parseIntValue(bI[u])
312- let bY = bI[p]
313- let bZ = valueOrErrorMessage(assetInfo(bV), (("Asset " + toBase58String(bV)) + " doesn't exist")).quantity
314- let cz = toBase58String(valueOrElse(cq, fromBase58String("WAVES")))
315- let cA = toBase58String(valueOrElse(cs, fromBase58String("WAVES")))
316- if (if ((cv != cz))
325+func cy (cd,cz,cA,cB,cC,cD,ab,cE,cF) = {
326+ let bT = aV()
327+ let cg = fromBase58String(bT[q])
328+ let cG = bT[r]
329+ let cH = bT[s]
330+ let cI = bT[v]
331+ let cJ = bT[w]
332+ let bU = parseIntValue(bT[t])
333+ let bV = parseIntValue(bT[u])
334+ let cj = bT[p]
335+ let ck = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
336+ let cK = toBase58String(valueOrElse(cB, fromBase58String("WAVES")))
337+ let cL = toBase58String(valueOrElse(cD, fromBase58String("WAVES")))
338+ if (if ((cG != cK))
317339 then true
318- else (cw != cA))
340+ else (cH != cL))
319341 then throw("Invalid amt or price asset passed.")
320342 else {
321- let ca = if (ct)
322- then bu(cv)
323- else (bu(cv) - cp)
324- let cc = if (ct)
325- then bu(cw)
326- else (bu(cw) - cr)
327- let cB = D(cp, bJ)
328- let cC = D(cr, bK)
329- let cD = bw(cC, cB)
330- let cb = D(ca, bJ)
331- let cd = D(cc, bK)
332- let cE = if ((bZ == 0))
343+ let cl = if (cE)
344+ then bE(cG)
345+ else (bE(cG) - cA)
346+ let cn = if (cE)
347+ then bE(cH)
348+ else (bE(cH) - cC)
349+ let cM = D(cA, bU)
350+ let cN = D(cC, bV)
351+ let cO = bG(cN, cM)
352+ let cm = D(cl, bU)
353+ let co = D(cn, bV)
354+ let cP = if ((ck == 0))
333355 then {
334- let ce = e
335- let cF = e
336- let bM = pow((cB * cC), 0, toBigInt(5), 1, 0, DOWN)
337- $Tuple5(H(bM, b), H(cB, bJ), H(cC, bK), bw((cd + cC), (cb + cB)), cF)
356+ let cp = e
357+ let cQ = e
358+ let bX = pow((cM * cN), 0, toBigInt(5), 1, 0, DOWN)
359+ $Tuple5(H(bX, b), H(cM, bU), H(cN, bV), bG((co + cN), (cm + cM)), cQ)
338360 }
339361 else {
340- let ce = bw(cd, cb)
341- let cF = fraction(R((ce - cD)), d, ce)
342- let cG = D(co, b)
343- if (if ((ce != e))
344- then (cF > cG)
362+ let cp = bG(co, cm)
363+ let cQ = fraction(R((cp - cO)), d, cp)
364+ let cR = D(cz, b)
365+ if (if ((cp != e))
366+ then (cQ > cR)
345367 else false)
346- then throw(((("Price slippage " + toString(cF)) + " exceeded the passed limit of ") + toString(cG)))
368+ then throw(((("Price slippage " + toString(cQ)) + " exceeded the passed limit of ") + toString(cR)))
347369 else {
348- let ch = D(bZ, b)
349- let cH = fraction(cB, ce, d)
350- let cI = fraction(cC, d, ce)
351- let cJ = if ((cH > cC))
352- then $Tuple2(cI, cC)
353- else $Tuple2(cB, cH)
354- let cK = cJ._1
355- let cL = cJ._2
356- let bM = fraction(ch, cL, cd)
357- $Tuple5(H(bM, b), H(cK, bJ), H(cL, bK), ce, cF)
370+ let cs = D(ck, b)
371+ let cS = fraction(cM, bJ(co, cm, CEILING), d, CEILING)
372+ let cT = fraction(cN, d, bJ(co, cm, FLOOR), CEILING)
373+ let cU = if ((cS > cN))
374+ then $Tuple2(cT, cN)
375+ else $Tuple2(cM, cS)
376+ let cV = cU._1
377+ let cW = cU._2
378+ let bX = fraction(cs, cW, co, FLOOR)
379+ $Tuple5(K(bX, b, FLOOR), K(cV, bU, CEILING), K(cW, bV, CEILING), cp, cQ)
358380 }
359381 }
360- let cM = cE._1
361- let cN = cE._2
362- let cO = cE._3
363- let cf = H(cE._4, b)
364- let cP = H(cE._5, b)
365- if ((0 >= cM))
382+ let cX = cP._1
383+ let cY = cP._2
384+ let cZ = cP._3
385+ let cq = H(cP._4, b)
386+ let da = H(cP._5, b)
387+ if ((0 >= cX))
366388 then throw("Invalid calculations. LP calculated is less than zero.")
367389 else {
368- let cQ = if (!(cu))
390+ let db = if (!(cF))
369391 then 0
370- else cM
371- let cR = (cp - cN)
372- let cS = (cr - cO)
373- let cT = [IntegerEntry(W(), cf), IntegerEntry(X(height, lastBlock.timestamp), cf), StringEntry(aa(ab, bS), bf(cN, cO, cQ, cf, co, cP, height, lastBlock.timestamp, cR, cS))]
374- $Tuple13(cM, cQ, cf, ca, cc, bZ, bV, bY, cT, cR, cS, cq, cs)
392+ else cX
393+ let dc = (cA - cY)
394+ let dd = (cC - cZ)
395+ let de = [IntegerEntry(W(), cq), IntegerEntry(X(height, lastBlock.timestamp), cq), StringEntry(aa(ab, cd), bp(cY, cZ, db, cq, cz, da, height, lastBlock.timestamp, dc, dd))]
396+ $Tuple13(cX, db, cq, cl, cn, ck, cg, cj, de, dc, dd, cB, cD)
375397 }
376398 }
377399 }
378400
379401
380-func cU (cV) = {
381- let bI = aL()
382- let cW = bI[r]
383- let cX = bI[s]
384- let bY = parseIntValue(bI[p])
385- let bJ = parseIntValue(bI[t])
386- let bK = parseIntValue(bI[u])
387- let cY = bu(cW)
388- let cZ = bu(cX)
389- let ce = if ((cV.orderType == Buy))
390- then bz(bJ, bK, (cY + cV.amount), cZ)
391- else bz(bJ, bK, (cY - cV.amount), cZ)
392- let cf = H(ce, b)
393- if (if (if (aJ())
394- then true
395- else (bY == m))
396- then true
397- else (bY == n))
398- then throw("Exchange operations disabled")
399- else {
400- let da = cV.assetPair.amountAsset
401- let db = if ((da == unit))
402- then "WAVES"
403- else toBase58String(value(da))
404- let dc = cV.assetPair.priceAsset
405- let dd = if ((dc == unit))
406- then "WAVES"
407- else toBase58String(value(dc))
408- if (if ((db != cW))
409- then true
410- else (dd != cX))
411- then throw("Wrong order assets.")
412- else {
413- let de = cV.price
414- let df = fraction(b, bK, bJ)
415- let dg = M(de, b, df)
416- let dh = if ((cV.orderType == Buy))
417- then (cf >= dg)
418- else (dg >= cf)
419- true
420- }
421- }
402+func df (dg,dh,ck) = {
403+ let di = G(dg, toBigInt(bk))
404+ let dj = G(dh, toBigInt(bl))
405+ let dk = fraction(pow((di * dj), 0, toBigInt(5), 1, 18, DOWN), g, ck)
406+ if ((ck == f))
407+ then f
408+ else dk
422409 }
423410
424411
425-func di (dj) = if ((size(dj.payments) != 1))
412+func dl (dm,dn,do) = {
413+ let dp = (toBigInt(bE(ba(bi))) - dm)
414+ let dq = (toBigInt(bE(ba(bj))) - dn)
415+ let dr = (toBigInt(value(assetInfo(bh)).quantity) - do)
416+ let ds = df(dp, dq, dr)
417+ ds
418+ }
419+
420+
421+func dt (du,dv,do) = {
422+ let dp = (bE(ba(bi)) + du)
423+ let dq = (bE(ba(bj)) + dv)
424+ let dr = (value(assetInfo(bh)).quantity + do)
425+ let dk = df(toBigInt(dp), toBigInt(dq), toBigInt(dr))
426+ let dw = [IntegerEntry(ak, height), StringEntry(aj, toString(dk))]
427+ $Tuple2(dw, dk)
428+ }
429+
430+
431+func dx (dy,dk) = if ((dk >= dy))
432+ then true
433+ else aL(makeString(["updated KLp lower than current KLp", toString(dy), toString(dk)], " "))
434+
435+
436+func dz (dA) = {
437+ let dp = bE(ba(bi))
438+ let dq = bE(ba(bj))
439+ let dB = dA.amount
440+ let dC = fraction(dA.amount, dA.price, b, FLOOR)
441+ let dD = if ((dA.orderType == Buy))
442+ then $Tuple2(dB, -(dC))
443+ else $Tuple2(-(dB), dC)
444+ let du = dD._1
445+ let dv = dD._2
446+ if (if (if (aT())
447+ then true
448+ else (bg == m))
449+ then true
450+ else (bg == n))
451+ then throw("Exchange operations disabled")
452+ else if (if ((dA.assetPair.amountAsset != bi))
453+ then true
454+ else (dA.assetPair.priceAsset != bj))
455+ then throw("Wrong order assets.")
456+ else {
457+ let dE = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aN("invalid kLp"))
458+ let dF = dt(du, dv, 0)
459+ let dG = dF._1
460+ let dH = dF._2
461+ let dI = (dH >= dE)
462+ let dJ = makeString(["kLp=", toString(dE), " kLpNew=", toString(dH), " amountAssetBalance=", toString(dp), " priceAssetBalance=", toString(dq), " amountAssetBalanceDelta=", toString(du), " priceAssetBalanceDelta=", toString(dv), " height=", toString(height)], "")
463+ $Tuple2(dI, dJ)
464+ }
465+ }
466+
467+
468+func dK (dL) = if ((size(dL.payments) != 1))
426469 then throw("exactly 1 payment is expected")
427470 else {
428- let dk = value(dj.payments[0])
429- let bT = value(dk.assetId)
430- let dl = dk.amount
431- let cE = bR(toBase58String(dj.transactionId), toBase58String(bT), dl, dj.caller)
432- let ck = cE._1
433- let cl = cE._2
434- let bY = parseIntValue(cE._9)
435- let cm = cE._10
436- if (if (aJ())
471+ let dM = value(dL.payments[0])
472+ let ce = value(dM.assetId)
473+ let dN = dM.amount
474+ let cP = cc(toBase58String(dL.transactionId), toBase58String(ce), dN, dL.caller)
475+ let cv = cP._1
476+ let cw = cP._2
477+ let cj = parseIntValue(cP._9)
478+ let cx = cP._10
479+ if (if (aT())
437480 then true
438- else (bY == n))
439- then throw(("Get operation is blocked by admin. Status = " + toString(bY)))
440- else $Tuple5(ck, cl, dl, bT, cm)
481+ else (cj == n))
482+ then throw(("Get operation is blocked by admin. Status = " + toString(cj)))
483+ else $Tuple5(cv, cw, dN, ce, cx)
441484 }
442485
443486
444-func dm (dj,co,cu) = if ((size(dj.payments) != 2))
487+func dO (dL,cz,cF) = if ((size(dL.payments) != 2))
445488 then throw("exactly 2 payments are expected")
446489 else {
447- let dn = value(dj.payments[0])
448- let do = value(dj.payments[1])
449- let dp = cn(toBase58String(dj.transactionId), co, dn.amount, dn.assetId, do.amount, do.assetId, toString(dj.caller), false, cu)
450- let bY = parseIntValue(dp._8)
451- if (if (if (aJ())
490+ let dP = value(dL.payments[0])
491+ let dQ = value(dL.payments[1])
492+ let dR = cy(toBase58String(dL.transactionId), cz, dP.amount, dP.assetId, dQ.amount, dQ.assetId, toString(dL.caller), false, cF)
493+ let cj = parseIntValue(dR._8)
494+ if (if (if (aT())
452495 then true
453- else (bY == l))
496+ else (cj == l))
454497 then true
455- else (bY == n))
456- then throw(("Put operation is blocked by admin. Status = " + toString(bY)))
457- else dp
498+ else (cj == n))
499+ then throw(("Put operation is blocked by admin. Status = " + toString(cj)))
500+ else dR
458501 }
459502
460503
461-func dq (dr) = {
462- let ds = invoke(aE, "emit", [dr], nil)
463- if ((ds == ds))
504+func dS (dT) = {
505+ let dU = invoke(aO, "emit", [dT], nil)
506+ if ((dU == dU))
464507 then {
465- let dt = {
466- let du = ds
467- if ($isInstanceOf(du, "Address"))
508+ let dV = {
509+ let dW = dU
510+ if ($isInstanceOf(dW, "Address"))
468511 then {
469- let dv = du
470- invoke(dv, "emit", [dr], nil)
512+ let dX = dW
513+ invoke(dX, "emit", [dT], nil)
471514 }
472515 else unit
473516 }
474- if ((dt == dt))
475- then dr
517+ if ((dV == dV))
518+ then dT
476519 else throw("Strict value is not equal to itself.")
477520 }
478521 else throw("Strict value is not equal to itself.")
479522 }
480523
481524
482-func dw (dr,dx) = {
483- let dy = if ((dx == 0))
525+func dY (dT,ai) = {
526+ let dZ = if ((ai == 0))
484527 then 0
485- else fraction(dr, dx, b)
486- $Tuple2((dr - dy), dy)
528+ else fraction(dT, ai, b)
529+ $Tuple2((dT - dZ), dZ)
487530 }
488531
489532
490-func dz (dA,dB,ab,ac) = {
491- let dC = (ac == unit)
492- let dD = bu(aQ(aY))
493- let dE = bu(aQ(aZ))
494- let dF = if ((dB == aY))
533+func ea (eb,ec,ab,ac) = {
534+ let ed = (ac == unit)
535+ let ee = bE(ba(bi))
536+ let ef = bE(ba(bj))
537+ let eg = if ((ec == bi))
495538 then true
496- else if ((dB == aZ))
539+ else if ((ec == bj))
497540 then false
498- else aC("invalid asset")
499- let dG = if (dC)
500- then $Tuple2(dD, dE)
501- else if (dF)
502- then $Tuple2((dD - dA), dE)
503- else $Tuple2(dD, (dE - dA))
504- let dH = dG._1
505- let dI = dG._2
506- let dJ = if (dF)
507- then $Tuple2(dA, 0)
508- else $Tuple2(0, dA)
509- let dK = dJ._1
510- let dL = dJ._2
511- let dM = dw(dK, aG)._1
512- let dN = dw(dL, aG)._1
513- let dO = dw(dA, aG)
514- let dP = dO._1
515- let dy = dO._2
516- let dQ = (dH + dM)
517- let dR = (dI + dN)
518- let dS = bw(D(dR, bb), D(dQ, ba))
519- let dT = H(dS, b)
520- let dU = if (dF)
521- then dH
522- else dI
523- let dV = toBigInt(dU)
524- let dW = toBigInt(valueOrErrorMessage(assetInfo(aX), (("asset " + toBase58String(aX)) + " doesn't exist")).quantity)
525- let dX = if ((dW > f))
541+ else aL("invalid asset")
542+ let eh = if (ed)
543+ then $Tuple2(ee, ef)
544+ else if (eg)
545+ then $Tuple2((ee - eb), ef)
546+ else $Tuple2(ee, (ef - eb))
547+ let ei = eh._1
548+ let ej = eh._2
549+ let ek = if (eg)
550+ then $Tuple2(eb, 0)
551+ else $Tuple2(0, eb)
552+ let el = ek._1
553+ let em = ek._2
554+ let dB = dY(el, aQ)._1
555+ let dC = dY(em, aQ)._1
556+ let en = dY(eb, aQ)
557+ let eo = en._1
558+ let dZ = en._2
559+ let ep = (ei + dB)
560+ let eq = (ej + dC)
561+ let er = bG(D(eq, bl), D(ep, bk))
562+ let es = H(er, b)
563+ let et = if (eg)
564+ then ei
565+ else ej
566+ let eu = toBigInt(et)
567+ let ev = toBigInt(valueOrErrorMessage(assetInfo(bh), (("asset " + toBase58String(bh)) + " doesn't exist")).quantity)
568+ let ew = if ((ev > f))
526569 then true
527- else aC("initial deposit requires all coins")
528- if ((dX == dX))
570+ else aL("initial deposit requires all coins")
571+ if ((ew == ew))
529572 then {
530- let dY = toBigInt(dP)
531- let dZ = max([0, toInt(((dW * (sqrtBigInt((d + ((dY * d) / dV)), 18, 18, DOWN) - d)) / d))])
532- let cT = if (dC)
573+ let ex = toBigInt(eo)
574+ let ey = max([0, toInt(((ev * (sqrtBigInt((d + ((ex * d) / eu)), 18, 18, DOWN) - d)) / d))])
575+ let de = if (ed)
533576 then nil
534- else [IntegerEntry(W(), dT), IntegerEntry(X(height, lastBlock.timestamp), dT), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bf(dK, dL, dZ, dT, 0, 0, height, lastBlock.timestamp, 0, 0))]
535- let ea = bw(D(dI, bb), D(dH, ba))
536- let eb = H(ea, b)
537- let ec = {
538- let ed = if (dF)
539- then $Tuple2(dK, dH)
540- else $Tuple2(dL, dI)
541- let dr = ed._1
542- let ee = ed._2
543- let ef = toInt(fraction(dW, toBigInt((dr / 2)), toBigInt(ee)))
544- fraction((dZ - ef), b, ef)
577+ else [IntegerEntry(W(), es), IntegerEntry(X(height, lastBlock.timestamp), es), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bp(el, em, ey, es, 0, 0, height, lastBlock.timestamp, 0, 0))]
578+ let ez = bG(D(ej, bl), D(ei, bk))
579+ let eA = H(ez, b)
580+ let eB = {
581+ let eC = if (eg)
582+ then $Tuple2(el, ei)
583+ else $Tuple2(em, ej)
584+ let dT = eC._1
585+ let eD = eC._2
586+ let eE = toInt(fraction(ev, toBigInt((dT / 2)), toBigInt(eD)))
587+ fraction((ey - eE), b, eE)
545588 }
546- $Tuple4(dZ, cT, dy, ec)
589+ $Tuple5(ey, de, dZ, eB, eg)
547590 }
548591 else throw("Strict value is not equal to itself.")
549592 }
550593
551594
552-func eg (eh,dP,dB,ab,ac) = {
553- let dC = (ac == unit)
554- let ei = [if ((dB == aX))
595+func eF (eG,eo,ec,ab,ac) = {
596+ let ed = (ac == unit)
597+ let bT = aV()
598+ let bU = parseIntValue(bT[t])
599+ let bV = parseIntValue(bT[u])
600+ let eH = [if ((ec == bh))
555601 then true
556- else aC("invalid lp asset")]
557- if ((ei == ei))
602+ else aL("invalid lp asset")]
603+ if ((eH == eH))
558604 then {
559- let ej = if ((eh == aY))
605+ let eI = if ((eG == bi))
560606 then true
561- else if ((eh == aZ))
607+ else if ((eG == bj))
562608 then false
563- else aC("invalid asset")
564- let ek = if (ej)
565- then toBigInt(bu(aQ(aY)))
566- else toBigInt(bu(aQ(aZ)))
567- let el = bu(aQ(aY))
568- let em = bu(aQ(aZ))
569- let en = if (ej)
570- then el
571- else em
572- let eo = toBigInt(en)
573- let dW = toBigInt(valueOrErrorMessage(assetInfo(aX), (("asset " + toBase58String(aX)) + " doesn't exist")).quantity)
574- let ep = toBigInt(dP)
575- let eq = max([0, toInt(((ek * (d - pow((d - ((ep * d) / dW)), 18, h, 0, 18, DOWN))) / d))])
576- let er = dw(eq, aI)
577- let es = er._1
578- let dy = er._2
579- let et = if (ej)
580- then $Tuple4(es, 0, (el - eq), em)
581- else $Tuple4(0, es, el, (em - eq))
582- let eu = et._1
583- let ev = et._2
584- let ew = et._3
585- let ex = et._4
586- let dS = bw(D(ex, bb), D(ew, ba))
587- let dT = H(dS, b)
588- let cT = if (dC)
609+ else aL("invalid asset")
610+ let eJ = if (eI)
611+ then toBigInt(bE(ba(bi)))
612+ else toBigInt(bE(ba(bj)))
613+ let eK = if (eI)
614+ then bU
615+ else bV
616+ let eL = bE(ba(bi))
617+ let eM = bE(ba(bj))
618+ let eN = if (eI)
619+ then eL
620+ else eM
621+ let eO = toBigInt(eN)
622+ let ev = toBigInt(valueOrErrorMessage(assetInfo(bh), (("asset " + toBase58String(bh)) + " doesn't exist")).quantity)
623+ let eP = toBigInt(eo)
624+ let eQ = max([0, toInt(((eJ * (d - pow((d - ((eP * d) / ev)), 18, h, 0, 18, DOWN))) / d))])
625+ let eR = dY(eQ, aS)
626+ let eS = eR._1
627+ let dZ = eR._2
628+ let eT = if (eI)
629+ then $Tuple4(eS, 0, (eL - eQ), eM)
630+ else $Tuple4(0, eS, eL, (eM - eQ))
631+ let eU = eT._1
632+ let eV = eT._2
633+ let eW = eT._3
634+ let eX = eT._4
635+ let er = bG(D(eX, bl), D(eW, bk))
636+ let es = H(er, b)
637+ let de = if (ed)
589638 then nil
590- else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bq(eu, ev, dP, dT, height, lastBlock.timestamp)), IntegerEntry(W(), dT), IntegerEntry(X(height, lastBlock.timestamp), dT)]
591- let ea = bw(D(em, bb), D(el, ba))
592- let eb = H(ea, b)
593- let ec = {
594- let ey = (toInt(fraction(ek, ep, dW)) * 2)
595- fraction((es - ey), b, ey)
639+ else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bA(eU, eV, eo, es, height, lastBlock.timestamp)), IntegerEntry(W(), es), IntegerEntry(X(height, lastBlock.timestamp), es)]
640+ let ez = bG(D(eM, bl), D(eL, bk))
641+ let eA = H(ez, b)
642+ let eB = {
643+ let eY = (toInt(fraction(eJ, eP, ev)) * 2)
644+ fraction((eS - eY), b, eY)
596645 }
597- $Tuple4(es, cT, dy, ec)
646+ $Tuple5(eS, de, dZ, eB, eI)
598647 }
599648 else throw("Strict value is not equal to itself.")
600649 }
601650
602651
603-func ez () = {
604- let du = getString(U())
605- if ($isInstanceOf(du, "String"))
652+func eZ () = {
653+ let dW = getString(U())
654+ if ($isInstanceOf(dW, "String"))
606655 then {
607- let eA = du
608- fromBase58String(eA)
656+ let fa = dW
657+ fromBase58String(fa)
609658 }
610- else if ($isInstanceOf(du, "Unit"))
659+ else if ($isInstanceOf(dW, "Unit"))
611660 then unit
612661 else throw("Match error")
613662 }
614663
615664
616-func eB () = {
617- let du = getString(V())
618- if ($isInstanceOf(du, "String"))
665+func fb () = {
666+ let dW = getString(V())
667+ if ($isInstanceOf(dW, "String"))
619668 then {
620- let eA = du
621- fromBase58String(eA)
669+ let fa = dW
670+ fromBase58String(fa)
622671 }
623- else if ($isInstanceOf(du, "Unit"))
672+ else if ($isInstanceOf(dW, "Unit"))
624673 then unit
625674 else throw("Match error")
626675 }
627676
628677
629-func eC (dj) = {
630- let du = ez()
631- if ($isInstanceOf(du, "ByteVector"))
678+func fc (dL) = {
679+ let dW = eZ()
680+ if ($isInstanceOf(dW, "ByteVector"))
632681 then {
633- let eD = du
634- (dj.callerPublicKey == eD)
682+ let fd = dW
683+ (dL.callerPublicKey == fd)
635684 }
636- else if ($isInstanceOf(du, "Unit"))
637- then (dj.caller == this)
685+ else if ($isInstanceOf(dW, "Unit"))
686+ then (dL.caller == this)
638687 else throw("Match error")
639688 }
640689
641690
642-func eE (dj) = {
643- let eF = throw("Permission denied")
644- let du = ez()
645- if ($isInstanceOf(du, "ByteVector"))
691+func fe (dL) = {
692+ let ff = throw("Permission denied")
693+ let dW = eZ()
694+ if ($isInstanceOf(dW, "ByteVector"))
646695 then {
647- let eD = du
648- if ((dj.callerPublicKey == eD))
696+ let fd = dW
697+ if ((dL.callerPublicKey == fd))
649698 then true
650- else eF
699+ else ff
651700 }
652- else if ($isInstanceOf(du, "Unit"))
653- then if ((dj.caller == this))
701+ else if ($isInstanceOf(dW, "Unit"))
702+ then if ((dL.caller == this))
654703 then true
655- else eF
704+ else ff
656705 else throw("Match error")
657706 }
658707
659708
660-@Callable(dj)
661-func calculateAmountOutForSwapREADONLY (eG,eH) = {
662- let eI = if ((eH == false))
709+@Callable(dL)
710+func calculateAmountOutForSwapREADONLY (fg,fh) = {
711+ let fi = if ((fh == false))
663712 then {
664- let eJ = ay(this, af())
665- let eK = ay(this, ae())
666- $Tuple2(eJ, eK)
713+ let fj = aH(this, af())
714+ let fk = aH(this, ae())
715+ $Tuple2(fj, fk)
667716 }
668717 else {
669- let eJ = ay(this, ae())
670- let eK = ay(this, af())
671- $Tuple2(eJ, eK)
718+ let fj = aH(this, ae())
719+ let fk = aH(this, af())
720+ $Tuple2(fj, fk)
672721 }
673- let eJ = eI._1
674- let eK = eI._2
675- let eL = bu(eK)
676- let eM = bu(eJ)
677- let eN = fraction(eM, eG, (eL + eG))
678- let eO = (toBigInt(eL) * toBigInt(eM))
679- let eP = ((toBigInt(bu(eK)) + toBigInt(eG)) * (toBigInt(bu(eJ)) - toBigInt(eN)))
680- let eQ = if ((eP >= eO))
722+ let fj = fi._1
723+ let fk = fi._2
724+ let fl = bE(fk)
725+ let fm = bE(fj)
726+ let fn = fraction(fm, fg, (fl + fg))
727+ let fo = (toBigInt(fl) * toBigInt(fm))
728+ let fp = ((toBigInt(bE(fk)) + toBigInt(fg)) * (toBigInt(bE(fj)) - toBigInt(fn)))
729+ let fq = if ((fp >= fo))
681730 then true
682731 else throw("new K is fewer error")
683- if ((eQ == eQ))
684- then $Tuple2(nil, eN)
732+ if ((fq == fq))
733+ then $Tuple2(nil, fn)
685734 else throw("Strict value is not equal to itself.")
686735 }
687736
688737
689738
690-@Callable(dj)
691-func calculateAmountOutForSwapAndSendTokens (eG,eH,eR,eS) = {
692- let ei = [if ((value(dj.payments[0]).amount >= eG))
739+@Callable(dL)
740+func calculateAmountOutForSwapAndSendTokens (fg,fh,fr,fs) = {
741+ let ft = {
742+ let aR = invoke(aO, "getSwapContractREADONLY", nil, nil)
743+ if ($isInstanceOf(aR, "String"))
744+ then aR
745+ else throw(($getType(aR) + " couldn't be cast to String"))
746+ }
747+ let eH = [if ((value(dL.payments[0]).amount >= fg))
693748 then true
694- else aC("Wrong amount"), if ((dj.caller == addressFromStringValue(ay(this, S()))))
749+ else aL("Wrong amount"), if ((dL.caller == addressFromStringValue(ft)))
695750 then true
696- else aC("Permission denied")]
697- if ((ei == ei))
751+ else aL("Permission denied")]
752+ if ((eH == eH))
698753 then {
699- let dk = value(dj.payments[0])
700- let eK = if ((dk.assetId == unit))
754+ let dM = value(dL.payments[0])
755+ let fk = if ((dM.assetId == unit))
701756 then toBase58String(toBytes("WAVES"))
702- else toBase58String(value(dk.assetId))
703- let eJ = if ((eH == false))
704- then ay(this, af())
705- else ay(this, ae())
706- let eL = (bu(eK) - value(dj.payments[0]).amount)
707- let eM = bu(eJ)
708- let eN = ((eM * eG) / (eL + eG))
709- let eO = (eL * eM)
710- let eP = (bu(eK) * (bu(eJ) - eN))
711- let eQ = if ((eP >= eO))
757+ else toBase58String(value(dM.assetId))
758+ let fj = if ((fh == false))
759+ then aH(this, af())
760+ else aH(this, ae())
761+ let fl = (bE(fk) - value(dL.payments[0]).amount)
762+ let fm = bE(fj)
763+ let fn = fraction(fm, fg, (fl + fg))
764+ let fo = (toBigInt(fl) * toBigInt(fm))
765+ let fp = (toBigInt(bE(fk)) * (toBigInt(bE(fj)) - toBigInt(fn)))
766+ let fq = if ((fp >= fo))
712767 then true
713768 else throw("new K is fewer error")
714- if ((eQ == eQ))
769+ if ((fq == fq))
715770 then {
716- let eT = if ((eN >= eR))
771+ let fu = if ((fn >= fr))
717772 then true
718773 else throw("Exchange result is fewer coins than expected")
719- if ((eT == eT))
720- then [ScriptTransfer(addressFromStringValue(eS), eN, if ((eK == "WAVES"))
721- then unit
722- else fromBase58String(eJ))]
774+ if ((fu == fu))
775+ then $Tuple2([ScriptTransfer(addressFromStringValue(fs), fn, aY(fj))], fn)
723776 else throw("Strict value is not equal to itself.")
724777 }
725778 else throw("Strict value is not equal to itself.")
726779 }
727780 else throw("Strict value is not equal to itself.")
728781 }
729782
730783
731784
732-@Callable(dj)
733-func setManager (eU) = {
734- let eV = eE(dj)
735- if ((eV == eV))
785+@Callable(dL)
786+func setManager (fv) = {
787+ let fw = fe(dL)
788+ if ((fw == fw))
736789 then {
737- let eW = fromBase58String(eU)
738- if ((eW == eW))
739- then [StringEntry(V(), eU)]
790+ let fx = fromBase58String(fv)
791+ if ((fx == fx))
792+ then [StringEntry(V(), fv)]
740793 else throw("Strict value is not equal to itself.")
741794 }
742795 else throw("Strict value is not equal to itself.")
743796 }
744797
745798
746799
747-@Callable(dj)
800+@Callable(dL)
748801 func confirmManager () = {
749- let eX = eB()
750- let eY = if (isDefined(eX))
802+ let fy = fb()
803+ let fz = if (isDefined(fy))
751804 then true
752805 else throw("No pending manager")
753- if ((eY == eY))
806+ if ((fz == fz))
754807 then {
755- let eZ = if ((dj.callerPublicKey == value(eX)))
808+ let fA = if ((dL.callerPublicKey == value(fy)))
756809 then true
757810 else throw("You are not pending manager")
758- if ((eZ == eZ))
759- then [StringEntry(U(), toBase58String(value(eX))), DeleteEntry(V())]
811+ if ((fA == fA))
812+ then [StringEntry(U(), toBase58String(value(fy))), DeleteEntry(V())]
760813 else throw("Strict value is not equal to itself.")
761814 }
762815 else throw("Strict value is not equal to itself.")
763816 }
764817
765818
766819
767-@Callable(dj)
768-func put (co,fa) = if ((0 > co))
820+@Callable(dL)
821+func put (cz,fB) = if ((0 > cz))
769822 then throw("Invalid slippageTolerance passed")
770823 else {
771- let dp = dm(dj, co, true)
772- let cQ = dp._2
773- let bV = dp._7
774- let cm = dp._9
775- let cR = dp._10
776- let cS = dp._11
777- let fb = dp._12
778- let fc = dp._13
779- let ds = invoke(aE, "emit", [cQ], nil)
824+ let dR = dO(dL, cz, true)
825+ let db = dR._2
826+ let cg = dR._7
827+ let cx = dR._9
828+ let dc = dR._10
829+ let dd = dR._11
830+ let fC = dR._12
831+ let fD = dR._13
832+ let dP = toBigInt(value(dL.payments[0]).amount)
833+ let dQ = toBigInt(value(dL.payments[1]).amount)
834+ let ds = dl(dP, dQ, toBigInt(0))
780835 if ((ds == ds))
781836 then {
782- let dt = {
783- let du = ds
784- if ($isInstanceOf(du, "Address"))
785- then {
786- let dv = du
787- invoke(dv, "emit", [cQ], nil)
837+ let dU = invoke(aO, "emit", [db], nil)
838+ if ((dU == dU))
839+ then {
840+ let dV = {
841+ let dW = dU
842+ if ($isInstanceOf(dW, "Address"))
843+ then {
844+ let dX = dW
845+ invoke(dX, "emit", [db], nil)
846+ }
847+ else unit
788848 }
789- else unit
790- }
791- if ((dt == dt))
792- then {
793- let fd = if ((cR > 0))
794- then invoke(be, "put", nil, [AttachedPayment(fb, cR)])
795- else nil
796- if ((fd == fd))
849+ if ((dV == dV))
797850 then {
798- let fe = if ((cS > 0))
799- then invoke(be, "put", nil, [AttachedPayment(fc, cS)])
851+ let fE = if ((dc > 0))
852+ then invoke(bo, "put", nil, [AttachedPayment(fC, dc)])
800853 else nil
801- if ((fe == fe))
854+ if ((fE == fE))
802855 then {
803- let ff = if (fa)
856+ let fF = if ((dd > 0))
857+ then invoke(bo, "put", nil, [AttachedPayment(fD, dd)])
858+ else nil
859+ if ((fF == fF))
804860 then {
805- let fg = invoke(bd, "stake", nil, [AttachedPayment(bV, cQ)])
806- if ((fg == fg))
807- then nil
861+ let fG = if (fB)
862+ then {
863+ let fH = invoke(bn, "stake", nil, [AttachedPayment(cg, db)])
864+ if ((fH == fH))
865+ then nil
866+ else throw("Strict value is not equal to itself.")
867+ }
868+ else [ScriptTransfer(dL.caller, db, cg)]
869+ let fI = dt(0, 0, 0)
870+ if ((fI == fI))
871+ then {
872+ let dk = fI._2
873+ let fJ = fI._1
874+ let fK = dx(ds, dk)
875+ if ((fK == fK))
876+ then ((cx ++ fG) ++ fJ)
877+ else throw("Strict value is not equal to itself.")
878+ }
808879 else throw("Strict value is not equal to itself.")
809880 }
810- else [ScriptTransfer(dj.caller, cQ, bV)]
811- (cm ++ ff)
881+ else throw("Strict value is not equal to itself.")
812882 }
813883 else throw("Strict value is not equal to itself.")
814884 }
815885 else throw("Strict value is not equal to itself.")
816886 }
817887 else throw("Strict value is not equal to itself.")
818888 }
819889 else throw("Strict value is not equal to itself.")
820890 }
821891
822892
823893
824-@Callable(dj)
825-func putForFree (fh) = if ((0 > fh))
894+@Callable(dL)
895+func putForFree (fL) = if ((0 > fL))
826896 then throw("Invalid value passed")
827897 else {
828- let dp = dm(dj, fh, false)
829- dp._9
898+ let dR = dO(dL, fL, false)
899+ let cx = dR._9
900+ let dP = toBigInt(value(dL.payments[0]).amount)
901+ let dQ = toBigInt(value(dL.payments[1]).amount)
902+ let ds = dl(dP, dQ, toBigInt(0))
903+ if ((ds == ds))
904+ then {
905+ let fM = dt(0, 0, 0)
906+ let fJ = fM._1
907+ let dk = fM._2
908+ let fK = dx(ds, dk)
909+ if ((fK == fK))
910+ then (cx ++ fJ)
911+ else throw("Strict value is not equal to itself.")
912+ }
913+ else throw("Strict value is not equal to itself.")
830914 }
831915
832916
833917
834-@Callable(dj)
835-func putOneTkn (fi,fj) = {
836- let fk = {
837- let aH = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
838- if ($isInstanceOf(aH, "Boolean"))
839- then aH
840- else throw(($getType(aH) + " couldn't be cast to Boolean"))
918+@Callable(dL)
919+func putOneTkn (fN,fO) = {
920+ let fP = {
921+ let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
922+ if ($isInstanceOf(aR, "Boolean"))
923+ then aR
924+ else throw(($getType(aR) + " couldn't be cast to Boolean"))
841925 }
842- let fl = if (if (if (aJ())
926+ let fQ = if (if (if (aT())
843927 then true
844- else (aW == l))
928+ else (bg == l))
845929 then true
846- else (aW == n))
930+ else (bg == n))
847931 then true
848- else fk
849- let ei = [if (if (!(fl))
932+ else fP
933+ let eH = [if (if (!(fQ))
850934 then true
851- else eC(dj))
935+ else fc(dL))
852936 then true
853- else aC("put operation is blocked by admin"), if ((size(dj.payments) == 1))
937+ else aL("put operation is blocked by admin"), if ((size(dL.payments) == 1))
854938 then true
855- else aC("exactly 1 payment are expected")]
856- if ((ei == ei))
939+ else aL("exactly 1 payment are expected")]
940+ if ((eH == eH))
857941 then {
858- let fm = dj.payments[0]
859- let dB = fm.assetId
860- let dA = fm.amount
861- let ab = dj.caller
862- let ac = dj.transactionId
863- let fn = dz(dA, dB, ab, ac)
864- if ((fn == fn))
942+ let fR = dL.payments[0]
943+ let ec = fR.assetId
944+ let eb = fR.amount
945+ let ds = if ((ec == bi))
946+ then dl(toBigInt(eb), toBigInt(0), toBigInt(0))
947+ else if ((ec == bj))
948+ then dl(toBigInt(0), toBigInt(eb), toBigInt(0))
949+ else aL("payment asset is not supported")
950+ if ((ds == ds))
865951 then {
866- let fo = fn._4
867- let dy = fn._3
868- let cT = fn._2
869- let fp = fn._1
870- let fq = if (if ((fi > 0))
871- then (fi > fp)
872- else false)
873- then aC(makeString(["amount to receive is less than ", toString(fi)], ""))
874- else fp
875- let ds = dq(fq)
876- if ((ds == ds))
952+ let ab = dL.caller
953+ let ac = dL.transactionId
954+ let fS = ea(eb, ec, ab, ac)
955+ if ((fS == fS))
877956 then {
878- let ff = if (fj)
957+ let eg = fS._5
958+ let fT = fS._4
959+ let dZ = fS._3
960+ let de = fS._2
961+ let fU = fS._1
962+ let fV = if (if ((fN > 0))
963+ then (fN > fU)
964+ else false)
965+ then aL(makeString(["amount to receive is less than ", toString(fN)], ""))
966+ else fU
967+ let dU = dS(fV)
968+ if ((dU == dU))
879969 then {
880- let fr = invoke(bd, "stake", nil, [AttachedPayment(aX, fq)])
881- if ((fr == fr))
882- then nil
970+ let fG = if (fO)
971+ then {
972+ let fW = invoke(bn, "stake", nil, [AttachedPayment(bh, fV)])
973+ if ((fW == fW))
974+ then nil
975+ else throw("Strict value is not equal to itself.")
976+ }
977+ else [ScriptTransfer(dL.caller, fV, bh)]
978+ let fX = if ((dZ > 0))
979+ then [ScriptTransfer(aP, dZ, ec)]
980+ else nil
981+ let fY = if ((this == aP))
982+ then $Tuple2(0, 0)
983+ else if (eg)
984+ then $Tuple2(-(dZ), 0)
985+ else $Tuple2(0, -(dZ))
986+ let du = fY._1
987+ let dv = fY._2
988+ let fZ = dt(du, dv, 0)
989+ let fJ = fZ._1
990+ let dk = fZ._2
991+ let dE = value(getString(aj))
992+ let fK = dx(ds, dk)
993+ if ((fK == fK))
994+ then $Tuple2((((de ++ fG) ++ fX) ++ fJ), fV)
883995 else throw("Strict value is not equal to itself.")
884- }
885- else [ScriptTransfer(dj.caller, fq, aX)]
886- let fs = if ((dy > 0))
887- then [ScriptTransfer(aF, dy, dB)]
888- else nil
889- $Tuple2(((cT ++ ff) ++ fs), fq)
890- }
891- else throw("Strict value is not equal to itself.")
892- }
893- else throw("Strict value is not equal to itself.")
894- }
895- else throw("Strict value is not equal to itself.")
896- }
897-
898-
899-
900-@Callable(dj)
901-func putOneTknREADONLY (dB,dA) = {
902- let ft = dz(dA, aO(dB), unit, unit)
903- let fp = ft._1
904- let cT = ft._2
905- let dy = ft._3
906- let fo = ft._4
907- $Tuple2(nil, $Tuple3(fp, dy, fo))
908- }
909-
910-
911-
912-@Callable(dj)
913-func getOneTkn (fu,fi) = {
914- let fk = {
915- let aH = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
916- if ($isInstanceOf(aH, "Boolean"))
917- then aH
918- else throw(($getType(aH) + " couldn't be cast to Boolean"))
919- }
920- let fv = if (if (aJ())
921- then true
922- else (aW == n))
923- then true
924- else fk
925- let ei = [if (if (!(fv))
926- then true
927- else eC(dj))
928- then true
929- else aC("get operation is blocked by admin"), if ((size(dj.payments) == 1))
930- then true
931- else aC("exactly 1 payment are expected")]
932- if ((ei == ei))
933- then {
934- let eh = aO(fu)
935- let fm = dj.payments[0]
936- let dB = fm.assetId
937- let dP = fm.amount
938- let ab = dj.caller
939- let ac = dj.transactionId
940- let fw = eg(eh, dP, dB, ab, ac)
941- if ((fw == fw))
942- then {
943- let fo = fw._4
944- let dy = fw._3
945- let cT = fw._2
946- let fx = fw._1
947- let dr = if (if ((fi > 0))
948- then (fi > fx)
949- else false)
950- then aC(makeString(["amount to receive is less than ", toString(fi)], ""))
951- else fx
952- let fy = invoke(aE, "burn", [dP], [AttachedPayment(dB, dP)])
953- if ((fy == fy))
954- then {
955- let fz = [ScriptTransfer(ab, dr, eh)]
956- let fs = if ((dy > 0))
957- then [ScriptTransfer(aF, dy, eh)]
958- else nil
959- $Tuple2(((cT ++ fz) ++ fs), dr)
960- }
961- else throw("Strict value is not equal to itself.")
962- }
963- else throw("Strict value is not equal to itself.")
964- }
965- else throw("Strict value is not equal to itself.")
966- }
967-
968-
969-
970-@Callable(dj)
971-func getOneTknREADONLY (eh,dP) = {
972- let fA = eg(aO(eh), dP, aX, unit, unit)
973- let fx = fA._1
974- let cT = fA._2
975- let dy = fA._3
976- let fo = fA._4
977- $Tuple2(nil, $Tuple3(fx, dy, fo))
978- }
979-
980-
981-
982-@Callable(dj)
983-func unstakeAndGetOneTkn (fB,fu,fi) = {
984- let fk = {
985- let aH = invoke(aE, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
986- if ($isInstanceOf(aH, "Boolean"))
987- then aH
988- else throw(($getType(aH) + " couldn't be cast to Boolean"))
989- }
990- let fv = if (if (aJ())
991- then true
992- else (aW == n))
993- then true
994- else fk
995- let ei = [if (if (!(fv))
996- then true
997- else eC(dj))
998- then true
999- else aC("get operation is blocked by admin"), if ((size(dj.payments) == 0))
1000- then true
1001- else aC("no payments are expected")]
1002- if ((ei == ei))
1003- then {
1004- let eh = aO(fu)
1005- let ab = dj.caller
1006- let ac = dj.transactionId
1007- let fC = invoke(bd, "unstake", [toBase58String(aX), fB], nil)
1008- if ((fC == fC))
1009- then {
1010- let fD = eg(eh, fB, aX, ab, ac)
1011- if ((fD == fD))
1012- then {
1013- let fo = fD._4
1014- let dy = fD._3
1015- let cT = fD._2
1016- let fx = fD._1
1017- let dr = if (if ((fi > 0))
1018- then (fi > fx)
1019- else false)
1020- then aC(makeString(["amount to receive is less than ", toString(fi)], ""))
1021- else fx
1022- let fy = invoke(aE, "burn", [fB], [AttachedPayment(aX, fB)])
1023- if ((fy == fy))
1024- then {
1025- let fz = [ScriptTransfer(dj.caller, dr, eh)]
1026- let fs = if ((dy > 0))
1027- then [ScriptTransfer(aF, dy, eh)]
1028- else nil
1029- $Tuple2(((cT ++ fz) ++ fs), dr)
1030996 }
1031997 else throw("Strict value is not equal to itself.")
1032998 }
1033999 else throw("Strict value is not equal to itself.")
10341000 }
10351001 else throw("Strict value is not equal to itself.")
10361002 }
10371003 else throw("Strict value is not equal to itself.")
10381004 }
10391005
10401006
10411007
1042-@Callable(dj)
1043-func get () = {
1044- let cE = di(dj)
1045- let fE = cE._1
1046- let cl = cE._2
1047- let dl = cE._3
1048- let bT = cE._4
1049- let cm = cE._5
1050- let fF = invoke(aE, "burn", [dl], [AttachedPayment(bT, dl)])
1051- if ((fF == fF))
1052- then cm
1053- else throw("Strict value is not equal to itself.")
1008+@Callable(dL)
1009+func putOneTknREADONLY (ec,eb) = {
1010+ let ga = ea(eb, aY(ec), unit, unit)
1011+ let fU = ga._1
1012+ let de = ga._2
1013+ let dZ = ga._3
1014+ let fT = ga._4
1015+ let eg = ga._5
1016+ $Tuple2(nil, $Tuple3(fU, dZ, fT))
10541017 }
10551018
10561019
10571020
1058-@Callable(dj)
1059-func getNoLess (fG,fH) = {
1060- let cE = di(dj)
1061- let ck = cE._1
1062- let cl = cE._2
1063- let dl = cE._3
1064- let bT = cE._4
1065- let cm = cE._5
1066- if ((fG > ck))
1067- then throw(((("noLessThenAmtAsset failed: " + toString(ck)) + " < ") + toString(fG)))
1068- else if ((fH > cl))
1069- then throw(((("noLessThenPriceAsset failed: " + toString(cl)) + " < ") + toString(fH)))
1070- else {
1071- let fF = invoke(aE, "burn", [dl], [AttachedPayment(bT, dl)])
1072- if ((fF == fF))
1073- then cm
1074- else throw("Strict value is not equal to itself.")
1075- }
1076- }
1077-
1078-
1079-
1080-@Callable(dj)
1081-func unstakeAndGet (dr) = {
1082- let fI = if ((size(dj.payments) != 0))
1083- then throw("No payments are expected")
1084- else true
1085- if ((fI == fI))
1021+@Callable(dL)
1022+func getOneTkn (gb,fN) = {
1023+ let fP = {
1024+ let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1025+ if ($isInstanceOf(aR, "Boolean"))
1026+ then aR
1027+ else throw(($getType(aR) + " couldn't be cast to Boolean"))
1028+ }
1029+ let gc = if (if (aT())
1030+ then true
1031+ else (bg == n))
1032+ then true
1033+ else fP
1034+ let eH = [if (if (!(gc))
1035+ then true
1036+ else fc(dL))
1037+ then true
1038+ else aL("get operation is blocked by admin"), if ((size(dL.payments) == 1))
1039+ then true
1040+ else aL("exactly 1 payment are expected")]
1041+ if ((eH == eH))
10861042 then {
1087- let bI = aL()
1088- let bV = fromBase58String(bI[q])
1089- let fC = invoke(bd, "unstake", [toBase58String(bV), dr], nil)
1090- if ((fC == fC))
1043+ let eG = aY(gb)
1044+ let fR = dL.payments[0]
1045+ let ec = fR.assetId
1046+ let eo = fR.amount
1047+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1048+ if ((ds == ds))
10911049 then {
1092- let cE = bR(toBase58String(dj.transactionId), toBase58String(bV), dr, dj.caller)
1093- let bY = parseIntValue(cE._9)
1094- let cm = cE._10
1095- let fJ = if (if (aJ())
1096- then true
1097- else (bY == n))
1098- then throw(("Get operation is blocked by admin. Status = " + toString(bY)))
1099- else true
1100- if ((fJ == fJ))
1050+ let ab = dL.caller
1051+ let ac = dL.transactionId
1052+ let gd = eF(eG, eo, ec, ab, ac)
1053+ if ((gd == gd))
11011054 then {
1102- let fF = invoke(aE, "burn", [dr], [AttachedPayment(bV, dr)])
1103- if ((fF == fF))
1104- then cm
1055+ let eI = gd._5
1056+ let fT = gd._4
1057+ let dZ = gd._3
1058+ let de = gd._2
1059+ let ge = gd._1
1060+ let dT = if (if ((fN > 0))
1061+ then (fN > ge)
1062+ else false)
1063+ then aL(makeString(["amount to receive is less than ", toString(fN)], ""))
1064+ else ge
1065+ let gf = invoke(aO, "burn", [eo], [AttachedPayment(ec, eo)])
1066+ if ((gf == gf))
1067+ then {
1068+ let gg = [ScriptTransfer(ab, dT, eG)]
1069+ let fX = if ((dZ > 0))
1070+ then [ScriptTransfer(aP, dZ, eG)]
1071+ else nil
1072+ let gh = {
1073+ let gi = if ((this == aP))
1074+ then 0
1075+ else dZ
1076+ if (eI)
1077+ then $Tuple2(-((dT + gi)), 0)
1078+ else $Tuple2(0, -((dT + gi)))
1079+ }
1080+ let du = gh._1
1081+ let dv = gh._2
1082+ let gj = dt(du, dv, 0)
1083+ let fJ = gj._1
1084+ let dk = gj._2
1085+ let fK = dx(ds, dk)
1086+ if ((fK == fK))
1087+ then $Tuple2((((de ++ gg) ++ fX) ++ fJ), dT)
1088+ else throw("Strict value is not equal to itself.")
1089+ }
11051090 else throw("Strict value is not equal to itself.")
11061091 }
11071092 else throw("Strict value is not equal to itself.")
11081093 }
11091094 else throw("Strict value is not equal to itself.")
11101095 }
11111096 else throw("Strict value is not equal to itself.")
11121097 }
11131098
11141099
11151100
1116-@Callable(dj)
1117-func unstakeAndGetNoLess (fB,fK,fH) = {
1118- let fv = if (aJ())
1101+@Callable(dL)
1102+func getOneTknREADONLY (eG,eo) = {
1103+ let gk = eF(aY(eG), eo, bh, unit, unit)
1104+ let ge = gk._1
1105+ let de = gk._2
1106+ let dZ = gk._3
1107+ let fT = gk._4
1108+ let eI = gk._5
1109+ $Tuple2(nil, $Tuple3(ge, dZ, fT))
1110+ }
1111+
1112+
1113+
1114+@Callable(dL)
1115+func unstakeAndGetOneTkn (gl,gb,fN) = {
1116+ let fP = {
1117+ let aR = invoke(aO, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1118+ if ($isInstanceOf(aR, "Boolean"))
1119+ then aR
1120+ else throw(($getType(aR) + " couldn't be cast to Boolean"))
1121+ }
1122+ let gc = if (if (aT())
11191123 then true
1120- else (aW == n)
1121- let ei = [if (!(fv))
1124+ else (bg == n))
11221125 then true
1123- else throw("get operation is blocked by admin"), if ((size(dj.payments) == 0))
1126+ else fP
1127+ let eH = [if (if (!(gc))
11241128 then true
1125- else throw("no payments are expected")]
1126- if ((ei == ei))
1129+ else fc(dL))
1130+ then true
1131+ else aL("get operation is blocked by admin"), if ((size(dL.payments) == 0))
1132+ then true
1133+ else aL("no payments are expected")]
1134+ if ((eH == eH))
11271135 then {
1128- let fC = invoke(bd, "unstake", [toBase58String(aX), fB], nil)
1129- if ((fC == fC))
1136+ let eG = aY(gb)
1137+ let ab = dL.caller
1138+ let ac = dL.transactionId
1139+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1140+ if ((ds == ds))
11301141 then {
1131- let cE = bR(toBase58String(dj.transactionId), toBase58String(aX), fB, dj.caller)
1132- let ck = cE._1
1133- let cl = cE._2
1134- let cm = cE._10
1135- let fL = [if ((ck >= fK))
1136- then true
1137- else throw(makeString(["amount asset amount to receive is less than ", toString(fK)], "")), if ((cl >= fH))
1138- then true
1139- else throw(makeString(["price asset amount to receive is less than ", toString(fH)], ""))]
1140- if ((fL == fL))
1142+ let gm = invoke(bn, "unstake", [toBase58String(bh), gl], nil)
1143+ if ((gm == gm))
11411144 then {
1142- let fF = invoke(aE, "burn", [fB], [AttachedPayment(aX, fB)])
1143- if ((fF == fF))
1144- then cm
1145+ let gn = eF(eG, gl, bh, ab, ac)
1146+ if ((gn == gn))
1147+ then {
1148+ let eI = gn._5
1149+ let fT = gn._4
1150+ let dZ = gn._3
1151+ let de = gn._2
1152+ let ge = gn._1
1153+ let dT = if (if ((fN > 0))
1154+ then (fN > ge)
1155+ else false)
1156+ then aL(makeString(["amount to receive is less than ", toString(fN)], ""))
1157+ else ge
1158+ let gf = invoke(aO, "burn", [gl], [AttachedPayment(bh, gl)])
1159+ if ((gf == gf))
1160+ then {
1161+ let gg = [ScriptTransfer(dL.caller, dT, eG)]
1162+ let fX = if ((dZ > 0))
1163+ then [ScriptTransfer(aP, dZ, eG)]
1164+ else nil
1165+ let go = {
1166+ let gi = if ((this == aP))
1167+ then 0
1168+ else dZ
1169+ if (eI)
1170+ then $Tuple2(-((dT + gi)), 0)
1171+ else $Tuple2(0, -((dT + gi)))
1172+ }
1173+ let du = go._1
1174+ let dv = go._2
1175+ let gp = dt(du, dv, 0)
1176+ let fJ = gp._1
1177+ let dk = gp._2
1178+ let fK = dx(ds, dk)
1179+ if ((fK == fK))
1180+ then $Tuple2((((de ++ gg) ++ fX) ++ fJ), dT)
1181+ else throw("Strict value is not equal to itself.")
1182+ }
1183+ else throw("Strict value is not equal to itself.")
1184+ }
11451185 else throw("Strict value is not equal to itself.")
11461186 }
11471187 else throw("Strict value is not equal to itself.")
11481188 }
11491189 else throw("Strict value is not equal to itself.")
11501190 }
11511191 else throw("Strict value is not equal to itself.")
11521192 }
11531193
11541194
11551195
1156-@Callable(dj)
1157-func activate (fM,fN) = if ((toString(dj.caller) != toString(aE)))
1158- then throw("permissions denied")
1159- else $Tuple2([StringEntry(ae(), fM), StringEntry(af(), fN)], "success")
1160-
1161-
1162-
1163-@Callable(dj)
1164-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aL())
1165-
1166-
1167-
1168-@Callable(dj)
1169-func getAccBalanceWrapperREADONLY (bv) = $Tuple2(nil, bu(bv))
1170-
1171-
1172-
1173-@Callable(dj)
1174-func calcPricesWrapperREADONLY (bC,bD,bH) = {
1175- let bQ = bG(bC, bD, bH)
1176- $Tuple2(nil, [toString(bQ[0]), toString(bQ[1]), toString(bQ[2])])
1196+@Callable(dL)
1197+func get () = {
1198+ let cP = dK(dL)
1199+ let gq = cP._1
1200+ let cw = cP._2
1201+ let dN = cP._3
1202+ let ce = cP._4
1203+ let cx = cP._5
1204+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1205+ if ((ds == ds))
1206+ then {
1207+ let gr = invoke(aO, "burn", [dN], [AttachedPayment(ce, dN)])
1208+ if ((gr == gr))
1209+ then {
1210+ let gs = dt(-(gq), -(cw), 0)
1211+ let fJ = gs._1
1212+ let dk = gs._2
1213+ let fK = dx(ds, dk)
1214+ if ((fK == fK))
1215+ then (cx ++ fJ)
1216+ else throw("Strict value is not equal to itself.")
1217+ }
1218+ else throw("Strict value is not equal to itself.")
1219+ }
1220+ else throw("Strict value is not equal to itself.")
11771221 }
11781222
11791223
11801224
1181-@Callable(dj)
1225+@Callable(dL)
1226+func getNoLess (gt,gu) = {
1227+ let cP = dK(dL)
1228+ let cv = cP._1
1229+ let cw = cP._2
1230+ let dN = cP._3
1231+ let ce = cP._4
1232+ let cx = cP._5
1233+ if ((gt > cv))
1234+ then throw(((("noLessThenAmtAsset failed: " + toString(cv)) + " < ") + toString(gt)))
1235+ else if ((gu > cw))
1236+ then throw(((("noLessThenPriceAsset failed: " + toString(cw)) + " < ") + toString(gu)))
1237+ else {
1238+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1239+ if ((ds == ds))
1240+ then {
1241+ let gr = invoke(aO, "burn", [dN], [AttachedPayment(ce, dN)])
1242+ if ((gr == gr))
1243+ then {
1244+ let gv = dt(-(cv), -(cw), 0)
1245+ let fJ = gv._1
1246+ let dk = gv._2
1247+ let fK = dx(ds, dk)
1248+ if ((fK == fK))
1249+ then (cx ++ fJ)
1250+ else throw("Strict value is not equal to itself.")
1251+ }
1252+ else throw("Strict value is not equal to itself.")
1253+ }
1254+ else throw("Strict value is not equal to itself.")
1255+ }
1256+ }
1257+
1258+
1259+
1260+@Callable(dL)
1261+func unstakeAndGet (dT) = {
1262+ let gw = if ((size(dL.payments) != 0))
1263+ then throw("No payments are expected")
1264+ else true
1265+ if ((gw == gw))
1266+ then {
1267+ let bT = aV()
1268+ let cg = fromBase58String(bT[q])
1269+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1270+ if ((ds == ds))
1271+ then {
1272+ let gm = invoke(bn, "unstake", [toBase58String(cg), dT], nil)
1273+ if ((gm == gm))
1274+ then {
1275+ let cP = cc(toBase58String(dL.transactionId), toBase58String(cg), dT, dL.caller)
1276+ let cv = cP._1
1277+ let cw = cP._2
1278+ let cj = parseIntValue(cP._9)
1279+ let cx = cP._10
1280+ let gx = if (if (aT())
1281+ then true
1282+ else (cj == n))
1283+ then throw(("Get operation is blocked by admin. Status = " + toString(cj)))
1284+ else true
1285+ if ((gx == gx))
1286+ then {
1287+ let gr = invoke(aO, "burn", [dT], [AttachedPayment(cg, dT)])
1288+ if ((gr == gr))
1289+ then {
1290+ let gy = dt(-(cv), -(cw), 0)
1291+ let fJ = gy._1
1292+ let dk = gy._2
1293+ let fK = dx(ds, dk)
1294+ if ((fK == fK))
1295+ then (cx ++ fJ)
1296+ else throw("Strict value is not equal to itself.")
1297+ }
1298+ else throw("Strict value is not equal to itself.")
1299+ }
1300+ else throw("Strict value is not equal to itself.")
1301+ }
1302+ else throw("Strict value is not equal to itself.")
1303+ }
1304+ else throw("Strict value is not equal to itself.")
1305+ }
1306+ else throw("Strict value is not equal to itself.")
1307+ }
1308+
1309+
1310+
1311+@Callable(dL)
1312+func unstakeAndGetNoLess (gl,gz,gu) = {
1313+ let gc = if (aT())
1314+ then true
1315+ else (bg == n)
1316+ let eH = [if (!(gc))
1317+ then true
1318+ else throw("get operation is blocked by admin"), if ((size(dL.payments) == 0))
1319+ then true
1320+ else throw("no payments are expected")]
1321+ if ((eH == eH))
1322+ then {
1323+ let ds = dl(toBigInt(0), toBigInt(0), toBigInt(0))
1324+ if ((ds == ds))
1325+ then {
1326+ let gm = invoke(bn, "unstake", [toBase58String(bh), gl], nil)
1327+ if ((gm == gm))
1328+ then {
1329+ let cP = cc(toBase58String(dL.transactionId), toBase58String(bh), gl, dL.caller)
1330+ let cv = cP._1
1331+ let cw = cP._2
1332+ let cx = cP._10
1333+ let gA = [if ((cv >= gz))
1334+ then true
1335+ else throw(makeString(["amount asset amount to receive is less than ", toString(gz)], "")), if ((cw >= gu))
1336+ then true
1337+ else throw(makeString(["price asset amount to receive is less than ", toString(gu)], ""))]
1338+ if ((gA == gA))
1339+ then {
1340+ let gr = invoke(aO, "burn", [gl], [AttachedPayment(bh, gl)])
1341+ if ((gr == gr))
1342+ then {
1343+ let gB = dt(-(cv), -(cw), 0)
1344+ let fJ = gB._1
1345+ let dk = gB._2
1346+ let fK = dx(ds, dk)
1347+ if ((fK == fK))
1348+ then (cx ++ fJ)
1349+ else throw("Strict value is not equal to itself.")
1350+ }
1351+ else throw("Strict value is not equal to itself.")
1352+ }
1353+ else throw("Strict value is not equal to itself.")
1354+ }
1355+ else throw("Strict value is not equal to itself.")
1356+ }
1357+ else throw("Strict value is not equal to itself.")
1358+ }
1359+ else throw("Strict value is not equal to itself.")
1360+ }
1361+
1362+
1363+
1364+@Callable(dL)
1365+func activate (gC,gD) = if ((toString(dL.caller) != toString(aO)))
1366+ then throw("permissions denied")
1367+ else $Tuple2([StringEntry(ae(), gC), StringEntry(af(), gD)], "success")
1368+
1369+
1370+
1371+@Callable(dL)
1372+func refreshKLp () = {
1373+ let gE = valueOrElse(getInteger(ak), 0)
1374+ let gF = if (((height - gE) >= an))
1375+ then unit
1376+ else aL(makeString([toString(an), " blocks have not passed since the previous call"], ""))
1377+ if ((gF == gF))
1378+ then {
1379+ let dE = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aN("invalid kLp"))
1380+ let gG = dt(0, 0, 0)
1381+ let gH = gG._1
1382+ let dk = gG._2
1383+ let dw = if ((dE != dk))
1384+ then gH
1385+ else aL("nothing to refresh")
1386+ $Tuple2(dw, toString(dk))
1387+ }
1388+ else throw("Strict value is not equal to itself.")
1389+ }
1390+
1391+
1392+
1393+@Callable(dL)
1394+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aV())
1395+
1396+
1397+
1398+@Callable(dL)
1399+func getAccBalanceWrapperREADONLY (bF) = $Tuple2(nil, bE(bF))
1400+
1401+
1402+
1403+@Callable(dL)
1404+func calcPricesWrapperREADONLY (bN,bO,bS) = {
1405+ let cb = bR(bN, bO, bS)
1406+ $Tuple2(nil, [toString(cb[0]), toString(cb[1]), toString(cb[2])])
1407+ }
1408+
1409+
1410+
1411+@Callable(dL)
11821412 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
11831413
11841414
11851415
1186-@Callable(dj)
1416+@Callable(dL)
11871417 func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J))
11881418
11891419
11901420
1191-@Callable(dj)
1192-func calcPriceBigIntWrapperREADONLY (bx,by) = $Tuple2(nil, toString(bw(parseBigIntValue(bx), parseBigIntValue(by))))
1421+@Callable(dL)
1422+func calcPriceBigIntWrapperREADONLY (bH,bI) = $Tuple2(nil, toString(bG(parseBigIntValue(bH), parseBigIntValue(bI))))
11931423
11941424
11951425
1196-@Callable(dj)
1197-func estimatePutOperationWrapperREADONLY (bS,co,cp,cq,cr,cs,ab,ct,cu) = $Tuple2(nil, cn(bS, co, cp, cq, cr, cs, ab, ct, cu))
1426+@Callable(dL)
1427+func estimatePutOperationWrapperREADONLY (cd,cz,cA,cB,cC,cD,ab,cE,cF) = $Tuple2(nil, cy(cd, cz, cA, cB, cC, cD, ab, cE, cF))
11981428
11991429
12001430
1201-@Callable(dj)
1202-func estimateGetOperationWrapperREADONLY (bS,bT,bU,ab) = {
1203- let cE = bR(bS, bT, bU, addressFromStringValue(ab))
1204- $Tuple2(nil, $Tuple10(cE._1, cE._2, cE._3, cE._4, cE._5, cE._6, cE._7, toString(cE._8), cE._9, cE._10))
1431+@Callable(dL)
1432+func estimateGetOperationWrapperREADONLY (cd,ce,cf,ab) = {
1433+ let cP = cc(cd, ce, cf, addressFromStringValue(ab))
1434+ $Tuple2(nil, $Tuple10(cP._1, cP._2, cP._3, cP._4, cP._5, cP._6, cP._7, toString(cP._8), cP._9, cP._10))
12051435 }
12061436
12071437
12081438
1209-@Callable(dj)
1439+@Callable(dL)
12101440 func statsREADONLY () = {
1211- let bI = aL()
1212- let bV = fromBase58String(bI[q])
1213- let cW = bI[r]
1214- let cX = bI[s]
1215- let cx = bI[v]
1216- let cy = bI[w]
1217- let bJ = parseIntValue(bI[t])
1218- let bK = parseIntValue(bI[u])
1219- let fO = valueOrErrorMessage(assetInfo(bV), (("Asset " + toBase58String(bV)) + " doesn't exist")).quantity
1220- let cY = bu(cW)
1221- let cZ = bu(cX)
1222- let fP = if ((fO == 0))
1441+ let bT = aV()
1442+ let cg = fromBase58String(bT[q])
1443+ let gI = bT[r]
1444+ let gJ = bT[s]
1445+ let cI = bT[v]
1446+ let cJ = bT[w]
1447+ let bU = parseIntValue(bT[t])
1448+ let bV = parseIntValue(bT[u])
1449+ let gK = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1450+ let gL = bE(gI)
1451+ let gM = bE(gJ)
1452+ let gN = if ((gK == 0))
12231453 then [e, e, e]
1224- else bG(cY, cZ, fO)
1225- let cf = 0
1226- let fQ = H(fP[1], b)
1227- let fR = H(fP[2], b)
1228- let fS = value(getInteger(aE, aq(toString(this))))
1229- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cY), toString(cZ), toString(fO), toString(cf), toString(fQ), toString(fR), toString(fS)], j))
1454+ else bR(gL, gM, gK)
1455+ let cq = 0
1456+ let gO = H(gN[1], b)
1457+ let gP = H(gN[2], b)
1458+ let gQ = value(getInteger(aO, ay(toString(this))))
1459+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gL), toString(gM), toString(gK), toString(cq), toString(gO), toString(gP), toString(gQ)], j))
12301460 }
12311461
12321462
12331463
1234-@Callable(dj)
1235-func evaluatePutByAmountAssetREADONLY (cp) = {
1236- let bI = aL()
1237- let bV = fromBase58String(bI[q])
1238- let cv = bI[r]
1239- let bW = fromBase58String(cv)
1240- let cw = bI[s]
1241- let bX = fromBase58String(cw)
1242- let bJ = parseIntValue(bI[t])
1243- let bK = parseIntValue(bI[u])
1244- let bY = bI[p]
1245- let fO = valueOrErrorMessage(assetInfo(bV), (("Asset " + toBase58String(bV)) + " doesn't exist")).quantity
1246- let cY = bu(cv)
1247- let cZ = bu(cw)
1248- let bE = D(cY, bJ)
1249- let bF = D(cZ, bK)
1250- let ce = if ((fO == 0))
1464+@Callable(dL)
1465+func evaluatePutByAmountAssetREADONLY (cA) = {
1466+ let bT = aV()
1467+ let cg = fromBase58String(bT[q])
1468+ let cG = bT[r]
1469+ let ch = fromBase58String(cG)
1470+ let cH = bT[s]
1471+ let ci = fromBase58String(cH)
1472+ let bU = parseIntValue(bT[t])
1473+ let bV = parseIntValue(bT[u])
1474+ let cj = bT[p]
1475+ let gK = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1476+ let gL = bE(cG)
1477+ let gM = bE(cH)
1478+ let bP = D(gL, bU)
1479+ let bQ = D(gM, bV)
1480+ let cp = if ((gK == 0))
12511481 then e
1252- else bw(bF, bE)
1253- let cB = D(cp, bJ)
1254- let cC = fraction(cB, ce, d)
1255- let cr = H(cC, bK)
1256- let dp = cn("", 500000, cp, bW, cr, bX, "", true, false)
1257- let cM = dp._1
1258- let fT = dp._3
1259- let ca = dp._4
1260- let cc = dp._5
1261- let bZ = dp._6
1262- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cM), toString(H(ce, b)), toString(ca), toString(cc), toString(bZ), bY, toString(cp), toString(cr)], j))
1482+ else bG(bQ, bP)
1483+ let cM = D(cA, bU)
1484+ let cN = fraction(cM, cp, d)
1485+ let cC = H(cN, bV)
1486+ let dR = cy("", 500000, cA, ch, cC, ci, "", true, false)
1487+ let cX = dR._1
1488+ let gR = dR._3
1489+ let cl = dR._4
1490+ let cn = dR._5
1491+ let ck = dR._6
1492+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cX), toString(H(cp, b)), toString(cl), toString(cn), toString(ck), cj, toString(cA), toString(cC)], j))
12631493 }
12641494
12651495
12661496
1267-@Callable(dj)
1268-func evaluatePutByPriceAssetREADONLY (cr) = {
1269- let bI = aL()
1270- let bV = fromBase58String(bI[q])
1271- let cv = bI[r]
1272- let bW = fromBase58String(cv)
1273- let cw = bI[s]
1274- let bX = fromBase58String(cw)
1275- let bJ = parseIntValue(bI[t])
1276- let bK = parseIntValue(bI[u])
1277- let bY = bI[p]
1278- let fO = valueOrErrorMessage(assetInfo(bV), (("Asset " + toBase58String(bV)) + " doesn't exist")).quantity
1279- let fU = bu(cv)
1280- let fV = bu(cw)
1281- let fW = D(fU, bJ)
1282- let fX = D(fV, bK)
1283- let ce = if ((fO == 0))
1497+@Callable(dL)
1498+func evaluatePutByPriceAssetREADONLY (cC) = {
1499+ let bT = aV()
1500+ let cg = fromBase58String(bT[q])
1501+ let cG = bT[r]
1502+ let ch = fromBase58String(cG)
1503+ let cH = bT[s]
1504+ let ci = fromBase58String(cH)
1505+ let bU = parseIntValue(bT[t])
1506+ let bV = parseIntValue(bT[u])
1507+ let cj = bT[p]
1508+ let gK = valueOrErrorMessage(assetInfo(cg), (("Asset " + toBase58String(cg)) + " doesn't exist")).quantity
1509+ let gS = bE(cG)
1510+ let gT = bE(cH)
1511+ let gU = D(gS, bU)
1512+ let gV = D(gT, bV)
1513+ let cp = if ((gK == 0))
12841514 then e
1285- else bw(fX, fW)
1286- let cC = D(cr, bK)
1287- let cB = fraction(cC, d, ce)
1288- let cp = H(cB, bJ)
1289- let dp = cn("", 500000, cp, bW, cr, bX, "", true, false)
1290- let cM = dp._1
1291- let fT = dp._3
1292- let ca = dp._4
1293- let cc = dp._5
1294- let bZ = dp._6
1295- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cM), toString(H(ce, b)), toString(ca), toString(cc), toString(bZ), bY, toString(cp), toString(cr)], j))
1515+ else bG(gV, gU)
1516+ let cN = D(cC, bV)
1517+ let cM = fraction(cN, d, cp)
1518+ let cA = H(cM, bU)
1519+ let dR = cy("", 500000, cA, ch, cC, ci, "", true, false)
1520+ let cX = dR._1
1521+ let gR = dR._3
1522+ let cl = dR._4
1523+ let cn = dR._5
1524+ let ck = dR._6
1525+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cX), toString(H(cp, b)), toString(cl), toString(cn), toString(ck), cj, toString(cA), toString(cC)], j))
12961526 }
12971527
12981528
12991529
1300-@Callable(dj)
1301-func evaluateGetREADONLY (fY,fZ) = {
1302- let cE = bR("", fY, fZ, this)
1303- let ck = cE._1
1304- let cl = cE._2
1305- let ca = cE._5
1306- let cc = cE._6
1307- let bZ = cE._7
1308- let cf = cE._8
1309- let bY = parseIntValue(cE._9)
1310- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(ck), toString(cl), toString(ca), toString(cc), toString(bZ), toString(cf), toString(bY)], j))
1530+@Callable(dL)
1531+func evaluateGetREADONLY (gW,gX) = {
1532+ let cP = cc("", gW, gX, this)
1533+ let cv = cP._1
1534+ let cw = cP._2
1535+ let cl = cP._5
1536+ let cn = cP._6
1537+ let ck = cP._7
1538+ let cq = cP._8
1539+ let cj = parseIntValue(cP._9)
1540+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cv), toString(cw), toString(cl), toString(cn), toString(ck), toString(cq), toString(cj)], j))
13111541 }
13121542
13131543
1314-@Verifier(ga)
1315-func gb () = {
1316- let gc = {
1317- let du = ez()
1318- if ($isInstanceOf(du, "ByteVector"))
1544+@Verifier(gY)
1545+func gZ () = {
1546+ let ha = {
1547+ let dW = eZ()
1548+ if ($isInstanceOf(dW, "ByteVector"))
13191549 then {
1320- let eD = du
1321- eD
1550+ let fd = dW
1551+ fd
13221552 }
1323- else if ($isInstanceOf(du, "Unit"))
1324- then ga.senderPublicKey
1553+ else if ($isInstanceOf(dW, "Unit"))
1554+ then gY.senderPublicKey
13251555 else throw("Match error")
13261556 }
1327- let du = ga
1328- if ($isInstanceOf(du, "Order"))
1557+ let dW = gY
1558+ if ($isInstanceOf(dW, "Order"))
13291559 then {
1330- let cV = du
1331- let gd = aK()
1332- let av = cU(cV)
1333- let aw = sigVerify(cV.bodyBytes, cV.proofs[0], cV.senderPublicKey)
1334- let ax = sigVerify(cV.bodyBytes, cV.proofs[1], gd)
1335- if (if (if (av)
1336- then aw
1560+ let dA = dW
1561+ let hb = aU()
1562+ let hc = dz(dA)
1563+ let aD = hc._1
1564+ let aE = hc._2
1565+ let aF = sigVerify(dA.bodyBytes, dA.proofs[0], dA.senderPublicKey)
1566+ let aG = sigVerify(dA.bodyBytes, dA.proofs[1], hb)
1567+ if (if (if (aD)
1568+ then aF
13371569 else false)
1338- then ax
1570+ then aG
13391571 else false)
13401572 then true
1341- else au(av, aw, ax)
1573+ else aC(aD, aE, aF, aG)
13421574 }
1343- else if ($isInstanceOf(du, "SetScriptTransaction"))
1575+ else if ($isInstanceOf(dW, "SetScriptTransaction"))
13441576 then {
1345- let eA = du
1346- let ge = blake2b256(value(eA.script))
1347- let gf = fromBase64String(value(getString(aE, as())))
1348- let gg = scriptHash(this)
1349- if (if ((gf == ge))
1350- then (gg != ge)
1351- else false)
1577+ let fa = dW
1578+ if (sigVerify(gY.bodyBytes, gY.proofs[0], ha))
13521579 then true
1353- else sigVerify(ga.bodyBytes, ga.proofs[0], gc)
1580+ else {
1581+ let hd = blake2b256(value(fa.script))
1582+ let he = fromBase64String(value(getString(aO, aA())))
1583+ let hf = scriptHash(this)
1584+ if ((he == hd))
1585+ then (hf != hd)
1586+ else false
1587+ }
13541588 }
1355- else sigVerify(ga.bodyBytes, ga.proofs[0], gc)
1589+ else sigVerify(gY.bodyBytes, gY.proofs[0], ha)
13561590 }
13571591

github/deemru/w8io/026f985 
351.16 ms