tx · A9uu6Db869dgo1ygBr9miw9SZNSB2qvz8YZvLTfQyJ22

3NBCeYr29WEMKPG9SvZHmSCGGwEd6PmiX6k:  -0.04200000 Waves

2023.05.04 13:10 [2562876] smart account 3NBCeYr29WEMKPG9SvZHmSCGGwEd6PmiX6k > SELF 0.00000000 Waves

{ "type": 13, "id": "A9uu6Db869dgo1ygBr9miw9SZNSB2qvz8YZvLTfQyJ22", "fee": 4200000, "feeAssetId": null, "timestamp": 1683195073162, "version": 2, "chainId": 84, "sender": "3NBCeYr29WEMKPG9SvZHmSCGGwEd6PmiX6k", "senderPublicKey": "2znHcuxfG4M2jQxMq1T5P5KEV6ofYqpcdWRkzeVBLMHp", "proofs": [ "3HW3e5HGRjwbCFXjsPKji98kApFg29sTVgTqrNcJbMYh1SpxSMDW9ZD3guJ5nMwCp575TnuxhojnYfgx7r8vsGfM" ], "script": "base64:BgLELAgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAIgZzY2FsZTgiDHNjYWxlOEJpZ0ludCIHc2NhbGUxOCIKemVyb0JpZ0ludCIEYmlnMCIEYmlnMSIEYmlnMiIEYmlnMyIEYmlnNCIKc2xpcHBhZ2U0RCILd2F2ZXNTdHJpbmciCmFtcEluaXRpYWwiBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQXNEY20iC2lkeElBbX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Aml5BnByb29mcwAABQJpQUYtd+g=", "height": 2562876, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6KhSfF1eKJG5iZ8iCGtaY4cKBZYkHbvpetkx1eFgiFTf Next: J8i4QJJvKu8C92ogEUxdAzd93bpd5AFy5T1qtxfefmJf Diff:
OldNewDifferences
2323
2424 let k = "WAVES"
2525
26-let l = "100"
26+let l = 50
2727
28-let m = "1"
28+let m = "100"
2929
30-let n = "__"
30+let n = "1"
3131
32-let o = ""
32+let o = "__"
3333
34-let p = 1
34+let p = ""
3535
36-let q = 2
36+let q = 1
3737
38-let r = 3
38+let r = 2
3939
40-let s = 4
40+let s = 3
4141
42-let t = 1
42+let t = 4
4343
44-let u = 2
44+let u = 1
4545
46-let v = 3
46+let v = 2
4747
48-let w = 4
48+let w = 3
4949
50-let x = 5
50+let x = 4
5151
52-let y = 6
52+let y = 5
5353
54-let z = 7
54+let z = 6
5555
56-let A = 8
56+let A = 7
5757
58-let B = 9
58+let B = 8
5959
60-let C = 1
60+let C = 9
6161
62-let D = 6
62+let D = 1
6363
64-let E = 7
64+let E = 6
6565
66-let F = 10
66+let F = 7
6767
68-let G = fraction(10, a, 10000)
68+let G = 10
6969
70-func H (I,J) = fraction(toBigInt(I), c, toBigInt(J))
70+let H = fraction(10, a, 10000)
71+
72+func I (J,K) = fraction(toBigInt(J), c, toBigInt(K))
7173
7274
73-func K (I,J) = fraction(I, c, J)
75+func L (J,K) = fraction(J, c, K)
7476
7577
76-func L (M,N) = toInt(fraction(M, toBigInt(N), c))
78+func M (N,O) = toInt(fraction(N, toBigInt(O), c))
7779
7880
79-func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P))
81+func P (N,O,Q) = toInt(fraction(N, toBigInt(O), c, Q))
8082
8183
82-func Q (I,J) = fraction(I, c, toBigInt(J))
84+func R (J,K) = fraction(J, c, toBigInt(K))
8385
8486
85-func R (M,N) = fraction(M, toBigInt(N), c)
87+func S (N,O) = fraction(N, toBigInt(O), c)
8688
8789
88-func S (T,U,V) = fraction(T, U, V)
90+func T (U,V,W) = fraction(U, V, W)
8991
9092
91-func W (M) = if ((d > M))
92- then -(M)
93- else M
93+func X (N) = if ((d > N))
94+ then -(N)
95+ else N
9496
9597
96-func X (M) = if ((d > M))
97- then -(M)
98- else M
98+func Y (N) = if ((d > N))
99+ then -(N)
100+ else N
99101
100102
101-func Y () = "%s__factoryContract"
103+func Z () = "%s__factoryContract"
102104
103105
104-func Z () = "%s__managerPublicKey"
106+func aa () = "%s__managerPublicKey"
105107
106108
107-func aa () = "%s__pendingManagerPublicKey"
109+func ab () = "%s__pendingManagerPublicKey"
108110
109111
110-func ab () = "%s%s__price__last"
112+func ac () = "%s%s__price__last"
111113
112114
113-func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n)
115+func ad (ae,af) = makeString(["%s%s%d%d__price__history", toString(ae), toString(af)], o)
114116
115117
116-func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah)
118+func ag (ah,ai) = ((("%s%s%s__P__" + ah) + "__") + ai)
117119
118120
119-func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah)
121+func aj (ah,ai) = ((("%s%s%s__G__" + ah) + "__") + ai)
120122
121123
122-func aj () = "%s__amountAsset"
124+func ak () = "%s__amountAsset"
123125
124126
125-func ak () = "%s__priceAsset"
127+func al () = "%s__priceAsset"
126128
127129
128-func al () = "%s__amp"
130+func am () = "%s__amp"
129131
130132
131-func am () = "%s__addonAddr"
133+func an (ao) = ("%s%d__amp__" + toString(ao))
132134
133135
134-let an = "%s__fee"
135-
136-let ao = valueOrElse(getInteger(this, an), G)
137-
138-let ap = makeString(["%s", "dLp"], n)
139-
140-let aq = makeString(["%s", "dLpRefreshedHeight"], n)
141-
142-let ar = makeString(["%s", "refreshDLpDelay"], n)
143-
144-let as = 30
145-
146-let at = valueOrElse(getInteger(this, ar), as)
147-
148-func au () = "%s__factoryConfig"
136+func ap () = "%s__changeAmpLastCall"
149137
150138
151-func av () = "%s%s__matcher__publicKey"
139+let aq = "%s__fee"
140+
141+let ar = valueOrElse(getInteger(this, aq), H)
142+
143+let as = makeString(["%s", "dLp"], o)
144+
145+let at = makeString(["%s", "dLpRefreshedHeight"], o)
146+
147+let au = makeString(["%s", "refreshDLpDelay"], o)
148+
149+let av = 30
150+
151+let aw = valueOrElse(getInteger(this, au), av)
152+
153+func ax () = "%s__factoryConfig"
152154
153155
154-func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
156+func ay () = "%s%s__matcher__publicKey"
155157
156158
157-func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
159+func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
158160
159161
160-func aB () = "%s__shutdown"
162+func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
161163
162164
163-func aC () = "%s__allowedLpStableScriptHash"
165+func aE () = "%s__shutdown"
164166
165167
166-func aD () = "%s__feeCollectorAddress"
168+func aF () = "%s__allowedLpStableScriptHash"
167169
168170
169-func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI)))
171+func aG () = "%s__feeCollectorAddress"
170172
171173
172-func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
174+func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
173175
174176
175-func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
177+func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
176178
177179
178-func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
180+func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
179181
180182
181-func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
183+func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
182184
183185
184-let aQ = addressFromStringValue(aJ(this, Y()))
186+func aS (aT) = throw(makeString(["lp_stable.ride:", aT], " "))
185187
186-let aR = {
187- let aS = invoke(aQ, "getInFeeREADONLY", [toString(this)], nil)
188- if ($isInstanceOf(aS, "Int"))
189- then aS
190- else throw(($getType(aS) + " couldn't be cast to Int"))
188+
189+func aU (aT) = makeString(["lp_stable.ride:", aT], " ")
190+
191+
192+let aV = addressFromStringValue(aO(this, Z()))
193+
194+let aW = {
195+ let aX = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
196+ if ($isInstanceOf(aX, "Int"))
197+ then aX
198+ else throw(($getType(aX) + " couldn't be cast to Int"))
191199 }
192200
193-let aT = {
194- let aS = invoke(aQ, "getOutFeeREADONLY", [toString(this)], nil)
195- if ($isInstanceOf(aS, "Int"))
196- then aS
197- else throw(($getType(aS) + " couldn't be cast to Int"))
201+let aY = {
202+ let aX = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
203+ if ($isInstanceOf(aX, "Int"))
204+ then aX
205+ else throw(($getType(aX) + " couldn't be cast to Int"))
198206 }
199207
200-let aU = aJ(this, al())
208+let aZ = aO(this, am())
201209
202-func aV () = valueOrElse(getBoolean(aQ, aB()), false)
210+func ba () = valueOrElse(getBoolean(aV, aE()), false)
203211
204212
205-func aW () = fromBase58String(aJ(aQ, av()))
213+func bb () = fromBase58String(aO(aV, ay()))
206214
207215
208-let aX = addressFromStringValue(aJ(aQ, aD()))
216+let bc = addressFromStringValue(aO(aV, aG()))
209217
210-func aY () = {
211- let aZ = aJ(this, aj())
212- let ba = aJ(this, ak())
213- let bb = aM(aQ, az(ba))
214- let ax = aM(aQ, az(aZ))
215- split(aJ(aQ, aw(toString(ax), toString(bb))), n)
218+func bd () = {
219+ let be = aO(this, ak())
220+ let bf = aO(this, al())
221+ let bg = aR(aV, aC(bf))
222+ let aA = aR(aV, aC(be))
223+ split(aO(aV, az(toString(aA), toString(bg))), o)
216224 }
217225
218226
219-func bc (bd) = if ((bd == k))
227+func bh (bi) = if ((bi == k))
220228 then unit
221- else fromBase58String(bd)
229+ else fromBase58String(bi)
222230
223231
224-func be (bd) = if ((bd == unit))
232+func bj (bi) = if ((bi == unit))
225233 then k
226- else toBase58String(value(bd))
234+ else toBase58String(value(bi))
227235
228236
229-func bf (bg) = $Tuple9(addressFromStringValue(bg[t]), parseIntValue(bg[u]), fromBase58String(bg[v]), bc(bg[w]), bc(bg[x]), parseIntValue(bg[y]), parseIntValue(bg[z]), fromBase58String(bg[A]), fromBase58String(bg[B]))
237+func bk (bl) = $Tuple9(addressFromStringValue(bl[u]), parseIntValue(bl[v]), fromBase58String(bl[w]), bh(bl[x]), bh(bl[y]), parseIntValue(bl[z]), parseIntValue(bl[A]), fromBase58String(bl[B]), fromBase58String(bl[C]))
230238
231239
232-let bh = bf(aY())
240+let bm = bk(bd())
233241
234-let bi = bh
242+let bn = bm
235243
236-let bj = bi._1
244+let bo = bn._1
237245
238-let bk = bi._2
246+let bp = bn._2
239247
240-let bl = bi._3
248+let bq = bn._3
241249
242-let bm = bi._4
250+let br = bn._4
243251
244-let bn = bi._5
252+let bs = bn._5
245253
246-let bo = bi._6
254+let bt = bn._6
247255
248-let bp = bi._7
256+let bu = bn._7
249257
250-let bq = bi._8
258+let bv = bn._8
251259
252-let br = bi._9
260+let bw = bn._9
253261
254-func bs () = split(aJ(aQ, au()), n)
262+func bx () = split(aO(aV, ax()), o)
255263
256264
257-let bt = bs()
265+let by = bx()
258266
259-let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
267+let bz = valueOrErrorMessage(addressFromString(by[D]), "Invalid staking contract address")
260268
261-let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
269+let bA = valueOrErrorMessage(addressFromString(by[F]), "Invalid slipage contract address")
262270
263-let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
271+let bB = valueOrErrorMessage(addressFromString(by[G]), "Invalid gwx contract address")
264272
265-let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
273+let bC = valueOrErrorMessage(addressFromString(by[E]), "Invalid gwx contract address")
266274
267-func by (bz,bA,bB,bC,bD,bE,bF,bG,bH,bI) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI)], n)
275+func bD (bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN)], o)
268276
269277
270-func bJ (bK,bL,bM,bC,bF,bG) = makeString(["%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bC), toString(bF), toString(bG)], n)
278+func bO (bP,bQ,bR,bH,bK,bL) = makeString(["%d%d%d%d%d%d", toString(bP), toString(bQ), toString(bR), toString(bH), toString(bK), toString(bL)], o)
271279
272280
273-func bN (bO) = if ((bO == "WAVES"))
281+func bS (bT) = if ((bT == "WAVES"))
274282 then wavesBalance(this).available
275- else assetBalance(this, fromBase58String(bO))
283+ else assetBalance(this, fromBase58String(bT))
276284
277285
278-func bP (bQ,bR) = fraction(bQ, c, bR)
286+func bU (bV,bW) = fraction(bV, c, bW)
279287
280288
281-func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
289+func bX (bV,bW,Q) = fraction(bV, c, bW, Q)
282290
283291
284-func bT (bU,bV,bW) = {
285- let bX = fraction((bU - bV), b, bV)
286- let bY = ((bW - W(bX)) > d)
287- if (!(bY))
288- then throw(("Big slpg: " + toString(bX)))
289- else $Tuple2(bY, min([bU, bV]))
292+func bY (bZ,ca,cb) = {
293+ let cc = fraction((bZ - ca), b, ca)
294+ let cd = ((cb - X(cc)) > d)
295+ if (!(cd))
296+ then throw(("Big slpg: " + toString(cc)))
297+ else $Tuple2(cd, min([bZ, ca]))
290298 }
291299
292300
293-func bZ (ca,cb,cc) = {
294- let bX = fraction(cb, b, ca)
295- let cd = (cc > bX)
296- if (if (cd)
301+func ce (cf,cg,ch) = {
302+ let cc = fraction(cg, b, cf)
303+ let ci = (ch > cc)
304+ if (if (ci)
297305 then true
298- else (cb > ca))
299- then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300- else cd
306+ else (cg > cf))
307+ then throw(((((((toString(cg) + " ") + toString(cf)) + " ") + toString(cc)) + " ") + toString(ch)))
308+ else ci
301309 }
302310
303311
304-func ce (cf,cg,ch,ci) = {
305- let cj = H(ch, cf)
306- let ck = H(ci, cg)
307- bP(ck, cj)
312+func cj (ck,cl,cm,cn) = {
313+ let co = I(cm, ck)
314+ let cp = I(cn, cl)
315+ bU(cp, co)
308316 }
309317
310318
311-func cl (ch,ci,cm) = {
312- let cn = bo
313- let co = bp
314- let cp = ce(cn, co, ch, ci)
315- let bR = H(ch, cn)
316- let bQ = H(ci, co)
317- let cq = H(cm, a)
318- let cr = bP(bR, cq)
319- let cs = bP(bQ, cq)
320-[cp, cr, cs]
319+func cq (cm,cn,cr) = {
320+ let cs = bt
321+ let ct = bu
322+ let cu = cj(cs, ct, cm, cn)
323+ let bW = I(cm, cs)
324+ let bV = I(cn, ct)
325+ let cv = I(cr, a)
326+ let cw = bU(bW, cv)
327+ let cx = bU(bV, cv)
328+[cu, cw, cx]
321329 }
322330
323331
324-func ct (ch,ci,cm) = {
325- let cu = cl(ch, ci, cm)
326-[L(cu[0], a), L(cu[1], a), L(cu[2], a)]
332+func cy (cm,cn,cr) = {
333+ let cz = cq(cm, cn, cr)
334+[M(cz[0], a), M(cz[1], a), M(cz[2], a)]
327335 }
328336
329337
330-func cv (cw,ao) = {
331- let cx = if ((ao == 0))
338+func cA (cB,ar) = {
339+ let cC = if ((ar == 0))
332340 then 0
333- else fraction(cw, ao, a)
334- $Tuple2((cw - cx), cx)
341+ else fraction(cB, ar, a)
342+ $Tuple2((cB - cC), cC)
335343 }
336344
337345
338-func cy (cz) = {
339- let cA = cz[0]
340- let cB = cz[1]
341- let cC = (cA + cB)
342- if ((cC == e))
346+func cD (cE) = {
347+ let cF = cE[0]
348+ let cG = cE[1]
349+ let cH = (cF + cG)
350+ if ((cH == e))
343351 then e
344352 else {
345- let cD = parseIntValue(aU)
346- let cE = (cD * 2)
347- let cu = fraction(cA, cB, f)
348- let cF = fraction(cu, i, f)
349- let cG = fraction(toBigInt(cE), cC, f)
350- let cH = toBigInt((cE - 1))
351- func cI (cJ) = {
352- let cK = fraction(cJ, cJ, f)
353- let cL = fraction(cK, cJ, f)
354- let cM = fraction(cL, f, cF)
355- fraction((cG + fraction(cM, g, f)), cJ, (fraction(cH, cJ, f) + fraction(h, cM, f)))
353+ let cI = parseIntValue(aZ)
354+ let cJ = (cI * 2)
355+ let cz = fraction(cF, cG, f)
356+ let cK = fraction(cz, i, f)
357+ let cL = fraction(toBigInt(cJ), cH, f)
358+ let cM = toBigInt((cJ - 1))
359+ func cN (cO) = {
360+ let cP = fraction(cO, cO, f)
361+ let cQ = fraction(cP, cO, f)
362+ let cR = fraction(cQ, f, cK)
363+ fraction((cL + fraction(cR, g, f)), cO, (fraction(cM, cO, f) + fraction(h, cR, f)))
356364 }
357365
358- func cN (cO,cP) = if (cO._2)
359- then cO
366+ func cS (cT,cU) = if (cT._2)
367+ then cT
360368 else {
361- let cJ = cO._1
362- let cQ = cI(cJ)
363- let cR = (cQ - value(cJ))
364- let cS = if ((e > cR))
365- then -(cR)
366- else cR
367- if ((f >= cS))
368- then $Tuple2(cQ, true)
369- else $Tuple2(cQ, false)
369+ let cO = cT._1
370+ let cV = cN(cO)
371+ let cW = (cV - value(cO))
372+ let cX = if ((e > cW))
373+ then -(cW)
374+ else cW
375+ if ((f >= cX))
376+ then $Tuple2(cV, true)
377+ else $Tuple2(cV, false)
370378 }
371379
372- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373- let cU = {
374- let cV = cT
375- let cW = size(cV)
376- let cX = $Tuple2(cC, false)
377- func cY (cZ,da) = if ((da >= cW))
378- then cZ
379- else cN(cZ, cV[da])
380+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
381+ let cZ = {
382+ let da = cY
383+ let db = size(da)
384+ let dc = $Tuple2(cH, false)
385+ func dd (de,df) = if ((df >= db))
386+ then de
387+ else cS(de, da[df])
380388
381- func db (cZ,da) = if ((da >= cW))
382- then cZ
383- else throw("List size exceeds 18")
389+ func dg (de,df) = if ((df >= db))
390+ then de
391+ else throw("List size exceeds 17")
384392
385- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
393+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
386394 }
387- let cJ = cU._1
388- let dc = cU._2
389- if (dc)
390- then cJ
391- else throw(("D calculation error, D = " + toString(cJ)))
395+ let cO = cZ._1
396+ let dh = cZ._2
397+ if (dh)
398+ then cO
399+ else throw(("D calculation error, D = " + toString(cO)))
392400 }
393401 }
394402
395403
396-func dd (de,df,dg,dh) = {
397- let di = bl
398- let dj = toBase58String(value(bm))
399- let dk = toBase58String(value(bn))
400- let dl = bo
401- let dm = bp
402- let dn = toString(bk)
403- let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity
404- if ((toBase58String(di) != df))
404+func di (dj,dk,dl,dm) = {
405+ let dn = bq
406+ let do = toBase58String(value(br))
407+ let dp = toBase58String(value(bs))
408+ let dq = bt
409+ let dr = bu
410+ let ds = toString(bp)
411+ let dt = valueOrErrorMessage(assetInfo(dn), "Wrong LP id").quantity
412+ if ((toBase58String(dn) != dk))
405413 then throw("Wrong pmt asset")
406414 else {
407- let dp = bN(dj)
408- let dq = H(dp, dl)
409- let dr = bN(dk)
410- let ds = H(dr, dm)
411- let dt = bP(ds, dq)
412- let du = L(dt, a)
413- let dv = H(dg, a)
414- let dw = H(do, a)
415- let dx = fraction(dq, dv, dw)
416- let dy = fraction(ds, dv, dw)
417- let dz = O(dx, dl, FLOOR)
418- let dA = O(dy, dm, FLOOR)
419- let dB = if ((de == ""))
415+ let du = bS(do)
416+ let dv = I(du, dq)
417+ let dw = bS(dp)
418+ let dx = I(dw, dr)
419+ let dy = bU(dx, dv)
420+ let dz = M(dy, a)
421+ let dA = I(dl, a)
422+ let dB = I(dt, a)
423+ let dC = fraction(dv, dA, dB)
424+ let dD = fraction(dx, dA, dB)
425+ let dE = P(dC, dq, FLOOR)
426+ let dF = P(dD, dr, FLOOR)
427+ let dG = if ((dj == ""))
420428 then nil
421- else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
429+ else [ScriptTransfer(dm, dE, if ((do == "WAVES"))
422430 then unit
423- else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
431+ else fromBase58String(do)), ScriptTransfer(dm, dF, if ((dp == "WAVES"))
424432 then unit
425- else fromBase58String(dk)), StringEntry(ai(toString(dh), de), bJ(dz, dA, dg, du, height, lastBlock.timestamp)), IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du)]
426- $Tuple10(dz, dA, dj, dk, dp, dr, do, dt, dn, dB)
433+ else fromBase58String(dp)), StringEntry(aj(toString(dm), dj), bO(dE, dF, dl, dz, height, lastBlock.timestamp)), IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz)]
434+ $Tuple10(dE, dF, do, dp, du, dw, dt, dy, ds, dG)
427435 }
428436 }
429437
430438
431-func dC (de,bW,dD,dE,dF,dG,dh,dH,dI,dJ,dK,dL,dM) = {
432- let di = bl
433- let dN = toBase58String(value(bm))
434- let dO = toBase58String(value(bn))
435- let dP = bq
436- let dQ = br
437- let dR = bo
438- let dS = bp
439- let dn = toString(bk)
440- let dT = valueOrErrorMessage(assetInfo(di), "Wr lp as").quantity
441- let dp = if (dH)
442- then bN(dN)
443- else if (if (dJ)
444- then (dM == dN)
439+func dH (dj,cb,dI,dJ,dK,dL,dm,dM,dN,dO,dP,dQ,dR) = {
440+ let dn = bq
441+ let dS = toBase58String(value(br))
442+ let dT = toBase58String(value(bs))
443+ let dU = bv
444+ let dV = bw
445+ let dW = bt
446+ let dX = bu
447+ let ds = toString(bp)
448+ let dY = valueOrErrorMessage(assetInfo(dn), "Wr lp as").quantity
449+ let du = if (dM)
450+ then bS(dS)
451+ else if (if (dO)
452+ then (dR == dS)
445453 else false)
446- then (bN(dN) - dL)
447- else if (dJ)
448- then bN(dN)
449- else (bN(dN) - dD)
450- let dr = if (dH)
451- then bN(dO)
452- else if (if (dJ)
453- then (dM == dO)
454+ then (bS(dS) - dQ)
455+ else if (dO)
456+ then bS(dS)
457+ else (bS(dS) - dI)
458+ let dw = if (dM)
459+ then bS(dT)
460+ else if (if (dO)
461+ then (dR == dT)
454462 else false)
455- then (bN(dO) - dL)
456- else if (dJ)
457- then bN(dO)
458- else (bN(dO) - dF)
459- let dU = H(dD, dR)
460- let dV = H(dF, dS)
461- let dW = bP(dV, dU)
462- let dq = H(dp, dR)
463- let ds = H(dr, dS)
464- let cb = cy([dq, ds])
465- let dX = if ((dT == 0))
463+ then (bS(dT) - dQ)
464+ else if (dO)
465+ then bS(dT)
466+ else (bS(dT) - dK)
467+ let dZ = I(dI, dW)
468+ let ea = I(dK, dX)
469+ let eb = bU(ea, dZ)
470+ let dv = I(du, dW)
471+ let dx = I(dw, dX)
472+ let cg = cD([dv, dx])
473+ let ec = if ((dY == 0))
466474 then {
467- let ca = cy([(dq + dU), (ds + dV)])
468- let dY = if ((ca > cb))
475+ let cf = cD([(dv + dZ), (dx + ea)])
476+ let ed = if ((cf > cg))
469477 then true
470478 else throw("D1 should be greater than D0")
471- if ((dY == dY))
479+ if ((ed == ed))
472480 then {
473- let dt = d
474- let dZ = d
475- let cq = ca
476- $Tuple5(L(cq, a), L(dU, dR), L(dV, dS), bP((ds + dV), (dq + dU)), dZ)
481+ let dy = d
482+ let ee = d
483+ let cv = cf
484+ $Tuple5(M(cv, a), M(dZ, dW), M(ea, dX), bU((dx + ea), (dv + dZ)), ee)
477485 }
478486 else throw("Strict value is not equal to itself.")
479487 }
480488 else {
481- let dt = bP(ds, dq)
482- let ea = fraction(W((dt - dW)), c, dt)
483- let dZ = H(bW, a)
484- if (if (if (dK)
485- then (dt != d)
489+ let dy = bU(dx, dv)
490+ let ef = fraction(X((dy - eb)), c, dy)
491+ let ee = I(cb, a)
492+ if (if (if (dP)
493+ then (dy != d)
486494 else false)
487- then (ea > dZ)
495+ then (ef > ee)
488496 else false)
489- then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
497+ then throw(((("Price slippage " + toString(ef)) + " > ") + toString(ee)))
490498 else {
491- let eb = H(dT, a)
492- let ec = fraction(dU, bS(ds, dq, CEILING), c, CEILING)
493- let ed = fraction(dV, c, bS(ds, dq, FLOOR), CEILING)
494- let ee = if ((ec > dV))
495- then $Tuple2(ed, dV)
496- else $Tuple2(dU, ec)
497- let ef = ee._1
498- let eg = ee._2
499- let ca = cy([(dq + ef), (ds + eg)])
500- let dY = if ((ca > cb))
499+ let eg = I(dY, a)
500+ let eh = fraction(dZ, bX(dx, dv, CEILING), c, CEILING)
501+ let ei = fraction(ea, c, bX(dx, dv, FLOOR), CEILING)
502+ let ej = if ((eh > ea))
503+ then $Tuple2(ei, ea)
504+ else $Tuple2(dZ, eh)
505+ let ek = ej._1
506+ let el = ej._2
507+ let cf = cD([(dv + ek), (dx + el)])
508+ let ed = if ((cf > cg))
501509 then true
502510 else throw("D1 should be greater than D0")
503- if ((dY == dY))
511+ if ((ed == ed))
504512 then {
505- let cq = fraction(eb, (ca - cb), cb)
506- $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ)
513+ let cv = fraction(eg, (cf - cg), cg)
514+ $Tuple5(P(cv, a, FLOOR), P(ek, dW, CEILING), P(el, dX, CEILING), dy, ee)
507515 }
508516 else throw("Strict value is not equal to itself.")
509517 }
510518 }
511- let eh = dX._1
512- let ei = dX._2
513- let ej = dX._3
514- let du = L(dX._4, a)
515- let ek = L(dX._5, a)
516- if ((0 >= eh))
519+ let em = ec._1
520+ let en = ec._2
521+ let eo = ec._3
522+ let dz = M(ec._4, a)
523+ let ep = M(ec._5, a)
524+ if ((0 >= em))
517525 then throw("LP <= 0")
518526 else {
519- let el = if (!(dI))
527+ let eq = if (!(dN))
520528 then 0
521- else eh
522- let em = (dD - ei)
523- let en = (dF - ej)
524- let eo = if (if (dJ)
525- then (dM == dN)
529+ else em
530+ let er = (dI - en)
531+ let es = (dK - eo)
532+ let et = if (if (dO)
533+ then (dR == dS)
526534 else false)
527- then $Tuple2(dL, 0)
528- else if (if (dJ)
529- then (dM == dO)
535+ then $Tuple2(dQ, 0)
536+ else if (if (dO)
537+ then (dR == dT)
530538 else false)
531- then $Tuple2(0, dL)
532- else $Tuple2(ei, ej)
533- let ep = eo._1
534- let eq = eo._2
535- let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, de), by(ep, eq, el, du, bW, ek, height, lastBlock.timestamp, em, en))]
536- $Tuple13(eh, el, du, dp, dr, dT, di, dn, er, em, en, dE, dG)
539+ then $Tuple2(0, dQ)
540+ else $Tuple2(en, eo)
541+ let eu = et._1
542+ let ev = et._2
543+ let ew = [IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz), StringEntry(ag(dm, dj), bD(eu, ev, eq, dz, cb, ep, height, lastBlock.timestamp, er, es))]
544+ $Tuple13(em, eq, dz, du, dw, dY, dn, ds, ew, er, es, dJ, dL)
537545 }
538546 }
539547
540548
541-func es (cz,cP,et) = {
542- let eu = g
543- let ev = cz[if ((cP == 0))
549+func ex (cE,cU,ey) = {
550+ let ez = g
551+ let eA = cE[if ((cU == 0))
544552 then 1
545553 else 0]
546- let ew = parseBigIntValue(l)
547- let cD = (parseBigIntValue(aU) * ew)
548- let cC = ev
549- let cE = (cD * eu)
550- let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
551- let ey = ((cC + ((et * ew) / cE)) - et)
552- func cN (cO,ez) = {
553- let eA = cO
554- let eB = eA._1
555- let dc = eA._2
556- if ((dc != unit))
557- then cO
554+ let eB = parseBigIntValue(m)
555+ let cI = (parseBigIntValue(aZ) * eB)
556+ let cH = eA
557+ let cJ = (cI * ez)
558+ let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
559+ let eD = ((cH + ((ey * eB) / cJ)) - ey)
560+ func cS (cT,eE) = {
561+ let eF = cT
562+ let eG = eF._1
563+ let dh = eF._2
564+ if ((dh != unit))
565+ then cT
558566 else {
559- let eC = (((eB * eB) + ex) / ((g * eB) + ey))
560- let eD = X((eC - value(eB)))
561- if ((f >= eD))
562- then $Tuple2(eC, ez)
563- else $Tuple2(eC, unit)
567+ let eH = (((eG * eG) + eC) / ((g * eG) + eD))
568+ let eI = Y((eH - value(eG)))
569+ if ((f >= eI))
570+ then $Tuple2(eH, eE)
571+ else $Tuple2(eH, unit)
564572 }
565573 }
566574
567- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let eE = {
569- let cV = cT
570- let cW = size(cV)
571- let cX = $Tuple2(et, unit)
572- func cY (cZ,da) = if ((da >= cW))
573- then cZ
574- else cN(cZ, cV[da])
575+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
576+ let eJ = {
577+ let da = cY
578+ let db = size(da)
579+ let dc = $Tuple2(ey, unit)
580+ func dd (de,df) = if ((df >= db))
581+ then de
582+ else cS(de, da[df])
575583
576- func db (cZ,da) = if ((da >= cW))
577- then cZ
584+ func dg (de,df) = if ((df >= db))
585+ then de
578586 else throw("List size exceeds 15")
579587
580- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
588+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581589 }
582- let eB = eE._1
583- let dc = eE._2
584- if ((dc != unit))
585- then eB
586- else throw(("Y calculation error, Y = " + toString(eB)))
587- }
588-
589-
590-func eF (eG,eH,eI) = {
591- let eJ = fraction(cy([K(eG, toBigInt(bo)), K(eH, toBigInt(bp))]), c, eI)
592- if ((eI == e))
593- then e
594- else eJ
590+ let eG = eJ._1
591+ let dh = eJ._2
592+ if ((dh != unit))
593+ then eG
594+ else throw(("Y calculation error, Y = " + toString(eG)))
595595 }
596596
597597
598598 func eK (eL,eM,eN) = {
599- let eO = (toBigInt(bN(be(bm))) - eL)
600- let eP = (toBigInt(bN(be(bn))) - eM)
601- let eQ = (toBigInt(value(assetInfo(bl)).quantity) - eN)
602- let eR = eF(eO, eP, eQ)
603- eR
599+ let eO = fraction(cD([L(eL, toBigInt(bt)), L(eM, toBigInt(bu))]), c, eN)
600+ if ((eN == e))
601+ then e
602+ else eO
604603 }
605604
606605
607-func eS (eT,eU,eN) = {
608- let eO = (bN(be(bm)) + eT)
609- let eP = (bN(be(bn)) + eU)
610- let eQ = (value(assetInfo(bl)).quantity + eN)
611- let eJ = eF(toBigInt(eO), toBigInt(eP), toBigInt(eQ))
612- let eV = [IntegerEntry(aq, height), StringEntry(ap, toString(eJ))]
613- $Tuple2(eV, eJ)
606+func eP (eQ,eR,eS) = {
607+ let eT = (toBigInt(bS(bj(br))) - eQ)
608+ let eU = (toBigInt(bS(bj(bs))) - eR)
609+ let eV = (toBigInt(value(assetInfo(bq)).quantity) - eS)
610+ let eW = eK(eT, eU, eV)
611+ eW
614612 }
615613
616614
617-func eW (eX,eJ) = if ((eJ >= eX))
618- then true
619- else aN("updated DLp lower than current DLp")
615+func eX (eY,eZ,eS) = {
616+ let eT = (bS(bj(br)) + eY)
617+ let eU = (bS(bj(bs)) + eZ)
618+ let eV = (value(assetInfo(bq)).quantity + eS)
619+ let eO = eK(toBigInt(eT), toBigInt(eU), toBigInt(eV))
620+ let fa = [IntegerEntry(at, height), StringEntry(as, toString(eO))]
621+ $Tuple2(fa, eO)
622+ }
620623
621624
622-func eY (eZ) = {
623- let eO = bN(be(bm))
624- let eP = bN(be(bn))
625- let fa = eZ.amount
626- let fb = fraction(eZ.amount, eZ.price, a, FLOOR)
627- let fc = if ((eZ.orderType == Buy))
628- then $Tuple2(fa, -(fb))
629- else $Tuple2(-(fa), fb)
630- let eT = fc._1
631- let eU = fc._2
632- if (if (if (aV())
625+func fb (fc,eO) = if ((eO >= fc))
626+ then true
627+ else aS("updated DLp lower than current DLp")
628+
629+
630+func fd (fe) = {
631+ let eT = bS(bj(br))
632+ let eU = bS(bj(bs))
633+ let ff = fe.amount
634+ let fg = fraction(fe.amount, fe.price, a, FLOOR)
635+ let fh = if ((fe.orderType == Buy))
636+ then $Tuple2(ff, -(fg))
637+ else $Tuple2(-(ff), fg)
638+ let eY = fh._1
639+ let eZ = fh._2
640+ if (if (if (ba())
633641 then true
634- else (bk == r))
642+ else (bp == s))
635643 then true
636- else (bk == s))
644+ else (bp == t))
637645 then throw("Admin blocked")
638- else if (if ((eZ.assetPair.amountAsset != bm))
646+ else if (if ((fe.assetPair.amountAsset != br))
639647 then true
640- else (eZ.assetPair.priceAsset != bn))
648+ else (fe.assetPair.priceAsset != bs))
641649 then throw("Wr assets")
642650 else {
643- let fd = parseBigIntValue(valueOrElse(getString(this, ap), "0"))
644- let fe = eS(eT, eU, 0)
645- let ff = fe._1
646- let fg = fe._2
647- let fh = (fg >= fd)
648- let fi = makeString(["dLp=", toString(fd), " dLpNew=", toString(fg), " amountAssetBalance=", toString(eO), " priceAssetBalance=", toString(eP), " amountAssetBalanceDelta=", toString(eT), " priceAssetBalanceDelta=", toString(eU), " height=", toString(height)], "")
649- $Tuple2(fh, fi)
651+ let fi = parseBigIntValue(valueOrElse(getString(this, as), "0"))
652+ let fj = eX(eY, eZ, 0)
653+ let fk = fj._1
654+ let fl = fj._2
655+ let fm = (fl >= fi)
656+ let fn = makeString(["dLp=", toString(fi), " dLpNew=", toString(fl), " amountAssetBalance=", toString(eT), " priceAssetBalance=", toString(eU), " amountAssetBalanceDelta=", toString(eY), " priceAssetBalanceDelta=", toString(eZ), " height=", toString(height)], "")
657+ $Tuple2(fm, fn)
650658 }
651659 }
652660
653661
654-func fj (cP) = if ((size(cP.payments) != 1))
662+func fo (cU) = if ((size(cU.payments) != 1))
655663 then throw("1 pmnt exp")
656664 else {
657- let fk = value(cP.payments[0])
658- let df = value(fk.assetId)
659- let dL = fk.amount
660- let dX = dd(toBase58String(cP.transactionId), toBase58String(df), dL, cP.caller)
661- let dz = dX._1
662- let dA = dX._2
663- let dn = parseIntValue(dX._9)
664- let dB = dX._10
665- if (if (aV())
665+ let fp = value(cU.payments[0])
666+ let dk = value(fp.assetId)
667+ let dQ = fp.amount
668+ let ec = di(toBase58String(cU.transactionId), toBase58String(dk), dQ, cU.caller)
669+ let dE = ec._1
670+ let dF = ec._2
671+ let ds = parseIntValue(ec._9)
672+ let dG = ec._10
673+ if (if (ba())
666674 then true
667- else (dn == s))
668- then throw(("Admin blocked: " + toString(dn)))
669- else $Tuple5(dz, dA, dL, df, dB)
675+ else (ds == t))
676+ then throw(("Admin blocked: " + toString(ds)))
677+ else $Tuple5(dE, dF, dQ, dk, dG)
670678 }
671679
672680
673-func fl (fm,ah,fn,fo,bW,dI,dJ,dK,dL,dM) = {
674- let dX = dC(ah, bW, value(fn).amount, value(fn).assetId, value(fo).amount, value(fo).assetId, fm, (ah == ""), dI, dJ, dK, dL, dM)
675- let dn = parseIntValue(dX._8)
676- if (if (if (aV())
681+func fq (fr,ai,fs,ft,cb,dN,dO,dP,dQ,dR) = {
682+ let ec = dH(ai, cb, value(fs).amount, value(fs).assetId, value(ft).amount, value(ft).assetId, fr, (ai == ""), dN, dO, dP, dQ, dR)
683+ let ds = parseIntValue(ec._8)
684+ if (if (if (ba())
677685 then true
678- else (dn == q))
686+ else (ds == r))
679687 then true
680- else (dn == s))
681- then throw(("Blocked:" + toString(dn)))
682- else dX
688+ else (ds == t))
689+ then throw(("Blocked:" + toString(ds)))
690+ else ec
683691 }
684692
685693
686-func fp (fq,df,dh,ah,fr) = {
687- let dj = toBase58String(value(bm))
688- let dk = toBase58String(value(bn))
689- let di = bl
690- let dR = bo
691- let dS = bp
692- let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity)
693- let fs = if ((eQ > e))
694+func fu (fv,dk,dm,ai,fw) = {
695+ let do = toBase58String(value(br))
696+ let dp = toBase58String(value(bs))
697+ let dn = bq
698+ let dW = bt
699+ let dX = bu
700+ let eV = toBigInt(valueOrErrorMessage(assetInfo(dn), "invalid lp asset").quantity)
701+ let fx = if ((eV > e))
694702 then true
695703 else throw("initial deposit requires all coins")
696- if ((fs == fs))
704+ if ((fx == fx))
697705 then {
698- let dp = bN(dj)
699- let dr = bN(dk)
700- let ft = if ((ah == ""))
701- then $Tuple2(dp, dr)
702- else if ((df == dj))
703- then if ((fq > dp))
706+ let du = bS(do)
707+ let dw = bS(dp)
708+ let fy = if ((ai == ""))
709+ then $Tuple2(du, dw)
710+ else if ((dk == do))
711+ then if ((fv > du))
704712 then throw("invalid payment amount")
705- else $Tuple2((dp - fq), dr)
706- else if ((df == dk))
707- then if ((fq > dr))
713+ else $Tuple2((du - fv), dw)
714+ else if ((dk == dp))
715+ then if ((fv > dw))
708716 then throw("invalid payment amount")
709- else $Tuple2(dp, (dr - fq))
717+ else $Tuple2(du, (dw - fv))
710718 else throw("wrong pmtAssetId")
711- let fu = ft._1
712- let fv = ft._2
713- let fw = if ((df == dj))
714- then $Tuple2(fq, 0)
715- else if ((df == dk))
716- then $Tuple2(0, fq)
719+ let fz = fy._1
720+ let fA = fy._2
721+ let fB = if ((dk == do))
722+ then $Tuple2(fv, 0)
723+ else if ((dk == dp))
724+ then $Tuple2(0, fv)
717725 else throw("invalid payment")
718- let fx = fw._1
719- let fy = fw._2
720- let fz = if (fr)
721- then $Tuple3(cv(fx, aR)._1, cv(fy, aR)._1, cv(fq, aR)._2)
722- else $Tuple3(fx, fy, 0)
723- let fA = fz._1
724- let fB = fz._2
725- let cx = fz._3
726- let fC = (fu + fA)
727- let fD = (fv + fB)
728- let cb = cy([H(fu, bo), H(fv, bp)])
729- let ca = cy([H(fC, bo), H(fD, bp)])
730- let dY = if ((ca > cb))
726+ let fC = fB._1
727+ let fD = fB._2
728+ let fE = if (fw)
729+ then $Tuple3(cA(fC, aW)._1, cA(fD, aW)._1, cA(fv, aW)._2)
730+ else $Tuple3(fC, fD, 0)
731+ let fF = fE._1
732+ let fG = fE._2
733+ let cC = fE._3
734+ let fH = (fz + fF)
735+ let fI = (fA + fG)
736+ let cg = cD([I(fz, bt), I(fA, bu)])
737+ let cf = cD([I(fH, bt), I(fI, bu)])
738+ let ed = if ((cf > cg))
731739 then true
732740 else throw()
733- if ((dY == dY))
741+ if ((ed == ed))
734742 then {
735- let fE = fraction(eQ, (ca - cb), cb, FLOOR)
736- let du = L(bP(H(fD, dS), H(fC, dR)), a)
737- let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, ah), by(fx, fy, toInt(fE), du, 0, 0, height, lastBlock.timestamp, 0, 0))]
738- let fF = fraction(fv, a, fu)
739- let fG = fraction(fq, a, (fF + a))
740- let fH = (fq - fG)
741- let fI = fraction(eQ, toBigInt(fH), toBigInt(fv))
742- let fJ = toInt(fraction((fE - fI), b, fI))
743- $Tuple4(toInt(fE), er, cx, fJ)
743+ let fJ = fraction(eV, (cf - cg), cg, FLOOR)
744+ let dz = M(bU(I(fI, dX), I(fH, dW)), a)
745+ let ew = [IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz), StringEntry(ag(dm, ai), bD(fC, fD, toInt(fJ), dz, 0, 0, height, lastBlock.timestamp, 0, 0))]
746+ let fK = fraction(fA, a, fz)
747+ let fL = fraction(fv, a, (fK + a))
748+ let fM = (fv - fL)
749+ let fN = fraction(eV, toBigInt(fM), toBigInt(fA))
750+ let fO = toInt(fraction((fJ - fN), b, fN))
751+ $Tuple4(toInt(fJ), ew, cC, fO)
744752 }
745753 else throw("Strict value is not equal to itself.")
746754 }
748756 }
749757
750758
751-func fK (fL,fM,fN,fm,fO,fP) = {
752- let di = toBase58String(value(bl))
753- let dj = toBase58String(value(bm))
754- let dk = toBase58String(value(bn))
755- let fQ = bo
756- let fR = bp
757- let fS = bk
758- let dh = if ((fm == bx))
759- then fO
760- else fm
761- let fk = value(fN[0])
762- let df = value(fk.assetId)
763- let dL = fk.amount
764- let eR = eK(e, e, e)
765- if ((eR == eR))
759+func fP (fQ,fR,fS,fr,fT,fU) = {
760+ let dn = toBase58String(value(bq))
761+ let do = toBase58String(value(br))
762+ let dp = toBase58String(value(bs))
763+ let fV = bt
764+ let fW = bu
765+ let fX = bp
766+ let dm = if ((fr == bC))
767+ then fT
768+ else fr
769+ let fp = value(fS[0])
770+ let dk = value(fp.assetId)
771+ let dQ = fp.amount
772+ let eW = eP(e, e, e)
773+ if ((eW == eW))
766774 then {
767- let de = toBase58String(fP)
768- if ((di != toBase58String(df)))
775+ let dj = toBase58String(fU)
776+ if ((dn != toBase58String(dk)))
769777 then throw("Wrong LP")
770778 else {
771- let dp = bN(dj)
772- let dr = bN(dk)
773- let fT = {
774- let aS = invoke(this, "getOneTknV2READONLY", [fL, dL], nil)
775- if ($isInstanceOf(aS, "(Int, Int)"))
776- then aS
777- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
779+ let du = bS(do)
780+ let dw = bS(dp)
781+ let fY = {
782+ let aX = invoke(this, "getOneTknV2READONLY", [fQ, dQ], nil)
783+ if ($isInstanceOf(aX, "(Int, Int)"))
784+ then aX
785+ else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
778786 }
779- if ((fT == fT))
787+ if ((fY == fY))
780788 then {
781- let cx = fT._2
782- let fU = fT._1
783- let fV = if (if ((fM > 0))
784- then (fM > fU)
789+ let cC = fY._2
790+ let fZ = fY._1
791+ let ga = if (if ((fR > 0))
792+ then (fR > fZ)
785793 else false)
786- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
787- else fU
788- let fW = if ((fL == dj))
789- then $Tuple4(fV, 0, ((dp - fV) - cx), dr)
790- else if ((fL == dk))
791- then $Tuple4(0, fV, dp, ((dr - fV) - cx))
794+ then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
795+ else fZ
796+ let gb = if ((fQ == do))
797+ then $Tuple4(ga, 0, ((du - ga) - cC), dw)
798+ else if ((fQ == dp))
799+ then $Tuple4(0, ga, du, ((dw - ga) - cC))
792800 else throw("invalid out asset id")
793- let fX = fW._1
794- let fY = fW._2
795- let fC = fW._3
796- let fD = fW._4
797- let fZ = bP(H(fD, fR), H(fC, fQ))
798- let ga = L(fZ, a)
799- let gb = if ((fL == "WAVES"))
801+ let gc = gb._1
802+ let gd = gb._2
803+ let fH = gb._3
804+ let fI = gb._4
805+ let ge = bU(I(fI, fW), I(fH, fV))
806+ let gf = M(ge, a)
807+ let gg = if ((fQ == "WAVES"))
800808 then unit
801- else fromBase58String(fL)
802- let gc = if ((cx > 0))
803- then [ScriptTransfer(aX, cx, gb)]
809+ else fromBase58String(fQ)
810+ let gh = if ((cC > 0))
811+ then [ScriptTransfer(bc, cC, gg)]
804812 else nil
805- let dB = ([ScriptTransfer(dh, fV, gb), StringEntry(ai(toString(dh), de), bJ(fX, fY, dL, ga, height, lastBlock.timestamp)), IntegerEntry(ab(), ga), IntegerEntry(ac(height, lastBlock.timestamp), ga)] ++ gc)
806- if ((dB == dB))
813+ let dG = ([ScriptTransfer(dm, ga, gg), StringEntry(aj(toString(dm), dj), bO(gc, gd, dQ, gf, height, lastBlock.timestamp)), IntegerEntry(ac(), gf), IntegerEntry(ad(height, lastBlock.timestamp), gf)] ++ gh)
814+ if ((dG == dG))
807815 then {
808- let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809- if ((gd == gd))
816+ let gi = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
817+ if ((gi == gi))
810818 then {
811- let ge = {
812- let gf = if ((this == aX))
819+ let gj = {
820+ let gk = if ((this == bc))
813821 then 0
814- else cx
815- let gg = if ((bc(fL) == bm))
822+ else cC
823+ let gl = if ((bh(fQ) == br))
816824 then true
817825 else false
818- if (gg)
819- then $Tuple2(-((fU + gf)), 0)
820- else $Tuple2(0, -((fU + gf)))
826+ if (gl)
827+ then $Tuple2(-((fZ + gk)), 0)
828+ else $Tuple2(0, -((fZ + gk)))
821829 }
822- let eT = ge._1
823- let eU = ge._2
824- let gh = eS(eT, eU, 0)
825- let gi = gh._1
826- let eJ = gh._2
827- let gj = eW(eR, eJ)
828- if ((gj == gj))
829- then $Tuple2((dB ++ gi), fV)
830+ let eY = gj._1
831+ let eZ = gj._2
832+ let gm = eX(eY, eZ, 0)
833+ let gn = gm._1
834+ let eO = gm._2
835+ let go = fb(eW, eO)
836+ if ((go == go))
837+ then $Tuple2((dG ++ gn), ga)
830838 else throw("Strict value is not equal to itself.")
831839 }
832840 else throw("Strict value is not equal to itself.")
840848 }
841849
842850
843-func gk () = {
844- let gl = getString(Z())
845- if ($isInstanceOf(gl, "String"))
851+func gp () = {
852+ let gq = getString(aa())
853+ if ($isInstanceOf(gq, "String"))
846854 then {
847- let cC = gl
848- fromBase58String(cC)
855+ let cH = gq
856+ fromBase58String(cH)
849857 }
850- else if ($isInstanceOf(gl, "Unit"))
858+ else if ($isInstanceOf(gq, "Unit"))
851859 then unit
852860 else throw("Match error")
853861 }
854862
855863
856-func gm () = {
857- let gl = getString(aa())
858- if ($isInstanceOf(gl, "String"))
864+func gr () = {
865+ let gq = getString(ab())
866+ if ($isInstanceOf(gq, "String"))
859867 then {
860- let cC = gl
861- fromBase58String(cC)
868+ let cH = gq
869+ fromBase58String(cH)
862870 }
863- else if ($isInstanceOf(gl, "Unit"))
871+ else if ($isInstanceOf(gq, "Unit"))
864872 then unit
865873 else throw("Match error")
866874 }
867875
868876
869-let gn = throw("Permission denied")
877+let gs = throw("Permission denied")
870878
871-func go (cP) = {
872- let gl = gk()
873- if ($isInstanceOf(gl, "ByteVector"))
879+func gt (cU) = {
880+ let gq = gp()
881+ if ($isInstanceOf(gq, "ByteVector"))
874882 then {
875- let gp = gl
876- (cP.callerPublicKey == gp)
883+ let gu = gq
884+ (cU.callerPublicKey == gu)
877885 }
878- else if ($isInstanceOf(gl, "Unit"))
879- then (cP.caller == this)
886+ else if ($isInstanceOf(gq, "Unit"))
887+ then (cU.caller == this)
880888 else throw("Match error")
881889 }
882890
883891
884-func gq (cP) = {
885- let gl = gk()
886- if ($isInstanceOf(gl, "ByteVector"))
892+func gv (cU) = {
893+ let gq = gp()
894+ if ($isInstanceOf(gq, "ByteVector"))
887895 then {
888- let gp = gl
889- if ((cP.callerPublicKey == gp))
896+ let gu = gq
897+ if ((cU.callerPublicKey == gu))
890898 then true
891- else gn
899+ else gs
892900 }
893- else if ($isInstanceOf(gl, "Unit"))
894- then if ((cP.caller == this))
901+ else if ($isInstanceOf(gq, "Unit"))
902+ then if ((cU.caller == this))
895903 then true
896- else gn
904+ else gs
897905 else throw("Match error")
898906 }
899907
900908
901-func gr (gs,et,gt) = {
902- let bg = aY()
903- let dj = bg[w]
904- let dk = bg[x]
905- let eu = g
906- let ew = parseBigIntValue(l)
907- let cD = (parseBigIntValue(aU) * ew)
908- let cz = if ((gs == false))
909- then [(toBigInt(bN(dj)) + gt), toBigInt(bN(dk))]
910- else [(toBigInt(bN(dk)) + gt), toBigInt(bN(dj))]
911- let ev = cz[0]
912- let cC = ev
913- let cE = (cD * eu)
914- let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
915- let ey = ((cC + ((et * ew) / cE)) - et)
916- func cN (cO,ez) = {
917- let gu = cO
918- let eB = gu._1
919- let dc = gu._2
920- if ((dc != unit))
921- then cO
909+func gw (gx,ey,gy) = {
910+ let bl = bd()
911+ let do = bl[x]
912+ let dp = bl[y]
913+ let ez = g
914+ let eB = parseBigIntValue(m)
915+ let cI = (parseBigIntValue(aZ) * eB)
916+ let cE = if ((gx == false))
917+ then [(toBigInt(bS(do)) + gy), toBigInt(bS(dp))]
918+ else [(toBigInt(bS(dp)) + gy), toBigInt(bS(do))]
919+ let eA = cE[0]
920+ let cH = eA
921+ let cJ = (cI * ez)
922+ let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
923+ let eD = ((cH + ((ey * eB) / cJ)) - ey)
924+ func cS (cT,eE) = {
925+ let gz = cT
926+ let eG = gz._1
927+ let dh = gz._2
928+ if ((dh != unit))
929+ then cT
922930 else {
923- let eC = (((eB * eB) + ex) / ((g * eB) + ey))
924- let eD = X((eC - value(eB)))
925- if ((f >= eD))
926- then $Tuple2(eC, ez)
927- else $Tuple2(eC, unit)
931+ let eH = (((eG * eG) + eC) / ((g * eG) + eD))
932+ let eI = Y((eH - value(eG)))
933+ if ((f >= eI))
934+ then $Tuple2(eH, eE)
935+ else $Tuple2(eH, unit)
928936 }
929937 }
930938
931- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
932- let gv = {
933- let cV = cT
934- let cW = size(cV)
935- let cX = $Tuple2(et, unit)
936- func cY (cZ,da) = if ((da >= cW))
937- then cZ
938- else cN(cZ, cV[da])
939+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
940+ let gA = {
941+ let da = cY
942+ let db = size(da)
943+ let dc = $Tuple2(ey, unit)
944+ func dd (de,df) = if ((df >= db))
945+ then de
946+ else cS(de, da[df])
939947
940- func db (cZ,da) = if ((da >= cW))
941- then cZ
948+ func dg (de,df) = if ((df >= db))
949+ then de
942950 else throw("List size exceeds 15")
943951
944- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
952+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
945953 }
946- let eB = gv._1
947- let dc = gv._2
948- if ((dc != unit))
949- then eB
950- else throw(("Y calculation error, Y = " + toString(eB)))
954+ let eG = gA._1
955+ let dh = gA._2
956+ if ((dh != unit))
957+ then eG
958+ else throw(("Y calculation error, Y = " + toString(eG)))
951959 }
952960
953961
954-@Callable(cP)
955-func calculateAmountOutForSwapREADONLY (gw,gs,gx) = {
956- let gy = if ((gs == false))
962+func gB () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
963+
964+
965+@Callable(cU)
966+func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
967+ let gE = if ((gx == false))
957968 then {
958- let gz = aJ(this, ak())
959- let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960- $Tuple2(gz, gt)
969+ let gF = aO(this, al())
970+ let gy = (toBigInt(bS(aO(this, ak()))) + toBigInt(gC))
971+ $Tuple2(gF, gy)
961972 }
962973 else {
963- let gz = aJ(this, aj())
964- let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965- $Tuple2(gz, gt)
974+ let gF = aO(this, ak())
975+ let gy = (toBigInt(bS(aO(this, al()))) + toBigInt(gC))
976+ $Tuple2(gF, gy)
966977 }
967- let gz = gy._1
968- let gt = gy._2
969- let bg = aY()
970- let dj = bg[w]
971- let dk = bg[x]
972- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
973- let et = cy(cz)
974- let eB = gr(gs, et, toBigInt(gw))
975- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
976- let gB = max([0, toInt(gA)])
977- let gC = if ((gs == false))
978- then [((toBigInt(bN(dj)) + toBigInt(gw)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
979- else [(toBigInt(bN(dj)) - gA), ((toBigInt(bN(dk)) + toBigInt(gw)) + toBigInt(gx))]
980- let gD = cy(gC)
981- let dY = if ((gD >= et))
978+ let gF = gE._1
979+ let gy = gE._2
980+ let bl = bd()
981+ let do = bl[x]
982+ let dp = bl[y]
983+ let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
984+ let ey = cD(cE)
985+ let eG = gw(gx, ey, toBigInt(gC))
986+ let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
987+ let gH = max([0, toInt(gG)])
988+ let gI = if ((gx == false))
989+ then [((toBigInt(bS(do)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
990+ else [(toBigInt(bS(do)) - gG), ((toBigInt(bS(dp)) + toBigInt(gC)) + toBigInt(gD))]
991+ let gJ = cD(gI)
992+ let ed = if ((gJ >= ey))
982993 then true
983- else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__"))
984- if ((dY == dY))
985- then $Tuple2(nil, gB)
994+ else throw(makeString(["new D is fewer error", toString(ey), toString(gJ)], "__"))
995+ if ((ed == ed))
996+ then $Tuple2(nil, gH)
986997 else throw("Strict value is not equal to itself.")
987998 }
988999
9891000
9901001
991-@Callable(cP)
992-func calculateAmountOutForSwapAndSendTokens (gw,gs,gE,gF,gx) = {
993- let gG = {
994- let aS = invoke(aQ, "getSwapContractREADONLY", nil, nil)
995- if ($isInstanceOf(aS, "String"))
996- then aS
997- else throw(($getType(aS) + " couldn't be cast to String"))
1002+@Callable(cU)
1003+func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1004+ let gM = {
1005+ let aX = invoke(aV, "getSwapContractREADONLY", nil, nil)
1006+ if ($isInstanceOf(aX, "String"))
1007+ then aX
1008+ else throw(($getType(aX) + " couldn't be cast to String"))
9981009 }
999- let gH = [if ((value(cP.payments[0]).amount >= gw))
1010+ let gN = [if ((value(cU.payments[0]).amount >= gC))
10001011 then true
1001- else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG)))
1012+ else aS("Wrong amount"), if ((cU.caller == addressFromStringValue(gM)))
10021013 then true
1003- else aN("Permission denied")]
1004- if ((gH == gH))
1014+ else aS("Permission denied")]
1015+ if ((gN == gN))
10051016 then {
1006- let fk = value(cP.payments[0])
1007- let gI = be(fk.assetId)
1008- let gJ = if ((gs == false))
1017+ let fp = value(cU.payments[0])
1018+ let gO = bj(fp.assetId)
1019+ let gP = if ((gx == false))
10091020 then {
1010- let gz = aJ(this, ak())
1011- let gt = (bN(gI) - value(cP.payments[0]).amount)
1012- $Tuple2(gz, gt)
1021+ let gF = aO(this, al())
1022+ let gy = (bS(gO) - value(cU.payments[0]).amount)
1023+ $Tuple2(gF, gy)
10131024 }
10141025 else {
1015- let gz = aJ(this, aj())
1016- let gt = (bN(gI) - value(cP.payments[0]).amount)
1017- $Tuple2(gz, gt)
1026+ let gF = aO(this, ak())
1027+ let gy = (bS(gO) - value(cU.payments[0]).amount)
1028+ $Tuple2(gF, gy)
10181029 }
1019- let gz = gJ._1
1020- let gt = gJ._2
1021- let bg = aY()
1022- let dj = bg[w]
1023- let dk = bg[x]
1024- let cz = if ((gs == false))
1025- then [(toBigInt(bN(dj)) - toBigInt(value(cP.payments[0]).amount)), toBigInt(bN(dk))]
1026- else [toBigInt(bN(dj)), (toBigInt(bN(dk)) - toBigInt(value(cP.payments[0]).amount))]
1027- let et = cy(cz)
1028- let eB = gr(gs, et, toBigInt(0))
1029- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
1030- let gB = max([0, toInt(gA)])
1031- let gK = if ((gB >= gE))
1030+ let gF = gP._1
1031+ let gy = gP._2
1032+ let bl = bd()
1033+ let do = bl[x]
1034+ let dp = bl[y]
1035+ let cE = if ((gx == false))
1036+ then [(toBigInt(bS(do)) - toBigInt(value(cU.payments[0]).amount)), toBigInt(bS(dp))]
1037+ else [toBigInt(bS(do)), (toBigInt(bS(dp)) - toBigInt(value(cU.payments[0]).amount))]
1038+ let ey = cD(cE)
1039+ let eG = gw(gx, ey, toBigInt(0))
1040+ let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
1041+ let gH = max([0, toInt(gG)])
1042+ let gQ = if ((gH >= gK))
10321043 then true
10331044 else throw("Exchange result is fewer coins than expected")
1034- if ((gK == gK))
1045+ if ((gQ == gQ))
10351046 then {
1036- let gC = if ((gs == false))
1037- then [(toBigInt(bN(dj)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
1038- else [(toBigInt(bN(dj)) - gA), (toBigInt(bN(dk)) + toBigInt(gx))]
1039- let gD = cy(gC)
1040- let dY = if ((gD >= et))
1047+ let gI = if ((gx == false))
1048+ then [(toBigInt(bS(do)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
1049+ else [(toBigInt(bS(do)) - gG), (toBigInt(bS(dp)) + toBigInt(gD))]
1050+ let gJ = cD(gI)
1051+ let ed = if ((gJ >= ey))
10411052 then true
10421053 else throw("new D is fewer error")
1043- if ((dY == dY))
1044- then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB)
1054+ if ((ed == ed))
1055+ then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bh(gF))], gH)
10451056 else throw("Strict value is not equal to itself.")
10461057 }
10471058 else throw("Strict value is not equal to itself.")
10511062
10521063
10531064
1054-@Callable(cP)
1055-func constructor (Y) = {
1056- let ex = gq(cP)
1057- if ((ex == ex))
1058- then [StringEntry(Y(), Y)]
1065+@Callable(cU)
1066+func constructor (Z) = {
1067+ let eC = gv(cU)
1068+ if ((eC == eC))
1069+ then [StringEntry(Z(), Z)]
10591070 else throw("Strict value is not equal to itself.")
10601071 }
10611072
10621073
10631074
1064-@Callable(cP)
1065-func setManager (gL) = {
1066- let ex = gq(cP)
1067- if ((ex == ex))
1075+@Callable(cU)
1076+func setManager (gR) = {
1077+ let eC = gv(cU)
1078+ if ((eC == eC))
10681079 then {
1069- let gM = fromBase58String(gL)
1070- if ((gM == gM))
1071- then [StringEntry(aa(), gL)]
1080+ let gS = fromBase58String(gR)
1081+ if ((gS == gS))
1082+ then [StringEntry(ab(), gR)]
10721083 else throw("Strict value is not equal to itself.")
10731084 }
10741085 else throw("Strict value is not equal to itself.")
10761087
10771088
10781089
1079-@Callable(cP)
1090+@Callable(cU)
10801091 func confirmManager () = {
1081- let cu = gm()
1082- let gN = if (isDefined(cu))
1092+ let cz = gr()
1093+ let gT = if (isDefined(cz))
10831094 then true
10841095 else throw("No pending manager")
1085- if ((gN == gN))
1096+ if ((gT == gT))
10861097 then {
1087- let gO = if ((cP.callerPublicKey == value(cu)))
1098+ let gU = if ((cU.callerPublicKey == value(cz)))
10881099 then true
10891100 else throw("You are not pending manager")
1090- if ((gO == gO))
1091- then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
1101+ if ((gU == gU))
1102+ then [StringEntry(aa(), toBase58String(value(cz))), DeleteEntry(ab())]
10921103 else throw("Strict value is not equal to itself.")
10931104 }
10941105 else throw("Strict value is not equal to itself.")
10961107
10971108
10981109
1099-@Callable(cP)
1100-func put (gP,gQ) = {
1101- let gR = bs()
1102- let gS = valueOrErrorMessage(addressFromString(gR[C]), "Wr st addr")
1103- let gT = valueOrErrorMessage(addressFromString(gR[E]), "Wr sl addr")
1104- if ((0 > gP))
1110+@Callable(cU)
1111+func put (gV,gW) = {
1112+ let gX = bx()
1113+ let gY = valueOrErrorMessage(addressFromString(gX[D]), "Wr st addr")
1114+ let gZ = valueOrErrorMessage(addressFromString(gX[F]), "Wr sl addr")
1115+ if ((0 > gV))
11051116 then throw("Wrong slippage")
1106- else if ((size(cP.payments) != 2))
1117+ else if ((size(cU.payments) != 2))
11071118 then throw("2 pmnts expd")
11081119 else {
1109- let gU = toBigInt(value(cP.payments[0]).amount)
1110- let gV = toBigInt(value(cP.payments[1]).amount)
1111- let eO = (toBigInt(bN(be(bm))) - gU)
1112- if ((eO == eO))
1120+ let ha = toBigInt(value(cU.payments[0]).amount)
1121+ let hb = toBigInt(value(cU.payments[1]).amount)
1122+ let eT = (toBigInt(bS(bj(br))) - ha)
1123+ if ((eT == eT))
11131124 then {
1114- let eP = (toBigInt(bN(be(bn))) - gV)
1115- if ((eP == eP))
1125+ let eU = (toBigInt(bS(bj(bs))) - hb)
1126+ if ((eU == eU))
11161127 then {
1117- let eQ = toBigInt(value(assetInfo(bl)).quantity)
1118- if ((eQ == eQ))
1128+ let eV = toBigInt(value(assetInfo(bq)).quantity)
1129+ if ((eV == eV))
11191130 then {
1120- let eR = eK(gU, gV, toBigInt(0))
1121- if ((eR == eR))
1131+ let eW = eP(ha, hb, toBigInt(0))
1132+ if ((eW == eW))
11221133 then {
1123- let gW = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gP, true, false, true, 0, "")
1124- let el = gW._2
1125- let gX = gW._7
1126- let dB = gW._9
1127- let em = gW._10
1128- let en = gW._11
1129- let dj = gW._12
1130- let dk = gW._13
1131- let dX = invoke(aQ, "emit", [el], nil)
1132- if ((dX == dX))
1134+ let hc = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], gV, true, false, true, 0, "")
1135+ let eq = hc._2
1136+ let hd = hc._7
1137+ let dG = hc._9
1138+ let er = hc._10
1139+ let es = hc._11
1140+ let do = hc._12
1141+ let dp = hc._13
1142+ let ec = invoke(aV, "emit", [eq], nil)
1143+ if ((ec == ec))
11331144 then {
1134- let gY = {
1135- let gl = dX
1136- if ($isInstanceOf(gl, "Address"))
1145+ let he = {
1146+ let gq = ec
1147+ if ($isInstanceOf(gq, "Address"))
11371148 then {
1138- let gZ = gl
1139- invoke(gZ, "emit", [el], nil)
1149+ let hf = gq
1150+ invoke(hf, "emit", [eq], nil)
11401151 }
11411152 else unit
11421153 }
1143- if ((gY == gY))
1154+ if ((he == he))
11441155 then {
1145- let ha = if ((em > 0))
1146- then invoke(gT, "put", nil, [AttachedPayment(dj, em)])
1156+ let hg = if ((er > 0))
1157+ then invoke(gZ, "put", nil, [AttachedPayment(do, er)])
11471158 else nil
1148- if ((ha == ha))
1159+ if ((hg == hg))
11491160 then {
1150- let hb = if ((en > 0))
1151- then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
1161+ let hh = if ((es > 0))
1162+ then invoke(gZ, "put", nil, [AttachedPayment(dp, es)])
11521163 else nil
1153- if ((hb == hb))
1164+ if ((hh == hh))
11541165 then {
1155- let hc = if (gQ)
1166+ let hi = if (gW)
11561167 then {
1157- let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)])
1158- if ((hd == hd))
1168+ let hj = invoke(gY, "stake", nil, [AttachedPayment(hd, eq)])
1169+ if ((hj == hj))
11591170 then nil
11601171 else throw("Strict value is not equal to itself.")
11611172 }
1162- else [ScriptTransfer(cP.caller, el, gX)]
1163- let he = eS(0, 0, 0)
1164- let gi = he._1
1165- let eJ = he._2
1166- let hf = if ((eJ >= eR))
1173+ else [ScriptTransfer(cU.caller, eq, hd)]
1174+ let hk = eX(0, 0, 0)
1175+ let gn = hk._1
1176+ let eO = hk._2
1177+ let hl = if ((eO >= eW))
11671178 then true
1168- else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " "))
1169- if ((hf == hf))
1179+ else aS(makeString(["updated DLp lower than current DLp", toString(eT), toString(eU), toString(eV), toString(eW), toString(eO), toString(er), toString(es)], " "))
1180+ if ((hl == hl))
11701181 then {
1171- let hg = value(assetInfo(bl)).quantity
1172- if ((hg == hg))
1173- then ((dB ++ hc) ++ gi)
1182+ let hm = value(assetInfo(bq)).quantity
1183+ if ((hm == hm))
1184+ then ((dG ++ hi) ++ gn)
11741185 else throw("Strict value is not equal to itself.")
11751186 }
11761187 else throw("Strict value is not equal to itself.")
11951206
11961207
11971208
1198-@Callable(cP)
1199-func putOneTknV2 (fM,gQ) = {
1200- let hh = {
1201- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1202- if ($isInstanceOf(aS, "Boolean"))
1203- then aS
1204- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1209+@Callable(cU)
1210+func putOneTknV2 (fR,gW) = {
1211+ let hn = {
1212+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1213+ if ($isInstanceOf(aX, "Boolean"))
1214+ then aX
1215+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
12051216 }
1206- let hi = if (if (if (aV())
1217+ let ho = if (if (if (ba())
12071218 then true
1208- else (bk == q))
1219+ else (bp == r))
12091220 then true
1210- else (bk == s))
1221+ else (bp == t))
12111222 then true
1212- else hh
1213- let gH = [if (if (!(hi))
1223+ else hn
1224+ let gN = [if (if (!(ho))
12141225 then true
1215- else go(cP))
1226+ else gt(cU))
12161227 then true
1217- else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
1228+ else aS("put operation is blocked by admin"), if ((size(cU.payments) == 1))
12181229 then true
1219- else aN("exactly 1 payment are expected")]
1220- if ((gH == gH))
1230+ else aS("exactly 1 payment are expected")]
1231+ if ((gN == gN))
12211232 then {
1222- let dj = toBase58String(value(bm))
1223- let dk = toBase58String(value(bn))
1224- let di = bl
1225- let fQ = bo
1226- let fR = bp
1227- let dh = if ((cP.caller == this))
1228- then cP.originCaller
1229- else cP.caller
1230- let fk = value(cP.payments[0])
1231- let df = toBase58String(value(fk.assetId))
1232- let dL = fk.amount
1233- let eR = if ((fk.assetId == bm))
1234- then eK(toBigInt(dL), toBigInt(0), toBigInt(0))
1235- else eK(toBigInt(0), toBigInt(dL), toBigInt(0))
1236- if ((eR == eR))
1233+ let do = toBase58String(value(br))
1234+ let dp = toBase58String(value(bs))
1235+ let dn = bq
1236+ let fV = bt
1237+ let fW = bu
1238+ let dm = if ((cU.caller == this))
1239+ then cU.originCaller
1240+ else cU.caller
1241+ let fp = value(cU.payments[0])
1242+ let dk = toBase58String(value(fp.assetId))
1243+ let dQ = fp.amount
1244+ let eW = if ((fp.assetId == br))
1245+ then eP(toBigInt(dQ), toBigInt(0), toBigInt(0))
1246+ else eP(toBigInt(0), toBigInt(dQ), toBigInt(0))
1247+ if ((eW == eW))
12371248 then {
1238- let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1239- if ((hj == hj))
1249+ let hp = fu(dQ, dk, toString(dm), toBase58String(cU.transactionId), true)
1250+ if ((hp == hp))
12401251 then {
1241- let cx = hj._3
1242- let dB = hj._2
1243- let hk = hj._1
1244- let el = if (if ((fM > 0))
1245- then (fM > hk)
1252+ let cC = hp._3
1253+ let dG = hp._2
1254+ let hq = hp._1
1255+ let eq = if (if ((fR > 0))
1256+ then (fR > hq)
12461257 else false)
1247- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
1248- else hk
1249- let gW = invoke(aQ, "emit", [el], nil)
1250- if ((gW == gW))
1258+ then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
1259+ else hq
1260+ let hc = invoke(aV, "emit", [eq], nil)
1261+ if ((hc == hc))
12511262 then {
1252- let gY = {
1253- let gl = gW
1254- if ($isInstanceOf(gl, "Address"))
1263+ let he = {
1264+ let gq = hc
1265+ if ($isInstanceOf(gq, "Address"))
12551266 then {
1256- let gZ = gl
1257- invoke(gZ, "emit", [el], nil)
1267+ let hf = gq
1268+ invoke(hf, "emit", [eq], nil)
12581269 }
12591270 else unit
12601271 }
1261- if ((gY == gY))
1272+ if ((he == he))
12621273 then {
1263- let hc = if (gQ)
1274+ let hi = if (gW)
12641275 then {
1265- let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1266- if ((hd == hd))
1276+ let hj = invoke(bz, "stakeFor", [toString(cU.caller)], [AttachedPayment(dn, eq)])
1277+ if ((hj == hj))
12671278 then nil
12681279 else throw("Strict value is not equal to itself.")
12691280 }
1270- else [ScriptTransfer(cP.caller, el, di)]
1271- let gc = if ((cx > 0))
1272- then [ScriptTransfer(aX, cx, fromBase58String(df))]
1281+ else [ScriptTransfer(cU.caller, eq, dn)]
1282+ let gh = if ((cC > 0))
1283+ then [ScriptTransfer(bc, cC, fromBase58String(dk))]
12731284 else nil
1274- let hl = if ((this == aX))
1285+ let hr = if ((this == bc))
12751286 then $Tuple2(0, 0)
12761287 else {
1277- let hm = if ((fk.assetId == bm))
1288+ let hs = if ((fp.assetId == br))
12781289 then true
12791290 else false
1280- if (hm)
1281- then $Tuple2(-(cx), 0)
1282- else $Tuple2(0, -(cx))
1291+ if (hs)
1292+ then $Tuple2(-(cC), 0)
1293+ else $Tuple2(0, -(cC))
12831294 }
1284- let eT = hl._1
1285- let eU = hl._2
1286- let hn = eS(eT, eU, 0)
1287- let gi = hn._1
1288- let eJ = hn._2
1289- let gj = eW(eR, eJ)
1290- if ((gj == gj))
1291- then $Tuple2((((dB ++ hc) ++ gc) ++ gi), el)
1295+ let eY = hr._1
1296+ let eZ = hr._2
1297+ let ht = eX(eY, eZ, 0)
1298+ let gn = ht._1
1299+ let eO = ht._2
1300+ let go = fb(eW, eO)
1301+ if ((go == go))
1302+ then $Tuple2((((dG ++ hi) ++ gh) ++ gn), eq)
12921303 else throw("Strict value is not equal to itself.")
12931304 }
12941305 else throw("Strict value is not equal to itself.")
13041315
13051316
13061317
1307-@Callable(cP)
1308-func putForFree (ho) = if ((0 > ho))
1318+@Callable(cU)
1319+func putForFree (hu) = if ((0 > hu))
13091320 then throw("Wrong slpg")
1310- else if ((size(cP.payments) != 2))
1321+ else if ((size(cU.payments) != 2))
13111322 then throw("2 pmnts expd")
13121323 else {
1313- let hp = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], ho, false, false, true, 0, "")
1314- let dB = hp._9
1315- let gU = toBigInt(value(cP.payments[0]).amount)
1316- let gV = toBigInt(value(cP.payments[1]).amount)
1317- let eR = eK(gU, gV, toBigInt(0))
1318- if ((eR == eR))
1324+ let hv = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], hu, false, false, true, 0, "")
1325+ let dG = hv._9
1326+ let ha = toBigInt(value(cU.payments[0]).amount)
1327+ let hb = toBigInt(value(cU.payments[1]).amount)
1328+ let eW = eP(ha, hb, toBigInt(0))
1329+ if ((eW == eW))
13191330 then {
1320- let hq = eS(0, 0, 0)
1321- let gi = hq._1
1322- let eJ = hq._2
1323- let gj = eW(eR, eJ)
1324- if ((gj == gj))
1325- then (dB ++ gi)
1331+ let hw = eX(0, 0, 0)
1332+ let gn = hw._1
1333+ let eO = hw._2
1334+ let go = fb(eW, eO)
1335+ if ((go == go))
1336+ then (dG ++ gn)
13261337 else throw("Strict value is not equal to itself.")
13271338 }
13281339 else throw("Strict value is not equal to itself.")
13301341
13311342
13321343
1333-@Callable(cP)
1344+@Callable(cU)
13341345 func get () = {
1335- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1336- if ((eR == eR))
1346+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1347+ if ((eW == eW))
13371348 then {
1338- let dX = fj(cP)
1339- let hr = dX._1
1340- let dA = dX._2
1341- let dL = dX._3
1342- let df = dX._4
1343- let dB = dX._5
1344- let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1345- if ((ey == ey))
1349+ let ec = fo(cU)
1350+ let hx = ec._1
1351+ let dF = ec._2
1352+ let dQ = ec._3
1353+ let dk = ec._4
1354+ let dG = ec._5
1355+ let eD = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1356+ if ((eD == eD))
13461357 then {
1347- let hs = eS(-(hr), -(dA), 0)
1348- let gi = hs._1
1349- let eJ = hs._2
1350- let gj = eW(eR, eJ)
1351- if ((gj == gj))
1352- then (dB ++ gi)
1358+ let hy = eX(-(hx), -(dF), 0)
1359+ let gn = hy._1
1360+ let eO = hy._2
1361+ let go = fb(eW, eO)
1362+ if ((go == go))
1363+ then (dG ++ gn)
13531364 else throw("Strict value is not equal to itself.")
13541365 }
13551366 else throw("Strict value is not equal to itself.")
13591370
13601371
13611372
1362-@Callable(cP)
1363-func getOneTknV2 (fL,fM) = {
1364- let hh = {
1365- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1366- if ($isInstanceOf(aS, "Boolean"))
1367- then aS
1368- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1373+@Callable(cU)
1374+func getOneTknV2 (fQ,fR) = {
1375+ let hn = {
1376+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1377+ if ($isInstanceOf(aX, "Boolean"))
1378+ then aX
1379+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
13691380 }
1370- let ht = if (if (aV())
1381+ let hz = if (if (ba())
13711382 then true
1372- else (bk == s))
1383+ else (bp == t))
13731384 then true
1374- else hh
1375- let gH = [if (if (!(ht))
1385+ else hn
1386+ let gN = [if (if (!(hz))
13761387 then true
1377- else go(cP))
1388+ else gt(cU))
13781389 then true
1379- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
1390+ else aS("get operation is blocked by admin"), if ((size(cU.payments) == 1))
13801391 then true
1381- else aN("exactly 1 payment are expected")]
1382- if ((gH == gH))
1392+ else aS("exactly 1 payment are expected")]
1393+ if ((gN == gN))
13831394 then {
1384- let hu = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId)
1385- let dB = hu._1
1386- let fV = hu._2
1387- $Tuple2(dB, fV)
1395+ let hA = fP(fQ, fR, cU.payments, cU.caller, cU.originCaller, cU.transactionId)
1396+ let dG = hA._1
1397+ let ga = hA._2
1398+ $Tuple2(dG, ga)
13881399 }
13891400 else throw("Strict value is not equal to itself.")
13901401 }
13911402
13921403
13931404
1394-@Callable(cP)
1405+@Callable(cU)
13951406 func refreshDLp () = {
1396- let hv = valueOrElse(getInteger(aq), 0)
1397- let hw = if (((height - hv) >= at))
1407+ let hB = valueOrElse(getInteger(at), 0)
1408+ let hC = if (((height - hB) >= aw))
13981409 then unit
1399- else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1400- if ((hw == hw))
1410+ else aS(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1411+ if ((hC == hC))
14011412 then {
1402- let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp"))
1403- let hx = eS(0, 0, 0)
1404- let hy = hx._1
1405- let eJ = hx._2
1406- let eV = if ((fd != eJ))
1407- then hy
1408- else aN("nothing to refresh")
1409- $Tuple2(eV, toString(eJ))
1413+ let fi = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), aU("invalid dLp"))
1414+ let hD = eX(0, 0, 0)
1415+ let hE = hD._1
1416+ let eO = hD._2
1417+ let fa = if ((fi != eO))
1418+ then hE
1419+ else aS("nothing to refresh")
1420+ $Tuple2(fa, toString(eO))
14101421 }
14111422 else throw("Strict value is not equal to itself.")
14121423 }
14131424
14141425
14151426
1416-@Callable(cP)
1417-func getOneTknV2READONLY (fL,hz) = {
1418- let dj = toBase58String(value(bm))
1419- let dk = toBase58String(value(bn))
1420- let di = toBase58String(value(bl))
1421- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1422- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1423- let cb = cy(cz)
1424- let ca = (cb - fraction(toBigInt(hz), cb, eI))
1425- let hA = if ((fL == dj))
1427+@Callable(cU)
1428+func getOneTknV2READONLY (fQ,hF) = {
1429+ let do = toBase58String(value(br))
1430+ let dp = toBase58String(value(bs))
1431+ let dn = toBase58String(value(bq))
1432+ let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
1433+ let eN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dn)), "invalid lp asset").quantity)
1434+ let cg = cD(cE)
1435+ let cf = (cg - fraction(toBigInt(hF), cg, eN))
1436+ let hG = if ((fQ == do))
14261437 then 0
1427- else if ((fL == dk))
1438+ else if ((fQ == dp))
14281439 then 1
14291440 else throw("invalid out asset id")
1430- let hB = es(cz, hA, ca)
1431- let gA = (cz[hA] - hB)
1432- let gB = max([0, toInt((gA - f))])
1433- let hC = cv(gB, aT)
1434- let fU = hC._1
1435- let cx = hC._2
1436- $Tuple2(nil, $Tuple2(fU, cx))
1441+ let hH = ex(cE, hG, cf)
1442+ let gG = (cE[hG] - hH)
1443+ let gH = max([0, toInt((gG - f))])
1444+ let hI = cA(gH, aY)
1445+ let fZ = hI._1
1446+ let cC = hI._2
1447+ $Tuple2(nil, $Tuple2(fZ, cC))
14371448 }
14381449
14391450
14401451
1441-@Callable(cP)
1442-func getOneTknV2WithBonusREADONLY (fL,hz) = {
1443- let dj = toBase58String(value(bm))
1444- let dk = toBase58String(value(bn))
1445- let di = toBase58String(value(bl))
1446- let dp = bN(dj)
1447- let dr = bN(dk)
1448- let hD = {
1449- let aS = invoke(this, "getOneTknV2READONLY", [fL, hz], nil)
1450- if ($isInstanceOf(aS, "(Int, Int)"))
1451- then aS
1452- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
1452+@Callable(cU)
1453+func getOneTknV2WithBonusREADONLY (fQ,hF) = {
1454+ let do = toBase58String(value(br))
1455+ let dp = toBase58String(value(bs))
1456+ let dn = toBase58String(value(bq))
1457+ let du = bS(do)
1458+ let dw = bS(dp)
1459+ let hJ = {
1460+ let aX = invoke(this, "getOneTknV2READONLY", [fQ, hF], nil)
1461+ if ($isInstanceOf(aX, "(Int, Int)"))
1462+ then aX
1463+ else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
14531464 }
1454- let fU = hD._1
1455- let cx = hD._2
1456- let dX = dd("", di, hz, this)
1457- let dz = dX._1
1458- let dA = dX._2
1459- let hE = (dz + dA)
1460- let fJ = if ((hE == 0))
1461- then if ((fU == 0))
1465+ let fZ = hJ._1
1466+ let cC = hJ._2
1467+ let ec = di("", dn, hF, this)
1468+ let dE = ec._1
1469+ let dF = ec._2
1470+ let hK = (dE + dF)
1471+ let fO = if ((hK == 0))
1472+ then if ((fZ == 0))
14621473 then 0
14631474 else throw("bonus calculation error")
1464- else fraction((fU - hE), a, hE)
1465- $Tuple2(nil, $Tuple3(fU, cx, fJ))
1475+ else fraction((fZ - hK), a, hK)
1476+ $Tuple2(nil, $Tuple3(fZ, cC, fO))
14661477 }
14671478
14681479
14691480
1470-@Callable(cP)
1471-func getNoLess (hF,hG) = {
1472- let dX = fj(cP)
1473- let dz = dX._1
1474- let dA = dX._2
1475- let dL = dX._3
1476- let df = dX._4
1477- let dB = dX._5
1478- if ((hF > dz))
1479- then throw(((("Failed: " + toString(dz)) + " < ") + toString(hF)))
1480- else if ((hG > dA))
1481- then throw(((("Failed: " + toString(dA)) + " < ") + toString(hG)))
1481+@Callable(cU)
1482+func getNoLess (hL,hM) = {
1483+ let ec = fo(cU)
1484+ let dE = ec._1
1485+ let dF = ec._2
1486+ let dQ = ec._3
1487+ let dk = ec._4
1488+ let dG = ec._5
1489+ if ((hL > dE))
1490+ then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL)))
1491+ else if ((hM > dF))
1492+ then throw(((("Failed: " + toString(dF)) + " < ") + toString(hM)))
14821493 else {
1483- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1484- if ((eR == eR))
1494+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1495+ if ((eW == eW))
14851496 then {
1486- let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1487- if ((hH == hH))
1497+ let hN = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1498+ if ((hN == hN))
14881499 then {
1489- let hI = eS(-(dz), -(dA), 0)
1490- let gi = hI._1
1491- let eJ = hI._2
1492- let gj = eW(eR, eJ)
1493- if ((gj == gj))
1494- then (dB ++ gi)
1500+ let hO = eX(-(dE), -(dF), 0)
1501+ let gn = hO._1
1502+ let eO = hO._2
1503+ let go = fb(eW, eO)
1504+ if ((go == go))
1505+ then (dG ++ gn)
14951506 else throw("Strict value is not equal to itself.")
14961507 }
14971508 else throw("Strict value is not equal to itself.")
15021513
15031514
15041515
1505-@Callable(cP)
1506-func unstakeAndGet (cw) = {
1507- let hJ = if ((size(cP.payments) != 0))
1516+@Callable(cU)
1517+func unstakeAndGet (cB) = {
1518+ let hP = if ((size(cU.payments) != 0))
15081519 then throw("No pmnts expd")
15091520 else true
1510- if ((hJ == hJ))
1521+ if ((hP == hP))
15111522 then {
1512- let hK = bs()
1513- let gX = bl
1514- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1515- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1516- if ((eR == eR))
1523+ let hQ = bx()
1524+ let hd = bq
1525+ let hR = valueOrErrorMessage(addressFromString(hQ[D]), "Wr st addr")
1526+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1527+ if ((eW == eW))
15171528 then {
1518- let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil)
1519- if ((hM == hM))
1529+ let hS = invoke(hR, "unstake", [toBase58String(hd), cB], nil)
1530+ if ((hS == hS))
15201531 then {
1521- let dX = dd(toBase58String(cP.transactionId), toBase58String(gX), cw, cP.caller)
1522- let dz = dX._1
1523- let dA = dX._2
1524- let dn = parseIntValue(dX._9)
1525- let dB = dX._10
1526- let hN = if (if (aV())
1532+ let ec = di(toBase58String(cU.transactionId), toBase58String(hd), cB, cU.caller)
1533+ let dE = ec._1
1534+ let dF = ec._2
1535+ let ds = parseIntValue(ec._9)
1536+ let dG = ec._10
1537+ let hT = if (if (ba())
15271538 then true
1528- else (dn == s))
1529- then throw(("Blocked: " + toString(dn)))
1539+ else (ds == t))
1540+ then throw(("Blocked: " + toString(ds)))
15301541 else true
1531- if ((hN == hN))
1542+ if ((hT == hT))
15321543 then {
1533- let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)])
1534- if ((hO == hO))
1544+ let hU = invoke(aV, "burn", [cB], [AttachedPayment(hd, cB)])
1545+ if ((hU == hU))
15351546 then {
1536- let hP = eS(-(dz), -(dA), 0)
1537- let gi = hP._1
1538- let eJ = hP._2
1539- let gj = eW(eR, eJ)
1540- if ((gj == gj))
1541- then (dB ++ gi)
1547+ let hV = eX(-(dE), -(dF), 0)
1548+ let gn = hV._1
1549+ let eO = hV._2
1550+ let go = fb(eW, eO)
1551+ if ((go == go))
1552+ then (dG ++ gn)
15421553 else throw("Strict value is not equal to itself.")
15431554 }
15441555 else throw("Strict value is not equal to itself.")
15541565
15551566
15561567
1557-@Callable(cP)
1558-func unstakeAndGetNoLess (hQ,hR,hG) = {
1559- let ht = if (aV())
1568+@Callable(cU)
1569+func unstakeAndGetNoLess (hW,hX,hM) = {
1570+ let hz = if (ba())
15601571 then true
1561- else (bk == s)
1562- let gH = [if (!(ht))
1572+ else (bp == t)
1573+ let gN = [if (!(hz))
15631574 then true
1564- else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1575+ else throw("get operation is blocked by admin"), if ((size(cU.payments) == 0))
15651576 then true
15661577 else throw("no payments are expected")]
1567- if ((gH == gH))
1578+ if ((gN == gN))
15681579 then {
1569- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1570- if ((eR == eR))
1580+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1581+ if ((eW == eW))
15711582 then {
1572- let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil)
1573- if ((hM == hM))
1583+ let hS = invoke(bz, "unstake", [toBase58String(bq), hW], nil)
1584+ if ((hS == hS))
15741585 then {
1575- let hS = dd(toBase58String(cP.transactionId), toBase58String(bl), hQ, cP.caller)
1576- let dz = hS._1
1577- let dA = hS._2
1578- let dB = hS._10
1579- let hT = [if ((dz >= hR))
1586+ let hY = di(toBase58String(cU.transactionId), toBase58String(bq), hW, cU.caller)
1587+ let dE = hY._1
1588+ let dF = hY._2
1589+ let dG = hY._10
1590+ let hZ = [if ((dE >= hX))
15801591 then true
1581- else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG))
1592+ else throw(makeString(["amount asset amount to receive is less than ", toString(hX)], "")), if ((dF >= hM))
15821593 then true
1583- else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1584- if ((hT == hT))
1594+ else throw(makeString(["price asset amount to receive is less than ", toString(hM)], ""))]
1595+ if ((hZ == hZ))
15851596 then {
1586- let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)])
1587- if ((hH == hH))
1597+ let hN = invoke(aV, "burn", [hW], [AttachedPayment(bq, hW)])
1598+ if ((hN == hN))
15881599 then {
1589- let hU = eS(-(dz), -(dA), 0)
1590- let gi = hU._1
1591- let eJ = hU._2
1592- let gj = eW(eR, eJ)
1593- if ((gj == gj))
1594- then (dB ++ gi)
1600+ let ia = eX(-(dE), -(dF), 0)
1601+ let gn = ia._1
1602+ let eO = ia._2
1603+ let go = fb(eW, eO)
1604+ if ((go == go))
1605+ then (dG ++ gn)
15951606 else throw("Strict value is not equal to itself.")
15961607 }
15971608 else throw("Strict value is not equal to itself.")
16071618
16081619
16091620
1610-@Callable(cP)
1611-func unstakeAndGetOneTknV2 (hQ,fL,fM) = {
1612- let hh = {
1613- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1614- if ($isInstanceOf(aS, "Boolean"))
1615- then aS
1616- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1621+@Callable(cU)
1622+func unstakeAndGetOneTknV2 (hW,fQ,fR) = {
1623+ let hn = {
1624+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1625+ if ($isInstanceOf(aX, "Boolean"))
1626+ then aX
1627+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
16171628 }
1618- let ht = if (if (aV())
1629+ let hz = if (if (ba())
16191630 then true
1620- else (bk == s))
1631+ else (bp == t))
16211632 then true
1622- else hh
1623- let gH = [if (if (!(ht))
1633+ else hn
1634+ let gN = [if (if (!(hz))
16241635 then true
1625- else go(cP))
1636+ else gt(cU))
16261637 then true
1627- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1638+ else aS("get operation is blocked by admin"), if ((size(cU.payments) == 0))
16281639 then true
1629- else aN("no payments are expected")]
1630- if ((gH == gH))
1640+ else aS("no payments are expected")]
1641+ if ((gN == gN))
16311642 then {
1632- let hK = bs()
1633- let gX = bl
1634- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1635- let dh = cP.caller
1636- let hV = this
1637- let hM = invoke(hL, "unstakeINTERNAL", [gX, hQ, dh.bytes, hV.bytes], nil)
1638- if ((hM == hM))
1643+ let hQ = bx()
1644+ let hd = bq
1645+ let hR = valueOrErrorMessage(addressFromString(hQ[D]), "Wr st addr")
1646+ let dm = cU.caller
1647+ let ib = this
1648+ let hS = invoke(hR, "unstakeINTERNAL", [hd, hW, dm.bytes, ib.bytes], nil)
1649+ if ((hS == hS))
16391650 then {
1640- let hW = fK(fL, fM, [AttachedPayment(gX, hQ)], cP.caller, cP.originCaller, cP.transactionId)
1641- let dB = hW._1
1642- let fV = hW._2
1643- $Tuple2(dB, fV)
1651+ let ic = fP(fQ, fR, [AttachedPayment(hd, hW)], cU.caller, cU.originCaller, cU.transactionId)
1652+ let dG = ic._1
1653+ let ga = ic._2
1654+ $Tuple2(dG, ga)
16441655 }
16451656 else throw("Strict value is not equal to itself.")
16461657 }
16491660
16501661
16511662
1652-@Callable(cP)
1653-func putOneTknV2WithBonusREADONLY (hX,hY) = {
1654- let hZ = fp(hX, hY, "", "", true)
1655- let fE = hZ._1
1656- let dB = hZ._2
1657- let cx = hZ._3
1658- let fJ = hZ._4
1659- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1663+@Callable(cU)
1664+func putOneTknV2WithBonusREADONLY (id,ie) = {
1665+ let if = fu(id, ie, "", "", true)
1666+ let fJ = if._1
1667+ let dG = if._2
1668+ let cC = if._3
1669+ let fO = if._4
1670+ $Tuple2(nil, $Tuple3(fJ, cC, fO))
16601671 }
16611672
16621673
16631674
1664-@Callable(cP)
1665-func putOneTknV2WithoutTakeFeeREADONLY (hX,hY) = {
1666- let ia = fp(hX, hY, "", "", false)
1667- let fE = ia._1
1668- let dB = ia._2
1669- let cx = ia._3
1670- let fJ = ia._4
1671- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1675+@Callable(cU)
1676+func putOneTknV2WithoutTakeFeeREADONLY (id,ie) = {
1677+ let ig = fu(id, ie, "", "", false)
1678+ let fJ = ig._1
1679+ let dG = ig._2
1680+ let cC = ig._3
1681+ let fO = ig._4
1682+ $Tuple2(nil, $Tuple3(fJ, cC, fO))
16721683 }
16731684
16741685
16751686
1676-@Callable(cP)
1677-func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ)))
1687+@Callable(cU)
1688+func activate (ih,ii) = if ((toString(cU.caller) != toString(aV)))
16781689 then throw("denied")
1679- else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
1690+ else $Tuple2([StringEntry(ak(), ih), StringEntry(al(), ii), StringEntry(am(), toString(l))], "success")
16801691
16811692
16821693
1683-@Callable(cP)
1684-func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1685- then gn
1686- else [StringEntry(id, hN)]
1694+@Callable(cU)
1695+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bd())
16871696
16881697
16891698
1690-@Callable(cP)
1691-func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1692- then gn
1693- else [IntegerEntry(id, hN)]
1699+@Callable(cU)
1700+func getAccBalanceWrapperREADONLY (bT) = $Tuple2(nil, bS(bT))
16941701
16951702
16961703
1697-@Callable(cP)
1698-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
1699-
1700-
1701-
1702-@Callable(cP)
1703-func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
1704-
1705-
1706-
1707-@Callable(cP)
1708-func calcPricesWrapperREADONLY (ch,ci,cm) = {
1709- let ie = cl(ch, ci, cm)
1710- $Tuple2(nil, [toString(ie[0]), toString(ie[1]), toString(ie[2])])
1704+@Callable(cU)
1705+func calcPricesWrapperREADONLY (cm,cn,cr) = {
1706+ let ij = cq(cm, cn, cr)
1707+ $Tuple2(nil, [toString(ij[0]), toString(ij[1]), toString(ij[2])])
17111708 }
17121709
17131710
17141711
1715-@Callable(cP)
1716-func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if))
1712+@Callable(cU)
1713+func fromX18WrapperREADONLY (N,ik) = $Tuple2(nil, M(parseBigIntValue(N), ik))
17171714
17181715
17191716
1720-@Callable(cP)
1721-func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
1717+@Callable(cU)
1718+func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K)))
17221719
17231720
17241721
1725-@Callable(cP)
1726-func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
1722+@Callable(cU)
1723+func calcPriceBigIntWrapperREADONLY (bV,bW) = $Tuple2(nil, toString(bU(parseBigIntValue(bV), parseBigIntValue(bW))))
17271724
17281725
17291726
1730-@Callable(cP)
1731-func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,ig,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, ig, dH, dI, true, false, 0, ""))
1727+@Callable(cU)
1728+func estimatePutOperationWrapperREADONLY (dj,cb,dI,dJ,dK,dL,il,dM,dN) = $Tuple2(nil, dH(dj, cb, dI, dJ, dK, dL, il, dM, dN, true, false, 0, ""))
17321729
17331730
17341731
1735-@Callable(cP)
1736-func estimateGetOperationWrapperREADONLY (de,ih,dg,ig) = {
1737- let dX = dd(de, ih, dg, addressFromStringValue(ig))
1738- $Tuple2(nil, $Tuple10(dX._1, dX._2, dX._3, dX._4, dX._5, dX._6, dX._7, toString(dX._8), dX._9, dX._10))
1732+@Callable(cU)
1733+func estimateGetOperationWrapperREADONLY (dj,im,dl,il) = {
1734+ let ec = di(dj, im, dl, addressFromStringValue(il))
1735+ $Tuple2(nil, $Tuple10(ec._1, ec._2, ec._3, ec._4, ec._5, ec._6, ec._7, toString(ec._8), ec._9, ec._10))
17391736 }
17401737
17411738
1742-@Verifier(ii)
1743-func ij () = {
1744- let ik = {
1745- let gl = gk()
1746- if ($isInstanceOf(gl, "ByteVector"))
1739+
1740+@Callable(cU)
1741+func changeAmp () = {
1742+ let in = invoke(aV, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1743+ let io = {
1744+ let gq = in
1745+ if ($isInstanceOf(gq, "List[Any]"))
17471746 then {
1748- let gp = gl
1749- gp
1747+ let ip = gq
1748+ $Tuple3({
1749+ let aX = ip[0]
1750+ if ($isInstanceOf(aX, "Int"))
1751+ then aX
1752+ else throw(($getType(aX) + " couldn't be cast to Int"))
1753+ }, {
1754+ let aX = ip[1]
1755+ if ($isInstanceOf(aX, "Int"))
1756+ then aX
1757+ else throw(($getType(aX) + " couldn't be cast to Int"))
1758+ }, {
1759+ let aX = ip[2]
1760+ if ($isInstanceOf(aX, "Int"))
1761+ then aX
1762+ else throw(($getType(aX) + " couldn't be cast to Int"))
1763+ })
17501764 }
1751- else if ($isInstanceOf(gl, "Unit"))
1752- then ii.senderPublicKey
1765+ else aS("invalid entry type")
1766+ }
1767+ let iq = io._1
1768+ let ir = io._2
1769+ let is = io._3
1770+ let it = parseIntValue(getStringValue(am()))
1771+ let iu = (it + ir)
1772+ let iv = if ((0 > ir))
1773+ then if ((is > iu))
1774+ then is
1775+ else iu
1776+ else if ((iu > is))
1777+ then is
1778+ else iu
1779+ let iw = valueOrElse(getInteger(ap()), 0)
1780+ let ix = (iw + iq)
1781+ let gN = [if ((height > ix))
1782+ then true
1783+ else aS("try again in few blocks"), if ((it != iv))
1784+ then true
1785+ else aS("already reached target")]
1786+ if ((gN == gN))
1787+ then [IntegerEntry(ap(), height), StringEntry(am(), toString(iv)), StringEntry(an(height), toString(iv))]
1788+ else throw("Strict value is not equal to itself.")
1789+ }
1790+
1791+
1792+@Verifier(iy)
1793+func iz () = {
1794+ let iA = {
1795+ let gq = gp()
1796+ if ($isInstanceOf(gq, "ByteVector"))
1797+ then {
1798+ let gu = gq
1799+ gu
1800+ }
1801+ else if ($isInstanceOf(gq, "Unit"))
1802+ then iy.senderPublicKey
17531803 else throw("Match error")
17541804 }
1755- let gl = ii
1756- if ($isInstanceOf(gl, "Order"))
1805+ let gq = iy
1806+ if ($isInstanceOf(gq, "Order"))
17571807 then {
1758- let eZ = gl
1759- let il = aW()
1760- let im = eY(eZ)
1761- let aF = im._1
1762- let aG = im._2
1763- let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey)
1764- let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], il)
1765- if (if (if (aF)
1766- then aH
1808+ let fe = gq
1809+ let iB = bb()
1810+ let iC = if (gB())
1811+ then $Tuple2(true, "")
1812+ else fd(fe)
1813+ let aK = iC._1
1814+ let aL = iC._2
1815+ let aM = sigVerify(fe.bodyBytes, fe.proofs[0], fe.senderPublicKey)
1816+ let aN = sigVerify(fe.bodyBytes, fe.proofs[1], iB)
1817+ if (if (if (aK)
1818+ then aM
17671819 else false)
1768- then aI
1820+ then aN
17691821 else false)
17701822 then true
1771- else aE(aF, aG, aH, aI)
1823+ else aJ(aK, aL, aM, aN)
17721824 }
1773- else if ($isInstanceOf(gl, "SetScriptTransaction"))
1825+ else if ($isInstanceOf(gq, "SetScriptTransaction"))
17741826 then {
1775- let cC = gl
1776- if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
1827+ let cH = gq
1828+ if (sigVerify(iy.bodyBytes, iy.proofs[0], iA))
17771829 then true
17781830 else {
1779- let in = blake2b256(value(cC.script))
1780- let io = fromBase64String(value(getString(aQ, aC())))
1781- let ip = scriptHash(this)
1782- if ((io == in))
1783- then (ip != in)
1831+ let iD = blake2b256(value(cH.script))
1832+ let iE = fromBase64String(value(getString(aV, aF())))
1833+ let iF = scriptHash(this)
1834+ if ((iE == iD))
1835+ then (iF != iD)
17841836 else false
17851837 }
17861838 }
1787- else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
1839+ else sigVerify(iy.bodyBytes, iy.proofs[0], iA)
17881840 }
17891841
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
1818 let h = toBigInt(3)
1919
2020 let i = toBigInt(4)
2121
2222 let j = toBigInt((a - ((a * 1) / a)))
2323
2424 let k = "WAVES"
2525
26-let l = "100"
26+let l = 50
2727
28-let m = "1"
28+let m = "100"
2929
30-let n = "__"
30+let n = "1"
3131
32-let o = ""
32+let o = "__"
3333
34-let p = 1
34+let p = ""
3535
36-let q = 2
36+let q = 1
3737
38-let r = 3
38+let r = 2
3939
40-let s = 4
40+let s = 3
4141
42-let t = 1
42+let t = 4
4343
44-let u = 2
44+let u = 1
4545
46-let v = 3
46+let v = 2
4747
48-let w = 4
48+let w = 3
4949
50-let x = 5
50+let x = 4
5151
52-let y = 6
52+let y = 5
5353
54-let z = 7
54+let z = 6
5555
56-let A = 8
56+let A = 7
5757
58-let B = 9
58+let B = 8
5959
60-let C = 1
60+let C = 9
6161
62-let D = 6
62+let D = 1
6363
64-let E = 7
64+let E = 6
6565
66-let F = 10
66+let F = 7
6767
68-let G = fraction(10, a, 10000)
68+let G = 10
6969
70-func H (I,J) = fraction(toBigInt(I), c, toBigInt(J))
70+let H = fraction(10, a, 10000)
71+
72+func I (J,K) = fraction(toBigInt(J), c, toBigInt(K))
7173
7274
73-func K (I,J) = fraction(I, c, J)
75+func L (J,K) = fraction(J, c, K)
7476
7577
76-func L (M,N) = toInt(fraction(M, toBigInt(N), c))
78+func M (N,O) = toInt(fraction(N, toBigInt(O), c))
7779
7880
79-func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P))
81+func P (N,O,Q) = toInt(fraction(N, toBigInt(O), c, Q))
8082
8183
82-func Q (I,J) = fraction(I, c, toBigInt(J))
84+func R (J,K) = fraction(J, c, toBigInt(K))
8385
8486
85-func R (M,N) = fraction(M, toBigInt(N), c)
87+func S (N,O) = fraction(N, toBigInt(O), c)
8688
8789
88-func S (T,U,V) = fraction(T, U, V)
90+func T (U,V,W) = fraction(U, V, W)
8991
9092
91-func W (M) = if ((d > M))
92- then -(M)
93- else M
93+func X (N) = if ((d > N))
94+ then -(N)
95+ else N
9496
9597
96-func X (M) = if ((d > M))
97- then -(M)
98- else M
98+func Y (N) = if ((d > N))
99+ then -(N)
100+ else N
99101
100102
101-func Y () = "%s__factoryContract"
103+func Z () = "%s__factoryContract"
102104
103105
104-func Z () = "%s__managerPublicKey"
106+func aa () = "%s__managerPublicKey"
105107
106108
107-func aa () = "%s__pendingManagerPublicKey"
109+func ab () = "%s__pendingManagerPublicKey"
108110
109111
110-func ab () = "%s%s__price__last"
112+func ac () = "%s%s__price__last"
111113
112114
113-func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n)
115+func ad (ae,af) = makeString(["%s%s%d%d__price__history", toString(ae), toString(af)], o)
114116
115117
116-func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah)
118+func ag (ah,ai) = ((("%s%s%s__P__" + ah) + "__") + ai)
117119
118120
119-func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah)
121+func aj (ah,ai) = ((("%s%s%s__G__" + ah) + "__") + ai)
120122
121123
122-func aj () = "%s__amountAsset"
124+func ak () = "%s__amountAsset"
123125
124126
125-func ak () = "%s__priceAsset"
127+func al () = "%s__priceAsset"
126128
127129
128-func al () = "%s__amp"
130+func am () = "%s__amp"
129131
130132
131-func am () = "%s__addonAddr"
133+func an (ao) = ("%s%d__amp__" + toString(ao))
132134
133135
134-let an = "%s__fee"
135-
136-let ao = valueOrElse(getInteger(this, an), G)
137-
138-let ap = makeString(["%s", "dLp"], n)
139-
140-let aq = makeString(["%s", "dLpRefreshedHeight"], n)
141-
142-let ar = makeString(["%s", "refreshDLpDelay"], n)
143-
144-let as = 30
145-
146-let at = valueOrElse(getInteger(this, ar), as)
147-
148-func au () = "%s__factoryConfig"
136+func ap () = "%s__changeAmpLastCall"
149137
150138
151-func av () = "%s%s__matcher__publicKey"
139+let aq = "%s__fee"
140+
141+let ar = valueOrElse(getInteger(this, aq), H)
142+
143+let as = makeString(["%s", "dLp"], o)
144+
145+let at = makeString(["%s", "dLpRefreshedHeight"], o)
146+
147+let au = makeString(["%s", "refreshDLpDelay"], o)
148+
149+let av = 30
150+
151+let aw = valueOrElse(getInteger(this, au), av)
152+
153+func ax () = "%s__factoryConfig"
152154
153155
154-func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
156+func ay () = "%s%s__matcher__publicKey"
155157
156158
157-func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
159+func az (aA,aB) = (((("%d%d%s__" + aA) + "__") + aB) + "__config")
158160
159161
160-func aB () = "%s__shutdown"
162+func aC (aD) = ("%s%s%s__mappings__baseAsset2internalId__" + aD)
161163
162164
163-func aC () = "%s__allowedLpStableScriptHash"
165+func aE () = "%s__shutdown"
164166
165167
166-func aD () = "%s__feeCollectorAddress"
168+func aF () = "%s__allowedLpStableScriptHash"
167169
168170
169-func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI)))
171+func aG () = "%s__feeCollectorAddress"
170172
171173
172-func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
174+func aH (aI) = ("%s%s__skipOrderValidation__" + aI)
173175
174176
175-func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
177+func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN)))
176178
177179
178-func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
180+func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
179181
180182
181-func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
183+func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " not defined"], ""))
182184
183185
184-let aQ = addressFromStringValue(aJ(this, Y()))
186+func aS (aT) = throw(makeString(["lp_stable.ride:", aT], " "))
185187
186-let aR = {
187- let aS = invoke(aQ, "getInFeeREADONLY", [toString(this)], nil)
188- if ($isInstanceOf(aS, "Int"))
189- then aS
190- else throw(($getType(aS) + " couldn't be cast to Int"))
188+
189+func aU (aT) = makeString(["lp_stable.ride:", aT], " ")
190+
191+
192+let aV = addressFromStringValue(aO(this, Z()))
193+
194+let aW = {
195+ let aX = invoke(aV, "getInFeeREADONLY", [toString(this)], nil)
196+ if ($isInstanceOf(aX, "Int"))
197+ then aX
198+ else throw(($getType(aX) + " couldn't be cast to Int"))
191199 }
192200
193-let aT = {
194- let aS = invoke(aQ, "getOutFeeREADONLY", [toString(this)], nil)
195- if ($isInstanceOf(aS, "Int"))
196- then aS
197- else throw(($getType(aS) + " couldn't be cast to Int"))
201+let aY = {
202+ let aX = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil)
203+ if ($isInstanceOf(aX, "Int"))
204+ then aX
205+ else throw(($getType(aX) + " couldn't be cast to Int"))
198206 }
199207
200-let aU = aJ(this, al())
208+let aZ = aO(this, am())
201209
202-func aV () = valueOrElse(getBoolean(aQ, aB()), false)
210+func ba () = valueOrElse(getBoolean(aV, aE()), false)
203211
204212
205-func aW () = fromBase58String(aJ(aQ, av()))
213+func bb () = fromBase58String(aO(aV, ay()))
206214
207215
208-let aX = addressFromStringValue(aJ(aQ, aD()))
216+let bc = addressFromStringValue(aO(aV, aG()))
209217
210-func aY () = {
211- let aZ = aJ(this, aj())
212- let ba = aJ(this, ak())
213- let bb = aM(aQ, az(ba))
214- let ax = aM(aQ, az(aZ))
215- split(aJ(aQ, aw(toString(ax), toString(bb))), n)
218+func bd () = {
219+ let be = aO(this, ak())
220+ let bf = aO(this, al())
221+ let bg = aR(aV, aC(bf))
222+ let aA = aR(aV, aC(be))
223+ split(aO(aV, az(toString(aA), toString(bg))), o)
216224 }
217225
218226
219-func bc (bd) = if ((bd == k))
227+func bh (bi) = if ((bi == k))
220228 then unit
221- else fromBase58String(bd)
229+ else fromBase58String(bi)
222230
223231
224-func be (bd) = if ((bd == unit))
232+func bj (bi) = if ((bi == unit))
225233 then k
226- else toBase58String(value(bd))
234+ else toBase58String(value(bi))
227235
228236
229-func bf (bg) = $Tuple9(addressFromStringValue(bg[t]), parseIntValue(bg[u]), fromBase58String(bg[v]), bc(bg[w]), bc(bg[x]), parseIntValue(bg[y]), parseIntValue(bg[z]), fromBase58String(bg[A]), fromBase58String(bg[B]))
237+func bk (bl) = $Tuple9(addressFromStringValue(bl[u]), parseIntValue(bl[v]), fromBase58String(bl[w]), bh(bl[x]), bh(bl[y]), parseIntValue(bl[z]), parseIntValue(bl[A]), fromBase58String(bl[B]), fromBase58String(bl[C]))
230238
231239
232-let bh = bf(aY())
240+let bm = bk(bd())
233241
234-let bi = bh
242+let bn = bm
235243
236-let bj = bi._1
244+let bo = bn._1
237245
238-let bk = bi._2
246+let bp = bn._2
239247
240-let bl = bi._3
248+let bq = bn._3
241249
242-let bm = bi._4
250+let br = bn._4
243251
244-let bn = bi._5
252+let bs = bn._5
245253
246-let bo = bi._6
254+let bt = bn._6
247255
248-let bp = bi._7
256+let bu = bn._7
249257
250-let bq = bi._8
258+let bv = bn._8
251259
252-let br = bi._9
260+let bw = bn._9
253261
254-func bs () = split(aJ(aQ, au()), n)
262+func bx () = split(aO(aV, ax()), o)
255263
256264
257-let bt = bs()
265+let by = bx()
258266
259-let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
267+let bz = valueOrErrorMessage(addressFromString(by[D]), "Invalid staking contract address")
260268
261-let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
269+let bA = valueOrErrorMessage(addressFromString(by[F]), "Invalid slipage contract address")
262270
263-let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
271+let bB = valueOrErrorMessage(addressFromString(by[G]), "Invalid gwx contract address")
264272
265-let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
273+let bC = valueOrErrorMessage(addressFromString(by[E]), "Invalid gwx contract address")
266274
267-func by (bz,bA,bB,bC,bD,bE,bF,bG,bH,bI) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI)], n)
275+func bD (bE,bF,bG,bH,bI,bJ,bK,bL,bM,bN) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ), toString(bK), toString(bL), toString(bM), toString(bN)], o)
268276
269277
270-func bJ (bK,bL,bM,bC,bF,bG) = makeString(["%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bC), toString(bF), toString(bG)], n)
278+func bO (bP,bQ,bR,bH,bK,bL) = makeString(["%d%d%d%d%d%d", toString(bP), toString(bQ), toString(bR), toString(bH), toString(bK), toString(bL)], o)
271279
272280
273-func bN (bO) = if ((bO == "WAVES"))
281+func bS (bT) = if ((bT == "WAVES"))
274282 then wavesBalance(this).available
275- else assetBalance(this, fromBase58String(bO))
283+ else assetBalance(this, fromBase58String(bT))
276284
277285
278-func bP (bQ,bR) = fraction(bQ, c, bR)
286+func bU (bV,bW) = fraction(bV, c, bW)
279287
280288
281-func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
289+func bX (bV,bW,Q) = fraction(bV, c, bW, Q)
282290
283291
284-func bT (bU,bV,bW) = {
285- let bX = fraction((bU - bV), b, bV)
286- let bY = ((bW - W(bX)) > d)
287- if (!(bY))
288- then throw(("Big slpg: " + toString(bX)))
289- else $Tuple2(bY, min([bU, bV]))
292+func bY (bZ,ca,cb) = {
293+ let cc = fraction((bZ - ca), b, ca)
294+ let cd = ((cb - X(cc)) > d)
295+ if (!(cd))
296+ then throw(("Big slpg: " + toString(cc)))
297+ else $Tuple2(cd, min([bZ, ca]))
290298 }
291299
292300
293-func bZ (ca,cb,cc) = {
294- let bX = fraction(cb, b, ca)
295- let cd = (cc > bX)
296- if (if (cd)
301+func ce (cf,cg,ch) = {
302+ let cc = fraction(cg, b, cf)
303+ let ci = (ch > cc)
304+ if (if (ci)
297305 then true
298- else (cb > ca))
299- then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300- else cd
306+ else (cg > cf))
307+ then throw(((((((toString(cg) + " ") + toString(cf)) + " ") + toString(cc)) + " ") + toString(ch)))
308+ else ci
301309 }
302310
303311
304-func ce (cf,cg,ch,ci) = {
305- let cj = H(ch, cf)
306- let ck = H(ci, cg)
307- bP(ck, cj)
312+func cj (ck,cl,cm,cn) = {
313+ let co = I(cm, ck)
314+ let cp = I(cn, cl)
315+ bU(cp, co)
308316 }
309317
310318
311-func cl (ch,ci,cm) = {
312- let cn = bo
313- let co = bp
314- let cp = ce(cn, co, ch, ci)
315- let bR = H(ch, cn)
316- let bQ = H(ci, co)
317- let cq = H(cm, a)
318- let cr = bP(bR, cq)
319- let cs = bP(bQ, cq)
320-[cp, cr, cs]
319+func cq (cm,cn,cr) = {
320+ let cs = bt
321+ let ct = bu
322+ let cu = cj(cs, ct, cm, cn)
323+ let bW = I(cm, cs)
324+ let bV = I(cn, ct)
325+ let cv = I(cr, a)
326+ let cw = bU(bW, cv)
327+ let cx = bU(bV, cv)
328+[cu, cw, cx]
321329 }
322330
323331
324-func ct (ch,ci,cm) = {
325- let cu = cl(ch, ci, cm)
326-[L(cu[0], a), L(cu[1], a), L(cu[2], a)]
332+func cy (cm,cn,cr) = {
333+ let cz = cq(cm, cn, cr)
334+[M(cz[0], a), M(cz[1], a), M(cz[2], a)]
327335 }
328336
329337
330-func cv (cw,ao) = {
331- let cx = if ((ao == 0))
338+func cA (cB,ar) = {
339+ let cC = if ((ar == 0))
332340 then 0
333- else fraction(cw, ao, a)
334- $Tuple2((cw - cx), cx)
341+ else fraction(cB, ar, a)
342+ $Tuple2((cB - cC), cC)
335343 }
336344
337345
338-func cy (cz) = {
339- let cA = cz[0]
340- let cB = cz[1]
341- let cC = (cA + cB)
342- if ((cC == e))
346+func cD (cE) = {
347+ let cF = cE[0]
348+ let cG = cE[1]
349+ let cH = (cF + cG)
350+ if ((cH == e))
343351 then e
344352 else {
345- let cD = parseIntValue(aU)
346- let cE = (cD * 2)
347- let cu = fraction(cA, cB, f)
348- let cF = fraction(cu, i, f)
349- let cG = fraction(toBigInt(cE), cC, f)
350- let cH = toBigInt((cE - 1))
351- func cI (cJ) = {
352- let cK = fraction(cJ, cJ, f)
353- let cL = fraction(cK, cJ, f)
354- let cM = fraction(cL, f, cF)
355- fraction((cG + fraction(cM, g, f)), cJ, (fraction(cH, cJ, f) + fraction(h, cM, f)))
353+ let cI = parseIntValue(aZ)
354+ let cJ = (cI * 2)
355+ let cz = fraction(cF, cG, f)
356+ let cK = fraction(cz, i, f)
357+ let cL = fraction(toBigInt(cJ), cH, f)
358+ let cM = toBigInt((cJ - 1))
359+ func cN (cO) = {
360+ let cP = fraction(cO, cO, f)
361+ let cQ = fraction(cP, cO, f)
362+ let cR = fraction(cQ, f, cK)
363+ fraction((cL + fraction(cR, g, f)), cO, (fraction(cM, cO, f) + fraction(h, cR, f)))
356364 }
357365
358- func cN (cO,cP) = if (cO._2)
359- then cO
366+ func cS (cT,cU) = if (cT._2)
367+ then cT
360368 else {
361- let cJ = cO._1
362- let cQ = cI(cJ)
363- let cR = (cQ - value(cJ))
364- let cS = if ((e > cR))
365- then -(cR)
366- else cR
367- if ((f >= cS))
368- then $Tuple2(cQ, true)
369- else $Tuple2(cQ, false)
369+ let cO = cT._1
370+ let cV = cN(cO)
371+ let cW = (cV - value(cO))
372+ let cX = if ((e > cW))
373+ then -(cW)
374+ else cW
375+ if ((f >= cX))
376+ then $Tuple2(cV, true)
377+ else $Tuple2(cV, false)
370378 }
371379
372- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
373- let cU = {
374- let cV = cT
375- let cW = size(cV)
376- let cX = $Tuple2(cC, false)
377- func cY (cZ,da) = if ((da >= cW))
378- then cZ
379- else cN(cZ, cV[da])
380+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
381+ let cZ = {
382+ let da = cY
383+ let db = size(da)
384+ let dc = $Tuple2(cH, false)
385+ func dd (de,df) = if ((df >= db))
386+ then de
387+ else cS(de, da[df])
380388
381- func db (cZ,da) = if ((da >= cW))
382- then cZ
383- else throw("List size exceeds 18")
389+ func dg (de,df) = if ((df >= db))
390+ then de
391+ else throw("List size exceeds 17")
384392
385- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18)
393+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17)
386394 }
387- let cJ = cU._1
388- let dc = cU._2
389- if (dc)
390- then cJ
391- else throw(("D calculation error, D = " + toString(cJ)))
395+ let cO = cZ._1
396+ let dh = cZ._2
397+ if (dh)
398+ then cO
399+ else throw(("D calculation error, D = " + toString(cO)))
392400 }
393401 }
394402
395403
396-func dd (de,df,dg,dh) = {
397- let di = bl
398- let dj = toBase58String(value(bm))
399- let dk = toBase58String(value(bn))
400- let dl = bo
401- let dm = bp
402- let dn = toString(bk)
403- let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity
404- if ((toBase58String(di) != df))
404+func di (dj,dk,dl,dm) = {
405+ let dn = bq
406+ let do = toBase58String(value(br))
407+ let dp = toBase58String(value(bs))
408+ let dq = bt
409+ let dr = bu
410+ let ds = toString(bp)
411+ let dt = valueOrErrorMessage(assetInfo(dn), "Wrong LP id").quantity
412+ if ((toBase58String(dn) != dk))
405413 then throw("Wrong pmt asset")
406414 else {
407- let dp = bN(dj)
408- let dq = H(dp, dl)
409- let dr = bN(dk)
410- let ds = H(dr, dm)
411- let dt = bP(ds, dq)
412- let du = L(dt, a)
413- let dv = H(dg, a)
414- let dw = H(do, a)
415- let dx = fraction(dq, dv, dw)
416- let dy = fraction(ds, dv, dw)
417- let dz = O(dx, dl, FLOOR)
418- let dA = O(dy, dm, FLOOR)
419- let dB = if ((de == ""))
415+ let du = bS(do)
416+ let dv = I(du, dq)
417+ let dw = bS(dp)
418+ let dx = I(dw, dr)
419+ let dy = bU(dx, dv)
420+ let dz = M(dy, a)
421+ let dA = I(dl, a)
422+ let dB = I(dt, a)
423+ let dC = fraction(dv, dA, dB)
424+ let dD = fraction(dx, dA, dB)
425+ let dE = P(dC, dq, FLOOR)
426+ let dF = P(dD, dr, FLOOR)
427+ let dG = if ((dj == ""))
420428 then nil
421- else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
429+ else [ScriptTransfer(dm, dE, if ((do == "WAVES"))
422430 then unit
423- else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
431+ else fromBase58String(do)), ScriptTransfer(dm, dF, if ((dp == "WAVES"))
424432 then unit
425- else fromBase58String(dk)), StringEntry(ai(toString(dh), de), bJ(dz, dA, dg, du, height, lastBlock.timestamp)), IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du)]
426- $Tuple10(dz, dA, dj, dk, dp, dr, do, dt, dn, dB)
433+ else fromBase58String(dp)), StringEntry(aj(toString(dm), dj), bO(dE, dF, dl, dz, height, lastBlock.timestamp)), IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz)]
434+ $Tuple10(dE, dF, do, dp, du, dw, dt, dy, ds, dG)
427435 }
428436 }
429437
430438
431-func dC (de,bW,dD,dE,dF,dG,dh,dH,dI,dJ,dK,dL,dM) = {
432- let di = bl
433- let dN = toBase58String(value(bm))
434- let dO = toBase58String(value(bn))
435- let dP = bq
436- let dQ = br
437- let dR = bo
438- let dS = bp
439- let dn = toString(bk)
440- let dT = valueOrErrorMessage(assetInfo(di), "Wr lp as").quantity
441- let dp = if (dH)
442- then bN(dN)
443- else if (if (dJ)
444- then (dM == dN)
439+func dH (dj,cb,dI,dJ,dK,dL,dm,dM,dN,dO,dP,dQ,dR) = {
440+ let dn = bq
441+ let dS = toBase58String(value(br))
442+ let dT = toBase58String(value(bs))
443+ let dU = bv
444+ let dV = bw
445+ let dW = bt
446+ let dX = bu
447+ let ds = toString(bp)
448+ let dY = valueOrErrorMessage(assetInfo(dn), "Wr lp as").quantity
449+ let du = if (dM)
450+ then bS(dS)
451+ else if (if (dO)
452+ then (dR == dS)
445453 else false)
446- then (bN(dN) - dL)
447- else if (dJ)
448- then bN(dN)
449- else (bN(dN) - dD)
450- let dr = if (dH)
451- then bN(dO)
452- else if (if (dJ)
453- then (dM == dO)
454+ then (bS(dS) - dQ)
455+ else if (dO)
456+ then bS(dS)
457+ else (bS(dS) - dI)
458+ let dw = if (dM)
459+ then bS(dT)
460+ else if (if (dO)
461+ then (dR == dT)
454462 else false)
455- then (bN(dO) - dL)
456- else if (dJ)
457- then bN(dO)
458- else (bN(dO) - dF)
459- let dU = H(dD, dR)
460- let dV = H(dF, dS)
461- let dW = bP(dV, dU)
462- let dq = H(dp, dR)
463- let ds = H(dr, dS)
464- let cb = cy([dq, ds])
465- let dX = if ((dT == 0))
463+ then (bS(dT) - dQ)
464+ else if (dO)
465+ then bS(dT)
466+ else (bS(dT) - dK)
467+ let dZ = I(dI, dW)
468+ let ea = I(dK, dX)
469+ let eb = bU(ea, dZ)
470+ let dv = I(du, dW)
471+ let dx = I(dw, dX)
472+ let cg = cD([dv, dx])
473+ let ec = if ((dY == 0))
466474 then {
467- let ca = cy([(dq + dU), (ds + dV)])
468- let dY = if ((ca > cb))
475+ let cf = cD([(dv + dZ), (dx + ea)])
476+ let ed = if ((cf > cg))
469477 then true
470478 else throw("D1 should be greater than D0")
471- if ((dY == dY))
479+ if ((ed == ed))
472480 then {
473- let dt = d
474- let dZ = d
475- let cq = ca
476- $Tuple5(L(cq, a), L(dU, dR), L(dV, dS), bP((ds + dV), (dq + dU)), dZ)
481+ let dy = d
482+ let ee = d
483+ let cv = cf
484+ $Tuple5(M(cv, a), M(dZ, dW), M(ea, dX), bU((dx + ea), (dv + dZ)), ee)
477485 }
478486 else throw("Strict value is not equal to itself.")
479487 }
480488 else {
481- let dt = bP(ds, dq)
482- let ea = fraction(W((dt - dW)), c, dt)
483- let dZ = H(bW, a)
484- if (if (if (dK)
485- then (dt != d)
489+ let dy = bU(dx, dv)
490+ let ef = fraction(X((dy - eb)), c, dy)
491+ let ee = I(cb, a)
492+ if (if (if (dP)
493+ then (dy != d)
486494 else false)
487- then (ea > dZ)
495+ then (ef > ee)
488496 else false)
489- then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
497+ then throw(((("Price slippage " + toString(ef)) + " > ") + toString(ee)))
490498 else {
491- let eb = H(dT, a)
492- let ec = fraction(dU, bS(ds, dq, CEILING), c, CEILING)
493- let ed = fraction(dV, c, bS(ds, dq, FLOOR), CEILING)
494- let ee = if ((ec > dV))
495- then $Tuple2(ed, dV)
496- else $Tuple2(dU, ec)
497- let ef = ee._1
498- let eg = ee._2
499- let ca = cy([(dq + ef), (ds + eg)])
500- let dY = if ((ca > cb))
499+ let eg = I(dY, a)
500+ let eh = fraction(dZ, bX(dx, dv, CEILING), c, CEILING)
501+ let ei = fraction(ea, c, bX(dx, dv, FLOOR), CEILING)
502+ let ej = if ((eh > ea))
503+ then $Tuple2(ei, ea)
504+ else $Tuple2(dZ, eh)
505+ let ek = ej._1
506+ let el = ej._2
507+ let cf = cD([(dv + ek), (dx + el)])
508+ let ed = if ((cf > cg))
501509 then true
502510 else throw("D1 should be greater than D0")
503- if ((dY == dY))
511+ if ((ed == ed))
504512 then {
505- let cq = fraction(eb, (ca - cb), cb)
506- $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ)
513+ let cv = fraction(eg, (cf - cg), cg)
514+ $Tuple5(P(cv, a, FLOOR), P(ek, dW, CEILING), P(el, dX, CEILING), dy, ee)
507515 }
508516 else throw("Strict value is not equal to itself.")
509517 }
510518 }
511- let eh = dX._1
512- let ei = dX._2
513- let ej = dX._3
514- let du = L(dX._4, a)
515- let ek = L(dX._5, a)
516- if ((0 >= eh))
519+ let em = ec._1
520+ let en = ec._2
521+ let eo = ec._3
522+ let dz = M(ec._4, a)
523+ let ep = M(ec._5, a)
524+ if ((0 >= em))
517525 then throw("LP <= 0")
518526 else {
519- let el = if (!(dI))
527+ let eq = if (!(dN))
520528 then 0
521- else eh
522- let em = (dD - ei)
523- let en = (dF - ej)
524- let eo = if (if (dJ)
525- then (dM == dN)
529+ else em
530+ let er = (dI - en)
531+ let es = (dK - eo)
532+ let et = if (if (dO)
533+ then (dR == dS)
526534 else false)
527- then $Tuple2(dL, 0)
528- else if (if (dJ)
529- then (dM == dO)
535+ then $Tuple2(dQ, 0)
536+ else if (if (dO)
537+ then (dR == dT)
530538 else false)
531- then $Tuple2(0, dL)
532- else $Tuple2(ei, ej)
533- let ep = eo._1
534- let eq = eo._2
535- let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, de), by(ep, eq, el, du, bW, ek, height, lastBlock.timestamp, em, en))]
536- $Tuple13(eh, el, du, dp, dr, dT, di, dn, er, em, en, dE, dG)
539+ then $Tuple2(0, dQ)
540+ else $Tuple2(en, eo)
541+ let eu = et._1
542+ let ev = et._2
543+ let ew = [IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz), StringEntry(ag(dm, dj), bD(eu, ev, eq, dz, cb, ep, height, lastBlock.timestamp, er, es))]
544+ $Tuple13(em, eq, dz, du, dw, dY, dn, ds, ew, er, es, dJ, dL)
537545 }
538546 }
539547
540548
541-func es (cz,cP,et) = {
542- let eu = g
543- let ev = cz[if ((cP == 0))
549+func ex (cE,cU,ey) = {
550+ let ez = g
551+ let eA = cE[if ((cU == 0))
544552 then 1
545553 else 0]
546- let ew = parseBigIntValue(l)
547- let cD = (parseBigIntValue(aU) * ew)
548- let cC = ev
549- let cE = (cD * eu)
550- let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
551- let ey = ((cC + ((et * ew) / cE)) - et)
552- func cN (cO,ez) = {
553- let eA = cO
554- let eB = eA._1
555- let dc = eA._2
556- if ((dc != unit))
557- then cO
554+ let eB = parseBigIntValue(m)
555+ let cI = (parseBigIntValue(aZ) * eB)
556+ let cH = eA
557+ let cJ = (cI * ez)
558+ let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
559+ let eD = ((cH + ((ey * eB) / cJ)) - ey)
560+ func cS (cT,eE) = {
561+ let eF = cT
562+ let eG = eF._1
563+ let dh = eF._2
564+ if ((dh != unit))
565+ then cT
558566 else {
559- let eC = (((eB * eB) + ex) / ((g * eB) + ey))
560- let eD = X((eC - value(eB)))
561- if ((f >= eD))
562- then $Tuple2(eC, ez)
563- else $Tuple2(eC, unit)
567+ let eH = (((eG * eG) + eC) / ((g * eG) + eD))
568+ let eI = Y((eH - value(eG)))
569+ if ((f >= eI))
570+ then $Tuple2(eH, eE)
571+ else $Tuple2(eH, unit)
564572 }
565573 }
566574
567- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
568- let eE = {
569- let cV = cT
570- let cW = size(cV)
571- let cX = $Tuple2(et, unit)
572- func cY (cZ,da) = if ((da >= cW))
573- then cZ
574- else cN(cZ, cV[da])
575+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
576+ let eJ = {
577+ let da = cY
578+ let db = size(da)
579+ let dc = $Tuple2(ey, unit)
580+ func dd (de,df) = if ((df >= db))
581+ then de
582+ else cS(de, da[df])
575583
576- func db (cZ,da) = if ((da >= cW))
577- then cZ
584+ func dg (de,df) = if ((df >= db))
585+ then de
578586 else throw("List size exceeds 15")
579587
580- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
588+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581589 }
582- let eB = eE._1
583- let dc = eE._2
584- if ((dc != unit))
585- then eB
586- else throw(("Y calculation error, Y = " + toString(eB)))
587- }
588-
589-
590-func eF (eG,eH,eI) = {
591- let eJ = fraction(cy([K(eG, toBigInt(bo)), K(eH, toBigInt(bp))]), c, eI)
592- if ((eI == e))
593- then e
594- else eJ
590+ let eG = eJ._1
591+ let dh = eJ._2
592+ if ((dh != unit))
593+ then eG
594+ else throw(("Y calculation error, Y = " + toString(eG)))
595595 }
596596
597597
598598 func eK (eL,eM,eN) = {
599- let eO = (toBigInt(bN(be(bm))) - eL)
600- let eP = (toBigInt(bN(be(bn))) - eM)
601- let eQ = (toBigInt(value(assetInfo(bl)).quantity) - eN)
602- let eR = eF(eO, eP, eQ)
603- eR
599+ let eO = fraction(cD([L(eL, toBigInt(bt)), L(eM, toBigInt(bu))]), c, eN)
600+ if ((eN == e))
601+ then e
602+ else eO
604603 }
605604
606605
607-func eS (eT,eU,eN) = {
608- let eO = (bN(be(bm)) + eT)
609- let eP = (bN(be(bn)) + eU)
610- let eQ = (value(assetInfo(bl)).quantity + eN)
611- let eJ = eF(toBigInt(eO), toBigInt(eP), toBigInt(eQ))
612- let eV = [IntegerEntry(aq, height), StringEntry(ap, toString(eJ))]
613- $Tuple2(eV, eJ)
606+func eP (eQ,eR,eS) = {
607+ let eT = (toBigInt(bS(bj(br))) - eQ)
608+ let eU = (toBigInt(bS(bj(bs))) - eR)
609+ let eV = (toBigInt(value(assetInfo(bq)).quantity) - eS)
610+ let eW = eK(eT, eU, eV)
611+ eW
614612 }
615613
616614
617-func eW (eX,eJ) = if ((eJ >= eX))
618- then true
619- else aN("updated DLp lower than current DLp")
615+func eX (eY,eZ,eS) = {
616+ let eT = (bS(bj(br)) + eY)
617+ let eU = (bS(bj(bs)) + eZ)
618+ let eV = (value(assetInfo(bq)).quantity + eS)
619+ let eO = eK(toBigInt(eT), toBigInt(eU), toBigInt(eV))
620+ let fa = [IntegerEntry(at, height), StringEntry(as, toString(eO))]
621+ $Tuple2(fa, eO)
622+ }
620623
621624
622-func eY (eZ) = {
623- let eO = bN(be(bm))
624- let eP = bN(be(bn))
625- let fa = eZ.amount
626- let fb = fraction(eZ.amount, eZ.price, a, FLOOR)
627- let fc = if ((eZ.orderType == Buy))
628- then $Tuple2(fa, -(fb))
629- else $Tuple2(-(fa), fb)
630- let eT = fc._1
631- let eU = fc._2
632- if (if (if (aV())
625+func fb (fc,eO) = if ((eO >= fc))
626+ then true
627+ else aS("updated DLp lower than current DLp")
628+
629+
630+func fd (fe) = {
631+ let eT = bS(bj(br))
632+ let eU = bS(bj(bs))
633+ let ff = fe.amount
634+ let fg = fraction(fe.amount, fe.price, a, FLOOR)
635+ let fh = if ((fe.orderType == Buy))
636+ then $Tuple2(ff, -(fg))
637+ else $Tuple2(-(ff), fg)
638+ let eY = fh._1
639+ let eZ = fh._2
640+ if (if (if (ba())
633641 then true
634- else (bk == r))
642+ else (bp == s))
635643 then true
636- else (bk == s))
644+ else (bp == t))
637645 then throw("Admin blocked")
638- else if (if ((eZ.assetPair.amountAsset != bm))
646+ else if (if ((fe.assetPair.amountAsset != br))
639647 then true
640- else (eZ.assetPair.priceAsset != bn))
648+ else (fe.assetPair.priceAsset != bs))
641649 then throw("Wr assets")
642650 else {
643- let fd = parseBigIntValue(valueOrElse(getString(this, ap), "0"))
644- let fe = eS(eT, eU, 0)
645- let ff = fe._1
646- let fg = fe._2
647- let fh = (fg >= fd)
648- let fi = makeString(["dLp=", toString(fd), " dLpNew=", toString(fg), " amountAssetBalance=", toString(eO), " priceAssetBalance=", toString(eP), " amountAssetBalanceDelta=", toString(eT), " priceAssetBalanceDelta=", toString(eU), " height=", toString(height)], "")
649- $Tuple2(fh, fi)
651+ let fi = parseBigIntValue(valueOrElse(getString(this, as), "0"))
652+ let fj = eX(eY, eZ, 0)
653+ let fk = fj._1
654+ let fl = fj._2
655+ let fm = (fl >= fi)
656+ let fn = makeString(["dLp=", toString(fi), " dLpNew=", toString(fl), " amountAssetBalance=", toString(eT), " priceAssetBalance=", toString(eU), " amountAssetBalanceDelta=", toString(eY), " priceAssetBalanceDelta=", toString(eZ), " height=", toString(height)], "")
657+ $Tuple2(fm, fn)
650658 }
651659 }
652660
653661
654-func fj (cP) = if ((size(cP.payments) != 1))
662+func fo (cU) = if ((size(cU.payments) != 1))
655663 then throw("1 pmnt exp")
656664 else {
657- let fk = value(cP.payments[0])
658- let df = value(fk.assetId)
659- let dL = fk.amount
660- let dX = dd(toBase58String(cP.transactionId), toBase58String(df), dL, cP.caller)
661- let dz = dX._1
662- let dA = dX._2
663- let dn = parseIntValue(dX._9)
664- let dB = dX._10
665- if (if (aV())
665+ let fp = value(cU.payments[0])
666+ let dk = value(fp.assetId)
667+ let dQ = fp.amount
668+ let ec = di(toBase58String(cU.transactionId), toBase58String(dk), dQ, cU.caller)
669+ let dE = ec._1
670+ let dF = ec._2
671+ let ds = parseIntValue(ec._9)
672+ let dG = ec._10
673+ if (if (ba())
666674 then true
667- else (dn == s))
668- then throw(("Admin blocked: " + toString(dn)))
669- else $Tuple5(dz, dA, dL, df, dB)
675+ else (ds == t))
676+ then throw(("Admin blocked: " + toString(ds)))
677+ else $Tuple5(dE, dF, dQ, dk, dG)
670678 }
671679
672680
673-func fl (fm,ah,fn,fo,bW,dI,dJ,dK,dL,dM) = {
674- let dX = dC(ah, bW, value(fn).amount, value(fn).assetId, value(fo).amount, value(fo).assetId, fm, (ah == ""), dI, dJ, dK, dL, dM)
675- let dn = parseIntValue(dX._8)
676- if (if (if (aV())
681+func fq (fr,ai,fs,ft,cb,dN,dO,dP,dQ,dR) = {
682+ let ec = dH(ai, cb, value(fs).amount, value(fs).assetId, value(ft).amount, value(ft).assetId, fr, (ai == ""), dN, dO, dP, dQ, dR)
683+ let ds = parseIntValue(ec._8)
684+ if (if (if (ba())
677685 then true
678- else (dn == q))
686+ else (ds == r))
679687 then true
680- else (dn == s))
681- then throw(("Blocked:" + toString(dn)))
682- else dX
688+ else (ds == t))
689+ then throw(("Blocked:" + toString(ds)))
690+ else ec
683691 }
684692
685693
686-func fp (fq,df,dh,ah,fr) = {
687- let dj = toBase58String(value(bm))
688- let dk = toBase58String(value(bn))
689- let di = bl
690- let dR = bo
691- let dS = bp
692- let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity)
693- let fs = if ((eQ > e))
694+func fu (fv,dk,dm,ai,fw) = {
695+ let do = toBase58String(value(br))
696+ let dp = toBase58String(value(bs))
697+ let dn = bq
698+ let dW = bt
699+ let dX = bu
700+ let eV = toBigInt(valueOrErrorMessage(assetInfo(dn), "invalid lp asset").quantity)
701+ let fx = if ((eV > e))
694702 then true
695703 else throw("initial deposit requires all coins")
696- if ((fs == fs))
704+ if ((fx == fx))
697705 then {
698- let dp = bN(dj)
699- let dr = bN(dk)
700- let ft = if ((ah == ""))
701- then $Tuple2(dp, dr)
702- else if ((df == dj))
703- then if ((fq > dp))
706+ let du = bS(do)
707+ let dw = bS(dp)
708+ let fy = if ((ai == ""))
709+ then $Tuple2(du, dw)
710+ else if ((dk == do))
711+ then if ((fv > du))
704712 then throw("invalid payment amount")
705- else $Tuple2((dp - fq), dr)
706- else if ((df == dk))
707- then if ((fq > dr))
713+ else $Tuple2((du - fv), dw)
714+ else if ((dk == dp))
715+ then if ((fv > dw))
708716 then throw("invalid payment amount")
709- else $Tuple2(dp, (dr - fq))
717+ else $Tuple2(du, (dw - fv))
710718 else throw("wrong pmtAssetId")
711- let fu = ft._1
712- let fv = ft._2
713- let fw = if ((df == dj))
714- then $Tuple2(fq, 0)
715- else if ((df == dk))
716- then $Tuple2(0, fq)
719+ let fz = fy._1
720+ let fA = fy._2
721+ let fB = if ((dk == do))
722+ then $Tuple2(fv, 0)
723+ else if ((dk == dp))
724+ then $Tuple2(0, fv)
717725 else throw("invalid payment")
718- let fx = fw._1
719- let fy = fw._2
720- let fz = if (fr)
721- then $Tuple3(cv(fx, aR)._1, cv(fy, aR)._1, cv(fq, aR)._2)
722- else $Tuple3(fx, fy, 0)
723- let fA = fz._1
724- let fB = fz._2
725- let cx = fz._3
726- let fC = (fu + fA)
727- let fD = (fv + fB)
728- let cb = cy([H(fu, bo), H(fv, bp)])
729- let ca = cy([H(fC, bo), H(fD, bp)])
730- let dY = if ((ca > cb))
726+ let fC = fB._1
727+ let fD = fB._2
728+ let fE = if (fw)
729+ then $Tuple3(cA(fC, aW)._1, cA(fD, aW)._1, cA(fv, aW)._2)
730+ else $Tuple3(fC, fD, 0)
731+ let fF = fE._1
732+ let fG = fE._2
733+ let cC = fE._3
734+ let fH = (fz + fF)
735+ let fI = (fA + fG)
736+ let cg = cD([I(fz, bt), I(fA, bu)])
737+ let cf = cD([I(fH, bt), I(fI, bu)])
738+ let ed = if ((cf > cg))
731739 then true
732740 else throw()
733- if ((dY == dY))
741+ if ((ed == ed))
734742 then {
735- let fE = fraction(eQ, (ca - cb), cb, FLOOR)
736- let du = L(bP(H(fD, dS), H(fC, dR)), a)
737- let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, ah), by(fx, fy, toInt(fE), du, 0, 0, height, lastBlock.timestamp, 0, 0))]
738- let fF = fraction(fv, a, fu)
739- let fG = fraction(fq, a, (fF + a))
740- let fH = (fq - fG)
741- let fI = fraction(eQ, toBigInt(fH), toBigInt(fv))
742- let fJ = toInt(fraction((fE - fI), b, fI))
743- $Tuple4(toInt(fE), er, cx, fJ)
743+ let fJ = fraction(eV, (cf - cg), cg, FLOOR)
744+ let dz = M(bU(I(fI, dX), I(fH, dW)), a)
745+ let ew = [IntegerEntry(ac(), dz), IntegerEntry(ad(height, lastBlock.timestamp), dz), StringEntry(ag(dm, ai), bD(fC, fD, toInt(fJ), dz, 0, 0, height, lastBlock.timestamp, 0, 0))]
746+ let fK = fraction(fA, a, fz)
747+ let fL = fraction(fv, a, (fK + a))
748+ let fM = (fv - fL)
749+ let fN = fraction(eV, toBigInt(fM), toBigInt(fA))
750+ let fO = toInt(fraction((fJ - fN), b, fN))
751+ $Tuple4(toInt(fJ), ew, cC, fO)
744752 }
745753 else throw("Strict value is not equal to itself.")
746754 }
747755 else throw("Strict value is not equal to itself.")
748756 }
749757
750758
751-func fK (fL,fM,fN,fm,fO,fP) = {
752- let di = toBase58String(value(bl))
753- let dj = toBase58String(value(bm))
754- let dk = toBase58String(value(bn))
755- let fQ = bo
756- let fR = bp
757- let fS = bk
758- let dh = if ((fm == bx))
759- then fO
760- else fm
761- let fk = value(fN[0])
762- let df = value(fk.assetId)
763- let dL = fk.amount
764- let eR = eK(e, e, e)
765- if ((eR == eR))
759+func fP (fQ,fR,fS,fr,fT,fU) = {
760+ let dn = toBase58String(value(bq))
761+ let do = toBase58String(value(br))
762+ let dp = toBase58String(value(bs))
763+ let fV = bt
764+ let fW = bu
765+ let fX = bp
766+ let dm = if ((fr == bC))
767+ then fT
768+ else fr
769+ let fp = value(fS[0])
770+ let dk = value(fp.assetId)
771+ let dQ = fp.amount
772+ let eW = eP(e, e, e)
773+ if ((eW == eW))
766774 then {
767- let de = toBase58String(fP)
768- if ((di != toBase58String(df)))
775+ let dj = toBase58String(fU)
776+ if ((dn != toBase58String(dk)))
769777 then throw("Wrong LP")
770778 else {
771- let dp = bN(dj)
772- let dr = bN(dk)
773- let fT = {
774- let aS = invoke(this, "getOneTknV2READONLY", [fL, dL], nil)
775- if ($isInstanceOf(aS, "(Int, Int)"))
776- then aS
777- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
779+ let du = bS(do)
780+ let dw = bS(dp)
781+ let fY = {
782+ let aX = invoke(this, "getOneTknV2READONLY", [fQ, dQ], nil)
783+ if ($isInstanceOf(aX, "(Int, Int)"))
784+ then aX
785+ else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
778786 }
779- if ((fT == fT))
787+ if ((fY == fY))
780788 then {
781- let cx = fT._2
782- let fU = fT._1
783- let fV = if (if ((fM > 0))
784- then (fM > fU)
789+ let cC = fY._2
790+ let fZ = fY._1
791+ let ga = if (if ((fR > 0))
792+ then (fR > fZ)
785793 else false)
786- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
787- else fU
788- let fW = if ((fL == dj))
789- then $Tuple4(fV, 0, ((dp - fV) - cx), dr)
790- else if ((fL == dk))
791- then $Tuple4(0, fV, dp, ((dr - fV) - cx))
794+ then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
795+ else fZ
796+ let gb = if ((fQ == do))
797+ then $Tuple4(ga, 0, ((du - ga) - cC), dw)
798+ else if ((fQ == dp))
799+ then $Tuple4(0, ga, du, ((dw - ga) - cC))
792800 else throw("invalid out asset id")
793- let fX = fW._1
794- let fY = fW._2
795- let fC = fW._3
796- let fD = fW._4
797- let fZ = bP(H(fD, fR), H(fC, fQ))
798- let ga = L(fZ, a)
799- let gb = if ((fL == "WAVES"))
801+ let gc = gb._1
802+ let gd = gb._2
803+ let fH = gb._3
804+ let fI = gb._4
805+ let ge = bU(I(fI, fW), I(fH, fV))
806+ let gf = M(ge, a)
807+ let gg = if ((fQ == "WAVES"))
800808 then unit
801- else fromBase58String(fL)
802- let gc = if ((cx > 0))
803- then [ScriptTransfer(aX, cx, gb)]
809+ else fromBase58String(fQ)
810+ let gh = if ((cC > 0))
811+ then [ScriptTransfer(bc, cC, gg)]
804812 else nil
805- let dB = ([ScriptTransfer(dh, fV, gb), StringEntry(ai(toString(dh), de), bJ(fX, fY, dL, ga, height, lastBlock.timestamp)), IntegerEntry(ab(), ga), IntegerEntry(ac(height, lastBlock.timestamp), ga)] ++ gc)
806- if ((dB == dB))
813+ let dG = ([ScriptTransfer(dm, ga, gg), StringEntry(aj(toString(dm), dj), bO(gc, gd, dQ, gf, height, lastBlock.timestamp)), IntegerEntry(ac(), gf), IntegerEntry(ad(height, lastBlock.timestamp), gf)] ++ gh)
814+ if ((dG == dG))
807815 then {
808- let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809- if ((gd == gd))
816+ let gi = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
817+ if ((gi == gi))
810818 then {
811- let ge = {
812- let gf = if ((this == aX))
819+ let gj = {
820+ let gk = if ((this == bc))
813821 then 0
814- else cx
815- let gg = if ((bc(fL) == bm))
822+ else cC
823+ let gl = if ((bh(fQ) == br))
816824 then true
817825 else false
818- if (gg)
819- then $Tuple2(-((fU + gf)), 0)
820- else $Tuple2(0, -((fU + gf)))
826+ if (gl)
827+ then $Tuple2(-((fZ + gk)), 0)
828+ else $Tuple2(0, -((fZ + gk)))
821829 }
822- let eT = ge._1
823- let eU = ge._2
824- let gh = eS(eT, eU, 0)
825- let gi = gh._1
826- let eJ = gh._2
827- let gj = eW(eR, eJ)
828- if ((gj == gj))
829- then $Tuple2((dB ++ gi), fV)
830+ let eY = gj._1
831+ let eZ = gj._2
832+ let gm = eX(eY, eZ, 0)
833+ let gn = gm._1
834+ let eO = gm._2
835+ let go = fb(eW, eO)
836+ if ((go == go))
837+ then $Tuple2((dG ++ gn), ga)
830838 else throw("Strict value is not equal to itself.")
831839 }
832840 else throw("Strict value is not equal to itself.")
833841 }
834842 else throw("Strict value is not equal to itself.")
835843 }
836844 else throw("Strict value is not equal to itself.")
837845 }
838846 }
839847 else throw("Strict value is not equal to itself.")
840848 }
841849
842850
843-func gk () = {
844- let gl = getString(Z())
845- if ($isInstanceOf(gl, "String"))
851+func gp () = {
852+ let gq = getString(aa())
853+ if ($isInstanceOf(gq, "String"))
846854 then {
847- let cC = gl
848- fromBase58String(cC)
855+ let cH = gq
856+ fromBase58String(cH)
849857 }
850- else if ($isInstanceOf(gl, "Unit"))
858+ else if ($isInstanceOf(gq, "Unit"))
851859 then unit
852860 else throw("Match error")
853861 }
854862
855863
856-func gm () = {
857- let gl = getString(aa())
858- if ($isInstanceOf(gl, "String"))
864+func gr () = {
865+ let gq = getString(ab())
866+ if ($isInstanceOf(gq, "String"))
859867 then {
860- let cC = gl
861- fromBase58String(cC)
868+ let cH = gq
869+ fromBase58String(cH)
862870 }
863- else if ($isInstanceOf(gl, "Unit"))
871+ else if ($isInstanceOf(gq, "Unit"))
864872 then unit
865873 else throw("Match error")
866874 }
867875
868876
869-let gn = throw("Permission denied")
877+let gs = throw("Permission denied")
870878
871-func go (cP) = {
872- let gl = gk()
873- if ($isInstanceOf(gl, "ByteVector"))
879+func gt (cU) = {
880+ let gq = gp()
881+ if ($isInstanceOf(gq, "ByteVector"))
874882 then {
875- let gp = gl
876- (cP.callerPublicKey == gp)
883+ let gu = gq
884+ (cU.callerPublicKey == gu)
877885 }
878- else if ($isInstanceOf(gl, "Unit"))
879- then (cP.caller == this)
886+ else if ($isInstanceOf(gq, "Unit"))
887+ then (cU.caller == this)
880888 else throw("Match error")
881889 }
882890
883891
884-func gq (cP) = {
885- let gl = gk()
886- if ($isInstanceOf(gl, "ByteVector"))
892+func gv (cU) = {
893+ let gq = gp()
894+ if ($isInstanceOf(gq, "ByteVector"))
887895 then {
888- let gp = gl
889- if ((cP.callerPublicKey == gp))
896+ let gu = gq
897+ if ((cU.callerPublicKey == gu))
890898 then true
891- else gn
899+ else gs
892900 }
893- else if ($isInstanceOf(gl, "Unit"))
894- then if ((cP.caller == this))
901+ else if ($isInstanceOf(gq, "Unit"))
902+ then if ((cU.caller == this))
895903 then true
896- else gn
904+ else gs
897905 else throw("Match error")
898906 }
899907
900908
901-func gr (gs,et,gt) = {
902- let bg = aY()
903- let dj = bg[w]
904- let dk = bg[x]
905- let eu = g
906- let ew = parseBigIntValue(l)
907- let cD = (parseBigIntValue(aU) * ew)
908- let cz = if ((gs == false))
909- then [(toBigInt(bN(dj)) + gt), toBigInt(bN(dk))]
910- else [(toBigInt(bN(dk)) + gt), toBigInt(bN(dj))]
911- let ev = cz[0]
912- let cC = ev
913- let cE = (cD * eu)
914- let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu))
915- let ey = ((cC + ((et * ew) / cE)) - et)
916- func cN (cO,ez) = {
917- let gu = cO
918- let eB = gu._1
919- let dc = gu._2
920- if ((dc != unit))
921- then cO
909+func gw (gx,ey,gy) = {
910+ let bl = bd()
911+ let do = bl[x]
912+ let dp = bl[y]
913+ let ez = g
914+ let eB = parseBigIntValue(m)
915+ let cI = (parseBigIntValue(aZ) * eB)
916+ let cE = if ((gx == false))
917+ then [(toBigInt(bS(do)) + gy), toBigInt(bS(dp))]
918+ else [(toBigInt(bS(dp)) + gy), toBigInt(bS(do))]
919+ let eA = cE[0]
920+ let cH = eA
921+ let cJ = (cI * ez)
922+ let eC = (((((ey * ey) / (eA * ez)) * ey) * eB) / (cJ * ez))
923+ let eD = ((cH + ((ey * eB) / cJ)) - ey)
924+ func cS (cT,eE) = {
925+ let gz = cT
926+ let eG = gz._1
927+ let dh = gz._2
928+ if ((dh != unit))
929+ then cT
922930 else {
923- let eC = (((eB * eB) + ex) / ((g * eB) + ey))
924- let eD = X((eC - value(eB)))
925- if ((f >= eD))
926- then $Tuple2(eC, ez)
927- else $Tuple2(eC, unit)
931+ let eH = (((eG * eG) + eC) / ((g * eG) + eD))
932+ let eI = Y((eH - value(eG)))
933+ if ((f >= eI))
934+ then $Tuple2(eH, eE)
935+ else $Tuple2(eH, unit)
928936 }
929937 }
930938
931- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
932- let gv = {
933- let cV = cT
934- let cW = size(cV)
935- let cX = $Tuple2(et, unit)
936- func cY (cZ,da) = if ((da >= cW))
937- then cZ
938- else cN(cZ, cV[da])
939+ let cY = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
940+ let gA = {
941+ let da = cY
942+ let db = size(da)
943+ let dc = $Tuple2(ey, unit)
944+ func dd (de,df) = if ((df >= db))
945+ then de
946+ else cS(de, da[df])
939947
940- func db (cZ,da) = if ((da >= cW))
941- then cZ
948+ func dg (de,df) = if ((df >= db))
949+ then de
942950 else throw("List size exceeds 15")
943951
944- db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
952+ dg(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dd(dc, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
945953 }
946- let eB = gv._1
947- let dc = gv._2
948- if ((dc != unit))
949- then eB
950- else throw(("Y calculation error, Y = " + toString(eB)))
954+ let eG = gA._1
955+ let dh = gA._2
956+ if ((dh != unit))
957+ then eG
958+ else throw(("Y calculation error, Y = " + toString(eG)))
951959 }
952960
953961
954-@Callable(cP)
955-func calculateAmountOutForSwapREADONLY (gw,gs,gx) = {
956- let gy = if ((gs == false))
962+func gB () = valueOrElse(getBoolean(aV, aH(toString(this))), false)
963+
964+
965+@Callable(cU)
966+func calculateAmountOutForSwapREADONLY (gC,gx,gD) = {
967+ let gE = if ((gx == false))
957968 then {
958- let gz = aJ(this, ak())
959- let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960- $Tuple2(gz, gt)
969+ let gF = aO(this, al())
970+ let gy = (toBigInt(bS(aO(this, ak()))) + toBigInt(gC))
971+ $Tuple2(gF, gy)
961972 }
962973 else {
963- let gz = aJ(this, aj())
964- let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965- $Tuple2(gz, gt)
974+ let gF = aO(this, ak())
975+ let gy = (toBigInt(bS(aO(this, al()))) + toBigInt(gC))
976+ $Tuple2(gF, gy)
966977 }
967- let gz = gy._1
968- let gt = gy._2
969- let bg = aY()
970- let dj = bg[w]
971- let dk = bg[x]
972- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
973- let et = cy(cz)
974- let eB = gr(gs, et, toBigInt(gw))
975- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
976- let gB = max([0, toInt(gA)])
977- let gC = if ((gs == false))
978- then [((toBigInt(bN(dj)) + toBigInt(gw)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
979- else [(toBigInt(bN(dj)) - gA), ((toBigInt(bN(dk)) + toBigInt(gw)) + toBigInt(gx))]
980- let gD = cy(gC)
981- let dY = if ((gD >= et))
978+ let gF = gE._1
979+ let gy = gE._2
980+ let bl = bd()
981+ let do = bl[x]
982+ let dp = bl[y]
983+ let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
984+ let ey = cD(cE)
985+ let eG = gw(gx, ey, toBigInt(gC))
986+ let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
987+ let gH = max([0, toInt(gG)])
988+ let gI = if ((gx == false))
989+ then [((toBigInt(bS(do)) + toBigInt(gC)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
990+ else [(toBigInt(bS(do)) - gG), ((toBigInt(bS(dp)) + toBigInt(gC)) + toBigInt(gD))]
991+ let gJ = cD(gI)
992+ let ed = if ((gJ >= ey))
982993 then true
983- else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__"))
984- if ((dY == dY))
985- then $Tuple2(nil, gB)
994+ else throw(makeString(["new D is fewer error", toString(ey), toString(gJ)], "__"))
995+ if ((ed == ed))
996+ then $Tuple2(nil, gH)
986997 else throw("Strict value is not equal to itself.")
987998 }
988999
9891000
9901001
991-@Callable(cP)
992-func calculateAmountOutForSwapAndSendTokens (gw,gs,gE,gF,gx) = {
993- let gG = {
994- let aS = invoke(aQ, "getSwapContractREADONLY", nil, nil)
995- if ($isInstanceOf(aS, "String"))
996- then aS
997- else throw(($getType(aS) + " couldn't be cast to String"))
1002+@Callable(cU)
1003+func calculateAmountOutForSwapAndSendTokens (gC,gx,gK,gL,gD) = {
1004+ let gM = {
1005+ let aX = invoke(aV, "getSwapContractREADONLY", nil, nil)
1006+ if ($isInstanceOf(aX, "String"))
1007+ then aX
1008+ else throw(($getType(aX) + " couldn't be cast to String"))
9981009 }
999- let gH = [if ((value(cP.payments[0]).amount >= gw))
1010+ let gN = [if ((value(cU.payments[0]).amount >= gC))
10001011 then true
1001- else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG)))
1012+ else aS("Wrong amount"), if ((cU.caller == addressFromStringValue(gM)))
10021013 then true
1003- else aN("Permission denied")]
1004- if ((gH == gH))
1014+ else aS("Permission denied")]
1015+ if ((gN == gN))
10051016 then {
1006- let fk = value(cP.payments[0])
1007- let gI = be(fk.assetId)
1008- let gJ = if ((gs == false))
1017+ let fp = value(cU.payments[0])
1018+ let gO = bj(fp.assetId)
1019+ let gP = if ((gx == false))
10091020 then {
1010- let gz = aJ(this, ak())
1011- let gt = (bN(gI) - value(cP.payments[0]).amount)
1012- $Tuple2(gz, gt)
1021+ let gF = aO(this, al())
1022+ let gy = (bS(gO) - value(cU.payments[0]).amount)
1023+ $Tuple2(gF, gy)
10131024 }
10141025 else {
1015- let gz = aJ(this, aj())
1016- let gt = (bN(gI) - value(cP.payments[0]).amount)
1017- $Tuple2(gz, gt)
1026+ let gF = aO(this, ak())
1027+ let gy = (bS(gO) - value(cU.payments[0]).amount)
1028+ $Tuple2(gF, gy)
10181029 }
1019- let gz = gJ._1
1020- let gt = gJ._2
1021- let bg = aY()
1022- let dj = bg[w]
1023- let dk = bg[x]
1024- let cz = if ((gs == false))
1025- then [(toBigInt(bN(dj)) - toBigInt(value(cP.payments[0]).amount)), toBigInt(bN(dk))]
1026- else [toBigInt(bN(dj)), (toBigInt(bN(dk)) - toBigInt(value(cP.payments[0]).amount))]
1027- let et = cy(cz)
1028- let eB = gr(gs, et, toBigInt(0))
1029- let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1))
1030- let gB = max([0, toInt(gA)])
1031- let gK = if ((gB >= gE))
1030+ let gF = gP._1
1031+ let gy = gP._2
1032+ let bl = bd()
1033+ let do = bl[x]
1034+ let dp = bl[y]
1035+ let cE = if ((gx == false))
1036+ then [(toBigInt(bS(do)) - toBigInt(value(cU.payments[0]).amount)), toBigInt(bS(dp))]
1037+ else [toBigInt(bS(do)), (toBigInt(bS(dp)) - toBigInt(value(cU.payments[0]).amount))]
1038+ let ey = cD(cE)
1039+ let eG = gw(gx, ey, toBigInt(0))
1040+ let gG = ((toBigInt(bS(gF)) - eG) - toBigInt(1))
1041+ let gH = max([0, toInt(gG)])
1042+ let gQ = if ((gH >= gK))
10321043 then true
10331044 else throw("Exchange result is fewer coins than expected")
1034- if ((gK == gK))
1045+ if ((gQ == gQ))
10351046 then {
1036- let gC = if ((gs == false))
1037- then [(toBigInt(bN(dj)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)]
1038- else [(toBigInt(bN(dj)) - gA), (toBigInt(bN(dk)) + toBigInt(gx))]
1039- let gD = cy(gC)
1040- let dY = if ((gD >= et))
1047+ let gI = if ((gx == false))
1048+ then [(toBigInt(bS(do)) + toBigInt(gD)), (toBigInt(bS(dp)) - gG)]
1049+ else [(toBigInt(bS(do)) - gG), (toBigInt(bS(dp)) + toBigInt(gD))]
1050+ let gJ = cD(gI)
1051+ let ed = if ((gJ >= ey))
10411052 then true
10421053 else throw("new D is fewer error")
1043- if ((dY == dY))
1044- then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB)
1054+ if ((ed == ed))
1055+ then $Tuple2([ScriptTransfer(addressFromStringValue(gL), gH, bh(gF))], gH)
10451056 else throw("Strict value is not equal to itself.")
10461057 }
10471058 else throw("Strict value is not equal to itself.")
10481059 }
10491060 else throw("Strict value is not equal to itself.")
10501061 }
10511062
10521063
10531064
1054-@Callable(cP)
1055-func constructor (Y) = {
1056- let ex = gq(cP)
1057- if ((ex == ex))
1058- then [StringEntry(Y(), Y)]
1065+@Callable(cU)
1066+func constructor (Z) = {
1067+ let eC = gv(cU)
1068+ if ((eC == eC))
1069+ then [StringEntry(Z(), Z)]
10591070 else throw("Strict value is not equal to itself.")
10601071 }
10611072
10621073
10631074
1064-@Callable(cP)
1065-func setManager (gL) = {
1066- let ex = gq(cP)
1067- if ((ex == ex))
1075+@Callable(cU)
1076+func setManager (gR) = {
1077+ let eC = gv(cU)
1078+ if ((eC == eC))
10681079 then {
1069- let gM = fromBase58String(gL)
1070- if ((gM == gM))
1071- then [StringEntry(aa(), gL)]
1080+ let gS = fromBase58String(gR)
1081+ if ((gS == gS))
1082+ then [StringEntry(ab(), gR)]
10721083 else throw("Strict value is not equal to itself.")
10731084 }
10741085 else throw("Strict value is not equal to itself.")
10751086 }
10761087
10771088
10781089
1079-@Callable(cP)
1090+@Callable(cU)
10801091 func confirmManager () = {
1081- let cu = gm()
1082- let gN = if (isDefined(cu))
1092+ let cz = gr()
1093+ let gT = if (isDefined(cz))
10831094 then true
10841095 else throw("No pending manager")
1085- if ((gN == gN))
1096+ if ((gT == gT))
10861097 then {
1087- let gO = if ((cP.callerPublicKey == value(cu)))
1098+ let gU = if ((cU.callerPublicKey == value(cz)))
10881099 then true
10891100 else throw("You are not pending manager")
1090- if ((gO == gO))
1091- then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
1101+ if ((gU == gU))
1102+ then [StringEntry(aa(), toBase58String(value(cz))), DeleteEntry(ab())]
10921103 else throw("Strict value is not equal to itself.")
10931104 }
10941105 else throw("Strict value is not equal to itself.")
10951106 }
10961107
10971108
10981109
1099-@Callable(cP)
1100-func put (gP,gQ) = {
1101- let gR = bs()
1102- let gS = valueOrErrorMessage(addressFromString(gR[C]), "Wr st addr")
1103- let gT = valueOrErrorMessage(addressFromString(gR[E]), "Wr sl addr")
1104- if ((0 > gP))
1110+@Callable(cU)
1111+func put (gV,gW) = {
1112+ let gX = bx()
1113+ let gY = valueOrErrorMessage(addressFromString(gX[D]), "Wr st addr")
1114+ let gZ = valueOrErrorMessage(addressFromString(gX[F]), "Wr sl addr")
1115+ if ((0 > gV))
11051116 then throw("Wrong slippage")
1106- else if ((size(cP.payments) != 2))
1117+ else if ((size(cU.payments) != 2))
11071118 then throw("2 pmnts expd")
11081119 else {
1109- let gU = toBigInt(value(cP.payments[0]).amount)
1110- let gV = toBigInt(value(cP.payments[1]).amount)
1111- let eO = (toBigInt(bN(be(bm))) - gU)
1112- if ((eO == eO))
1120+ let ha = toBigInt(value(cU.payments[0]).amount)
1121+ let hb = toBigInt(value(cU.payments[1]).amount)
1122+ let eT = (toBigInt(bS(bj(br))) - ha)
1123+ if ((eT == eT))
11131124 then {
1114- let eP = (toBigInt(bN(be(bn))) - gV)
1115- if ((eP == eP))
1125+ let eU = (toBigInt(bS(bj(bs))) - hb)
1126+ if ((eU == eU))
11161127 then {
1117- let eQ = toBigInt(value(assetInfo(bl)).quantity)
1118- if ((eQ == eQ))
1128+ let eV = toBigInt(value(assetInfo(bq)).quantity)
1129+ if ((eV == eV))
11191130 then {
1120- let eR = eK(gU, gV, toBigInt(0))
1121- if ((eR == eR))
1131+ let eW = eP(ha, hb, toBigInt(0))
1132+ if ((eW == eW))
11221133 then {
1123- let gW = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gP, true, false, true, 0, "")
1124- let el = gW._2
1125- let gX = gW._7
1126- let dB = gW._9
1127- let em = gW._10
1128- let en = gW._11
1129- let dj = gW._12
1130- let dk = gW._13
1131- let dX = invoke(aQ, "emit", [el], nil)
1132- if ((dX == dX))
1134+ let hc = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], gV, true, false, true, 0, "")
1135+ let eq = hc._2
1136+ let hd = hc._7
1137+ let dG = hc._9
1138+ let er = hc._10
1139+ let es = hc._11
1140+ let do = hc._12
1141+ let dp = hc._13
1142+ let ec = invoke(aV, "emit", [eq], nil)
1143+ if ((ec == ec))
11331144 then {
1134- let gY = {
1135- let gl = dX
1136- if ($isInstanceOf(gl, "Address"))
1145+ let he = {
1146+ let gq = ec
1147+ if ($isInstanceOf(gq, "Address"))
11371148 then {
1138- let gZ = gl
1139- invoke(gZ, "emit", [el], nil)
1149+ let hf = gq
1150+ invoke(hf, "emit", [eq], nil)
11401151 }
11411152 else unit
11421153 }
1143- if ((gY == gY))
1154+ if ((he == he))
11441155 then {
1145- let ha = if ((em > 0))
1146- then invoke(gT, "put", nil, [AttachedPayment(dj, em)])
1156+ let hg = if ((er > 0))
1157+ then invoke(gZ, "put", nil, [AttachedPayment(do, er)])
11471158 else nil
1148- if ((ha == ha))
1159+ if ((hg == hg))
11491160 then {
1150- let hb = if ((en > 0))
1151- then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
1161+ let hh = if ((es > 0))
1162+ then invoke(gZ, "put", nil, [AttachedPayment(dp, es)])
11521163 else nil
1153- if ((hb == hb))
1164+ if ((hh == hh))
11541165 then {
1155- let hc = if (gQ)
1166+ let hi = if (gW)
11561167 then {
1157- let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)])
1158- if ((hd == hd))
1168+ let hj = invoke(gY, "stake", nil, [AttachedPayment(hd, eq)])
1169+ if ((hj == hj))
11591170 then nil
11601171 else throw("Strict value is not equal to itself.")
11611172 }
1162- else [ScriptTransfer(cP.caller, el, gX)]
1163- let he = eS(0, 0, 0)
1164- let gi = he._1
1165- let eJ = he._2
1166- let hf = if ((eJ >= eR))
1173+ else [ScriptTransfer(cU.caller, eq, hd)]
1174+ let hk = eX(0, 0, 0)
1175+ let gn = hk._1
1176+ let eO = hk._2
1177+ let hl = if ((eO >= eW))
11671178 then true
1168- else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " "))
1169- if ((hf == hf))
1179+ else aS(makeString(["updated DLp lower than current DLp", toString(eT), toString(eU), toString(eV), toString(eW), toString(eO), toString(er), toString(es)], " "))
1180+ if ((hl == hl))
11701181 then {
1171- let hg = value(assetInfo(bl)).quantity
1172- if ((hg == hg))
1173- then ((dB ++ hc) ++ gi)
1182+ let hm = value(assetInfo(bq)).quantity
1183+ if ((hm == hm))
1184+ then ((dG ++ hi) ++ gn)
11741185 else throw("Strict value is not equal to itself.")
11751186 }
11761187 else throw("Strict value is not equal to itself.")
11771188 }
11781189 else throw("Strict value is not equal to itself.")
11791190 }
11801191 else throw("Strict value is not equal to itself.")
11811192 }
11821193 else throw("Strict value is not equal to itself.")
11831194 }
11841195 else throw("Strict value is not equal to itself.")
11851196 }
11861197 else throw("Strict value is not equal to itself.")
11871198 }
11881199 else throw("Strict value is not equal to itself.")
11891200 }
11901201 else throw("Strict value is not equal to itself.")
11911202 }
11921203 else throw("Strict value is not equal to itself.")
11931204 }
11941205 }
11951206
11961207
11971208
1198-@Callable(cP)
1199-func putOneTknV2 (fM,gQ) = {
1200- let hh = {
1201- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1202- if ($isInstanceOf(aS, "Boolean"))
1203- then aS
1204- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1209+@Callable(cU)
1210+func putOneTknV2 (fR,gW) = {
1211+ let hn = {
1212+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1213+ if ($isInstanceOf(aX, "Boolean"))
1214+ then aX
1215+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
12051216 }
1206- let hi = if (if (if (aV())
1217+ let ho = if (if (if (ba())
12071218 then true
1208- else (bk == q))
1219+ else (bp == r))
12091220 then true
1210- else (bk == s))
1221+ else (bp == t))
12111222 then true
1212- else hh
1213- let gH = [if (if (!(hi))
1223+ else hn
1224+ let gN = [if (if (!(ho))
12141225 then true
1215- else go(cP))
1226+ else gt(cU))
12161227 then true
1217- else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
1228+ else aS("put operation is blocked by admin"), if ((size(cU.payments) == 1))
12181229 then true
1219- else aN("exactly 1 payment are expected")]
1220- if ((gH == gH))
1230+ else aS("exactly 1 payment are expected")]
1231+ if ((gN == gN))
12211232 then {
1222- let dj = toBase58String(value(bm))
1223- let dk = toBase58String(value(bn))
1224- let di = bl
1225- let fQ = bo
1226- let fR = bp
1227- let dh = if ((cP.caller == this))
1228- then cP.originCaller
1229- else cP.caller
1230- let fk = value(cP.payments[0])
1231- let df = toBase58String(value(fk.assetId))
1232- let dL = fk.amount
1233- let eR = if ((fk.assetId == bm))
1234- then eK(toBigInt(dL), toBigInt(0), toBigInt(0))
1235- else eK(toBigInt(0), toBigInt(dL), toBigInt(0))
1236- if ((eR == eR))
1233+ let do = toBase58String(value(br))
1234+ let dp = toBase58String(value(bs))
1235+ let dn = bq
1236+ let fV = bt
1237+ let fW = bu
1238+ let dm = if ((cU.caller == this))
1239+ then cU.originCaller
1240+ else cU.caller
1241+ let fp = value(cU.payments[0])
1242+ let dk = toBase58String(value(fp.assetId))
1243+ let dQ = fp.amount
1244+ let eW = if ((fp.assetId == br))
1245+ then eP(toBigInt(dQ), toBigInt(0), toBigInt(0))
1246+ else eP(toBigInt(0), toBigInt(dQ), toBigInt(0))
1247+ if ((eW == eW))
12371248 then {
1238- let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1239- if ((hj == hj))
1249+ let hp = fu(dQ, dk, toString(dm), toBase58String(cU.transactionId), true)
1250+ if ((hp == hp))
12401251 then {
1241- let cx = hj._3
1242- let dB = hj._2
1243- let hk = hj._1
1244- let el = if (if ((fM > 0))
1245- then (fM > hk)
1252+ let cC = hp._3
1253+ let dG = hp._2
1254+ let hq = hp._1
1255+ let eq = if (if ((fR > 0))
1256+ then (fR > hq)
12461257 else false)
1247- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
1248- else hk
1249- let gW = invoke(aQ, "emit", [el], nil)
1250- if ((gW == gW))
1258+ then aS(makeString(["amount to receive is less than ", toString(fR)], ""))
1259+ else hq
1260+ let hc = invoke(aV, "emit", [eq], nil)
1261+ if ((hc == hc))
12511262 then {
1252- let gY = {
1253- let gl = gW
1254- if ($isInstanceOf(gl, "Address"))
1263+ let he = {
1264+ let gq = hc
1265+ if ($isInstanceOf(gq, "Address"))
12551266 then {
1256- let gZ = gl
1257- invoke(gZ, "emit", [el], nil)
1267+ let hf = gq
1268+ invoke(hf, "emit", [eq], nil)
12581269 }
12591270 else unit
12601271 }
1261- if ((gY == gY))
1272+ if ((he == he))
12621273 then {
1263- let hc = if (gQ)
1274+ let hi = if (gW)
12641275 then {
1265- let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1266- if ((hd == hd))
1276+ let hj = invoke(bz, "stakeFor", [toString(cU.caller)], [AttachedPayment(dn, eq)])
1277+ if ((hj == hj))
12671278 then nil
12681279 else throw("Strict value is not equal to itself.")
12691280 }
1270- else [ScriptTransfer(cP.caller, el, di)]
1271- let gc = if ((cx > 0))
1272- then [ScriptTransfer(aX, cx, fromBase58String(df))]
1281+ else [ScriptTransfer(cU.caller, eq, dn)]
1282+ let gh = if ((cC > 0))
1283+ then [ScriptTransfer(bc, cC, fromBase58String(dk))]
12731284 else nil
1274- let hl = if ((this == aX))
1285+ let hr = if ((this == bc))
12751286 then $Tuple2(0, 0)
12761287 else {
1277- let hm = if ((fk.assetId == bm))
1288+ let hs = if ((fp.assetId == br))
12781289 then true
12791290 else false
1280- if (hm)
1281- then $Tuple2(-(cx), 0)
1282- else $Tuple2(0, -(cx))
1291+ if (hs)
1292+ then $Tuple2(-(cC), 0)
1293+ else $Tuple2(0, -(cC))
12831294 }
1284- let eT = hl._1
1285- let eU = hl._2
1286- let hn = eS(eT, eU, 0)
1287- let gi = hn._1
1288- let eJ = hn._2
1289- let gj = eW(eR, eJ)
1290- if ((gj == gj))
1291- then $Tuple2((((dB ++ hc) ++ gc) ++ gi), el)
1295+ let eY = hr._1
1296+ let eZ = hr._2
1297+ let ht = eX(eY, eZ, 0)
1298+ let gn = ht._1
1299+ let eO = ht._2
1300+ let go = fb(eW, eO)
1301+ if ((go == go))
1302+ then $Tuple2((((dG ++ hi) ++ gh) ++ gn), eq)
12921303 else throw("Strict value is not equal to itself.")
12931304 }
12941305 else throw("Strict value is not equal to itself.")
12951306 }
12961307 else throw("Strict value is not equal to itself.")
12971308 }
12981309 else throw("Strict value is not equal to itself.")
12991310 }
13001311 else throw("Strict value is not equal to itself.")
13011312 }
13021313 else throw("Strict value is not equal to itself.")
13031314 }
13041315
13051316
13061317
1307-@Callable(cP)
1308-func putForFree (ho) = if ((0 > ho))
1318+@Callable(cU)
1319+func putForFree (hu) = if ((0 > hu))
13091320 then throw("Wrong slpg")
1310- else if ((size(cP.payments) != 2))
1321+ else if ((size(cU.payments) != 2))
13111322 then throw("2 pmnts expd")
13121323 else {
1313- let hp = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], ho, false, false, true, 0, "")
1314- let dB = hp._9
1315- let gU = toBigInt(value(cP.payments[0]).amount)
1316- let gV = toBigInt(value(cP.payments[1]).amount)
1317- let eR = eK(gU, gV, toBigInt(0))
1318- if ((eR == eR))
1324+ let hv = fq(toString(cU.caller), toBase58String(cU.transactionId), AttachedPayment(value(cU.payments[0]).assetId, value(cU.payments[0]).amount), cU.payments[1], hu, false, false, true, 0, "")
1325+ let dG = hv._9
1326+ let ha = toBigInt(value(cU.payments[0]).amount)
1327+ let hb = toBigInt(value(cU.payments[1]).amount)
1328+ let eW = eP(ha, hb, toBigInt(0))
1329+ if ((eW == eW))
13191330 then {
1320- let hq = eS(0, 0, 0)
1321- let gi = hq._1
1322- let eJ = hq._2
1323- let gj = eW(eR, eJ)
1324- if ((gj == gj))
1325- then (dB ++ gi)
1331+ let hw = eX(0, 0, 0)
1332+ let gn = hw._1
1333+ let eO = hw._2
1334+ let go = fb(eW, eO)
1335+ if ((go == go))
1336+ then (dG ++ gn)
13261337 else throw("Strict value is not equal to itself.")
13271338 }
13281339 else throw("Strict value is not equal to itself.")
13291340 }
13301341
13311342
13321343
1333-@Callable(cP)
1344+@Callable(cU)
13341345 func get () = {
1335- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1336- if ((eR == eR))
1346+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1347+ if ((eW == eW))
13371348 then {
1338- let dX = fj(cP)
1339- let hr = dX._1
1340- let dA = dX._2
1341- let dL = dX._3
1342- let df = dX._4
1343- let dB = dX._5
1344- let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1345- if ((ey == ey))
1349+ let ec = fo(cU)
1350+ let hx = ec._1
1351+ let dF = ec._2
1352+ let dQ = ec._3
1353+ let dk = ec._4
1354+ let dG = ec._5
1355+ let eD = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1356+ if ((eD == eD))
13461357 then {
1347- let hs = eS(-(hr), -(dA), 0)
1348- let gi = hs._1
1349- let eJ = hs._2
1350- let gj = eW(eR, eJ)
1351- if ((gj == gj))
1352- then (dB ++ gi)
1358+ let hy = eX(-(hx), -(dF), 0)
1359+ let gn = hy._1
1360+ let eO = hy._2
1361+ let go = fb(eW, eO)
1362+ if ((go == go))
1363+ then (dG ++ gn)
13531364 else throw("Strict value is not equal to itself.")
13541365 }
13551366 else throw("Strict value is not equal to itself.")
13561367 }
13571368 else throw("Strict value is not equal to itself.")
13581369 }
13591370
13601371
13611372
1362-@Callable(cP)
1363-func getOneTknV2 (fL,fM) = {
1364- let hh = {
1365- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1366- if ($isInstanceOf(aS, "Boolean"))
1367- then aS
1368- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1373+@Callable(cU)
1374+func getOneTknV2 (fQ,fR) = {
1375+ let hn = {
1376+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1377+ if ($isInstanceOf(aX, "Boolean"))
1378+ then aX
1379+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
13691380 }
1370- let ht = if (if (aV())
1381+ let hz = if (if (ba())
13711382 then true
1372- else (bk == s))
1383+ else (bp == t))
13731384 then true
1374- else hh
1375- let gH = [if (if (!(ht))
1385+ else hn
1386+ let gN = [if (if (!(hz))
13761387 then true
1377- else go(cP))
1388+ else gt(cU))
13781389 then true
1379- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
1390+ else aS("get operation is blocked by admin"), if ((size(cU.payments) == 1))
13801391 then true
1381- else aN("exactly 1 payment are expected")]
1382- if ((gH == gH))
1392+ else aS("exactly 1 payment are expected")]
1393+ if ((gN == gN))
13831394 then {
1384- let hu = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId)
1385- let dB = hu._1
1386- let fV = hu._2
1387- $Tuple2(dB, fV)
1395+ let hA = fP(fQ, fR, cU.payments, cU.caller, cU.originCaller, cU.transactionId)
1396+ let dG = hA._1
1397+ let ga = hA._2
1398+ $Tuple2(dG, ga)
13881399 }
13891400 else throw("Strict value is not equal to itself.")
13901401 }
13911402
13921403
13931404
1394-@Callable(cP)
1405+@Callable(cU)
13951406 func refreshDLp () = {
1396- let hv = valueOrElse(getInteger(aq), 0)
1397- let hw = if (((height - hv) >= at))
1407+ let hB = valueOrElse(getInteger(at), 0)
1408+ let hC = if (((height - hB) >= aw))
13981409 then unit
1399- else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1400- if ((hw == hw))
1410+ else aS(makeString([toString(aw), " blocks have not passed since the previous call"], ""))
1411+ if ((hC == hC))
14011412 then {
1402- let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp"))
1403- let hx = eS(0, 0, 0)
1404- let hy = hx._1
1405- let eJ = hx._2
1406- let eV = if ((fd != eJ))
1407- then hy
1408- else aN("nothing to refresh")
1409- $Tuple2(eV, toString(eJ))
1413+ let fi = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, as), "0")), aU("invalid dLp"))
1414+ let hD = eX(0, 0, 0)
1415+ let hE = hD._1
1416+ let eO = hD._2
1417+ let fa = if ((fi != eO))
1418+ then hE
1419+ else aS("nothing to refresh")
1420+ $Tuple2(fa, toString(eO))
14101421 }
14111422 else throw("Strict value is not equal to itself.")
14121423 }
14131424
14141425
14151426
1416-@Callable(cP)
1417-func getOneTknV2READONLY (fL,hz) = {
1418- let dj = toBase58String(value(bm))
1419- let dk = toBase58String(value(bn))
1420- let di = toBase58String(value(bl))
1421- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1422- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1423- let cb = cy(cz)
1424- let ca = (cb - fraction(toBigInt(hz), cb, eI))
1425- let hA = if ((fL == dj))
1427+@Callable(cU)
1428+func getOneTknV2READONLY (fQ,hF) = {
1429+ let do = toBase58String(value(br))
1430+ let dp = toBase58String(value(bs))
1431+ let dn = toBase58String(value(bq))
1432+ let cE = [toBigInt(bS(do)), toBigInt(bS(dp))]
1433+ let eN = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dn)), "invalid lp asset").quantity)
1434+ let cg = cD(cE)
1435+ let cf = (cg - fraction(toBigInt(hF), cg, eN))
1436+ let hG = if ((fQ == do))
14261437 then 0
1427- else if ((fL == dk))
1438+ else if ((fQ == dp))
14281439 then 1
14291440 else throw("invalid out asset id")
1430- let hB = es(cz, hA, ca)
1431- let gA = (cz[hA] - hB)
1432- let gB = max([0, toInt((gA - f))])
1433- let hC = cv(gB, aT)
1434- let fU = hC._1
1435- let cx = hC._2
1436- $Tuple2(nil, $Tuple2(fU, cx))
1441+ let hH = ex(cE, hG, cf)
1442+ let gG = (cE[hG] - hH)
1443+ let gH = max([0, toInt((gG - f))])
1444+ let hI = cA(gH, aY)
1445+ let fZ = hI._1
1446+ let cC = hI._2
1447+ $Tuple2(nil, $Tuple2(fZ, cC))
14371448 }
14381449
14391450
14401451
1441-@Callable(cP)
1442-func getOneTknV2WithBonusREADONLY (fL,hz) = {
1443- let dj = toBase58String(value(bm))
1444- let dk = toBase58String(value(bn))
1445- let di = toBase58String(value(bl))
1446- let dp = bN(dj)
1447- let dr = bN(dk)
1448- let hD = {
1449- let aS = invoke(this, "getOneTknV2READONLY", [fL, hz], nil)
1450- if ($isInstanceOf(aS, "(Int, Int)"))
1451- then aS
1452- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
1452+@Callable(cU)
1453+func getOneTknV2WithBonusREADONLY (fQ,hF) = {
1454+ let do = toBase58String(value(br))
1455+ let dp = toBase58String(value(bs))
1456+ let dn = toBase58String(value(bq))
1457+ let du = bS(do)
1458+ let dw = bS(dp)
1459+ let hJ = {
1460+ let aX = invoke(this, "getOneTknV2READONLY", [fQ, hF], nil)
1461+ if ($isInstanceOf(aX, "(Int, Int)"))
1462+ then aX
1463+ else throw(($getType(aX) + " couldn't be cast to (Int, Int)"))
14531464 }
1454- let fU = hD._1
1455- let cx = hD._2
1456- let dX = dd("", di, hz, this)
1457- let dz = dX._1
1458- let dA = dX._2
1459- let hE = (dz + dA)
1460- let fJ = if ((hE == 0))
1461- then if ((fU == 0))
1465+ let fZ = hJ._1
1466+ let cC = hJ._2
1467+ let ec = di("", dn, hF, this)
1468+ let dE = ec._1
1469+ let dF = ec._2
1470+ let hK = (dE + dF)
1471+ let fO = if ((hK == 0))
1472+ then if ((fZ == 0))
14621473 then 0
14631474 else throw("bonus calculation error")
1464- else fraction((fU - hE), a, hE)
1465- $Tuple2(nil, $Tuple3(fU, cx, fJ))
1475+ else fraction((fZ - hK), a, hK)
1476+ $Tuple2(nil, $Tuple3(fZ, cC, fO))
14661477 }
14671478
14681479
14691480
1470-@Callable(cP)
1471-func getNoLess (hF,hG) = {
1472- let dX = fj(cP)
1473- let dz = dX._1
1474- let dA = dX._2
1475- let dL = dX._3
1476- let df = dX._4
1477- let dB = dX._5
1478- if ((hF > dz))
1479- then throw(((("Failed: " + toString(dz)) + " < ") + toString(hF)))
1480- else if ((hG > dA))
1481- then throw(((("Failed: " + toString(dA)) + " < ") + toString(hG)))
1481+@Callable(cU)
1482+func getNoLess (hL,hM) = {
1483+ let ec = fo(cU)
1484+ let dE = ec._1
1485+ let dF = ec._2
1486+ let dQ = ec._3
1487+ let dk = ec._4
1488+ let dG = ec._5
1489+ if ((hL > dE))
1490+ then throw(((("Failed: " + toString(dE)) + " < ") + toString(hL)))
1491+ else if ((hM > dF))
1492+ then throw(((("Failed: " + toString(dF)) + " < ") + toString(hM)))
14821493 else {
1483- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1484- if ((eR == eR))
1494+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1495+ if ((eW == eW))
14851496 then {
1486- let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1487- if ((hH == hH))
1497+ let hN = invoke(aV, "burn", [dQ], [AttachedPayment(dk, dQ)])
1498+ if ((hN == hN))
14881499 then {
1489- let hI = eS(-(dz), -(dA), 0)
1490- let gi = hI._1
1491- let eJ = hI._2
1492- let gj = eW(eR, eJ)
1493- if ((gj == gj))
1494- then (dB ++ gi)
1500+ let hO = eX(-(dE), -(dF), 0)
1501+ let gn = hO._1
1502+ let eO = hO._2
1503+ let go = fb(eW, eO)
1504+ if ((go == go))
1505+ then (dG ++ gn)
14951506 else throw("Strict value is not equal to itself.")
14961507 }
14971508 else throw("Strict value is not equal to itself.")
14981509 }
14991510 else throw("Strict value is not equal to itself.")
15001511 }
15011512 }
15021513
15031514
15041515
1505-@Callable(cP)
1506-func unstakeAndGet (cw) = {
1507- let hJ = if ((size(cP.payments) != 0))
1516+@Callable(cU)
1517+func unstakeAndGet (cB) = {
1518+ let hP = if ((size(cU.payments) != 0))
15081519 then throw("No pmnts expd")
15091520 else true
1510- if ((hJ == hJ))
1521+ if ((hP == hP))
15111522 then {
1512- let hK = bs()
1513- let gX = bl
1514- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1515- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1516- if ((eR == eR))
1523+ let hQ = bx()
1524+ let hd = bq
1525+ let hR = valueOrErrorMessage(addressFromString(hQ[D]), "Wr st addr")
1526+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1527+ if ((eW == eW))
15171528 then {
1518- let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil)
1519- if ((hM == hM))
1529+ let hS = invoke(hR, "unstake", [toBase58String(hd), cB], nil)
1530+ if ((hS == hS))
15201531 then {
1521- let dX = dd(toBase58String(cP.transactionId), toBase58String(gX), cw, cP.caller)
1522- let dz = dX._1
1523- let dA = dX._2
1524- let dn = parseIntValue(dX._9)
1525- let dB = dX._10
1526- let hN = if (if (aV())
1532+ let ec = di(toBase58String(cU.transactionId), toBase58String(hd), cB, cU.caller)
1533+ let dE = ec._1
1534+ let dF = ec._2
1535+ let ds = parseIntValue(ec._9)
1536+ let dG = ec._10
1537+ let hT = if (if (ba())
15271538 then true
1528- else (dn == s))
1529- then throw(("Blocked: " + toString(dn)))
1539+ else (ds == t))
1540+ then throw(("Blocked: " + toString(ds)))
15301541 else true
1531- if ((hN == hN))
1542+ if ((hT == hT))
15321543 then {
1533- let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)])
1534- if ((hO == hO))
1544+ let hU = invoke(aV, "burn", [cB], [AttachedPayment(hd, cB)])
1545+ if ((hU == hU))
15351546 then {
1536- let hP = eS(-(dz), -(dA), 0)
1537- let gi = hP._1
1538- let eJ = hP._2
1539- let gj = eW(eR, eJ)
1540- if ((gj == gj))
1541- then (dB ++ gi)
1547+ let hV = eX(-(dE), -(dF), 0)
1548+ let gn = hV._1
1549+ let eO = hV._2
1550+ let go = fb(eW, eO)
1551+ if ((go == go))
1552+ then (dG ++ gn)
15421553 else throw("Strict value is not equal to itself.")
15431554 }
15441555 else throw("Strict value is not equal to itself.")
15451556 }
15461557 else throw("Strict value is not equal to itself.")
15471558 }
15481559 else throw("Strict value is not equal to itself.")
15491560 }
15501561 else throw("Strict value is not equal to itself.")
15511562 }
15521563 else throw("Strict value is not equal to itself.")
15531564 }
15541565
15551566
15561567
1557-@Callable(cP)
1558-func unstakeAndGetNoLess (hQ,hR,hG) = {
1559- let ht = if (aV())
1568+@Callable(cU)
1569+func unstakeAndGetNoLess (hW,hX,hM) = {
1570+ let hz = if (ba())
15601571 then true
1561- else (bk == s)
1562- let gH = [if (!(ht))
1572+ else (bp == t)
1573+ let gN = [if (!(hz))
15631574 then true
1564- else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1575+ else throw("get operation is blocked by admin"), if ((size(cU.payments) == 0))
15651576 then true
15661577 else throw("no payments are expected")]
1567- if ((gH == gH))
1578+ if ((gN == gN))
15681579 then {
1569- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1570- if ((eR == eR))
1580+ let eW = eP(toBigInt(0), toBigInt(0), toBigInt(0))
1581+ if ((eW == eW))
15711582 then {
1572- let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil)
1573- if ((hM == hM))
1583+ let hS = invoke(bz, "unstake", [toBase58String(bq), hW], nil)
1584+ if ((hS == hS))
15741585 then {
1575- let hS = dd(toBase58String(cP.transactionId), toBase58String(bl), hQ, cP.caller)
1576- let dz = hS._1
1577- let dA = hS._2
1578- let dB = hS._10
1579- let hT = [if ((dz >= hR))
1586+ let hY = di(toBase58String(cU.transactionId), toBase58String(bq), hW, cU.caller)
1587+ let dE = hY._1
1588+ let dF = hY._2
1589+ let dG = hY._10
1590+ let hZ = [if ((dE >= hX))
15801591 then true
1581- else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG))
1592+ else throw(makeString(["amount asset amount to receive is less than ", toString(hX)], "")), if ((dF >= hM))
15821593 then true
1583- else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1584- if ((hT == hT))
1594+ else throw(makeString(["price asset amount to receive is less than ", toString(hM)], ""))]
1595+ if ((hZ == hZ))
15851596 then {
1586- let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)])
1587- if ((hH == hH))
1597+ let hN = invoke(aV, "burn", [hW], [AttachedPayment(bq, hW)])
1598+ if ((hN == hN))
15881599 then {
1589- let hU = eS(-(dz), -(dA), 0)
1590- let gi = hU._1
1591- let eJ = hU._2
1592- let gj = eW(eR, eJ)
1593- if ((gj == gj))
1594- then (dB ++ gi)
1600+ let ia = eX(-(dE), -(dF), 0)
1601+ let gn = ia._1
1602+ let eO = ia._2
1603+ let go = fb(eW, eO)
1604+ if ((go == go))
1605+ then (dG ++ gn)
15951606 else throw("Strict value is not equal to itself.")
15961607 }
15971608 else throw("Strict value is not equal to itself.")
15981609 }
15991610 else throw("Strict value is not equal to itself.")
16001611 }
16011612 else throw("Strict value is not equal to itself.")
16021613 }
16031614 else throw("Strict value is not equal to itself.")
16041615 }
16051616 else throw("Strict value is not equal to itself.")
16061617 }
16071618
16081619
16091620
1610-@Callable(cP)
1611-func unstakeAndGetOneTknV2 (hQ,fL,fM) = {
1612- let hh = {
1613- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1614- if ($isInstanceOf(aS, "Boolean"))
1615- then aS
1616- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1621+@Callable(cU)
1622+func unstakeAndGetOneTknV2 (hW,fQ,fR) = {
1623+ let hn = {
1624+ let aX = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1625+ if ($isInstanceOf(aX, "Boolean"))
1626+ then aX
1627+ else throw(($getType(aX) + " couldn't be cast to Boolean"))
16171628 }
1618- let ht = if (if (aV())
1629+ let hz = if (if (ba())
16191630 then true
1620- else (bk == s))
1631+ else (bp == t))
16211632 then true
1622- else hh
1623- let gH = [if (if (!(ht))
1633+ else hn
1634+ let gN = [if (if (!(hz))
16241635 then true
1625- else go(cP))
1636+ else gt(cU))
16261637 then true
1627- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1638+ else aS("get operation is blocked by admin"), if ((size(cU.payments) == 0))
16281639 then true
1629- else aN("no payments are expected")]
1630- if ((gH == gH))
1640+ else aS("no payments are expected")]
1641+ if ((gN == gN))
16311642 then {
1632- let hK = bs()
1633- let gX = bl
1634- let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr")
1635- let dh = cP.caller
1636- let hV = this
1637- let hM = invoke(hL, "unstakeINTERNAL", [gX, hQ, dh.bytes, hV.bytes], nil)
1638- if ((hM == hM))
1643+ let hQ = bx()
1644+ let hd = bq
1645+ let hR = valueOrErrorMessage(addressFromString(hQ[D]), "Wr st addr")
1646+ let dm = cU.caller
1647+ let ib = this
1648+ let hS = invoke(hR, "unstakeINTERNAL", [hd, hW, dm.bytes, ib.bytes], nil)
1649+ if ((hS == hS))
16391650 then {
1640- let hW = fK(fL, fM, [AttachedPayment(gX, hQ)], cP.caller, cP.originCaller, cP.transactionId)
1641- let dB = hW._1
1642- let fV = hW._2
1643- $Tuple2(dB, fV)
1651+ let ic = fP(fQ, fR, [AttachedPayment(hd, hW)], cU.caller, cU.originCaller, cU.transactionId)
1652+ let dG = ic._1
1653+ let ga = ic._2
1654+ $Tuple2(dG, ga)
16441655 }
16451656 else throw("Strict value is not equal to itself.")
16461657 }
16471658 else throw("Strict value is not equal to itself.")
16481659 }
16491660
16501661
16511662
1652-@Callable(cP)
1653-func putOneTknV2WithBonusREADONLY (hX,hY) = {
1654- let hZ = fp(hX, hY, "", "", true)
1655- let fE = hZ._1
1656- let dB = hZ._2
1657- let cx = hZ._3
1658- let fJ = hZ._4
1659- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1663+@Callable(cU)
1664+func putOneTknV2WithBonusREADONLY (id,ie) = {
1665+ let if = fu(id, ie, "", "", true)
1666+ let fJ = if._1
1667+ let dG = if._2
1668+ let cC = if._3
1669+ let fO = if._4
1670+ $Tuple2(nil, $Tuple3(fJ, cC, fO))
16601671 }
16611672
16621673
16631674
1664-@Callable(cP)
1665-func putOneTknV2WithoutTakeFeeREADONLY (hX,hY) = {
1666- let ia = fp(hX, hY, "", "", false)
1667- let fE = ia._1
1668- let dB = ia._2
1669- let cx = ia._3
1670- let fJ = ia._4
1671- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1675+@Callable(cU)
1676+func putOneTknV2WithoutTakeFeeREADONLY (id,ie) = {
1677+ let ig = fu(id, ie, "", "", false)
1678+ let fJ = ig._1
1679+ let dG = ig._2
1680+ let cC = ig._3
1681+ let fO = ig._4
1682+ $Tuple2(nil, $Tuple3(fJ, cC, fO))
16721683 }
16731684
16741685
16751686
1676-@Callable(cP)
1677-func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ)))
1687+@Callable(cU)
1688+func activate (ih,ii) = if ((toString(cU.caller) != toString(aV)))
16781689 then throw("denied")
1679- else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success")
1690+ else $Tuple2([StringEntry(ak(), ih), StringEntry(al(), ii), StringEntry(am(), toString(l))], "success")
16801691
16811692
16821693
1683-@Callable(cP)
1684-func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1685- then gn
1686- else [StringEntry(id, hN)]
1694+@Callable(cU)
1695+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bd())
16871696
16881697
16891698
1690-@Callable(cP)
1691-func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am())))
1692- then gn
1693- else [IntegerEntry(id, hN)]
1699+@Callable(cU)
1700+func getAccBalanceWrapperREADONLY (bT) = $Tuple2(nil, bS(bT))
16941701
16951702
16961703
1697-@Callable(cP)
1698-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
1699-
1700-
1701-
1702-@Callable(cP)
1703-func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
1704-
1705-
1706-
1707-@Callable(cP)
1708-func calcPricesWrapperREADONLY (ch,ci,cm) = {
1709- let ie = cl(ch, ci, cm)
1710- $Tuple2(nil, [toString(ie[0]), toString(ie[1]), toString(ie[2])])
1704+@Callable(cU)
1705+func calcPricesWrapperREADONLY (cm,cn,cr) = {
1706+ let ij = cq(cm, cn, cr)
1707+ $Tuple2(nil, [toString(ij[0]), toString(ij[1]), toString(ij[2])])
17111708 }
17121709
17131710
17141711
1715-@Callable(cP)
1716-func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if))
1712+@Callable(cU)
1713+func fromX18WrapperREADONLY (N,ik) = $Tuple2(nil, M(parseBigIntValue(N), ik))
17171714
17181715
17191716
1720-@Callable(cP)
1721-func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
1717+@Callable(cU)
1718+func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K)))
17221719
17231720
17241721
1725-@Callable(cP)
1726-func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
1722+@Callable(cU)
1723+func calcPriceBigIntWrapperREADONLY (bV,bW) = $Tuple2(nil, toString(bU(parseBigIntValue(bV), parseBigIntValue(bW))))
17271724
17281725
17291726
1730-@Callable(cP)
1731-func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,ig,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, ig, dH, dI, true, false, 0, ""))
1727+@Callable(cU)
1728+func estimatePutOperationWrapperREADONLY (dj,cb,dI,dJ,dK,dL,il,dM,dN) = $Tuple2(nil, dH(dj, cb, dI, dJ, dK, dL, il, dM, dN, true, false, 0, ""))
17321729
17331730
17341731
1735-@Callable(cP)
1736-func estimateGetOperationWrapperREADONLY (de,ih,dg,ig) = {
1737- let dX = dd(de, ih, dg, addressFromStringValue(ig))
1738- $Tuple2(nil, $Tuple10(dX._1, dX._2, dX._3, dX._4, dX._5, dX._6, dX._7, toString(dX._8), dX._9, dX._10))
1732+@Callable(cU)
1733+func estimateGetOperationWrapperREADONLY (dj,im,dl,il) = {
1734+ let ec = di(dj, im, dl, addressFromStringValue(il))
1735+ $Tuple2(nil, $Tuple10(ec._1, ec._2, ec._3, ec._4, ec._5, ec._6, ec._7, toString(ec._8), ec._9, ec._10))
17391736 }
17401737
17411738
1742-@Verifier(ii)
1743-func ij () = {
1744- let ik = {
1745- let gl = gk()
1746- if ($isInstanceOf(gl, "ByteVector"))
1739+
1740+@Callable(cU)
1741+func changeAmp () = {
1742+ let in = invoke(aV, "getChangeAmpConfigREADONLY", [toString(this)], nil)
1743+ let io = {
1744+ let gq = in
1745+ if ($isInstanceOf(gq, "List[Any]"))
17471746 then {
1748- let gp = gl
1749- gp
1747+ let ip = gq
1748+ $Tuple3({
1749+ let aX = ip[0]
1750+ if ($isInstanceOf(aX, "Int"))
1751+ then aX
1752+ else throw(($getType(aX) + " couldn't be cast to Int"))
1753+ }, {
1754+ let aX = ip[1]
1755+ if ($isInstanceOf(aX, "Int"))
1756+ then aX
1757+ else throw(($getType(aX) + " couldn't be cast to Int"))
1758+ }, {
1759+ let aX = ip[2]
1760+ if ($isInstanceOf(aX, "Int"))
1761+ then aX
1762+ else throw(($getType(aX) + " couldn't be cast to Int"))
1763+ })
17501764 }
1751- else if ($isInstanceOf(gl, "Unit"))
1752- then ii.senderPublicKey
1765+ else aS("invalid entry type")
1766+ }
1767+ let iq = io._1
1768+ let ir = io._2
1769+ let is = io._3
1770+ let it = parseIntValue(getStringValue(am()))
1771+ let iu = (it + ir)
1772+ let iv = if ((0 > ir))
1773+ then if ((is > iu))
1774+ then is
1775+ else iu
1776+ else if ((iu > is))
1777+ then is
1778+ else iu
1779+ let iw = valueOrElse(getInteger(ap()), 0)
1780+ let ix = (iw + iq)
1781+ let gN = [if ((height > ix))
1782+ then true
1783+ else aS("try again in few blocks"), if ((it != iv))
1784+ then true
1785+ else aS("already reached target")]
1786+ if ((gN == gN))
1787+ then [IntegerEntry(ap(), height), StringEntry(am(), toString(iv)), StringEntry(an(height), toString(iv))]
1788+ else throw("Strict value is not equal to itself.")
1789+ }
1790+
1791+
1792+@Verifier(iy)
1793+func iz () = {
1794+ let iA = {
1795+ let gq = gp()
1796+ if ($isInstanceOf(gq, "ByteVector"))
1797+ then {
1798+ let gu = gq
1799+ gu
1800+ }
1801+ else if ($isInstanceOf(gq, "Unit"))
1802+ then iy.senderPublicKey
17531803 else throw("Match error")
17541804 }
1755- let gl = ii
1756- if ($isInstanceOf(gl, "Order"))
1805+ let gq = iy
1806+ if ($isInstanceOf(gq, "Order"))
17571807 then {
1758- let eZ = gl
1759- let il = aW()
1760- let im = eY(eZ)
1761- let aF = im._1
1762- let aG = im._2
1763- let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey)
1764- let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], il)
1765- if (if (if (aF)
1766- then aH
1808+ let fe = gq
1809+ let iB = bb()
1810+ let iC = if (gB())
1811+ then $Tuple2(true, "")
1812+ else fd(fe)
1813+ let aK = iC._1
1814+ let aL = iC._2
1815+ let aM = sigVerify(fe.bodyBytes, fe.proofs[0], fe.senderPublicKey)
1816+ let aN = sigVerify(fe.bodyBytes, fe.proofs[1], iB)
1817+ if (if (if (aK)
1818+ then aM
17671819 else false)
1768- then aI
1820+ then aN
17691821 else false)
17701822 then true
1771- else aE(aF, aG, aH, aI)
1823+ else aJ(aK, aL, aM, aN)
17721824 }
1773- else if ($isInstanceOf(gl, "SetScriptTransaction"))
1825+ else if ($isInstanceOf(gq, "SetScriptTransaction"))
17741826 then {
1775- let cC = gl
1776- if (sigVerify(ii.bodyBytes, ii.proofs[0], ik))
1827+ let cH = gq
1828+ if (sigVerify(iy.bodyBytes, iy.proofs[0], iA))
17771829 then true
17781830 else {
1779- let in = blake2b256(value(cC.script))
1780- let io = fromBase64String(value(getString(aQ, aC())))
1781- let ip = scriptHash(this)
1782- if ((io == in))
1783- then (ip != in)
1831+ let iD = blake2b256(value(cH.script))
1832+ let iE = fromBase64String(value(getString(aV, aF())))
1833+ let iF = scriptHash(this)
1834+ if ((iE == iD))
1835+ then (iF != iD)
17841836 else false
17851837 }
17861838 }
1787- else sigVerify(ii.bodyBytes, ii.proofs[0], ik)
1839+ else sigVerify(iy.bodyBytes, iy.proofs[0], iA)
17881840 }
17891841

github/deemru/w8io/169f3d6 
807.81 ms