tx · GgSpLKURgoadU3U2JUeEaMjm7cn9UZt2fvhpMaGYsVBk

3MsXwm6KeMva32skLvFrFfYYmcxT2ZDc4fD:  -0.03100000 Waves

2022.12.09 09:33 [2352430] smart account 3MsXwm6KeMva32skLvFrFfYYmcxT2ZDc4fD > SELF 0.00000000 Waves

{ "type": 13, "id": "GgSpLKURgoadU3U2JUeEaMjm7cn9UZt2fvhpMaGYsVBk", "fee": 3100000, "feeAssetId": null, "timestamp": 1670567515055, "version": 1, "sender": "3MsXwm6KeMva32skLvFrFfYYmcxT2ZDc4fD", "senderPublicKey": "33aHdznSeq5cGxgbnLJ54tzNfiqS5SCQYHgFGMFsNQzs", "proofs": [ "3BZZbyJ7ZwGthRfrZM4sC57Gbhp6aswBrMeegc2za6hM66jQzf1wzThZh8HzDknxzvH7svhXo596SKfD94rJrsgR" ], "script": "base64:BgK8JwgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASAwoBCBIFCgMBAQESBAoCAQESBAoCCAESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgSABIDCgEBEgMKAQESBAoCCAEiCmxQZGVjaW1hbHMiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgt3YXZlc1N0cmluZyIDU0VQIgpQb29sQWN0aXZlIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiDWlkeFBvb2xTdGF0dXMiEGlkeFBvb2xMUEFzc2V0SWQiDWlkeEFtdEFzc2V0SWQiD2lkeFByaWNlQXNzZXRJZCIOaWR4QW10QXNzZXREY20iEGlkeFByaWNlQXNzZXREY20iDmlkeElBbXRBc3NldElkIhBpZHhJUHJpY2VBc3NldElkIg1p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Gc2NyaXB0BAJmTgkA2wQBCQEFdmFsdWUBCQCdCAIFAmFECQECYXIABAJmTwkA8QcBBQR0aGlzAwMJAAACBQJmTgUCZk0JAQIhPQIFAmZPBQJmTQcGCQD0AwMIBQJmSQlib2R5Qnl0ZXMJAJEDAggFAmZJBnByb29mcwAABQJmSwkA9AMDCAUCZkkJYm9keUJ5dGVzCQCRAwIIBQJmSQZwcm9vZnMAAAUCZkuCh+//", "chainId": 84, "height": 2352430, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8HNsxChPauYbhnryqRDXk8rN8QNe7vzyP8cjsfty9hhx Next: Bs7MzuUb1tGUFeYT1CjS1e5grAtCrZusnp23MvnetRpt 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"
108+let ac = "%s__fee"
112109
113-let af = fraction(10, b, 10000)
110+let ad = fraction(10, b, 10000)
114111
115-let ag = valueOrElse(getInteger(this, ae), af)
112+let ae = valueOrElse(getInteger(this, ac), ad)
116113
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"
114+func af () = "%s__factoryConfig"
128115
129116
130-func an () = "%s%s__matcher__publicKey"
117+func ag () = "%s%s__matcher__publicKey"
131118
132119
133-func ao (ap) = (("%s%s%s__" + ap) + "__mappings__poolContract2LpAsset")
120+func ah (ai) = (("%s%s%s__" + ai) + "__mappings__poolContract2LpAsset")
134121
135122
136-func aq (ar,as) = (((("%d%d%s__" + ar) + "__") + as) + "__config")
123+func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config")
137124
138125
139-func at (au) = ("%s%s%s__mappings__baseAsset2internalId__" + au)
126+func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an)
140127
141128
142-func av () = "%s__shutdown"
129+func ao () = "%s__shutdown"
143130
144131
145-func aw (ax) = ("%s%s__poolWeight__" + ax)
132+func ap (aq) = ("%s%s__poolWeight__" + aq)
146133
147134
148-func ay () = "%s__allowedLpScriptHash"
135+func ar () = "%s__allowedLpScriptHash"
149136
150137
151-let az = "%s__feeCollectorAddress"
138+let as = "%s__feeCollectorAddress"
152139
153-func aA (aB,aC,aD) = throw(((((("order validation failed: orderValid=" + toString(aB)) + " senderValid=") + toString(aC)) + " matcherValid=") + toString(aD)))
140+func at (au,av,aw) = throw(((((("order validation failed: orderValid=" + toString(au)) + " senderValid=") + toString(av)) + " matcherValid=") + toString(aw)))
154141
155142
156-func aE (aF,aG) = valueOrErrorMessage(getString(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
143+func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
157144
158145
159-func aH (aF,aG) = valueOrErrorMessage(getInteger(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
146+func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
160147
161148
162-func aI (aJ) = throw(makeString(["lp.ride:", aJ], " "))
149+func aB (aC) = throw(makeString(["lp.ride:", aC], " "))
163150
164151
165-func aK (aJ) = makeString(["lp.ride:", aJ], " ")
152+let aD = addressFromStringValue(ax(this, P()))
153+
154+let aE = addressFromStringValue(ax(aD, as))
155+
156+func aF () = valueOrElse(getBoolean(aD, ao()), false)
166157
167158
168-let aL = addressFromStringValue(aE(this, R()))
169-
170-let aM = addressFromStringValue(aE(aL, az))
171-
172-func aN () = valueOrElse(getBoolean(aL, av()), false)
159+func aG () = fromBase58String(ax(aD, ag()))
173160
174161
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)
162+func aH () = {
163+ let aI = ax(this, aa())
164+ let aJ = ax(this, ab())
165+ let al = aA(aD, am(aJ))
166+ let ak = aA(aD, am(aI))
167+ split(ax(aD, aj(toString(ak), toString(al))), j)
184168 }
185169
186170
187-func aS (aT) = if ((aT == i))
171+func aK (aL) = if ((aL == i))
188172 then unit
189- else fromBase58String(aT)
173+ else fromBase58String(aL)
190174
191175
192-func aU (aT) = if ((aT == unit))
176+func aM (aL) = if ((aL == unit))
193177 then i
194- else toBase58String(value(aT))
178+ else toBase58String(value(aL))
195179
196180
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]))
181+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]))
198182
199183
200-let aX = aV(aP())
184+let aP = aN(aH())
201185
202-let aY = aX
186+let aQ = aP
203187
204-let aZ = aY._1
188+let aR = aQ._1
205189
206-let ba = aY._2
190+let aS = aQ._2
207191
208-let bb = aY._3
192+let aT = aQ._3
209193
210-let bc = aY._4
194+let aU = aQ._4
211195
212-let bd = aY._5
196+let aV = aQ._5
213197
214-let be = aY._6
198+let aW = aQ._6
215199
216-let bf = aY._7
200+let aX = aQ._7
217201
218-func bg () = split(aE(aL, am()), j)
202+func aY () = split(ax(aD, af()), j)
219203
220204
221-let bh = valueOrErrorMessage(addressFromString(bg()[B]), "incorrect staking address")
205+let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
222206
223-let bi = valueOrErrorMessage(addressFromString(bg()[C]), "incorrect staking address")
207+let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
224208
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)
209+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)
226210
227211
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)
212+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)
229213
230214
231-func by (bz) = if ((bz == "WAVES"))
215+func bq (br) = if ((br == "WAVES"))
232216 then wavesBalance(this).available
233- else assetBalance(this, fromBase58String(bz))
217+ else assetBalance(this, fromBase58String(br))
234218
235219
236-func bA (bB,bC) = fraction(bB, d, bC)
220+func bs (bt,bu) = fraction(bt, d, bu)
237221
238222
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)
223+func bv (bw,bx,by,bz) = {
224+ let bA = D(by, bw)
225+ let bB = D(bz, bx)
226+ bs(bB, bA)
246227 }
247228
248229
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]
230+func bC (by,bz,bD) = {
231+ let bE = aH()
232+ let bF = parseIntValue(bE[t])
233+ let bG = parseIntValue(bE[u])
234+ let bH = bv(bF, bG, by, bz)
235+ let bu = D(by, bF)
236+ let bt = D(bz, bG)
237+ let bI = D(bD, b)
238+ let bJ = bs(bu, bI)
239+ let bK = bs(bt, bI)
240+[bH, bJ, bK]
260241 }
261242
262243
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)]
244+func bL (by,bz,bD) = {
245+ let bM = bC(by, bz, bD)
246+[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
266247 }
267248
268249
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))
250+func bN (bO,bP,bQ,X) = {
251+ let bE = aH()
252+ let bR = bE[q]
253+ let bS = bE[r]
254+ let bT = bE[s]
255+ let bw = parseIntValue(bE[t])
256+ let bx = parseIntValue(bE[u])
257+ let bU = bE[p]
258+ let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
259+ if ((bR != bP))
279260 then throw("Invalid asset passed.")
280261 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 == ""))
262+ let bW = bq(bS)
263+ let bX = D(bW, bw)
264+ let bY = bq(bT)
265+ let bZ = D(bY, bx)
266+ let ca = bs(bZ, bX)
267+ let cb = G(ca, b)
268+ let cc = D(bQ, b)
269+ let cd = D(bV, b)
270+ let ce = fraction(bX, cc, cd)
271+ let cf = fraction(bZ, cc, cd)
272+ let cg = G(ce, bw)
273+ let ch = G(cf, bx)
274+ let ci = if ((bO == ""))
294275 then nil
295- else [ScriptTransfer(Z, cp, if ((cb == "WAVES"))
276+ else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
296277 then unit
297- else fromBase58String(cb)), ScriptTransfer(Z, cq, if ((cc == "WAVES"))
278+ else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
298279 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)
280+ 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)]
281+ $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
301282 }
302283 }
303284
304285
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))
286+func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
287+ let bE = aH()
288+ let bR = fromBase58String(bE[q])
289+ let cr = bE[r]
290+ let cs = bE[s]
291+ let ct = bE[v]
292+ let cu = bE[w]
293+ let bF = parseIntValue(bE[t])
294+ let bG = parseIntValue(bE[u])
295+ let bU = bE[p]
296+ let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
297+ let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
298+ let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
299+ if (if ((cr != cv))
319300 then true
320- else (cB != cF))
301+ else (cs != cw))
321302 then throw("Invalid amt or price asset passed.")
322303 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))
304+ let bW = if (cp)
305+ then bq(cr)
306+ else (bq(cr) - cl)
307+ let bY = if (cp)
308+ then bq(cs)
309+ else (bq(cs) - cn)
310+ let cx = D(cl, bF)
311+ let cy = D(cn, bG)
312+ let cz = bs(cy, cx)
313+ let bX = D(bW, bF)
314+ let bZ = D(bY, bG)
315+ let cA = if ((bV == 0))
335316 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)
317+ let ca = e
318+ let cB = e
319+ let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
320+ $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
340321 }
341322 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)
323+ let ca = bs(bZ, bX)
324+ let cB = fraction(O((ca - cz)), d, ca)
325+ let cC = D(ck, b)
326+ if (if ((ca != e))
327+ then (cB > cC)
347328 else false)
348- then throw(((("Price slippage " + toString(cK)) + " exceeded the passed limit of ") + toString(cL)))
329+ then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
349330 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)
331+ let cd = D(bV, b)
332+ let cD = fraction(cx, ca, d)
333+ let cE = fraction(cy, d, ca)
334+ let cF = if ((cD > cy))
335+ then $Tuple2(cE, cy)
336+ else $Tuple2(cx, cD)
337+ let cG = cF._1
338+ let cH = cF._2
339+ let bI = fraction(cd, cH, bZ)
340+ $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
360341 }
361342 }
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))
343+ let cI = cA._1
344+ let cJ = cA._2
345+ let cK = cA._3
346+ let cb = G(cA._4, b)
347+ let cL = G(cA._5, b)
348+ if ((0 >= cI))
368349 then throw("Invalid calculations. LP calculated is less than zero.")
369350 else {
370- let cV = if (!(cz))
351+ let cM = if (!(cq))
371352 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)
353+ else cI
354+ let cN = (cl - cJ)
355+ let cO = (cn - cK)
356+ 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))]
357+ $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
377358 }
378359 }
379360 }
380361
381362
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
363+func cQ (cR) = {
364+ let bE = aH()
365+ let cS = bE[r]
366+ let cT = bE[s]
367+ let bU = parseIntValue(bE[p])
368+ let bF = parseIntValue(bE[t])
369+ let bG = parseIntValue(bE[u])
370+ let cU = bq(cS)
371+ let cV = bq(cT)
372+ let ca = if ((cR.orderType == Buy))
373+ then bv(bF, bG, (cU + cR.amount), cV)
374+ else bv(bF, bG, (cU - cR.amount), cV)
375+ let cb = G(ca, b)
376+ if (if (if (aF())
377+ then true
378+ else (bU == m))
379+ then true
380+ else (bU == n))
381+ then throw("Exchange operations disabled")
382+ else {
383+ let cW = cR.assetPair.amountAsset
384+ let cX = if ((cW == unit))
385+ then "WAVES"
386+ else toBase58String(value(cW))
387+ let cY = cR.assetPair.priceAsset
388+ let cZ = if ((cY == unit))
389+ then "WAVES"
390+ else toBase58String(value(cY))
391+ if (if ((cX != cS))
392+ then true
393+ else (cZ != cT))
394+ then throw("Wrong order assets.")
395+ else {
396+ let da = cR.price
397+ let db = fraction(b, bG, bF)
398+ let dc = J(da, b, db)
399+ let dd = if ((cR.orderType == Buy))
400+ then (cb >= dc)
401+ else (dc >= cb)
402+ true
403+ }
404+ }
387405 }
388406
389407
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))
408+func de (df) = if ((size(df.payments) != 1))
444409 then throw("exactly 1 payment is expected")
445410 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())
411+ let dg = value(df.payments[0])
412+ let bP = value(dg.assetId)
413+ let dh = dg.amount
414+ let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
415+ let cg = cA._1
416+ let ch = cA._2
417+ let bU = parseIntValue(cA._9)
418+ let ci = cA._10
419+ if (if (aF())
455420 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)
421+ else (bU == n))
422+ then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
423+ else $Tuple5(cg, ch, dh, bP, ci)
459424 }
460425
461426
462-func dF (dC,ct,cz) = if ((size(dC.payments) != 2))
427+func di (df,ck,cq) = if ((size(df.payments) != 2))
463428 then throw("exactly 2 payments are expected")
464429 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())
430+ let dj = value(df.payments[0])
431+ let dk = value(df.payments[1])
432+ let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
433+ let bU = parseIntValue(dl._8)
434+ if (if (if (aF())
470435 then true
471- else (cd == l))
436+ else (bU == l))
472437 then true
473- else (cd == n))
474- then throw(("Put operation is blocked by admin. Status = " + toString(cd)))
475- else dI
438+ else (bU == n))
439+ then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
440+ else dl
476441 }
477442
478443
479-func dJ (dK) = {
480- let dL = invoke(aL, "emit", [dK], nil)
481- if ((dL == dL))
444+func dm (dn) = {
445+ let do = invoke(aD, "emit", [dn], nil)
446+ if ((do == do))
482447 then {
483- let dM = {
484- let dN = dL
485- if ($isInstanceOf(dN, "Address"))
448+ let dp = {
449+ let dq = do
450+ if ($isInstanceOf(dq, "Address"))
486451 then {
487- let dO = dN
488- invoke(dO, "emit", [dK], nil)
452+ let dr = dq
453+ invoke(dr, "emit", [dn], nil)
489454 }
490455 else unit
491456 }
492- if ((dM == dM))
493- then dK
457+ if ((dp == dp))
458+ then dn
494459 else throw("Strict value is not equal to itself.")
495460 }
496461 else throw("Strict value is not equal to itself.")
497462 }
498463
499464
500-func dP (dK) = {
501- let dQ = fraction(dK, ag, b)
502- $Tuple2((dK - dQ), dQ)
465+func ds (dn) = {
466+ let dt = fraction(dn, ae, b)
467+ $Tuple2((dn - dt), dt)
503468 }
504469
505470
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))
471+func du (dv,dw,X,Y) = {
472+ let dx = (Y == unit)
473+ let dy = bq(aM(aU))
474+ let dz = bq(aM(aV))
475+ let dA = if ((dw == aU))
511476 then true
512- else if ((dT == bd))
477+ else if ((dw == aV))
513478 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))
479+ else aB("invalid asset")
480+ let dB = if (dx)
481+ then $Tuple2(dy, dz)
482+ else if (dA)
483+ then $Tuple2((dy - dv), dz)
484+ else $Tuple2(dy, (dz - dv))
485+ let dC = dB._1
486+ let dD = dB._2
487+ let dE = if (dA)
488+ then $Tuple2(dv, 0)
489+ else $Tuple2(0, dv)
490+ let dF = dE._1
491+ let dG = dE._2
492+ let dH = ds(dF)._1
493+ let dI = ds(dG)._1
494+ let dJ = ds(dv)
495+ let dK = dJ._1
496+ let dt = dJ._2
497+ let dL = (dC + dH)
498+ let dM = (dD + dI)
499+ let dN = bs(D(dM, aX), D(dL, aW))
500+ let dO = G(dN, b)
501+ let dP = if (dA)
502+ then dC
503+ else dD
504+ let dQ = toBigInt(dP)
505+ let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
506+ let dS = if ((dR > f))
542507 then true
543- else aI("initial deposit requires all coins")
544- if ((en == en))
508+ else aB("initial deposit requires all coins")
509+ if ((dS == dS))
545510 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)
511+ let dT = toBigInt(dK)
512+ let dU = max([0, toInt(((dR * (sqrtBigInt((d + ((dT * d) / dQ)), 18, 18, DOWN) - d)) / d))])
513+ let cP = if (dx)
549514 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)
515+ else [IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dF, dG, dU, dO, 0, 0, height, lastBlock.timestamp, 0, 0))]
516+ let dV = bs(D(dD, aX), D(dC, aW))
517+ let dW = G(dV, b)
518+ let dX = {
519+ let dY = if (dA)
520+ then $Tuple2(dF, dC)
521+ else $Tuple2(dG, dD)
522+ let dn = dY._1
523+ let dZ = dY._2
524+ let ea = toInt(fraction(dR, toBigInt((dn / 2)), toBigInt(dZ)))
525+ fraction((dU - ea), b, ea)
561526 }
562- $Tuple5(ep, cY, dQ, es, dX)
527+ $Tuple4(dU, cP, dt, dX)
563528 }
564529 else throw("Strict value is not equal to itself.")
565530 }
566531
567532
568-func ew (ex,ef,dT,Z,aa) = {
569- let dU = (aa == unit)
570- let ey = [if ((dT == bb))
533+func eb (ec,dK,dw,X,Y) = {
534+ let dx = (Y == unit)
535+ let ed = [if ((dw == aT))
571536 then true
572- else aI("invalid lp asset")]
573- if ((ey == ey))
537+ else aB("invalid lp asset")]
538+ if ((ed == ed))
574539 then {
575- let ez = if ((ex == bc))
540+ let ee = if ((ec == aU))
576541 then true
577- else if ((ex == bd))
542+ else if ((ec == aV))
578543 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)
544+ else aB("invalid asset")
545+ let ef = if (ee)
546+ then toBigInt(bq(aM(aU)))
547+ else toBigInt(bq(aM(aV)))
548+ let eg = bq(aM(aU))
549+ let eh = bq(aM(aV))
550+ let ei = if (ee)
551+ then eg
552+ else eh
553+ let ej = toBigInt(ei)
554+ let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
555+ let ek = toBigInt(dK)
556+ let el = max([0, toInt(((ef * (d - pow((d - ((ek * d) / dR)), 18, h, 0, 18, DOWN))) / d))])
557+ let em = ds(el)
558+ let en = em._1
559+ let dt = em._2
560+ let eo = if (ee)
561+ then $Tuple4(en, 0, (eg - el), eh)
562+ else $Tuple4(0, en, eg, (eh - el))
563+ let ep = eo._1
564+ let eq = eo._2
565+ let er = eo._3
566+ let es = eo._4
567+ let dN = bs(D(es, aX), D(er, aW))
568+ let dO = G(dN, b)
569+ let cP = if (dx)
605570 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)
571+ else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(ep, eq, dK, dO, height, lastBlock.timestamp)), IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO)]
572+ let dV = bs(D(eh, aX), D(eg, aW))
573+ let dW = G(dV, b)
574+ let dX = {
575+ let et = (toInt(fraction(ef, ek, dR)) * 2)
576+ fraction((en - et), b, et)
612577 }
613- $Tuple5(eI, cY, dQ, es, ez)
578+ $Tuple4(en, cP, dt, dX)
614579 }
615580 else throw("Strict value is not equal to itself.")
616581 }
617582
618583
619-func eP () = {
620- let dN = getString(S())
621- if ($isInstanceOf(dN, "String"))
584+func eu () = {
585+ let dq = getString(Q())
586+ if ($isInstanceOf(dq, "String"))
622587 then {
623- let eQ = dN
624- fromBase58String(eQ)
588+ let ev = dq
589+ fromBase58String(ev)
625590 }
626- else if ($isInstanceOf(dN, "Unit"))
591+ else if ($isInstanceOf(dq, "Unit"))
627592 then unit
628593 else throw("Match error")
629594 }
630595
631596
632-func eR () = {
633- let dN = getString(T())
634- if ($isInstanceOf(dN, "String"))
597+func ew () = {
598+ let dq = getString(R())
599+ if ($isInstanceOf(dq, "String"))
635600 then {
636- let eQ = dN
637- fromBase58String(eQ)
601+ let ev = dq
602+ fromBase58String(ev)
638603 }
639- else if ($isInstanceOf(dN, "Unit"))
604+ else if ($isInstanceOf(dq, "Unit"))
640605 then unit
641606 else throw("Match error")
642607 }
643608
644609
645-func eS (dC) = {
646- let dN = eP()
647- if ($isInstanceOf(dN, "ByteVector"))
610+func ex (df) = {
611+ let dq = eu()
612+ if ($isInstanceOf(dq, "ByteVector"))
648613 then {
649- let eT = dN
650- (dC.callerPublicKey == eT)
614+ let ey = dq
615+ (df.callerPublicKey == ey)
651616 }
652- else if ($isInstanceOf(dN, "Unit"))
653- then (dC.caller == this)
617+ else if ($isInstanceOf(dq, "Unit"))
618+ then (df.caller == this)
654619 else throw("Match error")
655620 }
656621
657622
658-func eU (dC) = {
659- let eV = throw("Permission denied")
660- let dN = eP()
661- if ($isInstanceOf(dN, "ByteVector"))
623+func ez (df) = {
624+ let eA = throw("Permission denied")
625+ let dq = eu()
626+ if ($isInstanceOf(dq, "ByteVector"))
662627 then {
663- let eT = dN
664- if ((dC.callerPublicKey == eT))
628+ let ey = dq
629+ if ((df.callerPublicKey == ey))
665630 then true
666- else eV
631+ else eA
667632 }
668- else if ($isInstanceOf(dN, "Unit"))
669- then if ((dC.caller == this))
633+ else if ($isInstanceOf(dq, "Unit"))
634+ then if ((df.caller == this))
670635 then true
671- else eV
636+ else eA
672637 else throw("Match error")
673638 }
674639
675640
676-@Callable(dC)
677-func setManager (eW) = {
678- let eX = eU(dC)
679- if ((eX == eX))
641+@Callable(df)
642+func setManager (eB) = {
643+ let eC = ez(df)
644+ if ((eC == eC))
680645 then {
681- let eY = fromBase58String(eW)
682- if ((eY == eY))
683- then [StringEntry(T(), eW)]
646+ let eD = fromBase58String(eB)
647+ if ((eD == eD))
648+ then [StringEntry(R(), eB)]
684649 else throw("Strict value is not equal to itself.")
685650 }
686651 else throw("Strict value is not equal to itself.")
688653
689654
690655
691-@Callable(dC)
656+@Callable(df)
692657 func confirmManager () = {
693- let eZ = eR()
694- let fa = if (isDefined(eZ))
658+ let eE = ew()
659+ let eF = if (isDefined(eE))
695660 then true
696661 else throw("No pending manager")
697- if ((fa == fa))
662+ if ((eF == eF))
698663 then {
699- let fb = if ((dC.callerPublicKey == value(eZ)))
664+ let eG = if ((df.callerPublicKey == value(eE)))
700665 then true
701666 else throw("You are not pending manager")
702- if ((fb == fb))
703- then [StringEntry(S(), toBase58String(value(eZ))), DeleteEntry(T())]
667+ if ((eG == eG))
668+ then [StringEntry(Q(), toBase58String(value(eE))), DeleteEntry(R())]
704669 else throw("Strict value is not equal to itself.")
705670 }
706671 else throw("Strict value is not equal to itself.")
708673
709674
710675
711-@Callable(dC)
712-func put (ct,fc) = if ((0 > ct))
676+@Callable(df)
677+func put (ck,eH) = if ((0 > ck))
713678 then throw("Invalid slippageTolerance passed")
714679 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))
680+ let dl = di(df, ck, true)
681+ let cM = dl._2
682+ let bR = dl._7
683+ let ci = dl._9
684+ let cN = dl._10
685+ let cO = dl._11
686+ let eI = dl._12
687+ let eJ = dl._13
688+ let do = invoke(aD, "emit", [cM], nil)
689+ if ((do == do))
727690 then {
728- let dL = invoke(aL, "emit", [cV], nil)
729- if ((dL == dL))
691+ let dp = {
692+ let dq = do
693+ if ($isInstanceOf(dq, "Address"))
694+ then {
695+ let dr = dq
696+ invoke(dr, "emit", [cM], nil)
697+ }
698+ else unit
699+ }
700+ if ((dp == dp))
730701 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))
702+ let eK = if ((cN > 0))
703+ then invoke(ba, "put", nil, [AttachedPayment(eI, cN)])
704+ else nil
705+ if ((eK == eK))
741706 then {
742- let ff = if ((cW > 0))
743- then invoke(bi, "put", nil, [AttachedPayment(fd, cW)])
707+ let eL = if ((cO > 0))
708+ then invoke(ba, "put", nil, [AttachedPayment(eJ, cO)])
744709 else nil
745- if ((ff == ff))
710+ if ((eL == eL))
746711 then {
747- let fg = if ((cX > 0))
748- then invoke(bi, "put", nil, [AttachedPayment(fe, cX)])
749- else nil
750- if ((fg == fg))
712+ let eM = if (eH)
751713 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- }
714+ let eN = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
715+ if ((eN == eN))
716+ then nil
770717 else throw("Strict value is not equal to itself.")
771718 }
772- else throw("Strict value is not equal to itself.")
719+ else [ScriptTransfer(df.caller, cM, bR)]
720+ (ci ++ eM)
773721 }
774722 else throw("Strict value is not equal to itself.")
775723 }
782730
783731
784732
785-@Callable(dC)
786-func putForFree (fm) = if ((0 > fm))
733+@Callable(df)
734+func putForFree (eO) = if ((0 > eO))
787735 then throw("Invalid value passed")
788736 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.")
737+ let dl = di(df, eO, false)
738+ dl._9
805739 }
806740
807741
808742
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"))
743+@Callable(df)
744+func putOneTkn (eP,eQ) = {
745+ let eR = {
746+ let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
747+ if ($isInstanceOf(eS, "Boolean"))
748+ then eS
749+ else throw(($getType(eS) + " couldn't be cast to Boolean"))
816750 }
817- let fs = if (if (if (aN())
751+ let eT = if (if (if (aF())
818752 then true
819- else (ba == l))
753+ else (aS == l))
820754 then true
821- else (ba == n))
755+ else (aS == n))
822756 then true
823- else fq
824- let ey = [if (if (!(fs))
757+ else eR
758+ let ed = [if (if (!(eT))
825759 then true
826- else eS(dC))
760+ else ex(df))
827761 then true
828- else aI("put operation is blocked by admin"), if ((size(dC.payments) == 1))
762+ else aB("put operation is blocked by admin"), if ((size(df.payments) == 1))
829763 then true
830- else aI("exactly 1 payment are expected")]
831- if ((ey == ey))
764+ else aB("exactly 1 payment are expected")]
765+ if ((ed == ed))
832766 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))
767+ let eU = df.payments[0]
768+ let dw = eU.assetId
769+ let dv = eU.amount
770+ let X = df.caller
771+ let Y = df.transactionId
772+ let eV = du(dv, dw, X, Y)
773+ if ((eV == eV))
845774 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)
775+ let eW = eV._4
776+ let dt = eV._3
777+ let cP = eV._2
778+ let eX = eV._1
779+ let eY = if (if ((eP > 0))
780+ then (eP > eX)
853781 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))
782+ then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
783+ else eX
784+ let do = dm(eY)
785+ if ((do == do))
858786 then {
859- let fh = if (fp)
787+ let eM = if (eQ)
860788 then {
861- let fy = invoke(bh, "stake", nil, [AttachedPayment(bb, fx)])
862- if ((fy == fy))
789+ let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
790+ if ((eZ == eZ))
863791 then nil
864792 else throw("Strict value is not equal to itself.")
865793 }
866- else [ScriptTransfer(dC.caller, fx, bb)]
867- let fz = if ((dQ > 0))
868- then [ScriptTransfer(aM, dQ, dT)]
794+ else [ScriptTransfer(df.caller, eY, aT)]
795+ let fa = if ((dt > 0))
796+ then [ScriptTransfer(aE, dt, dw)]
869797 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.")
798+ $Tuple2(((cP ++ eM) ++ fa), eY)
885799 }
886800 else throw("Strict value is not equal to itself.")
887801 }
892806
893807
894808
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))
809+@Callable(df)
810+func putOneTknREADONLY (dw,dv) = {
811+ let fb = du(dv, aK(dw), unit, unit)
812+ let eX = fb._1
813+ let cP = fb._2
814+ let dt = fb._3
815+ let eW = fb._4
816+ $Tuple2(nil, $Tuple3(eX, dt, eW))
904817 }
905818
906819
907820
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"))
821+@Callable(df)
822+func getOneTkn (fc,eP) = {
823+ let eR = {
824+ let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
825+ if ($isInstanceOf(eS, "Boolean"))
826+ then eS
827+ else throw(($getType(eS) + " couldn't be cast to Boolean"))
915828 }
916- let fE = if (if (aN())
829+ let fd = if (if (aF())
917830 then true
918- else (ba == n))
831+ else (aS == n))
919832 then true
920- else fq
921- let ey = [if (if (!(fE))
833+ else eR
834+ let ed = [if (if (!(fd))
922835 then true
923- else eS(dC))
836+ else ex(df))
924837 then true
925- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 1))
838+ else aB("get operation is blocked by admin"), if ((size(df.payments) == 1))
926839 then true
927- else aI("exactly 1 payment are expected")]
928- if ((ey == ey))
840+ else aB("exactly 1 payment are expected")]
841+ if ((ed == ed))
929842 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))
843+ let ec = aK(fc)
844+ let eU = df.payments[0]
845+ let dw = eU.assetId
846+ let dK = eU.amount
847+ let X = df.caller
848+ let Y = df.transactionId
849+ let fe = eb(ec, dK, dw, X, Y)
850+ if ((fe == fe))
939851 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)
852+ let eW = fe._4
853+ let dt = fe._3
854+ let cP = fe._2
855+ let ff = fe._1
856+ let dn = if (if ((eP > 0))
857+ then (eP > ff)
947858 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))
859+ then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
860+ else ff
861+ let fg = invoke(aD, "burn", [dK], [AttachedPayment(dw, dK)])
862+ if ((fg == fg))
952863 then {
953- let fI = [ScriptTransfer(Z, dK, ex)]
954- let fz = if ((dQ > 0))
955- then [ScriptTransfer(aM, dQ, ex)]
864+ let fh = [ScriptTransfer(X, dn, ec)]
865+ let fa = if ((dt > 0))
866+ then [ScriptTransfer(aE, dt, ec)]
956867 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.")
868+ $Tuple2(((cP ++ fh) ++ fa), dn)
974869 }
975870 else throw("Strict value is not equal to itself.")
976871 }
981876
982877
983878
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))
879+@Callable(df)
880+func getOneTknREADONLY (ec,dK) = {
881+ let fi = eb(aK(ec), dK, aT, unit, unit)
882+ let ff = fi._1
883+ let cP = fi._2
884+ let dt = fi._3
885+ let eW = fi._4
886+ $Tuple2(nil, $Tuple3(ff, dt, eW))
993887 }
994888
995889
996890
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"))
891+@Callable(df)
892+func unstakeAndGetOneTkn (fj,fc,eP) = {
893+ let eR = {
894+ let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
895+ if ($isInstanceOf(eS, "Boolean"))
896+ then eS
897+ else throw(($getType(eS) + " couldn't be cast to Boolean"))
1004898 }
1005- let fE = if (if (aN())
899+ let fd = if (if (aF())
1006900 then true
1007- else (ba == n))
901+ else (aS == n))
1008902 then true
1009- else fq
1010- let ey = [if (if (!(fE))
903+ else eR
904+ let ed = [if (if (!(fd))
1011905 then true
1012- else eS(dC))
906+ else ex(df))
1013907 then true
1014- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 0))
908+ else aB("get operation is blocked by admin"), if ((size(df.payments) == 0))
1015909 then true
1016- else aI("no payments are expected")]
1017- if ((ey == ey))
910+ else aB("no payments are expected")]
911+ if ((ed == ed))
1018912 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))
913+ let ec = aK(fc)
914+ let X = df.caller
915+ let Y = df.transactionId
916+ let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
917+ if ((fk == fk))
1025918 then {
1026- let fP = ew(ex, fN, bb, Z, aa)
1027- if ((fP == fP))
919+ let fl = eb(ec, fj, aT, X, Y)
920+ if ((fl == fl))
1028921 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)
922+ let eW = fl._4
923+ let dt = fl._3
924+ let cP = fl._2
925+ let ff = fl._1
926+ let dn = if (if ((eP > 0))
927+ then (eP > ff)
1036928 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))
929+ then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
930+ else ff
931+ let fg = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)])
932+ if ((fg == fg))
1041933 then {
1042- let fI = [ScriptTransfer(dC.caller, dK, ex)]
1043- let fz = if ((dQ > 0))
1044- then [ScriptTransfer(aM, dQ, ex)]
934+ let fh = [ScriptTransfer(df.caller, dn, ec)]
935+ let fa = if ((dt > 0))
936+ then [ScriptTransfer(aE, dt, ec)]
1045937 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.")
938+ $Tuple2(((cP ++ fh) ++ fa), dn)
1063939 }
1064940 else throw("Strict value is not equal to itself.")
1065941 }
1072948
1073949
1074950
1075-@Callable(dC)
951+@Callable(df)
1076952 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- }
953+ let cA = de(df)
954+ let fm = cA._1
955+ let ch = cA._2
956+ let dh = cA._3
957+ let bP = cA._4
958+ let ci = cA._5
959+ let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
960+ if ((fn == fn))
961+ then ci
1095962 else throw("Strict value is not equal to itself.")
1096963 }
1097964
1098965
1099966
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)))
967+@Callable(df)
968+func getNoLess (fo,fp) = {
969+ let cA = de(df)
970+ let cg = cA._1
971+ let ch = cA._2
972+ let dh = cA._3
973+ let bP = cA._4
974+ let ci = cA._5
975+ if ((fo > cg))
976+ then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo)))
977+ else if ((fp > ch))
978+ then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp)))
1112979 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- }
980+ let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
981+ if ((fn == fn))
982+ then ci
1125983 else throw("Strict value is not equal to itself.")
1126984 }
1127985 }
1128986
1129987
1130988
1131-@Callable(dC)
1132-func unstakeAndGet (dK) = {
1133- let fY = if ((size(dC.payments) != 0))
989+@Callable(df)
990+func unstakeAndGet (dn) = {
991+ let fq = if ((size(df.payments) != 0))
1134992 then throw("No payments are expected")
1135993 else true
1136- if ((fY == fY))
994+ if ((fq == fq))
1137995 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))
996+ let bE = aH()
997+ let bR = fromBase58String(bE[q])
998+ let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
999+ if ((fk == fk))
11431000 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())
1001+ let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
1002+ let bU = parseIntValue(cA._9)
1003+ let ci = cA._10
1004+ let fr = if (if (aF())
11501005 then true
1151- else (cd == n))
1152- then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
1006+ else (bU == n))
1007+ then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
11531008 else true
1154- if ((fZ == fZ))
1009+ if ((fr == fr))
11551010 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- }
1011+ let fn = invoke(aD, "burn", [dn], [AttachedPayment(bR, dn)])
1012+ if ((fn == fn))
1013+ then ci
11671014 else throw("Strict value is not equal to itself.")
11681015 }
11691016 else throw("Strict value is not equal to itself.")
11751022
11761023
11771024
1178-@Callable(dC)
1179-func unstakeAndGetNoLess (fN,gb,fW) = {
1180- let fE = if (aN())
1025+@Callable(df)
1026+func unstakeAndGetNoLess (fj,fs,fp) = {
1027+ let fd = if (aF())
11811028 then true
1182- else (ba == n)
1183- let ey = [if (!(fE))
1029+ else (aS == n)
1030+ let ed = [if (!(fd))
11841031 then true
1185- else throw("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1032+ else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
11861033 then true
11871034 else throw("no payments are expected")]
1188- if ((ey == ey))
1035+ if ((ed == ed))
11891036 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))
1037+ let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1038+ if ((fk == fk))
11931039 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))
1040+ let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller)
1041+ let cg = cA._1
1042+ let ch = cA._2
1043+ let ci = cA._10
1044+ let ft = [if ((cg >= fs))
11991045 then true
1200- else throw(makeString(["amount asset amount to receive is less than ", toString(gb)], "")), if ((cq >= fW))
1046+ else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
12011047 then true
1202- else throw(makeString(["price asset amount to receive is less than ", toString(fW)], ""))]
1203- if ((gc == gc))
1048+ else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1049+ if ((ft == ft))
12041050 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- }
1051+ let fn = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)])
1052+ if ((fn == fn))
1053+ then ci
12161054 else throw("Strict value is not equal to itself.")
12171055 }
12181056 else throw("Strict value is not equal to itself.")
12241062
12251063
12261064
1227-@Callable(dC)
1228-func activate (ge,gf) = if ((toString(dC.caller) != toString(aL)))
1065+@Callable(df)
1066+func activate (fu,fv) = if ((toString(df.caller) != toString(aD)))
12291067 then throw("permissions denied")
1230- else $Tuple2([StringEntry(ac(), ge), StringEntry(ad(), gf)], "success")
1068+ else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
12311069
12321070
12331071
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.")
1072+@Callable(df)
1073+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
1074+
1075+
1076+
1077+@Callable(df)
1078+func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
1079+
1080+
1081+
1082+@Callable(df)
1083+func calcPricesWrapperREADONLY (by,bz,bD) = {
1084+ let bM = bC(by, bz, bD)
1085+ $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
12521086 }
12531087
12541088
12551089
1256-@Callable(dC)
1257-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aP())
1090+@Callable(df)
1091+func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
12581092
12591093
12601094
1261-@Callable(dC)
1262-func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
1095+@Callable(df)
1096+func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
12631097
12641098
12651099
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])])
1100+@Callable(df)
1101+func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
1102+
1103+
1104+
1105+@Callable(df)
1106+func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
1107+
1108+
1109+
1110+@Callable(df)
1111+func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1112+ let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1113+ $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
12701114 }
12711115
12721116
12731117
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))
1118+@Callable(df)
1119+func statsREADONLY () = {
1120+ let bE = aH()
1121+ let bR = fromBase58String(bE[q])
1122+ let cS = bE[r]
1123+ let cT = bE[s]
1124+ let ct = bE[v]
1125+ let cu = bE[w]
1126+ let bF = parseIntValue(bE[t])
1127+ let bG = parseIntValue(bE[u])
1128+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1129+ let cU = bq(cS)
1130+ let cV = bq(cT)
1131+ let fx = if ((fw == 0))
1132+ then [e, e, e]
1133+ else bC(cU, cV, fw)
1134+ let cb = 0
1135+ let fy = G(fx[1], b)
1136+ let fz = G(fx[2], b)
1137+ let fA = value(getInteger(aD, ap(toString(this))))
1138+ $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))
12981139 }
12991140
13001141
13011142
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))
1143+@Callable(df)
1144+func evaluatePutByAmountAssetREADONLY (cl) = {
1145+ let bE = aH()
1146+ let bR = fromBase58String(bE[q])
1147+ let cr = bE[r]
1148+ let bS = fromBase58String(cr)
1149+ let cs = bE[s]
1150+ let bT = fromBase58String(cs)
1151+ let bF = parseIntValue(bE[t])
1152+ let bG = parseIntValue(bE[u])
1153+ let bU = bE[p]
1154+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1155+ let cU = bq(cr)
1156+ let cV = bq(cs)
1157+ let bA = D(cU, bF)
1158+ let bB = D(cV, bG)
1159+ let ca = if ((fw == 0))
1160+ then e
1161+ else bs(bB, bA)
1162+ let cx = D(cl, bF)
1163+ let cy = fraction(cx, ca, d)
1164+ let cn = G(cy, bG)
1165+ let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1166+ let cI = dl._1
1167+ let fB = dl._3
1168+ let bW = dl._4
1169+ let bY = dl._5
1170+ let bV = dl._6
1171+ $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))
13231172 }
13241173
13251174
13261175
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))
1176+@Callable(df)
1177+func evaluatePutByPriceAssetREADONLY (cn) = {
1178+ let bE = aH()
1179+ let bR = fromBase58String(bE[q])
1180+ let cr = bE[r]
1181+ let bS = fromBase58String(cr)
1182+ let cs = bE[s]
1183+ let bT = fromBase58String(cs)
1184+ let bF = parseIntValue(bE[t])
1185+ let bG = parseIntValue(bE[u])
1186+ let bU = bE[p]
1187+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1188+ let fC = bq(cr)
1189+ let fD = bq(cs)
1190+ let fE = D(fC, bF)
1191+ let fF = D(fD, bG)
1192+ let ca = if ((fw == 0))
13441193 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))
1194+ else bs(fF, fE)
1195+ let cy = D(cn, bG)
1196+ let cx = fraction(cy, d, ca)
1197+ let cl = G(cx, bF)
1198+ let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1199+ let cI = dl._1
1200+ let fB = dl._3
1201+ let bW = dl._4
1202+ let bY = dl._5
1203+ let bV = dl._6
1204+ $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))
13561205 }
13571206
13581207
13591208
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))
1209+@Callable(df)
1210+func evaluateGetREADONLY (fG,fH) = {
1211+ let cA = bN("", fG, fH, this)
1212+ let cg = cA._1
1213+ let ch = cA._2
1214+ let bW = cA._5
1215+ let bY = cA._6
1216+ let bV = cA._7
1217+ let cb = cA._8
1218+ let bU = parseIntValue(cA._9)
1219+ $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))
13891220 }
13901221
13911222
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"))
1223+@Verifier(fI)
1224+func fJ () = {
1225+ let fK = {
1226+ let dq = eu()
1227+ if ($isInstanceOf(dq, "ByteVector"))
14121228 then {
1413- let eT = dN
1414- eT
1229+ let ey = dq
1230+ ey
14151231 }
1416- else if ($isInstanceOf(dN, "Unit"))
1417- then gA.senderPublicKey
1232+ else if ($isInstanceOf(dq, "Unit"))
1233+ then fI.senderPublicKey
14181234 else throw("Match error")
14191235 }
1420- let dN = gA
1421- if ($isInstanceOf(dN, "Order"))
1236+ let dq = fI
1237+ if ($isInstanceOf(dq, "Order"))
14221238 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
1239+ let cR = dq
1240+ let fL = aG()
1241+ let au = cQ(cR)
1242+ let av = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1243+ let aw = sigVerify(cR.bodyBytes, cR.proofs[1], fL)
1244+ if (if (if (au)
1245+ then av
14301246 else false)
1431- then aD
1247+ then aw
14321248 else false)
14331249 then true
1434- else aA(aB, aC, aD)
1250+ else at(au, av, aw)
14351251 }
1436- else if ($isInstanceOf(dN, "SetScriptTransaction"))
1252+ else if ($isInstanceOf(dq, "SetScriptTransaction"))
14371253 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)
1254+ let ev = dq
1255+ let fM = blake2b256(value(ev.script))
1256+ let fN = fromBase64String(value(getString(aD, ar())))
1257+ let fO = scriptHash(this)
1258+ if (if ((fN == fM))
1259+ then (fO != fM)
14441260 else false)
14451261 then true
1446- else sigVerify(gA.bodyBytes, gA.proofs[0], gC)
1262+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14471263 }
1448- else sigVerify(gA.bodyBytes, gA.proofs[0], gC)
1264+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14491265 }
14501266
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"
108+let ac = "%s__fee"
112109
113-let af = fraction(10, b, 10000)
110+let ad = fraction(10, b, 10000)
114111
115-let ag = valueOrElse(getInteger(this, ae), af)
112+let ae = valueOrElse(getInteger(this, ac), ad)
116113
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"
114+func af () = "%s__factoryConfig"
128115
129116
130-func an () = "%s%s__matcher__publicKey"
117+func ag () = "%s%s__matcher__publicKey"
131118
132119
133-func ao (ap) = (("%s%s%s__" + ap) + "__mappings__poolContract2LpAsset")
120+func ah (ai) = (("%s%s%s__" + ai) + "__mappings__poolContract2LpAsset")
134121
135122
136-func aq (ar,as) = (((("%d%d%s__" + ar) + "__") + as) + "__config")
123+func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config")
137124
138125
139-func at (au) = ("%s%s%s__mappings__baseAsset2internalId__" + au)
126+func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an)
140127
141128
142-func av () = "%s__shutdown"
129+func ao () = "%s__shutdown"
143130
144131
145-func aw (ax) = ("%s%s__poolWeight__" + ax)
132+func ap (aq) = ("%s%s__poolWeight__" + aq)
146133
147134
148-func ay () = "%s__allowedLpScriptHash"
135+func ar () = "%s__allowedLpScriptHash"
149136
150137
151-let az = "%s__feeCollectorAddress"
138+let as = "%s__feeCollectorAddress"
152139
153-func aA (aB,aC,aD) = throw(((((("order validation failed: orderValid=" + toString(aB)) + " senderValid=") + toString(aC)) + " matcherValid=") + toString(aD)))
140+func at (au,av,aw) = throw(((((("order validation failed: orderValid=" + toString(au)) + " senderValid=") + toString(av)) + " matcherValid=") + toString(aw)))
154141
155142
156-func aE (aF,aG) = valueOrErrorMessage(getString(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
143+func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
157144
158145
159-func aH (aF,aG) = valueOrErrorMessage(getInteger(aF, aG), makeString(["mandatory ", toString(aF), ".", aG, " is not defined"], ""))
146+func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
160147
161148
162-func aI (aJ) = throw(makeString(["lp.ride:", aJ], " "))
149+func aB (aC) = throw(makeString(["lp.ride:", aC], " "))
163150
164151
165-func aK (aJ) = makeString(["lp.ride:", aJ], " ")
152+let aD = addressFromStringValue(ax(this, P()))
153+
154+let aE = addressFromStringValue(ax(aD, as))
155+
156+func aF () = valueOrElse(getBoolean(aD, ao()), false)
166157
167158
168-let aL = addressFromStringValue(aE(this, R()))
169-
170-let aM = addressFromStringValue(aE(aL, az))
171-
172-func aN () = valueOrElse(getBoolean(aL, av()), false)
159+func aG () = fromBase58String(ax(aD, ag()))
173160
174161
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)
162+func aH () = {
163+ let aI = ax(this, aa())
164+ let aJ = ax(this, ab())
165+ let al = aA(aD, am(aJ))
166+ let ak = aA(aD, am(aI))
167+ split(ax(aD, aj(toString(ak), toString(al))), j)
184168 }
185169
186170
187-func aS (aT) = if ((aT == i))
171+func aK (aL) = if ((aL == i))
188172 then unit
189- else fromBase58String(aT)
173+ else fromBase58String(aL)
190174
191175
192-func aU (aT) = if ((aT == unit))
176+func aM (aL) = if ((aL == unit))
193177 then i
194- else toBase58String(value(aT))
178+ else toBase58String(value(aL))
195179
196180
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]))
181+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]))
198182
199183
200-let aX = aV(aP())
184+let aP = aN(aH())
201185
202-let aY = aX
186+let aQ = aP
203187
204-let aZ = aY._1
188+let aR = aQ._1
205189
206-let ba = aY._2
190+let aS = aQ._2
207191
208-let bb = aY._3
192+let aT = aQ._3
209193
210-let bc = aY._4
194+let aU = aQ._4
211195
212-let bd = aY._5
196+let aV = aQ._5
213197
214-let be = aY._6
198+let aW = aQ._6
215199
216-let bf = aY._7
200+let aX = aQ._7
217201
218-func bg () = split(aE(aL, am()), j)
202+func aY () = split(ax(aD, af()), j)
219203
220204
221-let bh = valueOrErrorMessage(addressFromString(bg()[B]), "incorrect staking address")
205+let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
222206
223-let bi = valueOrErrorMessage(addressFromString(bg()[C]), "incorrect staking address")
207+let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
224208
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)
209+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)
226210
227211
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)
212+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)
229213
230214
231-func by (bz) = if ((bz == "WAVES"))
215+func bq (br) = if ((br == "WAVES"))
232216 then wavesBalance(this).available
233- else assetBalance(this, fromBase58String(bz))
217+ else assetBalance(this, fromBase58String(br))
234218
235219
236-func bA (bB,bC) = fraction(bB, d, bC)
220+func bs (bt,bu) = fraction(bt, d, bu)
237221
238222
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)
223+func bv (bw,bx,by,bz) = {
224+ let bA = D(by, bw)
225+ let bB = D(bz, bx)
226+ bs(bB, bA)
246227 }
247228
248229
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]
230+func bC (by,bz,bD) = {
231+ let bE = aH()
232+ let bF = parseIntValue(bE[t])
233+ let bG = parseIntValue(bE[u])
234+ let bH = bv(bF, bG, by, bz)
235+ let bu = D(by, bF)
236+ let bt = D(bz, bG)
237+ let bI = D(bD, b)
238+ let bJ = bs(bu, bI)
239+ let bK = bs(bt, bI)
240+[bH, bJ, bK]
260241 }
261242
262243
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)]
244+func bL (by,bz,bD) = {
245+ let bM = bC(by, bz, bD)
246+[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
266247 }
267248
268249
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))
250+func bN (bO,bP,bQ,X) = {
251+ let bE = aH()
252+ let bR = bE[q]
253+ let bS = bE[r]
254+ let bT = bE[s]
255+ let bw = parseIntValue(bE[t])
256+ let bx = parseIntValue(bE[u])
257+ let bU = bE[p]
258+ let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
259+ if ((bR != bP))
279260 then throw("Invalid asset passed.")
280261 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 == ""))
262+ let bW = bq(bS)
263+ let bX = D(bW, bw)
264+ let bY = bq(bT)
265+ let bZ = D(bY, bx)
266+ let ca = bs(bZ, bX)
267+ let cb = G(ca, b)
268+ let cc = D(bQ, b)
269+ let cd = D(bV, b)
270+ let ce = fraction(bX, cc, cd)
271+ let cf = fraction(bZ, cc, cd)
272+ let cg = G(ce, bw)
273+ let ch = G(cf, bx)
274+ let ci = if ((bO == ""))
294275 then nil
295- else [ScriptTransfer(Z, cp, if ((cb == "WAVES"))
276+ else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
296277 then unit
297- else fromBase58String(cb)), ScriptTransfer(Z, cq, if ((cc == "WAVES"))
278+ else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
298279 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)
280+ 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)]
281+ $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
301282 }
302283 }
303284
304285
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))
286+func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
287+ let bE = aH()
288+ let bR = fromBase58String(bE[q])
289+ let cr = bE[r]
290+ let cs = bE[s]
291+ let ct = bE[v]
292+ let cu = bE[w]
293+ let bF = parseIntValue(bE[t])
294+ let bG = parseIntValue(bE[u])
295+ let bU = bE[p]
296+ let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
297+ let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
298+ let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
299+ if (if ((cr != cv))
319300 then true
320- else (cB != cF))
301+ else (cs != cw))
321302 then throw("Invalid amt or price asset passed.")
322303 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))
304+ let bW = if (cp)
305+ then bq(cr)
306+ else (bq(cr) - cl)
307+ let bY = if (cp)
308+ then bq(cs)
309+ else (bq(cs) - cn)
310+ let cx = D(cl, bF)
311+ let cy = D(cn, bG)
312+ let cz = bs(cy, cx)
313+ let bX = D(bW, bF)
314+ let bZ = D(bY, bG)
315+ let cA = if ((bV == 0))
335316 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)
317+ let ca = e
318+ let cB = e
319+ let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
320+ $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
340321 }
341322 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)
323+ let ca = bs(bZ, bX)
324+ let cB = fraction(O((ca - cz)), d, ca)
325+ let cC = D(ck, b)
326+ if (if ((ca != e))
327+ then (cB > cC)
347328 else false)
348- then throw(((("Price slippage " + toString(cK)) + " exceeded the passed limit of ") + toString(cL)))
329+ then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
349330 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)
331+ let cd = D(bV, b)
332+ let cD = fraction(cx, ca, d)
333+ let cE = fraction(cy, d, ca)
334+ let cF = if ((cD > cy))
335+ then $Tuple2(cE, cy)
336+ else $Tuple2(cx, cD)
337+ let cG = cF._1
338+ let cH = cF._2
339+ let bI = fraction(cd, cH, bZ)
340+ $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
360341 }
361342 }
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))
343+ let cI = cA._1
344+ let cJ = cA._2
345+ let cK = cA._3
346+ let cb = G(cA._4, b)
347+ let cL = G(cA._5, b)
348+ if ((0 >= cI))
368349 then throw("Invalid calculations. LP calculated is less than zero.")
369350 else {
370- let cV = if (!(cz))
351+ let cM = if (!(cq))
371352 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)
353+ else cI
354+ let cN = (cl - cJ)
355+ let cO = (cn - cK)
356+ 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))]
357+ $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
377358 }
378359 }
379360 }
380361
381362
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
363+func cQ (cR) = {
364+ let bE = aH()
365+ let cS = bE[r]
366+ let cT = bE[s]
367+ let bU = parseIntValue(bE[p])
368+ let bF = parseIntValue(bE[t])
369+ let bG = parseIntValue(bE[u])
370+ let cU = bq(cS)
371+ let cV = bq(cT)
372+ let ca = if ((cR.orderType == Buy))
373+ then bv(bF, bG, (cU + cR.amount), cV)
374+ else bv(bF, bG, (cU - cR.amount), cV)
375+ let cb = G(ca, b)
376+ if (if (if (aF())
377+ then true
378+ else (bU == m))
379+ then true
380+ else (bU == n))
381+ then throw("Exchange operations disabled")
382+ else {
383+ let cW = cR.assetPair.amountAsset
384+ let cX = if ((cW == unit))
385+ then "WAVES"
386+ else toBase58String(value(cW))
387+ let cY = cR.assetPair.priceAsset
388+ let cZ = if ((cY == unit))
389+ then "WAVES"
390+ else toBase58String(value(cY))
391+ if (if ((cX != cS))
392+ then true
393+ else (cZ != cT))
394+ then throw("Wrong order assets.")
395+ else {
396+ let da = cR.price
397+ let db = fraction(b, bG, bF)
398+ let dc = J(da, b, db)
399+ let dd = if ((cR.orderType == Buy))
400+ then (cb >= dc)
401+ else (dc >= cb)
402+ true
403+ }
404+ }
387405 }
388406
389407
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))
408+func de (df) = if ((size(df.payments) != 1))
444409 then throw("exactly 1 payment is expected")
445410 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())
411+ let dg = value(df.payments[0])
412+ let bP = value(dg.assetId)
413+ let dh = dg.amount
414+ let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
415+ let cg = cA._1
416+ let ch = cA._2
417+ let bU = parseIntValue(cA._9)
418+ let ci = cA._10
419+ if (if (aF())
455420 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)
421+ else (bU == n))
422+ then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
423+ else $Tuple5(cg, ch, dh, bP, ci)
459424 }
460425
461426
462-func dF (dC,ct,cz) = if ((size(dC.payments) != 2))
427+func di (df,ck,cq) = if ((size(df.payments) != 2))
463428 then throw("exactly 2 payments are expected")
464429 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())
430+ let dj = value(df.payments[0])
431+ let dk = value(df.payments[1])
432+ let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
433+ let bU = parseIntValue(dl._8)
434+ if (if (if (aF())
470435 then true
471- else (cd == l))
436+ else (bU == l))
472437 then true
473- else (cd == n))
474- then throw(("Put operation is blocked by admin. Status = " + toString(cd)))
475- else dI
438+ else (bU == n))
439+ then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
440+ else dl
476441 }
477442
478443
479-func dJ (dK) = {
480- let dL = invoke(aL, "emit", [dK], nil)
481- if ((dL == dL))
444+func dm (dn) = {
445+ let do = invoke(aD, "emit", [dn], nil)
446+ if ((do == do))
482447 then {
483- let dM = {
484- let dN = dL
485- if ($isInstanceOf(dN, "Address"))
448+ let dp = {
449+ let dq = do
450+ if ($isInstanceOf(dq, "Address"))
486451 then {
487- let dO = dN
488- invoke(dO, "emit", [dK], nil)
452+ let dr = dq
453+ invoke(dr, "emit", [dn], nil)
489454 }
490455 else unit
491456 }
492- if ((dM == dM))
493- then dK
457+ if ((dp == dp))
458+ then dn
494459 else throw("Strict value is not equal to itself.")
495460 }
496461 else throw("Strict value is not equal to itself.")
497462 }
498463
499464
500-func dP (dK) = {
501- let dQ = fraction(dK, ag, b)
502- $Tuple2((dK - dQ), dQ)
465+func ds (dn) = {
466+ let dt = fraction(dn, ae, b)
467+ $Tuple2((dn - dt), dt)
503468 }
504469
505470
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))
471+func du (dv,dw,X,Y) = {
472+ let dx = (Y == unit)
473+ let dy = bq(aM(aU))
474+ let dz = bq(aM(aV))
475+ let dA = if ((dw == aU))
511476 then true
512- else if ((dT == bd))
477+ else if ((dw == aV))
513478 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))
479+ else aB("invalid asset")
480+ let dB = if (dx)
481+ then $Tuple2(dy, dz)
482+ else if (dA)
483+ then $Tuple2((dy - dv), dz)
484+ else $Tuple2(dy, (dz - dv))
485+ let dC = dB._1
486+ let dD = dB._2
487+ let dE = if (dA)
488+ then $Tuple2(dv, 0)
489+ else $Tuple2(0, dv)
490+ let dF = dE._1
491+ let dG = dE._2
492+ let dH = ds(dF)._1
493+ let dI = ds(dG)._1
494+ let dJ = ds(dv)
495+ let dK = dJ._1
496+ let dt = dJ._2
497+ let dL = (dC + dH)
498+ let dM = (dD + dI)
499+ let dN = bs(D(dM, aX), D(dL, aW))
500+ let dO = G(dN, b)
501+ let dP = if (dA)
502+ then dC
503+ else dD
504+ let dQ = toBigInt(dP)
505+ let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
506+ let dS = if ((dR > f))
542507 then true
543- else aI("initial deposit requires all coins")
544- if ((en == en))
508+ else aB("initial deposit requires all coins")
509+ if ((dS == dS))
545510 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)
511+ let dT = toBigInt(dK)
512+ let dU = max([0, toInt(((dR * (sqrtBigInt((d + ((dT * d) / dQ)), 18, 18, DOWN) - d)) / d))])
513+ let cP = if (dx)
549514 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)
515+ else [IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dF, dG, dU, dO, 0, 0, height, lastBlock.timestamp, 0, 0))]
516+ let dV = bs(D(dD, aX), D(dC, aW))
517+ let dW = G(dV, b)
518+ let dX = {
519+ let dY = if (dA)
520+ then $Tuple2(dF, dC)
521+ else $Tuple2(dG, dD)
522+ let dn = dY._1
523+ let dZ = dY._2
524+ let ea = toInt(fraction(dR, toBigInt((dn / 2)), toBigInt(dZ)))
525+ fraction((dU - ea), b, ea)
561526 }
562- $Tuple5(ep, cY, dQ, es, dX)
527+ $Tuple4(dU, cP, dt, dX)
563528 }
564529 else throw("Strict value is not equal to itself.")
565530 }
566531
567532
568-func ew (ex,ef,dT,Z,aa) = {
569- let dU = (aa == unit)
570- let ey = [if ((dT == bb))
533+func eb (ec,dK,dw,X,Y) = {
534+ let dx = (Y == unit)
535+ let ed = [if ((dw == aT))
571536 then true
572- else aI("invalid lp asset")]
573- if ((ey == ey))
537+ else aB("invalid lp asset")]
538+ if ((ed == ed))
574539 then {
575- let ez = if ((ex == bc))
540+ let ee = if ((ec == aU))
576541 then true
577- else if ((ex == bd))
542+ else if ((ec == aV))
578543 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)
544+ else aB("invalid asset")
545+ let ef = if (ee)
546+ then toBigInt(bq(aM(aU)))
547+ else toBigInt(bq(aM(aV)))
548+ let eg = bq(aM(aU))
549+ let eh = bq(aM(aV))
550+ let ei = if (ee)
551+ then eg
552+ else eh
553+ let ej = toBigInt(ei)
554+ let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
555+ let ek = toBigInt(dK)
556+ let el = max([0, toInt(((ef * (d - pow((d - ((ek * d) / dR)), 18, h, 0, 18, DOWN))) / d))])
557+ let em = ds(el)
558+ let en = em._1
559+ let dt = em._2
560+ let eo = if (ee)
561+ then $Tuple4(en, 0, (eg - el), eh)
562+ else $Tuple4(0, en, eg, (eh - el))
563+ let ep = eo._1
564+ let eq = eo._2
565+ let er = eo._3
566+ let es = eo._4
567+ let dN = bs(D(es, aX), D(er, aW))
568+ let dO = G(dN, b)
569+ let cP = if (dx)
605570 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)
571+ else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(ep, eq, dK, dO, height, lastBlock.timestamp)), IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO)]
572+ let dV = bs(D(eh, aX), D(eg, aW))
573+ let dW = G(dV, b)
574+ let dX = {
575+ let et = (toInt(fraction(ef, ek, dR)) * 2)
576+ fraction((en - et), b, et)
612577 }
613- $Tuple5(eI, cY, dQ, es, ez)
578+ $Tuple4(en, cP, dt, dX)
614579 }
615580 else throw("Strict value is not equal to itself.")
616581 }
617582
618583
619-func eP () = {
620- let dN = getString(S())
621- if ($isInstanceOf(dN, "String"))
584+func eu () = {
585+ let dq = getString(Q())
586+ if ($isInstanceOf(dq, "String"))
622587 then {
623- let eQ = dN
624- fromBase58String(eQ)
588+ let ev = dq
589+ fromBase58String(ev)
625590 }
626- else if ($isInstanceOf(dN, "Unit"))
591+ else if ($isInstanceOf(dq, "Unit"))
627592 then unit
628593 else throw("Match error")
629594 }
630595
631596
632-func eR () = {
633- let dN = getString(T())
634- if ($isInstanceOf(dN, "String"))
597+func ew () = {
598+ let dq = getString(R())
599+ if ($isInstanceOf(dq, "String"))
635600 then {
636- let eQ = dN
637- fromBase58String(eQ)
601+ let ev = dq
602+ fromBase58String(ev)
638603 }
639- else if ($isInstanceOf(dN, "Unit"))
604+ else if ($isInstanceOf(dq, "Unit"))
640605 then unit
641606 else throw("Match error")
642607 }
643608
644609
645-func eS (dC) = {
646- let dN = eP()
647- if ($isInstanceOf(dN, "ByteVector"))
610+func ex (df) = {
611+ let dq = eu()
612+ if ($isInstanceOf(dq, "ByteVector"))
648613 then {
649- let eT = dN
650- (dC.callerPublicKey == eT)
614+ let ey = dq
615+ (df.callerPublicKey == ey)
651616 }
652- else if ($isInstanceOf(dN, "Unit"))
653- then (dC.caller == this)
617+ else if ($isInstanceOf(dq, "Unit"))
618+ then (df.caller == this)
654619 else throw("Match error")
655620 }
656621
657622
658-func eU (dC) = {
659- let eV = throw("Permission denied")
660- let dN = eP()
661- if ($isInstanceOf(dN, "ByteVector"))
623+func ez (df) = {
624+ let eA = throw("Permission denied")
625+ let dq = eu()
626+ if ($isInstanceOf(dq, "ByteVector"))
662627 then {
663- let eT = dN
664- if ((dC.callerPublicKey == eT))
628+ let ey = dq
629+ if ((df.callerPublicKey == ey))
665630 then true
666- else eV
631+ else eA
667632 }
668- else if ($isInstanceOf(dN, "Unit"))
669- then if ((dC.caller == this))
633+ else if ($isInstanceOf(dq, "Unit"))
634+ then if ((df.caller == this))
670635 then true
671- else eV
636+ else eA
672637 else throw("Match error")
673638 }
674639
675640
676-@Callable(dC)
677-func setManager (eW) = {
678- let eX = eU(dC)
679- if ((eX == eX))
641+@Callable(df)
642+func setManager (eB) = {
643+ let eC = ez(df)
644+ if ((eC == eC))
680645 then {
681- let eY = fromBase58String(eW)
682- if ((eY == eY))
683- then [StringEntry(T(), eW)]
646+ let eD = fromBase58String(eB)
647+ if ((eD == eD))
648+ then [StringEntry(R(), eB)]
684649 else throw("Strict value is not equal to itself.")
685650 }
686651 else throw("Strict value is not equal to itself.")
687652 }
688653
689654
690655
691-@Callable(dC)
656+@Callable(df)
692657 func confirmManager () = {
693- let eZ = eR()
694- let fa = if (isDefined(eZ))
658+ let eE = ew()
659+ let eF = if (isDefined(eE))
695660 then true
696661 else throw("No pending manager")
697- if ((fa == fa))
662+ if ((eF == eF))
698663 then {
699- let fb = if ((dC.callerPublicKey == value(eZ)))
664+ let eG = if ((df.callerPublicKey == value(eE)))
700665 then true
701666 else throw("You are not pending manager")
702- if ((fb == fb))
703- then [StringEntry(S(), toBase58String(value(eZ))), DeleteEntry(T())]
667+ if ((eG == eG))
668+ then [StringEntry(Q(), toBase58String(value(eE))), DeleteEntry(R())]
704669 else throw("Strict value is not equal to itself.")
705670 }
706671 else throw("Strict value is not equal to itself.")
707672 }
708673
709674
710675
711-@Callable(dC)
712-func put (ct,fc) = if ((0 > ct))
676+@Callable(df)
677+func put (ck,eH) = if ((0 > ck))
713678 then throw("Invalid slippageTolerance passed")
714679 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))
680+ let dl = di(df, ck, true)
681+ let cM = dl._2
682+ let bR = dl._7
683+ let ci = dl._9
684+ let cN = dl._10
685+ let cO = dl._11
686+ let eI = dl._12
687+ let eJ = dl._13
688+ let do = invoke(aD, "emit", [cM], nil)
689+ if ((do == do))
727690 then {
728- let dL = invoke(aL, "emit", [cV], nil)
729- if ((dL == dL))
691+ let dp = {
692+ let dq = do
693+ if ($isInstanceOf(dq, "Address"))
694+ then {
695+ let dr = dq
696+ invoke(dr, "emit", [cM], nil)
697+ }
698+ else unit
699+ }
700+ if ((dp == dp))
730701 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))
702+ let eK = if ((cN > 0))
703+ then invoke(ba, "put", nil, [AttachedPayment(eI, cN)])
704+ else nil
705+ if ((eK == eK))
741706 then {
742- let ff = if ((cW > 0))
743- then invoke(bi, "put", nil, [AttachedPayment(fd, cW)])
707+ let eL = if ((cO > 0))
708+ then invoke(ba, "put", nil, [AttachedPayment(eJ, cO)])
744709 else nil
745- if ((ff == ff))
710+ if ((eL == eL))
746711 then {
747- let fg = if ((cX > 0))
748- then invoke(bi, "put", nil, [AttachedPayment(fe, cX)])
749- else nil
750- if ((fg == fg))
712+ let eM = if (eH)
751713 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- }
714+ let eN = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
715+ if ((eN == eN))
716+ then nil
770717 else throw("Strict value is not equal to itself.")
771718 }
772- else throw("Strict value is not equal to itself.")
719+ else [ScriptTransfer(df.caller, cM, bR)]
720+ (ci ++ eM)
773721 }
774722 else throw("Strict value is not equal to itself.")
775723 }
776724 else throw("Strict value is not equal to itself.")
777725 }
778726 else throw("Strict value is not equal to itself.")
779727 }
780728 else throw("Strict value is not equal to itself.")
781729 }
782730
783731
784732
785-@Callable(dC)
786-func putForFree (fm) = if ((0 > fm))
733+@Callable(df)
734+func putForFree (eO) = if ((0 > eO))
787735 then throw("Invalid value passed")
788736 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.")
737+ let dl = di(df, eO, false)
738+ dl._9
805739 }
806740
807741
808742
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"))
743+@Callable(df)
744+func putOneTkn (eP,eQ) = {
745+ let eR = {
746+ let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
747+ if ($isInstanceOf(eS, "Boolean"))
748+ then eS
749+ else throw(($getType(eS) + " couldn't be cast to Boolean"))
816750 }
817- let fs = if (if (if (aN())
751+ let eT = if (if (if (aF())
818752 then true
819- else (ba == l))
753+ else (aS == l))
820754 then true
821- else (ba == n))
755+ else (aS == n))
822756 then true
823- else fq
824- let ey = [if (if (!(fs))
757+ else eR
758+ let ed = [if (if (!(eT))
825759 then true
826- else eS(dC))
760+ else ex(df))
827761 then true
828- else aI("put operation is blocked by admin"), if ((size(dC.payments) == 1))
762+ else aB("put operation is blocked by admin"), if ((size(df.payments) == 1))
829763 then true
830- else aI("exactly 1 payment are expected")]
831- if ((ey == ey))
764+ else aB("exactly 1 payment are expected")]
765+ if ((ed == ed))
832766 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))
767+ let eU = df.payments[0]
768+ let dw = eU.assetId
769+ let dv = eU.amount
770+ let X = df.caller
771+ let Y = df.transactionId
772+ let eV = du(dv, dw, X, Y)
773+ if ((eV == eV))
845774 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)
775+ let eW = eV._4
776+ let dt = eV._3
777+ let cP = eV._2
778+ let eX = eV._1
779+ let eY = if (if ((eP > 0))
780+ then (eP > eX)
853781 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))
782+ then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
783+ else eX
784+ let do = dm(eY)
785+ if ((do == do))
858786 then {
859- let fh = if (fp)
787+ let eM = if (eQ)
860788 then {
861- let fy = invoke(bh, "stake", nil, [AttachedPayment(bb, fx)])
862- if ((fy == fy))
789+ let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
790+ if ((eZ == eZ))
863791 then nil
864792 else throw("Strict value is not equal to itself.")
865793 }
866- else [ScriptTransfer(dC.caller, fx, bb)]
867- let fz = if ((dQ > 0))
868- then [ScriptTransfer(aM, dQ, dT)]
794+ else [ScriptTransfer(df.caller, eY, aT)]
795+ let fa = if ((dt > 0))
796+ then [ScriptTransfer(aE, dt, dw)]
869797 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.")
798+ $Tuple2(((cP ++ eM) ++ fa), eY)
885799 }
886800 else throw("Strict value is not equal to itself.")
887801 }
888802 else throw("Strict value is not equal to itself.")
889803 }
890804 else throw("Strict value is not equal to itself.")
891805 }
892806
893807
894808
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))
809+@Callable(df)
810+func putOneTknREADONLY (dw,dv) = {
811+ let fb = du(dv, aK(dw), unit, unit)
812+ let eX = fb._1
813+ let cP = fb._2
814+ let dt = fb._3
815+ let eW = fb._4
816+ $Tuple2(nil, $Tuple3(eX, dt, eW))
904817 }
905818
906819
907820
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"))
821+@Callable(df)
822+func getOneTkn (fc,eP) = {
823+ let eR = {
824+ let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
825+ if ($isInstanceOf(eS, "Boolean"))
826+ then eS
827+ else throw(($getType(eS) + " couldn't be cast to Boolean"))
915828 }
916- let fE = if (if (aN())
829+ let fd = if (if (aF())
917830 then true
918- else (ba == n))
831+ else (aS == n))
919832 then true
920- else fq
921- let ey = [if (if (!(fE))
833+ else eR
834+ let ed = [if (if (!(fd))
922835 then true
923- else eS(dC))
836+ else ex(df))
924837 then true
925- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 1))
838+ else aB("get operation is blocked by admin"), if ((size(df.payments) == 1))
926839 then true
927- else aI("exactly 1 payment are expected")]
928- if ((ey == ey))
840+ else aB("exactly 1 payment are expected")]
841+ if ((ed == ed))
929842 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))
843+ let ec = aK(fc)
844+ let eU = df.payments[0]
845+ let dw = eU.assetId
846+ let dK = eU.amount
847+ let X = df.caller
848+ let Y = df.transactionId
849+ let fe = eb(ec, dK, dw, X, Y)
850+ if ((fe == fe))
939851 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)
852+ let eW = fe._4
853+ let dt = fe._3
854+ let cP = fe._2
855+ let ff = fe._1
856+ let dn = if (if ((eP > 0))
857+ then (eP > ff)
947858 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))
859+ then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
860+ else ff
861+ let fg = invoke(aD, "burn", [dK], [AttachedPayment(dw, dK)])
862+ if ((fg == fg))
952863 then {
953- let fI = [ScriptTransfer(Z, dK, ex)]
954- let fz = if ((dQ > 0))
955- then [ScriptTransfer(aM, dQ, ex)]
864+ let fh = [ScriptTransfer(X, dn, ec)]
865+ let fa = if ((dt > 0))
866+ then [ScriptTransfer(aE, dt, ec)]
956867 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.")
868+ $Tuple2(((cP ++ fh) ++ fa), dn)
974869 }
975870 else throw("Strict value is not equal to itself.")
976871 }
977872 else throw("Strict value is not equal to itself.")
978873 }
979874 else throw("Strict value is not equal to itself.")
980875 }
981876
982877
983878
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))
879+@Callable(df)
880+func getOneTknREADONLY (ec,dK) = {
881+ let fi = eb(aK(ec), dK, aT, unit, unit)
882+ let ff = fi._1
883+ let cP = fi._2
884+ let dt = fi._3
885+ let eW = fi._4
886+ $Tuple2(nil, $Tuple3(ff, dt, eW))
993887 }
994888
995889
996890
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"))
891+@Callable(df)
892+func unstakeAndGetOneTkn (fj,fc,eP) = {
893+ let eR = {
894+ let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
895+ if ($isInstanceOf(eS, "Boolean"))
896+ then eS
897+ else throw(($getType(eS) + " couldn't be cast to Boolean"))
1004898 }
1005- let fE = if (if (aN())
899+ let fd = if (if (aF())
1006900 then true
1007- else (ba == n))
901+ else (aS == n))
1008902 then true
1009- else fq
1010- let ey = [if (if (!(fE))
903+ else eR
904+ let ed = [if (if (!(fd))
1011905 then true
1012- else eS(dC))
906+ else ex(df))
1013907 then true
1014- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 0))
908+ else aB("get operation is blocked by admin"), if ((size(df.payments) == 0))
1015909 then true
1016- else aI("no payments are expected")]
1017- if ((ey == ey))
910+ else aB("no payments are expected")]
911+ if ((ed == ed))
1018912 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))
913+ let ec = aK(fc)
914+ let X = df.caller
915+ let Y = df.transactionId
916+ let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
917+ if ((fk == fk))
1025918 then {
1026- let fP = ew(ex, fN, bb, Z, aa)
1027- if ((fP == fP))
919+ let fl = eb(ec, fj, aT, X, Y)
920+ if ((fl == fl))
1028921 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)
922+ let eW = fl._4
923+ let dt = fl._3
924+ let cP = fl._2
925+ let ff = fl._1
926+ let dn = if (if ((eP > 0))
927+ then (eP > ff)
1036928 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))
929+ then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
930+ else ff
931+ let fg = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)])
932+ if ((fg == fg))
1041933 then {
1042- let fI = [ScriptTransfer(dC.caller, dK, ex)]
1043- let fz = if ((dQ > 0))
1044- then [ScriptTransfer(aM, dQ, ex)]
934+ let fh = [ScriptTransfer(df.caller, dn, ec)]
935+ let fa = if ((dt > 0))
936+ then [ScriptTransfer(aE, dt, ec)]
1045937 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.")
938+ $Tuple2(((cP ++ fh) ++ fa), dn)
1063939 }
1064940 else throw("Strict value is not equal to itself.")
1065941 }
1066942 else throw("Strict value is not equal to itself.")
1067943 }
1068944 else throw("Strict value is not equal to itself.")
1069945 }
1070946 else throw("Strict value is not equal to itself.")
1071947 }
1072948
1073949
1074950
1075-@Callable(dC)
951+@Callable(df)
1076952 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- }
953+ let cA = de(df)
954+ let fm = cA._1
955+ let ch = cA._2
956+ let dh = cA._3
957+ let bP = cA._4
958+ let ci = cA._5
959+ let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
960+ if ((fn == fn))
961+ then ci
1095962 else throw("Strict value is not equal to itself.")
1096963 }
1097964
1098965
1099966
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)))
967+@Callable(df)
968+func getNoLess (fo,fp) = {
969+ let cA = de(df)
970+ let cg = cA._1
971+ let ch = cA._2
972+ let dh = cA._3
973+ let bP = cA._4
974+ let ci = cA._5
975+ if ((fo > cg))
976+ then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo)))
977+ else if ((fp > ch))
978+ then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp)))
1112979 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- }
980+ let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
981+ if ((fn == fn))
982+ then ci
1125983 else throw("Strict value is not equal to itself.")
1126984 }
1127985 }
1128986
1129987
1130988
1131-@Callable(dC)
1132-func unstakeAndGet (dK) = {
1133- let fY = if ((size(dC.payments) != 0))
989+@Callable(df)
990+func unstakeAndGet (dn) = {
991+ let fq = if ((size(df.payments) != 0))
1134992 then throw("No payments are expected")
1135993 else true
1136- if ((fY == fY))
994+ if ((fq == fq))
1137995 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))
996+ let bE = aH()
997+ let bR = fromBase58String(bE[q])
998+ let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
999+ if ((fk == fk))
11431000 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())
1001+ let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
1002+ let bU = parseIntValue(cA._9)
1003+ let ci = cA._10
1004+ let fr = if (if (aF())
11501005 then true
1151- else (cd == n))
1152- then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
1006+ else (bU == n))
1007+ then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
11531008 else true
1154- if ((fZ == fZ))
1009+ if ((fr == fr))
11551010 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- }
1011+ let fn = invoke(aD, "burn", [dn], [AttachedPayment(bR, dn)])
1012+ if ((fn == fn))
1013+ then ci
11671014 else throw("Strict value is not equal to itself.")
11681015 }
11691016 else throw("Strict value is not equal to itself.")
11701017 }
11711018 else throw("Strict value is not equal to itself.")
11721019 }
11731020 else throw("Strict value is not equal to itself.")
11741021 }
11751022
11761023
11771024
1178-@Callable(dC)
1179-func unstakeAndGetNoLess (fN,gb,fW) = {
1180- let fE = if (aN())
1025+@Callable(df)
1026+func unstakeAndGetNoLess (fj,fs,fp) = {
1027+ let fd = if (aF())
11811028 then true
1182- else (ba == n)
1183- let ey = [if (!(fE))
1029+ else (aS == n)
1030+ let ed = [if (!(fd))
11841031 then true
1185- else throw("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1032+ else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
11861033 then true
11871034 else throw("no payments are expected")]
1188- if ((ey == ey))
1035+ if ((ed == ed))
11891036 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))
1037+ let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1038+ if ((fk == fk))
11931039 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))
1040+ let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller)
1041+ let cg = cA._1
1042+ let ch = cA._2
1043+ let ci = cA._10
1044+ let ft = [if ((cg >= fs))
11991045 then true
1200- else throw(makeString(["amount asset amount to receive is less than ", toString(gb)], "")), if ((cq >= fW))
1046+ else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
12011047 then true
1202- else throw(makeString(["price asset amount to receive is less than ", toString(fW)], ""))]
1203- if ((gc == gc))
1048+ else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1049+ if ((ft == ft))
12041050 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- }
1051+ let fn = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)])
1052+ if ((fn == fn))
1053+ then ci
12161054 else throw("Strict value is not equal to itself.")
12171055 }
12181056 else throw("Strict value is not equal to itself.")
12191057 }
12201058 else throw("Strict value is not equal to itself.")
12211059 }
12221060 else throw("Strict value is not equal to itself.")
12231061 }
12241062
12251063
12261064
1227-@Callable(dC)
1228-func activate (ge,gf) = if ((toString(dC.caller) != toString(aL)))
1065+@Callable(df)
1066+func activate (fu,fv) = if ((toString(df.caller) != toString(aD)))
12291067 then throw("permissions denied")
1230- else $Tuple2([StringEntry(ac(), ge), StringEntry(ad(), gf)], "success")
1068+ else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
12311069
12321070
12331071
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.")
1072+@Callable(df)
1073+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
1074+
1075+
1076+
1077+@Callable(df)
1078+func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
1079+
1080+
1081+
1082+@Callable(df)
1083+func calcPricesWrapperREADONLY (by,bz,bD) = {
1084+ let bM = bC(by, bz, bD)
1085+ $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
12521086 }
12531087
12541088
12551089
1256-@Callable(dC)
1257-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aP())
1090+@Callable(df)
1091+func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
12581092
12591093
12601094
1261-@Callable(dC)
1262-func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
1095+@Callable(df)
1096+func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
12631097
12641098
12651099
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])])
1100+@Callable(df)
1101+func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
1102+
1103+
1104+
1105+@Callable(df)
1106+func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
1107+
1108+
1109+
1110+@Callable(df)
1111+func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1112+ let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1113+ $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
12701114 }
12711115
12721116
12731117
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))
1118+@Callable(df)
1119+func statsREADONLY () = {
1120+ let bE = aH()
1121+ let bR = fromBase58String(bE[q])
1122+ let cS = bE[r]
1123+ let cT = bE[s]
1124+ let ct = bE[v]
1125+ let cu = bE[w]
1126+ let bF = parseIntValue(bE[t])
1127+ let bG = parseIntValue(bE[u])
1128+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1129+ let cU = bq(cS)
1130+ let cV = bq(cT)
1131+ let fx = if ((fw == 0))
1132+ then [e, e, e]
1133+ else bC(cU, cV, fw)
1134+ let cb = 0
1135+ let fy = G(fx[1], b)
1136+ let fz = G(fx[2], b)
1137+ let fA = value(getInteger(aD, ap(toString(this))))
1138+ $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))
12981139 }
12991140
13001141
13011142
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))
1143+@Callable(df)
1144+func evaluatePutByAmountAssetREADONLY (cl) = {
1145+ let bE = aH()
1146+ let bR = fromBase58String(bE[q])
1147+ let cr = bE[r]
1148+ let bS = fromBase58String(cr)
1149+ let cs = bE[s]
1150+ let bT = fromBase58String(cs)
1151+ let bF = parseIntValue(bE[t])
1152+ let bG = parseIntValue(bE[u])
1153+ let bU = bE[p]
1154+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1155+ let cU = bq(cr)
1156+ let cV = bq(cs)
1157+ let bA = D(cU, bF)
1158+ let bB = D(cV, bG)
1159+ let ca = if ((fw == 0))
1160+ then e
1161+ else bs(bB, bA)
1162+ let cx = D(cl, bF)
1163+ let cy = fraction(cx, ca, d)
1164+ let cn = G(cy, bG)
1165+ let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1166+ let cI = dl._1
1167+ let fB = dl._3
1168+ let bW = dl._4
1169+ let bY = dl._5
1170+ let bV = dl._6
1171+ $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))
13231172 }
13241173
13251174
13261175
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))
1176+@Callable(df)
1177+func evaluatePutByPriceAssetREADONLY (cn) = {
1178+ let bE = aH()
1179+ let bR = fromBase58String(bE[q])
1180+ let cr = bE[r]
1181+ let bS = fromBase58String(cr)
1182+ let cs = bE[s]
1183+ let bT = fromBase58String(cs)
1184+ let bF = parseIntValue(bE[t])
1185+ let bG = parseIntValue(bE[u])
1186+ let bU = bE[p]
1187+ let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1188+ let fC = bq(cr)
1189+ let fD = bq(cs)
1190+ let fE = D(fC, bF)
1191+ let fF = D(fD, bG)
1192+ let ca = if ((fw == 0))
13441193 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))
1194+ else bs(fF, fE)
1195+ let cy = D(cn, bG)
1196+ let cx = fraction(cy, d, ca)
1197+ let cl = G(cx, bF)
1198+ let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1199+ let cI = dl._1
1200+ let fB = dl._3
1201+ let bW = dl._4
1202+ let bY = dl._5
1203+ let bV = dl._6
1204+ $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))
13561205 }
13571206
13581207
13591208
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))
1209+@Callable(df)
1210+func evaluateGetREADONLY (fG,fH) = {
1211+ let cA = bN("", fG, fH, this)
1212+ let cg = cA._1
1213+ let ch = cA._2
1214+ let bW = cA._5
1215+ let bY = cA._6
1216+ let bV = cA._7
1217+ let cb = cA._8
1218+ let bU = parseIntValue(cA._9)
1219+ $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))
13891220 }
13901221
13911222
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"))
1223+@Verifier(fI)
1224+func fJ () = {
1225+ let fK = {
1226+ let dq = eu()
1227+ if ($isInstanceOf(dq, "ByteVector"))
14121228 then {
1413- let eT = dN
1414- eT
1229+ let ey = dq
1230+ ey
14151231 }
1416- else if ($isInstanceOf(dN, "Unit"))
1417- then gA.senderPublicKey
1232+ else if ($isInstanceOf(dq, "Unit"))
1233+ then fI.senderPublicKey
14181234 else throw("Match error")
14191235 }
1420- let dN = gA
1421- if ($isInstanceOf(dN, "Order"))
1236+ let dq = fI
1237+ if ($isInstanceOf(dq, "Order"))
14221238 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
1239+ let cR = dq
1240+ let fL = aG()
1241+ let au = cQ(cR)
1242+ let av = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1243+ let aw = sigVerify(cR.bodyBytes, cR.proofs[1], fL)
1244+ if (if (if (au)
1245+ then av
14301246 else false)
1431- then aD
1247+ then aw
14321248 else false)
14331249 then true
1434- else aA(aB, aC, aD)
1250+ else at(au, av, aw)
14351251 }
1436- else if ($isInstanceOf(dN, "SetScriptTransaction"))
1252+ else if ($isInstanceOf(dq, "SetScriptTransaction"))
14371253 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)
1254+ let ev = dq
1255+ let fM = blake2b256(value(ev.script))
1256+ let fN = fromBase64String(value(getString(aD, ar())))
1257+ let fO = scriptHash(this)
1258+ if (if ((fN == fM))
1259+ then (fO != fM)
14441260 else false)
14451261 then true
1446- else sigVerify(gA.bodyBytes, gA.proofs[0], gC)
1262+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14471263 }
1448- else sigVerify(gA.bodyBytes, gA.proofs[0], gC)
1264+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14491265 }
14501266

github/deemru/w8io/026f985 
377.20 ms