tx · At7S7yV3iSiVjoasu2PBa8NNsMzPJhZdUSZTkMfhVkvQ

3N5Ej8ZZVxcHt5MKwVwVtRKCp47UzFS81A9:  -0.03500000 Waves

2022.12.22 09:27 [2371139] smart account 3N5Ej8ZZVxcHt5MKwVwVtRKCp47UzFS81A9 > SELF 0.00000000 Waves

{ "type": 13, "id": "At7S7yV3iSiVjoasu2PBa8NNsMzPJhZdUSZTkMfhVkvQ", "fee": 3500000, "feeAssetId": null, "timestamp": 1671690439365, "version": 1, "sender": "3N5Ej8ZZVxcHt5MKwVwVtRKCp47UzFS81A9", "senderPublicKey": "Ba5NJZCcgKcaTqXGitj6r3nDjYLw9hwqCE8rf4XaFGFw", "proofs": [ "47ZeFhcFRfEWvL741HmnKPyACKx4uhYw1x8EjihDTrPkdubuhGtVGoJABG65LKnnacYrBN3A99DEGdNSdeQeQguv" ], "script": "base64:BgKdLQgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlk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0IGcHJvb2ZzAAAFAmdEo9rwJg==", "chainId": 84, "height": 2371139, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CXhSSdftSm17iCqJzynUtybSXUoNXYENJfMN8Bezpiu2 Next: 8rGBcPuRS2WaRb8VLbQZ7wdmLosuDpjbNmSrLw73MRD7 Diff:
OldNewDifferences
6565 func G (H,I) = toInt(fraction(H, toBigInt(I), d))
6666
6767
68-func J (K,L,M) = fraction(K, L, M)
68+func J (H,I,K) = toInt(fraction(H, toBigInt(I), d, K))
6969
7070
71-func N (H) = if ((0 > H))
71+func L (M,N,O) = fraction(M, N, O)
72+
73+
74+func P (H) = if ((0 > H))
7275 then -(H)
7376 else H
7477
7578
76-func O (H) = if ((e > H))
79+func Q (H) = if ((e > H))
7780 then -(H)
7881 else H
7982
8083
81-func P () = "%s__factoryContract"
84+func R () = "%s__factoryContract"
8285
8386
84-func Q () = "%s__managerPublicKey"
87+func S () = "%s__managerPublicKey"
8588
8689
87-func R () = "%s__pendingManagerPublicKey"
90+func T () = "%s__pendingManagerPublicKey"
8891
8992
90-func S () = "%s%s__price__last"
93+func U () = "%s%s__price__last"
9194
9295
93-func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j)
96+func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], j)
9497
9598
96-func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y)
99+func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
97100
98101
99-func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y)
102+func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
100103
101104
102-func aa () = "%s__amountAsset"
105+func ac () = "%s__amountAsset"
103106
104107
105-func ab () = "%s__priceAsset"
108+func ad () = "%s__priceAsset"
106109
107110
108-func ac () = "%s__factoryConfig"
111+let ae = "%s__fee"
112+
113+let af = fraction(10, b, 10000)
114+
115+let ag = valueOrElse(getInteger(this, ae), af)
116+
117+let ah = makeString(["%s", "kLp"], j)
118+
119+let ai = makeString(["%s", "kLpRefreshedHeight"], j)
120+
121+let aj = makeString(["%s", "refreshKLpDelay"], j)
122+
123+let ak = 30
124+
125+let al = valueOrElse(getInteger(this, aj), ak)
126+
127+func am () = "%s__factoryConfig"
109128
110129
111-func ad () = "%s%s__matcher__publicKey"
130+func an () = "%s%s__matcher__publicKey"
112131
113132
114-func ae (af) = (("%s%s%s__" + af) + "__mappings__poolContract2LpAsset")
133+func ao (ap) = (("%s%s%s__" + ap) + "__mappings__poolContract2LpAsset")
115134
116135
117-func ag (ah,ai) = (((("%d%d%s__" + ah) + "__") + ai) + "__config")
136+func aq (ar,as) = (((("%d%d%s__" + ar) + "__") + as) + "__config")
118137
119138
120-func aj (ak) = ("%s%s%s__mappings__baseAsset2internalId__" + ak)
139+func at (au) = ("%s%s%s__mappings__baseAsset2internalId__" + au)
121140
122141
123-func al () = "%s__shutdown"
142+func av () = "%s__shutdown"
124143
125144
126-func am (an) = ("%s%s__poolWeight__" + an)
145+func aw (ax) = ("%s%s__poolWeight__" + ax)
127146
128147
129-func ao () = "%s__allowedLpScriptHash"
148+func ay () = "%s__allowedLpScriptHash"
130149
131150
132-let ap = "%s__feeCollectorAddress"
151+let az = "%s__feeCollectorAddress"
133152
134-func aq (ar,as,at) = throw(((((("order validation failed: orderValid=" + toString(ar)) + " senderValid=") + toString(as)) + " matcherValid=") + toString(at)))
153+func aA (aB,aC,aD) = throw(((((("order validation failed: orderValid=" + toString(aB)) + " senderValid=") + toString(aC)) + " matcherValid=") + toString(aD)))
135154
136155
137-func au (av,aw) = valueOrErrorMessage(getString(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
156+func aE (aF,aG) = valueOrErrorMessage(getString(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
138157
139158
140-func ax (av,aw) = valueOrErrorMessage(getInteger(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
159+func aH (aF,aG) = valueOrErrorMessage(getInteger(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
141160
142161
143-func ay (az) = throw(makeString(["lp.ride:", az], " "))
162+func aI (aJ) = throw(makeString(["lp.ride:", aJ], " "))
144163
145164
146-let aA = addressFromStringValue(au(this, P()))
147-
148-let aB = addressFromStringValue(au(aA, ap))
149-
150-let aC = {
151- let aD = invoke(aA, "getInFeeREADONLY", [toString(this)], nil)
152- if ($isInstanceOf(aD, "Int"))
153- then aD
154- else throw(($getType(aD) + " couldn't be cast to Int"))
155- }
156-
157-let aE = {
158- let aD = invoke(aA, "getOutFeeREADONLY", [toString(this)], nil)
159- if ($isInstanceOf(aD, "Int"))
160- then aD
161- else throw(($getType(aD) + " couldn't be cast to Int"))
162- }
163-
164-func aF () = valueOrElse(getBoolean(aA, al()), false)
165+func aK (aJ) = makeString(["lp.ride:", aJ], " ")
165166
166167
167-func aG () = fromBase58String(au(aA, ad()))
168+let aL = addressFromStringValue(aE(this, R()))
169+
170+let aM = addressFromStringValue(aE(aL, az))
171+
172+func aN () = valueOrElse(getBoolean(aL, av()), false)
168173
169174
170-func aH () = {
171- let aI = au(this, aa())
172- let aJ = au(this, ab())
173- let ai = ax(aA, aj(aJ))
174- let ah = ax(aA, aj(aI))
175- split(au(aA, ag(toString(ah), toString(ai))), j)
175+func aO () = fromBase58String(aE(aL, an()))
176+
177+
178+func aP () = {
179+ let aQ = aE(this, ac())
180+ let aR = aE(this, ad())
181+ let as = aH(aL, at(aR))
182+ let ar = aH(aL, at(aQ))
183+ split(aE(aL, aq(toString(ar), toString(as))), j)
176184 }
177185
178186
179-func aK (aL) = if ((aL == i))
187+func aS (aT) = if ((aT == i))
180188 then unit
181- else fromBase58String(aL)
189+ else fromBase58String(aT)
182190
183191
184-func aM (aL) = if ((aL == unit))
192+func aU (aT) = if ((aT == unit))
185193 then i
186- else toBase58String(value(aL))
194+ else toBase58String(value(aT))
187195
188196
189-func aN (aO) = $Tuple7(addressFromStringValue(aO[o]), parseIntValue(aO[p]), fromBase58String(aO[q]), aK(aO[r]), aK(aO[s]), parseIntValue(aO[t]), parseIntValue(aO[u]))
197+func aV (aW) = $Tuple7(addressFromStringValue(aW[o]), parseIntValue(aW[p]), fromBase58String(aW[q]), aS(aW[r]), aS(aW[s]), parseIntValue(aW[t]), parseIntValue(aW[u]))
190198
191199
192-let aP = aN(aH())
200+let aX = aV(aP())
193201
194-let aQ = aP
202+let aY = aX
195203
196-let aR = aQ._1
204+let aZ = aY._1
197205
198-let aS = aQ._2
206+let ba = aY._2
199207
200-let aT = aQ._3
208+let bb = aY._3
201209
202-let aU = aQ._4
210+let bc = aY._4
203211
204-let aV = aQ._5
212+let bd = aY._5
205213
206-let aW = aQ._6
214+let be = aY._6
207215
208-let aX = aQ._7
216+let bf = aY._7
209217
210-func aY () = split(au(aA, ac()), j)
218+func bg () = split(aE(aL, am()), j)
211219
212220
213-let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
221+let bh = valueOrErrorMessage(addressFromString(bg()[B]), "incorrect staking address")
214222
215-let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
223+let bi = valueOrErrorMessage(addressFromString(bg()[C]), "incorrect staking address")
216224
217-func bb (bc,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl)], j)
225+func bj (bk,bl,bm,bn,bo,bp,bq,br,bs,bt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt)], j)
218226
219227
220-func bm (bn,bo,bp,bf,bi,bj) = makeString(["%d%d%d%d%d%d", toString(bn), toString(bo), toString(bp), toString(bf), toString(bi), toString(bj)], j)
228+func bu (bv,bw,bx,bn,bq,br) = makeString(["%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(bn), toString(bq), toString(br)], j)
221229
222230
223-func bq (br) = if ((br == "WAVES"))
231+func by (bz) = if ((bz == "WAVES"))
224232 then wavesBalance(this).available
225- else assetBalance(this, fromBase58String(br))
233+ else assetBalance(this, fromBase58String(bz))
226234
227235
228-func bs (bt,bu) = fraction(bt, d, bu)
236+func bA (bB,bC) = fraction(bB, d, bC)
229237
230238
231-func bv (bw,bx,by,bz) = {
232- let bA = D(by, bw)
233- let bB = D(bz, bx)
234- bs(bB, bA)
239+func bD (bB,bC,K) = fraction(bB, d, bC, K)
240+
241+
242+func bE (bF,bG,bH,bI) = {
243+ let bJ = D(bH, bF)
244+ let bK = D(bI, bG)
245+ bA(bK, bJ)
235246 }
236247
237248
238-func bC (by,bz,bD) = {
239- let bE = aH()
240- let bF = parseIntValue(bE[t])
241- let bG = parseIntValue(bE[u])
242- let bH = bv(bF, bG, by, bz)
243- let bu = D(by, bF)
244- let bt = D(bz, bG)
245- let bI = D(bD, b)
246- let bJ = bs(bu, bI)
247- let bK = bs(bt, bI)
248-[bH, bJ, bK]
249+func bL (bH,bI,bM) = {
250+ let bN = aP()
251+ let bO = parseIntValue(bN[t])
252+ let bP = parseIntValue(bN[u])
253+ let bQ = bE(bO, bP, bH, bI)
254+ let bC = D(bH, bO)
255+ let bB = D(bI, bP)
256+ let bR = D(bM, b)
257+ let bS = bA(bC, bR)
258+ let bT = bA(bB, bR)
259+[bQ, bS, bT]
249260 }
250261
251262
252-func bL (by,bz,bD) = {
253- let bM = bC(by, bz, bD)
254-[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
263+func bU (bH,bI,bM) = {
264+ let bV = bL(bH, bI, bM)
265+[G(bV[0], b), G(bV[1], b), G(bV[2], b)]
255266 }
256267
257268
258-func bN (bO,bP,bQ,X) = {
259- let bE = aH()
260- let bR = bE[q]
261- let bS = bE[r]
262- let bT = bE[s]
263- let bw = parseIntValue(bE[t])
264- let bx = parseIntValue(bE[u])
265- let bU = bE[p]
266- let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
267- if ((bR != bP))
269+func bW (bX,bY,bZ,Z) = {
270+ let bN = aP()
271+ let ca = bN[q]
272+ let cb = bN[r]
273+ let cc = bN[s]
274+ let bF = parseIntValue(bN[t])
275+ let bG = parseIntValue(bN[u])
276+ let cd = bN[p]
277+ let ce = valueOrErrorMessage(assetInfo(fromBase58String(ca)), (("Asset " + ca) + " doesn't exist")).quantity
278+ if ((ca != bY))
268279 then throw("Invalid asset passed.")
269280 else {
270- let bW = bq(bS)
271- let bX = D(bW, bw)
272- let bY = bq(bT)
273- let bZ = D(bY, bx)
274- let ca = bs(bZ, bX)
275- let cb = G(ca, b)
276- let cc = D(bQ, b)
277- let cd = D(bV, b)
278- let ce = fraction(bX, cc, cd)
279- let cf = fraction(bZ, cc, cd)
280- let cg = G(ce, bw)
281- let ch = G(cf, bx)
282- let ci = if ((bO == ""))
281+ let cf = by(cb)
282+ let cg = D(cf, bF)
283+ let ch = by(cc)
284+ let ci = D(ch, bG)
285+ let cj = bA(ci, cg)
286+ let ck = G(cj, b)
287+ let cl = D(bZ, b)
288+ let cm = D(ce, b)
289+ let cn = fraction(cg, cl, cm)
290+ let co = fraction(ci, cl, cm)
291+ let cp = J(cn, bF, FLOOR)
292+ let cq = J(co, bG, FLOOR)
293+ let cr = if ((bX == ""))
283294 then nil
284- else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
295+ else [ScriptTransfer(Z, cp, if ((cb == "WAVES"))
285296 then unit
286- else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
297+ else fromBase58String(cb)), ScriptTransfer(Z, cq, if ((cc == "WAVES"))
287298 then unit
288- else fromBase58String(bT)), StringEntry(Z(toString(X), bO), bm(cg, ch, bQ, cb, height, lastBlock.timestamp)), IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb)]
289- $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
299+ else fromBase58String(cc)), StringEntry(ab(toString(Z), bX), bu(cp, cq, bZ, ck, height, lastBlock.timestamp)), IntegerEntry(U(), ck), IntegerEntry(V(height, lastBlock.timestamp), ck)]
300+ $Tuple10(cp, cq, cb, cc, cf, ch, ce, cj, cd, cr)
290301 }
291302 }
292303
293304
294-func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
295- let bE = aH()
296- let bR = fromBase58String(bE[q])
297- let cr = bE[r]
298- let cs = bE[s]
299- let ct = bE[v]
300- let cu = bE[w]
301- let bF = parseIntValue(bE[t])
302- let bG = parseIntValue(bE[u])
303- let bU = bE[p]
304- let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
305- let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
306- let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
307- if (if ((cr != cv))
305+func cs (bX,ct,cu,cv,cw,cx,Z,cy,cz) = {
306+ let bN = aP()
307+ let ca = fromBase58String(bN[q])
308+ let cA = bN[r]
309+ let cB = bN[s]
310+ let cC = bN[v]
311+ let cD = bN[w]
312+ let bO = parseIntValue(bN[t])
313+ let bP = parseIntValue(bN[u])
314+ let cd = bN[p]
315+ let ce = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
316+ let cE = toBase58String(valueOrElse(cv, fromBase58String("WAVES")))
317+ let cF = toBase58String(valueOrElse(cx, fromBase58String("WAVES")))
318+ if (if ((cA != cE))
308319 then true
309- else (cs != cw))
320+ else (cB != cF))
310321 then throw("Invalid amt or price asset passed.")
311322 else {
312- let bW = if (cp)
313- then bq(cr)
314- else (bq(cr) - cl)
315- let bY = if (cp)
316- then bq(cs)
317- else (bq(cs) - cn)
318- let cx = D(cl, bF)
319- let cy = D(cn, bG)
320- let cz = bs(cy, cx)
321- let bX = D(bW, bF)
322- let bZ = D(bY, bG)
323- let cA = if ((bV == 0))
323+ let cf = if (cy)
324+ then by(cA)
325+ else (by(cA) - cu)
326+ let ch = if (cy)
327+ then by(cB)
328+ else (by(cB) - cw)
329+ let cG = D(cu, bO)
330+ let cH = D(cw, bP)
331+ let cI = bA(cH, cG)
332+ let cg = D(cf, bO)
333+ let ci = D(ch, bP)
334+ let cJ = if ((ce == 0))
324335 then {
325- let ca = e
326- let cB = e
327- let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
328- $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
336+ let cj = e
337+ let cK = e
338+ let bR = pow((cG * cH), 0, toBigInt(5), 1, 0, DOWN)
339+ $Tuple5(G(bR, b), G(cG, bO), G(cH, bP), bA((ci + cH), (cg + cG)), cK)
329340 }
330341 else {
331- let ca = bs(bZ, bX)
332- let cB = fraction(O((ca - cz)), d, ca)
333- let cC = D(ck, b)
334- if (if ((ca != e))
335- then (cB > cC)
342+ let cj = bA(ci, cg)
343+ let cK = fraction(Q((cj - cI)), d, cj)
344+ let cL = D(ct, b)
345+ if (if ((cj != e))
346+ then (cK > cL)
336347 else false)
337- then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
348+ then throw(((("Price slippage " + toString(cK)) + " exceeded the passed limit of ") + toString(cL)))
338349 else {
339- let cd = D(bV, b)
340- let cD = fraction(cx, ca, d)
341- let cE = fraction(cy, d, ca)
342- let cF = if ((cD > cy))
343- then $Tuple2(cE, cy)
344- else $Tuple2(cx, cD)
345- let cG = cF._1
346- let cH = cF._2
347- let bI = fraction(cd, cH, bZ)
348- $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
350+ let cm = D(ce, b)
351+ let cM = fraction(cG, bD(ci, cg, CEILING), d, CEILING)
352+ let cN = fraction(cH, d, bD(ci, cg, FLOOR), CEILING)
353+ let cO = if ((cM > cH))
354+ then $Tuple2(cN, cH)
355+ else $Tuple2(cG, cM)
356+ let cP = cO._1
357+ let cQ = cO._2
358+ let bR = fraction(cm, cQ, ci, FLOOR)
359+ $Tuple5(J(bR, b, FLOOR), J(cP, bO, CEILING), J(cQ, bP, CEILING), cj, cK)
349360 }
350361 }
351- let cI = cA._1
352- let cJ = cA._2
353- let cK = cA._3
354- let cb = G(cA._4, b)
355- let cL = G(cA._5, b)
356- if ((0 >= cI))
362+ let cR = cJ._1
363+ let cS = cJ._2
364+ let cT = cJ._3
365+ let ck = G(cJ._4, b)
366+ let cU = G(cJ._5, b)
367+ if ((0 >= cR))
357368 then throw("Invalid calculations. LP calculated is less than zero.")
358369 else {
359- let cM = if (!(cq))
370+ let cV = if (!(cz))
360371 then 0
361- else cI
362- let cN = (cl - cJ)
363- let cO = (cn - cK)
364- let cP = [IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb), StringEntry(W(X, bO), bb(cJ, cK, cM, cb, ck, cL, height, lastBlock.timestamp, cN, cO))]
365- $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
372+ else cR
373+ let cW = (cu - cS)
374+ let cX = (cw - cT)
375+ let cY = [IntegerEntry(U(), ck), IntegerEntry(V(height, lastBlock.timestamp), ck), StringEntry(Y(Z, bX), bj(cS, cT, cV, ck, ct, cU, height, lastBlock.timestamp, cW, cX))]
376+ $Tuple13(cR, cV, ck, cf, ch, ce, ca, cd, cY, cW, cX, cv, cx)
366377 }
367378 }
368379 }
369380
370381
371-func cQ (cR) = {
372- let bE = aH()
373- let cS = bE[r]
374- let cT = bE[s]
375- let bU = parseIntValue(bE[p])
376- let bF = parseIntValue(bE[t])
377- let bG = parseIntValue(bE[u])
378- let cU = bq(cS)
379- let cV = bq(cT)
380- let ca = if ((cR.orderType == Buy))
381- then bv(bF, bG, (cU + cR.amount), cV)
382- else bv(bF, bG, (cU - cR.amount), cV)
383- let cb = G(ca, b)
384- if (if (if (aF())
385- then true
386- else (bU == m))
387- then true
388- else (bU == n))
389- then throw("Exchange operations disabled")
390- else {
391- let cW = cR.assetPair.amountAsset
392- let cX = if ((cW == unit))
393- then "WAVES"
394- else toBase58String(value(cW))
395- let cY = cR.assetPair.priceAsset
396- let cZ = if ((cY == unit))
397- then "WAVES"
398- else toBase58String(value(cY))
399- if (if ((cX != cS))
400- then true
401- else (cZ != cT))
402- then throw("Wrong order assets.")
403- else {
404- let da = cR.price
405- let db = fraction(b, bG, bF)
406- let dc = J(da, b, db)
407- let dd = if ((cR.orderType == Buy))
408- then (cb >= dc)
409- else (dc >= cb)
410- true
411- }
412- }
382+func cZ (da,db,ce) = {
383+ let dc = fraction(pow((da * db), 0, toBigInt(5), 1, 18, DOWN), g, ce)
384+ if ((ce == f))
385+ then f
386+ else dc
413387 }
414388
415389
416-func de (df) = if ((size(df.payments) != 1))
390+func dd (de,df,dg) = {
391+ let dh = (toBigInt(by(aU(bc))) - de)
392+ let di = (toBigInt(by(aU(bd))) - df)
393+ let dj = (toBigInt(value(assetInfo(bb)).quantity) - dg)
394+ let dk = cZ(dh, di, dj)
395+ dk
396+ }
397+
398+
399+func dl (dm,dn,dg) = {
400+ let dh = (by(aU(bc)) + dm)
401+ let di = (by(aU(bd)) + dn)
402+ let dj = (value(assetInfo(bb)).quantity + dg)
403+ let dc = cZ(toBigInt(dh), toBigInt(di), toBigInt(dj))
404+ let do = [IntegerEntry(ai, height), StringEntry(ah, toString(dc))]
405+ $Tuple2(do, dc)
406+ }
407+
408+
409+func dp (dq,dc) = if ((dc >= dq))
410+ then true
411+ else aI(makeString(["updated KLp lower than current KLp", toString(dq), toString(dc)], " "))
412+
413+
414+func dr (ds) = {
415+ let dt = ds.amount
416+ let du = fraction(ds.amount, ds.price, b, FLOOR)
417+ let dv = if ((ds.orderType == Buy))
418+ then $Tuple2(dt, -(du))
419+ else $Tuple2(-(dt), du)
420+ let dm = dv._1
421+ let dn = dv._2
422+ if (if (if (aN())
423+ then true
424+ else (ba == m))
425+ then true
426+ else (ba == n))
427+ then throw("Exchange operations disabled")
428+ else if (if ((ds.assetPair.amountAsset != bc))
429+ then true
430+ else (ds.assetPair.priceAsset != bd))
431+ then throw("Wrong order assets.")
432+ else {
433+ let dw = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, ah), aK("kLp is required"))), aK("invalid kLp"))
434+ let dx = dl(dm, dn, 0)
435+ let dy = dx._1
436+ let dz = dx._2
437+ let dA = (dz >= dw)
438+ dA
439+ }
440+ }
441+
442+
443+func dB (dC) = if ((size(dC.payments) != 1))
417444 then throw("exactly 1 payment is expected")
418445 else {
419- let dg = value(df.payments[0])
420- let bP = value(dg.assetId)
421- let dh = dg.amount
422- let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
423- let cg = cA._1
424- let ch = cA._2
425- let bU = parseIntValue(cA._9)
426- let ci = cA._10
427- if (if (aF())
446+ let dD = value(dC.payments[0])
447+ let bY = value(dD.assetId)
448+ let dE = dD.amount
449+ let cJ = bW(toBase58String(dC.transactionId), toBase58String(bY), dE, dC.caller)
450+ let cp = cJ._1
451+ let cq = cJ._2
452+ let cd = parseIntValue(cJ._9)
453+ let cr = cJ._10
454+ if (if (aN())
428455 then true
429- else (bU == n))
430- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
431- else $Tuple5(cg, ch, dh, bP, ci)
456+ else (cd == n))
457+ then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
458+ else $Tuple5(cp, cq, dE, bY, cr)
432459 }
433460
434461
435-func di (df,ck,cq) = if ((size(df.payments) != 2))
462+func dF (dC,ct,cz) = if ((size(dC.payments) != 2))
436463 then throw("exactly 2 payments are expected")
437464 else {
438- let dj = value(df.payments[0])
439- let dk = value(df.payments[1])
440- let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
441- let bU = parseIntValue(dl._8)
442- if (if (if (aF())
465+ let dG = value(dC.payments[0])
466+ let dH = value(dC.payments[1])
467+ let dI = cs(toBase58String(dC.transactionId), ct, dG.amount, dG.assetId, dH.amount, dH.assetId, toString(dC.caller), false, cz)
468+ let cd = parseIntValue(dI._8)
469+ if (if (if (aN())
443470 then true
444- else (bU == l))
471+ else (cd == l))
445472 then true
446- else (bU == n))
447- then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
448- else dl
473+ else (cd == n))
474+ then throw(("Put operation is blocked by admin. Status = " + toString(cd)))
475+ else dI
449476 }
450477
451478
452-func dm (dn) = {
453- let do = invoke(aA, "emit", [dn], nil)
454- if ((do == do))
479+func dJ (dK) = {
480+ let dL = invoke(aL, "emit", [dK], nil)
481+ if ((dL == dL))
455482 then {
456- let dp = {
457- let dq = do
458- if ($isInstanceOf(dq, "Address"))
483+ let dM = {
484+ let dN = dL
485+ if ($isInstanceOf(dN, "Address"))
459486 then {
460- let dr = dq
461- invoke(dr, "emit", [dn], nil)
487+ let dO = dN
488+ invoke(dO, "emit", [dK], nil)
462489 }
463490 else unit
464491 }
465- if ((dp == dp))
466- then dn
492+ if ((dM == dM))
493+ then dK
467494 else throw("Strict value is not equal to itself.")
468495 }
469496 else throw("Strict value is not equal to itself.")
470497 }
471498
472499
473-func ds (dn,dt) = {
474- let du = if ((dt == 0))
475- then 0
476- else fraction(dn, dt, b)
477- $Tuple2((dn - du), du)
500+func dP (dK) = {
501+ let dQ = fraction(dK, ag, b)
502+ $Tuple2((dK - dQ), dQ)
478503 }
479504
480505
481-func dv (dw,dx,X,Y) = {
482- let dy = (Y == unit)
483- let dz = bq(aM(aU))
484- let dA = bq(aM(aV))
485- let dB = if ((dx == aU))
506+func dR (dS,dT,Z,aa) = {
507+ let dU = (aa == unit)
508+ let dV = by(aU(bc))
509+ let dW = by(aU(bd))
510+ let dX = if ((dT == bc))
486511 then true
487- else if ((dx == aV))
512+ else if ((dT == bd))
488513 then false
489- else ay("invalid asset")
490- let dC = if (dy)
491- then $Tuple2(dz, dA)
492- else if (dB)
493- then $Tuple2((dz - dw), dA)
494- else $Tuple2(dz, (dA - dw))
495- let dD = dC._1
496- let dE = dC._2
497- let dF = if (dB)
498- then $Tuple2(dw, 0)
499- else $Tuple2(0, dw)
500- let dG = dF._1
501- let dH = dF._2
502- let dI = ds(dG, aC)._1
503- let dJ = ds(dH, aC)._1
504- let dK = ds(dw, aC)
505- let dL = dK._1
506- let du = dK._2
507- let dM = (dD + dI)
508- let dN = (dE + dJ)
509- let dO = bs(D(dN, aX), D(dM, aW))
510- let dP = G(dO, b)
511- let dQ = if (dB)
512- then dD
513- else dE
514- let dR = toBigInt(dQ)
515- let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
516- let dT = if ((dS > f))
514+ else aI("invalid asset")
515+ let dY = if (dU)
516+ then $Tuple2(dV, dW)
517+ else if (dX)
518+ then $Tuple2((dV - dS), dW)
519+ else $Tuple2(dV, (dW - dS))
520+ let dZ = dY._1
521+ let ea = dY._2
522+ let eb = if (dX)
523+ then $Tuple2(dS, 0)
524+ else $Tuple2(0, dS)
525+ let ec = eb._1
526+ let ed = eb._2
527+ let dt = dP(ec)._1
528+ let du = dP(ed)._1
529+ let ee = dP(dS)
530+ let ef = ee._1
531+ let dQ = ee._2
532+ let eg = (dZ + dt)
533+ let eh = (ea + du)
534+ let ei = bA(D(eh, bf), D(eg, be))
535+ let ej = G(ei, b)
536+ let ek = if (dX)
537+ then dZ
538+ else ea
539+ let el = toBigInt(ek)
540+ let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity)
541+ let en = if ((em > f))
517542 then true
518- else ay("initial deposit requires all coins")
519- if ((dT == dT))
543+ else aI("initial deposit requires all coins")
544+ if ((en == en))
520545 then {
521- let dU = toBigInt(dL)
522- let dV = max([0, toInt(((dS * (sqrtBigInt((d + ((dU * d) / dR)), 18, 18, DOWN) - d)) / d))])
523- let cP = if (dy)
546+ let eo = toBigInt(ef)
547+ let ep = max([0, J(fraction(em, (sqrtBigInt((d + ((eo * d) / el)), 18, 18, DOWN) - d), d), b, FLOOR)])
548+ let cY = if (dU)
524549 then nil
525- else [IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dG, dH, dV, dP, 0, 0, height, lastBlock.timestamp, 0, 0))]
526- let dW = bs(D(dE, aX), D(dD, aW))
527- let dX = G(dW, b)
528- let dY = {
529- let dZ = if (dB)
530- then $Tuple2(dG, dD)
531- else $Tuple2(dH, dE)
532- let dn = dZ._1
533- let ea = dZ._2
534- let eb = toInt(fraction(dS, toBigInt((dn / 2)), toBigInt(ea)))
535- fraction((dV - eb), b, eb)
550+ else [IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej), StringEntry(Y(toString(value(Z)), toBase58String(value(aa))), bj(ec, ed, ep, ej, 0, 0, height, lastBlock.timestamp, 0, 0))]
551+ let eq = bA(D(ea, bf), D(dZ, be))
552+ let er = G(eq, b)
553+ let es = {
554+ let et = if (dX)
555+ then $Tuple2(ec, dZ)
556+ else $Tuple2(ed, ea)
557+ let dK = et._1
558+ let eu = et._2
559+ let ev = toInt(fraction(em, toBigInt((dK / 2)), toBigInt(eu)))
560+ fraction((ep - ev), b, ev)
536561 }
537- $Tuple4(dV, cP, du, dY)
562+ $Tuple5(ep, cY, dQ, es, dX)
538563 }
539564 else throw("Strict value is not equal to itself.")
540565 }
541566
542567
543-func ec (ed,dL,dx,X,Y) = {
544- let dy = (Y == unit)
545- let ee = [if ((dx == aT))
568+func ew (ex,ef,dT,Z,aa) = {
569+ let dU = (aa == unit)
570+ let bN = aP()
571+ let bO = parseIntValue(bN[t])
572+ let bP = parseIntValue(bN[u])
573+ let ey = [if ((dT == bb))
546574 then true
547- else ay("invalid lp asset")]
548- if ((ee == ee))
575+ else aI("invalid lp asset")]
576+ if ((ey == ey))
549577 then {
550- let ef = if ((ed == aU))
578+ let ez = if ((ex == bc))
551579 then true
552- else if ((ed == aV))
580+ else if ((ex == bd))
553581 then false
554- else ay("invalid asset")
555- let eg = if (ef)
556- then toBigInt(bq(aM(aU)))
557- else toBigInt(bq(aM(aV)))
558- let eh = bq(aM(aU))
559- let ei = bq(aM(aV))
560- let ej = if (ef)
561- then eh
562- else ei
563- let ek = toBigInt(ej)
564- let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
565- let el = toBigInt(dL)
566- let em = max([0, toInt(((eg * (d - pow((d - ((el * d) / dS)), 18, h, 0, 18, DOWN))) / d))])
567- let en = ds(em, aE)
568- let eo = en._1
569- let du = en._2
570- let ep = if (ef)
571- then $Tuple4(eo, 0, (eh - em), ei)
572- else $Tuple4(0, eo, eh, (ei - em))
573- let eq = ep._1
574- let er = ep._2
575- let es = ep._3
576- let et = ep._4
577- let dO = bs(D(et, aX), D(es, aW))
578- let dP = G(dO, b)
579- let cP = if (dy)
582+ else aI("invalid asset")
583+ let eA = if (ez)
584+ then toBigInt(by(aU(bc)))
585+ else toBigInt(by(aU(bd)))
586+ let eB = if (ez)
587+ then bO
588+ else bP
589+ let eC = by(aU(bc))
590+ let eD = by(aU(bd))
591+ let eE = if (ez)
592+ then eC
593+ else eD
594+ let eF = toBigInt(eE)
595+ let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity)
596+ let eG = toBigInt(ef)
597+ let eH = max([0, J(fraction(eA, (d - pow((d - ((eG * d) / em)), 18, h, 0, 18, DOWN)), d), eB, FLOOR)])
598+ let eI = dP(eH)
599+ let eJ = eI._1
600+ let dQ = eI._2
601+ let eK = if (ez)
602+ then $Tuple4(eJ, 0, (eC - eH), eD)
603+ else $Tuple4(0, eJ, eC, (eD - eH))
604+ let eL = eK._1
605+ let eM = eK._2
606+ let eN = eK._3
607+ let eO = eK._4
608+ let ei = bA(D(eO, bf), D(eN, be))
609+ let ej = G(ei, b)
610+ let cY = if (dU)
580611 then nil
581- else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(eq, er, dL, dP, height, lastBlock.timestamp)), IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP)]
582- let dW = bs(D(ei, aX), D(eh, aW))
583- let dX = G(dW, b)
584- let dY = {
585- let eu = (toInt(fraction(eg, el, dS)) * 2)
586- fraction((eo - eu), b, eu)
612+ else [StringEntry(ab(toString(value(Z)), toBase58String(value(aa))), bu(eL, eM, ef, ej, height, lastBlock.timestamp)), IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej)]
613+ let eq = bA(D(eD, bf), D(eC, be))
614+ let er = G(eq, b)
615+ let es = {
616+ let eP = (toInt(fraction(eA, eG, em)) * 2)
617+ fraction((eJ - eP), b, eP)
587618 }
588- $Tuple4(eo, cP, du, dY)
619+ $Tuple5(eJ, cY, dQ, es, ez)
589620 }
590621 else throw("Strict value is not equal to itself.")
591622 }
592623
593624
594-func ev () = {
595- let dq = getString(Q())
596- if ($isInstanceOf(dq, "String"))
625+func eQ () = {
626+ let dN = getString(S())
627+ if ($isInstanceOf(dN, "String"))
597628 then {
598- let ew = dq
599- fromBase58String(ew)
629+ let eR = dN
630+ fromBase58String(eR)
600631 }
601- else if ($isInstanceOf(dq, "Unit"))
632+ else if ($isInstanceOf(dN, "Unit"))
602633 then unit
603634 else throw("Match error")
604635 }
605636
606637
607-func ex () = {
608- let dq = getString(R())
609- if ($isInstanceOf(dq, "String"))
638+func eS () = {
639+ let dN = getString(T())
640+ if ($isInstanceOf(dN, "String"))
610641 then {
611- let ew = dq
612- fromBase58String(ew)
642+ let eR = dN
643+ fromBase58String(eR)
613644 }
614- else if ($isInstanceOf(dq, "Unit"))
645+ else if ($isInstanceOf(dN, "Unit"))
615646 then unit
616647 else throw("Match error")
617648 }
618649
619650
620-func ey (df) = {
621- let dq = ev()
622- if ($isInstanceOf(dq, "ByteVector"))
651+func eT (dC) = {
652+ let dN = eQ()
653+ if ($isInstanceOf(dN, "ByteVector"))
623654 then {
624- let ez = dq
625- (df.callerPublicKey == ez)
655+ let eU = dN
656+ (dC.callerPublicKey == eU)
626657 }
627- else if ($isInstanceOf(dq, "Unit"))
628- then (df.caller == this)
658+ else if ($isInstanceOf(dN, "Unit"))
659+ then (dC.caller == this)
629660 else throw("Match error")
630661 }
631662
632663
633-func eA (df) = {
634- let eB = throw("Permission denied")
635- let dq = ev()
636- if ($isInstanceOf(dq, "ByteVector"))
664+func eV (dC) = {
665+ let eW = throw("Permission denied")
666+ let dN = eQ()
667+ if ($isInstanceOf(dN, "ByteVector"))
637668 then {
638- let ez = dq
639- if ((df.callerPublicKey == ez))
669+ let eU = dN
670+ if ((dC.callerPublicKey == eU))
640671 then true
641- else eB
672+ else eW
642673 }
643- else if ($isInstanceOf(dq, "Unit"))
644- then if ((df.caller == this))
674+ else if ($isInstanceOf(dN, "Unit"))
675+ then if ((dC.caller == this))
645676 then true
646- else eB
677+ else eW
647678 else throw("Match error")
648679 }
649680
650681
651-@Callable(df)
652-func setManager (eC) = {
653- let eD = eA(df)
654- if ((eD == eD))
682+@Callable(dC)
683+func setManager (eX) = {
684+ let eY = eV(dC)
685+ if ((eY == eY))
655686 then {
656- let eE = fromBase58String(eC)
657- if ((eE == eE))
658- then [StringEntry(R(), eC)]
687+ let eZ = fromBase58String(eX)
688+ if ((eZ == eZ))
689+ then [StringEntry(T(), eX)]
659690 else throw("Strict value is not equal to itself.")
660691 }
661692 else throw("Strict value is not equal to itself.")
663694
664695
665696
666-@Callable(df)
697+@Callable(dC)
667698 func confirmManager () = {
668- let eF = ex()
669- let eG = if (isDefined(eF))
699+ let fa = eS()
700+ let fb = if (isDefined(fa))
670701 then true
671702 else throw("No pending manager")
672- if ((eG == eG))
703+ if ((fb == fb))
673704 then {
674- let eH = if ((df.callerPublicKey == value(eF)))
705+ let fc = if ((dC.callerPublicKey == value(fa)))
675706 then true
676707 else throw("You are not pending manager")
677- if ((eH == eH))
678- then [StringEntry(Q(), toBase58String(value(eF))), DeleteEntry(R())]
708+ if ((fc == fc))
709+ then [StringEntry(S(), toBase58String(value(fa))), DeleteEntry(T())]
679710 else throw("Strict value is not equal to itself.")
680711 }
681712 else throw("Strict value is not equal to itself.")
683714
684715
685716
686-@Callable(df)
687-func put (ck,eI) = if ((0 > ck))
717+@Callable(dC)
718+func put (ct,fd) = if ((0 > ct))
688719 then throw("Invalid slippageTolerance passed")
689720 else {
690- let dl = di(df, ck, true)
691- let cM = dl._2
692- let bR = dl._7
693- let ci = dl._9
694- let cN = dl._10
695- let cO = dl._11
696- let eJ = dl._12
697- let eK = dl._13
698- let do = invoke(aA, "emit", [cM], nil)
699- if ((do == do))
721+ let dI = dF(dC, ct, true)
722+ let cV = dI._2
723+ let ca = dI._7
724+ let cr = dI._9
725+ let cW = dI._10
726+ let cX = dI._11
727+ let fe = dI._12
728+ let ff = dI._13
729+ let dG = toBigInt(value(dC.payments[0]).amount)
730+ let dH = toBigInt(value(dC.payments[1]).amount)
731+ let dk = dd(dG, dH, toBigInt(0))
732+ if ((dk == dk))
700733 then {
701- let dp = {
702- let dq = do
703- if ($isInstanceOf(dq, "Address"))
704- then {
705- let dr = dq
706- invoke(dr, "emit", [cM], nil)
734+ let dL = invoke(aL, "emit", [cV], nil)
735+ if ((dL == dL))
736+ then {
737+ let dM = {
738+ let dN = dL
739+ if ($isInstanceOf(dN, "Address"))
740+ then {
741+ let dO = dN
742+ invoke(dO, "emit", [cV], nil)
743+ }
744+ else unit
707745 }
708- else unit
709- }
710- if ((dp == dp))
711- then {
712- let eL = if ((cN > 0))
713- then invoke(ba, "put", nil, [AttachedPayment(eJ, cN)])
714- else nil
715- if ((eL == eL))
746+ if ((dM == dM))
716747 then {
717- let eM = if ((cO > 0))
718- then invoke(ba, "put", nil, [AttachedPayment(eK, cO)])
748+ let fg = if ((cW > 0))
749+ then invoke(bi, "put", nil, [AttachedPayment(fe, cW)])
719750 else nil
720- if ((eM == eM))
751+ if ((fg == fg))
721752 then {
722- let eN = if (eI)
753+ let fh = if ((cX > 0))
754+ then invoke(bi, "put", nil, [AttachedPayment(ff, cX)])
755+ else nil
756+ if ((fh == fh))
723757 then {
724- let eO = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
725- if ((eO == eO))
726- then nil
758+ let fi = if (fd)
759+ then {
760+ let fj = invoke(bh, "stake", nil, [AttachedPayment(ca, cV)])
761+ if ((fj == fj))
762+ then nil
763+ else throw("Strict value is not equal to itself.")
764+ }
765+ else [ScriptTransfer(dC.caller, cV, ca)]
766+ let fk = dl(0, 0, 0)
767+ if ((fk == fk))
768+ then {
769+ let dc = fk._2
770+ let fl = fk._1
771+ let fm = dp(dk, dc)
772+ if ((fm == fm))
773+ then ((cr ++ fi) ++ fl)
774+ else throw("Strict value is not equal to itself.")
775+ }
727776 else throw("Strict value is not equal to itself.")
728777 }
729- else [ScriptTransfer(df.caller, cM, bR)]
730- (ci ++ eN)
778+ else throw("Strict value is not equal to itself.")
731779 }
732780 else throw("Strict value is not equal to itself.")
733781 }
740788
741789
742790
743-@Callable(df)
744-func putForFree (eP) = if ((0 > eP))
791+@Callable(dC)
792+func putForFree (fn) = if ((0 > fn))
745793 then throw("Invalid value passed")
746794 else {
747- let dl = di(df, eP, false)
748- dl._9
795+ let dI = dF(dC, fn, false)
796+ let cr = dI._9
797+ let dG = toBigInt(value(dC.payments[0]).amount)
798+ let dH = toBigInt(value(dC.payments[1]).amount)
799+ let dk = dd(dG, dH, toBigInt(0))
800+ if ((dk == dk))
801+ then {
802+ let fo = dl(0, 0, 0)
803+ let fl = fo._1
804+ let dc = fo._2
805+ let fm = dp(dk, dc)
806+ if ((fm == fm))
807+ then (cr ++ fl)
808+ else throw("Strict value is not equal to itself.")
809+ }
810+ else throw("Strict value is not equal to itself.")
749811 }
750812
751813
752814
753-@Callable(df)
754-func putOneTkn (eQ,eR) = {
755- let eS = {
756- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
757- if ($isInstanceOf(aD, "Boolean"))
758- then aD
759- else throw(($getType(aD) + " couldn't be cast to Boolean"))
815+@Callable(dC)
816+func putOneTkn (fp,fq) = {
817+ let fr = {
818+ let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
819+ if ($isInstanceOf(fs, "Boolean"))
820+ then fs
821+ else throw(($getType(fs) + " couldn't be cast to Boolean"))
760822 }
761- let eT = if (if (if (aF())
823+ let ft = if (if (if (aN())
762824 then true
763- else (aS == l))
825+ else (ba == l))
764826 then true
765- else (aS == n))
827+ else (ba == n))
766828 then true
767- else eS
768- let ee = [if (if (!(eT))
829+ else fr
830+ let ey = [if (if (!(ft))
769831 then true
770- else ey(df))
832+ else eT(dC))
771833 then true
772- else ay("put operation is blocked by admin"), if ((size(df.payments) == 1))
834+ else aI("put operation is blocked by admin"), if ((size(dC.payments) == 1))
773835 then true
774- else ay("exactly 1 payment are expected")]
775- if ((ee == ee))
836+ else aI("exactly 1 payment are expected")]
837+ if ((ey == ey))
776838 then {
777- let eU = df.payments[0]
778- let dx = eU.assetId
779- let dw = eU.amount
780- let X = df.caller
781- let Y = df.transactionId
782- let eV = dv(dw, dx, X, Y)
783- if ((eV == eV))
839+ let fu = dC.payments[0]
840+ let dT = fu.assetId
841+ let dS = fu.amount
842+ let dk = if ((dT == bc))
843+ then dd(toBigInt(dS), toBigInt(0), toBigInt(0))
844+ else if ((dT == bd))
845+ then dd(toBigInt(0), toBigInt(dS), toBigInt(0))
846+ else aI("payment asset is not supported")
847+ if ((dk == dk))
784848 then {
785- let eW = eV._4
786- let du = eV._3
787- let cP = eV._2
788- let eX = eV._1
789- let eY = if (if ((eQ > 0))
790- then (eQ > eX)
791- else false)
792- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
793- else eX
794- let do = dm(eY)
795- if ((do == do))
849+ let Z = dC.caller
850+ let aa = dC.transactionId
851+ let fv = dR(dS, dT, Z, aa)
852+ if ((fv == fv))
796853 then {
797- let eN = if (eR)
854+ let dX = fv._5
855+ let fw = fv._4
856+ let dQ = fv._3
857+ let cY = fv._2
858+ let fx = fv._1
859+ let fy = if (if ((fp > 0))
860+ then (fp > fx)
861+ else false)
862+ then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
863+ else fx
864+ let dL = dJ(fy)
865+ if ((dL == dL))
798866 then {
799- let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
800- if ((eZ == eZ))
801- then nil
867+ let fi = if (fq)
868+ then {
869+ let fz = invoke(bh, "stake", nil, [AttachedPayment(bb, fy)])
870+ if ((fz == fz))
871+ then nil
872+ else throw("Strict value is not equal to itself.")
873+ }
874+ else [ScriptTransfer(dC.caller, fy, bb)]
875+ let fA = if ((dQ > 0))
876+ then [ScriptTransfer(aM, dQ, dT)]
877+ else nil
878+ let fB = if ((this == aM))
879+ then $Tuple2(0, 0)
880+ else if (dX)
881+ then $Tuple2(-(dQ), 0)
882+ else $Tuple2(0, -(dQ))
883+ let dm = fB._1
884+ let dn = fB._2
885+ let fC = dl(dm, dn, 0)
886+ let fl = fC._1
887+ let dc = fC._2
888+ let dw = value(getString(ah))
889+ let fm = dp(dk, dc)
890+ if ((fm == fm))
891+ then $Tuple2((((cY ++ fi) ++ fA) ++ fl), fy)
802892 else throw("Strict value is not equal to itself.")
803- }
804- else [ScriptTransfer(df.caller, eY, aT)]
805- let fa = if ((du > 0))
806- then [ScriptTransfer(aB, du, dx)]
807- else nil
808- $Tuple2(((cP ++ eN) ++ fa), eY)
809- }
810- else throw("Strict value is not equal to itself.")
811- }
812- else throw("Strict value is not equal to itself.")
813- }
814- else throw("Strict value is not equal to itself.")
815- }
816-
817-
818-
819-@Callable(df)
820-func putOneTknREADONLY (dx,dw) = {
821- let fb = dv(dw, aK(dx), unit, unit)
822- let eX = fb._1
823- let cP = fb._2
824- let du = fb._3
825- let eW = fb._4
826- $Tuple2(nil, $Tuple3(eX, du, eW))
827- }
828-
829-
830-
831-@Callable(df)
832-func getOneTkn (fc,eQ) = {
833- let eS = {
834- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
835- if ($isInstanceOf(aD, "Boolean"))
836- then aD
837- else throw(($getType(aD) + " couldn't be cast to Boolean"))
838- }
839- let fd = if (if (aF())
840- then true
841- else (aS == n))
842- then true
843- else eS
844- let ee = [if (if (!(fd))
845- then true
846- else ey(df))
847- then true
848- else ay("get operation is blocked by admin"), if ((size(df.payments) == 1))
849- then true
850- else ay("exactly 1 payment are expected")]
851- if ((ee == ee))
852- then {
853- let ed = aK(fc)
854- let eU = df.payments[0]
855- let dx = eU.assetId
856- let dL = eU.amount
857- let X = df.caller
858- let Y = df.transactionId
859- let fe = ec(ed, dL, dx, X, Y)
860- if ((fe == fe))
861- then {
862- let eW = fe._4
863- let du = fe._3
864- let cP = fe._2
865- let ff = fe._1
866- let dn = if (if ((eQ > 0))
867- then (eQ > ff)
868- else false)
869- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
870- else ff
871- let fg = invoke(aA, "burn", [dL], [AttachedPayment(dx, dL)])
872- if ((fg == fg))
873- then {
874- let fh = [ScriptTransfer(X, dn, ed)]
875- let fa = if ((du > 0))
876- then [ScriptTransfer(aB, du, ed)]
877- else nil
878- $Tuple2(((cP ++ fh) ++ fa), dn)
879- }
880- else throw("Strict value is not equal to itself.")
881- }
882- else throw("Strict value is not equal to itself.")
883- }
884- else throw("Strict value is not equal to itself.")
885- }
886-
887-
888-
889-@Callable(df)
890-func getOneTknREADONLY (ed,dL) = {
891- let fi = ec(aK(ed), dL, aT, unit, unit)
892- let ff = fi._1
893- let cP = fi._2
894- let du = fi._3
895- let eW = fi._4
896- $Tuple2(nil, $Tuple3(ff, du, eW))
897- }
898-
899-
900-
901-@Callable(df)
902-func unstakeAndGetOneTkn (fj,fc,eQ) = {
903- let eS = {
904- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
905- if ($isInstanceOf(aD, "Boolean"))
906- then aD
907- else throw(($getType(aD) + " couldn't be cast to Boolean"))
908- }
909- let fd = if (if (aF())
910- then true
911- else (aS == n))
912- then true
913- else eS
914- let ee = [if (if (!(fd))
915- then true
916- else ey(df))
917- then true
918- else ay("get operation is blocked by admin"), if ((size(df.payments) == 0))
919- then true
920- else ay("no payments are expected")]
921- if ((ee == ee))
922- then {
923- let ed = aK(fc)
924- let X = df.caller
925- let Y = df.transactionId
926- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
927- if ((fk == fk))
928- then {
929- let fl = ec(ed, fj, aT, X, Y)
930- if ((fl == fl))
931- then {
932- let eW = fl._4
933- let du = fl._3
934- let cP = fl._2
935- let ff = fl._1
936- let dn = if (if ((eQ > 0))
937- then (eQ > ff)
938- else false)
939- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
940- else ff
941- let fg = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
942- if ((fg == fg))
943- then {
944- let fh = [ScriptTransfer(df.caller, dn, ed)]
945- let fa = if ((du > 0))
946- then [ScriptTransfer(aB, du, ed)]
947- else nil
948- $Tuple2(((cP ++ fh) ++ fa), dn)
949893 }
950894 else throw("Strict value is not equal to itself.")
951895 }
958902
959903
960904
961-@Callable(df)
962-func get () = {
963- let cA = de(df)
964- let fm = cA._1
965- let ch = cA._2
966- let dh = cA._3
967- let bP = cA._4
968- let ci = cA._5
969- let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
970- if ((fn == fn))
971- then ci
972- else throw("Strict value is not equal to itself.")
905+@Callable(dC)
906+func putOneTknREADONLY (dT,dS) = {
907+ let fD = dR(dS, aS(dT), unit, unit)
908+ let fx = fD._1
909+ let cY = fD._2
910+ let dQ = fD._3
911+ let fw = fD._4
912+ let dX = fD._5
913+ $Tuple2(nil, $Tuple3(fx, dQ, fw))
973914 }
974915
975916
976917
977-@Callable(df)
978-func getNoLess (fo,fp) = {
979- let cA = de(df)
980- let cg = cA._1
981- let ch = cA._2
982- let dh = cA._3
983- let bP = cA._4
984- let ci = cA._5
985- if ((fo > cg))
986- then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo)))
987- else if ((fp > ch))
988- then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp)))
989- else {
990- let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
991- if ((fn == fn))
992- then ci
993- else throw("Strict value is not equal to itself.")
994- }
995- }
996-
997-
998-
999-@Callable(df)
1000-func unstakeAndGet (dn) = {
1001- let fq = if ((size(df.payments) != 0))
1002- then throw("No payments are expected")
1003- else true
1004- if ((fq == fq))
918+@Callable(dC)
919+func getOneTkn (fE,fp) = {
920+ let fr = {
921+ let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
922+ if ($isInstanceOf(fs, "Boolean"))
923+ then fs
924+ else throw(($getType(fs) + " couldn't be cast to Boolean"))
925+ }
926+ let fF = if (if (aN())
927+ then true
928+ else (ba == n))
929+ then true
930+ else fr
931+ let ey = [if (if (!(fF))
932+ then true
933+ else eT(dC))
934+ then true
935+ else aI("get operation is blocked by admin"), if ((size(dC.payments) == 1))
936+ then true
937+ else aI("exactly 1 payment are expected")]
938+ if ((ey == ey))
1005939 then {
1006- let bE = aH()
1007- let bR = fromBase58String(bE[q])
1008- let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
1009- if ((fk == fk))
940+ let ex = aS(fE)
941+ let fu = dC.payments[0]
942+ let dT = fu.assetId
943+ let ef = fu.amount
944+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
945+ if ((dk == dk))
1010946 then {
1011- let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
1012- let bU = parseIntValue(cA._9)
1013- let ci = cA._10
1014- let fr = if (if (aF())
1015- then true
1016- else (bU == n))
1017- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
1018- else true
1019- if ((fr == fr))
947+ let Z = dC.caller
948+ let aa = dC.transactionId
949+ let fG = ew(ex, ef, dT, Z, aa)
950+ if ((fG == fG))
1020951 then {
1021- let fn = invoke(aA, "burn", [dn], [AttachedPayment(bR, dn)])
1022- if ((fn == fn))
1023- then ci
952+ let ez = fG._5
953+ let fw = fG._4
954+ let dQ = fG._3
955+ let cY = fG._2
956+ let fH = fG._1
957+ let dK = if (if ((fp > 0))
958+ then (fp > fH)
959+ else false)
960+ then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
961+ else fH
962+ let fI = invoke(aL, "burn", [ef], [AttachedPayment(dT, ef)])
963+ if ((fI == fI))
964+ then {
965+ let fJ = [ScriptTransfer(Z, dK, ex)]
966+ let fA = if ((dQ > 0))
967+ then [ScriptTransfer(aM, dQ, ex)]
968+ else nil
969+ let fK = {
970+ let fL = if ((this == aM))
971+ then 0
972+ else dQ
973+ if (ez)
974+ then $Tuple2(-((dK + fL)), 0)
975+ else $Tuple2(0, -((dK + fL)))
976+ }
977+ let dm = fK._1
978+ let dn = fK._2
979+ let fM = dl(dm, dn, 0)
980+ let fl = fM._1
981+ let dc = fM._2
982+ let fm = dp(dk, dc)
983+ if ((fm == fm))
984+ then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK)
985+ else throw("Strict value is not equal to itself.")
986+ }
1024987 else throw("Strict value is not equal to itself.")
1025988 }
1026989 else throw("Strict value is not equal to itself.")
1032995
1033996
1034997
1035-@Callable(df)
1036-func unstakeAndGetNoLess (fj,fs,fp) = {
1037- let fd = if (aF())
998+@Callable(dC)
999+func getOneTknREADONLY (ex,ef) = {
1000+ let fN = ew(aS(ex), ef, bb, unit, unit)
1001+ let fH = fN._1
1002+ let cY = fN._2
1003+ let dQ = fN._3
1004+ let fw = fN._4
1005+ let ez = fN._5
1006+ $Tuple2(nil, $Tuple3(fH, dQ, fw))
1007+ }
1008+
1009+
1010+
1011+@Callable(dC)
1012+func unstakeAndGetOneTkn (fO,fE,fp) = {
1013+ let fr = {
1014+ let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1015+ if ($isInstanceOf(fs, "Boolean"))
1016+ then fs
1017+ else throw(($getType(fs) + " couldn't be cast to Boolean"))
1018+ }
1019+ let fF = if (if (aN())
10381020 then true
1039- else (aS == n)
1040- let ee = [if (!(fd))
1021+ else (ba == n))
10411022 then true
1042- else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
1023+ else fr
1024+ let ey = [if (if (!(fF))
10431025 then true
1044- else throw("no payments are expected")]
1045- if ((ee == ee))
1026+ else eT(dC))
1027+ then true
1028+ else aI("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1029+ then true
1030+ else aI("no payments are expected")]
1031+ if ((ey == ey))
10461032 then {
1047- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1048- if ((fk == fk))
1033+ let ex = aS(fE)
1034+ let Z = dC.caller
1035+ let aa = dC.transactionId
1036+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1037+ let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil)
1038+ if ((fP == fP))
10491039 then {
1050- let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller)
1051- let cg = cA._1
1052- let ch = cA._2
1053- let ci = cA._10
1054- let ft = [if ((cg >= fs))
1055- then true
1056- else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
1057- then true
1058- else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1059- if ((ft == ft))
1040+ let fQ = ew(ex, fO, bb, Z, aa)
1041+ if ((fQ == fQ))
10601042 then {
1061- let fn = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
1062- if ((fn == fn))
1063- then ci
1043+ let ez = fQ._5
1044+ let fw = fQ._4
1045+ let dQ = fQ._3
1046+ let cY = fQ._2
1047+ let fH = fQ._1
1048+ let dK = if (if ((fp > 0))
1049+ then (fp > fH)
1050+ else false)
1051+ then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
1052+ else fH
1053+ let fI = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)])
1054+ if ((fI == fI))
1055+ then {
1056+ let fJ = [ScriptTransfer(dC.caller, dK, ex)]
1057+ let fA = if ((dQ > 0))
1058+ then [ScriptTransfer(aM, dQ, ex)]
1059+ else nil
1060+ let fR = {
1061+ let fL = if ((this == aM))
1062+ then 0
1063+ else dQ
1064+ if (ez)
1065+ then $Tuple2(-((dK + fL)), 0)
1066+ else $Tuple2(0, -((dK + fL)))
1067+ }
1068+ let dm = fR._1
1069+ let dn = fR._2
1070+ let fS = dl(dm, dn, 0)
1071+ let fl = fS._1
1072+ let dc = fS._2
1073+ let fm = dp(dk, dc)
1074+ if ((fm == fm))
1075+ then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK)
1076+ else throw("Strict value is not equal to itself.")
1077+ }
10641078 else throw("Strict value is not equal to itself.")
10651079 }
10661080 else throw("Strict value is not equal to itself.")
10721086
10731087
10741088
1075-@Callable(df)
1076-func activate (fu,fv) = if ((toString(df.caller) != toString(aA)))
1077- then throw("permissions denied")
1078- else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
1079-
1080-
1081-
1082-@Callable(df)
1083-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
1084-
1085-
1086-
1087-@Callable(df)
1088-func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
1089-
1090-
1091-
1092-@Callable(df)
1093-func calcPricesWrapperREADONLY (by,bz,bD) = {
1094- let bM = bC(by, bz, bD)
1095- $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
1089+@Callable(dC)
1090+func get () = {
1091+ let cJ = dB(dC)
1092+ let fT = cJ._1
1093+ let cq = cJ._2
1094+ let dE = cJ._3
1095+ let bY = cJ._4
1096+ let cr = cJ._5
1097+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1098+ if ((dk == dk))
1099+ then {
1100+ let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1101+ if ((fU == fU))
1102+ then {
1103+ let fV = dl(-(fT), -(cq), 0)
1104+ let fl = fV._1
1105+ let dc = fV._2
1106+ let fm = dp(dk, dc)
1107+ if ((fm == fm))
1108+ then (cr ++ fl)
1109+ else throw("Strict value is not equal to itself.")
1110+ }
1111+ else throw("Strict value is not equal to itself.")
1112+ }
1113+ else throw("Strict value is not equal to itself.")
10961114 }
10971115
10981116
10991117
1100-@Callable(df)
1118+@Callable(dC)
1119+func getNoLess (fW,fX) = {
1120+ let cJ = dB(dC)
1121+ let cp = cJ._1
1122+ let cq = cJ._2
1123+ let dE = cJ._3
1124+ let bY = cJ._4
1125+ let cr = cJ._5
1126+ if ((fW > cp))
1127+ then throw(((("noLessThenAmtAsset failed: " + toString(cp)) + " < ") + toString(fW)))
1128+ else if ((fX > cq))
1129+ then throw(((("noLessThenPriceAsset failed: " + toString(cq)) + " < ") + toString(fX)))
1130+ else {
1131+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE))
1132+ let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1133+ if ((fU == fU))
1134+ then {
1135+ let fY = dl(-(cp), -(cq), 0)
1136+ let fl = fY._1
1137+ let dc = fY._2
1138+ let fm = dp(dk, dc)
1139+ if ((fm == fm))
1140+ then (cr ++ fl)
1141+ else throw("Strict value is not equal to itself.")
1142+ }
1143+ else throw("Strict value is not equal to itself.")
1144+ }
1145+ }
1146+
1147+
1148+
1149+@Callable(dC)
1150+func unstakeAndGet (dK) = {
1151+ let fZ = if ((size(dC.payments) != 0))
1152+ then throw("No payments are expected")
1153+ else true
1154+ if ((fZ == fZ))
1155+ then {
1156+ let bN = aP()
1157+ let ca = fromBase58String(bN[q])
1158+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1159+ let fP = invoke(bh, "unstake", [toBase58String(ca), dK], nil)
1160+ if ((fP == fP))
1161+ then {
1162+ let cJ = bW(toBase58String(dC.transactionId), toBase58String(ca), dK, dC.caller)
1163+ let cp = cJ._1
1164+ let cq = cJ._2
1165+ let cd = parseIntValue(cJ._9)
1166+ let cr = cJ._10
1167+ let ga = if (if (aN())
1168+ then true
1169+ else (cd == n))
1170+ then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
1171+ else true
1172+ if ((ga == ga))
1173+ then {
1174+ let fU = invoke(aL, "burn", [dK], [AttachedPayment(ca, dK)])
1175+ if ((fU == fU))
1176+ then {
1177+ let gb = dl(-(cp), -(cq), 0)
1178+ let fl = gb._1
1179+ let dc = gb._2
1180+ let fm = dp(dk, dc)
1181+ if ((fm == fm))
1182+ then (cr ++ fl)
1183+ else throw("Strict value is not equal to itself.")
1184+ }
1185+ else throw("Strict value is not equal to itself.")
1186+ }
1187+ else throw("Strict value is not equal to itself.")
1188+ }
1189+ else throw("Strict value is not equal to itself.")
1190+ }
1191+ else throw("Strict value is not equal to itself.")
1192+ }
1193+
1194+
1195+
1196+@Callable(dC)
1197+func unstakeAndGetNoLess (fO,gc,fX) = {
1198+ let fF = if (aN())
1199+ then true
1200+ else (ba == n)
1201+ let ey = [if (!(fF))
1202+ then true
1203+ else throw("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1204+ then true
1205+ else throw("no payments are expected")]
1206+ if ((ey == ey))
1207+ then {
1208+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1209+ let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil)
1210+ if ((fP == fP))
1211+ then {
1212+ let cJ = bW(toBase58String(dC.transactionId), toBase58String(bb), fO, dC.caller)
1213+ let cp = cJ._1
1214+ let cq = cJ._2
1215+ let cr = cJ._10
1216+ let gd = [if ((cp >= gc))
1217+ then true
1218+ else throw(makeString(["amount asset amount to receive is less than ", toString(gc)], "")), if ((cq >= fX))
1219+ then true
1220+ else throw(makeString(["price asset amount to receive is less than ", toString(fX)], ""))]
1221+ if ((gd == gd))
1222+ then {
1223+ let fU = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)])
1224+ if ((fU == fU))
1225+ then {
1226+ let ge = dl(-(cp), -(cq), 0)
1227+ let fl = ge._1
1228+ let dc = ge._2
1229+ let fm = dp(dk, dc)
1230+ if ((fm == fm))
1231+ then (cr ++ fl)
1232+ else throw("Strict value is not equal to itself.")
1233+ }
1234+ else throw("Strict value is not equal to itself.")
1235+ }
1236+ else throw("Strict value is not equal to itself.")
1237+ }
1238+ else throw("Strict value is not equal to itself.")
1239+ }
1240+ else throw("Strict value is not equal to itself.")
1241+ }
1242+
1243+
1244+
1245+@Callable(dC)
1246+func activate (gf,gg) = if ((toString(dC.caller) != toString(aL)))
1247+ then throw("permissions denied")
1248+ else $Tuple2([StringEntry(ac(), gf), StringEntry(ad(), gg)], "success")
1249+
1250+
1251+
1252+@Callable(dC)
1253+func refreshKLp () = {
1254+ let gh = valueOrElse(getInteger(ai), 0)
1255+ let gi = if (((height - gh) >= al))
1256+ then unit
1257+ else aI(makeString([toString(al), " blocks have not passed since the previous call"], ""))
1258+ if ((gi == gi))
1259+ then {
1260+ let dw = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ah), "0")), aK("invalid kLp"))
1261+ let gj = dl(0, 0, 0)
1262+ let gk = gj._1
1263+ let dc = gj._2
1264+ let do = if ((dw != dc))
1265+ then gk
1266+ else aI("nothing to refresh")
1267+ $Tuple2(do, toString(dc))
1268+ }
1269+ else throw("Strict value is not equal to itself.")
1270+ }
1271+
1272+
1273+
1274+@Callable(dC)
1275+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aP())
1276+
1277+
1278+
1279+@Callable(dC)
1280+func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
1281+
1282+
1283+
1284+@Callable(dC)
1285+func calcPricesWrapperREADONLY (bH,bI,bM) = {
1286+ let bV = bL(bH, bI, bM)
1287+ $Tuple2(nil, [toString(bV[0]), toString(bV[1]), toString(bV[2])])
1288+ }
1289+
1290+
1291+
1292+@Callable(dC)
11011293 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
11021294
11031295
11041296
1105-@Callable(df)
1297+@Callable(dC)
11061298 func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
11071299
11081300
11091301
1110-@Callable(df)
1111-func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
1302+@Callable(dC)
1303+func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC))))
11121304
11131305
11141306
1115-@Callable(df)
1116-func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
1307+@Callable(dC)
1308+func estimatePutOperationWrapperREADONLY (bX,ct,cu,cv,cw,cx,Z,cy,cz) = $Tuple2(nil, cs(bX, ct, cu, cv, cw, cx, Z, cy, cz))
11171309
11181310
11191311
1120-@Callable(df)
1121-func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1122- let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1123- $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
1312+@Callable(dC)
1313+func estimateGetOperationWrapperREADONLY (bX,bY,bZ,Z) = {
1314+ let cJ = bW(bX, bY, bZ, addressFromStringValue(Z))
1315+ $Tuple2(nil, $Tuple10(cJ._1, cJ._2, cJ._3, cJ._4, cJ._5, cJ._6, cJ._7, toString(cJ._8), cJ._9, cJ._10))
11241316 }
11251317
11261318
11271319
1128-@Callable(df)
1320+@Callable(dC)
11291321 func statsREADONLY () = {
1130- let bE = aH()
1131- let bR = fromBase58String(bE[q])
1132- let cS = bE[r]
1133- let cT = bE[s]
1134- let ct = bE[v]
1135- let cu = bE[w]
1136- let bF = parseIntValue(bE[t])
1137- let bG = parseIntValue(bE[u])
1138- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1139- let cU = bq(cS)
1140- let cV = bq(cT)
1141- let fx = if ((fw == 0))
1322+ let bN = aP()
1323+ let ca = fromBase58String(bN[q])
1324+ let gl = bN[r]
1325+ let gm = bN[s]
1326+ let cC = bN[v]
1327+ let cD = bN[w]
1328+ let bO = parseIntValue(bN[t])
1329+ let bP = parseIntValue(bN[u])
1330+ let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1331+ let go = by(gl)
1332+ let gp = by(gm)
1333+ let gq = if ((gn == 0))
11421334 then [e, e, e]
1143- else bC(cU, cV, fw)
1144- let cb = 0
1145- let fy = G(fx[1], b)
1146- let fz = G(fx[2], b)
1147- let fA = value(getInteger(aA, am(toString(this))))
1148- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fw), toString(cb), toString(fy), toString(fz), toString(fA)], j))
1335+ else bL(go, gp, gn)
1336+ let ck = 0
1337+ let gr = G(gq[1], b)
1338+ let gs = G(gq[2], b)
1339+ let gt = value(getInteger(aL, aw(toString(this))))
1340+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(go), toString(gp), toString(gn), toString(ck), toString(gr), toString(gs), toString(gt)], j))
11491341 }
11501342
11511343
11521344
1153-@Callable(df)
1154-func evaluatePutByAmountAssetREADONLY (cl) = {
1155- let bE = aH()
1156- let bR = fromBase58String(bE[q])
1157- let cr = bE[r]
1158- let bS = fromBase58String(cr)
1159- let cs = bE[s]
1160- let bT = fromBase58String(cs)
1161- let bF = parseIntValue(bE[t])
1162- let bG = parseIntValue(bE[u])
1163- let bU = bE[p]
1164- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1165- let cU = bq(cr)
1166- let cV = bq(cs)
1167- let bA = D(cU, bF)
1168- let bB = D(cV, bG)
1169- let ca = if ((fw == 0))
1345+@Callable(dC)
1346+func evaluatePutByAmountAssetREADONLY (cu) = {
1347+ let bN = aP()
1348+ let ca = fromBase58String(bN[q])
1349+ let cA = bN[r]
1350+ let cb = fromBase58String(cA)
1351+ let cB = bN[s]
1352+ let cc = fromBase58String(cB)
1353+ let bO = parseIntValue(bN[t])
1354+ let bP = parseIntValue(bN[u])
1355+ let cd = bN[p]
1356+ let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1357+ let go = by(cA)
1358+ let gp = by(cB)
1359+ let bJ = D(go, bO)
1360+ let bK = D(gp, bP)
1361+ let cj = if ((gn == 0))
11701362 then e
1171- else bs(bB, bA)
1172- let cx = D(cl, bF)
1173- let cy = fraction(cx, ca, d)
1174- let cn = G(cy, bG)
1175- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1176- let cI = dl._1
1177- let fB = dl._3
1178- let bW = dl._4
1179- let bY = dl._5
1180- let bV = dl._6
1181- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1363+ else bA(bK, bJ)
1364+ let cG = D(cu, bO)
1365+ let cH = fraction(cG, cj, d)
1366+ let cw = G(cH, bP)
1367+ let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1368+ let cR = dI._1
1369+ let gu = dI._3
1370+ let cf = dI._4
1371+ let ch = dI._5
1372+ let ce = dI._6
1373+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j))
11821374 }
11831375
11841376
11851377
1186-@Callable(df)
1187-func evaluatePutByPriceAssetREADONLY (cn) = {
1188- let bE = aH()
1189- let bR = fromBase58String(bE[q])
1190- let cr = bE[r]
1191- let bS = fromBase58String(cr)
1192- let cs = bE[s]
1193- let bT = fromBase58String(cs)
1194- let bF = parseIntValue(bE[t])
1195- let bG = parseIntValue(bE[u])
1196- let bU = bE[p]
1197- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1198- let fC = bq(cr)
1199- let fD = bq(cs)
1200- let fE = D(fC, bF)
1201- let fF = D(fD, bG)
1202- let ca = if ((fw == 0))
1378+@Callable(dC)
1379+func evaluatePutByPriceAssetREADONLY (cw) = {
1380+ let bN = aP()
1381+ let ca = fromBase58String(bN[q])
1382+ let cA = bN[r]
1383+ let cb = fromBase58String(cA)
1384+ let cB = bN[s]
1385+ let cc = fromBase58String(cB)
1386+ let bO = parseIntValue(bN[t])
1387+ let bP = parseIntValue(bN[u])
1388+ let cd = bN[p]
1389+ let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1390+ let gv = by(cA)
1391+ let gw = by(cB)
1392+ let gx = D(gv, bO)
1393+ let gy = D(gw, bP)
1394+ let cj = if ((gn == 0))
12031395 then e
1204- else bs(fF, fE)
1205- let cy = D(cn, bG)
1206- let cx = fraction(cy, d, ca)
1207- let cl = G(cx, bF)
1208- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1209- let cI = dl._1
1210- let fB = dl._3
1211- let bW = dl._4
1212- let bY = dl._5
1213- let bV = dl._6
1214- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1396+ else bA(gy, gx)
1397+ let cH = D(cw, bP)
1398+ let cG = fraction(cH, d, cj)
1399+ let cu = G(cG, bO)
1400+ let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1401+ let cR = dI._1
1402+ let gu = dI._3
1403+ let cf = dI._4
1404+ let ch = dI._5
1405+ let ce = dI._6
1406+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j))
12151407 }
12161408
12171409
12181410
1219-@Callable(df)
1220-func evaluateGetREADONLY (fG,fH) = {
1221- let cA = bN("", fG, fH, this)
1222- let cg = cA._1
1223- let ch = cA._2
1224- let bW = cA._5
1225- let bY = cA._6
1226- let bV = cA._7
1227- let cb = cA._8
1228- let bU = parseIntValue(cA._9)
1229- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cg), toString(ch), toString(bW), toString(bY), toString(bV), toString(cb), toString(bU)], j))
1411+@Callable(dC)
1412+func evaluateGetREADONLY (gz,gA) = {
1413+ let cJ = bW("", gz, gA, this)
1414+ let cp = cJ._1
1415+ let cq = cJ._2
1416+ let cf = cJ._5
1417+ let ch = cJ._6
1418+ let ce = cJ._7
1419+ let ck = cJ._8
1420+ let cd = parseIntValue(cJ._9)
1421+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cp), toString(cq), toString(cf), toString(ch), toString(ce), toString(ck), toString(cd)], j))
12301422 }
12311423
12321424
1233-@Verifier(fI)
1234-func fJ () = {
1235- let fK = {
1236- let dq = ev()
1237- if ($isInstanceOf(dq, "ByteVector"))
1425+@Verifier(gB)
1426+func gC () = {
1427+ let gD = {
1428+ let dN = eQ()
1429+ if ($isInstanceOf(dN, "ByteVector"))
12381430 then {
1239- let ez = dq
1240- ez
1431+ let eU = dN
1432+ eU
12411433 }
1242- else if ($isInstanceOf(dq, "Unit"))
1243- then fI.senderPublicKey
1434+ else if ($isInstanceOf(dN, "Unit"))
1435+ then gB.senderPublicKey
12441436 else throw("Match error")
12451437 }
1246- let dq = fI
1247- if ($isInstanceOf(dq, "Order"))
1438+ let dN = gB
1439+ if ($isInstanceOf(dN, "Order"))
12481440 then {
1249- let cR = dq
1250- let fL = aG()
1251- let ar = cQ(cR)
1252- let as = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1253- let at = sigVerify(cR.bodyBytes, cR.proofs[1], fL)
1254- if (if (if (ar)
1255- then as
1441+ let ds = dN
1442+ let gE = aO()
1443+ let aB = dr(ds)
1444+ let aC = sigVerify(ds.bodyBytes, ds.proofs[0], ds.senderPublicKey)
1445+ let aD = sigVerify(ds.bodyBytes, ds.proofs[1], gE)
1446+ if (if (if (aB)
1447+ then aC
12561448 else false)
1257- then at
1449+ then aD
12581450 else false)
12591451 then true
1260- else aq(ar, as, at)
1452+ else aA(aB, aC, aD)
12611453 }
1262- else if ($isInstanceOf(dq, "SetScriptTransaction"))
1454+ else if ($isInstanceOf(dN, "SetScriptTransaction"))
12631455 then {
1264- let ew = dq
1265- let fM = blake2b256(value(ew.script))
1266- let fN = fromBase64String(value(getString(aA, ao())))
1267- let fO = scriptHash(this)
1268- if (if ((fN == fM))
1269- then (fO != fM)
1456+ let eR = dN
1457+ let gF = blake2b256(value(eR.script))
1458+ let gG = fromBase64String(value(getString(aL, ay())))
1459+ let gH = scriptHash(this)
1460+ if (if ((gG == gF))
1461+ then (gH != gF)
12701462 else false)
12711463 then true
1272- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1464+ else sigVerify(gB.bodyBytes, gB.proofs[0], gD)
12731465 }
1274- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1466+ else sigVerify(gB.bodyBytes, gB.proofs[0], gD)
12751467 }
12761468
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 8
55
66 let b = 100000000
77
88 let c = toBigInt(100000000)
99
1010 let d = toBigInt(1000000000000000000)
1111
1212 let e = toBigInt(0)
1313
1414 let f = toBigInt(0)
1515
1616 let g = toBigInt(1)
1717
1818 let h = toBigInt(2)
1919
2020 let i = "WAVES"
2121
2222 let j = "__"
2323
2424 let k = 1
2525
2626 let l = 2
2727
2828 let m = 3
2929
3030 let n = 4
3131
3232 let o = 1
3333
3434 let p = 2
3535
3636 let q = 3
3737
3838 let r = 4
3939
4040 let s = 5
4141
4242 let t = 6
4343
4444 let u = 7
4545
4646 let v = 8
4747
4848 let w = 9
4949
5050 let x = 10
5151
5252 let y = 1
5353
5454 let z = 2
5555
5656 let A = 3
5757
5858 let B = 1
5959
6060 let C = 7
6161
6262 func D (E,F) = fraction(toBigInt(E), d, toBigInt(F))
6363
6464
6565 func G (H,I) = toInt(fraction(H, toBigInt(I), d))
6666
6767
68-func J (K,L,M) = fraction(K, L, M)
68+func J (H,I,K) = toInt(fraction(H, toBigInt(I), d, K))
6969
7070
71-func N (H) = if ((0 > H))
71+func L (M,N,O) = fraction(M, N, O)
72+
73+
74+func P (H) = if ((0 > H))
7275 then -(H)
7376 else H
7477
7578
76-func O (H) = if ((e > H))
79+func Q (H) = if ((e > H))
7780 then -(H)
7881 else H
7982
8083
81-func P () = "%s__factoryContract"
84+func R () = "%s__factoryContract"
8285
8386
84-func Q () = "%s__managerPublicKey"
87+func S () = "%s__managerPublicKey"
8588
8689
87-func R () = "%s__pendingManagerPublicKey"
90+func T () = "%s__pendingManagerPublicKey"
8891
8992
90-func S () = "%s%s__price__last"
93+func U () = "%s%s__price__last"
9194
9295
93-func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j)
96+func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], j)
9497
9598
96-func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y)
99+func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
97100
98101
99-func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y)
102+func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
100103
101104
102-func aa () = "%s__amountAsset"
105+func ac () = "%s__amountAsset"
103106
104107
105-func ab () = "%s__priceAsset"
108+func ad () = "%s__priceAsset"
106109
107110
108-func ac () = "%s__factoryConfig"
111+let ae = "%s__fee"
112+
113+let af = fraction(10, b, 10000)
114+
115+let ag = valueOrElse(getInteger(this, ae), af)
116+
117+let ah = makeString(["%s", "kLp"], j)
118+
119+let ai = makeString(["%s", "kLpRefreshedHeight"], j)
120+
121+let aj = makeString(["%s", "refreshKLpDelay"], j)
122+
123+let ak = 30
124+
125+let al = valueOrElse(getInteger(this, aj), ak)
126+
127+func am () = "%s__factoryConfig"
109128
110129
111-func ad () = "%s%s__matcher__publicKey"
130+func an () = "%s%s__matcher__publicKey"
112131
113132
114-func ae (af) = (("%s%s%s__" + af) + "__mappings__poolContract2LpAsset")
133+func ao (ap) = (("%s%s%s__" + ap) + "__mappings__poolContract2LpAsset")
115134
116135
117-func ag (ah,ai) = (((("%d%d%s__" + ah) + "__") + ai) + "__config")
136+func aq (ar,as) = (((("%d%d%s__" + ar) + "__") + as) + "__config")
118137
119138
120-func aj (ak) = ("%s%s%s__mappings__baseAsset2internalId__" + ak)
139+func at (au) = ("%s%s%s__mappings__baseAsset2internalId__" + au)
121140
122141
123-func al () = "%s__shutdown"
142+func av () = "%s__shutdown"
124143
125144
126-func am (an) = ("%s%s__poolWeight__" + an)
145+func aw (ax) = ("%s%s__poolWeight__" + ax)
127146
128147
129-func ao () = "%s__allowedLpScriptHash"
148+func ay () = "%s__allowedLpScriptHash"
130149
131150
132-let ap = "%s__feeCollectorAddress"
151+let az = "%s__feeCollectorAddress"
133152
134-func aq (ar,as,at) = throw(((((("order validation failed: orderValid=" + toString(ar)) + " senderValid=") + toString(as)) + " matcherValid=") + toString(at)))
153+func aA (aB,aC,aD) = throw(((((("order validation failed: orderValid=" + toString(aB)) + " senderValid=") + toString(aC)) + " matcherValid=") + toString(aD)))
135154
136155
137-func au (av,aw) = valueOrErrorMessage(getString(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
156+func aE (aF,aG) = valueOrErrorMessage(getString(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
138157
139158
140-func ax (av,aw) = valueOrErrorMessage(getInteger(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
159+func aH (aF,aG) = valueOrErrorMessage(getInteger(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
141160
142161
143-func ay (az) = throw(makeString(["lp.ride:", az], " "))
162+func aI (aJ) = throw(makeString(["lp.ride:", aJ], " "))
144163
145164
146-let aA = addressFromStringValue(au(this, P()))
147-
148-let aB = addressFromStringValue(au(aA, ap))
149-
150-let aC = {
151- let aD = invoke(aA, "getInFeeREADONLY", [toString(this)], nil)
152- if ($isInstanceOf(aD, "Int"))
153- then aD
154- else throw(($getType(aD) + " couldn't be cast to Int"))
155- }
156-
157-let aE = {
158- let aD = invoke(aA, "getOutFeeREADONLY", [toString(this)], nil)
159- if ($isInstanceOf(aD, "Int"))
160- then aD
161- else throw(($getType(aD) + " couldn't be cast to Int"))
162- }
163-
164-func aF () = valueOrElse(getBoolean(aA, al()), false)
165+func aK (aJ) = makeString(["lp.ride:", aJ], " ")
165166
166167
167-func aG () = fromBase58String(au(aA, ad()))
168+let aL = addressFromStringValue(aE(this, R()))
169+
170+let aM = addressFromStringValue(aE(aL, az))
171+
172+func aN () = valueOrElse(getBoolean(aL, av()), false)
168173
169174
170-func aH () = {
171- let aI = au(this, aa())
172- let aJ = au(this, ab())
173- let ai = ax(aA, aj(aJ))
174- let ah = ax(aA, aj(aI))
175- split(au(aA, ag(toString(ah), toString(ai))), j)
175+func aO () = fromBase58String(aE(aL, an()))
176+
177+
178+func aP () = {
179+ let aQ = aE(this, ac())
180+ let aR = aE(this, ad())
181+ let as = aH(aL, at(aR))
182+ let ar = aH(aL, at(aQ))
183+ split(aE(aL, aq(toString(ar), toString(as))), j)
176184 }
177185
178186
179-func aK (aL) = if ((aL == i))
187+func aS (aT) = if ((aT == i))
180188 then unit
181- else fromBase58String(aL)
189+ else fromBase58String(aT)
182190
183191
184-func aM (aL) = if ((aL == unit))
192+func aU (aT) = if ((aT == unit))
185193 then i
186- else toBase58String(value(aL))
194+ else toBase58String(value(aT))
187195
188196
189-func aN (aO) = $Tuple7(addressFromStringValue(aO[o]), parseIntValue(aO[p]), fromBase58String(aO[q]), aK(aO[r]), aK(aO[s]), parseIntValue(aO[t]), parseIntValue(aO[u]))
197+func aV (aW) = $Tuple7(addressFromStringValue(aW[o]), parseIntValue(aW[p]), fromBase58String(aW[q]), aS(aW[r]), aS(aW[s]), parseIntValue(aW[t]), parseIntValue(aW[u]))
190198
191199
192-let aP = aN(aH())
200+let aX = aV(aP())
193201
194-let aQ = aP
202+let aY = aX
195203
196-let aR = aQ._1
204+let aZ = aY._1
197205
198-let aS = aQ._2
206+let ba = aY._2
199207
200-let aT = aQ._3
208+let bb = aY._3
201209
202-let aU = aQ._4
210+let bc = aY._4
203211
204-let aV = aQ._5
212+let bd = aY._5
205213
206-let aW = aQ._6
214+let be = aY._6
207215
208-let aX = aQ._7
216+let bf = aY._7
209217
210-func aY () = split(au(aA, ac()), j)
218+func bg () = split(aE(aL, am()), j)
211219
212220
213-let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
221+let bh = valueOrErrorMessage(addressFromString(bg()[B]), "incorrect staking address")
214222
215-let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
223+let bi = valueOrErrorMessage(addressFromString(bg()[C]), "incorrect staking address")
216224
217-func bb (bc,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl)], j)
225+func bj (bk,bl,bm,bn,bo,bp,bq,br,bs,bt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt)], j)
218226
219227
220-func bm (bn,bo,bp,bf,bi,bj) = makeString(["%d%d%d%d%d%d", toString(bn), toString(bo), toString(bp), toString(bf), toString(bi), toString(bj)], j)
228+func bu (bv,bw,bx,bn,bq,br) = makeString(["%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(bn), toString(bq), toString(br)], j)
221229
222230
223-func bq (br) = if ((br == "WAVES"))
231+func by (bz) = if ((bz == "WAVES"))
224232 then wavesBalance(this).available
225- else assetBalance(this, fromBase58String(br))
233+ else assetBalance(this, fromBase58String(bz))
226234
227235
228-func bs (bt,bu) = fraction(bt, d, bu)
236+func bA (bB,bC) = fraction(bB, d, bC)
229237
230238
231-func bv (bw,bx,by,bz) = {
232- let bA = D(by, bw)
233- let bB = D(bz, bx)
234- bs(bB, bA)
239+func bD (bB,bC,K) = fraction(bB, d, bC, K)
240+
241+
242+func bE (bF,bG,bH,bI) = {
243+ let bJ = D(bH, bF)
244+ let bK = D(bI, bG)
245+ bA(bK, bJ)
235246 }
236247
237248
238-func bC (by,bz,bD) = {
239- let bE = aH()
240- let bF = parseIntValue(bE[t])
241- let bG = parseIntValue(bE[u])
242- let bH = bv(bF, bG, by, bz)
243- let bu = D(by, bF)
244- let bt = D(bz, bG)
245- let bI = D(bD, b)
246- let bJ = bs(bu, bI)
247- let bK = bs(bt, bI)
248-[bH, bJ, bK]
249+func bL (bH,bI,bM) = {
250+ let bN = aP()
251+ let bO = parseIntValue(bN[t])
252+ let bP = parseIntValue(bN[u])
253+ let bQ = bE(bO, bP, bH, bI)
254+ let bC = D(bH, bO)
255+ let bB = D(bI, bP)
256+ let bR = D(bM, b)
257+ let bS = bA(bC, bR)
258+ let bT = bA(bB, bR)
259+[bQ, bS, bT]
249260 }
250261
251262
252-func bL (by,bz,bD) = {
253- let bM = bC(by, bz, bD)
254-[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
263+func bU (bH,bI,bM) = {
264+ let bV = bL(bH, bI, bM)
265+[G(bV[0], b), G(bV[1], b), G(bV[2], b)]
255266 }
256267
257268
258-func bN (bO,bP,bQ,X) = {
259- let bE = aH()
260- let bR = bE[q]
261- let bS = bE[r]
262- let bT = bE[s]
263- let bw = parseIntValue(bE[t])
264- let bx = parseIntValue(bE[u])
265- let bU = bE[p]
266- let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
267- if ((bR != bP))
269+func bW (bX,bY,bZ,Z) = {
270+ let bN = aP()
271+ let ca = bN[q]
272+ let cb = bN[r]
273+ let cc = bN[s]
274+ let bF = parseIntValue(bN[t])
275+ let bG = parseIntValue(bN[u])
276+ let cd = bN[p]
277+ let ce = valueOrErrorMessage(assetInfo(fromBase58String(ca)), (("Asset " + ca) + " doesn't exist")).quantity
278+ if ((ca != bY))
268279 then throw("Invalid asset passed.")
269280 else {
270- let bW = bq(bS)
271- let bX = D(bW, bw)
272- let bY = bq(bT)
273- let bZ = D(bY, bx)
274- let ca = bs(bZ, bX)
275- let cb = G(ca, b)
276- let cc = D(bQ, b)
277- let cd = D(bV, b)
278- let ce = fraction(bX, cc, cd)
279- let cf = fraction(bZ, cc, cd)
280- let cg = G(ce, bw)
281- let ch = G(cf, bx)
282- let ci = if ((bO == ""))
281+ let cf = by(cb)
282+ let cg = D(cf, bF)
283+ let ch = by(cc)
284+ let ci = D(ch, bG)
285+ let cj = bA(ci, cg)
286+ let ck = G(cj, b)
287+ let cl = D(bZ, b)
288+ let cm = D(ce, b)
289+ let cn = fraction(cg, cl, cm)
290+ let co = fraction(ci, cl, cm)
291+ let cp = J(cn, bF, FLOOR)
292+ let cq = J(co, bG, FLOOR)
293+ let cr = if ((bX == ""))
283294 then nil
284- else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
295+ else [ScriptTransfer(Z, cp, if ((cb == "WAVES"))
285296 then unit
286- else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
297+ else fromBase58String(cb)), ScriptTransfer(Z, cq, if ((cc == "WAVES"))
287298 then unit
288- else fromBase58String(bT)), StringEntry(Z(toString(X), bO), bm(cg, ch, bQ, cb, height, lastBlock.timestamp)), IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb)]
289- $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
299+ else fromBase58String(cc)), StringEntry(ab(toString(Z), bX), bu(cp, cq, bZ, ck, height, lastBlock.timestamp)), IntegerEntry(U(), ck), IntegerEntry(V(height, lastBlock.timestamp), ck)]
300+ $Tuple10(cp, cq, cb, cc, cf, ch, ce, cj, cd, cr)
290301 }
291302 }
292303
293304
294-func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
295- let bE = aH()
296- let bR = fromBase58String(bE[q])
297- let cr = bE[r]
298- let cs = bE[s]
299- let ct = bE[v]
300- let cu = bE[w]
301- let bF = parseIntValue(bE[t])
302- let bG = parseIntValue(bE[u])
303- let bU = bE[p]
304- let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
305- let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
306- let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
307- if (if ((cr != cv))
305+func cs (bX,ct,cu,cv,cw,cx,Z,cy,cz) = {
306+ let bN = aP()
307+ let ca = fromBase58String(bN[q])
308+ let cA = bN[r]
309+ let cB = bN[s]
310+ let cC = bN[v]
311+ let cD = bN[w]
312+ let bO = parseIntValue(bN[t])
313+ let bP = parseIntValue(bN[u])
314+ let cd = bN[p]
315+ let ce = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
316+ let cE = toBase58String(valueOrElse(cv, fromBase58String("WAVES")))
317+ let cF = toBase58String(valueOrElse(cx, fromBase58String("WAVES")))
318+ if (if ((cA != cE))
308319 then true
309- else (cs != cw))
320+ else (cB != cF))
310321 then throw("Invalid amt or price asset passed.")
311322 else {
312- let bW = if (cp)
313- then bq(cr)
314- else (bq(cr) - cl)
315- let bY = if (cp)
316- then bq(cs)
317- else (bq(cs) - cn)
318- let cx = D(cl, bF)
319- let cy = D(cn, bG)
320- let cz = bs(cy, cx)
321- let bX = D(bW, bF)
322- let bZ = D(bY, bG)
323- let cA = if ((bV == 0))
323+ let cf = if (cy)
324+ then by(cA)
325+ else (by(cA) - cu)
326+ let ch = if (cy)
327+ then by(cB)
328+ else (by(cB) - cw)
329+ let cG = D(cu, bO)
330+ let cH = D(cw, bP)
331+ let cI = bA(cH, cG)
332+ let cg = D(cf, bO)
333+ let ci = D(ch, bP)
334+ let cJ = if ((ce == 0))
324335 then {
325- let ca = e
326- let cB = e
327- let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
328- $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
336+ let cj = e
337+ let cK = e
338+ let bR = pow((cG * cH), 0, toBigInt(5), 1, 0, DOWN)
339+ $Tuple5(G(bR, b), G(cG, bO), G(cH, bP), bA((ci + cH), (cg + cG)), cK)
329340 }
330341 else {
331- let ca = bs(bZ, bX)
332- let cB = fraction(O((ca - cz)), d, ca)
333- let cC = D(ck, b)
334- if (if ((ca != e))
335- then (cB > cC)
342+ let cj = bA(ci, cg)
343+ let cK = fraction(Q((cj - cI)), d, cj)
344+ let cL = D(ct, b)
345+ if (if ((cj != e))
346+ then (cK > cL)
336347 else false)
337- then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
348+ then throw(((("Price slippage " + toString(cK)) + " exceeded the passed limit of ") + toString(cL)))
338349 else {
339- let cd = D(bV, b)
340- let cD = fraction(cx, ca, d)
341- let cE = fraction(cy, d, ca)
342- let cF = if ((cD > cy))
343- then $Tuple2(cE, cy)
344- else $Tuple2(cx, cD)
345- let cG = cF._1
346- let cH = cF._2
347- let bI = fraction(cd, cH, bZ)
348- $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
350+ let cm = D(ce, b)
351+ let cM = fraction(cG, bD(ci, cg, CEILING), d, CEILING)
352+ let cN = fraction(cH, d, bD(ci, cg, FLOOR), CEILING)
353+ let cO = if ((cM > cH))
354+ then $Tuple2(cN, cH)
355+ else $Tuple2(cG, cM)
356+ let cP = cO._1
357+ let cQ = cO._2
358+ let bR = fraction(cm, cQ, ci, FLOOR)
359+ $Tuple5(J(bR, b, FLOOR), J(cP, bO, CEILING), J(cQ, bP, CEILING), cj, cK)
349360 }
350361 }
351- let cI = cA._1
352- let cJ = cA._2
353- let cK = cA._3
354- let cb = G(cA._4, b)
355- let cL = G(cA._5, b)
356- if ((0 >= cI))
362+ let cR = cJ._1
363+ let cS = cJ._2
364+ let cT = cJ._3
365+ let ck = G(cJ._4, b)
366+ let cU = G(cJ._5, b)
367+ if ((0 >= cR))
357368 then throw("Invalid calculations. LP calculated is less than zero.")
358369 else {
359- let cM = if (!(cq))
370+ let cV = if (!(cz))
360371 then 0
361- else cI
362- let cN = (cl - cJ)
363- let cO = (cn - cK)
364- let cP = [IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb), StringEntry(W(X, bO), bb(cJ, cK, cM, cb, ck, cL, height, lastBlock.timestamp, cN, cO))]
365- $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
372+ else cR
373+ let cW = (cu - cS)
374+ let cX = (cw - cT)
375+ let cY = [IntegerEntry(U(), ck), IntegerEntry(V(height, lastBlock.timestamp), ck), StringEntry(Y(Z, bX), bj(cS, cT, cV, ck, ct, cU, height, lastBlock.timestamp, cW, cX))]
376+ $Tuple13(cR, cV, ck, cf, ch, ce, ca, cd, cY, cW, cX, cv, cx)
366377 }
367378 }
368379 }
369380
370381
371-func cQ (cR) = {
372- let bE = aH()
373- let cS = bE[r]
374- let cT = bE[s]
375- let bU = parseIntValue(bE[p])
376- let bF = parseIntValue(bE[t])
377- let bG = parseIntValue(bE[u])
378- let cU = bq(cS)
379- let cV = bq(cT)
380- let ca = if ((cR.orderType == Buy))
381- then bv(bF, bG, (cU + cR.amount), cV)
382- else bv(bF, bG, (cU - cR.amount), cV)
383- let cb = G(ca, b)
384- if (if (if (aF())
385- then true
386- else (bU == m))
387- then true
388- else (bU == n))
389- then throw("Exchange operations disabled")
390- else {
391- let cW = cR.assetPair.amountAsset
392- let cX = if ((cW == unit))
393- then "WAVES"
394- else toBase58String(value(cW))
395- let cY = cR.assetPair.priceAsset
396- let cZ = if ((cY == unit))
397- then "WAVES"
398- else toBase58String(value(cY))
399- if (if ((cX != cS))
400- then true
401- else (cZ != cT))
402- then throw("Wrong order assets.")
403- else {
404- let da = cR.price
405- let db = fraction(b, bG, bF)
406- let dc = J(da, b, db)
407- let dd = if ((cR.orderType == Buy))
408- then (cb >= dc)
409- else (dc >= cb)
410- true
411- }
412- }
382+func cZ (da,db,ce) = {
383+ let dc = fraction(pow((da * db), 0, toBigInt(5), 1, 18, DOWN), g, ce)
384+ if ((ce == f))
385+ then f
386+ else dc
413387 }
414388
415389
416-func de (df) = if ((size(df.payments) != 1))
390+func dd (de,df,dg) = {
391+ let dh = (toBigInt(by(aU(bc))) - de)
392+ let di = (toBigInt(by(aU(bd))) - df)
393+ let dj = (toBigInt(value(assetInfo(bb)).quantity) - dg)
394+ let dk = cZ(dh, di, dj)
395+ dk
396+ }
397+
398+
399+func dl (dm,dn,dg) = {
400+ let dh = (by(aU(bc)) + dm)
401+ let di = (by(aU(bd)) + dn)
402+ let dj = (value(assetInfo(bb)).quantity + dg)
403+ let dc = cZ(toBigInt(dh), toBigInt(di), toBigInt(dj))
404+ let do = [IntegerEntry(ai, height), StringEntry(ah, toString(dc))]
405+ $Tuple2(do, dc)
406+ }
407+
408+
409+func dp (dq,dc) = if ((dc >= dq))
410+ then true
411+ else aI(makeString(["updated KLp lower than current KLp", toString(dq), toString(dc)], " "))
412+
413+
414+func dr (ds) = {
415+ let dt = ds.amount
416+ let du = fraction(ds.amount, ds.price, b, FLOOR)
417+ let dv = if ((ds.orderType == Buy))
418+ then $Tuple2(dt, -(du))
419+ else $Tuple2(-(dt), du)
420+ let dm = dv._1
421+ let dn = dv._2
422+ if (if (if (aN())
423+ then true
424+ else (ba == m))
425+ then true
426+ else (ba == n))
427+ then throw("Exchange operations disabled")
428+ else if (if ((ds.assetPair.amountAsset != bc))
429+ then true
430+ else (ds.assetPair.priceAsset != bd))
431+ then throw("Wrong order assets.")
432+ else {
433+ let dw = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, ah), aK("kLp is required"))), aK("invalid kLp"))
434+ let dx = dl(dm, dn, 0)
435+ let dy = dx._1
436+ let dz = dx._2
437+ let dA = (dz >= dw)
438+ dA
439+ }
440+ }
441+
442+
443+func dB (dC) = if ((size(dC.payments) != 1))
417444 then throw("exactly 1 payment is expected")
418445 else {
419- let dg = value(df.payments[0])
420- let bP = value(dg.assetId)
421- let dh = dg.amount
422- let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
423- let cg = cA._1
424- let ch = cA._2
425- let bU = parseIntValue(cA._9)
426- let ci = cA._10
427- if (if (aF())
446+ let dD = value(dC.payments[0])
447+ let bY = value(dD.assetId)
448+ let dE = dD.amount
449+ let cJ = bW(toBase58String(dC.transactionId), toBase58String(bY), dE, dC.caller)
450+ let cp = cJ._1
451+ let cq = cJ._2
452+ let cd = parseIntValue(cJ._9)
453+ let cr = cJ._10
454+ if (if (aN())
428455 then true
429- else (bU == n))
430- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
431- else $Tuple5(cg, ch, dh, bP, ci)
456+ else (cd == n))
457+ then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
458+ else $Tuple5(cp, cq, dE, bY, cr)
432459 }
433460
434461
435-func di (df,ck,cq) = if ((size(df.payments) != 2))
462+func dF (dC,ct,cz) = if ((size(dC.payments) != 2))
436463 then throw("exactly 2 payments are expected")
437464 else {
438- let dj = value(df.payments[0])
439- let dk = value(df.payments[1])
440- let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
441- let bU = parseIntValue(dl._8)
442- if (if (if (aF())
465+ let dG = value(dC.payments[0])
466+ let dH = value(dC.payments[1])
467+ let dI = cs(toBase58String(dC.transactionId), ct, dG.amount, dG.assetId, dH.amount, dH.assetId, toString(dC.caller), false, cz)
468+ let cd = parseIntValue(dI._8)
469+ if (if (if (aN())
443470 then true
444- else (bU == l))
471+ else (cd == l))
445472 then true
446- else (bU == n))
447- then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
448- else dl
473+ else (cd == n))
474+ then throw(("Put operation is blocked by admin. Status = " + toString(cd)))
475+ else dI
449476 }
450477
451478
452-func dm (dn) = {
453- let do = invoke(aA, "emit", [dn], nil)
454- if ((do == do))
479+func dJ (dK) = {
480+ let dL = invoke(aL, "emit", [dK], nil)
481+ if ((dL == dL))
455482 then {
456- let dp = {
457- let dq = do
458- if ($isInstanceOf(dq, "Address"))
483+ let dM = {
484+ let dN = dL
485+ if ($isInstanceOf(dN, "Address"))
459486 then {
460- let dr = dq
461- invoke(dr, "emit", [dn], nil)
487+ let dO = dN
488+ invoke(dO, "emit", [dK], nil)
462489 }
463490 else unit
464491 }
465- if ((dp == dp))
466- then dn
492+ if ((dM == dM))
493+ then dK
467494 else throw("Strict value is not equal to itself.")
468495 }
469496 else throw("Strict value is not equal to itself.")
470497 }
471498
472499
473-func ds (dn,dt) = {
474- let du = if ((dt == 0))
475- then 0
476- else fraction(dn, dt, b)
477- $Tuple2((dn - du), du)
500+func dP (dK) = {
501+ let dQ = fraction(dK, ag, b)
502+ $Tuple2((dK - dQ), dQ)
478503 }
479504
480505
481-func dv (dw,dx,X,Y) = {
482- let dy = (Y == unit)
483- let dz = bq(aM(aU))
484- let dA = bq(aM(aV))
485- let dB = if ((dx == aU))
506+func dR (dS,dT,Z,aa) = {
507+ let dU = (aa == unit)
508+ let dV = by(aU(bc))
509+ let dW = by(aU(bd))
510+ let dX = if ((dT == bc))
486511 then true
487- else if ((dx == aV))
512+ else if ((dT == bd))
488513 then false
489- else ay("invalid asset")
490- let dC = if (dy)
491- then $Tuple2(dz, dA)
492- else if (dB)
493- then $Tuple2((dz - dw), dA)
494- else $Tuple2(dz, (dA - dw))
495- let dD = dC._1
496- let dE = dC._2
497- let dF = if (dB)
498- then $Tuple2(dw, 0)
499- else $Tuple2(0, dw)
500- let dG = dF._1
501- let dH = dF._2
502- let dI = ds(dG, aC)._1
503- let dJ = ds(dH, aC)._1
504- let dK = ds(dw, aC)
505- let dL = dK._1
506- let du = dK._2
507- let dM = (dD + dI)
508- let dN = (dE + dJ)
509- let dO = bs(D(dN, aX), D(dM, aW))
510- let dP = G(dO, b)
511- let dQ = if (dB)
512- then dD
513- else dE
514- let dR = toBigInt(dQ)
515- let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
516- let dT = if ((dS > f))
514+ else aI("invalid asset")
515+ let dY = if (dU)
516+ then $Tuple2(dV, dW)
517+ else if (dX)
518+ then $Tuple2((dV - dS), dW)
519+ else $Tuple2(dV, (dW - dS))
520+ let dZ = dY._1
521+ let ea = dY._2
522+ let eb = if (dX)
523+ then $Tuple2(dS, 0)
524+ else $Tuple2(0, dS)
525+ let ec = eb._1
526+ let ed = eb._2
527+ let dt = dP(ec)._1
528+ let du = dP(ed)._1
529+ let ee = dP(dS)
530+ let ef = ee._1
531+ let dQ = ee._2
532+ let eg = (dZ + dt)
533+ let eh = (ea + du)
534+ let ei = bA(D(eh, bf), D(eg, be))
535+ let ej = G(ei, b)
536+ let ek = if (dX)
537+ then dZ
538+ else ea
539+ let el = toBigInt(ek)
540+ let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity)
541+ let en = if ((em > f))
517542 then true
518- else ay("initial deposit requires all coins")
519- if ((dT == dT))
543+ else aI("initial deposit requires all coins")
544+ if ((en == en))
520545 then {
521- let dU = toBigInt(dL)
522- let dV = max([0, toInt(((dS * (sqrtBigInt((d + ((dU * d) / dR)), 18, 18, DOWN) - d)) / d))])
523- let cP = if (dy)
546+ let eo = toBigInt(ef)
547+ let ep = max([0, J(fraction(em, (sqrtBigInt((d + ((eo * d) / el)), 18, 18, DOWN) - d), d), b, FLOOR)])
548+ let cY = if (dU)
524549 then nil
525- else [IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dG, dH, dV, dP, 0, 0, height, lastBlock.timestamp, 0, 0))]
526- let dW = bs(D(dE, aX), D(dD, aW))
527- let dX = G(dW, b)
528- let dY = {
529- let dZ = if (dB)
530- then $Tuple2(dG, dD)
531- else $Tuple2(dH, dE)
532- let dn = dZ._1
533- let ea = dZ._2
534- let eb = toInt(fraction(dS, toBigInt((dn / 2)), toBigInt(ea)))
535- fraction((dV - eb), b, eb)
550+ else [IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej), StringEntry(Y(toString(value(Z)), toBase58String(value(aa))), bj(ec, ed, ep, ej, 0, 0, height, lastBlock.timestamp, 0, 0))]
551+ let eq = bA(D(ea, bf), D(dZ, be))
552+ let er = G(eq, b)
553+ let es = {
554+ let et = if (dX)
555+ then $Tuple2(ec, dZ)
556+ else $Tuple2(ed, ea)
557+ let dK = et._1
558+ let eu = et._2
559+ let ev = toInt(fraction(em, toBigInt((dK / 2)), toBigInt(eu)))
560+ fraction((ep - ev), b, ev)
536561 }
537- $Tuple4(dV, cP, du, dY)
562+ $Tuple5(ep, cY, dQ, es, dX)
538563 }
539564 else throw("Strict value is not equal to itself.")
540565 }
541566
542567
543-func ec (ed,dL,dx,X,Y) = {
544- let dy = (Y == unit)
545- let ee = [if ((dx == aT))
568+func ew (ex,ef,dT,Z,aa) = {
569+ let dU = (aa == unit)
570+ let bN = aP()
571+ let bO = parseIntValue(bN[t])
572+ let bP = parseIntValue(bN[u])
573+ let ey = [if ((dT == bb))
546574 then true
547- else ay("invalid lp asset")]
548- if ((ee == ee))
575+ else aI("invalid lp asset")]
576+ if ((ey == ey))
549577 then {
550- let ef = if ((ed == aU))
578+ let ez = if ((ex == bc))
551579 then true
552- else if ((ed == aV))
580+ else if ((ex == bd))
553581 then false
554- else ay("invalid asset")
555- let eg = if (ef)
556- then toBigInt(bq(aM(aU)))
557- else toBigInt(bq(aM(aV)))
558- let eh = bq(aM(aU))
559- let ei = bq(aM(aV))
560- let ej = if (ef)
561- then eh
562- else ei
563- let ek = toBigInt(ej)
564- let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
565- let el = toBigInt(dL)
566- let em = max([0, toInt(((eg * (d - pow((d - ((el * d) / dS)), 18, h, 0, 18, DOWN))) / d))])
567- let en = ds(em, aE)
568- let eo = en._1
569- let du = en._2
570- let ep = if (ef)
571- then $Tuple4(eo, 0, (eh - em), ei)
572- else $Tuple4(0, eo, eh, (ei - em))
573- let eq = ep._1
574- let er = ep._2
575- let es = ep._3
576- let et = ep._4
577- let dO = bs(D(et, aX), D(es, aW))
578- let dP = G(dO, b)
579- let cP = if (dy)
582+ else aI("invalid asset")
583+ let eA = if (ez)
584+ then toBigInt(by(aU(bc)))
585+ else toBigInt(by(aU(bd)))
586+ let eB = if (ez)
587+ then bO
588+ else bP
589+ let eC = by(aU(bc))
590+ let eD = by(aU(bd))
591+ let eE = if (ez)
592+ then eC
593+ else eD
594+ let eF = toBigInt(eE)
595+ let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity)
596+ let eG = toBigInt(ef)
597+ let eH = max([0, J(fraction(eA, (d - pow((d - ((eG * d) / em)), 18, h, 0, 18, DOWN)), d), eB, FLOOR)])
598+ let eI = dP(eH)
599+ let eJ = eI._1
600+ let dQ = eI._2
601+ let eK = if (ez)
602+ then $Tuple4(eJ, 0, (eC - eH), eD)
603+ else $Tuple4(0, eJ, eC, (eD - eH))
604+ let eL = eK._1
605+ let eM = eK._2
606+ let eN = eK._3
607+ let eO = eK._4
608+ let ei = bA(D(eO, bf), D(eN, be))
609+ let ej = G(ei, b)
610+ let cY = if (dU)
580611 then nil
581- else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(eq, er, dL, dP, height, lastBlock.timestamp)), IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP)]
582- let dW = bs(D(ei, aX), D(eh, aW))
583- let dX = G(dW, b)
584- let dY = {
585- let eu = (toInt(fraction(eg, el, dS)) * 2)
586- fraction((eo - eu), b, eu)
612+ else [StringEntry(ab(toString(value(Z)), toBase58String(value(aa))), bu(eL, eM, ef, ej, height, lastBlock.timestamp)), IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej)]
613+ let eq = bA(D(eD, bf), D(eC, be))
614+ let er = G(eq, b)
615+ let es = {
616+ let eP = (toInt(fraction(eA, eG, em)) * 2)
617+ fraction((eJ - eP), b, eP)
587618 }
588- $Tuple4(eo, cP, du, dY)
619+ $Tuple5(eJ, cY, dQ, es, ez)
589620 }
590621 else throw("Strict value is not equal to itself.")
591622 }
592623
593624
594-func ev () = {
595- let dq = getString(Q())
596- if ($isInstanceOf(dq, "String"))
625+func eQ () = {
626+ let dN = getString(S())
627+ if ($isInstanceOf(dN, "String"))
597628 then {
598- let ew = dq
599- fromBase58String(ew)
629+ let eR = dN
630+ fromBase58String(eR)
600631 }
601- else if ($isInstanceOf(dq, "Unit"))
632+ else if ($isInstanceOf(dN, "Unit"))
602633 then unit
603634 else throw("Match error")
604635 }
605636
606637
607-func ex () = {
608- let dq = getString(R())
609- if ($isInstanceOf(dq, "String"))
638+func eS () = {
639+ let dN = getString(T())
640+ if ($isInstanceOf(dN, "String"))
610641 then {
611- let ew = dq
612- fromBase58String(ew)
642+ let eR = dN
643+ fromBase58String(eR)
613644 }
614- else if ($isInstanceOf(dq, "Unit"))
645+ else if ($isInstanceOf(dN, "Unit"))
615646 then unit
616647 else throw("Match error")
617648 }
618649
619650
620-func ey (df) = {
621- let dq = ev()
622- if ($isInstanceOf(dq, "ByteVector"))
651+func eT (dC) = {
652+ let dN = eQ()
653+ if ($isInstanceOf(dN, "ByteVector"))
623654 then {
624- let ez = dq
625- (df.callerPublicKey == ez)
655+ let eU = dN
656+ (dC.callerPublicKey == eU)
626657 }
627- else if ($isInstanceOf(dq, "Unit"))
628- then (df.caller == this)
658+ else if ($isInstanceOf(dN, "Unit"))
659+ then (dC.caller == this)
629660 else throw("Match error")
630661 }
631662
632663
633-func eA (df) = {
634- let eB = throw("Permission denied")
635- let dq = ev()
636- if ($isInstanceOf(dq, "ByteVector"))
664+func eV (dC) = {
665+ let eW = throw("Permission denied")
666+ let dN = eQ()
667+ if ($isInstanceOf(dN, "ByteVector"))
637668 then {
638- let ez = dq
639- if ((df.callerPublicKey == ez))
669+ let eU = dN
670+ if ((dC.callerPublicKey == eU))
640671 then true
641- else eB
672+ else eW
642673 }
643- else if ($isInstanceOf(dq, "Unit"))
644- then if ((df.caller == this))
674+ else if ($isInstanceOf(dN, "Unit"))
675+ then if ((dC.caller == this))
645676 then true
646- else eB
677+ else eW
647678 else throw("Match error")
648679 }
649680
650681
651-@Callable(df)
652-func setManager (eC) = {
653- let eD = eA(df)
654- if ((eD == eD))
682+@Callable(dC)
683+func setManager (eX) = {
684+ let eY = eV(dC)
685+ if ((eY == eY))
655686 then {
656- let eE = fromBase58String(eC)
657- if ((eE == eE))
658- then [StringEntry(R(), eC)]
687+ let eZ = fromBase58String(eX)
688+ if ((eZ == eZ))
689+ then [StringEntry(T(), eX)]
659690 else throw("Strict value is not equal to itself.")
660691 }
661692 else throw("Strict value is not equal to itself.")
662693 }
663694
664695
665696
666-@Callable(df)
697+@Callable(dC)
667698 func confirmManager () = {
668- let eF = ex()
669- let eG = if (isDefined(eF))
699+ let fa = eS()
700+ let fb = if (isDefined(fa))
670701 then true
671702 else throw("No pending manager")
672- if ((eG == eG))
703+ if ((fb == fb))
673704 then {
674- let eH = if ((df.callerPublicKey == value(eF)))
705+ let fc = if ((dC.callerPublicKey == value(fa)))
675706 then true
676707 else throw("You are not pending manager")
677- if ((eH == eH))
678- then [StringEntry(Q(), toBase58String(value(eF))), DeleteEntry(R())]
708+ if ((fc == fc))
709+ then [StringEntry(S(), toBase58String(value(fa))), DeleteEntry(T())]
679710 else throw("Strict value is not equal to itself.")
680711 }
681712 else throw("Strict value is not equal to itself.")
682713 }
683714
684715
685716
686-@Callable(df)
687-func put (ck,eI) = if ((0 > ck))
717+@Callable(dC)
718+func put (ct,fd) = if ((0 > ct))
688719 then throw("Invalid slippageTolerance passed")
689720 else {
690- let dl = di(df, ck, true)
691- let cM = dl._2
692- let bR = dl._7
693- let ci = dl._9
694- let cN = dl._10
695- let cO = dl._11
696- let eJ = dl._12
697- let eK = dl._13
698- let do = invoke(aA, "emit", [cM], nil)
699- if ((do == do))
721+ let dI = dF(dC, ct, true)
722+ let cV = dI._2
723+ let ca = dI._7
724+ let cr = dI._9
725+ let cW = dI._10
726+ let cX = dI._11
727+ let fe = dI._12
728+ let ff = dI._13
729+ let dG = toBigInt(value(dC.payments[0]).amount)
730+ let dH = toBigInt(value(dC.payments[1]).amount)
731+ let dk = dd(dG, dH, toBigInt(0))
732+ if ((dk == dk))
700733 then {
701- let dp = {
702- let dq = do
703- if ($isInstanceOf(dq, "Address"))
704- then {
705- let dr = dq
706- invoke(dr, "emit", [cM], nil)
734+ let dL = invoke(aL, "emit", [cV], nil)
735+ if ((dL == dL))
736+ then {
737+ let dM = {
738+ let dN = dL
739+ if ($isInstanceOf(dN, "Address"))
740+ then {
741+ let dO = dN
742+ invoke(dO, "emit", [cV], nil)
743+ }
744+ else unit
707745 }
708- else unit
709- }
710- if ((dp == dp))
711- then {
712- let eL = if ((cN > 0))
713- then invoke(ba, "put", nil, [AttachedPayment(eJ, cN)])
714- else nil
715- if ((eL == eL))
746+ if ((dM == dM))
716747 then {
717- let eM = if ((cO > 0))
718- then invoke(ba, "put", nil, [AttachedPayment(eK, cO)])
748+ let fg = if ((cW > 0))
749+ then invoke(bi, "put", nil, [AttachedPayment(fe, cW)])
719750 else nil
720- if ((eM == eM))
751+ if ((fg == fg))
721752 then {
722- let eN = if (eI)
753+ let fh = if ((cX > 0))
754+ then invoke(bi, "put", nil, [AttachedPayment(ff, cX)])
755+ else nil
756+ if ((fh == fh))
723757 then {
724- let eO = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
725- if ((eO == eO))
726- then nil
758+ let fi = if (fd)
759+ then {
760+ let fj = invoke(bh, "stake", nil, [AttachedPayment(ca, cV)])
761+ if ((fj == fj))
762+ then nil
763+ else throw("Strict value is not equal to itself.")
764+ }
765+ else [ScriptTransfer(dC.caller, cV, ca)]
766+ let fk = dl(0, 0, 0)
767+ if ((fk == fk))
768+ then {
769+ let dc = fk._2
770+ let fl = fk._1
771+ let fm = dp(dk, dc)
772+ if ((fm == fm))
773+ then ((cr ++ fi) ++ fl)
774+ else throw("Strict value is not equal to itself.")
775+ }
727776 else throw("Strict value is not equal to itself.")
728777 }
729- else [ScriptTransfer(df.caller, cM, bR)]
730- (ci ++ eN)
778+ else throw("Strict value is not equal to itself.")
731779 }
732780 else throw("Strict value is not equal to itself.")
733781 }
734782 else throw("Strict value is not equal to itself.")
735783 }
736784 else throw("Strict value is not equal to itself.")
737785 }
738786 else throw("Strict value is not equal to itself.")
739787 }
740788
741789
742790
743-@Callable(df)
744-func putForFree (eP) = if ((0 > eP))
791+@Callable(dC)
792+func putForFree (fn) = if ((0 > fn))
745793 then throw("Invalid value passed")
746794 else {
747- let dl = di(df, eP, false)
748- dl._9
795+ let dI = dF(dC, fn, false)
796+ let cr = dI._9
797+ let dG = toBigInt(value(dC.payments[0]).amount)
798+ let dH = toBigInt(value(dC.payments[1]).amount)
799+ let dk = dd(dG, dH, toBigInt(0))
800+ if ((dk == dk))
801+ then {
802+ let fo = dl(0, 0, 0)
803+ let fl = fo._1
804+ let dc = fo._2
805+ let fm = dp(dk, dc)
806+ if ((fm == fm))
807+ then (cr ++ fl)
808+ else throw("Strict value is not equal to itself.")
809+ }
810+ else throw("Strict value is not equal to itself.")
749811 }
750812
751813
752814
753-@Callable(df)
754-func putOneTkn (eQ,eR) = {
755- let eS = {
756- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
757- if ($isInstanceOf(aD, "Boolean"))
758- then aD
759- else throw(($getType(aD) + " couldn't be cast to Boolean"))
815+@Callable(dC)
816+func putOneTkn (fp,fq) = {
817+ let fr = {
818+ let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
819+ if ($isInstanceOf(fs, "Boolean"))
820+ then fs
821+ else throw(($getType(fs) + " couldn't be cast to Boolean"))
760822 }
761- let eT = if (if (if (aF())
823+ let ft = if (if (if (aN())
762824 then true
763- else (aS == l))
825+ else (ba == l))
764826 then true
765- else (aS == n))
827+ else (ba == n))
766828 then true
767- else eS
768- let ee = [if (if (!(eT))
829+ else fr
830+ let ey = [if (if (!(ft))
769831 then true
770- else ey(df))
832+ else eT(dC))
771833 then true
772- else ay("put operation is blocked by admin"), if ((size(df.payments) == 1))
834+ else aI("put operation is blocked by admin"), if ((size(dC.payments) == 1))
773835 then true
774- else ay("exactly 1 payment are expected")]
775- if ((ee == ee))
836+ else aI("exactly 1 payment are expected")]
837+ if ((ey == ey))
776838 then {
777- let eU = df.payments[0]
778- let dx = eU.assetId
779- let dw = eU.amount
780- let X = df.caller
781- let Y = df.transactionId
782- let eV = dv(dw, dx, X, Y)
783- if ((eV == eV))
839+ let fu = dC.payments[0]
840+ let dT = fu.assetId
841+ let dS = fu.amount
842+ let dk = if ((dT == bc))
843+ then dd(toBigInt(dS), toBigInt(0), toBigInt(0))
844+ else if ((dT == bd))
845+ then dd(toBigInt(0), toBigInt(dS), toBigInt(0))
846+ else aI("payment asset is not supported")
847+ if ((dk == dk))
784848 then {
785- let eW = eV._4
786- let du = eV._3
787- let cP = eV._2
788- let eX = eV._1
789- let eY = if (if ((eQ > 0))
790- then (eQ > eX)
791- else false)
792- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
793- else eX
794- let do = dm(eY)
795- if ((do == do))
849+ let Z = dC.caller
850+ let aa = dC.transactionId
851+ let fv = dR(dS, dT, Z, aa)
852+ if ((fv == fv))
796853 then {
797- let eN = if (eR)
854+ let dX = fv._5
855+ let fw = fv._4
856+ let dQ = fv._3
857+ let cY = fv._2
858+ let fx = fv._1
859+ let fy = if (if ((fp > 0))
860+ then (fp > fx)
861+ else false)
862+ then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
863+ else fx
864+ let dL = dJ(fy)
865+ if ((dL == dL))
798866 then {
799- let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
800- if ((eZ == eZ))
801- then nil
867+ let fi = if (fq)
868+ then {
869+ let fz = invoke(bh, "stake", nil, [AttachedPayment(bb, fy)])
870+ if ((fz == fz))
871+ then nil
872+ else throw("Strict value is not equal to itself.")
873+ }
874+ else [ScriptTransfer(dC.caller, fy, bb)]
875+ let fA = if ((dQ > 0))
876+ then [ScriptTransfer(aM, dQ, dT)]
877+ else nil
878+ let fB = if ((this == aM))
879+ then $Tuple2(0, 0)
880+ else if (dX)
881+ then $Tuple2(-(dQ), 0)
882+ else $Tuple2(0, -(dQ))
883+ let dm = fB._1
884+ let dn = fB._2
885+ let fC = dl(dm, dn, 0)
886+ let fl = fC._1
887+ let dc = fC._2
888+ let dw = value(getString(ah))
889+ let fm = dp(dk, dc)
890+ if ((fm == fm))
891+ then $Tuple2((((cY ++ fi) ++ fA) ++ fl), fy)
802892 else throw("Strict value is not equal to itself.")
803- }
804- else [ScriptTransfer(df.caller, eY, aT)]
805- let fa = if ((du > 0))
806- then [ScriptTransfer(aB, du, dx)]
807- else nil
808- $Tuple2(((cP ++ eN) ++ fa), eY)
809- }
810- else throw("Strict value is not equal to itself.")
811- }
812- else throw("Strict value is not equal to itself.")
813- }
814- else throw("Strict value is not equal to itself.")
815- }
816-
817-
818-
819-@Callable(df)
820-func putOneTknREADONLY (dx,dw) = {
821- let fb = dv(dw, aK(dx), unit, unit)
822- let eX = fb._1
823- let cP = fb._2
824- let du = fb._3
825- let eW = fb._4
826- $Tuple2(nil, $Tuple3(eX, du, eW))
827- }
828-
829-
830-
831-@Callable(df)
832-func getOneTkn (fc,eQ) = {
833- let eS = {
834- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
835- if ($isInstanceOf(aD, "Boolean"))
836- then aD
837- else throw(($getType(aD) + " couldn't be cast to Boolean"))
838- }
839- let fd = if (if (aF())
840- then true
841- else (aS == n))
842- then true
843- else eS
844- let ee = [if (if (!(fd))
845- then true
846- else ey(df))
847- then true
848- else ay("get operation is blocked by admin"), if ((size(df.payments) == 1))
849- then true
850- else ay("exactly 1 payment are expected")]
851- if ((ee == ee))
852- then {
853- let ed = aK(fc)
854- let eU = df.payments[0]
855- let dx = eU.assetId
856- let dL = eU.amount
857- let X = df.caller
858- let Y = df.transactionId
859- let fe = ec(ed, dL, dx, X, Y)
860- if ((fe == fe))
861- then {
862- let eW = fe._4
863- let du = fe._3
864- let cP = fe._2
865- let ff = fe._1
866- let dn = if (if ((eQ > 0))
867- then (eQ > ff)
868- else false)
869- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
870- else ff
871- let fg = invoke(aA, "burn", [dL], [AttachedPayment(dx, dL)])
872- if ((fg == fg))
873- then {
874- let fh = [ScriptTransfer(X, dn, ed)]
875- let fa = if ((du > 0))
876- then [ScriptTransfer(aB, du, ed)]
877- else nil
878- $Tuple2(((cP ++ fh) ++ fa), dn)
879- }
880- else throw("Strict value is not equal to itself.")
881- }
882- else throw("Strict value is not equal to itself.")
883- }
884- else throw("Strict value is not equal to itself.")
885- }
886-
887-
888-
889-@Callable(df)
890-func getOneTknREADONLY (ed,dL) = {
891- let fi = ec(aK(ed), dL, aT, unit, unit)
892- let ff = fi._1
893- let cP = fi._2
894- let du = fi._3
895- let eW = fi._4
896- $Tuple2(nil, $Tuple3(ff, du, eW))
897- }
898-
899-
900-
901-@Callable(df)
902-func unstakeAndGetOneTkn (fj,fc,eQ) = {
903- let eS = {
904- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
905- if ($isInstanceOf(aD, "Boolean"))
906- then aD
907- else throw(($getType(aD) + " couldn't be cast to Boolean"))
908- }
909- let fd = if (if (aF())
910- then true
911- else (aS == n))
912- then true
913- else eS
914- let ee = [if (if (!(fd))
915- then true
916- else ey(df))
917- then true
918- else ay("get operation is blocked by admin"), if ((size(df.payments) == 0))
919- then true
920- else ay("no payments are expected")]
921- if ((ee == ee))
922- then {
923- let ed = aK(fc)
924- let X = df.caller
925- let Y = df.transactionId
926- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
927- if ((fk == fk))
928- then {
929- let fl = ec(ed, fj, aT, X, Y)
930- if ((fl == fl))
931- then {
932- let eW = fl._4
933- let du = fl._3
934- let cP = fl._2
935- let ff = fl._1
936- let dn = if (if ((eQ > 0))
937- then (eQ > ff)
938- else false)
939- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
940- else ff
941- let fg = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
942- if ((fg == fg))
943- then {
944- let fh = [ScriptTransfer(df.caller, dn, ed)]
945- let fa = if ((du > 0))
946- then [ScriptTransfer(aB, du, ed)]
947- else nil
948- $Tuple2(((cP ++ fh) ++ fa), dn)
949893 }
950894 else throw("Strict value is not equal to itself.")
951895 }
952896 else throw("Strict value is not equal to itself.")
953897 }
954898 else throw("Strict value is not equal to itself.")
955899 }
956900 else throw("Strict value is not equal to itself.")
957901 }
958902
959903
960904
961-@Callable(df)
962-func get () = {
963- let cA = de(df)
964- let fm = cA._1
965- let ch = cA._2
966- let dh = cA._3
967- let bP = cA._4
968- let ci = cA._5
969- let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
970- if ((fn == fn))
971- then ci
972- else throw("Strict value is not equal to itself.")
905+@Callable(dC)
906+func putOneTknREADONLY (dT,dS) = {
907+ let fD = dR(dS, aS(dT), unit, unit)
908+ let fx = fD._1
909+ let cY = fD._2
910+ let dQ = fD._3
911+ let fw = fD._4
912+ let dX = fD._5
913+ $Tuple2(nil, $Tuple3(fx, dQ, fw))
973914 }
974915
975916
976917
977-@Callable(df)
978-func getNoLess (fo,fp) = {
979- let cA = de(df)
980- let cg = cA._1
981- let ch = cA._2
982- let dh = cA._3
983- let bP = cA._4
984- let ci = cA._5
985- if ((fo > cg))
986- then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo)))
987- else if ((fp > ch))
988- then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp)))
989- else {
990- let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
991- if ((fn == fn))
992- then ci
993- else throw("Strict value is not equal to itself.")
994- }
995- }
996-
997-
998-
999-@Callable(df)
1000-func unstakeAndGet (dn) = {
1001- let fq = if ((size(df.payments) != 0))
1002- then throw("No payments are expected")
1003- else true
1004- if ((fq == fq))
918+@Callable(dC)
919+func getOneTkn (fE,fp) = {
920+ let fr = {
921+ let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
922+ if ($isInstanceOf(fs, "Boolean"))
923+ then fs
924+ else throw(($getType(fs) + " couldn't be cast to Boolean"))
925+ }
926+ let fF = if (if (aN())
927+ then true
928+ else (ba == n))
929+ then true
930+ else fr
931+ let ey = [if (if (!(fF))
932+ then true
933+ else eT(dC))
934+ then true
935+ else aI("get operation is blocked by admin"), if ((size(dC.payments) == 1))
936+ then true
937+ else aI("exactly 1 payment are expected")]
938+ if ((ey == ey))
1005939 then {
1006- let bE = aH()
1007- let bR = fromBase58String(bE[q])
1008- let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
1009- if ((fk == fk))
940+ let ex = aS(fE)
941+ let fu = dC.payments[0]
942+ let dT = fu.assetId
943+ let ef = fu.amount
944+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
945+ if ((dk == dk))
1010946 then {
1011- let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
1012- let bU = parseIntValue(cA._9)
1013- let ci = cA._10
1014- let fr = if (if (aF())
1015- then true
1016- else (bU == n))
1017- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
1018- else true
1019- if ((fr == fr))
947+ let Z = dC.caller
948+ let aa = dC.transactionId
949+ let fG = ew(ex, ef, dT, Z, aa)
950+ if ((fG == fG))
1020951 then {
1021- let fn = invoke(aA, "burn", [dn], [AttachedPayment(bR, dn)])
1022- if ((fn == fn))
1023- then ci
952+ let ez = fG._5
953+ let fw = fG._4
954+ let dQ = fG._3
955+ let cY = fG._2
956+ let fH = fG._1
957+ let dK = if (if ((fp > 0))
958+ then (fp > fH)
959+ else false)
960+ then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
961+ else fH
962+ let fI = invoke(aL, "burn", [ef], [AttachedPayment(dT, ef)])
963+ if ((fI == fI))
964+ then {
965+ let fJ = [ScriptTransfer(Z, dK, ex)]
966+ let fA = if ((dQ > 0))
967+ then [ScriptTransfer(aM, dQ, ex)]
968+ else nil
969+ let fK = {
970+ let fL = if ((this == aM))
971+ then 0
972+ else dQ
973+ if (ez)
974+ then $Tuple2(-((dK + fL)), 0)
975+ else $Tuple2(0, -((dK + fL)))
976+ }
977+ let dm = fK._1
978+ let dn = fK._2
979+ let fM = dl(dm, dn, 0)
980+ let fl = fM._1
981+ let dc = fM._2
982+ let fm = dp(dk, dc)
983+ if ((fm == fm))
984+ then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK)
985+ else throw("Strict value is not equal to itself.")
986+ }
1024987 else throw("Strict value is not equal to itself.")
1025988 }
1026989 else throw("Strict value is not equal to itself.")
1027990 }
1028991 else throw("Strict value is not equal to itself.")
1029992 }
1030993 else throw("Strict value is not equal to itself.")
1031994 }
1032995
1033996
1034997
1035-@Callable(df)
1036-func unstakeAndGetNoLess (fj,fs,fp) = {
1037- let fd = if (aF())
998+@Callable(dC)
999+func getOneTknREADONLY (ex,ef) = {
1000+ let fN = ew(aS(ex), ef, bb, unit, unit)
1001+ let fH = fN._1
1002+ let cY = fN._2
1003+ let dQ = fN._3
1004+ let fw = fN._4
1005+ let ez = fN._5
1006+ $Tuple2(nil, $Tuple3(fH, dQ, fw))
1007+ }
1008+
1009+
1010+
1011+@Callable(dC)
1012+func unstakeAndGetOneTkn (fO,fE,fp) = {
1013+ let fr = {
1014+ let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1015+ if ($isInstanceOf(fs, "Boolean"))
1016+ then fs
1017+ else throw(($getType(fs) + " couldn't be cast to Boolean"))
1018+ }
1019+ let fF = if (if (aN())
10381020 then true
1039- else (aS == n)
1040- let ee = [if (!(fd))
1021+ else (ba == n))
10411022 then true
1042- else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
1023+ else fr
1024+ let ey = [if (if (!(fF))
10431025 then true
1044- else throw("no payments are expected")]
1045- if ((ee == ee))
1026+ else eT(dC))
1027+ then true
1028+ else aI("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1029+ then true
1030+ else aI("no payments are expected")]
1031+ if ((ey == ey))
10461032 then {
1047- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1048- if ((fk == fk))
1033+ let ex = aS(fE)
1034+ let Z = dC.caller
1035+ let aa = dC.transactionId
1036+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1037+ let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil)
1038+ if ((fP == fP))
10491039 then {
1050- let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller)
1051- let cg = cA._1
1052- let ch = cA._2
1053- let ci = cA._10
1054- let ft = [if ((cg >= fs))
1055- then true
1056- else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
1057- then true
1058- else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1059- if ((ft == ft))
1040+ let fQ = ew(ex, fO, bb, Z, aa)
1041+ if ((fQ == fQ))
10601042 then {
1061- let fn = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
1062- if ((fn == fn))
1063- then ci
1043+ let ez = fQ._5
1044+ let fw = fQ._4
1045+ let dQ = fQ._3
1046+ let cY = fQ._2
1047+ let fH = fQ._1
1048+ let dK = if (if ((fp > 0))
1049+ then (fp > fH)
1050+ else false)
1051+ then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
1052+ else fH
1053+ let fI = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)])
1054+ if ((fI == fI))
1055+ then {
1056+ let fJ = [ScriptTransfer(dC.caller, dK, ex)]
1057+ let fA = if ((dQ > 0))
1058+ then [ScriptTransfer(aM, dQ, ex)]
1059+ else nil
1060+ let fR = {
1061+ let fL = if ((this == aM))
1062+ then 0
1063+ else dQ
1064+ if (ez)
1065+ then $Tuple2(-((dK + fL)), 0)
1066+ else $Tuple2(0, -((dK + fL)))
1067+ }
1068+ let dm = fR._1
1069+ let dn = fR._2
1070+ let fS = dl(dm, dn, 0)
1071+ let fl = fS._1
1072+ let dc = fS._2
1073+ let fm = dp(dk, dc)
1074+ if ((fm == fm))
1075+ then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK)
1076+ else throw("Strict value is not equal to itself.")
1077+ }
10641078 else throw("Strict value is not equal to itself.")
10651079 }
10661080 else throw("Strict value is not equal to itself.")
10671081 }
10681082 else throw("Strict value is not equal to itself.")
10691083 }
10701084 else throw("Strict value is not equal to itself.")
10711085 }
10721086
10731087
10741088
1075-@Callable(df)
1076-func activate (fu,fv) = if ((toString(df.caller) != toString(aA)))
1077- then throw("permissions denied")
1078- else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
1079-
1080-
1081-
1082-@Callable(df)
1083-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
1084-
1085-
1086-
1087-@Callable(df)
1088-func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
1089-
1090-
1091-
1092-@Callable(df)
1093-func calcPricesWrapperREADONLY (by,bz,bD) = {
1094- let bM = bC(by, bz, bD)
1095- $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
1089+@Callable(dC)
1090+func get () = {
1091+ let cJ = dB(dC)
1092+ let fT = cJ._1
1093+ let cq = cJ._2
1094+ let dE = cJ._3
1095+ let bY = cJ._4
1096+ let cr = cJ._5
1097+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1098+ if ((dk == dk))
1099+ then {
1100+ let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1101+ if ((fU == fU))
1102+ then {
1103+ let fV = dl(-(fT), -(cq), 0)
1104+ let fl = fV._1
1105+ let dc = fV._2
1106+ let fm = dp(dk, dc)
1107+ if ((fm == fm))
1108+ then (cr ++ fl)
1109+ else throw("Strict value is not equal to itself.")
1110+ }
1111+ else throw("Strict value is not equal to itself.")
1112+ }
1113+ else throw("Strict value is not equal to itself.")
10961114 }
10971115
10981116
10991117
1100-@Callable(df)
1118+@Callable(dC)
1119+func getNoLess (fW,fX) = {
1120+ let cJ = dB(dC)
1121+ let cp = cJ._1
1122+ let cq = cJ._2
1123+ let dE = cJ._3
1124+ let bY = cJ._4
1125+ let cr = cJ._5
1126+ if ((fW > cp))
1127+ then throw(((("noLessThenAmtAsset failed: " + toString(cp)) + " < ") + toString(fW)))
1128+ else if ((fX > cq))
1129+ then throw(((("noLessThenPriceAsset failed: " + toString(cq)) + " < ") + toString(fX)))
1130+ else {
1131+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE))
1132+ let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1133+ if ((fU == fU))
1134+ then {
1135+ let fY = dl(-(cp), -(cq), 0)
1136+ let fl = fY._1
1137+ let dc = fY._2
1138+ let fm = dp(dk, dc)
1139+ if ((fm == fm))
1140+ then (cr ++ fl)
1141+ else throw("Strict value is not equal to itself.")
1142+ }
1143+ else throw("Strict value is not equal to itself.")
1144+ }
1145+ }
1146+
1147+
1148+
1149+@Callable(dC)
1150+func unstakeAndGet (dK) = {
1151+ let fZ = if ((size(dC.payments) != 0))
1152+ then throw("No payments are expected")
1153+ else true
1154+ if ((fZ == fZ))
1155+ then {
1156+ let bN = aP()
1157+ let ca = fromBase58String(bN[q])
1158+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1159+ let fP = invoke(bh, "unstake", [toBase58String(ca), dK], nil)
1160+ if ((fP == fP))
1161+ then {
1162+ let cJ = bW(toBase58String(dC.transactionId), toBase58String(ca), dK, dC.caller)
1163+ let cp = cJ._1
1164+ let cq = cJ._2
1165+ let cd = parseIntValue(cJ._9)
1166+ let cr = cJ._10
1167+ let ga = if (if (aN())
1168+ then true
1169+ else (cd == n))
1170+ then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
1171+ else true
1172+ if ((ga == ga))
1173+ then {
1174+ let fU = invoke(aL, "burn", [dK], [AttachedPayment(ca, dK)])
1175+ if ((fU == fU))
1176+ then {
1177+ let gb = dl(-(cp), -(cq), 0)
1178+ let fl = gb._1
1179+ let dc = gb._2
1180+ let fm = dp(dk, dc)
1181+ if ((fm == fm))
1182+ then (cr ++ fl)
1183+ else throw("Strict value is not equal to itself.")
1184+ }
1185+ else throw("Strict value is not equal to itself.")
1186+ }
1187+ else throw("Strict value is not equal to itself.")
1188+ }
1189+ else throw("Strict value is not equal to itself.")
1190+ }
1191+ else throw("Strict value is not equal to itself.")
1192+ }
1193+
1194+
1195+
1196+@Callable(dC)
1197+func unstakeAndGetNoLess (fO,gc,fX) = {
1198+ let fF = if (aN())
1199+ then true
1200+ else (ba == n)
1201+ let ey = [if (!(fF))
1202+ then true
1203+ else throw("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1204+ then true
1205+ else throw("no payments are expected")]
1206+ if ((ey == ey))
1207+ then {
1208+ let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1209+ let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil)
1210+ if ((fP == fP))
1211+ then {
1212+ let cJ = bW(toBase58String(dC.transactionId), toBase58String(bb), fO, dC.caller)
1213+ let cp = cJ._1
1214+ let cq = cJ._2
1215+ let cr = cJ._10
1216+ let gd = [if ((cp >= gc))
1217+ then true
1218+ else throw(makeString(["amount asset amount to receive is less than ", toString(gc)], "")), if ((cq >= fX))
1219+ then true
1220+ else throw(makeString(["price asset amount to receive is less than ", toString(fX)], ""))]
1221+ if ((gd == gd))
1222+ then {
1223+ let fU = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)])
1224+ if ((fU == fU))
1225+ then {
1226+ let ge = dl(-(cp), -(cq), 0)
1227+ let fl = ge._1
1228+ let dc = ge._2
1229+ let fm = dp(dk, dc)
1230+ if ((fm == fm))
1231+ then (cr ++ fl)
1232+ else throw("Strict value is not equal to itself.")
1233+ }
1234+ else throw("Strict value is not equal to itself.")
1235+ }
1236+ else throw("Strict value is not equal to itself.")
1237+ }
1238+ else throw("Strict value is not equal to itself.")
1239+ }
1240+ else throw("Strict value is not equal to itself.")
1241+ }
1242+
1243+
1244+
1245+@Callable(dC)
1246+func activate (gf,gg) = if ((toString(dC.caller) != toString(aL)))
1247+ then throw("permissions denied")
1248+ else $Tuple2([StringEntry(ac(), gf), StringEntry(ad(), gg)], "success")
1249+
1250+
1251+
1252+@Callable(dC)
1253+func refreshKLp () = {
1254+ let gh = valueOrElse(getInteger(ai), 0)
1255+ let gi = if (((height - gh) >= al))
1256+ then unit
1257+ else aI(makeString([toString(al), " blocks have not passed since the previous call"], ""))
1258+ if ((gi == gi))
1259+ then {
1260+ let dw = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ah), "0")), aK("invalid kLp"))
1261+ let gj = dl(0, 0, 0)
1262+ let gk = gj._1
1263+ let dc = gj._2
1264+ let do = if ((dw != dc))
1265+ then gk
1266+ else aI("nothing to refresh")
1267+ $Tuple2(do, toString(dc))
1268+ }
1269+ else throw("Strict value is not equal to itself.")
1270+ }
1271+
1272+
1273+
1274+@Callable(dC)
1275+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aP())
1276+
1277+
1278+
1279+@Callable(dC)
1280+func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
1281+
1282+
1283+
1284+@Callable(dC)
1285+func calcPricesWrapperREADONLY (bH,bI,bM) = {
1286+ let bV = bL(bH, bI, bM)
1287+ $Tuple2(nil, [toString(bV[0]), toString(bV[1]), toString(bV[2])])
1288+ }
1289+
1290+
1291+
1292+@Callable(dC)
11011293 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
11021294
11031295
11041296
1105-@Callable(df)
1297+@Callable(dC)
11061298 func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
11071299
11081300
11091301
1110-@Callable(df)
1111-func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
1302+@Callable(dC)
1303+func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC))))
11121304
11131305
11141306
1115-@Callable(df)
1116-func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
1307+@Callable(dC)
1308+func estimatePutOperationWrapperREADONLY (bX,ct,cu,cv,cw,cx,Z,cy,cz) = $Tuple2(nil, cs(bX, ct, cu, cv, cw, cx, Z, cy, cz))
11171309
11181310
11191311
1120-@Callable(df)
1121-func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1122- let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1123- $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
1312+@Callable(dC)
1313+func estimateGetOperationWrapperREADONLY (bX,bY,bZ,Z) = {
1314+ let cJ = bW(bX, bY, bZ, addressFromStringValue(Z))
1315+ $Tuple2(nil, $Tuple10(cJ._1, cJ._2, cJ._3, cJ._4, cJ._5, cJ._6, cJ._7, toString(cJ._8), cJ._9, cJ._10))
11241316 }
11251317
11261318
11271319
1128-@Callable(df)
1320+@Callable(dC)
11291321 func statsREADONLY () = {
1130- let bE = aH()
1131- let bR = fromBase58String(bE[q])
1132- let cS = bE[r]
1133- let cT = bE[s]
1134- let ct = bE[v]
1135- let cu = bE[w]
1136- let bF = parseIntValue(bE[t])
1137- let bG = parseIntValue(bE[u])
1138- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1139- let cU = bq(cS)
1140- let cV = bq(cT)
1141- let fx = if ((fw == 0))
1322+ let bN = aP()
1323+ let ca = fromBase58String(bN[q])
1324+ let gl = bN[r]
1325+ let gm = bN[s]
1326+ let cC = bN[v]
1327+ let cD = bN[w]
1328+ let bO = parseIntValue(bN[t])
1329+ let bP = parseIntValue(bN[u])
1330+ let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1331+ let go = by(gl)
1332+ let gp = by(gm)
1333+ let gq = if ((gn == 0))
11421334 then [e, e, e]
1143- else bC(cU, cV, fw)
1144- let cb = 0
1145- let fy = G(fx[1], b)
1146- let fz = G(fx[2], b)
1147- let fA = value(getInteger(aA, am(toString(this))))
1148- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fw), toString(cb), toString(fy), toString(fz), toString(fA)], j))
1335+ else bL(go, gp, gn)
1336+ let ck = 0
1337+ let gr = G(gq[1], b)
1338+ let gs = G(gq[2], b)
1339+ let gt = value(getInteger(aL, aw(toString(this))))
1340+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(go), toString(gp), toString(gn), toString(ck), toString(gr), toString(gs), toString(gt)], j))
11491341 }
11501342
11511343
11521344
1153-@Callable(df)
1154-func evaluatePutByAmountAssetREADONLY (cl) = {
1155- let bE = aH()
1156- let bR = fromBase58String(bE[q])
1157- let cr = bE[r]
1158- let bS = fromBase58String(cr)
1159- let cs = bE[s]
1160- let bT = fromBase58String(cs)
1161- let bF = parseIntValue(bE[t])
1162- let bG = parseIntValue(bE[u])
1163- let bU = bE[p]
1164- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1165- let cU = bq(cr)
1166- let cV = bq(cs)
1167- let bA = D(cU, bF)
1168- let bB = D(cV, bG)
1169- let ca = if ((fw == 0))
1345+@Callable(dC)
1346+func evaluatePutByAmountAssetREADONLY (cu) = {
1347+ let bN = aP()
1348+ let ca = fromBase58String(bN[q])
1349+ let cA = bN[r]
1350+ let cb = fromBase58String(cA)
1351+ let cB = bN[s]
1352+ let cc = fromBase58String(cB)
1353+ let bO = parseIntValue(bN[t])
1354+ let bP = parseIntValue(bN[u])
1355+ let cd = bN[p]
1356+ let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1357+ let go = by(cA)
1358+ let gp = by(cB)
1359+ let bJ = D(go, bO)
1360+ let bK = D(gp, bP)
1361+ let cj = if ((gn == 0))
11701362 then e
1171- else bs(bB, bA)
1172- let cx = D(cl, bF)
1173- let cy = fraction(cx, ca, d)
1174- let cn = G(cy, bG)
1175- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1176- let cI = dl._1
1177- let fB = dl._3
1178- let bW = dl._4
1179- let bY = dl._5
1180- let bV = dl._6
1181- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1363+ else bA(bK, bJ)
1364+ let cG = D(cu, bO)
1365+ let cH = fraction(cG, cj, d)
1366+ let cw = G(cH, bP)
1367+ let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1368+ let cR = dI._1
1369+ let gu = dI._3
1370+ let cf = dI._4
1371+ let ch = dI._5
1372+ let ce = dI._6
1373+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j))
11821374 }
11831375
11841376
11851377
1186-@Callable(df)
1187-func evaluatePutByPriceAssetREADONLY (cn) = {
1188- let bE = aH()
1189- let bR = fromBase58String(bE[q])
1190- let cr = bE[r]
1191- let bS = fromBase58String(cr)
1192- let cs = bE[s]
1193- let bT = fromBase58String(cs)
1194- let bF = parseIntValue(bE[t])
1195- let bG = parseIntValue(bE[u])
1196- let bU = bE[p]
1197- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1198- let fC = bq(cr)
1199- let fD = bq(cs)
1200- let fE = D(fC, bF)
1201- let fF = D(fD, bG)
1202- let ca = if ((fw == 0))
1378+@Callable(dC)
1379+func evaluatePutByPriceAssetREADONLY (cw) = {
1380+ let bN = aP()
1381+ let ca = fromBase58String(bN[q])
1382+ let cA = bN[r]
1383+ let cb = fromBase58String(cA)
1384+ let cB = bN[s]
1385+ let cc = fromBase58String(cB)
1386+ let bO = parseIntValue(bN[t])
1387+ let bP = parseIntValue(bN[u])
1388+ let cd = bN[p]
1389+ let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1390+ let gv = by(cA)
1391+ let gw = by(cB)
1392+ let gx = D(gv, bO)
1393+ let gy = D(gw, bP)
1394+ let cj = if ((gn == 0))
12031395 then e
1204- else bs(fF, fE)
1205- let cy = D(cn, bG)
1206- let cx = fraction(cy, d, ca)
1207- let cl = G(cx, bF)
1208- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1209- let cI = dl._1
1210- let fB = dl._3
1211- let bW = dl._4
1212- let bY = dl._5
1213- let bV = dl._6
1214- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1396+ else bA(gy, gx)
1397+ let cH = D(cw, bP)
1398+ let cG = fraction(cH, d, cj)
1399+ let cu = G(cG, bO)
1400+ let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1401+ let cR = dI._1
1402+ let gu = dI._3
1403+ let cf = dI._4
1404+ let ch = dI._5
1405+ let ce = dI._6
1406+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j))
12151407 }
12161408
12171409
12181410
1219-@Callable(df)
1220-func evaluateGetREADONLY (fG,fH) = {
1221- let cA = bN("", fG, fH, this)
1222- let cg = cA._1
1223- let ch = cA._2
1224- let bW = cA._5
1225- let bY = cA._6
1226- let bV = cA._7
1227- let cb = cA._8
1228- let bU = parseIntValue(cA._9)
1229- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cg), toString(ch), toString(bW), toString(bY), toString(bV), toString(cb), toString(bU)], j))
1411+@Callable(dC)
1412+func evaluateGetREADONLY (gz,gA) = {
1413+ let cJ = bW("", gz, gA, this)
1414+ let cp = cJ._1
1415+ let cq = cJ._2
1416+ let cf = cJ._5
1417+ let ch = cJ._6
1418+ let ce = cJ._7
1419+ let ck = cJ._8
1420+ let cd = parseIntValue(cJ._9)
1421+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cp), toString(cq), toString(cf), toString(ch), toString(ce), toString(ck), toString(cd)], j))
12301422 }
12311423
12321424
1233-@Verifier(fI)
1234-func fJ () = {
1235- let fK = {
1236- let dq = ev()
1237- if ($isInstanceOf(dq, "ByteVector"))
1425+@Verifier(gB)
1426+func gC () = {
1427+ let gD = {
1428+ let dN = eQ()
1429+ if ($isInstanceOf(dN, "ByteVector"))
12381430 then {
1239- let ez = dq
1240- ez
1431+ let eU = dN
1432+ eU
12411433 }
1242- else if ($isInstanceOf(dq, "Unit"))
1243- then fI.senderPublicKey
1434+ else if ($isInstanceOf(dN, "Unit"))
1435+ then gB.senderPublicKey
12441436 else throw("Match error")
12451437 }
1246- let dq = fI
1247- if ($isInstanceOf(dq, "Order"))
1438+ let dN = gB
1439+ if ($isInstanceOf(dN, "Order"))
12481440 then {
1249- let cR = dq
1250- let fL = aG()
1251- let ar = cQ(cR)
1252- let as = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1253- let at = sigVerify(cR.bodyBytes, cR.proofs[1], fL)
1254- if (if (if (ar)
1255- then as
1441+ let ds = dN
1442+ let gE = aO()
1443+ let aB = dr(ds)
1444+ let aC = sigVerify(ds.bodyBytes, ds.proofs[0], ds.senderPublicKey)
1445+ let aD = sigVerify(ds.bodyBytes, ds.proofs[1], gE)
1446+ if (if (if (aB)
1447+ then aC
12561448 else false)
1257- then at
1449+ then aD
12581450 else false)
12591451 then true
1260- else aq(ar, as, at)
1452+ else aA(aB, aC, aD)
12611453 }
1262- else if ($isInstanceOf(dq, "SetScriptTransaction"))
1454+ else if ($isInstanceOf(dN, "SetScriptTransaction"))
12631455 then {
1264- let ew = dq
1265- let fM = blake2b256(value(ew.script))
1266- let fN = fromBase64String(value(getString(aA, ao())))
1267- let fO = scriptHash(this)
1268- if (if ((fN == fM))
1269- then (fO != fM)
1456+ let eR = dN
1457+ let gF = blake2b256(value(eR.script))
1458+ let gG = fromBase64String(value(getString(aL, ay())))
1459+ let gH = scriptHash(this)
1460+ if (if ((gG == gF))
1461+ then (gH != gF)
12701462 else false)
12711463 then true
1272- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1464+ else sigVerify(gB.bodyBytes, gB.proofs[0], gD)
12731465 }
1274- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1466+ else sigVerify(gB.bodyBytes, gB.proofs[0], gD)
12751467 }
12761468

github/deemru/w8io/026f985 
355.64 ms