tx · D3HqXfxmoJK1aYh6j8DmK6VQ4Ev4jvdMm6Djso6Xqcos

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.03100000 Waves

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

{ "type": 13, "id": "D3HqXfxmoJK1aYh6j8DmK6VQ4Ev4jvdMm6Djso6Xqcos", "fee": 3100000, "feeAssetId": null, "timestamp": 1670567515976, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "nqwcqTvEEXjTh8vMa8NNU7B3wjXHz7UY1Eih5UDdhr8oMhHtGiFYJx5J64cdAsjjyVEb98PxqiHNb46apXr1Qb6" ], "script": "base64:BgKhIggCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbXRBc0lkIg1pZHhJUHJpY2VBc0lkIg9pZHhGYWN0U3Rha0N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kWAZzY3JpcHQEAmdVCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYUYJAQJhcQAEAmdWCQDxBwEFBHRoaXMDAwkAAAIFAmdVBQJnVAkBAiE9AgUCZ1YFAmdUBwYJAPQDAwgFAmdNCWJvZHlCeXRlcwkAkQMCCAUCZ00GcHJvb2ZzAAAFAmdPCQD0AwMIBQJnTQlib2R5Qnl0ZXMJAJEDAggFAmdNBnByb29mcwAABQJnT6kdqhQ=", "chainId": 84, "height": 2352430, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HtqZBdmkGa8XV7JaW6AFRiLZcB3LzjdoLC8XUgTUtmd7 Next: 2C6YVhaGZyj5ZAEGQDBGjGVhoV13tJvK2cAYiNeWRdaJ Diff:
OldNewDifferences
1515
1616 let g = toBigInt(2)
1717
18-let h = toBigInt(3)
18+let h = toBigInt((a - ((a * 1) / a)))
1919
20-let i = toBigInt(4)
20+let i = "WAVES"
2121
22-let j = toBigInt((a - ((a * 1) / a)))
22+let j = "100"
2323
24-let k = "WAVES"
24+let k = "1"
2525
26-let l = "100"
26+let l = "__"
2727
28-let m = "1"
28+let m = ""
2929
30-let n = "__"
30+let n = 1
3131
32-let o = ""
32+let o = 2
3333
34-let p = 1
34+let p = 3
3535
36-let q = 2
36+let q = 4
3737
38-let r = 3
38+let r = 1
3939
40-let s = 4
40+let s = 2
4141
42-let t = 1
42+let t = 3
4343
44-let u = 2
44+let u = 4
4545
46-let v = 3
46+let v = 5
4747
48-let w = 4
48+let w = 6
4949
50-let x = 5
50+let x = 7
5151
52-let y = 6
52+let y = 8
5353
54-let z = 7
54+let z = 9
5555
56-let A = 8
56+let A = 1
5757
58-let B = 9
58+let B = 6
5959
60-let C = 1
60+let C = 7
6161
62-let D = 6
62+let D = 10
6363
64-let E = 7
64+let E = fraction(10, a, 10000)
6565
66-let F = 10
67-
68-let G = fraction(10, a, 10000)
69-
70-func H (I,J) = fraction(toBigInt(I), c, toBigInt(J))
66+func F (G,H) = fraction(toBigInt(G), c, toBigInt(H))
7167
7268
73-func K (L,M) = toInt(fraction(L, toBigInt(M), c))
69+func I (J,K) = toInt(fraction(J, toBigInt(K), c))
7470
7571
76-func N (O,P,Q) = fraction(O, P, Q)
72+func L (M,N,O) = fraction(M, N, O)
7773
7874
79-func R (L) = if ((d > L))
80- then -(L)
81- else L
75+func P (J) = if ((d > J))
76+ then -(J)
77+ else J
8278
8379
84-func S (L) = if ((d > L))
85- then -(L)
86- else L
80+func Q (J) = if ((d > J))
81+ then -(J)
82+ else J
8783
8884
89-func T () = "%s__factoryContract"
85+func R () = "%s__factoryContract"
9086
9187
92-func U () = "%s__managerPublicKey"
88+func S () = "%s__managerPublicKey"
9389
9490
95-func V () = "%s__pendingManagerPublicKey"
91+func T () = "%s__pendingManagerPublicKey"
9692
9793
98-func W () = "%s%s__price__last"
94+func U () = "%s%s__price__last"
9995
10096
101-func X (Y,Z) = makeString(["%s%s%d%d__price__history", toString(Y), toString(Z)], n)
97+func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], l)
10298
10399
104-func aa (ab,ac) = ((("%s%s%s__P__" + ab) + "__") + ac)
100+func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
105101
106102
107-func ad (ab,ac) = ((("%s%s%s__G__" + ab) + "__") + ac)
103+func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
108104
109105
110-func ae () = "%s__amountAsset"
106+func ac () = "%s__amountAsset"
111107
112108
113-func af () = "%s__priceAsset"
109+func ad () = "%s__priceAsset"
114110
115111
116-func ag () = "%s__amp"
112+func ae () = "%s__amp"
117113
118114
119-func ah () = "%s__addonAddr"
115+func af () = "%s__addonAddr"
120116
121117
122-let ai = "%s__fee"
118+let ag = "%s__fee"
123119
124-let aj = valueOrElse(getInteger(this, ai), G)
120+let ah = valueOrElse(getInteger(this, ag), E)
125121
126-let ak = makeString(["%s", "dLp"], n)
127-
128-let al = makeString(["%s", "dLpRefreshedHeight"], n)
129-
130-let am = makeString(["%s", "refreshDLpDelay"], n)
131-
132-let an = 1
133-
134-let ao = valueOrElse(getInteger(this, am), an)
135-
136-func ap () = "%s__factoryConfig"
122+func ai () = "%s__factoryConfig"
137123
138124
139-func aq () = "%s%s__matcher__publicKey"
125+func aj () = "%s%s__matcher__publicKey"
140126
141127
142-func ar (as,at) = (((("%d%d%s__" + as) + "__") + at) + "__config")
128+func ak (al,am) = (((("%d%d%s__" + al) + "__") + am) + "__config")
143129
144130
145-func au (av) = ("%s%s%s__mappings__baseAsset2internalId__" + av)
131+func an (ao) = ("%s%s%s__mappings__baseAsset2internalId__" + ao)
146132
147133
148-func aw () = "%s__shutdown"
134+func ap () = "%s__shutdown"
149135
150136
151-func ax () = "%s__allowedLpStableScriptHash"
137+func aq () = "%s__allowedLpStableScriptHash"
152138
153139
154-func ay () = "%s__feeCollectorAddress"
140+func ar () = "%s__feeCollectorAddress"
155141
156142
157-func az (aA,aB,aC) = throw(((((("Failed: ordValid=" + toString(aA)) + " sndrValid=") + toString(aB)) + " mtchrValid=") + toString(aC)))
143+func as (at,au,av) = throw(((((("Failed: ordValid=" + toString(at)) + " sndrValid=") + toString(au)) + " mtchrValid=") + toString(av)))
158144
159145
160-func aD (L) = {
161- let aE = L
162- if ($isInstanceOf(aE, "String"))
146+func aw (J) = {
147+ let ax = J
148+ if ($isInstanceOf(ax, "String"))
163149 then {
164- let aF = aE
165- aF
150+ let ay = ax
151+ ay
166152 }
167153 else throw("fail cast to String")
168154 }
169155
170156
171-func aG (aH,aI) = valueOrErrorMessage(getString(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " not defined"], ""))
157+func az (aA,aB) = valueOrErrorMessage(getString(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
172158
173159
174-func aJ (aH,aI) = valueOrErrorMessage(getInteger(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " not defined"], ""))
160+func aC (aA,aB) = valueOrErrorMessage(getInteger(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
175161
176162
177-func aK (aL) = throw(makeString(["lp_stable.ride:", aL], " "))
163+func aD (aE) = throw(makeString(["lp_stable.ride:", aE], " "))
178164
179165
180-func aM (aL) = makeString(["lp_stable.ride:", aL], " ")
166+let aF = addressFromStringValue(az(this, R()))
167+
168+let aG = az(this, ae())
169+
170+func aH () = valueOrElse(getBoolean(aF, ap()), false)
181171
182172
183-let aN = addressFromStringValue(aG(this, T()))
184-
185-let aO = aG(this, ag())
186-
187-func aP () = valueOrElse(getBoolean(aN, aw()), false)
173+func aI () = fromBase58String(az(aF, aj()))
188174
189175
190-func aQ () = fromBase58String(aG(aN, aq()))
176+let aJ = addressFromStringValue(az(aF, ar()))
191177
192-
193-let aR = addressFromStringValue(aG(aN, ay()))
194-
195-func aS () = {
196- let aT = aG(this, ae())
197- let aU = aG(this, af())
198- let aV = aJ(aN, au(aU))
199- let as = aJ(aN, au(aT))
200- split(aG(aN, ar(toString(as), toString(aV))), n)
178+func aK () = {
179+ let aL = az(this, ac())
180+ let aM = az(this, ad())
181+ let aN = aC(aF, an(aM))
182+ let al = aC(aF, an(aL))
183+ split(az(aF, ak(toString(al), toString(aN))), l)
201184 }
202185
203186
204-func aW (aX) = if ((aX == k))
187+func aO (aP) = if ((aP == i))
205188 then unit
206- else fromBase58String(aX)
189+ else fromBase58String(aP)
207190
208191
209-func aY (aX) = if ((aX == unit))
210- then k
211- else toBase58String(value(aX))
192+func aQ (aP) = if ((aP == unit))
193+ then i
194+ else toBase58String(value(aP))
212195
213196
214-func aZ (ba) = $Tuple7(addressFromStringValue(ba[t]), parseIntValue(ba[u]), fromBase58String(ba[v]), aW(ba[w]), aW(ba[x]), parseIntValue(ba[y]), parseIntValue(ba[z]))
197+func aR (aS) = $Tuple7(addressFromStringValue(aS[r]), parseIntValue(aS[s]), fromBase58String(aS[t]), aO(aS[u]), aO(aS[v]), parseIntValue(aS[w]), parseIntValue(aS[x]))
215198
216199
217-let bb = aZ(aS())
200+let aT = aR(aK())
218201
219-let bc = bb
202+let aU = aT
220203
221-let bd = bc._1
204+let aV = aU._1
222205
223-let be = bc._2
206+let aW = aU._2
224207
225-let bf = bc._3
208+let aX = aU._3
226209
227-let bg = bc._4
210+let aY = aU._4
228211
229-let bh = bc._5
212+let aZ = aU._5
230213
231-let bi = bc._6
214+let ba = aU._6
232215
233-let bj = bc._7
216+let bb = aU._7
234217
235-func bk () = split(aG(aN, ap()), n)
218+func bc () = split(az(aF, ai()), l)
236219
237220
238-let bl = bk()
221+let bd = bc()
239222
240-let bm = valueOrErrorMessage(addressFromString(bl[C]), "Invalid staking contract address")
223+let be = valueOrErrorMessage(addressFromString(bd[A]), "Invalid staking contract address")
241224
242-let bn = valueOrErrorMessage(addressFromString(bl[E]), "Invalid slipage contract address")
225+let bf = valueOrErrorMessage(addressFromString(bd[C]), "Invalid slipage contract address")
243226
244-let bo = valueOrErrorMessage(addressFromString(bl[F]), "Invalid gwx contract address")
227+let bg = valueOrErrorMessage(addressFromString(bd[D]), "Invalid gwx contract address")
245228
246-let bp = valueOrErrorMessage(addressFromString(bl[D]), "Invalid gwx contract address")
229+let bh = valueOrErrorMessage(addressFromString(bd[B]), "Invalid gwx contract address")
247230
248-func bq (br,bs,bt,bu,bv,bw,bx,by,bz,bA) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by), toString(bz), toString(bA)], n)
231+func bi (bj,bk,bl,bm,bn,bo,bp,bq,br,bs) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bj), toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs)], l)
249232
250233
251-func bB (bC,bD,bE,bu,bx,by) = makeString(["%d%d%d%d%d%d", toString(bC), toString(bD), toString(bE), toString(bu), toString(bx), toString(by)], n)
234+func bt (bu,bv,bw,bm,bp,bq) = makeString(["%d%d%d%d%d%d", toString(bu), toString(bv), toString(bw), toString(bm), toString(bp), toString(bq)], l)
252235
253236
254-func bF (bG) = if ((bG == "WAVES"))
237+func bx (by) = if ((by == "WAVES"))
255238 then wavesBalance(this).available
256- else assetBalance(this, fromBase58String(bG))
239+ else assetBalance(this, fromBase58String(by))
257240
258241
259-func bH (bI,bJ) = fraction(bI, c, bJ)
242+func bz (bA,bB) = fraction(bA, c, bB)
260243
261244
262-func bK (bL,bM,bN) = {
263- let bO = fraction((bL - bM), b, bM)
264- let bP = ((bN - R(bO)) > d)
265- if (!(bP))
266- then throw(("Big slpg: " + toString(bO)))
267- else $Tuple2(bP, min([bL, bM]))
245+func bC (bD,bE,bF) = {
246+ let bG = fraction((bD - bE), b, bE)
247+ let bH = ((bF - P(bG)) > d)
248+ if (!(bH))
249+ then throw(("Big slpg: " + toString(bG)))
250+ else $Tuple2(bH, min([bD, bE]))
268251 }
269252
270253
271-func bQ (bR,bS,bT) = {
272- let bO = fraction(bS, b, bR)
273- let bU = (bT > bO)
274- if (if (bU)
254+func bI (bJ,bK,bL) = {
255+ let bG = fraction(bK, b, bJ)
256+ let bM = (bL > bG)
257+ if (if (bM)
275258 then true
276- else (bS > bR))
277- then throw(((((((toString(bS) + " ") + toString(bR)) + " ") + toString(bO)) + " ") + toString(bT)))
278- else bU
259+ else (bK > bJ))
260+ then throw(((((((toString(bK) + " ") + toString(bJ)) + " ") + toString(bG)) + " ") + toString(bL)))
261+ else bM
279262 }
280263
281264
282-func bV (bW,bX,bY,bZ) = {
283- let ca = H(bY, bW)
284- let cb = H(bZ, bX)
285- bH(cb, ca)
265+func bN (bO,bP,bQ,bR) = {
266+ let bS = F(bQ, bO)
267+ let bT = F(bR, bP)
268+ bz(bT, bS)
286269 }
287270
288271
289-func cc (bY,bZ,cd) = {
290- let ce = aS()
291- let cf = parseIntValue(ce[y])
292- let cg = parseIntValue(ce[z])
293- let ch = bV(cf, cg, bY, bZ)
294- let bJ = H(bY, cf)
295- let bI = H(bZ, cg)
296- let ci = H(cd, a)
297- let cj = bH(bJ, ci)
298- let ck = bH(bI, ci)
299-[ch, cj, ck]
272+func bU (bQ,bR,bV) = {
273+ let bW = aK()
274+ let bX = parseIntValue(bW[w])
275+ let bY = parseIntValue(bW[x])
276+ let bZ = bN(bX, bY, bQ, bR)
277+ let bB = F(bQ, bX)
278+ let bA = F(bR, bY)
279+ let ca = F(bV, a)
280+ let cb = bz(bB, ca)
281+ let cc = bz(bA, ca)
282+[bZ, cb, cc]
300283 }
301284
302285
303-func cl (bY,bZ,cd) = {
304- let cm = cc(bY, bZ, cd)
305-[K(cm[0], a), K(cm[1], a), K(cm[2], a)]
286+func cd (bQ,bR,bV) = {
287+ let ce = bU(bQ, bR, bV)
288+[I(ce[0], a), I(ce[1], a), I(ce[2], a)]
306289 }
307290
308291
309-func cn (co) = {
310- let cp = fraction(co, aj, a)
311- $Tuple2((co - cp), cp)
292+func cf (cg) = {
293+ let ch = fraction(cg, ah, a)
294+ $Tuple2((cg - ch), ch)
312295 }
313296
314297
315-func cq (cr,cs,ct,cu) = {
316- let ce = aS()
317- let cv = ce[v]
318- let cw = ce[w]
319- let cx = ce[x]
320- let cy = parseIntValue(ce[y])
321- let cz = parseIntValue(ce[z])
322- let cA = ce[u]
323- let cB = valueOrErrorMessage(assetInfo(fromBase58String(cv)), "Wrong LP id").quantity
324- if ((cv != cs))
298+func ci (cj,ck,cl,cm) = {
299+ let bW = aK()
300+ let cn = bW[t]
301+ let co = bW[u]
302+ let cp = bW[v]
303+ let cq = parseIntValue(bW[w])
304+ let cr = parseIntValue(bW[x])
305+ let cs = bW[s]
306+ let ct = valueOrErrorMessage(assetInfo(fromBase58String(cn)), "Wrong LP id").quantity
307+ if ((cn != ck))
325308 then throw("Wrong pmt asset")
326309 else {
327- let cC = bF(cw)
328- let cD = H(cC, cy)
329- let cE = bF(cx)
330- let cF = H(cE, cz)
331- let cG = bH(cF, cD)
332- let cH = K(cG, a)
333- let cI = H(ct, a)
334- let cJ = H(cB, a)
335- let cK = fraction(cD, cI, cJ)
336- let cL = fraction(cF, cI, cJ)
337- let cM = K(cK, cy)
338- let cN = K(cL, cz)
339- let cO = if ((cr == ""))
310+ let cu = bx(co)
311+ let cv = F(cu, cq)
312+ let cw = bx(cp)
313+ let cx = F(cw, cr)
314+ let cy = bz(cx, cv)
315+ let cz = I(cy, a)
316+ let cA = F(cl, a)
317+ let cB = F(ct, a)
318+ let cC = fraction(cv, cA, cB)
319+ let cD = fraction(cx, cA, cB)
320+ let cE = I(cC, cq)
321+ let cF = I(cD, cr)
322+ let cG = if ((cj == ""))
340323 then nil
341- else [ScriptTransfer(cu, cM, if ((cw == "WAVES"))
324+ else [ScriptTransfer(cm, cE, if ((co == "WAVES"))
342325 then unit
343- else fromBase58String(cw)), ScriptTransfer(cu, cN, if ((cx == "WAVES"))
326+ else fromBase58String(co)), ScriptTransfer(cm, cF, if ((cp == "WAVES"))
344327 then unit
345- else fromBase58String(cx)), StringEntry(ad(toString(cu), cr), bB(cM, cN, ct, cH, height, lastBlock.timestamp)), IntegerEntry(W(), cH), IntegerEntry(X(height, lastBlock.timestamp), cH)]
346- $Tuple10(cM, cN, cw, cx, cC, cE, cB, cG, cA, cO)
328+ else fromBase58String(cp)), StringEntry(ab(toString(cm), cj), bt(cE, cF, cl, cz, height, lastBlock.timestamp)), IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz)]
329+ $Tuple10(cE, cF, co, cp, cu, cw, ct, cy, cs, cG)
347330 }
348331 }
349332
350333
351-func cP (cr,bN,cQ,cR,cS,cT,cu,cU,cV,cW,cX,cY,cZ) = {
352- let ce = aS()
353- let cv = fromBase58String(ce[v])
354- let da = ce[w]
355- let db = ce[x]
356- let dc = ce[A]
357- let dd = ce[B]
358- let de = parseIntValue(ce[y])
359- let df = parseIntValue(ce[z])
360- let cA = ce[u]
361- let dg = valueOrErrorMessage(assetInfo(cv), "Wr lp as").quantity
362- let cC = if (cU)
363- then bF(da)
364- else if (if (cW)
365- then (cZ == da)
334+func cH (cj,bF,cI,cJ,cK,cL,cm,cM,cN,cO,cP,cQ,cR) = {
335+ let bW = aK()
336+ let cn = fromBase58String(bW[t])
337+ let cS = bW[u]
338+ let cT = bW[v]
339+ let cU = bW[y]
340+ let cV = bW[z]
341+ let cW = parseIntValue(bW[w])
342+ let cX = parseIntValue(bW[x])
343+ let cs = bW[s]
344+ let cY = valueOrErrorMessage(assetInfo(cn), "Wr lp as").quantity
345+ let cu = if (cM)
346+ then bx(cS)
347+ else if (if (cO)
348+ then (cR == cS)
366349 else false)
367- then (bF(da) - cY)
368- else if (cW)
369- then bF(da)
370- else (bF(da) - cQ)
371- let cE = if (cU)
372- then bF(db)
373- else if (if (cW)
374- then (cZ == db)
350+ then (bx(cS) - cQ)
351+ else if (cO)
352+ then bx(cS)
353+ else (bx(cS) - cI)
354+ let cw = if (cM)
355+ then bx(cT)
356+ else if (if (cO)
357+ then (cR == cT)
375358 else false)
376- then (bF(db) - cY)
377- else if (cW)
378- then bF(db)
379- else (bF(db) - cS)
380- let dh = H(cQ, de)
381- let di = H(cS, df)
382- let dj = bH(di, dh)
383- let cD = H(cC, de)
384- let cF = H(cE, df)
385- let dk = if ((dg == 0))
359+ then (bx(cT) - cQ)
360+ else if (cO)
361+ then bx(cT)
362+ else (bx(cT) - cK)
363+ let cZ = F(cI, cW)
364+ let da = F(cK, cX)
365+ let db = bz(da, cZ)
366+ let cv = F(cu, cW)
367+ let cx = F(cw, cX)
368+ let dc = if ((cY == 0))
386369 then {
387- let cG = d
388- let dl = d
389- let ci = pow((dh * di), 0, toBigInt(5), 1, 0, DOWN)
390- $Tuple5(K(ci, a), K(dh, de), K(di, df), bH((cF + di), (cD + dh)), dl)
370+ let cy = d
371+ let dd = d
372+ let ca = pow((cZ * da), 0, toBigInt(5), 1, 0, DOWN)
373+ $Tuple5(I(ca, a), I(cZ, cW), I(da, cX), bz((cx + da), (cv + cZ)), dd)
391374 }
392375 else {
393- let cG = bH(cF, cD)
394- let dm = fraction(R((cG - dj)), c, cG)
395- let dl = H(bN, a)
396- if (if (if (cX)
397- then (cG != d)
376+ let cy = bz(cx, cv)
377+ let de = fraction(P((cy - db)), c, cy)
378+ let dd = F(bF, a)
379+ if (if (if (cP)
380+ then (cy != d)
398381 else false)
399- then (dm > dl)
382+ then (de > dd)
400383 else false)
401- then throw(((("Price slippage " + toString(dm)) + " > ") + toString(dl)))
384+ then throw(((("Price slippage " + toString(de)) + " > ") + toString(dd)))
402385 else {
403- let dn = H(dg, a)
404- let do = fraction(dh, cG, c)
405- let dp = fraction(di, c, cG)
406- let dq = if ((do > di))
407- then $Tuple2(dp, di)
408- else $Tuple2(dh, do)
409- let dr = dq._1
410- let ds = dq._2
411- let ci = fraction(dn, ds, cF)
412- $Tuple5(K(ci, a), K(dr, de), K(ds, df), cG, dl)
386+ let df = F(cY, a)
387+ let dg = fraction(cZ, cy, c)
388+ let dh = fraction(da, c, cy)
389+ let di = if ((dg > da))
390+ then $Tuple2(dh, da)
391+ else $Tuple2(cZ, dg)
392+ let dj = di._1
393+ let dk = di._2
394+ let ca = fraction(df, dk, cx)
395+ $Tuple5(I(ca, a), I(dj, cW), I(dk, cX), cy, dd)
413396 }
414397 }
415- let dt = dk._1
416- let du = dk._2
417- let dv = dk._3
418- let cH = K(dk._4, a)
419- let dw = K(dk._5, a)
420- if ((0 >= dt))
398+ let dl = dc._1
399+ let dm = dc._2
400+ let dn = dc._3
401+ let cz = I(dc._4, a)
402+ let do = I(dc._5, a)
403+ if ((0 >= dl))
421404 then throw("LP <= 0")
422405 else {
423- let dx = if (!(cV))
406+ let dp = if (!(cN))
424407 then 0
425- else dt
426- let dy = (cQ - du)
427- let dz = (cS - dv)
428- let dA = if (if (cW)
429- then (cZ == da)
408+ else dl
409+ let dq = (cI - dm)
410+ let dr = (cK - dn)
411+ let ds = if (if (cO)
412+ then (cR == cS)
430413 else false)
431- then $Tuple2(cY, 0)
432- else if (if (cW)
433- then (cZ == db)
414+ then $Tuple2(cQ, 0)
415+ else if (if (cO)
416+ then (cR == cT)
434417 else false)
435- then $Tuple2(0, cY)
436- else $Tuple2(du, dv)
437- let dB = dA._1
438- let dC = dA._2
439- let dD = [IntegerEntry(W(), cH), IntegerEntry(X(height, lastBlock.timestamp), cH), StringEntry(aa(cu, cr), bq(dB, dC, dx, cH, bN, dw, height, lastBlock.timestamp, dy, dz))]
440- $Tuple13(dt, dx, cH, cC, cE, dg, cv, cA, dD, dy, dz, cR, cT)
418+ then $Tuple2(0, cQ)
419+ else $Tuple2(dm, dn)
420+ let dt = ds._1
421+ let du = ds._2
422+ let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, cj), bi(dt, du, dp, cz, bF, do, height, lastBlock.timestamp, dq, dr))]
423+ $Tuple13(dl, dp, cz, cu, cw, cY, cn, cs, dv, dq, dr, cJ, cL)
441424 }
442425 }
443426
444427
445-func dE (dF) = {
446- let dG = dF[0]
447- let dH = dF[1]
448- let dI = (dG + dH)
449- if ((dI == e))
450- then e
428+func dw (dx) = {
429+ let bW = aK()
430+ let dy = bW[u]
431+ let dz = bW[v]
432+ let cs = parseIntValue(bW[s])
433+ let bX = parseIntValue(bW[w])
434+ let bY = parseIntValue(bW[x])
435+ let dA = bx(dy)
436+ let dB = bx(dz)
437+ let cy = if ((dx.orderType == Buy))
438+ then bN(bX, bY, (dA + dx.amount), dB)
439+ else bN(bX, bY, (dA - dx.amount), dB)
440+ let cz = I(cy, a)
441+ if (if (if (aH())
442+ then true
443+ else (cs == p))
444+ then true
445+ else (cs == q))
446+ then throw("Admin blocked")
451447 else {
452- let dJ = parseIntValue(aO)
453- let dK = (dJ * 2)
454- let cm = fraction(dG, dH, f)
455- let dL = fraction(cm, i, f)
456- let dM = fraction(toBigInt(dK), dI, f)
457- let dN = toBigInt((dK - 1))
458- func dO (dP) = {
459- let dQ = fraction(dP, dP, f)
460- let dR = fraction(dQ, dP, f)
461- let dS = fraction(dR, f, dL)
462- fraction((dM + fraction(dS, g, f)), dP, (fraction(dN, dP, f) + fraction(h, dS, f)), CEILING)
463- }
464-
465- func dT (dU,dV) = if (dU._2)
466- then dU
448+ let dC = dx.assetPair.amountAsset
449+ let dD = if ((dC == unit))
450+ then "WAVES"
451+ else toBase58String(value(dC))
452+ let dE = dx.assetPair.priceAsset
453+ let dF = if ((dE == unit))
454+ then "WAVES"
455+ else toBase58String(value(dE))
456+ if (if ((dD != dy))
457+ then true
458+ else (dF != dz))
459+ then throw("Wr assets")
467460 else {
468- let dP = dU._1
469- let dW = dO(dP)
470- let dX = toInt((dW - value(dP)))
471- let dY = if ((0 > dX))
472- then -(dX)
473- else dX
474- if ((1 >= dY))
475- then $Tuple2(dW, true)
476- else $Tuple2(dW, false)
461+ let dG = dx.price
462+ let cX = fraction(a, bY, bX)
463+ let dH = L(dG, a, cX)
464+ let dI = if ((dx.orderType == Buy))
465+ then (cz >= dH)
466+ else (dH >= cz)
467+ true
477468 }
478-
479- let dZ = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
480- let ea = {
481- let eb = dZ
482- let ec = size(eb)
483- let ed = $Tuple2(dI, false)
484- func ee (ef,eg) = if ((eg >= ec))
485- then ef
486- else dT(ef, eb[eg])
487-
488- func eh (ef,eg) = if ((eg >= ec))
489- then ef
490- else throw("List size exceeds 15")
491-
492- eh(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ed, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
493- }
494- let dP = ea._1
495- let ei = ea._2
496- if (ei)
497- then dP
498- else throw(("D calculation error, D = " + toString(dP)))
499469 }
500470 }
501471
502472
503-func ej (dF) = {
504- let ek = g
505- let dG = dF[0]
506- let dH = dF[1]
507- let el = parseBigIntValue(l)
508- let dJ = (parseBigIntValue(aO) * el)
509- let dI = (dG + dH)
510- if ((dI == e))
473+func dJ (dK) = if ((size(dK.payments) != 1))
474+ then throw("1 pmnt exp")
475+ else {
476+ let dL = value(dK.payments[0])
477+ let ck = value(dL.assetId)
478+ let cQ = dL.amount
479+ let dc = ci(toBase58String(dK.transactionId), toBase58String(ck), cQ, dK.caller)
480+ let cE = dc._1
481+ let cF = dc._2
482+ let cs = parseIntValue(dc._9)
483+ let cG = dc._10
484+ if (if (aH())
485+ then true
486+ else (cs == q))
487+ then throw(("Admin blocked: " + toString(cs)))
488+ else $Tuple5(cE, cF, cQ, ck, cG)
489+ }
490+
491+
492+func dM (dN,aa,dO,dP,bF,cN,cO,cP,cQ,cR) = {
493+ let dc = cH(aa, bF, value(dO).amount, value(dO).assetId, value(dP).amount, value(dP).assetId, dN, (aa == ""), cN, cO, cP, cQ, cR)
494+ let cs = parseIntValue(dc._8)
495+ if (if (if (aH())
496+ then true
497+ else (cs == o))
498+ then true
499+ else (cs == q))
500+ then throw(("Blocked:" + toString(cs)))
501+ else dc
502+ }
503+
504+
505+func dQ (dR) = {
506+ let dS = g
507+ let dT = dR[0]
508+ let dU = dR[1]
509+ let dV = parseBigIntValue(j)
510+ let dW = (parseBigIntValue(aG) * dV)
511+ let dX = (dT + dU)
512+ if ((dX == e))
511513 then e
512514 else {
513- let dK = (dJ * ek)
514- let dL = (((dG * dH) * ek) * ek)
515- let em = ((dK * dI) / el)
516- let en = (dK - el)
517- let eo = (ek + f)
518- func dT (dU,ep) = {
519- let eq = dU
520- let dP = eq._1
521- let ei = eq._2
515+ let dY = (dW * dS)
516+ let dZ = (((dT * dU) * dS) * dS)
517+ let ea = ((dY * dX) / dV)
518+ let eb = (dY - dV)
519+ let ec = (dS + f)
520+ func ed (ee,ef) = {
521+ let eg = ee
522+ let eh = eg._1
523+ let ei = eg._2
522524 if ((ei != unit))
523- then dU
525+ then ee
524526 else {
525- let dS = (((dP * dP) * dP) / dL)
526- let dW = (((em + (dS * ek)) * dP) / (((en * dP) / el) + (eo * dS)))
527- let dY = S((dW - value(dP)))
528- if ((f >= dY))
529- then $Tuple2(dW, ep)
530- else $Tuple2(dW, unit)
527+ let ej = (((eh * eh) * eh) / dZ)
528+ let ek = (((ea + (ej * dS)) * eh) / (((eb * eh) / dV) + (ec * ej)))
529+ let el = Q((ek - value(eh)))
530+ if ((f >= el))
531+ then $Tuple2(ek, ef)
532+ else $Tuple2(ek, unit)
531533 }
532534 }
533535
534- let dZ = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
535- let er = {
536- let eb = dZ
537- let ec = size(eb)
538- let ed = $Tuple2(dI, unit)
539- func ee (ef,eg) = if ((eg >= ec))
540- then ef
541- else dT(ef, eb[eg])
536+ let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
537+ let en = {
538+ let eo = em
539+ let ep = size(eo)
540+ let eq = $Tuple2(dX, unit)
541+ func er (es,et) = if ((et >= ep))
542+ then es
543+ else ed(es, eo[et])
542544
543- func eh (ef,eg) = if ((eg >= ec))
544- then ef
545+ func eu (es,et) = if ((et >= ep))
546+ then es
545547 else throw("List size exceeds 15")
546548
547- eh(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ed, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
549+ eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
548550 }
549- let dP = er._1
550- let ei = er._2
551+ let eh = en._1
552+ let ei = en._2
551553 if ((ei != unit))
552- then dP
553- else throw(("D calculation error, D = " + toString(dP)))
554+ then eh
555+ else throw(("D calculation error, D = " + toString(eh)))
554556 }
555557 }
556558
557559
558-func es (dF,dV,et) = {
559- let ek = g
560- let eu = dF[if ((dV == 0))
560+func ev (dR,dK,ew) = {
561+ let dS = g
562+ let ex = dR[if ((dK == 0))
561563 then 1
562564 else 0]
563- let el = parseBigIntValue(l)
564- let dJ = (parseBigIntValue(aO) * el)
565- let dI = eu
566- let dK = (dJ * ek)
567- let ev = (((((et * et) / (eu * ek)) * et) * el) / (dK * ek))
568- let ew = ((dI + ((et * el) / dK)) - et)
569- func dT (dU,ep) = {
570- let ex = dU
571- let ey = ex._1
572- let ei = ex._2
565+ let dV = parseBigIntValue(j)
566+ let dW = (parseBigIntValue(aG) * dV)
567+ let dX = ex
568+ let dY = (dW * dS)
569+ let ey = (((((ew * ew) / (ex * dS)) * ew) * dV) / (dY * dS))
570+ let ez = ((dX + ((ew * dV) / dY)) - ew)
571+ func ed (ee,ef) = {
572+ let eA = ee
573+ let eB = eA._1
574+ let ei = eA._2
573575 if ((ei != unit))
574- then dU
576+ then ee
575577 else {
576- let ez = (((ey * ey) + ev) / ((g * ey) + ew))
577- let eA = S((ez - value(ey)))
578- if ((f >= eA))
579- then $Tuple2(ez, ep)
580- else $Tuple2(ez, unit)
578+ let eC = (((eB * eB) + ey) / ((g * eB) + ez))
579+ let eD = Q((eC - value(eB)))
580+ if ((f >= eD))
581+ then $Tuple2(eC, ef)
582+ else $Tuple2(eC, unit)
581583 }
582584 }
583585
584- let dZ = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
585- let eB = {
586- let eb = dZ
587- let ec = size(eb)
588- let ed = $Tuple2(et, unit)
589- func ee (ef,eg) = if ((eg >= ec))
590- then ef
591- else dT(ef, eb[eg])
586+ let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
587+ let eE = {
588+ let eo = em
589+ let ep = size(eo)
590+ let eq = $Tuple2(ew, unit)
591+ func er (es,et) = if ((et >= ep))
592+ then es
593+ else ed(es, eo[et])
592594
593- func eh (ef,eg) = if ((eg >= ec))
594- then ef
595+ func eu (es,et) = if ((et >= ep))
596+ then es
595597 else throw("List size exceeds 15")
596598
597- eh(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ed, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
599+ eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
598600 }
599- let ey = eB._1
600- let ei = eB._2
601+ let eB = eE._1
602+ let ei = eE._2
601603 if ((ei != unit))
602- then ey
603- else throw(("Y calculation error, Y = " + toString(ey)))
604+ then eB
605+ else throw(("Y calculation error, Y = " + toString(eB)))
604606 }
605607
606608
607-func eC (eD,eE,eF) = {
608- let eG = fraction(dE([eD, eE]), c, eF)
609- if ((eF == e))
610- then e
611- else eG
612- }
613-
614-
615-func eH (eI,eJ,eK) = {
616- let eL = (toBigInt(bF(aY(bg))) - eI)
617- let eM = (toBigInt(bF(aY(bh))) - eJ)
618- let eN = (toBigInt(value(assetInfo(bf)).quantity) - eK)
619- let eO = eC(eL, eM, eN)
620- eO
621- }
622-
623-
624-func eP (eQ,eR,eK) = {
625- let eL = (bF(aY(bg)) + eQ)
626- let eM = (bF(aY(bh)) + eR)
627- let eN = (value(assetInfo(bf)).quantity + eK)
628- let eG = eC(toBigInt(eL), toBigInt(eM), toBigInt(eN))
629- let eS = [IntegerEntry(al, height), StringEntry(ak, toString(eG))]
630- $Tuple2(eS, eG)
631- }
632-
633-
634-func eT (eU,eG) = if ((eG >= eU))
635- then true
636- else aK("updated DLp lower than current DLp")
637-
638-
639-func eV (eW) = {
640- let eX = eW.amount
641- let eY = fraction(eW.amount, eW.price, a, FLOOR)
642- let eZ = if ((eW.orderType == Buy))
643- then $Tuple2(eX, -(eY))
644- else $Tuple2(-(eX), eY)
645- let eQ = eZ._1
646- let eR = eZ._2
647- if (if (if (aP())
648- then true
649- else (be == r))
650- then true
651- else (be == s))
652- then throw("Admin blocked")
653- else if (if ((eW.assetPair.amountAsset != bg))
654- then true
655- else (eW.assetPair.priceAsset != bh))
656- then throw("Wr assets")
657- else {
658- let fa = parseBigIntValue(getStringValue(this, ak))
659- let fb = eP(eQ, eR, 0)
660- let fc = fb._1
661- let fd = fb._2
662- let fe = (fd >= fa)
663- fe
664- }
665- }
666-
667-
668-func ff (dV) = if ((size(dV.payments) != 1))
669- then throw("1 pmnt exp")
670- else {
671- let fg = value(dV.payments[0])
672- let cs = value(fg.assetId)
673- let cY = fg.amount
674- let dk = cq(toBase58String(dV.transactionId), toBase58String(cs), cY, dV.caller)
675- let cM = dk._1
676- let cN = dk._2
677- let cA = parseIntValue(dk._9)
678- let cO = dk._10
679- if (if (aP())
680- then true
681- else (cA == s))
682- then throw(("Admin blocked: " + toString(cA)))
683- else $Tuple5(cM, cN, cY, cs, cO)
684- }
685-
686-
687-func fh (fi,ac,fj,fk,bN,cV,cW,cX,cY,cZ) = {
688- let dk = cP(ac, bN, value(fj).amount, value(fj).assetId, value(fk).amount, value(fk).assetId, fi, (ac == ""), cV, cW, cX, cY, cZ)
689- let cA = parseIntValue(dk._8)
690- if (if (if (aP())
691- then true
692- else (cA == q))
693- then true
694- else (cA == s))
695- then throw(("Blocked:" + toString(cA)))
696- else dk
697- }
698-
699-
700-func fl (fm,cs,cu,ac,fn) = {
701- let ba = aS()
702- let cw = ba[w]
703- let cx = ba[x]
704- let cv = ba[v]
705- let de = parseIntValue(ba[y])
706- let df = parseIntValue(ba[z])
707- let eN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cv)), "invalid lp asset").quantity)
708- let fo = if ((eN > e))
609+func eF (eG,ck,cm,aa,eH) = {
610+ let aS = aK()
611+ let co = aS[u]
612+ let cp = aS[v]
613+ let cn = aS[t]
614+ let cW = parseIntValue(aS[w])
615+ let cX = parseIntValue(aS[x])
616+ let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
617+ let eJ = if ((eI > e))
709618 then true
710619 else throw("initial deposit requires all coins")
711- if ((fo == fo))
620+ if ((eJ == eJ))
712621 then {
713- let cC = bF(cw)
714- let cE = bF(cx)
715- let fp = if ((ac == ""))
716- then $Tuple2(cC, cE)
717- else if ((cs == cw))
718- then if ((fm > cC))
622+ let cu = bx(co)
623+ let cw = bx(cp)
624+ let eK = if ((aa == ""))
625+ then $Tuple2(cu, cw)
626+ else if ((ck == co))
627+ then if ((eG > cu))
719628 then throw("invalid payment amount")
720- else $Tuple2((cC - fm), cE)
721- else if ((cs == cx))
722- then if ((fm > cE))
629+ else $Tuple2((cu - eG), cw)
630+ else if ((ck == cp))
631+ then if ((eG > cw))
723632 then throw("invalid payment amount")
724- else $Tuple2(cC, (cE - fm))
633+ else $Tuple2(cu, (cw - eG))
725634 else throw("wrong pmtAssetId")
726- let fq = fp._1
727- let fr = fp._2
728- let fs = if ((cs == cw))
729- then $Tuple2(fm, 0)
730- else if ((cs == cx))
731- then $Tuple2(0, fm)
635+ let eL = eK._1
636+ let eM = eK._2
637+ let eN = if ((ck == co))
638+ then $Tuple2(eG, 0)
639+ else if ((ck == cp))
640+ then $Tuple2(0, eG)
732641 else throw("invalid payment")
733- let ft = fs._1
734- let fu = fs._2
735- let fv = if (fn)
736- then $Tuple3(cn(ft)._1, cn(fu)._1, cn(fm)._2)
737- else $Tuple3(ft, fu, 0)
738- let fw = fv._1
739- let fx = fv._2
740- let cp = fv._3
741- let fy = (fq + fw)
742- let fz = (fr + fx)
743- let bS = dE([toBigInt(fq), toBigInt(fr)])
744- let bR = dE([toBigInt(fy), toBigInt(fz)])
745- let fA = if ((bR > bS))
642+ let eO = eN._1
643+ let eP = eN._2
644+ let eQ = if (eH)
645+ then $Tuple3(cf(eO)._1, cf(eP)._1, cf(eG)._2)
646+ else $Tuple3(eO, eP, 0)
647+ let eR = eQ._1
648+ let eS = eQ._2
649+ let ch = eQ._3
650+ let eT = (eL + eR)
651+ let eU = (eM + eS)
652+ let bK = dQ([toBigInt(eL), toBigInt(eM)])
653+ let bJ = dQ([toBigInt(eT), toBigInt(eU)])
654+ let eV = if ((bJ > bK))
746655 then true
747656 else throw()
748- if ((fA == fA))
657+ if ((eV == eV))
749658 then {
750- let fB = fraction(eN, (bR - bS), bS, FLOOR)
751- let cH = K(bH(H(fz, df), H(fy, de)), a)
752- let dD = [IntegerEntry(W(), cH), IntegerEntry(X(height, lastBlock.timestamp), cH), StringEntry(aa(cu, ac), bq(ft, fu, toInt(fB), cH, 0, 0, height, lastBlock.timestamp, 0, 0))]
753- let fC = fraction(fr, a, fq)
754- let fD = fraction(fm, a, (fC + a))
755- let fE = (fm - fD)
756- let fF = fraction(eN, toBigInt(fE), toBigInt(fr))
757- let fG = toInt(fraction((fB - fF), b, fF))
758- $Tuple4(toInt(fB), dD, cp, fG)
659+ let eW = fraction(eI, (bJ - bK), bK)
660+ let cz = I(bz(F(eU, cX), F(eT, cW)), a)
661+ let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, aa), bi(eO, eP, toInt(eW), cz, 0, 0, height, lastBlock.timestamp, 0, 0))]
662+ let eX = fraction(eM, a, eL)
663+ let eY = fraction(eG, a, (eX + a))
664+ let eZ = (eG - eY)
665+ let fa = fraction(eI, toBigInt(eZ), toBigInt(eM))
666+ let fb = toInt(fraction((eW - fa), b, fa))
667+ $Tuple4(toInt(eW), dv, ch, fb)
759668 }
760669 else throw("Strict value is not equal to itself.")
761670 }
763672 }
764673
765674
766-func fH (fI,fJ,fK,fi,fL,fM) = {
767- let ba = aS()
768- let cv = ba[v]
769- let cw = ba[w]
770- let cx = ba[x]
771- let fN = parseIntValue(ba[y])
772- let fO = parseIntValue(ba[z])
773- let fP = ba[u]
774- let cu = if ((fi == bp))
775- then fL
776- else fi
777- let fg = value(fK[0])
778- let cs = value(fg.assetId)
779- let cY = fg.amount
780- let eO = eH(e, e, e)
781- if ((eO == eO))
782- then {
783- let cr = toBase58String(fM)
784- if ((cv != toBase58String(cs)))
785- then throw("Wrong LP")
786- else {
787- let cC = bF(cw)
788- let cE = bF(cx)
789- let fQ = {
790- let fR = invoke(this, "getOneTknV2READONLY", [fI, cY], nil)
791- if ($isInstanceOf(fR, "(Int, Int)"))
792- then fR
793- else throw(($getType(fR) + " couldn't be cast to (Int, Int)"))
794- }
795- if ((fQ == fQ))
675+func fc (fd,fe,ff,dN,fg,fh) = {
676+ let aS = aK()
677+ let cn = aS[t]
678+ let co = aS[u]
679+ let cp = aS[v]
680+ let fi = parseIntValue(aS[w])
681+ let fj = parseIntValue(aS[x])
682+ let fk = aS[s]
683+ let cm = if ((dN == bh))
684+ then fg
685+ else dN
686+ let dL = value(ff[0])
687+ let ck = value(dL.assetId)
688+ let cQ = dL.amount
689+ let cj = toBase58String(fh)
690+ if ((cn != toBase58String(ck)))
691+ then throw("Wrong LP")
692+ else {
693+ let cu = bx(co)
694+ let cw = bx(cp)
695+ let fl = {
696+ let fm = invoke(this, "getOneTknV2READONLY", [fd, cQ], nil)
697+ if ($isInstanceOf(fm, "(Int, Int)"))
698+ then fm
699+ else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
700+ }
701+ if ((fl == fl))
702+ then {
703+ let ch = fl._2
704+ let fn = fl._1
705+ let fo = if (if ((fe > 0))
706+ then (fe > fn)
707+ else false)
708+ then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
709+ else fn
710+ let fp = if ((fd == co))
711+ then $Tuple4(fo, 0, ((cu - fo) - ch), cw)
712+ else if ((fd == cp))
713+ then $Tuple4(0, fo, cu, ((cw - fo) - ch))
714+ else throw("invalid out asset id")
715+ let fq = fp._1
716+ let fr = fp._2
717+ let eT = fp._3
718+ let eU = fp._4
719+ let fs = bz(F(eU, fj), F(eT, fi))
720+ let ft = I(fs, a)
721+ let fu = if ((fd == "WAVES"))
722+ then unit
723+ else fromBase58String(fd)
724+ let fv = if ((ch > 0))
725+ then [ScriptTransfer(aJ, ch, fu)]
726+ else nil
727+ let cG = ([ScriptTransfer(cm, fo, fu), StringEntry(ab(toString(cm), cj), bt(fq, fr, cQ, ft, height, lastBlock.timestamp)), IntegerEntry(U(), ft), IntegerEntry(V(height, lastBlock.timestamp), ft)] ++ fv)
728+ if ((cG == cG))
796729 then {
797- let cp = fQ._2
798- let fS = fQ._1
799- let fT = if (if ((fJ > 0))
800- then (fJ > fS)
801- else false)
802- then aK(makeString(["amount to receive is less than ", toString(fJ)], ""))
803- else fS
804- let fU = if ((fI == cw))
805- then $Tuple4(fT, 0, ((cC - fT) - cp), cE)
806- else if ((fI == cx))
807- then $Tuple4(0, fT, cC, ((cE - fT) - cp))
808- else throw("invalid out asset id")
809- let fV = fU._1
810- let fW = fU._2
811- let fy = fU._3
812- let fz = fU._4
813- let fX = bH(H(fz, fO), H(fy, fN))
814- let fY = K(fX, a)
815- let fZ = if ((fI == "WAVES"))
816- then unit
817- else fromBase58String(fI)
818- let ga = if ((cp > 0))
819- then [ScriptTransfer(aR, cp, fZ)]
820- else nil
821- let cO = ([ScriptTransfer(cu, fT, fZ), StringEntry(ad(toString(cu), cr), bB(fV, fW, cY, fY, height, lastBlock.timestamp)), IntegerEntry(W(), fY), IntegerEntry(X(height, lastBlock.timestamp), fY)] ++ ga)
822- if ((cO == cO))
823- then {
824- let gb = invoke(aN, "burn", [cY], [AttachedPayment(cs, cY)])
825- if ((gb == gb))
826- then {
827- let gc = {
828- let gd = if ((this == aR))
829- then 0
830- else cp
831- let ge = if ((aW(fI) == bg))
832- then true
833- else false
834- if (ge)
835- then $Tuple2(-((fS + gd)), 0)
836- else $Tuple2(0, -((fS + gd)))
837- }
838- let eQ = gc._1
839- let eR = gc._2
840- let gf = eP(eQ, eR, 0)
841- let gg = gf._1
842- let eG = gf._2
843- let gh = eT(eO, eG)
844- if ((gh == gh))
845- then $Tuple2((cO ++ gg), fT)
846- else throw("Strict value is not equal to itself.")
847- }
848- else throw("Strict value is not equal to itself.")
849- }
730+ let fw = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
731+ if ((fw == fw))
732+ then $Tuple2(cG, fo)
850733 else throw("Strict value is not equal to itself.")
851734 }
852735 else throw("Strict value is not equal to itself.")
853736 }
737+ else throw("Strict value is not equal to itself.")
854738 }
855- else throw("Strict value is not equal to itself.")
856739 }
857740
858741
859-func gi () = {
860- let aE = getString(U())
861- if ($isInstanceOf(aE, "String"))
742+func fx () = {
743+ let ax = getString(S())
744+ if ($isInstanceOf(ax, "String"))
862745 then {
863- let dI = aE
864- fromBase58String(dI)
746+ let dX = ax
747+ fromBase58String(dX)
865748 }
866- else if ($isInstanceOf(aE, "Unit"))
749+ else if ($isInstanceOf(ax, "Unit"))
867750 then unit
868751 else throw("Match error")
869752 }
870753
871754
872-func gj () = {
873- let aE = getString(V())
874- if ($isInstanceOf(aE, "String"))
755+func fy () = {
756+ let ax = getString(T())
757+ if ($isInstanceOf(ax, "String"))
875758 then {
876- let dI = aE
877- fromBase58String(dI)
759+ let dX = ax
760+ fromBase58String(dX)
878761 }
879- else if ($isInstanceOf(aE, "Unit"))
762+ else if ($isInstanceOf(ax, "Unit"))
880763 then unit
881764 else throw("Match error")
882765 }
883766
884767
885-let gk = throw("Permission denied")
768+let fz = throw("Permission denied")
886769
887-func gl (dV) = {
888- let aE = gi()
889- if ($isInstanceOf(aE, "ByteVector"))
770+func fA (dK) = {
771+ let ax = fx()
772+ if ($isInstanceOf(ax, "ByteVector"))
890773 then {
891- let gm = aE
892- (dV.callerPublicKey == gm)
774+ let fB = ax
775+ (dK.callerPublicKey == fB)
893776 }
894- else if ($isInstanceOf(aE, "Unit"))
895- then (dV.caller == this)
777+ else if ($isInstanceOf(ax, "Unit"))
778+ then (dK.caller == this)
896779 else throw("Match error")
897780 }
898781
899782
900-func gn (dV) = {
901- let aE = gi()
902- if ($isInstanceOf(aE, "ByteVector"))
783+func fC (dK) = {
784+ let ax = fx()
785+ if ($isInstanceOf(ax, "ByteVector"))
903786 then {
904- let gm = aE
905- if ((dV.callerPublicKey == gm))
787+ let fB = ax
788+ if ((dK.callerPublicKey == fB))
906789 then true
907- else gk
790+ else fz
908791 }
909- else if ($isInstanceOf(aE, "Unit"))
910- then if ((dV.caller == this))
792+ else if ($isInstanceOf(ax, "Unit"))
793+ then if ((dK.caller == this))
911794 then true
912- else gk
795+ else fz
913796 else throw("Match error")
914797 }
915798
916799
917-@Callable(dV)
918-func constructor (T) = {
919- let ev = gn(dV)
920- if ((ev == ev))
921- then [StringEntry(T(), T)]
800+@Callable(dK)
801+func constructor (R) = {
802+ let ey = fC(dK)
803+ if ((ey == ey))
804+ then [StringEntry(R(), R)]
922805 else throw("Strict value is not equal to itself.")
923806 }
924807
925808
926809
927-@Callable(dV)
928-func setManager (go) = {
929- let ev = gn(dV)
930- if ((ev == ev))
810+@Callable(dK)
811+func setManager (fD) = {
812+ let ey = fC(dK)
813+ if ((ey == ey))
931814 then {
932- let gp = fromBase58String(go)
933- if ((gp == gp))
934- then [StringEntry(V(), go)]
815+ let fE = fromBase58String(fD)
816+ if ((fE == fE))
817+ then [StringEntry(T(), fD)]
935818 else throw("Strict value is not equal to itself.")
936819 }
937820 else throw("Strict value is not equal to itself.")
939822
940823
941824
942-@Callable(dV)
825+@Callable(dK)
943826 func confirmManager () = {
944- let cm = gj()
945- let gq = if (isDefined(cm))
827+ let ce = fy()
828+ let fF = if (isDefined(ce))
946829 then true
947830 else throw("No pending manager")
948- if ((gq == gq))
831+ if ((fF == fF))
949832 then {
950- let gr = if ((dV.callerPublicKey == value(cm)))
833+ let fG = if ((dK.callerPublicKey == value(ce)))
951834 then true
952835 else throw("You are not pending manager")
953- if ((gr == gr))
954- then [StringEntry(U(), toBase58String(value(cm))), DeleteEntry(V())]
836+ if ((fG == fG))
837+ then [StringEntry(S(), toBase58String(value(ce))), DeleteEntry(T())]
955838 else throw("Strict value is not equal to itself.")
956839 }
957840 else throw("Strict value is not equal to itself.")
959842
960843
961844
962-@Callable(dV)
963-func put (gs,gt) = {
964- let gu = bk()
965- let gv = valueOrErrorMessage(addressFromString(gu[C]), "Wr st addr")
966- let gw = valueOrErrorMessage(addressFromString(gu[E]), "Wr sl addr")
967- if ((0 > gs))
845+@Callable(dK)
846+func put (fH,fI) = {
847+ let fJ = bc()
848+ let fK = valueOrErrorMessage(addressFromString(fJ[A]), "Wr st addr")
849+ let fL = valueOrErrorMessage(addressFromString(fJ[C]), "Wr sl addr")
850+ if ((0 > fH))
968851 then throw("Wrong slippage")
969- else if ((size(dV.payments) != 2))
852+ else if ((size(dK.payments) != 2))
970853 then throw("2 pmnts expd")
971854 else {
972- let gx = toBigInt(value(dV.payments[0]).amount)
973- let gy = toBigInt(value(dV.payments[1]).amount)
974- let eO = eH(gx, gy, toBigInt(0))
975- if ((eO == eO))
855+ let fM = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fH, true, false, true, 0, "")
856+ let dp = fM._2
857+ let fN = fM._7
858+ let cG = fM._9
859+ let dq = fM._10
860+ let dr = fM._11
861+ let co = fM._12
862+ let cp = fM._13
863+ let dc = invoke(aF, "emit", [dp], nil)
864+ if ((dc == dc))
976865 then {
977- let gz = fh(toString(dV.caller), toBase58String(dV.transactionId), AttachedPayment(value(dV.payments[0]).assetId, value(dV.payments[0]).amount), dV.payments[1], gs, true, false, true, 0, "")
978- let dx = gz._2
979- let gA = gz._7
980- let cO = gz._9
981- let dy = gz._10
982- let dz = gz._11
983- let cw = gz._12
984- let cx = gz._13
985- let dk = invoke(aN, "emit", [dx], nil)
986- if ((dk == dk))
866+ let fO = {
867+ let ax = dc
868+ if ($isInstanceOf(ax, "Address"))
869+ then {
870+ let fP = ax
871+ invoke(fP, "emit", [dp], nil)
872+ }
873+ else unit
874+ }
875+ if ((fO == fO))
987876 then {
988- let gB = {
989- let aE = dk
990- if ($isInstanceOf(aE, "Address"))
991- then {
992- let gC = aE
993- invoke(gC, "emit", [dx], nil)
994- }
995- else unit
996- }
997- if ((gB == gB))
877+ let fQ = if ((dq > 0))
878+ then invoke(fL, "put", nil, [AttachedPayment(co, dq)])
879+ else nil
880+ if ((fQ == fQ))
998881 then {
999- let gD = if ((dy > 0))
1000- then invoke(gw, "put", nil, [AttachedPayment(cw, dy)])
882+ let fR = if ((dr > 0))
883+ then invoke(fL, "put", nil, [AttachedPayment(cp, dr)])
1001884 else nil
1002- if ((gD == gD))
885+ if ((fR == fR))
1003886 then {
1004- let gE = if ((dz > 0))
1005- then invoke(gw, "put", nil, [AttachedPayment(cx, dz)])
1006- else nil
1007- if ((gE == gE))
887+ let fS = if (fI)
1008888 then {
1009- let gF = if (gt)
1010- then {
1011- let gG = invoke(gv, "stake", nil, [AttachedPayment(gA, dx)])
1012- if ((gG == gG))
1013- then nil
1014- else throw("Strict value is not equal to itself.")
1015- }
1016- else [ScriptTransfer(dV.caller, dx, gA)]
1017- let gH = eP(0, 0, 0)
1018- let gg = gH._1
1019- let eG = gH._2
1020- let gh = eT(eO, eG)
1021- if ((gh == gh))
1022- then ((cO ++ gF) ++ gg)
889+ let fT = invoke(fK, "stake", nil, [AttachedPayment(fN, dp)])
890+ if ((fT == fT))
891+ then nil
1023892 else throw("Strict value is not equal to itself.")
1024893 }
1025- else throw("Strict value is not equal to itself.")
894+ else [ScriptTransfer(dK.caller, dp, fN)]
895+ (cG ++ fS)
1026896 }
1027897 else throw("Strict value is not equal to itself.")
1028898 }
1036906
1037907
1038908
1039-@Callable(dV)
1040-func putOneTknV2 (fJ,gt) = {
1041- let gI = {
1042- let fR = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1043- if ($isInstanceOf(fR, "Boolean"))
1044- then fR
1045- else throw(($getType(fR) + " couldn't be cast to Boolean"))
909+@Callable(dK)
910+func putOneTknV2 (fe,fI) = {
911+ let fU = {
912+ let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
913+ if ($isInstanceOf(fm, "Boolean"))
914+ then fm
915+ else throw(($getType(fm) + " couldn't be cast to Boolean"))
1046916 }
1047- let gJ = if (if (if (aP())
917+ let fV = if (if (if (aH())
1048918 then true
1049- else (be == q))
919+ else (aW == o))
1050920 then true
1051- else (be == s))
921+ else (aW == q))
1052922 then true
1053- else gI
1054- let gK = [if (if (!(gJ))
923+ else fU
924+ let fW = [if (if (!(fV))
1055925 then true
1056- else gl(dV))
926+ else fA(dK))
1057927 then true
1058- else aK("put operation is blocked by admin"), if ((size(dV.payments) == 1))
928+ else aD("put operation is blocked by admin"), if ((size(dK.payments) == 1))
1059929 then true
1060- else aK("exactly 1 payment are expected")]
1061- if ((gK == gK))
930+ else aD("exactly 1 payment are expected")]
931+ if ((fW == fW))
1062932 then {
1063- let ba = aS()
1064- let cw = ba[w]
1065- let cx = ba[x]
1066- let cv = fromBase58String(ba[v])
1067- let fN = parseIntValue(ba[y])
1068- let fO = parseIntValue(ba[z])
1069- let cu = if ((dV.caller == this))
1070- then dV.originCaller
1071- else dV.caller
1072- let fg = value(dV.payments[0])
1073- let cs = toBase58String(value(fg.assetId))
1074- let cY = fg.amount
1075- let gL = fl(cY, cs, toString(cu), toBase58String(dV.transactionId), true)
1076- if ((gL == gL))
933+ let aS = aK()
934+ let co = aS[u]
935+ let cp = aS[v]
936+ let cn = fromBase58String(aS[t])
937+ let fi = parseIntValue(aS[w])
938+ let fj = parseIntValue(aS[x])
939+ let cm = if ((dK.caller == this))
940+ then dK.originCaller
941+ else dK.caller
942+ let dL = value(dK.payments[0])
943+ let ck = toBase58String(value(dL.assetId))
944+ let cQ = dL.amount
945+ let fX = eF(cQ, ck, toString(cm), toBase58String(dK.transactionId), true)
946+ if ((fX == fX))
1077947 then {
1078- let cp = gL._3
1079- let cO = gL._2
1080- let gM = gL._1
1081- let dx = if (if ((fJ > 0))
1082- then (fJ > gM)
948+ let ch = fX._3
949+ let cG = fX._2
950+ let fY = fX._1
951+ let dp = if (if ((fe > 0))
952+ then (fe > fY)
1083953 else false)
1084- then aK(makeString(["amount to receive is less than ", toString(fJ)], ""))
1085- else gM
1086- let gz = invoke(aN, "emit", [dx], nil)
1087- if ((gz == gz))
954+ then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
955+ else fY
956+ let fM = invoke(aF, "emit", [dp], nil)
957+ if ((fM == fM))
1088958 then {
1089- let gB = {
1090- let aE = gz
1091- if ($isInstanceOf(aE, "Address"))
959+ let fO = {
960+ let ax = fM
961+ if ($isInstanceOf(ax, "Address"))
1092962 then {
1093- let gC = aE
1094- invoke(gC, "emit", [dx], nil)
963+ let fP = ax
964+ invoke(fP, "emit", [dp], nil)
1095965 }
1096966 else unit
1097967 }
1098- if ((gB == gB))
968+ if ((fO == fO))
1099969 then {
1100- let gF = if (gt)
970+ let fS = if (fI)
1101971 then {
1102- let gG = invoke(bm, "stake", nil, [AttachedPayment(cv, dx)])
1103- if ((gG == gG))
972+ let fT = invoke(be, "stake", nil, [AttachedPayment(cn, dp)])
973+ if ((fT == fT))
1104974 then nil
1105975 else throw("Strict value is not equal to itself.")
1106976 }
1107- else [ScriptTransfer(dV.caller, dx, cv)]
1108- let ga = if ((cp > 0))
1109- then [ScriptTransfer(aR, cp, fromBase58String(cs))]
977+ else [ScriptTransfer(dK.caller, dp, cn)]
978+ let fv = if ((ch > 0))
979+ then [ScriptTransfer(aJ, ch, fromBase58String(ck))]
1110980 else nil
1111- let gN = if ((this == aR))
1112- then $Tuple2(0, 0)
1113- else {
1114- let gO = if ((fg.assetId == bg))
1115- then true
1116- else false
1117- if (gO)
1118- then $Tuple2(-(cp), 0)
1119- else $Tuple2(0, -(cp))
1120- }
1121- let eQ = gN._1
1122- let eR = gN._2
1123- let gP = eP(eQ, eR, 0)
1124- let gg = gP._1
1125- let eG = gP._2
1126- $Tuple2((((cO ++ gF) ++ ga) ++ gg), dx)
981+ $Tuple2(((cG ++ fS) ++ fv), dp)
1127982 }
1128983 else throw("Strict value is not equal to itself.")
1129984 }
1136991
1137992
1138993
1139-@Callable(dV)
1140-func putForFree (gQ) = if ((0 > gQ))
994+@Callable(dK)
995+func putForFree (fZ) = if ((0 > fZ))
1141996 then throw("Wrong slpg")
1142- else if ((size(dV.payments) != 2))
997+ else if ((size(dK.payments) != 2))
1143998 then throw("2 pmnts expd")
1144999 else {
1145- let gR = fh(toString(dV.caller), toBase58String(dV.transactionId), AttachedPayment(value(dV.payments[0]).assetId, value(dV.payments[0]).amount), dV.payments[1], gQ, false, false, true, 0, "")
1146- let cO = gR._9
1147- let gx = toBigInt(value(dV.payments[0]).amount)
1148- let gy = toBigInt(value(dV.payments[1]).amount)
1149- let eO = eH(gx, gy, toBigInt(0))
1150- if ((eO == eO))
1151- then {
1152- let gS = eP(0, 0, 0)
1153- let gg = gS._1
1154- let eG = gS._2
1155- let gh = eT(eO, eG)
1156- if ((gh == gh))
1157- then (cO ++ gg)
1158- else throw("Strict value is not equal to itself.")
1159- }
1160- else throw("Strict value is not equal to itself.")
1000+ let ga = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fZ, false, false, true, 0, "")
1001+ ga._9
11611002 }
11621003
11631004
11641005
1165-@Callable(dV)
1006+@Callable(dK)
11661007 func get () = {
1167- let dk = ff(dV)
1168- let gT = dk._1
1169- let cN = dk._2
1170- let cY = dk._3
1171- let cs = dk._4
1172- let cO = dk._5
1173- let ew = invoke(aN, "burn", [cY], [AttachedPayment(cs, cY)])
1174- if ((ew == ew))
1008+ let dc = dJ(dK)
1009+ let gb = dc._1
1010+ let cF = dc._2
1011+ let cQ = dc._3
1012+ let ck = dc._4
1013+ let cG = dc._5
1014+ let ez = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1015+ if ((ez == ez))
1016+ then cG
1017+ else throw("Strict value is not equal to itself.")
1018+ }
1019+
1020+
1021+
1022+@Callable(dK)
1023+func getOneTknV2 (fd,fe) = {
1024+ let fU = {
1025+ let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1026+ if ($isInstanceOf(fm, "Boolean"))
1027+ then fm
1028+ else throw(($getType(fm) + " couldn't be cast to Boolean"))
1029+ }
1030+ let gc = if (if (aH())
1031+ then true
1032+ else (aW == q))
1033+ then true
1034+ else fU
1035+ let fW = [if (if (!(gc))
1036+ then true
1037+ else fA(dK))
1038+ then true
1039+ else aD("get operation is blocked by admin"), if ((size(dK.payments) == 1))
1040+ then true
1041+ else aD("exactly 1 payment are expected")]
1042+ if ((fW == fW))
11751043 then {
1176- let eO = eH(toBigInt(0), toBigInt(0), toBigInt(cY))
1177- let gU = eP(-(gT), -(cN), 0)
1178- let gg = gU._1
1179- let eG = gU._2
1180- let gh = eT(eO, eG)
1181- if ((gh == gh))
1182- then (cO ++ gg)
1183- else throw("Strict value is not equal to itself.")
1044+ let gd = fc(fd, fe, dK.payments, dK.caller, dK.originCaller, dK.transactionId)
1045+ let cG = gd._1
1046+ let fo = gd._2
1047+ $Tuple2(cG, fo)
11841048 }
11851049 else throw("Strict value is not equal to itself.")
11861050 }
11871051
11881052
11891053
1190-@Callable(dV)
1191-func getOneTknV2 (fI,fJ) = {
1192- let gI = {
1193- let fR = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1194- if ($isInstanceOf(fR, "Boolean"))
1195- then fR
1196- else throw(($getType(fR) + " couldn't be cast to Boolean"))
1197- }
1198- let gV = if (if (aP())
1199- then true
1200- else (be == s))
1201- then true
1202- else gI
1203- let gK = [if (if (!(gV))
1204- then true
1205- else gl(dV))
1206- then true
1207- else aK("get operation is blocked by admin"), if ((size(dV.payments) == 1))
1208- then true
1209- else aK("exactly 1 payment are expected")]
1210- if ((gK == gK))
1211- then {
1212- let gW = fH(fI, fJ, dV.payments, dV.caller, dV.originCaller, dV.transactionId)
1213- let cO = gW._1
1214- let fT = gW._2
1215- $Tuple2(cO, fT)
1216- }
1217- else throw("Strict value is not equal to itself.")
1054+@Callable(dK)
1055+func getOneTknV2READONLY (fd,ge) = {
1056+ let aS = aK()
1057+ let co = aS[u]
1058+ let cp = aS[v]
1059+ let cn = aS[t]
1060+ let dR = [toBigInt(bx(co)), toBigInt(bx(cp))]
1061+ let gf = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
1062+ let bK = dQ(dR)
1063+ let bJ = (bK - fraction(toBigInt(ge), bK, gf))
1064+ let gg = if ((fd == co))
1065+ then 0
1066+ else if ((fd == cp))
1067+ then 1
1068+ else throw("invalid out asset id")
1069+ let gh = ev(dR, gg, bJ)
1070+ let gi = (dR[gg] - gh)
1071+ let gj = max([0, toInt((gi - f))])
1072+ let gk = cf(gj)
1073+ let fn = gk._1
1074+ let ch = gk._2
1075+ $Tuple2(nil, $Tuple2(fn, ch))
12181076 }
12191077
12201078
12211079
1222-@Callable(dV)
1223-func refreshDLp () = {
1224- let gX = valueOrElse(getInteger(al), 0)
1225- let gY = if (((height - gX) >= ao))
1226- then unit
1227- else aK(makeString([toString(ao), " blocks have not passed since the previous call"], ""))
1228- if ((gY == gY))
1229- then {
1230- let fa = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ak), "0")), aM("invalid dLp"))
1231- let gZ = eP(0, 0, 0)
1232- let ha = gZ._1
1233- let eG = gZ._2
1234- let eS = if ((fa != eG))
1235- then ha
1236- else aK("nothing to refresh")
1237- $Tuple2(eS, toString(eG))
1238- }
1239- else throw("Strict value is not equal to itself.")
1080+@Callable(dK)
1081+func getOneTknV2WithBonusREADONLY (fd,ge) = {
1082+ let aS = aK()
1083+ let co = aS[u]
1084+ let cp = aS[v]
1085+ let cn = aS[t]
1086+ let cu = bx(co)
1087+ let cw = bx(cp)
1088+ let gl = {
1089+ let fm = invoke(this, "getOneTknV2READONLY", [fd, ge], nil)
1090+ if ($isInstanceOf(fm, "(Int, Int)"))
1091+ then fm
1092+ else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
1093+ }
1094+ let fn = gl._1
1095+ let ch = gl._2
1096+ let dc = ci("", cn, ge, this)
1097+ let cE = dc._1
1098+ let cF = dc._2
1099+ let gm = (cE + cF)
1100+ let fb = if ((gm == 0))
1101+ then if ((fn == 0))
1102+ then 0
1103+ else throw("bonus calculation error")
1104+ else fraction((fn - gm), a, gm)
1105+ $Tuple2(nil, $Tuple3(fn, ch, fb))
12401106 }
12411107
12421108
12431109
1244-@Callable(dV)
1245-func getOneTknV2READONLY (fI,hb) = {
1246- let ba = aS()
1247- let cw = ba[w]
1248- let cx = ba[x]
1249- let cv = ba[v]
1250- let dF = [toBigInt(bF(cw)), toBigInt(bF(cx))]
1251- let eF = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cv)), "invalid lp asset").quantity)
1252- let bS = dE(dF)
1253- let bR = (bS - fraction(toBigInt(hb), bS, eF))
1254- let hc = if ((fI == cw))
1255- then 0
1256- else if ((fI == cx))
1257- then 1
1258- else throw("invalid out asset id")
1259- let hd = es(dF, hc, bR)
1260- let he = (dF[hc] - hd)
1261- let hf = max([0, toInt((he - f))])
1262- let hg = cn(hf)
1263- let fS = hg._1
1264- let cp = hg._2
1265- $Tuple2(nil, $Tuple2(fS, cp))
1266- }
1267-
1268-
1269-
1270-@Callable(dV)
1271-func getOneTknV2WithBonusREADONLY (fI,hb) = {
1272- let ba = aS()
1273- let cw = ba[w]
1274- let cx = ba[x]
1275- let cv = ba[v]
1276- let cC = bF(cw)
1277- let cE = bF(cx)
1278- let hh = {
1279- let fR = invoke(this, "getOneTknV2READONLY", [fI, hb], nil)
1280- if ($isInstanceOf(fR, "(Int, Int)"))
1281- then fR
1282- else throw(($getType(fR) + " couldn't be cast to (Int, Int)"))
1283- }
1284- let fS = hh._1
1285- let cp = hh._2
1286- let dk = cq("", cv, hb, this)
1287- let cM = dk._1
1288- let cN = dk._2
1289- let hi = (cM + cN)
1290- let fG = if ((hi == 0))
1291- then if ((fS == 0))
1292- then 0
1293- else throw("bonus calculation error")
1294- else fraction((fS - hi), a, hi)
1295- $Tuple2(nil, $Tuple3(fS, cp, fG))
1296- }
1297-
1298-
1299-
1300-@Callable(dV)
1301-func getNoLess (hj,hk) = {
1302- let dk = ff(dV)
1303- let cM = dk._1
1304- let cN = dk._2
1305- let cY = dk._3
1306- let cs = dk._4
1307- let cO = dk._5
1308- if ((hj > cM))
1309- then throw(((("Failed: " + toString(cM)) + " < ") + toString(hj)))
1310- else if ((hk > cN))
1311- then throw(((("Failed: " + toString(cN)) + " < ") + toString(hk)))
1110+@Callable(dK)
1111+func getNoLess (gn,go) = {
1112+ let dc = dJ(dK)
1113+ let cE = dc._1
1114+ let cF = dc._2
1115+ let cQ = dc._3
1116+ let ck = dc._4
1117+ let cG = dc._5
1118+ if ((gn > cE))
1119+ then throw(((("Failed: " + toString(cE)) + " < ") + toString(gn)))
1120+ else if ((go > cF))
1121+ then throw(((("Failed: " + toString(cF)) + " < ") + toString(go)))
13121122 else {
1313- let eO = eH(toBigInt(0), toBigInt(0), toBigInt(cY))
1314- let hl = invoke(aN, "burn", [cY], [AttachedPayment(cs, cY)])
1315- if ((hl == hl))
1316- then {
1317- let hm = eP(-(cM), -(cN), 0)
1318- let gg = hm._1
1319- let eG = hm._2
1320- let gh = eT(eO, eG)
1321- if ((gh == gh))
1322- then (cO ++ gg)
1323- else throw("Strict value is not equal to itself.")
1324- }
1123+ let gp = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1124+ if ((gp == gp))
1125+ then cG
13251126 else throw("Strict value is not equal to itself.")
13261127 }
13271128 }
13281129
13291130
13301131
1331-@Callable(dV)
1332-func unstakeAndGet (co) = {
1333- let hn = if ((size(dV.payments) != 0))
1132+@Callable(dK)
1133+func unstakeAndGet (cg) = {
1134+ let gq = if ((size(dK.payments) != 0))
13341135 then throw("No pmnts expd")
13351136 else true
1336- if ((hn == hn))
1137+ if ((gq == gq))
13371138 then {
1338- let ce = aS()
1339- let ho = bk()
1340- let gA = fromBase58String(ce[v])
1341- let hp = valueOrErrorMessage(addressFromString(ho[C]), "Wr st addr")
1342- let eO = eH(toBigInt(0), toBigInt(0), toBigInt(0))
1343- let hq = invoke(hp, "unstake", [toBase58String(gA), co], nil)
1344- if ((hq == hq))
1139+ let bW = aK()
1140+ let gr = bc()
1141+ let fN = fromBase58String(bW[t])
1142+ let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1143+ let gt = invoke(gs, "unstake", [toBase58String(fN), cg], nil)
1144+ if ((gt == gt))
13451145 then {
1346- let dk = cq(toBase58String(dV.transactionId), toBase58String(gA), co, dV.caller)
1347- let cM = dk._1
1348- let cN = dk._2
1349- let cA = parseIntValue(dk._9)
1350- let cO = dk._10
1351- let hr = if (if (aP())
1146+ let dc = ci(toBase58String(dK.transactionId), toBase58String(fN), cg, dK.caller)
1147+ let cs = parseIntValue(dc._9)
1148+ let cG = dc._10
1149+ let gu = if (if (aH())
13521150 then true
1353- else (cA == s))
1354- then throw(("Blocked: " + toString(cA)))
1151+ else (cs == q))
1152+ then throw(("Blocked: " + toString(cs)))
13551153 else true
1356- if ((hr == hr))
1154+ if ((gu == gu))
13571155 then {
1358- let hs = invoke(aN, "burn", [co], [AttachedPayment(gA, co)])
1359- if ((hs == hs))
1360- then {
1361- let ht = eP(-(cM), -(cN), 0)
1362- let gg = ht._1
1363- let eG = ht._2
1364- let gh = eT(eO, eG)
1365- if ((gh == gh))
1366- then (cO ++ gg)
1367- else throw("Strict value is not equal to itself.")
1368- }
1156+ let gv = invoke(aF, "burn", [cg], [AttachedPayment(fN, cg)])
1157+ if ((gv == gv))
1158+ then cG
13691159 else throw("Strict value is not equal to itself.")
13701160 }
13711161 else throw("Strict value is not equal to itself.")
13771167
13781168
13791169
1380-@Callable(dV)
1381-func unstakeAndGetNoLess (hu,hv,hk) = {
1382- let gV = if (aP())
1170+@Callable(dK)
1171+func unstakeAndGetNoLess (gw,gx,go) = {
1172+ let gc = if (aH())
13831173 then true
1384- else (be == s)
1385- let gK = [if (!(gV))
1174+ else (aW == q)
1175+ let fW = [if (!(gc))
13861176 then true
1387- else throw("get operation is blocked by admin"), if ((size(dV.payments) == 0))
1177+ else throw("get operation is blocked by admin"), if ((size(dK.payments) == 0))
13881178 then true
13891179 else throw("no payments are expected")]
1390- if ((gK == gK))
1180+ if ((fW == fW))
13911181 then {
1392- let eO = eH(toBigInt(0), toBigInt(0), toBigInt(0))
1393- let hq = invoke(bm, "unstake", [toBase58String(bf), hu], nil)
1394- if ((hq == hq))
1182+ let gt = invoke(be, "unstake", [toBase58String(aX), gw], nil)
1183+ if ((gt == gt))
13951184 then {
1396- let hw = cq(toBase58String(dV.transactionId), toBase58String(bf), hu, dV.caller)
1397- let cM = hw._1
1398- let cN = hw._2
1399- let cO = hw._10
1400- let hx = [if ((cM >= hv))
1185+ let gy = ci(toBase58String(dK.transactionId), toBase58String(aX), gw, dK.caller)
1186+ let cE = gy._1
1187+ let cF = gy._2
1188+ let cG = gy._10
1189+ let gz = [if ((cE >= gx))
14011190 then true
1402- else throw(makeString(["amount asset amount to receive is less than ", toString(hv)], "")), if ((cN >= hk))
1191+ else throw(makeString(["amount asset amount to receive is less than ", toString(gx)], "")), if ((cF >= go))
14031192 then true
1404- else throw(makeString(["price asset amount to receive is less than ", toString(hk)], ""))]
1405- if ((hx == hx))
1193+ else throw(makeString(["price asset amount to receive is less than ", toString(go)], ""))]
1194+ if ((gz == gz))
14061195 then {
1407- let hl = invoke(aN, "burn", [hu], [AttachedPayment(bf, hu)])
1408- if ((hl == hl))
1409- then {
1410- let hy = eP(-(cM), -(cN), 0)
1411- let gg = hy._1
1412- let eG = hy._2
1413- let gh = eT(eO, eG)
1414- if ((gh == gh))
1415- then (cO ++ gg)
1416- else throw("Strict value is not equal to itself.")
1417- }
1196+ let gp = invoke(aF, "burn", [gw], [AttachedPayment(aX, gw)])
1197+ if ((gp == gp))
1198+ then cG
14181199 else throw("Strict value is not equal to itself.")
14191200 }
14201201 else throw("Strict value is not equal to itself.")
14261207
14271208
14281209
1429-@Callable(dV)
1430-func unstakeAndGetOneTknV2 (hu,fI,fJ) = {
1431- let gI = {
1432- let fR = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1433- if ($isInstanceOf(fR, "Boolean"))
1434- then fR
1435- else throw(($getType(fR) + " couldn't be cast to Boolean"))
1210+@Callable(dK)
1211+func unstakeAndGetOneTknV2 (gw,fd,fe) = {
1212+ let fU = {
1213+ let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1214+ if ($isInstanceOf(fm, "Boolean"))
1215+ then fm
1216+ else throw(($getType(fm) + " couldn't be cast to Boolean"))
14361217 }
1437- let gV = if (if (aP())
1218+ let gc = if (if (aH())
14381219 then true
1439- else (be == s))
1220+ else (aW == q))
14401221 then true
1441- else gI
1442- let gK = [if (if (!(gV))
1222+ else fU
1223+ let fW = [if (if (!(gc))
14431224 then true
1444- else gl(dV))
1225+ else fA(dK))
14451226 then true
1446- else aK("get operation is blocked by admin"), if ((size(dV.payments) == 0))
1227+ else aD("get operation is blocked by admin"), if ((size(dK.payments) == 0))
14471228 then true
1448- else aK("no payments are expected")]
1449- if ((gK == gK))
1229+ else aD("no payments are expected")]
1230+ if ((fW == fW))
14501231 then {
1451- let ce = aS()
1452- let ho = bk()
1453- let gA = fromBase58String(ce[v])
1454- let hp = valueOrErrorMessage(addressFromString(ho[C]), "Wr st addr")
1455- let hq = invoke(hp, "unstake", [toBase58String(gA), hu], nil)
1456- if ((hq == hq))
1232+ let bW = aK()
1233+ let gr = bc()
1234+ let fN = fromBase58String(bW[t])
1235+ let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1236+ let gt = invoke(gs, "unstake", [toBase58String(fN), gw], nil)
1237+ if ((gt == gt))
14571238 then {
1458- let hz = fH(fI, fJ, [AttachedPayment(gA, hu)], dV.caller, dV.originCaller, dV.transactionId)
1459- let cO = hz._1
1460- let fT = hz._2
1461- $Tuple2(cO, fT)
1239+ let gA = fc(fd, fe, [AttachedPayment(fN, gw)], dK.caller, dK.originCaller, dK.transactionId)
1240+ let cG = gA._1
1241+ let fo = gA._2
1242+ $Tuple2(cG, fo)
14621243 }
14631244 else throw("Strict value is not equal to itself.")
14641245 }
14671248
14681249
14691250
1470-@Callable(dV)
1471-func putOneTknV2WithBonusREADONLY (hA,hB) = {
1472- let ba = aS()
1473- let cw = ba[w]
1474- let cx = ba[x]
1475- let cv = ba[v]
1476- let hC = fl(hA, hB, "", "", true)
1477- let fB = hC._1
1478- let cO = hC._2
1479- let cp = hC._3
1480- let fG = hC._4
1481- $Tuple2(nil, $Tuple3(fB, cp, fG))
1251+@Callable(dK)
1252+func putOneTknV2WithBonusREADONLY (gB,gC) = {
1253+ let aS = aK()
1254+ let co = aS[u]
1255+ let cp = aS[v]
1256+ let cn = aS[t]
1257+ let gD = eF(gB, gC, "", "", true)
1258+ let eW = gD._1
1259+ let cG = gD._2
1260+ let ch = gD._3
1261+ let fb = gD._4
1262+ $Tuple2(nil, $Tuple3(eW, ch, fb))
14821263 }
14831264
14841265
14851266
1486-@Callable(dV)
1487-func putOneTknV2WithoutTakeFeeREADONLY (hA,hB) = {
1488- let ba = aS()
1489- let cw = ba[w]
1490- let cx = ba[x]
1491- let cv = ba[v]
1492- let hD = fl(hA, hB, "", "", false)
1493- let fB = hD._1
1494- let cO = hD._2
1495- let cp = hD._3
1496- let fG = hD._4
1497- $Tuple2(nil, $Tuple3(fB, cp, fG))
1267+@Callable(dK)
1268+func putOneTknV2WithoutTakeFeeREADONLY (gB,gC) = {
1269+ let aS = aK()
1270+ let co = aS[u]
1271+ let cp = aS[v]
1272+ let cn = aS[t]
1273+ let gE = eF(gB, gC, "", "", false)
1274+ let eW = gE._1
1275+ let cG = gE._2
1276+ let ch = gE._3
1277+ let fb = gE._4
1278+ $Tuple2(nil, $Tuple3(eW, ch, fb))
14981279 }
14991280
15001281
15011282
1502-@Callable(dV)
1503-func activate (hE,hF) = if ((toString(dV.caller) != toString(aN)))
1283+@Callable(dK)
1284+func activate (gF,gG) = if ((toString(dK.caller) != toString(aF)))
15041285 then throw("denied")
1505- else $Tuple2([StringEntry(ae(), hE), StringEntry(af(), hF)], "success")
1286+ else $Tuple2([StringEntry(ac(), gF), StringEntry(ad(), gG)], "success")
15061287
15071288
15081289
1509-@Callable(dV)
1510-func setS (hG,hr) = if ((toString(dV.caller) != aG(this, ah())))
1511- then gk
1512- else [StringEntry(hG, hr)]
1290+@Callable(dK)
1291+func setS (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1292+ then fz
1293+ else [StringEntry(gH, gu)]
15131294
15141295
15151296
1516-@Callable(dV)
1517-func setI (hG,hr) = if ((toString(dV.caller) != aG(this, ah())))
1518- then gk
1519- else [IntegerEntry(hG, hr)]
1297+@Callable(dK)
1298+func setI (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1299+ then fz
1300+ else [IntegerEntry(gH, gu)]
15201301
15211302
15221303
1523-@Callable(dV)
1524-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aS())
1304+@Callable(dK)
1305+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aK())
15251306
15261307
15271308
1528-@Callable(dV)
1529-func getAccBalanceWrapperREADONLY (bG) = $Tuple2(nil, bF(bG))
1309+@Callable(dK)
1310+func getAccBalanceWrapperREADONLY (by) = $Tuple2(nil, bx(by))
15301311
15311312
15321313
1533-@Callable(dV)
1534-func calcPricesWrapperREADONLY (bY,bZ,cd) = {
1535- let hH = cc(bY, bZ, cd)
1536- $Tuple2(nil, [toString(hH[0]), toString(hH[1]), toString(hH[2])])
1314+@Callable(dK)
1315+func calcPricesWrapperREADONLY (bQ,bR,bV) = {
1316+ let gI = bU(bQ, bR, bV)
1317+ $Tuple2(nil, [toString(gI[0]), toString(gI[1]), toString(gI[2])])
15371318 }
15381319
15391320
15401321
1541-@Callable(dV)
1542-func fromX18WrapperREADONLY (L,hI) = $Tuple2(nil, K(parseBigIntValue(L), hI))
1322+@Callable(dK)
1323+func fromX18WrapperREADONLY (J,gJ) = $Tuple2(nil, I(parseBigIntValue(J), gJ))
15431324
15441325
15451326
1546-@Callable(dV)
1547-func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
1327+@Callable(dK)
1328+func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H)))
15481329
15491330
15501331
1551-@Callable(dV)
1552-func calcPriceBigIntWrapperREADONLY (bI,bJ) = $Tuple2(nil, toString(bH(parseBigIntValue(bI), parseBigIntValue(bJ))))
1332+@Callable(dK)
1333+func calcPriceBigIntWrapperREADONLY (bA,bB) = $Tuple2(nil, toString(bz(parseBigIntValue(bA), parseBigIntValue(bB))))
15531334
15541335
15551336
1556-@Callable(dV)
1557-func estimatePutOperationWrapperREADONLY (cr,bN,cQ,cR,cS,cT,hJ,cU,cV) = $Tuple2(nil, cP(cr, bN, cQ, cR, cS, cT, hJ, cU, cV, true, false, 0, ""))
1337+@Callable(dK)
1338+func estimatePutOperationWrapperREADONLY (cj,bF,cI,cJ,cK,cL,gK,cM,cN) = $Tuple2(nil, cH(cj, bF, cI, cJ, cK, cL, gK, cM, cN, true, false, 0, ""))
15581339
15591340
15601341
1561-@Callable(dV)
1562-func estimateGetOperationWrapperREADONLY (cr,hK,ct,hJ) = {
1563- let dk = cq(cr, hK, ct, addressFromStringValue(hJ))
1564- $Tuple2(nil, $Tuple10(dk._1, dk._2, dk._3, dk._4, dk._5, dk._6, dk._7, toString(dk._8), dk._9, dk._10))
1342+@Callable(dK)
1343+func estimateGetOperationWrapperREADONLY (cj,gL,cl,gK) = {
1344+ let dc = ci(cj, gL, cl, addressFromStringValue(gK))
1345+ $Tuple2(nil, $Tuple10(dc._1, dc._2, dc._3, dc._4, dc._5, dc._6, dc._7, toString(dc._8), dc._9, dc._10))
15651346 }
15661347
15671348
15681349
1569-@Callable(dV)
1570-func getFeeREADONLY () = $Tuple2(nil, aj)
1350+@Callable(dK)
1351+func getFeeREADONLY () = $Tuple2(nil, ah)
15711352
15721353
1573-@Verifier(hL)
1574-func hM () = {
1575- let hN = {
1576- let aE = gi()
1577- if ($isInstanceOf(aE, "ByteVector"))
1354+@Verifier(gM)
1355+func gN () = {
1356+ let gO = {
1357+ let ax = fx()
1358+ if ($isInstanceOf(ax, "ByteVector"))
15781359 then {
1579- let gm = aE
1580- gm
1360+ let fB = ax
1361+ fB
15811362 }
1582- else if ($isInstanceOf(aE, "Unit"))
1583- then hL.senderPublicKey
1363+ else if ($isInstanceOf(ax, "Unit"))
1364+ then gM.senderPublicKey
15841365 else throw("Match error")
15851366 }
1586- let aE = hL
1587- if ($isInstanceOf(aE, "Order"))
1367+ let ax = gM
1368+ if ($isInstanceOf(ax, "Order"))
15881369 then {
1589- let eW = aE
1590- let hO = aQ()
1591- let hP = eV(eW)
1592- let hQ = sigVerify(eW.bodyBytes, eW.proofs[0], eW.senderPublicKey)
1593- let hR = sigVerify(eW.bodyBytes, eW.proofs[1], hO)
1594- if (if (if (hP)
1595- then hQ
1370+ let dx = ax
1371+ let gP = aI()
1372+ let gQ = dw(dx)
1373+ let gR = sigVerify(dx.bodyBytes, dx.proofs[0], dx.senderPublicKey)
1374+ let gS = sigVerify(dx.bodyBytes, dx.proofs[1], gP)
1375+ if (if (if (gQ)
1376+ then gR
15961377 else false)
1597- then hR
1378+ then gS
15981379 else false)
15991380 then true
1600- else az(hP, hQ, hR)
1381+ else as(gQ, gR, gS)
16011382 }
1602- else if ($isInstanceOf(aE, "SetScriptTransaction"))
1383+ else if ($isInstanceOf(ax, "SetScriptTransaction"))
16031384 then {
1604- let dI = aE
1605- let hS = blake2b256(value(dI.script))
1606- let hT = fromBase64String(value(getString(aN, ax())))
1607- let hU = scriptHash(this)
1608- if (if ((hT == hS))
1609- then (hU != hS)
1385+ let dX = ax
1386+ let gT = blake2b256(value(dX.script))
1387+ let gU = fromBase64String(value(getString(aF, aq())))
1388+ let gV = scriptHash(this)
1389+ if (if ((gU == gT))
1390+ then (gV != gT)
16101391 else false)
16111392 then true
1612- else sigVerify(hL.bodyBytes, hL.proofs[0], hN)
1393+ else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
16131394 }
1614- else sigVerify(hL.bodyBytes, hL.proofs[0], hN)
1395+ else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
16151396 }
16161397
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = toBigInt(100000000)
77
88 let c = toBigInt(1000000000000000000)
99
1010 let d = toBigInt(0)
1111
1212 let e = toBigInt(0)
1313
1414 let f = toBigInt(1)
1515
1616 let g = toBigInt(2)
1717
18-let h = toBigInt(3)
18+let h = toBigInt((a - ((a * 1) / a)))
1919
20-let i = toBigInt(4)
20+let i = "WAVES"
2121
22-let j = toBigInt((a - ((a * 1) / a)))
22+let j = "100"
2323
24-let k = "WAVES"
24+let k = "1"
2525
26-let l = "100"
26+let l = "__"
2727
28-let m = "1"
28+let m = ""
2929
30-let n = "__"
30+let n = 1
3131
32-let o = ""
32+let o = 2
3333
34-let p = 1
34+let p = 3
3535
36-let q = 2
36+let q = 4
3737
38-let r = 3
38+let r = 1
3939
40-let s = 4
40+let s = 2
4141
42-let t = 1
42+let t = 3
4343
44-let u = 2
44+let u = 4
4545
46-let v = 3
46+let v = 5
4747
48-let w = 4
48+let w = 6
4949
50-let x = 5
50+let x = 7
5151
52-let y = 6
52+let y = 8
5353
54-let z = 7
54+let z = 9
5555
56-let A = 8
56+let A = 1
5757
58-let B = 9
58+let B = 6
5959
60-let C = 1
60+let C = 7
6161
62-let D = 6
62+let D = 10
6363
64-let E = 7
64+let E = fraction(10, a, 10000)
6565
66-let F = 10
67-
68-let G = fraction(10, a, 10000)
69-
70-func H (I,J) = fraction(toBigInt(I), c, toBigInt(J))
66+func F (G,H) = fraction(toBigInt(G), c, toBigInt(H))
7167
7268
73-func K (L,M) = toInt(fraction(L, toBigInt(M), c))
69+func I (J,K) = toInt(fraction(J, toBigInt(K), c))
7470
7571
76-func N (O,P,Q) = fraction(O, P, Q)
72+func L (M,N,O) = fraction(M, N, O)
7773
7874
79-func R (L) = if ((d > L))
80- then -(L)
81- else L
75+func P (J) = if ((d > J))
76+ then -(J)
77+ else J
8278
8379
84-func S (L) = if ((d > L))
85- then -(L)
86- else L
80+func Q (J) = if ((d > J))
81+ then -(J)
82+ else J
8783
8884
89-func T () = "%s__factoryContract"
85+func R () = "%s__factoryContract"
9086
9187
92-func U () = "%s__managerPublicKey"
88+func S () = "%s__managerPublicKey"
9389
9490
95-func V () = "%s__pendingManagerPublicKey"
91+func T () = "%s__pendingManagerPublicKey"
9692
9793
98-func W () = "%s%s__price__last"
94+func U () = "%s%s__price__last"
9995
10096
101-func X (Y,Z) = makeString(["%s%s%d%d__price__history", toString(Y), toString(Z)], n)
97+func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], l)
10298
10399
104-func aa (ab,ac) = ((("%s%s%s__P__" + ab) + "__") + ac)
100+func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
105101
106102
107-func ad (ab,ac) = ((("%s%s%s__G__" + ab) + "__") + ac)
103+func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
108104
109105
110-func ae () = "%s__amountAsset"
106+func ac () = "%s__amountAsset"
111107
112108
113-func af () = "%s__priceAsset"
109+func ad () = "%s__priceAsset"
114110
115111
116-func ag () = "%s__amp"
112+func ae () = "%s__amp"
117113
118114
119-func ah () = "%s__addonAddr"
115+func af () = "%s__addonAddr"
120116
121117
122-let ai = "%s__fee"
118+let ag = "%s__fee"
123119
124-let aj = valueOrElse(getInteger(this, ai), G)
120+let ah = valueOrElse(getInteger(this, ag), E)
125121
126-let ak = makeString(["%s", "dLp"], n)
127-
128-let al = makeString(["%s", "dLpRefreshedHeight"], n)
129-
130-let am = makeString(["%s", "refreshDLpDelay"], n)
131-
132-let an = 1
133-
134-let ao = valueOrElse(getInteger(this, am), an)
135-
136-func ap () = "%s__factoryConfig"
122+func ai () = "%s__factoryConfig"
137123
138124
139-func aq () = "%s%s__matcher__publicKey"
125+func aj () = "%s%s__matcher__publicKey"
140126
141127
142-func ar (as,at) = (((("%d%d%s__" + as) + "__") + at) + "__config")
128+func ak (al,am) = (((("%d%d%s__" + al) + "__") + am) + "__config")
143129
144130
145-func au (av) = ("%s%s%s__mappings__baseAsset2internalId__" + av)
131+func an (ao) = ("%s%s%s__mappings__baseAsset2internalId__" + ao)
146132
147133
148-func aw () = "%s__shutdown"
134+func ap () = "%s__shutdown"
149135
150136
151-func ax () = "%s__allowedLpStableScriptHash"
137+func aq () = "%s__allowedLpStableScriptHash"
152138
153139
154-func ay () = "%s__feeCollectorAddress"
140+func ar () = "%s__feeCollectorAddress"
155141
156142
157-func az (aA,aB,aC) = throw(((((("Failed: ordValid=" + toString(aA)) + " sndrValid=") + toString(aB)) + " mtchrValid=") + toString(aC)))
143+func as (at,au,av) = throw(((((("Failed: ordValid=" + toString(at)) + " sndrValid=") + toString(au)) + " mtchrValid=") + toString(av)))
158144
159145
160-func aD (L) = {
161- let aE = L
162- if ($isInstanceOf(aE, "String"))
146+func aw (J) = {
147+ let ax = J
148+ if ($isInstanceOf(ax, "String"))
163149 then {
164- let aF = aE
165- aF
150+ let ay = ax
151+ ay
166152 }
167153 else throw("fail cast to String")
168154 }
169155
170156
171-func aG (aH,aI) = valueOrErrorMessage(getString(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " not defined"], ""))
157+func az (aA,aB) = valueOrErrorMessage(getString(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
172158
173159
174-func aJ (aH,aI) = valueOrErrorMessage(getInteger(aH, aI), makeString(["mandatory ", toString(aH), ".", aI, " not defined"], ""))
160+func aC (aA,aB) = valueOrErrorMessage(getInteger(aA, aB), makeString(["mandatory ", toString(aA), ".", aB, " not defined"], ""))
175161
176162
177-func aK (aL) = throw(makeString(["lp_stable.ride:", aL], " "))
163+func aD (aE) = throw(makeString(["lp_stable.ride:", aE], " "))
178164
179165
180-func aM (aL) = makeString(["lp_stable.ride:", aL], " ")
166+let aF = addressFromStringValue(az(this, R()))
167+
168+let aG = az(this, ae())
169+
170+func aH () = valueOrElse(getBoolean(aF, ap()), false)
181171
182172
183-let aN = addressFromStringValue(aG(this, T()))
184-
185-let aO = aG(this, ag())
186-
187-func aP () = valueOrElse(getBoolean(aN, aw()), false)
173+func aI () = fromBase58String(az(aF, aj()))
188174
189175
190-func aQ () = fromBase58String(aG(aN, aq()))
176+let aJ = addressFromStringValue(az(aF, ar()))
191177
192-
193-let aR = addressFromStringValue(aG(aN, ay()))
194-
195-func aS () = {
196- let aT = aG(this, ae())
197- let aU = aG(this, af())
198- let aV = aJ(aN, au(aU))
199- let as = aJ(aN, au(aT))
200- split(aG(aN, ar(toString(as), toString(aV))), n)
178+func aK () = {
179+ let aL = az(this, ac())
180+ let aM = az(this, ad())
181+ let aN = aC(aF, an(aM))
182+ let al = aC(aF, an(aL))
183+ split(az(aF, ak(toString(al), toString(aN))), l)
201184 }
202185
203186
204-func aW (aX) = if ((aX == k))
187+func aO (aP) = if ((aP == i))
205188 then unit
206- else fromBase58String(aX)
189+ else fromBase58String(aP)
207190
208191
209-func aY (aX) = if ((aX == unit))
210- then k
211- else toBase58String(value(aX))
192+func aQ (aP) = if ((aP == unit))
193+ then i
194+ else toBase58String(value(aP))
212195
213196
214-func aZ (ba) = $Tuple7(addressFromStringValue(ba[t]), parseIntValue(ba[u]), fromBase58String(ba[v]), aW(ba[w]), aW(ba[x]), parseIntValue(ba[y]), parseIntValue(ba[z]))
197+func aR (aS) = $Tuple7(addressFromStringValue(aS[r]), parseIntValue(aS[s]), fromBase58String(aS[t]), aO(aS[u]), aO(aS[v]), parseIntValue(aS[w]), parseIntValue(aS[x]))
215198
216199
217-let bb = aZ(aS())
200+let aT = aR(aK())
218201
219-let bc = bb
202+let aU = aT
220203
221-let bd = bc._1
204+let aV = aU._1
222205
223-let be = bc._2
206+let aW = aU._2
224207
225-let bf = bc._3
208+let aX = aU._3
226209
227-let bg = bc._4
210+let aY = aU._4
228211
229-let bh = bc._5
212+let aZ = aU._5
230213
231-let bi = bc._6
214+let ba = aU._6
232215
233-let bj = bc._7
216+let bb = aU._7
234217
235-func bk () = split(aG(aN, ap()), n)
218+func bc () = split(az(aF, ai()), l)
236219
237220
238-let bl = bk()
221+let bd = bc()
239222
240-let bm = valueOrErrorMessage(addressFromString(bl[C]), "Invalid staking contract address")
223+let be = valueOrErrorMessage(addressFromString(bd[A]), "Invalid staking contract address")
241224
242-let bn = valueOrErrorMessage(addressFromString(bl[E]), "Invalid slipage contract address")
225+let bf = valueOrErrorMessage(addressFromString(bd[C]), "Invalid slipage contract address")
243226
244-let bo = valueOrErrorMessage(addressFromString(bl[F]), "Invalid gwx contract address")
227+let bg = valueOrErrorMessage(addressFromString(bd[D]), "Invalid gwx contract address")
245228
246-let bp = valueOrErrorMessage(addressFromString(bl[D]), "Invalid gwx contract address")
229+let bh = valueOrErrorMessage(addressFromString(bd[B]), "Invalid gwx contract address")
247230
248-func bq (br,bs,bt,bu,bv,bw,bx,by,bz,bA) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(br), toString(bs), toString(bt), toString(bu), toString(bv), toString(bw), toString(bx), toString(by), toString(bz), toString(bA)], n)
231+func bi (bj,bk,bl,bm,bn,bo,bp,bq,br,bs) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bj), toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs)], l)
249232
250233
251-func bB (bC,bD,bE,bu,bx,by) = makeString(["%d%d%d%d%d%d", toString(bC), toString(bD), toString(bE), toString(bu), toString(bx), toString(by)], n)
234+func bt (bu,bv,bw,bm,bp,bq) = makeString(["%d%d%d%d%d%d", toString(bu), toString(bv), toString(bw), toString(bm), toString(bp), toString(bq)], l)
252235
253236
254-func bF (bG) = if ((bG == "WAVES"))
237+func bx (by) = if ((by == "WAVES"))
255238 then wavesBalance(this).available
256- else assetBalance(this, fromBase58String(bG))
239+ else assetBalance(this, fromBase58String(by))
257240
258241
259-func bH (bI,bJ) = fraction(bI, c, bJ)
242+func bz (bA,bB) = fraction(bA, c, bB)
260243
261244
262-func bK (bL,bM,bN) = {
263- let bO = fraction((bL - bM), b, bM)
264- let bP = ((bN - R(bO)) > d)
265- if (!(bP))
266- then throw(("Big slpg: " + toString(bO)))
267- else $Tuple2(bP, min([bL, bM]))
245+func bC (bD,bE,bF) = {
246+ let bG = fraction((bD - bE), b, bE)
247+ let bH = ((bF - P(bG)) > d)
248+ if (!(bH))
249+ then throw(("Big slpg: " + toString(bG)))
250+ else $Tuple2(bH, min([bD, bE]))
268251 }
269252
270253
271-func bQ (bR,bS,bT) = {
272- let bO = fraction(bS, b, bR)
273- let bU = (bT > bO)
274- if (if (bU)
254+func bI (bJ,bK,bL) = {
255+ let bG = fraction(bK, b, bJ)
256+ let bM = (bL > bG)
257+ if (if (bM)
275258 then true
276- else (bS > bR))
277- then throw(((((((toString(bS) + " ") + toString(bR)) + " ") + toString(bO)) + " ") + toString(bT)))
278- else bU
259+ else (bK > bJ))
260+ then throw(((((((toString(bK) + " ") + toString(bJ)) + " ") + toString(bG)) + " ") + toString(bL)))
261+ else bM
279262 }
280263
281264
282-func bV (bW,bX,bY,bZ) = {
283- let ca = H(bY, bW)
284- let cb = H(bZ, bX)
285- bH(cb, ca)
265+func bN (bO,bP,bQ,bR) = {
266+ let bS = F(bQ, bO)
267+ let bT = F(bR, bP)
268+ bz(bT, bS)
286269 }
287270
288271
289-func cc (bY,bZ,cd) = {
290- let ce = aS()
291- let cf = parseIntValue(ce[y])
292- let cg = parseIntValue(ce[z])
293- let ch = bV(cf, cg, bY, bZ)
294- let bJ = H(bY, cf)
295- let bI = H(bZ, cg)
296- let ci = H(cd, a)
297- let cj = bH(bJ, ci)
298- let ck = bH(bI, ci)
299-[ch, cj, ck]
272+func bU (bQ,bR,bV) = {
273+ let bW = aK()
274+ let bX = parseIntValue(bW[w])
275+ let bY = parseIntValue(bW[x])
276+ let bZ = bN(bX, bY, bQ, bR)
277+ let bB = F(bQ, bX)
278+ let bA = F(bR, bY)
279+ let ca = F(bV, a)
280+ let cb = bz(bB, ca)
281+ let cc = bz(bA, ca)
282+[bZ, cb, cc]
300283 }
301284
302285
303-func cl (bY,bZ,cd) = {
304- let cm = cc(bY, bZ, cd)
305-[K(cm[0], a), K(cm[1], a), K(cm[2], a)]
286+func cd (bQ,bR,bV) = {
287+ let ce = bU(bQ, bR, bV)
288+[I(ce[0], a), I(ce[1], a), I(ce[2], a)]
306289 }
307290
308291
309-func cn (co) = {
310- let cp = fraction(co, aj, a)
311- $Tuple2((co - cp), cp)
292+func cf (cg) = {
293+ let ch = fraction(cg, ah, a)
294+ $Tuple2((cg - ch), ch)
312295 }
313296
314297
315-func cq (cr,cs,ct,cu) = {
316- let ce = aS()
317- let cv = ce[v]
318- let cw = ce[w]
319- let cx = ce[x]
320- let cy = parseIntValue(ce[y])
321- let cz = parseIntValue(ce[z])
322- let cA = ce[u]
323- let cB = valueOrErrorMessage(assetInfo(fromBase58String(cv)), "Wrong LP id").quantity
324- if ((cv != cs))
298+func ci (cj,ck,cl,cm) = {
299+ let bW = aK()
300+ let cn = bW[t]
301+ let co = bW[u]
302+ let cp = bW[v]
303+ let cq = parseIntValue(bW[w])
304+ let cr = parseIntValue(bW[x])
305+ let cs = bW[s]
306+ let ct = valueOrErrorMessage(assetInfo(fromBase58String(cn)), "Wrong LP id").quantity
307+ if ((cn != ck))
325308 then throw("Wrong pmt asset")
326309 else {
327- let cC = bF(cw)
328- let cD = H(cC, cy)
329- let cE = bF(cx)
330- let cF = H(cE, cz)
331- let cG = bH(cF, cD)
332- let cH = K(cG, a)
333- let cI = H(ct, a)
334- let cJ = H(cB, a)
335- let cK = fraction(cD, cI, cJ)
336- let cL = fraction(cF, cI, cJ)
337- let cM = K(cK, cy)
338- let cN = K(cL, cz)
339- let cO = if ((cr == ""))
310+ let cu = bx(co)
311+ let cv = F(cu, cq)
312+ let cw = bx(cp)
313+ let cx = F(cw, cr)
314+ let cy = bz(cx, cv)
315+ let cz = I(cy, a)
316+ let cA = F(cl, a)
317+ let cB = F(ct, a)
318+ let cC = fraction(cv, cA, cB)
319+ let cD = fraction(cx, cA, cB)
320+ let cE = I(cC, cq)
321+ let cF = I(cD, cr)
322+ let cG = if ((cj == ""))
340323 then nil
341- else [ScriptTransfer(cu, cM, if ((cw == "WAVES"))
324+ else [ScriptTransfer(cm, cE, if ((co == "WAVES"))
342325 then unit
343- else fromBase58String(cw)), ScriptTransfer(cu, cN, if ((cx == "WAVES"))
326+ else fromBase58String(co)), ScriptTransfer(cm, cF, if ((cp == "WAVES"))
344327 then unit
345- else fromBase58String(cx)), StringEntry(ad(toString(cu), cr), bB(cM, cN, ct, cH, height, lastBlock.timestamp)), IntegerEntry(W(), cH), IntegerEntry(X(height, lastBlock.timestamp), cH)]
346- $Tuple10(cM, cN, cw, cx, cC, cE, cB, cG, cA, cO)
328+ else fromBase58String(cp)), StringEntry(ab(toString(cm), cj), bt(cE, cF, cl, cz, height, lastBlock.timestamp)), IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz)]
329+ $Tuple10(cE, cF, co, cp, cu, cw, ct, cy, cs, cG)
347330 }
348331 }
349332
350333
351-func cP (cr,bN,cQ,cR,cS,cT,cu,cU,cV,cW,cX,cY,cZ) = {
352- let ce = aS()
353- let cv = fromBase58String(ce[v])
354- let da = ce[w]
355- let db = ce[x]
356- let dc = ce[A]
357- let dd = ce[B]
358- let de = parseIntValue(ce[y])
359- let df = parseIntValue(ce[z])
360- let cA = ce[u]
361- let dg = valueOrErrorMessage(assetInfo(cv), "Wr lp as").quantity
362- let cC = if (cU)
363- then bF(da)
364- else if (if (cW)
365- then (cZ == da)
334+func cH (cj,bF,cI,cJ,cK,cL,cm,cM,cN,cO,cP,cQ,cR) = {
335+ let bW = aK()
336+ let cn = fromBase58String(bW[t])
337+ let cS = bW[u]
338+ let cT = bW[v]
339+ let cU = bW[y]
340+ let cV = bW[z]
341+ let cW = parseIntValue(bW[w])
342+ let cX = parseIntValue(bW[x])
343+ let cs = bW[s]
344+ let cY = valueOrErrorMessage(assetInfo(cn), "Wr lp as").quantity
345+ let cu = if (cM)
346+ then bx(cS)
347+ else if (if (cO)
348+ then (cR == cS)
366349 else false)
367- then (bF(da) - cY)
368- else if (cW)
369- then bF(da)
370- else (bF(da) - cQ)
371- let cE = if (cU)
372- then bF(db)
373- else if (if (cW)
374- then (cZ == db)
350+ then (bx(cS) - cQ)
351+ else if (cO)
352+ then bx(cS)
353+ else (bx(cS) - cI)
354+ let cw = if (cM)
355+ then bx(cT)
356+ else if (if (cO)
357+ then (cR == cT)
375358 else false)
376- then (bF(db) - cY)
377- else if (cW)
378- then bF(db)
379- else (bF(db) - cS)
380- let dh = H(cQ, de)
381- let di = H(cS, df)
382- let dj = bH(di, dh)
383- let cD = H(cC, de)
384- let cF = H(cE, df)
385- let dk = if ((dg == 0))
359+ then (bx(cT) - cQ)
360+ else if (cO)
361+ then bx(cT)
362+ else (bx(cT) - cK)
363+ let cZ = F(cI, cW)
364+ let da = F(cK, cX)
365+ let db = bz(da, cZ)
366+ let cv = F(cu, cW)
367+ let cx = F(cw, cX)
368+ let dc = if ((cY == 0))
386369 then {
387- let cG = d
388- let dl = d
389- let ci = pow((dh * di), 0, toBigInt(5), 1, 0, DOWN)
390- $Tuple5(K(ci, a), K(dh, de), K(di, df), bH((cF + di), (cD + dh)), dl)
370+ let cy = d
371+ let dd = d
372+ let ca = pow((cZ * da), 0, toBigInt(5), 1, 0, DOWN)
373+ $Tuple5(I(ca, a), I(cZ, cW), I(da, cX), bz((cx + da), (cv + cZ)), dd)
391374 }
392375 else {
393- let cG = bH(cF, cD)
394- let dm = fraction(R((cG - dj)), c, cG)
395- let dl = H(bN, a)
396- if (if (if (cX)
397- then (cG != d)
376+ let cy = bz(cx, cv)
377+ let de = fraction(P((cy - db)), c, cy)
378+ let dd = F(bF, a)
379+ if (if (if (cP)
380+ then (cy != d)
398381 else false)
399- then (dm > dl)
382+ then (de > dd)
400383 else false)
401- then throw(((("Price slippage " + toString(dm)) + " > ") + toString(dl)))
384+ then throw(((("Price slippage " + toString(de)) + " > ") + toString(dd)))
402385 else {
403- let dn = H(dg, a)
404- let do = fraction(dh, cG, c)
405- let dp = fraction(di, c, cG)
406- let dq = if ((do > di))
407- then $Tuple2(dp, di)
408- else $Tuple2(dh, do)
409- let dr = dq._1
410- let ds = dq._2
411- let ci = fraction(dn, ds, cF)
412- $Tuple5(K(ci, a), K(dr, de), K(ds, df), cG, dl)
386+ let df = F(cY, a)
387+ let dg = fraction(cZ, cy, c)
388+ let dh = fraction(da, c, cy)
389+ let di = if ((dg > da))
390+ then $Tuple2(dh, da)
391+ else $Tuple2(cZ, dg)
392+ let dj = di._1
393+ let dk = di._2
394+ let ca = fraction(df, dk, cx)
395+ $Tuple5(I(ca, a), I(dj, cW), I(dk, cX), cy, dd)
413396 }
414397 }
415- let dt = dk._1
416- let du = dk._2
417- let dv = dk._3
418- let cH = K(dk._4, a)
419- let dw = K(dk._5, a)
420- if ((0 >= dt))
398+ let dl = dc._1
399+ let dm = dc._2
400+ let dn = dc._3
401+ let cz = I(dc._4, a)
402+ let do = I(dc._5, a)
403+ if ((0 >= dl))
421404 then throw("LP <= 0")
422405 else {
423- let dx = if (!(cV))
406+ let dp = if (!(cN))
424407 then 0
425- else dt
426- let dy = (cQ - du)
427- let dz = (cS - dv)
428- let dA = if (if (cW)
429- then (cZ == da)
408+ else dl
409+ let dq = (cI - dm)
410+ let dr = (cK - dn)
411+ let ds = if (if (cO)
412+ then (cR == cS)
430413 else false)
431- then $Tuple2(cY, 0)
432- else if (if (cW)
433- then (cZ == db)
414+ then $Tuple2(cQ, 0)
415+ else if (if (cO)
416+ then (cR == cT)
434417 else false)
435- then $Tuple2(0, cY)
436- else $Tuple2(du, dv)
437- let dB = dA._1
438- let dC = dA._2
439- let dD = [IntegerEntry(W(), cH), IntegerEntry(X(height, lastBlock.timestamp), cH), StringEntry(aa(cu, cr), bq(dB, dC, dx, cH, bN, dw, height, lastBlock.timestamp, dy, dz))]
440- $Tuple13(dt, dx, cH, cC, cE, dg, cv, cA, dD, dy, dz, cR, cT)
418+ then $Tuple2(0, cQ)
419+ else $Tuple2(dm, dn)
420+ let dt = ds._1
421+ let du = ds._2
422+ let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, cj), bi(dt, du, dp, cz, bF, do, height, lastBlock.timestamp, dq, dr))]
423+ $Tuple13(dl, dp, cz, cu, cw, cY, cn, cs, dv, dq, dr, cJ, cL)
441424 }
442425 }
443426
444427
445-func dE (dF) = {
446- let dG = dF[0]
447- let dH = dF[1]
448- let dI = (dG + dH)
449- if ((dI == e))
450- then e
428+func dw (dx) = {
429+ let bW = aK()
430+ let dy = bW[u]
431+ let dz = bW[v]
432+ let cs = parseIntValue(bW[s])
433+ let bX = parseIntValue(bW[w])
434+ let bY = parseIntValue(bW[x])
435+ let dA = bx(dy)
436+ let dB = bx(dz)
437+ let cy = if ((dx.orderType == Buy))
438+ then bN(bX, bY, (dA + dx.amount), dB)
439+ else bN(bX, bY, (dA - dx.amount), dB)
440+ let cz = I(cy, a)
441+ if (if (if (aH())
442+ then true
443+ else (cs == p))
444+ then true
445+ else (cs == q))
446+ then throw("Admin blocked")
451447 else {
452- let dJ = parseIntValue(aO)
453- let dK = (dJ * 2)
454- let cm = fraction(dG, dH, f)
455- let dL = fraction(cm, i, f)
456- let dM = fraction(toBigInt(dK), dI, f)
457- let dN = toBigInt((dK - 1))
458- func dO (dP) = {
459- let dQ = fraction(dP, dP, f)
460- let dR = fraction(dQ, dP, f)
461- let dS = fraction(dR, f, dL)
462- fraction((dM + fraction(dS, g, f)), dP, (fraction(dN, dP, f) + fraction(h, dS, f)), CEILING)
463- }
464-
465- func dT (dU,dV) = if (dU._2)
466- then dU
448+ let dC = dx.assetPair.amountAsset
449+ let dD = if ((dC == unit))
450+ then "WAVES"
451+ else toBase58String(value(dC))
452+ let dE = dx.assetPair.priceAsset
453+ let dF = if ((dE == unit))
454+ then "WAVES"
455+ else toBase58String(value(dE))
456+ if (if ((dD != dy))
457+ then true
458+ else (dF != dz))
459+ then throw("Wr assets")
467460 else {
468- let dP = dU._1
469- let dW = dO(dP)
470- let dX = toInt((dW - value(dP)))
471- let dY = if ((0 > dX))
472- then -(dX)
473- else dX
474- if ((1 >= dY))
475- then $Tuple2(dW, true)
476- else $Tuple2(dW, false)
461+ let dG = dx.price
462+ let cX = fraction(a, bY, bX)
463+ let dH = L(dG, a, cX)
464+ let dI = if ((dx.orderType == Buy))
465+ then (cz >= dH)
466+ else (dH >= cz)
467+ true
477468 }
478-
479- let dZ = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
480- let ea = {
481- let eb = dZ
482- let ec = size(eb)
483- let ed = $Tuple2(dI, false)
484- func ee (ef,eg) = if ((eg >= ec))
485- then ef
486- else dT(ef, eb[eg])
487-
488- func eh (ef,eg) = if ((eg >= ec))
489- then ef
490- else throw("List size exceeds 15")
491-
492- eh(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ed, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
493- }
494- let dP = ea._1
495- let ei = ea._2
496- if (ei)
497- then dP
498- else throw(("D calculation error, D = " + toString(dP)))
499469 }
500470 }
501471
502472
503-func ej (dF) = {
504- let ek = g
505- let dG = dF[0]
506- let dH = dF[1]
507- let el = parseBigIntValue(l)
508- let dJ = (parseBigIntValue(aO) * el)
509- let dI = (dG + dH)
510- if ((dI == e))
473+func dJ (dK) = if ((size(dK.payments) != 1))
474+ then throw("1 pmnt exp")
475+ else {
476+ let dL = value(dK.payments[0])
477+ let ck = value(dL.assetId)
478+ let cQ = dL.amount
479+ let dc = ci(toBase58String(dK.transactionId), toBase58String(ck), cQ, dK.caller)
480+ let cE = dc._1
481+ let cF = dc._2
482+ let cs = parseIntValue(dc._9)
483+ let cG = dc._10
484+ if (if (aH())
485+ then true
486+ else (cs == q))
487+ then throw(("Admin blocked: " + toString(cs)))
488+ else $Tuple5(cE, cF, cQ, ck, cG)
489+ }
490+
491+
492+func dM (dN,aa,dO,dP,bF,cN,cO,cP,cQ,cR) = {
493+ let dc = cH(aa, bF, value(dO).amount, value(dO).assetId, value(dP).amount, value(dP).assetId, dN, (aa == ""), cN, cO, cP, cQ, cR)
494+ let cs = parseIntValue(dc._8)
495+ if (if (if (aH())
496+ then true
497+ else (cs == o))
498+ then true
499+ else (cs == q))
500+ then throw(("Blocked:" + toString(cs)))
501+ else dc
502+ }
503+
504+
505+func dQ (dR) = {
506+ let dS = g
507+ let dT = dR[0]
508+ let dU = dR[1]
509+ let dV = parseBigIntValue(j)
510+ let dW = (parseBigIntValue(aG) * dV)
511+ let dX = (dT + dU)
512+ if ((dX == e))
511513 then e
512514 else {
513- let dK = (dJ * ek)
514- let dL = (((dG * dH) * ek) * ek)
515- let em = ((dK * dI) / el)
516- let en = (dK - el)
517- let eo = (ek + f)
518- func dT (dU,ep) = {
519- let eq = dU
520- let dP = eq._1
521- let ei = eq._2
515+ let dY = (dW * dS)
516+ let dZ = (((dT * dU) * dS) * dS)
517+ let ea = ((dY * dX) / dV)
518+ let eb = (dY - dV)
519+ let ec = (dS + f)
520+ func ed (ee,ef) = {
521+ let eg = ee
522+ let eh = eg._1
523+ let ei = eg._2
522524 if ((ei != unit))
523- then dU
525+ then ee
524526 else {
525- let dS = (((dP * dP) * dP) / dL)
526- let dW = (((em + (dS * ek)) * dP) / (((en * dP) / el) + (eo * dS)))
527- let dY = S((dW - value(dP)))
528- if ((f >= dY))
529- then $Tuple2(dW, ep)
530- else $Tuple2(dW, unit)
527+ let ej = (((eh * eh) * eh) / dZ)
528+ let ek = (((ea + (ej * dS)) * eh) / (((eb * eh) / dV) + (ec * ej)))
529+ let el = Q((ek - value(eh)))
530+ if ((f >= el))
531+ then $Tuple2(ek, ef)
532+ else $Tuple2(ek, unit)
531533 }
532534 }
533535
534- let dZ = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
535- let er = {
536- let eb = dZ
537- let ec = size(eb)
538- let ed = $Tuple2(dI, unit)
539- func ee (ef,eg) = if ((eg >= ec))
540- then ef
541- else dT(ef, eb[eg])
536+ let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
537+ let en = {
538+ let eo = em
539+ let ep = size(eo)
540+ let eq = $Tuple2(dX, unit)
541+ func er (es,et) = if ((et >= ep))
542+ then es
543+ else ed(es, eo[et])
542544
543- func eh (ef,eg) = if ((eg >= ec))
544- then ef
545+ func eu (es,et) = if ((et >= ep))
546+ then es
545547 else throw("List size exceeds 15")
546548
547- eh(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ed, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
549+ eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
548550 }
549- let dP = er._1
550- let ei = er._2
551+ let eh = en._1
552+ let ei = en._2
551553 if ((ei != unit))
552- then dP
553- else throw(("D calculation error, D = " + toString(dP)))
554+ then eh
555+ else throw(("D calculation error, D = " + toString(eh)))
554556 }
555557 }
556558
557559
558-func es (dF,dV,et) = {
559- let ek = g
560- let eu = dF[if ((dV == 0))
560+func ev (dR,dK,ew) = {
561+ let dS = g
562+ let ex = dR[if ((dK == 0))
561563 then 1
562564 else 0]
563- let el = parseBigIntValue(l)
564- let dJ = (parseBigIntValue(aO) * el)
565- let dI = eu
566- let dK = (dJ * ek)
567- let ev = (((((et * et) / (eu * ek)) * et) * el) / (dK * ek))
568- let ew = ((dI + ((et * el) / dK)) - et)
569- func dT (dU,ep) = {
570- let ex = dU
571- let ey = ex._1
572- let ei = ex._2
565+ let dV = parseBigIntValue(j)
566+ let dW = (parseBigIntValue(aG) * dV)
567+ let dX = ex
568+ let dY = (dW * dS)
569+ let ey = (((((ew * ew) / (ex * dS)) * ew) * dV) / (dY * dS))
570+ let ez = ((dX + ((ew * dV) / dY)) - ew)
571+ func ed (ee,ef) = {
572+ let eA = ee
573+ let eB = eA._1
574+ let ei = eA._2
573575 if ((ei != unit))
574- then dU
576+ then ee
575577 else {
576- let ez = (((ey * ey) + ev) / ((g * ey) + ew))
577- let eA = S((ez - value(ey)))
578- if ((f >= eA))
579- then $Tuple2(ez, ep)
580- else $Tuple2(ez, unit)
578+ let eC = (((eB * eB) + ey) / ((g * eB) + ez))
579+ let eD = Q((eC - value(eB)))
580+ if ((f >= eD))
581+ then $Tuple2(eC, ef)
582+ else $Tuple2(eC, unit)
581583 }
582584 }
583585
584- let dZ = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
585- let eB = {
586- let eb = dZ
587- let ec = size(eb)
588- let ed = $Tuple2(et, unit)
589- func ee (ef,eg) = if ((eg >= ec))
590- then ef
591- else dT(ef, eb[eg])
586+ let em = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
587+ let eE = {
588+ let eo = em
589+ let ep = size(eo)
590+ let eq = $Tuple2(ew, unit)
591+ func er (es,et) = if ((et >= ep))
592+ then es
593+ else ed(es, eo[et])
592594
593- func eh (ef,eg) = if ((eg >= ec))
594- then ef
595+ func eu (es,et) = if ((et >= ep))
596+ then es
595597 else throw("List size exceeds 15")
596598
597- eh(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ee(ed, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
599+ eu(er(er(er(er(er(er(er(er(er(er(er(er(er(er(er(eq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
598600 }
599- let ey = eB._1
600- let ei = eB._2
601+ let eB = eE._1
602+ let ei = eE._2
601603 if ((ei != unit))
602- then ey
603- else throw(("Y calculation error, Y = " + toString(ey)))
604+ then eB
605+ else throw(("Y calculation error, Y = " + toString(eB)))
604606 }
605607
606608
607-func eC (eD,eE,eF) = {
608- let eG = fraction(dE([eD, eE]), c, eF)
609- if ((eF == e))
610- then e
611- else eG
612- }
613-
614-
615-func eH (eI,eJ,eK) = {
616- let eL = (toBigInt(bF(aY(bg))) - eI)
617- let eM = (toBigInt(bF(aY(bh))) - eJ)
618- let eN = (toBigInt(value(assetInfo(bf)).quantity) - eK)
619- let eO = eC(eL, eM, eN)
620- eO
621- }
622-
623-
624-func eP (eQ,eR,eK) = {
625- let eL = (bF(aY(bg)) + eQ)
626- let eM = (bF(aY(bh)) + eR)
627- let eN = (value(assetInfo(bf)).quantity + eK)
628- let eG = eC(toBigInt(eL), toBigInt(eM), toBigInt(eN))
629- let eS = [IntegerEntry(al, height), StringEntry(ak, toString(eG))]
630- $Tuple2(eS, eG)
631- }
632-
633-
634-func eT (eU,eG) = if ((eG >= eU))
635- then true
636- else aK("updated DLp lower than current DLp")
637-
638-
639-func eV (eW) = {
640- let eX = eW.amount
641- let eY = fraction(eW.amount, eW.price, a, FLOOR)
642- let eZ = if ((eW.orderType == Buy))
643- then $Tuple2(eX, -(eY))
644- else $Tuple2(-(eX), eY)
645- let eQ = eZ._1
646- let eR = eZ._2
647- if (if (if (aP())
648- then true
649- else (be == r))
650- then true
651- else (be == s))
652- then throw("Admin blocked")
653- else if (if ((eW.assetPair.amountAsset != bg))
654- then true
655- else (eW.assetPair.priceAsset != bh))
656- then throw("Wr assets")
657- else {
658- let fa = parseBigIntValue(getStringValue(this, ak))
659- let fb = eP(eQ, eR, 0)
660- let fc = fb._1
661- let fd = fb._2
662- let fe = (fd >= fa)
663- fe
664- }
665- }
666-
667-
668-func ff (dV) = if ((size(dV.payments) != 1))
669- then throw("1 pmnt exp")
670- else {
671- let fg = value(dV.payments[0])
672- let cs = value(fg.assetId)
673- let cY = fg.amount
674- let dk = cq(toBase58String(dV.transactionId), toBase58String(cs), cY, dV.caller)
675- let cM = dk._1
676- let cN = dk._2
677- let cA = parseIntValue(dk._9)
678- let cO = dk._10
679- if (if (aP())
680- then true
681- else (cA == s))
682- then throw(("Admin blocked: " + toString(cA)))
683- else $Tuple5(cM, cN, cY, cs, cO)
684- }
685-
686-
687-func fh (fi,ac,fj,fk,bN,cV,cW,cX,cY,cZ) = {
688- let dk = cP(ac, bN, value(fj).amount, value(fj).assetId, value(fk).amount, value(fk).assetId, fi, (ac == ""), cV, cW, cX, cY, cZ)
689- let cA = parseIntValue(dk._8)
690- if (if (if (aP())
691- then true
692- else (cA == q))
693- then true
694- else (cA == s))
695- then throw(("Blocked:" + toString(cA)))
696- else dk
697- }
698-
699-
700-func fl (fm,cs,cu,ac,fn) = {
701- let ba = aS()
702- let cw = ba[w]
703- let cx = ba[x]
704- let cv = ba[v]
705- let de = parseIntValue(ba[y])
706- let df = parseIntValue(ba[z])
707- let eN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cv)), "invalid lp asset").quantity)
708- let fo = if ((eN > e))
609+func eF (eG,ck,cm,aa,eH) = {
610+ let aS = aK()
611+ let co = aS[u]
612+ let cp = aS[v]
613+ let cn = aS[t]
614+ let cW = parseIntValue(aS[w])
615+ let cX = parseIntValue(aS[x])
616+ let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
617+ let eJ = if ((eI > e))
709618 then true
710619 else throw("initial deposit requires all coins")
711- if ((fo == fo))
620+ if ((eJ == eJ))
712621 then {
713- let cC = bF(cw)
714- let cE = bF(cx)
715- let fp = if ((ac == ""))
716- then $Tuple2(cC, cE)
717- else if ((cs == cw))
718- then if ((fm > cC))
622+ let cu = bx(co)
623+ let cw = bx(cp)
624+ let eK = if ((aa == ""))
625+ then $Tuple2(cu, cw)
626+ else if ((ck == co))
627+ then if ((eG > cu))
719628 then throw("invalid payment amount")
720- else $Tuple2((cC - fm), cE)
721- else if ((cs == cx))
722- then if ((fm > cE))
629+ else $Tuple2((cu - eG), cw)
630+ else if ((ck == cp))
631+ then if ((eG > cw))
723632 then throw("invalid payment amount")
724- else $Tuple2(cC, (cE - fm))
633+ else $Tuple2(cu, (cw - eG))
725634 else throw("wrong pmtAssetId")
726- let fq = fp._1
727- let fr = fp._2
728- let fs = if ((cs == cw))
729- then $Tuple2(fm, 0)
730- else if ((cs == cx))
731- then $Tuple2(0, fm)
635+ let eL = eK._1
636+ let eM = eK._2
637+ let eN = if ((ck == co))
638+ then $Tuple2(eG, 0)
639+ else if ((ck == cp))
640+ then $Tuple2(0, eG)
732641 else throw("invalid payment")
733- let ft = fs._1
734- let fu = fs._2
735- let fv = if (fn)
736- then $Tuple3(cn(ft)._1, cn(fu)._1, cn(fm)._2)
737- else $Tuple3(ft, fu, 0)
738- let fw = fv._1
739- let fx = fv._2
740- let cp = fv._3
741- let fy = (fq + fw)
742- let fz = (fr + fx)
743- let bS = dE([toBigInt(fq), toBigInt(fr)])
744- let bR = dE([toBigInt(fy), toBigInt(fz)])
745- let fA = if ((bR > bS))
642+ let eO = eN._1
643+ let eP = eN._2
644+ let eQ = if (eH)
645+ then $Tuple3(cf(eO)._1, cf(eP)._1, cf(eG)._2)
646+ else $Tuple3(eO, eP, 0)
647+ let eR = eQ._1
648+ let eS = eQ._2
649+ let ch = eQ._3
650+ let eT = (eL + eR)
651+ let eU = (eM + eS)
652+ let bK = dQ([toBigInt(eL), toBigInt(eM)])
653+ let bJ = dQ([toBigInt(eT), toBigInt(eU)])
654+ let eV = if ((bJ > bK))
746655 then true
747656 else throw()
748- if ((fA == fA))
657+ if ((eV == eV))
749658 then {
750- let fB = fraction(eN, (bR - bS), bS, FLOOR)
751- let cH = K(bH(H(fz, df), H(fy, de)), a)
752- let dD = [IntegerEntry(W(), cH), IntegerEntry(X(height, lastBlock.timestamp), cH), StringEntry(aa(cu, ac), bq(ft, fu, toInt(fB), cH, 0, 0, height, lastBlock.timestamp, 0, 0))]
753- let fC = fraction(fr, a, fq)
754- let fD = fraction(fm, a, (fC + a))
755- let fE = (fm - fD)
756- let fF = fraction(eN, toBigInt(fE), toBigInt(fr))
757- let fG = toInt(fraction((fB - fF), b, fF))
758- $Tuple4(toInt(fB), dD, cp, fG)
659+ let eW = fraction(eI, (bJ - bK), bK)
660+ let cz = I(bz(F(eU, cX), F(eT, cW)), a)
661+ let dv = [IntegerEntry(U(), cz), IntegerEntry(V(height, lastBlock.timestamp), cz), StringEntry(Y(cm, aa), bi(eO, eP, toInt(eW), cz, 0, 0, height, lastBlock.timestamp, 0, 0))]
662+ let eX = fraction(eM, a, eL)
663+ let eY = fraction(eG, a, (eX + a))
664+ let eZ = (eG - eY)
665+ let fa = fraction(eI, toBigInt(eZ), toBigInt(eM))
666+ let fb = toInt(fraction((eW - fa), b, fa))
667+ $Tuple4(toInt(eW), dv, ch, fb)
759668 }
760669 else throw("Strict value is not equal to itself.")
761670 }
762671 else throw("Strict value is not equal to itself.")
763672 }
764673
765674
766-func fH (fI,fJ,fK,fi,fL,fM) = {
767- let ba = aS()
768- let cv = ba[v]
769- let cw = ba[w]
770- let cx = ba[x]
771- let fN = parseIntValue(ba[y])
772- let fO = parseIntValue(ba[z])
773- let fP = ba[u]
774- let cu = if ((fi == bp))
775- then fL
776- else fi
777- let fg = value(fK[0])
778- let cs = value(fg.assetId)
779- let cY = fg.amount
780- let eO = eH(e, e, e)
781- if ((eO == eO))
782- then {
783- let cr = toBase58String(fM)
784- if ((cv != toBase58String(cs)))
785- then throw("Wrong LP")
786- else {
787- let cC = bF(cw)
788- let cE = bF(cx)
789- let fQ = {
790- let fR = invoke(this, "getOneTknV2READONLY", [fI, cY], nil)
791- if ($isInstanceOf(fR, "(Int, Int)"))
792- then fR
793- else throw(($getType(fR) + " couldn't be cast to (Int, Int)"))
794- }
795- if ((fQ == fQ))
675+func fc (fd,fe,ff,dN,fg,fh) = {
676+ let aS = aK()
677+ let cn = aS[t]
678+ let co = aS[u]
679+ let cp = aS[v]
680+ let fi = parseIntValue(aS[w])
681+ let fj = parseIntValue(aS[x])
682+ let fk = aS[s]
683+ let cm = if ((dN == bh))
684+ then fg
685+ else dN
686+ let dL = value(ff[0])
687+ let ck = value(dL.assetId)
688+ let cQ = dL.amount
689+ let cj = toBase58String(fh)
690+ if ((cn != toBase58String(ck)))
691+ then throw("Wrong LP")
692+ else {
693+ let cu = bx(co)
694+ let cw = bx(cp)
695+ let fl = {
696+ let fm = invoke(this, "getOneTknV2READONLY", [fd, cQ], nil)
697+ if ($isInstanceOf(fm, "(Int, Int)"))
698+ then fm
699+ else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
700+ }
701+ if ((fl == fl))
702+ then {
703+ let ch = fl._2
704+ let fn = fl._1
705+ let fo = if (if ((fe > 0))
706+ then (fe > fn)
707+ else false)
708+ then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
709+ else fn
710+ let fp = if ((fd == co))
711+ then $Tuple4(fo, 0, ((cu - fo) - ch), cw)
712+ else if ((fd == cp))
713+ then $Tuple4(0, fo, cu, ((cw - fo) - ch))
714+ else throw("invalid out asset id")
715+ let fq = fp._1
716+ let fr = fp._2
717+ let eT = fp._3
718+ let eU = fp._4
719+ let fs = bz(F(eU, fj), F(eT, fi))
720+ let ft = I(fs, a)
721+ let fu = if ((fd == "WAVES"))
722+ then unit
723+ else fromBase58String(fd)
724+ let fv = if ((ch > 0))
725+ then [ScriptTransfer(aJ, ch, fu)]
726+ else nil
727+ let cG = ([ScriptTransfer(cm, fo, fu), StringEntry(ab(toString(cm), cj), bt(fq, fr, cQ, ft, height, lastBlock.timestamp)), IntegerEntry(U(), ft), IntegerEntry(V(height, lastBlock.timestamp), ft)] ++ fv)
728+ if ((cG == cG))
796729 then {
797- let cp = fQ._2
798- let fS = fQ._1
799- let fT = if (if ((fJ > 0))
800- then (fJ > fS)
801- else false)
802- then aK(makeString(["amount to receive is less than ", toString(fJ)], ""))
803- else fS
804- let fU = if ((fI == cw))
805- then $Tuple4(fT, 0, ((cC - fT) - cp), cE)
806- else if ((fI == cx))
807- then $Tuple4(0, fT, cC, ((cE - fT) - cp))
808- else throw("invalid out asset id")
809- let fV = fU._1
810- let fW = fU._2
811- let fy = fU._3
812- let fz = fU._4
813- let fX = bH(H(fz, fO), H(fy, fN))
814- let fY = K(fX, a)
815- let fZ = if ((fI == "WAVES"))
816- then unit
817- else fromBase58String(fI)
818- let ga = if ((cp > 0))
819- then [ScriptTransfer(aR, cp, fZ)]
820- else nil
821- let cO = ([ScriptTransfer(cu, fT, fZ), StringEntry(ad(toString(cu), cr), bB(fV, fW, cY, fY, height, lastBlock.timestamp)), IntegerEntry(W(), fY), IntegerEntry(X(height, lastBlock.timestamp), fY)] ++ ga)
822- if ((cO == cO))
823- then {
824- let gb = invoke(aN, "burn", [cY], [AttachedPayment(cs, cY)])
825- if ((gb == gb))
826- then {
827- let gc = {
828- let gd = if ((this == aR))
829- then 0
830- else cp
831- let ge = if ((aW(fI) == bg))
832- then true
833- else false
834- if (ge)
835- then $Tuple2(-((fS + gd)), 0)
836- else $Tuple2(0, -((fS + gd)))
837- }
838- let eQ = gc._1
839- let eR = gc._2
840- let gf = eP(eQ, eR, 0)
841- let gg = gf._1
842- let eG = gf._2
843- let gh = eT(eO, eG)
844- if ((gh == gh))
845- then $Tuple2((cO ++ gg), fT)
846- else throw("Strict value is not equal to itself.")
847- }
848- else throw("Strict value is not equal to itself.")
849- }
730+ let fw = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
731+ if ((fw == fw))
732+ then $Tuple2(cG, fo)
850733 else throw("Strict value is not equal to itself.")
851734 }
852735 else throw("Strict value is not equal to itself.")
853736 }
737+ else throw("Strict value is not equal to itself.")
854738 }
855- else throw("Strict value is not equal to itself.")
856739 }
857740
858741
859-func gi () = {
860- let aE = getString(U())
861- if ($isInstanceOf(aE, "String"))
742+func fx () = {
743+ let ax = getString(S())
744+ if ($isInstanceOf(ax, "String"))
862745 then {
863- let dI = aE
864- fromBase58String(dI)
746+ let dX = ax
747+ fromBase58String(dX)
865748 }
866- else if ($isInstanceOf(aE, "Unit"))
749+ else if ($isInstanceOf(ax, "Unit"))
867750 then unit
868751 else throw("Match error")
869752 }
870753
871754
872-func gj () = {
873- let aE = getString(V())
874- if ($isInstanceOf(aE, "String"))
755+func fy () = {
756+ let ax = getString(T())
757+ if ($isInstanceOf(ax, "String"))
875758 then {
876- let dI = aE
877- fromBase58String(dI)
759+ let dX = ax
760+ fromBase58String(dX)
878761 }
879- else if ($isInstanceOf(aE, "Unit"))
762+ else if ($isInstanceOf(ax, "Unit"))
880763 then unit
881764 else throw("Match error")
882765 }
883766
884767
885-let gk = throw("Permission denied")
768+let fz = throw("Permission denied")
886769
887-func gl (dV) = {
888- let aE = gi()
889- if ($isInstanceOf(aE, "ByteVector"))
770+func fA (dK) = {
771+ let ax = fx()
772+ if ($isInstanceOf(ax, "ByteVector"))
890773 then {
891- let gm = aE
892- (dV.callerPublicKey == gm)
774+ let fB = ax
775+ (dK.callerPublicKey == fB)
893776 }
894- else if ($isInstanceOf(aE, "Unit"))
895- then (dV.caller == this)
777+ else if ($isInstanceOf(ax, "Unit"))
778+ then (dK.caller == this)
896779 else throw("Match error")
897780 }
898781
899782
900-func gn (dV) = {
901- let aE = gi()
902- if ($isInstanceOf(aE, "ByteVector"))
783+func fC (dK) = {
784+ let ax = fx()
785+ if ($isInstanceOf(ax, "ByteVector"))
903786 then {
904- let gm = aE
905- if ((dV.callerPublicKey == gm))
787+ let fB = ax
788+ if ((dK.callerPublicKey == fB))
906789 then true
907- else gk
790+ else fz
908791 }
909- else if ($isInstanceOf(aE, "Unit"))
910- then if ((dV.caller == this))
792+ else if ($isInstanceOf(ax, "Unit"))
793+ then if ((dK.caller == this))
911794 then true
912- else gk
795+ else fz
913796 else throw("Match error")
914797 }
915798
916799
917-@Callable(dV)
918-func constructor (T) = {
919- let ev = gn(dV)
920- if ((ev == ev))
921- then [StringEntry(T(), T)]
800+@Callable(dK)
801+func constructor (R) = {
802+ let ey = fC(dK)
803+ if ((ey == ey))
804+ then [StringEntry(R(), R)]
922805 else throw("Strict value is not equal to itself.")
923806 }
924807
925808
926809
927-@Callable(dV)
928-func setManager (go) = {
929- let ev = gn(dV)
930- if ((ev == ev))
810+@Callable(dK)
811+func setManager (fD) = {
812+ let ey = fC(dK)
813+ if ((ey == ey))
931814 then {
932- let gp = fromBase58String(go)
933- if ((gp == gp))
934- then [StringEntry(V(), go)]
815+ let fE = fromBase58String(fD)
816+ if ((fE == fE))
817+ then [StringEntry(T(), fD)]
935818 else throw("Strict value is not equal to itself.")
936819 }
937820 else throw("Strict value is not equal to itself.")
938821 }
939822
940823
941824
942-@Callable(dV)
825+@Callable(dK)
943826 func confirmManager () = {
944- let cm = gj()
945- let gq = if (isDefined(cm))
827+ let ce = fy()
828+ let fF = if (isDefined(ce))
946829 then true
947830 else throw("No pending manager")
948- if ((gq == gq))
831+ if ((fF == fF))
949832 then {
950- let gr = if ((dV.callerPublicKey == value(cm)))
833+ let fG = if ((dK.callerPublicKey == value(ce)))
951834 then true
952835 else throw("You are not pending manager")
953- if ((gr == gr))
954- then [StringEntry(U(), toBase58String(value(cm))), DeleteEntry(V())]
836+ if ((fG == fG))
837+ then [StringEntry(S(), toBase58String(value(ce))), DeleteEntry(T())]
955838 else throw("Strict value is not equal to itself.")
956839 }
957840 else throw("Strict value is not equal to itself.")
958841 }
959842
960843
961844
962-@Callable(dV)
963-func put (gs,gt) = {
964- let gu = bk()
965- let gv = valueOrErrorMessage(addressFromString(gu[C]), "Wr st addr")
966- let gw = valueOrErrorMessage(addressFromString(gu[E]), "Wr sl addr")
967- if ((0 > gs))
845+@Callable(dK)
846+func put (fH,fI) = {
847+ let fJ = bc()
848+ let fK = valueOrErrorMessage(addressFromString(fJ[A]), "Wr st addr")
849+ let fL = valueOrErrorMessage(addressFromString(fJ[C]), "Wr sl addr")
850+ if ((0 > fH))
968851 then throw("Wrong slippage")
969- else if ((size(dV.payments) != 2))
852+ else if ((size(dK.payments) != 2))
970853 then throw("2 pmnts expd")
971854 else {
972- let gx = toBigInt(value(dV.payments[0]).amount)
973- let gy = toBigInt(value(dV.payments[1]).amount)
974- let eO = eH(gx, gy, toBigInt(0))
975- if ((eO == eO))
855+ let fM = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fH, true, false, true, 0, "")
856+ let dp = fM._2
857+ let fN = fM._7
858+ let cG = fM._9
859+ let dq = fM._10
860+ let dr = fM._11
861+ let co = fM._12
862+ let cp = fM._13
863+ let dc = invoke(aF, "emit", [dp], nil)
864+ if ((dc == dc))
976865 then {
977- let gz = fh(toString(dV.caller), toBase58String(dV.transactionId), AttachedPayment(value(dV.payments[0]).assetId, value(dV.payments[0]).amount), dV.payments[1], gs, true, false, true, 0, "")
978- let dx = gz._2
979- let gA = gz._7
980- let cO = gz._9
981- let dy = gz._10
982- let dz = gz._11
983- let cw = gz._12
984- let cx = gz._13
985- let dk = invoke(aN, "emit", [dx], nil)
986- if ((dk == dk))
866+ let fO = {
867+ let ax = dc
868+ if ($isInstanceOf(ax, "Address"))
869+ then {
870+ let fP = ax
871+ invoke(fP, "emit", [dp], nil)
872+ }
873+ else unit
874+ }
875+ if ((fO == fO))
987876 then {
988- let gB = {
989- let aE = dk
990- if ($isInstanceOf(aE, "Address"))
991- then {
992- let gC = aE
993- invoke(gC, "emit", [dx], nil)
994- }
995- else unit
996- }
997- if ((gB == gB))
877+ let fQ = if ((dq > 0))
878+ then invoke(fL, "put", nil, [AttachedPayment(co, dq)])
879+ else nil
880+ if ((fQ == fQ))
998881 then {
999- let gD = if ((dy > 0))
1000- then invoke(gw, "put", nil, [AttachedPayment(cw, dy)])
882+ let fR = if ((dr > 0))
883+ then invoke(fL, "put", nil, [AttachedPayment(cp, dr)])
1001884 else nil
1002- if ((gD == gD))
885+ if ((fR == fR))
1003886 then {
1004- let gE = if ((dz > 0))
1005- then invoke(gw, "put", nil, [AttachedPayment(cx, dz)])
1006- else nil
1007- if ((gE == gE))
887+ let fS = if (fI)
1008888 then {
1009- let gF = if (gt)
1010- then {
1011- let gG = invoke(gv, "stake", nil, [AttachedPayment(gA, dx)])
1012- if ((gG == gG))
1013- then nil
1014- else throw("Strict value is not equal to itself.")
1015- }
1016- else [ScriptTransfer(dV.caller, dx, gA)]
1017- let gH = eP(0, 0, 0)
1018- let gg = gH._1
1019- let eG = gH._2
1020- let gh = eT(eO, eG)
1021- if ((gh == gh))
1022- then ((cO ++ gF) ++ gg)
889+ let fT = invoke(fK, "stake", nil, [AttachedPayment(fN, dp)])
890+ if ((fT == fT))
891+ then nil
1023892 else throw("Strict value is not equal to itself.")
1024893 }
1025- else throw("Strict value is not equal to itself.")
894+ else [ScriptTransfer(dK.caller, dp, fN)]
895+ (cG ++ fS)
1026896 }
1027897 else throw("Strict value is not equal to itself.")
1028898 }
1029899 else throw("Strict value is not equal to itself.")
1030900 }
1031901 else throw("Strict value is not equal to itself.")
1032902 }
1033903 else throw("Strict value is not equal to itself.")
1034904 }
1035905 }
1036906
1037907
1038908
1039-@Callable(dV)
1040-func putOneTknV2 (fJ,gt) = {
1041- let gI = {
1042- let fR = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1043- if ($isInstanceOf(fR, "Boolean"))
1044- then fR
1045- else throw(($getType(fR) + " couldn't be cast to Boolean"))
909+@Callable(dK)
910+func putOneTknV2 (fe,fI) = {
911+ let fU = {
912+ let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
913+ if ($isInstanceOf(fm, "Boolean"))
914+ then fm
915+ else throw(($getType(fm) + " couldn't be cast to Boolean"))
1046916 }
1047- let gJ = if (if (if (aP())
917+ let fV = if (if (if (aH())
1048918 then true
1049- else (be == q))
919+ else (aW == o))
1050920 then true
1051- else (be == s))
921+ else (aW == q))
1052922 then true
1053- else gI
1054- let gK = [if (if (!(gJ))
923+ else fU
924+ let fW = [if (if (!(fV))
1055925 then true
1056- else gl(dV))
926+ else fA(dK))
1057927 then true
1058- else aK("put operation is blocked by admin"), if ((size(dV.payments) == 1))
928+ else aD("put operation is blocked by admin"), if ((size(dK.payments) == 1))
1059929 then true
1060- else aK("exactly 1 payment are expected")]
1061- if ((gK == gK))
930+ else aD("exactly 1 payment are expected")]
931+ if ((fW == fW))
1062932 then {
1063- let ba = aS()
1064- let cw = ba[w]
1065- let cx = ba[x]
1066- let cv = fromBase58String(ba[v])
1067- let fN = parseIntValue(ba[y])
1068- let fO = parseIntValue(ba[z])
1069- let cu = if ((dV.caller == this))
1070- then dV.originCaller
1071- else dV.caller
1072- let fg = value(dV.payments[0])
1073- let cs = toBase58String(value(fg.assetId))
1074- let cY = fg.amount
1075- let gL = fl(cY, cs, toString(cu), toBase58String(dV.transactionId), true)
1076- if ((gL == gL))
933+ let aS = aK()
934+ let co = aS[u]
935+ let cp = aS[v]
936+ let cn = fromBase58String(aS[t])
937+ let fi = parseIntValue(aS[w])
938+ let fj = parseIntValue(aS[x])
939+ let cm = if ((dK.caller == this))
940+ then dK.originCaller
941+ else dK.caller
942+ let dL = value(dK.payments[0])
943+ let ck = toBase58String(value(dL.assetId))
944+ let cQ = dL.amount
945+ let fX = eF(cQ, ck, toString(cm), toBase58String(dK.transactionId), true)
946+ if ((fX == fX))
1077947 then {
1078- let cp = gL._3
1079- let cO = gL._2
1080- let gM = gL._1
1081- let dx = if (if ((fJ > 0))
1082- then (fJ > gM)
948+ let ch = fX._3
949+ let cG = fX._2
950+ let fY = fX._1
951+ let dp = if (if ((fe > 0))
952+ then (fe > fY)
1083953 else false)
1084- then aK(makeString(["amount to receive is less than ", toString(fJ)], ""))
1085- else gM
1086- let gz = invoke(aN, "emit", [dx], nil)
1087- if ((gz == gz))
954+ then aD(makeString(["amount to receive is less than ", toString(fe)], ""))
955+ else fY
956+ let fM = invoke(aF, "emit", [dp], nil)
957+ if ((fM == fM))
1088958 then {
1089- let gB = {
1090- let aE = gz
1091- if ($isInstanceOf(aE, "Address"))
959+ let fO = {
960+ let ax = fM
961+ if ($isInstanceOf(ax, "Address"))
1092962 then {
1093- let gC = aE
1094- invoke(gC, "emit", [dx], nil)
963+ let fP = ax
964+ invoke(fP, "emit", [dp], nil)
1095965 }
1096966 else unit
1097967 }
1098- if ((gB == gB))
968+ if ((fO == fO))
1099969 then {
1100- let gF = if (gt)
970+ let fS = if (fI)
1101971 then {
1102- let gG = invoke(bm, "stake", nil, [AttachedPayment(cv, dx)])
1103- if ((gG == gG))
972+ let fT = invoke(be, "stake", nil, [AttachedPayment(cn, dp)])
973+ if ((fT == fT))
1104974 then nil
1105975 else throw("Strict value is not equal to itself.")
1106976 }
1107- else [ScriptTransfer(dV.caller, dx, cv)]
1108- let ga = if ((cp > 0))
1109- then [ScriptTransfer(aR, cp, fromBase58String(cs))]
977+ else [ScriptTransfer(dK.caller, dp, cn)]
978+ let fv = if ((ch > 0))
979+ then [ScriptTransfer(aJ, ch, fromBase58String(ck))]
1110980 else nil
1111- let gN = if ((this == aR))
1112- then $Tuple2(0, 0)
1113- else {
1114- let gO = if ((fg.assetId == bg))
1115- then true
1116- else false
1117- if (gO)
1118- then $Tuple2(-(cp), 0)
1119- else $Tuple2(0, -(cp))
1120- }
1121- let eQ = gN._1
1122- let eR = gN._2
1123- let gP = eP(eQ, eR, 0)
1124- let gg = gP._1
1125- let eG = gP._2
1126- $Tuple2((((cO ++ gF) ++ ga) ++ gg), dx)
981+ $Tuple2(((cG ++ fS) ++ fv), dp)
1127982 }
1128983 else throw("Strict value is not equal to itself.")
1129984 }
1130985 else throw("Strict value is not equal to itself.")
1131986 }
1132987 else throw("Strict value is not equal to itself.")
1133988 }
1134989 else throw("Strict value is not equal to itself.")
1135990 }
1136991
1137992
1138993
1139-@Callable(dV)
1140-func putForFree (gQ) = if ((0 > gQ))
994+@Callable(dK)
995+func putForFree (fZ) = if ((0 > fZ))
1141996 then throw("Wrong slpg")
1142- else if ((size(dV.payments) != 2))
997+ else if ((size(dK.payments) != 2))
1143998 then throw("2 pmnts expd")
1144999 else {
1145- let gR = fh(toString(dV.caller), toBase58String(dV.transactionId), AttachedPayment(value(dV.payments[0]).assetId, value(dV.payments[0]).amount), dV.payments[1], gQ, false, false, true, 0, "")
1146- let cO = gR._9
1147- let gx = toBigInt(value(dV.payments[0]).amount)
1148- let gy = toBigInt(value(dV.payments[1]).amount)
1149- let eO = eH(gx, gy, toBigInt(0))
1150- if ((eO == eO))
1151- then {
1152- let gS = eP(0, 0, 0)
1153- let gg = gS._1
1154- let eG = gS._2
1155- let gh = eT(eO, eG)
1156- if ((gh == gh))
1157- then (cO ++ gg)
1158- else throw("Strict value is not equal to itself.")
1159- }
1160- else throw("Strict value is not equal to itself.")
1000+ let ga = dM(toString(dK.caller), toBase58String(dK.transactionId), AttachedPayment(value(dK.payments[0]).assetId, value(dK.payments[0]).amount), dK.payments[1], fZ, false, false, true, 0, "")
1001+ ga._9
11611002 }
11621003
11631004
11641005
1165-@Callable(dV)
1006+@Callable(dK)
11661007 func get () = {
1167- let dk = ff(dV)
1168- let gT = dk._1
1169- let cN = dk._2
1170- let cY = dk._3
1171- let cs = dk._4
1172- let cO = dk._5
1173- let ew = invoke(aN, "burn", [cY], [AttachedPayment(cs, cY)])
1174- if ((ew == ew))
1008+ let dc = dJ(dK)
1009+ let gb = dc._1
1010+ let cF = dc._2
1011+ let cQ = dc._3
1012+ let ck = dc._4
1013+ let cG = dc._5
1014+ let ez = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1015+ if ((ez == ez))
1016+ then cG
1017+ else throw("Strict value is not equal to itself.")
1018+ }
1019+
1020+
1021+
1022+@Callable(dK)
1023+func getOneTknV2 (fd,fe) = {
1024+ let fU = {
1025+ let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1026+ if ($isInstanceOf(fm, "Boolean"))
1027+ then fm
1028+ else throw(($getType(fm) + " couldn't be cast to Boolean"))
1029+ }
1030+ let gc = if (if (aH())
1031+ then true
1032+ else (aW == q))
1033+ then true
1034+ else fU
1035+ let fW = [if (if (!(gc))
1036+ then true
1037+ else fA(dK))
1038+ then true
1039+ else aD("get operation is blocked by admin"), if ((size(dK.payments) == 1))
1040+ then true
1041+ else aD("exactly 1 payment are expected")]
1042+ if ((fW == fW))
11751043 then {
1176- let eO = eH(toBigInt(0), toBigInt(0), toBigInt(cY))
1177- let gU = eP(-(gT), -(cN), 0)
1178- let gg = gU._1
1179- let eG = gU._2
1180- let gh = eT(eO, eG)
1181- if ((gh == gh))
1182- then (cO ++ gg)
1183- else throw("Strict value is not equal to itself.")
1044+ let gd = fc(fd, fe, dK.payments, dK.caller, dK.originCaller, dK.transactionId)
1045+ let cG = gd._1
1046+ let fo = gd._2
1047+ $Tuple2(cG, fo)
11841048 }
11851049 else throw("Strict value is not equal to itself.")
11861050 }
11871051
11881052
11891053
1190-@Callable(dV)
1191-func getOneTknV2 (fI,fJ) = {
1192- let gI = {
1193- let fR = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1194- if ($isInstanceOf(fR, "Boolean"))
1195- then fR
1196- else throw(($getType(fR) + " couldn't be cast to Boolean"))
1197- }
1198- let gV = if (if (aP())
1199- then true
1200- else (be == s))
1201- then true
1202- else gI
1203- let gK = [if (if (!(gV))
1204- then true
1205- else gl(dV))
1206- then true
1207- else aK("get operation is blocked by admin"), if ((size(dV.payments) == 1))
1208- then true
1209- else aK("exactly 1 payment are expected")]
1210- if ((gK == gK))
1211- then {
1212- let gW = fH(fI, fJ, dV.payments, dV.caller, dV.originCaller, dV.transactionId)
1213- let cO = gW._1
1214- let fT = gW._2
1215- $Tuple2(cO, fT)
1216- }
1217- else throw("Strict value is not equal to itself.")
1054+@Callable(dK)
1055+func getOneTknV2READONLY (fd,ge) = {
1056+ let aS = aK()
1057+ let co = aS[u]
1058+ let cp = aS[v]
1059+ let cn = aS[t]
1060+ let dR = [toBigInt(bx(co)), toBigInt(bx(cp))]
1061+ let gf = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cn)), "invalid lp asset").quantity)
1062+ let bK = dQ(dR)
1063+ let bJ = (bK - fraction(toBigInt(ge), bK, gf))
1064+ let gg = if ((fd == co))
1065+ then 0
1066+ else if ((fd == cp))
1067+ then 1
1068+ else throw("invalid out asset id")
1069+ let gh = ev(dR, gg, bJ)
1070+ let gi = (dR[gg] - gh)
1071+ let gj = max([0, toInt((gi - f))])
1072+ let gk = cf(gj)
1073+ let fn = gk._1
1074+ let ch = gk._2
1075+ $Tuple2(nil, $Tuple2(fn, ch))
12181076 }
12191077
12201078
12211079
1222-@Callable(dV)
1223-func refreshDLp () = {
1224- let gX = valueOrElse(getInteger(al), 0)
1225- let gY = if (((height - gX) >= ao))
1226- then unit
1227- else aK(makeString([toString(ao), " blocks have not passed since the previous call"], ""))
1228- if ((gY == gY))
1229- then {
1230- let fa = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ak), "0")), aM("invalid dLp"))
1231- let gZ = eP(0, 0, 0)
1232- let ha = gZ._1
1233- let eG = gZ._2
1234- let eS = if ((fa != eG))
1235- then ha
1236- else aK("nothing to refresh")
1237- $Tuple2(eS, toString(eG))
1238- }
1239- else throw("Strict value is not equal to itself.")
1080+@Callable(dK)
1081+func getOneTknV2WithBonusREADONLY (fd,ge) = {
1082+ let aS = aK()
1083+ let co = aS[u]
1084+ let cp = aS[v]
1085+ let cn = aS[t]
1086+ let cu = bx(co)
1087+ let cw = bx(cp)
1088+ let gl = {
1089+ let fm = invoke(this, "getOneTknV2READONLY", [fd, ge], nil)
1090+ if ($isInstanceOf(fm, "(Int, Int)"))
1091+ then fm
1092+ else throw(($getType(fm) + " couldn't be cast to (Int, Int)"))
1093+ }
1094+ let fn = gl._1
1095+ let ch = gl._2
1096+ let dc = ci("", cn, ge, this)
1097+ let cE = dc._1
1098+ let cF = dc._2
1099+ let gm = (cE + cF)
1100+ let fb = if ((gm == 0))
1101+ then if ((fn == 0))
1102+ then 0
1103+ else throw("bonus calculation error")
1104+ else fraction((fn - gm), a, gm)
1105+ $Tuple2(nil, $Tuple3(fn, ch, fb))
12401106 }
12411107
12421108
12431109
1244-@Callable(dV)
1245-func getOneTknV2READONLY (fI,hb) = {
1246- let ba = aS()
1247- let cw = ba[w]
1248- let cx = ba[x]
1249- let cv = ba[v]
1250- let dF = [toBigInt(bF(cw)), toBigInt(bF(cx))]
1251- let eF = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cv)), "invalid lp asset").quantity)
1252- let bS = dE(dF)
1253- let bR = (bS - fraction(toBigInt(hb), bS, eF))
1254- let hc = if ((fI == cw))
1255- then 0
1256- else if ((fI == cx))
1257- then 1
1258- else throw("invalid out asset id")
1259- let hd = es(dF, hc, bR)
1260- let he = (dF[hc] - hd)
1261- let hf = max([0, toInt((he - f))])
1262- let hg = cn(hf)
1263- let fS = hg._1
1264- let cp = hg._2
1265- $Tuple2(nil, $Tuple2(fS, cp))
1266- }
1267-
1268-
1269-
1270-@Callable(dV)
1271-func getOneTknV2WithBonusREADONLY (fI,hb) = {
1272- let ba = aS()
1273- let cw = ba[w]
1274- let cx = ba[x]
1275- let cv = ba[v]
1276- let cC = bF(cw)
1277- let cE = bF(cx)
1278- let hh = {
1279- let fR = invoke(this, "getOneTknV2READONLY", [fI, hb], nil)
1280- if ($isInstanceOf(fR, "(Int, Int)"))
1281- then fR
1282- else throw(($getType(fR) + " couldn't be cast to (Int, Int)"))
1283- }
1284- let fS = hh._1
1285- let cp = hh._2
1286- let dk = cq("", cv, hb, this)
1287- let cM = dk._1
1288- let cN = dk._2
1289- let hi = (cM + cN)
1290- let fG = if ((hi == 0))
1291- then if ((fS == 0))
1292- then 0
1293- else throw("bonus calculation error")
1294- else fraction((fS - hi), a, hi)
1295- $Tuple2(nil, $Tuple3(fS, cp, fG))
1296- }
1297-
1298-
1299-
1300-@Callable(dV)
1301-func getNoLess (hj,hk) = {
1302- let dk = ff(dV)
1303- let cM = dk._1
1304- let cN = dk._2
1305- let cY = dk._3
1306- let cs = dk._4
1307- let cO = dk._5
1308- if ((hj > cM))
1309- then throw(((("Failed: " + toString(cM)) + " < ") + toString(hj)))
1310- else if ((hk > cN))
1311- then throw(((("Failed: " + toString(cN)) + " < ") + toString(hk)))
1110+@Callable(dK)
1111+func getNoLess (gn,go) = {
1112+ let dc = dJ(dK)
1113+ let cE = dc._1
1114+ let cF = dc._2
1115+ let cQ = dc._3
1116+ let ck = dc._4
1117+ let cG = dc._5
1118+ if ((gn > cE))
1119+ then throw(((("Failed: " + toString(cE)) + " < ") + toString(gn)))
1120+ else if ((go > cF))
1121+ then throw(((("Failed: " + toString(cF)) + " < ") + toString(go)))
13121122 else {
1313- let eO = eH(toBigInt(0), toBigInt(0), toBigInt(cY))
1314- let hl = invoke(aN, "burn", [cY], [AttachedPayment(cs, cY)])
1315- if ((hl == hl))
1316- then {
1317- let hm = eP(-(cM), -(cN), 0)
1318- let gg = hm._1
1319- let eG = hm._2
1320- let gh = eT(eO, eG)
1321- if ((gh == gh))
1322- then (cO ++ gg)
1323- else throw("Strict value is not equal to itself.")
1324- }
1123+ let gp = invoke(aF, "burn", [cQ], [AttachedPayment(ck, cQ)])
1124+ if ((gp == gp))
1125+ then cG
13251126 else throw("Strict value is not equal to itself.")
13261127 }
13271128 }
13281129
13291130
13301131
1331-@Callable(dV)
1332-func unstakeAndGet (co) = {
1333- let hn = if ((size(dV.payments) != 0))
1132+@Callable(dK)
1133+func unstakeAndGet (cg) = {
1134+ let gq = if ((size(dK.payments) != 0))
13341135 then throw("No pmnts expd")
13351136 else true
1336- if ((hn == hn))
1137+ if ((gq == gq))
13371138 then {
1338- let ce = aS()
1339- let ho = bk()
1340- let gA = fromBase58String(ce[v])
1341- let hp = valueOrErrorMessage(addressFromString(ho[C]), "Wr st addr")
1342- let eO = eH(toBigInt(0), toBigInt(0), toBigInt(0))
1343- let hq = invoke(hp, "unstake", [toBase58String(gA), co], nil)
1344- if ((hq == hq))
1139+ let bW = aK()
1140+ let gr = bc()
1141+ let fN = fromBase58String(bW[t])
1142+ let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1143+ let gt = invoke(gs, "unstake", [toBase58String(fN), cg], nil)
1144+ if ((gt == gt))
13451145 then {
1346- let dk = cq(toBase58String(dV.transactionId), toBase58String(gA), co, dV.caller)
1347- let cM = dk._1
1348- let cN = dk._2
1349- let cA = parseIntValue(dk._9)
1350- let cO = dk._10
1351- let hr = if (if (aP())
1146+ let dc = ci(toBase58String(dK.transactionId), toBase58String(fN), cg, dK.caller)
1147+ let cs = parseIntValue(dc._9)
1148+ let cG = dc._10
1149+ let gu = if (if (aH())
13521150 then true
1353- else (cA == s))
1354- then throw(("Blocked: " + toString(cA)))
1151+ else (cs == q))
1152+ then throw(("Blocked: " + toString(cs)))
13551153 else true
1356- if ((hr == hr))
1154+ if ((gu == gu))
13571155 then {
1358- let hs = invoke(aN, "burn", [co], [AttachedPayment(gA, co)])
1359- if ((hs == hs))
1360- then {
1361- let ht = eP(-(cM), -(cN), 0)
1362- let gg = ht._1
1363- let eG = ht._2
1364- let gh = eT(eO, eG)
1365- if ((gh == gh))
1366- then (cO ++ gg)
1367- else throw("Strict value is not equal to itself.")
1368- }
1156+ let gv = invoke(aF, "burn", [cg], [AttachedPayment(fN, cg)])
1157+ if ((gv == gv))
1158+ then cG
13691159 else throw("Strict value is not equal to itself.")
13701160 }
13711161 else throw("Strict value is not equal to itself.")
13721162 }
13731163 else throw("Strict value is not equal to itself.")
13741164 }
13751165 else throw("Strict value is not equal to itself.")
13761166 }
13771167
13781168
13791169
1380-@Callable(dV)
1381-func unstakeAndGetNoLess (hu,hv,hk) = {
1382- let gV = if (aP())
1170+@Callable(dK)
1171+func unstakeAndGetNoLess (gw,gx,go) = {
1172+ let gc = if (aH())
13831173 then true
1384- else (be == s)
1385- let gK = [if (!(gV))
1174+ else (aW == q)
1175+ let fW = [if (!(gc))
13861176 then true
1387- else throw("get operation is blocked by admin"), if ((size(dV.payments) == 0))
1177+ else throw("get operation is blocked by admin"), if ((size(dK.payments) == 0))
13881178 then true
13891179 else throw("no payments are expected")]
1390- if ((gK == gK))
1180+ if ((fW == fW))
13911181 then {
1392- let eO = eH(toBigInt(0), toBigInt(0), toBigInt(0))
1393- let hq = invoke(bm, "unstake", [toBase58String(bf), hu], nil)
1394- if ((hq == hq))
1182+ let gt = invoke(be, "unstake", [toBase58String(aX), gw], nil)
1183+ if ((gt == gt))
13951184 then {
1396- let hw = cq(toBase58String(dV.transactionId), toBase58String(bf), hu, dV.caller)
1397- let cM = hw._1
1398- let cN = hw._2
1399- let cO = hw._10
1400- let hx = [if ((cM >= hv))
1185+ let gy = ci(toBase58String(dK.transactionId), toBase58String(aX), gw, dK.caller)
1186+ let cE = gy._1
1187+ let cF = gy._2
1188+ let cG = gy._10
1189+ let gz = [if ((cE >= gx))
14011190 then true
1402- else throw(makeString(["amount asset amount to receive is less than ", toString(hv)], "")), if ((cN >= hk))
1191+ else throw(makeString(["amount asset amount to receive is less than ", toString(gx)], "")), if ((cF >= go))
14031192 then true
1404- else throw(makeString(["price asset amount to receive is less than ", toString(hk)], ""))]
1405- if ((hx == hx))
1193+ else throw(makeString(["price asset amount to receive is less than ", toString(go)], ""))]
1194+ if ((gz == gz))
14061195 then {
1407- let hl = invoke(aN, "burn", [hu], [AttachedPayment(bf, hu)])
1408- if ((hl == hl))
1409- then {
1410- let hy = eP(-(cM), -(cN), 0)
1411- let gg = hy._1
1412- let eG = hy._2
1413- let gh = eT(eO, eG)
1414- if ((gh == gh))
1415- then (cO ++ gg)
1416- else throw("Strict value is not equal to itself.")
1417- }
1196+ let gp = invoke(aF, "burn", [gw], [AttachedPayment(aX, gw)])
1197+ if ((gp == gp))
1198+ then cG
14181199 else throw("Strict value is not equal to itself.")
14191200 }
14201201 else throw("Strict value is not equal to itself.")
14211202 }
14221203 else throw("Strict value is not equal to itself.")
14231204 }
14241205 else throw("Strict value is not equal to itself.")
14251206 }
14261207
14271208
14281209
1429-@Callable(dV)
1430-func unstakeAndGetOneTknV2 (hu,fI,fJ) = {
1431- let gI = {
1432- let fR = invoke(aN, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1433- if ($isInstanceOf(fR, "Boolean"))
1434- then fR
1435- else throw(($getType(fR) + " couldn't be cast to Boolean"))
1210+@Callable(dK)
1211+func unstakeAndGetOneTknV2 (gw,fd,fe) = {
1212+ let fU = {
1213+ let fm = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1214+ if ($isInstanceOf(fm, "Boolean"))
1215+ then fm
1216+ else throw(($getType(fm) + " couldn't be cast to Boolean"))
14361217 }
1437- let gV = if (if (aP())
1218+ let gc = if (if (aH())
14381219 then true
1439- else (be == s))
1220+ else (aW == q))
14401221 then true
1441- else gI
1442- let gK = [if (if (!(gV))
1222+ else fU
1223+ let fW = [if (if (!(gc))
14431224 then true
1444- else gl(dV))
1225+ else fA(dK))
14451226 then true
1446- else aK("get operation is blocked by admin"), if ((size(dV.payments) == 0))
1227+ else aD("get operation is blocked by admin"), if ((size(dK.payments) == 0))
14471228 then true
1448- else aK("no payments are expected")]
1449- if ((gK == gK))
1229+ else aD("no payments are expected")]
1230+ if ((fW == fW))
14501231 then {
1451- let ce = aS()
1452- let ho = bk()
1453- let gA = fromBase58String(ce[v])
1454- let hp = valueOrErrorMessage(addressFromString(ho[C]), "Wr st addr")
1455- let hq = invoke(hp, "unstake", [toBase58String(gA), hu], nil)
1456- if ((hq == hq))
1232+ let bW = aK()
1233+ let gr = bc()
1234+ let fN = fromBase58String(bW[t])
1235+ let gs = valueOrErrorMessage(addressFromString(gr[A]), "Wr st addr")
1236+ let gt = invoke(gs, "unstake", [toBase58String(fN), gw], nil)
1237+ if ((gt == gt))
14571238 then {
1458- let hz = fH(fI, fJ, [AttachedPayment(gA, hu)], dV.caller, dV.originCaller, dV.transactionId)
1459- let cO = hz._1
1460- let fT = hz._2
1461- $Tuple2(cO, fT)
1239+ let gA = fc(fd, fe, [AttachedPayment(fN, gw)], dK.caller, dK.originCaller, dK.transactionId)
1240+ let cG = gA._1
1241+ let fo = gA._2
1242+ $Tuple2(cG, fo)
14621243 }
14631244 else throw("Strict value is not equal to itself.")
14641245 }
14651246 else throw("Strict value is not equal to itself.")
14661247 }
14671248
14681249
14691250
1470-@Callable(dV)
1471-func putOneTknV2WithBonusREADONLY (hA,hB) = {
1472- let ba = aS()
1473- let cw = ba[w]
1474- let cx = ba[x]
1475- let cv = ba[v]
1476- let hC = fl(hA, hB, "", "", true)
1477- let fB = hC._1
1478- let cO = hC._2
1479- let cp = hC._3
1480- let fG = hC._4
1481- $Tuple2(nil, $Tuple3(fB, cp, fG))
1251+@Callable(dK)
1252+func putOneTknV2WithBonusREADONLY (gB,gC) = {
1253+ let aS = aK()
1254+ let co = aS[u]
1255+ let cp = aS[v]
1256+ let cn = aS[t]
1257+ let gD = eF(gB, gC, "", "", true)
1258+ let eW = gD._1
1259+ let cG = gD._2
1260+ let ch = gD._3
1261+ let fb = gD._4
1262+ $Tuple2(nil, $Tuple3(eW, ch, fb))
14821263 }
14831264
14841265
14851266
1486-@Callable(dV)
1487-func putOneTknV2WithoutTakeFeeREADONLY (hA,hB) = {
1488- let ba = aS()
1489- let cw = ba[w]
1490- let cx = ba[x]
1491- let cv = ba[v]
1492- let hD = fl(hA, hB, "", "", false)
1493- let fB = hD._1
1494- let cO = hD._2
1495- let cp = hD._3
1496- let fG = hD._4
1497- $Tuple2(nil, $Tuple3(fB, cp, fG))
1267+@Callable(dK)
1268+func putOneTknV2WithoutTakeFeeREADONLY (gB,gC) = {
1269+ let aS = aK()
1270+ let co = aS[u]
1271+ let cp = aS[v]
1272+ let cn = aS[t]
1273+ let gE = eF(gB, gC, "", "", false)
1274+ let eW = gE._1
1275+ let cG = gE._2
1276+ let ch = gE._3
1277+ let fb = gE._4
1278+ $Tuple2(nil, $Tuple3(eW, ch, fb))
14981279 }
14991280
15001281
15011282
1502-@Callable(dV)
1503-func activate (hE,hF) = if ((toString(dV.caller) != toString(aN)))
1283+@Callable(dK)
1284+func activate (gF,gG) = if ((toString(dK.caller) != toString(aF)))
15041285 then throw("denied")
1505- else $Tuple2([StringEntry(ae(), hE), StringEntry(af(), hF)], "success")
1286+ else $Tuple2([StringEntry(ac(), gF), StringEntry(ad(), gG)], "success")
15061287
15071288
15081289
1509-@Callable(dV)
1510-func setS (hG,hr) = if ((toString(dV.caller) != aG(this, ah())))
1511- then gk
1512- else [StringEntry(hG, hr)]
1290+@Callable(dK)
1291+func setS (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1292+ then fz
1293+ else [StringEntry(gH, gu)]
15131294
15141295
15151296
1516-@Callable(dV)
1517-func setI (hG,hr) = if ((toString(dV.caller) != aG(this, ah())))
1518- then gk
1519- else [IntegerEntry(hG, hr)]
1297+@Callable(dK)
1298+func setI (gH,gu) = if ((toString(dK.caller) != az(this, af())))
1299+ then fz
1300+ else [IntegerEntry(gH, gu)]
15201301
15211302
15221303
1523-@Callable(dV)
1524-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aS())
1304+@Callable(dK)
1305+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aK())
15251306
15261307
15271308
1528-@Callable(dV)
1529-func getAccBalanceWrapperREADONLY (bG) = $Tuple2(nil, bF(bG))
1309+@Callable(dK)
1310+func getAccBalanceWrapperREADONLY (by) = $Tuple2(nil, bx(by))
15301311
15311312
15321313
1533-@Callable(dV)
1534-func calcPricesWrapperREADONLY (bY,bZ,cd) = {
1535- let hH = cc(bY, bZ, cd)
1536- $Tuple2(nil, [toString(hH[0]), toString(hH[1]), toString(hH[2])])
1314+@Callable(dK)
1315+func calcPricesWrapperREADONLY (bQ,bR,bV) = {
1316+ let gI = bU(bQ, bR, bV)
1317+ $Tuple2(nil, [toString(gI[0]), toString(gI[1]), toString(gI[2])])
15371318 }
15381319
15391320
15401321
1541-@Callable(dV)
1542-func fromX18WrapperREADONLY (L,hI) = $Tuple2(nil, K(parseBigIntValue(L), hI))
1322+@Callable(dK)
1323+func fromX18WrapperREADONLY (J,gJ) = $Tuple2(nil, I(parseBigIntValue(J), gJ))
15431324
15441325
15451326
1546-@Callable(dV)
1547-func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
1327+@Callable(dK)
1328+func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H)))
15481329
15491330
15501331
1551-@Callable(dV)
1552-func calcPriceBigIntWrapperREADONLY (bI,bJ) = $Tuple2(nil, toString(bH(parseBigIntValue(bI), parseBigIntValue(bJ))))
1332+@Callable(dK)
1333+func calcPriceBigIntWrapperREADONLY (bA,bB) = $Tuple2(nil, toString(bz(parseBigIntValue(bA), parseBigIntValue(bB))))
15531334
15541335
15551336
1556-@Callable(dV)
1557-func estimatePutOperationWrapperREADONLY (cr,bN,cQ,cR,cS,cT,hJ,cU,cV) = $Tuple2(nil, cP(cr, bN, cQ, cR, cS, cT, hJ, cU, cV, true, false, 0, ""))
1337+@Callable(dK)
1338+func estimatePutOperationWrapperREADONLY (cj,bF,cI,cJ,cK,cL,gK,cM,cN) = $Tuple2(nil, cH(cj, bF, cI, cJ, cK, cL, gK, cM, cN, true, false, 0, ""))
15581339
15591340
15601341
1561-@Callable(dV)
1562-func estimateGetOperationWrapperREADONLY (cr,hK,ct,hJ) = {
1563- let dk = cq(cr, hK, ct, addressFromStringValue(hJ))
1564- $Tuple2(nil, $Tuple10(dk._1, dk._2, dk._3, dk._4, dk._5, dk._6, dk._7, toString(dk._8), dk._9, dk._10))
1342+@Callable(dK)
1343+func estimateGetOperationWrapperREADONLY (cj,gL,cl,gK) = {
1344+ let dc = ci(cj, gL, cl, addressFromStringValue(gK))
1345+ $Tuple2(nil, $Tuple10(dc._1, dc._2, dc._3, dc._4, dc._5, dc._6, dc._7, toString(dc._8), dc._9, dc._10))
15651346 }
15661347
15671348
15681349
1569-@Callable(dV)
1570-func getFeeREADONLY () = $Tuple2(nil, aj)
1350+@Callable(dK)
1351+func getFeeREADONLY () = $Tuple2(nil, ah)
15711352
15721353
1573-@Verifier(hL)
1574-func hM () = {
1575- let hN = {
1576- let aE = gi()
1577- if ($isInstanceOf(aE, "ByteVector"))
1354+@Verifier(gM)
1355+func gN () = {
1356+ let gO = {
1357+ let ax = fx()
1358+ if ($isInstanceOf(ax, "ByteVector"))
15781359 then {
1579- let gm = aE
1580- gm
1360+ let fB = ax
1361+ fB
15811362 }
1582- else if ($isInstanceOf(aE, "Unit"))
1583- then hL.senderPublicKey
1363+ else if ($isInstanceOf(ax, "Unit"))
1364+ then gM.senderPublicKey
15841365 else throw("Match error")
15851366 }
1586- let aE = hL
1587- if ($isInstanceOf(aE, "Order"))
1367+ let ax = gM
1368+ if ($isInstanceOf(ax, "Order"))
15881369 then {
1589- let eW = aE
1590- let hO = aQ()
1591- let hP = eV(eW)
1592- let hQ = sigVerify(eW.bodyBytes, eW.proofs[0], eW.senderPublicKey)
1593- let hR = sigVerify(eW.bodyBytes, eW.proofs[1], hO)
1594- if (if (if (hP)
1595- then hQ
1370+ let dx = ax
1371+ let gP = aI()
1372+ let gQ = dw(dx)
1373+ let gR = sigVerify(dx.bodyBytes, dx.proofs[0], dx.senderPublicKey)
1374+ let gS = sigVerify(dx.bodyBytes, dx.proofs[1], gP)
1375+ if (if (if (gQ)
1376+ then gR
15961377 else false)
1597- then hR
1378+ then gS
15981379 else false)
15991380 then true
1600- else az(hP, hQ, hR)
1381+ else as(gQ, gR, gS)
16011382 }
1602- else if ($isInstanceOf(aE, "SetScriptTransaction"))
1383+ else if ($isInstanceOf(ax, "SetScriptTransaction"))
16031384 then {
1604- let dI = aE
1605- let hS = blake2b256(value(dI.script))
1606- let hT = fromBase64String(value(getString(aN, ax())))
1607- let hU = scriptHash(this)
1608- if (if ((hT == hS))
1609- then (hU != hS)
1385+ let dX = ax
1386+ let gT = blake2b256(value(dX.script))
1387+ let gU = fromBase64String(value(getString(aF, aq())))
1388+ let gV = scriptHash(this)
1389+ if (if ((gU == gT))
1390+ then (gV != gT)
16101391 else false)
16111392 then true
1612- else sigVerify(hL.bodyBytes, hL.proofs[0], hN)
1393+ else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
16131394 }
1614- else sigVerify(hL.bodyBytes, hL.proofs[0], hN)
1395+ else sigVerify(gM.bodyBytes, gM.proofs[0], gO)
16151396 }
16161397

github/deemru/w8io/169f3d6 
448.40 ms