tx · 23HB4bSR3CPyvw7dMasHNEejo5mZ3rdYXSh48LK82JHj

3N8iNNRC4UfDK4aJctSvHajiZ81fzSumCeP:  -0.03600000 Waves

2023.02.09 15:49 [2442107] smart account 3N8iNNRC4UfDK4aJctSvHajiZ81fzSumCeP > SELF 0.00000000 Waves

{ "type": 13, "id": "23HB4bSR3CPyvw7dMasHNEejo5mZ3rdYXSh48LK82JHj", "fee": 3600000, "feeAssetId": null, "timestamp": 1675946968257, "version": 1, "sender": "3N8iNNRC4UfDK4aJctSvHajiZ81fzSumCeP", "senderPublicKey": "F7NZd812aXMUyDcj1XaB3wgMJXJfUsq3RhPhrEZ9b6ND", "proofs": [ "5ASienzpGSBReJUY5QiPCRkgxxxgmhoz9MFxqbNjFR2eG7VP5dsJD67V586yp4p49NyzS4eqRJo1avU1LHXb1uFk" ], "script": "base64:BgKBLggCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXNzZXREY20iEm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YDCQD0AwMIBQJnSQlib2R5Qnl0ZXMJAJEDAggFAmdJBnByb29mcwAABQJnSwYEAmdOCQD2AwEJAQV2YWx1ZQEIBQJlWgZzY3JpcHQEAmdPCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYU4JAQJhegAEAmdQCQDxBwEFBHRoaXMDCQAAAgUCZ08FAmdOCQECIT0CBQJnUAUCZ04HCQD0AwMIBQJnSQlib2R5Qnl0ZXMJAJEDAggFAmdJBnByb29mcwAABQJnS0Hdfx8=", "chainId": 84, "height": 2442107, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CJZHVX7YsVEwgzRG1XUWFNzB5pFEArttLYuW7nXLABVf Next: 5KZBESpdB1ndZa6iQt8mVoZy5iBoBqyPisyM87o7n4Zx Diff:
OldNewDifferences
8484 else I
8585
8686
87-func S () = "%s__swapContract"
87+func S () = "%s__factoryContract"
8888
8989
90-func T () = "%s__factoryContract"
90+func T () = "%s__managerPublicKey"
9191
9292
93-func U () = "%s__managerPublicKey"
93+func U () = "%s__pendingManagerPublicKey"
9494
9595
96-func V () = "%s__pendingManagerPublicKey"
96+func V () = "%s%s__price__last"
9797
9898
99-func W () = "%s%s__price__last"
99+func W (X,Y) = makeString(["%s%s%d%d__price__history", toString(X), toString(Y)], j)
100100
101101
102-func X (Y,Z) = makeString(["%s%s%d%d__price__history", toString(Y), toString(Z)], j)
102+func Z (aa,ab) = ((("%s%s%s__P__" + aa) + "__") + ab)
103103
104104
105-func aa (ab,ac) = ((("%s%s%s__P__" + ab) + "__") + ac)
105+func ac (aa,ab) = ((("%s%s%s__G__" + aa) + "__") + ab)
106106
107107
108-func ad (ab,ac) = ((("%s%s%s__G__" + ab) + "__") + ac)
108+func ad () = "%s__amountAsset"
109109
110110
111-func ae () = "%s__amountAsset"
111+func ae () = "%s__priceAsset"
112112
113113
114-func af () = "%s__priceAsset"
114+let af = "%s__fee"
115+
116+let ag = fraction(10, b, 10000)
117+
118+let ah = valueOrElse(getInteger(this, af), ag)
119+
120+let ai = makeString(["%s", "kLp"], j)
121+
122+let aj = makeString(["%s", "kLpRefreshedHeight"], j)
123+
124+let ak = makeString(["%s", "refreshKLpDelay"], j)
125+
126+let al = 30
127+
128+let am = valueOrElse(getInteger(this, ak), al)
129+
130+func an () = "%s__factoryConfig"
115131
116132
117-func ag () = "%s__factoryConfig"
133+func ao () = "%s%s__matcher__publicKey"
118134
119135
120-func ah () = "%s%s__matcher__publicKey"
136+func ap (aq) = (("%s%s%s__" + aq) + "__mappings__poolContract2LpAsset")
121137
122138
123-func ai (aj) = (("%s%s%s__" + aj) + "__mappings__poolContract2LpAsset")
139+func ar (as,at) = (((("%d%d%s__" + as) + "__") + at) + "__config")
124140
125141
126-func ak (al,am) = (((("%d%d%s__" + al) + "__") + am) + "__config")
142+func au (av) = ("%s%s%s__mappings__baseAsset2internalId__" + av)
127143
128144
129-func an (ao) = ("%s%s%s__mappings__baseAsset2internalId__" + ao)
145+func aw () = "%s__shutdown"
130146
131147
132-func ap () = "%s__shutdown"
148+func ax (ay) = ("%s%s__poolWeight__" + ay)
133149
134150
135-func aq (ar) = ("%s%s__poolWeight__" + ar)
151+func az () = "%s__allowedLpScriptHash"
136152
137153
138-func as () = "%s__allowedLpScriptHash"
154+let aA = "%s__feeCollectorAddress"
155+
156+func aB (aC,aD,aE,aF) = throw((((((((("order validation failed: orderValid=" + toString(aC)) + " (") + aD) + ")") + " senderValid=") + toString(aE)) + " matcherValid=") + toString(aF)))
139157
140158
141-let at = "%s__feeCollectorAddress"
142-
143-func au (av,aw,ax) = throw(((((("order validation failed: orderValid=" + toString(av)) + " senderValid=") + toString(aw)) + " matcherValid=") + toString(ax)))
159+func aG (aH,aI) = valueOrErrorMessage(getString(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " is not defined"], ""))
144160
145161
146-func ay (az,aA) = valueOrErrorMessage(getString(az, aA), makeString(["mandatory ", toString(az), ".", aA, " is not defined"], ""))
162+func aJ (aH,aI) = valueOrErrorMessage(getInteger(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " 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 (aL) = throw(makeString(["lp.ride:", aL], " "))
150166
151167
152-func aC (aD) = throw(makeString(["lp.ride:", aD], " "))
168+func aM (aL) = makeString(["lp.ride:", aL], " ")
153169
154170
155-let aE = addressFromStringValue(ay(this, T()))
171+let aN = addressFromStringValue(aG(this, S()))
156172
157-let aF = addressFromStringValue(ay(aE, at))
173+let aO = addressFromStringValue(aG(aN, aA))
158174
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"))
175+let aP = {
176+ let aQ = invoke(aN, "getInFeeREADONLY", [toString(this)], nil)
177+ if ($isInstanceOf(aQ, "Int"))
178+ then aQ
179+ else throw(($getType(aQ) + " couldn't be cast to Int"))
164180 }
165181
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"))
182+let aR = {
183+ let aQ = invoke(aN, "getOutFeeREADONLY", [toString(this)], nil)
184+ if ($isInstanceOf(aQ, "Int"))
185+ then aQ
186+ else throw(($getType(aQ) + " couldn't be cast to Int"))
171187 }
172188
173-func aJ () = valueOrElse(getBoolean(aE, ap()), false)
189+func aS () = valueOrElse(getBoolean(aN, aw()), false)
174190
175191
176-func aK () = fromBase58String(ay(aE, ah()))
192+func aT () = fromBase58String(aG(aN, ao()))
177193
178194
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)
195+func aU () = {
196+ let aV = aG(this, ad())
197+ let aW = aG(this, ae())
198+ let at = aJ(aN, au(aW))
199+ let as = aJ(aN, au(aV))
200+ split(aG(aN, ar(toString(as), toString(at))), j)
185201 }
186202
187203
188-func aO (aP) = if ((aP == i))
204+func aX (aY) = if ((aY == i))
189205 then unit
190- else fromBase58String(aP)
206+ else fromBase58String(aY)
191207
192208
193-func aQ (aP) = if ((aP == unit))
209+func aZ (aY) = if ((aY == unit))
194210 then i
195- else toBase58String(value(aP))
211+ else toBase58String(value(aY))
196212
197213
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]))
214+func ba (bb) = $Tuple7(addressFromStringValue(bb[o]), parseIntValue(bb[p]), fromBase58String(bb[q]), aX(bb[r]), aX(bb[s]), parseIntValue(bb[t]), parseIntValue(bb[u]))
199215
200216
201-let aT = aR(aL())
217+let bc = ba(aU())
202218
203-let aU = aT
219+let bd = bc
204220
205-let aV = aU._1
221+let be = bd._1
206222
207-let aW = aU._2
223+let bf = bd._2
208224
209-let aX = aU._3
225+let bg = bd._3
210226
211-let aY = aU._4
227+let bh = bd._4
212228
213-let aZ = aU._5
229+let bi = bd._5
214230
215-let ba = aU._6
231+let bj = bd._6
216232
217-let bb = aU._7
233+let bk = bd._7
218234
219-func bc () = split(ay(aE, ag()), j)
235+func bl () = split(aG(aN, an()), j)
220236
221237
222-let bd = valueOrErrorMessage(addressFromString(bc()[B]), "incorrect staking address")
238+let bm = valueOrErrorMessage(addressFromString(bl()[B]), "incorrect staking address")
223239
224-let be = valueOrErrorMessage(addressFromString(bc()[C]), "incorrect staking address")
240+let bn = valueOrErrorMessage(addressFromString(bl()[C]), "incorrect staking address")
225241
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)
242+func bo (bp,bq,br,bs,bt,bu,bv,bw,bx,by) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bp), toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by)], j)
227243
228244
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)
245+func bz (bA,bB,bC,bs,bv,bw) = makeString(["%d%d%d%d%d%d", toString(bA), toString(bB), toString(bC), toString(bs), toString(bv), toString(bw)], j)
230246
231247
232-func bu (bv) = if ((bv == "WAVES"))
248+func bD (bE) = if ((bE == "WAVES"))
233249 then wavesBalance(this).available
234- else assetBalance(this, fromBase58String(bv))
250+ else assetBalance(this, fromBase58String(bE))
235251
236252
237-func bw (bx,by) = fraction(bx, d, by)
253+func bF (bG,bH) = fraction(bG, d, bH)
238254
239255
240-func bz (bA,bB,bC,bD) = {
241- let bE = D(bC, bA)
242- let bF = D(bD, bB)
243- bw(bF, bE)
256+func bI (bG,bH,L) = fraction(bG, d, bH, L)
257+
258+
259+func bJ (bK,bL,bM,bN) = {
260+ let bO = D(bM, bK)
261+ let bP = D(bN, bL)
262+ bF(bP, bO)
244263 }
245264
246265
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]
266+func bQ (bM,bN,bR) = {
267+ let bS = aU()
268+ let bT = parseIntValue(bS[t])
269+ let bU = parseIntValue(bS[u])
270+ let bV = bJ(bT, bU, bM, bN)
271+ let bH = D(bM, bT)
272+ let bG = D(bN, bU)
273+ let bW = D(bR, b)
274+ let bX = bF(bH, bW)
275+ let bY = bF(bG, bW)
276+[bV, bX, bY]
258277 }
259278
260279
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)]
280+func bZ (bM,bN,bR) = {
281+ let ca = bQ(bM, bN, bR)
282+[H(ca[0], b), H(ca[1], b), H(ca[2], b)]
264283 }
265284
266285
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))
286+func cb (cc,cd,ce,aa) = {
287+ let bS = aU()
288+ let cf = bS[q]
289+ let cg = bS[r]
290+ let ch = bS[s]
291+ let bK = parseIntValue(bS[t])
292+ let bL = parseIntValue(bS[u])
293+ let ci = bS[p]
294+ let cj = valueOrErrorMessage(assetInfo(fromBase58String(cf)), (("Asset " + cf) + " doesn't exist")).quantity
295+ if ((cf != cd))
277296 then throw("Invalid asset passed.")
278297 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 == ""))
298+ let ck = bD(cg)
299+ let cl = D(ck, bK)
300+ let cm = bD(ch)
301+ let cn = D(cm, bL)
302+ let co = bF(cn, cl)
303+ let cp = H(co, b)
304+ let cq = D(ce, b)
305+ let cr = D(cj, b)
306+ let cs = fraction(cl, cq, cr)
307+ let ct = fraction(cn, cq, cr)
308+ let cu = K(cs, bK, FLOOR)
309+ let cv = K(ct, bL, FLOOR)
310+ let cw = if ((cc == ""))
292311 then nil
293- else [ScriptTransfer(ab, ck, if ((bW == "WAVES"))
312+ else [ScriptTransfer(aa, cu, if ((cg == "WAVES"))
294313 then unit
295- else fromBase58String(bW)), ScriptTransfer(ab, cl, if ((bX == "WAVES"))
314+ else fromBase58String(cg)), ScriptTransfer(aa, cv, if ((ch == "WAVES"))
296315 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)
316+ else fromBase58String(ch)), StringEntry(ac(toString(aa), cc), bz(cu, cv, ce, cp, height, lastBlock.timestamp)), IntegerEntry(V(), cp), IntegerEntry(W(height, lastBlock.timestamp), cp)]
317+ $Tuple10(cu, cv, cg, ch, ck, cm, cj, co, ci, cw)
299318 }
300319 }
301320
302321
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))
322+func cx (cc,cy,cz,cA,cB,cC,aa,cD,cE) = {
323+ let bS = aU()
324+ let cf = fromBase58String(bS[q])
325+ let cF = bS[r]
326+ let cG = bS[s]
327+ let cH = bS[v]
328+ let cI = bS[w]
329+ let bT = parseIntValue(bS[t])
330+ let bU = parseIntValue(bS[u])
331+ let ci = bS[p]
332+ let cj = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
333+ let cJ = toBase58String(valueOrElse(cA, fromBase58String("WAVES")))
334+ let cK = toBase58String(valueOrElse(cC, fromBase58String("WAVES")))
335+ if (if ((cF != cJ))
317336 then true
318- else (cw != cA))
337+ else (cG != cK))
319338 then throw("Invalid amt or price asset passed.")
320339 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))
340+ let ck = if (cD)
341+ then bD(cF)
342+ else (bD(cF) - cz)
343+ let cm = if (cD)
344+ then bD(cG)
345+ else (bD(cG) - cB)
346+ let cL = D(cz, bT)
347+ let cM = D(cB, bU)
348+ let cN = bF(cM, cL)
349+ let cl = D(ck, bT)
350+ let cn = D(cm, bU)
351+ let cO = if ((cj == 0))
333352 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)
353+ let co = e
354+ let cP = e
355+ let bW = pow((cL * cM), 0, toBigInt(5), 1, 0, DOWN)
356+ $Tuple5(H(bW, b), H(cL, bT), H(cM, bU), bF((cn + cM), (cl + cL)), cP)
338357 }
339358 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)
359+ let co = bF(cn, cl)
360+ let cP = fraction(R((co - cN)), d, co)
361+ let cQ = D(cy, b)
362+ if (if ((co != e))
363+ then (cP > cQ)
345364 else false)
346- then throw(((("Price slippage " + toString(cF)) + " exceeded the passed limit of ") + toString(cG)))
365+ then throw(((("Price slippage " + toString(cP)) + " exceeded the passed limit of ") + toString(cQ)))
347366 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)
367+ let cr = D(cj, b)
368+ let cR = fraction(cL, bI(cn, cl, CEILING), d, CEILING)
369+ let cS = fraction(cM, d, bI(cn, cl, FLOOR), CEILING)
370+ let cT = if ((cR > cM))
371+ then $Tuple2(cS, cM)
372+ else $Tuple2(cL, cR)
373+ let cU = cT._1
374+ let cV = cT._2
375+ let bW = fraction(cr, cV, cn, FLOOR)
376+ $Tuple5(K(bW, b, FLOOR), K(cU, bT, CEILING), K(cV, bU, CEILING), co, cP)
358377 }
359378 }
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))
379+ let cW = cO._1
380+ let cX = cO._2
381+ let cY = cO._3
382+ let cp = H(cO._4, b)
383+ let cZ = H(cO._5, b)
384+ if ((0 >= cW))
366385 then throw("Invalid calculations. LP calculated is less than zero.")
367386 else {
368- let cQ = if (!(cu))
387+ let da = if (!(cE))
369388 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)
389+ else cW
390+ let db = (cz - cX)
391+ let dc = (cB - cY)
392+ let dd = [IntegerEntry(V(), cp), IntegerEntry(W(height, lastBlock.timestamp), cp), StringEntry(Z(aa, cc), bo(cX, cY, da, cp, cy, cZ, height, lastBlock.timestamp, db, dc))]
393+ $Tuple13(cW, da, cp, ck, cm, cj, cf, ci, dd, db, dc, cA, cC)
375394 }
376395 }
377396 }
378397
379398
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- }
399+func de (df,dg,cj) = {
400+ let dh = G(df, toBigInt(bj))
401+ let di = G(dg, toBigInt(bk))
402+ let dj = fraction(pow((dh * di), 0, toBigInt(5), 1, 18, DOWN), g, cj)
403+ if ((cj == f))
404+ then f
405+ else dj
422406 }
423407
424408
425-func di (dj) = if ((size(dj.payments) != 1))
409+func dk (dl,dm,dn) = {
410+ let do = (toBigInt(bD(aZ(bh))) - dl)
411+ let dp = (toBigInt(bD(aZ(bi))) - dm)
412+ let dq = (toBigInt(value(assetInfo(bg)).quantity) - dn)
413+ let dr = de(do, dp, dq)
414+ dr
415+ }
416+
417+
418+func ds (dt,du,dn) = {
419+ let do = (bD(aZ(bh)) + dt)
420+ let dp = (bD(aZ(bi)) + du)
421+ let dq = (value(assetInfo(bg)).quantity + dn)
422+ let dj = de(toBigInt(do), toBigInt(dp), toBigInt(dq))
423+ let dv = [IntegerEntry(aj, height), StringEntry(ai, toString(dj))]
424+ $Tuple2(dv, dj)
425+ }
426+
427+
428+func dw (dx,dj) = if ((dj >= dx))
429+ then true
430+ else aK(makeString(["updated KLp lower than current KLp", toString(dx), toString(dj)], " "))
431+
432+
433+func dy (dz) = {
434+ let do = bD(aZ(bh))
435+ let dp = bD(aZ(bi))
436+ let dA = dz.amount
437+ let dB = fraction(dz.amount, dz.price, b, FLOOR)
438+ let dC = if ((dz.orderType == Buy))
439+ then $Tuple2(dA, -(dB))
440+ else $Tuple2(-(dA), dB)
441+ let dt = dC._1
442+ let du = dC._2
443+ if (if (if (aS())
444+ then true
445+ else (bf == m))
446+ then true
447+ else (bf == n))
448+ then throw("Exchange operations disabled")
449+ else if (if ((dz.assetPair.amountAsset != bh))
450+ then true
451+ else (dz.assetPair.priceAsset != bi))
452+ then throw("Wrong order assets.")
453+ else {
454+ let dD = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ai), "0")), aM("invalid kLp"))
455+ let dE = ds(dt, du, 0)
456+ let dF = dE._1
457+ let dG = dE._2
458+ let dH = (dG >= dD)
459+ let dI = makeString(["kLp=", toString(dD), " kLpNew=", toString(dG), " amountAssetBalance=", toString(do), " priceAssetBalance=", toString(dp), " amountAssetBalanceDelta=", toString(dt), " priceAssetBalanceDelta=", toString(du), " height=", toString(height)], "")
460+ $Tuple2(dH, dI)
461+ }
462+ }
463+
464+
465+func dJ (dK) = if ((size(dK.payments) != 1))
426466 then throw("exactly 1 payment is expected")
427467 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())
468+ let dL = value(dK.payments[0])
469+ let cd = value(dL.assetId)
470+ let dM = dL.amount
471+ let cO = cb(toBase58String(dK.transactionId), toBase58String(cd), dM, dK.caller)
472+ let cu = cO._1
473+ let cv = cO._2
474+ let ci = parseIntValue(cO._9)
475+ let cw = cO._10
476+ if (if (aS())
437477 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)
478+ else (ci == n))
479+ then throw(("Get operation is blocked by admin. Status = " + toString(ci)))
480+ else $Tuple5(cu, cv, dM, cd, cw)
441481 }
442482
443483
444-func dm (dj,co,cu) = if ((size(dj.payments) != 2))
484+func dN (dK,cy,cE) = if ((size(dK.payments) != 2))
445485 then throw("exactly 2 payments are expected")
446486 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())
487+ let dO = value(dK.payments[0])
488+ let dP = value(dK.payments[1])
489+ let dQ = cx(toBase58String(dK.transactionId), cy, dO.amount, dO.assetId, dP.amount, dP.assetId, toString(dK.caller), false, cE)
490+ let ci = parseIntValue(dQ._8)
491+ if (if (if (aS())
452492 then true
453- else (bY == l))
493+ else (ci == l))
454494 then true
455- else (bY == n))
456- then throw(("Put operation is blocked by admin. Status = " + toString(bY)))
457- else dp
495+ else (ci == n))
496+ then throw(("Put operation is blocked by admin. Status = " + toString(ci)))
497+ else dQ
458498 }
459499
460500
461-func dq (dr) = {
462- let ds = invoke(aE, "emit", [dr], nil)
463- if ((ds == ds))
501+func dR (dS) = {
502+ let dT = invoke(aN, "emit", [dS], nil)
503+ if ((dT == dT))
464504 then {
465- let dt = {
466- let du = ds
467- if ($isInstanceOf(du, "Address"))
505+ let dU = {
506+ let dV = dT
507+ if ($isInstanceOf(dV, "Address"))
468508 then {
469- let dv = du
470- invoke(dv, "emit", [dr], nil)
509+ let dW = dV
510+ invoke(dW, "emit", [dS], nil)
471511 }
472512 else unit
473513 }
474- if ((dt == dt))
475- then dr
514+ if ((dU == dU))
515+ then dS
476516 else throw("Strict value is not equal to itself.")
477517 }
478518 else throw("Strict value is not equal to itself.")
479519 }
480520
481521
482-func dw (dr,dx) = {
483- let dy = if ((dx == 0))
522+func dX (dS,ah) = {
523+ let dY = if ((ah == 0))
484524 then 0
485- else fraction(dr, dx, b)
486- $Tuple2((dr - dy), dy)
525+ else fraction(dS, ah, b)
526+ $Tuple2((dS - dY), dY)
487527 }
488528
489529
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))
530+func dZ (ea,eb,aa,ab) = {
531+ let ec = (ab == unit)
532+ let ed = bD(aZ(bh))
533+ let ee = bD(aZ(bi))
534+ let ef = if ((eb == bh))
495535 then true
496- else if ((dB == aZ))
536+ else if ((eb == bi))
497537 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))
538+ else aK("invalid asset")
539+ let eg = if (ec)
540+ then $Tuple2(ed, ee)
541+ else if (ef)
542+ then $Tuple2((ed - ea), ee)
543+ else $Tuple2(ed, (ee - ea))
544+ let eh = eg._1
545+ let ei = eg._2
546+ let ej = if (ef)
547+ then $Tuple2(ea, 0)
548+ else $Tuple2(0, ea)
549+ let ek = ej._1
550+ let el = ej._2
551+ let dA = dX(ek, aP)._1
552+ let dB = dX(el, aP)._1
553+ let em = dX(ea, aP)
554+ let en = em._1
555+ let dY = em._2
556+ let eo = (eh + dA)
557+ let ep = (ei + dB)
558+ let eq = bF(D(ep, bk), D(eo, bj))
559+ let er = H(eq, b)
560+ let es = if (ef)
561+ then eh
562+ else ei
563+ let et = toBigInt(es)
564+ let eu = toBigInt(valueOrErrorMessage(assetInfo(bg), (("asset " + toBase58String(bg)) + " doesn't exist")).quantity)
565+ let ev = if ((eu > f))
526566 then true
527- else aC("initial deposit requires all coins")
528- if ((dX == dX))
567+ else aK("initial deposit requires all coins")
568+ if ((ev == ev))
529569 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)
570+ let ew = toBigInt(en)
571+ let ex = max([0, toInt(((eu * (sqrtBigInt((d + ((ew * d) / et)), 18, 18, DOWN) - d)) / d))])
572+ let dd = if (ec)
533573 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)
574+ else [IntegerEntry(V(), er), IntegerEntry(W(height, lastBlock.timestamp), er), StringEntry(Z(toString(value(aa)), toBase58String(value(ab))), bo(ek, el, ex, er, 0, 0, height, lastBlock.timestamp, 0, 0))]
575+ let ey = bF(D(ei, bk), D(eh, bj))
576+ let ez = H(ey, b)
577+ let eA = {
578+ let eB = if (ef)
579+ then $Tuple2(ek, eh)
580+ else $Tuple2(el, ei)
581+ let dS = eB._1
582+ let eC = eB._2
583+ let eD = toInt(fraction(eu, toBigInt((dS / 2)), toBigInt(eC)))
584+ fraction((ex - eD), b, eD)
545585 }
546- $Tuple4(dZ, cT, dy, ec)
586+ $Tuple5(ex, dd, dY, eA, ef)
547587 }
548588 else throw("Strict value is not equal to itself.")
549589 }
550590
551591
552-func eg (eh,dP,dB,ab,ac) = {
553- let dC = (ac == unit)
554- let ei = [if ((dB == aX))
592+func eE (eF,en,eb,aa,ab) = {
593+ let ec = (ab == unit)
594+ let bS = aU()
595+ let bT = parseIntValue(bS[t])
596+ let bU = parseIntValue(bS[u])
597+ let eG = [if ((eb == bg))
555598 then true
556- else aC("invalid lp asset")]
557- if ((ei == ei))
599+ else aK("invalid lp asset")]
600+ if ((eG == eG))
558601 then {
559- let ej = if ((eh == aY))
602+ let eH = if ((eF == bh))
560603 then true
561- else if ((eh == aZ))
604+ else if ((eF == bi))
562605 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)
606+ else aK("invalid asset")
607+ let eI = if (eH)
608+ then toBigInt(bD(aZ(bh)))
609+ else toBigInt(bD(aZ(bi)))
610+ let eJ = if (eH)
611+ then bT
612+ else bU
613+ let eK = bD(aZ(bh))
614+ let eL = bD(aZ(bi))
615+ let eM = if (eH)
616+ then eK
617+ else eL
618+ let eN = toBigInt(eM)
619+ let eu = toBigInt(valueOrErrorMessage(assetInfo(bg), (("asset " + toBase58String(bg)) + " doesn't exist")).quantity)
620+ let eO = toBigInt(en)
621+ let eP = max([0, toInt(((eI * (d - pow((d - ((eO * d) / eu)), 18, h, 0, 18, DOWN))) / d))])
622+ let eQ = dX(eP, aR)
623+ let eR = eQ._1
624+ let dY = eQ._2
625+ let eS = if (eH)
626+ then $Tuple4(eR, 0, (eK - eP), eL)
627+ else $Tuple4(0, eR, eK, (eL - eP))
628+ let eT = eS._1
629+ let eU = eS._2
630+ let eV = eS._3
631+ let eW = eS._4
632+ let eq = bF(D(eW, bk), D(eV, bj))
633+ let er = H(eq, b)
634+ let dd = if (ec)
589635 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)
636+ else [StringEntry(ac(toString(value(aa)), toBase58String(value(ab))), bz(eT, eU, en, er, height, lastBlock.timestamp)), IntegerEntry(V(), er), IntegerEntry(W(height, lastBlock.timestamp), er)]
637+ let ey = bF(D(eL, bk), D(eK, bj))
638+ let ez = H(ey, b)
639+ let eA = {
640+ let eX = (toInt(fraction(eI, eO, eu)) * 2)
641+ fraction((eR - eX), b, eX)
596642 }
597- $Tuple4(es, cT, dy, ec)
643+ $Tuple5(eR, dd, dY, eA, eH)
598644 }
599645 else throw("Strict value is not equal to itself.")
600646 }
601647
602648
603-func ez () = {
604- let du = getString(U())
605- if ($isInstanceOf(du, "String"))
649+func eY () = {
650+ let dV = getString(T())
651+ if ($isInstanceOf(dV, "String"))
606652 then {
607- let eA = du
608- fromBase58String(eA)
653+ let eZ = dV
654+ fromBase58String(eZ)
609655 }
610- else if ($isInstanceOf(du, "Unit"))
656+ else if ($isInstanceOf(dV, "Unit"))
611657 then unit
612658 else throw("Match error")
613659 }
614660
615661
616-func eB () = {
617- let du = getString(V())
618- if ($isInstanceOf(du, "String"))
662+func fa () = {
663+ let dV = getString(U())
664+ if ($isInstanceOf(dV, "String"))
619665 then {
620- let eA = du
621- fromBase58String(eA)
666+ let eZ = dV
667+ fromBase58String(eZ)
622668 }
623- else if ($isInstanceOf(du, "Unit"))
669+ else if ($isInstanceOf(dV, "Unit"))
624670 then unit
625671 else throw("Match error")
626672 }
627673
628674
629-func eC (dj) = {
630- let du = ez()
631- if ($isInstanceOf(du, "ByteVector"))
675+func fb (dK) = {
676+ let dV = eY()
677+ if ($isInstanceOf(dV, "ByteVector"))
632678 then {
633- let eD = du
634- (dj.callerPublicKey == eD)
679+ let fc = dV
680+ (dK.callerPublicKey == fc)
635681 }
636- else if ($isInstanceOf(du, "Unit"))
637- then (dj.caller == this)
682+ else if ($isInstanceOf(dV, "Unit"))
683+ then (dK.caller == this)
638684 else throw("Match error")
639685 }
640686
641687
642-func eE (dj) = {
643- let eF = throw("Permission denied")
644- let du = ez()
645- if ($isInstanceOf(du, "ByteVector"))
688+func fd (dK) = {
689+ let fe = throw("Permission denied")
690+ let dV = eY()
691+ if ($isInstanceOf(dV, "ByteVector"))
646692 then {
647- let eD = du
648- if ((dj.callerPublicKey == eD))
693+ let fc = dV
694+ if ((dK.callerPublicKey == fc))
649695 then true
650- else eF
696+ else fe
651697 }
652- else if ($isInstanceOf(du, "Unit"))
653- then if ((dj.caller == this))
698+ else if ($isInstanceOf(dV, "Unit"))
699+ then if ((dK.caller == this))
654700 then true
655- else eF
701+ else fe
656702 else throw("Match error")
657703 }
658704
659705
660-@Callable(dj)
661-func calculateAmountOutForSwapREADONLY (eG,eH) = {
662- let eI = if ((eH == false))
706+@Callable(dK)
707+func setManager (ff) = {
708+ let fg = fd(dK)
709+ if ((fg == fg))
663710 then {
664- let eJ = ay(this, af())
665- let eK = ay(this, ae())
666- $Tuple2(eJ, eK)
667- }
668- else {
669- let eJ = ay(this, ae())
670- let eK = ay(this, af())
671- $Tuple2(eJ, eK)
672- }
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))
681- then true
682- else throw("new K is fewer error")
683- if ((eQ == eQ))
684- then $Tuple2(nil, eN)
685- else throw("Strict value is not equal to itself.")
686- }
687-
688-
689-
690-@Callable(dj)
691-func calculateAmountOutForSwapAndSendTokens (eG,eH,eR,eS) = {
692- let ei = [if ((value(dj.payments[0]).amount >= eG))
693- then true
694- else aC("Wrong amount"), if ((dj.caller == addressFromStringValue(ay(this, S()))))
695- then true
696- else aC("Permission denied")]
697- if ((ei == ei))
698- then {
699- let dk = value(dj.payments[0])
700- let eK = if ((dk.assetId == unit))
701- 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))
712- then true
713- else throw("new K is fewer error")
714- if ((eQ == eQ))
715- then {
716- let eT = if ((eN >= eR))
717- then true
718- 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))]
723- else throw("Strict value is not equal to itself.")
724- }
711+ let fh = fromBase58String(ff)
712+ if ((fh == fh))
713+ then [StringEntry(U(), ff)]
725714 else throw("Strict value is not equal to itself.")
726715 }
727716 else throw("Strict value is not equal to itself.")
729718
730719
731720
732-@Callable(dj)
733-func setManager (eU) = {
734- let eV = eE(dj)
735- if ((eV == eV))
721+@Callable(dK)
722+func confirmManager () = {
723+ let fi = fa()
724+ let fj = if (isDefined(fi))
725+ then true
726+ else throw("No pending manager")
727+ if ((fj == fj))
736728 then {
737- let eW = fromBase58String(eU)
738- if ((eW == eW))
739- then [StringEntry(V(), eU)]
729+ let fk = if ((dK.callerPublicKey == value(fi)))
730+ then true
731+ else throw("You are not pending manager")
732+ if ((fk == fk))
733+ then [StringEntry(T(), toBase58String(value(fi))), DeleteEntry(U())]
740734 else throw("Strict value is not equal to itself.")
741735 }
742736 else throw("Strict value is not equal to itself.")
744738
745739
746740
747-@Callable(dj)
748-func confirmManager () = {
749- let eX = eB()
750- let eY = if (isDefined(eX))
751- then true
752- else throw("No pending manager")
753- if ((eY == eY))
754- then {
755- let eZ = if ((dj.callerPublicKey == value(eX)))
756- then true
757- else throw("You are not pending manager")
758- if ((eZ == eZ))
759- then [StringEntry(U(), toBase58String(value(eX))), DeleteEntry(V())]
760- else throw("Strict value is not equal to itself.")
761- }
762- else throw("Strict value is not equal to itself.")
763- }
764-
765-
766-
767-@Callable(dj)
768-func put (co,fa) = if ((0 > co))
741+@Callable(dK)
742+func put (cy,fl) = if ((0 > cy))
769743 then throw("Invalid slippageTolerance passed")
770744 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)
780- if ((ds == ds))
745+ let dQ = dN(dK, cy, true)
746+ let da = dQ._2
747+ let cf = dQ._7
748+ let cw = dQ._9
749+ let db = dQ._10
750+ let dc = dQ._11
751+ let fm = dQ._12
752+ let fn = dQ._13
753+ let dO = toBigInt(value(dK.payments[0]).amount)
754+ let dP = toBigInt(value(dK.payments[1]).amount)
755+ let dr = dk(dO, dP, toBigInt(0))
756+ if ((dr == dr))
781757 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)
758+ let dT = invoke(aN, "emit", [da], nil)
759+ if ((dT == dT))
760+ then {
761+ let dU = {
762+ let dV = dT
763+ if ($isInstanceOf(dV, "Address"))
764+ then {
765+ let dW = dV
766+ invoke(dW, "emit", [da], nil)
767+ }
768+ else unit
788769 }
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))
770+ if ((dU == dU))
797771 then {
798- let fe = if ((cS > 0))
799- then invoke(be, "put", nil, [AttachedPayment(fc, cS)])
772+ let fo = if ((db > 0))
773+ then invoke(bn, "put", nil, [AttachedPayment(fm, db)])
800774 else nil
801- if ((fe == fe))
775+ if ((fo == fo))
802776 then {
803- let ff = if (fa)
777+ let fp = if ((dc > 0))
778+ then invoke(bn, "put", nil, [AttachedPayment(fn, dc)])
779+ else nil
780+ if ((fp == fp))
804781 then {
805- let fg = invoke(bd, "stake", nil, [AttachedPayment(bV, cQ)])
806- if ((fg == fg))
807- then nil
782+ let fq = if (fl)
783+ then {
784+ let fr = invoke(bm, "stake", nil, [AttachedPayment(cf, da)])
785+ if ((fr == fr))
786+ then nil
787+ else throw("Strict value is not equal to itself.")
788+ }
789+ else [ScriptTransfer(dK.caller, da, cf)]
790+ let fs = ds(0, 0, 0)
791+ if ((fs == fs))
792+ then {
793+ let dj = fs._2
794+ let ft = fs._1
795+ let fu = dw(dr, dj)
796+ if ((fu == fu))
797+ then ((cw ++ fq) ++ ft)
798+ else throw("Strict value is not equal to itself.")
799+ }
808800 else throw("Strict value is not equal to itself.")
809801 }
810- else [ScriptTransfer(dj.caller, cQ, bV)]
811- (cm ++ ff)
802+ else throw("Strict value is not equal to itself.")
812803 }
813804 else throw("Strict value is not equal to itself.")
814805 }
821812
822813
823814
824-@Callable(dj)
825-func putForFree (fh) = if ((0 > fh))
815+@Callable(dK)
816+func putForFree (fv) = if ((0 > fv))
826817 then throw("Invalid value passed")
827818 else {
828- let dp = dm(dj, fh, false)
829- dp._9
819+ let dQ = dN(dK, fv, false)
820+ let cw = dQ._9
821+ let dO = toBigInt(value(dK.payments[0]).amount)
822+ let dP = toBigInt(value(dK.payments[1]).amount)
823+ let dr = dk(dO, dP, toBigInt(0))
824+ if ((dr == dr))
825+ then {
826+ let fw = ds(0, 0, 0)
827+ let ft = fw._1
828+ let dj = fw._2
829+ let fu = dw(dr, dj)
830+ if ((fu == fu))
831+ then (cw ++ ft)
832+ else throw("Strict value is not equal to itself.")
833+ }
834+ else throw("Strict value is not equal to itself.")
830835 }
831836
832837
833838
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"))
839+@Callable(dK)
840+func putOneTkn (fx,fy) = {
841+ let fz = {
842+ let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
843+ if ($isInstanceOf(aQ, "Boolean"))
844+ then aQ
845+ else throw(($getType(aQ) + " couldn't be cast to Boolean"))
841846 }
842- let fl = if (if (if (aJ())
847+ let fA = if (if (if (aS())
843848 then true
844- else (aW == l))
849+ else (bf == l))
845850 then true
846- else (aW == n))
851+ else (bf == n))
847852 then true
848- else fk
849- let ei = [if (if (!(fl))
853+ else fz
854+ let eG = [if (if (!(fA))
850855 then true
851- else eC(dj))
856+ else fb(dK))
852857 then true
853- else aC("put operation is blocked by admin"), if ((size(dj.payments) == 1))
858+ else aK("put operation is blocked by admin"), if ((size(dK.payments) == 1))
854859 then true
855- else aC("exactly 1 payment are expected")]
856- if ((ei == ei))
860+ else aK("exactly 1 payment are expected")]
861+ if ((eG == eG))
857862 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))
863+ let fB = dK.payments[0]
864+ let eb = fB.assetId
865+ let ea = fB.amount
866+ let dr = if ((eb == bh))
867+ then dk(toBigInt(ea), toBigInt(0), toBigInt(0))
868+ else if ((eb == bi))
869+ then dk(toBigInt(0), toBigInt(ea), toBigInt(0))
870+ else aK("payment asset is not supported")
871+ if ((dr == dr))
865872 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))
873+ let aa = dK.caller
874+ let ab = dK.transactionId
875+ let fC = dZ(ea, eb, aa, ab)
876+ if ((fC == fC))
877877 then {
878- let ff = if (fj)
878+ let ef = fC._5
879+ let fD = fC._4
880+ let dY = fC._3
881+ let dd = fC._2
882+ let fE = fC._1
883+ let fF = if (if ((fx > 0))
884+ then (fx > fE)
885+ else false)
886+ then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
887+ else fE
888+ let dT = dR(fF)
889+ if ((dT == dT))
879890 then {
880- let fr = invoke(bd, "stake", nil, [AttachedPayment(aX, fq)])
881- if ((fr == fr))
882- then nil
891+ let fq = if (fy)
892+ then {
893+ let fG = invoke(bm, "stake", nil, [AttachedPayment(bg, fF)])
894+ if ((fG == fG))
895+ then nil
896+ else throw("Strict value is not equal to itself.")
897+ }
898+ else [ScriptTransfer(dK.caller, fF, bg)]
899+ let fH = if ((dY > 0))
900+ then [ScriptTransfer(aO, dY, eb)]
901+ else nil
902+ let fI = if ((this == aO))
903+ then $Tuple2(0, 0)
904+ else if (ef)
905+ then $Tuple2(-(dY), 0)
906+ else $Tuple2(0, -(dY))
907+ let dt = fI._1
908+ let du = fI._2
909+ let fJ = ds(dt, du, 0)
910+ let ft = fJ._1
911+ let dj = fJ._2
912+ let dD = value(getString(ai))
913+ let fu = dw(dr, dj)
914+ if ((fu == fu))
915+ then $Tuple2((((dd ++ fq) ++ fH) ++ ft), fF)
883916 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)
1030917 }
1031918 else throw("Strict value is not equal to itself.")
1032919 }
1039926
1040927
1041928
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.")
929+@Callable(dK)
930+func putOneTknREADONLY (eb,ea) = {
931+ let fK = dZ(ea, aX(eb), unit, unit)
932+ let fE = fK._1
933+ let dd = fK._2
934+ let dY = fK._3
935+ let fD = fK._4
936+ let ef = fK._5
937+ $Tuple2(nil, $Tuple3(fE, dY, fD))
1054938 }
1055939
1056940
1057941
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))
942+@Callable(dK)
943+func getOneTkn (fL,fx) = {
944+ let fz = {
945+ let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
946+ if ($isInstanceOf(aQ, "Boolean"))
947+ then aQ
948+ else throw(($getType(aQ) + " couldn't be cast to Boolean"))
949+ }
950+ let fM = if (if (aS())
951+ then true
952+ else (bf == n))
953+ then true
954+ else fz
955+ let eG = [if (if (!(fM))
956+ then true
957+ else fb(dK))
958+ then true
959+ else aK("get operation is blocked by admin"), if ((size(dK.payments) == 1))
960+ then true
961+ else aK("exactly 1 payment are expected")]
962+ if ((eG == eG))
1086963 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))
964+ let eF = aX(fL)
965+ let fB = dK.payments[0]
966+ let eb = fB.assetId
967+ let en = fB.amount
968+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
969+ if ((dr == dr))
1091970 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))
971+ let aa = dK.caller
972+ let ab = dK.transactionId
973+ let fN = eE(eF, en, eb, aa, ab)
974+ if ((fN == fN))
1101975 then {
1102- let fF = invoke(aE, "burn", [dr], [AttachedPayment(bV, dr)])
1103- if ((fF == fF))
1104- then cm
976+ let eH = fN._5
977+ let fD = fN._4
978+ let dY = fN._3
979+ let dd = fN._2
980+ let fO = fN._1
981+ let dS = if (if ((fx > 0))
982+ then (fx > fO)
983+ else false)
984+ then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
985+ else fO
986+ let fP = invoke(aN, "burn", [en], [AttachedPayment(eb, en)])
987+ if ((fP == fP))
988+ then {
989+ let fQ = [ScriptTransfer(aa, dS, eF)]
990+ let fH = if ((dY > 0))
991+ then [ScriptTransfer(aO, dY, eF)]
992+ else nil
993+ let fR = {
994+ let fS = if ((this == aO))
995+ then 0
996+ else dY
997+ if (eH)
998+ then $Tuple2(-((dS + fS)), 0)
999+ else $Tuple2(0, -((dS + fS)))
1000+ }
1001+ let dt = fR._1
1002+ let du = fR._2
1003+ let fT = ds(dt, du, 0)
1004+ let ft = fT._1
1005+ let dj = fT._2
1006+ let fu = dw(dr, dj)
1007+ if ((fu == fu))
1008+ then $Tuple2((((dd ++ fQ) ++ fH) ++ ft), dS)
1009+ else throw("Strict value is not equal to itself.")
1010+ }
11051011 else throw("Strict value is not equal to itself.")
11061012 }
11071013 else throw("Strict value is not equal to itself.")
11131019
11141020
11151021
1116-@Callable(dj)
1117-func unstakeAndGetNoLess (fB,fK,fH) = {
1118- let fv = if (aJ())
1022+@Callable(dK)
1023+func getOneTknREADONLY (eF,en) = {
1024+ let fU = eE(aX(eF), en, bg, unit, unit)
1025+ let fO = fU._1
1026+ let dd = fU._2
1027+ let dY = fU._3
1028+ let fD = fU._4
1029+ let eH = fU._5
1030+ $Tuple2(nil, $Tuple3(fO, dY, fD))
1031+ }
1032+
1033+
1034+
1035+@Callable(dK)
1036+func unstakeAndGetOneTkn (fV,fL,fx) = {
1037+ let fz = {
1038+ let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1039+ if ($isInstanceOf(aQ, "Boolean"))
1040+ then aQ
1041+ else throw(($getType(aQ) + " couldn't be cast to Boolean"))
1042+ }
1043+ let fM = if (if (aS())
11191044 then true
1120- else (aW == n)
1121- let ei = [if (!(fv))
1045+ else (bf == n))
11221046 then true
1123- else throw("get operation is blocked by admin"), if ((size(dj.payments) == 0))
1047+ else fz
1048+ let eG = [if (if (!(fM))
11241049 then true
1125- else throw("no payments are expected")]
1126- if ((ei == ei))
1050+ else fb(dK))
1051+ then true
1052+ else aK("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1053+ then true
1054+ else aK("no payments are expected")]
1055+ if ((eG == eG))
11271056 then {
1128- let fC = invoke(bd, "unstake", [toBase58String(aX), fB], nil)
1129- if ((fC == fC))
1057+ let eF = aX(fL)
1058+ let aa = dK.caller
1059+ let ab = dK.transactionId
1060+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1061+ if ((dr == dr))
11301062 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))
1063+ let fW = invoke(bm, "unstake", [toBase58String(bg), fV], nil)
1064+ if ((fW == fW))
11411065 then {
1142- let fF = invoke(aE, "burn", [fB], [AttachedPayment(aX, fB)])
1143- if ((fF == fF))
1144- then cm
1066+ let fX = eE(eF, fV, bg, aa, ab)
1067+ if ((fX == fX))
1068+ then {
1069+ let eH = fX._5
1070+ let fD = fX._4
1071+ let dY = fX._3
1072+ let dd = fX._2
1073+ let fO = fX._1
1074+ let dS = if (if ((fx > 0))
1075+ then (fx > fO)
1076+ else false)
1077+ then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
1078+ else fO
1079+ let fP = invoke(aN, "burn", [fV], [AttachedPayment(bg, fV)])
1080+ if ((fP == fP))
1081+ then {
1082+ let fQ = [ScriptTransfer(dK.caller, dS, eF)]
1083+ let fH = if ((dY > 0))
1084+ then [ScriptTransfer(aO, dY, eF)]
1085+ else nil
1086+ let fY = {
1087+ let fS = if ((this == aO))
1088+ then 0
1089+ else dY
1090+ if (eH)
1091+ then $Tuple2(-((dS + fS)), 0)
1092+ else $Tuple2(0, -((dS + fS)))
1093+ }
1094+ let dt = fY._1
1095+ let du = fY._2
1096+ let fZ = ds(dt, du, 0)
1097+ let ft = fZ._1
1098+ let dj = fZ._2
1099+ let fu = dw(dr, dj)
1100+ if ((fu == fu))
1101+ then $Tuple2((((dd ++ fQ) ++ fH) ++ ft), dS)
1102+ else throw("Strict value is not equal to itself.")
1103+ }
1104+ else throw("Strict value is not equal to itself.")
1105+ }
11451106 else throw("Strict value is not equal to itself.")
11461107 }
11471108 else throw("Strict value is not equal to itself.")
11531114
11541115
11551116
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])])
1117+@Callable(dK)
1118+func get () = {
1119+ let cO = dJ(dK)
1120+ let ga = cO._1
1121+ let cv = cO._2
1122+ let dM = cO._3
1123+ let cd = cO._4
1124+ let cw = cO._5
1125+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1126+ if ((dr == dr))
1127+ then {
1128+ let gb = invoke(aN, "burn", [dM], [AttachedPayment(cd, dM)])
1129+ if ((gb == gb))
1130+ then {
1131+ let gc = ds(-(ga), -(cv), 0)
1132+ let ft = gc._1
1133+ let dj = gc._2
1134+ let fu = dw(dr, dj)
1135+ if ((fu == fu))
1136+ then (cw ++ ft)
1137+ else throw("Strict value is not equal to itself.")
1138+ }
1139+ else throw("Strict value is not equal to itself.")
1140+ }
1141+ else throw("Strict value is not equal to itself.")
11771142 }
11781143
11791144
11801145
1181-@Callable(dj)
1146+@Callable(dK)
1147+func getNoLess (gd,ge) = {
1148+ let cO = dJ(dK)
1149+ let cu = cO._1
1150+ let cv = cO._2
1151+ let dM = cO._3
1152+ let cd = cO._4
1153+ let cw = cO._5
1154+ if ((gd > cu))
1155+ then throw(((("noLessThenAmtAsset failed: " + toString(cu)) + " < ") + toString(gd)))
1156+ else if ((ge > cv))
1157+ then throw(((("noLessThenPriceAsset failed: " + toString(cv)) + " < ") + toString(ge)))
1158+ else {
1159+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1160+ if ((dr == dr))
1161+ then {
1162+ let gb = invoke(aN, "burn", [dM], [AttachedPayment(cd, dM)])
1163+ if ((gb == gb))
1164+ then {
1165+ let gf = ds(-(cu), -(cv), 0)
1166+ let ft = gf._1
1167+ let dj = gf._2
1168+ let fu = dw(dr, dj)
1169+ if ((fu == fu))
1170+ then (cw ++ ft)
1171+ else throw("Strict value is not equal to itself.")
1172+ }
1173+ else throw("Strict value is not equal to itself.")
1174+ }
1175+ else throw("Strict value is not equal to itself.")
1176+ }
1177+ }
1178+
1179+
1180+
1181+@Callable(dK)
1182+func unstakeAndGet (dS) = {
1183+ let gg = if ((size(dK.payments) != 0))
1184+ then throw("No payments are expected")
1185+ else true
1186+ if ((gg == gg))
1187+ then {
1188+ let bS = aU()
1189+ let cf = fromBase58String(bS[q])
1190+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1191+ if ((dr == dr))
1192+ then {
1193+ let fW = invoke(bm, "unstake", [toBase58String(cf), dS], nil)
1194+ if ((fW == fW))
1195+ then {
1196+ let cO = cb(toBase58String(dK.transactionId), toBase58String(cf), dS, dK.caller)
1197+ let cu = cO._1
1198+ let cv = cO._2
1199+ let ci = parseIntValue(cO._9)
1200+ let cw = cO._10
1201+ let gh = if (if (aS())
1202+ then true
1203+ else (ci == n))
1204+ then throw(("Get operation is blocked by admin. Status = " + toString(ci)))
1205+ else true
1206+ if ((gh == gh))
1207+ then {
1208+ let gb = invoke(aN, "burn", [dS], [AttachedPayment(cf, dS)])
1209+ if ((gb == gb))
1210+ then {
1211+ let gi = ds(-(cu), -(cv), 0)
1212+ let ft = gi._1
1213+ let dj = gi._2
1214+ let fu = dw(dr, dj)
1215+ if ((fu == fu))
1216+ then (cw ++ ft)
1217+ else throw("Strict value is not equal to itself.")
1218+ }
1219+ else throw("Strict value is not equal to itself.")
1220+ }
1221+ else throw("Strict value is not equal to itself.")
1222+ }
1223+ else throw("Strict value is not equal to itself.")
1224+ }
1225+ else throw("Strict value is not equal to itself.")
1226+ }
1227+ else throw("Strict value is not equal to itself.")
1228+ }
1229+
1230+
1231+
1232+@Callable(dK)
1233+func unstakeAndGetNoLess (fV,gj,ge) = {
1234+ let fM = if (aS())
1235+ then true
1236+ else (bf == n)
1237+ let eG = [if (!(fM))
1238+ then true
1239+ else throw("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1240+ then true
1241+ else throw("no payments are expected")]
1242+ if ((eG == eG))
1243+ then {
1244+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1245+ if ((dr == dr))
1246+ then {
1247+ let fW = invoke(bm, "unstake", [toBase58String(bg), fV], nil)
1248+ if ((fW == fW))
1249+ then {
1250+ let cO = cb(toBase58String(dK.transactionId), toBase58String(bg), fV, dK.caller)
1251+ let cu = cO._1
1252+ let cv = cO._2
1253+ let cw = cO._10
1254+ let gk = [if ((cu >= gj))
1255+ then true
1256+ else throw(makeString(["amount asset amount to receive is less than ", toString(gj)], "")), if ((cv >= ge))
1257+ then true
1258+ else throw(makeString(["price asset amount to receive is less than ", toString(ge)], ""))]
1259+ if ((gk == gk))
1260+ then {
1261+ let gb = invoke(aN, "burn", [fV], [AttachedPayment(bg, fV)])
1262+ if ((gb == gb))
1263+ then {
1264+ let gl = ds(-(cu), -(cv), 0)
1265+ let ft = gl._1
1266+ let dj = gl._2
1267+ let fu = dw(dr, dj)
1268+ if ((fu == fu))
1269+ then (cw ++ ft)
1270+ else throw("Strict value is not equal to itself.")
1271+ }
1272+ else throw("Strict value is not equal to itself.")
1273+ }
1274+ else throw("Strict value is not equal to itself.")
1275+ }
1276+ else throw("Strict value is not equal to itself.")
1277+ }
1278+ else throw("Strict value is not equal to itself.")
1279+ }
1280+ else throw("Strict value is not equal to itself.")
1281+ }
1282+
1283+
1284+
1285+@Callable(dK)
1286+func activate (gm,gn) = if ((toString(dK.caller) != toString(aN)))
1287+ then throw("permissions denied")
1288+ else $Tuple2([StringEntry(ad(), gm), StringEntry(ae(), gn)], "success")
1289+
1290+
1291+
1292+@Callable(dK)
1293+func refreshKLp () = {
1294+ let go = valueOrElse(getInteger(aj), 0)
1295+ let gp = if (((height - go) >= am))
1296+ then unit
1297+ else aK(makeString([toString(am), " blocks have not passed since the previous call"], ""))
1298+ if ((gp == gp))
1299+ then {
1300+ let dD = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ai), "0")), aM("invalid kLp"))
1301+ let gq = ds(0, 0, 0)
1302+ let gr = gq._1
1303+ let dj = gq._2
1304+ let dv = if ((dD != dj))
1305+ then gr
1306+ else aK("nothing to refresh")
1307+ $Tuple2(dv, toString(dj))
1308+ }
1309+ else throw("Strict value is not equal to itself.")
1310+ }
1311+
1312+
1313+
1314+@Callable(dK)
1315+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aU())
1316+
1317+
1318+
1319+@Callable(dK)
1320+func getAccBalanceWrapperREADONLY (bE) = $Tuple2(nil, bD(bE))
1321+
1322+
1323+
1324+@Callable(dK)
1325+func calcPricesWrapperREADONLY (bM,bN,bR) = {
1326+ let ca = bQ(bM, bN, bR)
1327+ $Tuple2(nil, [toString(ca[0]), toString(ca[1]), toString(ca[2])])
1328+ }
1329+
1330+
1331+
1332+@Callable(dK)
11821333 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
11831334
11841335
11851336
1186-@Callable(dj)
1337+@Callable(dK)
11871338 func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J))
11881339
11891340
11901341
1191-@Callable(dj)
1192-func calcPriceBigIntWrapperREADONLY (bx,by) = $Tuple2(nil, toString(bw(parseBigIntValue(bx), parseBigIntValue(by))))
1342+@Callable(dK)
1343+func calcPriceBigIntWrapperREADONLY (bG,bH) = $Tuple2(nil, toString(bF(parseBigIntValue(bG), parseBigIntValue(bH))))
11931344
11941345
11951346
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))
1347+@Callable(dK)
1348+func estimatePutOperationWrapperREADONLY (cc,cy,cz,cA,cB,cC,aa,cD,cE) = $Tuple2(nil, cx(cc, cy, cz, cA, cB, cC, aa, cD, cE))
11981349
11991350
12001351
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))
1352+@Callable(dK)
1353+func estimateGetOperationWrapperREADONLY (cc,cd,ce,aa) = {
1354+ let cO = cb(cc, cd, ce, addressFromStringValue(aa))
1355+ $Tuple2(nil, $Tuple10(cO._1, cO._2, cO._3, cO._4, cO._5, cO._6, cO._7, toString(cO._8), cO._9, cO._10))
12051356 }
12061357
12071358
12081359
1209-@Callable(dj)
1360+@Callable(dK)
12101361 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))
1362+ let bS = aU()
1363+ let cf = fromBase58String(bS[q])
1364+ let gs = bS[r]
1365+ let gt = bS[s]
1366+ let cH = bS[v]
1367+ let cI = bS[w]
1368+ let bT = parseIntValue(bS[t])
1369+ let bU = parseIntValue(bS[u])
1370+ let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1371+ let gv = bD(gs)
1372+ let gw = bD(gt)
1373+ let gx = if ((gu == 0))
12231374 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))
1375+ else bQ(gv, gw, gu)
1376+ let cp = 0
1377+ let gy = H(gx[1], b)
1378+ let gz = H(gx[2], b)
1379+ let gA = value(getInteger(aN, ax(toString(this))))
1380+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gv), toString(gw), toString(gu), toString(cp), toString(gy), toString(gz), toString(gA)], j))
12301381 }
12311382
12321383
12331384
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))
1385+@Callable(dK)
1386+func evaluatePutByAmountAssetREADONLY (cz) = {
1387+ let bS = aU()
1388+ let cf = fromBase58String(bS[q])
1389+ let cF = bS[r]
1390+ let cg = fromBase58String(cF)
1391+ let cG = bS[s]
1392+ let ch = fromBase58String(cG)
1393+ let bT = parseIntValue(bS[t])
1394+ let bU = parseIntValue(bS[u])
1395+ let ci = bS[p]
1396+ let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1397+ let gv = bD(cF)
1398+ let gw = bD(cG)
1399+ let bO = D(gv, bT)
1400+ let bP = D(gw, bU)
1401+ let co = if ((gu == 0))
12511402 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))
1403+ else bF(bP, bO)
1404+ let cL = D(cz, bT)
1405+ let cM = fraction(cL, co, d)
1406+ let cB = H(cM, bU)
1407+ let dQ = cx("", 500000, cz, cg, cB, ch, "", true, false)
1408+ let cW = dQ._1
1409+ let gB = dQ._3
1410+ let ck = dQ._4
1411+ let cm = dQ._5
1412+ let cj = dQ._6
1413+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cW), toString(H(co, b)), toString(ck), toString(cm), toString(cj), ci, toString(cz), toString(cB)], j))
12631414 }
12641415
12651416
12661417
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))
1418+@Callable(dK)
1419+func evaluatePutByPriceAssetREADONLY (cB) = {
1420+ let bS = aU()
1421+ let cf = fromBase58String(bS[q])
1422+ let cF = bS[r]
1423+ let cg = fromBase58String(cF)
1424+ let cG = bS[s]
1425+ let ch = fromBase58String(cG)
1426+ let bT = parseIntValue(bS[t])
1427+ let bU = parseIntValue(bS[u])
1428+ let ci = bS[p]
1429+ let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1430+ let gC = bD(cF)
1431+ let gD = bD(cG)
1432+ let gE = D(gC, bT)
1433+ let gF = D(gD, bU)
1434+ let co = if ((gu == 0))
12841435 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))
1436+ else bF(gF, gE)
1437+ let cM = D(cB, bU)
1438+ let cL = fraction(cM, d, co)
1439+ let cz = H(cL, bT)
1440+ let dQ = cx("", 500000, cz, cg, cB, ch, "", true, false)
1441+ let cW = dQ._1
1442+ let gB = dQ._3
1443+ let ck = dQ._4
1444+ let cm = dQ._5
1445+ let cj = dQ._6
1446+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cW), toString(H(co, b)), toString(ck), toString(cm), toString(cj), ci, toString(cz), toString(cB)], j))
12961447 }
12971448
12981449
12991450
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))
1451+@Callable(dK)
1452+func evaluateGetREADONLY (gG,gH) = {
1453+ let cO = cb("", gG, gH, this)
1454+ let cu = cO._1
1455+ let cv = cO._2
1456+ let ck = cO._5
1457+ let cm = cO._6
1458+ let cj = cO._7
1459+ let cp = cO._8
1460+ let ci = parseIntValue(cO._9)
1461+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cu), toString(cv), toString(ck), toString(cm), toString(cj), toString(cp), toString(ci)], j))
13111462 }
13121463
13131464
1314-@Verifier(ga)
1315-func gb () = {
1316- let gc = {
1317- let du = ez()
1318- if ($isInstanceOf(du, "ByteVector"))
1465+@Verifier(gI)
1466+func gJ () = {
1467+ let gK = {
1468+ let dV = eY()
1469+ if ($isInstanceOf(dV, "ByteVector"))
13191470 then {
1320- let eD = du
1321- eD
1471+ let fc = dV
1472+ fc
13221473 }
1323- else if ($isInstanceOf(du, "Unit"))
1324- then ga.senderPublicKey
1474+ else if ($isInstanceOf(dV, "Unit"))
1475+ then gI.senderPublicKey
13251476 else throw("Match error")
13261477 }
1327- let du = ga
1328- if ($isInstanceOf(du, "Order"))
1478+ let dV = gI
1479+ if ($isInstanceOf(dV, "Order"))
13291480 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
1481+ let dz = dV
1482+ let gL = aT()
1483+ let gM = dy(dz)
1484+ let aC = gM._1
1485+ let aD = gM._2
1486+ let aE = sigVerify(dz.bodyBytes, dz.proofs[0], dz.senderPublicKey)
1487+ let aF = sigVerify(dz.bodyBytes, dz.proofs[1], gL)
1488+ if (if (if (aC)
1489+ then aE
13371490 else false)
1338- then ax
1491+ then aF
13391492 else false)
13401493 then true
1341- else au(av, aw, ax)
1494+ else aB(aC, aD, aE, aF)
13421495 }
1343- else if ($isInstanceOf(du, "SetScriptTransaction"))
1496+ else if ($isInstanceOf(dV, "SetScriptTransaction"))
13441497 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)
1498+ let eZ = dV
1499+ if (sigVerify(gI.bodyBytes, gI.proofs[0], gK))
13521500 then true
1353- else sigVerify(ga.bodyBytes, ga.proofs[0], gc)
1501+ else {
1502+ let gN = blake2b256(value(eZ.script))
1503+ let gO = fromBase64String(value(getString(aN, az())))
1504+ let gP = scriptHash(this)
1505+ if ((gO == gN))
1506+ then (gP != gN)
1507+ else false
1508+ }
13541509 }
1355- else sigVerify(ga.bodyBytes, ga.proofs[0], gc)
1510+ else sigVerify(gI.bodyBytes, gI.proofs[0], gK)
13561511 }
13571512
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
87-func S () = "%s__swapContract"
87+func S () = "%s__factoryContract"
8888
8989
90-func T () = "%s__factoryContract"
90+func T () = "%s__managerPublicKey"
9191
9292
93-func U () = "%s__managerPublicKey"
93+func U () = "%s__pendingManagerPublicKey"
9494
9595
96-func V () = "%s__pendingManagerPublicKey"
96+func V () = "%s%s__price__last"
9797
9898
99-func W () = "%s%s__price__last"
99+func W (X,Y) = makeString(["%s%s%d%d__price__history", toString(X), toString(Y)], j)
100100
101101
102-func X (Y,Z) = makeString(["%s%s%d%d__price__history", toString(Y), toString(Z)], j)
102+func Z (aa,ab) = ((("%s%s%s__P__" + aa) + "__") + ab)
103103
104104
105-func aa (ab,ac) = ((("%s%s%s__P__" + ab) + "__") + ac)
105+func ac (aa,ab) = ((("%s%s%s__G__" + aa) + "__") + ab)
106106
107107
108-func ad (ab,ac) = ((("%s%s%s__G__" + ab) + "__") + ac)
108+func ad () = "%s__amountAsset"
109109
110110
111-func ae () = "%s__amountAsset"
111+func ae () = "%s__priceAsset"
112112
113113
114-func af () = "%s__priceAsset"
114+let af = "%s__fee"
115+
116+let ag = fraction(10, b, 10000)
117+
118+let ah = valueOrElse(getInteger(this, af), ag)
119+
120+let ai = makeString(["%s", "kLp"], j)
121+
122+let aj = makeString(["%s", "kLpRefreshedHeight"], j)
123+
124+let ak = makeString(["%s", "refreshKLpDelay"], j)
125+
126+let al = 30
127+
128+let am = valueOrElse(getInteger(this, ak), al)
129+
130+func an () = "%s__factoryConfig"
115131
116132
117-func ag () = "%s__factoryConfig"
133+func ao () = "%s%s__matcher__publicKey"
118134
119135
120-func ah () = "%s%s__matcher__publicKey"
136+func ap (aq) = (("%s%s%s__" + aq) + "__mappings__poolContract2LpAsset")
121137
122138
123-func ai (aj) = (("%s%s%s__" + aj) + "__mappings__poolContract2LpAsset")
139+func ar (as,at) = (((("%d%d%s__" + as) + "__") + at) + "__config")
124140
125141
126-func ak (al,am) = (((("%d%d%s__" + al) + "__") + am) + "__config")
142+func au (av) = ("%s%s%s__mappings__baseAsset2internalId__" + av)
127143
128144
129-func an (ao) = ("%s%s%s__mappings__baseAsset2internalId__" + ao)
145+func aw () = "%s__shutdown"
130146
131147
132-func ap () = "%s__shutdown"
148+func ax (ay) = ("%s%s__poolWeight__" + ay)
133149
134150
135-func aq (ar) = ("%s%s__poolWeight__" + ar)
151+func az () = "%s__allowedLpScriptHash"
136152
137153
138-func as () = "%s__allowedLpScriptHash"
154+let aA = "%s__feeCollectorAddress"
155+
156+func aB (aC,aD,aE,aF) = throw((((((((("order validation failed: orderValid=" + toString(aC)) + " (") + aD) + ")") + " senderValid=") + toString(aE)) + " matcherValid=") + toString(aF)))
139157
140158
141-let at = "%s__feeCollectorAddress"
142-
143-func au (av,aw,ax) = throw(((((("order validation failed: orderValid=" + toString(av)) + " senderValid=") + toString(aw)) + " matcherValid=") + toString(ax)))
159+func aG (aH,aI) = valueOrErrorMessage(getString(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " is not defined"], ""))
144160
145161
146-func ay (az,aA) = valueOrErrorMessage(getString(az, aA), makeString(["mandatory ", toString(az), ".", aA, " is not defined"], ""))
162+func aJ (aH,aI) = valueOrErrorMessage(getInteger(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " 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 (aL) = throw(makeString(["lp.ride:", aL], " "))
150166
151167
152-func aC (aD) = throw(makeString(["lp.ride:", aD], " "))
168+func aM (aL) = makeString(["lp.ride:", aL], " ")
153169
154170
155-let aE = addressFromStringValue(ay(this, T()))
171+let aN = addressFromStringValue(aG(this, S()))
156172
157-let aF = addressFromStringValue(ay(aE, at))
173+let aO = addressFromStringValue(aG(aN, aA))
158174
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"))
175+let aP = {
176+ let aQ = invoke(aN, "getInFeeREADONLY", [toString(this)], nil)
177+ if ($isInstanceOf(aQ, "Int"))
178+ then aQ
179+ else throw(($getType(aQ) + " couldn't be cast to Int"))
164180 }
165181
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"))
182+let aR = {
183+ let aQ = invoke(aN, "getOutFeeREADONLY", [toString(this)], nil)
184+ if ($isInstanceOf(aQ, "Int"))
185+ then aQ
186+ else throw(($getType(aQ) + " couldn't be cast to Int"))
171187 }
172188
173-func aJ () = valueOrElse(getBoolean(aE, ap()), false)
189+func aS () = valueOrElse(getBoolean(aN, aw()), false)
174190
175191
176-func aK () = fromBase58String(ay(aE, ah()))
192+func aT () = fromBase58String(aG(aN, ao()))
177193
178194
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)
195+func aU () = {
196+ let aV = aG(this, ad())
197+ let aW = aG(this, ae())
198+ let at = aJ(aN, au(aW))
199+ let as = aJ(aN, au(aV))
200+ split(aG(aN, ar(toString(as), toString(at))), j)
185201 }
186202
187203
188-func aO (aP) = if ((aP == i))
204+func aX (aY) = if ((aY == i))
189205 then unit
190- else fromBase58String(aP)
206+ else fromBase58String(aY)
191207
192208
193-func aQ (aP) = if ((aP == unit))
209+func aZ (aY) = if ((aY == unit))
194210 then i
195- else toBase58String(value(aP))
211+ else toBase58String(value(aY))
196212
197213
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]))
214+func ba (bb) = $Tuple7(addressFromStringValue(bb[o]), parseIntValue(bb[p]), fromBase58String(bb[q]), aX(bb[r]), aX(bb[s]), parseIntValue(bb[t]), parseIntValue(bb[u]))
199215
200216
201-let aT = aR(aL())
217+let bc = ba(aU())
202218
203-let aU = aT
219+let bd = bc
204220
205-let aV = aU._1
221+let be = bd._1
206222
207-let aW = aU._2
223+let bf = bd._2
208224
209-let aX = aU._3
225+let bg = bd._3
210226
211-let aY = aU._4
227+let bh = bd._4
212228
213-let aZ = aU._5
229+let bi = bd._5
214230
215-let ba = aU._6
231+let bj = bd._6
216232
217-let bb = aU._7
233+let bk = bd._7
218234
219-func bc () = split(ay(aE, ag()), j)
235+func bl () = split(aG(aN, an()), j)
220236
221237
222-let bd = valueOrErrorMessage(addressFromString(bc()[B]), "incorrect staking address")
238+let bm = valueOrErrorMessage(addressFromString(bl()[B]), "incorrect staking address")
223239
224-let be = valueOrErrorMessage(addressFromString(bc()[C]), "incorrect staking address")
240+let bn = valueOrErrorMessage(addressFromString(bl()[C]), "incorrect staking address")
225241
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)
242+func bo (bp,bq,br,bs,bt,bu,bv,bw,bx,by) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bp), toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by)], j)
227243
228244
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)
245+func bz (bA,bB,bC,bs,bv,bw) = makeString(["%d%d%d%d%d%d", toString(bA), toString(bB), toString(bC), toString(bs), toString(bv), toString(bw)], j)
230246
231247
232-func bu (bv) = if ((bv == "WAVES"))
248+func bD (bE) = if ((bE == "WAVES"))
233249 then wavesBalance(this).available
234- else assetBalance(this, fromBase58String(bv))
250+ else assetBalance(this, fromBase58String(bE))
235251
236252
237-func bw (bx,by) = fraction(bx, d, by)
253+func bF (bG,bH) = fraction(bG, d, bH)
238254
239255
240-func bz (bA,bB,bC,bD) = {
241- let bE = D(bC, bA)
242- let bF = D(bD, bB)
243- bw(bF, bE)
256+func bI (bG,bH,L) = fraction(bG, d, bH, L)
257+
258+
259+func bJ (bK,bL,bM,bN) = {
260+ let bO = D(bM, bK)
261+ let bP = D(bN, bL)
262+ bF(bP, bO)
244263 }
245264
246265
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]
266+func bQ (bM,bN,bR) = {
267+ let bS = aU()
268+ let bT = parseIntValue(bS[t])
269+ let bU = parseIntValue(bS[u])
270+ let bV = bJ(bT, bU, bM, bN)
271+ let bH = D(bM, bT)
272+ let bG = D(bN, bU)
273+ let bW = D(bR, b)
274+ let bX = bF(bH, bW)
275+ let bY = bF(bG, bW)
276+[bV, bX, bY]
258277 }
259278
260279
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)]
280+func bZ (bM,bN,bR) = {
281+ let ca = bQ(bM, bN, bR)
282+[H(ca[0], b), H(ca[1], b), H(ca[2], b)]
264283 }
265284
266285
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))
286+func cb (cc,cd,ce,aa) = {
287+ let bS = aU()
288+ let cf = bS[q]
289+ let cg = bS[r]
290+ let ch = bS[s]
291+ let bK = parseIntValue(bS[t])
292+ let bL = parseIntValue(bS[u])
293+ let ci = bS[p]
294+ let cj = valueOrErrorMessage(assetInfo(fromBase58String(cf)), (("Asset " + cf) + " doesn't exist")).quantity
295+ if ((cf != cd))
277296 then throw("Invalid asset passed.")
278297 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 == ""))
298+ let ck = bD(cg)
299+ let cl = D(ck, bK)
300+ let cm = bD(ch)
301+ let cn = D(cm, bL)
302+ let co = bF(cn, cl)
303+ let cp = H(co, b)
304+ let cq = D(ce, b)
305+ let cr = D(cj, b)
306+ let cs = fraction(cl, cq, cr)
307+ let ct = fraction(cn, cq, cr)
308+ let cu = K(cs, bK, FLOOR)
309+ let cv = K(ct, bL, FLOOR)
310+ let cw = if ((cc == ""))
292311 then nil
293- else [ScriptTransfer(ab, ck, if ((bW == "WAVES"))
312+ else [ScriptTransfer(aa, cu, if ((cg == "WAVES"))
294313 then unit
295- else fromBase58String(bW)), ScriptTransfer(ab, cl, if ((bX == "WAVES"))
314+ else fromBase58String(cg)), ScriptTransfer(aa, cv, if ((ch == "WAVES"))
296315 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)
316+ else fromBase58String(ch)), StringEntry(ac(toString(aa), cc), bz(cu, cv, ce, cp, height, lastBlock.timestamp)), IntegerEntry(V(), cp), IntegerEntry(W(height, lastBlock.timestamp), cp)]
317+ $Tuple10(cu, cv, cg, ch, ck, cm, cj, co, ci, cw)
299318 }
300319 }
301320
302321
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))
322+func cx (cc,cy,cz,cA,cB,cC,aa,cD,cE) = {
323+ let bS = aU()
324+ let cf = fromBase58String(bS[q])
325+ let cF = bS[r]
326+ let cG = bS[s]
327+ let cH = bS[v]
328+ let cI = bS[w]
329+ let bT = parseIntValue(bS[t])
330+ let bU = parseIntValue(bS[u])
331+ let ci = bS[p]
332+ let cj = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
333+ let cJ = toBase58String(valueOrElse(cA, fromBase58String("WAVES")))
334+ let cK = toBase58String(valueOrElse(cC, fromBase58String("WAVES")))
335+ if (if ((cF != cJ))
317336 then true
318- else (cw != cA))
337+ else (cG != cK))
319338 then throw("Invalid amt or price asset passed.")
320339 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))
340+ let ck = if (cD)
341+ then bD(cF)
342+ else (bD(cF) - cz)
343+ let cm = if (cD)
344+ then bD(cG)
345+ else (bD(cG) - cB)
346+ let cL = D(cz, bT)
347+ let cM = D(cB, bU)
348+ let cN = bF(cM, cL)
349+ let cl = D(ck, bT)
350+ let cn = D(cm, bU)
351+ let cO = if ((cj == 0))
333352 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)
353+ let co = e
354+ let cP = e
355+ let bW = pow((cL * cM), 0, toBigInt(5), 1, 0, DOWN)
356+ $Tuple5(H(bW, b), H(cL, bT), H(cM, bU), bF((cn + cM), (cl + cL)), cP)
338357 }
339358 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)
359+ let co = bF(cn, cl)
360+ let cP = fraction(R((co - cN)), d, co)
361+ let cQ = D(cy, b)
362+ if (if ((co != e))
363+ then (cP > cQ)
345364 else false)
346- then throw(((("Price slippage " + toString(cF)) + " exceeded the passed limit of ") + toString(cG)))
365+ then throw(((("Price slippage " + toString(cP)) + " exceeded the passed limit of ") + toString(cQ)))
347366 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)
367+ let cr = D(cj, b)
368+ let cR = fraction(cL, bI(cn, cl, CEILING), d, CEILING)
369+ let cS = fraction(cM, d, bI(cn, cl, FLOOR), CEILING)
370+ let cT = if ((cR > cM))
371+ then $Tuple2(cS, cM)
372+ else $Tuple2(cL, cR)
373+ let cU = cT._1
374+ let cV = cT._2
375+ let bW = fraction(cr, cV, cn, FLOOR)
376+ $Tuple5(K(bW, b, FLOOR), K(cU, bT, CEILING), K(cV, bU, CEILING), co, cP)
358377 }
359378 }
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))
379+ let cW = cO._1
380+ let cX = cO._2
381+ let cY = cO._3
382+ let cp = H(cO._4, b)
383+ let cZ = H(cO._5, b)
384+ if ((0 >= cW))
366385 then throw("Invalid calculations. LP calculated is less than zero.")
367386 else {
368- let cQ = if (!(cu))
387+ let da = if (!(cE))
369388 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)
389+ else cW
390+ let db = (cz - cX)
391+ let dc = (cB - cY)
392+ let dd = [IntegerEntry(V(), cp), IntegerEntry(W(height, lastBlock.timestamp), cp), StringEntry(Z(aa, cc), bo(cX, cY, da, cp, cy, cZ, height, lastBlock.timestamp, db, dc))]
393+ $Tuple13(cW, da, cp, ck, cm, cj, cf, ci, dd, db, dc, cA, cC)
375394 }
376395 }
377396 }
378397
379398
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- }
399+func de (df,dg,cj) = {
400+ let dh = G(df, toBigInt(bj))
401+ let di = G(dg, toBigInt(bk))
402+ let dj = fraction(pow((dh * di), 0, toBigInt(5), 1, 18, DOWN), g, cj)
403+ if ((cj == f))
404+ then f
405+ else dj
422406 }
423407
424408
425-func di (dj) = if ((size(dj.payments) != 1))
409+func dk (dl,dm,dn) = {
410+ let do = (toBigInt(bD(aZ(bh))) - dl)
411+ let dp = (toBigInt(bD(aZ(bi))) - dm)
412+ let dq = (toBigInt(value(assetInfo(bg)).quantity) - dn)
413+ let dr = de(do, dp, dq)
414+ dr
415+ }
416+
417+
418+func ds (dt,du,dn) = {
419+ let do = (bD(aZ(bh)) + dt)
420+ let dp = (bD(aZ(bi)) + du)
421+ let dq = (value(assetInfo(bg)).quantity + dn)
422+ let dj = de(toBigInt(do), toBigInt(dp), toBigInt(dq))
423+ let dv = [IntegerEntry(aj, height), StringEntry(ai, toString(dj))]
424+ $Tuple2(dv, dj)
425+ }
426+
427+
428+func dw (dx,dj) = if ((dj >= dx))
429+ then true
430+ else aK(makeString(["updated KLp lower than current KLp", toString(dx), toString(dj)], " "))
431+
432+
433+func dy (dz) = {
434+ let do = bD(aZ(bh))
435+ let dp = bD(aZ(bi))
436+ let dA = dz.amount
437+ let dB = fraction(dz.amount, dz.price, b, FLOOR)
438+ let dC = if ((dz.orderType == Buy))
439+ then $Tuple2(dA, -(dB))
440+ else $Tuple2(-(dA), dB)
441+ let dt = dC._1
442+ let du = dC._2
443+ if (if (if (aS())
444+ then true
445+ else (bf == m))
446+ then true
447+ else (bf == n))
448+ then throw("Exchange operations disabled")
449+ else if (if ((dz.assetPair.amountAsset != bh))
450+ then true
451+ else (dz.assetPair.priceAsset != bi))
452+ then throw("Wrong order assets.")
453+ else {
454+ let dD = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ai), "0")), aM("invalid kLp"))
455+ let dE = ds(dt, du, 0)
456+ let dF = dE._1
457+ let dG = dE._2
458+ let dH = (dG >= dD)
459+ let dI = makeString(["kLp=", toString(dD), " kLpNew=", toString(dG), " amountAssetBalance=", toString(do), " priceAssetBalance=", toString(dp), " amountAssetBalanceDelta=", toString(dt), " priceAssetBalanceDelta=", toString(du), " height=", toString(height)], "")
460+ $Tuple2(dH, dI)
461+ }
462+ }
463+
464+
465+func dJ (dK) = if ((size(dK.payments) != 1))
426466 then throw("exactly 1 payment is expected")
427467 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())
468+ let dL = value(dK.payments[0])
469+ let cd = value(dL.assetId)
470+ let dM = dL.amount
471+ let cO = cb(toBase58String(dK.transactionId), toBase58String(cd), dM, dK.caller)
472+ let cu = cO._1
473+ let cv = cO._2
474+ let ci = parseIntValue(cO._9)
475+ let cw = cO._10
476+ if (if (aS())
437477 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)
478+ else (ci == n))
479+ then throw(("Get operation is blocked by admin. Status = " + toString(ci)))
480+ else $Tuple5(cu, cv, dM, cd, cw)
441481 }
442482
443483
444-func dm (dj,co,cu) = if ((size(dj.payments) != 2))
484+func dN (dK,cy,cE) = if ((size(dK.payments) != 2))
445485 then throw("exactly 2 payments are expected")
446486 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())
487+ let dO = value(dK.payments[0])
488+ let dP = value(dK.payments[1])
489+ let dQ = cx(toBase58String(dK.transactionId), cy, dO.amount, dO.assetId, dP.amount, dP.assetId, toString(dK.caller), false, cE)
490+ let ci = parseIntValue(dQ._8)
491+ if (if (if (aS())
452492 then true
453- else (bY == l))
493+ else (ci == l))
454494 then true
455- else (bY == n))
456- then throw(("Put operation is blocked by admin. Status = " + toString(bY)))
457- else dp
495+ else (ci == n))
496+ then throw(("Put operation is blocked by admin. Status = " + toString(ci)))
497+ else dQ
458498 }
459499
460500
461-func dq (dr) = {
462- let ds = invoke(aE, "emit", [dr], nil)
463- if ((ds == ds))
501+func dR (dS) = {
502+ let dT = invoke(aN, "emit", [dS], nil)
503+ if ((dT == dT))
464504 then {
465- let dt = {
466- let du = ds
467- if ($isInstanceOf(du, "Address"))
505+ let dU = {
506+ let dV = dT
507+ if ($isInstanceOf(dV, "Address"))
468508 then {
469- let dv = du
470- invoke(dv, "emit", [dr], nil)
509+ let dW = dV
510+ invoke(dW, "emit", [dS], nil)
471511 }
472512 else unit
473513 }
474- if ((dt == dt))
475- then dr
514+ if ((dU == dU))
515+ then dS
476516 else throw("Strict value is not equal to itself.")
477517 }
478518 else throw("Strict value is not equal to itself.")
479519 }
480520
481521
482-func dw (dr,dx) = {
483- let dy = if ((dx == 0))
522+func dX (dS,ah) = {
523+ let dY = if ((ah == 0))
484524 then 0
485- else fraction(dr, dx, b)
486- $Tuple2((dr - dy), dy)
525+ else fraction(dS, ah, b)
526+ $Tuple2((dS - dY), dY)
487527 }
488528
489529
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))
530+func dZ (ea,eb,aa,ab) = {
531+ let ec = (ab == unit)
532+ let ed = bD(aZ(bh))
533+ let ee = bD(aZ(bi))
534+ let ef = if ((eb == bh))
495535 then true
496- else if ((dB == aZ))
536+ else if ((eb == bi))
497537 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))
538+ else aK("invalid asset")
539+ let eg = if (ec)
540+ then $Tuple2(ed, ee)
541+ else if (ef)
542+ then $Tuple2((ed - ea), ee)
543+ else $Tuple2(ed, (ee - ea))
544+ let eh = eg._1
545+ let ei = eg._2
546+ let ej = if (ef)
547+ then $Tuple2(ea, 0)
548+ else $Tuple2(0, ea)
549+ let ek = ej._1
550+ let el = ej._2
551+ let dA = dX(ek, aP)._1
552+ let dB = dX(el, aP)._1
553+ let em = dX(ea, aP)
554+ let en = em._1
555+ let dY = em._2
556+ let eo = (eh + dA)
557+ let ep = (ei + dB)
558+ let eq = bF(D(ep, bk), D(eo, bj))
559+ let er = H(eq, b)
560+ let es = if (ef)
561+ then eh
562+ else ei
563+ let et = toBigInt(es)
564+ let eu = toBigInt(valueOrErrorMessage(assetInfo(bg), (("asset " + toBase58String(bg)) + " doesn't exist")).quantity)
565+ let ev = if ((eu > f))
526566 then true
527- else aC("initial deposit requires all coins")
528- if ((dX == dX))
567+ else aK("initial deposit requires all coins")
568+ if ((ev == ev))
529569 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)
570+ let ew = toBigInt(en)
571+ let ex = max([0, toInt(((eu * (sqrtBigInt((d + ((ew * d) / et)), 18, 18, DOWN) - d)) / d))])
572+ let dd = if (ec)
533573 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)
574+ else [IntegerEntry(V(), er), IntegerEntry(W(height, lastBlock.timestamp), er), StringEntry(Z(toString(value(aa)), toBase58String(value(ab))), bo(ek, el, ex, er, 0, 0, height, lastBlock.timestamp, 0, 0))]
575+ let ey = bF(D(ei, bk), D(eh, bj))
576+ let ez = H(ey, b)
577+ let eA = {
578+ let eB = if (ef)
579+ then $Tuple2(ek, eh)
580+ else $Tuple2(el, ei)
581+ let dS = eB._1
582+ let eC = eB._2
583+ let eD = toInt(fraction(eu, toBigInt((dS / 2)), toBigInt(eC)))
584+ fraction((ex - eD), b, eD)
545585 }
546- $Tuple4(dZ, cT, dy, ec)
586+ $Tuple5(ex, dd, dY, eA, ef)
547587 }
548588 else throw("Strict value is not equal to itself.")
549589 }
550590
551591
552-func eg (eh,dP,dB,ab,ac) = {
553- let dC = (ac == unit)
554- let ei = [if ((dB == aX))
592+func eE (eF,en,eb,aa,ab) = {
593+ let ec = (ab == unit)
594+ let bS = aU()
595+ let bT = parseIntValue(bS[t])
596+ let bU = parseIntValue(bS[u])
597+ let eG = [if ((eb == bg))
555598 then true
556- else aC("invalid lp asset")]
557- if ((ei == ei))
599+ else aK("invalid lp asset")]
600+ if ((eG == eG))
558601 then {
559- let ej = if ((eh == aY))
602+ let eH = if ((eF == bh))
560603 then true
561- else if ((eh == aZ))
604+ else if ((eF == bi))
562605 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)
606+ else aK("invalid asset")
607+ let eI = if (eH)
608+ then toBigInt(bD(aZ(bh)))
609+ else toBigInt(bD(aZ(bi)))
610+ let eJ = if (eH)
611+ then bT
612+ else bU
613+ let eK = bD(aZ(bh))
614+ let eL = bD(aZ(bi))
615+ let eM = if (eH)
616+ then eK
617+ else eL
618+ let eN = toBigInt(eM)
619+ let eu = toBigInt(valueOrErrorMessage(assetInfo(bg), (("asset " + toBase58String(bg)) + " doesn't exist")).quantity)
620+ let eO = toBigInt(en)
621+ let eP = max([0, toInt(((eI * (d - pow((d - ((eO * d) / eu)), 18, h, 0, 18, DOWN))) / d))])
622+ let eQ = dX(eP, aR)
623+ let eR = eQ._1
624+ let dY = eQ._2
625+ let eS = if (eH)
626+ then $Tuple4(eR, 0, (eK - eP), eL)
627+ else $Tuple4(0, eR, eK, (eL - eP))
628+ let eT = eS._1
629+ let eU = eS._2
630+ let eV = eS._3
631+ let eW = eS._4
632+ let eq = bF(D(eW, bk), D(eV, bj))
633+ let er = H(eq, b)
634+ let dd = if (ec)
589635 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)
636+ else [StringEntry(ac(toString(value(aa)), toBase58String(value(ab))), bz(eT, eU, en, er, height, lastBlock.timestamp)), IntegerEntry(V(), er), IntegerEntry(W(height, lastBlock.timestamp), er)]
637+ let ey = bF(D(eL, bk), D(eK, bj))
638+ let ez = H(ey, b)
639+ let eA = {
640+ let eX = (toInt(fraction(eI, eO, eu)) * 2)
641+ fraction((eR - eX), b, eX)
596642 }
597- $Tuple4(es, cT, dy, ec)
643+ $Tuple5(eR, dd, dY, eA, eH)
598644 }
599645 else throw("Strict value is not equal to itself.")
600646 }
601647
602648
603-func ez () = {
604- let du = getString(U())
605- if ($isInstanceOf(du, "String"))
649+func eY () = {
650+ let dV = getString(T())
651+ if ($isInstanceOf(dV, "String"))
606652 then {
607- let eA = du
608- fromBase58String(eA)
653+ let eZ = dV
654+ fromBase58String(eZ)
609655 }
610- else if ($isInstanceOf(du, "Unit"))
656+ else if ($isInstanceOf(dV, "Unit"))
611657 then unit
612658 else throw("Match error")
613659 }
614660
615661
616-func eB () = {
617- let du = getString(V())
618- if ($isInstanceOf(du, "String"))
662+func fa () = {
663+ let dV = getString(U())
664+ if ($isInstanceOf(dV, "String"))
619665 then {
620- let eA = du
621- fromBase58String(eA)
666+ let eZ = dV
667+ fromBase58String(eZ)
622668 }
623- else if ($isInstanceOf(du, "Unit"))
669+ else if ($isInstanceOf(dV, "Unit"))
624670 then unit
625671 else throw("Match error")
626672 }
627673
628674
629-func eC (dj) = {
630- let du = ez()
631- if ($isInstanceOf(du, "ByteVector"))
675+func fb (dK) = {
676+ let dV = eY()
677+ if ($isInstanceOf(dV, "ByteVector"))
632678 then {
633- let eD = du
634- (dj.callerPublicKey == eD)
679+ let fc = dV
680+ (dK.callerPublicKey == fc)
635681 }
636- else if ($isInstanceOf(du, "Unit"))
637- then (dj.caller == this)
682+ else if ($isInstanceOf(dV, "Unit"))
683+ then (dK.caller == this)
638684 else throw("Match error")
639685 }
640686
641687
642-func eE (dj) = {
643- let eF = throw("Permission denied")
644- let du = ez()
645- if ($isInstanceOf(du, "ByteVector"))
688+func fd (dK) = {
689+ let fe = throw("Permission denied")
690+ let dV = eY()
691+ if ($isInstanceOf(dV, "ByteVector"))
646692 then {
647- let eD = du
648- if ((dj.callerPublicKey == eD))
693+ let fc = dV
694+ if ((dK.callerPublicKey == fc))
649695 then true
650- else eF
696+ else fe
651697 }
652- else if ($isInstanceOf(du, "Unit"))
653- then if ((dj.caller == this))
698+ else if ($isInstanceOf(dV, "Unit"))
699+ then if ((dK.caller == this))
654700 then true
655- else eF
701+ else fe
656702 else throw("Match error")
657703 }
658704
659705
660-@Callable(dj)
661-func calculateAmountOutForSwapREADONLY (eG,eH) = {
662- let eI = if ((eH == false))
706+@Callable(dK)
707+func setManager (ff) = {
708+ let fg = fd(dK)
709+ if ((fg == fg))
663710 then {
664- let eJ = ay(this, af())
665- let eK = ay(this, ae())
666- $Tuple2(eJ, eK)
667- }
668- else {
669- let eJ = ay(this, ae())
670- let eK = ay(this, af())
671- $Tuple2(eJ, eK)
672- }
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))
681- then true
682- else throw("new K is fewer error")
683- if ((eQ == eQ))
684- then $Tuple2(nil, eN)
685- else throw("Strict value is not equal to itself.")
686- }
687-
688-
689-
690-@Callable(dj)
691-func calculateAmountOutForSwapAndSendTokens (eG,eH,eR,eS) = {
692- let ei = [if ((value(dj.payments[0]).amount >= eG))
693- then true
694- else aC("Wrong amount"), if ((dj.caller == addressFromStringValue(ay(this, S()))))
695- then true
696- else aC("Permission denied")]
697- if ((ei == ei))
698- then {
699- let dk = value(dj.payments[0])
700- let eK = if ((dk.assetId == unit))
701- 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))
712- then true
713- else throw("new K is fewer error")
714- if ((eQ == eQ))
715- then {
716- let eT = if ((eN >= eR))
717- then true
718- 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))]
723- else throw("Strict value is not equal to itself.")
724- }
711+ let fh = fromBase58String(ff)
712+ if ((fh == fh))
713+ then [StringEntry(U(), ff)]
725714 else throw("Strict value is not equal to itself.")
726715 }
727716 else throw("Strict value is not equal to itself.")
728717 }
729718
730719
731720
732-@Callable(dj)
733-func setManager (eU) = {
734- let eV = eE(dj)
735- if ((eV == eV))
721+@Callable(dK)
722+func confirmManager () = {
723+ let fi = fa()
724+ let fj = if (isDefined(fi))
725+ then true
726+ else throw("No pending manager")
727+ if ((fj == fj))
736728 then {
737- let eW = fromBase58String(eU)
738- if ((eW == eW))
739- then [StringEntry(V(), eU)]
729+ let fk = if ((dK.callerPublicKey == value(fi)))
730+ then true
731+ else throw("You are not pending manager")
732+ if ((fk == fk))
733+ then [StringEntry(T(), toBase58String(value(fi))), DeleteEntry(U())]
740734 else throw("Strict value is not equal to itself.")
741735 }
742736 else throw("Strict value is not equal to itself.")
743737 }
744738
745739
746740
747-@Callable(dj)
748-func confirmManager () = {
749- let eX = eB()
750- let eY = if (isDefined(eX))
751- then true
752- else throw("No pending manager")
753- if ((eY == eY))
754- then {
755- let eZ = if ((dj.callerPublicKey == value(eX)))
756- then true
757- else throw("You are not pending manager")
758- if ((eZ == eZ))
759- then [StringEntry(U(), toBase58String(value(eX))), DeleteEntry(V())]
760- else throw("Strict value is not equal to itself.")
761- }
762- else throw("Strict value is not equal to itself.")
763- }
764-
765-
766-
767-@Callable(dj)
768-func put (co,fa) = if ((0 > co))
741+@Callable(dK)
742+func put (cy,fl) = if ((0 > cy))
769743 then throw("Invalid slippageTolerance passed")
770744 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)
780- if ((ds == ds))
745+ let dQ = dN(dK, cy, true)
746+ let da = dQ._2
747+ let cf = dQ._7
748+ let cw = dQ._9
749+ let db = dQ._10
750+ let dc = dQ._11
751+ let fm = dQ._12
752+ let fn = dQ._13
753+ let dO = toBigInt(value(dK.payments[0]).amount)
754+ let dP = toBigInt(value(dK.payments[1]).amount)
755+ let dr = dk(dO, dP, toBigInt(0))
756+ if ((dr == dr))
781757 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)
758+ let dT = invoke(aN, "emit", [da], nil)
759+ if ((dT == dT))
760+ then {
761+ let dU = {
762+ let dV = dT
763+ if ($isInstanceOf(dV, "Address"))
764+ then {
765+ let dW = dV
766+ invoke(dW, "emit", [da], nil)
767+ }
768+ else unit
788769 }
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))
770+ if ((dU == dU))
797771 then {
798- let fe = if ((cS > 0))
799- then invoke(be, "put", nil, [AttachedPayment(fc, cS)])
772+ let fo = if ((db > 0))
773+ then invoke(bn, "put", nil, [AttachedPayment(fm, db)])
800774 else nil
801- if ((fe == fe))
775+ if ((fo == fo))
802776 then {
803- let ff = if (fa)
777+ let fp = if ((dc > 0))
778+ then invoke(bn, "put", nil, [AttachedPayment(fn, dc)])
779+ else nil
780+ if ((fp == fp))
804781 then {
805- let fg = invoke(bd, "stake", nil, [AttachedPayment(bV, cQ)])
806- if ((fg == fg))
807- then nil
782+ let fq = if (fl)
783+ then {
784+ let fr = invoke(bm, "stake", nil, [AttachedPayment(cf, da)])
785+ if ((fr == fr))
786+ then nil
787+ else throw("Strict value is not equal to itself.")
788+ }
789+ else [ScriptTransfer(dK.caller, da, cf)]
790+ let fs = ds(0, 0, 0)
791+ if ((fs == fs))
792+ then {
793+ let dj = fs._2
794+ let ft = fs._1
795+ let fu = dw(dr, dj)
796+ if ((fu == fu))
797+ then ((cw ++ fq) ++ ft)
798+ else throw("Strict value is not equal to itself.")
799+ }
808800 else throw("Strict value is not equal to itself.")
809801 }
810- else [ScriptTransfer(dj.caller, cQ, bV)]
811- (cm ++ ff)
802+ else throw("Strict value is not equal to itself.")
812803 }
813804 else throw("Strict value is not equal to itself.")
814805 }
815806 else throw("Strict value is not equal to itself.")
816807 }
817808 else throw("Strict value is not equal to itself.")
818809 }
819810 else throw("Strict value is not equal to itself.")
820811 }
821812
822813
823814
824-@Callable(dj)
825-func putForFree (fh) = if ((0 > fh))
815+@Callable(dK)
816+func putForFree (fv) = if ((0 > fv))
826817 then throw("Invalid value passed")
827818 else {
828- let dp = dm(dj, fh, false)
829- dp._9
819+ let dQ = dN(dK, fv, false)
820+ let cw = dQ._9
821+ let dO = toBigInt(value(dK.payments[0]).amount)
822+ let dP = toBigInt(value(dK.payments[1]).amount)
823+ let dr = dk(dO, dP, toBigInt(0))
824+ if ((dr == dr))
825+ then {
826+ let fw = ds(0, 0, 0)
827+ let ft = fw._1
828+ let dj = fw._2
829+ let fu = dw(dr, dj)
830+ if ((fu == fu))
831+ then (cw ++ ft)
832+ else throw("Strict value is not equal to itself.")
833+ }
834+ else throw("Strict value is not equal to itself.")
830835 }
831836
832837
833838
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"))
839+@Callable(dK)
840+func putOneTkn (fx,fy) = {
841+ let fz = {
842+ let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
843+ if ($isInstanceOf(aQ, "Boolean"))
844+ then aQ
845+ else throw(($getType(aQ) + " couldn't be cast to Boolean"))
841846 }
842- let fl = if (if (if (aJ())
847+ let fA = if (if (if (aS())
843848 then true
844- else (aW == l))
849+ else (bf == l))
845850 then true
846- else (aW == n))
851+ else (bf == n))
847852 then true
848- else fk
849- let ei = [if (if (!(fl))
853+ else fz
854+ let eG = [if (if (!(fA))
850855 then true
851- else eC(dj))
856+ else fb(dK))
852857 then true
853- else aC("put operation is blocked by admin"), if ((size(dj.payments) == 1))
858+ else aK("put operation is blocked by admin"), if ((size(dK.payments) == 1))
854859 then true
855- else aC("exactly 1 payment are expected")]
856- if ((ei == ei))
860+ else aK("exactly 1 payment are expected")]
861+ if ((eG == eG))
857862 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))
863+ let fB = dK.payments[0]
864+ let eb = fB.assetId
865+ let ea = fB.amount
866+ let dr = if ((eb == bh))
867+ then dk(toBigInt(ea), toBigInt(0), toBigInt(0))
868+ else if ((eb == bi))
869+ then dk(toBigInt(0), toBigInt(ea), toBigInt(0))
870+ else aK("payment asset is not supported")
871+ if ((dr == dr))
865872 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))
873+ let aa = dK.caller
874+ let ab = dK.transactionId
875+ let fC = dZ(ea, eb, aa, ab)
876+ if ((fC == fC))
877877 then {
878- let ff = if (fj)
878+ let ef = fC._5
879+ let fD = fC._4
880+ let dY = fC._3
881+ let dd = fC._2
882+ let fE = fC._1
883+ let fF = if (if ((fx > 0))
884+ then (fx > fE)
885+ else false)
886+ then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
887+ else fE
888+ let dT = dR(fF)
889+ if ((dT == dT))
879890 then {
880- let fr = invoke(bd, "stake", nil, [AttachedPayment(aX, fq)])
881- if ((fr == fr))
882- then nil
891+ let fq = if (fy)
892+ then {
893+ let fG = invoke(bm, "stake", nil, [AttachedPayment(bg, fF)])
894+ if ((fG == fG))
895+ then nil
896+ else throw("Strict value is not equal to itself.")
897+ }
898+ else [ScriptTransfer(dK.caller, fF, bg)]
899+ let fH = if ((dY > 0))
900+ then [ScriptTransfer(aO, dY, eb)]
901+ else nil
902+ let fI = if ((this == aO))
903+ then $Tuple2(0, 0)
904+ else if (ef)
905+ then $Tuple2(-(dY), 0)
906+ else $Tuple2(0, -(dY))
907+ let dt = fI._1
908+ let du = fI._2
909+ let fJ = ds(dt, du, 0)
910+ let ft = fJ._1
911+ let dj = fJ._2
912+ let dD = value(getString(ai))
913+ let fu = dw(dr, dj)
914+ if ((fu == fu))
915+ then $Tuple2((((dd ++ fq) ++ fH) ++ ft), fF)
883916 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)
1030917 }
1031918 else throw("Strict value is not equal to itself.")
1032919 }
1033920 else throw("Strict value is not equal to itself.")
1034921 }
1035922 else throw("Strict value is not equal to itself.")
1036923 }
1037924 else throw("Strict value is not equal to itself.")
1038925 }
1039926
1040927
1041928
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.")
929+@Callable(dK)
930+func putOneTknREADONLY (eb,ea) = {
931+ let fK = dZ(ea, aX(eb), unit, unit)
932+ let fE = fK._1
933+ let dd = fK._2
934+ let dY = fK._3
935+ let fD = fK._4
936+ let ef = fK._5
937+ $Tuple2(nil, $Tuple3(fE, dY, fD))
1054938 }
1055939
1056940
1057941
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))
942+@Callable(dK)
943+func getOneTkn (fL,fx) = {
944+ let fz = {
945+ let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
946+ if ($isInstanceOf(aQ, "Boolean"))
947+ then aQ
948+ else throw(($getType(aQ) + " couldn't be cast to Boolean"))
949+ }
950+ let fM = if (if (aS())
951+ then true
952+ else (bf == n))
953+ then true
954+ else fz
955+ let eG = [if (if (!(fM))
956+ then true
957+ else fb(dK))
958+ then true
959+ else aK("get operation is blocked by admin"), if ((size(dK.payments) == 1))
960+ then true
961+ else aK("exactly 1 payment are expected")]
962+ if ((eG == eG))
1086963 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))
964+ let eF = aX(fL)
965+ let fB = dK.payments[0]
966+ let eb = fB.assetId
967+ let en = fB.amount
968+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
969+ if ((dr == dr))
1091970 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))
971+ let aa = dK.caller
972+ let ab = dK.transactionId
973+ let fN = eE(eF, en, eb, aa, ab)
974+ if ((fN == fN))
1101975 then {
1102- let fF = invoke(aE, "burn", [dr], [AttachedPayment(bV, dr)])
1103- if ((fF == fF))
1104- then cm
976+ let eH = fN._5
977+ let fD = fN._4
978+ let dY = fN._3
979+ let dd = fN._2
980+ let fO = fN._1
981+ let dS = if (if ((fx > 0))
982+ then (fx > fO)
983+ else false)
984+ then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
985+ else fO
986+ let fP = invoke(aN, "burn", [en], [AttachedPayment(eb, en)])
987+ if ((fP == fP))
988+ then {
989+ let fQ = [ScriptTransfer(aa, dS, eF)]
990+ let fH = if ((dY > 0))
991+ then [ScriptTransfer(aO, dY, eF)]
992+ else nil
993+ let fR = {
994+ let fS = if ((this == aO))
995+ then 0
996+ else dY
997+ if (eH)
998+ then $Tuple2(-((dS + fS)), 0)
999+ else $Tuple2(0, -((dS + fS)))
1000+ }
1001+ let dt = fR._1
1002+ let du = fR._2
1003+ let fT = ds(dt, du, 0)
1004+ let ft = fT._1
1005+ let dj = fT._2
1006+ let fu = dw(dr, dj)
1007+ if ((fu == fu))
1008+ then $Tuple2((((dd ++ fQ) ++ fH) ++ ft), dS)
1009+ else throw("Strict value is not equal to itself.")
1010+ }
11051011 else throw("Strict value is not equal to itself.")
11061012 }
11071013 else throw("Strict value is not equal to itself.")
11081014 }
11091015 else throw("Strict value is not equal to itself.")
11101016 }
11111017 else throw("Strict value is not equal to itself.")
11121018 }
11131019
11141020
11151021
1116-@Callable(dj)
1117-func unstakeAndGetNoLess (fB,fK,fH) = {
1118- let fv = if (aJ())
1022+@Callable(dK)
1023+func getOneTknREADONLY (eF,en) = {
1024+ let fU = eE(aX(eF), en, bg, unit, unit)
1025+ let fO = fU._1
1026+ let dd = fU._2
1027+ let dY = fU._3
1028+ let fD = fU._4
1029+ let eH = fU._5
1030+ $Tuple2(nil, $Tuple3(fO, dY, fD))
1031+ }
1032+
1033+
1034+
1035+@Callable(dK)
1036+func unstakeAndGetOneTkn (fV,fL,fx) = {
1037+ let fz = {
1038+ let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1039+ if ($isInstanceOf(aQ, "Boolean"))
1040+ then aQ
1041+ else throw(($getType(aQ) + " couldn't be cast to Boolean"))
1042+ }
1043+ let fM = if (if (aS())
11191044 then true
1120- else (aW == n)
1121- let ei = [if (!(fv))
1045+ else (bf == n))
11221046 then true
1123- else throw("get operation is blocked by admin"), if ((size(dj.payments) == 0))
1047+ else fz
1048+ let eG = [if (if (!(fM))
11241049 then true
1125- else throw("no payments are expected")]
1126- if ((ei == ei))
1050+ else fb(dK))
1051+ then true
1052+ else aK("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1053+ then true
1054+ else aK("no payments are expected")]
1055+ if ((eG == eG))
11271056 then {
1128- let fC = invoke(bd, "unstake", [toBase58String(aX), fB], nil)
1129- if ((fC == fC))
1057+ let eF = aX(fL)
1058+ let aa = dK.caller
1059+ let ab = dK.transactionId
1060+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1061+ if ((dr == dr))
11301062 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))
1063+ let fW = invoke(bm, "unstake", [toBase58String(bg), fV], nil)
1064+ if ((fW == fW))
11411065 then {
1142- let fF = invoke(aE, "burn", [fB], [AttachedPayment(aX, fB)])
1143- if ((fF == fF))
1144- then cm
1066+ let fX = eE(eF, fV, bg, aa, ab)
1067+ if ((fX == fX))
1068+ then {
1069+ let eH = fX._5
1070+ let fD = fX._4
1071+ let dY = fX._3
1072+ let dd = fX._2
1073+ let fO = fX._1
1074+ let dS = if (if ((fx > 0))
1075+ then (fx > fO)
1076+ else false)
1077+ then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
1078+ else fO
1079+ let fP = invoke(aN, "burn", [fV], [AttachedPayment(bg, fV)])
1080+ if ((fP == fP))
1081+ then {
1082+ let fQ = [ScriptTransfer(dK.caller, dS, eF)]
1083+ let fH = if ((dY > 0))
1084+ then [ScriptTransfer(aO, dY, eF)]
1085+ else nil
1086+ let fY = {
1087+ let fS = if ((this == aO))
1088+ then 0
1089+ else dY
1090+ if (eH)
1091+ then $Tuple2(-((dS + fS)), 0)
1092+ else $Tuple2(0, -((dS + fS)))
1093+ }
1094+ let dt = fY._1
1095+ let du = fY._2
1096+ let fZ = ds(dt, du, 0)
1097+ let ft = fZ._1
1098+ let dj = fZ._2
1099+ let fu = dw(dr, dj)
1100+ if ((fu == fu))
1101+ then $Tuple2((((dd ++ fQ) ++ fH) ++ ft), dS)
1102+ else throw("Strict value is not equal to itself.")
1103+ }
1104+ else throw("Strict value is not equal to itself.")
1105+ }
11451106 else throw("Strict value is not equal to itself.")
11461107 }
11471108 else throw("Strict value is not equal to itself.")
11481109 }
11491110 else throw("Strict value is not equal to itself.")
11501111 }
11511112 else throw("Strict value is not equal to itself.")
11521113 }
11531114
11541115
11551116
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])])
1117+@Callable(dK)
1118+func get () = {
1119+ let cO = dJ(dK)
1120+ let ga = cO._1
1121+ let cv = cO._2
1122+ let dM = cO._3
1123+ let cd = cO._4
1124+ let cw = cO._5
1125+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1126+ if ((dr == dr))
1127+ then {
1128+ let gb = invoke(aN, "burn", [dM], [AttachedPayment(cd, dM)])
1129+ if ((gb == gb))
1130+ then {
1131+ let gc = ds(-(ga), -(cv), 0)
1132+ let ft = gc._1
1133+ let dj = gc._2
1134+ let fu = dw(dr, dj)
1135+ if ((fu == fu))
1136+ then (cw ++ ft)
1137+ else throw("Strict value is not equal to itself.")
1138+ }
1139+ else throw("Strict value is not equal to itself.")
1140+ }
1141+ else throw("Strict value is not equal to itself.")
11771142 }
11781143
11791144
11801145
1181-@Callable(dj)
1146+@Callable(dK)
1147+func getNoLess (gd,ge) = {
1148+ let cO = dJ(dK)
1149+ let cu = cO._1
1150+ let cv = cO._2
1151+ let dM = cO._3
1152+ let cd = cO._4
1153+ let cw = cO._5
1154+ if ((gd > cu))
1155+ then throw(((("noLessThenAmtAsset failed: " + toString(cu)) + " < ") + toString(gd)))
1156+ else if ((ge > cv))
1157+ then throw(((("noLessThenPriceAsset failed: " + toString(cv)) + " < ") + toString(ge)))
1158+ else {
1159+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1160+ if ((dr == dr))
1161+ then {
1162+ let gb = invoke(aN, "burn", [dM], [AttachedPayment(cd, dM)])
1163+ if ((gb == gb))
1164+ then {
1165+ let gf = ds(-(cu), -(cv), 0)
1166+ let ft = gf._1
1167+ let dj = gf._2
1168+ let fu = dw(dr, dj)
1169+ if ((fu == fu))
1170+ then (cw ++ ft)
1171+ else throw("Strict value is not equal to itself.")
1172+ }
1173+ else throw("Strict value is not equal to itself.")
1174+ }
1175+ else throw("Strict value is not equal to itself.")
1176+ }
1177+ }
1178+
1179+
1180+
1181+@Callable(dK)
1182+func unstakeAndGet (dS) = {
1183+ let gg = if ((size(dK.payments) != 0))
1184+ then throw("No payments are expected")
1185+ else true
1186+ if ((gg == gg))
1187+ then {
1188+ let bS = aU()
1189+ let cf = fromBase58String(bS[q])
1190+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1191+ if ((dr == dr))
1192+ then {
1193+ let fW = invoke(bm, "unstake", [toBase58String(cf), dS], nil)
1194+ if ((fW == fW))
1195+ then {
1196+ let cO = cb(toBase58String(dK.transactionId), toBase58String(cf), dS, dK.caller)
1197+ let cu = cO._1
1198+ let cv = cO._2
1199+ let ci = parseIntValue(cO._9)
1200+ let cw = cO._10
1201+ let gh = if (if (aS())
1202+ then true
1203+ else (ci == n))
1204+ then throw(("Get operation is blocked by admin. Status = " + toString(ci)))
1205+ else true
1206+ if ((gh == gh))
1207+ then {
1208+ let gb = invoke(aN, "burn", [dS], [AttachedPayment(cf, dS)])
1209+ if ((gb == gb))
1210+ then {
1211+ let gi = ds(-(cu), -(cv), 0)
1212+ let ft = gi._1
1213+ let dj = gi._2
1214+ let fu = dw(dr, dj)
1215+ if ((fu == fu))
1216+ then (cw ++ ft)
1217+ else throw("Strict value is not equal to itself.")
1218+ }
1219+ else throw("Strict value is not equal to itself.")
1220+ }
1221+ else throw("Strict value is not equal to itself.")
1222+ }
1223+ else throw("Strict value is not equal to itself.")
1224+ }
1225+ else throw("Strict value is not equal to itself.")
1226+ }
1227+ else throw("Strict value is not equal to itself.")
1228+ }
1229+
1230+
1231+
1232+@Callable(dK)
1233+func unstakeAndGetNoLess (fV,gj,ge) = {
1234+ let fM = if (aS())
1235+ then true
1236+ else (bf == n)
1237+ let eG = [if (!(fM))
1238+ then true
1239+ else throw("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1240+ then true
1241+ else throw("no payments are expected")]
1242+ if ((eG == eG))
1243+ then {
1244+ let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1245+ if ((dr == dr))
1246+ then {
1247+ let fW = invoke(bm, "unstake", [toBase58String(bg), fV], nil)
1248+ if ((fW == fW))
1249+ then {
1250+ let cO = cb(toBase58String(dK.transactionId), toBase58String(bg), fV, dK.caller)
1251+ let cu = cO._1
1252+ let cv = cO._2
1253+ let cw = cO._10
1254+ let gk = [if ((cu >= gj))
1255+ then true
1256+ else throw(makeString(["amount asset amount to receive is less than ", toString(gj)], "")), if ((cv >= ge))
1257+ then true
1258+ else throw(makeString(["price asset amount to receive is less than ", toString(ge)], ""))]
1259+ if ((gk == gk))
1260+ then {
1261+ let gb = invoke(aN, "burn", [fV], [AttachedPayment(bg, fV)])
1262+ if ((gb == gb))
1263+ then {
1264+ let gl = ds(-(cu), -(cv), 0)
1265+ let ft = gl._1
1266+ let dj = gl._2
1267+ let fu = dw(dr, dj)
1268+ if ((fu == fu))
1269+ then (cw ++ ft)
1270+ else throw("Strict value is not equal to itself.")
1271+ }
1272+ else throw("Strict value is not equal to itself.")
1273+ }
1274+ else throw("Strict value is not equal to itself.")
1275+ }
1276+ else throw("Strict value is not equal to itself.")
1277+ }
1278+ else throw("Strict value is not equal to itself.")
1279+ }
1280+ else throw("Strict value is not equal to itself.")
1281+ }
1282+
1283+
1284+
1285+@Callable(dK)
1286+func activate (gm,gn) = if ((toString(dK.caller) != toString(aN)))
1287+ then throw("permissions denied")
1288+ else $Tuple2([StringEntry(ad(), gm), StringEntry(ae(), gn)], "success")
1289+
1290+
1291+
1292+@Callable(dK)
1293+func refreshKLp () = {
1294+ let go = valueOrElse(getInteger(aj), 0)
1295+ let gp = if (((height - go) >= am))
1296+ then unit
1297+ else aK(makeString([toString(am), " blocks have not passed since the previous call"], ""))
1298+ if ((gp == gp))
1299+ then {
1300+ let dD = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ai), "0")), aM("invalid kLp"))
1301+ let gq = ds(0, 0, 0)
1302+ let gr = gq._1
1303+ let dj = gq._2
1304+ let dv = if ((dD != dj))
1305+ then gr
1306+ else aK("nothing to refresh")
1307+ $Tuple2(dv, toString(dj))
1308+ }
1309+ else throw("Strict value is not equal to itself.")
1310+ }
1311+
1312+
1313+
1314+@Callable(dK)
1315+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aU())
1316+
1317+
1318+
1319+@Callable(dK)
1320+func getAccBalanceWrapperREADONLY (bE) = $Tuple2(nil, bD(bE))
1321+
1322+
1323+
1324+@Callable(dK)
1325+func calcPricesWrapperREADONLY (bM,bN,bR) = {
1326+ let ca = bQ(bM, bN, bR)
1327+ $Tuple2(nil, [toString(ca[0]), toString(ca[1]), toString(ca[2])])
1328+ }
1329+
1330+
1331+
1332+@Callable(dK)
11821333 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
11831334
11841335
11851336
1186-@Callable(dj)
1337+@Callable(dK)
11871338 func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J))
11881339
11891340
11901341
1191-@Callable(dj)
1192-func calcPriceBigIntWrapperREADONLY (bx,by) = $Tuple2(nil, toString(bw(parseBigIntValue(bx), parseBigIntValue(by))))
1342+@Callable(dK)
1343+func calcPriceBigIntWrapperREADONLY (bG,bH) = $Tuple2(nil, toString(bF(parseBigIntValue(bG), parseBigIntValue(bH))))
11931344
11941345
11951346
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))
1347+@Callable(dK)
1348+func estimatePutOperationWrapperREADONLY (cc,cy,cz,cA,cB,cC,aa,cD,cE) = $Tuple2(nil, cx(cc, cy, cz, cA, cB, cC, aa, cD, cE))
11981349
11991350
12001351
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))
1352+@Callable(dK)
1353+func estimateGetOperationWrapperREADONLY (cc,cd,ce,aa) = {
1354+ let cO = cb(cc, cd, ce, addressFromStringValue(aa))
1355+ $Tuple2(nil, $Tuple10(cO._1, cO._2, cO._3, cO._4, cO._5, cO._6, cO._7, toString(cO._8), cO._9, cO._10))
12051356 }
12061357
12071358
12081359
1209-@Callable(dj)
1360+@Callable(dK)
12101361 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))
1362+ let bS = aU()
1363+ let cf = fromBase58String(bS[q])
1364+ let gs = bS[r]
1365+ let gt = bS[s]
1366+ let cH = bS[v]
1367+ let cI = bS[w]
1368+ let bT = parseIntValue(bS[t])
1369+ let bU = parseIntValue(bS[u])
1370+ let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1371+ let gv = bD(gs)
1372+ let gw = bD(gt)
1373+ let gx = if ((gu == 0))
12231374 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))
1375+ else bQ(gv, gw, gu)
1376+ let cp = 0
1377+ let gy = H(gx[1], b)
1378+ let gz = H(gx[2], b)
1379+ let gA = value(getInteger(aN, ax(toString(this))))
1380+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gv), toString(gw), toString(gu), toString(cp), toString(gy), toString(gz), toString(gA)], j))
12301381 }
12311382
12321383
12331384
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))
1385+@Callable(dK)
1386+func evaluatePutByAmountAssetREADONLY (cz) = {
1387+ let bS = aU()
1388+ let cf = fromBase58String(bS[q])
1389+ let cF = bS[r]
1390+ let cg = fromBase58String(cF)
1391+ let cG = bS[s]
1392+ let ch = fromBase58String(cG)
1393+ let bT = parseIntValue(bS[t])
1394+ let bU = parseIntValue(bS[u])
1395+ let ci = bS[p]
1396+ let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1397+ let gv = bD(cF)
1398+ let gw = bD(cG)
1399+ let bO = D(gv, bT)
1400+ let bP = D(gw, bU)
1401+ let co = if ((gu == 0))
12511402 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))
1403+ else bF(bP, bO)
1404+ let cL = D(cz, bT)
1405+ let cM = fraction(cL, co, d)
1406+ let cB = H(cM, bU)
1407+ let dQ = cx("", 500000, cz, cg, cB, ch, "", true, false)
1408+ let cW = dQ._1
1409+ let gB = dQ._3
1410+ let ck = dQ._4
1411+ let cm = dQ._5
1412+ let cj = dQ._6
1413+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cW), toString(H(co, b)), toString(ck), toString(cm), toString(cj), ci, toString(cz), toString(cB)], j))
12631414 }
12641415
12651416
12661417
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))
1418+@Callable(dK)
1419+func evaluatePutByPriceAssetREADONLY (cB) = {
1420+ let bS = aU()
1421+ let cf = fromBase58String(bS[q])
1422+ let cF = bS[r]
1423+ let cg = fromBase58String(cF)
1424+ let cG = bS[s]
1425+ let ch = fromBase58String(cG)
1426+ let bT = parseIntValue(bS[t])
1427+ let bU = parseIntValue(bS[u])
1428+ let ci = bS[p]
1429+ let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1430+ let gC = bD(cF)
1431+ let gD = bD(cG)
1432+ let gE = D(gC, bT)
1433+ let gF = D(gD, bU)
1434+ let co = if ((gu == 0))
12841435 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))
1436+ else bF(gF, gE)
1437+ let cM = D(cB, bU)
1438+ let cL = fraction(cM, d, co)
1439+ let cz = H(cL, bT)
1440+ let dQ = cx("", 500000, cz, cg, cB, ch, "", true, false)
1441+ let cW = dQ._1
1442+ let gB = dQ._3
1443+ let ck = dQ._4
1444+ let cm = dQ._5
1445+ let cj = dQ._6
1446+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cW), toString(H(co, b)), toString(ck), toString(cm), toString(cj), ci, toString(cz), toString(cB)], j))
12961447 }
12971448
12981449
12991450
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))
1451+@Callable(dK)
1452+func evaluateGetREADONLY (gG,gH) = {
1453+ let cO = cb("", gG, gH, this)
1454+ let cu = cO._1
1455+ let cv = cO._2
1456+ let ck = cO._5
1457+ let cm = cO._6
1458+ let cj = cO._7
1459+ let cp = cO._8
1460+ let ci = parseIntValue(cO._9)
1461+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cu), toString(cv), toString(ck), toString(cm), toString(cj), toString(cp), toString(ci)], j))
13111462 }
13121463
13131464
1314-@Verifier(ga)
1315-func gb () = {
1316- let gc = {
1317- let du = ez()
1318- if ($isInstanceOf(du, "ByteVector"))
1465+@Verifier(gI)
1466+func gJ () = {
1467+ let gK = {
1468+ let dV = eY()
1469+ if ($isInstanceOf(dV, "ByteVector"))
13191470 then {
1320- let eD = du
1321- eD
1471+ let fc = dV
1472+ fc
13221473 }
1323- else if ($isInstanceOf(du, "Unit"))
1324- then ga.senderPublicKey
1474+ else if ($isInstanceOf(dV, "Unit"))
1475+ then gI.senderPublicKey
13251476 else throw("Match error")
13261477 }
1327- let du = ga
1328- if ($isInstanceOf(du, "Order"))
1478+ let dV = gI
1479+ if ($isInstanceOf(dV, "Order"))
13291480 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
1481+ let dz = dV
1482+ let gL = aT()
1483+ let gM = dy(dz)
1484+ let aC = gM._1
1485+ let aD = gM._2
1486+ let aE = sigVerify(dz.bodyBytes, dz.proofs[0], dz.senderPublicKey)
1487+ let aF = sigVerify(dz.bodyBytes, dz.proofs[1], gL)
1488+ if (if (if (aC)
1489+ then aE
13371490 else false)
1338- then ax
1491+ then aF
13391492 else false)
13401493 then true
1341- else au(av, aw, ax)
1494+ else aB(aC, aD, aE, aF)
13421495 }
1343- else if ($isInstanceOf(du, "SetScriptTransaction"))
1496+ else if ($isInstanceOf(dV, "SetScriptTransaction"))
13441497 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)
1498+ let eZ = dV
1499+ if (sigVerify(gI.bodyBytes, gI.proofs[0], gK))
13521500 then true
1353- else sigVerify(ga.bodyBytes, ga.proofs[0], gc)
1501+ else {
1502+ let gN = blake2b256(value(eZ.script))
1503+ let gO = fromBase64String(value(getString(aN, az())))
1504+ let gP = scriptHash(this)
1505+ if ((gO == gN))
1506+ then (gP != gN)
1507+ else false
1508+ }
13541509 }
1355- else sigVerify(ga.bodyBytes, ga.proofs[0], gc)
1510+ else sigVerify(gI.bodyBytes, gI.proofs[0], gK)
13561511 }
13571512

github/deemru/w8io/026f985 
333.36 ms