tx · ChKW6NvTc3YFHtqF7Yds6RxgfvFW9teCXxsLV2e9pPBj

3MqjK2SfnefGxk4fiaeRHZaxg6wHAZ6tbd2:  -0.03200000 Waves

2023.01.16 15:32 [2407507] smart account 3MqjK2SfnefGxk4fiaeRHZaxg6wHAZ6tbd2 > SELF 0.00000000 Waves

{ "type": 13, "id": "ChKW6NvTc3YFHtqF7Yds6RxgfvFW9teCXxsLV2e9pPBj", "fee": 3200000, "feeAssetId": null, "timestamp": 1673872382744, "version": 1, "sender": "3MqjK2SfnefGxk4fiaeRHZaxg6wHAZ6tbd2", "senderPublicKey": "4eCcSEdDzsn3CVYwcVcGA3AbMH8prX8N1GVuLubC57iy", "proofs": [ "5EJ24dQs9YwE1jPxBJbohg6uMMGfqKxs442Ya2gLKRJnBiTg1b4JAtY4fWkHwh2DhU3tWQdzthSucdsXJQN2aT8v" ], "script": "base64:BgLhKAgCEgYKBAEEAQgSAwoBCBIDCgEIEgASBAoCAQQSAwoBARIECgIBBBIECgIIARIECgIIARIECgIIARIFCgMBCAESABIECgIBARIDCgEBEgUKAwEBARIECgIICBIAEgMKAQgSBQoDAQEBEgQKAgEBEgQKAggBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgASAwoBARIDCgEBEgQKAggBIgpsUGRlY2ltYWxzIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiILd2F2ZXNTdHJpbmciA1NFUCIKUG9vbEFjdGl2ZSIPUG9vbFB1dERpc2FibGVkIhNQb29sTWF0Y2hlckRpc2FibGVkIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIg1pZHhQb29sU3RhdHVzIhBpZHhQb29sTFBBc3NldElkIg1pZHhBbXRBc3NldElkIg9pZHhQcmljZUFzc2V0SWQiDmlkeEFtdEFzc2V0RGNtIhBpZHhQcmljZUFzc2V0RGNtIg5pZHhJQW10QXNzZXRJZCIQaWR4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UCYlcJAMwIAgkApgMBBQJjYwkAzAgCCQCkAwEFAmJWBQNuaWwFAWoBAmZVAQJmVgAEAmZXBAJkcgkBAmV3AAMJAAECBQJkcgIKQnl0ZVZlY3RvcgQCZUEFAmRyBQJlQQMJAAECBQJkcgIEVW5pdAgFAmZVD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yBAJkcgUCZlUDCQABAgUCZHICBU9yZGVyBAJjUwUCZHIEAmZYCQECYUgABAJhcwkBAmNSAQUCY1MEAmF0CQD0AwMIBQJjUwlib2R5Qnl0ZXMJAJEDAggFAmNTBnByb29mcwAACAUCY1MPc2VuZGVyUHVibGljS2V5BAJhdQkA9AMDCAUCY1MJYm9keUJ5dGVzCQCRAwIIBQJjUwZwcm9vZnMAAQUCZlgDAwMFAmFzBQJhdAcFAmF1BwYJAQJhcgMFAmFzBQJhdAUCYXUDCQABAgUCZHICFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJleAUCZHIEAmZZCQD2AwEJAQV2YWx1ZQEIBQJleAZzY3JpcHQEAmZaCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYUIJAQJhcAAEAmdhCQDxBwEFBHRoaXMDAwkAAAIFAmZaBQJmWQkBAiE9AgUCZ2EFAmZZBwYJAPQDAwgFAmZVCWJvZHlCeXRlcwkAkQMCCAUCZlUGcHJvb2ZzAAAFAmZXCQD0AwMIBQJmVQlib2R5Qnl0ZXMJAJEDAggFAmZVBnByb29mcwAABQJmV4zSVxk=", "chainId": 84, "height": 2407507, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3xkbNZdaSM8hrtDWjF9BEuQL7AygUTHXHM5yXTJMyucs Next: EupXGaGbuQ8fQMU39Xdt19MgHZP4inU4UzeLmgAGk641 Diff:
OldNewDifferences
7878 else H
7979
8080
81-func P () = "%s__factoryContract"
81+func P () = "%s__swapContract"
8282
8383
84-func Q () = "%s__managerPublicKey"
84+func Q () = "%s__factoryContract"
8585
8686
87-func R () = "%s__pendingManagerPublicKey"
87+func R () = "%s__managerPublicKey"
8888
8989
90-func S () = "%s%s__price__last"
90+func S () = "%s__pendingManagerPublicKey"
9191
9292
93-func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j)
93+func T () = "%s%s__price__last"
9494
9595
96-func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y)
96+func U (V,W) = makeString(["%s%s%d%d__price__history", toString(V), toString(W)], j)
9797
9898
99-func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y)
99+func X (Y,Z) = ((("%s%s%s__P__" + Y) + "__") + Z)
100100
101101
102-func aa () = "%s__amountAsset"
102+func aa (Y,Z) = ((("%s%s%s__G__" + Y) + "__") + Z)
103103
104104
105-func ab () = "%s__priceAsset"
105+func ab () = "%s__amountAsset"
106106
107107
108-func ac () = "%s__factoryConfig"
108+func ac () = "%s__priceAsset"
109109
110110
111-func ad () = "%s%s__matcher__publicKey"
111+func ad () = "%s__factoryConfig"
112112
113113
114-func ae (af) = (("%s%s%s__" + af) + "__mappings__poolContract2LpAsset")
114+func ae () = "%s%s__matcher__publicKey"
115115
116116
117-func ag (ah,ai) = (((("%d%d%s__" + ah) + "__") + ai) + "__config")
117+func af (ag) = (("%s%s%s__" + ag) + "__mappings__poolContract2LpAsset")
118118
119119
120-func aj (ak) = ("%s%s%s__mappings__baseAsset2internalId__" + ak)
120+func ah (ai,aj) = (((("%d%d%s__" + ai) + "__") + aj) + "__config")
121121
122122
123-func al () = "%s__shutdown"
123+func ak (al) = ("%s%s%s__mappings__baseAsset2internalId__" + al)
124124
125125
126-func am (an) = ("%s%s__poolWeight__" + an)
126+func am () = "%s__shutdown"
127127
128128
129-func ao () = "%s__allowedLpScriptHash"
129+func an (ao) = ("%s%s__poolWeight__" + ao)
130130
131131
132-let ap = "%s__feeCollectorAddress"
133-
134-func aq (ar,as,at) = throw(((((("order validation failed: orderValid=" + toString(ar)) + " senderValid=") + toString(as)) + " matcherValid=") + toString(at)))
132+func ap () = "%s__allowedLpScriptHash"
135133
136134
137-func au (av,aw) = valueOrErrorMessage(getString(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
135+let aq = "%s__feeCollectorAddress"
136+
137+func ar (as,at,au) = throw(((((("order validation failed: orderValid=" + toString(as)) + " senderValid=") + toString(at)) + " matcherValid=") + toString(au)))
138138
139139
140-func ax (av,aw) = valueOrErrorMessage(getInteger(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
140+func av (aw,ax) = valueOrErrorMessage(getString(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " is not defined"], ""))
141141
142142
143-func ay (az) = throw(makeString(["lp.ride:", az], " "))
143+func ay (aw,ax) = valueOrErrorMessage(getInteger(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " is not defined"], ""))
144144
145145
146-let aA = addressFromStringValue(au(this, P()))
146+func az (aA) = throw(makeString(["lp.ride:", aA], " "))
147147
148-let aB = addressFromStringValue(au(aA, ap))
149148
150-let aC = {
151- let aD = invoke(aA, "getInFeeREADONLY", [toString(this)], nil)
152- if ($isInstanceOf(aD, "Int"))
153- then aD
154- else throw(($getType(aD) + " couldn't be cast to Int"))
149+let aB = addressFromStringValue(av(this, Q()))
150+
151+let aC = addressFromStringValue(av(aB, aq))
152+
153+let aD = {
154+ let aE = invoke(aB, "getInFeeREADONLY", [toString(this)], nil)
155+ if ($isInstanceOf(aE, "Int"))
156+ then aE
157+ else throw(($getType(aE) + " couldn't be cast to Int"))
155158 }
156159
157-let aE = {
158- let aD = invoke(aA, "getOutFeeREADONLY", [toString(this)], nil)
159- if ($isInstanceOf(aD, "Int"))
160- then aD
161- else throw(($getType(aD) + " couldn't be cast to Int"))
160+let aF = {
161+ let aE = invoke(aB, "getOutFeeREADONLY", [toString(this)], nil)
162+ if ($isInstanceOf(aE, "Int"))
163+ then aE
164+ else throw(($getType(aE) + " couldn't be cast to Int"))
162165 }
163166
164-func aF () = valueOrElse(getBoolean(aA, al()), false)
167+func aG () = valueOrElse(getBoolean(aB, am()), false)
165168
166169
167-func aG () = fromBase58String(au(aA, ad()))
170+func aH () = fromBase58String(av(aB, ae()))
168171
169172
170-func aH () = {
171- let aI = au(this, aa())
172- let aJ = au(this, ab())
173- let ai = ax(aA, aj(aJ))
174- let ah = ax(aA, aj(aI))
175- split(au(aA, ag(toString(ah), toString(ai))), j)
173+func aI () = {
174+ let aJ = av(this, ab())
175+ let aK = av(this, ac())
176+ let aj = ay(aB, ak(aK))
177+ let ai = ay(aB, ak(aJ))
178+ split(av(aB, ah(toString(ai), toString(aj))), j)
176179 }
177180
178181
179-func aK (aL) = if ((aL == i))
182+func aL (aM) = if ((aM == i))
180183 then unit
181- else fromBase58String(aL)
184+ else fromBase58String(aM)
182185
183186
184-func aM (aL) = if ((aL == unit))
187+func aN (aM) = if ((aM == unit))
185188 then i
186- else toBase58String(value(aL))
189+ else toBase58String(value(aM))
187190
188191
189-func aN (aO) = $Tuple7(addressFromStringValue(aO[o]), parseIntValue(aO[p]), fromBase58String(aO[q]), aK(aO[r]), aK(aO[s]), parseIntValue(aO[t]), parseIntValue(aO[u]))
192+func aO (aP) = $Tuple7(addressFromStringValue(aP[o]), parseIntValue(aP[p]), fromBase58String(aP[q]), aL(aP[r]), aL(aP[s]), parseIntValue(aP[t]), parseIntValue(aP[u]))
190193
191194
192-let aP = aN(aH())
195+let aQ = aO(aI())
193196
194-let aQ = aP
197+let aR = aQ
195198
196-let aR = aQ._1
199+let aS = aR._1
197200
198-let aS = aQ._2
201+let aT = aR._2
199202
200-let aT = aQ._3
203+let aU = aR._3
201204
202-let aU = aQ._4
205+let aV = aR._4
203206
204-let aV = aQ._5
207+let aW = aR._5
205208
206-let aW = aQ._6
209+let aX = aR._6
207210
208-let aX = aQ._7
211+let aY = aR._7
209212
210-func aY () = split(au(aA, ac()), j)
213+func aZ () = split(av(aB, ad()), j)
211214
212215
213-let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
216+let ba = valueOrErrorMessage(addressFromString(aZ()[B]), "incorrect staking address")
214217
215-let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
218+let bb = valueOrErrorMessage(addressFromString(aZ()[C]), "incorrect staking address")
216219
217-func bb (bc,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl)], j)
220+func bc (bd,be,bf,bg,bh,bi,bj,bk,bl,bm) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl), toString(bm)], j)
218221
219222
220-func bm (bn,bo,bp,bf,bi,bj) = makeString(["%d%d%d%d%d%d", toString(bn), toString(bo), toString(bp), toString(bf), toString(bi), toString(bj)], j)
223+func bn (bo,bp,bq,bg,bj,bk) = makeString(["%d%d%d%d%d%d", toString(bo), toString(bp), toString(bq), toString(bg), toString(bj), toString(bk)], j)
221224
222225
223-func bq (br) = if ((br == "WAVES"))
226+func br (bs) = if ((bs == "WAVES"))
224227 then wavesBalance(this).available
225- else assetBalance(this, fromBase58String(br))
228+ else assetBalance(this, fromBase58String(bs))
226229
227230
228-func bs (bt,bu) = fraction(bt, d, bu)
231+func bt (bu,bv) = fraction(bu, d, bv)
229232
230233
231-func bv (bw,bx,by,bz) = {
232- let bA = D(by, bw)
234+func bw (bx,by,bz,bA) = {
233235 let bB = D(bz, bx)
234- bs(bB, bA)
236+ let bC = D(bA, by)
237+ bt(bC, bB)
235238 }
236239
237240
238-func bC (by,bz,bD) = {
239- let bE = aH()
240- let bF = parseIntValue(bE[t])
241- let bG = parseIntValue(bE[u])
242- let bH = bv(bF, bG, by, bz)
243- let bu = D(by, bF)
244- let bt = D(bz, bG)
245- let bI = D(bD, b)
246- let bJ = bs(bu, bI)
247- let bK = bs(bt, bI)
248-[bH, bJ, bK]
241+func bD (bz,bA,bE) = {
242+ let bF = aI()
243+ let bG = parseIntValue(bF[t])
244+ let bH = parseIntValue(bF[u])
245+ let bI = bw(bG, bH, bz, bA)
246+ let bv = D(bz, bG)
247+ let bu = D(bA, bH)
248+ let bJ = D(bE, b)
249+ let bK = bt(bv, bJ)
250+ let bL = bt(bu, bJ)
251+[bI, bK, bL]
249252 }
250253
251254
252-func bL (by,bz,bD) = {
253- let bM = bC(by, bz, bD)
254-[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
255+func bM (bz,bA,bE) = {
256+ let bN = bD(bz, bA, bE)
257+[G(bN[0], b), G(bN[1], b), G(bN[2], b)]
255258 }
256259
257260
258-func bN (bO,bP,bQ,X) = {
259- let bE = aH()
260- let bR = bE[q]
261- let bS = bE[r]
262- let bT = bE[s]
263- let bw = parseIntValue(bE[t])
264- let bx = parseIntValue(bE[u])
265- let bU = bE[p]
266- let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
267- if ((bR != bP))
261+func bO (bP,bQ,bR,Y) = {
262+ let bF = aI()
263+ let bS = bF[q]
264+ let bT = bF[r]
265+ let bU = bF[s]
266+ let bx = parseIntValue(bF[t])
267+ let by = parseIntValue(bF[u])
268+ let bV = bF[p]
269+ let bW = valueOrErrorMessage(assetInfo(fromBase58String(bS)), (("Asset " + bS) + " doesn't exist")).quantity
270+ if ((bS != bQ))
268271 then throw("Invalid asset passed.")
269272 else {
270- let bW = bq(bS)
271- let bX = D(bW, bw)
272- let bY = bq(bT)
273- let bZ = D(bY, bx)
274- let ca = bs(bZ, bX)
275- let cb = G(ca, b)
276- let cc = D(bQ, b)
277- let cd = D(bV, b)
278- let ce = fraction(bX, cc, cd)
279- let cf = fraction(bZ, cc, cd)
280- let cg = G(ce, bw)
273+ let bX = br(bT)
274+ let bY = D(bX, bx)
275+ let bZ = br(bU)
276+ let ca = D(bZ, by)
277+ let cb = bt(ca, bY)
278+ let cc = G(cb, b)
279+ let cd = D(bR, b)
280+ let ce = D(bW, b)
281+ let cf = fraction(bY, cd, ce)
282+ let cg = fraction(ca, cd, ce)
281283 let ch = G(cf, bx)
282- let ci = if ((bO == ""))
284+ let ci = G(cg, by)
285+ let cj = if ((bP == ""))
283286 then nil
284- else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
287+ else [ScriptTransfer(Y, ch, if ((bT == "WAVES"))
285288 then unit
286- else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
289+ else fromBase58String(bT)), ScriptTransfer(Y, ci, if ((bU == "WAVES"))
287290 then unit
288- else fromBase58String(bT)), StringEntry(Z(toString(X), bO), bm(cg, ch, bQ, cb, height, lastBlock.timestamp)), IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb)]
289- $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
291+ else fromBase58String(bU)), StringEntry(aa(toString(Y), bP), bn(ch, ci, bR, cc, height, lastBlock.timestamp)), IntegerEntry(T(), cc), IntegerEntry(U(height, lastBlock.timestamp), cc)]
292+ $Tuple10(ch, ci, bT, bU, bX, bZ, bW, cb, bV, cj)
290293 }
291294 }
292295
293296
294-func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
295- let bE = aH()
296- let bR = fromBase58String(bE[q])
297- let cr = bE[r]
298- let cs = bE[s]
299- let ct = bE[v]
300- let cu = bE[w]
301- let bF = parseIntValue(bE[t])
302- let bG = parseIntValue(bE[u])
303- let bU = bE[p]
304- let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
305- let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
306- let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
307- if (if ((cr != cv))
297+func ck (bP,cl,cm,cn,co,cp,Y,cq,cr) = {
298+ let bF = aI()
299+ let bS = fromBase58String(bF[q])
300+ let cs = bF[r]
301+ let ct = bF[s]
302+ let cu = bF[v]
303+ let cv = bF[w]
304+ let bG = parseIntValue(bF[t])
305+ let bH = parseIntValue(bF[u])
306+ let bV = bF[p]
307+ let bW = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
308+ let cw = toBase58String(valueOrElse(cn, fromBase58String("WAVES")))
309+ let cx = toBase58String(valueOrElse(cp, fromBase58String("WAVES")))
310+ if (if ((cs != cw))
308311 then true
309- else (cs != cw))
312+ else (ct != cx))
310313 then throw("Invalid amt or price asset passed.")
311314 else {
312- let bW = if (cp)
313- then bq(cr)
314- else (bq(cr) - cl)
315- let bY = if (cp)
316- then bq(cs)
317- else (bq(cs) - cn)
318- let cx = D(cl, bF)
319- let cy = D(cn, bG)
320- let cz = bs(cy, cx)
321- let bX = D(bW, bF)
322- let bZ = D(bY, bG)
323- let cA = if ((bV == 0))
315+ let bX = if (cq)
316+ then br(cs)
317+ else (br(cs) - cm)
318+ let bZ = if (cq)
319+ then br(ct)
320+ else (br(ct) - co)
321+ let cy = D(cm, bG)
322+ let cz = D(co, bH)
323+ let cA = bt(cz, cy)
324+ let bY = D(bX, bG)
325+ let ca = D(bZ, bH)
326+ let cB = if ((bW == 0))
324327 then {
325- let ca = e
326- let cB = e
327- let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
328- $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
328+ let cb = e
329+ let cC = e
330+ let bJ = pow((cy * cz), 0, toBigInt(5), 1, 0, DOWN)
331+ $Tuple5(G(bJ, b), G(cy, bG), G(cz, bH), bt((ca + cz), (bY + cy)), cC)
329332 }
330333 else {
331- let ca = bs(bZ, bX)
332- let cB = fraction(O((ca - cz)), d, ca)
333- let cC = D(ck, b)
334- if (if ((ca != e))
335- then (cB > cC)
334+ let cb = bt(ca, bY)
335+ let cC = fraction(O((cb - cA)), d, cb)
336+ let cD = D(cl, b)
337+ if (if ((cb != e))
338+ then (cC > cD)
336339 else false)
337- then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
340+ then throw(((("Price slippage " + toString(cC)) + " exceeded the passed limit of ") + toString(cD)))
338341 else {
339- let cd = D(bV, b)
340- let cD = fraction(cx, ca, d)
341- let cE = fraction(cy, d, ca)
342- let cF = if ((cD > cy))
343- then $Tuple2(cE, cy)
344- else $Tuple2(cx, cD)
345- let cG = cF._1
346- let cH = cF._2
347- let bI = fraction(cd, cH, bZ)
348- $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
342+ let ce = D(bW, b)
343+ let cE = fraction(cy, cb, d)
344+ let cF = fraction(cz, d, cb)
345+ let cG = if ((cE > cz))
346+ then $Tuple2(cF, cz)
347+ else $Tuple2(cy, cE)
348+ let cH = cG._1
349+ let cI = cG._2
350+ let bJ = fraction(ce, cI, ca)
351+ $Tuple5(G(bJ, b), G(cH, bG), G(cI, bH), cb, cC)
349352 }
350353 }
351- let cI = cA._1
352- let cJ = cA._2
353- let cK = cA._3
354- let cb = G(cA._4, b)
355- let cL = G(cA._5, b)
356- if ((0 >= cI))
354+ let cJ = cB._1
355+ let cK = cB._2
356+ let cL = cB._3
357+ let cc = G(cB._4, b)
358+ let cM = G(cB._5, b)
359+ if ((0 >= cJ))
357360 then throw("Invalid calculations. LP calculated is less than zero.")
358361 else {
359- let cM = if (!(cq))
362+ let cN = if (!(cr))
360363 then 0
361- else cI
362- let cN = (cl - cJ)
363- let cO = (cn - cK)
364- let cP = [IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb), StringEntry(W(X, bO), bb(cJ, cK, cM, cb, ck, cL, height, lastBlock.timestamp, cN, cO))]
365- $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
364+ else cJ
365+ let cO = (cm - cK)
366+ let cP = (co - cL)
367+ let cQ = [IntegerEntry(T(), cc), IntegerEntry(U(height, lastBlock.timestamp), cc), StringEntry(X(Y, bP), bc(cK, cL, cN, cc, cl, cM, height, lastBlock.timestamp, cO, cP))]
368+ $Tuple13(cJ, cN, cc, bX, bZ, bW, bS, bV, cQ, cO, cP, cn, cp)
366369 }
367370 }
368371 }
369372
370373
371-func cQ (cR) = {
372- let bE = aH()
373- let cS = bE[r]
374- let cT = bE[s]
375- let bU = parseIntValue(bE[p])
376- let bF = parseIntValue(bE[t])
377- let bG = parseIntValue(bE[u])
378- let cU = bq(cS)
379- let cV = bq(cT)
380- let ca = if ((cR.orderType == Buy))
381- then bv(bF, bG, (cU + cR.amount), cV)
382- else bv(bF, bG, (cU - cR.amount), cV)
383- let cb = G(ca, b)
384- if (if (if (aF())
374+func cR (cS) = {
375+ let bF = aI()
376+ let cT = bF[r]
377+ let cU = bF[s]
378+ let bV = parseIntValue(bF[p])
379+ let bG = parseIntValue(bF[t])
380+ let bH = parseIntValue(bF[u])
381+ let cV = br(cT)
382+ let cW = br(cU)
383+ let cb = if ((cS.orderType == Buy))
384+ then bw(bG, bH, (cV + cS.amount), cW)
385+ else bw(bG, bH, (cV - cS.amount), cW)
386+ let cc = G(cb, b)
387+ if (if (if (aG())
385388 then true
386- else (bU == m))
389+ else (bV == m))
387390 then true
388- else (bU == n))
391+ else (bV == n))
389392 then throw("Exchange operations disabled")
390393 else {
391- let cW = cR.assetPair.amountAsset
392- let cX = if ((cW == unit))
394+ let cX = cS.assetPair.amountAsset
395+ let cY = if ((cX == unit))
393396 then "WAVES"
394- else toBase58String(value(cW))
395- let cY = cR.assetPair.priceAsset
396- let cZ = if ((cY == unit))
397+ else toBase58String(value(cX))
398+ let cZ = cS.assetPair.priceAsset
399+ let da = if ((cZ == unit))
397400 then "WAVES"
398- else toBase58String(value(cY))
399- if (if ((cX != cS))
401+ else toBase58String(value(cZ))
402+ if (if ((cY != cT))
400403 then true
401- else (cZ != cT))
404+ else (da != cU))
402405 then throw("Wrong order assets.")
403406 else {
404- let da = cR.price
405- let db = fraction(b, bG, bF)
406- let dc = J(da, b, db)
407- let dd = if ((cR.orderType == Buy))
408- then (cb >= dc)
409- else (dc >= cb)
407+ let db = cS.price
408+ let dc = fraction(b, bH, bG)
409+ let dd = J(db, b, dc)
410+ let de = if ((cS.orderType == Buy))
411+ then (cc >= dd)
412+ else (dd >= cc)
410413 true
411414 }
412415 }
413416 }
414417
415418
416-func de (df) = if ((size(df.payments) != 1))
419+func df (dg) = if ((size(dg.payments) != 1))
417420 then throw("exactly 1 payment is expected")
418421 else {
419- let dg = value(df.payments[0])
420- let bP = value(dg.assetId)
421- let dh = dg.amount
422- let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
423- let cg = cA._1
424- let ch = cA._2
425- let bU = parseIntValue(cA._9)
426- let ci = cA._10
427- if (if (aF())
422+ let dh = value(dg.payments[0])
423+ let bQ = value(dh.assetId)
424+ let di = dh.amount
425+ let cB = bO(toBase58String(dg.transactionId), toBase58String(bQ), di, dg.caller)
426+ let ch = cB._1
427+ let ci = cB._2
428+ let bV = parseIntValue(cB._9)
429+ let cj = cB._10
430+ if (if (aG())
428431 then true
429- else (bU == n))
430- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
431- else $Tuple5(cg, ch, dh, bP, ci)
432+ else (bV == n))
433+ then throw(("Get operation is blocked by admin. Status = " + toString(bV)))
434+ else $Tuple5(ch, ci, di, bQ, cj)
432435 }
433436
434437
435-func di (df,ck,cq) = if ((size(df.payments) != 2))
438+func dj (dg,cl,cr) = if ((size(dg.payments) != 2))
436439 then throw("exactly 2 payments are expected")
437440 else {
438- let dj = value(df.payments[0])
439- let dk = value(df.payments[1])
440- let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
441- let bU = parseIntValue(dl._8)
442- if (if (if (aF())
441+ let dk = value(dg.payments[0])
442+ let dl = value(dg.payments[1])
443+ let dm = ck(toBase58String(dg.transactionId), cl, dk.amount, dk.assetId, dl.amount, dl.assetId, toString(dg.caller), false, cr)
444+ let bV = parseIntValue(dm._8)
445+ if (if (if (aG())
443446 then true
444- else (bU == l))
447+ else (bV == l))
445448 then true
446- else (bU == n))
447- then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
448- else dl
449+ else (bV == n))
450+ then throw(("Put operation is blocked by admin. Status = " + toString(bV)))
451+ else dm
449452 }
450453
451454
452-func dm (dn) = {
453- let do = invoke(aA, "emit", [dn], nil)
454- if ((do == do))
455+func dn (do) = {
456+ let dp = invoke(aB, "emit", [do], nil)
457+ if ((dp == dp))
455458 then {
456- let dp = {
457- let dq = do
458- if ($isInstanceOf(dq, "Address"))
459+ let dq = {
460+ let dr = dp
461+ if ($isInstanceOf(dr, "Address"))
459462 then {
460- let dr = dq
461- invoke(dr, "emit", [dn], nil)
463+ let ds = dr
464+ invoke(ds, "emit", [do], nil)
462465 }
463466 else unit
464467 }
465- if ((dp == dp))
466- then dn
468+ if ((dq == dq))
469+ then do
467470 else throw("Strict value is not equal to itself.")
468471 }
469472 else throw("Strict value is not equal to itself.")
470473 }
471474
472475
473-func ds (dn,dt) = {
474- let du = if ((dt == 0))
476+func dt (do,du) = {
477+ let dv = if ((du == 0))
475478 then 0
476- else fraction(dn, dt, b)
477- $Tuple2((dn - du), du)
479+ else fraction(do, du, b)
480+ $Tuple2((do - dv), dv)
478481 }
479482
480483
481-func dv (dw,dx,X,Y) = {
482- let dy = (Y == unit)
483- let dz = bq(aM(aU))
484- let dA = bq(aM(aV))
485- let dB = if ((dx == aU))
484+func dw (dx,dy,Y,Z) = {
485+ let dz = (Z == unit)
486+ let dA = br(aN(aV))
487+ let dB = br(aN(aW))
488+ let dC = if ((dy == aV))
486489 then true
487- else if ((dx == aV))
490+ else if ((dy == aW))
488491 then false
489- else ay("invalid asset")
490- let dC = if (dy)
491- then $Tuple2(dz, dA)
492- else if (dB)
493- then $Tuple2((dz - dw), dA)
494- else $Tuple2(dz, (dA - dw))
495- let dD = dC._1
496- let dE = dC._2
497- let dF = if (dB)
498- then $Tuple2(dw, 0)
499- else $Tuple2(0, dw)
500- let dG = dF._1
501- let dH = dF._2
502- let dI = ds(dG, aC)._1
503- let dJ = ds(dH, aC)._1
504- let dK = ds(dw, aC)
505- let dL = dK._1
506- let du = dK._2
507- let dM = (dD + dI)
492+ else az("invalid asset")
493+ let dD = if (dz)
494+ then $Tuple2(dA, dB)
495+ else if (dC)
496+ then $Tuple2((dA - dx), dB)
497+ else $Tuple2(dA, (dB - dx))
498+ let dE = dD._1
499+ let dF = dD._2
500+ let dG = if (dC)
501+ then $Tuple2(dx, 0)
502+ else $Tuple2(0, dx)
503+ let dH = dG._1
504+ let dI = dG._2
505+ let dJ = dt(dH, aD)._1
506+ let dK = dt(dI, aD)._1
507+ let dL = dt(dx, aD)
508+ let dM = dL._1
509+ let dv = dL._2
508510 let dN = (dE + dJ)
509- let dO = bs(D(dN, aX), D(dM, aW))
510- let dP = G(dO, b)
511- let dQ = if (dB)
512- then dD
513- else dE
514- let dR = toBigInt(dQ)
515- let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
516- let dT = if ((dS > f))
511+ let dO = (dF + dK)
512+ let dP = bt(D(dO, aY), D(dN, aX))
513+ let dQ = G(dP, b)
514+ let dR = if (dC)
515+ then dE
516+ else dF
517+ let dS = toBigInt(dR)
518+ let dT = toBigInt(valueOrErrorMessage(assetInfo(aU), (("asset " + toBase58String(aU)) + " doesn't exist")).quantity)
519+ let dU = if ((dT > f))
517520 then true
518- else ay("initial deposit requires all coins")
519- if ((dT == dT))
521+ else az("initial deposit requires all coins")
522+ if ((dU == dU))
520523 then {
521- let dU = toBigInt(dL)
522- let dV = max([0, toInt(((dS * (sqrtBigInt((d + ((dU * d) / dR)), 18, 18, DOWN) - d)) / d))])
523- let cP = if (dy)
524+ let dV = toBigInt(dM)
525+ let dW = max([0, toInt(((dT * (sqrtBigInt((d + ((dV * d) / dS)), 18, 18, DOWN) - d)) / d))])
526+ let cQ = if (dz)
524527 then nil
525- else [IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dG, dH, dV, dP, 0, 0, height, lastBlock.timestamp, 0, 0))]
526- let dW = bs(D(dE, aX), D(dD, aW))
527- let dX = G(dW, b)
528- let dY = {
529- let dZ = if (dB)
530- then $Tuple2(dG, dD)
531- else $Tuple2(dH, dE)
532- let dn = dZ._1
533- let ea = dZ._2
534- let eb = toInt(fraction(dS, toBigInt((dn / 2)), toBigInt(ea)))
535- fraction((dV - eb), b, eb)
528+ else [IntegerEntry(T(), dQ), IntegerEntry(U(height, lastBlock.timestamp), dQ), StringEntry(X(toString(value(Y)), toBase58String(value(Z))), bc(dH, dI, dW, dQ, 0, 0, height, lastBlock.timestamp, 0, 0))]
529+ let dX = bt(D(dF, aY), D(dE, aX))
530+ let dY = G(dX, b)
531+ let dZ = {
532+ let ea = if (dC)
533+ then $Tuple2(dH, dE)
534+ else $Tuple2(dI, dF)
535+ let do = ea._1
536+ let eb = ea._2
537+ let ec = toInt(fraction(dT, toBigInt((do / 2)), toBigInt(eb)))
538+ fraction((dW - ec), b, ec)
536539 }
537- $Tuple4(dV, cP, du, dY)
540+ $Tuple4(dW, cQ, dv, dZ)
538541 }
539542 else throw("Strict value is not equal to itself.")
540543 }
541544
542545
543-func ec (ed,dL,dx,X,Y) = {
544- let dy = (Y == unit)
545- let ee = [if ((dx == aT))
546+func ed (ee,dM,dy,Y,Z) = {
547+ let dz = (Z == unit)
548+ let ef = [if ((dy == aU))
546549 then true
547- else ay("invalid lp asset")]
548- if ((ee == ee))
550+ else az("invalid lp asset")]
551+ if ((ef == ef))
549552 then {
550- let ef = if ((ed == aU))
553+ let eg = if ((ee == aV))
551554 then true
552- else if ((ed == aV))
555+ else if ((ee == aW))
553556 then false
554- else ay("invalid asset")
555- let eg = if (ef)
556- then toBigInt(bq(aM(aU)))
557- else toBigInt(bq(aM(aV)))
558- let eh = bq(aM(aU))
559- let ei = bq(aM(aV))
560- let ej = if (ef)
561- then eh
562- else ei
563- let ek = toBigInt(ej)
564- let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
565- let el = toBigInt(dL)
566- let em = max([0, toInt(((eg * (d - pow((d - ((el * d) / dS)), 18, h, 0, 18, DOWN))) / d))])
567- let en = ds(em, aE)
568- let eo = en._1
569- let du = en._2
570- let ep = if (ef)
571- then $Tuple4(eo, 0, (eh - em), ei)
572- else $Tuple4(0, eo, eh, (ei - em))
573- let eq = ep._1
574- let er = ep._2
575- let es = ep._3
576- let et = ep._4
577- let dO = bs(D(et, aX), D(es, aW))
578- let dP = G(dO, b)
579- let cP = if (dy)
557+ else az("invalid asset")
558+ let eh = if (eg)
559+ then toBigInt(br(aN(aV)))
560+ else toBigInt(br(aN(aW)))
561+ let ei = br(aN(aV))
562+ let ej = br(aN(aW))
563+ let ek = if (eg)
564+ then ei
565+ else ej
566+ let el = toBigInt(ek)
567+ let dT = toBigInt(valueOrErrorMessage(assetInfo(aU), (("asset " + toBase58String(aU)) + " doesn't exist")).quantity)
568+ let em = toBigInt(dM)
569+ let en = max([0, toInt(((eh * (d - pow((d - ((em * d) / dT)), 18, h, 0, 18, DOWN))) / d))])
570+ let eo = dt(en, aF)
571+ let ep = eo._1
572+ let dv = eo._2
573+ let eq = if (eg)
574+ then $Tuple4(ep, 0, (ei - en), ej)
575+ else $Tuple4(0, ep, ei, (ej - en))
576+ let er = eq._1
577+ let es = eq._2
578+ let et = eq._3
579+ let eu = eq._4
580+ let dP = bt(D(eu, aY), D(et, aX))
581+ let dQ = G(dP, b)
582+ let cQ = if (dz)
580583 then nil
581- else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(eq, er, dL, dP, height, lastBlock.timestamp)), IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP)]
582- let dW = bs(D(ei, aX), D(eh, aW))
583- let dX = G(dW, b)
584- let dY = {
585- let eu = (toInt(fraction(eg, el, dS)) * 2)
586- fraction((eo - eu), b, eu)
584+ else [StringEntry(aa(toString(value(Y)), toBase58String(value(Z))), bn(er, es, dM, dQ, height, lastBlock.timestamp)), IntegerEntry(T(), dQ), IntegerEntry(U(height, lastBlock.timestamp), dQ)]
585+ let dX = bt(D(ej, aY), D(ei, aX))
586+ let dY = G(dX, b)
587+ let dZ = {
588+ let ev = (toInt(fraction(eh, em, dT)) * 2)
589+ fraction((ep - ev), b, ev)
587590 }
588- $Tuple4(eo, cP, du, dY)
591+ $Tuple4(ep, cQ, dv, dZ)
589592 }
590593 else throw("Strict value is not equal to itself.")
591594 }
592595
593596
594-func ev () = {
595- let dq = getString(Q())
596- if ($isInstanceOf(dq, "String"))
597+func ew () = {
598+ let dr = getString(R())
599+ if ($isInstanceOf(dr, "String"))
597600 then {
598- let ew = dq
599- fromBase58String(ew)
601+ let ex = dr
602+ fromBase58String(ex)
600603 }
601- else if ($isInstanceOf(dq, "Unit"))
604+ else if ($isInstanceOf(dr, "Unit"))
602605 then unit
603606 else throw("Match error")
604607 }
605608
606609
607-func ex () = {
608- let dq = getString(R())
609- if ($isInstanceOf(dq, "String"))
610+func ey () = {
611+ let dr = getString(S())
612+ if ($isInstanceOf(dr, "String"))
610613 then {
611- let ew = dq
612- fromBase58String(ew)
614+ let ex = dr
615+ fromBase58String(ex)
613616 }
614- else if ($isInstanceOf(dq, "Unit"))
617+ else if ($isInstanceOf(dr, "Unit"))
615618 then unit
616619 else throw("Match error")
617620 }
618621
619622
620-func ey (df) = {
621- let dq = ev()
622- if ($isInstanceOf(dq, "ByteVector"))
623+func ez (dg) = {
624+ let dr = ew()
625+ if ($isInstanceOf(dr, "ByteVector"))
623626 then {
624- let ez = dq
625- (df.callerPublicKey == ez)
627+ let eA = dr
628+ (dg.callerPublicKey == eA)
626629 }
627- else if ($isInstanceOf(dq, "Unit"))
628- then (df.caller == this)
630+ else if ($isInstanceOf(dr, "Unit"))
631+ then (dg.caller == this)
629632 else throw("Match error")
630633 }
631634
632635
633-func eA (df) = {
634- let eB = throw("Permission denied")
635- let dq = ev()
636- if ($isInstanceOf(dq, "ByteVector"))
636+func eB (dg) = {
637+ let eC = throw("Permission denied")
638+ let dr = ew()
639+ if ($isInstanceOf(dr, "ByteVector"))
637640 then {
638- let ez = dq
639- if ((df.callerPublicKey == ez))
641+ let eA = dr
642+ if ((dg.callerPublicKey == eA))
640643 then true
641- else eB
644+ else eC
642645 }
643- else if ($isInstanceOf(dq, "Unit"))
644- then if ((df.caller == this))
646+ else if ($isInstanceOf(dr, "Unit"))
647+ then if ((dg.caller == this))
645648 then true
646- else eB
649+ else eC
647650 else throw("Match error")
648651 }
649652
650653
651-@Callable(df)
652-func setManager (eC) = {
653- let eD = eA(df)
654- if ((eD == eD))
654+@Callable(dg)
655+func calculateAmountOutForSwapAndSendTokens (eD,eE,eF,eG) = {
656+ let ef = [if ((value(dg.payments[0]).amount >= eD))
657+ then true
658+ else az("Wrong amount"), if ((dg.caller == addressFromStringValue(av(this, P()))))
659+ then true
660+ else az("Permission denied")]
661+ if ((ef == ef))
655662 then {
656- let eE = fromBase58String(eC)
657- if ((eE == eE))
658- then [StringEntry(R(), eC)]
663+ let dh = value(dg.payments[0])
664+ let eH = toBase58String(value(dh.assetId))
665+ let eI = if ((eE == false))
666+ then {
667+ let eI = av(this, ac())
668+ eI
669+ }
670+ else {
671+ let eI = av(this, ab())
672+ eI
673+ }
674+ let eJ = (br(eH) - value(dg.payments[0]).amount)
675+ let eK = br(eI)
676+ let eL = ((eK * eD) / (eJ + eD))
677+ let eM = [(eL >= eF), "Exchange resulted in fewer coins than expected"]
678+ if ((eM == eM))
679+ then [ScriptTransfer(addressFromStringValue(eG), eL, fromBase58String(eI))]
659680 else throw("Strict value is not equal to itself.")
660681 }
661682 else throw("Strict value is not equal to itself.")
663684
664685
665686
666-@Callable(df)
667-func confirmManager () = {
668- let eF = ex()
669- let eG = if (isDefined(eF))
670- then true
671- else throw("No pending manager")
672- if ((eG == eG))
687+@Callable(dg)
688+func setSwapContract (eN) = {
689+ let eO = eB(dg)
690+ if ((eO == eO))
691+ then [StringEntry(P(), eN)]
692+ else throw("Strict value is not equal to itself.")
693+ }
694+
695+
696+
697+@Callable(dg)
698+func setManager (eP) = {
699+ let eO = eB(dg)
700+ if ((eO == eO))
673701 then {
674- let eH = if ((df.callerPublicKey == value(eF)))
675- then true
676- else throw("You are not pending manager")
677- if ((eH == eH))
678- then [StringEntry(Q(), toBase58String(value(eF))), DeleteEntry(R())]
702+ let eQ = fromBase58String(eP)
703+ if ((eQ == eQ))
704+ then [StringEntry(S(), eP)]
679705 else throw("Strict value is not equal to itself.")
680706 }
681707 else throw("Strict value is not equal to itself.")
683709
684710
685711
686-@Callable(df)
687-func put (ck,eI) = if ((0 > ck))
712+@Callable(dg)
713+func confirmManager () = {
714+ let eR = ey()
715+ let eS = if (isDefined(eR))
716+ then true
717+ else throw("No pending manager")
718+ if ((eS == eS))
719+ then {
720+ let eT = if ((dg.callerPublicKey == value(eR)))
721+ then true
722+ else throw("You are not pending manager")
723+ if ((eT == eT))
724+ then [StringEntry(R(), toBase58String(value(eR))), DeleteEntry(S())]
725+ else throw("Strict value is not equal to itself.")
726+ }
727+ else throw("Strict value is not equal to itself.")
728+ }
729+
730+
731+
732+@Callable(dg)
733+func put (cl,eU) = if ((0 > cl))
688734 then throw("Invalid slippageTolerance passed")
689735 else {
690- let dl = di(df, ck, true)
691- let cM = dl._2
692- let bR = dl._7
693- let ci = dl._9
694- let cN = dl._10
695- let cO = dl._11
696- let eJ = dl._12
697- let eK = dl._13
698- let do = invoke(aA, "emit", [cM], nil)
699- if ((do == do))
736+ let dm = dj(dg, cl, true)
737+ let cN = dm._2
738+ let bS = dm._7
739+ let cj = dm._9
740+ let cO = dm._10
741+ let cP = dm._11
742+ let eV = dm._12
743+ let eW = dm._13
744+ let dp = invoke(aB, "emit", [cN], nil)
745+ if ((dp == dp))
700746 then {
701- let dp = {
702- let dq = do
703- if ($isInstanceOf(dq, "Address"))
747+ let dq = {
748+ let dr = dp
749+ if ($isInstanceOf(dr, "Address"))
704750 then {
705- let dr = dq
706- invoke(dr, "emit", [cM], nil)
751+ let ds = dr
752+ invoke(ds, "emit", [cN], nil)
707753 }
708754 else unit
709755 }
710- if ((dp == dp))
756+ if ((dq == dq))
711757 then {
712- let eL = if ((cN > 0))
713- then invoke(ba, "put", nil, [AttachedPayment(eJ, cN)])
758+ let eX = if ((cO > 0))
759+ then invoke(bb, "put", nil, [AttachedPayment(eV, cO)])
714760 else nil
715- if ((eL == eL))
761+ if ((eX == eX))
716762 then {
717- let eM = if ((cO > 0))
718- then invoke(ba, "put", nil, [AttachedPayment(eK, cO)])
763+ let eY = if ((cP > 0))
764+ then invoke(bb, "put", nil, [AttachedPayment(eW, cP)])
719765 else nil
720- if ((eM == eM))
766+ if ((eY == eY))
721767 then {
722- let eN = if (eI)
768+ let eZ = if (eU)
723769 then {
724- let eO = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
725- if ((eO == eO))
770+ let fa = invoke(ba, "stake", nil, [AttachedPayment(bS, cN)])
771+ if ((fa == fa))
726772 then nil
727773 else throw("Strict value is not equal to itself.")
728774 }
729- else [ScriptTransfer(df.caller, cM, bR)]
730- (ci ++ eN)
775+ else [ScriptTransfer(dg.caller, cN, bS)]
776+ (cj ++ eZ)
731777 }
732778 else throw("Strict value is not equal to itself.")
733779 }
740786
741787
742788
743-@Callable(df)
744-func putForFree (eP) = if ((0 > eP))
789+@Callable(dg)
790+func putForFree (fb) = if ((0 > fb))
745791 then throw("Invalid value passed")
746792 else {
747- let dl = di(df, eP, false)
748- dl._9
793+ let dm = dj(dg, fb, false)
794+ dm._9
749795 }
750796
751797
752798
753-@Callable(df)
754-func putOneTkn (eQ,eR) = {
755- let eS = {
756- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
757- if ($isInstanceOf(aD, "Boolean"))
758- then aD
759- else throw(($getType(aD) + " couldn't be cast to Boolean"))
799+@Callable(dg)
800+func putOneTkn (fc,fd) = {
801+ let fe = {
802+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
803+ if ($isInstanceOf(aE, "Boolean"))
804+ then aE
805+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
760806 }
761- let eT = if (if (if (aF())
807+ let ff = if (if (if (aG())
762808 then true
763- else (aS == l))
809+ else (aT == l))
764810 then true
765- else (aS == n))
811+ else (aT == n))
766812 then true
767- else eS
768- let ee = [if (if (!(eT))
813+ else fe
814+ let ef = [if (if (!(ff))
769815 then true
770- else ey(df))
816+ else ez(dg))
771817 then true
772- else ay("put operation is blocked by admin"), if ((size(df.payments) == 1))
818+ else az("put operation is blocked by admin"), if ((size(dg.payments) == 1))
773819 then true
774- else ay("exactly 1 payment are expected")]
775- if ((ee == ee))
820+ else az("exactly 1 payment are expected")]
821+ if ((ef == ef))
776822 then {
777- let eU = df.payments[0]
778- let dx = eU.assetId
779- let dw = eU.amount
780- let X = df.caller
781- let Y = df.transactionId
782- let eV = dv(dw, dx, X, Y)
783- if ((eV == eV))
823+ let fg = dg.payments[0]
824+ let dy = fg.assetId
825+ let dx = fg.amount
826+ let Y = dg.caller
827+ let Z = dg.transactionId
828+ let fh = dw(dx, dy, Y, Z)
829+ if ((fh == fh))
784830 then {
785- let eW = eV._4
786- let du = eV._3
787- let cP = eV._2
788- let eX = eV._1
789- let eY = if (if ((eQ > 0))
790- then (eQ > eX)
831+ let fi = fh._4
832+ let dv = fh._3
833+ let cQ = fh._2
834+ let fj = fh._1
835+ let fk = if (if ((fc > 0))
836+ then (fc > fj)
791837 else false)
792- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
793- else eX
794- let do = dm(eY)
795- if ((do == do))
838+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
839+ else fj
840+ let dp = dn(fk)
841+ if ((dp == dp))
796842 then {
797- let eN = if (eR)
843+ let eZ = if (fd)
798844 then {
799- let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
800- if ((eZ == eZ))
845+ let fl = invoke(ba, "stake", nil, [AttachedPayment(aU, fk)])
846+ if ((fl == fl))
801847 then nil
802848 else throw("Strict value is not equal to itself.")
803849 }
804- else [ScriptTransfer(df.caller, eY, aT)]
805- let fa = if ((du > 0))
806- then [ScriptTransfer(aB, du, dx)]
850+ else [ScriptTransfer(dg.caller, fk, aU)]
851+ let fm = if ((dv > 0))
852+ then [ScriptTransfer(aC, dv, dy)]
807853 else nil
808- $Tuple2(((cP ++ eN) ++ fa), eY)
854+ $Tuple2(((cQ ++ eZ) ++ fm), fk)
809855 }
810856 else throw("Strict value is not equal to itself.")
811857 }
816862
817863
818864
819-@Callable(df)
820-func putOneTknREADONLY (dx,dw) = {
821- let fb = dv(dw, aK(dx), unit, unit)
822- let eX = fb._1
823- let cP = fb._2
824- let du = fb._3
825- let eW = fb._4
826- $Tuple2(nil, $Tuple3(eX, du, eW))
865+@Callable(dg)
866+func putOneTknREADONLY (dy,dx) = {
867+ let fn = dw(dx, aL(dy), unit, unit)
868+ let fj = fn._1
869+ let cQ = fn._2
870+ let dv = fn._3
871+ let fi = fn._4
872+ $Tuple2(nil, $Tuple3(fj, dv, fi))
827873 }
828874
829875
830876
831-@Callable(df)
832-func getOneTkn (fc,eQ) = {
833- let eS = {
834- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
835- if ($isInstanceOf(aD, "Boolean"))
836- then aD
837- else throw(($getType(aD) + " couldn't be cast to Boolean"))
877+@Callable(dg)
878+func getOneTkn (fo,fc) = {
879+ let fe = {
880+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
881+ if ($isInstanceOf(aE, "Boolean"))
882+ then aE
883+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
838884 }
839- let fd = if (if (aF())
885+ let fp = if (if (aG())
840886 then true
841- else (aS == n))
887+ else (aT == n))
842888 then true
843- else eS
844- let ee = [if (if (!(fd))
889+ else fe
890+ let ef = [if (if (!(fp))
845891 then true
846- else ey(df))
892+ else ez(dg))
847893 then true
848- else ay("get operation is blocked by admin"), if ((size(df.payments) == 1))
894+ else az("get operation is blocked by admin"), if ((size(dg.payments) == 1))
849895 then true
850- else ay("exactly 1 payment are expected")]
851- if ((ee == ee))
896+ else az("exactly 1 payment are expected")]
897+ if ((ef == ef))
852898 then {
853- let ed = aK(fc)
854- let eU = df.payments[0]
855- let dx = eU.assetId
856- let dL = eU.amount
857- let X = df.caller
858- let Y = df.transactionId
859- let fe = ec(ed, dL, dx, X, Y)
860- if ((fe == fe))
899+ let ee = aL(fo)
900+ let fg = dg.payments[0]
901+ let dy = fg.assetId
902+ let dM = fg.amount
903+ let Y = dg.caller
904+ let Z = dg.transactionId
905+ let fq = ed(ee, dM, dy, Y, Z)
906+ if ((fq == fq))
861907 then {
862- let eW = fe._4
863- let du = fe._3
864- let cP = fe._2
865- let ff = fe._1
866- let dn = if (if ((eQ > 0))
867- then (eQ > ff)
908+ let fi = fq._4
909+ let dv = fq._3
910+ let cQ = fq._2
911+ let fr = fq._1
912+ let do = if (if ((fc > 0))
913+ then (fc > fr)
868914 else false)
869- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
870- else ff
871- let fg = invoke(aA, "burn", [dL], [AttachedPayment(dx, dL)])
872- if ((fg == fg))
915+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
916+ else fr
917+ let fs = invoke(aB, "burn", [dM], [AttachedPayment(dy, dM)])
918+ if ((fs == fs))
873919 then {
874- let fh = [ScriptTransfer(X, dn, ed)]
875- let fa = if ((du > 0))
876- then [ScriptTransfer(aB, du, ed)]
920+ let ft = [ScriptTransfer(Y, do, ee)]
921+ let fm = if ((dv > 0))
922+ then [ScriptTransfer(aC, dv, ee)]
877923 else nil
878- $Tuple2(((cP ++ fh) ++ fa), dn)
924+ $Tuple2(((cQ ++ ft) ++ fm), do)
879925 }
880926 else throw("Strict value is not equal to itself.")
881927 }
886932
887933
888934
889-@Callable(df)
890-func getOneTknREADONLY (ed,dL) = {
891- let fi = ec(aK(ed), dL, aT, unit, unit)
892- let ff = fi._1
893- let cP = fi._2
894- let du = fi._3
895- let eW = fi._4
896- $Tuple2(nil, $Tuple3(ff, du, eW))
935+@Callable(dg)
936+func getOneTknREADONLY (ee,dM) = {
937+ let fu = ed(aL(ee), dM, aU, unit, unit)
938+ let fr = fu._1
939+ let cQ = fu._2
940+ let dv = fu._3
941+ let fi = fu._4
942+ $Tuple2(nil, $Tuple3(fr, dv, fi))
897943 }
898944
899945
900946
901-@Callable(df)
902-func unstakeAndGetOneTkn (fj,fc,eQ) = {
903- let eS = {
904- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
905- if ($isInstanceOf(aD, "Boolean"))
906- then aD
907- else throw(($getType(aD) + " couldn't be cast to Boolean"))
947+@Callable(dg)
948+func unstakeAndGetOneTkn (fv,fo,fc) = {
949+ let fe = {
950+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
951+ if ($isInstanceOf(aE, "Boolean"))
952+ then aE
953+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
908954 }
909- let fd = if (if (aF())
955+ let fp = if (if (aG())
910956 then true
911- else (aS == n))
957+ else (aT == n))
912958 then true
913- else eS
914- let ee = [if (if (!(fd))
959+ else fe
960+ let ef = [if (if (!(fp))
915961 then true
916- else ey(df))
962+ else ez(dg))
917963 then true
918- else ay("get operation is blocked by admin"), if ((size(df.payments) == 0))
964+ else az("get operation is blocked by admin"), if ((size(dg.payments) == 0))
919965 then true
920- else ay("no payments are expected")]
921- if ((ee == ee))
966+ else az("no payments are expected")]
967+ if ((ef == ef))
922968 then {
923- let ed = aK(fc)
924- let X = df.caller
925- let Y = df.transactionId
926- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
927- if ((fk == fk))
969+ let ee = aL(fo)
970+ let Y = dg.caller
971+ let Z = dg.transactionId
972+ let fw = invoke(ba, "unstake", [toBase58String(aU), fv], nil)
973+ if ((fw == fw))
928974 then {
929- let fl = ec(ed, fj, aT, X, Y)
930- if ((fl == fl))
975+ let fx = ed(ee, fv, aU, Y, Z)
976+ if ((fx == fx))
931977 then {
932- let eW = fl._4
933- let du = fl._3
934- let cP = fl._2
935- let ff = fl._1
936- let dn = if (if ((eQ > 0))
937- then (eQ > ff)
978+ let fi = fx._4
979+ let dv = fx._3
980+ let cQ = fx._2
981+ let fr = fx._1
982+ let do = if (if ((fc > 0))
983+ then (fc > fr)
938984 else false)
939- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
940- else ff
941- let fg = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
942- if ((fg == fg))
985+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
986+ else fr
987+ let fs = invoke(aB, "burn", [fv], [AttachedPayment(aU, fv)])
988+ if ((fs == fs))
943989 then {
944- let fh = [ScriptTransfer(df.caller, dn, ed)]
945- let fa = if ((du > 0))
946- then [ScriptTransfer(aB, du, ed)]
990+ let ft = [ScriptTransfer(dg.caller, do, ee)]
991+ let fm = if ((dv > 0))
992+ then [ScriptTransfer(aC, dv, ee)]
947993 else nil
948- $Tuple2(((cP ++ fh) ++ fa), dn)
994+ $Tuple2(((cQ ++ ft) ++ fm), do)
949995 }
950996 else throw("Strict value is not equal to itself.")
951997 }
9581004
9591005
9601006
961-@Callable(df)
1007+@Callable(dg)
9621008 func get () = {
963- let cA = de(df)
964- let fm = cA._1
965- let ch = cA._2
966- let dh = cA._3
967- let bP = cA._4
968- let ci = cA._5
969- let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
970- if ((fn == fn))
971- then ci
1009+ let cB = df(dg)
1010+ let fy = cB._1
1011+ let ci = cB._2
1012+ let di = cB._3
1013+ let bQ = cB._4
1014+ let cj = cB._5
1015+ let fz = invoke(aB, "burn", [di], [AttachedPayment(bQ, di)])
1016+ if ((fz == fz))
1017+ then cj
9721018 else throw("Strict value is not equal to itself.")
9731019 }
9741020
9751021
9761022
977-@Callable(df)
978-func getNoLess (fo,fp) = {
979- let cA = de(df)
980- let cg = cA._1
981- let ch = cA._2
982- let dh = cA._3
983- let bP = cA._4
984- let ci = cA._5
985- if ((fo > cg))
986- then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo)))
987- else if ((fp > ch))
988- then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp)))
1023+@Callable(dg)
1024+func getNoLess (fA,fB) = {
1025+ let cB = df(dg)
1026+ let ch = cB._1
1027+ let ci = cB._2
1028+ let di = cB._3
1029+ let bQ = cB._4
1030+ let cj = cB._5
1031+ if ((fA > ch))
1032+ then throw(((("noLessThenAmtAsset failed: " + toString(ch)) + " < ") + toString(fA)))
1033+ else if ((fB > ci))
1034+ then throw(((("noLessThenPriceAsset failed: " + toString(ci)) + " < ") + toString(fB)))
9891035 else {
990- let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
991- if ((fn == fn))
992- then ci
1036+ let fz = invoke(aB, "burn", [di], [AttachedPayment(bQ, di)])
1037+ if ((fz == fz))
1038+ then cj
9931039 else throw("Strict value is not equal to itself.")
9941040 }
9951041 }
9961042
9971043
9981044
999-@Callable(df)
1000-func unstakeAndGet (dn) = {
1001- let fq = if ((size(df.payments) != 0))
1045+@Callable(dg)
1046+func unstakeAndGet (do) = {
1047+ let fC = if ((size(dg.payments) != 0))
10021048 then throw("No payments are expected")
10031049 else true
1004- if ((fq == fq))
1050+ if ((fC == fC))
10051051 then {
1006- let bE = aH()
1007- let bR = fromBase58String(bE[q])
1008- let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
1009- if ((fk == fk))
1052+ let bF = aI()
1053+ let bS = fromBase58String(bF[q])
1054+ let fw = invoke(ba, "unstake", [toBase58String(bS), do], nil)
1055+ if ((fw == fw))
10101056 then {
1011- let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
1012- let bU = parseIntValue(cA._9)
1013- let ci = cA._10
1014- let fr = if (if (aF())
1057+ let cB = bO(toBase58String(dg.transactionId), toBase58String(bS), do, dg.caller)
1058+ let bV = parseIntValue(cB._9)
1059+ let cj = cB._10
1060+ let fD = if (if (aG())
10151061 then true
1016- else (bU == n))
1017- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
1062+ else (bV == n))
1063+ then throw(("Get operation is blocked by admin. Status = " + toString(bV)))
10181064 else true
1019- if ((fr == fr))
1065+ if ((fD == fD))
10201066 then {
1021- let fn = invoke(aA, "burn", [dn], [AttachedPayment(bR, dn)])
1022- if ((fn == fn))
1023- then ci
1067+ let fz = invoke(aB, "burn", [do], [AttachedPayment(bS, do)])
1068+ if ((fz == fz))
1069+ then cj
10241070 else throw("Strict value is not equal to itself.")
10251071 }
10261072 else throw("Strict value is not equal to itself.")
10321078
10331079
10341080
1035-@Callable(df)
1036-func unstakeAndGetNoLess (fj,fs,fp) = {
1037- let fd = if (aF())
1081+@Callable(dg)
1082+func unstakeAndGetNoLess (fv,fE,fB) = {
1083+ let fp = if (aG())
10381084 then true
1039- else (aS == n)
1040- let ee = [if (!(fd))
1085+ else (aT == n)
1086+ let ef = [if (!(fp))
10411087 then true
1042- else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
1088+ else throw("get operation is blocked by admin"), if ((size(dg.payments) == 0))
10431089 then true
10441090 else throw("no payments are expected")]
1045- if ((ee == ee))
1091+ if ((ef == ef))
10461092 then {
1047- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1048- if ((fk == fk))
1093+ let fw = invoke(ba, "unstake", [toBase58String(aU), fv], nil)
1094+ if ((fw == fw))
10491095 then {
1050- let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller)
1051- let cg = cA._1
1052- let ch = cA._2
1053- let ci = cA._10
1054- let ft = [if ((cg >= fs))
1096+ let cB = bO(toBase58String(dg.transactionId), toBase58String(aU), fv, dg.caller)
1097+ let ch = cB._1
1098+ let ci = cB._2
1099+ let cj = cB._10
1100+ let fF = [if ((ch >= fE))
10551101 then true
1056- else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
1102+ else throw(makeString(["amount asset amount to receive is less than ", toString(fE)], "")), if ((ci >= fB))
10571103 then true
1058- else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1059- if ((ft == ft))
1104+ else throw(makeString(["price asset amount to receive is less than ", toString(fB)], ""))]
1105+ if ((fF == fF))
10601106 then {
1061- let fn = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
1062- if ((fn == fn))
1063- then ci
1107+ let fz = invoke(aB, "burn", [fv], [AttachedPayment(aU, fv)])
1108+ if ((fz == fz))
1109+ then cj
10641110 else throw("Strict value is not equal to itself.")
10651111 }
10661112 else throw("Strict value is not equal to itself.")
10721118
10731119
10741120
1075-@Callable(df)
1076-func activate (fu,fv) = if ((toString(df.caller) != toString(aA)))
1121+@Callable(dg)
1122+func activate (fG,fH) = if ((toString(dg.caller) != toString(aB)))
10771123 then throw("permissions denied")
1078- else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
1124+ else $Tuple2([StringEntry(ab(), fG), StringEntry(ac(), fH)], "success")
10791125
10801126
10811127
1082-@Callable(df)
1083-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
1128+@Callable(dg)
1129+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aI())
10841130
10851131
10861132
1087-@Callable(df)
1088-func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
1133+@Callable(dg)
1134+func getAccBalanceWrapperREADONLY (bs) = $Tuple2(nil, br(bs))
10891135
10901136
10911137
1092-@Callable(df)
1093-func calcPricesWrapperREADONLY (by,bz,bD) = {
1094- let bM = bC(by, bz, bD)
1095- $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
1138+@Callable(dg)
1139+func calcPricesWrapperREADONLY (bz,bA,bE) = {
1140+ let bN = bD(bz, bA, bE)
1141+ $Tuple2(nil, [toString(bN[0]), toString(bN[1]), toString(bN[2])])
10961142 }
10971143
10981144
10991145
1100-@Callable(df)
1146+@Callable(dg)
11011147 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
11021148
11031149
11041150
1105-@Callable(df)
1151+@Callable(dg)
11061152 func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
11071153
11081154
11091155
1110-@Callable(df)
1111-func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
1156+@Callable(dg)
1157+func calcPriceBigIntWrapperREADONLY (bu,bv) = $Tuple2(nil, toString(bt(parseBigIntValue(bu), parseBigIntValue(bv))))
11121158
11131159
11141160
1115-@Callable(df)
1116-func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
1161+@Callable(dg)
1162+func estimatePutOperationWrapperREADONLY (bP,cl,cm,cn,co,cp,Y,cq,cr) = $Tuple2(nil, ck(bP, cl, cm, cn, co, cp, Y, cq, cr))
11171163
11181164
11191165
1120-@Callable(df)
1121-func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1122- let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1123- $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
1166+@Callable(dg)
1167+func estimateGetOperationWrapperREADONLY (bP,bQ,bR,Y) = {
1168+ let cB = bO(bP, bQ, bR, addressFromStringValue(Y))
1169+ $Tuple2(nil, $Tuple10(cB._1, cB._2, cB._3, cB._4, cB._5, cB._6, cB._7, toString(cB._8), cB._9, cB._10))
11241170 }
11251171
11261172
11271173
1128-@Callable(df)
1174+@Callable(dg)
11291175 func statsREADONLY () = {
1130- let bE = aH()
1131- let bR = fromBase58String(bE[q])
1132- let cS = bE[r]
1133- let cT = bE[s]
1134- let ct = bE[v]
1135- let cu = bE[w]
1136- let bF = parseIntValue(bE[t])
1137- let bG = parseIntValue(bE[u])
1138- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1139- let cU = bq(cS)
1140- let cV = bq(cT)
1141- let fx = if ((fw == 0))
1176+ let bF = aI()
1177+ let bS = fromBase58String(bF[q])
1178+ let cT = bF[r]
1179+ let cU = bF[s]
1180+ let cu = bF[v]
1181+ let cv = bF[w]
1182+ let bG = parseIntValue(bF[t])
1183+ let bH = parseIntValue(bF[u])
1184+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1185+ let cV = br(cT)
1186+ let cW = br(cU)
1187+ let fJ = if ((fI == 0))
11421188 then [e, e, e]
1143- else bC(cU, cV, fw)
1144- let cb = 0
1145- let fy = G(fx[1], b)
1146- let fz = G(fx[2], b)
1147- let fA = value(getInteger(aA, am(toString(this))))
1148- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fw), toString(cb), toString(fy), toString(fz), toString(fA)], j))
1189+ else bD(cV, cW, fI)
1190+ let cc = 0
1191+ let fK = G(fJ[1], b)
1192+ let fL = G(fJ[2], b)
1193+ let fM = value(getInteger(aB, an(toString(this))))
1194+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cV), toString(cW), toString(fI), toString(cc), toString(fK), toString(fL), toString(fM)], j))
11491195 }
11501196
11511197
11521198
1153-@Callable(df)
1154-func evaluatePutByAmountAssetREADONLY (cl) = {
1155- let bE = aH()
1156- let bR = fromBase58String(bE[q])
1157- let cr = bE[r]
1158- let bS = fromBase58String(cr)
1159- let cs = bE[s]
1199+@Callable(dg)
1200+func evaluatePutByAmountAssetREADONLY (cm) = {
1201+ let bF = aI()
1202+ let bS = fromBase58String(bF[q])
1203+ let cs = bF[r]
11601204 let bT = fromBase58String(cs)
1161- let bF = parseIntValue(bE[t])
1162- let bG = parseIntValue(bE[u])
1163- let bU = bE[p]
1164- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1165- let cU = bq(cr)
1166- let cV = bq(cs)
1167- let bA = D(cU, bF)
1205+ let ct = bF[s]
1206+ let bU = fromBase58String(ct)
1207+ let bG = parseIntValue(bF[t])
1208+ let bH = parseIntValue(bF[u])
1209+ let bV = bF[p]
1210+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1211+ let cV = br(cs)
1212+ let cW = br(ct)
11681213 let bB = D(cV, bG)
1169- let ca = if ((fw == 0))
1214+ let bC = D(cW, bH)
1215+ let cb = if ((fI == 0))
11701216 then e
1171- else bs(bB, bA)
1172- let cx = D(cl, bF)
1173- let cy = fraction(cx, ca, d)
1174- let cn = G(cy, bG)
1175- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1176- let cI = dl._1
1177- let fB = dl._3
1178- let bW = dl._4
1179- let bY = dl._5
1180- let bV = dl._6
1181- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1217+ else bt(bC, bB)
1218+ let cy = D(cm, bG)
1219+ let cz = fraction(cy, cb, d)
1220+ let co = G(cz, bH)
1221+ let dm = ck("", 500000, cm, bT, co, bU, "", true, false)
1222+ let cJ = dm._1
1223+ let fN = dm._3
1224+ let bX = dm._4
1225+ let bZ = dm._5
1226+ let bW = dm._6
1227+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cJ), toString(G(cb, b)), toString(bX), toString(bZ), toString(bW), bV, toString(cm), toString(co)], j))
11821228 }
11831229
11841230
11851231
1186-@Callable(df)
1187-func evaluatePutByPriceAssetREADONLY (cn) = {
1188- let bE = aH()
1189- let bR = fromBase58String(bE[q])
1190- let cr = bE[r]
1191- let bS = fromBase58String(cr)
1192- let cs = bE[s]
1232+@Callable(dg)
1233+func evaluatePutByPriceAssetREADONLY (co) = {
1234+ let bF = aI()
1235+ let bS = fromBase58String(bF[q])
1236+ let cs = bF[r]
11931237 let bT = fromBase58String(cs)
1194- let bF = parseIntValue(bE[t])
1195- let bG = parseIntValue(bE[u])
1196- let bU = bE[p]
1197- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1198- let fC = bq(cr)
1199- let fD = bq(cs)
1200- let fE = D(fC, bF)
1201- let fF = D(fD, bG)
1202- let ca = if ((fw == 0))
1238+ let ct = bF[s]
1239+ let bU = fromBase58String(ct)
1240+ let bG = parseIntValue(bF[t])
1241+ let bH = parseIntValue(bF[u])
1242+ let bV = bF[p]
1243+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1244+ let fO = br(cs)
1245+ let fP = br(ct)
1246+ let fQ = D(fO, bG)
1247+ let fR = D(fP, bH)
1248+ let cb = if ((fI == 0))
12031249 then e
1204- else bs(fF, fE)
1205- let cy = D(cn, bG)
1206- let cx = fraction(cy, d, ca)
1207- let cl = G(cx, bF)
1208- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1209- let cI = dl._1
1210- let fB = dl._3
1211- let bW = dl._4
1212- let bY = dl._5
1213- let bV = dl._6
1214- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1250+ else bt(fR, fQ)
1251+ let cz = D(co, bH)
1252+ let cy = fraction(cz, d, cb)
1253+ let cm = G(cy, bG)
1254+ let dm = ck("", 500000, cm, bT, co, bU, "", true, false)
1255+ let cJ = dm._1
1256+ let fN = dm._3
1257+ let bX = dm._4
1258+ let bZ = dm._5
1259+ let bW = dm._6
1260+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cJ), toString(G(cb, b)), toString(bX), toString(bZ), toString(bW), bV, toString(cm), toString(co)], j))
12151261 }
12161262
12171263
12181264
1219-@Callable(df)
1220-func evaluateGetREADONLY (fG,fH) = {
1221- let cA = bN("", fG, fH, this)
1222- let cg = cA._1
1223- let ch = cA._2
1224- let bW = cA._5
1225- let bY = cA._6
1226- let bV = cA._7
1227- let cb = cA._8
1228- let bU = parseIntValue(cA._9)
1229- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cg), toString(ch), toString(bW), toString(bY), toString(bV), toString(cb), toString(bU)], j))
1265+@Callable(dg)
1266+func evaluateGetREADONLY (fS,fT) = {
1267+ let cB = bO("", fS, fT, this)
1268+ let ch = cB._1
1269+ let ci = cB._2
1270+ let bX = cB._5
1271+ let bZ = cB._6
1272+ let bW = cB._7
1273+ let cc = cB._8
1274+ let bV = parseIntValue(cB._9)
1275+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(ch), toString(ci), toString(bX), toString(bZ), toString(bW), toString(cc), toString(bV)], j))
12301276 }
12311277
12321278
1233-@Verifier(fI)
1234-func fJ () = {
1235- let fK = {
1236- let dq = ev()
1237- if ($isInstanceOf(dq, "ByteVector"))
1279+@Verifier(fU)
1280+func fV () = {
1281+ let fW = {
1282+ let dr = ew()
1283+ if ($isInstanceOf(dr, "ByteVector"))
12381284 then {
1239- let ez = dq
1240- ez
1285+ let eA = dr
1286+ eA
12411287 }
1242- else if ($isInstanceOf(dq, "Unit"))
1243- then fI.senderPublicKey
1288+ else if ($isInstanceOf(dr, "Unit"))
1289+ then fU.senderPublicKey
12441290 else throw("Match error")
12451291 }
1246- let dq = fI
1247- if ($isInstanceOf(dq, "Order"))
1292+ let dr = fU
1293+ if ($isInstanceOf(dr, "Order"))
12481294 then {
1249- let cR = dq
1250- let fL = aG()
1251- let ar = cQ(cR)
1252- let as = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1253- let at = sigVerify(cR.bodyBytes, cR.proofs[1], fL)
1254- if (if (if (ar)
1255- then as
1256- else false)
1295+ let cS = dr
1296+ let fX = aH()
1297+ let as = cR(cS)
1298+ let at = sigVerify(cS.bodyBytes, cS.proofs[0], cS.senderPublicKey)
1299+ let au = sigVerify(cS.bodyBytes, cS.proofs[1], fX)
1300+ if (if (if (as)
12571301 then at
12581302 else false)
1303+ then au
1304+ else false)
12591305 then true
1260- else aq(ar, as, at)
1306+ else ar(as, at, au)
12611307 }
1262- else if ($isInstanceOf(dq, "SetScriptTransaction"))
1308+ else if ($isInstanceOf(dr, "SetScriptTransaction"))
12631309 then {
1264- let ew = dq
1265- let fM = blake2b256(value(ew.script))
1266- let fN = fromBase64String(value(getString(aA, ao())))
1267- let fO = scriptHash(this)
1268- if (if ((fN == fM))
1269- then (fO != fM)
1310+ let ex = dr
1311+ let fY = blake2b256(value(ex.script))
1312+ let fZ = fromBase64String(value(getString(aB, ap())))
1313+ let ga = scriptHash(this)
1314+ if (if ((fZ == fY))
1315+ then (ga != fY)
12701316 else false)
12711317 then true
1272- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1318+ else sigVerify(fU.bodyBytes, fU.proofs[0], fW)
12731319 }
1274- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1320+ else sigVerify(fU.bodyBytes, fU.proofs[0], fW)
12751321 }
12761322
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
6868 func J (K,L,M) = fraction(K, L, M)
6969
7070
7171 func N (H) = if ((0 > H))
7272 then -(H)
7373 else H
7474
7575
7676 func O (H) = if ((e > H))
7777 then -(H)
7878 else H
7979
8080
81-func P () = "%s__factoryContract"
81+func P () = "%s__swapContract"
8282
8383
84-func Q () = "%s__managerPublicKey"
84+func Q () = "%s__factoryContract"
8585
8686
87-func R () = "%s__pendingManagerPublicKey"
87+func R () = "%s__managerPublicKey"
8888
8989
90-func S () = "%s%s__price__last"
90+func S () = "%s__pendingManagerPublicKey"
9191
9292
93-func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j)
93+func T () = "%s%s__price__last"
9494
9595
96-func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y)
96+func U (V,W) = makeString(["%s%s%d%d__price__history", toString(V), toString(W)], j)
9797
9898
99-func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y)
99+func X (Y,Z) = ((("%s%s%s__P__" + Y) + "__") + Z)
100100
101101
102-func aa () = "%s__amountAsset"
102+func aa (Y,Z) = ((("%s%s%s__G__" + Y) + "__") + Z)
103103
104104
105-func ab () = "%s__priceAsset"
105+func ab () = "%s__amountAsset"
106106
107107
108-func ac () = "%s__factoryConfig"
108+func ac () = "%s__priceAsset"
109109
110110
111-func ad () = "%s%s__matcher__publicKey"
111+func ad () = "%s__factoryConfig"
112112
113113
114-func ae (af) = (("%s%s%s__" + af) + "__mappings__poolContract2LpAsset")
114+func ae () = "%s%s__matcher__publicKey"
115115
116116
117-func ag (ah,ai) = (((("%d%d%s__" + ah) + "__") + ai) + "__config")
117+func af (ag) = (("%s%s%s__" + ag) + "__mappings__poolContract2LpAsset")
118118
119119
120-func aj (ak) = ("%s%s%s__mappings__baseAsset2internalId__" + ak)
120+func ah (ai,aj) = (((("%d%d%s__" + ai) + "__") + aj) + "__config")
121121
122122
123-func al () = "%s__shutdown"
123+func ak (al) = ("%s%s%s__mappings__baseAsset2internalId__" + al)
124124
125125
126-func am (an) = ("%s%s__poolWeight__" + an)
126+func am () = "%s__shutdown"
127127
128128
129-func ao () = "%s__allowedLpScriptHash"
129+func an (ao) = ("%s%s__poolWeight__" + ao)
130130
131131
132-let ap = "%s__feeCollectorAddress"
133-
134-func aq (ar,as,at) = throw(((((("order validation failed: orderValid=" + toString(ar)) + " senderValid=") + toString(as)) + " matcherValid=") + toString(at)))
132+func ap () = "%s__allowedLpScriptHash"
135133
136134
137-func au (av,aw) = valueOrErrorMessage(getString(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
135+let aq = "%s__feeCollectorAddress"
136+
137+func ar (as,at,au) = throw(((((("order validation failed: orderValid=" + toString(as)) + " senderValid=") + toString(at)) + " matcherValid=") + toString(au)))
138138
139139
140-func ax (av,aw) = valueOrErrorMessage(getInteger(av, aw), makeString(["mandatory ", toString(av), ".", aw, " is not defined"], ""))
140+func av (aw,ax) = valueOrErrorMessage(getString(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " is not defined"], ""))
141141
142142
143-func ay (az) = throw(makeString(["lp.ride:", az], " "))
143+func ay (aw,ax) = valueOrErrorMessage(getInteger(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " is not defined"], ""))
144144
145145
146-let aA = addressFromStringValue(au(this, P()))
146+func az (aA) = throw(makeString(["lp.ride:", aA], " "))
147147
148-let aB = addressFromStringValue(au(aA, ap))
149148
150-let aC = {
151- let aD = invoke(aA, "getInFeeREADONLY", [toString(this)], nil)
152- if ($isInstanceOf(aD, "Int"))
153- then aD
154- else throw(($getType(aD) + " couldn't be cast to Int"))
149+let aB = addressFromStringValue(av(this, Q()))
150+
151+let aC = addressFromStringValue(av(aB, aq))
152+
153+let aD = {
154+ let aE = invoke(aB, "getInFeeREADONLY", [toString(this)], nil)
155+ if ($isInstanceOf(aE, "Int"))
156+ then aE
157+ else throw(($getType(aE) + " couldn't be cast to Int"))
155158 }
156159
157-let aE = {
158- let aD = invoke(aA, "getOutFeeREADONLY", [toString(this)], nil)
159- if ($isInstanceOf(aD, "Int"))
160- then aD
161- else throw(($getType(aD) + " couldn't be cast to Int"))
160+let aF = {
161+ let aE = invoke(aB, "getOutFeeREADONLY", [toString(this)], nil)
162+ if ($isInstanceOf(aE, "Int"))
163+ then aE
164+ else throw(($getType(aE) + " couldn't be cast to Int"))
162165 }
163166
164-func aF () = valueOrElse(getBoolean(aA, al()), false)
167+func aG () = valueOrElse(getBoolean(aB, am()), false)
165168
166169
167-func aG () = fromBase58String(au(aA, ad()))
170+func aH () = fromBase58String(av(aB, ae()))
168171
169172
170-func aH () = {
171- let aI = au(this, aa())
172- let aJ = au(this, ab())
173- let ai = ax(aA, aj(aJ))
174- let ah = ax(aA, aj(aI))
175- split(au(aA, ag(toString(ah), toString(ai))), j)
173+func aI () = {
174+ let aJ = av(this, ab())
175+ let aK = av(this, ac())
176+ let aj = ay(aB, ak(aK))
177+ let ai = ay(aB, ak(aJ))
178+ split(av(aB, ah(toString(ai), toString(aj))), j)
176179 }
177180
178181
179-func aK (aL) = if ((aL == i))
182+func aL (aM) = if ((aM == i))
180183 then unit
181- else fromBase58String(aL)
184+ else fromBase58String(aM)
182185
183186
184-func aM (aL) = if ((aL == unit))
187+func aN (aM) = if ((aM == unit))
185188 then i
186- else toBase58String(value(aL))
189+ else toBase58String(value(aM))
187190
188191
189-func aN (aO) = $Tuple7(addressFromStringValue(aO[o]), parseIntValue(aO[p]), fromBase58String(aO[q]), aK(aO[r]), aK(aO[s]), parseIntValue(aO[t]), parseIntValue(aO[u]))
192+func aO (aP) = $Tuple7(addressFromStringValue(aP[o]), parseIntValue(aP[p]), fromBase58String(aP[q]), aL(aP[r]), aL(aP[s]), parseIntValue(aP[t]), parseIntValue(aP[u]))
190193
191194
192-let aP = aN(aH())
195+let aQ = aO(aI())
193196
194-let aQ = aP
197+let aR = aQ
195198
196-let aR = aQ._1
199+let aS = aR._1
197200
198-let aS = aQ._2
201+let aT = aR._2
199202
200-let aT = aQ._3
203+let aU = aR._3
201204
202-let aU = aQ._4
205+let aV = aR._4
203206
204-let aV = aQ._5
207+let aW = aR._5
205208
206-let aW = aQ._6
209+let aX = aR._6
207210
208-let aX = aQ._7
211+let aY = aR._7
209212
210-func aY () = split(au(aA, ac()), j)
213+func aZ () = split(av(aB, ad()), j)
211214
212215
213-let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
216+let ba = valueOrErrorMessage(addressFromString(aZ()[B]), "incorrect staking address")
214217
215-let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
218+let bb = valueOrErrorMessage(addressFromString(aZ()[C]), "incorrect staking address")
216219
217-func bb (bc,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl)], j)
220+func bc (bd,be,bf,bg,bh,bi,bj,bk,bl,bm) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl), toString(bm)], j)
218221
219222
220-func bm (bn,bo,bp,bf,bi,bj) = makeString(["%d%d%d%d%d%d", toString(bn), toString(bo), toString(bp), toString(bf), toString(bi), toString(bj)], j)
223+func bn (bo,bp,bq,bg,bj,bk) = makeString(["%d%d%d%d%d%d", toString(bo), toString(bp), toString(bq), toString(bg), toString(bj), toString(bk)], j)
221224
222225
223-func bq (br) = if ((br == "WAVES"))
226+func br (bs) = if ((bs == "WAVES"))
224227 then wavesBalance(this).available
225- else assetBalance(this, fromBase58String(br))
228+ else assetBalance(this, fromBase58String(bs))
226229
227230
228-func bs (bt,bu) = fraction(bt, d, bu)
231+func bt (bu,bv) = fraction(bu, d, bv)
229232
230233
231-func bv (bw,bx,by,bz) = {
232- let bA = D(by, bw)
234+func bw (bx,by,bz,bA) = {
233235 let bB = D(bz, bx)
234- bs(bB, bA)
236+ let bC = D(bA, by)
237+ bt(bC, bB)
235238 }
236239
237240
238-func bC (by,bz,bD) = {
239- let bE = aH()
240- let bF = parseIntValue(bE[t])
241- let bG = parseIntValue(bE[u])
242- let bH = bv(bF, bG, by, bz)
243- let bu = D(by, bF)
244- let bt = D(bz, bG)
245- let bI = D(bD, b)
246- let bJ = bs(bu, bI)
247- let bK = bs(bt, bI)
248-[bH, bJ, bK]
241+func bD (bz,bA,bE) = {
242+ let bF = aI()
243+ let bG = parseIntValue(bF[t])
244+ let bH = parseIntValue(bF[u])
245+ let bI = bw(bG, bH, bz, bA)
246+ let bv = D(bz, bG)
247+ let bu = D(bA, bH)
248+ let bJ = D(bE, b)
249+ let bK = bt(bv, bJ)
250+ let bL = bt(bu, bJ)
251+[bI, bK, bL]
249252 }
250253
251254
252-func bL (by,bz,bD) = {
253- let bM = bC(by, bz, bD)
254-[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
255+func bM (bz,bA,bE) = {
256+ let bN = bD(bz, bA, bE)
257+[G(bN[0], b), G(bN[1], b), G(bN[2], b)]
255258 }
256259
257260
258-func bN (bO,bP,bQ,X) = {
259- let bE = aH()
260- let bR = bE[q]
261- let bS = bE[r]
262- let bT = bE[s]
263- let bw = parseIntValue(bE[t])
264- let bx = parseIntValue(bE[u])
265- let bU = bE[p]
266- let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
267- if ((bR != bP))
261+func bO (bP,bQ,bR,Y) = {
262+ let bF = aI()
263+ let bS = bF[q]
264+ let bT = bF[r]
265+ let bU = bF[s]
266+ let bx = parseIntValue(bF[t])
267+ let by = parseIntValue(bF[u])
268+ let bV = bF[p]
269+ let bW = valueOrErrorMessage(assetInfo(fromBase58String(bS)), (("Asset " + bS) + " doesn't exist")).quantity
270+ if ((bS != bQ))
268271 then throw("Invalid asset passed.")
269272 else {
270- let bW = bq(bS)
271- let bX = D(bW, bw)
272- let bY = bq(bT)
273- let bZ = D(bY, bx)
274- let ca = bs(bZ, bX)
275- let cb = G(ca, b)
276- let cc = D(bQ, b)
277- let cd = D(bV, b)
278- let ce = fraction(bX, cc, cd)
279- let cf = fraction(bZ, cc, cd)
280- let cg = G(ce, bw)
273+ let bX = br(bT)
274+ let bY = D(bX, bx)
275+ let bZ = br(bU)
276+ let ca = D(bZ, by)
277+ let cb = bt(ca, bY)
278+ let cc = G(cb, b)
279+ let cd = D(bR, b)
280+ let ce = D(bW, b)
281+ let cf = fraction(bY, cd, ce)
282+ let cg = fraction(ca, cd, ce)
281283 let ch = G(cf, bx)
282- let ci = if ((bO == ""))
284+ let ci = G(cg, by)
285+ let cj = if ((bP == ""))
283286 then nil
284- else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
287+ else [ScriptTransfer(Y, ch, if ((bT == "WAVES"))
285288 then unit
286- else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
289+ else fromBase58String(bT)), ScriptTransfer(Y, ci, if ((bU == "WAVES"))
287290 then unit
288- else fromBase58String(bT)), StringEntry(Z(toString(X), bO), bm(cg, ch, bQ, cb, height, lastBlock.timestamp)), IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb)]
289- $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
291+ else fromBase58String(bU)), StringEntry(aa(toString(Y), bP), bn(ch, ci, bR, cc, height, lastBlock.timestamp)), IntegerEntry(T(), cc), IntegerEntry(U(height, lastBlock.timestamp), cc)]
292+ $Tuple10(ch, ci, bT, bU, bX, bZ, bW, cb, bV, cj)
290293 }
291294 }
292295
293296
294-func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
295- let bE = aH()
296- let bR = fromBase58String(bE[q])
297- let cr = bE[r]
298- let cs = bE[s]
299- let ct = bE[v]
300- let cu = bE[w]
301- let bF = parseIntValue(bE[t])
302- let bG = parseIntValue(bE[u])
303- let bU = bE[p]
304- let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
305- let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
306- let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
307- if (if ((cr != cv))
297+func ck (bP,cl,cm,cn,co,cp,Y,cq,cr) = {
298+ let bF = aI()
299+ let bS = fromBase58String(bF[q])
300+ let cs = bF[r]
301+ let ct = bF[s]
302+ let cu = bF[v]
303+ let cv = bF[w]
304+ let bG = parseIntValue(bF[t])
305+ let bH = parseIntValue(bF[u])
306+ let bV = bF[p]
307+ let bW = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
308+ let cw = toBase58String(valueOrElse(cn, fromBase58String("WAVES")))
309+ let cx = toBase58String(valueOrElse(cp, fromBase58String("WAVES")))
310+ if (if ((cs != cw))
308311 then true
309- else (cs != cw))
312+ else (ct != cx))
310313 then throw("Invalid amt or price asset passed.")
311314 else {
312- let bW = if (cp)
313- then bq(cr)
314- else (bq(cr) - cl)
315- let bY = if (cp)
316- then bq(cs)
317- else (bq(cs) - cn)
318- let cx = D(cl, bF)
319- let cy = D(cn, bG)
320- let cz = bs(cy, cx)
321- let bX = D(bW, bF)
322- let bZ = D(bY, bG)
323- let cA = if ((bV == 0))
315+ let bX = if (cq)
316+ then br(cs)
317+ else (br(cs) - cm)
318+ let bZ = if (cq)
319+ then br(ct)
320+ else (br(ct) - co)
321+ let cy = D(cm, bG)
322+ let cz = D(co, bH)
323+ let cA = bt(cz, cy)
324+ let bY = D(bX, bG)
325+ let ca = D(bZ, bH)
326+ let cB = if ((bW == 0))
324327 then {
325- let ca = e
326- let cB = e
327- let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
328- $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
328+ let cb = e
329+ let cC = e
330+ let bJ = pow((cy * cz), 0, toBigInt(5), 1, 0, DOWN)
331+ $Tuple5(G(bJ, b), G(cy, bG), G(cz, bH), bt((ca + cz), (bY + cy)), cC)
329332 }
330333 else {
331- let ca = bs(bZ, bX)
332- let cB = fraction(O((ca - cz)), d, ca)
333- let cC = D(ck, b)
334- if (if ((ca != e))
335- then (cB > cC)
334+ let cb = bt(ca, bY)
335+ let cC = fraction(O((cb - cA)), d, cb)
336+ let cD = D(cl, b)
337+ if (if ((cb != e))
338+ then (cC > cD)
336339 else false)
337- then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
340+ then throw(((("Price slippage " + toString(cC)) + " exceeded the passed limit of ") + toString(cD)))
338341 else {
339- let cd = D(bV, b)
340- let cD = fraction(cx, ca, d)
341- let cE = fraction(cy, d, ca)
342- let cF = if ((cD > cy))
343- then $Tuple2(cE, cy)
344- else $Tuple2(cx, cD)
345- let cG = cF._1
346- let cH = cF._2
347- let bI = fraction(cd, cH, bZ)
348- $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
342+ let ce = D(bW, b)
343+ let cE = fraction(cy, cb, d)
344+ let cF = fraction(cz, d, cb)
345+ let cG = if ((cE > cz))
346+ then $Tuple2(cF, cz)
347+ else $Tuple2(cy, cE)
348+ let cH = cG._1
349+ let cI = cG._2
350+ let bJ = fraction(ce, cI, ca)
351+ $Tuple5(G(bJ, b), G(cH, bG), G(cI, bH), cb, cC)
349352 }
350353 }
351- let cI = cA._1
352- let cJ = cA._2
353- let cK = cA._3
354- let cb = G(cA._4, b)
355- let cL = G(cA._5, b)
356- if ((0 >= cI))
354+ let cJ = cB._1
355+ let cK = cB._2
356+ let cL = cB._3
357+ let cc = G(cB._4, b)
358+ let cM = G(cB._5, b)
359+ if ((0 >= cJ))
357360 then throw("Invalid calculations. LP calculated is less than zero.")
358361 else {
359- let cM = if (!(cq))
362+ let cN = if (!(cr))
360363 then 0
361- else cI
362- let cN = (cl - cJ)
363- let cO = (cn - cK)
364- let cP = [IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb), StringEntry(W(X, bO), bb(cJ, cK, cM, cb, ck, cL, height, lastBlock.timestamp, cN, cO))]
365- $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
364+ else cJ
365+ let cO = (cm - cK)
366+ let cP = (co - cL)
367+ let cQ = [IntegerEntry(T(), cc), IntegerEntry(U(height, lastBlock.timestamp), cc), StringEntry(X(Y, bP), bc(cK, cL, cN, cc, cl, cM, height, lastBlock.timestamp, cO, cP))]
368+ $Tuple13(cJ, cN, cc, bX, bZ, bW, bS, bV, cQ, cO, cP, cn, cp)
366369 }
367370 }
368371 }
369372
370373
371-func cQ (cR) = {
372- let bE = aH()
373- let cS = bE[r]
374- let cT = bE[s]
375- let bU = parseIntValue(bE[p])
376- let bF = parseIntValue(bE[t])
377- let bG = parseIntValue(bE[u])
378- let cU = bq(cS)
379- let cV = bq(cT)
380- let ca = if ((cR.orderType == Buy))
381- then bv(bF, bG, (cU + cR.amount), cV)
382- else bv(bF, bG, (cU - cR.amount), cV)
383- let cb = G(ca, b)
384- if (if (if (aF())
374+func cR (cS) = {
375+ let bF = aI()
376+ let cT = bF[r]
377+ let cU = bF[s]
378+ let bV = parseIntValue(bF[p])
379+ let bG = parseIntValue(bF[t])
380+ let bH = parseIntValue(bF[u])
381+ let cV = br(cT)
382+ let cW = br(cU)
383+ let cb = if ((cS.orderType == Buy))
384+ then bw(bG, bH, (cV + cS.amount), cW)
385+ else bw(bG, bH, (cV - cS.amount), cW)
386+ let cc = G(cb, b)
387+ if (if (if (aG())
385388 then true
386- else (bU == m))
389+ else (bV == m))
387390 then true
388- else (bU == n))
391+ else (bV == n))
389392 then throw("Exchange operations disabled")
390393 else {
391- let cW = cR.assetPair.amountAsset
392- let cX = if ((cW == unit))
394+ let cX = cS.assetPair.amountAsset
395+ let cY = if ((cX == unit))
393396 then "WAVES"
394- else toBase58String(value(cW))
395- let cY = cR.assetPair.priceAsset
396- let cZ = if ((cY == unit))
397+ else toBase58String(value(cX))
398+ let cZ = cS.assetPair.priceAsset
399+ let da = if ((cZ == unit))
397400 then "WAVES"
398- else toBase58String(value(cY))
399- if (if ((cX != cS))
401+ else toBase58String(value(cZ))
402+ if (if ((cY != cT))
400403 then true
401- else (cZ != cT))
404+ else (da != cU))
402405 then throw("Wrong order assets.")
403406 else {
404- let da = cR.price
405- let db = fraction(b, bG, bF)
406- let dc = J(da, b, db)
407- let dd = if ((cR.orderType == Buy))
408- then (cb >= dc)
409- else (dc >= cb)
407+ let db = cS.price
408+ let dc = fraction(b, bH, bG)
409+ let dd = J(db, b, dc)
410+ let de = if ((cS.orderType == Buy))
411+ then (cc >= dd)
412+ else (dd >= cc)
410413 true
411414 }
412415 }
413416 }
414417
415418
416-func de (df) = if ((size(df.payments) != 1))
419+func df (dg) = if ((size(dg.payments) != 1))
417420 then throw("exactly 1 payment is expected")
418421 else {
419- let dg = value(df.payments[0])
420- let bP = value(dg.assetId)
421- let dh = dg.amount
422- let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
423- let cg = cA._1
424- let ch = cA._2
425- let bU = parseIntValue(cA._9)
426- let ci = cA._10
427- if (if (aF())
422+ let dh = value(dg.payments[0])
423+ let bQ = value(dh.assetId)
424+ let di = dh.amount
425+ let cB = bO(toBase58String(dg.transactionId), toBase58String(bQ), di, dg.caller)
426+ let ch = cB._1
427+ let ci = cB._2
428+ let bV = parseIntValue(cB._9)
429+ let cj = cB._10
430+ if (if (aG())
428431 then true
429- else (bU == n))
430- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
431- else $Tuple5(cg, ch, dh, bP, ci)
432+ else (bV == n))
433+ then throw(("Get operation is blocked by admin. Status = " + toString(bV)))
434+ else $Tuple5(ch, ci, di, bQ, cj)
432435 }
433436
434437
435-func di (df,ck,cq) = if ((size(df.payments) != 2))
438+func dj (dg,cl,cr) = if ((size(dg.payments) != 2))
436439 then throw("exactly 2 payments are expected")
437440 else {
438- let dj = value(df.payments[0])
439- let dk = value(df.payments[1])
440- let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
441- let bU = parseIntValue(dl._8)
442- if (if (if (aF())
441+ let dk = value(dg.payments[0])
442+ let dl = value(dg.payments[1])
443+ let dm = ck(toBase58String(dg.transactionId), cl, dk.amount, dk.assetId, dl.amount, dl.assetId, toString(dg.caller), false, cr)
444+ let bV = parseIntValue(dm._8)
445+ if (if (if (aG())
443446 then true
444- else (bU == l))
447+ else (bV == l))
445448 then true
446- else (bU == n))
447- then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
448- else dl
449+ else (bV == n))
450+ then throw(("Put operation is blocked by admin. Status = " + toString(bV)))
451+ else dm
449452 }
450453
451454
452-func dm (dn) = {
453- let do = invoke(aA, "emit", [dn], nil)
454- if ((do == do))
455+func dn (do) = {
456+ let dp = invoke(aB, "emit", [do], nil)
457+ if ((dp == dp))
455458 then {
456- let dp = {
457- let dq = do
458- if ($isInstanceOf(dq, "Address"))
459+ let dq = {
460+ let dr = dp
461+ if ($isInstanceOf(dr, "Address"))
459462 then {
460- let dr = dq
461- invoke(dr, "emit", [dn], nil)
463+ let ds = dr
464+ invoke(ds, "emit", [do], nil)
462465 }
463466 else unit
464467 }
465- if ((dp == dp))
466- then dn
468+ if ((dq == dq))
469+ then do
467470 else throw("Strict value is not equal to itself.")
468471 }
469472 else throw("Strict value is not equal to itself.")
470473 }
471474
472475
473-func ds (dn,dt) = {
474- let du = if ((dt == 0))
476+func dt (do,du) = {
477+ let dv = if ((du == 0))
475478 then 0
476- else fraction(dn, dt, b)
477- $Tuple2((dn - du), du)
479+ else fraction(do, du, b)
480+ $Tuple2((do - dv), dv)
478481 }
479482
480483
481-func dv (dw,dx,X,Y) = {
482- let dy = (Y == unit)
483- let dz = bq(aM(aU))
484- let dA = bq(aM(aV))
485- let dB = if ((dx == aU))
484+func dw (dx,dy,Y,Z) = {
485+ let dz = (Z == unit)
486+ let dA = br(aN(aV))
487+ let dB = br(aN(aW))
488+ let dC = if ((dy == aV))
486489 then true
487- else if ((dx == aV))
490+ else if ((dy == aW))
488491 then false
489- else ay("invalid asset")
490- let dC = if (dy)
491- then $Tuple2(dz, dA)
492- else if (dB)
493- then $Tuple2((dz - dw), dA)
494- else $Tuple2(dz, (dA - dw))
495- let dD = dC._1
496- let dE = dC._2
497- let dF = if (dB)
498- then $Tuple2(dw, 0)
499- else $Tuple2(0, dw)
500- let dG = dF._1
501- let dH = dF._2
502- let dI = ds(dG, aC)._1
503- let dJ = ds(dH, aC)._1
504- let dK = ds(dw, aC)
505- let dL = dK._1
506- let du = dK._2
507- let dM = (dD + dI)
492+ else az("invalid asset")
493+ let dD = if (dz)
494+ then $Tuple2(dA, dB)
495+ else if (dC)
496+ then $Tuple2((dA - dx), dB)
497+ else $Tuple2(dA, (dB - dx))
498+ let dE = dD._1
499+ let dF = dD._2
500+ let dG = if (dC)
501+ then $Tuple2(dx, 0)
502+ else $Tuple2(0, dx)
503+ let dH = dG._1
504+ let dI = dG._2
505+ let dJ = dt(dH, aD)._1
506+ let dK = dt(dI, aD)._1
507+ let dL = dt(dx, aD)
508+ let dM = dL._1
509+ let dv = dL._2
508510 let dN = (dE + dJ)
509- let dO = bs(D(dN, aX), D(dM, aW))
510- let dP = G(dO, b)
511- let dQ = if (dB)
512- then dD
513- else dE
514- let dR = toBigInt(dQ)
515- let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
516- let dT = if ((dS > f))
511+ let dO = (dF + dK)
512+ let dP = bt(D(dO, aY), D(dN, aX))
513+ let dQ = G(dP, b)
514+ let dR = if (dC)
515+ then dE
516+ else dF
517+ let dS = toBigInt(dR)
518+ let dT = toBigInt(valueOrErrorMessage(assetInfo(aU), (("asset " + toBase58String(aU)) + " doesn't exist")).quantity)
519+ let dU = if ((dT > f))
517520 then true
518- else ay("initial deposit requires all coins")
519- if ((dT == dT))
521+ else az("initial deposit requires all coins")
522+ if ((dU == dU))
520523 then {
521- let dU = toBigInt(dL)
522- let dV = max([0, toInt(((dS * (sqrtBigInt((d + ((dU * d) / dR)), 18, 18, DOWN) - d)) / d))])
523- let cP = if (dy)
524+ let dV = toBigInt(dM)
525+ let dW = max([0, toInt(((dT * (sqrtBigInt((d + ((dV * d) / dS)), 18, 18, DOWN) - d)) / d))])
526+ let cQ = if (dz)
524527 then nil
525- else [IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dG, dH, dV, dP, 0, 0, height, lastBlock.timestamp, 0, 0))]
526- let dW = bs(D(dE, aX), D(dD, aW))
527- let dX = G(dW, b)
528- let dY = {
529- let dZ = if (dB)
530- then $Tuple2(dG, dD)
531- else $Tuple2(dH, dE)
532- let dn = dZ._1
533- let ea = dZ._2
534- let eb = toInt(fraction(dS, toBigInt((dn / 2)), toBigInt(ea)))
535- fraction((dV - eb), b, eb)
528+ else [IntegerEntry(T(), dQ), IntegerEntry(U(height, lastBlock.timestamp), dQ), StringEntry(X(toString(value(Y)), toBase58String(value(Z))), bc(dH, dI, dW, dQ, 0, 0, height, lastBlock.timestamp, 0, 0))]
529+ let dX = bt(D(dF, aY), D(dE, aX))
530+ let dY = G(dX, b)
531+ let dZ = {
532+ let ea = if (dC)
533+ then $Tuple2(dH, dE)
534+ else $Tuple2(dI, dF)
535+ let do = ea._1
536+ let eb = ea._2
537+ let ec = toInt(fraction(dT, toBigInt((do / 2)), toBigInt(eb)))
538+ fraction((dW - ec), b, ec)
536539 }
537- $Tuple4(dV, cP, du, dY)
540+ $Tuple4(dW, cQ, dv, dZ)
538541 }
539542 else throw("Strict value is not equal to itself.")
540543 }
541544
542545
543-func ec (ed,dL,dx,X,Y) = {
544- let dy = (Y == unit)
545- let ee = [if ((dx == aT))
546+func ed (ee,dM,dy,Y,Z) = {
547+ let dz = (Z == unit)
548+ let ef = [if ((dy == aU))
546549 then true
547- else ay("invalid lp asset")]
548- if ((ee == ee))
550+ else az("invalid lp asset")]
551+ if ((ef == ef))
549552 then {
550- let ef = if ((ed == aU))
553+ let eg = if ((ee == aV))
551554 then true
552- else if ((ed == aV))
555+ else if ((ee == aW))
553556 then false
554- else ay("invalid asset")
555- let eg = if (ef)
556- then toBigInt(bq(aM(aU)))
557- else toBigInt(bq(aM(aV)))
558- let eh = bq(aM(aU))
559- let ei = bq(aM(aV))
560- let ej = if (ef)
561- then eh
562- else ei
563- let ek = toBigInt(ej)
564- let dS = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
565- let el = toBigInt(dL)
566- let em = max([0, toInt(((eg * (d - pow((d - ((el * d) / dS)), 18, h, 0, 18, DOWN))) / d))])
567- let en = ds(em, aE)
568- let eo = en._1
569- let du = en._2
570- let ep = if (ef)
571- then $Tuple4(eo, 0, (eh - em), ei)
572- else $Tuple4(0, eo, eh, (ei - em))
573- let eq = ep._1
574- let er = ep._2
575- let es = ep._3
576- let et = ep._4
577- let dO = bs(D(et, aX), D(es, aW))
578- let dP = G(dO, b)
579- let cP = if (dy)
557+ else az("invalid asset")
558+ let eh = if (eg)
559+ then toBigInt(br(aN(aV)))
560+ else toBigInt(br(aN(aW)))
561+ let ei = br(aN(aV))
562+ let ej = br(aN(aW))
563+ let ek = if (eg)
564+ then ei
565+ else ej
566+ let el = toBigInt(ek)
567+ let dT = toBigInt(valueOrErrorMessage(assetInfo(aU), (("asset " + toBase58String(aU)) + " doesn't exist")).quantity)
568+ let em = toBigInt(dM)
569+ let en = max([0, toInt(((eh * (d - pow((d - ((em * d) / dT)), 18, h, 0, 18, DOWN))) / d))])
570+ let eo = dt(en, aF)
571+ let ep = eo._1
572+ let dv = eo._2
573+ let eq = if (eg)
574+ then $Tuple4(ep, 0, (ei - en), ej)
575+ else $Tuple4(0, ep, ei, (ej - en))
576+ let er = eq._1
577+ let es = eq._2
578+ let et = eq._3
579+ let eu = eq._4
580+ let dP = bt(D(eu, aY), D(et, aX))
581+ let dQ = G(dP, b)
582+ let cQ = if (dz)
580583 then nil
581- else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(eq, er, dL, dP, height, lastBlock.timestamp)), IntegerEntry(S(), dP), IntegerEntry(T(height, lastBlock.timestamp), dP)]
582- let dW = bs(D(ei, aX), D(eh, aW))
583- let dX = G(dW, b)
584- let dY = {
585- let eu = (toInt(fraction(eg, el, dS)) * 2)
586- fraction((eo - eu), b, eu)
584+ else [StringEntry(aa(toString(value(Y)), toBase58String(value(Z))), bn(er, es, dM, dQ, height, lastBlock.timestamp)), IntegerEntry(T(), dQ), IntegerEntry(U(height, lastBlock.timestamp), dQ)]
585+ let dX = bt(D(ej, aY), D(ei, aX))
586+ let dY = G(dX, b)
587+ let dZ = {
588+ let ev = (toInt(fraction(eh, em, dT)) * 2)
589+ fraction((ep - ev), b, ev)
587590 }
588- $Tuple4(eo, cP, du, dY)
591+ $Tuple4(ep, cQ, dv, dZ)
589592 }
590593 else throw("Strict value is not equal to itself.")
591594 }
592595
593596
594-func ev () = {
595- let dq = getString(Q())
596- if ($isInstanceOf(dq, "String"))
597+func ew () = {
598+ let dr = getString(R())
599+ if ($isInstanceOf(dr, "String"))
597600 then {
598- let ew = dq
599- fromBase58String(ew)
601+ let ex = dr
602+ fromBase58String(ex)
600603 }
601- else if ($isInstanceOf(dq, "Unit"))
604+ else if ($isInstanceOf(dr, "Unit"))
602605 then unit
603606 else throw("Match error")
604607 }
605608
606609
607-func ex () = {
608- let dq = getString(R())
609- if ($isInstanceOf(dq, "String"))
610+func ey () = {
611+ let dr = getString(S())
612+ if ($isInstanceOf(dr, "String"))
610613 then {
611- let ew = dq
612- fromBase58String(ew)
614+ let ex = dr
615+ fromBase58String(ex)
613616 }
614- else if ($isInstanceOf(dq, "Unit"))
617+ else if ($isInstanceOf(dr, "Unit"))
615618 then unit
616619 else throw("Match error")
617620 }
618621
619622
620-func ey (df) = {
621- let dq = ev()
622- if ($isInstanceOf(dq, "ByteVector"))
623+func ez (dg) = {
624+ let dr = ew()
625+ if ($isInstanceOf(dr, "ByteVector"))
623626 then {
624- let ez = dq
625- (df.callerPublicKey == ez)
627+ let eA = dr
628+ (dg.callerPublicKey == eA)
626629 }
627- else if ($isInstanceOf(dq, "Unit"))
628- then (df.caller == this)
630+ else if ($isInstanceOf(dr, "Unit"))
631+ then (dg.caller == this)
629632 else throw("Match error")
630633 }
631634
632635
633-func eA (df) = {
634- let eB = throw("Permission denied")
635- let dq = ev()
636- if ($isInstanceOf(dq, "ByteVector"))
636+func eB (dg) = {
637+ let eC = throw("Permission denied")
638+ let dr = ew()
639+ if ($isInstanceOf(dr, "ByteVector"))
637640 then {
638- let ez = dq
639- if ((df.callerPublicKey == ez))
641+ let eA = dr
642+ if ((dg.callerPublicKey == eA))
640643 then true
641- else eB
644+ else eC
642645 }
643- else if ($isInstanceOf(dq, "Unit"))
644- then if ((df.caller == this))
646+ else if ($isInstanceOf(dr, "Unit"))
647+ then if ((dg.caller == this))
645648 then true
646- else eB
649+ else eC
647650 else throw("Match error")
648651 }
649652
650653
651-@Callable(df)
652-func setManager (eC) = {
653- let eD = eA(df)
654- if ((eD == eD))
654+@Callable(dg)
655+func calculateAmountOutForSwapAndSendTokens (eD,eE,eF,eG) = {
656+ let ef = [if ((value(dg.payments[0]).amount >= eD))
657+ then true
658+ else az("Wrong amount"), if ((dg.caller == addressFromStringValue(av(this, P()))))
659+ then true
660+ else az("Permission denied")]
661+ if ((ef == ef))
655662 then {
656- let eE = fromBase58String(eC)
657- if ((eE == eE))
658- then [StringEntry(R(), eC)]
663+ let dh = value(dg.payments[0])
664+ let eH = toBase58String(value(dh.assetId))
665+ let eI = if ((eE == false))
666+ then {
667+ let eI = av(this, ac())
668+ eI
669+ }
670+ else {
671+ let eI = av(this, ab())
672+ eI
673+ }
674+ let eJ = (br(eH) - value(dg.payments[0]).amount)
675+ let eK = br(eI)
676+ let eL = ((eK * eD) / (eJ + eD))
677+ let eM = [(eL >= eF), "Exchange resulted in fewer coins than expected"]
678+ if ((eM == eM))
679+ then [ScriptTransfer(addressFromStringValue(eG), eL, fromBase58String(eI))]
659680 else throw("Strict value is not equal to itself.")
660681 }
661682 else throw("Strict value is not equal to itself.")
662683 }
663684
664685
665686
666-@Callable(df)
667-func confirmManager () = {
668- let eF = ex()
669- let eG = if (isDefined(eF))
670- then true
671- else throw("No pending manager")
672- if ((eG == eG))
687+@Callable(dg)
688+func setSwapContract (eN) = {
689+ let eO = eB(dg)
690+ if ((eO == eO))
691+ then [StringEntry(P(), eN)]
692+ else throw("Strict value is not equal to itself.")
693+ }
694+
695+
696+
697+@Callable(dg)
698+func setManager (eP) = {
699+ let eO = eB(dg)
700+ if ((eO == eO))
673701 then {
674- let eH = if ((df.callerPublicKey == value(eF)))
675- then true
676- else throw("You are not pending manager")
677- if ((eH == eH))
678- then [StringEntry(Q(), toBase58String(value(eF))), DeleteEntry(R())]
702+ let eQ = fromBase58String(eP)
703+ if ((eQ == eQ))
704+ then [StringEntry(S(), eP)]
679705 else throw("Strict value is not equal to itself.")
680706 }
681707 else throw("Strict value is not equal to itself.")
682708 }
683709
684710
685711
686-@Callable(df)
687-func put (ck,eI) = if ((0 > ck))
712+@Callable(dg)
713+func confirmManager () = {
714+ let eR = ey()
715+ let eS = if (isDefined(eR))
716+ then true
717+ else throw("No pending manager")
718+ if ((eS == eS))
719+ then {
720+ let eT = if ((dg.callerPublicKey == value(eR)))
721+ then true
722+ else throw("You are not pending manager")
723+ if ((eT == eT))
724+ then [StringEntry(R(), toBase58String(value(eR))), DeleteEntry(S())]
725+ else throw("Strict value is not equal to itself.")
726+ }
727+ else throw("Strict value is not equal to itself.")
728+ }
729+
730+
731+
732+@Callable(dg)
733+func put (cl,eU) = if ((0 > cl))
688734 then throw("Invalid slippageTolerance passed")
689735 else {
690- let dl = di(df, ck, true)
691- let cM = dl._2
692- let bR = dl._7
693- let ci = dl._9
694- let cN = dl._10
695- let cO = dl._11
696- let eJ = dl._12
697- let eK = dl._13
698- let do = invoke(aA, "emit", [cM], nil)
699- if ((do == do))
736+ let dm = dj(dg, cl, true)
737+ let cN = dm._2
738+ let bS = dm._7
739+ let cj = dm._9
740+ let cO = dm._10
741+ let cP = dm._11
742+ let eV = dm._12
743+ let eW = dm._13
744+ let dp = invoke(aB, "emit", [cN], nil)
745+ if ((dp == dp))
700746 then {
701- let dp = {
702- let dq = do
703- if ($isInstanceOf(dq, "Address"))
747+ let dq = {
748+ let dr = dp
749+ if ($isInstanceOf(dr, "Address"))
704750 then {
705- let dr = dq
706- invoke(dr, "emit", [cM], nil)
751+ let ds = dr
752+ invoke(ds, "emit", [cN], nil)
707753 }
708754 else unit
709755 }
710- if ((dp == dp))
756+ if ((dq == dq))
711757 then {
712- let eL = if ((cN > 0))
713- then invoke(ba, "put", nil, [AttachedPayment(eJ, cN)])
758+ let eX = if ((cO > 0))
759+ then invoke(bb, "put", nil, [AttachedPayment(eV, cO)])
714760 else nil
715- if ((eL == eL))
761+ if ((eX == eX))
716762 then {
717- let eM = if ((cO > 0))
718- then invoke(ba, "put", nil, [AttachedPayment(eK, cO)])
763+ let eY = if ((cP > 0))
764+ then invoke(bb, "put", nil, [AttachedPayment(eW, cP)])
719765 else nil
720- if ((eM == eM))
766+ if ((eY == eY))
721767 then {
722- let eN = if (eI)
768+ let eZ = if (eU)
723769 then {
724- let eO = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
725- if ((eO == eO))
770+ let fa = invoke(ba, "stake", nil, [AttachedPayment(bS, cN)])
771+ if ((fa == fa))
726772 then nil
727773 else throw("Strict value is not equal to itself.")
728774 }
729- else [ScriptTransfer(df.caller, cM, bR)]
730- (ci ++ eN)
775+ else [ScriptTransfer(dg.caller, cN, bS)]
776+ (cj ++ eZ)
731777 }
732778 else throw("Strict value is not equal to itself.")
733779 }
734780 else throw("Strict value is not equal to itself.")
735781 }
736782 else throw("Strict value is not equal to itself.")
737783 }
738784 else throw("Strict value is not equal to itself.")
739785 }
740786
741787
742788
743-@Callable(df)
744-func putForFree (eP) = if ((0 > eP))
789+@Callable(dg)
790+func putForFree (fb) = if ((0 > fb))
745791 then throw("Invalid value passed")
746792 else {
747- let dl = di(df, eP, false)
748- dl._9
793+ let dm = dj(dg, fb, false)
794+ dm._9
749795 }
750796
751797
752798
753-@Callable(df)
754-func putOneTkn (eQ,eR) = {
755- let eS = {
756- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
757- if ($isInstanceOf(aD, "Boolean"))
758- then aD
759- else throw(($getType(aD) + " couldn't be cast to Boolean"))
799+@Callable(dg)
800+func putOneTkn (fc,fd) = {
801+ let fe = {
802+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
803+ if ($isInstanceOf(aE, "Boolean"))
804+ then aE
805+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
760806 }
761- let eT = if (if (if (aF())
807+ let ff = if (if (if (aG())
762808 then true
763- else (aS == l))
809+ else (aT == l))
764810 then true
765- else (aS == n))
811+ else (aT == n))
766812 then true
767- else eS
768- let ee = [if (if (!(eT))
813+ else fe
814+ let ef = [if (if (!(ff))
769815 then true
770- else ey(df))
816+ else ez(dg))
771817 then true
772- else ay("put operation is blocked by admin"), if ((size(df.payments) == 1))
818+ else az("put operation is blocked by admin"), if ((size(dg.payments) == 1))
773819 then true
774- else ay("exactly 1 payment are expected")]
775- if ((ee == ee))
820+ else az("exactly 1 payment are expected")]
821+ if ((ef == ef))
776822 then {
777- let eU = df.payments[0]
778- let dx = eU.assetId
779- let dw = eU.amount
780- let X = df.caller
781- let Y = df.transactionId
782- let eV = dv(dw, dx, X, Y)
783- if ((eV == eV))
823+ let fg = dg.payments[0]
824+ let dy = fg.assetId
825+ let dx = fg.amount
826+ let Y = dg.caller
827+ let Z = dg.transactionId
828+ let fh = dw(dx, dy, Y, Z)
829+ if ((fh == fh))
784830 then {
785- let eW = eV._4
786- let du = eV._3
787- let cP = eV._2
788- let eX = eV._1
789- let eY = if (if ((eQ > 0))
790- then (eQ > eX)
831+ let fi = fh._4
832+ let dv = fh._3
833+ let cQ = fh._2
834+ let fj = fh._1
835+ let fk = if (if ((fc > 0))
836+ then (fc > fj)
791837 else false)
792- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
793- else eX
794- let do = dm(eY)
795- if ((do == do))
838+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
839+ else fj
840+ let dp = dn(fk)
841+ if ((dp == dp))
796842 then {
797- let eN = if (eR)
843+ let eZ = if (fd)
798844 then {
799- let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)])
800- if ((eZ == eZ))
845+ let fl = invoke(ba, "stake", nil, [AttachedPayment(aU, fk)])
846+ if ((fl == fl))
801847 then nil
802848 else throw("Strict value is not equal to itself.")
803849 }
804- else [ScriptTransfer(df.caller, eY, aT)]
805- let fa = if ((du > 0))
806- then [ScriptTransfer(aB, du, dx)]
850+ else [ScriptTransfer(dg.caller, fk, aU)]
851+ let fm = if ((dv > 0))
852+ then [ScriptTransfer(aC, dv, dy)]
807853 else nil
808- $Tuple2(((cP ++ eN) ++ fa), eY)
854+ $Tuple2(((cQ ++ eZ) ++ fm), fk)
809855 }
810856 else throw("Strict value is not equal to itself.")
811857 }
812858 else throw("Strict value is not equal to itself.")
813859 }
814860 else throw("Strict value is not equal to itself.")
815861 }
816862
817863
818864
819-@Callable(df)
820-func putOneTknREADONLY (dx,dw) = {
821- let fb = dv(dw, aK(dx), unit, unit)
822- let eX = fb._1
823- let cP = fb._2
824- let du = fb._3
825- let eW = fb._4
826- $Tuple2(nil, $Tuple3(eX, du, eW))
865+@Callable(dg)
866+func putOneTknREADONLY (dy,dx) = {
867+ let fn = dw(dx, aL(dy), unit, unit)
868+ let fj = fn._1
869+ let cQ = fn._2
870+ let dv = fn._3
871+ let fi = fn._4
872+ $Tuple2(nil, $Tuple3(fj, dv, fi))
827873 }
828874
829875
830876
831-@Callable(df)
832-func getOneTkn (fc,eQ) = {
833- let eS = {
834- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
835- if ($isInstanceOf(aD, "Boolean"))
836- then aD
837- else throw(($getType(aD) + " couldn't be cast to Boolean"))
877+@Callable(dg)
878+func getOneTkn (fo,fc) = {
879+ let fe = {
880+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
881+ if ($isInstanceOf(aE, "Boolean"))
882+ then aE
883+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
838884 }
839- let fd = if (if (aF())
885+ let fp = if (if (aG())
840886 then true
841- else (aS == n))
887+ else (aT == n))
842888 then true
843- else eS
844- let ee = [if (if (!(fd))
889+ else fe
890+ let ef = [if (if (!(fp))
845891 then true
846- else ey(df))
892+ else ez(dg))
847893 then true
848- else ay("get operation is blocked by admin"), if ((size(df.payments) == 1))
894+ else az("get operation is blocked by admin"), if ((size(dg.payments) == 1))
849895 then true
850- else ay("exactly 1 payment are expected")]
851- if ((ee == ee))
896+ else az("exactly 1 payment are expected")]
897+ if ((ef == ef))
852898 then {
853- let ed = aK(fc)
854- let eU = df.payments[0]
855- let dx = eU.assetId
856- let dL = eU.amount
857- let X = df.caller
858- let Y = df.transactionId
859- let fe = ec(ed, dL, dx, X, Y)
860- if ((fe == fe))
899+ let ee = aL(fo)
900+ let fg = dg.payments[0]
901+ let dy = fg.assetId
902+ let dM = fg.amount
903+ let Y = dg.caller
904+ let Z = dg.transactionId
905+ let fq = ed(ee, dM, dy, Y, Z)
906+ if ((fq == fq))
861907 then {
862- let eW = fe._4
863- let du = fe._3
864- let cP = fe._2
865- let ff = fe._1
866- let dn = if (if ((eQ > 0))
867- then (eQ > ff)
908+ let fi = fq._4
909+ let dv = fq._3
910+ let cQ = fq._2
911+ let fr = fq._1
912+ let do = if (if ((fc > 0))
913+ then (fc > fr)
868914 else false)
869- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
870- else ff
871- let fg = invoke(aA, "burn", [dL], [AttachedPayment(dx, dL)])
872- if ((fg == fg))
915+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
916+ else fr
917+ let fs = invoke(aB, "burn", [dM], [AttachedPayment(dy, dM)])
918+ if ((fs == fs))
873919 then {
874- let fh = [ScriptTransfer(X, dn, ed)]
875- let fa = if ((du > 0))
876- then [ScriptTransfer(aB, du, ed)]
920+ let ft = [ScriptTransfer(Y, do, ee)]
921+ let fm = if ((dv > 0))
922+ then [ScriptTransfer(aC, dv, ee)]
877923 else nil
878- $Tuple2(((cP ++ fh) ++ fa), dn)
924+ $Tuple2(((cQ ++ ft) ++ fm), do)
879925 }
880926 else throw("Strict value is not equal to itself.")
881927 }
882928 else throw("Strict value is not equal to itself.")
883929 }
884930 else throw("Strict value is not equal to itself.")
885931 }
886932
887933
888934
889-@Callable(df)
890-func getOneTknREADONLY (ed,dL) = {
891- let fi = ec(aK(ed), dL, aT, unit, unit)
892- let ff = fi._1
893- let cP = fi._2
894- let du = fi._3
895- let eW = fi._4
896- $Tuple2(nil, $Tuple3(ff, du, eW))
935+@Callable(dg)
936+func getOneTknREADONLY (ee,dM) = {
937+ let fu = ed(aL(ee), dM, aU, unit, unit)
938+ let fr = fu._1
939+ let cQ = fu._2
940+ let dv = fu._3
941+ let fi = fu._4
942+ $Tuple2(nil, $Tuple3(fr, dv, fi))
897943 }
898944
899945
900946
901-@Callable(df)
902-func unstakeAndGetOneTkn (fj,fc,eQ) = {
903- let eS = {
904- let aD = invoke(aA, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
905- if ($isInstanceOf(aD, "Boolean"))
906- then aD
907- else throw(($getType(aD) + " couldn't be cast to Boolean"))
947+@Callable(dg)
948+func unstakeAndGetOneTkn (fv,fo,fc) = {
949+ let fe = {
950+ let aE = invoke(aB, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
951+ if ($isInstanceOf(aE, "Boolean"))
952+ then aE
953+ else throw(($getType(aE) + " couldn't be cast to Boolean"))
908954 }
909- let fd = if (if (aF())
955+ let fp = if (if (aG())
910956 then true
911- else (aS == n))
957+ else (aT == n))
912958 then true
913- else eS
914- let ee = [if (if (!(fd))
959+ else fe
960+ let ef = [if (if (!(fp))
915961 then true
916- else ey(df))
962+ else ez(dg))
917963 then true
918- else ay("get operation is blocked by admin"), if ((size(df.payments) == 0))
964+ else az("get operation is blocked by admin"), if ((size(dg.payments) == 0))
919965 then true
920- else ay("no payments are expected")]
921- if ((ee == ee))
966+ else az("no payments are expected")]
967+ if ((ef == ef))
922968 then {
923- let ed = aK(fc)
924- let X = df.caller
925- let Y = df.transactionId
926- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
927- if ((fk == fk))
969+ let ee = aL(fo)
970+ let Y = dg.caller
971+ let Z = dg.transactionId
972+ let fw = invoke(ba, "unstake", [toBase58String(aU), fv], nil)
973+ if ((fw == fw))
928974 then {
929- let fl = ec(ed, fj, aT, X, Y)
930- if ((fl == fl))
975+ let fx = ed(ee, fv, aU, Y, Z)
976+ if ((fx == fx))
931977 then {
932- let eW = fl._4
933- let du = fl._3
934- let cP = fl._2
935- let ff = fl._1
936- let dn = if (if ((eQ > 0))
937- then (eQ > ff)
978+ let fi = fx._4
979+ let dv = fx._3
980+ let cQ = fx._2
981+ let fr = fx._1
982+ let do = if (if ((fc > 0))
983+ then (fc > fr)
938984 else false)
939- then ay(makeString(["amount to receive is less than ", toString(eQ)], ""))
940- else ff
941- let fg = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
942- if ((fg == fg))
985+ then az(makeString(["amount to receive is less than ", toString(fc)], ""))
986+ else fr
987+ let fs = invoke(aB, "burn", [fv], [AttachedPayment(aU, fv)])
988+ if ((fs == fs))
943989 then {
944- let fh = [ScriptTransfer(df.caller, dn, ed)]
945- let fa = if ((du > 0))
946- then [ScriptTransfer(aB, du, ed)]
990+ let ft = [ScriptTransfer(dg.caller, do, ee)]
991+ let fm = if ((dv > 0))
992+ then [ScriptTransfer(aC, dv, ee)]
947993 else nil
948- $Tuple2(((cP ++ fh) ++ fa), dn)
994+ $Tuple2(((cQ ++ ft) ++ fm), do)
949995 }
950996 else throw("Strict value is not equal to itself.")
951997 }
952998 else throw("Strict value is not equal to itself.")
953999 }
9541000 else throw("Strict value is not equal to itself.")
9551001 }
9561002 else throw("Strict value is not equal to itself.")
9571003 }
9581004
9591005
9601006
961-@Callable(df)
1007+@Callable(dg)
9621008 func get () = {
963- let cA = de(df)
964- let fm = cA._1
965- let ch = cA._2
966- let dh = cA._3
967- let bP = cA._4
968- let ci = cA._5
969- let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
970- if ((fn == fn))
971- then ci
1009+ let cB = df(dg)
1010+ let fy = cB._1
1011+ let ci = cB._2
1012+ let di = cB._3
1013+ let bQ = cB._4
1014+ let cj = cB._5
1015+ let fz = invoke(aB, "burn", [di], [AttachedPayment(bQ, di)])
1016+ if ((fz == fz))
1017+ then cj
9721018 else throw("Strict value is not equal to itself.")
9731019 }
9741020
9751021
9761022
977-@Callable(df)
978-func getNoLess (fo,fp) = {
979- let cA = de(df)
980- let cg = cA._1
981- let ch = cA._2
982- let dh = cA._3
983- let bP = cA._4
984- let ci = cA._5
985- if ((fo > cg))
986- then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo)))
987- else if ((fp > ch))
988- then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp)))
1023+@Callable(dg)
1024+func getNoLess (fA,fB) = {
1025+ let cB = df(dg)
1026+ let ch = cB._1
1027+ let ci = cB._2
1028+ let di = cB._3
1029+ let bQ = cB._4
1030+ let cj = cB._5
1031+ if ((fA > ch))
1032+ then throw(((("noLessThenAmtAsset failed: " + toString(ch)) + " < ") + toString(fA)))
1033+ else if ((fB > ci))
1034+ then throw(((("noLessThenPriceAsset failed: " + toString(ci)) + " < ") + toString(fB)))
9891035 else {
990- let fn = invoke(aA, "burn", [dh], [AttachedPayment(bP, dh)])
991- if ((fn == fn))
992- then ci
1036+ let fz = invoke(aB, "burn", [di], [AttachedPayment(bQ, di)])
1037+ if ((fz == fz))
1038+ then cj
9931039 else throw("Strict value is not equal to itself.")
9941040 }
9951041 }
9961042
9971043
9981044
999-@Callable(df)
1000-func unstakeAndGet (dn) = {
1001- let fq = if ((size(df.payments) != 0))
1045+@Callable(dg)
1046+func unstakeAndGet (do) = {
1047+ let fC = if ((size(dg.payments) != 0))
10021048 then throw("No payments are expected")
10031049 else true
1004- if ((fq == fq))
1050+ if ((fC == fC))
10051051 then {
1006- let bE = aH()
1007- let bR = fromBase58String(bE[q])
1008- let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
1009- if ((fk == fk))
1052+ let bF = aI()
1053+ let bS = fromBase58String(bF[q])
1054+ let fw = invoke(ba, "unstake", [toBase58String(bS), do], nil)
1055+ if ((fw == fw))
10101056 then {
1011- let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
1012- let bU = parseIntValue(cA._9)
1013- let ci = cA._10
1014- let fr = if (if (aF())
1057+ let cB = bO(toBase58String(dg.transactionId), toBase58String(bS), do, dg.caller)
1058+ let bV = parseIntValue(cB._9)
1059+ let cj = cB._10
1060+ let fD = if (if (aG())
10151061 then true
1016- else (bU == n))
1017- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
1062+ else (bV == n))
1063+ then throw(("Get operation is blocked by admin. Status = " + toString(bV)))
10181064 else true
1019- if ((fr == fr))
1065+ if ((fD == fD))
10201066 then {
1021- let fn = invoke(aA, "burn", [dn], [AttachedPayment(bR, dn)])
1022- if ((fn == fn))
1023- then ci
1067+ let fz = invoke(aB, "burn", [do], [AttachedPayment(bS, do)])
1068+ if ((fz == fz))
1069+ then cj
10241070 else throw("Strict value is not equal to itself.")
10251071 }
10261072 else throw("Strict value is not equal to itself.")
10271073 }
10281074 else throw("Strict value is not equal to itself.")
10291075 }
10301076 else throw("Strict value is not equal to itself.")
10311077 }
10321078
10331079
10341080
1035-@Callable(df)
1036-func unstakeAndGetNoLess (fj,fs,fp) = {
1037- let fd = if (aF())
1081+@Callable(dg)
1082+func unstakeAndGetNoLess (fv,fE,fB) = {
1083+ let fp = if (aG())
10381084 then true
1039- else (aS == n)
1040- let ee = [if (!(fd))
1085+ else (aT == n)
1086+ let ef = [if (!(fp))
10411087 then true
1042- else throw("get operation is blocked by admin"), if ((size(df.payments) == 0))
1088+ else throw("get operation is blocked by admin"), if ((size(dg.payments) == 0))
10431089 then true
10441090 else throw("no payments are expected")]
1045- if ((ee == ee))
1091+ if ((ef == ef))
10461092 then {
1047- let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil)
1048- if ((fk == fk))
1093+ let fw = invoke(ba, "unstake", [toBase58String(aU), fv], nil)
1094+ if ((fw == fw))
10491095 then {
1050- let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller)
1051- let cg = cA._1
1052- let ch = cA._2
1053- let ci = cA._10
1054- let ft = [if ((cg >= fs))
1096+ let cB = bO(toBase58String(dg.transactionId), toBase58String(aU), fv, dg.caller)
1097+ let ch = cB._1
1098+ let ci = cB._2
1099+ let cj = cB._10
1100+ let fF = [if ((ch >= fE))
10551101 then true
1056- else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp))
1102+ else throw(makeString(["amount asset amount to receive is less than ", toString(fE)], "")), if ((ci >= fB))
10571103 then true
1058- else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))]
1059- if ((ft == ft))
1104+ else throw(makeString(["price asset amount to receive is less than ", toString(fB)], ""))]
1105+ if ((fF == fF))
10601106 then {
1061- let fn = invoke(aA, "burn", [fj], [AttachedPayment(aT, fj)])
1062- if ((fn == fn))
1063- then ci
1107+ let fz = invoke(aB, "burn", [fv], [AttachedPayment(aU, fv)])
1108+ if ((fz == fz))
1109+ then cj
10641110 else throw("Strict value is not equal to itself.")
10651111 }
10661112 else throw("Strict value is not equal to itself.")
10671113 }
10681114 else throw("Strict value is not equal to itself.")
10691115 }
10701116 else throw("Strict value is not equal to itself.")
10711117 }
10721118
10731119
10741120
1075-@Callable(df)
1076-func activate (fu,fv) = if ((toString(df.caller) != toString(aA)))
1121+@Callable(dg)
1122+func activate (fG,fH) = if ((toString(dg.caller) != toString(aB)))
10771123 then throw("permissions denied")
1078- else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success")
1124+ else $Tuple2([StringEntry(ab(), fG), StringEntry(ac(), fH)], "success")
10791125
10801126
10811127
1082-@Callable(df)
1083-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
1128+@Callable(dg)
1129+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aI())
10841130
10851131
10861132
1087-@Callable(df)
1088-func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
1133+@Callable(dg)
1134+func getAccBalanceWrapperREADONLY (bs) = $Tuple2(nil, br(bs))
10891135
10901136
10911137
1092-@Callable(df)
1093-func calcPricesWrapperREADONLY (by,bz,bD) = {
1094- let bM = bC(by, bz, bD)
1095- $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
1138+@Callable(dg)
1139+func calcPricesWrapperREADONLY (bz,bA,bE) = {
1140+ let bN = bD(bz, bA, bE)
1141+ $Tuple2(nil, [toString(bN[0]), toString(bN[1]), toString(bN[2])])
10961142 }
10971143
10981144
10991145
1100-@Callable(df)
1146+@Callable(dg)
11011147 func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
11021148
11031149
11041150
1105-@Callable(df)
1151+@Callable(dg)
11061152 func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
11071153
11081154
11091155
1110-@Callable(df)
1111-func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
1156+@Callable(dg)
1157+func calcPriceBigIntWrapperREADONLY (bu,bv) = $Tuple2(nil, toString(bt(parseBigIntValue(bu), parseBigIntValue(bv))))
11121158
11131159
11141160
1115-@Callable(df)
1116-func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
1161+@Callable(dg)
1162+func estimatePutOperationWrapperREADONLY (bP,cl,cm,cn,co,cp,Y,cq,cr) = $Tuple2(nil, ck(bP, cl, cm, cn, co, cp, Y, cq, cr))
11171163
11181164
11191165
1120-@Callable(df)
1121-func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1122- let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1123- $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
1166+@Callable(dg)
1167+func estimateGetOperationWrapperREADONLY (bP,bQ,bR,Y) = {
1168+ let cB = bO(bP, bQ, bR, addressFromStringValue(Y))
1169+ $Tuple2(nil, $Tuple10(cB._1, cB._2, cB._3, cB._4, cB._5, cB._6, cB._7, toString(cB._8), cB._9, cB._10))
11241170 }
11251171
11261172
11271173
1128-@Callable(df)
1174+@Callable(dg)
11291175 func statsREADONLY () = {
1130- let bE = aH()
1131- let bR = fromBase58String(bE[q])
1132- let cS = bE[r]
1133- let cT = bE[s]
1134- let ct = bE[v]
1135- let cu = bE[w]
1136- let bF = parseIntValue(bE[t])
1137- let bG = parseIntValue(bE[u])
1138- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1139- let cU = bq(cS)
1140- let cV = bq(cT)
1141- let fx = if ((fw == 0))
1176+ let bF = aI()
1177+ let bS = fromBase58String(bF[q])
1178+ let cT = bF[r]
1179+ let cU = bF[s]
1180+ let cu = bF[v]
1181+ let cv = bF[w]
1182+ let bG = parseIntValue(bF[t])
1183+ let bH = parseIntValue(bF[u])
1184+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1185+ let cV = br(cT)
1186+ let cW = br(cU)
1187+ let fJ = if ((fI == 0))
11421188 then [e, e, e]
1143- else bC(cU, cV, fw)
1144- let cb = 0
1145- let fy = G(fx[1], b)
1146- let fz = G(fx[2], b)
1147- let fA = value(getInteger(aA, am(toString(this))))
1148- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fw), toString(cb), toString(fy), toString(fz), toString(fA)], j))
1189+ else bD(cV, cW, fI)
1190+ let cc = 0
1191+ let fK = G(fJ[1], b)
1192+ let fL = G(fJ[2], b)
1193+ let fM = value(getInteger(aB, an(toString(this))))
1194+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cV), toString(cW), toString(fI), toString(cc), toString(fK), toString(fL), toString(fM)], j))
11491195 }
11501196
11511197
11521198
1153-@Callable(df)
1154-func evaluatePutByAmountAssetREADONLY (cl) = {
1155- let bE = aH()
1156- let bR = fromBase58String(bE[q])
1157- let cr = bE[r]
1158- let bS = fromBase58String(cr)
1159- let cs = bE[s]
1199+@Callable(dg)
1200+func evaluatePutByAmountAssetREADONLY (cm) = {
1201+ let bF = aI()
1202+ let bS = fromBase58String(bF[q])
1203+ let cs = bF[r]
11601204 let bT = fromBase58String(cs)
1161- let bF = parseIntValue(bE[t])
1162- let bG = parseIntValue(bE[u])
1163- let bU = bE[p]
1164- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1165- let cU = bq(cr)
1166- let cV = bq(cs)
1167- let bA = D(cU, bF)
1205+ let ct = bF[s]
1206+ let bU = fromBase58String(ct)
1207+ let bG = parseIntValue(bF[t])
1208+ let bH = parseIntValue(bF[u])
1209+ let bV = bF[p]
1210+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1211+ let cV = br(cs)
1212+ let cW = br(ct)
11681213 let bB = D(cV, bG)
1169- let ca = if ((fw == 0))
1214+ let bC = D(cW, bH)
1215+ let cb = if ((fI == 0))
11701216 then e
1171- else bs(bB, bA)
1172- let cx = D(cl, bF)
1173- let cy = fraction(cx, ca, d)
1174- let cn = G(cy, bG)
1175- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1176- let cI = dl._1
1177- let fB = dl._3
1178- let bW = dl._4
1179- let bY = dl._5
1180- let bV = dl._6
1181- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1217+ else bt(bC, bB)
1218+ let cy = D(cm, bG)
1219+ let cz = fraction(cy, cb, d)
1220+ let co = G(cz, bH)
1221+ let dm = ck("", 500000, cm, bT, co, bU, "", true, false)
1222+ let cJ = dm._1
1223+ let fN = dm._3
1224+ let bX = dm._4
1225+ let bZ = dm._5
1226+ let bW = dm._6
1227+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cJ), toString(G(cb, b)), toString(bX), toString(bZ), toString(bW), bV, toString(cm), toString(co)], j))
11821228 }
11831229
11841230
11851231
1186-@Callable(df)
1187-func evaluatePutByPriceAssetREADONLY (cn) = {
1188- let bE = aH()
1189- let bR = fromBase58String(bE[q])
1190- let cr = bE[r]
1191- let bS = fromBase58String(cr)
1192- let cs = bE[s]
1232+@Callable(dg)
1233+func evaluatePutByPriceAssetREADONLY (co) = {
1234+ let bF = aI()
1235+ let bS = fromBase58String(bF[q])
1236+ let cs = bF[r]
11931237 let bT = fromBase58String(cs)
1194- let bF = parseIntValue(bE[t])
1195- let bG = parseIntValue(bE[u])
1196- let bU = bE[p]
1197- let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1198- let fC = bq(cr)
1199- let fD = bq(cs)
1200- let fE = D(fC, bF)
1201- let fF = D(fD, bG)
1202- let ca = if ((fw == 0))
1238+ let ct = bF[s]
1239+ let bU = fromBase58String(ct)
1240+ let bG = parseIntValue(bF[t])
1241+ let bH = parseIntValue(bF[u])
1242+ let bV = bF[p]
1243+ let fI = valueOrErrorMessage(assetInfo(bS), (("Asset " + toBase58String(bS)) + " doesn't exist")).quantity
1244+ let fO = br(cs)
1245+ let fP = br(ct)
1246+ let fQ = D(fO, bG)
1247+ let fR = D(fP, bH)
1248+ let cb = if ((fI == 0))
12031249 then e
1204- else bs(fF, fE)
1205- let cy = D(cn, bG)
1206- let cx = fraction(cy, d, ca)
1207- let cl = G(cx, bF)
1208- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1209- let cI = dl._1
1210- let fB = dl._3
1211- let bW = dl._4
1212- let bY = dl._5
1213- let bV = dl._6
1214- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
1250+ else bt(fR, fQ)
1251+ let cz = D(co, bH)
1252+ let cy = fraction(cz, d, cb)
1253+ let cm = G(cy, bG)
1254+ let dm = ck("", 500000, cm, bT, co, bU, "", true, false)
1255+ let cJ = dm._1
1256+ let fN = dm._3
1257+ let bX = dm._4
1258+ let bZ = dm._5
1259+ let bW = dm._6
1260+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cJ), toString(G(cb, b)), toString(bX), toString(bZ), toString(bW), bV, toString(cm), toString(co)], j))
12151261 }
12161262
12171263
12181264
1219-@Callable(df)
1220-func evaluateGetREADONLY (fG,fH) = {
1221- let cA = bN("", fG, fH, this)
1222- let cg = cA._1
1223- let ch = cA._2
1224- let bW = cA._5
1225- let bY = cA._6
1226- let bV = cA._7
1227- let cb = cA._8
1228- let bU = parseIntValue(cA._9)
1229- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cg), toString(ch), toString(bW), toString(bY), toString(bV), toString(cb), toString(bU)], j))
1265+@Callable(dg)
1266+func evaluateGetREADONLY (fS,fT) = {
1267+ let cB = bO("", fS, fT, this)
1268+ let ch = cB._1
1269+ let ci = cB._2
1270+ let bX = cB._5
1271+ let bZ = cB._6
1272+ let bW = cB._7
1273+ let cc = cB._8
1274+ let bV = parseIntValue(cB._9)
1275+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(ch), toString(ci), toString(bX), toString(bZ), toString(bW), toString(cc), toString(bV)], j))
12301276 }
12311277
12321278
1233-@Verifier(fI)
1234-func fJ () = {
1235- let fK = {
1236- let dq = ev()
1237- if ($isInstanceOf(dq, "ByteVector"))
1279+@Verifier(fU)
1280+func fV () = {
1281+ let fW = {
1282+ let dr = ew()
1283+ if ($isInstanceOf(dr, "ByteVector"))
12381284 then {
1239- let ez = dq
1240- ez
1285+ let eA = dr
1286+ eA
12411287 }
1242- else if ($isInstanceOf(dq, "Unit"))
1243- then fI.senderPublicKey
1288+ else if ($isInstanceOf(dr, "Unit"))
1289+ then fU.senderPublicKey
12441290 else throw("Match error")
12451291 }
1246- let dq = fI
1247- if ($isInstanceOf(dq, "Order"))
1292+ let dr = fU
1293+ if ($isInstanceOf(dr, "Order"))
12481294 then {
1249- let cR = dq
1250- let fL = aG()
1251- let ar = cQ(cR)
1252- let as = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1253- let at = sigVerify(cR.bodyBytes, cR.proofs[1], fL)
1254- if (if (if (ar)
1255- then as
1256- else false)
1295+ let cS = dr
1296+ let fX = aH()
1297+ let as = cR(cS)
1298+ let at = sigVerify(cS.bodyBytes, cS.proofs[0], cS.senderPublicKey)
1299+ let au = sigVerify(cS.bodyBytes, cS.proofs[1], fX)
1300+ if (if (if (as)
12571301 then at
12581302 else false)
1303+ then au
1304+ else false)
12591305 then true
1260- else aq(ar, as, at)
1306+ else ar(as, at, au)
12611307 }
1262- else if ($isInstanceOf(dq, "SetScriptTransaction"))
1308+ else if ($isInstanceOf(dr, "SetScriptTransaction"))
12631309 then {
1264- let ew = dq
1265- let fM = blake2b256(value(ew.script))
1266- let fN = fromBase64String(value(getString(aA, ao())))
1267- let fO = scriptHash(this)
1268- if (if ((fN == fM))
1269- then (fO != fM)
1310+ let ex = dr
1311+ let fY = blake2b256(value(ex.script))
1312+ let fZ = fromBase64String(value(getString(aB, ap())))
1313+ let ga = scriptHash(this)
1314+ if (if ((fZ == fY))
1315+ then (ga != fY)
12701316 else false)
12711317 then true
1272- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1318+ else sigVerify(fU.bodyBytes, fU.proofs[0], fW)
12731319 }
1274- else sigVerify(fI.bodyBytes, fI.proofs[0], fK)
1320+ else sigVerify(fU.bodyBytes, fU.proofs[0], fW)
12751321 }
12761322

github/deemru/w8io/026f985 
401.24 ms