tx · F4UBamPVbcazYQE3hXENcaKnxnT5QDne7aFFAEDJRgnM

3Msa444cj3rGwoUM28fK5iMwFXn61SfJpqs:  -0.03100000 Waves

2022.12.27 12:18 [2378492] smart account 3Msa444cj3rGwoUM28fK5iMwFXn61SfJpqs > SELF 0.00000000 Waves

{ "type": 13, "id": "F4UBamPVbcazYQE3hXENcaKnxnT5QDne7aFFAEDJRgnM", "fee": 3100000, "feeAssetId": null, "timestamp": 1672132705881, "version": 1, "sender": "3Msa444cj3rGwoUM28fK5iMwFXn61SfJpqs", "senderPublicKey": "Fv4cVRzKj6MwfJQ2BrrtpyPyc3dSbKxA91GqxHZCCqC3", "proofs": [ "2bysF4zgSRPLVh1iJUkT9TfHRdhzaTyrH7x7pn6nRA23uEaw6VZks5YX3SDvKsMBxgYKtoDyNjFi84i7P7tZtd3s" ], "script": "base64:BgK8JwgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASAwoBCBIFCgMBAQESBAoCAQESBAoCCAESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgSABIDCgEBEgMKAQESBAoCCAEiCmxQZGVjaW1hbHMiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgt3YXZlc1N0cmluZyIDU0VQIgpQb29sQWN0aXZlIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiDWlkeFBvb2xTdGF0dXMiEGlkeFBvb2xMUEFzc2V0SWQiDWlkeEFtdEFzc2V0SWQiD2lkeFByaWNlQXNzZXRJZCIOaWR4QW10QXNzZXREY20iEGlkeFByaWNlQXNzZXREY20iDmlkeElBbXRBc3NldElkIhBpZHhJUHJpY2VBc3NldElkIg1pZH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2NyaXB0BAJmTgkA2wQBCQEFdmFsdWUBCQCdCAIFAmFECQECYXIABAJmTwkA8QcBBQR0aGlzAwMJAAACBQJmTgUCZk0JAQIhPQIFAmZPBQJmTQcGCQD0AwMIBQJmSQlib2R5Qnl0ZXMJAJEDAggFAmZJBnByb29mcwAABQJmSwkA9AMDCAUCZkkJYm9keUJ5dGVzCQCRAwIIBQJmSQZwcm9vZnMAAAUCZkuCh+//", "chainId": 84, "height": 2378492, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AMMCsG5EgSwq8mDRY4oB3M2Uyai8656vud8MqKXRRW5c Next: 23nX1NhB13H9Dmt4aMRHX72qgXRZ1Zs44xaFFcrn2bDQ 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 = J(cn, bF, FLOOR)
292- let cq = J(co, bG, FLOOR)
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 bN = aP()
571- let bO = parseIntValue(bN[t])
572- let bP = parseIntValue(bN[u])
573- let ey = [if ((dT == bb))
533+func eb (ec,dK,dw,X,Y) = {
534+ let dx = (Y == unit)
535+ let ed = [if ((dw == aT))
574536 then true
575- else aI("invalid lp asset")]
576- if ((ey == ey))
537+ else aB("invalid lp asset")]
538+ if ((ed == ed))
577539 then {
578- let ez = if ((ex == bc))
540+ let ee = if ((ec == aU))
579541 then true
580- else if ((ex == bd))
542+ else if ((ec == aV))
581543 then false
582- else aI("invalid asset")
583- let eA = if (ez)
584- then toBigInt(by(aU(bc)))
585- else toBigInt(by(aU(bd)))
586- let eB = if (ez)
587- then bO
588- else bP
589- let eC = by(aU(bc))
590- let eD = by(aU(bd))
591- let eE = if (ez)
592- then eC
593- else eD
594- let eF = toBigInt(eE)
595- let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity)
596- let eG = toBigInt(ef)
597- let eH = max([0, toInt(((eA * (d - pow((d - ((eG * d) / em)), 18, h, 0, 18, DOWN))) / d))])
598- let eI = dP(eH)
599- let eJ = eI._1
600- let dQ = eI._2
601- let eK = if (ez)
602- then $Tuple4(eJ, 0, (eC - eH), eD)
603- else $Tuple4(0, eJ, eC, (eD - eH))
604- let eL = eK._1
605- let eM = eK._2
606- let eN = eK._3
607- let eO = eK._4
608- let ei = bA(D(eO, bf), D(eN, be))
609- let ej = G(ei, b)
610- let cY = if (dU)
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)
611570 then nil
612- else [StringEntry(ab(toString(value(Z)), toBase58String(value(aa))), bu(eL, eM, ef, ej, height, lastBlock.timestamp)), IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej)]
613- let eq = bA(D(eD, bf), D(eC, be))
614- let er = G(eq, b)
615- let es = {
616- let eP = (toInt(fraction(eA, eG, em)) * 2)
617- fraction((eJ - eP), b, eP)
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)
618577 }
619- $Tuple5(eJ, cY, dQ, es, ez)
578+ $Tuple4(en, cP, dt, dX)
620579 }
621580 else throw("Strict value is not equal to itself.")
622581 }
623582
624583
625-func eQ () = {
626- let dN = getString(S())
627- if ($isInstanceOf(dN, "String"))
584+func eu () = {
585+ let dq = getString(Q())
586+ if ($isInstanceOf(dq, "String"))
628587 then {
629- let eR = dN
630- fromBase58String(eR)
588+ let ev = dq
589+ fromBase58String(ev)
631590 }
632- else if ($isInstanceOf(dN, "Unit"))
591+ else if ($isInstanceOf(dq, "Unit"))
633592 then unit
634593 else throw("Match error")
635594 }
636595
637596
638-func eS () = {
639- let dN = getString(T())
640- if ($isInstanceOf(dN, "String"))
597+func ew () = {
598+ let dq = getString(R())
599+ if ($isInstanceOf(dq, "String"))
641600 then {
642- let eR = dN
643- fromBase58String(eR)
601+ let ev = dq
602+ fromBase58String(ev)
644603 }
645- else if ($isInstanceOf(dN, "Unit"))
604+ else if ($isInstanceOf(dq, "Unit"))
646605 then unit
647606 else throw("Match error")
648607 }
649608
650609
651-func eT (dC) = {
652- let dN = eQ()
653- if ($isInstanceOf(dN, "ByteVector"))
610+func ex (df) = {
611+ let dq = eu()
612+ if ($isInstanceOf(dq, "ByteVector"))
654613 then {
655- let eU = dN
656- (dC.callerPublicKey == eU)
614+ let ey = dq
615+ (df.callerPublicKey == ey)
657616 }
658- else if ($isInstanceOf(dN, "Unit"))
659- then (dC.caller == this)
617+ else if ($isInstanceOf(dq, "Unit"))
618+ then (df.caller == this)
660619 else throw("Match error")
661620 }
662621
663622
664-func eV (dC) = {
665- let eW = throw("Permission denied")
666- let dN = eQ()
667- if ($isInstanceOf(dN, "ByteVector"))
623+func ez (df) = {
624+ let eA = throw("Permission denied")
625+ let dq = eu()
626+ if ($isInstanceOf(dq, "ByteVector"))
668627 then {
669- let eU = dN
670- if ((dC.callerPublicKey == eU))
628+ let ey = dq
629+ if ((df.callerPublicKey == ey))
671630 then true
672- else eW
631+ else eA
673632 }
674- else if ($isInstanceOf(dN, "Unit"))
675- then if ((dC.caller == this))
633+ else if ($isInstanceOf(dq, "Unit"))
634+ then if ((df.caller == this))
676635 then true
677- else eW
636+ else eA
678637 else throw("Match error")
679638 }
680639
681640
682-@Callable(dC)
683-func setManager (eX) = {
684- let eY = eV(dC)
685- if ((eY == eY))
641+@Callable(df)
642+func setManager (eB) = {
643+ let eC = ez(df)
644+ if ((eC == eC))
686645 then {
687- let eZ = fromBase58String(eX)
688- if ((eZ == eZ))
689- then [StringEntry(T(), eX)]
646+ let eD = fromBase58String(eB)
647+ if ((eD == eD))
648+ then [StringEntry(R(), eB)]
690649 else throw("Strict value is not equal to itself.")
691650 }
692651 else throw("Strict value is not equal to itself.")
694653
695654
696655
697-@Callable(dC)
656+@Callable(df)
698657 func confirmManager () = {
699- let fa = eS()
700- let fb = if (isDefined(fa))
658+ let eE = ew()
659+ let eF = if (isDefined(eE))
701660 then true
702661 else throw("No pending manager")
703- if ((fb == fb))
662+ if ((eF == eF))
704663 then {
705- let fc = if ((dC.callerPublicKey == value(fa)))
664+ let eG = if ((df.callerPublicKey == value(eE)))
706665 then true
707666 else throw("You are not pending manager")
708- if ((fc == fc))
709- then [StringEntry(S(), toBase58String(value(fa))), DeleteEntry(T())]
667+ if ((eG == eG))
668+ then [StringEntry(Q(), toBase58String(value(eE))), DeleteEntry(R())]
710669 else throw("Strict value is not equal to itself.")
711670 }
712671 else throw("Strict value is not equal to itself.")
714673
715674
716675
717-@Callable(dC)
718-func put (ct,fd) = if ((0 > ct))
676+@Callable(df)
677+func put (ck,eH) = if ((0 > ck))
719678 then throw("Invalid slippageTolerance passed")
720679 else {
721- let dI = dF(dC, ct, true)
722- let cV = dI._2
723- let ca = dI._7
724- let cr = dI._9
725- let cW = dI._10
726- let cX = dI._11
727- let fe = dI._12
728- let ff = dI._13
729- let dG = toBigInt(value(dC.payments[0]).amount)
730- let dH = toBigInt(value(dC.payments[1]).amount)
731- let dk = dd(dG, dH, toBigInt(0))
732- if ((dk == dk))
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))
733690 then {
734- let dL = invoke(aL, "emit", [cV], nil)
735- 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))
736701 then {
737- let dM = {
738- let dN = dL
739- if ($isInstanceOf(dN, "Address"))
740- then {
741- let dO = dN
742- invoke(dO, "emit", [cV], nil)
743- }
744- else unit
745- }
746- 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))
747706 then {
748- let fg = if ((cW > 0))
749- then invoke(bi, "put", nil, [AttachedPayment(fe, cW)])
707+ let eL = if ((cO > 0))
708+ then invoke(ba, "put", nil, [AttachedPayment(eJ, cO)])
750709 else nil
751- if ((fg == fg))
710+ if ((eL == eL))
752711 then {
753- let fh = if ((cX > 0))
754- then invoke(bi, "put", nil, [AttachedPayment(ff, cX)])
755- else nil
756- if ((fh == fh))
712+ let eM = if (eH)
757713 then {
758- let fi = if (fd)
759- then {
760- let fj = invoke(bh, "stake", nil, [AttachedPayment(ca, cV)])
761- if ((fj == fj))
762- then nil
763- else throw("Strict value is not equal to itself.")
764- }
765- else [ScriptTransfer(dC.caller, cV, ca)]
766- let fk = dl(0, 0, 0)
767- if ((fk == fk))
768- then {
769- let dc = fk._2
770- let fl = fk._1
771- let fm = dp(dk, dc)
772- if ((fm == fm))
773- then ((cr ++ fi) ++ fl)
774- else throw("Strict value is not equal to itself.")
775- }
714+ let eN = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
715+ if ((eN == eN))
716+ then nil
776717 else throw("Strict value is not equal to itself.")
777718 }
778- else throw("Strict value is not equal to itself.")
719+ else [ScriptTransfer(df.caller, cM, bR)]
720+ (ci ++ eM)
779721 }
780722 else throw("Strict value is not equal to itself.")
781723 }
788730
789731
790732
791-@Callable(dC)
792-func putForFree (fn) = if ((0 > fn))
733+@Callable(df)
734+func putForFree (eO) = if ((0 > eO))
793735 then throw("Invalid value passed")
794736 else {
795- let dI = dF(dC, fn, false)
796- let cr = dI._9
797- let dG = toBigInt(value(dC.payments[0]).amount)
798- let dH = toBigInt(value(dC.payments[1]).amount)
799- let dk = dd(dG, dH, toBigInt(0))
800- if ((dk == dk))
801- then {
802- let fo = dl(0, 0, 0)
803- let fl = fo._1
804- let dc = fo._2
805- let fm = dp(dk, dc)
806- if ((fm == fm))
807- then (cr ++ fl)
808- else throw("Strict value is not equal to itself.")
809- }
810- else throw("Strict value is not equal to itself.")
737+ let dl = di(df, eO, false)
738+ dl._9
811739 }
812740
813741
814742
815-@Callable(dC)
816-func putOneTkn (fp,fq) = {
817- let fr = {
818- let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
819- if ($isInstanceOf(fs, "Boolean"))
820- then fs
821- else throw(($getType(fs) + " couldn't be cast to Boolean"))
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"))
822750 }
823- let ft = if (if (if (aN())
751+ let eT = if (if (if (aF())
824752 then true
825- else (ba == l))
753+ else (aS == l))
826754 then true
827- else (ba == n))
755+ else (aS == n))
828756 then true
829- else fr
830- let ey = [if (if (!(ft))
757+ else eR
758+ let ed = [if (if (!(eT))
831759 then true
832- else eT(dC))
760+ else ex(df))
833761 then true
834- 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))
835763 then true
836- else aI("exactly 1 payment are expected")]
837- if ((ey == ey))
764+ else aB("exactly 1 payment are expected")]
765+ if ((ed == ed))
838766 then {
839- let fu = dC.payments[0]
840- let dT = fu.assetId
841- let dS = fu.amount
842- let dk = if ((dT == bc))
843- then dd(toBigInt(dS), toBigInt(0), toBigInt(0))
844- else if ((dT == bd))
845- then dd(toBigInt(0), toBigInt(dS), toBigInt(0))
846- else aI("payment asset is not supported")
847- if ((dk == dk))
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))
848774 then {
849- let Z = dC.caller
850- let aa = dC.transactionId
851- let fv = dR(dS, dT, Z, aa)
852- if ((fv == fv))
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)
781+ else false)
782+ then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
783+ else eX
784+ let do = dm(eY)
785+ if ((do == do))
853786 then {
854- let dX = fv._5
855- let fw = fv._4
856- let dQ = fv._3
857- let cY = fv._2
858- let fx = fv._1
859- let fy = if (if ((fp > 0))
860- then (fp > fx)
787+ let eM = if (eQ)
788+ then {
789+ let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
790+ if ((eZ == eZ))
791+ then nil
792+ else throw("Strict value is not equal to itself.")
793+ }
794+ else [ScriptTransfer(df.caller, eY, aT)]
795+ let fa = if ((dt > 0))
796+ then [ScriptTransfer(aE, dt, dw)]
797+ else nil
798+ $Tuple2(((cP ++ eM) ++ fa), eY)
799+ }
800+ else throw("Strict value is not equal to itself.")
801+ }
802+ else throw("Strict value is not equal to itself.")
803+ }
804+ else throw("Strict value is not equal to itself.")
805+ }
806+
807+
808+
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))
817+ }
818+
819+
820+
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"))
828+ }
829+ let fd = if (if (aF())
830+ then true
831+ else (aS == n))
832+ then true
833+ else eR
834+ let ed = [if (if (!(fd))
835+ then true
836+ else ex(df))
837+ then true
838+ else aB("get operation is blocked by admin"), if ((size(df.payments) == 1))
839+ then true
840+ else aB("exactly 1 payment are expected")]
841+ if ((ed == ed))
842+ then {
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))
851+ then {
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)
858+ else false)
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))
863+ then {
864+ let fh = [ScriptTransfer(X, dn, ec)]
865+ let fa = if ((dt > 0))
866+ then [ScriptTransfer(aE, dt, ec)]
867+ else nil
868+ $Tuple2(((cP ++ fh) ++ fa), dn)
869+ }
870+ else throw("Strict value is not equal to itself.")
871+ }
872+ else throw("Strict value is not equal to itself.")
873+ }
874+ else throw("Strict value is not equal to itself.")
875+ }
876+
877+
878+
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))
887+ }
888+
889+
890+
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"))
898+ }
899+ let fd = if (if (aF())
900+ then true
901+ else (aS == n))
902+ then true
903+ else eR
904+ let ed = [if (if (!(fd))
905+ then true
906+ else ex(df))
907+ then true
908+ else aB("get operation is blocked by admin"), if ((size(df.payments) == 0))
909+ then true
910+ else aB("no payments are expected")]
911+ if ((ed == ed))
912+ then {
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))
918+ then {
919+ let fl = eb(ec, fj, aT, X, Y)
920+ if ((fl == fl))
921+ then {
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)
861928 else false)
862- then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
863- else fx
864- let dL = dJ(fy)
865- if ((dL == dL))
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))
866933 then {
867- let fi = if (fq)
868- then {
869- let fz = invoke(bh, "stake", nil, [AttachedPayment(bb, fy)])
870- if ((fz == fz))
871- then nil
872- else throw("Strict value is not equal to itself.")
873- }
874- else [ScriptTransfer(dC.caller, fy, bb)]
875- let fA = if ((dQ > 0))
876- then [ScriptTransfer(aM, dQ, dT)]
934+ let fh = [ScriptTransfer(df.caller, dn, ec)]
935+ let fa = if ((dt > 0))
936+ then [ScriptTransfer(aE, dt, ec)]
877937 else nil
878- let fB = if ((this == aM))
879- then $Tuple2(0, 0)
880- else if (dX)
881- then $Tuple2(-(dQ), 0)
882- else $Tuple2(0, -(dQ))
883- let dm = fB._1
884- let dn = fB._2
885- let fC = dl(dm, dn, 0)
886- let fl = fC._1
887- let dc = fC._2
888- let dw = value(getString(ah))
889- let fm = dp(dk, dc)
890- if ((fm == fm))
891- then $Tuple2((((cY ++ fi) ++ fA) ++ fl), fy)
892- else throw("Strict value is not equal to itself.")
938+ $Tuple2(((cP ++ fh) ++ fa), dn)
893939 }
894940 else throw("Strict value is not equal to itself.")
895941 }
902948
903949
904950
905-@Callable(dC)
906-func putOneTknREADONLY (dT,dS) = {
907- let fD = dR(dS, aS(dT), unit, unit)
908- let fx = fD._1
909- let cY = fD._2
910- let dQ = fD._3
911- let fw = fD._4
912- let dX = fD._5
913- $Tuple2(nil, $Tuple3(fx, dQ, fw))
951+@Callable(df)
952+func get () = {
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
962+ else throw("Strict value is not equal to itself.")
914963 }
915964
916965
917966
918-@Callable(dC)
919-func getOneTkn (fE,fp) = {
920- let fr = {
921- let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
922- if ($isInstanceOf(fs, "Boolean"))
923- then fs
924- else throw(($getType(fs) + " couldn't be cast to Boolean"))
925- }
926- let fF = if (if (aN())
927- then true
928- else (ba == n))
929- then true
930- else fr
931- let ey = [if (if (!(fF))
932- then true
933- else eT(dC))
934- then true
935- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 1))
936- then true
937- else aI("exactly 1 payment are expected")]
938- if ((ey == ey))
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)))
979+ else {
980+ let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
981+ if ((fn == fn))
982+ then ci
983+ else throw("Strict value is not equal to itself.")
984+ }
985+ }
986+
987+
988+
989+@Callable(df)
990+func unstakeAndGet (dn) = {
991+ let fq = if ((size(df.payments) != 0))
992+ then throw("No payments are expected")
993+ else true
994+ if ((fq == fq))
939995 then {
940- let ex = aS(fE)
941- let fu = dC.payments[0]
942- let dT = fu.assetId
943- let ef = fu.amount
944- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
945- if ((dk == dk))
996+ let bE = aH()
997+ let bR = fromBase58String(bE[q])
998+ let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
999+ if ((fk == fk))
9461000 then {
947- let Z = dC.caller
948- let aa = dC.transactionId
949- let fG = ew(ex, ef, dT, Z, aa)
950- if ((fG == fG))
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())
1005+ then true
1006+ else (bU == n))
1007+ then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
1008+ else true
1009+ if ((fr == fr))
9511010 then {
952- let ez = fG._5
953- let fw = fG._4
954- let dQ = fG._3
955- let cY = fG._2
956- let fH = fG._1
957- let dK = if (if ((fp > 0))
958- then (fp > fH)
959- else false)
960- then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
961- else fH
962- let fI = invoke(aL, "burn", [ef], [AttachedPayment(dT, ef)])
963- if ((fI == fI))
964- then {
965- let fJ = [ScriptTransfer(Z, dK, ex)]
966- let fA = if ((dQ > 0))
967- then [ScriptTransfer(aM, dQ, ex)]
968- else nil
969- let fK = {
970- let fL = if ((this == aM))
971- then 0
972- else dQ
973- if (ez)
974- then $Tuple2(-((dK + fL)), 0)
975- else $Tuple2(0, -((dK + fL)))
976- }
977- let dm = fK._1
978- let dn = fK._2
979- let fM = dl(dm, dn, 0)
980- let fl = fM._1
981- let dc = fM._2
982- let fm = dp(dk, dc)
983- if ((fm == fm))
984- then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK)
985- else throw("Strict value is not equal to itself.")
986- }
1011+ let fn = invoke(aD, "burn", [dn], [AttachedPayment(bR, dn)])
1012+ if ((fn == fn))
1013+ then ci
9871014 else throw("Strict value is not equal to itself.")
9881015 }
9891016 else throw("Strict value is not equal to itself.")
9951022
9961023
9971024
998-@Callable(dC)
999-func getOneTknREADONLY (ex,ef) = {
1000- let fN = ew(aS(ex), ef, bb, unit, unit)
1001- let fH = fN._1
1002- let cY = fN._2
1003- let dQ = fN._3
1004- let fw = fN._4
1005- let ez = fN._5
1006- $Tuple2(nil, $Tuple3(fH, dQ, fw))
1007- }
1008-
1009-
1010-
1011-@Callable(dC)
1012-func unstakeAndGetOneTkn (fO,fE,fp) = {
1013- let fr = {
1014- let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1015- if ($isInstanceOf(fs, "Boolean"))
1016- then fs
1017- else throw(($getType(fs) + " couldn't be cast to Boolean"))
1018- }
1019- let fF = if (if (aN())
1025+@Callable(df)
1026+func unstakeAndGetNoLess (fj,fs,fp) = {
1027+ let fd = if (aF())
10201028 then true
1021- else (ba == n))
1029+ else (aS == n)
1030+ let ed = [if (!(fd))
10221031 then true
1023- else fr
1024- let ey = [if (if (!(fF))
1032+ else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
10251033 then true
1026- else eT(dC))
1027- then true
1028- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1029- then true
1030- else aI("no payments are expected")]
1031- if ((ey == ey))
1034+ else throw("no payments are expected")]
1035+ if ((ed == ed))
10321036 then {
1033- let ex = aS(fE)
1034- let Z = dC.caller
1035- let aa = dC.transactionId
1036- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1037- if ((dk == dk))
1037+ let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1038+ if ((fk == fk))
10381039 then {
1039- let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil)
1040- if ((fP == fP))
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))
1045+ then true
1046+ else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
1047+ then true
1048+ else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1049+ if ((ft == ft))
10411050 then {
1042- let fQ = ew(ex, fO, bb, Z, aa)
1043- if ((fQ == fQ))
1044- then {
1045- let ez = fQ._5
1046- let fw = fQ._4
1047- let dQ = fQ._3
1048- let cY = fQ._2
1049- let fH = fQ._1
1050- let dK = if (if ((fp > 0))
1051- then (fp > fH)
1052- else false)
1053- then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
1054- else fH
1055- let fI = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)])
1056- if ((fI == fI))
1057- then {
1058- let fJ = [ScriptTransfer(dC.caller, dK, ex)]
1059- let fA = if ((dQ > 0))
1060- then [ScriptTransfer(aM, dQ, ex)]
1061- else nil
1062- let fR = {
1063- let fL = if ((this == aM))
1064- then 0
1065- else dQ
1066- if (ez)
1067- then $Tuple2(-((dK + fL)), 0)
1068- else $Tuple2(0, -((dK + fL)))
1069- }
1070- let dm = fR._1
1071- let dn = fR._2
1072- let fS = dl(dm, dn, 0)
1073- let fl = fS._1
1074- let dc = fS._2
1075- let fm = dp(dk, dc)
1076- if ((fm == fm))
1077- then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK)
1078- else throw("Strict value is not equal to itself.")
1079- }
1080- else throw("Strict value is not equal to itself.")
1081- }
1051+ let fn = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)])
1052+ if ((fn == fn))
1053+ then ci
10821054 else throw("Strict value is not equal to itself.")
10831055 }
10841056 else throw("Strict value is not equal to itself.")
10901062
10911063
10921064
1093-@Callable(dC)
1094-func get () = {
1095- let cJ = dB(dC)
1096- let fT = cJ._1
1097- let cq = cJ._2
1098- let dE = cJ._3
1099- let bY = cJ._4
1100- let cr = cJ._5
1101- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1102- if ((dk == dk))
1103- then {
1104- let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1105- if ((fU == fU))
1106- then {
1107- let fV = dl(-(fT), -(cq), 0)
1108- let fl = fV._1
1109- let dc = fV._2
1110- let fm = dp(dk, dc)
1111- if ((fm == fm))
1112- then (cr ++ fl)
1113- else throw("Strict value is not equal to itself.")
1114- }
1115- else throw("Strict value is not equal to itself.")
1116- }
1117- else throw("Strict value is not equal to itself.")
1065+@Callable(df)
1066+func activate (fu,fv) = if ((toString(df.caller) != toString(aD)))
1067+ then throw("permissions denied")
1068+ else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
1069+
1070+
1071+
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])])
11181086 }
11191087
11201088
11211089
1122-@Callable(dC)
1123-func getNoLess (fW,fX) = {
1124- let cJ = dB(dC)
1125- let cp = cJ._1
1126- let cq = cJ._2
1127- let dE = cJ._3
1128- let bY = cJ._4
1129- let cr = cJ._5
1130- if ((fW > cp))
1131- then throw(((("noLessThenAmtAsset failed: " + toString(cp)) + " < ") + toString(fW)))
1132- else if ((fX > cq))
1133- then throw(((("noLessThenPriceAsset failed: " + toString(cq)) + " < ") + toString(fX)))
1134- else {
1135- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1136- if ((dk == dk))
1137- then {
1138- let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1139- if ((fU == fU))
1140- then {
1141- let fY = dl(-(cp), -(cq), 0)
1142- let fl = fY._1
1143- let dc = fY._2
1144- let fm = dp(dk, dc)
1145- if ((fm == fm))
1146- then (cr ++ fl)
1147- else throw("Strict value is not equal to itself.")
1148- }
1149- else throw("Strict value is not equal to itself.")
1150- }
1151- else throw("Strict value is not equal to itself.")
1152- }
1090+@Callable(df)
1091+func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
1092+
1093+
1094+
1095+@Callable(df)
1096+func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
1097+
1098+
1099+
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))
11531114 }
11541115
11551116
11561117
1157-@Callable(dC)
1158-func unstakeAndGet (dK) = {
1159- let fZ = if ((size(dC.payments) != 0))
1160- then throw("No payments are expected")
1161- else true
1162- if ((fZ == fZ))
1163- then {
1164- let bN = aP()
1165- let ca = fromBase58String(bN[q])
1166- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1167- if ((dk == dk))
1168- then {
1169- let fP = invoke(bh, "unstake", [toBase58String(ca), dK], nil)
1170- if ((fP == fP))
1171- then {
1172- let cJ = bW(toBase58String(dC.transactionId), toBase58String(ca), dK, dC.caller)
1173- let cp = cJ._1
1174- let cq = cJ._2
1175- let cd = parseIntValue(cJ._9)
1176- let cr = cJ._10
1177- let ga = if (if (aN())
1178- then true
1179- else (cd == n))
1180- then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
1181- else true
1182- if ((ga == ga))
1183- then {
1184- let fU = invoke(aL, "burn", [dK], [AttachedPayment(ca, dK)])
1185- if ((fU == fU))
1186- then {
1187- let gb = dl(-(cp), -(cq), 0)
1188- let fl = gb._1
1189- let dc = gb._2
1190- let fm = dp(dk, dc)
1191- if ((fm == fm))
1192- then (cr ++ fl)
1193- else throw("Strict value is not equal to itself.")
1194- }
1195- else throw("Strict value is not equal to itself.")
1196- }
1197- else throw("Strict value is not equal to itself.")
1198- }
1199- else throw("Strict value is not equal to itself.")
1200- }
1201- else throw("Strict value is not equal to itself.")
1202- }
1203- else throw("Strict value is not equal to itself.")
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))
12041139 }
12051140
12061141
12071142
1208-@Callable(dC)
1209-func unstakeAndGetNoLess (fO,gc,fX) = {
1210- let fF = if (aN())
1211- then true
1212- else (ba == n)
1213- let ey = [if (!(fF))
1214- then true
1215- else throw("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1216- then true
1217- else throw("no payments are expected")]
1218- if ((ey == ey))
1219- then {
1220- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1221- if ((dk == dk))
1222- then {
1223- let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil)
1224- if ((fP == fP))
1225- then {
1226- let cJ = bW(toBase58String(dC.transactionId), toBase58String(bb), fO, dC.caller)
1227- let cp = cJ._1
1228- let cq = cJ._2
1229- let cr = cJ._10
1230- let gd = [if ((cp >= gc))
1231- then true
1232- else throw(makeString(["amount asset amount to receive is less than ", toString(gc)], "")), if ((cq >= fX))
1233- then true
1234- else throw(makeString(["price asset amount to receive is less than ", toString(fX)], ""))]
1235- if ((gd == gd))
1236- then {
1237- let fU = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)])
1238- if ((fU == fU))
1239- then {
1240- let ge = dl(-(cp), -(cq), 0)
1241- let fl = ge._1
1242- let dc = ge._2
1243- let fm = dp(dk, dc)
1244- if ((fm == fm))
1245- then (cr ++ fl)
1246- else throw("Strict value is not equal to itself.")
1247- }
1248- else throw("Strict value is not equal to itself.")
1249- }
1250- else throw("Strict value is not equal to itself.")
1251- }
1252- else throw("Strict value is not equal to itself.")
1253- }
1254- else throw("Strict value is not equal to itself.")
1255- }
1256- else throw("Strict value is not equal to itself.")
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))
12571172 }
12581173
12591174
12601175
1261-@Callable(dC)
1262-func activate (gf,gg) = if ((toString(dC.caller) != toString(aL)))
1263- then throw("permissions denied")
1264- else $Tuple2([StringEntry(ac(), gf), StringEntry(ad(), gg)], "success")
1265-
1266-
1267-
1268-@Callable(dC)
1269-func refreshKLp () = {
1270- let gh = valueOrElse(getInteger(ai), 0)
1271- let gi = if (((height - gh) >= al))
1272- then unit
1273- else aI(makeString([toString(al), " blocks have not passed since the previous call"], ""))
1274- if ((gi == gi))
1275- then {
1276- let dw = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ah), "0")), aK("invalid kLp"))
1277- let gj = dl(0, 0, 0)
1278- let gk = gj._1
1279- let dc = gj._2
1280- let do = if ((dw != dc))
1281- then gk
1282- else aI("nothing to refresh")
1283- $Tuple2(do, toString(dc))
1284- }
1285- else throw("Strict value is not equal to itself.")
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))
1193+ then e
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))
12861205 }
12871206
12881207
12891208
1290-@Callable(dC)
1291-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aP())
1292-
1293-
1294-
1295-@Callable(dC)
1296-func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
1297-
1298-
1299-
1300-@Callable(dC)
1301-func calcPricesWrapperREADONLY (bH,bI,bM) = {
1302- let bV = bL(bH, bI, bM)
1303- $Tuple2(nil, [toString(bV[0]), toString(bV[1]), toString(bV[2])])
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))
13041220 }
13051221
13061222
1307-
1308-@Callable(dC)
1309-func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
1310-
1311-
1312-
1313-@Callable(dC)
1314-func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
1315-
1316-
1317-
1318-@Callable(dC)
1319-func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC))))
1320-
1321-
1322-
1323-@Callable(dC)
1324-func estimatePutOperationWrapperREADONLY (bX,ct,cu,cv,cw,cx,Z,cy,cz) = $Tuple2(nil, cs(bX, ct, cu, cv, cw, cx, Z, cy, cz))
1325-
1326-
1327-
1328-@Callable(dC)
1329-func estimateGetOperationWrapperREADONLY (bX,bY,bZ,Z) = {
1330- let cJ = bW(bX, bY, bZ, addressFromStringValue(Z))
1331- $Tuple2(nil, $Tuple10(cJ._1, cJ._2, cJ._3, cJ._4, cJ._5, cJ._6, cJ._7, toString(cJ._8), cJ._9, cJ._10))
1332- }
1333-
1334-
1335-
1336-@Callable(dC)
1337-func statsREADONLY () = {
1338- let bN = aP()
1339- let ca = fromBase58String(bN[q])
1340- let gl = bN[r]
1341- let gm = bN[s]
1342- let cC = bN[v]
1343- let cD = bN[w]
1344- let bO = parseIntValue(bN[t])
1345- let bP = parseIntValue(bN[u])
1346- let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1347- let go = by(gl)
1348- let gp = by(gm)
1349- let gq = if ((gn == 0))
1350- then [e, e, e]
1351- else bL(go, gp, gn)
1352- let ck = 0
1353- let gr = G(gq[1], b)
1354- let gs = G(gq[2], b)
1355- let gt = value(getInteger(aL, aw(toString(this))))
1356- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(go), toString(gp), toString(gn), toString(ck), toString(gr), toString(gs), toString(gt)], j))
1357- }
1358-
1359-
1360-
1361-@Callable(dC)
1362-func evaluatePutByAmountAssetREADONLY (cu) = {
1363- let bN = aP()
1364- let ca = fromBase58String(bN[q])
1365- let cA = bN[r]
1366- let cb = fromBase58String(cA)
1367- let cB = bN[s]
1368- let cc = fromBase58String(cB)
1369- let bO = parseIntValue(bN[t])
1370- let bP = parseIntValue(bN[u])
1371- let cd = bN[p]
1372- let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1373- let go = by(cA)
1374- let gp = by(cB)
1375- let bJ = D(go, bO)
1376- let bK = D(gp, bP)
1377- let cj = if ((gn == 0))
1378- then e
1379- else bA(bK, bJ)
1380- let cG = D(cu, bO)
1381- let cH = fraction(cG, cj, d)
1382- let cw = G(cH, bP)
1383- let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1384- let cR = dI._1
1385- let gu = dI._3
1386- let cf = dI._4
1387- let ch = dI._5
1388- let ce = dI._6
1389- $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))
1390- }
1391-
1392-
1393-
1394-@Callable(dC)
1395-func evaluatePutByPriceAssetREADONLY (cw) = {
1396- let bN = aP()
1397- let ca = fromBase58String(bN[q])
1398- let cA = bN[r]
1399- let cb = fromBase58String(cA)
1400- let cB = bN[s]
1401- let cc = fromBase58String(cB)
1402- let bO = parseIntValue(bN[t])
1403- let bP = parseIntValue(bN[u])
1404- let cd = bN[p]
1405- let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1406- let gv = by(cA)
1407- let gw = by(cB)
1408- let gx = D(gv, bO)
1409- let gy = D(gw, bP)
1410- let cj = if ((gn == 0))
1411- then e
1412- else bA(gy, gx)
1413- let cH = D(cw, bP)
1414- let cG = fraction(cH, d, cj)
1415- let cu = G(cG, bO)
1416- let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1417- let cR = dI._1
1418- let gu = dI._3
1419- let cf = dI._4
1420- let ch = dI._5
1421- let ce = dI._6
1422- $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))
1423- }
1424-
1425-
1426-
1427-@Callable(dC)
1428-func evaluateGetREADONLY (gz,gA) = {
1429- let cJ = bW("", gz, gA, this)
1430- let cp = cJ._1
1431- let cq = cJ._2
1432- let cf = cJ._5
1433- let ch = cJ._6
1434- let ce = cJ._7
1435- let ck = cJ._8
1436- let cd = parseIntValue(cJ._9)
1437- $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))
1438- }
1439-
1440-
1441-@Verifier(gB)
1442-func gC () = {
1443- let gD = {
1444- let dN = eQ()
1445- if ($isInstanceOf(dN, "ByteVector"))
1223+@Verifier(fI)
1224+func fJ () = {
1225+ let fK = {
1226+ let dq = eu()
1227+ if ($isInstanceOf(dq, "ByteVector"))
14461228 then {
1447- let eU = dN
1448- eU
1229+ let ey = dq
1230+ ey
14491231 }
1450- else if ($isInstanceOf(dN, "Unit"))
1451- then gB.senderPublicKey
1232+ else if ($isInstanceOf(dq, "Unit"))
1233+ then fI.senderPublicKey
14521234 else throw("Match error")
14531235 }
1454- let dN = gB
1455- if ($isInstanceOf(dN, "Order"))
1236+ let dq = fI
1237+ if ($isInstanceOf(dq, "Order"))
14561238 then {
1457- let ds = dN
1458- let gE = aO()
1459- let aB = dr(ds)
1460- let aC = sigVerify(ds.bodyBytes, ds.proofs[0], ds.senderPublicKey)
1461- let aD = sigVerify(ds.bodyBytes, ds.proofs[1], gE)
1462- if (if (if (aB)
1463- 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
14641246 else false)
1465- then aD
1247+ then aw
14661248 else false)
14671249 then true
1468- else aA(aB, aC, aD)
1250+ else at(au, av, aw)
14691251 }
1470- else if ($isInstanceOf(dN, "SetScriptTransaction"))
1252+ else if ($isInstanceOf(dq, "SetScriptTransaction"))
14711253 then {
1472- let eR = dN
1473- let gF = blake2b256(value(eR.script))
1474- let gG = fromBase64String(value(getString(aL, ay())))
1475- let gH = scriptHash(this)
1476- if (if ((gG == gF))
1477- then (gH != gF)
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)
14781260 else false)
14791261 then true
1480- else sigVerify(gB.bodyBytes, gB.proofs[0], gD)
1262+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14811263 }
1482- else sigVerify(gB.bodyBytes, gB.proofs[0], gD)
1264+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14831265 }
14841266
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 = J(cn, bF, FLOOR)
292- let cq = J(co, bG, FLOOR)
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 bN = aP()
571- let bO = parseIntValue(bN[t])
572- let bP = parseIntValue(bN[u])
573- let ey = [if ((dT == bb))
533+func eb (ec,dK,dw,X,Y) = {
534+ let dx = (Y == unit)
535+ let ed = [if ((dw == aT))
574536 then true
575- else aI("invalid lp asset")]
576- if ((ey == ey))
537+ else aB("invalid lp asset")]
538+ if ((ed == ed))
577539 then {
578- let ez = if ((ex == bc))
540+ let ee = if ((ec == aU))
579541 then true
580- else if ((ex == bd))
542+ else if ((ec == aV))
581543 then false
582- else aI("invalid asset")
583- let eA = if (ez)
584- then toBigInt(by(aU(bc)))
585- else toBigInt(by(aU(bd)))
586- let eB = if (ez)
587- then bO
588- else bP
589- let eC = by(aU(bc))
590- let eD = by(aU(bd))
591- let eE = if (ez)
592- then eC
593- else eD
594- let eF = toBigInt(eE)
595- let em = toBigInt(valueOrErrorMessage(assetInfo(bb), (("asset " + toBase58String(bb)) + " doesn't exist")).quantity)
596- let eG = toBigInt(ef)
597- let eH = max([0, toInt(((eA * (d - pow((d - ((eG * d) / em)), 18, h, 0, 18, DOWN))) / d))])
598- let eI = dP(eH)
599- let eJ = eI._1
600- let dQ = eI._2
601- let eK = if (ez)
602- then $Tuple4(eJ, 0, (eC - eH), eD)
603- else $Tuple4(0, eJ, eC, (eD - eH))
604- let eL = eK._1
605- let eM = eK._2
606- let eN = eK._3
607- let eO = eK._4
608- let ei = bA(D(eO, bf), D(eN, be))
609- let ej = G(ei, b)
610- let cY = if (dU)
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)
611570 then nil
612- else [StringEntry(ab(toString(value(Z)), toBase58String(value(aa))), bu(eL, eM, ef, ej, height, lastBlock.timestamp)), IntegerEntry(U(), ej), IntegerEntry(V(height, lastBlock.timestamp), ej)]
613- let eq = bA(D(eD, bf), D(eC, be))
614- let er = G(eq, b)
615- let es = {
616- let eP = (toInt(fraction(eA, eG, em)) * 2)
617- fraction((eJ - eP), b, eP)
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)
618577 }
619- $Tuple5(eJ, cY, dQ, es, ez)
578+ $Tuple4(en, cP, dt, dX)
620579 }
621580 else throw("Strict value is not equal to itself.")
622581 }
623582
624583
625-func eQ () = {
626- let dN = getString(S())
627- if ($isInstanceOf(dN, "String"))
584+func eu () = {
585+ let dq = getString(Q())
586+ if ($isInstanceOf(dq, "String"))
628587 then {
629- let eR = dN
630- fromBase58String(eR)
588+ let ev = dq
589+ fromBase58String(ev)
631590 }
632- else if ($isInstanceOf(dN, "Unit"))
591+ else if ($isInstanceOf(dq, "Unit"))
633592 then unit
634593 else throw("Match error")
635594 }
636595
637596
638-func eS () = {
639- let dN = getString(T())
640- if ($isInstanceOf(dN, "String"))
597+func ew () = {
598+ let dq = getString(R())
599+ if ($isInstanceOf(dq, "String"))
641600 then {
642- let eR = dN
643- fromBase58String(eR)
601+ let ev = dq
602+ fromBase58String(ev)
644603 }
645- else if ($isInstanceOf(dN, "Unit"))
604+ else if ($isInstanceOf(dq, "Unit"))
646605 then unit
647606 else throw("Match error")
648607 }
649608
650609
651-func eT (dC) = {
652- let dN = eQ()
653- if ($isInstanceOf(dN, "ByteVector"))
610+func ex (df) = {
611+ let dq = eu()
612+ if ($isInstanceOf(dq, "ByteVector"))
654613 then {
655- let eU = dN
656- (dC.callerPublicKey == eU)
614+ let ey = dq
615+ (df.callerPublicKey == ey)
657616 }
658- else if ($isInstanceOf(dN, "Unit"))
659- then (dC.caller == this)
617+ else if ($isInstanceOf(dq, "Unit"))
618+ then (df.caller == this)
660619 else throw("Match error")
661620 }
662621
663622
664-func eV (dC) = {
665- let eW = throw("Permission denied")
666- let dN = eQ()
667- if ($isInstanceOf(dN, "ByteVector"))
623+func ez (df) = {
624+ let eA = throw("Permission denied")
625+ let dq = eu()
626+ if ($isInstanceOf(dq, "ByteVector"))
668627 then {
669- let eU = dN
670- if ((dC.callerPublicKey == eU))
628+ let ey = dq
629+ if ((df.callerPublicKey == ey))
671630 then true
672- else eW
631+ else eA
673632 }
674- else if ($isInstanceOf(dN, "Unit"))
675- then if ((dC.caller == this))
633+ else if ($isInstanceOf(dq, "Unit"))
634+ then if ((df.caller == this))
676635 then true
677- else eW
636+ else eA
678637 else throw("Match error")
679638 }
680639
681640
682-@Callable(dC)
683-func setManager (eX) = {
684- let eY = eV(dC)
685- if ((eY == eY))
641+@Callable(df)
642+func setManager (eB) = {
643+ let eC = ez(df)
644+ if ((eC == eC))
686645 then {
687- let eZ = fromBase58String(eX)
688- if ((eZ == eZ))
689- then [StringEntry(T(), eX)]
646+ let eD = fromBase58String(eB)
647+ if ((eD == eD))
648+ then [StringEntry(R(), eB)]
690649 else throw("Strict value is not equal to itself.")
691650 }
692651 else throw("Strict value is not equal to itself.")
693652 }
694653
695654
696655
697-@Callable(dC)
656+@Callable(df)
698657 func confirmManager () = {
699- let fa = eS()
700- let fb = if (isDefined(fa))
658+ let eE = ew()
659+ let eF = if (isDefined(eE))
701660 then true
702661 else throw("No pending manager")
703- if ((fb == fb))
662+ if ((eF == eF))
704663 then {
705- let fc = if ((dC.callerPublicKey == value(fa)))
664+ let eG = if ((df.callerPublicKey == value(eE)))
706665 then true
707666 else throw("You are not pending manager")
708- if ((fc == fc))
709- then [StringEntry(S(), toBase58String(value(fa))), DeleteEntry(T())]
667+ if ((eG == eG))
668+ then [StringEntry(Q(), toBase58String(value(eE))), DeleteEntry(R())]
710669 else throw("Strict value is not equal to itself.")
711670 }
712671 else throw("Strict value is not equal to itself.")
713672 }
714673
715674
716675
717-@Callable(dC)
718-func put (ct,fd) = if ((0 > ct))
676+@Callable(df)
677+func put (ck,eH) = if ((0 > ck))
719678 then throw("Invalid slippageTolerance passed")
720679 else {
721- let dI = dF(dC, ct, true)
722- let cV = dI._2
723- let ca = dI._7
724- let cr = dI._9
725- let cW = dI._10
726- let cX = dI._11
727- let fe = dI._12
728- let ff = dI._13
729- let dG = toBigInt(value(dC.payments[0]).amount)
730- let dH = toBigInt(value(dC.payments[1]).amount)
731- let dk = dd(dG, dH, toBigInt(0))
732- if ((dk == dk))
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))
733690 then {
734- let dL = invoke(aL, "emit", [cV], nil)
735- 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))
736701 then {
737- let dM = {
738- let dN = dL
739- if ($isInstanceOf(dN, "Address"))
740- then {
741- let dO = dN
742- invoke(dO, "emit", [cV], nil)
743- }
744- else unit
745- }
746- 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))
747706 then {
748- let fg = if ((cW > 0))
749- then invoke(bi, "put", nil, [AttachedPayment(fe, cW)])
707+ let eL = if ((cO > 0))
708+ then invoke(ba, "put", nil, [AttachedPayment(eJ, cO)])
750709 else nil
751- if ((fg == fg))
710+ if ((eL == eL))
752711 then {
753- let fh = if ((cX > 0))
754- then invoke(bi, "put", nil, [AttachedPayment(ff, cX)])
755- else nil
756- if ((fh == fh))
712+ let eM = if (eH)
757713 then {
758- let fi = if (fd)
759- then {
760- let fj = invoke(bh, "stake", nil, [AttachedPayment(ca, cV)])
761- if ((fj == fj))
762- then nil
763- else throw("Strict value is not equal to itself.")
764- }
765- else [ScriptTransfer(dC.caller, cV, ca)]
766- let fk = dl(0, 0, 0)
767- if ((fk == fk))
768- then {
769- let dc = fk._2
770- let fl = fk._1
771- let fm = dp(dk, dc)
772- if ((fm == fm))
773- then ((cr ++ fi) ++ fl)
774- else throw("Strict value is not equal to itself.")
775- }
714+ let eN = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
715+ if ((eN == eN))
716+ then nil
776717 else throw("Strict value is not equal to itself.")
777718 }
778- else throw("Strict value is not equal to itself.")
719+ else [ScriptTransfer(df.caller, cM, bR)]
720+ (ci ++ eM)
779721 }
780722 else throw("Strict value is not equal to itself.")
781723 }
782724 else throw("Strict value is not equal to itself.")
783725 }
784726 else throw("Strict value is not equal to itself.")
785727 }
786728 else throw("Strict value is not equal to itself.")
787729 }
788730
789731
790732
791-@Callable(dC)
792-func putForFree (fn) = if ((0 > fn))
733+@Callable(df)
734+func putForFree (eO) = if ((0 > eO))
793735 then throw("Invalid value passed")
794736 else {
795- let dI = dF(dC, fn, false)
796- let cr = dI._9
797- let dG = toBigInt(value(dC.payments[0]).amount)
798- let dH = toBigInt(value(dC.payments[1]).amount)
799- let dk = dd(dG, dH, toBigInt(0))
800- if ((dk == dk))
801- then {
802- let fo = dl(0, 0, 0)
803- let fl = fo._1
804- let dc = fo._2
805- let fm = dp(dk, dc)
806- if ((fm == fm))
807- then (cr ++ fl)
808- else throw("Strict value is not equal to itself.")
809- }
810- else throw("Strict value is not equal to itself.")
737+ let dl = di(df, eO, false)
738+ dl._9
811739 }
812740
813741
814742
815-@Callable(dC)
816-func putOneTkn (fp,fq) = {
817- let fr = {
818- let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
819- if ($isInstanceOf(fs, "Boolean"))
820- then fs
821- else throw(($getType(fs) + " couldn't be cast to Boolean"))
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"))
822750 }
823- let ft = if (if (if (aN())
751+ let eT = if (if (if (aF())
824752 then true
825- else (ba == l))
753+ else (aS == l))
826754 then true
827- else (ba == n))
755+ else (aS == n))
828756 then true
829- else fr
830- let ey = [if (if (!(ft))
757+ else eR
758+ let ed = [if (if (!(eT))
831759 then true
832- else eT(dC))
760+ else ex(df))
833761 then true
834- 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))
835763 then true
836- else aI("exactly 1 payment are expected")]
837- if ((ey == ey))
764+ else aB("exactly 1 payment are expected")]
765+ if ((ed == ed))
838766 then {
839- let fu = dC.payments[0]
840- let dT = fu.assetId
841- let dS = fu.amount
842- let dk = if ((dT == bc))
843- then dd(toBigInt(dS), toBigInt(0), toBigInt(0))
844- else if ((dT == bd))
845- then dd(toBigInt(0), toBigInt(dS), toBigInt(0))
846- else aI("payment asset is not supported")
847- if ((dk == dk))
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))
848774 then {
849- let Z = dC.caller
850- let aa = dC.transactionId
851- let fv = dR(dS, dT, Z, aa)
852- if ((fv == fv))
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)
781+ else false)
782+ then aB(makeString(["amount to receive is less than ", toString(eP)], ""))
783+ else eX
784+ let do = dm(eY)
785+ if ((do == do))
853786 then {
854- let dX = fv._5
855- let fw = fv._4
856- let dQ = fv._3
857- let cY = fv._2
858- let fx = fv._1
859- let fy = if (if ((fp > 0))
860- then (fp > fx)
787+ let eM = if (eQ)
788+ then {
789+ let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
790+ if ((eZ == eZ))
791+ then nil
792+ else throw("Strict value is not equal to itself.")
793+ }
794+ else [ScriptTransfer(df.caller, eY, aT)]
795+ let fa = if ((dt > 0))
796+ then [ScriptTransfer(aE, dt, dw)]
797+ else nil
798+ $Tuple2(((cP ++ eM) ++ fa), eY)
799+ }
800+ else throw("Strict value is not equal to itself.")
801+ }
802+ else throw("Strict value is not equal to itself.")
803+ }
804+ else throw("Strict value is not equal to itself.")
805+ }
806+
807+
808+
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))
817+ }
818+
819+
820+
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"))
828+ }
829+ let fd = if (if (aF())
830+ then true
831+ else (aS == n))
832+ then true
833+ else eR
834+ let ed = [if (if (!(fd))
835+ then true
836+ else ex(df))
837+ then true
838+ else aB("get operation is blocked by admin"), if ((size(df.payments) == 1))
839+ then true
840+ else aB("exactly 1 payment are expected")]
841+ if ((ed == ed))
842+ then {
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))
851+ then {
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)
858+ else false)
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))
863+ then {
864+ let fh = [ScriptTransfer(X, dn, ec)]
865+ let fa = if ((dt > 0))
866+ then [ScriptTransfer(aE, dt, ec)]
867+ else nil
868+ $Tuple2(((cP ++ fh) ++ fa), dn)
869+ }
870+ else throw("Strict value is not equal to itself.")
871+ }
872+ else throw("Strict value is not equal to itself.")
873+ }
874+ else throw("Strict value is not equal to itself.")
875+ }
876+
877+
878+
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))
887+ }
888+
889+
890+
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"))
898+ }
899+ let fd = if (if (aF())
900+ then true
901+ else (aS == n))
902+ then true
903+ else eR
904+ let ed = [if (if (!(fd))
905+ then true
906+ else ex(df))
907+ then true
908+ else aB("get operation is blocked by admin"), if ((size(df.payments) == 0))
909+ then true
910+ else aB("no payments are expected")]
911+ if ((ed == ed))
912+ then {
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))
918+ then {
919+ let fl = eb(ec, fj, aT, X, Y)
920+ if ((fl == fl))
921+ then {
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)
861928 else false)
862- then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
863- else fx
864- let dL = dJ(fy)
865- if ((dL == dL))
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))
866933 then {
867- let fi = if (fq)
868- then {
869- let fz = invoke(bh, "stake", nil, [AttachedPayment(bb, fy)])
870- if ((fz == fz))
871- then nil
872- else throw("Strict value is not equal to itself.")
873- }
874- else [ScriptTransfer(dC.caller, fy, bb)]
875- let fA = if ((dQ > 0))
876- then [ScriptTransfer(aM, dQ, dT)]
934+ let fh = [ScriptTransfer(df.caller, dn, ec)]
935+ let fa = if ((dt > 0))
936+ then [ScriptTransfer(aE, dt, ec)]
877937 else nil
878- let fB = if ((this == aM))
879- then $Tuple2(0, 0)
880- else if (dX)
881- then $Tuple2(-(dQ), 0)
882- else $Tuple2(0, -(dQ))
883- let dm = fB._1
884- let dn = fB._2
885- let fC = dl(dm, dn, 0)
886- let fl = fC._1
887- let dc = fC._2
888- let dw = value(getString(ah))
889- let fm = dp(dk, dc)
890- if ((fm == fm))
891- then $Tuple2((((cY ++ fi) ++ fA) ++ fl), fy)
892- else throw("Strict value is not equal to itself.")
938+ $Tuple2(((cP ++ fh) ++ fa), dn)
893939 }
894940 else throw("Strict value is not equal to itself.")
895941 }
896942 else throw("Strict value is not equal to itself.")
897943 }
898944 else throw("Strict value is not equal to itself.")
899945 }
900946 else throw("Strict value is not equal to itself.")
901947 }
902948
903949
904950
905-@Callable(dC)
906-func putOneTknREADONLY (dT,dS) = {
907- let fD = dR(dS, aS(dT), unit, unit)
908- let fx = fD._1
909- let cY = fD._2
910- let dQ = fD._3
911- let fw = fD._4
912- let dX = fD._5
913- $Tuple2(nil, $Tuple3(fx, dQ, fw))
951+@Callable(df)
952+func get () = {
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
962+ else throw("Strict value is not equal to itself.")
914963 }
915964
916965
917966
918-@Callable(dC)
919-func getOneTkn (fE,fp) = {
920- let fr = {
921- let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
922- if ($isInstanceOf(fs, "Boolean"))
923- then fs
924- else throw(($getType(fs) + " couldn't be cast to Boolean"))
925- }
926- let fF = if (if (aN())
927- then true
928- else (ba == n))
929- then true
930- else fr
931- let ey = [if (if (!(fF))
932- then true
933- else eT(dC))
934- then true
935- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 1))
936- then true
937- else aI("exactly 1 payment are expected")]
938- if ((ey == ey))
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)))
979+ else {
980+ let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
981+ if ((fn == fn))
982+ then ci
983+ else throw("Strict value is not equal to itself.")
984+ }
985+ }
986+
987+
988+
989+@Callable(df)
990+func unstakeAndGet (dn) = {
991+ let fq = if ((size(df.payments) != 0))
992+ then throw("No payments are expected")
993+ else true
994+ if ((fq == fq))
939995 then {
940- let ex = aS(fE)
941- let fu = dC.payments[0]
942- let dT = fu.assetId
943- let ef = fu.amount
944- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
945- if ((dk == dk))
996+ let bE = aH()
997+ let bR = fromBase58String(bE[q])
998+ let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
999+ if ((fk == fk))
9461000 then {
947- let Z = dC.caller
948- let aa = dC.transactionId
949- let fG = ew(ex, ef, dT, Z, aa)
950- if ((fG == fG))
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())
1005+ then true
1006+ else (bU == n))
1007+ then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
1008+ else true
1009+ if ((fr == fr))
9511010 then {
952- let ez = fG._5
953- let fw = fG._4
954- let dQ = fG._3
955- let cY = fG._2
956- let fH = fG._1
957- let dK = if (if ((fp > 0))
958- then (fp > fH)
959- else false)
960- then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
961- else fH
962- let fI = invoke(aL, "burn", [ef], [AttachedPayment(dT, ef)])
963- if ((fI == fI))
964- then {
965- let fJ = [ScriptTransfer(Z, dK, ex)]
966- let fA = if ((dQ > 0))
967- then [ScriptTransfer(aM, dQ, ex)]
968- else nil
969- let fK = {
970- let fL = if ((this == aM))
971- then 0
972- else dQ
973- if (ez)
974- then $Tuple2(-((dK + fL)), 0)
975- else $Tuple2(0, -((dK + fL)))
976- }
977- let dm = fK._1
978- let dn = fK._2
979- let fM = dl(dm, dn, 0)
980- let fl = fM._1
981- let dc = fM._2
982- let fm = dp(dk, dc)
983- if ((fm == fm))
984- then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK)
985- else throw("Strict value is not equal to itself.")
986- }
1011+ let fn = invoke(aD, "burn", [dn], [AttachedPayment(bR, dn)])
1012+ if ((fn == fn))
1013+ then ci
9871014 else throw("Strict value is not equal to itself.")
9881015 }
9891016 else throw("Strict value is not equal to itself.")
9901017 }
9911018 else throw("Strict value is not equal to itself.")
9921019 }
9931020 else throw("Strict value is not equal to itself.")
9941021 }
9951022
9961023
9971024
998-@Callable(dC)
999-func getOneTknREADONLY (ex,ef) = {
1000- let fN = ew(aS(ex), ef, bb, unit, unit)
1001- let fH = fN._1
1002- let cY = fN._2
1003- let dQ = fN._3
1004- let fw = fN._4
1005- let ez = fN._5
1006- $Tuple2(nil, $Tuple3(fH, dQ, fw))
1007- }
1008-
1009-
1010-
1011-@Callable(dC)
1012-func unstakeAndGetOneTkn (fO,fE,fp) = {
1013- let fr = {
1014- let fs = invoke(aL, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1015- if ($isInstanceOf(fs, "Boolean"))
1016- then fs
1017- else throw(($getType(fs) + " couldn't be cast to Boolean"))
1018- }
1019- let fF = if (if (aN())
1025+@Callable(df)
1026+func unstakeAndGetNoLess (fj,fs,fp) = {
1027+ let fd = if (aF())
10201028 then true
1021- else (ba == n))
1029+ else (aS == n)
1030+ let ed = [if (!(fd))
10221031 then true
1023- else fr
1024- let ey = [if (if (!(fF))
1032+ else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
10251033 then true
1026- else eT(dC))
1027- then true
1028- else aI("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1029- then true
1030- else aI("no payments are expected")]
1031- if ((ey == ey))
1034+ else throw("no payments are expected")]
1035+ if ((ed == ed))
10321036 then {
1033- let ex = aS(fE)
1034- let Z = dC.caller
1035- let aa = dC.transactionId
1036- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1037- if ((dk == dk))
1037+ let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1038+ if ((fk == fk))
10381039 then {
1039- let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil)
1040- if ((fP == fP))
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))
1045+ then true
1046+ else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
1047+ then true
1048+ else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1049+ if ((ft == ft))
10411050 then {
1042- let fQ = ew(ex, fO, bb, Z, aa)
1043- if ((fQ == fQ))
1044- then {
1045- let ez = fQ._5
1046- let fw = fQ._4
1047- let dQ = fQ._3
1048- let cY = fQ._2
1049- let fH = fQ._1
1050- let dK = if (if ((fp > 0))
1051- then (fp > fH)
1052- else false)
1053- then aI(makeString(["amount to receive is less than ", toString(fp)], ""))
1054- else fH
1055- let fI = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)])
1056- if ((fI == fI))
1057- then {
1058- let fJ = [ScriptTransfer(dC.caller, dK, ex)]
1059- let fA = if ((dQ > 0))
1060- then [ScriptTransfer(aM, dQ, ex)]
1061- else nil
1062- let fR = {
1063- let fL = if ((this == aM))
1064- then 0
1065- else dQ
1066- if (ez)
1067- then $Tuple2(-((dK + fL)), 0)
1068- else $Tuple2(0, -((dK + fL)))
1069- }
1070- let dm = fR._1
1071- let dn = fR._2
1072- let fS = dl(dm, dn, 0)
1073- let fl = fS._1
1074- let dc = fS._2
1075- let fm = dp(dk, dc)
1076- if ((fm == fm))
1077- then $Tuple2((((cY ++ fJ) ++ fA) ++ fl), dK)
1078- else throw("Strict value is not equal to itself.")
1079- }
1080- else throw("Strict value is not equal to itself.")
1081- }
1051+ let fn = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)])
1052+ if ((fn == fn))
1053+ then ci
10821054 else throw("Strict value is not equal to itself.")
10831055 }
10841056 else throw("Strict value is not equal to itself.")
10851057 }
10861058 else throw("Strict value is not equal to itself.")
10871059 }
10881060 else throw("Strict value is not equal to itself.")
10891061 }
10901062
10911063
10921064
1093-@Callable(dC)
1094-func get () = {
1095- let cJ = dB(dC)
1096- let fT = cJ._1
1097- let cq = cJ._2
1098- let dE = cJ._3
1099- let bY = cJ._4
1100- let cr = cJ._5
1101- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1102- if ((dk == dk))
1103- then {
1104- let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1105- if ((fU == fU))
1106- then {
1107- let fV = dl(-(fT), -(cq), 0)
1108- let fl = fV._1
1109- let dc = fV._2
1110- let fm = dp(dk, dc)
1111- if ((fm == fm))
1112- then (cr ++ fl)
1113- else throw("Strict value is not equal to itself.")
1114- }
1115- else throw("Strict value is not equal to itself.")
1116- }
1117- else throw("Strict value is not equal to itself.")
1065+@Callable(df)
1066+func activate (fu,fv) = if ((toString(df.caller) != toString(aD)))
1067+ then throw("permissions denied")
1068+ else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
1069+
1070+
1071+
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])])
11181086 }
11191087
11201088
11211089
1122-@Callable(dC)
1123-func getNoLess (fW,fX) = {
1124- let cJ = dB(dC)
1125- let cp = cJ._1
1126- let cq = cJ._2
1127- let dE = cJ._3
1128- let bY = cJ._4
1129- let cr = cJ._5
1130- if ((fW > cp))
1131- then throw(((("noLessThenAmtAsset failed: " + toString(cp)) + " < ") + toString(fW)))
1132- else if ((fX > cq))
1133- then throw(((("noLessThenPriceAsset failed: " + toString(cq)) + " < ") + toString(fX)))
1134- else {
1135- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1136- if ((dk == dk))
1137- then {
1138- let fU = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)])
1139- if ((fU == fU))
1140- then {
1141- let fY = dl(-(cp), -(cq), 0)
1142- let fl = fY._1
1143- let dc = fY._2
1144- let fm = dp(dk, dc)
1145- if ((fm == fm))
1146- then (cr ++ fl)
1147- else throw("Strict value is not equal to itself.")
1148- }
1149- else throw("Strict value is not equal to itself.")
1150- }
1151- else throw("Strict value is not equal to itself.")
1152- }
1090+@Callable(df)
1091+func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
1092+
1093+
1094+
1095+@Callable(df)
1096+func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
1097+
1098+
1099+
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))
11531114 }
11541115
11551116
11561117
1157-@Callable(dC)
1158-func unstakeAndGet (dK) = {
1159- let fZ = if ((size(dC.payments) != 0))
1160- then throw("No payments are expected")
1161- else true
1162- if ((fZ == fZ))
1163- then {
1164- let bN = aP()
1165- let ca = fromBase58String(bN[q])
1166- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1167- if ((dk == dk))
1168- then {
1169- let fP = invoke(bh, "unstake", [toBase58String(ca), dK], nil)
1170- if ((fP == fP))
1171- then {
1172- let cJ = bW(toBase58String(dC.transactionId), toBase58String(ca), dK, dC.caller)
1173- let cp = cJ._1
1174- let cq = cJ._2
1175- let cd = parseIntValue(cJ._9)
1176- let cr = cJ._10
1177- let ga = if (if (aN())
1178- then true
1179- else (cd == n))
1180- then throw(("Get operation is blocked by admin. Status = " + toString(cd)))
1181- else true
1182- if ((ga == ga))
1183- then {
1184- let fU = invoke(aL, "burn", [dK], [AttachedPayment(ca, dK)])
1185- if ((fU == fU))
1186- then {
1187- let gb = dl(-(cp), -(cq), 0)
1188- let fl = gb._1
1189- let dc = gb._2
1190- let fm = dp(dk, dc)
1191- if ((fm == fm))
1192- then (cr ++ fl)
1193- else throw("Strict value is not equal to itself.")
1194- }
1195- else throw("Strict value is not equal to itself.")
1196- }
1197- else throw("Strict value is not equal to itself.")
1198- }
1199- else throw("Strict value is not equal to itself.")
1200- }
1201- else throw("Strict value is not equal to itself.")
1202- }
1203- else throw("Strict value is not equal to itself.")
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))
12041139 }
12051140
12061141
12071142
1208-@Callable(dC)
1209-func unstakeAndGetNoLess (fO,gc,fX) = {
1210- let fF = if (aN())
1211- then true
1212- else (ba == n)
1213- let ey = [if (!(fF))
1214- then true
1215- else throw("get operation is blocked by admin"), if ((size(dC.payments) == 0))
1216- then true
1217- else throw("no payments are expected")]
1218- if ((ey == ey))
1219- then {
1220- let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0))
1221- if ((dk == dk))
1222- then {
1223- let fP = invoke(bh, "unstake", [toBase58String(bb), fO], nil)
1224- if ((fP == fP))
1225- then {
1226- let cJ = bW(toBase58String(dC.transactionId), toBase58String(bb), fO, dC.caller)
1227- let cp = cJ._1
1228- let cq = cJ._2
1229- let cr = cJ._10
1230- let gd = [if ((cp >= gc))
1231- then true
1232- else throw(makeString(["amount asset amount to receive is less than ", toString(gc)], "")), if ((cq >= fX))
1233- then true
1234- else throw(makeString(["price asset amount to receive is less than ", toString(fX)], ""))]
1235- if ((gd == gd))
1236- then {
1237- let fU = invoke(aL, "burn", [fO], [AttachedPayment(bb, fO)])
1238- if ((fU == fU))
1239- then {
1240- let ge = dl(-(cp), -(cq), 0)
1241- let fl = ge._1
1242- let dc = ge._2
1243- let fm = dp(dk, dc)
1244- if ((fm == fm))
1245- then (cr ++ fl)
1246- else throw("Strict value is not equal to itself.")
1247- }
1248- else throw("Strict value is not equal to itself.")
1249- }
1250- else throw("Strict value is not equal to itself.")
1251- }
1252- else throw("Strict value is not equal to itself.")
1253- }
1254- else throw("Strict value is not equal to itself.")
1255- }
1256- else throw("Strict value is not equal to itself.")
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))
12571172 }
12581173
12591174
12601175
1261-@Callable(dC)
1262-func activate (gf,gg) = if ((toString(dC.caller) != toString(aL)))
1263- then throw("permissions denied")
1264- else $Tuple2([StringEntry(ac(), gf), StringEntry(ad(), gg)], "success")
1265-
1266-
1267-
1268-@Callable(dC)
1269-func refreshKLp () = {
1270- let gh = valueOrElse(getInteger(ai), 0)
1271- let gi = if (((height - gh) >= al))
1272- then unit
1273- else aI(makeString([toString(al), " blocks have not passed since the previous call"], ""))
1274- if ((gi == gi))
1275- then {
1276- let dw = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ah), "0")), aK("invalid kLp"))
1277- let gj = dl(0, 0, 0)
1278- let gk = gj._1
1279- let dc = gj._2
1280- let do = if ((dw != dc))
1281- then gk
1282- else aI("nothing to refresh")
1283- $Tuple2(do, toString(dc))
1284- }
1285- else throw("Strict value is not equal to itself.")
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))
1193+ then e
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))
12861205 }
12871206
12881207
12891208
1290-@Callable(dC)
1291-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aP())
1292-
1293-
1294-
1295-@Callable(dC)
1296-func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
1297-
1298-
1299-
1300-@Callable(dC)
1301-func calcPricesWrapperREADONLY (bH,bI,bM) = {
1302- let bV = bL(bH, bI, bM)
1303- $Tuple2(nil, [toString(bV[0]), toString(bV[1]), toString(bV[2])])
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))
13041220 }
13051221
13061222
1307-
1308-@Callable(dC)
1309-func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
1310-
1311-
1312-
1313-@Callable(dC)
1314-func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
1315-
1316-
1317-
1318-@Callable(dC)
1319-func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC))))
1320-
1321-
1322-
1323-@Callable(dC)
1324-func estimatePutOperationWrapperREADONLY (bX,ct,cu,cv,cw,cx,Z,cy,cz) = $Tuple2(nil, cs(bX, ct, cu, cv, cw, cx, Z, cy, cz))
1325-
1326-
1327-
1328-@Callable(dC)
1329-func estimateGetOperationWrapperREADONLY (bX,bY,bZ,Z) = {
1330- let cJ = bW(bX, bY, bZ, addressFromStringValue(Z))
1331- $Tuple2(nil, $Tuple10(cJ._1, cJ._2, cJ._3, cJ._4, cJ._5, cJ._6, cJ._7, toString(cJ._8), cJ._9, cJ._10))
1332- }
1333-
1334-
1335-
1336-@Callable(dC)
1337-func statsREADONLY () = {
1338- let bN = aP()
1339- let ca = fromBase58String(bN[q])
1340- let gl = bN[r]
1341- let gm = bN[s]
1342- let cC = bN[v]
1343- let cD = bN[w]
1344- let bO = parseIntValue(bN[t])
1345- let bP = parseIntValue(bN[u])
1346- let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1347- let go = by(gl)
1348- let gp = by(gm)
1349- let gq = if ((gn == 0))
1350- then [e, e, e]
1351- else bL(go, gp, gn)
1352- let ck = 0
1353- let gr = G(gq[1], b)
1354- let gs = G(gq[2], b)
1355- let gt = value(getInteger(aL, aw(toString(this))))
1356- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(go), toString(gp), toString(gn), toString(ck), toString(gr), toString(gs), toString(gt)], j))
1357- }
1358-
1359-
1360-
1361-@Callable(dC)
1362-func evaluatePutByAmountAssetREADONLY (cu) = {
1363- let bN = aP()
1364- let ca = fromBase58String(bN[q])
1365- let cA = bN[r]
1366- let cb = fromBase58String(cA)
1367- let cB = bN[s]
1368- let cc = fromBase58String(cB)
1369- let bO = parseIntValue(bN[t])
1370- let bP = parseIntValue(bN[u])
1371- let cd = bN[p]
1372- let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1373- let go = by(cA)
1374- let gp = by(cB)
1375- let bJ = D(go, bO)
1376- let bK = D(gp, bP)
1377- let cj = if ((gn == 0))
1378- then e
1379- else bA(bK, bJ)
1380- let cG = D(cu, bO)
1381- let cH = fraction(cG, cj, d)
1382- let cw = G(cH, bP)
1383- let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1384- let cR = dI._1
1385- let gu = dI._3
1386- let cf = dI._4
1387- let ch = dI._5
1388- let ce = dI._6
1389- $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))
1390- }
1391-
1392-
1393-
1394-@Callable(dC)
1395-func evaluatePutByPriceAssetREADONLY (cw) = {
1396- let bN = aP()
1397- let ca = fromBase58String(bN[q])
1398- let cA = bN[r]
1399- let cb = fromBase58String(cA)
1400- let cB = bN[s]
1401- let cc = fromBase58String(cB)
1402- let bO = parseIntValue(bN[t])
1403- let bP = parseIntValue(bN[u])
1404- let cd = bN[p]
1405- let gn = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity
1406- let gv = by(cA)
1407- let gw = by(cB)
1408- let gx = D(gv, bO)
1409- let gy = D(gw, bP)
1410- let cj = if ((gn == 0))
1411- then e
1412- else bA(gy, gx)
1413- let cH = D(cw, bP)
1414- let cG = fraction(cH, d, cj)
1415- let cu = G(cG, bO)
1416- let dI = cs("", 500000, cu, cb, cw, cc, "", true, false)
1417- let cR = dI._1
1418- let gu = dI._3
1419- let cf = dI._4
1420- let ch = dI._5
1421- let ce = dI._6
1422- $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))
1423- }
1424-
1425-
1426-
1427-@Callable(dC)
1428-func evaluateGetREADONLY (gz,gA) = {
1429- let cJ = bW("", gz, gA, this)
1430- let cp = cJ._1
1431- let cq = cJ._2
1432- let cf = cJ._5
1433- let ch = cJ._6
1434- let ce = cJ._7
1435- let ck = cJ._8
1436- let cd = parseIntValue(cJ._9)
1437- $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))
1438- }
1439-
1440-
1441-@Verifier(gB)
1442-func gC () = {
1443- let gD = {
1444- let dN = eQ()
1445- if ($isInstanceOf(dN, "ByteVector"))
1223+@Verifier(fI)
1224+func fJ () = {
1225+ let fK = {
1226+ let dq = eu()
1227+ if ($isInstanceOf(dq, "ByteVector"))
14461228 then {
1447- let eU = dN
1448- eU
1229+ let ey = dq
1230+ ey
14491231 }
1450- else if ($isInstanceOf(dN, "Unit"))
1451- then gB.senderPublicKey
1232+ else if ($isInstanceOf(dq, "Unit"))
1233+ then fI.senderPublicKey
14521234 else throw("Match error")
14531235 }
1454- let dN = gB
1455- if ($isInstanceOf(dN, "Order"))
1236+ let dq = fI
1237+ if ($isInstanceOf(dq, "Order"))
14561238 then {
1457- let ds = dN
1458- let gE = aO()
1459- let aB = dr(ds)
1460- let aC = sigVerify(ds.bodyBytes, ds.proofs[0], ds.senderPublicKey)
1461- let aD = sigVerify(ds.bodyBytes, ds.proofs[1], gE)
1462- if (if (if (aB)
1463- 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
14641246 else false)
1465- then aD
1247+ then aw
14661248 else false)
14671249 then true
1468- else aA(aB, aC, aD)
1250+ else at(au, av, aw)
14691251 }
1470- else if ($isInstanceOf(dN, "SetScriptTransaction"))
1252+ else if ($isInstanceOf(dq, "SetScriptTransaction"))
14711253 then {
1472- let eR = dN
1473- let gF = blake2b256(value(eR.script))
1474- let gG = fromBase64String(value(getString(aL, ay())))
1475- let gH = scriptHash(this)
1476- if (if ((gG == gF))
1477- then (gH != gF)
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)
14781260 else false)
14791261 then true
1480- else sigVerify(gB.bodyBytes, gB.proofs[0], gD)
1262+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14811263 }
1482- else sigVerify(gB.bodyBytes, gB.proofs[0], gD)
1264+ else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
14831265 }
14841266

github/deemru/w8io/026f985 
321.49 ms