tx · G1pHtESZsJCj3CGRGxxai6bGD7J51d6cGHaucgxxdP2N

3N55kCyUFy8M2ooKRwierKnP7L6viqzScNn:  -0.03100000 Waves

2022.12.16 12:28 [2362678] smart account 3N55kCyUFy8M2ooKRwierKnP7L6viqzScNn > SELF 0.00000000 Waves

{ "type": 13, "id": "G1pHtESZsJCj3CGRGxxai6bGD7J51d6cGHaucgxxdP2N", "fee": 3100000, "feeAssetId": null, "timestamp": 1671182899239, "version": 1, "sender": "3N55kCyUFy8M2ooKRwierKnP7L6viqzScNn", "senderPublicKey": "HpuFV1RhaXZ5gaJNgeLjyAKy3D5q7fMKdNFYYbPDafnb", "proofs": [ "ZvrRpJ7SfV614fMt9jPthR42ga8PiNzSzq9oNFmwJxNCMszgv85onpCv8WANRfawR6s6NWHnA1CSM7Dhy9PKC2H" ], "script": "base64:BgK3JwgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASAwoBCBIFCgMBAQESBAoCAQESBAoCCAESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgSABIDCgEBEgMKAQESBAoCCAEiCmxQZGVjaW1hbHMiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgt3YXZlc1N0cmluZyIDU0VQIgpQb29sQWN0aXZlIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiDWlkeFBvb2xTdGF0dXMiEGlkeFBvb2xMUEFzc2V0SWQiDWlkeEFtdEFzc2V0SWQiD2lkeFByaWNlQXNzZXRJZCIOaWR4QW10QXNzZXREY20iEGlkeFByaWNlQXNzZXREY20iDmlkeElBbXRBc3NldElkIhBpZHhJUHJpY2VBc3NldElkIg1pZHhMUEFzc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IBQJjUgZwcm9vZnMAAAgFAmNSD3NlbmRlclB1YmxpY0tleQQCYXQJAPQDAwgFAmNSCWJvZHlCeXRlcwkAkQMCCAUCY1IGcHJvb2ZzAAEFAmZMAwMDBQJhcgUCYXMHBQJhdAcGCQECYXEDBQJhcgUCYXMFAmF0AwkAAQIFAmRxAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCZXcFAmRxBAJmTQkA9gMBCQEFdmFsdWUBCAUCZXcGc2NyaXB0BAJmTgkA2wQBCQEFdmFsdWUBCQCdCAIFAmFBCQECYW8ABAJmTwkA8QcBBQR0aGlzAwMJAAACBQJmTgUCZk0JAQIhPQIFAmZPBQJmTQcGCQD0AwMIBQJmSQlib2R5Qnl0ZXMJAJEDAggFAmZJBnByb29mcwAABQJmSwkA9AMDCAUCZkkJYm9keUJ5dGVzCQCRAwIIBQJmSQZwcm9vZnMAAAUCZkvBwFdz", "chainId": 84, "height": 2362678, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: f5f6NCKqVPro1iFN1UkzLHomW3xQNaqZFzR6eqp5HFL Next: 5PwbXtrt6RoT9QovsvgSNLPZaY47mm5J9edhJSGXEV9h Diff:
OldNewDifferences
6565 func G (H,I) = toInt(fraction(H, toBigInt(I), d))
6666
6767
68-func J (H,I,K) = toInt(fraction(H, toBigInt(I), d, K))
68+func J (K,L,M) = fraction(K, L, M)
6969
7070
71-func L (M,N,O) = fraction(M, N, O)
72-
73-
74-func P (H) = if ((0 > H))
71+func N (H) = if ((0 > H))
7572 then -(H)
7673 else H
7774
7875
79-func Q (H) = if ((e > H))
76+func O (H) = if ((e > H))
8077 then -(H)
8178 else H
8279
8380
84-func R () = "%s__factoryContract"
81+func P () = "%s__factoryContract"
8582
8683
87-func S () = "%s__managerPublicKey"
84+func Q () = "%s__managerPublicKey"
8885
8986
90-func T () = "%s__pendingManagerPublicKey"
87+func R () = "%s__pendingManagerPublicKey"
9188
9289
93-func U () = "%s%s__price__last"
90+func S () = "%s%s__price__last"
9491
9592
96-func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], j)
93+func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j)
9794
9895
99-func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
96+func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y)
10097
10198
102-func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
99+func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y)
103100
104101
105-func ac () = "%s__amountAsset"
102+func aa () = "%s__amountAsset"
106103
107104
108-func ad () = "%s__priceAsset"
105+func ab () = "%s__priceAsset"
109106
110107
111-let ae = "%s__fee"
112-
113-let af = fraction(10, b, 10000)
114-
115-let ag = valueOrElse(getInteger(this, ae), af)
116-
117-let ah = makeString(["%s", "kLp"], j)
118-
119-let ai = makeString(["%s", "kLpRefreshedHeight"], j)
120-
121-let aj = makeString(["%s", "refreshKLpDelay"], j)
122-
123-let ak = 30
124-
125-let al = valueOrElse(getInteger(this, aj), ak)
126-
127-func am () = "%s__factoryConfig"
108+func ac () = "%s__factoryConfig"
128109
129110
130-func an () = "%s%s__matcher__publicKey"
111+func ad () = "%s%s__matcher__publicKey"
131112
132113
133-func ao (ap) = (("%s%s%s__" + ap) + "__mappings__poolContract2LpAsset")
114+func ae (af) = (("%s%s%s__" + af) + "__mappings__poolContract2LpAsset")
134115
135116
136-func aq (ar,as) = (((("%d%d%s__" + ar) + "__") + as) + "__config")
117+func ag (ah,ai) = (((("%d%d%s__" + ah) + "__") + ai) + "__config")
137118
138119
139-func at (au) = ("%s%s%s__mappings__baseAsset2internalId__" + au)
120+func aj (ak) = ("%s%s%s__mappings__baseAsset2internalId__" + ak)
140121
141122
142-func av () = "%s__shutdown"
123+func al () = "%s__shutdown"
143124
144125
145-func aw (ax) = ("%s%s__poolWeight__" + ax)
126+func am (an) = ("%s%s__poolWeight__" + an)
146127
147128
148-func ay () = "%s__allowedLpScriptHash"
129+func ao () = "%s__allowedLpScriptHash"
149130
150131
151-let az = "%s__feeCollectorAddress"
132+let ap = "%s__feeCollectorAddress"
152133
153-func aA (aB,aC,aD) = throw(((((("order validation failed: orderValid=" + toString(aB)) + " senderValid=") + toString(aC)) + " matcherValid=") + toString(aD)))
134+func aq (ar,as,at) = throw(((((("order validation failed: orderValid=" + toString(ar)) + " senderValid=") + toString(as)) + " matcherValid=") + toString(at)))
154135
155136
156-func aE (aF,aG) = valueOrErrorMessage(getString(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
137+func au (av,aw) = valueOrErrorMessage(getString(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
157138
158139
159-func aH (aF,aG) = valueOrErrorMessage(getInteger(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
140+func ax (av,aw) = valueOrErrorMessage(getInteger(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
160141
161142
162-func aI (aJ) = throw(makeString(["lp.ride:", aJ], " "))
143+func ay (az) = throw(makeString(["lp.ride:", az], " "))
163144
164145
165-func aK (aJ) = makeString(["lp.ride:", aJ], " ")
146+let aA = addressFromStringValue(au(this, P()))
147+
148+let aB = addressFromStringValue(au(aA, ap))
149+
150+let aC = {
151+ let aD = invoke(aA, "getInFeeREADONLY", [toString(this)], nil)
152+ if ($isInstanceOf(aD, "Int"))
153+ then aD
154+ else throw(($getType(aD) + " couldn't be cast to Int"))
155+ }
156+
157+let aE = {
158+ let aD = invoke(aA, "getOutFeeREADONLY", [toString(this)], nil)
159+ if ($isInstanceOf(aD, "Int"))
160+ then aD
161+ else throw(($getType(aD) + " couldn't be cast to Int"))
162+ }
163+
164+func aF () = valueOrElse(getBoolean(aA, al()), false)
166165
167166
168-let aL = addressFromStringValue(aE(this, R()))
169-
170-let aM = addressFromStringValue(aE(aL, az))
171-
172-func aN () = valueOrElse(getBoolean(aL, av()), false)
167+func aG () = fromBase58String(au(aA, ad()))
173168
174169
175-func aO () = fromBase58String(aE(aL, an()))
176-
177-
178-func aP () = {
179- let aQ = aE(this, ac())
180- let aR = aE(this, ad())
181- let as = aH(aL, at(aR))
182- let ar = aH(aL, at(aQ))
183- split(aE(aL, aq(toString(ar), toString(as))), j)
170+func aH () = {
171+ let aI = au(this, aa())
172+ let aJ = au(this, ab())
173+ let ai = ax(aA, aj(aJ))
174+ let ah = ax(aA, aj(aI))
175+ split(au(aA, ag(toString(ah), toString(ai))), j)
184176 }
185177
186178
187-func aS (aT) = if ((aT == i))
179+func aK (aL) = if ((aL == i))
188180 then unit
189- else fromBase58String(aT)
181+ else fromBase58String(aL)
190182
191183
192-func aU (aT) = if ((aT == unit))
184+func aM (aL) = if ((aL == unit))
193185 then i
194- else toBase58String(value(aT))
186+ else toBase58String(value(aL))
195187
196188
197-func aV (aW) = $Tuple7(addressFromStringValue(aW[o]), parseIntValue(aW[p]), fromBase58String(aW[q]), aS(aW[r]), aS(aW[s]), parseIntValue(aW[t]), parseIntValue(aW[u]))
189+func aN (aO) = $Tuple7(addressFromStringValue(aO[o]), parseIntValue(aO[p]), fromBase58String(aO[q]), aK(aO[r]), aK(aO[s]), parseIntValue(aO[t]), parseIntValue(aO[u]))
198190
199191
200-let aX = aV(aP())
192+let aP = aN(aH())
201193
202-let aY = aX
194+let aQ = aP
203195
204-let aZ = aY._1
196+let aR = aQ._1
205197
206-let ba = aY._2
198+let aS = aQ._2
207199
208-let bb = aY._3
200+let aT = aQ._3
209201
210-let bc = aY._4
202+let aU = aQ._4
211203
212-let bd = aY._5
204+let aV = aQ._5
213205
214-let be = aY._6
206+let aW = aQ._6
215207
216-let bf = aY._7
208+let aX = aQ._7
217209
218-func bg () = split(aE(aL, am()), j)
210+func aY () = split(au(aA, ac()), j)
219211
220212
221-let bh = valueOrErrorMessage(addressFromString(bg()[B]), "incorrect staking address")
213+let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
222214
223-let bi = valueOrErrorMessage(addressFromString(bg()[C]), "incorrect staking address")
215+let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
224216
225-func bj (bk,bl,bm,bn,bo,bp,bq,br,bs,bt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt)], j)
217+func bb (bc,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl)], j)
226218
227219
228-func bu (bv,bw,bx,bn,bq,br) = makeString(["%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(bn), toString(bq), toString(br)], j)
220+func bm (bn,bo,bp,bf,bi,bj) = makeString(["%d%d%d%d%d%d", toString(bn), toString(bo), toString(bp), toString(bf), toString(bi), toString(bj)], j)
229221
230222
231-func by (bz) = if ((bz == "WAVES"))
223+func bq (br) = if ((br == "WAVES"))
232224 then wavesBalance(this).available
233- else assetBalance(this, fromBase58String(bz))
225+ else assetBalance(this, fromBase58String(br))
234226
235227
236-func bA (bB,bC) = fraction(bB, d, bC)
228+func bs (bt,bu) = fraction(bt, d, bu)
237229
238230
239-func bD (bB,bC,K) = fraction(bB, d, bC, K)
240-
241-
242-func bE (bF,bG,bH,bI) = {
243- let bJ = D(bH, bF)
244- let bK = D(bI, bG)
245- bA(bK, bJ)
231+func bv (bw,bx,by,bz) = {
232+ let bA = D(by, bw)
233+ let bB = D(bz, bx)
234+ bs(bB, bA)
246235 }
247236
248237
249-func bL (bH,bI,bM) = {
250- let bN = aP()
251- let bO = parseIntValue(bN[t])
252- let bP = parseIntValue(bN[u])
253- let bQ = bE(bO, bP, bH, bI)
254- let bC = D(bH, bO)
255- let bB = D(bI, bP)
256- let bR = D(bM, b)
257- let bS = bA(bC, bR)
258- let bT = bA(bB, bR)
259-[bQ, bS, bT]
238+func bC (by,bz,bD) = {
239+ let bE = aH()
240+ let bF = parseIntValue(bE[t])
241+ let bG = parseIntValue(bE[u])
242+ let bH = bv(bF, bG, by, bz)
243+ let bu = D(by, bF)
244+ let bt = D(bz, bG)
245+ let bI = D(bD, b)
246+ let bJ = bs(bu, bI)
247+ let bK = bs(bt, bI)
248+[bH, bJ, bK]
260249 }
261250
262251
263-func bU (bH,bI,bM) = {
264- let bV = bL(bH, bI, bM)
265-[G(bV[0], b), G(bV[1], b), G(bV[2], b)]
252+func bL (by,bz,bD) = {
253+ let bM = bC(by, bz, bD)
254+[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
266255 }
267256
268257
269-func bW (bX,bY,bZ,Z) = {
270- let bN = aP()
271- let ca = bN[q]
272- let cb = bN[r]
273- let cc = bN[s]
274- let bF = parseIntValue(bN[t])
275- let bG = parseIntValue(bN[u])
276- let cd = bN[p]
277- let ce = valueOrErrorMessage(assetInfo(fromBase58String(ca)), (("Asset " + ca) + " doesn't exist")).quantity
278- if ((ca != bY))
258+func bN (bO,bP,bQ,X) = {
259+ let bE = aH()
260+ let bR = bE[q]
261+ let bS = bE[r]
262+ let bT = bE[s]
263+ let bw = parseIntValue(bE[t])
264+ let bx = parseIntValue(bE[u])
265+ let bU = bE[p]
266+ let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
267+ if ((bR != bP))
279268 then throw("Invalid asset passed.")
280269 else {
281- let cf = by(cb)
282- let cg = D(cf, bF)
283- let ch = by(cc)
284- let ci = D(ch, bG)
285- let cj = bA(ci, cg)
286- let ck = G(cj, b)
287- let cl = D(bZ, b)
288- let cm = D(ce, b)
289- let cn = fraction(cg, cl, cm)
290- let co = fraction(ci, cl, cm)
291- let cp = G(cn, bF)
292- let cq = G(co, bG)
293- let cr = if ((bX == ""))
270+ let bW = bq(bS)
271+ let bX = D(bW, bw)
272+ let bY = bq(bT)
273+ let bZ = D(bY, bx)
274+ let ca = bs(bZ, bX)
275+ let cb = G(ca, b)
276+ let cc = D(bQ, b)
277+ let cd = D(bV, b)
278+ let ce = fraction(bX, cc, cd)
279+ let cf = fraction(bZ, cc, cd)
280+ let cg = G(ce, bw)
281+ let ch = G(cf, bx)
282+ let ci = if ((bO == ""))
294283 then nil
295- else [ScriptTransfer(Z, cp, if ((cb == "WAVES"))
284+ else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
296285 then unit
297- else fromBase58String(cb)), ScriptTransfer(Z, cq, if ((cc == "WAVES"))
286+ else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
298287 then unit
299- else fromBase58String(cc)), StringEntry(ab(toString(Z), bX), bu(cp, cq, bZ, ck, height, lastBlock.timestamp)), IntegerEntry(U(), ck), IntegerEntry(V(height, lastBlock.timestamp), ck)]
300- $Tuple10(cp, cq, cb, cc, cf, ch, ce, cj, cd, cr)
288+ else fromBase58String(bT)), StringEntry(Z(toString(X), bO), bm(cg, ch, bQ, cb, height, lastBlock.timestamp)), IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb)]
289+ $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
301290 }
302291 }
303292
304293
305-func cs (bX,ct,cu,cv,cw,cx,Z,cy,cz) = {
306- let bN = aP()
307- let ca = fromBase58String(bN[q])
308- let cA = bN[r]
309- let cB = bN[s]
310- let cC = bN[v]
311- let cD = bN[w]
312- let bO = parseIntValue(bN[t])
313- let bP = parseIntValue(bN[u])
314- let cd = bN[p]
315- let ce = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
316- let cE = toBase58String(valueOrElse(cv, fromBase58String("WAVES")))
317- let cF = toBase58String(valueOrElse(cx, fromBase58String("WAVES")))
318- if (if ((cA != cE))
294+func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
295+ let bE = aH()
296+ let bR = fromBase58String(bE[q])
297+ let cr = bE[r]
298+ let cs = bE[s]
299+ let ct = bE[v]
300+ let cu = bE[w]
301+ let bF = parseIntValue(bE[t])
302+ let bG = parseIntValue(bE[u])
303+ let bU = bE[p]
304+ let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
305+ let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
306+ let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
307+ if (if ((cr != cv))
319308 then true
320- else (cB != cF))
309+ else (cs != cw))
321310 then throw("Invalid amt or price asset passed.")
322311 else {
323- let cf = if (cy)
324- then by(cA)
325- else (by(cA) - cu)
326- let ch = if (cy)
327- then by(cB)
328- else (by(cB) - cw)
329- let cG = D(cu, bO)
330- let cH = D(cw, bP)
331- let cI = bA(cH, cG)
332- let cg = D(cf, bO)
333- let ci = D(ch, bP)
334- let cJ = if ((ce == 0))
312+ let bW = if (cp)
313+ then bq(cr)
314+ else (bq(cr) - cl)
315+ let bY = if (cp)
316+ then bq(cs)
317+ else (bq(cs) - cn)
318+ let cx = D(cl, bF)
319+ let cy = D(cn, bG)
320+ let cz = bs(cy, cx)
321+ let bX = D(bW, bF)
322+ let bZ = D(bY, bG)
323+ let cA = if ((bV == 0))
335324 then {
336- let cj = e
337- let cK = e
338- let bR = pow((cG * cH), 0, toBigInt(5), 1, 0, DOWN)
339- $Tuple5(G(bR, b), G(cG, bO), G(cH, bP), bA((ci + cH), (cg + cG)), cK)
325+ let ca = e
326+ let cB = e
327+ let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
328+ $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
340329 }
341330 else {
342- let cj = bA(ci, cg)
343- let cK = fraction(Q((cj - cI)), d, cj)
344- let cL = D(ct, b)
345- if (if ((cj != e))
346- then (cK > cL)
331+ let ca = bs(bZ, bX)
332+ let cB = fraction(O((ca - cz)), d, ca)
333+ let cC = D(ck, b)
334+ if (if ((ca != e))
335+ then (cB > cC)
347336 else false)
348- then throw(((("Price slippage " + toString(cK)) + " exceeded the passed limit of ") + toString(cL)))
337+ then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
349338 else {
350- let cm = D(ce, b)
351- let cM = fraction(cG, bD(ci, cg, CEILING), d, CEILING)
352- let cN = fraction(cH, d, bD(ci, cg, FLOOR), CEILING)
353- let cO = if ((cM > cH))
354- then $Tuple2(cN, cH)
355- else $Tuple2(cG, cM)
356- let cP = cO._1
357- let cQ = cO._2
358- let bR = fraction(cm, cQ, ci, FLOOR)
359- $Tuple5(J(bR, b, FLOOR), J(cP, bO, CEILING), J(cQ, bP, CEILING), cj, cK)
339+ let cd = D(bV, b)
340+ let cD = fraction(cx, ca, d)
341+ let cE = fraction(cy, d, ca)
342+ let cF = if ((cD > cy))
343+ then $Tuple2(cE, cy)
344+ else $Tuple2(cx, cD)
345+ let cG = cF._1
346+ let cH = cF._2
347+ let bI = fraction(cd, cH, bZ)
348+ $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
360349 }
361350 }
362- let cR = cJ._1
363- let cS = cJ._2
364- let cT = cJ._3
365- let ck = G(cJ._4, b)
366- let cU = G(cJ._5, b)
367- if ((0 >= cR))
351+ let cI = cA._1
352+ let cJ = cA._2
353+ let cK = cA._3
354+ let cb = G(cA._4, b)
355+ let cL = G(cA._5, b)
356+ if ((0 >= cI))
368357 then throw("Invalid calculations. LP calculated is less than zero.")
369358 else {
370- let cV = if (!(cz))
359+ let cM = if (!(cq))
371360 then 0
372- else cR
373- let cW = (cu - cS)
374- let cX = (cw - cT)
375- let cY = [IntegerEntry(U(), ck), IntegerEntry(V(height, lastBlock.timestamp), ck), StringEntry(Y(Z, bX), bj(cS, cT, cV, ck, ct, cU, height, lastBlock.timestamp, cW, cX))]
376- $Tuple13(cR, cV, ck, cf, ch, ce, ca, cd, cY, cW, cX, cv, cx)
361+ else cI
362+ let cN = (cl - cJ)
363+ let cO = (cn - cK)
364+ let cP = [IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb), StringEntry(W(X, bO), bb(cJ, cK, cM, cb, ck, cL, height, lastBlock.timestamp, cN, cO))]
365+ $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
377366 }
378367 }
379368 }
380369
381370
382-func cZ (da,db,ce) = {
383- let dc = fraction(pow((da * db), 0, toBigInt(5), 1, 18, DOWN), g, ce)
384- if ((ce == f))
385- then f
386- else dc
371+func cQ (cR) = {
372+ let bE = aH()
373+ let cS = bE[r]
374+ let cT = bE[s]
375+ let bU = parseIntValue(bE[p])
376+ let bF = parseIntValue(bE[t])
377+ let bG = parseIntValue(bE[u])
378+ let cU = bq(cS)
379+ let cV = bq(cT)
380+ let ca = if ((cR.orderType == Buy))
381+ then bv(bF, bG, (cU + cR.amount), cV)
382+ else bv(bF, bG, (cU - cR.amount), cV)
383+ let cb = G(ca, b)
384+ if (if (if (aF())
385+ then true
386+ else (bU == m))
387+ then true
388+ else (bU == n))
389+ then throw("Exchange operations disabled")
390+ else {
391+ let cW = cR.assetPair.amountAsset
392+ let cX = if ((cW == unit))
393+ then "WAVES"
394+ else toBase58String(value(cW))
395+ let cY = cR.assetPair.priceAsset
396+ let cZ = if ((cY == unit))
397+ then "WAVES"
398+ else toBase58String(value(cY))
399+ if (if ((cX != cS))
400+ then true
401+ else (cZ != cT))
402+ then throw("Wrong order assets.")
403+ else {
404+ let da = cR.price
405+ let db = fraction(b, bG, bF)
406+ let dc = J(da, b, db)
407+ let dd = if ((cR.orderType == Buy))
408+ then (cb >= dc)
409+ else (dc >= cb)
410+ true
411+ }
412+ }
387413 }
388414
389415
390-func dd (de,df,dg) = {
391- let dh = (toBigInt(by(aU(bc))) - de)
392- let di = (toBigInt(by(aU(bd))) - df)
393- let dj = (toBigInt(value(assetInfo(bb)).quantity) - dg)
394- let dk = cZ(dh, di, dj)
395- dk
396- }
397-
398-
399-func dl (dm,dn,dg) = {
400- let dh = (by(aU(bc)) + dm)
401- let di = (by(aU(bd)) + dn)
402- let dj = (value(assetInfo(bb)).quantity + dg)
403- let dc = cZ(toBigInt(dh), toBigInt(di), toBigInt(dj))
404- let do = [IntegerEntry(ai, height), StringEntry(ah, toString(dc))]
405- $Tuple2(do, dc)
406- }
407-
408-
409-func dp (dq,dc) = if ((dc >= dq))
410- then true
411- else aI(makeString(["updated KLp lower than current KLp", toString(dq), toString(dc)], " "))
412-
413-
414-func dr (ds) = {
415- let dt = ds.amount
416- let du = fraction(ds.amount, ds.price, b, FLOOR)
417- let dv = if ((ds.orderType == Buy))
418- then $Tuple2(dt, -(du))
419- else $Tuple2(-(dt), du)
420- let dm = dv._1
421- let dn = dv._2
422- if (if (if (aN())
423- then true
424- else (ba == m))
425- then true
426- else (ba == n))
427- then throw("Exchange operations disabled")
428- else if (if ((ds.assetPair.amountAsset != bc))
429- then true
430- else (ds.assetPair.priceAsset != bd))
431- then throw("Wrong order assets.")
432- else {
433- let dw = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, ah), aK("kLp is required"))), aK("invalid kLp"))
434- let dx = dl(dm, dn, 0)
435- let dy = dx._1
436- let dz = dx._2
437- let dA = (dz >= dw)
438- dA
439- }
440- }
441-
442-
443-func dB (dC) = if ((size(dC.payments) != 1))
416+func de (df) = if ((size(df.payments) != 1))
444417 then throw("exactly 1 payment is expected")
445418 else {
446- let dD = value(dC.payments[0])
447- let bY = value(dD.assetId)
448- let dE = dD.amount
449- let cJ = bW(toBase58String(dC.transactionId), toBase58String(bY), dE, dC.caller)
450- let cp = cJ._1
451- let cq = cJ._2
452- let cd = parseIntValue(cJ._9)
453- let cr = cJ._10
454- if (if (aN())
419+ let dg = value(df.payments[0])
420+ let bP = value(dg.assetId)
421+ let dh = dg.amount
422+ let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
423+ let cg = cA._1
424+ let ch = cA._2
425+ let bU = parseIntValue(cA._9)
426+ let ci = cA._10
427+ if (if (aF())
455428 then true
456- else (cd == n))
457- then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
458- else $Tuple5(cp, cq, dE, bY, cr)
429+ else (bU == n))
430+ then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
431+ else $Tuple5(cg, ch, dh, bP, ci)
459432 }
460433
461434
462-func dF (dC,ct,cz) = if ((size(dC.payments) != 2))
435+func di (df,ck,cq) = if ((size(df.payments) != 2))
463436 then throw("exactly 2 payments are expected")
464437 else {
465- let dG = value(dC.payments[0])
466- let dH = value(dC.payments[1])
467- let dI = cs(toBase58String(dC.transactionId), ct, dG.amount, dG.assetId, dH.amount, dH.assetId, toString(dC.caller), false, cz)
468- let cd = parseIntValue(dI._8)
469- if (if (if (aN())
438+ let dj = value(df.payments[0])
439+ let dk = value(df.payments[1])
440+ let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
441+ let bU = parseIntValue(dl._8)
442+ if (if (if (aF())
470443 then true
471- else (cd == l))
444+ else (bU == l))
472445 then true
473- else (cd == n))
474- then throw(("Put operation is blocked by admin. Status = " + toString(cd)))
475- else dI
446+ else (bU == n))
447+ then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
448+ else dl
476449 }
477450
478451
479-func dJ (dK) = {
480- let dL = invoke(aL, "emit", [dK], nil)
481- if ((dL == dL))
452+func dm (dn) = {
453+ let do = invoke(aA, "emit", [dn], nil)
454+ if ((do == do))
482455 then {
483- let dM = {
484- let dN = dL
485- if ($isInstanceOf(dN, "Address"))
456+ let dp = {
457+ let dq = do
458+ if ($isInstanceOf(dq, "Address"))
486459 then {
487- let dO = dN
488- invoke(dO, "emit", [dK], nil)
460+ let dr = dq
461+ invoke(dr, "emit", [dn], nil)
489462 }
490463 else unit
491464 }
492- if ((dM == dM))
493- then dK
465+ if ((dp == dp))
466+ then dn
494467 else throw("Strict value is not equal to itself.")
495468 }
496469 else throw("Strict value is not equal to itself.")
497470 }
498471
499472
500-func dP (dK) = {
501- let dQ = fraction(dK, ag, b)
502- $Tuple2((dK - dQ), dQ)
473+func ds (dn,dt) = {
474+ let du = if ((dt == 0))
475+ then 0
476+ else fraction(dn, dt, b)
477+ $Tuple2((dn - du), du)
503478 }
504479
505480
506-func dR (dS,dT,Z,aa) = {
507- let dU = (aa == unit)
508- let dV = by(aU(bc))
509- let dW = by(aU(bd))
510- let dX = if ((dT == bc))
481+func dv (dw,dx,X,Y) = {
482+ let dy = (Y == unit)
483+ let dz = bq(aM(aU))
484+ let dA = bq(aM(aV))
485+ let dB = if ((dx == aU))
511486 then true
512- else if ((dT == bd))
487+ else if ((dx == aV))
513488 then false
514- else aI("invalid asset")
515- let dY = if (dU)
516- then $Tuple2(dV, dW)
517- else if (dX)
518- then $Tuple2((dV - dS), dW)
519- else $Tuple2(dV, (dW - dS))
520- let dZ = dY._1
521- let ea = dY._2
522- let eb = if (dX)
523- then $Tuple2(dS, 0)
524- else $Tuple2(0, dS)
525- let ec = eb._1
526- let ed = eb._2
527- let dt = dP(ec)._1
528- let du = dP(ed)._1
529- let ee = dP(dS)
530- let ef = ee._1
531- let dQ = ee._2
532- let eg = (dZ + dt)
533- let eh = (ea + du)
534- let ei = bA(D(eh, bf), D(eg, be))
535- let ej = G(ei, b)
536- let ek = if (dX)
537- then dZ
538- else ea
539- let el = toBigInt(ek)
540- let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity)
541- let en = if ((em > f))
489+ else ay("invalid asset")
490+ let dC = if (dy)
491+ then $Tuple2(dz, dA)
492+ else if (dB)
493+ then $Tuple2((dz - dw), dA)
494+ else $Tuple2(dz, (dA - dw))
495+ let dD = dC._1
496+ let dE = dC._2
497+ let dF = if (dB)
498+ then $Tuple2(dw, 0)
499+ else $Tuple2(0, dw)
500+ let dG = dF._1
501+ let dH = dF._2
502+ let dI = ds(dG, aC)._1
503+ let dJ = ds(dH, aC)._1
504+ let dK = ds(dw, aC)
505+ let dL = dK._1
506+ let du = dK._2
507+ let dM = (dD + dI)
508+ let dN = (dE + dJ)
509+ let dO = bs(D(dN, aX), D(dM, aW))
510+ let dP = G(dO, b)
511+ let dQ = if (dB)
512+ then dD
513+ else dE
514+ let dR = toBigInt(dQ)
515+ let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
516+ let dT = if ((dS > f))
542517 then true
543- else aI("initial deposit requires all coins")
544- if ((en == en))
518+ else ay("initial deposit requires all coins")
519+ if ((dT == dT))
545520 then {
546- let eo = toBigInt(ef)
547- let ep = max([0, toInt(((em * (sqrtBigInt((d + ((eo * d) / el)), 18, 18, DOWN) - d)) / d))])
548- let cY = if (dU)
521+ let dU = toBigInt(dL)
522+ let dV = max([0, toInt(((dS * (sqrtBigInt((d + ((dU * d) / dR)), 18, 18, DOWN) - d)) / d))])
523+ let cP = if (dy)
549524 then nil
550- else [IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej), StringEntry(Y(toString(value(Z)), toBase58String(value(aa))), bj(ec, ed, ep, ej, 0, 0, height, lastBlock.timestamp, 0, 0))]
551- let eq = bA(D(ea, bf), D(dZ, be))
552- let er = G(eq, b)
553- let es = {
554- let et = if (dX)
555- then $Tuple2(ec, dZ)
556- else $Tuple2(ed, ea)
557- let dK = et._1
558- let eu = et._2
559- let ev = toInt(fraction(em, toBigInt((dK / 2)), toBigInt(eu)))
560- fraction((ep - ev), b, ev)
525+ else [IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dG, dH, dV, dP, 0, 0, height, lastBlock.timestamp, 0, 0))]
526+ let dW = bs(D(dE, aX), D(dD, aW))
527+ let dX = G(dW, b)
528+ let dY = {
529+ let dZ = if (dB)
530+ then $Tuple2(dG, dD)
531+ else $Tuple2(dH, dE)
532+ let dn = dZ._1
533+ let ea = dZ._2
534+ let eb = toInt(fraction(dS, toBigInt((dn / 2)), toBigInt(ea)))
535+ fraction((dV - eb), b, eb)
561536 }
562- $Tuple5(ep, cY, dQ, es, dX)
537+ $Tuple4(dV, cP, du, dY)
563538 }
564539 else throw("Strict value is not equal to itself.")
565540 }
566541
567542
568-func ew (ex,ef,dT,Z,aa) = {
569- let dU = (aa == unit)
570- let ey = [if ((dT == bb))
543+func ec (ed,dL,dx,X,Y) = {
544+ let dy = (Y == unit)
545+ let ee = [if ((dx == aT))
571546 then true
572- else aI("invalid lp asset")]
573- if ((ey == ey))
547+ else ay("invalid lp asset")]
548+ if ((ee == ee))
574549 then {
575- let ez = if ((ex == bc))
550+ let ef = if ((ed == aU))
576551 then true
577- else if ((ex == bd))
552+ else if ((ed == aV))
578553 then false
579- else aI("invalid asset")
580- let eA = if (ez)
581- then toBigInt(by(aU(bc)))
582- else toBigInt(by(aU(bd)))
583- let eB = by(aU(bc))
584- let eC = by(aU(bd))
585- let eD = if (ez)
586- then eB
587- else eC
588- let eE = toBigInt(eD)
589- let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity)
590- let eF = toBigInt(ef)
591- let eG = max([0, toInt(((eA * (d - pow((d - ((eF * d) / em)), 18, h, 0, 18, DOWN))) / d))])
592- let eH = dP(eG)
593- let eI = eH._1
594- let dQ = eH._2
595- let eJ = if (ez)
596- then $Tuple4(eI, 0, (eB - eG), eC)
597- else $Tuple4(0, eI, eB, (eC - eG))
598- let eK = eJ._1
599- let eL = eJ._2
600- let eM = eJ._3
601- let eN = eJ._4
602- let ei = bA(D(eN, bf), D(eM, be))
603- let ej = G(ei, b)
604- let cY = if (dU)
554+ else ay("invalid asset")
555+ let eg = if (ef)
556+ then toBigInt(bq(aM(aU)))
557+ else toBigInt(bq(aM(aV)))
558+ let eh = bq(aM(aU))
559+ let ei = bq(aM(aV))
560+ let ej = if (ef)
561+ then eh
562+ else ei
563+ let ek = toBigInt(ej)
564+ let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
565+ let el = toBigInt(dL)
566+ let em = max([0, toInt(((eg * (d - pow((d - ((el * d) / dS)), 18, h, 0, 18, DOWN))) / d))])
567+ let en = ds(em, aE)
568+ let eo = en._1
569+ let du = en._2
570+ let ep = if (ef)
571+ then $Tuple4(eo, 0, (eh - em), ei)
572+ else $Tuple4(0, eo, eh, (ei - em))
573+ let eq = ep._1
574+ let er = ep._2
575+ let es = ep._3
576+ let et = ep._4
577+ let dO = bs(D(et, aX), D(es, aW))
578+ let dP = G(dO, b)
579+ let cP = if (dy)
605580 then nil
606- else [StringEntry(ab(toString(value(Z)), toBase58String(value(aa))), bu(eK, eL, ef, ej, height, lastBlock.timestamp)), IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej)]
607- let eq = bA(D(eC, bf), D(eB, be))
608- let er = G(eq, b)
609- let es = {
610- let eO = (toInt(fraction(eA, eF, em)) * 2)
611- fraction((eI - eO), b, eO)
581+ else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(eq, er, dL, dP, height, lastBlock.timestamp)), IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP)]
582+ let dW = bs(D(ei, aX), D(eh, aW))
583+ let dX = G(dW, b)
584+ let dY = {
585+ let eu = (toInt(fraction(eg, el, dS)) * 2)
586+ fraction((eo - eu), b, eu)
612587 }
613- $Tuple5(eI, cY, dQ, es, ez)
588+ $Tuple4(eo, cP, du, dY)
614589 }
615590 else throw("Strict value is not equal to itself.")
616591 }
617592
618593
619-func eP () = {
620- let dN = getString(S())
621- if ($isInstanceOf(dN, "String"))
594+func ev () = {
595+ let dq = getString(Q())
596+ if ($isInstanceOf(dq, "String"))
622597 then {
623- let eQ = dN
624- fromBase58String(eQ)
598+ let ew = dq
599+ fromBase58String(ew)
625600 }
626- else if ($isInstanceOf(dN, "Unit"))
601+ else if ($isInstanceOf(dq, "Unit"))
627602 then unit
628603 else throw("Match error")
629604 }
630605
631606
632-func eR () = {
633- let dN = getString(T())
634- if ($isInstanceOf(dN, "String"))
607+func ex () = {
608+ let dq = getString(R())
609+ if ($isInstanceOf(dq, "String"))
635610 then {
636- let eQ = dN
637- fromBase58String(eQ)
611+ let ew = dq
612+ fromBase58String(ew)
638613 }
639- else if ($isInstanceOf(dN, "Unit"))
614+ else if ($isInstanceOf(dq, "Unit"))
640615 then unit
641616 else throw("Match error")
642617 }
643618
644619
645-func eS (dC) = {
646- let dN = eP()
647- if ($isInstanceOf(dN, "ByteVector"))
620+func ey (df) = {
621+ let dq = ev()
622+ if ($isInstanceOf(dq, "ByteVector"))
648623 then {
649- let eT = dN
650- (dC.callerPublicKey == eT)
624+ let ez = dq
625+ (df.callerPublicKey == ez)
651626 }
652- else if ($isInstanceOf(dN, "Unit"))
653- then (dC.caller == this)
627+ else if ($isInstanceOf(dq, "Unit"))
628+ then (df.caller == this)
654629 else throw("Match error")
655630 }
656631
657632
658-func eU (dC) = {
659- let eV = throw("Permission denied")
660- let dN = eP()
661- if ($isInstanceOf(dN, "ByteVector"))
633+func eA (df) = {
634+ let eB = throw("Permission denied")
635+ let dq = ev()
636+ if ($isInstanceOf(dq, "ByteVector"))
662637 then {
663- let eT = dN
664- if ((dC.callerPublicKey == eT))
638+ let ez = dq
639+ if ((df.callerPublicKey == ez))
665640 then true
666- else eV
641+ else eB
667642 }
668- else if ($isInstanceOf(dN, "Unit"))
669- then if ((dC.caller == this))
643+ else if ($isInstanceOf(dq, "Unit"))
644+ then if ((df.caller == this))
670645 then true
671- else eV
646+ else eB
672647 else throw("Match error")
673648 }
674649
675650
676-@Callable(dC)
677-func setManager (eW) = {
678- let eX = eU(dC)
679- if ((eX == eX))
651+@Callable(df)
652+func setManager (eC) = {
653+ let eD = eA(df)
654+ if ((eD == eD))
680655 then {
681- let eY = fromBase58String(eW)
682- if ((eY == eY))
683- then [StringEntry(T(), eW)]
656+ let eE = fromBase58String(eC)
657+ if ((eE == eE))
658+ then [StringEntry(R(), eC)]
684659 else throw("Strict value is not equal to itself.")
685660 }
686661 else throw("Strict value is not equal to itself.")
688663
689664
690665
691-@Callable(dC)
666+@Callable(df)
692667 func confirmManager () = {
693- let eZ = eR()
694- let fa = if (isDefined(eZ))
668+ let eF = ex()
669+ let eG = if (isDefined(eF))
695670 then true
696671 else throw("No pending manager")
697- if ((fa == fa))
672+ if ((eG == eG))
698673 then {
699- let fb = if ((dC.callerPublicKey == value(eZ)))
674+ let eH = if ((df.callerPublicKey == value(eF)))
700675 then true
701676 else throw("You are not pending manager")
702- if ((fb == fb))
703- then [StringEntry(S(), toBase58String(value(eZ))), DeleteEntry(T())]
677+ if ((eH == eH))
678+ then [StringEntry(Q(), toBase58String(value(eF))), DeleteEntry(R())]
704679 else throw("Strict value is not equal to itself.")
705680 }
706681 else throw("Strict value is not equal to itself.")
708683
709684
710685
711-@Callable(dC)
712-func put (ct,fc) = if ((0 > ct))
686+@Callable(df)
687+func put (ck,eI) = if ((0 > ck))
713688 then throw("Invalid slippageTolerance passed")
714689 else {
715- let dI = dF(dC, ct, true)
716- let cV = dI._2
717- let ca = dI._7
718- let cr = dI._9
719- let cW = dI._10
720- let cX = dI._11
721- let fd = dI._12
722- let fe = dI._13
723- let dG = toBigInt(value(dC.payments[0]).amount)
724- let dH = toBigInt(value(dC.payments[1]).amount)
725- let dk = dd(dG, dH, toBigInt(0))
726- if ((dk == dk))
690+ let dl = di(df, ck, true)
691+ let cM = dl._2
692+ let bR = dl._7
693+ let ci = dl._9
694+ let cN = dl._10
695+ let cO = dl._11
696+ let eJ = dl._12
697+ let eK = dl._13
698+ let do = invoke(aA, "emit", [cM], nil)
699+ if ((do == do))
727700 then {
728- let dL = invoke(aL, "emit", [cV], nil)
729- if ((dL == dL))
701+ let dp = {
702+ let dq = do
703+ if ($isInstanceOf(dq, "Address"))
704+ then {
705+ let dr = dq
706+ invoke(dr, "emit", [cM], nil)
707+ }
708+ else unit
709+ }
710+ if ((dp == dp))
730711 then {
731- let dM = {
732- let dN = dL
733- if ($isInstanceOf(dN, "Address"))
734- then {
735- let dO = dN
736- invoke(dO, "emit", [cV], nil)
737- }
738- else unit
739- }
740- if ((dM == dM))
712+ let eL = if ((cN > 0))
713+ then invoke(ba, "put", nil, [AttachedPayment(eJ, cN)])
714+ else nil
715+ if ((eL == eL))
741716 then {
742- let ff = if ((cW > 0))
743- then invoke(bi, "put", nil, [AttachedPayment(fd, cW)])
717+ let eM = if ((cO > 0))
718+ then invoke(ba, "put", nil, [AttachedPayment(eK, cO)])
744719 else nil
745- if ((ff == ff))
720+ if ((eM == eM))
746721 then {
747- let fg = if ((cX > 0))
748- then invoke(bi, "put", nil, [AttachedPayment(fe, cX)])
749- else nil
750- if ((fg == fg))
722+ let eN = if (eI)
751723 then {
752- let fh = if (fc)
753- then {
754- let fi = invoke(bh, "stake", nil, [AttachedPayment(ca, cV)])
755- if ((fi == fi))
756- then nil
757- else throw("Strict value is not equal to itself.")
758- }
759- else [ScriptTransfer(dC.caller, cV, ca)]
760- let fj = dl(0, 0, 0)
761- if ((fj == fj))
762- then {
763- let dc = fj._2
764- let fk = fj._1
765- let fl = dp(dk, dc)
766- if ((fl == fl))
767- then ((cr ++ fh) ++ fk)
768- else throw("Strict value is not equal to itself.")
769- }
724+ let eO = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
725+ if ((eO == eO))
726+ then nil
770727 else throw("Strict value is not equal to itself.")
771728 }
772- else throw("Strict value is not equal to itself.")
729+ else [ScriptTransfer(df.caller, cM, bR)]
730+ (ci ++ eN)
773731 }
774732 else throw("Strict value is not equal to itself.")
775733 }
782740
783741
784742
785-@Callable(dC)
786-func putForFree (fm) = if ((0 > fm))
743+@Callable(df)
744+func putForFree (eP) = if ((0 > eP))
787745 then throw("Invalid value passed")
788746 else {
789- let dI = dF(dC, fm, false)
790- let cr = dI._9
791- let dG = toBigInt(value(dC.payments[0]).amount)
792- let dH = toBigInt(value(dC.payments[1]).amount)
793- let dk = dd(dG, dH, toBigInt(0))
794- if ((dk == dk))
795- then {
796- let fn = dl(0, 0, 0)
797- let fk = fn._1
798- let dc = fn._2
799- let fl = dp(dk, dc)
800- if ((fl == fl))
801- then (cr ++ fk)
802- else throw("Strict value is not equal to itself.")
803- }
804- else throw("Strict value is not equal to itself.")
747+ let dl = di(df, eP, false)
748+ dl._9
805749 }
806750
807751
808752
809-@Callable(dC)
810-func putOneTkn (fo,fp) = {
811- let fq = {
812- let fr = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
813- if ($isInstanceOf(fr, "Boolean"))
814- then fr
815- else throw(($getType(fr) + " couldn't be cast to Boolean"))
753+@Callable(df)
754+func putOneTkn (eQ,eR) = {
755+ let eS = {
756+ let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
757+ if ($isInstanceOf(aD, "Boolean"))
758+ then aD
759+ else throw(($getType(aD) + " couldn't be cast to Boolean"))
816760 }
817- let fs = if (if (if (aN())
761+ let eT = if (if (if (aF())
818762 then true
819- else (ba == l))
763+ else (aS == l))
820764 then true
821- else (ba == n))
765+ else (aS == n))
822766 then true
823- else fq
824- let ey = [if (if (!(fs))
767+ else eS
768+ let ee = [if (if (!(eT))
825769 then true
826- else eS(dC))
770+ else ey(df))
827771 then true
828- else aI("put operation is blocked by admin"), if ((size(dC.payments) == 1))
772+ else ay("put operation is blocked by admin"), if ((size(df.payments) == 1))
829773 then true
830- else aI("exactly 1 payment are expected")]
831- if ((ey == ey))
774+ else ay("exactly 1 payment are expected")]
775+ if ((ee == ee))
832776 then {
833- let ft = dC.payments[0]
834- let dT = ft.assetId
835- let dS = ft.amount
836- let dk = if ((dT == bc))
837- then dd(toBigInt(dS), toBigInt(0), toBigInt(0))
838- else if ((dT == bd))
839- then dd(toBigInt(0), toBigInt(dS), toBigInt(0))
840- else aI("payment asset is not supported")
841- let Z = dC.caller
842- let aa = dC.transactionId
843- let fu = dR(dS, dT, Z, aa)
844- if ((fu == fu))
777+ let eU = df.payments[0]
778+ let dx = eU.assetId
779+ let dw = eU.amount
780+ let X = df.caller
781+ let Y = df.transactionId
782+ let eV = dv(dw, dx, X, Y)
783+ if ((eV == eV))
845784 then {
846- let dX = fu._5
847- let fv = fu._4
848- let dQ = fu._3
849- let cY = fu._2
850- let fw = fu._1
851- let fx = if (if ((fo > 0))
852- then (fo > fw)
785+ let eW = eV._4
786+ let du = eV._3
787+ let cP = eV._2
788+ let eX = eV._1
789+ let eY = if (if ((eQ > 0))
790+ then (eQ > eX)
853791 else false)
854- then aI(makeString(["amount to receive is less than ", toString(fo)], ""))
855- else fw
856- let dL = dJ(fx)
857- if ((dL == dL))
792+ then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
793+ else eX
794+ let do = dm(eY)
795+ if ((do == do))
858796 then {
859- let fh = if (fp)
797+ let eN = if (eR)
860798 then {
861- let fy = invoke(bh, "stake", nil, [AttachedPayment(bb, fx)])
862- if ((fy == fy))
799+ let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
800+ if ((eZ == eZ))
863801 then nil
864802 else throw("Strict value is not equal to itself.")
865803 }
866- else [ScriptTransfer(dC.caller, fx, bb)]
867- let fz = if ((dQ > 0))
868- then [ScriptTransfer(aM, dQ, dT)]
804+ else [ScriptTransfer(df.caller, eY, aT)]
805+ let fa = if ((du > 0))
806+ then [ScriptTransfer(aB, du, dx)]
869807 else nil
870- let fA = if ((this == aM))
871- then $Tuple2(0, 0)
872- else if (dX)
873- then $Tuple2(-(dQ), 0)
874- else $Tuple2(0, -(dQ))
875- let dm = fA._1
876- let dn = fA._2
877- let fB = dl(dm, dn, 0)
878- let fk = fB._1
879- let dc = fB._2
880- let dw = value(getString(ah))
881- let fl = dp(dk, dc)
882- if ((fl == fl))
883- then $Tuple2((((cY ++ fh) ++ fz) ++ fk), fx)
884- else throw("Strict value is not equal to itself.")
808+ $Tuple2(((cP ++ eN) ++ fa), eY)
885809 }
886810 else throw("Strict value is not equal to itself.")
887811 }
892816
893817
894818
895-@Callable(dC)
896-func putOneTknREADONLY (dT,dS) = {
897- let fC = dR(dS, aS(dT), unit, unit)
898- let fw = fC._1
899- let cY = fC._2
900- let dQ = fC._3
901- let fv = fC._4
902- let dX = fC._5
903- $Tuple2(nil, $Tuple3(fw, dQ, fv))
819+@Callable(df)
820+func putOneTknREADONLY (dx,dw) = {
821+ let fb = dv(dw, aK(dx), unit, unit)
822+ let eX = fb._1
823+ let cP = fb._2
824+ let du = fb._3
825+ let eW = fb._4
826+ $Tuple2(nil, $Tuple3(eX, du, eW))
904827 }
905828
906829
907830
908-@Callable(dC)
909-func getOneTkn (fD,fo) = {
910- let fq = {
911- let fr = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
912- if ($isInstanceOf(fr, "Boolean"))
913- then fr
914- else throw(($getType(fr) + " couldn't be cast to Boolean"))
831+@Callable(df)
832+func getOneTkn (fc,eQ) = {
833+ let eS = {
834+ let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
835+ if ($isInstanceOf(aD, "Boolean"))
836+ then aD
837+ else throw(($getType(aD) + " couldn't be cast to Boolean"))
915838 }
916- let fE = if (if (aN())
839+ let fd = if (if (aF())
917840 then true
918- else (ba == n))
841+ else (aS == n))
919842 then true
920- else fq
921- let ey = [if (if (!(fE))
843+ else eS
844+ let ee = [if (if (!(fd))
922845 then true
923- else eS(dC))
846+ else ey(df))
924847 then true
925- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 1))
848+ else ay("get operation is blocked by admin"), if ((size(df.payments) == 1))
926849 then true
927- else aI("exactly 1 payment are expected")]
928- if ((ey == ey))
850+ else ay("exactly 1 payment are expected")]
851+ if ((ee == ee))
929852 then {
930- let ex = aS(fD)
931- let ft = dC.payments[0]
932- let dT = ft.assetId
933- let ef = ft.amount
934- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(ef))
935- let Z = dC.caller
936- let aa = dC.transactionId
937- let fF = ew(ex, ef, dT, Z, aa)
938- if ((fF == fF))
853+ let ed = aK(fc)
854+ let eU = df.payments[0]
855+ let dx = eU.assetId
856+ let dL = eU.amount
857+ let X = df.caller
858+ let Y = df.transactionId
859+ let fe = ec(ed, dL, dx, X, Y)
860+ if ((fe == fe))
939861 then {
940- let ez = fF._5
941- let fv = fF._4
942- let dQ = fF._3
943- let cY = fF._2
944- let fG = fF._1
945- let dK = if (if ((fo > 0))
946- then (fo > fG)
862+ let eW = fe._4
863+ let du = fe._3
864+ let cP = fe._2
865+ let ff = fe._1
866+ let dn = if (if ((eQ > 0))
867+ then (eQ > ff)
947868 else false)
948- then aI(makeString(["amount to receive is less than ", toString(fo)], ""))
949- else fG
950- let fH = invoke(aL, "burn", [ef], [AttachedPayment(dT, ef)])
951- if ((fH == fH))
869+ then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
870+ else ff
871+ let fg = invoke(aA, "burn", [dL], [AttachedPayment(dx, dL)])
872+ if ((fg == fg))
952873 then {
953- let fI = [ScriptTransfer(Z, dK, ex)]
954- let fz = if ((dQ > 0))
955- then [ScriptTransfer(aM, dQ, ex)]
874+ let fh = [ScriptTransfer(X, dn, ed)]
875+ let fa = if ((du > 0))
876+ then [ScriptTransfer(aB, du, ed)]
956877 else nil
957- let fJ = {
958- let fK = if ((this == aM))
959- then 0
960- else dQ
961- if (ez)
962- then $Tuple2(-((dK + fK)), 0)
963- else $Tuple2(0, -((dK + fK)))
964- }
965- let dm = fJ._1
966- let dn = fJ._2
967- let fL = dl(dm, dn, 0)
968- let fk = fL._1
969- let dc = fL._2
970- let fl = dp(dk, dc)
971- if ((fl == fl))
972- then $Tuple2((((cY ++ fI) ++ fz) ++ fk), dK)
973- else throw("Strict value is not equal to itself.")
878+ $Tuple2(((cP ++ fh) ++ fa), dn)
974879 }
975880 else throw("Strict value is not equal to itself.")
976881 }
981886
982887
983888
984-@Callable(dC)
985-func getOneTknREADONLY (ex,ef) = {
986- let fM = ew(aS(ex), ef, bb, unit, unit)
987- let fG = fM._1
988- let cY = fM._2
989- let dQ = fM._3
990- let fv = fM._4
991- let ez = fM._5
992- $Tuple2(nil, $Tuple3(fG, dQ, fv))
889+@Callable(df)
890+func getOneTknREADONLY (ed,dL) = {
891+ let fi = ec(aK(ed), dL, aT, unit, unit)
892+ let ff = fi._1
893+ let cP = fi._2
894+ let du = fi._3
895+ let eW = fi._4
896+ $Tuple2(nil, $Tuple3(ff, du, eW))
993897 }
994898
995899
996900
997-@Callable(dC)
998-func unstakeAndGetOneTkn (fN,fD,fo) = {
999- let fq = {
1000- let fr = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1001- if ($isInstanceOf(fr, "Boolean"))
1002- then fr
1003- else throw(($getType(fr) + " couldn't be cast to Boolean"))
901+@Callable(df)
902+func unstakeAndGetOneTkn (fj,fc,eQ) = {
903+ let eS = {
904+ let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
905+ if ($isInstanceOf(aD, "Boolean"))
906+ then aD
907+ else throw(($getType(aD) + " couldn't be cast to Boolean"))
1004908 }
1005- let fE = if (if (aN())
909+ let fd = if (if (aF())
1006910 then true
1007- else (ba == n))
911+ else (aS == n))
1008912 then true
1009- else fq
1010- let ey = [if (if (!(fE))
913+ else eS
914+ let ee = [if (if (!(fd))
1011915 then true
1012- else eS(dC))
916+ else ey(df))
1013917 then true
1014- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 0))
918+ else ay("get operation is blocked by admin"), if ((size(df.payments) == 0))
1015919 then true
1016- else aI("no payments are expected")]
1017- if ((ey == ey))
920+ else ay("no payments are expected")]
921+ if ((ee == ee))
1018922 then {
1019- let ex = aS(fD)
1020- let Z = dC.caller
1021- let aa = dC.transactionId
1022- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1023- let fO = invoke(bh, "unstake", [toBase58String(bb), fN], nil)
1024- if ((fO == fO))
923+ let ed = aK(fc)
924+ let X = df.caller
925+ let Y = df.transactionId
926+ let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
927+ if ((fk == fk))
1025928 then {
1026- let fP = ew(ex, fN, bb, Z, aa)
1027- if ((fP == fP))
929+ let fl = ec(ed, fj, aT, X, Y)
930+ if ((fl == fl))
1028931 then {
1029- let ez = fP._5
1030- let fv = fP._4
1031- let dQ = fP._3
1032- let cY = fP._2
1033- let fG = fP._1
1034- let dK = if (if ((fo > 0))
1035- then (fo > fG)
932+ let eW = fl._4
933+ let du = fl._3
934+ let cP = fl._2
935+ let ff = fl._1
936+ let dn = if (if ((eQ > 0))
937+ then (eQ > ff)
1036938 else false)
1037- then aI(makeString(["amount to receive is less than ", toString(fo)], ""))
1038- else fG
1039- let fH = invoke(aL, "burn", [fN], [AttachedPayment(bb, fN)])
1040- if ((fH == fH))
939+ then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
940+ else ff
941+ let fg = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
942+ if ((fg == fg))
1041943 then {
1042- let fI = [ScriptTransfer(dC.caller, dK, ex)]
1043- let fz = if ((dQ > 0))
1044- then [ScriptTransfer(aM, dQ, ex)]
944+ let fh = [ScriptTransfer(df.caller, dn, ed)]
945+ let fa = if ((du > 0))
946+ then [ScriptTransfer(aB, du, ed)]
1045947 else nil
1046- let fQ = {
1047- let fK = if ((this == aM))
1048- then 0
1049- else dQ
1050- if (ez)
1051- then $Tuple2(-((dK + fK)), 0)
1052- else $Tuple2(0, -((dK + fK)))
1053- }
1054- let dm = fQ._1
1055- let dn = fQ._2
1056- let fR = dl(dm, dn, 0)
1057- let fk = fR._1
1058- let dc = fR._2
1059- let fl = dp(dk, dc)
1060- if ((fl == fl))
1061- then $Tuple2((((cY ++ fI) ++ fz) ++ fk), dK)
1062- else throw("Strict value is not equal to itself.")
948+ $Tuple2(((cP ++ fh) ++ fa), dn)
1063949 }
1064950 else throw("Strict value is not equal to itself.")
1065951 }
1072958
1073959
1074960
1075-@Callable(dC)
961+@Callable(df)
1076962 func get () = {
1077- let cJ = dB(dC)
1078- let fS = cJ._1
1079- let cq = cJ._2
1080- let dE = cJ._3
1081- let bY = cJ._4
1082- let cr = cJ._5
1083- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE))
1084- let fT = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1085- if ((fT == fT))
1086- then {
1087- let fU = dl(-(fS), -(cq), 0)
1088- let fk = fU._1
1089- let dc = fU._2
1090- let fl = dp(dk, dc)
1091- if ((fl == fl))
1092- then (cr ++ fk)
1093- else throw("Strict value is not equal to itself.")
1094- }
963+ let cA = de(df)
964+ let fm = cA._1
965+ let ch = cA._2
966+ let dh = cA._3
967+ let bP = cA._4
968+ let ci = cA._5
969+ let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
970+ if ((fn == fn))
971+ then ci
1095972 else throw("Strict value is not equal to itself.")
1096973 }
1097974
1098975
1099976
1100-@Callable(dC)
1101-func getNoLess (fV,fW) = {
1102- let cJ = dB(dC)
1103- let cp = cJ._1
1104- let cq = cJ._2
1105- let dE = cJ._3
1106- let bY = cJ._4
1107- let cr = cJ._5
1108- if ((fV > cp))
1109- then throw(((("noLessThenAmtAsset failed: " + toString(cp)) + " < ") + toString(fV)))
1110- else if ((fW > cq))
1111- then throw(((("noLessThenPriceAsset failed: " + toString(cq)) + " < ") + toString(fW)))
977+@Callable(df)
978+func getNoLess (fo,fp) = {
979+ let cA = de(df)
980+ let cg = cA._1
981+ let ch = cA._2
982+ let dh = cA._3
983+ let bP = cA._4
984+ let ci = cA._5
985+ if ((fo > cg))
986+ then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo)))
987+ else if ((fp > ch))
988+ then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp)))
1112989 else {
1113- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE))
1114- let fT = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1115- if ((fT == fT))
1116- then {
1117- let fX = dl(-(cp), -(cq), 0)
1118- let fk = fX._1
1119- let dc = fX._2
1120- let fl = dp(dk, dc)
1121- if ((fl == fl))
1122- then (cr ++ fk)
1123- else throw("Strict value is not equal to itself.")
1124- }
990+ let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
991+ if ((fn == fn))
992+ then ci
1125993 else throw("Strict value is not equal to itself.")
1126994 }
1127995 }
1128996
1129997
1130998
1131-@Callable(dC)
1132-func unstakeAndGet (dK) = {
1133- let fY = if ((size(dC.payments) != 0))
999+@Callable(df)
1000+func unstakeAndGet (dn) = {
1001+ let fq = if ((size(df.payments) != 0))
11341002 then throw("No payments are expected")
11351003 else true
1136- if ((fY == fY))
1004+ if ((fq == fq))
11371005 then {
1138- let bN = aP()
1139- let ca = fromBase58String(bN[q])
1140- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1141- let fO = invoke(bh, "unstake", [toBase58String(ca), dK], nil)
1142- if ((fO == fO))
1006+ let bE = aH()
1007+ let bR = fromBase58String(bE[q])
1008+ let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
1009+ if ((fk == fk))
11431010 then {
1144- let cJ = bW(toBase58String(dC.transactionId), toBase58String(ca), dK, dC.caller)
1145- let cp = cJ._1
1146- let cq = cJ._2
1147- let cd = parseIntValue(cJ._9)
1148- let cr = cJ._10
1149- let fZ = if (if (aN())
1011+ let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
1012+ let bU = parseIntValue(cA._9)
1013+ let ci = cA._10
1014+ let fr = if (if (aF())
11501015 then true
1151- else (cd == n))
1152- then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
1016+ else (bU == n))
1017+ then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
11531018 else true
1154- if ((fZ == fZ))
1019+ if ((fr == fr))
11551020 then {
1156- let fT = invoke(aL, "burn", [dK], [AttachedPayment(ca, dK)])
1157- if ((fT == fT))
1158- then {
1159- let ga = dl(-(cp), -(cq), 0)
1160- let fk = ga._1
1161- let dc = ga._2
1162- let fl = dp(dk, dc)
1163- if ((fl == fl))
1164- then (cr ++ fk)
1165- else throw("Strict value is not equal to itself.")
1166- }
1021+ let fn = invoke(aA, "burn", [dn], [AttachedPayment(bR, dn)])
1022+ if ((fn == fn))
1023+ then ci
11671024 else throw("Strict value is not equal to itself.")
11681025 }
11691026 else throw("Strict value is not equal to itself.")
11751032
11761033
11771034
1178-@Callable(dC)
1179-func unstakeAndGetNoLess (fN,gb,fW) = {
1180- let fE = if (aN())
1035+@Callable(df)
1036+func unstakeAndGetNoLess (fj,fs,fp) = {
1037+ let fd = if (aF())
11811038 then true
1182- else (ba == n)
1183- let ey = [if (!(fE))
1039+ else (aS == n)
1040+ let ee = [if (!(fd))
11841041 then true
1185- else throw("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1042+ else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
11861043 then true
11871044 else throw("no payments are expected")]
1188- if ((ey == ey))
1045+ if ((ee == ee))
11891046 then {
1190- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1191- let fO = invoke(bh, "unstake", [toBase58String(bb), fN], nil)
1192- if ((fO == fO))
1047+ let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1048+ if ((fk == fk))
11931049 then {
1194- let cJ = bW(toBase58String(dC.transactionId), toBase58String(bb), fN, dC.caller)
1195- let cp = cJ._1
1196- let cq = cJ._2
1197- let cr = cJ._10
1198- let gc = [if ((cp >= gb))
1050+ let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller)
1051+ let cg = cA._1
1052+ let ch = cA._2
1053+ let ci = cA._10
1054+ let ft = [if ((cg >= fs))
11991055 then true
1200- else throw(makeString(["amount asset amount to receive is less than ", toString(gb)], "")), if ((cq >= fW))
1056+ else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
12011057 then true
1202- else throw(makeString(["price asset amount to receive is less than ", toString(fW)], ""))]
1203- if ((gc == gc))
1058+ else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1059+ if ((ft == ft))
12041060 then {
1205- let fT = invoke(aL, "burn", [fN], [AttachedPayment(bb, fN)])
1206- if ((fT == fT))
1207- then {
1208- let gd = dl(-(cp), -(cq), 0)
1209- let fk = gd._1
1210- let dc = gd._2
1211- let fl = dp(dk, dc)
1212- if ((fl == fl))
1213- then (cr ++ fk)
1214- else throw("Strict value is not equal to itself.")
1215- }
1061+ let fn = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
1062+ if ((fn == fn))
1063+ then ci
12161064 else throw("Strict value is not equal to itself.")
12171065 }
12181066 else throw("Strict value is not equal to itself.")
12241072
12251073
12261074
1227-@Callable(dC)
1228-func activate (ge,gf) = if ((toString(dC.caller) != toString(aL)))
1075+@Callable(df)
1076+func activate (fu,fv) = if ((toString(df.caller) != toString(aA)))
12291077 then throw("permissions denied")
1230- else $Tuple2([StringEntry(ac(), ge), StringEntry(ad(), gf)], "success")
1078+ else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
12311079
12321080
12331081
1234-@Callable(dC)
1235-func refreshKLp () = {
1236- let gg = valueOrElse(getInteger(ai), 0)
1237- let gh = if (((height - gg) >= al))
1238- then unit
1239- else aI(makeString([toString(al), " blocks have not passed since the previous call"], ""))
1240- if ((gh == gh))
1241- then {
1242- let dw = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ah), "0")), aK("invalid kLp"))
1243- let gi = dl(0, 0, 0)
1244- let gj = gi._1
1245- let dc = gi._2
1246- let do = if ((dw != dc))
1247- then gj
1248- else aI("nothing to refresh")
1249- $Tuple2(do, toString(dc))
1250- }
1251- else throw("Strict value is not equal to itself.")
1082+@Callable(df)
1083+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
1084+
1085+
1086+
1087+@Callable(df)
1088+func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
1089+
1090+
1091+
1092+@Callable(df)
1093+func calcPricesWrapperREADONLY (by,bz,bD) = {
1094+ let bM = bC(by, bz, bD)
1095+ $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
12521096 }
12531097
12541098
12551099
1256-@Callable(dC)
1257-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aP())
1100+@Callable(df)
1101+func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
12581102
12591103
12601104
1261-@Callable(dC)
1262-func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
1105+@Callable(df)
1106+func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
12631107
12641108
12651109
1266-@Callable(dC)
1267-func calcPricesWrapperREADONLY (bH,bI,bM) = {
1268- let bV = bL(bH, bI, bM)
1269- $Tuple2(nil, [toString(bV[0]), toString(bV[1]), toString(bV[2])])
1110+@Callable(df)
1111+func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
1112+
1113+
1114+
1115+@Callable(df)
1116+func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
1117+
1118+
1119+
1120+@Callable(df)
1121+func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1122+ let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1123+ $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
12701124 }
12711125
12721126
12731127
1274-@Callable(dC)
1275-func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
1276-
1277-
1278-
1279-@Callable(dC)
1280-func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
1281-
1282-
1283-
1284-@Callable(dC)
1285-func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC))))
1286-
1287-
1288-
1289-@Callable(dC)
1290-func estimatePutOperationWrapperREADONLY (bX,ct,cu,cv,cw,cx,Z,cy,cz) = $Tuple2(nil, cs(bX, ct, cu, cv, cw, cx, Z, cy, cz))
1291-
1292-
1293-
1294-@Callable(dC)
1295-func estimateGetOperationWrapperREADONLY (bX,bY,bZ,Z) = {
1296- let cJ = bW(bX, bY, bZ, addressFromStringValue(Z))
1297- $Tuple2(nil, $Tuple10(cJ._1, cJ._2, cJ._3, cJ._4, cJ._5, cJ._6, cJ._7, toString(cJ._8), cJ._9, cJ._10))
1128+@Callable(df)
1129+func statsREADONLY () = {
1130+ let bE = aH()
1131+ let bR = fromBase58String(bE[q])
1132+ let cS = bE[r]
1133+ let cT = bE[s]
1134+ let ct = bE[v]
1135+ let cu = bE[w]
1136+ let bF = parseIntValue(bE[t])
1137+ let bG = parseIntValue(bE[u])
1138+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1139+ let cU = bq(cS)
1140+ let cV = bq(cT)
1141+ let fx = if ((fw == 0))
1142+ then [e, e, e]
1143+ else bC(cU, cV, fw)
1144+ let cb = 0
1145+ let fy = G(fx[1], b)
1146+ let fz = G(fx[2], b)
1147+ let fA = value(getInteger(aA, am(toString(this))))
1148+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fw), toString(cb), toString(fy), toString(fz), toString(fA)], j))
12981149 }
12991150
13001151
13011152
1302-@Callable(dC)
1303-func statsREADONLY () = {
1304- let bN = aP()
1305- let ca = fromBase58String(bN[q])
1306- let gk = bN[r]
1307- let gl = bN[s]
1308- let cC = bN[v]
1309- let cD = bN[w]
1310- let bO = parseIntValue(bN[t])
1311- let bP = parseIntValue(bN[u])
1312- let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1313- let gn = by(gk)
1314- let go = by(gl)
1315- let gp = if ((gm == 0))
1316- then [e, e, e]
1317- else bL(gn, go, gm)
1318- let ck = 0
1319- let gq = G(gp[1], b)
1320- let gr = G(gp[2], b)
1321- let gs = value(getInteger(aL, aw(toString(this))))
1322- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gn), toString(go), toString(gm), toString(ck), toString(gq), toString(gr), toString(gs)], j))
1153+@Callable(df)
1154+func evaluatePutByAmountAssetREADONLY (cl) = {
1155+ let bE = aH()
1156+ let bR = fromBase58String(bE[q])
1157+ let cr = bE[r]
1158+ let bS = fromBase58String(cr)
1159+ let cs = bE[s]
1160+ let bT = fromBase58String(cs)
1161+ let bF = parseIntValue(bE[t])
1162+ let bG = parseIntValue(bE[u])
1163+ let bU = bE[p]
1164+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1165+ let cU = bq(cr)
1166+ let cV = bq(cs)
1167+ let bA = D(cU, bF)
1168+ let bB = D(cV, bG)
1169+ let ca = if ((fw == 0))
1170+ then e
1171+ else bs(bB, bA)
1172+ let cx = D(cl, bF)
1173+ let cy = fraction(cx, ca, d)
1174+ let cn = G(cy, bG)
1175+ let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1176+ let cI = dl._1
1177+ let fB = dl._3
1178+ let bW = dl._4
1179+ let bY = dl._5
1180+ let bV = dl._6
1181+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
13231182 }
13241183
13251184
13261185
1327-@Callable(dC)
1328-func evaluatePutByAmountAssetREADONLY (cu) = {
1329- let bN = aP()
1330- let ca = fromBase58String(bN[q])
1331- let cA = bN[r]
1332- let cb = fromBase58String(cA)
1333- let cB = bN[s]
1334- let cc = fromBase58String(cB)
1335- let bO = parseIntValue(bN[t])
1336- let bP = parseIntValue(bN[u])
1337- let cd = bN[p]
1338- let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1339- let gn = by(cA)
1340- let go = by(cB)
1341- let bJ = D(gn, bO)
1342- let bK = D(go, bP)
1343- let cj = if ((gm == 0))
1186+@Callable(df)
1187+func evaluatePutByPriceAssetREADONLY (cn) = {
1188+ let bE = aH()
1189+ let bR = fromBase58String(bE[q])
1190+ let cr = bE[r]
1191+ let bS = fromBase58String(cr)
1192+ let cs = bE[s]
1193+ let bT = fromBase58String(cs)
1194+ let bF = parseIntValue(bE[t])
1195+ let bG = parseIntValue(bE[u])
1196+ let bU = bE[p]
1197+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1198+ let fC = bq(cr)
1199+ let fD = bq(cs)
1200+ let fE = D(fC, bF)
1201+ let fF = D(fD, bG)
1202+ let ca = if ((fw == 0))
13441203 then e
1345- else bA(bK, bJ)
1346- let cG = D(cu, bO)
1347- let cH = fraction(cG, cj, d)
1348- let cw = G(cH, bP)
1349- let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1350- let cR = dI._1
1351- let gt = dI._3
1352- let cf = dI._4
1353- let ch = dI._5
1354- let ce = dI._6
1355- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j))
1204+ else bs(fF, fE)
1205+ let cy = D(cn, bG)
1206+ let cx = fraction(cy, d, ca)
1207+ let cl = G(cx, bF)
1208+ let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1209+ let cI = dl._1
1210+ let fB = dl._3
1211+ let bW = dl._4
1212+ let bY = dl._5
1213+ let bV = dl._6
1214+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
13561215 }
13571216
13581217
13591218
1360-@Callable(dC)
1361-func evaluatePutByPriceAssetREADONLY (cw) = {
1362- let bN = aP()
1363- let ca = fromBase58String(bN[q])
1364- let cA = bN[r]
1365- let cb = fromBase58String(cA)
1366- let cB = bN[s]
1367- let cc = fromBase58String(cB)
1368- let bO = parseIntValue(bN[t])
1369- let bP = parseIntValue(bN[u])
1370- let cd = bN[p]
1371- let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1372- let gu = by(cA)
1373- let gv = by(cB)
1374- let gw = D(gu, bO)
1375- let gx = D(gv, bP)
1376- let cj = if ((gm == 0))
1377- then e
1378- else bA(gx, gw)
1379- let cH = D(cw, bP)
1380- let cG = fraction(cH, d, cj)
1381- let cu = G(cG, bO)
1382- let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1383- let cR = dI._1
1384- let gt = dI._3
1385- let cf = dI._4
1386- let ch = dI._5
1387- let ce = dI._6
1388- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j))
1219+@Callable(df)
1220+func evaluateGetREADONLY (fG,fH) = {
1221+ let cA = bN("", fG, fH, this)
1222+ let cg = cA._1
1223+ let ch = cA._2
1224+ let bW = cA._5
1225+ let bY = cA._6
1226+ let bV = cA._7
1227+ let cb = cA._8
1228+ let bU = parseIntValue(cA._9)
1229+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cg), toString(ch), toString(bW), toString(bY), toString(bV), toString(cb), toString(bU)], j))
13891230 }
13901231
13911232
1392-
1393-@Callable(dC)
1394-func evaluateGetREADONLY (gy,gz) = {
1395- let cJ = bW("", gy, gz, this)
1396- let cp = cJ._1
1397- let cq = cJ._2
1398- let cf = cJ._5
1399- let ch = cJ._6
1400- let ce = cJ._7
1401- let ck = cJ._8
1402- let cd = parseIntValue(cJ._9)
1403- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cp), toString(cq), toString(cf), toString(ch), toString(ce), toString(ck), toString(cd)], j))
1404- }
1405-
1406-
1407-@Verifier(gA)
1408-func gB () = {
1409- let gC = {
1410- let dN = eP()
1411- if ($isInstanceOf(dN, "ByteVector"))
1233+@Verifier(fI)
1234+func fJ () = {
1235+ let fK = {
1236+ let dq = ev()
1237+ if ($isInstanceOf(dq, "ByteVector"))
14121238 then {
1413- let eT = dN
1414- eT
1239+ let ez = dq
1240+ ez
14151241 }
1416- else if ($isInstanceOf(dN, "Unit"))
1417- then gA.senderPublicKey
1242+ else if ($isInstanceOf(dq, "Unit"))
1243+ then fI.senderPublicKey
14181244 else throw("Match error")
14191245 }
1420- let dN = gA
1421- if ($isInstanceOf(dN, "Order"))
1246+ let dq = fI
1247+ if ($isInstanceOf(dq, "Order"))
14221248 then {
1423- let ds = dN
1424- let gD = aO()
1425- let aB = dr(ds)
1426- let aC = sigVerify(ds.bodyBytes, ds.proofs[0], ds.senderPublicKey)
1427- let aD = sigVerify(ds.bodyBytes, ds.proofs[1], gD)
1428- if (if (if (aB)
1429- then aC
1249+ let cR = dq
1250+ let fL = aG()
1251+ let ar = cQ(cR)
1252+ let as = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1253+ let at = sigVerify(cR.bodyBytes, cR.proofs[1], fL)
1254+ if (if (if (ar)
1255+ then as
14301256 else false)
1431- then aD
1257+ then at
14321258 else false)
14331259 then true
1434- else aA(aB, aC, aD)
1260+ else aq(ar, as, at)
14351261 }
1436- else if ($isInstanceOf(dN, "SetScriptTransaction"))
1262+ else if ($isInstanceOf(dq, "SetScriptTransaction"))
14371263 then {
1438- let eQ = dN
1439- let gE = blake2b256(value(eQ.script))
1440- let gF = fromBase64String(value(getString(aL, ay())))
1441- let gG = scriptHash(this)
1442- if (if ((gF == gE))
1443- then (gG != gE)
1264+ let ew = dq
1265+ let fM = blake2b256(value(ew.script))
1266+ let fN = fromBase64String(value(getString(aA, ao())))
1267+ let fO = scriptHash(this)
1268+ if (if ((fN == fM))
1269+ then (fO != fM)
14441270 else false)
14451271 then true
1446- else sigVerify(gA.bodyBytes, gA.proofs[0], gC)
1272+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14471273 }
1448- else sigVerify(gA.bodyBytes, gA.proofs[0], gC)
1274+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14491275 }
14501276
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 8
55
66 let b = 100000000
77
88 let c = toBigInt(100000000)
99
1010 let d = toBigInt(1000000000000000000)
1111
1212 let e = toBigInt(0)
1313
1414 let f = toBigInt(0)
1515
1616 let g = toBigInt(1)
1717
1818 let h = toBigInt(2)
1919
2020 let i = "WAVES"
2121
2222 let j = "__"
2323
2424 let k = 1
2525
2626 let l = 2
2727
2828 let m = 3
2929
3030 let n = 4
3131
3232 let o = 1
3333
3434 let p = 2
3535
3636 let q = 3
3737
3838 let r = 4
3939
4040 let s = 5
4141
4242 let t = 6
4343
4444 let u = 7
4545
4646 let v = 8
4747
4848 let w = 9
4949
5050 let x = 10
5151
5252 let y = 1
5353
5454 let z = 2
5555
5656 let A = 3
5757
5858 let B = 1
5959
6060 let C = 7
6161
6262 func D (E,F) = fraction(toBigInt(E), d, toBigInt(F))
6363
6464
6565 func G (H,I) = toInt(fraction(H, toBigInt(I), d))
6666
6767
68-func J (H,I,K) = toInt(fraction(H, toBigInt(I), d, K))
68+func J (K,L,M) = fraction(K, L, M)
6969
7070
71-func L (M,N,O) = fraction(M, N, O)
72-
73-
74-func P (H) = if ((0 > H))
71+func N (H) = if ((0 > H))
7572 then -(H)
7673 else H
7774
7875
79-func Q (H) = if ((e > H))
76+func O (H) = if ((e > H))
8077 then -(H)
8178 else H
8279
8380
84-func R () = "%s__factoryContract"
81+func P () = "%s__factoryContract"
8582
8683
87-func S () = "%s__managerPublicKey"
84+func Q () = "%s__managerPublicKey"
8885
8986
90-func T () = "%s__pendingManagerPublicKey"
87+func R () = "%s__pendingManagerPublicKey"
9188
9289
93-func U () = "%s%s__price__last"
90+func S () = "%s%s__price__last"
9491
9592
96-func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], j)
93+func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j)
9794
9895
99-func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
96+func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y)
10097
10198
102-func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
99+func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y)
103100
104101
105-func ac () = "%s__amountAsset"
102+func aa () = "%s__amountAsset"
106103
107104
108-func ad () = "%s__priceAsset"
105+func ab () = "%s__priceAsset"
109106
110107
111-let ae = "%s__fee"
112-
113-let af = fraction(10, b, 10000)
114-
115-let ag = valueOrElse(getInteger(this, ae), af)
116-
117-let ah = makeString(["%s", "kLp"], j)
118-
119-let ai = makeString(["%s", "kLpRefreshedHeight"], j)
120-
121-let aj = makeString(["%s", "refreshKLpDelay"], j)
122-
123-let ak = 30
124-
125-let al = valueOrElse(getInteger(this, aj), ak)
126-
127-func am () = "%s__factoryConfig"
108+func ac () = "%s__factoryConfig"
128109
129110
130-func an () = "%s%s__matcher__publicKey"
111+func ad () = "%s%s__matcher__publicKey"
131112
132113
133-func ao (ap) = (("%s%s%s__" + ap) + "__mappings__poolContract2LpAsset")
114+func ae (af) = (("%s%s%s__" + af) + "__mappings__poolContract2LpAsset")
134115
135116
136-func aq (ar,as) = (((("%d%d%s__" + ar) + "__") + as) + "__config")
117+func ag (ah,ai) = (((("%d%d%s__" + ah) + "__") + ai) + "__config")
137118
138119
139-func at (au) = ("%s%s%s__mappings__baseAsset2internalId__" + au)
120+func aj (ak) = ("%s%s%s__mappings__baseAsset2internalId__" + ak)
140121
141122
142-func av () = "%s__shutdown"
123+func al () = "%s__shutdown"
143124
144125
145-func aw (ax) = ("%s%s__poolWeight__" + ax)
126+func am (an) = ("%s%s__poolWeight__" + an)
146127
147128
148-func ay () = "%s__allowedLpScriptHash"
129+func ao () = "%s__allowedLpScriptHash"
149130
150131
151-let az = "%s__feeCollectorAddress"
132+let ap = "%s__feeCollectorAddress"
152133
153-func aA (aB,aC,aD) = throw(((((("order validation failed: orderValid=" + toString(aB)) + " senderValid=") + toString(aC)) + " matcherValid=") + toString(aD)))
134+func aq (ar,as,at) = throw(((((("order validation failed: orderValid=" + toString(ar)) + " senderValid=") + toString(as)) + " matcherValid=") + toString(at)))
154135
155136
156-func aE (aF,aG) = valueOrErrorMessage(getString(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
137+func au (av,aw) = valueOrErrorMessage(getString(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
157138
158139
159-func aH (aF,aG) = valueOrErrorMessage(getInteger(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
140+func ax (av,aw) = valueOrErrorMessage(getInteger(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
160141
161142
162-func aI (aJ) = throw(makeString(["lp.ride:", aJ], " "))
143+func ay (az) = throw(makeString(["lp.ride:", az], " "))
163144
164145
165-func aK (aJ) = makeString(["lp.ride:", aJ], " ")
146+let aA = addressFromStringValue(au(this, P()))
147+
148+let aB = addressFromStringValue(au(aA, ap))
149+
150+let aC = {
151+ let aD = invoke(aA, "getInFeeREADONLY", [toString(this)], nil)
152+ if ($isInstanceOf(aD, "Int"))
153+ then aD
154+ else throw(($getType(aD) + " couldn't be cast to Int"))
155+ }
156+
157+let aE = {
158+ let aD = invoke(aA, "getOutFeeREADONLY", [toString(this)], nil)
159+ if ($isInstanceOf(aD, "Int"))
160+ then aD
161+ else throw(($getType(aD) + " couldn't be cast to Int"))
162+ }
163+
164+func aF () = valueOrElse(getBoolean(aA, al()), false)
166165
167166
168-let aL = addressFromStringValue(aE(this, R()))
169-
170-let aM = addressFromStringValue(aE(aL, az))
171-
172-func aN () = valueOrElse(getBoolean(aL, av()), false)
167+func aG () = fromBase58String(au(aA, ad()))
173168
174169
175-func aO () = fromBase58String(aE(aL, an()))
176-
177-
178-func aP () = {
179- let aQ = aE(this, ac())
180- let aR = aE(this, ad())
181- let as = aH(aL, at(aR))
182- let ar = aH(aL, at(aQ))
183- split(aE(aL, aq(toString(ar), toString(as))), j)
170+func aH () = {
171+ let aI = au(this, aa())
172+ let aJ = au(this, ab())
173+ let ai = ax(aA, aj(aJ))
174+ let ah = ax(aA, aj(aI))
175+ split(au(aA, ag(toString(ah), toString(ai))), j)
184176 }
185177
186178
187-func aS (aT) = if ((aT == i))
179+func aK (aL) = if ((aL == i))
188180 then unit
189- else fromBase58String(aT)
181+ else fromBase58String(aL)
190182
191183
192-func aU (aT) = if ((aT == unit))
184+func aM (aL) = if ((aL == unit))
193185 then i
194- else toBase58String(value(aT))
186+ else toBase58String(value(aL))
195187
196188
197-func aV (aW) = $Tuple7(addressFromStringValue(aW[o]), parseIntValue(aW[p]), fromBase58String(aW[q]), aS(aW[r]), aS(aW[s]), parseIntValue(aW[t]), parseIntValue(aW[u]))
189+func aN (aO) = $Tuple7(addressFromStringValue(aO[o]), parseIntValue(aO[p]), fromBase58String(aO[q]), aK(aO[r]), aK(aO[s]), parseIntValue(aO[t]), parseIntValue(aO[u]))
198190
199191
200-let aX = aV(aP())
192+let aP = aN(aH())
201193
202-let aY = aX
194+let aQ = aP
203195
204-let aZ = aY._1
196+let aR = aQ._1
205197
206-let ba = aY._2
198+let aS = aQ._2
207199
208-let bb = aY._3
200+let aT = aQ._3
209201
210-let bc = aY._4
202+let aU = aQ._4
211203
212-let bd = aY._5
204+let aV = aQ._5
213205
214-let be = aY._6
206+let aW = aQ._6
215207
216-let bf = aY._7
208+let aX = aQ._7
217209
218-func bg () = split(aE(aL, am()), j)
210+func aY () = split(au(aA, ac()), j)
219211
220212
221-let bh = valueOrErrorMessage(addressFromString(bg()[B]), "incorrect staking address")
213+let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
222214
223-let bi = valueOrErrorMessage(addressFromString(bg()[C]), "incorrect staking address")
215+let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
224216
225-func bj (bk,bl,bm,bn,bo,bp,bq,br,bs,bt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt)], j)
217+func bb (bc,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl)], j)
226218
227219
228-func bu (bv,bw,bx,bn,bq,br) = makeString(["%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(bn), toString(bq), toString(br)], j)
220+func bm (bn,bo,bp,bf,bi,bj) = makeString(["%d%d%d%d%d%d", toString(bn), toString(bo), toString(bp), toString(bf), toString(bi), toString(bj)], j)
229221
230222
231-func by (bz) = if ((bz == "WAVES"))
223+func bq (br) = if ((br == "WAVES"))
232224 then wavesBalance(this).available
233- else assetBalance(this, fromBase58String(bz))
225+ else assetBalance(this, fromBase58String(br))
234226
235227
236-func bA (bB,bC) = fraction(bB, d, bC)
228+func bs (bt,bu) = fraction(bt, d, bu)
237229
238230
239-func bD (bB,bC,K) = fraction(bB, d, bC, K)
240-
241-
242-func bE (bF,bG,bH,bI) = {
243- let bJ = D(bH, bF)
244- let bK = D(bI, bG)
245- bA(bK, bJ)
231+func bv (bw,bx,by,bz) = {
232+ let bA = D(by, bw)
233+ let bB = D(bz, bx)
234+ bs(bB, bA)
246235 }
247236
248237
249-func bL (bH,bI,bM) = {
250- let bN = aP()
251- let bO = parseIntValue(bN[t])
252- let bP = parseIntValue(bN[u])
253- let bQ = bE(bO, bP, bH, bI)
254- let bC = D(bH, bO)
255- let bB = D(bI, bP)
256- let bR = D(bM, b)
257- let bS = bA(bC, bR)
258- let bT = bA(bB, bR)
259-[bQ, bS, bT]
238+func bC (by,bz,bD) = {
239+ let bE = aH()
240+ let bF = parseIntValue(bE[t])
241+ let bG = parseIntValue(bE[u])
242+ let bH = bv(bF, bG, by, bz)
243+ let bu = D(by, bF)
244+ let bt = D(bz, bG)
245+ let bI = D(bD, b)
246+ let bJ = bs(bu, bI)
247+ let bK = bs(bt, bI)
248+[bH, bJ, bK]
260249 }
261250
262251
263-func bU (bH,bI,bM) = {
264- let bV = bL(bH, bI, bM)
265-[G(bV[0], b), G(bV[1], b), G(bV[2], b)]
252+func bL (by,bz,bD) = {
253+ let bM = bC(by, bz, bD)
254+[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
266255 }
267256
268257
269-func bW (bX,bY,bZ,Z) = {
270- let bN = aP()
271- let ca = bN[q]
272- let cb = bN[r]
273- let cc = bN[s]
274- let bF = parseIntValue(bN[t])
275- let bG = parseIntValue(bN[u])
276- let cd = bN[p]
277- let ce = valueOrErrorMessage(assetInfo(fromBase58String(ca)), (("Asset " + ca) + " doesn't exist")).quantity
278- if ((ca != bY))
258+func bN (bO,bP,bQ,X) = {
259+ let bE = aH()
260+ let bR = bE[q]
261+ let bS = bE[r]
262+ let bT = bE[s]
263+ let bw = parseIntValue(bE[t])
264+ let bx = parseIntValue(bE[u])
265+ let bU = bE[p]
266+ let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
267+ if ((bR != bP))
279268 then throw("Invalid asset passed.")
280269 else {
281- let cf = by(cb)
282- let cg = D(cf, bF)
283- let ch = by(cc)
284- let ci = D(ch, bG)
285- let cj = bA(ci, cg)
286- let ck = G(cj, b)
287- let cl = D(bZ, b)
288- let cm = D(ce, b)
289- let cn = fraction(cg, cl, cm)
290- let co = fraction(ci, cl, cm)
291- let cp = G(cn, bF)
292- let cq = G(co, bG)
293- let cr = if ((bX == ""))
270+ let bW = bq(bS)
271+ let bX = D(bW, bw)
272+ let bY = bq(bT)
273+ let bZ = D(bY, bx)
274+ let ca = bs(bZ, bX)
275+ let cb = G(ca, b)
276+ let cc = D(bQ, b)
277+ let cd = D(bV, b)
278+ let ce = fraction(bX, cc, cd)
279+ let cf = fraction(bZ, cc, cd)
280+ let cg = G(ce, bw)
281+ let ch = G(cf, bx)
282+ let ci = if ((bO == ""))
294283 then nil
295- else [ScriptTransfer(Z, cp, if ((cb == "WAVES"))
284+ else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
296285 then unit
297- else fromBase58String(cb)), ScriptTransfer(Z, cq, if ((cc == "WAVES"))
286+ else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
298287 then unit
299- else fromBase58String(cc)), StringEntry(ab(toString(Z), bX), bu(cp, cq, bZ, ck, height, lastBlock.timestamp)), IntegerEntry(U(), ck), IntegerEntry(V(height, lastBlock.timestamp), ck)]
300- $Tuple10(cp, cq, cb, cc, cf, ch, ce, cj, cd, cr)
288+ else fromBase58String(bT)), StringEntry(Z(toString(X), bO), bm(cg, ch, bQ, cb, height, lastBlock.timestamp)), IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb)]
289+ $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
301290 }
302291 }
303292
304293
305-func cs (bX,ct,cu,cv,cw,cx,Z,cy,cz) = {
306- let bN = aP()
307- let ca = fromBase58String(bN[q])
308- let cA = bN[r]
309- let cB = bN[s]
310- let cC = bN[v]
311- let cD = bN[w]
312- let bO = parseIntValue(bN[t])
313- let bP = parseIntValue(bN[u])
314- let cd = bN[p]
315- let ce = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
316- let cE = toBase58String(valueOrElse(cv, fromBase58String("WAVES")))
317- let cF = toBase58String(valueOrElse(cx, fromBase58String("WAVES")))
318- if (if ((cA != cE))
294+func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
295+ let bE = aH()
296+ let bR = fromBase58String(bE[q])
297+ let cr = bE[r]
298+ let cs = bE[s]
299+ let ct = bE[v]
300+ let cu = bE[w]
301+ let bF = parseIntValue(bE[t])
302+ let bG = parseIntValue(bE[u])
303+ let bU = bE[p]
304+ let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
305+ let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
306+ let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
307+ if (if ((cr != cv))
319308 then true
320- else (cB != cF))
309+ else (cs != cw))
321310 then throw("Invalid amt or price asset passed.")
322311 else {
323- let cf = if (cy)
324- then by(cA)
325- else (by(cA) - cu)
326- let ch = if (cy)
327- then by(cB)
328- else (by(cB) - cw)
329- let cG = D(cu, bO)
330- let cH = D(cw, bP)
331- let cI = bA(cH, cG)
332- let cg = D(cf, bO)
333- let ci = D(ch, bP)
334- let cJ = if ((ce == 0))
312+ let bW = if (cp)
313+ then bq(cr)
314+ else (bq(cr) - cl)
315+ let bY = if (cp)
316+ then bq(cs)
317+ else (bq(cs) - cn)
318+ let cx = D(cl, bF)
319+ let cy = D(cn, bG)
320+ let cz = bs(cy, cx)
321+ let bX = D(bW, bF)
322+ let bZ = D(bY, bG)
323+ let cA = if ((bV == 0))
335324 then {
336- let cj = e
337- let cK = e
338- let bR = pow((cG * cH), 0, toBigInt(5), 1, 0, DOWN)
339- $Tuple5(G(bR, b), G(cG, bO), G(cH, bP), bA((ci + cH), (cg + cG)), cK)
325+ let ca = e
326+ let cB = e
327+ let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
328+ $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
340329 }
341330 else {
342- let cj = bA(ci, cg)
343- let cK = fraction(Q((cj - cI)), d, cj)
344- let cL = D(ct, b)
345- if (if ((cj != e))
346- then (cK > cL)
331+ let ca = bs(bZ, bX)
332+ let cB = fraction(O((ca - cz)), d, ca)
333+ let cC = D(ck, b)
334+ if (if ((ca != e))
335+ then (cB > cC)
347336 else false)
348- then throw(((("Price slippage " + toString(cK)) + " exceeded the passed limit of ") + toString(cL)))
337+ then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
349338 else {
350- let cm = D(ce, b)
351- let cM = fraction(cG, bD(ci, cg, CEILING), d, CEILING)
352- let cN = fraction(cH, d, bD(ci, cg, FLOOR), CEILING)
353- let cO = if ((cM > cH))
354- then $Tuple2(cN, cH)
355- else $Tuple2(cG, cM)
356- let cP = cO._1
357- let cQ = cO._2
358- let bR = fraction(cm, cQ, ci, FLOOR)
359- $Tuple5(J(bR, b, FLOOR), J(cP, bO, CEILING), J(cQ, bP, CEILING), cj, cK)
339+ let cd = D(bV, b)
340+ let cD = fraction(cx, ca, d)
341+ let cE = fraction(cy, d, ca)
342+ let cF = if ((cD > cy))
343+ then $Tuple2(cE, cy)
344+ else $Tuple2(cx, cD)
345+ let cG = cF._1
346+ let cH = cF._2
347+ let bI = fraction(cd, cH, bZ)
348+ $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
360349 }
361350 }
362- let cR = cJ._1
363- let cS = cJ._2
364- let cT = cJ._3
365- let ck = G(cJ._4, b)
366- let cU = G(cJ._5, b)
367- if ((0 >= cR))
351+ let cI = cA._1
352+ let cJ = cA._2
353+ let cK = cA._3
354+ let cb = G(cA._4, b)
355+ let cL = G(cA._5, b)
356+ if ((0 >= cI))
368357 then throw("Invalid calculations. LP calculated is less than zero.")
369358 else {
370- let cV = if (!(cz))
359+ let cM = if (!(cq))
371360 then 0
372- else cR
373- let cW = (cu - cS)
374- let cX = (cw - cT)
375- let cY = [IntegerEntry(U(), ck), IntegerEntry(V(height, lastBlock.timestamp), ck), StringEntry(Y(Z, bX), bj(cS, cT, cV, ck, ct, cU, height, lastBlock.timestamp, cW, cX))]
376- $Tuple13(cR, cV, ck, cf, ch, ce, ca, cd, cY, cW, cX, cv, cx)
361+ else cI
362+ let cN = (cl - cJ)
363+ let cO = (cn - cK)
364+ let cP = [IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb), StringEntry(W(X, bO), bb(cJ, cK, cM, cb, ck, cL, height, lastBlock.timestamp, cN, cO))]
365+ $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
377366 }
378367 }
379368 }
380369
381370
382-func cZ (da,db,ce) = {
383- let dc = fraction(pow((da * db), 0, toBigInt(5), 1, 18, DOWN), g, ce)
384- if ((ce == f))
385- then f
386- else dc
371+func cQ (cR) = {
372+ let bE = aH()
373+ let cS = bE[r]
374+ let cT = bE[s]
375+ let bU = parseIntValue(bE[p])
376+ let bF = parseIntValue(bE[t])
377+ let bG = parseIntValue(bE[u])
378+ let cU = bq(cS)
379+ let cV = bq(cT)
380+ let ca = if ((cR.orderType == Buy))
381+ then bv(bF, bG, (cU + cR.amount), cV)
382+ else bv(bF, bG, (cU - cR.amount), cV)
383+ let cb = G(ca, b)
384+ if (if (if (aF())
385+ then true
386+ else (bU == m))
387+ then true
388+ else (bU == n))
389+ then throw("Exchange operations disabled")
390+ else {
391+ let cW = cR.assetPair.amountAsset
392+ let cX = if ((cW == unit))
393+ then "WAVES"
394+ else toBase58String(value(cW))
395+ let cY = cR.assetPair.priceAsset
396+ let cZ = if ((cY == unit))
397+ then "WAVES"
398+ else toBase58String(value(cY))
399+ if (if ((cX != cS))
400+ then true
401+ else (cZ != cT))
402+ then throw("Wrong order assets.")
403+ else {
404+ let da = cR.price
405+ let db = fraction(b, bG, bF)
406+ let dc = J(da, b, db)
407+ let dd = if ((cR.orderType == Buy))
408+ then (cb >= dc)
409+ else (dc >= cb)
410+ true
411+ }
412+ }
387413 }
388414
389415
390-func dd (de,df,dg) = {
391- let dh = (toBigInt(by(aU(bc))) - de)
392- let di = (toBigInt(by(aU(bd))) - df)
393- let dj = (toBigInt(value(assetInfo(bb)).quantity) - dg)
394- let dk = cZ(dh, di, dj)
395- dk
396- }
397-
398-
399-func dl (dm,dn,dg) = {
400- let dh = (by(aU(bc)) + dm)
401- let di = (by(aU(bd)) + dn)
402- let dj = (value(assetInfo(bb)).quantity + dg)
403- let dc = cZ(toBigInt(dh), toBigInt(di), toBigInt(dj))
404- let do = [IntegerEntry(ai, height), StringEntry(ah, toString(dc))]
405- $Tuple2(do, dc)
406- }
407-
408-
409-func dp (dq,dc) = if ((dc >= dq))
410- then true
411- else aI(makeString(["updated KLp lower than current KLp", toString(dq), toString(dc)], " "))
412-
413-
414-func dr (ds) = {
415- let dt = ds.amount
416- let du = fraction(ds.amount, ds.price, b, FLOOR)
417- let dv = if ((ds.orderType == Buy))
418- then $Tuple2(dt, -(du))
419- else $Tuple2(-(dt), du)
420- let dm = dv._1
421- let dn = dv._2
422- if (if (if (aN())
423- then true
424- else (ba == m))
425- then true
426- else (ba == n))
427- then throw("Exchange operations disabled")
428- else if (if ((ds.assetPair.amountAsset != bc))
429- then true
430- else (ds.assetPair.priceAsset != bd))
431- then throw("Wrong order assets.")
432- else {
433- let dw = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, ah), aK("kLp is required"))), aK("invalid kLp"))
434- let dx = dl(dm, dn, 0)
435- let dy = dx._1
436- let dz = dx._2
437- let dA = (dz >= dw)
438- dA
439- }
440- }
441-
442-
443-func dB (dC) = if ((size(dC.payments) != 1))
416+func de (df) = if ((size(df.payments) != 1))
444417 then throw("exactly 1 payment is expected")
445418 else {
446- let dD = value(dC.payments[0])
447- let bY = value(dD.assetId)
448- let dE = dD.amount
449- let cJ = bW(toBase58String(dC.transactionId), toBase58String(bY), dE, dC.caller)
450- let cp = cJ._1
451- let cq = cJ._2
452- let cd = parseIntValue(cJ._9)
453- let cr = cJ._10
454- if (if (aN())
419+ let dg = value(df.payments[0])
420+ let bP = value(dg.assetId)
421+ let dh = dg.amount
422+ let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
423+ let cg = cA._1
424+ let ch = cA._2
425+ let bU = parseIntValue(cA._9)
426+ let ci = cA._10
427+ if (if (aF())
455428 then true
456- else (cd == n))
457- then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
458- else $Tuple5(cp, cq, dE, bY, cr)
429+ else (bU == n))
430+ then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
431+ else $Tuple5(cg, ch, dh, bP, ci)
459432 }
460433
461434
462-func dF (dC,ct,cz) = if ((size(dC.payments) != 2))
435+func di (df,ck,cq) = if ((size(df.payments) != 2))
463436 then throw("exactly 2 payments are expected")
464437 else {
465- let dG = value(dC.payments[0])
466- let dH = value(dC.payments[1])
467- let dI = cs(toBase58String(dC.transactionId), ct, dG.amount, dG.assetId, dH.amount, dH.assetId, toString(dC.caller), false, cz)
468- let cd = parseIntValue(dI._8)
469- if (if (if (aN())
438+ let dj = value(df.payments[0])
439+ let dk = value(df.payments[1])
440+ let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
441+ let bU = parseIntValue(dl._8)
442+ if (if (if (aF())
470443 then true
471- else (cd == l))
444+ else (bU == l))
472445 then true
473- else (cd == n))
474- then throw(("Put operation is blocked by admin. Status = " + toString(cd)))
475- else dI
446+ else (bU == n))
447+ then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
448+ else dl
476449 }
477450
478451
479-func dJ (dK) = {
480- let dL = invoke(aL, "emit", [dK], nil)
481- if ((dL == dL))
452+func dm (dn) = {
453+ let do = invoke(aA, "emit", [dn], nil)
454+ if ((do == do))
482455 then {
483- let dM = {
484- let dN = dL
485- if ($isInstanceOf(dN, "Address"))
456+ let dp = {
457+ let dq = do
458+ if ($isInstanceOf(dq, "Address"))
486459 then {
487- let dO = dN
488- invoke(dO, "emit", [dK], nil)
460+ let dr = dq
461+ invoke(dr, "emit", [dn], nil)
489462 }
490463 else unit
491464 }
492- if ((dM == dM))
493- then dK
465+ if ((dp == dp))
466+ then dn
494467 else throw("Strict value is not equal to itself.")
495468 }
496469 else throw("Strict value is not equal to itself.")
497470 }
498471
499472
500-func dP (dK) = {
501- let dQ = fraction(dK, ag, b)
502- $Tuple2((dK - dQ), dQ)
473+func ds (dn,dt) = {
474+ let du = if ((dt == 0))
475+ then 0
476+ else fraction(dn, dt, b)
477+ $Tuple2((dn - du), du)
503478 }
504479
505480
506-func dR (dS,dT,Z,aa) = {
507- let dU = (aa == unit)
508- let dV = by(aU(bc))
509- let dW = by(aU(bd))
510- let dX = if ((dT == bc))
481+func dv (dw,dx,X,Y) = {
482+ let dy = (Y == unit)
483+ let dz = bq(aM(aU))
484+ let dA = bq(aM(aV))
485+ let dB = if ((dx == aU))
511486 then true
512- else if ((dT == bd))
487+ else if ((dx == aV))
513488 then false
514- else aI("invalid asset")
515- let dY = if (dU)
516- then $Tuple2(dV, dW)
517- else if (dX)
518- then $Tuple2((dV - dS), dW)
519- else $Tuple2(dV, (dW - dS))
520- let dZ = dY._1
521- let ea = dY._2
522- let eb = if (dX)
523- then $Tuple2(dS, 0)
524- else $Tuple2(0, dS)
525- let ec = eb._1
526- let ed = eb._2
527- let dt = dP(ec)._1
528- let du = dP(ed)._1
529- let ee = dP(dS)
530- let ef = ee._1
531- let dQ = ee._2
532- let eg = (dZ + dt)
533- let eh = (ea + du)
534- let ei = bA(D(eh, bf), D(eg, be))
535- let ej = G(ei, b)
536- let ek = if (dX)
537- then dZ
538- else ea
539- let el = toBigInt(ek)
540- let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity)
541- let en = if ((em > f))
489+ else ay("invalid asset")
490+ let dC = if (dy)
491+ then $Tuple2(dz, dA)
492+ else if (dB)
493+ then $Tuple2((dz - dw), dA)
494+ else $Tuple2(dz, (dA - dw))
495+ let dD = dC._1
496+ let dE = dC._2
497+ let dF = if (dB)
498+ then $Tuple2(dw, 0)
499+ else $Tuple2(0, dw)
500+ let dG = dF._1
501+ let dH = dF._2
502+ let dI = ds(dG, aC)._1
503+ let dJ = ds(dH, aC)._1
504+ let dK = ds(dw, aC)
505+ let dL = dK._1
506+ let du = dK._2
507+ let dM = (dD + dI)
508+ let dN = (dE + dJ)
509+ let dO = bs(D(dN, aX), D(dM, aW))
510+ let dP = G(dO, b)
511+ let dQ = if (dB)
512+ then dD
513+ else dE
514+ let dR = toBigInt(dQ)
515+ let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
516+ let dT = if ((dS > f))
542517 then true
543- else aI("initial deposit requires all coins")
544- if ((en == en))
518+ else ay("initial deposit requires all coins")
519+ if ((dT == dT))
545520 then {
546- let eo = toBigInt(ef)
547- let ep = max([0, toInt(((em * (sqrtBigInt((d + ((eo * d) / el)), 18, 18, DOWN) - d)) / d))])
548- let cY = if (dU)
521+ let dU = toBigInt(dL)
522+ let dV = max([0, toInt(((dS * (sqrtBigInt((d + ((dU * d) / dR)), 18, 18, DOWN) - d)) / d))])
523+ let cP = if (dy)
549524 then nil
550- else [IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej), StringEntry(Y(toString(value(Z)), toBase58String(value(aa))), bj(ec, ed, ep, ej, 0, 0, height, lastBlock.timestamp, 0, 0))]
551- let eq = bA(D(ea, bf), D(dZ, be))
552- let er = G(eq, b)
553- let es = {
554- let et = if (dX)
555- then $Tuple2(ec, dZ)
556- else $Tuple2(ed, ea)
557- let dK = et._1
558- let eu = et._2
559- let ev = toInt(fraction(em, toBigInt((dK / 2)), toBigInt(eu)))
560- fraction((ep - ev), b, ev)
525+ else [IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dG, dH, dV, dP, 0, 0, height, lastBlock.timestamp, 0, 0))]
526+ let dW = bs(D(dE, aX), D(dD, aW))
527+ let dX = G(dW, b)
528+ let dY = {
529+ let dZ = if (dB)
530+ then $Tuple2(dG, dD)
531+ else $Tuple2(dH, dE)
532+ let dn = dZ._1
533+ let ea = dZ._2
534+ let eb = toInt(fraction(dS, toBigInt((dn / 2)), toBigInt(ea)))
535+ fraction((dV - eb), b, eb)
561536 }
562- $Tuple5(ep, cY, dQ, es, dX)
537+ $Tuple4(dV, cP, du, dY)
563538 }
564539 else throw("Strict value is not equal to itself.")
565540 }
566541
567542
568-func ew (ex,ef,dT,Z,aa) = {
569- let dU = (aa == unit)
570- let ey = [if ((dT == bb))
543+func ec (ed,dL,dx,X,Y) = {
544+ let dy = (Y == unit)
545+ let ee = [if ((dx == aT))
571546 then true
572- else aI("invalid lp asset")]
573- if ((ey == ey))
547+ else ay("invalid lp asset")]
548+ if ((ee == ee))
574549 then {
575- let ez = if ((ex == bc))
550+ let ef = if ((ed == aU))
576551 then true
577- else if ((ex == bd))
552+ else if ((ed == aV))
578553 then false
579- else aI("invalid asset")
580- let eA = if (ez)
581- then toBigInt(by(aU(bc)))
582- else toBigInt(by(aU(bd)))
583- let eB = by(aU(bc))
584- let eC = by(aU(bd))
585- let eD = if (ez)
586- then eB
587- else eC
588- let eE = toBigInt(eD)
589- let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity)
590- let eF = toBigInt(ef)
591- let eG = max([0, toInt(((eA * (d - pow((d - ((eF * d) / em)), 18, h, 0, 18, DOWN))) / d))])
592- let eH = dP(eG)
593- let eI = eH._1
594- let dQ = eH._2
595- let eJ = if (ez)
596- then $Tuple4(eI, 0, (eB - eG), eC)
597- else $Tuple4(0, eI, eB, (eC - eG))
598- let eK = eJ._1
599- let eL = eJ._2
600- let eM = eJ._3
601- let eN = eJ._4
602- let ei = bA(D(eN, bf), D(eM, be))
603- let ej = G(ei, b)
604- let cY = if (dU)
554+ else ay("invalid asset")
555+ let eg = if (ef)
556+ then toBigInt(bq(aM(aU)))
557+ else toBigInt(bq(aM(aV)))
558+ let eh = bq(aM(aU))
559+ let ei = bq(aM(aV))
560+ let ej = if (ef)
561+ then eh
562+ else ei
563+ let ek = toBigInt(ej)
564+ let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
565+ let el = toBigInt(dL)
566+ let em = max([0, toInt(((eg * (d - pow((d - ((el * d) / dS)), 18, h, 0, 18, DOWN))) / d))])
567+ let en = ds(em, aE)
568+ let eo = en._1
569+ let du = en._2
570+ let ep = if (ef)
571+ then $Tuple4(eo, 0, (eh - em), ei)
572+ else $Tuple4(0, eo, eh, (ei - em))
573+ let eq = ep._1
574+ let er = ep._2
575+ let es = ep._3
576+ let et = ep._4
577+ let dO = bs(D(et, aX), D(es, aW))
578+ let dP = G(dO, b)
579+ let cP = if (dy)
605580 then nil
606- else [StringEntry(ab(toString(value(Z)), toBase58String(value(aa))), bu(eK, eL, ef, ej, height, lastBlock.timestamp)), IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej)]
607- let eq = bA(D(eC, bf), D(eB, be))
608- let er = G(eq, b)
609- let es = {
610- let eO = (toInt(fraction(eA, eF, em)) * 2)
611- fraction((eI - eO), b, eO)
581+ else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(eq, er, dL, dP, height, lastBlock.timestamp)), IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP)]
582+ let dW = bs(D(ei, aX), D(eh, aW))
583+ let dX = G(dW, b)
584+ let dY = {
585+ let eu = (toInt(fraction(eg, el, dS)) * 2)
586+ fraction((eo - eu), b, eu)
612587 }
613- $Tuple5(eI, cY, dQ, es, ez)
588+ $Tuple4(eo, cP, du, dY)
614589 }
615590 else throw("Strict value is not equal to itself.")
616591 }
617592
618593
619-func eP () = {
620- let dN = getString(S())
621- if ($isInstanceOf(dN, "String"))
594+func ev () = {
595+ let dq = getString(Q())
596+ if ($isInstanceOf(dq, "String"))
622597 then {
623- let eQ = dN
624- fromBase58String(eQ)
598+ let ew = dq
599+ fromBase58String(ew)
625600 }
626- else if ($isInstanceOf(dN, "Unit"))
601+ else if ($isInstanceOf(dq, "Unit"))
627602 then unit
628603 else throw("Match error")
629604 }
630605
631606
632-func eR () = {
633- let dN = getString(T())
634- if ($isInstanceOf(dN, "String"))
607+func ex () = {
608+ let dq = getString(R())
609+ if ($isInstanceOf(dq, "String"))
635610 then {
636- let eQ = dN
637- fromBase58String(eQ)
611+ let ew = dq
612+ fromBase58String(ew)
638613 }
639- else if ($isInstanceOf(dN, "Unit"))
614+ else if ($isInstanceOf(dq, "Unit"))
640615 then unit
641616 else throw("Match error")
642617 }
643618
644619
645-func eS (dC) = {
646- let dN = eP()
647- if ($isInstanceOf(dN, "ByteVector"))
620+func ey (df) = {
621+ let dq = ev()
622+ if ($isInstanceOf(dq, "ByteVector"))
648623 then {
649- let eT = dN
650- (dC.callerPublicKey == eT)
624+ let ez = dq
625+ (df.callerPublicKey == ez)
651626 }
652- else if ($isInstanceOf(dN, "Unit"))
653- then (dC.caller == this)
627+ else if ($isInstanceOf(dq, "Unit"))
628+ then (df.caller == this)
654629 else throw("Match error")
655630 }
656631
657632
658-func eU (dC) = {
659- let eV = throw("Permission denied")
660- let dN = eP()
661- if ($isInstanceOf(dN, "ByteVector"))
633+func eA (df) = {
634+ let eB = throw("Permission denied")
635+ let dq = ev()
636+ if ($isInstanceOf(dq, "ByteVector"))
662637 then {
663- let eT = dN
664- if ((dC.callerPublicKey == eT))
638+ let ez = dq
639+ if ((df.callerPublicKey == ez))
665640 then true
666- else eV
641+ else eB
667642 }
668- else if ($isInstanceOf(dN, "Unit"))
669- then if ((dC.caller == this))
643+ else if ($isInstanceOf(dq, "Unit"))
644+ then if ((df.caller == this))
670645 then true
671- else eV
646+ else eB
672647 else throw("Match error")
673648 }
674649
675650
676-@Callable(dC)
677-func setManager (eW) = {
678- let eX = eU(dC)
679- if ((eX == eX))
651+@Callable(df)
652+func setManager (eC) = {
653+ let eD = eA(df)
654+ if ((eD == eD))
680655 then {
681- let eY = fromBase58String(eW)
682- if ((eY == eY))
683- then [StringEntry(T(), eW)]
656+ let eE = fromBase58String(eC)
657+ if ((eE == eE))
658+ then [StringEntry(R(), eC)]
684659 else throw("Strict value is not equal to itself.")
685660 }
686661 else throw("Strict value is not equal to itself.")
687662 }
688663
689664
690665
691-@Callable(dC)
666+@Callable(df)
692667 func confirmManager () = {
693- let eZ = eR()
694- let fa = if (isDefined(eZ))
668+ let eF = ex()
669+ let eG = if (isDefined(eF))
695670 then true
696671 else throw("No pending manager")
697- if ((fa == fa))
672+ if ((eG == eG))
698673 then {
699- let fb = if ((dC.callerPublicKey == value(eZ)))
674+ let eH = if ((df.callerPublicKey == value(eF)))
700675 then true
701676 else throw("You are not pending manager")
702- if ((fb == fb))
703- then [StringEntry(S(), toBase58String(value(eZ))), DeleteEntry(T())]
677+ if ((eH == eH))
678+ then [StringEntry(Q(), toBase58String(value(eF))), DeleteEntry(R())]
704679 else throw("Strict value is not equal to itself.")
705680 }
706681 else throw("Strict value is not equal to itself.")
707682 }
708683
709684
710685
711-@Callable(dC)
712-func put (ct,fc) = if ((0 > ct))
686+@Callable(df)
687+func put (ck,eI) = if ((0 > ck))
713688 then throw("Invalid slippageTolerance passed")
714689 else {
715- let dI = dF(dC, ct, true)
716- let cV = dI._2
717- let ca = dI._7
718- let cr = dI._9
719- let cW = dI._10
720- let cX = dI._11
721- let fd = dI._12
722- let fe = dI._13
723- let dG = toBigInt(value(dC.payments[0]).amount)
724- let dH = toBigInt(value(dC.payments[1]).amount)
725- let dk = dd(dG, dH, toBigInt(0))
726- if ((dk == dk))
690+ let dl = di(df, ck, true)
691+ let cM = dl._2
692+ let bR = dl._7
693+ let ci = dl._9
694+ let cN = dl._10
695+ let cO = dl._11
696+ let eJ = dl._12
697+ let eK = dl._13
698+ let do = invoke(aA, "emit", [cM], nil)
699+ if ((do == do))
727700 then {
728- let dL = invoke(aL, "emit", [cV], nil)
729- if ((dL == dL))
701+ let dp = {
702+ let dq = do
703+ if ($isInstanceOf(dq, "Address"))
704+ then {
705+ let dr = dq
706+ invoke(dr, "emit", [cM], nil)
707+ }
708+ else unit
709+ }
710+ if ((dp == dp))
730711 then {
731- let dM = {
732- let dN = dL
733- if ($isInstanceOf(dN, "Address"))
734- then {
735- let dO = dN
736- invoke(dO, "emit", [cV], nil)
737- }
738- else unit
739- }
740- if ((dM == dM))
712+ let eL = if ((cN > 0))
713+ then invoke(ba, "put", nil, [AttachedPayment(eJ, cN)])
714+ else nil
715+ if ((eL == eL))
741716 then {
742- let ff = if ((cW > 0))
743- then invoke(bi, "put", nil, [AttachedPayment(fd, cW)])
717+ let eM = if ((cO > 0))
718+ then invoke(ba, "put", nil, [AttachedPayment(eK, cO)])
744719 else nil
745- if ((ff == ff))
720+ if ((eM == eM))
746721 then {
747- let fg = if ((cX > 0))
748- then invoke(bi, "put", nil, [AttachedPayment(fe, cX)])
749- else nil
750- if ((fg == fg))
722+ let eN = if (eI)
751723 then {
752- let fh = if (fc)
753- then {
754- let fi = invoke(bh, "stake", nil, [AttachedPayment(ca, cV)])
755- if ((fi == fi))
756- then nil
757- else throw("Strict value is not equal to itself.")
758- }
759- else [ScriptTransfer(dC.caller, cV, ca)]
760- let fj = dl(0, 0, 0)
761- if ((fj == fj))
762- then {
763- let dc = fj._2
764- let fk = fj._1
765- let fl = dp(dk, dc)
766- if ((fl == fl))
767- then ((cr ++ fh) ++ fk)
768- else throw("Strict value is not equal to itself.")
769- }
724+ let eO = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
725+ if ((eO == eO))
726+ then nil
770727 else throw("Strict value is not equal to itself.")
771728 }
772- else throw("Strict value is not equal to itself.")
729+ else [ScriptTransfer(df.caller, cM, bR)]
730+ (ci ++ eN)
773731 }
774732 else throw("Strict value is not equal to itself.")
775733 }
776734 else throw("Strict value is not equal to itself.")
777735 }
778736 else throw("Strict value is not equal to itself.")
779737 }
780738 else throw("Strict value is not equal to itself.")
781739 }
782740
783741
784742
785-@Callable(dC)
786-func putForFree (fm) = if ((0 > fm))
743+@Callable(df)
744+func putForFree (eP) = if ((0 > eP))
787745 then throw("Invalid value passed")
788746 else {
789- let dI = dF(dC, fm, false)
790- let cr = dI._9
791- let dG = toBigInt(value(dC.payments[0]).amount)
792- let dH = toBigInt(value(dC.payments[1]).amount)
793- let dk = dd(dG, dH, toBigInt(0))
794- if ((dk == dk))
795- then {
796- let fn = dl(0, 0, 0)
797- let fk = fn._1
798- let dc = fn._2
799- let fl = dp(dk, dc)
800- if ((fl == fl))
801- then (cr ++ fk)
802- else throw("Strict value is not equal to itself.")
803- }
804- else throw("Strict value is not equal to itself.")
747+ let dl = di(df, eP, false)
748+ dl._9
805749 }
806750
807751
808752
809-@Callable(dC)
810-func putOneTkn (fo,fp) = {
811- let fq = {
812- let fr = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
813- if ($isInstanceOf(fr, "Boolean"))
814- then fr
815- else throw(($getType(fr) + " couldn't be cast to Boolean"))
753+@Callable(df)
754+func putOneTkn (eQ,eR) = {
755+ let eS = {
756+ let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
757+ if ($isInstanceOf(aD, "Boolean"))
758+ then aD
759+ else throw(($getType(aD) + " couldn't be cast to Boolean"))
816760 }
817- let fs = if (if (if (aN())
761+ let eT = if (if (if (aF())
818762 then true
819- else (ba == l))
763+ else (aS == l))
820764 then true
821- else (ba == n))
765+ else (aS == n))
822766 then true
823- else fq
824- let ey = [if (if (!(fs))
767+ else eS
768+ let ee = [if (if (!(eT))
825769 then true
826- else eS(dC))
770+ else ey(df))
827771 then true
828- else aI("put operation is blocked by admin"), if ((size(dC.payments) == 1))
772+ else ay("put operation is blocked by admin"), if ((size(df.payments) == 1))
829773 then true
830- else aI("exactly 1 payment are expected")]
831- if ((ey == ey))
774+ else ay("exactly 1 payment are expected")]
775+ if ((ee == ee))
832776 then {
833- let ft = dC.payments[0]
834- let dT = ft.assetId
835- let dS = ft.amount
836- let dk = if ((dT == bc))
837- then dd(toBigInt(dS), toBigInt(0), toBigInt(0))
838- else if ((dT == bd))
839- then dd(toBigInt(0), toBigInt(dS), toBigInt(0))
840- else aI("payment asset is not supported")
841- let Z = dC.caller
842- let aa = dC.transactionId
843- let fu = dR(dS, dT, Z, aa)
844- if ((fu == fu))
777+ let eU = df.payments[0]
778+ let dx = eU.assetId
779+ let dw = eU.amount
780+ let X = df.caller
781+ let Y = df.transactionId
782+ let eV = dv(dw, dx, X, Y)
783+ if ((eV == eV))
845784 then {
846- let dX = fu._5
847- let fv = fu._4
848- let dQ = fu._3
849- let cY = fu._2
850- let fw = fu._1
851- let fx = if (if ((fo > 0))
852- then (fo > fw)
785+ let eW = eV._4
786+ let du = eV._3
787+ let cP = eV._2
788+ let eX = eV._1
789+ let eY = if (if ((eQ > 0))
790+ then (eQ > eX)
853791 else false)
854- then aI(makeString(["amount to receive is less than ", toString(fo)], ""))
855- else fw
856- let dL = dJ(fx)
857- if ((dL == dL))
792+ then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
793+ else eX
794+ let do = dm(eY)
795+ if ((do == do))
858796 then {
859- let fh = if (fp)
797+ let eN = if (eR)
860798 then {
861- let fy = invoke(bh, "stake", nil, [AttachedPayment(bb, fx)])
862- if ((fy == fy))
799+ let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
800+ if ((eZ == eZ))
863801 then nil
864802 else throw("Strict value is not equal to itself.")
865803 }
866- else [ScriptTransfer(dC.caller, fx, bb)]
867- let fz = if ((dQ > 0))
868- then [ScriptTransfer(aM, dQ, dT)]
804+ else [ScriptTransfer(df.caller, eY, aT)]
805+ let fa = if ((du > 0))
806+ then [ScriptTransfer(aB, du, dx)]
869807 else nil
870- let fA = if ((this == aM))
871- then $Tuple2(0, 0)
872- else if (dX)
873- then $Tuple2(-(dQ), 0)
874- else $Tuple2(0, -(dQ))
875- let dm = fA._1
876- let dn = fA._2
877- let fB = dl(dm, dn, 0)
878- let fk = fB._1
879- let dc = fB._2
880- let dw = value(getString(ah))
881- let fl = dp(dk, dc)
882- if ((fl == fl))
883- then $Tuple2((((cY ++ fh) ++ fz) ++ fk), fx)
884- else throw("Strict value is not equal to itself.")
808+ $Tuple2(((cP ++ eN) ++ fa), eY)
885809 }
886810 else throw("Strict value is not equal to itself.")
887811 }
888812 else throw("Strict value is not equal to itself.")
889813 }
890814 else throw("Strict value is not equal to itself.")
891815 }
892816
893817
894818
895-@Callable(dC)
896-func putOneTknREADONLY (dT,dS) = {
897- let fC = dR(dS, aS(dT), unit, unit)
898- let fw = fC._1
899- let cY = fC._2
900- let dQ = fC._3
901- let fv = fC._4
902- let dX = fC._5
903- $Tuple2(nil, $Tuple3(fw, dQ, fv))
819+@Callable(df)
820+func putOneTknREADONLY (dx,dw) = {
821+ let fb = dv(dw, aK(dx), unit, unit)
822+ let eX = fb._1
823+ let cP = fb._2
824+ let du = fb._3
825+ let eW = fb._4
826+ $Tuple2(nil, $Tuple3(eX, du, eW))
904827 }
905828
906829
907830
908-@Callable(dC)
909-func getOneTkn (fD,fo) = {
910- let fq = {
911- let fr = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
912- if ($isInstanceOf(fr, "Boolean"))
913- then fr
914- else throw(($getType(fr) + " couldn't be cast to Boolean"))
831+@Callable(df)
832+func getOneTkn (fc,eQ) = {
833+ let eS = {
834+ let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
835+ if ($isInstanceOf(aD, "Boolean"))
836+ then aD
837+ else throw(($getType(aD) + " couldn't be cast to Boolean"))
915838 }
916- let fE = if (if (aN())
839+ let fd = if (if (aF())
917840 then true
918- else (ba == n))
841+ else (aS == n))
919842 then true
920- else fq
921- let ey = [if (if (!(fE))
843+ else eS
844+ let ee = [if (if (!(fd))
922845 then true
923- else eS(dC))
846+ else ey(df))
924847 then true
925- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 1))
848+ else ay("get operation is blocked by admin"), if ((size(df.payments) == 1))
926849 then true
927- else aI("exactly 1 payment are expected")]
928- if ((ey == ey))
850+ else ay("exactly 1 payment are expected")]
851+ if ((ee == ee))
929852 then {
930- let ex = aS(fD)
931- let ft = dC.payments[0]
932- let dT = ft.assetId
933- let ef = ft.amount
934- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(ef))
935- let Z = dC.caller
936- let aa = dC.transactionId
937- let fF = ew(ex, ef, dT, Z, aa)
938- if ((fF == fF))
853+ let ed = aK(fc)
854+ let eU = df.payments[0]
855+ let dx = eU.assetId
856+ let dL = eU.amount
857+ let X = df.caller
858+ let Y = df.transactionId
859+ let fe = ec(ed, dL, dx, X, Y)
860+ if ((fe == fe))
939861 then {
940- let ez = fF._5
941- let fv = fF._4
942- let dQ = fF._3
943- let cY = fF._2
944- let fG = fF._1
945- let dK = if (if ((fo > 0))
946- then (fo > fG)
862+ let eW = fe._4
863+ let du = fe._3
864+ let cP = fe._2
865+ let ff = fe._1
866+ let dn = if (if ((eQ > 0))
867+ then (eQ > ff)
947868 else false)
948- then aI(makeString(["amount to receive is less than ", toString(fo)], ""))
949- else fG
950- let fH = invoke(aL, "burn", [ef], [AttachedPayment(dT, ef)])
951- if ((fH == fH))
869+ then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
870+ else ff
871+ let fg = invoke(aA, "burn", [dL], [AttachedPayment(dx, dL)])
872+ if ((fg == fg))
952873 then {
953- let fI = [ScriptTransfer(Z, dK, ex)]
954- let fz = if ((dQ > 0))
955- then [ScriptTransfer(aM, dQ, ex)]
874+ let fh = [ScriptTransfer(X, dn, ed)]
875+ let fa = if ((du > 0))
876+ then [ScriptTransfer(aB, du, ed)]
956877 else nil
957- let fJ = {
958- let fK = if ((this == aM))
959- then 0
960- else dQ
961- if (ez)
962- then $Tuple2(-((dK + fK)), 0)
963- else $Tuple2(0, -((dK + fK)))
964- }
965- let dm = fJ._1
966- let dn = fJ._2
967- let fL = dl(dm, dn, 0)
968- let fk = fL._1
969- let dc = fL._2
970- let fl = dp(dk, dc)
971- if ((fl == fl))
972- then $Tuple2((((cY ++ fI) ++ fz) ++ fk), dK)
973- else throw("Strict value is not equal to itself.")
878+ $Tuple2(((cP ++ fh) ++ fa), dn)
974879 }
975880 else throw("Strict value is not equal to itself.")
976881 }
977882 else throw("Strict value is not equal to itself.")
978883 }
979884 else throw("Strict value is not equal to itself.")
980885 }
981886
982887
983888
984-@Callable(dC)
985-func getOneTknREADONLY (ex,ef) = {
986- let fM = ew(aS(ex), ef, bb, unit, unit)
987- let fG = fM._1
988- let cY = fM._2
989- let dQ = fM._3
990- let fv = fM._4
991- let ez = fM._5
992- $Tuple2(nil, $Tuple3(fG, dQ, fv))
889+@Callable(df)
890+func getOneTknREADONLY (ed,dL) = {
891+ let fi = ec(aK(ed), dL, aT, unit, unit)
892+ let ff = fi._1
893+ let cP = fi._2
894+ let du = fi._3
895+ let eW = fi._4
896+ $Tuple2(nil, $Tuple3(ff, du, eW))
993897 }
994898
995899
996900
997-@Callable(dC)
998-func unstakeAndGetOneTkn (fN,fD,fo) = {
999- let fq = {
1000- let fr = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1001- if ($isInstanceOf(fr, "Boolean"))
1002- then fr
1003- else throw(($getType(fr) + " couldn't be cast to Boolean"))
901+@Callable(df)
902+func unstakeAndGetOneTkn (fj,fc,eQ) = {
903+ let eS = {
904+ let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
905+ if ($isInstanceOf(aD, "Boolean"))
906+ then aD
907+ else throw(($getType(aD) + " couldn't be cast to Boolean"))
1004908 }
1005- let fE = if (if (aN())
909+ let fd = if (if (aF())
1006910 then true
1007- else (ba == n))
911+ else (aS == n))
1008912 then true
1009- else fq
1010- let ey = [if (if (!(fE))
913+ else eS
914+ let ee = [if (if (!(fd))
1011915 then true
1012- else eS(dC))
916+ else ey(df))
1013917 then true
1014- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 0))
918+ else ay("get operation is blocked by admin"), if ((size(df.payments) == 0))
1015919 then true
1016- else aI("no payments are expected")]
1017- if ((ey == ey))
920+ else ay("no payments are expected")]
921+ if ((ee == ee))
1018922 then {
1019- let ex = aS(fD)
1020- let Z = dC.caller
1021- let aa = dC.transactionId
1022- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1023- let fO = invoke(bh, "unstake", [toBase58String(bb), fN], nil)
1024- if ((fO == fO))
923+ let ed = aK(fc)
924+ let X = df.caller
925+ let Y = df.transactionId
926+ let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
927+ if ((fk == fk))
1025928 then {
1026- let fP = ew(ex, fN, bb, Z, aa)
1027- if ((fP == fP))
929+ let fl = ec(ed, fj, aT, X, Y)
930+ if ((fl == fl))
1028931 then {
1029- let ez = fP._5
1030- let fv = fP._4
1031- let dQ = fP._3
1032- let cY = fP._2
1033- let fG = fP._1
1034- let dK = if (if ((fo > 0))
1035- then (fo > fG)
932+ let eW = fl._4
933+ let du = fl._3
934+ let cP = fl._2
935+ let ff = fl._1
936+ let dn = if (if ((eQ > 0))
937+ then (eQ > ff)
1036938 else false)
1037- then aI(makeString(["amount to receive is less than ", toString(fo)], ""))
1038- else fG
1039- let fH = invoke(aL, "burn", [fN], [AttachedPayment(bb, fN)])
1040- if ((fH == fH))
939+ then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
940+ else ff
941+ let fg = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
942+ if ((fg == fg))
1041943 then {
1042- let fI = [ScriptTransfer(dC.caller, dK, ex)]
1043- let fz = if ((dQ > 0))
1044- then [ScriptTransfer(aM, dQ, ex)]
944+ let fh = [ScriptTransfer(df.caller, dn, ed)]
945+ let fa = if ((du > 0))
946+ then [ScriptTransfer(aB, du, ed)]
1045947 else nil
1046- let fQ = {
1047- let fK = if ((this == aM))
1048- then 0
1049- else dQ
1050- if (ez)
1051- then $Tuple2(-((dK + fK)), 0)
1052- else $Tuple2(0, -((dK + fK)))
1053- }
1054- let dm = fQ._1
1055- let dn = fQ._2
1056- let fR = dl(dm, dn, 0)
1057- let fk = fR._1
1058- let dc = fR._2
1059- let fl = dp(dk, dc)
1060- if ((fl == fl))
1061- then $Tuple2((((cY ++ fI) ++ fz) ++ fk), dK)
1062- else throw("Strict value is not equal to itself.")
948+ $Tuple2(((cP ++ fh) ++ fa), dn)
1063949 }
1064950 else throw("Strict value is not equal to itself.")
1065951 }
1066952 else throw("Strict value is not equal to itself.")
1067953 }
1068954 else throw("Strict value is not equal to itself.")
1069955 }
1070956 else throw("Strict value is not equal to itself.")
1071957 }
1072958
1073959
1074960
1075-@Callable(dC)
961+@Callable(df)
1076962 func get () = {
1077- let cJ = dB(dC)
1078- let fS = cJ._1
1079- let cq = cJ._2
1080- let dE = cJ._3
1081- let bY = cJ._4
1082- let cr = cJ._5
1083- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE))
1084- let fT = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1085- if ((fT == fT))
1086- then {
1087- let fU = dl(-(fS), -(cq), 0)
1088- let fk = fU._1
1089- let dc = fU._2
1090- let fl = dp(dk, dc)
1091- if ((fl == fl))
1092- then (cr ++ fk)
1093- else throw("Strict value is not equal to itself.")
1094- }
963+ let cA = de(df)
964+ let fm = cA._1
965+ let ch = cA._2
966+ let dh = cA._3
967+ let bP = cA._4
968+ let ci = cA._5
969+ let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
970+ if ((fn == fn))
971+ then ci
1095972 else throw("Strict value is not equal to itself.")
1096973 }
1097974
1098975
1099976
1100-@Callable(dC)
1101-func getNoLess (fV,fW) = {
1102- let cJ = dB(dC)
1103- let cp = cJ._1
1104- let cq = cJ._2
1105- let dE = cJ._3
1106- let bY = cJ._4
1107- let cr = cJ._5
1108- if ((fV > cp))
1109- then throw(((("noLessThenAmtAsset failed: " + toString(cp)) + " < ") + toString(fV)))
1110- else if ((fW > cq))
1111- then throw(((("noLessThenPriceAsset failed: " + toString(cq)) + " < ") + toString(fW)))
977+@Callable(df)
978+func getNoLess (fo,fp) = {
979+ let cA = de(df)
980+ let cg = cA._1
981+ let ch = cA._2
982+ let dh = cA._3
983+ let bP = cA._4
984+ let ci = cA._5
985+ if ((fo > cg))
986+ then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo)))
987+ else if ((fp > ch))
988+ then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp)))
1112989 else {
1113- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE))
1114- let fT = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1115- if ((fT == fT))
1116- then {
1117- let fX = dl(-(cp), -(cq), 0)
1118- let fk = fX._1
1119- let dc = fX._2
1120- let fl = dp(dk, dc)
1121- if ((fl == fl))
1122- then (cr ++ fk)
1123- else throw("Strict value is not equal to itself.")
1124- }
990+ let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
991+ if ((fn == fn))
992+ then ci
1125993 else throw("Strict value is not equal to itself.")
1126994 }
1127995 }
1128996
1129997
1130998
1131-@Callable(dC)
1132-func unstakeAndGet (dK) = {
1133- let fY = if ((size(dC.payments) != 0))
999+@Callable(df)
1000+func unstakeAndGet (dn) = {
1001+ let fq = if ((size(df.payments) != 0))
11341002 then throw("No payments are expected")
11351003 else true
1136- if ((fY == fY))
1004+ if ((fq == fq))
11371005 then {
1138- let bN = aP()
1139- let ca = fromBase58String(bN[q])
1140- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1141- let fO = invoke(bh, "unstake", [toBase58String(ca), dK], nil)
1142- if ((fO == fO))
1006+ let bE = aH()
1007+ let bR = fromBase58String(bE[q])
1008+ let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
1009+ if ((fk == fk))
11431010 then {
1144- let cJ = bW(toBase58String(dC.transactionId), toBase58String(ca), dK, dC.caller)
1145- let cp = cJ._1
1146- let cq = cJ._2
1147- let cd = parseIntValue(cJ._9)
1148- let cr = cJ._10
1149- let fZ = if (if (aN())
1011+ let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
1012+ let bU = parseIntValue(cA._9)
1013+ let ci = cA._10
1014+ let fr = if (if (aF())
11501015 then true
1151- else (cd == n))
1152- then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
1016+ else (bU == n))
1017+ then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
11531018 else true
1154- if ((fZ == fZ))
1019+ if ((fr == fr))
11551020 then {
1156- let fT = invoke(aL, "burn", [dK], [AttachedPayment(ca, dK)])
1157- if ((fT == fT))
1158- then {
1159- let ga = dl(-(cp), -(cq), 0)
1160- let fk = ga._1
1161- let dc = ga._2
1162- let fl = dp(dk, dc)
1163- if ((fl == fl))
1164- then (cr ++ fk)
1165- else throw("Strict value is not equal to itself.")
1166- }
1021+ let fn = invoke(aA, "burn", [dn], [AttachedPayment(bR, dn)])
1022+ if ((fn == fn))
1023+ then ci
11671024 else throw("Strict value is not equal to itself.")
11681025 }
11691026 else throw("Strict value is not equal to itself.")
11701027 }
11711028 else throw("Strict value is not equal to itself.")
11721029 }
11731030 else throw("Strict value is not equal to itself.")
11741031 }
11751032
11761033
11771034
1178-@Callable(dC)
1179-func unstakeAndGetNoLess (fN,gb,fW) = {
1180- let fE = if (aN())
1035+@Callable(df)
1036+func unstakeAndGetNoLess (fj,fs,fp) = {
1037+ let fd = if (aF())
11811038 then true
1182- else (ba == n)
1183- let ey = [if (!(fE))
1039+ else (aS == n)
1040+ let ee = [if (!(fd))
11841041 then true
1185- else throw("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1042+ else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
11861043 then true
11871044 else throw("no payments are expected")]
1188- if ((ey == ey))
1045+ if ((ee == ee))
11891046 then {
1190- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1191- let fO = invoke(bh, "unstake", [toBase58String(bb), fN], nil)
1192- if ((fO == fO))
1047+ let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1048+ if ((fk == fk))
11931049 then {
1194- let cJ = bW(toBase58String(dC.transactionId), toBase58String(bb), fN, dC.caller)
1195- let cp = cJ._1
1196- let cq = cJ._2
1197- let cr = cJ._10
1198- let gc = [if ((cp >= gb))
1050+ let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller)
1051+ let cg = cA._1
1052+ let ch = cA._2
1053+ let ci = cA._10
1054+ let ft = [if ((cg >= fs))
11991055 then true
1200- else throw(makeString(["amount asset amount to receive is less than ", toString(gb)], "")), if ((cq >= fW))
1056+ else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
12011057 then true
1202- else throw(makeString(["price asset amount to receive is less than ", toString(fW)], ""))]
1203- if ((gc == gc))
1058+ else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1059+ if ((ft == ft))
12041060 then {
1205- let fT = invoke(aL, "burn", [fN], [AttachedPayment(bb, fN)])
1206- if ((fT == fT))
1207- then {
1208- let gd = dl(-(cp), -(cq), 0)
1209- let fk = gd._1
1210- let dc = gd._2
1211- let fl = dp(dk, dc)
1212- if ((fl == fl))
1213- then (cr ++ fk)
1214- else throw("Strict value is not equal to itself.")
1215- }
1061+ let fn = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
1062+ if ((fn == fn))
1063+ then ci
12161064 else throw("Strict value is not equal to itself.")
12171065 }
12181066 else throw("Strict value is not equal to itself.")
12191067 }
12201068 else throw("Strict value is not equal to itself.")
12211069 }
12221070 else throw("Strict value is not equal to itself.")
12231071 }
12241072
12251073
12261074
1227-@Callable(dC)
1228-func activate (ge,gf) = if ((toString(dC.caller) != toString(aL)))
1075+@Callable(df)
1076+func activate (fu,fv) = if ((toString(df.caller) != toString(aA)))
12291077 then throw("permissions denied")
1230- else $Tuple2([StringEntry(ac(), ge), StringEntry(ad(), gf)], "success")
1078+ else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
12311079
12321080
12331081
1234-@Callable(dC)
1235-func refreshKLp () = {
1236- let gg = valueOrElse(getInteger(ai), 0)
1237- let gh = if (((height - gg) >= al))
1238- then unit
1239- else aI(makeString([toString(al), " blocks have not passed since the previous call"], ""))
1240- if ((gh == gh))
1241- then {
1242- let dw = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ah), "0")), aK("invalid kLp"))
1243- let gi = dl(0, 0, 0)
1244- let gj = gi._1
1245- let dc = gi._2
1246- let do = if ((dw != dc))
1247- then gj
1248- else aI("nothing to refresh")
1249- $Tuple2(do, toString(dc))
1250- }
1251- else throw("Strict value is not equal to itself.")
1082+@Callable(df)
1083+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
1084+
1085+
1086+
1087+@Callable(df)
1088+func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
1089+
1090+
1091+
1092+@Callable(df)
1093+func calcPricesWrapperREADONLY (by,bz,bD) = {
1094+ let bM = bC(by, bz, bD)
1095+ $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
12521096 }
12531097
12541098
12551099
1256-@Callable(dC)
1257-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aP())
1100+@Callable(df)
1101+func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
12581102
12591103
12601104
1261-@Callable(dC)
1262-func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
1105+@Callable(df)
1106+func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
12631107
12641108
12651109
1266-@Callable(dC)
1267-func calcPricesWrapperREADONLY (bH,bI,bM) = {
1268- let bV = bL(bH, bI, bM)
1269- $Tuple2(nil, [toString(bV[0]), toString(bV[1]), toString(bV[2])])
1110+@Callable(df)
1111+func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
1112+
1113+
1114+
1115+@Callable(df)
1116+func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
1117+
1118+
1119+
1120+@Callable(df)
1121+func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1122+ let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1123+ $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
12701124 }
12711125
12721126
12731127
1274-@Callable(dC)
1275-func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
1276-
1277-
1278-
1279-@Callable(dC)
1280-func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
1281-
1282-
1283-
1284-@Callable(dC)
1285-func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC))))
1286-
1287-
1288-
1289-@Callable(dC)
1290-func estimatePutOperationWrapperREADONLY (bX,ct,cu,cv,cw,cx,Z,cy,cz) = $Tuple2(nil, cs(bX, ct, cu, cv, cw, cx, Z, cy, cz))
1291-
1292-
1293-
1294-@Callable(dC)
1295-func estimateGetOperationWrapperREADONLY (bX,bY,bZ,Z) = {
1296- let cJ = bW(bX, bY, bZ, addressFromStringValue(Z))
1297- $Tuple2(nil, $Tuple10(cJ._1, cJ._2, cJ._3, cJ._4, cJ._5, cJ._6, cJ._7, toString(cJ._8), cJ._9, cJ._10))
1128+@Callable(df)
1129+func statsREADONLY () = {
1130+ let bE = aH()
1131+ let bR = fromBase58String(bE[q])
1132+ let cS = bE[r]
1133+ let cT = bE[s]
1134+ let ct = bE[v]
1135+ let cu = bE[w]
1136+ let bF = parseIntValue(bE[t])
1137+ let bG = parseIntValue(bE[u])
1138+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1139+ let cU = bq(cS)
1140+ let cV = bq(cT)
1141+ let fx = if ((fw == 0))
1142+ then [e, e, e]
1143+ else bC(cU, cV, fw)
1144+ let cb = 0
1145+ let fy = G(fx[1], b)
1146+ let fz = G(fx[2], b)
1147+ let fA = value(getInteger(aA, am(toString(this))))
1148+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fw), toString(cb), toString(fy), toString(fz), toString(fA)], j))
12981149 }
12991150
13001151
13011152
1302-@Callable(dC)
1303-func statsREADONLY () = {
1304- let bN = aP()
1305- let ca = fromBase58String(bN[q])
1306- let gk = bN[r]
1307- let gl = bN[s]
1308- let cC = bN[v]
1309- let cD = bN[w]
1310- let bO = parseIntValue(bN[t])
1311- let bP = parseIntValue(bN[u])
1312- let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1313- let gn = by(gk)
1314- let go = by(gl)
1315- let gp = if ((gm == 0))
1316- then [e, e, e]
1317- else bL(gn, go, gm)
1318- let ck = 0
1319- let gq = G(gp[1], b)
1320- let gr = G(gp[2], b)
1321- let gs = value(getInteger(aL, aw(toString(this))))
1322- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gn), toString(go), toString(gm), toString(ck), toString(gq), toString(gr), toString(gs)], j))
1153+@Callable(df)
1154+func evaluatePutByAmountAssetREADONLY (cl) = {
1155+ let bE = aH()
1156+ let bR = fromBase58String(bE[q])
1157+ let cr = bE[r]
1158+ let bS = fromBase58String(cr)
1159+ let cs = bE[s]
1160+ let bT = fromBase58String(cs)
1161+ let bF = parseIntValue(bE[t])
1162+ let bG = parseIntValue(bE[u])
1163+ let bU = bE[p]
1164+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1165+ let cU = bq(cr)
1166+ let cV = bq(cs)
1167+ let bA = D(cU, bF)
1168+ let bB = D(cV, bG)
1169+ let ca = if ((fw == 0))
1170+ then e
1171+ else bs(bB, bA)
1172+ let cx = D(cl, bF)
1173+ let cy = fraction(cx, ca, d)
1174+ let cn = G(cy, bG)
1175+ let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1176+ let cI = dl._1
1177+ let fB = dl._3
1178+ let bW = dl._4
1179+ let bY = dl._5
1180+ let bV = dl._6
1181+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
13231182 }
13241183
13251184
13261185
1327-@Callable(dC)
1328-func evaluatePutByAmountAssetREADONLY (cu) = {
1329- let bN = aP()
1330- let ca = fromBase58String(bN[q])
1331- let cA = bN[r]
1332- let cb = fromBase58String(cA)
1333- let cB = bN[s]
1334- let cc = fromBase58String(cB)
1335- let bO = parseIntValue(bN[t])
1336- let bP = parseIntValue(bN[u])
1337- let cd = bN[p]
1338- let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1339- let gn = by(cA)
1340- let go = by(cB)
1341- let bJ = D(gn, bO)
1342- let bK = D(go, bP)
1343- let cj = if ((gm == 0))
1186+@Callable(df)
1187+func evaluatePutByPriceAssetREADONLY (cn) = {
1188+ let bE = aH()
1189+ let bR = fromBase58String(bE[q])
1190+ let cr = bE[r]
1191+ let bS = fromBase58String(cr)
1192+ let cs = bE[s]
1193+ let bT = fromBase58String(cs)
1194+ let bF = parseIntValue(bE[t])
1195+ let bG = parseIntValue(bE[u])
1196+ let bU = bE[p]
1197+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1198+ let fC = bq(cr)
1199+ let fD = bq(cs)
1200+ let fE = D(fC, bF)
1201+ let fF = D(fD, bG)
1202+ let ca = if ((fw == 0))
13441203 then e
1345- else bA(bK, bJ)
1346- let cG = D(cu, bO)
1347- let cH = fraction(cG, cj, d)
1348- let cw = G(cH, bP)
1349- let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1350- let cR = dI._1
1351- let gt = dI._3
1352- let cf = dI._4
1353- let ch = dI._5
1354- let ce = dI._6
1355- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j))
1204+ else bs(fF, fE)
1205+ let cy = D(cn, bG)
1206+ let cx = fraction(cy, d, ca)
1207+ let cl = G(cx, bF)
1208+ let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1209+ let cI = dl._1
1210+ let fB = dl._3
1211+ let bW = dl._4
1212+ let bY = dl._5
1213+ let bV = dl._6
1214+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
13561215 }
13571216
13581217
13591218
1360-@Callable(dC)
1361-func evaluatePutByPriceAssetREADONLY (cw) = {
1362- let bN = aP()
1363- let ca = fromBase58String(bN[q])
1364- let cA = bN[r]
1365- let cb = fromBase58String(cA)
1366- let cB = bN[s]
1367- let cc = fromBase58String(cB)
1368- let bO = parseIntValue(bN[t])
1369- let bP = parseIntValue(bN[u])
1370- let cd = bN[p]
1371- let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1372- let gu = by(cA)
1373- let gv = by(cB)
1374- let gw = D(gu, bO)
1375- let gx = D(gv, bP)
1376- let cj = if ((gm == 0))
1377- then e
1378- else bA(gx, gw)
1379- let cH = D(cw, bP)
1380- let cG = fraction(cH, d, cj)
1381- let cu = G(cG, bO)
1382- let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1383- let cR = dI._1
1384- let gt = dI._3
1385- let cf = dI._4
1386- let ch = dI._5
1387- let ce = dI._6
1388- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j))
1219+@Callable(df)
1220+func evaluateGetREADONLY (fG,fH) = {
1221+ let cA = bN("", fG, fH, this)
1222+ let cg = cA._1
1223+ let ch = cA._2
1224+ let bW = cA._5
1225+ let bY = cA._6
1226+ let bV = cA._7
1227+ let cb = cA._8
1228+ let bU = parseIntValue(cA._9)
1229+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cg), toString(ch), toString(bW), toString(bY), toString(bV), toString(cb), toString(bU)], j))
13891230 }
13901231
13911232
1392-
1393-@Callable(dC)
1394-func evaluateGetREADONLY (gy,gz) = {
1395- let cJ = bW("", gy, gz, this)
1396- let cp = cJ._1
1397- let cq = cJ._2
1398- let cf = cJ._5
1399- let ch = cJ._6
1400- let ce = cJ._7
1401- let ck = cJ._8
1402- let cd = parseIntValue(cJ._9)
1403- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cp), toString(cq), toString(cf), toString(ch), toString(ce), toString(ck), toString(cd)], j))
1404- }
1405-
1406-
1407-@Verifier(gA)
1408-func gB () = {
1409- let gC = {
1410- let dN = eP()
1411- if ($isInstanceOf(dN, "ByteVector"))
1233+@Verifier(fI)
1234+func fJ () = {
1235+ let fK = {
1236+ let dq = ev()
1237+ if ($isInstanceOf(dq, "ByteVector"))
14121238 then {
1413- let eT = dN
1414- eT
1239+ let ez = dq
1240+ ez
14151241 }
1416- else if ($isInstanceOf(dN, "Unit"))
1417- then gA.senderPublicKey
1242+ else if ($isInstanceOf(dq, "Unit"))
1243+ then fI.senderPublicKey
14181244 else throw("Match error")
14191245 }
1420- let dN = gA
1421- if ($isInstanceOf(dN, "Order"))
1246+ let dq = fI
1247+ if ($isInstanceOf(dq, "Order"))
14221248 then {
1423- let ds = dN
1424- let gD = aO()
1425- let aB = dr(ds)
1426- let aC = sigVerify(ds.bodyBytes, ds.proofs[0], ds.senderPublicKey)
1427- let aD = sigVerify(ds.bodyBytes, ds.proofs[1], gD)
1428- if (if (if (aB)
1429- then aC
1249+ let cR = dq
1250+ let fL = aG()
1251+ let ar = cQ(cR)
1252+ let as = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1253+ let at = sigVerify(cR.bodyBytes, cR.proofs[1], fL)
1254+ if (if (if (ar)
1255+ then as
14301256 else false)
1431- then aD
1257+ then at
14321258 else false)
14331259 then true
1434- else aA(aB, aC, aD)
1260+ else aq(ar, as, at)
14351261 }
1436- else if ($isInstanceOf(dN, "SetScriptTransaction"))
1262+ else if ($isInstanceOf(dq, "SetScriptTransaction"))
14371263 then {
1438- let eQ = dN
1439- let gE = blake2b256(value(eQ.script))
1440- let gF = fromBase64String(value(getString(aL, ay())))
1441- let gG = scriptHash(this)
1442- if (if ((gF == gE))
1443- then (gG != gE)
1264+ let ew = dq
1265+ let fM = blake2b256(value(ew.script))
1266+ let fN = fromBase64String(value(getString(aA, ao())))
1267+ let fO = scriptHash(this)
1268+ if (if ((fN == fM))
1269+ then (fO != fM)
14441270 else false)
14451271 then true
1446- else sigVerify(gA.bodyBytes, gA.proofs[0], gC)
1272+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14471273 }
1448- else sigVerify(gA.bodyBytes, gA.proofs[0], gC)
1274+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14491275 }
14501276

github/deemru/w8io/026f985 
377.85 ms