tx · CdiJjaSo3tL1qnKrWiYdYFmsR2ys81KvgXGfRZ6nrA2U

3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT:  -0.03200000 Waves

2023.01.26 14:16 [2421866] smart account 3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT > SELF 0.00000000 Waves

{ "type": 13, "id": "CdiJjaSo3tL1qnKrWiYdYFmsR2ys81KvgXGfRZ6nrA2U", "fee": 3200000, "feeAssetId": null, "timestamp": 1674731775839, "version": 1, "sender": "3N7b3kPunHUXhZp1vMG9NhPMARNEprCMWxT", "senderPublicKey": "AYbpHveq7zviKTDV7SGTB1pZGFbkumgfq3jSwVv6BznT", "proofs": [ "2hFhXGyX9Ncvx2EXHTrozaY81cxmD91SXNAVBAbTMUMzLmPQdVifKXLvG4whQWzseymBZrYXuZ71hnhFYuHQXra7" ], "script": "base64:BgLmKAgCEgQKAgEEEgYKBAEEAQgSAwoBCBIAEgQKAgEEEgMKAQESBAoCAQQSBAoCCAESBAoCCAESBAoCCAESBQoDAQgBEgASBAoCAQESAwoBARIFCgMBAQESBAoCCAgSABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0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"height": 2421866, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C4YHY5zxGuCYdb5ojqVMw9yk96MTYym6HyytEv2oxAVw Next: D8zVNcaXHi7CqYXtEuABKDjwTfzrd6hiw1AgZF3QWArD Diff:
OldNewDifferences
6262 func D (E,F) = fraction(toBigInt(E), d, toBigInt(F))
6363
6464
65-func G (E,F) = fraction(E, d, F)
65+func G (H,I) = toInt(fraction(H, toBigInt(I), d))
6666
6767
68-func H (I,J) = toInt(fraction(I, toBigInt(J), d))
68+func J (K,L,M) = fraction(K, L, M)
6969
7070
71-func K (I,J,L) = toInt(fraction(I, toBigInt(J), d, L))
71+func N (H) = if ((0 > H))
72+ then -(H)
73+ else H
7274
7375
74-func M (N,O,P) = fraction(N, O, P)
76+func O (H) = if ((e > H))
77+ then -(H)
78+ else H
7579
7680
77-func Q (I) = if ((0 > I))
78- then -(I)
79- else I
81+func P () = "%s__swapContract"
8082
8183
82-func R (I) = if ((e > I))
83- then -(I)
84- else I
84+func Q () = "%s__factoryContract"
8585
8686
87-func S () = "%s__factoryContract"
87+func R () = "%s__managerPublicKey"
8888
8989
90-func T () = "%s__managerPublicKey"
90+func S () = "%s__pendingManagerPublicKey"
9191
9292
93-func U () = "%s__pendingManagerPublicKey"
93+func T () = "%s%s__price__last"
9494
9595
96-func V () = "%s%s__price__last"
96+func U (V,W) = makeString(["%s%s%d%d__price__history", toString(V), toString(W)], j)
9797
9898
99-func W (X,Y) = makeString(["%s%s%d%d__price__history", toString(X), toString(Y)], j)
99+func X (Y,Z) = ((("%s%s%s__P__" + Y) + "__") + Z)
100100
101101
102-func Z (aa,ab) = ((("%s%s%s__P__" + aa) + "__") + ab)
102+func aa (Y,Z) = ((("%s%s%s__G__" + Y) + "__") + Z)
103103
104104
105-func ac (aa,ab) = ((("%s%s%s__G__" + aa) + "__") + ab)
105+func ab () = "%s__amountAsset"
106106
107107
108-func ad () = "%s__amountAsset"
108+func ac () = "%s__priceAsset"
109109
110110
111-func ae () = "%s__priceAsset"
111+func ad () = "%s__factoryConfig"
112112
113113
114-let af = "%s__fee"
115-
116-let ag = fraction(10, b, 10000)
117-
118-let ah = valueOrElse(getInteger(this, af), ag)
119-
120-let ai = makeString(["%s", "kLp"], j)
121-
122-let aj = makeString(["%s", "kLpRefreshedHeight"], j)
123-
124-let ak = makeString(["%s", "refreshKLpDelay"], j)
125-
126-let al = 30
127-
128-let am = valueOrElse(getInteger(this, ak), al)
129-
130-func an () = "%s__factoryConfig"
114+func ae () = "%s%s__matcher__publicKey"
131115
132116
133-func ao () = "%s%s__matcher__publicKey"
117+func af (ag) = (("%s%s%s__" + ag) + "__mappings__poolContract2LpAsset")
134118
135119
136-func ap (aq) = (("%s%s%s__" + aq) + "__mappings__poolContract2LpAsset")
120+func ah (ai,aj) = (((("%d%d%s__" + ai) + "__") + aj) + "__config")
137121
138122
139-func ar (as,at) = (((("%d%d%s__" + as) + "__") + at) + "__config")
123+func ak (al) = ("%s%s%s__mappings__baseAsset2internalId__" + al)
140124
141125
142-func au (av) = ("%s%s%s__mappings__baseAsset2internalId__" + av)
126+func am () = "%s__shutdown"
143127
144128
145-func aw () = "%s__shutdown"
129+func an (ao) = ("%s%s__poolWeight__" + ao)
146130
147131
148-func ax (ay) = ("%s%s__poolWeight__" + ay)
132+func ap () = "%s__allowedLpScriptHash"
149133
150134
151-func az () = "%s__allowedLpScriptHash"
135+let aq = "%s__feeCollectorAddress"
136+
137+func ar (as,at,au) = throw(((((("order validation failed: orderValid=" + toString(as)) + " senderValid=") + toString(at)) + " matcherValid=") + toString(au)))
152138
153139
154-let aA = "%s__feeCollectorAddress"
155-
156-func aB (aC,aD,aE,aF) = throw((((((((("order validation failed: orderValid=" + toString(aC)) + " (") + aD) + ")") + " senderValid=") + toString(aE)) + " matcherValid=") + toString(aF)))
140+func av (aw,ax) = valueOrErrorMessage(getString(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " is not defined"], ""))
157141
158142
159-func aG (aH,aI) = valueOrErrorMessage(getString(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " is not defined"], ""))
143+func ay (aw,ax) = valueOrErrorMessage(getInteger(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " is not defined"], ""))
160144
161145
162-func aJ (aH,aI) = valueOrErrorMessage(getInteger(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " is not defined"], ""))
146+func az (aA) = throw(makeString(["lp.ride:", aA], " "))
163147
164148
165-func aK (aL) = throw(makeString(["lp.ride:", aL], " "))
149+let aB = addressFromStringValue(av(this, Q()))
150+
151+let aC = addressFromStringValue(av(aB, aq))
152+
153+let aD = {
154+ let aE = invoke(aB, "getInFeeREADONLY", [toString(this)], nil)
155+ if ($isInstanceOf(aE, "Int"))
156+ then aE
157+ else throw(($getType(aE) + " couldn't be cast to Int"))
158+ }
159+
160+let aF = {
161+ let aE = invoke(aB, "getOutFeeREADONLY", [toString(this)], nil)
162+ if ($isInstanceOf(aE, "Int"))
163+ then aE
164+ else throw(($getType(aE) + " couldn't be cast to Int"))
165+ }
166+
167+func aG () = valueOrElse(getBoolean(aB, am()), false)
166168
167169
168-func aM (aL) = makeString(["lp.ride:", aL], " ")
170+func aH () = fromBase58String(av(aB, ae()))
169171
170172
171-let aN = addressFromStringValue(aG(this, S()))
172-
173-let aO = addressFromStringValue(aG(aN, aA))
174-
175-let aP = {
176- let aQ = invoke(aN, "getInFeeREADONLY", [toString(this)], nil)
177- if ($isInstanceOf(aQ, "Int"))
178- then aQ
179- else throw(($getType(aQ) + " couldn't be cast to Int"))
180- }
181-
182-let aR = {
183- let aQ = invoke(aN, "getOutFeeREADONLY", [toString(this)], nil)
184- if ($isInstanceOf(aQ, "Int"))
185- then aQ
186- else throw(($getType(aQ) + " couldn't be cast to Int"))
187- }
188-
189-func aS () = valueOrElse(getBoolean(aN, aw()), false)
190-
191-
192-func aT () = fromBase58String(aG(aN, ao()))
193-
194-
195-func aU () = {
196- let aV = aG(this, ad())
197- let aW = aG(this, ae())
198- let at = aJ(aN, au(aW))
199- let as = aJ(aN, au(aV))
200- split(aG(aN, ar(toString(as), toString(at))), j)
173+func aI () = {
174+ let aJ = av(this, ab())
175+ let aK = av(this, ac())
176+ let aj = ay(aB, ak(aK))
177+ let ai = ay(aB, ak(aJ))
178+ split(av(aB, ah(toString(ai), toString(aj))), j)
201179 }
202180
203181
204-func aX (aY) = if ((aY == i))
182+func aL (aM) = if ((aM == i))
205183 then unit
206- else fromBase58String(aY)
184+ else fromBase58String(aM)
207185
208186
209-func aZ (aY) = if ((aY == unit))
187+func aN (aM) = if ((aM == unit))
210188 then i
211- else toBase58String(value(aY))
189+ else toBase58String(value(aM))
212190
213191
214-func ba (bb) = $Tuple7(addressFromStringValue(bb[o]), parseIntValue(bb[p]), fromBase58String(bb[q]), aX(bb[r]), aX(bb[s]), parseIntValue(bb[t]), parseIntValue(bb[u]))
192+func aO (aP) = $Tuple7(addressFromStringValue(aP[o]), parseIntValue(aP[p]), fromBase58String(aP[q]), aL(aP[r]), aL(aP[s]), parseIntValue(aP[t]), parseIntValue(aP[u]))
215193
216194
217-let bc = ba(aU())
195+let aQ = aO(aI())
218196
219-let bd = bc
197+let aR = aQ
220198
221-let be = bd._1
199+let aS = aR._1
222200
223-let bf = bd._2
201+let aT = aR._2
224202
225-let bg = bd._3
203+let aU = aR._3
226204
227-let bh = bd._4
205+let aV = aR._4
228206
229-let bi = bd._5
207+let aW = aR._5
230208
231-let bj = bd._6
209+let aX = aR._6
232210
233-let bk = bd._7
211+let aY = aR._7
234212
235-func bl () = split(aG(aN, an()), j)
213+func aZ () = split(av(aB, ad()), j)
236214
237215
238-let bm = valueOrErrorMessage(addressFromString(bl()[B]), "incorrect staking address")
216+let ba = valueOrErrorMessage(addressFromString(aZ()[B]), "incorrect staking address")
239217
240-let bn = valueOrErrorMessage(addressFromString(bl()[C]), "incorrect staking address")
218+let bb = valueOrErrorMessage(addressFromString(aZ()[C]), "incorrect staking address")
241219
242-func bo (bp,bq,br,bs,bt,bu,bv,bw,bx,by) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bp), toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by)], j)
220+func bc (bd,be,bf,bg,bh,bi,bj,bk,bl,bm) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl), toString(bm)], j)
243221
244222
245-func bz (bA,bB,bC,bs,bv,bw) = makeString(["%d%d%d%d%d%d", toString(bA), toString(bB), toString(bC), toString(bs), toString(bv), toString(bw)], j)
223+func bn (bo,bp,bq,bg,bj,bk) = makeString(["%d%d%d%d%d%d", toString(bo), toString(bp), toString(bq), toString(bg), toString(bj), toString(bk)], j)
246224
247225
248-func bD (bE) = if ((bE == "WAVES"))
226+func br (bs) = if ((bs == "WAVES"))
249227 then wavesBalance(this).available
250- else assetBalance(this, fromBase58String(bE))
228+ else assetBalance(this, fromBase58String(bs))
251229
252230
253-func bF (bG,bH) = fraction(bG, d, bH)
231+func bt (bu,bv) = fraction(bu, d, bv)
254232
255233
256-func bI (bG,bH,L) = fraction(bG, d, bH, L)
257-
258-
259-func bJ (bK,bL,bM,bN) = {
260- let bO = D(bM, bK)
261- let bP = D(bN, bL)
262- bF(bP, bO)
234+func bw (bx,by,bz,bA) = {
235+ let bB = D(bz, bx)
236+ let bC = D(bA, by)
237+ bt(bC, bB)
263238 }
264239
265240
266-func bQ (bM,bN,bR) = {
267- let bS = aU()
268- let bT = parseIntValue(bS[t])
269- let bU = parseIntValue(bS[u])
270- let bV = bJ(bT, bU, bM, bN)
271- let bH = D(bM, bT)
272- let bG = D(bN, bU)
273- let bW = D(bR, b)
274- let bX = bF(bH, bW)
275- let bY = bF(bG, bW)
276-[bV, bX, bY]
241+func bD (bz,bA,bE) = {
242+ let bF = aI()
243+ let bG = parseIntValue(bF[t])
244+ let bH = parseIntValue(bF[u])
245+ let bI = bw(bG, bH, bz, bA)
246+ let bv = D(bz, bG)
247+ let bu = D(bA, bH)
248+ let bJ = D(bE, b)
249+ let bK = bt(bv, bJ)
250+ let bL = bt(bu, bJ)
251+[bI, bK, bL]
277252 }
278253
279254
280-func bZ (bM,bN,bR) = {
281- let ca = bQ(bM, bN, bR)
282-[H(ca[0], b), H(ca[1], b), H(ca[2], b)]
255+func bM (bz,bA,bE) = {
256+ let bN = bD(bz, bA, bE)
257+[G(bN[0], b), G(bN[1], b), G(bN[2], b)]
283258 }
284259
285260
286-func cb (cc,cd,ce,aa) = {
287- let bS = aU()
288- let cf = bS[q]
289- let cg = bS[r]
290- let ch = bS[s]
291- let bK = parseIntValue(bS[t])
292- let bL = parseIntValue(bS[u])
293- let ci = bS[p]
294- let cj = valueOrErrorMessage(assetInfo(fromBase58String(cf)), (("Asset " + cf) + " doesn't exist")).quantity
295- if ((cf != cd))
261+func bO (bP,bQ,bR,Y) = {
262+ let bF = aI()
263+ let bS = bF[q]
264+ let bT = bF[r]
265+ let bU = bF[s]
266+ let bx = parseIntValue(bF[t])
267+ let by = parseIntValue(bF[u])
268+ let bV = bF[p]
269+ let bW = valueOrErrorMessage(assetInfo(fromBase58String(bS)), (("Asset " + bS) + " doesn't exist")).quantity
270+ if ((bS != bQ))
296271 then throw("Invalid asset passed.")
297272 else {
298- let ck = bD(cg)
299- let cl = D(ck, bK)
300- let cm = bD(ch)
301- let cn = D(cm, bL)
302- let co = bF(cn, cl)
303- let cp = H(co, b)
304- let cq = D(ce, b)
305- let cr = D(cj, b)
306- let cs = fraction(cl, cq, cr)
307- let ct = fraction(cn, cq, cr)
308- let cu = K(cs, bK, FLOOR)
309- let cv = K(ct, bL, FLOOR)
310- let cw = if ((cc == ""))
273+ let bX = br(bT)
274+ let bY = D(bX, bx)
275+ let bZ = br(bU)
276+ let ca = D(bZ, by)
277+ let cb = bt(ca, bY)
278+ let cc = G(cb, b)
279+ let cd = D(bR, b)
280+ let ce = D(bW, b)
281+ let cf = fraction(bY, cd, ce)
282+ let cg = fraction(ca, cd, ce)
283+ let ch = G(cf, bx)
284+ let ci = G(cg, by)
285+ let cj = if ((bP == ""))
311286 then nil
312- else [ScriptTransfer(aa, cu, if ((cg == "WAVES"))
287+ else [ScriptTransfer(Y, ch, if ((bT == "WAVES"))
313288 then unit
314- else fromBase58String(cg)), ScriptTransfer(aa, cv, if ((ch == "WAVES"))
289+ else fromBase58String(bT)), ScriptTransfer(Y, ci, if ((bU == "WAVES"))
315290 then unit
316- else fromBase58String(ch)), StringEntry(ac(toString(aa), cc), bz(cu, cv, ce, cp, height, lastBlock.timestamp)), IntegerEntry(V(), cp), IntegerEntry(W(height, lastBlock.timestamp), cp)]
317- $Tuple10(cu, cv, cg, ch, ck, cm, cj, co, ci, cw)
291+ else fromBase58String(bU)), StringEntry(aa(toString(Y), bP), bn(ch, ci, bR, cc, height, lastBlock.timestamp)), IntegerEntry(T(), cc), IntegerEntry(U(height, lastBlock.timestamp), cc)]
292+ $Tuple10(ch, ci, bT, bU, bX, bZ, bW, cb, bV, cj)
318293 }
319294 }
320295
321296
322-func cx (cc,cy,cz,cA,cB,cC,aa,cD,cE) = {
323- let bS = aU()
324- let cf = fromBase58String(bS[q])
325- let cF = bS[r]
326- let cG = bS[s]
327- let cH = bS[v]
328- let cI = bS[w]
329- let bT = parseIntValue(bS[t])
330- let bU = parseIntValue(bS[u])
331- let ci = bS[p]
332- let cj = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
333- let cJ = toBase58String(valueOrElse(cA, fromBase58String("WAVES")))
334- let cK = toBase58String(valueOrElse(cC, fromBase58String("WAVES")))
335- if (if ((cF != cJ))
297+func ck (bP,cl,cm,cn,co,cp,Y,cq,cr) = {
298+ let bF = aI()
299+ let bS = fromBase58String(bF[q])
300+ let cs = bF[r]
301+ let ct = bF[s]
302+ let cu = bF[v]
303+ let cv = bF[w]
304+ let bG = parseIntValue(bF[t])
305+ let bH = parseIntValue(bF[u])
306+ let bV = bF[p]
307+ let bW = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
308+ let cw = toBase58String(valueOrElse(cn, fromBase58String("WAVES")))
309+ let cx = toBase58String(valueOrElse(cp, fromBase58String("WAVES")))
310+ if (if ((cs != cw))
336311 then true
337- else (cG != cK))
312+ else (ct != cx))
338313 then throw("Invalid amt or price asset passed.")
339314 else {
340- let ck = if (cD)
341- then bD(cF)
342- else (bD(cF) - cz)
343- let cm = if (cD)
344- then bD(cG)
345- else (bD(cG) - cB)
346- let cL = D(cz, bT)
347- let cM = D(cB, bU)
348- let cN = bF(cM, cL)
349- let cl = D(ck, bT)
350- let cn = D(cm, bU)
351- let cO = if ((cj == 0))
315+ let bX = if (cq)
316+ then br(cs)
317+ else (br(cs) - cm)
318+ let bZ = if (cq)
319+ then br(ct)
320+ else (br(ct) - co)
321+ let cy = D(cm, bG)
322+ let cz = D(co, bH)
323+ let cA = bt(cz, cy)
324+ let bY = D(bX, bG)
325+ let ca = D(bZ, bH)
326+ let cB = if ((bW == 0))
352327 then {
353- let co = e
354- let cP = e
355- let bW = pow((cL * cM), 0, toBigInt(5), 1, 0, DOWN)
356- $Tuple5(H(bW, b), H(cL, bT), H(cM, bU), bF((cn + cM), (cl + cL)), cP)
328+ let cb = e
329+ let cC = e
330+ let bJ = pow((cy * cz), 0, toBigInt(5), 1, 0, DOWN)
331+ $Tuple5(G(bJ, b), G(cy, bG), G(cz, bH), bt((ca + cz), (bY + cy)), cC)
357332 }
358333 else {
359- let co = bF(cn, cl)
360- let cP = fraction(R((co - cN)), d, co)
361- let cQ = D(cy, b)
362- if (if ((co != e))
363- then (cP > cQ)
334+ let cb = bt(ca, bY)
335+ let cC = fraction(O((cb - cA)), d, cb)
336+ let cD = D(cl, b)
337+ if (if ((cb != e))
338+ then (cC > cD)
364339 else false)
365- then throw(((("Price slippage " + toString(cP)) + " exceeded the passed limit of ") + toString(cQ)))
340+ then throw(((("Price slippage " + toString(cC)) + " exceeded the passed limit of ") + toString(cD)))
366341 else {
367- let cr = D(cj, b)
368- let cR = fraction(cL, bI(cn, cl, CEILING), d, CEILING)
369- let cS = fraction(cM, d, bI(cn, cl, FLOOR), CEILING)
370- let cT = if ((cR > cM))
371- then $Tuple2(cS, cM)
372- else $Tuple2(cL, cR)
373- let cU = cT._1
374- let cV = cT._2
375- let bW = fraction(cr, cV, cn, FLOOR)
376- $Tuple5(K(bW, b, FLOOR), K(cU, bT, CEILING), K(cV, bU, CEILING), co, cP)
342+ let ce = D(bW, b)
343+ let cE = fraction(cy, cb, d)
344+ let cF = fraction(cz, d, cb)
345+ let cG = if ((cE > cz))
346+ then $Tuple2(cF, cz)
347+ else $Tuple2(cy, cE)
348+ let cH = cG._1
349+ let cI = cG._2
350+ let bJ = fraction(ce, cI, ca)
351+ $Tuple5(G(bJ, b), G(cH, bG), G(cI, bH), cb, cC)
377352 }
378353 }
379- let cW = cO._1
380- let cX = cO._2
381- let cY = cO._3
382- let cp = H(cO._4, b)
383- let cZ = H(cO._5, b)
384- if ((0 >= cW))
354+ let cJ = cB._1
355+ let cK = cB._2
356+ let cL = cB._3
357+ let cc = G(cB._4, b)
358+ let cM = G(cB._5, b)
359+ if ((0 >= cJ))
385360 then throw("Invalid calculations. LP calculated is less than zero.")
386361 else {
387- let da = if (!(cE))
362+ let cN = if (!(cr))
388363 then 0
389- else cW
390- let db = (cz - cX)
391- let dc = (cB - cY)
392- let dd = [IntegerEntry(V(), cp), IntegerEntry(W(height, lastBlock.timestamp), cp), StringEntry(Z(aa, cc), bo(cX, cY, da, cp, cy, cZ, height, lastBlock.timestamp, db, dc))]
393- $Tuple13(cW, da, cp, ck, cm, cj, cf, ci, dd, db, dc, cA, cC)
364+ else cJ
365+ let cO = (cm - cK)
366+ let cP = (co - cL)
367+ let cQ = [IntegerEntry(T(), cc), IntegerEntry(U(height, lastBlock.timestamp), cc), StringEntry(X(Y, bP), bc(cK, cL, cN, cc, cl, cM, height, lastBlock.timestamp, cO, cP))]
368+ $Tuple13(cJ, cN, cc, bX, bZ, bW, bS, bV, cQ, cO, cP, cn, cp)
394369 }
395370 }
396371 }
397372
398373
399-func de (df,dg,cj) = {
400- let dh = G(df, toBigInt(bj))
401- let di = G(dg, toBigInt(bk))
402- let dj = fraction(pow((dh * di), 0, toBigInt(5), 1, 18, DOWN), g, cj)
403- if ((cj == f))
404- then f
405- else dj
374+func cR (cS) = {
375+ let bF = aI()
376+ let cT = bF[r]
377+ let cU = bF[s]
378+ let bV = parseIntValue(bF[p])
379+ let bG = parseIntValue(bF[t])
380+ let bH = parseIntValue(bF[u])
381+ let cV = br(cT)
382+ let cW = br(cU)
383+ let cb = if ((cS.orderType == Buy))
384+ then bw(bG, bH, (cV + cS.amount), cW)
385+ else bw(bG, bH, (cV - cS.amount), cW)
386+ let cc = G(cb, b)
387+ if (if (if (aG())
388+ then true
389+ else (bV == m))
390+ then true
391+ else (bV == n))
392+ then throw("Exchange operations disabled")
393+ else {
394+ let cX = cS.assetPair.amountAsset
395+ let cY = if ((cX == unit))
396+ then "WAVES"
397+ else toBase58String(value(cX))
398+ let cZ = cS.assetPair.priceAsset
399+ let da = if ((cZ == unit))
400+ then "WAVES"
401+ else toBase58String(value(cZ))
402+ if (if ((cY != cT))
403+ then true
404+ else (da != cU))
405+ then throw("Wrong order assets.")
406+ else {
407+ let db = cS.price
408+ let dc = fraction(b, bH, bG)
409+ let dd = J(db, b, dc)
410+ let de = if ((cS.orderType == Buy))
411+ then (cc >= dd)
412+ else (dd >= cc)
413+ true
414+ }
415+ }
406416 }
407417
408418
409-func dk (dl,dm,dn) = {
410- let do = (toBigInt(bD(aZ(bh))) - dl)
411- let dp = (toBigInt(bD(aZ(bi))) - dm)
412- let dq = (toBigInt(value(assetInfo(bg)).quantity) - dn)
413- let dr = de(do, dp, dq)
414- dr
415- }
416-
417-
418-func ds (dt,du,dn) = {
419- let do = (bD(aZ(bh)) + dt)
420- let dp = (bD(aZ(bi)) + du)
421- let dq = (value(assetInfo(bg)).quantity + dn)
422- let dj = de(toBigInt(do), toBigInt(dp), toBigInt(dq))
423- let dv = [IntegerEntry(aj, height), StringEntry(ai, toString(dj))]
424- $Tuple2(dv, dj)
425- }
426-
427-
428-func dw (dx,dj) = if ((dj >= dx))
429- then true
430- else aK(makeString(["updated KLp lower than current KLp", toString(dx), toString(dj)], " "))
431-
432-
433-func dy (dz) = {
434- let do = bD(aZ(bh))
435- let dp = bD(aZ(bi))
436- let dA = dz.amount
437- let dB = fraction(dz.amount, dz.price, b, FLOOR)
438- let dC = if ((dz.orderType == Buy))
439- then $Tuple2(dA, -(dB))
440- else $Tuple2(-(dA), dB)
441- let dt = dC._1
442- let du = dC._2
443- if (if (if (aS())
444- then true
445- else (bf == m))
446- then true
447- else (bf == n))
448- then throw("Exchange operations disabled")
449- else if (if ((dz.assetPair.amountAsset != bh))
450- then true
451- else (dz.assetPair.priceAsset != bi))
452- then throw("Wrong order assets.")
453- else {
454- let dD = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ai), "0")), aM("invalid kLp"))
455- let dE = ds(dt, du, 0)
456- let dF = dE._1
457- let dG = dE._2
458- let dH = (dG >= dD)
459- let dI = makeString(["kLp=", toString(dD), " kLpNew=", toString(dG), " amountAssetBalance=", toString(do), " priceAssetBalance=", toString(dp), " amountAssetBalanceDelta=", toString(dt), " priceAssetBalanceDelta=", toString(du)], "")
460- $Tuple2(dH, dI)
461- }
462- }
463-
464-
465-func dJ (dK) = if ((size(dK.payments) != 1))
419+func df (dg) = if ((size(dg.payments) != 1))
466420 then throw("exactly 1 payment is expected")
467421 else {
468- let dL = value(dK.payments[0])
469- let cd = value(dL.assetId)
470- let dM = dL.amount
471- let cO = cb(toBase58String(dK.transactionId), toBase58String(cd), dM, dK.caller)
472- let cu = cO._1
473- let cv = cO._2
474- let ci = parseIntValue(cO._9)
475- let cw = cO._10
476- if (if (aS())
422+ let dh = value(dg.payments[0])
423+ let bQ = value(dh.assetId)
424+ let di = dh.amount
425+ let cB = bO(toBase58String(dg.transactionId), toBase58String(bQ), di, dg.caller)
426+ let ch = cB._1
427+ let ci = cB._2
428+ let bV = parseIntValue(cB._9)
429+ let cj = cB._10
430+ if (if (aG())
477431 then true
478- else (ci == n))
479- then throw(("Get operation is blocked by admin. Status = " + toString(ci)))
480- else $Tuple5(cu, cv, dM, cd, cw)
432+ else (bV == n))
433+ then throw(("Get operation is blocked by admin. Status = " + toString(bV)))
434+ else $Tuple5(ch, ci, di, bQ, cj)
481435 }
482436
483437
484-func dN (dK,cy,cE) = if ((size(dK.payments) != 2))
438+func dj (dg,cl,cr) = if ((size(dg.payments) != 2))
485439 then throw("exactly 2 payments are expected")
486440 else {
487- let dO = value(dK.payments[0])
488- let dP = value(dK.payments[1])
489- let dQ = cx(toBase58String(dK.transactionId), cy, dO.amount, dO.assetId, dP.amount, dP.assetId, toString(dK.caller), false, cE)
490- let ci = parseIntValue(dQ._8)
491- if (if (if (aS())
441+ let dk = value(dg.payments[0])
442+ let dl = value(dg.payments[1])
443+ let dm = ck(toBase58String(dg.transactionId), cl, dk.amount, dk.assetId, dl.amount, dl.assetId, toString(dg.caller), false, cr)
444+ let bV = parseIntValue(dm._8)
445+ if (if (if (aG())
492446 then true
493- else (ci == l))
447+ else (bV == l))
494448 then true
495- else (ci == n))
496- then throw(("Put operation is blocked by admin. Status = " + toString(ci)))
497- else dQ
449+ else (bV == n))
450+ then throw(("Put operation is blocked by admin. Status = " + toString(bV)))
451+ else dm
498452 }
499453
500454
501-func dR (dS) = {
502- let dT = invoke(aN, "emit", [dS], nil)
503- if ((dT == dT))
455+func dn (do) = {
456+ let dp = invoke(aB, "emit", [do], nil)
457+ if ((dp == dp))
504458 then {
505- let dU = {
506- let dV = dT
507- if ($isInstanceOf(dV, "Address"))
459+ let dq = {
460+ let dr = dp
461+ if ($isInstanceOf(dr, "Address"))
508462 then {
509- let dW = dV
510- invoke(dW, "emit", [dS], nil)
463+ let ds = dr
464+ invoke(ds, "emit", [do], nil)
511465 }
512466 else unit
513467 }
514- if ((dU == dU))
515- then dS
468+ if ((dq == dq))
469+ then do
516470 else throw("Strict value is not equal to itself.")
517471 }
518472 else throw("Strict value is not equal to itself.")
519473 }
520474
521475
522-func dX (dS,ah) = {
523- let dY = if ((ah == 0))
476+func dt (do,du) = {
477+ let dv = if ((du == 0))
524478 then 0
525- else fraction(dS, ah, b)
526- $Tuple2((dS - dY), dY)
479+ else fraction(do, du, b)
480+ $Tuple2((do - dv), dv)
527481 }
528482
529483
530-func dZ (ea,eb,aa,ab) = {
531- let ec = (ab == unit)
532- let ed = bD(aZ(bh))
533- let ee = bD(aZ(bi))
534- let ef = if ((eb == bh))
484+func dw (dx,dy,Y,Z) = {
485+ let dz = (Z == unit)
486+ let dA = br(aN(aV))
487+ let dB = br(aN(aW))
488+ let dC = if ((dy == aV))
535489 then true
536- else if ((eb == bi))
490+ else if ((dy == aW))
537491 then false
538- else aK("invalid asset")
539- let eg = if (ec)
540- then $Tuple2(ed, ee)
541- else if (ef)
542- then $Tuple2((ed - ea), ee)
543- else $Tuple2(ed, (ee - ea))
544- let eh = eg._1
545- let ei = eg._2
546- let ej = if (ef)
547- then $Tuple2(ea, 0)
548- else $Tuple2(0, ea)
549- let ek = ej._1
550- let el = ej._2
551- let dA = dX(ek, aP)._1
552- let dB = dX(el, aP)._1
553- let em = dX(ea, aP)
554- let en = em._1
555- let dY = em._2
556- let eo = (eh + dA)
557- let ep = (ei + dB)
558- let eq = bF(D(ep, bk), D(eo, bj))
559- let er = H(eq, b)
560- let es = if (ef)
561- then eh
562- else ei
563- let et = toBigInt(es)
564- let eu = toBigInt(valueOrErrorMessage(assetInfo(bg), (("asset " + toBase58String(bg)) + " doesn't exist")).quantity)
565- let ev = if ((eu > f))
492+ else az("invalid asset")
493+ let dD = if (dz)
494+ then $Tuple2(dA, dB)
495+ else if (dC)
496+ then $Tuple2((dA - dx), dB)
497+ else $Tuple2(dA, (dB - dx))
498+ let dE = dD._1
499+ let dF = dD._2
500+ let dG = if (dC)
501+ then $Tuple2(dx, 0)
502+ else $Tuple2(0, dx)
503+ let dH = dG._1
504+ let dI = dG._2
505+ let dJ = dt(dH, aD)._1
506+ let dK = dt(dI, aD)._1
507+ let dL = dt(dx, aD)
508+ let dM = dL._1
509+ let dv = dL._2
510+ let dN = (dE + dJ)
511+ let dO = (dF + dK)
512+ let dP = bt(D(dO, aY), D(dN, aX))
513+ let dQ = G(dP, b)
514+ let dR = if (dC)
515+ then dE
516+ else dF
517+ let dS = toBigInt(dR)
518+ let dT = toBigInt(valueOrErrorMessage(assetInfo(aU), (("asset " + toBase58String(aU)) + " doesn't exist")).quantity)
519+ let dU = if ((dT > f))
566520 then true
567- else aK("initial deposit requires all coins")
568- if ((ev == ev))
521+ else az("initial deposit requires all coins")
522+ if ((dU == dU))
569523 then {
570- let ew = toBigInt(en)
571- let ex = max([0, toInt(((eu * (sqrtBigInt((d + ((ew * d) / et)), 18, 18, DOWN) - d)) / d))])
572- let dd = if (ec)
524+ let dV = toBigInt(dM)
525+ let dW = max([0, toInt(((dT * (sqrtBigInt((d + ((dV * d) / dS)), 18, 18, DOWN) - d)) / d))])
526+ let cQ = if (dz)
573527 then nil
574- else [IntegerEntry(V(), er), IntegerEntry(W(height, lastBlock.timestamp), er), StringEntry(Z(toString(value(aa)), toBase58String(value(ab))), bo(ek, el, ex, er, 0, 0, height, lastBlock.timestamp, 0, 0))]
575- let ey = bF(D(ei, bk), D(eh, bj))
576- let ez = H(ey, b)
577- let eA = {
578- let eB = if (ef)
579- then $Tuple2(ek, eh)
580- else $Tuple2(el, ei)
581- let dS = eB._1
582- let eC = eB._2
583- let eD = toInt(fraction(eu, toBigInt((dS / 2)), toBigInt(eC)))
584- fraction((ex - eD), b, eD)
528+ else [IntegerEntry(T(), dQ), IntegerEntry(U(height, lastBlock.timestamp), dQ), StringEntry(X(toString(value(Y)), toBase58String(value(Z))), bc(dH, dI, dW, dQ, 0, 0, height, lastBlock.timestamp, 0, 0))]
529+ let dX = bt(D(dF, aY), D(dE, aX))
530+ let dY = G(dX, b)
531+ let dZ = {
532+ let ea = if (dC)
533+ then $Tuple2(dH, dE)
534+ else $Tuple2(dI, dF)
535+ let do = ea._1
536+ let eb = ea._2
537+ let ec = toInt(fraction(dT, toBigInt((do / 2)), toBigInt(eb)))
538+ fraction((dW - ec), b, ec)
585539 }
586- $Tuple5(ex, dd, dY, eA, ef)
540+ $Tuple4(dW, cQ, dv, dZ)
587541 }
588542 else throw("Strict value is not equal to itself.")
589543 }
590544
591545
592-func eE (eF,en,eb,aa,ab) = {
593- let ec = (ab == unit)
594- let bS = aU()
595- let bT = parseIntValue(bS[t])
596- let bU = parseIntValue(bS[u])
597- let eG = [if ((eb == bg))
546+func ed (ee,dM,dy,Y,Z) = {
547+ let dz = (Z == unit)
548+ let ef = [if ((dy == aU))
598549 then true
599- else aK("invalid lp asset")]
600- if ((eG == eG))
550+ else az("invalid lp asset")]
551+ if ((ef == ef))
601552 then {
602- let eH = if ((eF == bh))
553+ let eg = if ((ee == aV))
603554 then true
604- else if ((eF == bi))
555+ else if ((ee == aW))
605556 then false
606- else aK("invalid asset")
607- let eI = if (eH)
608- then toBigInt(bD(aZ(bh)))
609- else toBigInt(bD(aZ(bi)))
610- let eJ = if (eH)
611- then bT
612- else bU
613- let eK = bD(aZ(bh))
614- let eL = bD(aZ(bi))
615- let eM = if (eH)
616- then eK
617- else eL
618- let eN = toBigInt(eM)
619- let eu = toBigInt(valueOrErrorMessage(assetInfo(bg), (("asset " + toBase58String(bg)) + " doesn't exist")).quantity)
620- let eO = toBigInt(en)
621- let eP = max([0, toInt(((eI * (d - pow((d - ((eO * d) / eu)), 18, h, 0, 18, DOWN))) / d))])
622- let eQ = dX(eP, aR)
623- let eR = eQ._1
624- let dY = eQ._2
625- let eS = if (eH)
626- then $Tuple4(eR, 0, (eK - eP), eL)
627- else $Tuple4(0, eR, eK, (eL - eP))
628- let eT = eS._1
629- let eU = eS._2
630- let eV = eS._3
631- let eW = eS._4
632- let eq = bF(D(eW, bk), D(eV, bj))
633- let er = H(eq, b)
634- let dd = if (ec)
557+ else az("invalid asset")
558+ let eh = if (eg)
559+ then toBigInt(br(aN(aV)))
560+ else toBigInt(br(aN(aW)))
561+ let ei = br(aN(aV))
562+ let ej = br(aN(aW))
563+ let ek = if (eg)
564+ then ei
565+ else ej
566+ let el = toBigInt(ek)
567+ let dT = toBigInt(valueOrErrorMessage(assetInfo(aU), (("asset " + toBase58String(aU)) + " doesn't exist")).quantity)
568+ let em = toBigInt(dM)
569+ let en = max([0, toInt(((eh * (d - pow((d - ((em * d) / dT)), 18, h, 0, 18, DOWN))) / d))])
570+ let eo = dt(en, aF)
571+ let ep = eo._1
572+ let dv = eo._2
573+ let eq = if (eg)
574+ then $Tuple4(ep, 0, (ei - en), ej)
575+ else $Tuple4(0, ep, ei, (ej - en))
576+ let er = eq._1
577+ let es = eq._2
578+ let et = eq._3
579+ let eu = eq._4
580+ let dP = bt(D(eu, aY), D(et, aX))
581+ let dQ = G(dP, b)
582+ let cQ = if (dz)
635583 then nil
636- else [StringEntry(ac(toString(value(aa)), toBase58String(value(ab))), bz(eT, eU, en, er, height, lastBlock.timestamp)), IntegerEntry(V(), er), IntegerEntry(W(height, lastBlock.timestamp), er)]
637- let ey = bF(D(eL, bk), D(eK, bj))
638- let ez = H(ey, b)
639- let eA = {
640- let eX = (toInt(fraction(eI, eO, eu)) * 2)
641- fraction((eR - eX), b, eX)
584+ else [StringEntry(aa(toString(value(Y)), toBase58String(value(Z))), bn(er, es, dM, dQ, height, lastBlock.timestamp)), IntegerEntry(T(), dQ), IntegerEntry(U(height, lastBlock.timestamp), dQ)]
585+ let dX = bt(D(ej, aY), D(ei, aX))
586+ let dY = G(dX, b)
587+ let dZ = {
588+ let ev = (toInt(fraction(eh, em, dT)) * 2)
589+ fraction((ep - ev), b, ev)
642590 }
643- $Tuple5(eR, dd, dY, eA, eH)
591+ $Tuple4(ep, cQ, dv, dZ)
644592 }
645593 else throw("Strict value is not equal to itself.")
646594 }
647595
648596
649-func eY () = {
650- let dV = getString(T())
651- if ($isInstanceOf(dV, "String"))
597+func ew () = {
598+ let dr = getString(R())
599+ if ($isInstanceOf(dr, "String"))
652600 then {
653- let eZ = dV
654- fromBase58String(eZ)
601+ let ex = dr
602+ fromBase58String(ex)
655603 }
656- else if ($isInstanceOf(dV, "Unit"))
604+ else if ($isInstanceOf(dr, "Unit"))
657605 then unit
658606 else throw("Match error")
659607 }
660608
661609
662-func fa () = {
663- let dV = getString(U())
664- if ($isInstanceOf(dV, "String"))
610+func ey () = {
611+ let dr = getString(S())
612+ if ($isInstanceOf(dr, "String"))
665613 then {
666- let eZ = dV
667- fromBase58String(eZ)
614+ let ex = dr
615+ fromBase58String(ex)
668616 }
669- else if ($isInstanceOf(dV, "Unit"))
617+ else if ($isInstanceOf(dr, "Unit"))
670618 then unit
671619 else throw("Match error")
672620 }
673621
674622
675-func fb (dK) = {
676- let dV = eY()
677- if ($isInstanceOf(dV, "ByteVector"))
623+func ez (dg) = {
624+ let dr = ew()
625+ if ($isInstanceOf(dr, "ByteVector"))
678626 then {
679- let fc = dV
680- (dK.callerPublicKey == fc)
627+ let eA = dr
628+ (dg.callerPublicKey == eA)
681629 }
682- else if ($isInstanceOf(dV, "Unit"))
683- then (dK.caller == this)
630+ else if ($isInstanceOf(dr, "Unit"))
631+ then (dg.caller == this)
684632 else throw("Match error")
685633 }
686634
687635
688-func fd (dK) = {
689- let fe = throw("Permission denied")
690- let dV = eY()
691- if ($isInstanceOf(dV, "ByteVector"))
636+func eB (dg) = {
637+ let eC = throw("Permission denied")
638+ let dr = ew()
639+ if ($isInstanceOf(dr, "ByteVector"))
692640 then {
693- let fc = dV
694- if ((dK.callerPublicKey == fc))
641+ let eA = dr
642+ if ((dg.callerPublicKey == eA))
695643 then true
696- else fe
644+ else eC
697645 }
698- else if ($isInstanceOf(dV, "Unit"))
699- then if ((dK.caller == this))
646+ else if ($isInstanceOf(dr, "Unit"))
647+ then if ((dg.caller == this))
700648 then true
701- else fe
649+ else eC
702650 else throw("Match error")
703651 }
704652
705653
706-@Callable(dK)
707-func setManager (ff) = {
708- let fg = fd(dK)
709- if ((fg == fg))
654+@Callable(dg)
655+func calculateAmountOutForSwapREADONLY (eD,eE) = {
656+ let eF = if ((eE == false))
710657 then {
711- let fh = fromBase58String(ff)
712- if ((fh == fh))
713- then [StringEntry(U(), ff)]
658+ let eG = av(this, ac())
659+ let eH = av(this, ab())
660+ $Tuple2(eG, eH)
661+ }
662+ else {
663+ let eG = av(this, ab())
664+ let eH = av(this, ac())
665+ $Tuple2(eG, eH)
666+ }
667+ let eG = eF._1
668+ let eH = eF._2
669+ let eI = br(eH)
670+ let eJ = br(eG)
671+ let eK = ((eJ * eD) / (eI + eD))
672+ $Tuple2(nil, eK)
673+ }
674+
675+
676+
677+@Callable(dg)
678+func calculateAmountOutForSwapAndSendTokens (eD,eE,eL,eM) = {
679+ let ef = [if ((value(dg.payments[0]).amount >= eD))
680+ then true
681+ else az("Wrong amount"), if ((dg.caller == addressFromStringValue(av(this, P()))))
682+ then true
683+ else az("Permission denied")]
684+ if ((ef == ef))
685+ then {
686+ let dh = value(dg.payments[0])
687+ let eH = if ((dh.assetId == unit))
688+ then toBase58String(toBytes("WAVES"))
689+ else toBase58String(value(dh.assetId))
690+ let eG = if ((eE == false))
691+ then av(this, ac())
692+ else av(this, ab())
693+ let eI = (br(eH) - value(dg.payments[0]).amount)
694+ let eJ = br(eG)
695+ let eK = ((eJ * eD) / (eI + eD))
696+ let eN = if ((eK >= eL))
697+ then true
698+ else throw("Exchange result is fewer coins than expected")
699+ if ((eN == eN))
700+ then [ScriptTransfer(addressFromStringValue(eM), eK, if ((eH == "WAVES"))
701+ then unit
702+ else fromBase58String(eG))]
714703 else throw("Strict value is not equal to itself.")
715704 }
716705 else throw("Strict value is not equal to itself.")
718707
719708
720709
721-@Callable(dK)
722-func confirmManager () = {
723- let fi = fa()
724- let fj = if (isDefined(fi))
725- then true
726- else throw("No pending manager")
727- if ((fj == fj))
710+@Callable(dg)
711+func setManager (eO) = {
712+ let eP = eB(dg)
713+ if ((eP == eP))
728714 then {
729- let fk = if ((dK.callerPublicKey == value(fi)))
730- then true
731- else throw("You are not pending manager")
732- if ((fk == fk))
733- then [StringEntry(T(), toBase58String(value(fi))), DeleteEntry(U())]
715+ let eQ = fromBase58String(eO)
716+ if ((eQ == eQ))
717+ then [StringEntry(S(), eO)]
734718 else throw("Strict value is not equal to itself.")
735719 }
736720 else throw("Strict value is not equal to itself.")
738722
739723
740724
741-@Callable(dK)
742-func put (cy,fl) = if ((0 > cy))
725+@Callable(dg)
726+func confirmManager () = {
727+ let eR = ey()
728+ let eS = if (isDefined(eR))
729+ then true
730+ else throw("No pending manager")
731+ if ((eS == eS))
732+ then {
733+ let eT = if ((dg.callerPublicKey == value(eR)))
734+ then true
735+ else throw("You are not pending manager")
736+ if ((eT == eT))
737+ then [StringEntry(R(), toBase58String(value(eR))), DeleteEntry(S())]
738+ else throw("Strict value is not equal to itself.")
739+ }
740+ else throw("Strict value is not equal to itself.")
741+ }
742+
743+
744+
745+@Callable(dg)
746+func put (cl,eU) = if ((0 > cl))
743747 then throw("Invalid slippageTolerance passed")
744748 else {
745- let dQ = dN(dK, cy, true)
746- let da = dQ._2
747- let cf = dQ._7
748- let cw = dQ._9
749- let db = dQ._10
750- let dc = dQ._11
751- let fm = dQ._12
752- let fn = dQ._13
753- let dO = toBigInt(value(dK.payments[0]).amount)
754- let dP = toBigInt(value(dK.payments[1]).amount)
755- let dr = dk(dO, dP, toBigInt(0))
756- if ((dr == dr))
749+ let dm = dj(dg, cl, true)
750+ let cN = dm._2
751+ let bS = dm._7
752+ let cj = dm._9
753+ let cO = dm._10
754+ let cP = dm._11
755+ let eV = dm._12
756+ let eW = dm._13
757+ let dp = invoke(aB, "emit", [cN], nil)
758+ if ((dp == dp))
757759 then {
758- let dT = invoke(aN, "emit", [da], nil)
759- if ((dT == dT))
760+ let dq = {
761+ let dr = dp
762+ if ($isInstanceOf(dr, "Address"))
763+ then {
764+ let ds = dr
765+ invoke(ds, "emit", [cN], nil)
766+ }
767+ else unit
768+ }
769+ if ((dq == dq))
760770 then {
761- let dU = {
762- let dV = dT
763- if ($isInstanceOf(dV, "Address"))
764- then {
765- let dW = dV
766- invoke(dW, "emit", [da], nil)
767- }
768- else unit
769- }
770- if ((dU == dU))
771+ let eX = if ((cO > 0))
772+ then invoke(bb, "put", nil, [AttachedPayment(eV, cO)])
773+ else nil
774+ if ((eX == eX))
771775 then {
772- let fo = if ((db > 0))
773- then invoke(bn, "put", nil, [AttachedPayment(fm, db)])
776+ let eY = if ((cP > 0))
777+ then invoke(bb, "put", nil, [AttachedPayment(eW, cP)])
774778 else nil
775- if ((fo == fo))
779+ if ((eY == eY))
776780 then {
777- let fp = if ((dc > 0))
778- then invoke(bn, "put", nil, [AttachedPayment(fn, dc)])
779- else nil
780- if ((fp == fp))
781+ let eZ = if (eU)
781782 then {
782- let fq = if (fl)
783- then {
784- let fr = invoke(bm, "stake", nil, [AttachedPayment(cf, da)])
785- if ((fr == fr))
786- then nil
787- else throw("Strict value is not equal to itself.")
788- }
789- else [ScriptTransfer(dK.caller, da, cf)]
790- let fs = ds(0, 0, 0)
791- if ((fs == fs))
792- then {
793- let dj = fs._2
794- let ft = fs._1
795- let fu = dw(dr, dj)
796- if ((fu == fu))
797- then ((cw ++ fq) ++ ft)
798- else throw("Strict value is not equal to itself.")
799- }
783+ let fa = invoke(ba, "stake", nil, [AttachedPayment(bS, cN)])
784+ if ((fa == fa))
785+ then nil
800786 else throw("Strict value is not equal to itself.")
801787 }
802- else throw("Strict value is not equal to itself.")
788+ else [ScriptTransfer(dg.caller, cN, bS)]
789+ (cj ++ eZ)
803790 }
804791 else throw("Strict value is not equal to itself.")
805792 }
812799
813800
814801
815-@Callable(dK)
816-func putForFree (fv) = if ((0 > fv))
802+@Callable(dg)
803+func putForFree (fb) = if ((0 > fb))
817804 then throw("Invalid value passed")
818805 else {
819- let dQ = dN(dK, fv, false)
820- let cw = dQ._9
821- let dO = toBigInt(value(dK.payments[0]).amount)
822- let dP = toBigInt(value(dK.payments[1]).amount)
823- let dr = dk(dO, dP, toBigInt(0))
824- if ((dr == dr))
825- then {
826- let fw = ds(0, 0, 0)
827- let ft = fw._1
828- let dj = fw._2
829- let fu = dw(dr, dj)
830- if ((fu == fu))
831- then (cw ++ ft)
832- else throw("Strict value is not equal to itself.")
833- }
834- else throw("Strict value is not equal to itself.")
806+ let dm = dj(dg, fb, false)
807+ dm._9
835808 }
836809
837810
838811
839-@Callable(dK)
840-func putOneTkn (fx,fy) = {
841- let fz = {
842- let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
843- if ($isInstanceOf(aQ, "Boolean"))
844- then aQ
845- else throw(($getType(aQ) + " couldn't be cast to Boolean"))
812+@Callable(dg)
813+func putOneTkn (fc,fd) = {
814+ let fe = {
815+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
816+ if ($isInstanceOf(aE, "Boolean"))
817+ then aE
818+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
846819 }
847- let fA = if (if (if (aS())
820+ let ff = if (if (if (aG())
848821 then true
849- else (bf == l))
822+ else (aT == l))
850823 then true
851- else (bf == n))
824+ else (aT == n))
852825 then true
853- else fz
854- let eG = [if (if (!(fA))
826+ else fe
827+ let ef = [if (if (!(ff))
855828 then true
856- else fb(dK))
829+ else ez(dg))
857830 then true
858- else aK("put operation is blocked by admin"), if ((size(dK.payments) == 1))
831+ else az("put operation is blocked by admin"), if ((size(dg.payments) == 1))
859832 then true
860- else aK("exactly 1 payment are expected")]
861- if ((eG == eG))
833+ else az("exactly 1 payment are expected")]
834+ if ((ef == ef))
862835 then {
863- let fB = dK.payments[0]
864- let eb = fB.assetId
865- let ea = fB.amount
866- let dr = if ((eb == bh))
867- then dk(toBigInt(ea), toBigInt(0), toBigInt(0))
868- else if ((eb == bi))
869- then dk(toBigInt(0), toBigInt(ea), toBigInt(0))
870- else aK("payment asset is not supported")
871- if ((dr == dr))
836+ let fg = dg.payments[0]
837+ let dy = fg.assetId
838+ let dx = fg.amount
839+ let Y = dg.caller
840+ let Z = dg.transactionId
841+ let fh = dw(dx, dy, Y, Z)
842+ if ((fh == fh))
872843 then {
873- let aa = dK.caller
874- let ab = dK.transactionId
875- let fC = dZ(ea, eb, aa, ab)
876- if ((fC == fC))
844+ let fi = fh._4
845+ let dv = fh._3
846+ let cQ = fh._2
847+ let fj = fh._1
848+ let fk = if (if ((fc > 0))
849+ then (fc > fj)
850+ else false)
851+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
852+ else fj
853+ let dp = dn(fk)
854+ if ((dp == dp))
877855 then {
878- let ef = fC._5
879- let fD = fC._4
880- let dY = fC._3
881- let dd = fC._2
882- let fE = fC._1
883- let fF = if (if ((fx > 0))
884- then (fx > fE)
856+ let eZ = if (fd)
857+ then {
858+ let fl = invoke(ba, "stake", nil, [AttachedPayment(aU, fk)])
859+ if ((fl == fl))
860+ then nil
861+ else throw("Strict value is not equal to itself.")
862+ }
863+ else [ScriptTransfer(dg.caller, fk, aU)]
864+ let fm = if ((dv > 0))
865+ then [ScriptTransfer(aC, dv, dy)]
866+ else nil
867+ $Tuple2(((cQ ++ eZ) ++ fm), fk)
868+ }
869+ else throw("Strict value is not equal to itself.")
870+ }
871+ else throw("Strict value is not equal to itself.")
872+ }
873+ else throw("Strict value is not equal to itself.")
874+ }
875+
876+
877+
878+@Callable(dg)
879+func putOneTknREADONLY (dy,dx) = {
880+ let fn = dw(dx, aL(dy), unit, unit)
881+ let fj = fn._1
882+ let cQ = fn._2
883+ let dv = fn._3
884+ let fi = fn._4
885+ $Tuple2(nil, $Tuple3(fj, dv, fi))
886+ }
887+
888+
889+
890+@Callable(dg)
891+func getOneTkn (fo,fc) = {
892+ let fe = {
893+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
894+ if ($isInstanceOf(aE, "Boolean"))
895+ then aE
896+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
897+ }
898+ let fp = if (if (aG())
899+ then true
900+ else (aT == n))
901+ then true
902+ else fe
903+ let ef = [if (if (!(fp))
904+ then true
905+ else ez(dg))
906+ then true
907+ else az("get operation is blocked by admin"), if ((size(dg.payments) == 1))
908+ then true
909+ else az("exactly 1 payment are expected")]
910+ if ((ef == ef))
911+ then {
912+ let ee = aL(fo)
913+ let fg = dg.payments[0]
914+ let dy = fg.assetId
915+ let dM = fg.amount
916+ let Y = dg.caller
917+ let Z = dg.transactionId
918+ let fq = ed(ee, dM, dy, Y, Z)
919+ if ((fq == fq))
920+ then {
921+ let fi = fq._4
922+ let dv = fq._3
923+ let cQ = fq._2
924+ let fr = fq._1
925+ let do = if (if ((fc > 0))
926+ then (fc > fr)
927+ else false)
928+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
929+ else fr
930+ let fs = invoke(aB, "burn", [dM], [AttachedPayment(dy, dM)])
931+ if ((fs == fs))
932+ then {
933+ let ft = [ScriptTransfer(Y, do, ee)]
934+ let fm = if ((dv > 0))
935+ then [ScriptTransfer(aC, dv, ee)]
936+ else nil
937+ $Tuple2(((cQ ++ ft) ++ fm), do)
938+ }
939+ else throw("Strict value is not equal to itself.")
940+ }
941+ else throw("Strict value is not equal to itself.")
942+ }
943+ else throw("Strict value is not equal to itself.")
944+ }
945+
946+
947+
948+@Callable(dg)
949+func getOneTknREADONLY (ee,dM) = {
950+ let fu = ed(aL(ee), dM, aU, unit, unit)
951+ let fr = fu._1
952+ let cQ = fu._2
953+ let dv = fu._3
954+ let fi = fu._4
955+ $Tuple2(nil, $Tuple3(fr, dv, fi))
956+ }
957+
958+
959+
960+@Callable(dg)
961+func unstakeAndGetOneTkn (fv,fo,fc) = {
962+ let fe = {
963+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
964+ if ($isInstanceOf(aE, "Boolean"))
965+ then aE
966+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
967+ }
968+ let fp = if (if (aG())
969+ then true
970+ else (aT == n))
971+ then true
972+ else fe
973+ let ef = [if (if (!(fp))
974+ then true
975+ else ez(dg))
976+ then true
977+ else az("get operation is blocked by admin"), if ((size(dg.payments) == 0))
978+ then true
979+ else az("no payments are expected")]
980+ if ((ef == ef))
981+ then {
982+ let ee = aL(fo)
983+ let Y = dg.caller
984+ let Z = dg.transactionId
985+ let fw = invoke(ba, "unstake", [toBase58String(aU), fv], nil)
986+ if ((fw == fw))
987+ then {
988+ let fx = ed(ee, fv, aU, Y, Z)
989+ if ((fx == fx))
990+ then {
991+ let fi = fx._4
992+ let dv = fx._3
993+ let cQ = fx._2
994+ let fr = fx._1
995+ let do = if (if ((fc > 0))
996+ then (fc > fr)
885997 else false)
886- then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
887- else fE
888- let dT = dR(fF)
889- if ((dT == dT))
998+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
999+ else fr
1000+ let fs = invoke(aB, "burn", [fv], [AttachedPayment(aU, fv)])
1001+ if ((fs == fs))
8901002 then {
891- let fq = if (fy)
892- then {
893- let fG = invoke(bm, "stake", nil, [AttachedPayment(bg, fF)])
894- if ((fG == fG))
895- then nil
896- else throw("Strict value is not equal to itself.")
897- }
898- else [ScriptTransfer(dK.caller, fF, bg)]
899- let fH = if ((dY > 0))
900- then [ScriptTransfer(aO, dY, eb)]
1003+ let ft = [ScriptTransfer(dg.caller, do, ee)]
1004+ let fm = if ((dv > 0))
1005+ then [ScriptTransfer(aC, dv, ee)]
9011006 else nil
902- let fI = if ((this == aO))
903- then $Tuple2(0, 0)
904- else if (ef)
905- then $Tuple2(-(dY), 0)
906- else $Tuple2(0, -(dY))
907- let dt = fI._1
908- let du = fI._2
909- let fJ = ds(dt, du, 0)
910- let ft = fJ._1
911- let dj = fJ._2
912- let dD = value(getString(ai))
913- let fu = dw(dr, dj)
914- if ((fu == fu))
915- then $Tuple2((((dd ++ fq) ++ fH) ++ ft), fF)
916- else throw("Strict value is not equal to itself.")
1007+ $Tuple2(((cQ ++ ft) ++ fm), do)
9171008 }
9181009 else throw("Strict value is not equal to itself.")
9191010 }
9261017
9271018
9281019
929-@Callable(dK)
930-func putOneTknREADONLY (eb,ea) = {
931- let fK = dZ(ea, aX(eb), unit, unit)
932- let fE = fK._1
933- let dd = fK._2
934- let dY = fK._3
935- let fD = fK._4
936- let ef = fK._5
937- $Tuple2(nil, $Tuple3(fE, dY, fD))
1020+@Callable(dg)
1021+func get () = {
1022+ let cB = df(dg)
1023+ let fy = cB._1
1024+ let ci = cB._2
1025+ let di = cB._3
1026+ let bQ = cB._4
1027+ let cj = cB._5
1028+ let fz = invoke(aB, "burn", [di], [AttachedPayment(bQ, di)])
1029+ if ((fz == fz))
1030+ then cj
1031+ else throw("Strict value is not equal to itself.")
9381032 }
9391033
9401034
9411035
942-@Callable(dK)
943-func getOneTkn (fL,fx) = {
944- let fz = {
945- let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
946- if ($isInstanceOf(aQ, "Boolean"))
947- then aQ
948- else throw(($getType(aQ) + " couldn't be cast to Boolean"))
949- }
950- let fM = if (if (aS())
951- then true
952- else (bf == n))
953- then true
954- else fz
955- let eG = [if (if (!(fM))
956- then true
957- else fb(dK))
958- then true
959- else aK("get operation is blocked by admin"), if ((size(dK.payments) == 1))
960- then true
961- else aK("exactly 1 payment are expected")]
962- if ((eG == eG))
1036+@Callable(dg)
1037+func getNoLess (fA,fB) = {
1038+ let cB = df(dg)
1039+ let ch = cB._1
1040+ let ci = cB._2
1041+ let di = cB._3
1042+ let bQ = cB._4
1043+ let cj = cB._5
1044+ if ((fA > ch))
1045+ then throw(((("noLessThenAmtAsset failed: " + toString(ch)) + " < ") + toString(fA)))
1046+ else if ((fB > ci))
1047+ then throw(((("noLessThenPriceAsset failed: " + toString(ci)) + " < ") + toString(fB)))
1048+ else {
1049+ let fz = invoke(aB, "burn", [di], [AttachedPayment(bQ, di)])
1050+ if ((fz == fz))
1051+ then cj
1052+ else throw("Strict value is not equal to itself.")
1053+ }
1054+ }
1055+
1056+
1057+
1058+@Callable(dg)
1059+func unstakeAndGet (do) = {
1060+ let fC = if ((size(dg.payments) != 0))
1061+ then throw("No payments are expected")
1062+ else true
1063+ if ((fC == fC))
9631064 then {
964- let eF = aX(fL)
965- let fB = dK.payments[0]
966- let eb = fB.assetId
967- let en = fB.amount
968- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
969- if ((dr == dr))
1065+ let bF = aI()
1066+ let bS = fromBase58String(bF[q])
1067+ let fw = invoke(ba, "unstake", [toBase58String(bS), do], nil)
1068+ if ((fw == fw))
9701069 then {
971- let aa = dK.caller
972- let ab = dK.transactionId
973- let fN = eE(eF, en, eb, aa, ab)
974- if ((fN == fN))
1070+ let cB = bO(toBase58String(dg.transactionId), toBase58String(bS), do, dg.caller)
1071+ let bV = parseIntValue(cB._9)
1072+ let cj = cB._10
1073+ let fD = if (if (aG())
1074+ then true
1075+ else (bV == n))
1076+ then throw(("Get operation is blocked by admin. Status = " + toString(bV)))
1077+ else true
1078+ if ((fD == fD))
9751079 then {
976- let eH = fN._5
977- let fD = fN._4
978- let dY = fN._3
979- let dd = fN._2
980- let fO = fN._1
981- let dS = if (if ((fx > 0))
982- then (fx > fO)
983- else false)
984- then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
985- else fO
986- let fP = invoke(aN, "burn", [en], [AttachedPayment(eb, en)])
987- if ((fP == fP))
988- then {
989- let fQ = [ScriptTransfer(aa, dS, eF)]
990- let fH = if ((dY > 0))
991- then [ScriptTransfer(aO, dY, eF)]
992- else nil
993- let fR = {
994- let fS = if ((this == aO))
995- then 0
996- else dY
997- if (eH)
998- then $Tuple2(-((dS + fS)), 0)
999- else $Tuple2(0, -((dS + fS)))
1000- }
1001- let dt = fR._1
1002- let du = fR._2
1003- let fT = ds(dt, du, 0)
1004- let ft = fT._1
1005- let dj = fT._2
1006- let fu = dw(dr, dj)
1007- if ((fu == fu))
1008- then $Tuple2((((dd ++ fQ) ++ fH) ++ ft), dS)
1009- else throw("Strict value is not equal to itself.")
1010- }
1080+ let fz = invoke(aB, "burn", [do], [AttachedPayment(bS, do)])
1081+ if ((fz == fz))
1082+ then cj
10111083 else throw("Strict value is not equal to itself.")
10121084 }
10131085 else throw("Strict value is not equal to itself.")
10191091
10201092
10211093
1022-@Callable(dK)
1023-func getOneTknREADONLY (eF,en) = {
1024- let fU = eE(aX(eF), en, bg, unit, unit)
1025- let fO = fU._1
1026- let dd = fU._2
1027- let dY = fU._3
1028- let fD = fU._4
1029- let eH = fU._5
1030- $Tuple2(nil, $Tuple3(fO, dY, fD))
1031- }
1032-
1033-
1034-
1035-@Callable(dK)
1036-func unstakeAndGetOneTkn (fV,fL,fx) = {
1037- let fz = {
1038- let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1039- if ($isInstanceOf(aQ, "Boolean"))
1040- then aQ
1041- else throw(($getType(aQ) + " couldn't be cast to Boolean"))
1042- }
1043- let fM = if (if (aS())
1094+@Callable(dg)
1095+func unstakeAndGetNoLess (fv,fE,fB) = {
1096+ let fp = if (aG())
10441097 then true
1045- else (bf == n))
1098+ else (aT == n)
1099+ let ef = [if (!(fp))
10461100 then true
1047- else fz
1048- let eG = [if (if (!(fM))
1101+ else throw("get operation is blocked by admin"), if ((size(dg.payments) == 0))
10491102 then true
1050- else fb(dK))
1051- then true
1052- else aK("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1053- then true
1054- else aK("no payments are expected")]
1055- if ((eG == eG))
1103+ else throw("no payments are expected")]
1104+ if ((ef == ef))
10561105 then {
1057- let eF = aX(fL)
1058- let aa = dK.caller
1059- let ab = dK.transactionId
1060- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1061- if ((dr == dr))
1106+ let fw = invoke(ba, "unstake", [toBase58String(aU), fv], nil)
1107+ if ((fw == fw))
10621108 then {
1063- let fW = invoke(bm, "unstake", [toBase58String(bg), fV], nil)
1064- if ((fW == fW))
1109+ let cB = bO(toBase58String(dg.transactionId), toBase58String(aU), fv, dg.caller)
1110+ let ch = cB._1
1111+ let ci = cB._2
1112+ let cj = cB._10
1113+ let fF = [if ((ch >= fE))
1114+ then true
1115+ else throw(makeString(["amount asset amount to receive is less than ", toString(fE)], "")), if ((ci >= fB))
1116+ then true
1117+ else throw(makeString(["price asset amount to receive is less than ", toString(fB)], ""))]
1118+ if ((fF == fF))
10651119 then {
1066- let fX = eE(eF, fV, bg, aa, ab)
1067- if ((fX == fX))
1068- then {
1069- let eH = fX._5
1070- let fD = fX._4
1071- let dY = fX._3
1072- let dd = fX._2
1073- let fO = fX._1
1074- let dS = if (if ((fx > 0))
1075- then (fx > fO)
1076- else false)
1077- then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
1078- else fO
1079- let fP = invoke(aN, "burn", [fV], [AttachedPayment(bg, fV)])
1080- if ((fP == fP))
1081- then {
1082- let fQ = [ScriptTransfer(dK.caller, dS, eF)]
1083- let fH = if ((dY > 0))
1084- then [ScriptTransfer(aO, dY, eF)]
1085- else nil
1086- let fY = {
1087- let fS = if ((this == aO))
1088- then 0
1089- else dY
1090- if (eH)
1091- then $Tuple2(-((dS + fS)), 0)
1092- else $Tuple2(0, -((dS + fS)))
1093- }
1094- let dt = fY._1
1095- let du = fY._2
1096- let fZ = ds(dt, du, 0)
1097- let ft = fZ._1
1098- let dj = fZ._2
1099- let fu = dw(dr, dj)
1100- if ((fu == fu))
1101- then $Tuple2((((dd ++ fQ) ++ fH) ++ ft), dS)
1102- else throw("Strict value is not equal to itself.")
1103- }
1104- else throw("Strict value is not equal to itself.")
1105- }
1120+ let fz = invoke(aB, "burn", [fv], [AttachedPayment(aU, fv)])
1121+ if ((fz == fz))
1122+ then cj
11061123 else throw("Strict value is not equal to itself.")
11071124 }
11081125 else throw("Strict value is not equal to itself.")
11141131
11151132
11161133
1117-@Callable(dK)
1118-func get () = {
1119- let cO = dJ(dK)
1120- let ga = cO._1
1121- let cv = cO._2
1122- let dM = cO._3
1123- let cd = cO._4
1124- let cw = cO._5
1125- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1126- if ((dr == dr))
1127- then {
1128- let gb = invoke(aN, "burn", [dM], [AttachedPayment(cd, dM)])
1129- if ((gb == gb))
1130- then {
1131- let gc = ds(-(ga), -(cv), 0)
1132- let ft = gc._1
1133- let dj = gc._2
1134- let fu = dw(dr, dj)
1135- if ((fu == fu))
1136- then (cw ++ ft)
1137- else throw("Strict value is not equal to itself.")
1138- }
1139- else throw("Strict value is not equal to itself.")
1140- }
1141- else throw("Strict value is not equal to itself.")
1134+@Callable(dg)
1135+func activate (fG,fH) = if ((toString(dg.caller) != toString(aB)))
1136+ then throw("permissions denied")
1137+ else $Tuple2([StringEntry(ab(), fG), StringEntry(ac(), fH)], "success")
1138+
1139+
1140+
1141+@Callable(dg)
1142+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aI())
1143+
1144+
1145+
1146+@Callable(dg)
1147+func getAccBalanceWrapperREADONLY (bs) = $Tuple2(nil, br(bs))
1148+
1149+
1150+
1151+@Callable(dg)
1152+func calcPricesWrapperREADONLY (bz,bA,bE) = {
1153+ let bN = bD(bz, bA, bE)
1154+ $Tuple2(nil, [toString(bN[0]), toString(bN[1]), toString(bN[2])])
11421155 }
11431156
11441157
11451158
1146-@Callable(dK)
1147-func getNoLess (gd,ge) = {
1148- let cO = dJ(dK)
1149- let cu = cO._1
1150- let cv = cO._2
1151- let dM = cO._3
1152- let cd = cO._4
1153- let cw = cO._5
1154- if ((gd > cu))
1155- then throw(((("noLessThenAmtAsset failed: " + toString(cu)) + " < ") + toString(gd)))
1156- else if ((ge > cv))
1157- then throw(((("noLessThenPriceAsset failed: " + toString(cv)) + " < ") + toString(ge)))
1158- else {
1159- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1160- if ((dr == dr))
1161- then {
1162- let gb = invoke(aN, "burn", [dM], [AttachedPayment(cd, dM)])
1163- if ((gb == gb))
1164- then {
1165- let gf = ds(-(cu), -(cv), 0)
1166- let ft = gf._1
1167- let dj = gf._2
1168- let fu = dw(dr, dj)
1169- if ((fu == fu))
1170- then (cw ++ ft)
1171- else throw("Strict value is not equal to itself.")
1172- }
1173- else throw("Strict value is not equal to itself.")
1174- }
1175- else throw("Strict value is not equal to itself.")
1176- }
1159+@Callable(dg)
1160+func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
1161+
1162+
1163+
1164+@Callable(dg)
1165+func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
1166+
1167+
1168+
1169+@Callable(dg)
1170+func calcPriceBigIntWrapperREADONLY (bu,bv) = $Tuple2(nil, toString(bt(parseBigIntValue(bu), parseBigIntValue(bv))))
1171+
1172+
1173+
1174+@Callable(dg)
1175+func estimatePutOperationWrapperREADONLY (bP,cl,cm,cn,co,cp,Y,cq,cr) = $Tuple2(nil, ck(bP, cl, cm, cn, co, cp, Y, cq, cr))
1176+
1177+
1178+
1179+@Callable(dg)
1180+func estimateGetOperationWrapperREADONLY (bP,bQ,bR,Y) = {
1181+ let cB = bO(bP, bQ, bR, addressFromStringValue(Y))
1182+ $Tuple2(nil, $Tuple10(cB._1, cB._2, cB._3, cB._4, cB._5, cB._6, cB._7, toString(cB._8), cB._9, cB._10))
11771183 }
11781184
11791185
11801186
1181-@Callable(dK)
1182-func unstakeAndGet (dS) = {
1183- let gg = if ((size(dK.payments) != 0))
1184- then throw("No payments are expected")
1185- else true
1186- if ((gg == gg))
1187- then {
1188- let bS = aU()
1189- let cf = fromBase58String(bS[q])
1190- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1191- if ((dr == dr))
1192- then {
1193- let fW = invoke(bm, "unstake", [toBase58String(cf), dS], nil)
1194- if ((fW == fW))
1195- then {
1196- let cO = cb(toBase58String(dK.transactionId), toBase58String(cf), dS, dK.caller)
1197- let cu = cO._1
1198- let cv = cO._2
1199- let ci = parseIntValue(cO._9)
1200- let cw = cO._10
1201- let gh = if (if (aS())
1202- then true
1203- else (ci == n))
1204- then throw(("Get operation is blocked by admin. Status = " + toString(ci)))
1205- else true
1206- if ((gh == gh))
1207- then {
1208- let gb = invoke(aN, "burn", [dS], [AttachedPayment(cf, dS)])
1209- if ((gb == gb))
1210- then {
1211- let gi = ds(-(cu), -(cv), 0)
1212- let ft = gi._1
1213- let dj = gi._2
1214- let fu = dw(dr, dj)
1215- if ((fu == fu))
1216- then (cw ++ ft)
1217- else throw("Strict value is not equal to itself.")
1218- }
1219- else throw("Strict value is not equal to itself.")
1220- }
1221- else throw("Strict value is not equal to itself.")
1222- }
1223- else throw("Strict value is not equal to itself.")
1224- }
1225- else throw("Strict value is not equal to itself.")
1226- }
1227- else throw("Strict value is not equal to itself.")
1187+@Callable(dg)
1188+func statsREADONLY () = {
1189+ let bF = aI()
1190+ let bS = fromBase58String(bF[q])
1191+ let cT = bF[r]
1192+ let cU = bF[s]
1193+ let cu = bF[v]
1194+ let cv = bF[w]
1195+ let bG = parseIntValue(bF[t])
1196+ let bH = parseIntValue(bF[u])
1197+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1198+ let cV = br(cT)
1199+ let cW = br(cU)
1200+ let fJ = if ((fI == 0))
1201+ then [e, e, e]
1202+ else bD(cV, cW, fI)
1203+ let cc = 0
1204+ let fK = G(fJ[1], b)
1205+ let fL = G(fJ[2], b)
1206+ let fM = value(getInteger(aB, an(toString(this))))
1207+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cV), toString(cW), toString(fI), toString(cc), toString(fK), toString(fL), toString(fM)], j))
12281208 }
12291209
12301210
12311211
1232-@Callable(dK)
1233-func unstakeAndGetNoLess (fV,gj,ge) = {
1234- let fM = if (aS())
1235- then true
1236- else (bf == n)
1237- let eG = [if (!(fM))
1238- then true
1239- else throw("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1240- then true
1241- else throw("no payments are expected")]
1242- if ((eG == eG))
1243- then {
1244- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1245- if ((dr == dr))
1246- then {
1247- let fW = invoke(bm, "unstake", [toBase58String(bg), fV], nil)
1248- if ((fW == fW))
1249- then {
1250- let cO = cb(toBase58String(dK.transactionId), toBase58String(bg), fV, dK.caller)
1251- let cu = cO._1
1252- let cv = cO._2
1253- let cw = cO._10
1254- let gk = [if ((cu >= gj))
1255- then true
1256- else throw(makeString(["amount asset amount to receive is less than ", toString(gj)], "")), if ((cv >= ge))
1257- then true
1258- else throw(makeString(["price asset amount to receive is less than ", toString(ge)], ""))]
1259- if ((gk == gk))
1260- then {
1261- let gb = invoke(aN, "burn", [fV], [AttachedPayment(bg, fV)])
1262- if ((gb == gb))
1263- then {
1264- let gl = ds(-(cu), -(cv), 0)
1265- let ft = gl._1
1266- let dj = gl._2
1267- let fu = dw(dr, dj)
1268- if ((fu == fu))
1269- then (cw ++ ft)
1270- else throw("Strict value is not equal to itself.")
1271- }
1272- else throw("Strict value is not equal to itself.")
1273- }
1274- else throw("Strict value is not equal to itself.")
1275- }
1276- else throw("Strict value is not equal to itself.")
1277- }
1278- else throw("Strict value is not equal to itself.")
1279- }
1280- else throw("Strict value is not equal to itself.")
1212+@Callable(dg)
1213+func evaluatePutByAmountAssetREADONLY (cm) = {
1214+ let bF = aI()
1215+ let bS = fromBase58String(bF[q])
1216+ let cs = bF[r]
1217+ let bT = fromBase58String(cs)
1218+ let ct = bF[s]
1219+ let bU = fromBase58String(ct)
1220+ let bG = parseIntValue(bF[t])
1221+ let bH = parseIntValue(bF[u])
1222+ let bV = bF[p]
1223+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1224+ let cV = br(cs)
1225+ let cW = br(ct)
1226+ let bB = D(cV, bG)
1227+ let bC = D(cW, bH)
1228+ let cb = if ((fI == 0))
1229+ then e
1230+ else bt(bC, bB)
1231+ let cy = D(cm, bG)
1232+ let cz = fraction(cy, cb, d)
1233+ let co = G(cz, bH)
1234+ let dm = ck("", 500000, cm, bT, co, bU, "", true, false)
1235+ let cJ = dm._1
1236+ let fN = dm._3
1237+ let bX = dm._4
1238+ let bZ = dm._5
1239+ let bW = dm._6
1240+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cJ), toString(G(cb, b)), toString(bX), toString(bZ), toString(bW), bV, toString(cm), toString(co)], j))
12811241 }
12821242
12831243
12841244
1285-@Callable(dK)
1286-func activate (gm,gn) = if ((toString(dK.caller) != toString(aN)))
1287- then throw("permissions denied")
1288- else $Tuple2([StringEntry(ad(), gm), StringEntry(ae(), gn)], "success")
1289-
1290-
1291-
1292-@Callable(dK)
1293-func refreshKLp () = {
1294- let go = valueOrElse(getInteger(aj), 0)
1295- let gp = if (((height - go) >= am))
1296- then unit
1297- else aK(makeString([toString(am), " blocks have not passed since the previous call"], ""))
1298- if ((gp == gp))
1299- then {
1300- let dD = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ai), "0")), aM("invalid kLp"))
1301- let gq = ds(0, 0, 0)
1302- let gr = gq._1
1303- let dj = gq._2
1304- let dv = if ((dD != dj))
1305- then gr
1306- else aK("nothing to refresh")
1307- $Tuple2(dv, toString(dj))
1308- }
1309- else throw("Strict value is not equal to itself.")
1245+@Callable(dg)
1246+func evaluatePutByPriceAssetREADONLY (co) = {
1247+ let bF = aI()
1248+ let bS = fromBase58String(bF[q])
1249+ let cs = bF[r]
1250+ let bT = fromBase58String(cs)
1251+ let ct = bF[s]
1252+ let bU = fromBase58String(ct)
1253+ let bG = parseIntValue(bF[t])
1254+ let bH = parseIntValue(bF[u])
1255+ let bV = bF[p]
1256+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1257+ let fO = br(cs)
1258+ let fP = br(ct)
1259+ let fQ = D(fO, bG)
1260+ let fR = D(fP, bH)
1261+ let cb = if ((fI == 0))
1262+ then e
1263+ else bt(fR, fQ)
1264+ let cz = D(co, bH)
1265+ let cy = fraction(cz, d, cb)
1266+ let cm = G(cy, bG)
1267+ let dm = ck("", 500000, cm, bT, co, bU, "", true, false)
1268+ let cJ = dm._1
1269+ let fN = dm._3
1270+ let bX = dm._4
1271+ let bZ = dm._5
1272+ let bW = dm._6
1273+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cJ), toString(G(cb, b)), toString(bX), toString(bZ), toString(bW), bV, toString(cm), toString(co)], j))
13101274 }
13111275
13121276
13131277
1314-@Callable(dK)
1315-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aU())
1316-
1317-
1318-
1319-@Callable(dK)
1320-func getAccBalanceWrapperREADONLY (bE) = $Tuple2(nil, bD(bE))
1321-
1322-
1323-
1324-@Callable(dK)
1325-func calcPricesWrapperREADONLY (bM,bN,bR) = {
1326- let ca = bQ(bM, bN, bR)
1327- $Tuple2(nil, [toString(ca[0]), toString(ca[1]), toString(ca[2])])
1278+@Callable(dg)
1279+func evaluateGetREADONLY (fS,fT) = {
1280+ let cB = bO("", fS, fT, this)
1281+ let ch = cB._1
1282+ let ci = cB._2
1283+ let bX = cB._5
1284+ let bZ = cB._6
1285+ let bW = cB._7
1286+ let cc = cB._8
1287+ let bV = parseIntValue(cB._9)
1288+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(ch), toString(ci), toString(bX), toString(bZ), toString(bW), toString(cc), toString(bV)], j))
13281289 }
13291290
13301291
1331-
1332-@Callable(dK)
1333-func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
1334-
1335-
1336-
1337-@Callable(dK)
1338-func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J))
1339-
1340-
1341-
1342-@Callable(dK)
1343-func calcPriceBigIntWrapperREADONLY (bG,bH) = $Tuple2(nil, toString(bF(parseBigIntValue(bG), parseBigIntValue(bH))))
1344-
1345-
1346-
1347-@Callable(dK)
1348-func estimatePutOperationWrapperREADONLY (cc,cy,cz,cA,cB,cC,aa,cD,cE) = $Tuple2(nil, cx(cc, cy, cz, cA, cB, cC, aa, cD, cE))
1349-
1350-
1351-
1352-@Callable(dK)
1353-func estimateGetOperationWrapperREADONLY (cc,cd,ce,aa) = {
1354- let cO = cb(cc, cd, ce, addressFromStringValue(aa))
1355- $Tuple2(nil, $Tuple10(cO._1, cO._2, cO._3, cO._4, cO._5, cO._6, cO._7, toString(cO._8), cO._9, cO._10))
1356- }
1357-
1358-
1359-
1360-@Callable(dK)
1361-func statsREADONLY () = {
1362- let bS = aU()
1363- let cf = fromBase58String(bS[q])
1364- let gs = bS[r]
1365- let gt = bS[s]
1366- let cH = bS[v]
1367- let cI = bS[w]
1368- let bT = parseIntValue(bS[t])
1369- let bU = parseIntValue(bS[u])
1370- let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1371- let gv = bD(gs)
1372- let gw = bD(gt)
1373- let gx = if ((gu == 0))
1374- then [e, e, e]
1375- else bQ(gv, gw, gu)
1376- let cp = 0
1377- let gy = H(gx[1], b)
1378- let gz = H(gx[2], b)
1379- let gA = value(getInteger(aN, ax(toString(this))))
1380- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gv), toString(gw), toString(gu), toString(cp), toString(gy), toString(gz), toString(gA)], j))
1381- }
1382-
1383-
1384-
1385-@Callable(dK)
1386-func evaluatePutByAmountAssetREADONLY (cz) = {
1387- let bS = aU()
1388- let cf = fromBase58String(bS[q])
1389- let cF = bS[r]
1390- let cg = fromBase58String(cF)
1391- let cG = bS[s]
1392- let ch = fromBase58String(cG)
1393- let bT = parseIntValue(bS[t])
1394- let bU = parseIntValue(bS[u])
1395- let ci = bS[p]
1396- let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1397- let gv = bD(cF)
1398- let gw = bD(cG)
1399- let bO = D(gv, bT)
1400- let bP = D(gw, bU)
1401- let co = if ((gu == 0))
1402- then e
1403- else bF(bP, bO)
1404- let cL = D(cz, bT)
1405- let cM = fraction(cL, co, d)
1406- let cB = H(cM, bU)
1407- let dQ = cx("", 500000, cz, cg, cB, ch, "", true, false)
1408- let cW = dQ._1
1409- let gB = dQ._3
1410- let ck = dQ._4
1411- let cm = dQ._5
1412- let cj = dQ._6
1413- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cW), toString(H(co, b)), toString(ck), toString(cm), toString(cj), ci, toString(cz), toString(cB)], j))
1414- }
1415-
1416-
1417-
1418-@Callable(dK)
1419-func evaluatePutByPriceAssetREADONLY (cB) = {
1420- let bS = aU()
1421- let cf = fromBase58String(bS[q])
1422- let cF = bS[r]
1423- let cg = fromBase58String(cF)
1424- let cG = bS[s]
1425- let ch = fromBase58String(cG)
1426- let bT = parseIntValue(bS[t])
1427- let bU = parseIntValue(bS[u])
1428- let ci = bS[p]
1429- let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1430- let gC = bD(cF)
1431- let gD = bD(cG)
1432- let gE = D(gC, bT)
1433- let gF = D(gD, bU)
1434- let co = if ((gu == 0))
1435- then e
1436- else bF(gF, gE)
1437- let cM = D(cB, bU)
1438- let cL = fraction(cM, d, co)
1439- let cz = H(cL, bT)
1440- let dQ = cx("", 500000, cz, cg, cB, ch, "", true, false)
1441- let cW = dQ._1
1442- let gB = dQ._3
1443- let ck = dQ._4
1444- let cm = dQ._5
1445- let cj = dQ._6
1446- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cW), toString(H(co, b)), toString(ck), toString(cm), toString(cj), ci, toString(cz), toString(cB)], j))
1447- }
1448-
1449-
1450-
1451-@Callable(dK)
1452-func evaluateGetREADONLY (gG,gH) = {
1453- let cO = cb("", gG, gH, this)
1454- let cu = cO._1
1455- let cv = cO._2
1456- let ck = cO._5
1457- let cm = cO._6
1458- let cj = cO._7
1459- let cp = cO._8
1460- let ci = parseIntValue(cO._9)
1461- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cu), toString(cv), toString(ck), toString(cm), toString(cj), toString(cp), toString(ci)], j))
1462- }
1463-
1464-
1465-@Verifier(gI)
1466-func gJ () = {
1467- let gK = {
1468- let dV = eY()
1469- if ($isInstanceOf(dV, "ByteVector"))
1292+@Verifier(fU)
1293+func fV () = {
1294+ let fW = {
1295+ let dr = ew()
1296+ if ($isInstanceOf(dr, "ByteVector"))
14701297 then {
1471- let fc = dV
1472- fc
1298+ let eA = dr
1299+ eA
14731300 }
1474- else if ($isInstanceOf(dV, "Unit"))
1475- then gI.senderPublicKey
1301+ else if ($isInstanceOf(dr, "Unit"))
1302+ then fU.senderPublicKey
14761303 else throw("Match error")
14771304 }
1478- let dV = gI
1479- if ($isInstanceOf(dV, "Order"))
1305+ let dr = fU
1306+ if ($isInstanceOf(dr, "Order"))
14801307 then {
1481- let dz = dV
1482- let gL = aT()
1483- let gM = dy(dz)
1484- let aC = gM._1
1485- let aD = gM._2
1486- let aE = sigVerify(dz.bodyBytes, dz.proofs[0], dz.senderPublicKey)
1487- let aF = sigVerify(dz.bodyBytes, dz.proofs[1], gL)
1488- if (if (if (aC)
1489- then aE
1308+ let cS = dr
1309+ let fX = aH()
1310+ let as = cR(cS)
1311+ let at = sigVerify(cS.bodyBytes, cS.proofs[0], cS.senderPublicKey)
1312+ let au = sigVerify(cS.bodyBytes, cS.proofs[1], fX)
1313+ if (if (if (as)
1314+ then at
14901315 else false)
1491- then aF
1316+ then au
14921317 else false)
14931318 then true
1494- else aB(aC, aD, aE, aF)
1319+ else ar(as, at, au)
14951320 }
1496- else if ($isInstanceOf(dV, "SetScriptTransaction"))
1321+ else if ($isInstanceOf(dr, "SetScriptTransaction"))
14971322 then {
1498- let eZ = dV
1499- let gN = blake2b256(value(eZ.script))
1500- let gO = fromBase64String(value(getString(aN, az())))
1501- let gP = scriptHash(this)
1502- if (if ((gO == gN))
1503- then (gP != gN)
1323+ let ex = dr
1324+ let fY = blake2b256(value(ex.script))
1325+ let fZ = fromBase64String(value(getString(aB, ap())))
1326+ let ga = scriptHash(this)
1327+ if (if ((fZ == fY))
1328+ then (ga != fY)
15041329 else false)
15051330 then true
1506- else sigVerify(gI.bodyBytes, gI.proofs[0], gK)
1331+ else sigVerify(fU.bodyBytes, fU.proofs[0], fW)
15071332 }
1508- else sigVerify(gI.bodyBytes, gI.proofs[0], gK)
1333+ else sigVerify(fU.bodyBytes, fU.proofs[0], fW)
15091334 }
15101335
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
65-func G (E,F) = fraction(E, d, F)
65+func G (H,I) = toInt(fraction(H, toBigInt(I), d))
6666
6767
68-func H (I,J) = toInt(fraction(I, toBigInt(J), d))
68+func J (K,L,M) = fraction(K, L, M)
6969
7070
71-func K (I,J,L) = toInt(fraction(I, toBigInt(J), d, L))
71+func N (H) = if ((0 > H))
72+ then -(H)
73+ else H
7274
7375
74-func M (N,O,P) = fraction(N, O, P)
76+func O (H) = if ((e > H))
77+ then -(H)
78+ else H
7579
7680
77-func Q (I) = if ((0 > I))
78- then -(I)
79- else I
81+func P () = "%s__swapContract"
8082
8183
82-func R (I) = if ((e > I))
83- then -(I)
84- else I
84+func Q () = "%s__factoryContract"
8585
8686
87-func S () = "%s__factoryContract"
87+func R () = "%s__managerPublicKey"
8888
8989
90-func T () = "%s__managerPublicKey"
90+func S () = "%s__pendingManagerPublicKey"
9191
9292
93-func U () = "%s__pendingManagerPublicKey"
93+func T () = "%s%s__price__last"
9494
9595
96-func V () = "%s%s__price__last"
96+func U (V,W) = makeString(["%s%s%d%d__price__history", toString(V), toString(W)], j)
9797
9898
99-func W (X,Y) = makeString(["%s%s%d%d__price__history", toString(X), toString(Y)], j)
99+func X (Y,Z) = ((("%s%s%s__P__" + Y) + "__") + Z)
100100
101101
102-func Z (aa,ab) = ((("%s%s%s__P__" + aa) + "__") + ab)
102+func aa (Y,Z) = ((("%s%s%s__G__" + Y) + "__") + Z)
103103
104104
105-func ac (aa,ab) = ((("%s%s%s__G__" + aa) + "__") + ab)
105+func ab () = "%s__amountAsset"
106106
107107
108-func ad () = "%s__amountAsset"
108+func ac () = "%s__priceAsset"
109109
110110
111-func ae () = "%s__priceAsset"
111+func ad () = "%s__factoryConfig"
112112
113113
114-let af = "%s__fee"
115-
116-let ag = fraction(10, b, 10000)
117-
118-let ah = valueOrElse(getInteger(this, af), ag)
119-
120-let ai = makeString(["%s", "kLp"], j)
121-
122-let aj = makeString(["%s", "kLpRefreshedHeight"], j)
123-
124-let ak = makeString(["%s", "refreshKLpDelay"], j)
125-
126-let al = 30
127-
128-let am = valueOrElse(getInteger(this, ak), al)
129-
130-func an () = "%s__factoryConfig"
114+func ae () = "%s%s__matcher__publicKey"
131115
132116
133-func ao () = "%s%s__matcher__publicKey"
117+func af (ag) = (("%s%s%s__" + ag) + "__mappings__poolContract2LpAsset")
134118
135119
136-func ap (aq) = (("%s%s%s__" + aq) + "__mappings__poolContract2LpAsset")
120+func ah (ai,aj) = (((("%d%d%s__" + ai) + "__") + aj) + "__config")
137121
138122
139-func ar (as,at) = (((("%d%d%s__" + as) + "__") + at) + "__config")
123+func ak (al) = ("%s%s%s__mappings__baseAsset2internalId__" + al)
140124
141125
142-func au (av) = ("%s%s%s__mappings__baseAsset2internalId__" + av)
126+func am () = "%s__shutdown"
143127
144128
145-func aw () = "%s__shutdown"
129+func an (ao) = ("%s%s__poolWeight__" + ao)
146130
147131
148-func ax (ay) = ("%s%s__poolWeight__" + ay)
132+func ap () = "%s__allowedLpScriptHash"
149133
150134
151-func az () = "%s__allowedLpScriptHash"
135+let aq = "%s__feeCollectorAddress"
136+
137+func ar (as,at,au) = throw(((((("order validation failed: orderValid=" + toString(as)) + " senderValid=") + toString(at)) + " matcherValid=") + toString(au)))
152138
153139
154-let aA = "%s__feeCollectorAddress"
155-
156-func aB (aC,aD,aE,aF) = throw((((((((("order validation failed: orderValid=" + toString(aC)) + " (") + aD) + ")") + " senderValid=") + toString(aE)) + " matcherValid=") + toString(aF)))
140+func av (aw,ax) = valueOrErrorMessage(getString(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " is not defined"], ""))
157141
158142
159-func aG (aH,aI) = valueOrErrorMessage(getString(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " is not defined"], ""))
143+func ay (aw,ax) = valueOrErrorMessage(getInteger(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " is not defined"], ""))
160144
161145
162-func aJ (aH,aI) = valueOrErrorMessage(getInteger(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " is not defined"], ""))
146+func az (aA) = throw(makeString(["lp.ride:", aA], " "))
163147
164148
165-func aK (aL) = throw(makeString(["lp.ride:", aL], " "))
149+let aB = addressFromStringValue(av(this, Q()))
150+
151+let aC = addressFromStringValue(av(aB, aq))
152+
153+let aD = {
154+ let aE = invoke(aB, "getInFeeREADONLY", [toString(this)], nil)
155+ if ($isInstanceOf(aE, "Int"))
156+ then aE
157+ else throw(($getType(aE) + " couldn't be cast to Int"))
158+ }
159+
160+let aF = {
161+ let aE = invoke(aB, "getOutFeeREADONLY", [toString(this)], nil)
162+ if ($isInstanceOf(aE, "Int"))
163+ then aE
164+ else throw(($getType(aE) + " couldn't be cast to Int"))
165+ }
166+
167+func aG () = valueOrElse(getBoolean(aB, am()), false)
166168
167169
168-func aM (aL) = makeString(["lp.ride:", aL], " ")
170+func aH () = fromBase58String(av(aB, ae()))
169171
170172
171-let aN = addressFromStringValue(aG(this, S()))
172-
173-let aO = addressFromStringValue(aG(aN, aA))
174-
175-let aP = {
176- let aQ = invoke(aN, "getInFeeREADONLY", [toString(this)], nil)
177- if ($isInstanceOf(aQ, "Int"))
178- then aQ
179- else throw(($getType(aQ) + " couldn't be cast to Int"))
180- }
181-
182-let aR = {
183- let aQ = invoke(aN, "getOutFeeREADONLY", [toString(this)], nil)
184- if ($isInstanceOf(aQ, "Int"))
185- then aQ
186- else throw(($getType(aQ) + " couldn't be cast to Int"))
187- }
188-
189-func aS () = valueOrElse(getBoolean(aN, aw()), false)
190-
191-
192-func aT () = fromBase58String(aG(aN, ao()))
193-
194-
195-func aU () = {
196- let aV = aG(this, ad())
197- let aW = aG(this, ae())
198- let at = aJ(aN, au(aW))
199- let as = aJ(aN, au(aV))
200- split(aG(aN, ar(toString(as), toString(at))), j)
173+func aI () = {
174+ let aJ = av(this, ab())
175+ let aK = av(this, ac())
176+ let aj = ay(aB, ak(aK))
177+ let ai = ay(aB, ak(aJ))
178+ split(av(aB, ah(toString(ai), toString(aj))), j)
201179 }
202180
203181
204-func aX (aY) = if ((aY == i))
182+func aL (aM) = if ((aM == i))
205183 then unit
206- else fromBase58String(aY)
184+ else fromBase58String(aM)
207185
208186
209-func aZ (aY) = if ((aY == unit))
187+func aN (aM) = if ((aM == unit))
210188 then i
211- else toBase58String(value(aY))
189+ else toBase58String(value(aM))
212190
213191
214-func ba (bb) = $Tuple7(addressFromStringValue(bb[o]), parseIntValue(bb[p]), fromBase58String(bb[q]), aX(bb[r]), aX(bb[s]), parseIntValue(bb[t]), parseIntValue(bb[u]))
192+func aO (aP) = $Tuple7(addressFromStringValue(aP[o]), parseIntValue(aP[p]), fromBase58String(aP[q]), aL(aP[r]), aL(aP[s]), parseIntValue(aP[t]), parseIntValue(aP[u]))
215193
216194
217-let bc = ba(aU())
195+let aQ = aO(aI())
218196
219-let bd = bc
197+let aR = aQ
220198
221-let be = bd._1
199+let aS = aR._1
222200
223-let bf = bd._2
201+let aT = aR._2
224202
225-let bg = bd._3
203+let aU = aR._3
226204
227-let bh = bd._4
205+let aV = aR._4
228206
229-let bi = bd._5
207+let aW = aR._5
230208
231-let bj = bd._6
209+let aX = aR._6
232210
233-let bk = bd._7
211+let aY = aR._7
234212
235-func bl () = split(aG(aN, an()), j)
213+func aZ () = split(av(aB, ad()), j)
236214
237215
238-let bm = valueOrErrorMessage(addressFromString(bl()[B]), "incorrect staking address")
216+let ba = valueOrErrorMessage(addressFromString(aZ()[B]), "incorrect staking address")
239217
240-let bn = valueOrErrorMessage(addressFromString(bl()[C]), "incorrect staking address")
218+let bb = valueOrErrorMessage(addressFromString(aZ()[C]), "incorrect staking address")
241219
242-func bo (bp,bq,br,bs,bt,bu,bv,bw,bx,by) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bp), toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by)], j)
220+func bc (bd,be,bf,bg,bh,bi,bj,bk,bl,bm) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl), toString(bm)], j)
243221
244222
245-func bz (bA,bB,bC,bs,bv,bw) = makeString(["%d%d%d%d%d%d", toString(bA), toString(bB), toString(bC), toString(bs), toString(bv), toString(bw)], j)
223+func bn (bo,bp,bq,bg,bj,bk) = makeString(["%d%d%d%d%d%d", toString(bo), toString(bp), toString(bq), toString(bg), toString(bj), toString(bk)], j)
246224
247225
248-func bD (bE) = if ((bE == "WAVES"))
226+func br (bs) = if ((bs == "WAVES"))
249227 then wavesBalance(this).available
250- else assetBalance(this, fromBase58String(bE))
228+ else assetBalance(this, fromBase58String(bs))
251229
252230
253-func bF (bG,bH) = fraction(bG, d, bH)
231+func bt (bu,bv) = fraction(bu, d, bv)
254232
255233
256-func bI (bG,bH,L) = fraction(bG, d, bH, L)
257-
258-
259-func bJ (bK,bL,bM,bN) = {
260- let bO = D(bM, bK)
261- let bP = D(bN, bL)
262- bF(bP, bO)
234+func bw (bx,by,bz,bA) = {
235+ let bB = D(bz, bx)
236+ let bC = D(bA, by)
237+ bt(bC, bB)
263238 }
264239
265240
266-func bQ (bM,bN,bR) = {
267- let bS = aU()
268- let bT = parseIntValue(bS[t])
269- let bU = parseIntValue(bS[u])
270- let bV = bJ(bT, bU, bM, bN)
271- let bH = D(bM, bT)
272- let bG = D(bN, bU)
273- let bW = D(bR, b)
274- let bX = bF(bH, bW)
275- let bY = bF(bG, bW)
276-[bV, bX, bY]
241+func bD (bz,bA,bE) = {
242+ let bF = aI()
243+ let bG = parseIntValue(bF[t])
244+ let bH = parseIntValue(bF[u])
245+ let bI = bw(bG, bH, bz, bA)
246+ let bv = D(bz, bG)
247+ let bu = D(bA, bH)
248+ let bJ = D(bE, b)
249+ let bK = bt(bv, bJ)
250+ let bL = bt(bu, bJ)
251+[bI, bK, bL]
277252 }
278253
279254
280-func bZ (bM,bN,bR) = {
281- let ca = bQ(bM, bN, bR)
282-[H(ca[0], b), H(ca[1], b), H(ca[2], b)]
255+func bM (bz,bA,bE) = {
256+ let bN = bD(bz, bA, bE)
257+[G(bN[0], b), G(bN[1], b), G(bN[2], b)]
283258 }
284259
285260
286-func cb (cc,cd,ce,aa) = {
287- let bS = aU()
288- let cf = bS[q]
289- let cg = bS[r]
290- let ch = bS[s]
291- let bK = parseIntValue(bS[t])
292- let bL = parseIntValue(bS[u])
293- let ci = bS[p]
294- let cj = valueOrErrorMessage(assetInfo(fromBase58String(cf)), (("Asset " + cf) + " doesn't exist")).quantity
295- if ((cf != cd))
261+func bO (bP,bQ,bR,Y) = {
262+ let bF = aI()
263+ let bS = bF[q]
264+ let bT = bF[r]
265+ let bU = bF[s]
266+ let bx = parseIntValue(bF[t])
267+ let by = parseIntValue(bF[u])
268+ let bV = bF[p]
269+ let bW = valueOrErrorMessage(assetInfo(fromBase58String(bS)), (("Asset " + bS) + " doesn't exist")).quantity
270+ if ((bS != bQ))
296271 then throw("Invalid asset passed.")
297272 else {
298- let ck = bD(cg)
299- let cl = D(ck, bK)
300- let cm = bD(ch)
301- let cn = D(cm, bL)
302- let co = bF(cn, cl)
303- let cp = H(co, b)
304- let cq = D(ce, b)
305- let cr = D(cj, b)
306- let cs = fraction(cl, cq, cr)
307- let ct = fraction(cn, cq, cr)
308- let cu = K(cs, bK, FLOOR)
309- let cv = K(ct, bL, FLOOR)
310- let cw = if ((cc == ""))
273+ let bX = br(bT)
274+ let bY = D(bX, bx)
275+ let bZ = br(bU)
276+ let ca = D(bZ, by)
277+ let cb = bt(ca, bY)
278+ let cc = G(cb, b)
279+ let cd = D(bR, b)
280+ let ce = D(bW, b)
281+ let cf = fraction(bY, cd, ce)
282+ let cg = fraction(ca, cd, ce)
283+ let ch = G(cf, bx)
284+ let ci = G(cg, by)
285+ let cj = if ((bP == ""))
311286 then nil
312- else [ScriptTransfer(aa, cu, if ((cg == "WAVES"))
287+ else [ScriptTransfer(Y, ch, if ((bT == "WAVES"))
313288 then unit
314- else fromBase58String(cg)), ScriptTransfer(aa, cv, if ((ch == "WAVES"))
289+ else fromBase58String(bT)), ScriptTransfer(Y, ci, if ((bU == "WAVES"))
315290 then unit
316- else fromBase58String(ch)), StringEntry(ac(toString(aa), cc), bz(cu, cv, ce, cp, height, lastBlock.timestamp)), IntegerEntry(V(), cp), IntegerEntry(W(height, lastBlock.timestamp), cp)]
317- $Tuple10(cu, cv, cg, ch, ck, cm, cj, co, ci, cw)
291+ else fromBase58String(bU)), StringEntry(aa(toString(Y), bP), bn(ch, ci, bR, cc, height, lastBlock.timestamp)), IntegerEntry(T(), cc), IntegerEntry(U(height, lastBlock.timestamp), cc)]
292+ $Tuple10(ch, ci, bT, bU, bX, bZ, bW, cb, bV, cj)
318293 }
319294 }
320295
321296
322-func cx (cc,cy,cz,cA,cB,cC,aa,cD,cE) = {
323- let bS = aU()
324- let cf = fromBase58String(bS[q])
325- let cF = bS[r]
326- let cG = bS[s]
327- let cH = bS[v]
328- let cI = bS[w]
329- let bT = parseIntValue(bS[t])
330- let bU = parseIntValue(bS[u])
331- let ci = bS[p]
332- let cj = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
333- let cJ = toBase58String(valueOrElse(cA, fromBase58String("WAVES")))
334- let cK = toBase58String(valueOrElse(cC, fromBase58String("WAVES")))
335- if (if ((cF != cJ))
297+func ck (bP,cl,cm,cn,co,cp,Y,cq,cr) = {
298+ let bF = aI()
299+ let bS = fromBase58String(bF[q])
300+ let cs = bF[r]
301+ let ct = bF[s]
302+ let cu = bF[v]
303+ let cv = bF[w]
304+ let bG = parseIntValue(bF[t])
305+ let bH = parseIntValue(bF[u])
306+ let bV = bF[p]
307+ let bW = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
308+ let cw = toBase58String(valueOrElse(cn, fromBase58String("WAVES")))
309+ let cx = toBase58String(valueOrElse(cp, fromBase58String("WAVES")))
310+ if (if ((cs != cw))
336311 then true
337- else (cG != cK))
312+ else (ct != cx))
338313 then throw("Invalid amt or price asset passed.")
339314 else {
340- let ck = if (cD)
341- then bD(cF)
342- else (bD(cF) - cz)
343- let cm = if (cD)
344- then bD(cG)
345- else (bD(cG) - cB)
346- let cL = D(cz, bT)
347- let cM = D(cB, bU)
348- let cN = bF(cM, cL)
349- let cl = D(ck, bT)
350- let cn = D(cm, bU)
351- let cO = if ((cj == 0))
315+ let bX = if (cq)
316+ then br(cs)
317+ else (br(cs) - cm)
318+ let bZ = if (cq)
319+ then br(ct)
320+ else (br(ct) - co)
321+ let cy = D(cm, bG)
322+ let cz = D(co, bH)
323+ let cA = bt(cz, cy)
324+ let bY = D(bX, bG)
325+ let ca = D(bZ, bH)
326+ let cB = if ((bW == 0))
352327 then {
353- let co = e
354- let cP = e
355- let bW = pow((cL * cM), 0, toBigInt(5), 1, 0, DOWN)
356- $Tuple5(H(bW, b), H(cL, bT), H(cM, bU), bF((cn + cM), (cl + cL)), cP)
328+ let cb = e
329+ let cC = e
330+ let bJ = pow((cy * cz), 0, toBigInt(5), 1, 0, DOWN)
331+ $Tuple5(G(bJ, b), G(cy, bG), G(cz, bH), bt((ca + cz), (bY + cy)), cC)
357332 }
358333 else {
359- let co = bF(cn, cl)
360- let cP = fraction(R((co - cN)), d, co)
361- let cQ = D(cy, b)
362- if (if ((co != e))
363- then (cP > cQ)
334+ let cb = bt(ca, bY)
335+ let cC = fraction(O((cb - cA)), d, cb)
336+ let cD = D(cl, b)
337+ if (if ((cb != e))
338+ then (cC > cD)
364339 else false)
365- then throw(((("Price slippage " + toString(cP)) + " exceeded the passed limit of ") + toString(cQ)))
340+ then throw(((("Price slippage " + toString(cC)) + " exceeded the passed limit of ") + toString(cD)))
366341 else {
367- let cr = D(cj, b)
368- let cR = fraction(cL, bI(cn, cl, CEILING), d, CEILING)
369- let cS = fraction(cM, d, bI(cn, cl, FLOOR), CEILING)
370- let cT = if ((cR > cM))
371- then $Tuple2(cS, cM)
372- else $Tuple2(cL, cR)
373- let cU = cT._1
374- let cV = cT._2
375- let bW = fraction(cr, cV, cn, FLOOR)
376- $Tuple5(K(bW, b, FLOOR), K(cU, bT, CEILING), K(cV, bU, CEILING), co, cP)
342+ let ce = D(bW, b)
343+ let cE = fraction(cy, cb, d)
344+ let cF = fraction(cz, d, cb)
345+ let cG = if ((cE > cz))
346+ then $Tuple2(cF, cz)
347+ else $Tuple2(cy, cE)
348+ let cH = cG._1
349+ let cI = cG._2
350+ let bJ = fraction(ce, cI, ca)
351+ $Tuple5(G(bJ, b), G(cH, bG), G(cI, bH), cb, cC)
377352 }
378353 }
379- let cW = cO._1
380- let cX = cO._2
381- let cY = cO._3
382- let cp = H(cO._4, b)
383- let cZ = H(cO._5, b)
384- if ((0 >= cW))
354+ let cJ = cB._1
355+ let cK = cB._2
356+ let cL = cB._3
357+ let cc = G(cB._4, b)
358+ let cM = G(cB._5, b)
359+ if ((0 >= cJ))
385360 then throw("Invalid calculations. LP calculated is less than zero.")
386361 else {
387- let da = if (!(cE))
362+ let cN = if (!(cr))
388363 then 0
389- else cW
390- let db = (cz - cX)
391- let dc = (cB - cY)
392- let dd = [IntegerEntry(V(), cp), IntegerEntry(W(height, lastBlock.timestamp), cp), StringEntry(Z(aa, cc), bo(cX, cY, da, cp, cy, cZ, height, lastBlock.timestamp, db, dc))]
393- $Tuple13(cW, da, cp, ck, cm, cj, cf, ci, dd, db, dc, cA, cC)
364+ else cJ
365+ let cO = (cm - cK)
366+ let cP = (co - cL)
367+ let cQ = [IntegerEntry(T(), cc), IntegerEntry(U(height, lastBlock.timestamp), cc), StringEntry(X(Y, bP), bc(cK, cL, cN, cc, cl, cM, height, lastBlock.timestamp, cO, cP))]
368+ $Tuple13(cJ, cN, cc, bX, bZ, bW, bS, bV, cQ, cO, cP, cn, cp)
394369 }
395370 }
396371 }
397372
398373
399-func de (df,dg,cj) = {
400- let dh = G(df, toBigInt(bj))
401- let di = G(dg, toBigInt(bk))
402- let dj = fraction(pow((dh * di), 0, toBigInt(5), 1, 18, DOWN), g, cj)
403- if ((cj == f))
404- then f
405- else dj
374+func cR (cS) = {
375+ let bF = aI()
376+ let cT = bF[r]
377+ let cU = bF[s]
378+ let bV = parseIntValue(bF[p])
379+ let bG = parseIntValue(bF[t])
380+ let bH = parseIntValue(bF[u])
381+ let cV = br(cT)
382+ let cW = br(cU)
383+ let cb = if ((cS.orderType == Buy))
384+ then bw(bG, bH, (cV + cS.amount), cW)
385+ else bw(bG, bH, (cV - cS.amount), cW)
386+ let cc = G(cb, b)
387+ if (if (if (aG())
388+ then true
389+ else (bV == m))
390+ then true
391+ else (bV == n))
392+ then throw("Exchange operations disabled")
393+ else {
394+ let cX = cS.assetPair.amountAsset
395+ let cY = if ((cX == unit))
396+ then "WAVES"
397+ else toBase58String(value(cX))
398+ let cZ = cS.assetPair.priceAsset
399+ let da = if ((cZ == unit))
400+ then "WAVES"
401+ else toBase58String(value(cZ))
402+ if (if ((cY != cT))
403+ then true
404+ else (da != cU))
405+ then throw("Wrong order assets.")
406+ else {
407+ let db = cS.price
408+ let dc = fraction(b, bH, bG)
409+ let dd = J(db, b, dc)
410+ let de = if ((cS.orderType == Buy))
411+ then (cc >= dd)
412+ else (dd >= cc)
413+ true
414+ }
415+ }
406416 }
407417
408418
409-func dk (dl,dm,dn) = {
410- let do = (toBigInt(bD(aZ(bh))) - dl)
411- let dp = (toBigInt(bD(aZ(bi))) - dm)
412- let dq = (toBigInt(value(assetInfo(bg)).quantity) - dn)
413- let dr = de(do, dp, dq)
414- dr
415- }
416-
417-
418-func ds (dt,du,dn) = {
419- let do = (bD(aZ(bh)) + dt)
420- let dp = (bD(aZ(bi)) + du)
421- let dq = (value(assetInfo(bg)).quantity + dn)
422- let dj = de(toBigInt(do), toBigInt(dp), toBigInt(dq))
423- let dv = [IntegerEntry(aj, height), StringEntry(ai, toString(dj))]
424- $Tuple2(dv, dj)
425- }
426-
427-
428-func dw (dx,dj) = if ((dj >= dx))
429- then true
430- else aK(makeString(["updated KLp lower than current KLp", toString(dx), toString(dj)], " "))
431-
432-
433-func dy (dz) = {
434- let do = bD(aZ(bh))
435- let dp = bD(aZ(bi))
436- let dA = dz.amount
437- let dB = fraction(dz.amount, dz.price, b, FLOOR)
438- let dC = if ((dz.orderType == Buy))
439- then $Tuple2(dA, -(dB))
440- else $Tuple2(-(dA), dB)
441- let dt = dC._1
442- let du = dC._2
443- if (if (if (aS())
444- then true
445- else (bf == m))
446- then true
447- else (bf == n))
448- then throw("Exchange operations disabled")
449- else if (if ((dz.assetPair.amountAsset != bh))
450- then true
451- else (dz.assetPair.priceAsset != bi))
452- then throw("Wrong order assets.")
453- else {
454- let dD = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ai), "0")), aM("invalid kLp"))
455- let dE = ds(dt, du, 0)
456- let dF = dE._1
457- let dG = dE._2
458- let dH = (dG >= dD)
459- let dI = makeString(["kLp=", toString(dD), " kLpNew=", toString(dG), " amountAssetBalance=", toString(do), " priceAssetBalance=", toString(dp), " amountAssetBalanceDelta=", toString(dt), " priceAssetBalanceDelta=", toString(du)], "")
460- $Tuple2(dH, dI)
461- }
462- }
463-
464-
465-func dJ (dK) = if ((size(dK.payments) != 1))
419+func df (dg) = if ((size(dg.payments) != 1))
466420 then throw("exactly 1 payment is expected")
467421 else {
468- let dL = value(dK.payments[0])
469- let cd = value(dL.assetId)
470- let dM = dL.amount
471- let cO = cb(toBase58String(dK.transactionId), toBase58String(cd), dM, dK.caller)
472- let cu = cO._1
473- let cv = cO._2
474- let ci = parseIntValue(cO._9)
475- let cw = cO._10
476- if (if (aS())
422+ let dh = value(dg.payments[0])
423+ let bQ = value(dh.assetId)
424+ let di = dh.amount
425+ let cB = bO(toBase58String(dg.transactionId), toBase58String(bQ), di, dg.caller)
426+ let ch = cB._1
427+ let ci = cB._2
428+ let bV = parseIntValue(cB._9)
429+ let cj = cB._10
430+ if (if (aG())
477431 then true
478- else (ci == n))
479- then throw(("Get operation is blocked by admin. Status = " + toString(ci)))
480- else $Tuple5(cu, cv, dM, cd, cw)
432+ else (bV == n))
433+ then throw(("Get operation is blocked by admin. Status = " + toString(bV)))
434+ else $Tuple5(ch, ci, di, bQ, cj)
481435 }
482436
483437
484-func dN (dK,cy,cE) = if ((size(dK.payments) != 2))
438+func dj (dg,cl,cr) = if ((size(dg.payments) != 2))
485439 then throw("exactly 2 payments are expected")
486440 else {
487- let dO = value(dK.payments[0])
488- let dP = value(dK.payments[1])
489- let dQ = cx(toBase58String(dK.transactionId), cy, dO.amount, dO.assetId, dP.amount, dP.assetId, toString(dK.caller), false, cE)
490- let ci = parseIntValue(dQ._8)
491- if (if (if (aS())
441+ let dk = value(dg.payments[0])
442+ let dl = value(dg.payments[1])
443+ let dm = ck(toBase58String(dg.transactionId), cl, dk.amount, dk.assetId, dl.amount, dl.assetId, toString(dg.caller), false, cr)
444+ let bV = parseIntValue(dm._8)
445+ if (if (if (aG())
492446 then true
493- else (ci == l))
447+ else (bV == l))
494448 then true
495- else (ci == n))
496- then throw(("Put operation is blocked by admin. Status = " + toString(ci)))
497- else dQ
449+ else (bV == n))
450+ then throw(("Put operation is blocked by admin. Status = " + toString(bV)))
451+ else dm
498452 }
499453
500454
501-func dR (dS) = {
502- let dT = invoke(aN, "emit", [dS], nil)
503- if ((dT == dT))
455+func dn (do) = {
456+ let dp = invoke(aB, "emit", [do], nil)
457+ if ((dp == dp))
504458 then {
505- let dU = {
506- let dV = dT
507- if ($isInstanceOf(dV, "Address"))
459+ let dq = {
460+ let dr = dp
461+ if ($isInstanceOf(dr, "Address"))
508462 then {
509- let dW = dV
510- invoke(dW, "emit", [dS], nil)
463+ let ds = dr
464+ invoke(ds, "emit", [do], nil)
511465 }
512466 else unit
513467 }
514- if ((dU == dU))
515- then dS
468+ if ((dq == dq))
469+ then do
516470 else throw("Strict value is not equal to itself.")
517471 }
518472 else throw("Strict value is not equal to itself.")
519473 }
520474
521475
522-func dX (dS,ah) = {
523- let dY = if ((ah == 0))
476+func dt (do,du) = {
477+ let dv = if ((du == 0))
524478 then 0
525- else fraction(dS, ah, b)
526- $Tuple2((dS - dY), dY)
479+ else fraction(do, du, b)
480+ $Tuple2((do - dv), dv)
527481 }
528482
529483
530-func dZ (ea,eb,aa,ab) = {
531- let ec = (ab == unit)
532- let ed = bD(aZ(bh))
533- let ee = bD(aZ(bi))
534- let ef = if ((eb == bh))
484+func dw (dx,dy,Y,Z) = {
485+ let dz = (Z == unit)
486+ let dA = br(aN(aV))
487+ let dB = br(aN(aW))
488+ let dC = if ((dy == aV))
535489 then true
536- else if ((eb == bi))
490+ else if ((dy == aW))
537491 then false
538- else aK("invalid asset")
539- let eg = if (ec)
540- then $Tuple2(ed, ee)
541- else if (ef)
542- then $Tuple2((ed - ea), ee)
543- else $Tuple2(ed, (ee - ea))
544- let eh = eg._1
545- let ei = eg._2
546- let ej = if (ef)
547- then $Tuple2(ea, 0)
548- else $Tuple2(0, ea)
549- let ek = ej._1
550- let el = ej._2
551- let dA = dX(ek, aP)._1
552- let dB = dX(el, aP)._1
553- let em = dX(ea, aP)
554- let en = em._1
555- let dY = em._2
556- let eo = (eh + dA)
557- let ep = (ei + dB)
558- let eq = bF(D(ep, bk), D(eo, bj))
559- let er = H(eq, b)
560- let es = if (ef)
561- then eh
562- else ei
563- let et = toBigInt(es)
564- let eu = toBigInt(valueOrErrorMessage(assetInfo(bg), (("asset " + toBase58String(bg)) + " doesn't exist")).quantity)
565- let ev = if ((eu > f))
492+ else az("invalid asset")
493+ let dD = if (dz)
494+ then $Tuple2(dA, dB)
495+ else if (dC)
496+ then $Tuple2((dA - dx), dB)
497+ else $Tuple2(dA, (dB - dx))
498+ let dE = dD._1
499+ let dF = dD._2
500+ let dG = if (dC)
501+ then $Tuple2(dx, 0)
502+ else $Tuple2(0, dx)
503+ let dH = dG._1
504+ let dI = dG._2
505+ let dJ = dt(dH, aD)._1
506+ let dK = dt(dI, aD)._1
507+ let dL = dt(dx, aD)
508+ let dM = dL._1
509+ let dv = dL._2
510+ let dN = (dE + dJ)
511+ let dO = (dF + dK)
512+ let dP = bt(D(dO, aY), D(dN, aX))
513+ let dQ = G(dP, b)
514+ let dR = if (dC)
515+ then dE
516+ else dF
517+ let dS = toBigInt(dR)
518+ let dT = toBigInt(valueOrErrorMessage(assetInfo(aU), (("asset " + toBase58String(aU)) + " doesn't exist")).quantity)
519+ let dU = if ((dT > f))
566520 then true
567- else aK("initial deposit requires all coins")
568- if ((ev == ev))
521+ else az("initial deposit requires all coins")
522+ if ((dU == dU))
569523 then {
570- let ew = toBigInt(en)
571- let ex = max([0, toInt(((eu * (sqrtBigInt((d + ((ew * d) / et)), 18, 18, DOWN) - d)) / d))])
572- let dd = if (ec)
524+ let dV = toBigInt(dM)
525+ let dW = max([0, toInt(((dT * (sqrtBigInt((d + ((dV * d) / dS)), 18, 18, DOWN) - d)) / d))])
526+ let cQ = if (dz)
573527 then nil
574- else [IntegerEntry(V(), er), IntegerEntry(W(height, lastBlock.timestamp), er), StringEntry(Z(toString(value(aa)), toBase58String(value(ab))), bo(ek, el, ex, er, 0, 0, height, lastBlock.timestamp, 0, 0))]
575- let ey = bF(D(ei, bk), D(eh, bj))
576- let ez = H(ey, b)
577- let eA = {
578- let eB = if (ef)
579- then $Tuple2(ek, eh)
580- else $Tuple2(el, ei)
581- let dS = eB._1
582- let eC = eB._2
583- let eD = toInt(fraction(eu, toBigInt((dS / 2)), toBigInt(eC)))
584- fraction((ex - eD), b, eD)
528+ else [IntegerEntry(T(), dQ), IntegerEntry(U(height, lastBlock.timestamp), dQ), StringEntry(X(toString(value(Y)), toBase58String(value(Z))), bc(dH, dI, dW, dQ, 0, 0, height, lastBlock.timestamp, 0, 0))]
529+ let dX = bt(D(dF, aY), D(dE, aX))
530+ let dY = G(dX, b)
531+ let dZ = {
532+ let ea = if (dC)
533+ then $Tuple2(dH, dE)
534+ else $Tuple2(dI, dF)
535+ let do = ea._1
536+ let eb = ea._2
537+ let ec = toInt(fraction(dT, toBigInt((do / 2)), toBigInt(eb)))
538+ fraction((dW - ec), b, ec)
585539 }
586- $Tuple5(ex, dd, dY, eA, ef)
540+ $Tuple4(dW, cQ, dv, dZ)
587541 }
588542 else throw("Strict value is not equal to itself.")
589543 }
590544
591545
592-func eE (eF,en,eb,aa,ab) = {
593- let ec = (ab == unit)
594- let bS = aU()
595- let bT = parseIntValue(bS[t])
596- let bU = parseIntValue(bS[u])
597- let eG = [if ((eb == bg))
546+func ed (ee,dM,dy,Y,Z) = {
547+ let dz = (Z == unit)
548+ let ef = [if ((dy == aU))
598549 then true
599- else aK("invalid lp asset")]
600- if ((eG == eG))
550+ else az("invalid lp asset")]
551+ if ((ef == ef))
601552 then {
602- let eH = if ((eF == bh))
553+ let eg = if ((ee == aV))
603554 then true
604- else if ((eF == bi))
555+ else if ((ee == aW))
605556 then false
606- else aK("invalid asset")
607- let eI = if (eH)
608- then toBigInt(bD(aZ(bh)))
609- else toBigInt(bD(aZ(bi)))
610- let eJ = if (eH)
611- then bT
612- else bU
613- let eK = bD(aZ(bh))
614- let eL = bD(aZ(bi))
615- let eM = if (eH)
616- then eK
617- else eL
618- let eN = toBigInt(eM)
619- let eu = toBigInt(valueOrErrorMessage(assetInfo(bg), (("asset " + toBase58String(bg)) + " doesn't exist")).quantity)
620- let eO = toBigInt(en)
621- let eP = max([0, toInt(((eI * (d - pow((d - ((eO * d) / eu)), 18, h, 0, 18, DOWN))) / d))])
622- let eQ = dX(eP, aR)
623- let eR = eQ._1
624- let dY = eQ._2
625- let eS = if (eH)
626- then $Tuple4(eR, 0, (eK - eP), eL)
627- else $Tuple4(0, eR, eK, (eL - eP))
628- let eT = eS._1
629- let eU = eS._2
630- let eV = eS._3
631- let eW = eS._4
632- let eq = bF(D(eW, bk), D(eV, bj))
633- let er = H(eq, b)
634- let dd = if (ec)
557+ else az("invalid asset")
558+ let eh = if (eg)
559+ then toBigInt(br(aN(aV)))
560+ else toBigInt(br(aN(aW)))
561+ let ei = br(aN(aV))
562+ let ej = br(aN(aW))
563+ let ek = if (eg)
564+ then ei
565+ else ej
566+ let el = toBigInt(ek)
567+ let dT = toBigInt(valueOrErrorMessage(assetInfo(aU), (("asset " + toBase58String(aU)) + " doesn't exist")).quantity)
568+ let em = toBigInt(dM)
569+ let en = max([0, toInt(((eh * (d - pow((d - ((em * d) / dT)), 18, h, 0, 18, DOWN))) / d))])
570+ let eo = dt(en, aF)
571+ let ep = eo._1
572+ let dv = eo._2
573+ let eq = if (eg)
574+ then $Tuple4(ep, 0, (ei - en), ej)
575+ else $Tuple4(0, ep, ei, (ej - en))
576+ let er = eq._1
577+ let es = eq._2
578+ let et = eq._3
579+ let eu = eq._4
580+ let dP = bt(D(eu, aY), D(et, aX))
581+ let dQ = G(dP, b)
582+ let cQ = if (dz)
635583 then nil
636- else [StringEntry(ac(toString(value(aa)), toBase58String(value(ab))), bz(eT, eU, en, er, height, lastBlock.timestamp)), IntegerEntry(V(), er), IntegerEntry(W(height, lastBlock.timestamp), er)]
637- let ey = bF(D(eL, bk), D(eK, bj))
638- let ez = H(ey, b)
639- let eA = {
640- let eX = (toInt(fraction(eI, eO, eu)) * 2)
641- fraction((eR - eX), b, eX)
584+ else [StringEntry(aa(toString(value(Y)), toBase58String(value(Z))), bn(er, es, dM, dQ, height, lastBlock.timestamp)), IntegerEntry(T(), dQ), IntegerEntry(U(height, lastBlock.timestamp), dQ)]
585+ let dX = bt(D(ej, aY), D(ei, aX))
586+ let dY = G(dX, b)
587+ let dZ = {
588+ let ev = (toInt(fraction(eh, em, dT)) * 2)
589+ fraction((ep - ev), b, ev)
642590 }
643- $Tuple5(eR, dd, dY, eA, eH)
591+ $Tuple4(ep, cQ, dv, dZ)
644592 }
645593 else throw("Strict value is not equal to itself.")
646594 }
647595
648596
649-func eY () = {
650- let dV = getString(T())
651- if ($isInstanceOf(dV, "String"))
597+func ew () = {
598+ let dr = getString(R())
599+ if ($isInstanceOf(dr, "String"))
652600 then {
653- let eZ = dV
654- fromBase58String(eZ)
601+ let ex = dr
602+ fromBase58String(ex)
655603 }
656- else if ($isInstanceOf(dV, "Unit"))
604+ else if ($isInstanceOf(dr, "Unit"))
657605 then unit
658606 else throw("Match error")
659607 }
660608
661609
662-func fa () = {
663- let dV = getString(U())
664- if ($isInstanceOf(dV, "String"))
610+func ey () = {
611+ let dr = getString(S())
612+ if ($isInstanceOf(dr, "String"))
665613 then {
666- let eZ = dV
667- fromBase58String(eZ)
614+ let ex = dr
615+ fromBase58String(ex)
668616 }
669- else if ($isInstanceOf(dV, "Unit"))
617+ else if ($isInstanceOf(dr, "Unit"))
670618 then unit
671619 else throw("Match error")
672620 }
673621
674622
675-func fb (dK) = {
676- let dV = eY()
677- if ($isInstanceOf(dV, "ByteVector"))
623+func ez (dg) = {
624+ let dr = ew()
625+ if ($isInstanceOf(dr, "ByteVector"))
678626 then {
679- let fc = dV
680- (dK.callerPublicKey == fc)
627+ let eA = dr
628+ (dg.callerPublicKey == eA)
681629 }
682- else if ($isInstanceOf(dV, "Unit"))
683- then (dK.caller == this)
630+ else if ($isInstanceOf(dr, "Unit"))
631+ then (dg.caller == this)
684632 else throw("Match error")
685633 }
686634
687635
688-func fd (dK) = {
689- let fe = throw("Permission denied")
690- let dV = eY()
691- if ($isInstanceOf(dV, "ByteVector"))
636+func eB (dg) = {
637+ let eC = throw("Permission denied")
638+ let dr = ew()
639+ if ($isInstanceOf(dr, "ByteVector"))
692640 then {
693- let fc = dV
694- if ((dK.callerPublicKey == fc))
641+ let eA = dr
642+ if ((dg.callerPublicKey == eA))
695643 then true
696- else fe
644+ else eC
697645 }
698- else if ($isInstanceOf(dV, "Unit"))
699- then if ((dK.caller == this))
646+ else if ($isInstanceOf(dr, "Unit"))
647+ then if ((dg.caller == this))
700648 then true
701- else fe
649+ else eC
702650 else throw("Match error")
703651 }
704652
705653
706-@Callable(dK)
707-func setManager (ff) = {
708- let fg = fd(dK)
709- if ((fg == fg))
654+@Callable(dg)
655+func calculateAmountOutForSwapREADONLY (eD,eE) = {
656+ let eF = if ((eE == false))
710657 then {
711- let fh = fromBase58String(ff)
712- if ((fh == fh))
713- then [StringEntry(U(), ff)]
658+ let eG = av(this, ac())
659+ let eH = av(this, ab())
660+ $Tuple2(eG, eH)
661+ }
662+ else {
663+ let eG = av(this, ab())
664+ let eH = av(this, ac())
665+ $Tuple2(eG, eH)
666+ }
667+ let eG = eF._1
668+ let eH = eF._2
669+ let eI = br(eH)
670+ let eJ = br(eG)
671+ let eK = ((eJ * eD) / (eI + eD))
672+ $Tuple2(nil, eK)
673+ }
674+
675+
676+
677+@Callable(dg)
678+func calculateAmountOutForSwapAndSendTokens (eD,eE,eL,eM) = {
679+ let ef = [if ((value(dg.payments[0]).amount >= eD))
680+ then true
681+ else az("Wrong amount"), if ((dg.caller == addressFromStringValue(av(this, P()))))
682+ then true
683+ else az("Permission denied")]
684+ if ((ef == ef))
685+ then {
686+ let dh = value(dg.payments[0])
687+ let eH = if ((dh.assetId == unit))
688+ then toBase58String(toBytes("WAVES"))
689+ else toBase58String(value(dh.assetId))
690+ let eG = if ((eE == false))
691+ then av(this, ac())
692+ else av(this, ab())
693+ let eI = (br(eH) - value(dg.payments[0]).amount)
694+ let eJ = br(eG)
695+ let eK = ((eJ * eD) / (eI + eD))
696+ let eN = if ((eK >= eL))
697+ then true
698+ else throw("Exchange result is fewer coins than expected")
699+ if ((eN == eN))
700+ then [ScriptTransfer(addressFromStringValue(eM), eK, if ((eH == "WAVES"))
701+ then unit
702+ else fromBase58String(eG))]
714703 else throw("Strict value is not equal to itself.")
715704 }
716705 else throw("Strict value is not equal to itself.")
717706 }
718707
719708
720709
721-@Callable(dK)
722-func confirmManager () = {
723- let fi = fa()
724- let fj = if (isDefined(fi))
725- then true
726- else throw("No pending manager")
727- if ((fj == fj))
710+@Callable(dg)
711+func setManager (eO) = {
712+ let eP = eB(dg)
713+ if ((eP == eP))
728714 then {
729- let fk = if ((dK.callerPublicKey == value(fi)))
730- then true
731- else throw("You are not pending manager")
732- if ((fk == fk))
733- then [StringEntry(T(), toBase58String(value(fi))), DeleteEntry(U())]
715+ let eQ = fromBase58String(eO)
716+ if ((eQ == eQ))
717+ then [StringEntry(S(), eO)]
734718 else throw("Strict value is not equal to itself.")
735719 }
736720 else throw("Strict value is not equal to itself.")
737721 }
738722
739723
740724
741-@Callable(dK)
742-func put (cy,fl) = if ((0 > cy))
725+@Callable(dg)
726+func confirmManager () = {
727+ let eR = ey()
728+ let eS = if (isDefined(eR))
729+ then true
730+ else throw("No pending manager")
731+ if ((eS == eS))
732+ then {
733+ let eT = if ((dg.callerPublicKey == value(eR)))
734+ then true
735+ else throw("You are not pending manager")
736+ if ((eT == eT))
737+ then [StringEntry(R(), toBase58String(value(eR))), DeleteEntry(S())]
738+ else throw("Strict value is not equal to itself.")
739+ }
740+ else throw("Strict value is not equal to itself.")
741+ }
742+
743+
744+
745+@Callable(dg)
746+func put (cl,eU) = if ((0 > cl))
743747 then throw("Invalid slippageTolerance passed")
744748 else {
745- let dQ = dN(dK, cy, true)
746- let da = dQ._2
747- let cf = dQ._7
748- let cw = dQ._9
749- let db = dQ._10
750- let dc = dQ._11
751- let fm = dQ._12
752- let fn = dQ._13
753- let dO = toBigInt(value(dK.payments[0]).amount)
754- let dP = toBigInt(value(dK.payments[1]).amount)
755- let dr = dk(dO, dP, toBigInt(0))
756- if ((dr == dr))
749+ let dm = dj(dg, cl, true)
750+ let cN = dm._2
751+ let bS = dm._7
752+ let cj = dm._9
753+ let cO = dm._10
754+ let cP = dm._11
755+ let eV = dm._12
756+ let eW = dm._13
757+ let dp = invoke(aB, "emit", [cN], nil)
758+ if ((dp == dp))
757759 then {
758- let dT = invoke(aN, "emit", [da], nil)
759- if ((dT == dT))
760+ let dq = {
761+ let dr = dp
762+ if ($isInstanceOf(dr, "Address"))
763+ then {
764+ let ds = dr
765+ invoke(ds, "emit", [cN], nil)
766+ }
767+ else unit
768+ }
769+ if ((dq == dq))
760770 then {
761- let dU = {
762- let dV = dT
763- if ($isInstanceOf(dV, "Address"))
764- then {
765- let dW = dV
766- invoke(dW, "emit", [da], nil)
767- }
768- else unit
769- }
770- if ((dU == dU))
771+ let eX = if ((cO > 0))
772+ then invoke(bb, "put", nil, [AttachedPayment(eV, cO)])
773+ else nil
774+ if ((eX == eX))
771775 then {
772- let fo = if ((db > 0))
773- then invoke(bn, "put", nil, [AttachedPayment(fm, db)])
776+ let eY = if ((cP > 0))
777+ then invoke(bb, "put", nil, [AttachedPayment(eW, cP)])
774778 else nil
775- if ((fo == fo))
779+ if ((eY == eY))
776780 then {
777- let fp = if ((dc > 0))
778- then invoke(bn, "put", nil, [AttachedPayment(fn, dc)])
779- else nil
780- if ((fp == fp))
781+ let eZ = if (eU)
781782 then {
782- let fq = if (fl)
783- then {
784- let fr = invoke(bm, "stake", nil, [AttachedPayment(cf, da)])
785- if ((fr == fr))
786- then nil
787- else throw("Strict value is not equal to itself.")
788- }
789- else [ScriptTransfer(dK.caller, da, cf)]
790- let fs = ds(0, 0, 0)
791- if ((fs == fs))
792- then {
793- let dj = fs._2
794- let ft = fs._1
795- let fu = dw(dr, dj)
796- if ((fu == fu))
797- then ((cw ++ fq) ++ ft)
798- else throw("Strict value is not equal to itself.")
799- }
783+ let fa = invoke(ba, "stake", nil, [AttachedPayment(bS, cN)])
784+ if ((fa == fa))
785+ then nil
800786 else throw("Strict value is not equal to itself.")
801787 }
802- else throw("Strict value is not equal to itself.")
788+ else [ScriptTransfer(dg.caller, cN, bS)]
789+ (cj ++ eZ)
803790 }
804791 else throw("Strict value is not equal to itself.")
805792 }
806793 else throw("Strict value is not equal to itself.")
807794 }
808795 else throw("Strict value is not equal to itself.")
809796 }
810797 else throw("Strict value is not equal to itself.")
811798 }
812799
813800
814801
815-@Callable(dK)
816-func putForFree (fv) = if ((0 > fv))
802+@Callable(dg)
803+func putForFree (fb) = if ((0 > fb))
817804 then throw("Invalid value passed")
818805 else {
819- let dQ = dN(dK, fv, false)
820- let cw = dQ._9
821- let dO = toBigInt(value(dK.payments[0]).amount)
822- let dP = toBigInt(value(dK.payments[1]).amount)
823- let dr = dk(dO, dP, toBigInt(0))
824- if ((dr == dr))
825- then {
826- let fw = ds(0, 0, 0)
827- let ft = fw._1
828- let dj = fw._2
829- let fu = dw(dr, dj)
830- if ((fu == fu))
831- then (cw ++ ft)
832- else throw("Strict value is not equal to itself.")
833- }
834- else throw("Strict value is not equal to itself.")
806+ let dm = dj(dg, fb, false)
807+ dm._9
835808 }
836809
837810
838811
839-@Callable(dK)
840-func putOneTkn (fx,fy) = {
841- let fz = {
842- let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
843- if ($isInstanceOf(aQ, "Boolean"))
844- then aQ
845- else throw(($getType(aQ) + " couldn't be cast to Boolean"))
812+@Callable(dg)
813+func putOneTkn (fc,fd) = {
814+ let fe = {
815+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
816+ if ($isInstanceOf(aE, "Boolean"))
817+ then aE
818+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
846819 }
847- let fA = if (if (if (aS())
820+ let ff = if (if (if (aG())
848821 then true
849- else (bf == l))
822+ else (aT == l))
850823 then true
851- else (bf == n))
824+ else (aT == n))
852825 then true
853- else fz
854- let eG = [if (if (!(fA))
826+ else fe
827+ let ef = [if (if (!(ff))
855828 then true
856- else fb(dK))
829+ else ez(dg))
857830 then true
858- else aK("put operation is blocked by admin"), if ((size(dK.payments) == 1))
831+ else az("put operation is blocked by admin"), if ((size(dg.payments) == 1))
859832 then true
860- else aK("exactly 1 payment are expected")]
861- if ((eG == eG))
833+ else az("exactly 1 payment are expected")]
834+ if ((ef == ef))
862835 then {
863- let fB = dK.payments[0]
864- let eb = fB.assetId
865- let ea = fB.amount
866- let dr = if ((eb == bh))
867- then dk(toBigInt(ea), toBigInt(0), toBigInt(0))
868- else if ((eb == bi))
869- then dk(toBigInt(0), toBigInt(ea), toBigInt(0))
870- else aK("payment asset is not supported")
871- if ((dr == dr))
836+ let fg = dg.payments[0]
837+ let dy = fg.assetId
838+ let dx = fg.amount
839+ let Y = dg.caller
840+ let Z = dg.transactionId
841+ let fh = dw(dx, dy, Y, Z)
842+ if ((fh == fh))
872843 then {
873- let aa = dK.caller
874- let ab = dK.transactionId
875- let fC = dZ(ea, eb, aa, ab)
876- if ((fC == fC))
844+ let fi = fh._4
845+ let dv = fh._3
846+ let cQ = fh._2
847+ let fj = fh._1
848+ let fk = if (if ((fc > 0))
849+ then (fc > fj)
850+ else false)
851+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
852+ else fj
853+ let dp = dn(fk)
854+ if ((dp == dp))
877855 then {
878- let ef = fC._5
879- let fD = fC._4
880- let dY = fC._3
881- let dd = fC._2
882- let fE = fC._1
883- let fF = if (if ((fx > 0))
884- then (fx > fE)
856+ let eZ = if (fd)
857+ then {
858+ let fl = invoke(ba, "stake", nil, [AttachedPayment(aU, fk)])
859+ if ((fl == fl))
860+ then nil
861+ else throw("Strict value is not equal to itself.")
862+ }
863+ else [ScriptTransfer(dg.caller, fk, aU)]
864+ let fm = if ((dv > 0))
865+ then [ScriptTransfer(aC, dv, dy)]
866+ else nil
867+ $Tuple2(((cQ ++ eZ) ++ fm), fk)
868+ }
869+ else throw("Strict value is not equal to itself.")
870+ }
871+ else throw("Strict value is not equal to itself.")
872+ }
873+ else throw("Strict value is not equal to itself.")
874+ }
875+
876+
877+
878+@Callable(dg)
879+func putOneTknREADONLY (dy,dx) = {
880+ let fn = dw(dx, aL(dy), unit, unit)
881+ let fj = fn._1
882+ let cQ = fn._2
883+ let dv = fn._3
884+ let fi = fn._4
885+ $Tuple2(nil, $Tuple3(fj, dv, fi))
886+ }
887+
888+
889+
890+@Callable(dg)
891+func getOneTkn (fo,fc) = {
892+ let fe = {
893+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
894+ if ($isInstanceOf(aE, "Boolean"))
895+ then aE
896+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
897+ }
898+ let fp = if (if (aG())
899+ then true
900+ else (aT == n))
901+ then true
902+ else fe
903+ let ef = [if (if (!(fp))
904+ then true
905+ else ez(dg))
906+ then true
907+ else az("get operation is blocked by admin"), if ((size(dg.payments) == 1))
908+ then true
909+ else az("exactly 1 payment are expected")]
910+ if ((ef == ef))
911+ then {
912+ let ee = aL(fo)
913+ let fg = dg.payments[0]
914+ let dy = fg.assetId
915+ let dM = fg.amount
916+ let Y = dg.caller
917+ let Z = dg.transactionId
918+ let fq = ed(ee, dM, dy, Y, Z)
919+ if ((fq == fq))
920+ then {
921+ let fi = fq._4
922+ let dv = fq._3
923+ let cQ = fq._2
924+ let fr = fq._1
925+ let do = if (if ((fc > 0))
926+ then (fc > fr)
927+ else false)
928+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
929+ else fr
930+ let fs = invoke(aB, "burn", [dM], [AttachedPayment(dy, dM)])
931+ if ((fs == fs))
932+ then {
933+ let ft = [ScriptTransfer(Y, do, ee)]
934+ let fm = if ((dv > 0))
935+ then [ScriptTransfer(aC, dv, ee)]
936+ else nil
937+ $Tuple2(((cQ ++ ft) ++ fm), do)
938+ }
939+ else throw("Strict value is not equal to itself.")
940+ }
941+ else throw("Strict value is not equal to itself.")
942+ }
943+ else throw("Strict value is not equal to itself.")
944+ }
945+
946+
947+
948+@Callable(dg)
949+func getOneTknREADONLY (ee,dM) = {
950+ let fu = ed(aL(ee), dM, aU, unit, unit)
951+ let fr = fu._1
952+ let cQ = fu._2
953+ let dv = fu._3
954+ let fi = fu._4
955+ $Tuple2(nil, $Tuple3(fr, dv, fi))
956+ }
957+
958+
959+
960+@Callable(dg)
961+func unstakeAndGetOneTkn (fv,fo,fc) = {
962+ let fe = {
963+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
964+ if ($isInstanceOf(aE, "Boolean"))
965+ then aE
966+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
967+ }
968+ let fp = if (if (aG())
969+ then true
970+ else (aT == n))
971+ then true
972+ else fe
973+ let ef = [if (if (!(fp))
974+ then true
975+ else ez(dg))
976+ then true
977+ else az("get operation is blocked by admin"), if ((size(dg.payments) == 0))
978+ then true
979+ else az("no payments are expected")]
980+ if ((ef == ef))
981+ then {
982+ let ee = aL(fo)
983+ let Y = dg.caller
984+ let Z = dg.transactionId
985+ let fw = invoke(ba, "unstake", [toBase58String(aU), fv], nil)
986+ if ((fw == fw))
987+ then {
988+ let fx = ed(ee, fv, aU, Y, Z)
989+ if ((fx == fx))
990+ then {
991+ let fi = fx._4
992+ let dv = fx._3
993+ let cQ = fx._2
994+ let fr = fx._1
995+ let do = if (if ((fc > 0))
996+ then (fc > fr)
885997 else false)
886- then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
887- else fE
888- let dT = dR(fF)
889- if ((dT == dT))
998+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
999+ else fr
1000+ let fs = invoke(aB, "burn", [fv], [AttachedPayment(aU, fv)])
1001+ if ((fs == fs))
8901002 then {
891- let fq = if (fy)
892- then {
893- let fG = invoke(bm, "stake", nil, [AttachedPayment(bg, fF)])
894- if ((fG == fG))
895- then nil
896- else throw("Strict value is not equal to itself.")
897- }
898- else [ScriptTransfer(dK.caller, fF, bg)]
899- let fH = if ((dY > 0))
900- then [ScriptTransfer(aO, dY, eb)]
1003+ let ft = [ScriptTransfer(dg.caller, do, ee)]
1004+ let fm = if ((dv > 0))
1005+ then [ScriptTransfer(aC, dv, ee)]
9011006 else nil
902- let fI = if ((this == aO))
903- then $Tuple2(0, 0)
904- else if (ef)
905- then $Tuple2(-(dY), 0)
906- else $Tuple2(0, -(dY))
907- let dt = fI._1
908- let du = fI._2
909- let fJ = ds(dt, du, 0)
910- let ft = fJ._1
911- let dj = fJ._2
912- let dD = value(getString(ai))
913- let fu = dw(dr, dj)
914- if ((fu == fu))
915- then $Tuple2((((dd ++ fq) ++ fH) ++ ft), fF)
916- else throw("Strict value is not equal to itself.")
1007+ $Tuple2(((cQ ++ ft) ++ fm), do)
9171008 }
9181009 else throw("Strict value is not equal to itself.")
9191010 }
9201011 else throw("Strict value is not equal to itself.")
9211012 }
9221013 else throw("Strict value is not equal to itself.")
9231014 }
9241015 else throw("Strict value is not equal to itself.")
9251016 }
9261017
9271018
9281019
929-@Callable(dK)
930-func putOneTknREADONLY (eb,ea) = {
931- let fK = dZ(ea, aX(eb), unit, unit)
932- let fE = fK._1
933- let dd = fK._2
934- let dY = fK._3
935- let fD = fK._4
936- let ef = fK._5
937- $Tuple2(nil, $Tuple3(fE, dY, fD))
1020+@Callable(dg)
1021+func get () = {
1022+ let cB = df(dg)
1023+ let fy = cB._1
1024+ let ci = cB._2
1025+ let di = cB._3
1026+ let bQ = cB._4
1027+ let cj = cB._5
1028+ let fz = invoke(aB, "burn", [di], [AttachedPayment(bQ, di)])
1029+ if ((fz == fz))
1030+ then cj
1031+ else throw("Strict value is not equal to itself.")
9381032 }
9391033
9401034
9411035
942-@Callable(dK)
943-func getOneTkn (fL,fx) = {
944- let fz = {
945- let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
946- if ($isInstanceOf(aQ, "Boolean"))
947- then aQ
948- else throw(($getType(aQ) + " couldn't be cast to Boolean"))
949- }
950- let fM = if (if (aS())
951- then true
952- else (bf == n))
953- then true
954- else fz
955- let eG = [if (if (!(fM))
956- then true
957- else fb(dK))
958- then true
959- else aK("get operation is blocked by admin"), if ((size(dK.payments) == 1))
960- then true
961- else aK("exactly 1 payment are expected")]
962- if ((eG == eG))
1036+@Callable(dg)
1037+func getNoLess (fA,fB) = {
1038+ let cB = df(dg)
1039+ let ch = cB._1
1040+ let ci = cB._2
1041+ let di = cB._3
1042+ let bQ = cB._4
1043+ let cj = cB._5
1044+ if ((fA > ch))
1045+ then throw(((("noLessThenAmtAsset failed: " + toString(ch)) + " < ") + toString(fA)))
1046+ else if ((fB > ci))
1047+ then throw(((("noLessThenPriceAsset failed: " + toString(ci)) + " < ") + toString(fB)))
1048+ else {
1049+ let fz = invoke(aB, "burn", [di], [AttachedPayment(bQ, di)])
1050+ if ((fz == fz))
1051+ then cj
1052+ else throw("Strict value is not equal to itself.")
1053+ }
1054+ }
1055+
1056+
1057+
1058+@Callable(dg)
1059+func unstakeAndGet (do) = {
1060+ let fC = if ((size(dg.payments) != 0))
1061+ then throw("No payments are expected")
1062+ else true
1063+ if ((fC == fC))
9631064 then {
964- let eF = aX(fL)
965- let fB = dK.payments[0]
966- let eb = fB.assetId
967- let en = fB.amount
968- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
969- if ((dr == dr))
1065+ let bF = aI()
1066+ let bS = fromBase58String(bF[q])
1067+ let fw = invoke(ba, "unstake", [toBase58String(bS), do], nil)
1068+ if ((fw == fw))
9701069 then {
971- let aa = dK.caller
972- let ab = dK.transactionId
973- let fN = eE(eF, en, eb, aa, ab)
974- if ((fN == fN))
1070+ let cB = bO(toBase58String(dg.transactionId), toBase58String(bS), do, dg.caller)
1071+ let bV = parseIntValue(cB._9)
1072+ let cj = cB._10
1073+ let fD = if (if (aG())
1074+ then true
1075+ else (bV == n))
1076+ then throw(("Get operation is blocked by admin. Status = " + toString(bV)))
1077+ else true
1078+ if ((fD == fD))
9751079 then {
976- let eH = fN._5
977- let fD = fN._4
978- let dY = fN._3
979- let dd = fN._2
980- let fO = fN._1
981- let dS = if (if ((fx > 0))
982- then (fx > fO)
983- else false)
984- then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
985- else fO
986- let fP = invoke(aN, "burn", [en], [AttachedPayment(eb, en)])
987- if ((fP == fP))
988- then {
989- let fQ = [ScriptTransfer(aa, dS, eF)]
990- let fH = if ((dY > 0))
991- then [ScriptTransfer(aO, dY, eF)]
992- else nil
993- let fR = {
994- let fS = if ((this == aO))
995- then 0
996- else dY
997- if (eH)
998- then $Tuple2(-((dS + fS)), 0)
999- else $Tuple2(0, -((dS + fS)))
1000- }
1001- let dt = fR._1
1002- let du = fR._2
1003- let fT = ds(dt, du, 0)
1004- let ft = fT._1
1005- let dj = fT._2
1006- let fu = dw(dr, dj)
1007- if ((fu == fu))
1008- then $Tuple2((((dd ++ fQ) ++ fH) ++ ft), dS)
1009- else throw("Strict value is not equal to itself.")
1010- }
1080+ let fz = invoke(aB, "burn", [do], [AttachedPayment(bS, do)])
1081+ if ((fz == fz))
1082+ then cj
10111083 else throw("Strict value is not equal to itself.")
10121084 }
10131085 else throw("Strict value is not equal to itself.")
10141086 }
10151087 else throw("Strict value is not equal to itself.")
10161088 }
10171089 else throw("Strict value is not equal to itself.")
10181090 }
10191091
10201092
10211093
1022-@Callable(dK)
1023-func getOneTknREADONLY (eF,en) = {
1024- let fU = eE(aX(eF), en, bg, unit, unit)
1025- let fO = fU._1
1026- let dd = fU._2
1027- let dY = fU._3
1028- let fD = fU._4
1029- let eH = fU._5
1030- $Tuple2(nil, $Tuple3(fO, dY, fD))
1031- }
1032-
1033-
1034-
1035-@Callable(dK)
1036-func unstakeAndGetOneTkn (fV,fL,fx) = {
1037- let fz = {
1038- let aQ = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1039- if ($isInstanceOf(aQ, "Boolean"))
1040- then aQ
1041- else throw(($getType(aQ) + " couldn't be cast to Boolean"))
1042- }
1043- let fM = if (if (aS())
1094+@Callable(dg)
1095+func unstakeAndGetNoLess (fv,fE,fB) = {
1096+ let fp = if (aG())
10441097 then true
1045- else (bf == n))
1098+ else (aT == n)
1099+ let ef = [if (!(fp))
10461100 then true
1047- else fz
1048- let eG = [if (if (!(fM))
1101+ else throw("get operation is blocked by admin"), if ((size(dg.payments) == 0))
10491102 then true
1050- else fb(dK))
1051- then true
1052- else aK("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1053- then true
1054- else aK("no payments are expected")]
1055- if ((eG == eG))
1103+ else throw("no payments are expected")]
1104+ if ((ef == ef))
10561105 then {
1057- let eF = aX(fL)
1058- let aa = dK.caller
1059- let ab = dK.transactionId
1060- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1061- if ((dr == dr))
1106+ let fw = invoke(ba, "unstake", [toBase58String(aU), fv], nil)
1107+ if ((fw == fw))
10621108 then {
1063- let fW = invoke(bm, "unstake", [toBase58String(bg), fV], nil)
1064- if ((fW == fW))
1109+ let cB = bO(toBase58String(dg.transactionId), toBase58String(aU), fv, dg.caller)
1110+ let ch = cB._1
1111+ let ci = cB._2
1112+ let cj = cB._10
1113+ let fF = [if ((ch >= fE))
1114+ then true
1115+ else throw(makeString(["amount asset amount to receive is less than ", toString(fE)], "")), if ((ci >= fB))
1116+ then true
1117+ else throw(makeString(["price asset amount to receive is less than ", toString(fB)], ""))]
1118+ if ((fF == fF))
10651119 then {
1066- let fX = eE(eF, fV, bg, aa, ab)
1067- if ((fX == fX))
1068- then {
1069- let eH = fX._5
1070- let fD = fX._4
1071- let dY = fX._3
1072- let dd = fX._2
1073- let fO = fX._1
1074- let dS = if (if ((fx > 0))
1075- then (fx > fO)
1076- else false)
1077- then aK(makeString(["amount to receive is less than ", toString(fx)], ""))
1078- else fO
1079- let fP = invoke(aN, "burn", [fV], [AttachedPayment(bg, fV)])
1080- if ((fP == fP))
1081- then {
1082- let fQ = [ScriptTransfer(dK.caller, dS, eF)]
1083- let fH = if ((dY > 0))
1084- then [ScriptTransfer(aO, dY, eF)]
1085- else nil
1086- let fY = {
1087- let fS = if ((this == aO))
1088- then 0
1089- else dY
1090- if (eH)
1091- then $Tuple2(-((dS + fS)), 0)
1092- else $Tuple2(0, -((dS + fS)))
1093- }
1094- let dt = fY._1
1095- let du = fY._2
1096- let fZ = ds(dt, du, 0)
1097- let ft = fZ._1
1098- let dj = fZ._2
1099- let fu = dw(dr, dj)
1100- if ((fu == fu))
1101- then $Tuple2((((dd ++ fQ) ++ fH) ++ ft), dS)
1102- else throw("Strict value is not equal to itself.")
1103- }
1104- else throw("Strict value is not equal to itself.")
1105- }
1120+ let fz = invoke(aB, "burn", [fv], [AttachedPayment(aU, fv)])
1121+ if ((fz == fz))
1122+ then cj
11061123 else throw("Strict value is not equal to itself.")
11071124 }
11081125 else throw("Strict value is not equal to itself.")
11091126 }
11101127 else throw("Strict value is not equal to itself.")
11111128 }
11121129 else throw("Strict value is not equal to itself.")
11131130 }
11141131
11151132
11161133
1117-@Callable(dK)
1118-func get () = {
1119- let cO = dJ(dK)
1120- let ga = cO._1
1121- let cv = cO._2
1122- let dM = cO._3
1123- let cd = cO._4
1124- let cw = cO._5
1125- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1126- if ((dr == dr))
1127- then {
1128- let gb = invoke(aN, "burn", [dM], [AttachedPayment(cd, dM)])
1129- if ((gb == gb))
1130- then {
1131- let gc = ds(-(ga), -(cv), 0)
1132- let ft = gc._1
1133- let dj = gc._2
1134- let fu = dw(dr, dj)
1135- if ((fu == fu))
1136- then (cw ++ ft)
1137- else throw("Strict value is not equal to itself.")
1138- }
1139- else throw("Strict value is not equal to itself.")
1140- }
1141- else throw("Strict value is not equal to itself.")
1134+@Callable(dg)
1135+func activate (fG,fH) = if ((toString(dg.caller) != toString(aB)))
1136+ then throw("permissions denied")
1137+ else $Tuple2([StringEntry(ab(), fG), StringEntry(ac(), fH)], "success")
1138+
1139+
1140+
1141+@Callable(dg)
1142+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aI())
1143+
1144+
1145+
1146+@Callable(dg)
1147+func getAccBalanceWrapperREADONLY (bs) = $Tuple2(nil, br(bs))
1148+
1149+
1150+
1151+@Callable(dg)
1152+func calcPricesWrapperREADONLY (bz,bA,bE) = {
1153+ let bN = bD(bz, bA, bE)
1154+ $Tuple2(nil, [toString(bN[0]), toString(bN[1]), toString(bN[2])])
11421155 }
11431156
11441157
11451158
1146-@Callable(dK)
1147-func getNoLess (gd,ge) = {
1148- let cO = dJ(dK)
1149- let cu = cO._1
1150- let cv = cO._2
1151- let dM = cO._3
1152- let cd = cO._4
1153- let cw = cO._5
1154- if ((gd > cu))
1155- then throw(((("noLessThenAmtAsset failed: " + toString(cu)) + " < ") + toString(gd)))
1156- else if ((ge > cv))
1157- then throw(((("noLessThenPriceAsset failed: " + toString(cv)) + " < ") + toString(ge)))
1158- else {
1159- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1160- if ((dr == dr))
1161- then {
1162- let gb = invoke(aN, "burn", [dM], [AttachedPayment(cd, dM)])
1163- if ((gb == gb))
1164- then {
1165- let gf = ds(-(cu), -(cv), 0)
1166- let ft = gf._1
1167- let dj = gf._2
1168- let fu = dw(dr, dj)
1169- if ((fu == fu))
1170- then (cw ++ ft)
1171- else throw("Strict value is not equal to itself.")
1172- }
1173- else throw("Strict value is not equal to itself.")
1174- }
1175- else throw("Strict value is not equal to itself.")
1176- }
1159+@Callable(dg)
1160+func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
1161+
1162+
1163+
1164+@Callable(dg)
1165+func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
1166+
1167+
1168+
1169+@Callable(dg)
1170+func calcPriceBigIntWrapperREADONLY (bu,bv) = $Tuple2(nil, toString(bt(parseBigIntValue(bu), parseBigIntValue(bv))))
1171+
1172+
1173+
1174+@Callable(dg)
1175+func estimatePutOperationWrapperREADONLY (bP,cl,cm,cn,co,cp,Y,cq,cr) = $Tuple2(nil, ck(bP, cl, cm, cn, co, cp, Y, cq, cr))
1176+
1177+
1178+
1179+@Callable(dg)
1180+func estimateGetOperationWrapperREADONLY (bP,bQ,bR,Y) = {
1181+ let cB = bO(bP, bQ, bR, addressFromStringValue(Y))
1182+ $Tuple2(nil, $Tuple10(cB._1, cB._2, cB._3, cB._4, cB._5, cB._6, cB._7, toString(cB._8), cB._9, cB._10))
11771183 }
11781184
11791185
11801186
1181-@Callable(dK)
1182-func unstakeAndGet (dS) = {
1183- let gg = if ((size(dK.payments) != 0))
1184- then throw("No payments are expected")
1185- else true
1186- if ((gg == gg))
1187- then {
1188- let bS = aU()
1189- let cf = fromBase58String(bS[q])
1190- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1191- if ((dr == dr))
1192- then {
1193- let fW = invoke(bm, "unstake", [toBase58String(cf), dS], nil)
1194- if ((fW == fW))
1195- then {
1196- let cO = cb(toBase58String(dK.transactionId), toBase58String(cf), dS, dK.caller)
1197- let cu = cO._1
1198- let cv = cO._2
1199- let ci = parseIntValue(cO._9)
1200- let cw = cO._10
1201- let gh = if (if (aS())
1202- then true
1203- else (ci == n))
1204- then throw(("Get operation is blocked by admin. Status = " + toString(ci)))
1205- else true
1206- if ((gh == gh))
1207- then {
1208- let gb = invoke(aN, "burn", [dS], [AttachedPayment(cf, dS)])
1209- if ((gb == gb))
1210- then {
1211- let gi = ds(-(cu), -(cv), 0)
1212- let ft = gi._1
1213- let dj = gi._2
1214- let fu = dw(dr, dj)
1215- if ((fu == fu))
1216- then (cw ++ ft)
1217- else throw("Strict value is not equal to itself.")
1218- }
1219- else throw("Strict value is not equal to itself.")
1220- }
1221- else throw("Strict value is not equal to itself.")
1222- }
1223- else throw("Strict value is not equal to itself.")
1224- }
1225- else throw("Strict value is not equal to itself.")
1226- }
1227- else throw("Strict value is not equal to itself.")
1187+@Callable(dg)
1188+func statsREADONLY () = {
1189+ let bF = aI()
1190+ let bS = fromBase58String(bF[q])
1191+ let cT = bF[r]
1192+ let cU = bF[s]
1193+ let cu = bF[v]
1194+ let cv = bF[w]
1195+ let bG = parseIntValue(bF[t])
1196+ let bH = parseIntValue(bF[u])
1197+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1198+ let cV = br(cT)
1199+ let cW = br(cU)
1200+ let fJ = if ((fI == 0))
1201+ then [e, e, e]
1202+ else bD(cV, cW, fI)
1203+ let cc = 0
1204+ let fK = G(fJ[1], b)
1205+ let fL = G(fJ[2], b)
1206+ let fM = value(getInteger(aB, an(toString(this))))
1207+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cV), toString(cW), toString(fI), toString(cc), toString(fK), toString(fL), toString(fM)], j))
12281208 }
12291209
12301210
12311211
1232-@Callable(dK)
1233-func unstakeAndGetNoLess (fV,gj,ge) = {
1234- let fM = if (aS())
1235- then true
1236- else (bf == n)
1237- let eG = [if (!(fM))
1238- then true
1239- else throw("get operation is blocked by admin"), if ((size(dK.payments) == 0))
1240- then true
1241- else throw("no payments are expected")]
1242- if ((eG == eG))
1243- then {
1244- let dr = dk(toBigInt(0), toBigInt(0), toBigInt(0))
1245- if ((dr == dr))
1246- then {
1247- let fW = invoke(bm, "unstake", [toBase58String(bg), fV], nil)
1248- if ((fW == fW))
1249- then {
1250- let cO = cb(toBase58String(dK.transactionId), toBase58String(bg), fV, dK.caller)
1251- let cu = cO._1
1252- let cv = cO._2
1253- let cw = cO._10
1254- let gk = [if ((cu >= gj))
1255- then true
1256- else throw(makeString(["amount asset amount to receive is less than ", toString(gj)], "")), if ((cv >= ge))
1257- then true
1258- else throw(makeString(["price asset amount to receive is less than ", toString(ge)], ""))]
1259- if ((gk == gk))
1260- then {
1261- let gb = invoke(aN, "burn", [fV], [AttachedPayment(bg, fV)])
1262- if ((gb == gb))
1263- then {
1264- let gl = ds(-(cu), -(cv), 0)
1265- let ft = gl._1
1266- let dj = gl._2
1267- let fu = dw(dr, dj)
1268- if ((fu == fu))
1269- then (cw ++ ft)
1270- else throw("Strict value is not equal to itself.")
1271- }
1272- else throw("Strict value is not equal to itself.")
1273- }
1274- else throw("Strict value is not equal to itself.")
1275- }
1276- else throw("Strict value is not equal to itself.")
1277- }
1278- else throw("Strict value is not equal to itself.")
1279- }
1280- else throw("Strict value is not equal to itself.")
1212+@Callable(dg)
1213+func evaluatePutByAmountAssetREADONLY (cm) = {
1214+ let bF = aI()
1215+ let bS = fromBase58String(bF[q])
1216+ let cs = bF[r]
1217+ let bT = fromBase58String(cs)
1218+ let ct = bF[s]
1219+ let bU = fromBase58String(ct)
1220+ let bG = parseIntValue(bF[t])
1221+ let bH = parseIntValue(bF[u])
1222+ let bV = bF[p]
1223+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1224+ let cV = br(cs)
1225+ let cW = br(ct)
1226+ let bB = D(cV, bG)
1227+ let bC = D(cW, bH)
1228+ let cb = if ((fI == 0))
1229+ then e
1230+ else bt(bC, bB)
1231+ let cy = D(cm, bG)
1232+ let cz = fraction(cy, cb, d)
1233+ let co = G(cz, bH)
1234+ let dm = ck("", 500000, cm, bT, co, bU, "", true, false)
1235+ let cJ = dm._1
1236+ let fN = dm._3
1237+ let bX = dm._4
1238+ let bZ = dm._5
1239+ let bW = dm._6
1240+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cJ), toString(G(cb, b)), toString(bX), toString(bZ), toString(bW), bV, toString(cm), toString(co)], j))
12811241 }
12821242
12831243
12841244
1285-@Callable(dK)
1286-func activate (gm,gn) = if ((toString(dK.caller) != toString(aN)))
1287- then throw("permissions denied")
1288- else $Tuple2([StringEntry(ad(), gm), StringEntry(ae(), gn)], "success")
1289-
1290-
1291-
1292-@Callable(dK)
1293-func refreshKLp () = {
1294- let go = valueOrElse(getInteger(aj), 0)
1295- let gp = if (((height - go) >= am))
1296- then unit
1297- else aK(makeString([toString(am), " blocks have not passed since the previous call"], ""))
1298- if ((gp == gp))
1299- then {
1300- let dD = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ai), "0")), aM("invalid kLp"))
1301- let gq = ds(0, 0, 0)
1302- let gr = gq._1
1303- let dj = gq._2
1304- let dv = if ((dD != dj))
1305- then gr
1306- else aK("nothing to refresh")
1307- $Tuple2(dv, toString(dj))
1308- }
1309- else throw("Strict value is not equal to itself.")
1245+@Callable(dg)
1246+func evaluatePutByPriceAssetREADONLY (co) = {
1247+ let bF = aI()
1248+ let bS = fromBase58String(bF[q])
1249+ let cs = bF[r]
1250+ let bT = fromBase58String(cs)
1251+ let ct = bF[s]
1252+ let bU = fromBase58String(ct)
1253+ let bG = parseIntValue(bF[t])
1254+ let bH = parseIntValue(bF[u])
1255+ let bV = bF[p]
1256+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1257+ let fO = br(cs)
1258+ let fP = br(ct)
1259+ let fQ = D(fO, bG)
1260+ let fR = D(fP, bH)
1261+ let cb = if ((fI == 0))
1262+ then e
1263+ else bt(fR, fQ)
1264+ let cz = D(co, bH)
1265+ let cy = fraction(cz, d, cb)
1266+ let cm = G(cy, bG)
1267+ let dm = ck("", 500000, cm, bT, co, bU, "", true, false)
1268+ let cJ = dm._1
1269+ let fN = dm._3
1270+ let bX = dm._4
1271+ let bZ = dm._5
1272+ let bW = dm._6
1273+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cJ), toString(G(cb, b)), toString(bX), toString(bZ), toString(bW), bV, toString(cm), toString(co)], j))
13101274 }
13111275
13121276
13131277
1314-@Callable(dK)
1315-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aU())
1316-
1317-
1318-
1319-@Callable(dK)
1320-func getAccBalanceWrapperREADONLY (bE) = $Tuple2(nil, bD(bE))
1321-
1322-
1323-
1324-@Callable(dK)
1325-func calcPricesWrapperREADONLY (bM,bN,bR) = {
1326- let ca = bQ(bM, bN, bR)
1327- $Tuple2(nil, [toString(ca[0]), toString(ca[1]), toString(ca[2])])
1278+@Callable(dg)
1279+func evaluateGetREADONLY (fS,fT) = {
1280+ let cB = bO("", fS, fT, this)
1281+ let ch = cB._1
1282+ let ci = cB._2
1283+ let bX = cB._5
1284+ let bZ = cB._6
1285+ let bW = cB._7
1286+ let cc = cB._8
1287+ let bV = parseIntValue(cB._9)
1288+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(ch), toString(ci), toString(bX), toString(bZ), toString(bW), toString(cc), toString(bV)], j))
13281289 }
13291290
13301291
1331-
1332-@Callable(dK)
1333-func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
1334-
1335-
1336-
1337-@Callable(dK)
1338-func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J))
1339-
1340-
1341-
1342-@Callable(dK)
1343-func calcPriceBigIntWrapperREADONLY (bG,bH) = $Tuple2(nil, toString(bF(parseBigIntValue(bG), parseBigIntValue(bH))))
1344-
1345-
1346-
1347-@Callable(dK)
1348-func estimatePutOperationWrapperREADONLY (cc,cy,cz,cA,cB,cC,aa,cD,cE) = $Tuple2(nil, cx(cc, cy, cz, cA, cB, cC, aa, cD, cE))
1349-
1350-
1351-
1352-@Callable(dK)
1353-func estimateGetOperationWrapperREADONLY (cc,cd,ce,aa) = {
1354- let cO = cb(cc, cd, ce, addressFromStringValue(aa))
1355- $Tuple2(nil, $Tuple10(cO._1, cO._2, cO._3, cO._4, cO._5, cO._6, cO._7, toString(cO._8), cO._9, cO._10))
1356- }
1357-
1358-
1359-
1360-@Callable(dK)
1361-func statsREADONLY () = {
1362- let bS = aU()
1363- let cf = fromBase58String(bS[q])
1364- let gs = bS[r]
1365- let gt = bS[s]
1366- let cH = bS[v]
1367- let cI = bS[w]
1368- let bT = parseIntValue(bS[t])
1369- let bU = parseIntValue(bS[u])
1370- let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1371- let gv = bD(gs)
1372- let gw = bD(gt)
1373- let gx = if ((gu == 0))
1374- then [e, e, e]
1375- else bQ(gv, gw, gu)
1376- let cp = 0
1377- let gy = H(gx[1], b)
1378- let gz = H(gx[2], b)
1379- let gA = value(getInteger(aN, ax(toString(this))))
1380- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gv), toString(gw), toString(gu), toString(cp), toString(gy), toString(gz), toString(gA)], j))
1381- }
1382-
1383-
1384-
1385-@Callable(dK)
1386-func evaluatePutByAmountAssetREADONLY (cz) = {
1387- let bS = aU()
1388- let cf = fromBase58String(bS[q])
1389- let cF = bS[r]
1390- let cg = fromBase58String(cF)
1391- let cG = bS[s]
1392- let ch = fromBase58String(cG)
1393- let bT = parseIntValue(bS[t])
1394- let bU = parseIntValue(bS[u])
1395- let ci = bS[p]
1396- let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1397- let gv = bD(cF)
1398- let gw = bD(cG)
1399- let bO = D(gv, bT)
1400- let bP = D(gw, bU)
1401- let co = if ((gu == 0))
1402- then e
1403- else bF(bP, bO)
1404- let cL = D(cz, bT)
1405- let cM = fraction(cL, co, d)
1406- let cB = H(cM, bU)
1407- let dQ = cx("", 500000, cz, cg, cB, ch, "", true, false)
1408- let cW = dQ._1
1409- let gB = dQ._3
1410- let ck = dQ._4
1411- let cm = dQ._5
1412- let cj = dQ._6
1413- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cW), toString(H(co, b)), toString(ck), toString(cm), toString(cj), ci, toString(cz), toString(cB)], j))
1414- }
1415-
1416-
1417-
1418-@Callable(dK)
1419-func evaluatePutByPriceAssetREADONLY (cB) = {
1420- let bS = aU()
1421- let cf = fromBase58String(bS[q])
1422- let cF = bS[r]
1423- let cg = fromBase58String(cF)
1424- let cG = bS[s]
1425- let ch = fromBase58String(cG)
1426- let bT = parseIntValue(bS[t])
1427- let bU = parseIntValue(bS[u])
1428- let ci = bS[p]
1429- let gu = valueOrErrorMessage(assetInfo(cf), (("Asset " + toBase58String(cf)) + " doesn't exist")).quantity
1430- let gC = bD(cF)
1431- let gD = bD(cG)
1432- let gE = D(gC, bT)
1433- let gF = D(gD, bU)
1434- let co = if ((gu == 0))
1435- then e
1436- else bF(gF, gE)
1437- let cM = D(cB, bU)
1438- let cL = fraction(cM, d, co)
1439- let cz = H(cL, bT)
1440- let dQ = cx("", 500000, cz, cg, cB, ch, "", true, false)
1441- let cW = dQ._1
1442- let gB = dQ._3
1443- let ck = dQ._4
1444- let cm = dQ._5
1445- let cj = dQ._6
1446- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cW), toString(H(co, b)), toString(ck), toString(cm), toString(cj), ci, toString(cz), toString(cB)], j))
1447- }
1448-
1449-
1450-
1451-@Callable(dK)
1452-func evaluateGetREADONLY (gG,gH) = {
1453- let cO = cb("", gG, gH, this)
1454- let cu = cO._1
1455- let cv = cO._2
1456- let ck = cO._5
1457- let cm = cO._6
1458- let cj = cO._7
1459- let cp = cO._8
1460- let ci = parseIntValue(cO._9)
1461- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cu), toString(cv), toString(ck), toString(cm), toString(cj), toString(cp), toString(ci)], j))
1462- }
1463-
1464-
1465-@Verifier(gI)
1466-func gJ () = {
1467- let gK = {
1468- let dV = eY()
1469- if ($isInstanceOf(dV, "ByteVector"))
1292+@Verifier(fU)
1293+func fV () = {
1294+ let fW = {
1295+ let dr = ew()
1296+ if ($isInstanceOf(dr, "ByteVector"))
14701297 then {
1471- let fc = dV
1472- fc
1298+ let eA = dr
1299+ eA
14731300 }
1474- else if ($isInstanceOf(dV, "Unit"))
1475- then gI.senderPublicKey
1301+ else if ($isInstanceOf(dr, "Unit"))
1302+ then fU.senderPublicKey
14761303 else throw("Match error")
14771304 }
1478- let dV = gI
1479- if ($isInstanceOf(dV, "Order"))
1305+ let dr = fU
1306+ if ($isInstanceOf(dr, "Order"))
14801307 then {
1481- let dz = dV
1482- let gL = aT()
1483- let gM = dy(dz)
1484- let aC = gM._1
1485- let aD = gM._2
1486- let aE = sigVerify(dz.bodyBytes, dz.proofs[0], dz.senderPublicKey)
1487- let aF = sigVerify(dz.bodyBytes, dz.proofs[1], gL)
1488- if (if (if (aC)
1489- then aE
1308+ let cS = dr
1309+ let fX = aH()
1310+ let as = cR(cS)
1311+ let at = sigVerify(cS.bodyBytes, cS.proofs[0], cS.senderPublicKey)
1312+ let au = sigVerify(cS.bodyBytes, cS.proofs[1], fX)
1313+ if (if (if (as)
1314+ then at
14901315 else false)
1491- then aF
1316+ then au
14921317 else false)
14931318 then true
1494- else aB(aC, aD, aE, aF)
1319+ else ar(as, at, au)
14951320 }
1496- else if ($isInstanceOf(dV, "SetScriptTransaction"))
1321+ else if ($isInstanceOf(dr, "SetScriptTransaction"))
14971322 then {
1498- let eZ = dV
1499- let gN = blake2b256(value(eZ.script))
1500- let gO = fromBase64String(value(getString(aN, az())))
1501- let gP = scriptHash(this)
1502- if (if ((gO == gN))
1503- then (gP != gN)
1323+ let ex = dr
1324+ let fY = blake2b256(value(ex.script))
1325+ let fZ = fromBase64String(value(getString(aB, ap())))
1326+ let ga = scriptHash(this)
1327+ if (if ((fZ == fY))
1328+ then (ga != fY)
15041329 else false)
15051330 then true
1506- else sigVerify(gI.bodyBytes, gI.proofs[0], gK)
1331+ else sigVerify(fU.bodyBytes, fU.proofs[0], fW)
15071332 }
1508- else sigVerify(gI.bodyBytes, gI.proofs[0], gK)
1333+ else sigVerify(fU.bodyBytes, fU.proofs[0], fW)
15091334 }
15101335

github/deemru/w8io/169f3d6 
313.25 ms