tx · 3eEDc483vUdNc5m5mohEr17UZNGSdaynnSA9CP2Acz6m

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.04000000 Waves

2023.02.09 22:45 [2442518] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "3eEDc483vUdNc5m5mohEr17UZNGSdaynnSA9CP2Acz6m", "fee": 4000000, "feeAssetId": null, "timestamp": 1675971917825, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "2WrpgKPtwLYtYTAYvJHXxwTBRTnjs5RJ3itqjVSRVdreUahGhBmE5qjWWQ7PQiGhE1CCRueyWrcQkqSXGRPe6buX" ], "script": "base64:BgLlKggCEgQKAgEEEgYKBAEEAQgSAwoBCBIDCgEIEgASBAoCAQQSBAoCAQQSAwoBARIAEgQKAggBEgASBAoCCAESBAoCCAESBAoCAQESAwoBARIFCgMBAQESBQoDAQgBEgQKAgEIEgQKAgEIEgQKAggIEgQKAggIEgQKAggBEgASAwoBCBIFCgMBAQESBAoCCAESBAoCAQESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyILdGVzc3R0dGluZ2ciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQ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wIIBQJmYQZwcm9vZnMAAAgFAmZhD3NlbmRlclB1YmxpY0tleQQCYUoJAPQDAwgFAmZhCWJvZHlCeXRlcwkAkQMCCAUCZmEGcHJvb2ZzAAEFAmlrAwMDBQJhRwUCYUkHBQJhSgcGCQECYUYEBQJhRwUCYUgFAmFJBQJhSgMJAAECBQJnbQIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmNEBQJnbQMJAPQDAwgFAmloCWJvZHlCeXRlcwkAkQMCCAUCaWgGcHJvb2ZzAAAFAmlqBgQCaW0JAPYDAQkBBXZhbHVlAQgFAmNEBnNjcmlwdAQCaW4JANsEAQkBBXZhbHVlAQkAnQgCBQJhUgkBAmFEAAQCaW8JAPEHAQUEdGhpcwMJAAACBQJpbgUCaW0JAQIhPQIFAmlvBQJpbQcJAPQDAwgFAmloCWJvZHlCeXRlcwkAkQMCCAUCaWgGcHJvb2ZzAAAFAmlqbhIQfA==", "height": 2442518, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3YdpRDwmRZgvUagbDG6SzXJgjkXvYsFqQYvvErrY4N9N Next: GHWTSgQfkViaSKDsv6fmsVCz5XZc2CW1a7S3ZdkAvCnV Diff:
OldNewDifferences
2323
2424 let k = "WAVES"
2525
26-let l = "100"
26+let l = 1
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 () = "%s__addonAddr"
132134
133135
134-let an = "%s__fee"
136+let ao = "%s__fee"
135137
136-let ao = valueOrElse(getInteger(this, an), G)
138+let ap = valueOrElse(getInteger(this, ao), H)
137139
138-let ap = makeString(["%s", "dLp"], n)
140+let aq = makeString(["%s", "dLp"], o)
139141
140-let aq = makeString(["%s", "dLpRefreshedHeight"], n)
142+let ar = makeString(["%s", "dLpRefreshedHeight"], o)
141143
142-let ar = makeString(["%s", "refreshDLpDelay"], n)
144+let as = makeString(["%s", "refreshDLpDelay"], o)
143145
144-let as = 30
146+let at = 30
145147
146-let at = valueOrElse(getInteger(this, ar), as)
148+let au = valueOrElse(getInteger(this, as), at)
147149
148-func au () = "%s__factoryConfig"
150+func av () = "%s__factoryConfig"
149151
150152
151-func av () = "%s%s__matcher__publicKey"
153+func aw () = "%s%s__matcher__publicKey"
152154
153155
154-func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
156+func ax (ay,az) = (((("%d%d%s__" + ay) + "__") + az) + "__config")
155157
156158
157-func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
159+func aA (aB) = ("%s%s%s__mappings__baseAsset2internalId__" + aB)
158160
159161
160-func aB () = "%s__shutdown"
162+func aC () = "%s__shutdown"
161163
162164
163-func aC () = "%s__allowedLpStableScriptHash"
165+func aD () = "%s__allowedLpStableScriptHash"
164166
165167
166-func aD () = "%s__feeCollectorAddress"
168+func aE () = "%s__feeCollectorAddress"
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 aF (aG,aH,aI,aJ) = throw((((((((("order validation failed: orderValid=" + toString(aG)) + " (") + aH) + ")") + " senderValid=") + toString(aI)) + " matcherValid=") + toString(aJ)))
170172
171173
172-func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
174+func aK (aL,aM) = valueOrErrorMessage(getString(aL, aM), makeString(["mandatory ", toString(aL), ".", aM, " not defined"], ""))
173175
174176
175-func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
177+func aN (aL,aM) = valueOrErrorMessage(getInteger(aL, aM), makeString(["mandatory ", toString(aL), ".", aM, " not defined"], ""))
176178
177179
178-func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
180+func aO (aP) = throw(makeString(["lp_stable.ride:", aP], " "))
179181
180182
181-func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
183+func aQ (aP) = makeString(["lp_stable.ride:", aP], " ")
182184
183185
184-let aQ = addressFromStringValue(aJ(this, Y()))
186+let aR = addressFromStringValue(aK(this, Z()))
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+let aS = {
189+ let aT = invoke(aR, "getInFeeREADONLY", [toString(this)], nil)
190+ if ($isInstanceOf(aT, "Int"))
191+ then aT
192+ else throw(($getType(aT) + " couldn't be cast to Int"))
191193 }
192194
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"))
195+let aU = {
196+ let aT = invoke(aR, "getOutFeeREADONLY", [toString(this)], nil)
197+ if ($isInstanceOf(aT, "Int"))
198+ then aT
199+ else throw(($getType(aT) + " couldn't be cast to Int"))
198200 }
199201
200-let aU = aJ(this, al())
202+let aV = aK(this, am())
201203
202-func aV () = valueOrElse(getBoolean(aQ, aB()), false)
204+func aW () = valueOrElse(getBoolean(aR, aC()), false)
203205
204206
205-func aW () = fromBase58String(aJ(aQ, av()))
207+func aX () = fromBase58String(aK(aR, aw()))
206208
207209
208-let aX = addressFromStringValue(aJ(aQ, aD()))
210+let aY = addressFromStringValue(aK(aR, aE()))
209211
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)
212+func aZ () = {
213+ let ba = aK(this, ak())
214+ let bb = aK(this, al())
215+ let bc = aN(aR, aA(bb))
216+ let ay = aN(aR, aA(ba))
217+ split(aK(aR, ax(toString(ay), toString(bc))), o)
216218 }
217219
218220
219-func bc (bd) = if ((bd == k))
221+func bd (be) = if ((be == k))
220222 then unit
221- else fromBase58String(bd)
223+ else fromBase58String(be)
222224
223225
224-func be (bd) = if ((bd == unit))
226+func bf (be) = if ((be == unit))
225227 then k
226- else toBase58String(value(bd))
228+ else toBase58String(value(be))
227229
228230
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]))
231+func bg (bh) = $Tuple9(addressFromStringValue(bh[u]), parseIntValue(bh[v]), fromBase58String(bh[w]), bd(bh[x]), bd(bh[y]), parseIntValue(bh[z]), parseIntValue(bh[A]), fromBase58String(bh[B]), fromBase58String(bh[C]))
230232
231233
232-let bh = bf(aY())
234+let bi = bg(aZ())
233235
234-let bi = bh
236+let bj = bi
235237
236-let bj = bi._1
238+let bk = bj._1
237239
238-let bk = bi._2
240+let bl = bj._2
239241
240-let bl = bi._3
242+let bm = bj._3
241243
242-let bm = bi._4
244+let bn = bj._4
243245
244-let bn = bi._5
246+let bo = bj._5
245247
246-let bo = bi._6
248+let bp = bj._6
247249
248-let bp = bi._7
250+let bq = bj._7
249251
250-let bq = bi._8
252+let br = bj._8
251253
252-let br = bi._9
254+let bs = bj._9
253255
254-func bs () = split(aJ(aQ, au()), n)
256+func bt () = split(aK(aR, av()), o)
255257
256258
257-let bt = bs()
259+let bu = bt()
258260
259-let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
261+let bv = valueOrErrorMessage(addressFromString(bu[D]), "Invalid staking contract address")
260262
261-let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
263+let bw = valueOrErrorMessage(addressFromString(bu[F]), "Invalid slipage contract address")
262264
263-let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
265+let bx = valueOrErrorMessage(addressFromString(bu[G]), "Invalid gwx contract address")
264266
265-let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
267+let by = valueOrErrorMessage(addressFromString(bu[E]), "Invalid gwx contract address")
266268
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)
269+func bz (bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ)], o)
268270
269271
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)
272+func bK (bL,bM,bN,bD,bG,bH) = makeString(["%d%d%d%d%d%d", toString(bL), toString(bM), toString(bN), toString(bD), toString(bG), toString(bH)], o)
271273
272274
273-func bN (bO) = if ((bO == "WAVES"))
275+func bO (bP) = if ((bP == "WAVES"))
274276 then wavesBalance(this).available
275- else assetBalance(this, fromBase58String(bO))
277+ else assetBalance(this, fromBase58String(bP))
276278
277279
278-func bP (bQ,bR) = fraction(bQ, c, bR)
280+func bQ (bR,bS) = fraction(bR, c, bS)
279281
280282
281-func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
283+func bT (bR,bS,Q) = fraction(bR, c, bS, Q)
282284
283285
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]))
286+func bU (bV,bW,bX) = {
287+ let bY = fraction((bV - bW), b, bW)
288+ let bZ = ((bX - X(bY)) > d)
289+ if (!(bZ))
290+ then throw(("Big slpg: " + toString(bY)))
291+ else $Tuple2(bZ, min([bV, bW]))
290292 }
291293
292294
293-func bZ (ca,cb,cc) = {
294- let bX = fraction(cb, b, ca)
295- let cd = (cc > bX)
296- if (if (cd)
295+func ca (cb,cc,cd) = {
296+ let bY = fraction(cc, b, cb)
297+ let ce = (cd > bY)
298+ if (if (ce)
297299 then true
298- else (cb > ca))
299- then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300- else cd
300+ else (cc > cb))
301+ then throw(((((((toString(cc) + " ") + toString(cb)) + " ") + toString(bY)) + " ") + toString(cd)))
302+ else ce
301303 }
302304
303305
304-func ce (cf,cg,ch,ci) = {
305- let cj = H(ch, cf)
306- let ck = H(ci, cg)
307- bP(ck, cj)
306+func cf (cg,ch,ci,cj) = {
307+ let ck = I(ci, cg)
308+ let cl = I(cj, ch)
309+ bQ(cl, ck)
308310 }
309311
310312
311-func cl (ch,ci,cm) = {
312- let cn = bo
313+func cm (ci,cj,cn) = {
313314 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]
315+ let cp = bq
316+ let cq = cf(co, cp, ci, cj)
317+ let bS = I(ci, co)
318+ let bR = I(cj, cp)
319+ let cr = I(cn, a)
320+ let cs = bQ(bS, cr)
321+ let ct = bQ(bR, cr)
322+[cq, cs, ct]
321323 }
322324
323325
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)]
326+func cu (ci,cj,cn) = {
327+ let cv = cm(ci, cj, cn)
328+[M(cv[0], a), M(cv[1], a), M(cv[2], a)]
327329 }
328330
329331
330-func cv (cw,ao) = {
331- let cx = if ((ao == 0))
332+func cw (cx,ap) = {
333+ let cy = if ((ap == 0))
332334 then 0
333- else fraction(cw, ao, a)
334- $Tuple2((cw - cx), cx)
335+ else fraction(cx, ap, a)
336+ $Tuple2((cx - cy), cy)
335337 }
336338
337339
338-func cy (cz) = {
339- let cA = cz[0]
340- let cB = cz[1]
341- let cC = (cA + cB)
342- if ((cC == e))
340+func cz (cA) = {
341+ let cB = cA[0]
342+ let cC = cA[1]
343+ let cD = (cB + cC)
344+ if ((cD == e))
343345 then e
344346 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)))
347+ let cE = parseIntValue(aV)
348+ let cF = (cE * 2)
349+ let cv = fraction(cB, cC, f)
350+ let cG = fraction(cv, i, f)
351+ let cH = fraction(toBigInt(cF), cD, f)
352+ let cI = toBigInt((cF - 1))
353+ func cJ (cK) = {
354+ let cL = fraction(cK, cK, f)
355+ let cM = fraction(cL, cK, f)
356+ let cN = fraction(cM, f, cG)
357+ fraction((cH + fraction(cN, g, f)), cK, (fraction(cI, cK, f) + fraction(h, cN, f)))
356358 }
357359
358- func cN (cO,cP) = if (cO._2)
359- then cO
360+ func cO (cP,cQ) = if (cP._2)
361+ then cP
360362 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)
363+ let cK = cP._1
364+ let cR = cJ(cK)
365+ let cS = (cR - value(cK))
366+ let cT = if ((e > cS))
367+ then -(cS)
368+ else cS
369+ if ((f >= cT))
370+ then $Tuple2(cR, true)
371+ else $Tuple2(cR, false)
370372 }
371373
372- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
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])
374+ let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
375+ let cV = {
376+ let cW = cU
377+ let cX = size(cW)
378+ let cY = $Tuple2(cD, false)
379+ func cZ (da,db) = if ((db >= cX))
380+ then da
381+ else cO(da, cW[db])
380382
381- func db (cZ,da) = if ((da >= cW))
382- then cZ
383+ func dc (da,db) = if ((db >= cX))
384+ then da
383385 else throw("List size exceeds 15")
384386
385- 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)
387+ dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
386388 }
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)))
389+ let cK = cV._1
390+ let dd = cV._2
391+ if (dd)
392+ then cK
393+ else throw(("D calculation error, D = " + toString(cK)))
392394 }
393395 }
394396
395397
396-func dd (de,df,dg,dh) = {
397- let di = bl
398- let dj = toBase58String(value(bm))
398+func de (df,dg,dh,di) = {
399+ let dj = bm
399400 let dk = toBase58String(value(bn))
400- let dl = bo
401+ let dl = toBase58String(value(bo))
401402 let dm = bp
402- let dn = toString(bk)
403- let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity
404- if ((toBase58String(di) != df))
403+ let dn = bq
404+ let do = toString(bl)
405+ let dp = valueOrErrorMessage(assetInfo(dj), "Wrong LP id").quantity
406+ if ((toBase58String(dj) != dg))
405407 then throw("Wrong pmt asset")
406408 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 == ""))
409+ let dq = bO(dk)
410+ let dr = I(dq, dm)
411+ let ds = bO(dl)
412+ let dt = I(ds, dn)
413+ let du = bQ(dt, dr)
414+ let dv = M(du, a)
415+ let dw = I(dh, a)
416+ let dx = I(dp, a)
417+ let dy = fraction(dr, dw, dx)
418+ let dz = fraction(dt, dw, dx)
419+ let dA = P(dy, dm, FLOOR)
420+ let dB = P(dz, dn, FLOOR)
421+ let dC = if ((df == ""))
420422 then nil
421- else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
423+ else [ScriptTransfer(di, dA, if ((dk == "WAVES"))
422424 then unit
423- else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
425+ else fromBase58String(dk)), ScriptTransfer(di, dB, if ((dl == "WAVES"))
424426 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)
427+ else fromBase58String(dl)), StringEntry(aj(toString(di), df), bK(dA, dB, dh, dv, height, lastBlock.timestamp)), IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv)]
428+ $Tuple10(dA, dB, dk, dl, dq, ds, dp, du, do, dC)
427429 }
428430 }
429431
430432
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))
433+func dD (df,bX,dE,dF,dG,dH,di,dI,dJ,dK,dL,dM,dN) = {
434+ let dj = bm
434435 let dO = toBase58String(value(bn))
435- let dP = bq
436+ let dP = toBase58String(value(bo))
436437 let dQ = br
437- let dR = bo
438+ let dR = bs
438439 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)
440+ let dT = bq
441+ let do = toString(bl)
442+ let dU = valueOrErrorMessage(assetInfo(dj), "Wr lp as").quantity
443+ let dq = if (dI)
444+ then bO(dO)
445+ else if (if (dK)
446+ then (dN == dO)
445447 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)
448+ then (bO(dO) - dM)
449+ else if (dK)
450+ then bO(dO)
451+ else (bO(dO) - dE)
452+ let ds = if (dI)
453+ then bO(dP)
454+ else if (if (dK)
455+ then (dN == dP)
454456 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))
457+ then (bO(dP) - dM)
458+ else if (dK)
459+ then bO(dP)
460+ else (bO(dP) - dG)
461+ let dV = I(dE, dS)
462+ let dW = I(dG, dT)
463+ let dX = bQ(dW, dV)
464+ let dr = I(dq, dS)
465+ let dt = I(ds, dT)
466+ let cc = cz([dr, dt])
467+ let dY = if ((dU == 0))
466468 then {
467- let ca = cy([(dq + dU), (ds + dV)])
468- let dY = if ((ca > cb))
469+ let cb = cz([(dr + dV), (dt + dW)])
470+ let dZ = if ((cb > cc))
469471 then true
470472 else throw("D1 should be greater than D0")
471- if ((dY == dY))
473+ if ((dZ == dZ))
472474 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)
475+ let du = d
476+ let ea = d
477+ let cr = cb
478+ $Tuple5(M(cr, a), M(dV, dS), M(dW, dT), bQ((dt + dW), (dr + dV)), ea)
477479 }
478480 else throw("Strict value is not equal to itself.")
479481 }
480482 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)
483+ let du = bQ(dt, dr)
484+ let eb = fraction(X((du - dX)), c, du)
485+ let ea = I(bX, a)
486+ if (if (if (dL)
487+ then (du != d)
486488 else false)
487- then (ea > dZ)
489+ then (eb > ea)
488490 else false)
489- then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
491+ then throw(((("Price slippage " + toString(eb)) + " > ") + toString(ea)))
490492 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))
493+ let ec = I(dU, a)
494+ let ed = fraction(dV, bT(dt, dr, CEILING), c, CEILING)
495+ let ee = fraction(dW, c, bT(dt, dr, FLOOR), CEILING)
496+ let ef = if ((ed > dW))
497+ then $Tuple2(ee, dW)
498+ else $Tuple2(dV, ed)
499+ let eg = ef._1
500+ let eh = ef._2
501+ let cb = cz([(dr + eg), (dt + eh)])
502+ let dZ = if ((cb > cc))
501503 then true
502504 else throw("D1 should be greater than D0")
503- if ((dY == dY))
505+ if ((dZ == dZ))
504506 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)
507+ let cr = fraction(ec, (cb - cc), cc)
508+ $Tuple5(P(cr, a, FLOOR), P(eg, dS, CEILING), P(eh, dT, CEILING), du, ea)
507509 }
508510 else throw("Strict value is not equal to itself.")
509511 }
510512 }
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))
513+ let ei = dY._1
514+ let ej = dY._2
515+ let ek = dY._3
516+ let dv = M(dY._4, a)
517+ let el = M(dY._5, a)
518+ if ((0 >= ei))
517519 then throw("LP <= 0")
518520 else {
519- let el = if (!(dI))
521+ let em = if (!(dJ))
520522 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)
523+ else ei
524+ let en = (dE - ej)
525+ let eo = (dG - ek)
526+ let ep = if (if (dK)
527+ then (dN == dO)
526528 else false)
527- then $Tuple2(dL, 0)
528- else if (if (dJ)
529- then (dM == dO)
529+ then $Tuple2(dM, 0)
530+ else if (if (dK)
531+ then (dN == dP)
530532 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)
533+ then $Tuple2(0, dM)
534+ else $Tuple2(ej, ek)
535+ let eq = ep._1
536+ let er = ep._2
537+ let es = [IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv), StringEntry(ag(di, df), bz(eq, er, em, dv, bX, el, height, lastBlock.timestamp, en, eo))]
538+ $Tuple13(ei, em, dv, dq, ds, dU, dj, do, es, en, eo, dF, dH)
537539 }
538540 }
539541
540542
541-func es (cz,cP,et) = {
542- let eu = g
543- let ev = cz[if ((cP == 0))
543+func et (cA,cQ,eu) = {
544+ let ev = g
545+ let ew = cA[if ((cQ == 0))
544546 then 1
545547 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
548+ let ex = parseBigIntValue(m)
549+ let cE = (parseBigIntValue(aV) * ex)
550+ let cD = ew
551+ let cF = (cE * ev)
552+ let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cF * ev))
553+ let ez = ((cD + ((eu * ex) / cF)) - eu)
554+ func cO (cP,eA) = {
555+ let eB = cP
556+ let eC = eB._1
557+ let dd = eB._2
558+ if ((dd != unit))
559+ then cP
558560 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)
561+ let eD = (((eC * eC) + ey) / ((g * eC) + ez))
562+ let eE = Y((eD - value(eC)))
563+ if ((f >= eE))
564+ then $Tuple2(eD, eA)
565+ else $Tuple2(eD, unit)
564566 }
565567 }
566568
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])
569+ let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
570+ let eF = {
571+ let cW = cU
572+ let cX = size(cW)
573+ let cY = $Tuple2(eu, unit)
574+ func cZ (da,db) = if ((db >= cX))
575+ then da
576+ else cO(da, cW[db])
575577
576- func db (cZ,da) = if ((da >= cW))
577- then cZ
578+ func dc (da,db) = if ((db >= cX))
579+ then da
578580 else throw("List size exceeds 15")
579581
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)
582+ dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581583 }
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)))
584+ let eC = eF._1
585+ let dd = eF._2
586+ if ((dd != unit))
587+ then eC
588+ else throw(("Y calculation error, Y = " + toString(eC)))
587589 }
588590
589591
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))
592+func eG (eH,eI,eJ) = {
593+ let eK = fraction(cz([L(eH, toBigInt(bp)), L(eI, toBigInt(bq))]), c, eJ)
594+ if ((eJ == e))
593595 then e
594- else eJ
596+ else eK
595597 }
596598
597599
598-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
600+func eL (eM,eN,eO) = {
601+ let eP = (toBigInt(bO(bf(bn))) - eM)
602+ let eQ = (toBigInt(bO(bf(bo))) - eN)
603+ let eR = (toBigInt(value(assetInfo(bm)).quantity) - eO)
604+ let eS = eG(eP, eQ, eR)
605+ eS
604606 }
605607
606608
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)
609+func eT (eU,eV,eO) = {
610+ let eP = (bO(bf(bn)) + eU)
611+ let eQ = (bO(bf(bo)) + eV)
612+ let eR = (value(assetInfo(bm)).quantity + eO)
613+ let eK = eG(toBigInt(eP), toBigInt(eQ), toBigInt(eR))
614+ let eW = [IntegerEntry(ar, height), StringEntry(aq, toString(eK))]
615+ $Tuple2(eW, eK)
614616 }
615617
616618
617-func eW (eX,eJ) = if ((eJ >= eX))
619+func eX (eY,eK) = if ((eK >= eY))
618620 then true
619- else aN("updated DLp lower than current DLp")
621+ else aO("updated DLp lower than current DLp")
620622
621623
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())
624+func eZ (fa) = {
625+ let eP = bO(bf(bn))
626+ let eQ = bO(bf(bo))
627+ let fb = fa.amount
628+ let fc = fraction(fa.amount, fa.price, a, FLOOR)
629+ let fd = if ((fa.orderType == Buy))
630+ then $Tuple2(fb, -(fc))
631+ else $Tuple2(-(fb), fc)
632+ let eU = fd._1
633+ let eV = fd._2
634+ if (if (if (aW())
633635 then true
634- else (bk == r))
636+ else (bl == s))
635637 then true
636- else (bk == s))
638+ else (bl == t))
637639 then throw("Admin blocked")
638- else if (if ((eZ.assetPair.amountAsset != bm))
640+ else if (if ((fa.assetPair.amountAsset != bn))
639641 then true
640- else (eZ.assetPair.priceAsset != bn))
642+ else (fa.assetPair.priceAsset != bo))
641643 then throw("Wr assets")
642644 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)
645+ let fe = parseBigIntValue(valueOrElse(getString(this, aq), "0"))
646+ let ff = eT(eU, eV, 0)
647+ let fg = ff._1
648+ let fh = ff._2
649+ let fi = (fh >= fe)
650+ let fj = makeString(["dLp=", toString(fe), " dLpNew=", toString(fh), " amountAssetBalance=", toString(eP), " priceAssetBalance=", toString(eQ), " amountAssetBalanceDelta=", toString(eU), " priceAssetBalanceDelta=", toString(eV), " height=", toString(height)], "")
651+ $Tuple2(fi, fj)
650652 }
651653 }
652654
653655
654-func fj (cP) = if ((size(cP.payments) != 1))
656+func fk (cQ) = if ((size(cQ.payments) != 1))
655657 then throw("1 pmnt exp")
656658 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())
659+ let fl = value(cQ.payments[0])
660+ let dg = value(fl.assetId)
661+ let dM = fl.amount
662+ let dY = de(toBase58String(cQ.transactionId), toBase58String(dg), dM, cQ.caller)
663+ let dA = dY._1
664+ let dB = dY._2
665+ let do = parseIntValue(dY._9)
666+ let dC = dY._10
667+ if (if (aW())
666668 then true
667- else (dn == s))
668- then throw(("Admin blocked: " + toString(dn)))
669- else $Tuple5(dz, dA, dL, df, dB)
669+ else (do == t))
670+ then throw(("Admin blocked: " + toString(do)))
671+ else $Tuple5(dA, dB, dM, dg, dC)
670672 }
671673
672674
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())
675+func fm (fn,ai,fo,fp,bX,dJ,dK,dL,dM,dN) = {
676+ let dY = dD(ai, bX, value(fo).amount, value(fo).assetId, value(fp).amount, value(fp).assetId, fn, (ai == ""), dJ, dK, dL, dM, dN)
677+ let do = parseIntValue(dY._8)
678+ if (if (if (aW())
677679 then true
678- else (dn == q))
680+ else (do == r))
679681 then true
680- else (dn == s))
681- then throw(("Blocked:" + toString(dn)))
682- else dX
682+ else (do == t))
683+ then throw(("Blocked:" + toString(do)))
684+ else dY
683685 }
684686
685687
686-func fp (fq,df,dh,ah,fr) = {
687- let dj = toBase58String(value(bm))
688+func fq (fr,dg,di,ai,fs) = {
688689 let dk = toBase58String(value(bn))
689- let di = bl
690- let dR = bo
690+ let dl = toBase58String(value(bo))
691+ let dj = bm
691692 let dS = bp
692- let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity)
693- let fs = if ((eQ > e))
693+ let dT = bq
694+ let eR = toBigInt(valueOrErrorMessage(assetInfo(dj), "invalid lp asset").quantity)
695+ let ft = if ((eR > e))
694696 then true
695697 else throw("initial deposit requires all coins")
696- if ((fs == fs))
698+ if ((ft == ft))
697699 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))
700+ let dq = bO(dk)
701+ let ds = bO(dl)
702+ let fu = if ((ai == ""))
703+ then $Tuple2(dq, ds)
704+ else if ((dg == dk))
705+ then if ((fr > dq))
704706 then throw("invalid payment amount")
705- else $Tuple2((dp - fq), dr)
706- else if ((df == dk))
707- then if ((fq > dr))
707+ else $Tuple2((dq - fr), ds)
708+ else if ((dg == dl))
709+ then if ((fr > ds))
708710 then throw("invalid payment amount")
709- else $Tuple2(dp, (dr - fq))
711+ else $Tuple2(dq, (ds - fr))
710712 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)
713+ let fv = fu._1
714+ let fw = fu._2
715+ let fx = if ((dg == dk))
716+ then $Tuple2(fr, 0)
717+ else if ((dg == dl))
718+ then $Tuple2(0, fr)
717719 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)
720+ let fy = fx._1
721+ let fz = fx._2
722+ let fA = if (fs)
723+ then $Tuple3(cw(fy, aS)._1, cw(fz, aS)._1, cw(fr, aS)._2)
724+ else $Tuple3(fy, fz, 0)
725+ let fB = fA._1
726+ let fC = fA._2
727+ let cy = fA._3
727728 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))
729+ let fE = (fw + fC)
730+ let cc = cz([I(fv, bp), I(fw, bq)])
731+ let cb = cz([I(fD, bp), I(fE, bq)])
732+ let dZ = if ((cb > cc))
731733 then true
732734 else throw()
733- if ((dY == dY))
735+ if ((dZ == dZ))
734736 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)
737+ let fF = fraction(eR, (cb - cc), cc, FLOOR)
738+ let dv = M(bQ(I(fE, dT), I(fD, dS)), a)
739+ let es = [IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv), StringEntry(ag(di, ai), bz(fy, fz, toInt(fF), dv, 0, 0, height, lastBlock.timestamp, 0, 0))]
740+ let fG = fraction(fw, a, fv)
741+ let fH = fraction(fr, a, (fG + a))
742+ let fI = (fr - fH)
743+ let fJ = fraction(eR, toBigInt(fI), toBigInt(fw))
744+ let fK = toInt(fraction((fF - fJ), b, fJ))
745+ $Tuple4(toInt(fF), es, cy, fK)
744746 }
745747 else throw("Strict value is not equal to itself.")
746748 }
748750 }
749751
750752
751-func fK (fL,fM,fN,fm,fO,fP) = {
752- let di = toBase58String(value(bl))
753+func fL (fM,fN,fO,fn,fP,fQ) = {
753754 let dj = toBase58String(value(bm))
754755 let dk = toBase58String(value(bn))
755- let fQ = bo
756+ let dl = toBase58String(value(bo))
756757 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))
758+ let fS = bq
759+ let fT = bl
760+ let di = if ((fn == by))
761+ then fP
762+ else fn
763+ let fl = value(fO[0])
764+ let dg = value(fl.assetId)
765+ let dM = fl.amount
766+ let eS = eL(e, e, e)
767+ if ((eS == eS))
766768 then {
767- let de = toBase58String(fP)
768- if ((di != toBase58String(df)))
769+ let df = toBase58String(fQ)
770+ if ((dj != toBase58String(dg)))
769771 then throw("Wrong LP")
770772 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)"))
773+ let dq = bO(dk)
774+ let ds = bO(dl)
775+ let fU = {
776+ let aT = invoke(this, "getOneTknV2READONLY", [fM, dM], nil)
777+ if ($isInstanceOf(aT, "(Int, Int)"))
778+ then aT
779+ else throw(($getType(aT) + " couldn't be cast to (Int, Int)"))
778780 }
779- if ((fT == fT))
781+ if ((fU == fU))
780782 then {
781- let cx = fT._2
782- let fU = fT._1
783- let fV = if (if ((fM > 0))
784- then (fM > fU)
783+ let cy = fU._2
784+ let fV = fU._1
785+ let fW = if (if ((fN > 0))
786+ then (fN > fV)
785787 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))
788+ then aO(makeString(["amount to receive is less than ", toString(fN)], ""))
789+ else fV
790+ let fX = if ((fM == dk))
791+ then $Tuple4(fW, 0, ((dq - fW) - cy), ds)
792+ else if ((fM == dl))
793+ then $Tuple4(0, fW, dq, ((ds - fW) - cy))
792794 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"))
795+ let fY = fX._1
796+ let fZ = fX._2
797+ let fD = fX._3
798+ let fE = fX._4
799+ let ga = bQ(I(fE, fS), I(fD, fR))
800+ let gb = M(ga, a)
801+ let gc = if ((fM == "WAVES"))
800802 then unit
801- else fromBase58String(fL)
802- let gc = if ((cx > 0))
803- then [ScriptTransfer(aX, cx, gb)]
803+ else fromBase58String(fM)
804+ let gd = if ((cy > 0))
805+ then [ScriptTransfer(aY, cy, gc)]
804806 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))
807+ let dC = ([ScriptTransfer(di, fW, gc), StringEntry(aj(toString(di), df), bK(fY, fZ, dM, gb, height, lastBlock.timestamp)), IntegerEntry(ac(), gb), IntegerEntry(ad(height, lastBlock.timestamp), gb)] ++ gd)
808+ if ((dC == dC))
807809 then {
808- let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809- if ((gd == gd))
810+ let ge = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)])
811+ if ((ge == ge))
810812 then {
811- let ge = {
812- let gf = if ((this == aX))
813+ let gf = {
814+ let gg = if ((this == aY))
813815 then 0
814- else cx
815- let gg = if ((bc(fL) == bm))
816+ else cy
817+ let gh = if ((bd(fM) == bn))
816818 then true
817819 else false
818- if (gg)
819- then $Tuple2(-((fU + gf)), 0)
820- else $Tuple2(0, -((fU + gf)))
820+ if (gh)
821+ then $Tuple2(-((fV + gg)), 0)
822+ else $Tuple2(0, -((fV + gg)))
821823 }
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)
824+ let eU = gf._1
825+ let eV = gf._2
826+ let gi = eT(eU, eV, 0)
827+ let gj = gi._1
828+ let eK = gi._2
829+ let gk = eX(eS, eK)
830+ if ((gk == gk))
831+ then $Tuple2((dC ++ gj), fW)
830832 else throw("Strict value is not equal to itself.")
831833 }
832834 else throw("Strict value is not equal to itself.")
840842 }
841843
842844
843-func gk () = {
844- let gl = getString(Z())
845- if ($isInstanceOf(gl, "String"))
845+func gl () = {
846+ let gm = getString(aa())
847+ if ($isInstanceOf(gm, "String"))
846848 then {
847- let cC = gl
848- fromBase58String(cC)
849+ let cD = gm
850+ fromBase58String(cD)
849851 }
850- else if ($isInstanceOf(gl, "Unit"))
852+ else if ($isInstanceOf(gm, "Unit"))
851853 then unit
852854 else throw("Match error")
853855 }
854856
855857
856-func gm () = {
857- let gl = getString(aa())
858- if ($isInstanceOf(gl, "String"))
858+func gn () = {
859+ let gm = getString(ab())
860+ if ($isInstanceOf(gm, "String"))
859861 then {
860- let cC = gl
861- fromBase58String(cC)
862+ let cD = gm
863+ fromBase58String(cD)
862864 }
863- else if ($isInstanceOf(gl, "Unit"))
865+ else if ($isInstanceOf(gm, "Unit"))
864866 then unit
865867 else throw("Match error")
866868 }
867869
868870
869-let gn = throw("Permission denied")
871+let go = throw("Permission denied")
870872
871-func go (cP) = {
872- let gl = gk()
873- if ($isInstanceOf(gl, "ByteVector"))
873+func gp (cQ) = {
874+ let gm = gl()
875+ if ($isInstanceOf(gm, "ByteVector"))
874876 then {
875- let gp = gl
876- (cP.callerPublicKey == gp)
877+ let gq = gm
878+ (cQ.callerPublicKey == gq)
877879 }
878- else if ($isInstanceOf(gl, "Unit"))
879- then (cP.caller == this)
880+ else if ($isInstanceOf(gm, "Unit"))
881+ then (cQ.caller == this)
880882 else throw("Match error")
881883 }
882884
883885
884-func gq (cP) = {
885- let gl = gk()
886- if ($isInstanceOf(gl, "ByteVector"))
886+func gr (cQ) = {
887+ let gm = gl()
888+ if ($isInstanceOf(gm, "ByteVector"))
887889 then {
888- let gp = gl
889- if ((cP.callerPublicKey == gp))
890+ let gq = gm
891+ if ((cQ.callerPublicKey == gq))
890892 then true
891- else gn
893+ else go
892894 }
893- else if ($isInstanceOf(gl, "Unit"))
894- then if ((cP.caller == this))
895+ else if ($isInstanceOf(gm, "Unit"))
896+ then if ((cQ.caller == this))
895897 then true
896- else gn
898+ else go
897899 else throw("Match error")
898900 }
899901
900902
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
903+func gs (gt,eu,gu) = {
904+ let bh = aZ()
905+ let dk = bh[x]
906+ let dl = bh[y]
907+ let ev = g
908+ let ex = parseBigIntValue(m)
909+ let cE = (parseBigIntValue(aV) * ex)
910+ let cA = if ((gt == false))
911+ then [(toBigInt(bO(dk)) + gu), toBigInt(bO(dl))]
912+ else [(toBigInt(bO(dl)) + gu), toBigInt(bO(dk))]
913+ let ew = cA[0]
914+ let cD = ew
915+ let cF = (cE * ev)
916+ let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cF * ev))
917+ let ez = ((cD + ((eu * ex) / cF)) - eu)
918+ func cO (cP,eA) = {
919+ let gv = cP
920+ let eC = gv._1
921+ let dd = gv._2
922+ if ((dd != unit))
923+ then cP
922924 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)
925+ let eD = (((eC * eC) + ey) / ((g * eC) + ez))
926+ let eE = Y((eD - value(eC)))
927+ if ((f >= eE))
928+ then $Tuple2(eD, eA)
929+ else $Tuple2(eD, unit)
928930 }
929931 }
930932
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])
933+ let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
934+ let gw = {
935+ let cW = cU
936+ let cX = size(cW)
937+ let cY = $Tuple2(eu, unit)
938+ func cZ (da,db) = if ((db >= cX))
939+ then da
940+ else cO(da, cW[db])
939941
940- func db (cZ,da) = if ((da >= cW))
941- then cZ
942+ func dc (da,db) = if ((db >= cX))
943+ then da
942944 else throw("List size exceeds 15")
943945
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)
946+ dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
945947 }
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)))
948+ let eC = gw._1
949+ let dd = gw._2
950+ if ((dd != unit))
951+ then eC
952+ else throw(("Y calculation error, Y = " + toString(eC)))
951953 }
952954
953955
954-@Callable(cP)
955-func calculateAmountOutForSwapREADONLY (gw,gs) = {
956- let gx = if ((gs == false))
956+@Callable(cQ)
957+func calculateAmountOutForSwapREADONLY (gx,gt) = {
958+ let gy = if ((gt == false))
957959 then {
958- let gy = aJ(this, ak())
959- let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960- $Tuple2(gy, gt)
960+ let gz = aK(this, al())
961+ let gu = (toBigInt(bO(aK(this, ak()))) + toBigInt(gx))
962+ $Tuple2(gz, gu)
961963 }
962964 else {
963- let gy = aJ(this, aj())
964- let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965- $Tuple2(gy, gt)
965+ let gz = aK(this, ak())
966+ let gu = (toBigInt(bO(aK(this, al()))) + toBigInt(gx))
967+ $Tuple2(gz, gu)
966968 }
967- let gy = gx._1
968- let gt = gx._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 gz = ((toBigInt(bN(gy)) - eB) - toBigInt(1))
976- let gA = max([0, toInt(gz)])
977- let gB = if ((gs == false))
978- then [(toBigInt(bN(dj)) + toBigInt(gw)), (toBigInt(bN(dk)) - gz)]
979- else [(toBigInt(bN(dj)) - gz), (toBigInt(bN(dk)) + toBigInt(gw))]
980- let gC = cy(gB)
981- let dY = if ((gC >= et))
969+ let gz = gy._1
970+ let gu = gy._2
971+ let bh = aZ()
972+ let dk = bh[x]
973+ let dl = bh[y]
974+ let cA = [toBigInt(bO(dk)), toBigInt(bO(dl))]
975+ let eu = cz(cA)
976+ let eC = gs(gt, eu, toBigInt(gx))
977+ let gA = ((toBigInt(bO(gz)) - eC) - toBigInt(1))
978+ let gB = max([0, toInt(gA)])
979+ let gC = if ((gt == false))
980+ then [(toBigInt(bO(dk)) + toBigInt(gx)), (toBigInt(bO(dl)) - gA)]
981+ else [(toBigInt(bO(dk)) - gA), (toBigInt(bO(dl)) + toBigInt(gx))]
982+ let gD = cz(gC)
983+ let dZ = if ((gD >= eu))
982984 then true
983- else throw(makeString(["new D is fewer error", toString(et), toString(gC)], "__"))
984- if ((dY == dY))
985- then $Tuple2(nil, gA)
985+ else throw(makeString(["new D is fewer error", toString(eu), toString(gD)], "__"))
986+ if ((dZ == dZ))
987+ then $Tuple2(nil, gB)
986988 else throw("Strict value is not equal to itself.")
987989 }
988990
989991
990992
991-@Callable(cP)
992-func calculateAmountOutForSwapAndSendTokens (gw,gs,gD,gE) = {
993- let gF = {
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"))
993+@Callable(cQ)
994+func calculateAmountOutForSwapAndSendTokens (gx,gt,gE,gF) = {
995+ let gG = {
996+ let aT = invoke(aR, "getSwapContractREADONLY", nil, nil)
997+ if ($isInstanceOf(aT, "String"))
998+ then aT
999+ else throw(($getType(aT) + " couldn't be cast to String"))
9981000 }
999- let gG = [if ((value(cP.payments[0]).amount >= gw))
1001+ let gH = [if ((value(cQ.payments[0]).amount >= gx))
10001002 then true
1001- else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gF)))
1003+ else aO("Wrong amount"), if ((cQ.caller == addressFromStringValue(gG)))
10021004 then true
1003- else aN("Permission denied")]
1004- if ((gG == gG))
1005+ else aO("Permission denied")]
1006+ if ((gH == gH))
10051007 then {
1006- let fk = value(cP.payments[0])
1007- let gH = if ((fk.assetId == unit))
1008+ let fl = value(cQ.payments[0])
1009+ let gI = if ((fl.assetId == unit))
10081010 then toBase58String(toBytes("WAVES"))
1009- else toBase58String(value(fk.assetId))
1010- let gI = if ((gs == false))
1011+ else toBase58String(value(fl.assetId))
1012+ let gJ = if ((gt == false))
10111013 then {
1012- let gy = aJ(this, ak())
1013- let gt = (bN(gH) - value(cP.payments[0]).amount)
1014- $Tuple2(gy, gt)
1014+ let gz = aK(this, al())
1015+ let gu = (bO(gI) - value(cQ.payments[0]).amount)
1016+ $Tuple2(gz, gu)
10151017 }
10161018 else {
1017- let gy = aJ(this, aj())
1018- let gt = (bN(gH) - value(cP.payments[0]).amount)
1019- $Tuple2(gy, gt)
1019+ let gz = aK(this, ak())
1020+ let gu = (bO(gI) - value(cQ.payments[0]).amount)
1021+ $Tuple2(gz, gu)
10201022 }
1021- let gy = gI._1
1022- let gt = gI._2
1023- let bg = aY()
1024- let dj = bg[w]
1025- let dk = bg[x]
1026- let cz = if ((gs == false))
1027- then [(toBigInt(bN(dj)) - toBigInt(value(cP.payments[0]).amount)), toBigInt(bN(dk))]
1028- else [toBigInt(bN(dj)), (toBigInt(bN(dk)) - toBigInt(value(cP.payments[0]).amount))]
1029- let et = cy(cz)
1030- let eB = gr(gs, et, toBigInt(0))
1031- let gz = ((toBigInt(bN(gy)) - eB) - toBigInt(1))
1032- let gA = max([0, toInt(gz)])
1033- let gJ = if ((gA >= gD))
1023+ let gz = gJ._1
1024+ let gu = gJ._2
1025+ let bh = aZ()
1026+ let dk = bh[x]
1027+ let dl = bh[y]
1028+ let cA = if ((gt == false))
1029+ then [(toBigInt(bO(dk)) - toBigInt(value(cQ.payments[0]).amount)), toBigInt(bO(dl))]
1030+ else [toBigInt(bO(dk)), (toBigInt(bO(dl)) - toBigInt(value(cQ.payments[0]).amount))]
1031+ let eu = cz(cA)
1032+ let eC = gs(gt, eu, toBigInt(0))
1033+ let gA = ((toBigInt(bO(gz)) - eC) - toBigInt(1))
1034+ let gB = max([0, toInt(gA)])
1035+ let gK = if ((gB >= gE))
10341036 then true
10351037 else throw("Exchange result is fewer coins than expected")
1036- if ((gJ == gJ))
1038+ if ((gK == gK))
10371039 then {
1038- let gB = if ((gs == false))
1039- then [toBigInt(bN(dj)), (toBigInt(bN(dk)) - gz)]
1040- else [(toBigInt(bN(dj)) - gz), toBigInt(bN(dk))]
1041- let gC = cy(gB)
1042- let dY = if ((gC >= et))
1040+ let gC = if ((gt == false))
1041+ then [toBigInt(bO(dk)), (toBigInt(bO(dl)) - gA)]
1042+ else [(toBigInt(bO(dk)) - gA), toBigInt(bO(dl))]
1043+ let gD = cz(gC)
1044+ let dZ = if ((gD >= eu))
10431045 then true
10441046 else throw("new D is fewer error")
1045- if ((dY == dY))
1046- then $Tuple2([ScriptTransfer(addressFromStringValue(gE), gA, bc(gy))], gA)
1047+ if ((dZ == dZ))
1048+ then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bd(gz))], gB)
10471049 else throw("Strict value is not equal to itself.")
10481050 }
10491051 else throw("Strict value is not equal to itself.")
10531055
10541056
10551057
1056-@Callable(cP)
1057-func constructor (Y) = {
1058- let ex = gq(cP)
1059- if ((ex == ex))
1060- then [StringEntry(Y(), Y)]
1058+@Callable(cQ)
1059+func constructor (Z) = {
1060+ let ey = gr(cQ)
1061+ if ((ey == ey))
1062+ then [StringEntry(Z(), Z)]
10611063 else throw("Strict value is not equal to itself.")
10621064 }
10631065
10641066
10651067
1066-@Callable(cP)
1067-func setManager (gK) = {
1068- let ex = gq(cP)
1069- if ((ex == ex))
1068+@Callable(cQ)
1069+func setManager (gL) = {
1070+ let ey = gr(cQ)
1071+ if ((ey == ey))
10701072 then {
1071- let gL = fromBase58String(gK)
1072- if ((gL == gL))
1073- then [StringEntry(aa(), gK)]
1073+ let gM = fromBase58String(gL)
1074+ if ((gM == gM))
1075+ then [StringEntry(ab(), gL)]
10741076 else throw("Strict value is not equal to itself.")
10751077 }
10761078 else throw("Strict value is not equal to itself.")
10781080
10791081
10801082
1081-@Callable(cP)
1083+@Callable(cQ)
10821084 func confirmManager () = {
1083- let cu = gm()
1084- let gM = if (isDefined(cu))
1085+ let cv = gn()
1086+ let gN = if (isDefined(cv))
10851087 then true
10861088 else throw("No pending manager")
1087- if ((gM == gM))
1089+ if ((gN == gN))
10881090 then {
1089- let gN = if ((cP.callerPublicKey == value(cu)))
1091+ let gO = if ((cQ.callerPublicKey == value(cv)))
10901092 then true
10911093 else throw("You are not pending manager")
1092- if ((gN == gN))
1093- then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
1094+ if ((gO == gO))
1095+ then [StringEntry(aa(), toBase58String(value(cv))), DeleteEntry(ab())]
10941096 else throw("Strict value is not equal to itself.")
10951097 }
10961098 else throw("Strict value is not equal to itself.")
10981100
10991101
11001102
1101-@Callable(cP)
1102-func put (gO,gP) = {
1103- let gQ = bs()
1104- let gR = valueOrErrorMessage(addressFromString(gQ[C]), "Wr st addr")
1105- let gS = valueOrErrorMessage(addressFromString(gQ[E]), "Wr sl addr")
1106- if ((0 > gO))
1103+@Callable(cQ)
1104+func put (gP,gQ) = {
1105+ let gR = bt()
1106+ let gS = valueOrErrorMessage(addressFromString(gR[D]), "Wr st addr")
1107+ let gT = valueOrErrorMessage(addressFromString(gR[F]), "Wr sl addr")
1108+ if ((0 > gP))
11071109 then throw("Wrong slippage")
1108- else if ((size(cP.payments) != 2))
1110+ else if ((size(cQ.payments) != 2))
11091111 then throw("2 pmnts expd")
11101112 else {
1111- let gT = toBigInt(value(cP.payments[0]).amount)
1112- let gU = toBigInt(value(cP.payments[1]).amount)
1113- let eO = (toBigInt(bN(be(bm))) - gT)
1114- if ((eO == eO))
1113+ let gU = toBigInt(value(cQ.payments[0]).amount)
1114+ let gV = toBigInt(value(cQ.payments[1]).amount)
1115+ let eP = (toBigInt(bO(bf(bn))) - gU)
1116+ if ((eP == eP))
11151117 then {
1116- let eP = (toBigInt(bN(be(bn))) - gU)
1117- if ((eP == eP))
1118+ let eQ = (toBigInt(bO(bf(bo))) - gV)
1119+ if ((eQ == eQ))
11181120 then {
1119- let eQ = toBigInt(value(assetInfo(bl)).quantity)
1120- if ((eQ == eQ))
1121+ let eR = toBigInt(value(assetInfo(bm)).quantity)
1122+ if ((eR == eR))
11211123 then {
1122- let eR = eK(gT, gU, toBigInt(0))
1123- if ((eR == eR))
1124+ let eS = eL(gU, gV, toBigInt(0))
1125+ if ((eS == eS))
11241126 then {
1125- let gV = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gO, true, false, true, 0, "")
1126- let el = gV._2
1127- let gW = gV._7
1128- let dB = gV._9
1129- let em = gV._10
1130- let en = gV._11
1131- let dj = gV._12
1132- let dk = gV._13
1133- let dX = invoke(aQ, "emit", [el], nil)
1134- if ((dX == dX))
1127+ let gW = fm(toString(cQ.caller), toBase58String(cQ.transactionId), AttachedPayment(value(cQ.payments[0]).assetId, value(cQ.payments[0]).amount), cQ.payments[1], gP, true, false, true, 0, "")
1128+ let em = gW._2
1129+ let gX = gW._7
1130+ let dC = gW._9
1131+ let en = gW._10
1132+ let eo = gW._11
1133+ let dk = gW._12
1134+ let dl = gW._13
1135+ let dY = invoke(aR, "emit", [em], nil)
1136+ if ((dY == dY))
11351137 then {
1136- let gX = {
1137- let gl = dX
1138- if ($isInstanceOf(gl, "Address"))
1138+ let gY = {
1139+ let gm = dY
1140+ if ($isInstanceOf(gm, "Address"))
11391141 then {
1140- let gY = gl
1141- invoke(gY, "emit", [el], nil)
1142+ let gZ = gm
1143+ invoke(gZ, "emit", [em], nil)
11421144 }
11431145 else unit
11441146 }
1145- if ((gX == gX))
1147+ if ((gY == gY))
11461148 then {
1147- let gZ = if ((em > 0))
1148- then invoke(gS, "put", nil, [AttachedPayment(dj, em)])
1149+ let ha = if ((en > 0))
1150+ then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
11491151 else nil
1150- if ((gZ == gZ))
1152+ if ((ha == ha))
11511153 then {
1152- let ha = if ((en > 0))
1153- then invoke(gS, "put", nil, [AttachedPayment(dk, en)])
1154+ let hb = if ((eo > 0))
1155+ then invoke(gT, "put", nil, [AttachedPayment(dl, eo)])
11541156 else nil
1155- if ((ha == ha))
1157+ if ((hb == hb))
11561158 then {
1157- let hb = if (gP)
1159+ let hc = if (gQ)
11581160 then {
1159- let hc = invoke(gR, "stake", nil, [AttachedPayment(gW, el)])
1160- if ((hc == hc))
1161+ let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, em)])
1162+ if ((hd == hd))
11611163 then nil
11621164 else throw("Strict value is not equal to itself.")
11631165 }
1164- else [ScriptTransfer(cP.caller, el, gW)]
1165- let hd = eS(0, 0, 0)
1166- let gi = hd._1
1167- let eJ = hd._2
1168- let he = if ((eJ >= eR))
1166+ else [ScriptTransfer(cQ.caller, em, gX)]
1167+ let he = eT(0, 0, 0)
1168+ let gj = he._1
1169+ let eK = he._2
1170+ let hf = if ((eK >= eS))
11691171 then true
1170- else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " "))
1171- if ((he == he))
1172+ else aO(makeString(["updated DLp lower than current DLp", toString(eP), toString(eQ), toString(eR), toString(eS), toString(eK), toString(en), toString(eo)], " "))
1173+ if ((hf == hf))
11721174 then {
1173- let hf = value(assetInfo(bl)).quantity
1174- if ((hf == hf))
1175- then ((dB ++ hb) ++ gi)
1175+ let hg = value(assetInfo(bm)).quantity
1176+ if ((hg == hg))
1177+ then ((dC ++ hc) ++ gj)
11761178 else throw("Strict value is not equal to itself.")
11771179 }
11781180 else throw("Strict value is not equal to itself.")
11971199
11981200
11991201
1200-@Callable(cP)
1201-func putOneTknV2 (fM,gP) = {
1202- let hg = {
1203- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1204- if ($isInstanceOf(aS, "Boolean"))
1205- then aS
1206- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1202+@Callable(cQ)
1203+func putOneTknV2 (fN,gQ) = {
1204+ let hh = {
1205+ let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1206+ if ($isInstanceOf(aT, "Boolean"))
1207+ then aT
1208+ else throw(($getType(aT) + " couldn't be cast to Boolean"))
12071209 }
1208- let hh = if (if (if (aV())
1210+ let hi = if (if (if (aW())
12091211 then true
1210- else (bk == q))
1212+ else (bl == r))
12111213 then true
1212- else (bk == s))
1214+ else (bl == t))
12131215 then true
1214- else hg
1215- let gG = [if (if (!(hh))
1216+ else hh
1217+ let gH = [if (if (!(hi))
12161218 then true
1217- else go(cP))
1219+ else gp(cQ))
12181220 then true
1219- else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
1221+ else aO("put operation is blocked by admin"), if ((size(cQ.payments) == 1))
12201222 then true
1221- else aN("exactly 1 payment are expected")]
1222- if ((gG == gG))
1223+ else aO("exactly 1 payment are expected")]
1224+ if ((gH == gH))
12231225 then {
1224- let dj = toBase58String(value(bm))
12251226 let dk = toBase58String(value(bn))
1226- let di = bl
1227- let fQ = bo
1227+ let dl = toBase58String(value(bo))
1228+ let dj = bm
12281229 let fR = bp
1229- let dh = if ((cP.caller == this))
1230- then cP.originCaller
1231- else cP.caller
1232- let fk = value(cP.payments[0])
1233- let df = toBase58String(value(fk.assetId))
1234- let dL = fk.amount
1235- let eR = if ((fk.assetId == bm))
1236- then eK(toBigInt(dL), toBigInt(0), toBigInt(0))
1237- else eK(toBigInt(0), toBigInt(dL), toBigInt(0))
1238- if ((eR == eR))
1230+ let fS = bq
1231+ let di = if ((cQ.caller == this))
1232+ then cQ.originCaller
1233+ else cQ.caller
1234+ let fl = value(cQ.payments[0])
1235+ let dg = toBase58String(value(fl.assetId))
1236+ let dM = fl.amount
1237+ let eS = if ((fl.assetId == bn))
1238+ then eL(toBigInt(dM), toBigInt(0), toBigInt(0))
1239+ else eL(toBigInt(0), toBigInt(dM), toBigInt(0))
1240+ if ((eS == eS))
12391241 then {
1240- let hi = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1241- if ((hi == hi))
1242+ let hj = fq(dM, dg, toString(di), toBase58String(cQ.transactionId), true)
1243+ if ((hj == hj))
12421244 then {
1243- let cx = hi._3
1244- let dB = hi._2
1245- let hj = hi._1
1246- let el = if (if ((fM > 0))
1247- then (fM > hj)
1245+ let cy = hj._3
1246+ let dC = hj._2
1247+ let hk = hj._1
1248+ let em = if (if ((fN > 0))
1249+ then (fN > hk)
12481250 else false)
1249- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
1250- else hj
1251- let gV = invoke(aQ, "emit", [el], nil)
1252- if ((gV == gV))
1251+ then aO(makeString(["amount to receive is less than ", toString(fN)], ""))
1252+ else hk
1253+ let gW = invoke(aR, "emit", [em], nil)
1254+ if ((gW == gW))
12531255 then {
1254- let gX = {
1255- let gl = gV
1256- if ($isInstanceOf(gl, "Address"))
1256+ let gY = {
1257+ let gm = gW
1258+ if ($isInstanceOf(gm, "Address"))
12571259 then {
1258- let gY = gl
1259- invoke(gY, "emit", [el], nil)
1260+ let gZ = gm
1261+ invoke(gZ, "emit", [em], nil)
12601262 }
12611263 else unit
12621264 }
1263- if ((gX == gX))
1265+ if ((gY == gY))
12641266 then {
1265- let hb = if (gP)
1267+ let hc = if (gQ)
12661268 then {
1267- let hc = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1268- if ((hc == hc))
1269+ let hd = invoke(bv, "stake", nil, [AttachedPayment(dj, em)])
1270+ if ((hd == hd))
12691271 then nil
12701272 else throw("Strict value is not equal to itself.")
12711273 }
1272- else [ScriptTransfer(cP.caller, el, di)]
1273- let gc = if ((cx > 0))
1274- then [ScriptTransfer(aX, cx, fromBase58String(df))]
1274+ else [ScriptTransfer(cQ.caller, em, dj)]
1275+ let gd = if ((cy > 0))
1276+ then [ScriptTransfer(aY, cy, fromBase58String(dg))]
12751277 else nil
1276- let hk = if ((this == aX))
1278+ let hl = if ((this == aY))
12771279 then $Tuple2(0, 0)
12781280 else {
1279- let hl = if ((fk.assetId == bm))
1281+ let hm = if ((fl.assetId == bn))
12801282 then true
12811283 else false
1282- if (hl)
1283- then $Tuple2(-(cx), 0)
1284- else $Tuple2(0, -(cx))
1284+ if (hm)
1285+ then $Tuple2(-(cy), 0)
1286+ else $Tuple2(0, -(cy))
12851287 }
1286- let eT = hk._1
1287- let eU = hk._2
1288- let hm = eS(eT, eU, 0)
1289- let gi = hm._1
1290- let eJ = hm._2
1291- let gj = eW(eR, eJ)
1292- if ((gj == gj))
1293- then $Tuple2((((dB ++ hb) ++ gc) ++ gi), el)
1288+ let eU = hl._1
1289+ let eV = hl._2
1290+ let hn = eT(eU, eV, 0)
1291+ let gj = hn._1
1292+ let eK = hn._2
1293+ let gk = eX(eS, eK)
1294+ if ((gk == gk))
1295+ then $Tuple2((((dC ++ hc) ++ gd) ++ gj), em)
12941296 else throw("Strict value is not equal to itself.")
12951297 }
12961298 else throw("Strict value is not equal to itself.")
13061308
13071309
13081310
1309-@Callable(cP)
1310-func putForFree (hn) = if ((0 > hn))
1311+@Callable(cQ)
1312+func putForFree (ho) = if ((0 > ho))
13111313 then throw("Wrong slpg")
1312- else if ((size(cP.payments) != 2))
1314+ else if ((size(cQ.payments) != 2))
13131315 then throw("2 pmnts expd")
13141316 else {
1315- let ho = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], hn, false, false, true, 0, "")
1316- let dB = ho._9
1317- let gT = toBigInt(value(cP.payments[0]).amount)
1318- let gU = toBigInt(value(cP.payments[1]).amount)
1319- let eR = eK(gT, gU, toBigInt(0))
1320- if ((eR == eR))
1317+ let hp = fm(toString(cQ.caller), toBase58String(cQ.transactionId), AttachedPayment(value(cQ.payments[0]).assetId, value(cQ.payments[0]).amount), cQ.payments[1], ho, false, false, true, 0, "")
1318+ let dC = hp._9
1319+ let gU = toBigInt(value(cQ.payments[0]).amount)
1320+ let gV = toBigInt(value(cQ.payments[1]).amount)
1321+ let eS = eL(gU, gV, toBigInt(0))
1322+ if ((eS == eS))
13211323 then {
1322- let hp = eS(0, 0, 0)
1323- let gi = hp._1
1324- let eJ = hp._2
1325- let gj = eW(eR, eJ)
1326- if ((gj == gj))
1327- then (dB ++ gi)
1324+ let hq = eT(0, 0, 0)
1325+ let gj = hq._1
1326+ let eK = hq._2
1327+ let gk = eX(eS, eK)
1328+ if ((gk == gk))
1329+ then (dC ++ gj)
13281330 else throw("Strict value is not equal to itself.")
13291331 }
13301332 else throw("Strict value is not equal to itself.")
13321334
13331335
13341336
1335-@Callable(cP)
1337+@Callable(cQ)
13361338 func get () = {
1337- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1338- if ((eR == eR))
1339+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1340+ if ((eS == eS))
13391341 then {
1340- let dX = fj(cP)
1341- let hq = dX._1
1342- let dA = dX._2
1343- let dL = dX._3
1344- let df = dX._4
1345- let dB = dX._5
1346- let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1347- if ((ey == ey))
1342+ let dY = fk(cQ)
1343+ let hr = dY._1
1344+ let dB = dY._2
1345+ let dM = dY._3
1346+ let dg = dY._4
1347+ let dC = dY._5
1348+ let ez = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)])
1349+ if ((ez == ez))
13481350 then {
1349- let hr = eS(-(hq), -(dA), 0)
1350- let gi = hr._1
1351- let eJ = hr._2
1352- let gj = eW(eR, eJ)
1353- if ((gj == gj))
1354- then (dB ++ gi)
1351+ let hs = eT(-(hr), -(dB), 0)
1352+ let gj = hs._1
1353+ let eK = hs._2
1354+ let gk = eX(eS, eK)
1355+ if ((gk == gk))
1356+ then (dC ++ gj)
13551357 else throw("Strict value is not equal to itself.")
13561358 }
13571359 else throw("Strict value is not equal to itself.")
13611363
13621364
13631365
1364-@Callable(cP)
1365-func getOneTknV2 (fL,fM) = {
1366- let hg = {
1367- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1368- if ($isInstanceOf(aS, "Boolean"))
1369- then aS
1370- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1366+@Callable(cQ)
1367+func getOneTknV2 (fM,fN) = {
1368+ let hh = {
1369+ let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1370+ if ($isInstanceOf(aT, "Boolean"))
1371+ then aT
1372+ else throw(($getType(aT) + " couldn't be cast to Boolean"))
13711373 }
1372- let hs = if (if (aV())
1374+ let ht = if (if (aW())
13731375 then true
1374- else (bk == s))
1376+ else (bl == t))
13751377 then true
1376- else hg
1377- let gG = [if (if (!(hs))
1378+ else hh
1379+ let gH = [if (if (!(ht))
13781380 then true
1379- else go(cP))
1381+ else gp(cQ))
13801382 then true
1381- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
1383+ else aO("get operation is blocked by admin"), if ((size(cQ.payments) == 1))
13821384 then true
1383- else aN("exactly 1 payment are expected")]
1384- if ((gG == gG))
1385+ else aO("exactly 1 payment are expected")]
1386+ if ((gH == gH))
13851387 then {
1386- let ht = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId)
1387- let dB = ht._1
1388- let fV = ht._2
1389- $Tuple2(dB, fV)
1388+ let hu = fL(fM, fN, cQ.payments, cQ.caller, cQ.originCaller, cQ.transactionId)
1389+ let dC = hu._1
1390+ let fW = hu._2
1391+ $Tuple2(dC, fW)
13901392 }
13911393 else throw("Strict value is not equal to itself.")
13921394 }
13931395
13941396
13951397
1396-@Callable(cP)
1398+@Callable(cQ)
13971399 func refreshDLp () = {
1398- let hu = valueOrElse(getInteger(aq), 0)
1399- let hv = if (((height - hu) >= at))
1400+ let hv = valueOrElse(getInteger(ar), 0)
1401+ let hw = if (((height - hv) >= au))
14001402 then unit
1401- else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1402- if ((hv == hv))
1403+ else aO(makeString([toString(au), " blocks have not passed since the previous call"], ""))
1404+ if ((hw == hw))
14031405 then {
1404- let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp"))
1405- let hw = eS(0, 0, 0)
1406- let hx = hw._1
1407- let eJ = hw._2
1408- let eV = if ((fd != eJ))
1409- then hx
1410- else aN("nothing to refresh")
1411- $Tuple2(eV, toString(eJ))
1406+ let fe = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aq), "0")), aQ("invalid dLp"))
1407+ let hx = eT(0, 0, 0)
1408+ let hy = hx._1
1409+ let eK = hx._2
1410+ let eW = if ((fe != eK))
1411+ then hy
1412+ else aO("nothing to refresh")
1413+ $Tuple2(eW, toString(eK))
14121414 }
14131415 else throw("Strict value is not equal to itself.")
14141416 }
14151417
14161418
14171419
1418-@Callable(cP)
1419-func getOneTknV2READONLY (fL,hy) = {
1420+@Callable(cQ)
1421+func getOneTknV2READONLY (fM,hz) = {
1422+ let dk = toBase58String(value(bn))
1423+ let dl = toBase58String(value(bo))
14201424 let dj = toBase58String(value(bm))
1421- let dk = toBase58String(value(bn))
1422- let di = toBase58String(value(bl))
1423- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1424- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1425- let cb = cy(cz)
1426- let ca = (cb - fraction(toBigInt(hy), cb, eI))
1427- let hz = if ((fL == dj))
1425+ let cA = [toBigInt(bO(dk)), toBigInt(bO(dl))]
1426+ let eJ = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dj)), "invalid lp asset").quantity)
1427+ let cc = cz(cA)
1428+ let cb = (cc - fraction(toBigInt(hz), cc, eJ))
1429+ let hA = if ((fM == dk))
14281430 then 0
1429- else if ((fL == dk))
1431+ else if ((fM == dl))
14301432 then 1
14311433 else throw("invalid out asset id")
1432- let hA = es(cz, hz, ca)
1433- let gz = (cz[hz] - hA)
1434- let gA = max([0, toInt((gz - f))])
1435- let hB = cv(gA, aT)
1436- let fU = hB._1
1437- let cx = hB._2
1438- $Tuple2(nil, $Tuple2(fU, cx))
1434+ let hB = et(cA, hA, cb)
1435+ let gA = (cA[hA] - hB)
1436+ let gB = max([0, toInt((gA - f))])
1437+ let hC = cw(gB, aU)
1438+ let fV = hC._1
1439+ let cy = hC._2
1440+ $Tuple2(nil, $Tuple2(fV, cy))
14391441 }
14401442
14411443
14421444
1443-@Callable(cP)
1444-func getOneTknV2WithBonusREADONLY (fL,hy) = {
1445+@Callable(cQ)
1446+func getOneTknV2WithBonusREADONLY (fM,hz) = {
1447+ let dk = toBase58String(value(bn))
1448+ let dl = toBase58String(value(bo))
14451449 let dj = toBase58String(value(bm))
1446- let dk = toBase58String(value(bn))
1447- let di = toBase58String(value(bl))
1448- let dp = bN(dj)
1449- let dr = bN(dk)
1450- let hC = {
1451- let aS = invoke(this, "getOneTknV2READONLY", [fL, hy], nil)
1452- if ($isInstanceOf(aS, "(Int, Int)"))
1453- then aS
1454- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
1450+ let dq = bO(dk)
1451+ let ds = bO(dl)
1452+ let hD = {
1453+ let aT = invoke(this, "getOneTknV2READONLY", [fM, hz], nil)
1454+ if ($isInstanceOf(aT, "(Int, Int)"))
1455+ then aT
1456+ else throw(($getType(aT) + " couldn't be cast to (Int, Int)"))
14551457 }
1456- let fU = hC._1
1457- let cx = hC._2
1458- let dX = dd("", di, hy, this)
1459- let dz = dX._1
1460- let dA = dX._2
1461- let hD = (dz + dA)
1462- let fJ = if ((hD == 0))
1463- then if ((fU == 0))
1458+ let fV = hD._1
1459+ let cy = hD._2
1460+ let dY = de("", dj, hz, this)
1461+ let dA = dY._1
1462+ let dB = dY._2
1463+ let hE = (dA + dB)
1464+ let fK = if ((hE == 0))
1465+ then if ((fV == 0))
14641466 then 0
14651467 else throw("bonus calculation error")
1466- else fraction((fU - hD), a, hD)
1467- $Tuple2(nil, $Tuple3(fU, cx, fJ))
1468+ else fraction((fV - hE), a, hE)
1469+ $Tuple2(nil, $Tuple3(fV, cy, fK))
14681470 }
14691471
14701472
14711473
1472-@Callable(cP)
1473-func getNoLess (hE,hF) = {
1474- let dX = fj(cP)
1475- let dz = dX._1
1476- let dA = dX._2
1477- let dL = dX._3
1478- let df = dX._4
1479- let dB = dX._5
1480- if ((hE > dz))
1481- then throw(((("Failed: " + toString(dz)) + " < ") + toString(hE)))
1482- else if ((hF > dA))
1483- then throw(((("Failed: " + toString(dA)) + " < ") + toString(hF)))
1474+@Callable(cQ)
1475+func getNoLess (hF,hG) = {
1476+ let dY = fk(cQ)
1477+ let dA = dY._1
1478+ let dB = dY._2
1479+ let dM = dY._3
1480+ let dg = dY._4
1481+ let dC = dY._5
1482+ if ((hF > dA))
1483+ then throw(((("Failed: " + toString(dA)) + " < ") + toString(hF)))
1484+ else if ((hG > dB))
1485+ then throw(((("Failed: " + toString(dB)) + " < ") + toString(hG)))
14841486 else {
1485- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1486- if ((eR == eR))
1487+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1488+ if ((eS == eS))
14871489 then {
1488- let hG = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1489- if ((hG == hG))
1490+ let hH = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)])
1491+ if ((hH == hH))
14901492 then {
1491- let hH = eS(-(dz), -(dA), 0)
1492- let gi = hH._1
1493- let eJ = hH._2
1494- let gj = eW(eR, eJ)
1495- if ((gj == gj))
1496- then (dB ++ gi)
1493+ let hI = eT(-(dA), -(dB), 0)
1494+ let gj = hI._1
1495+ let eK = hI._2
1496+ let gk = eX(eS, eK)
1497+ if ((gk == gk))
1498+ then (dC ++ gj)
14971499 else throw("Strict value is not equal to itself.")
14981500 }
14991501 else throw("Strict value is not equal to itself.")
15041506
15051507
15061508
1507-@Callable(cP)
1508-func unstakeAndGet (cw) = {
1509- let hI = if ((size(cP.payments) != 0))
1509+@Callable(cQ)
1510+func unstakeAndGet (cx) = {
1511+ let hJ = if ((size(cQ.payments) != 0))
15101512 then throw("No pmnts expd")
15111513 else true
1512- if ((hI == hI))
1514+ if ((hJ == hJ))
15131515 then {
1514- let hJ = bs()
1515- let gW = bl
1516- let hK = valueOrErrorMessage(addressFromString(hJ[C]), "Wr st addr")
1517- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1518- if ((eR == eR))
1516+ let hK = bt()
1517+ let gX = bm
1518+ let hL = valueOrErrorMessage(addressFromString(hK[D]), "Wr st addr")
1519+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1520+ if ((eS == eS))
15191521 then {
1520- let hL = invoke(hK, "unstake", [toBase58String(gW), cw], nil)
1521- if ((hL == hL))
1522+ let hM = invoke(hL, "unstake", [toBase58String(gX), cx], nil)
1523+ if ((hM == hM))
15221524 then {
1523- let dX = dd(toBase58String(cP.transactionId), toBase58String(gW), cw, cP.caller)
1524- let dz = dX._1
1525- let dA = dX._2
1526- let dn = parseIntValue(dX._9)
1527- let dB = dX._10
1528- let hM = if (if (aV())
1525+ let dY = de(toBase58String(cQ.transactionId), toBase58String(gX), cx, cQ.caller)
1526+ let dA = dY._1
1527+ let dB = dY._2
1528+ let do = parseIntValue(dY._9)
1529+ let dC = dY._10
1530+ let hN = if (if (aW())
15291531 then true
1530- else (dn == s))
1531- then throw(("Blocked: " + toString(dn)))
1532+ else (do == t))
1533+ then throw(("Blocked: " + toString(do)))
15321534 else true
1533- if ((hM == hM))
1535+ if ((hN == hN))
15341536 then {
1535- let hN = invoke(aQ, "burn", [cw], [AttachedPayment(gW, cw)])
1536- if ((hN == hN))
1537+ let hO = invoke(aR, "burn", [cx], [AttachedPayment(gX, cx)])
1538+ if ((hO == hO))
15371539 then {
1538- let hO = eS(-(dz), -(dA), 0)
1539- let gi = hO._1
1540- let eJ = hO._2
1541- let gj = eW(eR, eJ)
1542- if ((gj == gj))
1543- then (dB ++ gi)
1540+ let hP = eT(-(dA), -(dB), 0)
1541+ let gj = hP._1
1542+ let eK = hP._2
1543+ let gk = eX(eS, eK)
1544+ if ((gk == gk))
1545+ then (dC ++ gj)
15441546 else throw("Strict value is not equal to itself.")
15451547 }
15461548 else throw("Strict value is not equal to itself.")
15561558
15571559
15581560
1559-@Callable(cP)
1560-func unstakeAndGetNoLess (hP,hQ,hF) = {
1561- let hs = if (aV())
1561+@Callable(cQ)
1562+func unstakeAndGetNoLess (hQ,hR,hG) = {
1563+ let ht = if (aW())
15621564 then true
1563- else (bk == s)
1564- let gG = [if (!(hs))
1565+ else (bl == t)
1566+ let gH = [if (!(ht))
15651567 then true
1566- else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1568+ else throw("get operation is blocked by admin"), if ((size(cQ.payments) == 0))
15671569 then true
15681570 else throw("no payments are expected")]
1569- if ((gG == gG))
1571+ if ((gH == gH))
15701572 then {
1571- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1572- if ((eR == eR))
1573+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1574+ if ((eS == eS))
15731575 then {
1574- let hL = invoke(bu, "unstake", [toBase58String(bl), hP], nil)
1575- if ((hL == hL))
1576+ let hM = invoke(bv, "unstake", [toBase58String(bm), hQ], nil)
1577+ if ((hM == hM))
15761578 then {
1577- let hR = dd(toBase58String(cP.transactionId), toBase58String(bl), hP, cP.caller)
1578- let dz = hR._1
1579- let dA = hR._2
1580- let dB = hR._10
1581- let hS = [if ((dz >= hQ))
1579+ let hS = de(toBase58String(cQ.transactionId), toBase58String(bm), hQ, cQ.caller)
1580+ let dA = hS._1
1581+ let dB = hS._2
1582+ let dC = hS._10
1583+ let hT = [if ((dA >= hR))
15821584 then true
1583- else throw(makeString(["amount asset amount to receive is less than ", toString(hQ)], "")), if ((dA >= hF))
1585+ else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dB >= hG))
15841586 then true
1585- else throw(makeString(["price asset amount to receive is less than ", toString(hF)], ""))]
1586- if ((hS == hS))
1587+ else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1588+ if ((hT == hT))
15871589 then {
1588- let hG = invoke(aQ, "burn", [hP], [AttachedPayment(bl, hP)])
1589- if ((hG == hG))
1590+ let hH = invoke(aR, "burn", [hQ], [AttachedPayment(bm, hQ)])
1591+ if ((hH == hH))
15901592 then {
1591- let hT = eS(-(dz), -(dA), 0)
1592- let gi = hT._1
1593- let eJ = hT._2
1594- let gj = eW(eR, eJ)
1595- if ((gj == gj))
1596- then (dB ++ gi)
1593+ let hU = eT(-(dA), -(dB), 0)
1594+ let gj = hU._1
1595+ let eK = hU._2
1596+ let gk = eX(eS, eK)
1597+ if ((gk == gk))
1598+ then (dC ++ gj)
15971599 else throw("Strict value is not equal to itself.")
15981600 }
15991601 else throw("Strict value is not equal to itself.")
16091611
16101612
16111613
1612-@Callable(cP)
1613-func unstakeAndGetOneTknV2 (hP,fL,fM) = {
1614- let hg = {
1615- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1616- if ($isInstanceOf(aS, "Boolean"))
1617- then aS
1618- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1614+@Callable(cQ)
1615+func unstakeAndGetOneTknV2 (hQ,fM,fN) = {
1616+ let hh = {
1617+ let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1618+ if ($isInstanceOf(aT, "Boolean"))
1619+ then aT
1620+ else throw(($getType(aT) + " couldn't be cast to Boolean"))
16191621 }
1620- let hs = if (if (aV())
1622+ let ht = if (if (aW())
16211623 then true
1622- else (bk == s))
1624+ else (bl == t))
16231625 then true
1624- else hg
1625- let gG = [if (if (!(hs))
1626+ else hh
1627+ let gH = [if (if (!(ht))
16261628 then true
1627- else go(cP))
1629+ else gp(cQ))
16281630 then true
1629- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1631+ else aO("get operation is blocked by admin"), if ((size(cQ.payments) == 0))
16301632 then true
1631- else aN("no payments are expected")]
1632- if ((gG == gG))
1633+ else aO("no payments are expected")]
1634+ if ((gH == gH))
16331635 then {
1634- let hJ = bs()
1635- let gW = bl
1636- let hK = valueOrErrorMessage(addressFromString(hJ[C]), "Wr st addr")
1637- let hL = invoke(hK, "unstake", [toBase58String(gW), hP], nil)
1638- if ((hL == hL))
1636+ let hK = bt()
1637+ let gX = bm
1638+ let hL = valueOrErrorMessage(addressFromString(hK[D]), "Wr st addr")
1639+ let hM = invoke(hL, "unstake", [toBase58String(gX), hQ], nil)
1640+ if ((hM == hM))
16391641 then {
1640- let hU = fK(fL, fM, [AttachedPayment(gW, hP)], cP.caller, cP.originCaller, cP.transactionId)
1641- let dB = hU._1
1642- let fV = hU._2
1643- $Tuple2(dB, fV)
1642+ let hV = fL(fM, fN, [AttachedPayment(gX, hQ)], cQ.caller, cQ.originCaller, cQ.transactionId)
1643+ let dC = hV._1
1644+ let fW = hV._2
1645+ $Tuple2(dC, fW)
16441646 }
16451647 else throw("Strict value is not equal to itself.")
16461648 }
16491651
16501652
16511653
1652-@Callable(cP)
1653-func putOneTknV2WithBonusREADONLY (hV,hW) = {
1654- let hX = fp(hV, hW, "", "", true)
1655- let fE = hX._1
1656- let dB = hX._2
1657- let cx = hX._3
1658- let fJ = hX._4
1659- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1654+@Callable(cQ)
1655+func putOneTknV2WithBonusREADONLY (hW,hX) = {
1656+ let hY = fq(hW, hX, "", "", true)
1657+ let fF = hY._1
1658+ let dC = hY._2
1659+ let cy = hY._3
1660+ let fK = hY._4
1661+ $Tuple2(nil, $Tuple3(fF, cy, fK))
16601662 }
16611663
16621664
16631665
1664-@Callable(cP)
1665-func putOneTknV2WithoutTakeFeeREADONLY (hV,hW) = {
1666- let hY = fp(hV, hW, "", "", false)
1667- let fE = hY._1
1668- let dB = hY._2
1669- let cx = hY._3
1670- let fJ = hY._4
1671- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1666+@Callable(cQ)
1667+func putOneTknV2WithoutTakeFeeREADONLY (hW,hX) = {
1668+ let hZ = fq(hW, hX, "", "", false)
1669+ let fF = hZ._1
1670+ let dC = hZ._2
1671+ let cy = hZ._3
1672+ let fK = hZ._4
1673+ $Tuple2(nil, $Tuple3(fF, cy, fK))
16721674 }
16731675
16741676
16751677
1676-@Callable(cP)
1677-func activate (hZ,ia) = if ((toString(cP.caller) != toString(aQ)))
1678+@Callable(cQ)
1679+func activate (ia,ib) = if ((toString(cQ.caller) != toString(aR)))
16781680 then throw("denied")
1679- else $Tuple2([StringEntry(aj(), hZ), StringEntry(ak(), ia)], "success")
1681+ else $Tuple2([StringEntry(ak(), ia), StringEntry(al(), ib)], "success")
16801682
16811683
16821684
1683-@Callable(cP)
1684-func setS (ib,hM) = if ((toString(cP.caller) != aJ(this, am())))
1685- then gn
1686- else [StringEntry(ib, hM)]
1685+@Callable(cQ)
1686+func setS (ic,hN) = if ((toString(cQ.caller) != aK(this, an())))
1687+ then go
1688+ else [StringEntry(ic, hN)]
16871689
16881690
16891691
1690-@Callable(cP)
1691-func setI (ib,hM) = if ((toString(cP.caller) != aJ(this, am())))
1692- then gn
1693- else [IntegerEntry(ib, hM)]
1692+@Callable(cQ)
1693+func setI (ic,hN) = if ((toString(cQ.caller) != aK(this, an())))
1694+ then go
1695+ else [IntegerEntry(ic, hN)]
16941696
16951697
16961698
1697-@Callable(cP)
1698-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
1699+@Callable(cQ)
1700+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aZ())
16991701
17001702
17011703
1702-@Callable(cP)
1703-func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
1704+@Callable(cQ)
1705+func getAccBalanceWrapperREADONLY (bP) = $Tuple2(nil, bO(bP))
17041706
17051707
17061708
1707-@Callable(cP)
1708-func calcPricesWrapperREADONLY (ch,ci,cm) = {
1709- let ic = cl(ch, ci, cm)
1710- $Tuple2(nil, [toString(ic[0]), toString(ic[1]), toString(ic[2])])
1709+@Callable(cQ)
1710+func calcPricesWrapperREADONLY (ci,cj,cn) = {
1711+ let id = cm(ci, cj, cn)
1712+ $Tuple2(nil, [toString(id[0]), toString(id[1]), toString(id[2])])
17111713 }
17121714
17131715
17141716
1715-@Callable(cP)
1716-func fromX18WrapperREADONLY (M,id) = $Tuple2(nil, L(parseBigIntValue(M), id))
1717+@Callable(cQ)
1718+func fromX18WrapperREADONLY (N,ie) = $Tuple2(nil, M(parseBigIntValue(N), ie))
17171719
17181720
17191721
1720-@Callable(cP)
1721-func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
1722+@Callable(cQ)
1723+func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K)))
17221724
17231725
17241726
1725-@Callable(cP)
1726-func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
1727+@Callable(cQ)
1728+func calcPriceBigIntWrapperREADONLY (bR,bS) = $Tuple2(nil, toString(bQ(parseBigIntValue(bR), parseBigIntValue(bS))))
17271729
17281730
17291731
1730-@Callable(cP)
1731-func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,ie,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, ie, dH, dI, true, false, 0, ""))
1732+@Callable(cQ)
1733+func estimatePutOperationWrapperREADONLY (df,bX,dE,dF,dG,dH,if,dI,dJ) = $Tuple2(nil, dD(df, bX, dE, dF, dG, dH, if, dI, dJ, true, false, 0, ""))
17321734
17331735
17341736
1735-@Callable(cP)
1736-func estimateGetOperationWrapperREADONLY (de,if,dg,ie) = {
1737- let dX = dd(de, if, dg, addressFromStringValue(ie))
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))
1737+@Callable(cQ)
1738+func estimateGetOperationWrapperREADONLY (df,ig,dh,if) = {
1739+ let dY = de(df, ig, dh, addressFromStringValue(if))
1740+ $Tuple2(nil, $Tuple10(dY._1, dY._2, dY._3, dY._4, dY._5, dY._6, dY._7, toString(dY._8), dY._9, dY._10))
17391741 }
17401742
17411743
1742-@Verifier(ig)
1743-func ih () = {
1744- let ii = {
1745- let gl = gk()
1746- if ($isInstanceOf(gl, "ByteVector"))
1744+@Verifier(ih)
1745+func ii () = {
1746+ let ij = {
1747+ let gm = gl()
1748+ if ($isInstanceOf(gm, "ByteVector"))
17471749 then {
1748- let gp = gl
1749- gp
1750+ let gq = gm
1751+ gq
17501752 }
1751- else if ($isInstanceOf(gl, "Unit"))
1752- then ig.senderPublicKey
1753+ else if ($isInstanceOf(gm, "Unit"))
1754+ then ih.senderPublicKey
17531755 else throw("Match error")
17541756 }
1755- let gl = ig
1756- if ($isInstanceOf(gl, "Order"))
1757+ let gm = ih
1758+ if ($isInstanceOf(gm, "Order"))
17571759 then {
1758- let eZ = gl
1759- let ij = aW()
1760- let ik = eY(eZ)
1761- let aF = ik._1
1762- let aG = ik._2
1763- let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey)
1764- let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], ij)
1765- if (if (if (aF)
1766- then aH
1767- else false)
1760+ let fa = gm
1761+ let ik = aX()
1762+ let il = eZ(fa)
1763+ let aG = il._1
1764+ let aH = il._2
1765+ let aI = sigVerify(fa.bodyBytes, fa.proofs[0], fa.senderPublicKey)
1766+ let aJ = sigVerify(fa.bodyBytes, fa.proofs[1], ik)
1767+ if (if (if (aG)
17681768 then aI
17691769 else false)
1770+ then aJ
1771+ else false)
17701772 then true
1771- else aE(aF, aG, aH, aI)
1773+ else aF(aG, aH, aI, aJ)
17721774 }
1773- else if ($isInstanceOf(gl, "SetScriptTransaction"))
1775+ else if ($isInstanceOf(gm, "SetScriptTransaction"))
17741776 then {
1775- let cC = gl
1776- if (sigVerify(ig.bodyBytes, ig.proofs[0], ii))
1777+ let cD = gm
1778+ if (sigVerify(ih.bodyBytes, ih.proofs[0], ij))
17771779 then true
17781780 else {
1779- let il = blake2b256(value(cC.script))
1780- let im = fromBase64String(value(getString(aQ, aC())))
1781- let in = scriptHash(this)
1782- if ((im == il))
1783- then (in != il)
1781+ let im = blake2b256(value(cD.script))
1782+ let in = fromBase64String(value(getString(aR, aD())))
1783+ let io = scriptHash(this)
1784+ if ((in == im))
1785+ then (io != im)
17841786 else false
17851787 }
17861788 }
1787- else sigVerify(ig.bodyBytes, ig.proofs[0], ii)
1789+ else sigVerify(ih.bodyBytes, ih.proofs[0], ij)
17881790 }
17891791
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 = 1
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 () = "%s__addonAddr"
132134
133135
134-let an = "%s__fee"
136+let ao = "%s__fee"
135137
136-let ao = valueOrElse(getInteger(this, an), G)
138+let ap = valueOrElse(getInteger(this, ao), H)
137139
138-let ap = makeString(["%s", "dLp"], n)
140+let aq = makeString(["%s", "dLp"], o)
139141
140-let aq = makeString(["%s", "dLpRefreshedHeight"], n)
142+let ar = makeString(["%s", "dLpRefreshedHeight"], o)
141143
142-let ar = makeString(["%s", "refreshDLpDelay"], n)
144+let as = makeString(["%s", "refreshDLpDelay"], o)
143145
144-let as = 30
146+let at = 30
145147
146-let at = valueOrElse(getInteger(this, ar), as)
148+let au = valueOrElse(getInteger(this, as), at)
147149
148-func au () = "%s__factoryConfig"
150+func av () = "%s__factoryConfig"
149151
150152
151-func av () = "%s%s__matcher__publicKey"
153+func aw () = "%s%s__matcher__publicKey"
152154
153155
154-func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config")
156+func ax (ay,az) = (((("%d%d%s__" + ay) + "__") + az) + "__config")
155157
156158
157-func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA)
159+func aA (aB) = ("%s%s%s__mappings__baseAsset2internalId__" + aB)
158160
159161
160-func aB () = "%s__shutdown"
162+func aC () = "%s__shutdown"
161163
162164
163-func aC () = "%s__allowedLpStableScriptHash"
165+func aD () = "%s__allowedLpStableScriptHash"
164166
165167
166-func aD () = "%s__feeCollectorAddress"
168+func aE () = "%s__feeCollectorAddress"
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 aF (aG,aH,aI,aJ) = throw((((((((("order validation failed: orderValid=" + toString(aG)) + " (") + aH) + ")") + " senderValid=") + toString(aI)) + " matcherValid=") + toString(aJ)))
170172
171173
172-func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
174+func aK (aL,aM) = valueOrErrorMessage(getString(aL, aM), makeString(["mandatory ", toString(aL), ".", aM, " not defined"], ""))
173175
174176
175-func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], ""))
177+func aN (aL,aM) = valueOrErrorMessage(getInteger(aL, aM), makeString(["mandatory ", toString(aL), ".", aM, " not defined"], ""))
176178
177179
178-func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " "))
180+func aO (aP) = throw(makeString(["lp_stable.ride:", aP], " "))
179181
180182
181-func aP (aO) = makeString(["lp_stable.ride:", aO], " ")
183+func aQ (aP) = makeString(["lp_stable.ride:", aP], " ")
182184
183185
184-let aQ = addressFromStringValue(aJ(this, Y()))
186+let aR = addressFromStringValue(aK(this, Z()))
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+let aS = {
189+ let aT = invoke(aR, "getInFeeREADONLY", [toString(this)], nil)
190+ if ($isInstanceOf(aT, "Int"))
191+ then aT
192+ else throw(($getType(aT) + " couldn't be cast to Int"))
191193 }
192194
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"))
195+let aU = {
196+ let aT = invoke(aR, "getOutFeeREADONLY", [toString(this)], nil)
197+ if ($isInstanceOf(aT, "Int"))
198+ then aT
199+ else throw(($getType(aT) + " couldn't be cast to Int"))
198200 }
199201
200-let aU = aJ(this, al())
202+let aV = aK(this, am())
201203
202-func aV () = valueOrElse(getBoolean(aQ, aB()), false)
204+func aW () = valueOrElse(getBoolean(aR, aC()), false)
203205
204206
205-func aW () = fromBase58String(aJ(aQ, av()))
207+func aX () = fromBase58String(aK(aR, aw()))
206208
207209
208-let aX = addressFromStringValue(aJ(aQ, aD()))
210+let aY = addressFromStringValue(aK(aR, aE()))
209211
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)
212+func aZ () = {
213+ let ba = aK(this, ak())
214+ let bb = aK(this, al())
215+ let bc = aN(aR, aA(bb))
216+ let ay = aN(aR, aA(ba))
217+ split(aK(aR, ax(toString(ay), toString(bc))), o)
216218 }
217219
218220
219-func bc (bd) = if ((bd == k))
221+func bd (be) = if ((be == k))
220222 then unit
221- else fromBase58String(bd)
223+ else fromBase58String(be)
222224
223225
224-func be (bd) = if ((bd == unit))
226+func bf (be) = if ((be == unit))
225227 then k
226- else toBase58String(value(bd))
228+ else toBase58String(value(be))
227229
228230
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]))
231+func bg (bh) = $Tuple9(addressFromStringValue(bh[u]), parseIntValue(bh[v]), fromBase58String(bh[w]), bd(bh[x]), bd(bh[y]), parseIntValue(bh[z]), parseIntValue(bh[A]), fromBase58String(bh[B]), fromBase58String(bh[C]))
230232
231233
232-let bh = bf(aY())
234+let bi = bg(aZ())
233235
234-let bi = bh
236+let bj = bi
235237
236-let bj = bi._1
238+let bk = bj._1
237239
238-let bk = bi._2
240+let bl = bj._2
239241
240-let bl = bi._3
242+let bm = bj._3
241243
242-let bm = bi._4
244+let bn = bj._4
243245
244-let bn = bi._5
246+let bo = bj._5
245247
246-let bo = bi._6
248+let bp = bj._6
247249
248-let bp = bi._7
250+let bq = bj._7
249251
250-let bq = bi._8
252+let br = bj._8
251253
252-let br = bi._9
254+let bs = bj._9
253255
254-func bs () = split(aJ(aQ, au()), n)
256+func bt () = split(aK(aR, av()), o)
255257
256258
257-let bt = bs()
259+let bu = bt()
258260
259-let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address")
261+let bv = valueOrErrorMessage(addressFromString(bu[D]), "Invalid staking contract address")
260262
261-let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address")
263+let bw = valueOrErrorMessage(addressFromString(bu[F]), "Invalid slipage contract address")
262264
263-let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address")
265+let bx = valueOrErrorMessage(addressFromString(bu[G]), "Invalid gwx contract address")
264266
265-let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address")
267+let by = valueOrErrorMessage(addressFromString(bu[E]), "Invalid gwx contract address")
266268
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)
269+func bz (bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ)], o)
268270
269271
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)
272+func bK (bL,bM,bN,bD,bG,bH) = makeString(["%d%d%d%d%d%d", toString(bL), toString(bM), toString(bN), toString(bD), toString(bG), toString(bH)], o)
271273
272274
273-func bN (bO) = if ((bO == "WAVES"))
275+func bO (bP) = if ((bP == "WAVES"))
274276 then wavesBalance(this).available
275- else assetBalance(this, fromBase58String(bO))
277+ else assetBalance(this, fromBase58String(bP))
276278
277279
278-func bP (bQ,bR) = fraction(bQ, c, bR)
280+func bQ (bR,bS) = fraction(bR, c, bS)
279281
280282
281-func bS (bQ,bR,P) = fraction(bQ, c, bR, P)
283+func bT (bR,bS,Q) = fraction(bR, c, bS, Q)
282284
283285
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]))
286+func bU (bV,bW,bX) = {
287+ let bY = fraction((bV - bW), b, bW)
288+ let bZ = ((bX - X(bY)) > d)
289+ if (!(bZ))
290+ then throw(("Big slpg: " + toString(bY)))
291+ else $Tuple2(bZ, min([bV, bW]))
290292 }
291293
292294
293-func bZ (ca,cb,cc) = {
294- let bX = fraction(cb, b, ca)
295- let cd = (cc > bX)
296- if (if (cd)
295+func ca (cb,cc,cd) = {
296+ let bY = fraction(cc, b, cb)
297+ let ce = (cd > bY)
298+ if (if (ce)
297299 then true
298- else (cb > ca))
299- then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc)))
300- else cd
300+ else (cc > cb))
301+ then throw(((((((toString(cc) + " ") + toString(cb)) + " ") + toString(bY)) + " ") + toString(cd)))
302+ else ce
301303 }
302304
303305
304-func ce (cf,cg,ch,ci) = {
305- let cj = H(ch, cf)
306- let ck = H(ci, cg)
307- bP(ck, cj)
306+func cf (cg,ch,ci,cj) = {
307+ let ck = I(ci, cg)
308+ let cl = I(cj, ch)
309+ bQ(cl, ck)
308310 }
309311
310312
311-func cl (ch,ci,cm) = {
312- let cn = bo
313+func cm (ci,cj,cn) = {
313314 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]
315+ let cp = bq
316+ let cq = cf(co, cp, ci, cj)
317+ let bS = I(ci, co)
318+ let bR = I(cj, cp)
319+ let cr = I(cn, a)
320+ let cs = bQ(bS, cr)
321+ let ct = bQ(bR, cr)
322+[cq, cs, ct]
321323 }
322324
323325
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)]
326+func cu (ci,cj,cn) = {
327+ let cv = cm(ci, cj, cn)
328+[M(cv[0], a), M(cv[1], a), M(cv[2], a)]
327329 }
328330
329331
330-func cv (cw,ao) = {
331- let cx = if ((ao == 0))
332+func cw (cx,ap) = {
333+ let cy = if ((ap == 0))
332334 then 0
333- else fraction(cw, ao, a)
334- $Tuple2((cw - cx), cx)
335+ else fraction(cx, ap, a)
336+ $Tuple2((cx - cy), cy)
335337 }
336338
337339
338-func cy (cz) = {
339- let cA = cz[0]
340- let cB = cz[1]
341- let cC = (cA + cB)
342- if ((cC == e))
340+func cz (cA) = {
341+ let cB = cA[0]
342+ let cC = cA[1]
343+ let cD = (cB + cC)
344+ if ((cD == e))
343345 then e
344346 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)))
347+ let cE = parseIntValue(aV)
348+ let cF = (cE * 2)
349+ let cv = fraction(cB, cC, f)
350+ let cG = fraction(cv, i, f)
351+ let cH = fraction(toBigInt(cF), cD, f)
352+ let cI = toBigInt((cF - 1))
353+ func cJ (cK) = {
354+ let cL = fraction(cK, cK, f)
355+ let cM = fraction(cL, cK, f)
356+ let cN = fraction(cM, f, cG)
357+ fraction((cH + fraction(cN, g, f)), cK, (fraction(cI, cK, f) + fraction(h, cN, f)))
356358 }
357359
358- func cN (cO,cP) = if (cO._2)
359- then cO
360+ func cO (cP,cQ) = if (cP._2)
361+ then cP
360362 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)
363+ let cK = cP._1
364+ let cR = cJ(cK)
365+ let cS = (cR - value(cK))
366+ let cT = if ((e > cS))
367+ then -(cS)
368+ else cS
369+ if ((f >= cT))
370+ then $Tuple2(cR, true)
371+ else $Tuple2(cR, false)
370372 }
371373
372- let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
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])
374+ let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
375+ let cV = {
376+ let cW = cU
377+ let cX = size(cW)
378+ let cY = $Tuple2(cD, false)
379+ func cZ (da,db) = if ((db >= cX))
380+ then da
381+ else cO(da, cW[db])
380382
381- func db (cZ,da) = if ((da >= cW))
382- then cZ
383+ func dc (da,db) = if ((db >= cX))
384+ then da
383385 else throw("List size exceeds 15")
384386
385- 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)
387+ dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
386388 }
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)))
389+ let cK = cV._1
390+ let dd = cV._2
391+ if (dd)
392+ then cK
393+ else throw(("D calculation error, D = " + toString(cK)))
392394 }
393395 }
394396
395397
396-func dd (de,df,dg,dh) = {
397- let di = bl
398- let dj = toBase58String(value(bm))
398+func de (df,dg,dh,di) = {
399+ let dj = bm
399400 let dk = toBase58String(value(bn))
400- let dl = bo
401+ let dl = toBase58String(value(bo))
401402 let dm = bp
402- let dn = toString(bk)
403- let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity
404- if ((toBase58String(di) != df))
403+ let dn = bq
404+ let do = toString(bl)
405+ let dp = valueOrErrorMessage(assetInfo(dj), "Wrong LP id").quantity
406+ if ((toBase58String(dj) != dg))
405407 then throw("Wrong pmt asset")
406408 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 == ""))
409+ let dq = bO(dk)
410+ let dr = I(dq, dm)
411+ let ds = bO(dl)
412+ let dt = I(ds, dn)
413+ let du = bQ(dt, dr)
414+ let dv = M(du, a)
415+ let dw = I(dh, a)
416+ let dx = I(dp, a)
417+ let dy = fraction(dr, dw, dx)
418+ let dz = fraction(dt, dw, dx)
419+ let dA = P(dy, dm, FLOOR)
420+ let dB = P(dz, dn, FLOOR)
421+ let dC = if ((df == ""))
420422 then nil
421- else [ScriptTransfer(dh, dz, if ((dj == "WAVES"))
423+ else [ScriptTransfer(di, dA, if ((dk == "WAVES"))
422424 then unit
423- else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES"))
425+ else fromBase58String(dk)), ScriptTransfer(di, dB, if ((dl == "WAVES"))
424426 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)
427+ else fromBase58String(dl)), StringEntry(aj(toString(di), df), bK(dA, dB, dh, dv, height, lastBlock.timestamp)), IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv)]
428+ $Tuple10(dA, dB, dk, dl, dq, ds, dp, du, do, dC)
427429 }
428430 }
429431
430432
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))
433+func dD (df,bX,dE,dF,dG,dH,di,dI,dJ,dK,dL,dM,dN) = {
434+ let dj = bm
434435 let dO = toBase58String(value(bn))
435- let dP = bq
436+ let dP = toBase58String(value(bo))
436437 let dQ = br
437- let dR = bo
438+ let dR = bs
438439 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)
440+ let dT = bq
441+ let do = toString(bl)
442+ let dU = valueOrErrorMessage(assetInfo(dj), "Wr lp as").quantity
443+ let dq = if (dI)
444+ then bO(dO)
445+ else if (if (dK)
446+ then (dN == dO)
445447 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)
448+ then (bO(dO) - dM)
449+ else if (dK)
450+ then bO(dO)
451+ else (bO(dO) - dE)
452+ let ds = if (dI)
453+ then bO(dP)
454+ else if (if (dK)
455+ then (dN == dP)
454456 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))
457+ then (bO(dP) - dM)
458+ else if (dK)
459+ then bO(dP)
460+ else (bO(dP) - dG)
461+ let dV = I(dE, dS)
462+ let dW = I(dG, dT)
463+ let dX = bQ(dW, dV)
464+ let dr = I(dq, dS)
465+ let dt = I(ds, dT)
466+ let cc = cz([dr, dt])
467+ let dY = if ((dU == 0))
466468 then {
467- let ca = cy([(dq + dU), (ds + dV)])
468- let dY = if ((ca > cb))
469+ let cb = cz([(dr + dV), (dt + dW)])
470+ let dZ = if ((cb > cc))
469471 then true
470472 else throw("D1 should be greater than D0")
471- if ((dY == dY))
473+ if ((dZ == dZ))
472474 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)
475+ let du = d
476+ let ea = d
477+ let cr = cb
478+ $Tuple5(M(cr, a), M(dV, dS), M(dW, dT), bQ((dt + dW), (dr + dV)), ea)
477479 }
478480 else throw("Strict value is not equal to itself.")
479481 }
480482 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)
483+ let du = bQ(dt, dr)
484+ let eb = fraction(X((du - dX)), c, du)
485+ let ea = I(bX, a)
486+ if (if (if (dL)
487+ then (du != d)
486488 else false)
487- then (ea > dZ)
489+ then (eb > ea)
488490 else false)
489- then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ)))
491+ then throw(((("Price slippage " + toString(eb)) + " > ") + toString(ea)))
490492 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))
493+ let ec = I(dU, a)
494+ let ed = fraction(dV, bT(dt, dr, CEILING), c, CEILING)
495+ let ee = fraction(dW, c, bT(dt, dr, FLOOR), CEILING)
496+ let ef = if ((ed > dW))
497+ then $Tuple2(ee, dW)
498+ else $Tuple2(dV, ed)
499+ let eg = ef._1
500+ let eh = ef._2
501+ let cb = cz([(dr + eg), (dt + eh)])
502+ let dZ = if ((cb > cc))
501503 then true
502504 else throw("D1 should be greater than D0")
503- if ((dY == dY))
505+ if ((dZ == dZ))
504506 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)
507+ let cr = fraction(ec, (cb - cc), cc)
508+ $Tuple5(P(cr, a, FLOOR), P(eg, dS, CEILING), P(eh, dT, CEILING), du, ea)
507509 }
508510 else throw("Strict value is not equal to itself.")
509511 }
510512 }
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))
513+ let ei = dY._1
514+ let ej = dY._2
515+ let ek = dY._3
516+ let dv = M(dY._4, a)
517+ let el = M(dY._5, a)
518+ if ((0 >= ei))
517519 then throw("LP <= 0")
518520 else {
519- let el = if (!(dI))
521+ let em = if (!(dJ))
520522 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)
523+ else ei
524+ let en = (dE - ej)
525+ let eo = (dG - ek)
526+ let ep = if (if (dK)
527+ then (dN == dO)
526528 else false)
527- then $Tuple2(dL, 0)
528- else if (if (dJ)
529- then (dM == dO)
529+ then $Tuple2(dM, 0)
530+ else if (if (dK)
531+ then (dN == dP)
530532 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)
533+ then $Tuple2(0, dM)
534+ else $Tuple2(ej, ek)
535+ let eq = ep._1
536+ let er = ep._2
537+ let es = [IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv), StringEntry(ag(di, df), bz(eq, er, em, dv, bX, el, height, lastBlock.timestamp, en, eo))]
538+ $Tuple13(ei, em, dv, dq, ds, dU, dj, do, es, en, eo, dF, dH)
537539 }
538540 }
539541
540542
541-func es (cz,cP,et) = {
542- let eu = g
543- let ev = cz[if ((cP == 0))
543+func et (cA,cQ,eu) = {
544+ let ev = g
545+ let ew = cA[if ((cQ == 0))
544546 then 1
545547 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
548+ let ex = parseBigIntValue(m)
549+ let cE = (parseBigIntValue(aV) * ex)
550+ let cD = ew
551+ let cF = (cE * ev)
552+ let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cF * ev))
553+ let ez = ((cD + ((eu * ex) / cF)) - eu)
554+ func cO (cP,eA) = {
555+ let eB = cP
556+ let eC = eB._1
557+ let dd = eB._2
558+ if ((dd != unit))
559+ then cP
558560 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)
561+ let eD = (((eC * eC) + ey) / ((g * eC) + ez))
562+ let eE = Y((eD - value(eC)))
563+ if ((f >= eE))
564+ then $Tuple2(eD, eA)
565+ else $Tuple2(eD, unit)
564566 }
565567 }
566568
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])
569+ let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
570+ let eF = {
571+ let cW = cU
572+ let cX = size(cW)
573+ let cY = $Tuple2(eu, unit)
574+ func cZ (da,db) = if ((db >= cX))
575+ then da
576+ else cO(da, cW[db])
575577
576- func db (cZ,da) = if ((da >= cW))
577- then cZ
578+ func dc (da,db) = if ((db >= cX))
579+ then da
578580 else throw("List size exceeds 15")
579581
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)
582+ dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
581583 }
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)))
584+ let eC = eF._1
585+ let dd = eF._2
586+ if ((dd != unit))
587+ then eC
588+ else throw(("Y calculation error, Y = " + toString(eC)))
587589 }
588590
589591
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))
592+func eG (eH,eI,eJ) = {
593+ let eK = fraction(cz([L(eH, toBigInt(bp)), L(eI, toBigInt(bq))]), c, eJ)
594+ if ((eJ == e))
593595 then e
594- else eJ
596+ else eK
595597 }
596598
597599
598-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
600+func eL (eM,eN,eO) = {
601+ let eP = (toBigInt(bO(bf(bn))) - eM)
602+ let eQ = (toBigInt(bO(bf(bo))) - eN)
603+ let eR = (toBigInt(value(assetInfo(bm)).quantity) - eO)
604+ let eS = eG(eP, eQ, eR)
605+ eS
604606 }
605607
606608
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)
609+func eT (eU,eV,eO) = {
610+ let eP = (bO(bf(bn)) + eU)
611+ let eQ = (bO(bf(bo)) + eV)
612+ let eR = (value(assetInfo(bm)).quantity + eO)
613+ let eK = eG(toBigInt(eP), toBigInt(eQ), toBigInt(eR))
614+ let eW = [IntegerEntry(ar, height), StringEntry(aq, toString(eK))]
615+ $Tuple2(eW, eK)
614616 }
615617
616618
617-func eW (eX,eJ) = if ((eJ >= eX))
619+func eX (eY,eK) = if ((eK >= eY))
618620 then true
619- else aN("updated DLp lower than current DLp")
621+ else aO("updated DLp lower than current DLp")
620622
621623
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())
624+func eZ (fa) = {
625+ let eP = bO(bf(bn))
626+ let eQ = bO(bf(bo))
627+ let fb = fa.amount
628+ let fc = fraction(fa.amount, fa.price, a, FLOOR)
629+ let fd = if ((fa.orderType == Buy))
630+ then $Tuple2(fb, -(fc))
631+ else $Tuple2(-(fb), fc)
632+ let eU = fd._1
633+ let eV = fd._2
634+ if (if (if (aW())
633635 then true
634- else (bk == r))
636+ else (bl == s))
635637 then true
636- else (bk == s))
638+ else (bl == t))
637639 then throw("Admin blocked")
638- else if (if ((eZ.assetPair.amountAsset != bm))
640+ else if (if ((fa.assetPair.amountAsset != bn))
639641 then true
640- else (eZ.assetPair.priceAsset != bn))
642+ else (fa.assetPair.priceAsset != bo))
641643 then throw("Wr assets")
642644 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)
645+ let fe = parseBigIntValue(valueOrElse(getString(this, aq), "0"))
646+ let ff = eT(eU, eV, 0)
647+ let fg = ff._1
648+ let fh = ff._2
649+ let fi = (fh >= fe)
650+ let fj = makeString(["dLp=", toString(fe), " dLpNew=", toString(fh), " amountAssetBalance=", toString(eP), " priceAssetBalance=", toString(eQ), " amountAssetBalanceDelta=", toString(eU), " priceAssetBalanceDelta=", toString(eV), " height=", toString(height)], "")
651+ $Tuple2(fi, fj)
650652 }
651653 }
652654
653655
654-func fj (cP) = if ((size(cP.payments) != 1))
656+func fk (cQ) = if ((size(cQ.payments) != 1))
655657 then throw("1 pmnt exp")
656658 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())
659+ let fl = value(cQ.payments[0])
660+ let dg = value(fl.assetId)
661+ let dM = fl.amount
662+ let dY = de(toBase58String(cQ.transactionId), toBase58String(dg), dM, cQ.caller)
663+ let dA = dY._1
664+ let dB = dY._2
665+ let do = parseIntValue(dY._9)
666+ let dC = dY._10
667+ if (if (aW())
666668 then true
667- else (dn == s))
668- then throw(("Admin blocked: " + toString(dn)))
669- else $Tuple5(dz, dA, dL, df, dB)
669+ else (do == t))
670+ then throw(("Admin blocked: " + toString(do)))
671+ else $Tuple5(dA, dB, dM, dg, dC)
670672 }
671673
672674
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())
675+func fm (fn,ai,fo,fp,bX,dJ,dK,dL,dM,dN) = {
676+ let dY = dD(ai, bX, value(fo).amount, value(fo).assetId, value(fp).amount, value(fp).assetId, fn, (ai == ""), dJ, dK, dL, dM, dN)
677+ let do = parseIntValue(dY._8)
678+ if (if (if (aW())
677679 then true
678- else (dn == q))
680+ else (do == r))
679681 then true
680- else (dn == s))
681- then throw(("Blocked:" + toString(dn)))
682- else dX
682+ else (do == t))
683+ then throw(("Blocked:" + toString(do)))
684+ else dY
683685 }
684686
685687
686-func fp (fq,df,dh,ah,fr) = {
687- let dj = toBase58String(value(bm))
688+func fq (fr,dg,di,ai,fs) = {
688689 let dk = toBase58String(value(bn))
689- let di = bl
690- let dR = bo
690+ let dl = toBase58String(value(bo))
691+ let dj = bm
691692 let dS = bp
692- let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity)
693- let fs = if ((eQ > e))
693+ let dT = bq
694+ let eR = toBigInt(valueOrErrorMessage(assetInfo(dj), "invalid lp asset").quantity)
695+ let ft = if ((eR > e))
694696 then true
695697 else throw("initial deposit requires all coins")
696- if ((fs == fs))
698+ if ((ft == ft))
697699 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))
700+ let dq = bO(dk)
701+ let ds = bO(dl)
702+ let fu = if ((ai == ""))
703+ then $Tuple2(dq, ds)
704+ else if ((dg == dk))
705+ then if ((fr > dq))
704706 then throw("invalid payment amount")
705- else $Tuple2((dp - fq), dr)
706- else if ((df == dk))
707- then if ((fq > dr))
707+ else $Tuple2((dq - fr), ds)
708+ else if ((dg == dl))
709+ then if ((fr > ds))
708710 then throw("invalid payment amount")
709- else $Tuple2(dp, (dr - fq))
711+ else $Tuple2(dq, (ds - fr))
710712 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)
713+ let fv = fu._1
714+ let fw = fu._2
715+ let fx = if ((dg == dk))
716+ then $Tuple2(fr, 0)
717+ else if ((dg == dl))
718+ then $Tuple2(0, fr)
717719 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)
720+ let fy = fx._1
721+ let fz = fx._2
722+ let fA = if (fs)
723+ then $Tuple3(cw(fy, aS)._1, cw(fz, aS)._1, cw(fr, aS)._2)
724+ else $Tuple3(fy, fz, 0)
725+ let fB = fA._1
726+ let fC = fA._2
727+ let cy = fA._3
727728 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))
729+ let fE = (fw + fC)
730+ let cc = cz([I(fv, bp), I(fw, bq)])
731+ let cb = cz([I(fD, bp), I(fE, bq)])
732+ let dZ = if ((cb > cc))
731733 then true
732734 else throw()
733- if ((dY == dY))
735+ if ((dZ == dZ))
734736 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)
737+ let fF = fraction(eR, (cb - cc), cc, FLOOR)
738+ let dv = M(bQ(I(fE, dT), I(fD, dS)), a)
739+ let es = [IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv), StringEntry(ag(di, ai), bz(fy, fz, toInt(fF), dv, 0, 0, height, lastBlock.timestamp, 0, 0))]
740+ let fG = fraction(fw, a, fv)
741+ let fH = fraction(fr, a, (fG + a))
742+ let fI = (fr - fH)
743+ let fJ = fraction(eR, toBigInt(fI), toBigInt(fw))
744+ let fK = toInt(fraction((fF - fJ), b, fJ))
745+ $Tuple4(toInt(fF), es, cy, fK)
744746 }
745747 else throw("Strict value is not equal to itself.")
746748 }
747749 else throw("Strict value is not equal to itself.")
748750 }
749751
750752
751-func fK (fL,fM,fN,fm,fO,fP) = {
752- let di = toBase58String(value(bl))
753+func fL (fM,fN,fO,fn,fP,fQ) = {
753754 let dj = toBase58String(value(bm))
754755 let dk = toBase58String(value(bn))
755- let fQ = bo
756+ let dl = toBase58String(value(bo))
756757 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))
758+ let fS = bq
759+ let fT = bl
760+ let di = if ((fn == by))
761+ then fP
762+ else fn
763+ let fl = value(fO[0])
764+ let dg = value(fl.assetId)
765+ let dM = fl.amount
766+ let eS = eL(e, e, e)
767+ if ((eS == eS))
766768 then {
767- let de = toBase58String(fP)
768- if ((di != toBase58String(df)))
769+ let df = toBase58String(fQ)
770+ if ((dj != toBase58String(dg)))
769771 then throw("Wrong LP")
770772 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)"))
773+ let dq = bO(dk)
774+ let ds = bO(dl)
775+ let fU = {
776+ let aT = invoke(this, "getOneTknV2READONLY", [fM, dM], nil)
777+ if ($isInstanceOf(aT, "(Int, Int)"))
778+ then aT
779+ else throw(($getType(aT) + " couldn't be cast to (Int, Int)"))
778780 }
779- if ((fT == fT))
781+ if ((fU == fU))
780782 then {
781- let cx = fT._2
782- let fU = fT._1
783- let fV = if (if ((fM > 0))
784- then (fM > fU)
783+ let cy = fU._2
784+ let fV = fU._1
785+ let fW = if (if ((fN > 0))
786+ then (fN > fV)
785787 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))
788+ then aO(makeString(["amount to receive is less than ", toString(fN)], ""))
789+ else fV
790+ let fX = if ((fM == dk))
791+ then $Tuple4(fW, 0, ((dq - fW) - cy), ds)
792+ else if ((fM == dl))
793+ then $Tuple4(0, fW, dq, ((ds - fW) - cy))
792794 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"))
795+ let fY = fX._1
796+ let fZ = fX._2
797+ let fD = fX._3
798+ let fE = fX._4
799+ let ga = bQ(I(fE, fS), I(fD, fR))
800+ let gb = M(ga, a)
801+ let gc = if ((fM == "WAVES"))
800802 then unit
801- else fromBase58String(fL)
802- let gc = if ((cx > 0))
803- then [ScriptTransfer(aX, cx, gb)]
803+ else fromBase58String(fM)
804+ let gd = if ((cy > 0))
805+ then [ScriptTransfer(aY, cy, gc)]
804806 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))
807+ let dC = ([ScriptTransfer(di, fW, gc), StringEntry(aj(toString(di), df), bK(fY, fZ, dM, gb, height, lastBlock.timestamp)), IntegerEntry(ac(), gb), IntegerEntry(ad(height, lastBlock.timestamp), gb)] ++ gd)
808+ if ((dC == dC))
807809 then {
808- let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
809- if ((gd == gd))
810+ let ge = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)])
811+ if ((ge == ge))
810812 then {
811- let ge = {
812- let gf = if ((this == aX))
813+ let gf = {
814+ let gg = if ((this == aY))
813815 then 0
814- else cx
815- let gg = if ((bc(fL) == bm))
816+ else cy
817+ let gh = if ((bd(fM) == bn))
816818 then true
817819 else false
818- if (gg)
819- then $Tuple2(-((fU + gf)), 0)
820- else $Tuple2(0, -((fU + gf)))
820+ if (gh)
821+ then $Tuple2(-((fV + gg)), 0)
822+ else $Tuple2(0, -((fV + gg)))
821823 }
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)
824+ let eU = gf._1
825+ let eV = gf._2
826+ let gi = eT(eU, eV, 0)
827+ let gj = gi._1
828+ let eK = gi._2
829+ let gk = eX(eS, eK)
830+ if ((gk == gk))
831+ then $Tuple2((dC ++ gj), fW)
830832 else throw("Strict value is not equal to itself.")
831833 }
832834 else throw("Strict value is not equal to itself.")
833835 }
834836 else throw("Strict value is not equal to itself.")
835837 }
836838 else throw("Strict value is not equal to itself.")
837839 }
838840 }
839841 else throw("Strict value is not equal to itself.")
840842 }
841843
842844
843-func gk () = {
844- let gl = getString(Z())
845- if ($isInstanceOf(gl, "String"))
845+func gl () = {
846+ let gm = getString(aa())
847+ if ($isInstanceOf(gm, "String"))
846848 then {
847- let cC = gl
848- fromBase58String(cC)
849+ let cD = gm
850+ fromBase58String(cD)
849851 }
850- else if ($isInstanceOf(gl, "Unit"))
852+ else if ($isInstanceOf(gm, "Unit"))
851853 then unit
852854 else throw("Match error")
853855 }
854856
855857
856-func gm () = {
857- let gl = getString(aa())
858- if ($isInstanceOf(gl, "String"))
858+func gn () = {
859+ let gm = getString(ab())
860+ if ($isInstanceOf(gm, "String"))
859861 then {
860- let cC = gl
861- fromBase58String(cC)
862+ let cD = gm
863+ fromBase58String(cD)
862864 }
863- else if ($isInstanceOf(gl, "Unit"))
865+ else if ($isInstanceOf(gm, "Unit"))
864866 then unit
865867 else throw("Match error")
866868 }
867869
868870
869-let gn = throw("Permission denied")
871+let go = throw("Permission denied")
870872
871-func go (cP) = {
872- let gl = gk()
873- if ($isInstanceOf(gl, "ByteVector"))
873+func gp (cQ) = {
874+ let gm = gl()
875+ if ($isInstanceOf(gm, "ByteVector"))
874876 then {
875- let gp = gl
876- (cP.callerPublicKey == gp)
877+ let gq = gm
878+ (cQ.callerPublicKey == gq)
877879 }
878- else if ($isInstanceOf(gl, "Unit"))
879- then (cP.caller == this)
880+ else if ($isInstanceOf(gm, "Unit"))
881+ then (cQ.caller == this)
880882 else throw("Match error")
881883 }
882884
883885
884-func gq (cP) = {
885- let gl = gk()
886- if ($isInstanceOf(gl, "ByteVector"))
886+func gr (cQ) = {
887+ let gm = gl()
888+ if ($isInstanceOf(gm, "ByteVector"))
887889 then {
888- let gp = gl
889- if ((cP.callerPublicKey == gp))
890+ let gq = gm
891+ if ((cQ.callerPublicKey == gq))
890892 then true
891- else gn
893+ else go
892894 }
893- else if ($isInstanceOf(gl, "Unit"))
894- then if ((cP.caller == this))
895+ else if ($isInstanceOf(gm, "Unit"))
896+ then if ((cQ.caller == this))
895897 then true
896- else gn
898+ else go
897899 else throw("Match error")
898900 }
899901
900902
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
903+func gs (gt,eu,gu) = {
904+ let bh = aZ()
905+ let dk = bh[x]
906+ let dl = bh[y]
907+ let ev = g
908+ let ex = parseBigIntValue(m)
909+ let cE = (parseBigIntValue(aV) * ex)
910+ let cA = if ((gt == false))
911+ then [(toBigInt(bO(dk)) + gu), toBigInt(bO(dl))]
912+ else [(toBigInt(bO(dl)) + gu), toBigInt(bO(dk))]
913+ let ew = cA[0]
914+ let cD = ew
915+ let cF = (cE * ev)
916+ let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cF * ev))
917+ let ez = ((cD + ((eu * ex) / cF)) - eu)
918+ func cO (cP,eA) = {
919+ let gv = cP
920+ let eC = gv._1
921+ let dd = gv._2
922+ if ((dd != unit))
923+ then cP
922924 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)
925+ let eD = (((eC * eC) + ey) / ((g * eC) + ez))
926+ let eE = Y((eD - value(eC)))
927+ if ((f >= eE))
928+ then $Tuple2(eD, eA)
929+ else $Tuple2(eD, unit)
928930 }
929931 }
930932
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])
933+ let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
934+ let gw = {
935+ let cW = cU
936+ let cX = size(cW)
937+ let cY = $Tuple2(eu, unit)
938+ func cZ (da,db) = if ((db >= cX))
939+ then da
940+ else cO(da, cW[db])
939941
940- func db (cZ,da) = if ((da >= cW))
941- then cZ
942+ func dc (da,db) = if ((db >= cX))
943+ then da
942944 else throw("List size exceeds 15")
943945
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)
946+ dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
945947 }
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)))
948+ let eC = gw._1
949+ let dd = gw._2
950+ if ((dd != unit))
951+ then eC
952+ else throw(("Y calculation error, Y = " + toString(eC)))
951953 }
952954
953955
954-@Callable(cP)
955-func calculateAmountOutForSwapREADONLY (gw,gs) = {
956- let gx = if ((gs == false))
956+@Callable(cQ)
957+func calculateAmountOutForSwapREADONLY (gx,gt) = {
958+ let gy = if ((gt == false))
957959 then {
958- let gy = aJ(this, ak())
959- let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw))
960- $Tuple2(gy, gt)
960+ let gz = aK(this, al())
961+ let gu = (toBigInt(bO(aK(this, ak()))) + toBigInt(gx))
962+ $Tuple2(gz, gu)
961963 }
962964 else {
963- let gy = aJ(this, aj())
964- let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw))
965- $Tuple2(gy, gt)
965+ let gz = aK(this, ak())
966+ let gu = (toBigInt(bO(aK(this, al()))) + toBigInt(gx))
967+ $Tuple2(gz, gu)
966968 }
967- let gy = gx._1
968- let gt = gx._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 gz = ((toBigInt(bN(gy)) - eB) - toBigInt(1))
976- let gA = max([0, toInt(gz)])
977- let gB = if ((gs == false))
978- then [(toBigInt(bN(dj)) + toBigInt(gw)), (toBigInt(bN(dk)) - gz)]
979- else [(toBigInt(bN(dj)) - gz), (toBigInt(bN(dk)) + toBigInt(gw))]
980- let gC = cy(gB)
981- let dY = if ((gC >= et))
969+ let gz = gy._1
970+ let gu = gy._2
971+ let bh = aZ()
972+ let dk = bh[x]
973+ let dl = bh[y]
974+ let cA = [toBigInt(bO(dk)), toBigInt(bO(dl))]
975+ let eu = cz(cA)
976+ let eC = gs(gt, eu, toBigInt(gx))
977+ let gA = ((toBigInt(bO(gz)) - eC) - toBigInt(1))
978+ let gB = max([0, toInt(gA)])
979+ let gC = if ((gt == false))
980+ then [(toBigInt(bO(dk)) + toBigInt(gx)), (toBigInt(bO(dl)) - gA)]
981+ else [(toBigInt(bO(dk)) - gA), (toBigInt(bO(dl)) + toBigInt(gx))]
982+ let gD = cz(gC)
983+ let dZ = if ((gD >= eu))
982984 then true
983- else throw(makeString(["new D is fewer error", toString(et), toString(gC)], "__"))
984- if ((dY == dY))
985- then $Tuple2(nil, gA)
985+ else throw(makeString(["new D is fewer error", toString(eu), toString(gD)], "__"))
986+ if ((dZ == dZ))
987+ then $Tuple2(nil, gB)
986988 else throw("Strict value is not equal to itself.")
987989 }
988990
989991
990992
991-@Callable(cP)
992-func calculateAmountOutForSwapAndSendTokens (gw,gs,gD,gE) = {
993- let gF = {
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"))
993+@Callable(cQ)
994+func calculateAmountOutForSwapAndSendTokens (gx,gt,gE,gF) = {
995+ let gG = {
996+ let aT = invoke(aR, "getSwapContractREADONLY", nil, nil)
997+ if ($isInstanceOf(aT, "String"))
998+ then aT
999+ else throw(($getType(aT) + " couldn't be cast to String"))
9981000 }
999- let gG = [if ((value(cP.payments[0]).amount >= gw))
1001+ let gH = [if ((value(cQ.payments[0]).amount >= gx))
10001002 then true
1001- else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gF)))
1003+ else aO("Wrong amount"), if ((cQ.caller == addressFromStringValue(gG)))
10021004 then true
1003- else aN("Permission denied")]
1004- if ((gG == gG))
1005+ else aO("Permission denied")]
1006+ if ((gH == gH))
10051007 then {
1006- let fk = value(cP.payments[0])
1007- let gH = if ((fk.assetId == unit))
1008+ let fl = value(cQ.payments[0])
1009+ let gI = if ((fl.assetId == unit))
10081010 then toBase58String(toBytes("WAVES"))
1009- else toBase58String(value(fk.assetId))
1010- let gI = if ((gs == false))
1011+ else toBase58String(value(fl.assetId))
1012+ let gJ = if ((gt == false))
10111013 then {
1012- let gy = aJ(this, ak())
1013- let gt = (bN(gH) - value(cP.payments[0]).amount)
1014- $Tuple2(gy, gt)
1014+ let gz = aK(this, al())
1015+ let gu = (bO(gI) - value(cQ.payments[0]).amount)
1016+ $Tuple2(gz, gu)
10151017 }
10161018 else {
1017- let gy = aJ(this, aj())
1018- let gt = (bN(gH) - value(cP.payments[0]).amount)
1019- $Tuple2(gy, gt)
1019+ let gz = aK(this, ak())
1020+ let gu = (bO(gI) - value(cQ.payments[0]).amount)
1021+ $Tuple2(gz, gu)
10201022 }
1021- let gy = gI._1
1022- let gt = gI._2
1023- let bg = aY()
1024- let dj = bg[w]
1025- let dk = bg[x]
1026- let cz = if ((gs == false))
1027- then [(toBigInt(bN(dj)) - toBigInt(value(cP.payments[0]).amount)), toBigInt(bN(dk))]
1028- else [toBigInt(bN(dj)), (toBigInt(bN(dk)) - toBigInt(value(cP.payments[0]).amount))]
1029- let et = cy(cz)
1030- let eB = gr(gs, et, toBigInt(0))
1031- let gz = ((toBigInt(bN(gy)) - eB) - toBigInt(1))
1032- let gA = max([0, toInt(gz)])
1033- let gJ = if ((gA >= gD))
1023+ let gz = gJ._1
1024+ let gu = gJ._2
1025+ let bh = aZ()
1026+ let dk = bh[x]
1027+ let dl = bh[y]
1028+ let cA = if ((gt == false))
1029+ then [(toBigInt(bO(dk)) - toBigInt(value(cQ.payments[0]).amount)), toBigInt(bO(dl))]
1030+ else [toBigInt(bO(dk)), (toBigInt(bO(dl)) - toBigInt(value(cQ.payments[0]).amount))]
1031+ let eu = cz(cA)
1032+ let eC = gs(gt, eu, toBigInt(0))
1033+ let gA = ((toBigInt(bO(gz)) - eC) - toBigInt(1))
1034+ let gB = max([0, toInt(gA)])
1035+ let gK = if ((gB >= gE))
10341036 then true
10351037 else throw("Exchange result is fewer coins than expected")
1036- if ((gJ == gJ))
1038+ if ((gK == gK))
10371039 then {
1038- let gB = if ((gs == false))
1039- then [toBigInt(bN(dj)), (toBigInt(bN(dk)) - gz)]
1040- else [(toBigInt(bN(dj)) - gz), toBigInt(bN(dk))]
1041- let gC = cy(gB)
1042- let dY = if ((gC >= et))
1040+ let gC = if ((gt == false))
1041+ then [toBigInt(bO(dk)), (toBigInt(bO(dl)) - gA)]
1042+ else [(toBigInt(bO(dk)) - gA), toBigInt(bO(dl))]
1043+ let gD = cz(gC)
1044+ let dZ = if ((gD >= eu))
10431045 then true
10441046 else throw("new D is fewer error")
1045- if ((dY == dY))
1046- then $Tuple2([ScriptTransfer(addressFromStringValue(gE), gA, bc(gy))], gA)
1047+ if ((dZ == dZ))
1048+ then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bd(gz))], gB)
10471049 else throw("Strict value is not equal to itself.")
10481050 }
10491051 else throw("Strict value is not equal to itself.")
10501052 }
10511053 else throw("Strict value is not equal to itself.")
10521054 }
10531055
10541056
10551057
1056-@Callable(cP)
1057-func constructor (Y) = {
1058- let ex = gq(cP)
1059- if ((ex == ex))
1060- then [StringEntry(Y(), Y)]
1058+@Callable(cQ)
1059+func constructor (Z) = {
1060+ let ey = gr(cQ)
1061+ if ((ey == ey))
1062+ then [StringEntry(Z(), Z)]
10611063 else throw("Strict value is not equal to itself.")
10621064 }
10631065
10641066
10651067
1066-@Callable(cP)
1067-func setManager (gK) = {
1068- let ex = gq(cP)
1069- if ((ex == ex))
1068+@Callable(cQ)
1069+func setManager (gL) = {
1070+ let ey = gr(cQ)
1071+ if ((ey == ey))
10701072 then {
1071- let gL = fromBase58String(gK)
1072- if ((gL == gL))
1073- then [StringEntry(aa(), gK)]
1073+ let gM = fromBase58String(gL)
1074+ if ((gM == gM))
1075+ then [StringEntry(ab(), gL)]
10741076 else throw("Strict value is not equal to itself.")
10751077 }
10761078 else throw("Strict value is not equal to itself.")
10771079 }
10781080
10791081
10801082
1081-@Callable(cP)
1083+@Callable(cQ)
10821084 func confirmManager () = {
1083- let cu = gm()
1084- let gM = if (isDefined(cu))
1085+ let cv = gn()
1086+ let gN = if (isDefined(cv))
10851087 then true
10861088 else throw("No pending manager")
1087- if ((gM == gM))
1089+ if ((gN == gN))
10881090 then {
1089- let gN = if ((cP.callerPublicKey == value(cu)))
1091+ let gO = if ((cQ.callerPublicKey == value(cv)))
10901092 then true
10911093 else throw("You are not pending manager")
1092- if ((gN == gN))
1093- then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())]
1094+ if ((gO == gO))
1095+ then [StringEntry(aa(), toBase58String(value(cv))), DeleteEntry(ab())]
10941096 else throw("Strict value is not equal to itself.")
10951097 }
10961098 else throw("Strict value is not equal to itself.")
10971099 }
10981100
10991101
11001102
1101-@Callable(cP)
1102-func put (gO,gP) = {
1103- let gQ = bs()
1104- let gR = valueOrErrorMessage(addressFromString(gQ[C]), "Wr st addr")
1105- let gS = valueOrErrorMessage(addressFromString(gQ[E]), "Wr sl addr")
1106- if ((0 > gO))
1103+@Callable(cQ)
1104+func put (gP,gQ) = {
1105+ let gR = bt()
1106+ let gS = valueOrErrorMessage(addressFromString(gR[D]), "Wr st addr")
1107+ let gT = valueOrErrorMessage(addressFromString(gR[F]), "Wr sl addr")
1108+ if ((0 > gP))
11071109 then throw("Wrong slippage")
1108- else if ((size(cP.payments) != 2))
1110+ else if ((size(cQ.payments) != 2))
11091111 then throw("2 pmnts expd")
11101112 else {
1111- let gT = toBigInt(value(cP.payments[0]).amount)
1112- let gU = toBigInt(value(cP.payments[1]).amount)
1113- let eO = (toBigInt(bN(be(bm))) - gT)
1114- if ((eO == eO))
1113+ let gU = toBigInt(value(cQ.payments[0]).amount)
1114+ let gV = toBigInt(value(cQ.payments[1]).amount)
1115+ let eP = (toBigInt(bO(bf(bn))) - gU)
1116+ if ((eP == eP))
11151117 then {
1116- let eP = (toBigInt(bN(be(bn))) - gU)
1117- if ((eP == eP))
1118+ let eQ = (toBigInt(bO(bf(bo))) - gV)
1119+ if ((eQ == eQ))
11181120 then {
1119- let eQ = toBigInt(value(assetInfo(bl)).quantity)
1120- if ((eQ == eQ))
1121+ let eR = toBigInt(value(assetInfo(bm)).quantity)
1122+ if ((eR == eR))
11211123 then {
1122- let eR = eK(gT, gU, toBigInt(0))
1123- if ((eR == eR))
1124+ let eS = eL(gU, gV, toBigInt(0))
1125+ if ((eS == eS))
11241126 then {
1125- let gV = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gO, true, false, true, 0, "")
1126- let el = gV._2
1127- let gW = gV._7
1128- let dB = gV._9
1129- let em = gV._10
1130- let en = gV._11
1131- let dj = gV._12
1132- let dk = gV._13
1133- let dX = invoke(aQ, "emit", [el], nil)
1134- if ((dX == dX))
1127+ let gW = fm(toString(cQ.caller), toBase58String(cQ.transactionId), AttachedPayment(value(cQ.payments[0]).assetId, value(cQ.payments[0]).amount), cQ.payments[1], gP, true, false, true, 0, "")
1128+ let em = gW._2
1129+ let gX = gW._7
1130+ let dC = gW._9
1131+ let en = gW._10
1132+ let eo = gW._11
1133+ let dk = gW._12
1134+ let dl = gW._13
1135+ let dY = invoke(aR, "emit", [em], nil)
1136+ if ((dY == dY))
11351137 then {
1136- let gX = {
1137- let gl = dX
1138- if ($isInstanceOf(gl, "Address"))
1138+ let gY = {
1139+ let gm = dY
1140+ if ($isInstanceOf(gm, "Address"))
11391141 then {
1140- let gY = gl
1141- invoke(gY, "emit", [el], nil)
1142+ let gZ = gm
1143+ invoke(gZ, "emit", [em], nil)
11421144 }
11431145 else unit
11441146 }
1145- if ((gX == gX))
1147+ if ((gY == gY))
11461148 then {
1147- let gZ = if ((em > 0))
1148- then invoke(gS, "put", nil, [AttachedPayment(dj, em)])
1149+ let ha = if ((en > 0))
1150+ then invoke(gT, "put", nil, [AttachedPayment(dk, en)])
11491151 else nil
1150- if ((gZ == gZ))
1152+ if ((ha == ha))
11511153 then {
1152- let ha = if ((en > 0))
1153- then invoke(gS, "put", nil, [AttachedPayment(dk, en)])
1154+ let hb = if ((eo > 0))
1155+ then invoke(gT, "put", nil, [AttachedPayment(dl, eo)])
11541156 else nil
1155- if ((ha == ha))
1157+ if ((hb == hb))
11561158 then {
1157- let hb = if (gP)
1159+ let hc = if (gQ)
11581160 then {
1159- let hc = invoke(gR, "stake", nil, [AttachedPayment(gW, el)])
1160- if ((hc == hc))
1161+ let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, em)])
1162+ if ((hd == hd))
11611163 then nil
11621164 else throw("Strict value is not equal to itself.")
11631165 }
1164- else [ScriptTransfer(cP.caller, el, gW)]
1165- let hd = eS(0, 0, 0)
1166- let gi = hd._1
1167- let eJ = hd._2
1168- let he = if ((eJ >= eR))
1166+ else [ScriptTransfer(cQ.caller, em, gX)]
1167+ let he = eT(0, 0, 0)
1168+ let gj = he._1
1169+ let eK = he._2
1170+ let hf = if ((eK >= eS))
11691171 then true
1170- else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " "))
1171- if ((he == he))
1172+ else aO(makeString(["updated DLp lower than current DLp", toString(eP), toString(eQ), toString(eR), toString(eS), toString(eK), toString(en), toString(eo)], " "))
1173+ if ((hf == hf))
11721174 then {
1173- let hf = value(assetInfo(bl)).quantity
1174- if ((hf == hf))
1175- then ((dB ++ hb) ++ gi)
1175+ let hg = value(assetInfo(bm)).quantity
1176+ if ((hg == hg))
1177+ then ((dC ++ hc) ++ gj)
11761178 else throw("Strict value is not equal to itself.")
11771179 }
11781180 else throw("Strict value is not equal to itself.")
11791181 }
11801182 else throw("Strict value is not equal to itself.")
11811183 }
11821184 else throw("Strict value is not equal to itself.")
11831185 }
11841186 else throw("Strict value is not equal to itself.")
11851187 }
11861188 else throw("Strict value is not equal to itself.")
11871189 }
11881190 else throw("Strict value is not equal to itself.")
11891191 }
11901192 else throw("Strict value is not equal to itself.")
11911193 }
11921194 else throw("Strict value is not equal to itself.")
11931195 }
11941196 else throw("Strict value is not equal to itself.")
11951197 }
11961198 }
11971199
11981200
11991201
1200-@Callable(cP)
1201-func putOneTknV2 (fM,gP) = {
1202- let hg = {
1203- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1204- if ($isInstanceOf(aS, "Boolean"))
1205- then aS
1206- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1202+@Callable(cQ)
1203+func putOneTknV2 (fN,gQ) = {
1204+ let hh = {
1205+ let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1206+ if ($isInstanceOf(aT, "Boolean"))
1207+ then aT
1208+ else throw(($getType(aT) + " couldn't be cast to Boolean"))
12071209 }
1208- let hh = if (if (if (aV())
1210+ let hi = if (if (if (aW())
12091211 then true
1210- else (bk == q))
1212+ else (bl == r))
12111213 then true
1212- else (bk == s))
1214+ else (bl == t))
12131215 then true
1214- else hg
1215- let gG = [if (if (!(hh))
1216+ else hh
1217+ let gH = [if (if (!(hi))
12161218 then true
1217- else go(cP))
1219+ else gp(cQ))
12181220 then true
1219- else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1))
1221+ else aO("put operation is blocked by admin"), if ((size(cQ.payments) == 1))
12201222 then true
1221- else aN("exactly 1 payment are expected")]
1222- if ((gG == gG))
1223+ else aO("exactly 1 payment are expected")]
1224+ if ((gH == gH))
12231225 then {
1224- let dj = toBase58String(value(bm))
12251226 let dk = toBase58String(value(bn))
1226- let di = bl
1227- let fQ = bo
1227+ let dl = toBase58String(value(bo))
1228+ let dj = bm
12281229 let fR = bp
1229- let dh = if ((cP.caller == this))
1230- then cP.originCaller
1231- else cP.caller
1232- let fk = value(cP.payments[0])
1233- let df = toBase58String(value(fk.assetId))
1234- let dL = fk.amount
1235- let eR = if ((fk.assetId == bm))
1236- then eK(toBigInt(dL), toBigInt(0), toBigInt(0))
1237- else eK(toBigInt(0), toBigInt(dL), toBigInt(0))
1238- if ((eR == eR))
1230+ let fS = bq
1231+ let di = if ((cQ.caller == this))
1232+ then cQ.originCaller
1233+ else cQ.caller
1234+ let fl = value(cQ.payments[0])
1235+ let dg = toBase58String(value(fl.assetId))
1236+ let dM = fl.amount
1237+ let eS = if ((fl.assetId == bn))
1238+ then eL(toBigInt(dM), toBigInt(0), toBigInt(0))
1239+ else eL(toBigInt(0), toBigInt(dM), toBigInt(0))
1240+ if ((eS == eS))
12391241 then {
1240- let hi = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true)
1241- if ((hi == hi))
1242+ let hj = fq(dM, dg, toString(di), toBase58String(cQ.transactionId), true)
1243+ if ((hj == hj))
12421244 then {
1243- let cx = hi._3
1244- let dB = hi._2
1245- let hj = hi._1
1246- let el = if (if ((fM > 0))
1247- then (fM > hj)
1245+ let cy = hj._3
1246+ let dC = hj._2
1247+ let hk = hj._1
1248+ let em = if (if ((fN > 0))
1249+ then (fN > hk)
12481250 else false)
1249- then aN(makeString(["amount to receive is less than ", toString(fM)], ""))
1250- else hj
1251- let gV = invoke(aQ, "emit", [el], nil)
1252- if ((gV == gV))
1251+ then aO(makeString(["amount to receive is less than ", toString(fN)], ""))
1252+ else hk
1253+ let gW = invoke(aR, "emit", [em], nil)
1254+ if ((gW == gW))
12531255 then {
1254- let gX = {
1255- let gl = gV
1256- if ($isInstanceOf(gl, "Address"))
1256+ let gY = {
1257+ let gm = gW
1258+ if ($isInstanceOf(gm, "Address"))
12571259 then {
1258- let gY = gl
1259- invoke(gY, "emit", [el], nil)
1260+ let gZ = gm
1261+ invoke(gZ, "emit", [em], nil)
12601262 }
12611263 else unit
12621264 }
1263- if ((gX == gX))
1265+ if ((gY == gY))
12641266 then {
1265- let hb = if (gP)
1267+ let hc = if (gQ)
12661268 then {
1267- let hc = invoke(bu, "stake", nil, [AttachedPayment(di, el)])
1268- if ((hc == hc))
1269+ let hd = invoke(bv, "stake", nil, [AttachedPayment(dj, em)])
1270+ if ((hd == hd))
12691271 then nil
12701272 else throw("Strict value is not equal to itself.")
12711273 }
1272- else [ScriptTransfer(cP.caller, el, di)]
1273- let gc = if ((cx > 0))
1274- then [ScriptTransfer(aX, cx, fromBase58String(df))]
1274+ else [ScriptTransfer(cQ.caller, em, dj)]
1275+ let gd = if ((cy > 0))
1276+ then [ScriptTransfer(aY, cy, fromBase58String(dg))]
12751277 else nil
1276- let hk = if ((this == aX))
1278+ let hl = if ((this == aY))
12771279 then $Tuple2(0, 0)
12781280 else {
1279- let hl = if ((fk.assetId == bm))
1281+ let hm = if ((fl.assetId == bn))
12801282 then true
12811283 else false
1282- if (hl)
1283- then $Tuple2(-(cx), 0)
1284- else $Tuple2(0, -(cx))
1284+ if (hm)
1285+ then $Tuple2(-(cy), 0)
1286+ else $Tuple2(0, -(cy))
12851287 }
1286- let eT = hk._1
1287- let eU = hk._2
1288- let hm = eS(eT, eU, 0)
1289- let gi = hm._1
1290- let eJ = hm._2
1291- let gj = eW(eR, eJ)
1292- if ((gj == gj))
1293- then $Tuple2((((dB ++ hb) ++ gc) ++ gi), el)
1288+ let eU = hl._1
1289+ let eV = hl._2
1290+ let hn = eT(eU, eV, 0)
1291+ let gj = hn._1
1292+ let eK = hn._2
1293+ let gk = eX(eS, eK)
1294+ if ((gk == gk))
1295+ then $Tuple2((((dC ++ hc) ++ gd) ++ gj), em)
12941296 else throw("Strict value is not equal to itself.")
12951297 }
12961298 else throw("Strict value is not equal to itself.")
12971299 }
12981300 else throw("Strict value is not equal to itself.")
12991301 }
13001302 else throw("Strict value is not equal to itself.")
13011303 }
13021304 else throw("Strict value is not equal to itself.")
13031305 }
13041306 else throw("Strict value is not equal to itself.")
13051307 }
13061308
13071309
13081310
1309-@Callable(cP)
1310-func putForFree (hn) = if ((0 > hn))
1311+@Callable(cQ)
1312+func putForFree (ho) = if ((0 > ho))
13111313 then throw("Wrong slpg")
1312- else if ((size(cP.payments) != 2))
1314+ else if ((size(cQ.payments) != 2))
13131315 then throw("2 pmnts expd")
13141316 else {
1315- let ho = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], hn, false, false, true, 0, "")
1316- let dB = ho._9
1317- let gT = toBigInt(value(cP.payments[0]).amount)
1318- let gU = toBigInt(value(cP.payments[1]).amount)
1319- let eR = eK(gT, gU, toBigInt(0))
1320- if ((eR == eR))
1317+ let hp = fm(toString(cQ.caller), toBase58String(cQ.transactionId), AttachedPayment(value(cQ.payments[0]).assetId, value(cQ.payments[0]).amount), cQ.payments[1], ho, false, false, true, 0, "")
1318+ let dC = hp._9
1319+ let gU = toBigInt(value(cQ.payments[0]).amount)
1320+ let gV = toBigInt(value(cQ.payments[1]).amount)
1321+ let eS = eL(gU, gV, toBigInt(0))
1322+ if ((eS == eS))
13211323 then {
1322- let hp = eS(0, 0, 0)
1323- let gi = hp._1
1324- let eJ = hp._2
1325- let gj = eW(eR, eJ)
1326- if ((gj == gj))
1327- then (dB ++ gi)
1324+ let hq = eT(0, 0, 0)
1325+ let gj = hq._1
1326+ let eK = hq._2
1327+ let gk = eX(eS, eK)
1328+ if ((gk == gk))
1329+ then (dC ++ gj)
13281330 else throw("Strict value is not equal to itself.")
13291331 }
13301332 else throw("Strict value is not equal to itself.")
13311333 }
13321334
13331335
13341336
1335-@Callable(cP)
1337+@Callable(cQ)
13361338 func get () = {
1337- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1338- if ((eR == eR))
1339+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1340+ if ((eS == eS))
13391341 then {
1340- let dX = fj(cP)
1341- let hq = dX._1
1342- let dA = dX._2
1343- let dL = dX._3
1344- let df = dX._4
1345- let dB = dX._5
1346- let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1347- if ((ey == ey))
1342+ let dY = fk(cQ)
1343+ let hr = dY._1
1344+ let dB = dY._2
1345+ let dM = dY._3
1346+ let dg = dY._4
1347+ let dC = dY._5
1348+ let ez = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)])
1349+ if ((ez == ez))
13481350 then {
1349- let hr = eS(-(hq), -(dA), 0)
1350- let gi = hr._1
1351- let eJ = hr._2
1352- let gj = eW(eR, eJ)
1353- if ((gj == gj))
1354- then (dB ++ gi)
1351+ let hs = eT(-(hr), -(dB), 0)
1352+ let gj = hs._1
1353+ let eK = hs._2
1354+ let gk = eX(eS, eK)
1355+ if ((gk == gk))
1356+ then (dC ++ gj)
13551357 else throw("Strict value is not equal to itself.")
13561358 }
13571359 else throw("Strict value is not equal to itself.")
13581360 }
13591361 else throw("Strict value is not equal to itself.")
13601362 }
13611363
13621364
13631365
1364-@Callable(cP)
1365-func getOneTknV2 (fL,fM) = {
1366- let hg = {
1367- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1368- if ($isInstanceOf(aS, "Boolean"))
1369- then aS
1370- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1366+@Callable(cQ)
1367+func getOneTknV2 (fM,fN) = {
1368+ let hh = {
1369+ let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1370+ if ($isInstanceOf(aT, "Boolean"))
1371+ then aT
1372+ else throw(($getType(aT) + " couldn't be cast to Boolean"))
13711373 }
1372- let hs = if (if (aV())
1374+ let ht = if (if (aW())
13731375 then true
1374- else (bk == s))
1376+ else (bl == t))
13751377 then true
1376- else hg
1377- let gG = [if (if (!(hs))
1378+ else hh
1379+ let gH = [if (if (!(ht))
13781380 then true
1379- else go(cP))
1381+ else gp(cQ))
13801382 then true
1381- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1))
1383+ else aO("get operation is blocked by admin"), if ((size(cQ.payments) == 1))
13821384 then true
1383- else aN("exactly 1 payment are expected")]
1384- if ((gG == gG))
1385+ else aO("exactly 1 payment are expected")]
1386+ if ((gH == gH))
13851387 then {
1386- let ht = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId)
1387- let dB = ht._1
1388- let fV = ht._2
1389- $Tuple2(dB, fV)
1388+ let hu = fL(fM, fN, cQ.payments, cQ.caller, cQ.originCaller, cQ.transactionId)
1389+ let dC = hu._1
1390+ let fW = hu._2
1391+ $Tuple2(dC, fW)
13901392 }
13911393 else throw("Strict value is not equal to itself.")
13921394 }
13931395
13941396
13951397
1396-@Callable(cP)
1398+@Callable(cQ)
13971399 func refreshDLp () = {
1398- let hu = valueOrElse(getInteger(aq), 0)
1399- let hv = if (((height - hu) >= at))
1400+ let hv = valueOrElse(getInteger(ar), 0)
1401+ let hw = if (((height - hv) >= au))
14001402 then unit
1401- else aN(makeString([toString(at), " blocks have not passed since the previous call"], ""))
1402- if ((hv == hv))
1403+ else aO(makeString([toString(au), " blocks have not passed since the previous call"], ""))
1404+ if ((hw == hw))
14031405 then {
1404- let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp"))
1405- let hw = eS(0, 0, 0)
1406- let hx = hw._1
1407- let eJ = hw._2
1408- let eV = if ((fd != eJ))
1409- then hx
1410- else aN("nothing to refresh")
1411- $Tuple2(eV, toString(eJ))
1406+ let fe = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aq), "0")), aQ("invalid dLp"))
1407+ let hx = eT(0, 0, 0)
1408+ let hy = hx._1
1409+ let eK = hx._2
1410+ let eW = if ((fe != eK))
1411+ then hy
1412+ else aO("nothing to refresh")
1413+ $Tuple2(eW, toString(eK))
14121414 }
14131415 else throw("Strict value is not equal to itself.")
14141416 }
14151417
14161418
14171419
1418-@Callable(cP)
1419-func getOneTknV2READONLY (fL,hy) = {
1420+@Callable(cQ)
1421+func getOneTknV2READONLY (fM,hz) = {
1422+ let dk = toBase58String(value(bn))
1423+ let dl = toBase58String(value(bo))
14201424 let dj = toBase58String(value(bm))
1421- let dk = toBase58String(value(bn))
1422- let di = toBase58String(value(bl))
1423- let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))]
1424- let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity)
1425- let cb = cy(cz)
1426- let ca = (cb - fraction(toBigInt(hy), cb, eI))
1427- let hz = if ((fL == dj))
1425+ let cA = [toBigInt(bO(dk)), toBigInt(bO(dl))]
1426+ let eJ = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dj)), "invalid lp asset").quantity)
1427+ let cc = cz(cA)
1428+ let cb = (cc - fraction(toBigInt(hz), cc, eJ))
1429+ let hA = if ((fM == dk))
14281430 then 0
1429- else if ((fL == dk))
1431+ else if ((fM == dl))
14301432 then 1
14311433 else throw("invalid out asset id")
1432- let hA = es(cz, hz, ca)
1433- let gz = (cz[hz] - hA)
1434- let gA = max([0, toInt((gz - f))])
1435- let hB = cv(gA, aT)
1436- let fU = hB._1
1437- let cx = hB._2
1438- $Tuple2(nil, $Tuple2(fU, cx))
1434+ let hB = et(cA, hA, cb)
1435+ let gA = (cA[hA] - hB)
1436+ let gB = max([0, toInt((gA - f))])
1437+ let hC = cw(gB, aU)
1438+ let fV = hC._1
1439+ let cy = hC._2
1440+ $Tuple2(nil, $Tuple2(fV, cy))
14391441 }
14401442
14411443
14421444
1443-@Callable(cP)
1444-func getOneTknV2WithBonusREADONLY (fL,hy) = {
1445+@Callable(cQ)
1446+func getOneTknV2WithBonusREADONLY (fM,hz) = {
1447+ let dk = toBase58String(value(bn))
1448+ let dl = toBase58String(value(bo))
14451449 let dj = toBase58String(value(bm))
1446- let dk = toBase58String(value(bn))
1447- let di = toBase58String(value(bl))
1448- let dp = bN(dj)
1449- let dr = bN(dk)
1450- let hC = {
1451- let aS = invoke(this, "getOneTknV2READONLY", [fL, hy], nil)
1452- if ($isInstanceOf(aS, "(Int, Int)"))
1453- then aS
1454- else throw(($getType(aS) + " couldn't be cast to (Int, Int)"))
1450+ let dq = bO(dk)
1451+ let ds = bO(dl)
1452+ let hD = {
1453+ let aT = invoke(this, "getOneTknV2READONLY", [fM, hz], nil)
1454+ if ($isInstanceOf(aT, "(Int, Int)"))
1455+ then aT
1456+ else throw(($getType(aT) + " couldn't be cast to (Int, Int)"))
14551457 }
1456- let fU = hC._1
1457- let cx = hC._2
1458- let dX = dd("", di, hy, this)
1459- let dz = dX._1
1460- let dA = dX._2
1461- let hD = (dz + dA)
1462- let fJ = if ((hD == 0))
1463- then if ((fU == 0))
1458+ let fV = hD._1
1459+ let cy = hD._2
1460+ let dY = de("", dj, hz, this)
1461+ let dA = dY._1
1462+ let dB = dY._2
1463+ let hE = (dA + dB)
1464+ let fK = if ((hE == 0))
1465+ then if ((fV == 0))
14641466 then 0
14651467 else throw("bonus calculation error")
1466- else fraction((fU - hD), a, hD)
1467- $Tuple2(nil, $Tuple3(fU, cx, fJ))
1468+ else fraction((fV - hE), a, hE)
1469+ $Tuple2(nil, $Tuple3(fV, cy, fK))
14681470 }
14691471
14701472
14711473
1472-@Callable(cP)
1473-func getNoLess (hE,hF) = {
1474- let dX = fj(cP)
1475- let dz = dX._1
1476- let dA = dX._2
1477- let dL = dX._3
1478- let df = dX._4
1479- let dB = dX._5
1480- if ((hE > dz))
1481- then throw(((("Failed: " + toString(dz)) + " < ") + toString(hE)))
1482- else if ((hF > dA))
1483- then throw(((("Failed: " + toString(dA)) + " < ") + toString(hF)))
1474+@Callable(cQ)
1475+func getNoLess (hF,hG) = {
1476+ let dY = fk(cQ)
1477+ let dA = dY._1
1478+ let dB = dY._2
1479+ let dM = dY._3
1480+ let dg = dY._4
1481+ let dC = dY._5
1482+ if ((hF > dA))
1483+ then throw(((("Failed: " + toString(dA)) + " < ") + toString(hF)))
1484+ else if ((hG > dB))
1485+ then throw(((("Failed: " + toString(dB)) + " < ") + toString(hG)))
14841486 else {
1485- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1486- if ((eR == eR))
1487+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1488+ if ((eS == eS))
14871489 then {
1488- let hG = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)])
1489- if ((hG == hG))
1490+ let hH = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)])
1491+ if ((hH == hH))
14901492 then {
1491- let hH = eS(-(dz), -(dA), 0)
1492- let gi = hH._1
1493- let eJ = hH._2
1494- let gj = eW(eR, eJ)
1495- if ((gj == gj))
1496- then (dB ++ gi)
1493+ let hI = eT(-(dA), -(dB), 0)
1494+ let gj = hI._1
1495+ let eK = hI._2
1496+ let gk = eX(eS, eK)
1497+ if ((gk == gk))
1498+ then (dC ++ gj)
14971499 else throw("Strict value is not equal to itself.")
14981500 }
14991501 else throw("Strict value is not equal to itself.")
15001502 }
15011503 else throw("Strict value is not equal to itself.")
15021504 }
15031505 }
15041506
15051507
15061508
1507-@Callable(cP)
1508-func unstakeAndGet (cw) = {
1509- let hI = if ((size(cP.payments) != 0))
1509+@Callable(cQ)
1510+func unstakeAndGet (cx) = {
1511+ let hJ = if ((size(cQ.payments) != 0))
15101512 then throw("No pmnts expd")
15111513 else true
1512- if ((hI == hI))
1514+ if ((hJ == hJ))
15131515 then {
1514- let hJ = bs()
1515- let gW = bl
1516- let hK = valueOrErrorMessage(addressFromString(hJ[C]), "Wr st addr")
1517- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1518- if ((eR == eR))
1516+ let hK = bt()
1517+ let gX = bm
1518+ let hL = valueOrErrorMessage(addressFromString(hK[D]), "Wr st addr")
1519+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1520+ if ((eS == eS))
15191521 then {
1520- let hL = invoke(hK, "unstake", [toBase58String(gW), cw], nil)
1521- if ((hL == hL))
1522+ let hM = invoke(hL, "unstake", [toBase58String(gX), cx], nil)
1523+ if ((hM == hM))
15221524 then {
1523- let dX = dd(toBase58String(cP.transactionId), toBase58String(gW), cw, cP.caller)
1524- let dz = dX._1
1525- let dA = dX._2
1526- let dn = parseIntValue(dX._9)
1527- let dB = dX._10
1528- let hM = if (if (aV())
1525+ let dY = de(toBase58String(cQ.transactionId), toBase58String(gX), cx, cQ.caller)
1526+ let dA = dY._1
1527+ let dB = dY._2
1528+ let do = parseIntValue(dY._9)
1529+ let dC = dY._10
1530+ let hN = if (if (aW())
15291531 then true
1530- else (dn == s))
1531- then throw(("Blocked: " + toString(dn)))
1532+ else (do == t))
1533+ then throw(("Blocked: " + toString(do)))
15321534 else true
1533- if ((hM == hM))
1535+ if ((hN == hN))
15341536 then {
1535- let hN = invoke(aQ, "burn", [cw], [AttachedPayment(gW, cw)])
1536- if ((hN == hN))
1537+ let hO = invoke(aR, "burn", [cx], [AttachedPayment(gX, cx)])
1538+ if ((hO == hO))
15371539 then {
1538- let hO = eS(-(dz), -(dA), 0)
1539- let gi = hO._1
1540- let eJ = hO._2
1541- let gj = eW(eR, eJ)
1542- if ((gj == gj))
1543- then (dB ++ gi)
1540+ let hP = eT(-(dA), -(dB), 0)
1541+ let gj = hP._1
1542+ let eK = hP._2
1543+ let gk = eX(eS, eK)
1544+ if ((gk == gk))
1545+ then (dC ++ gj)
15441546 else throw("Strict value is not equal to itself.")
15451547 }
15461548 else throw("Strict value is not equal to itself.")
15471549 }
15481550 else throw("Strict value is not equal to itself.")
15491551 }
15501552 else throw("Strict value is not equal to itself.")
15511553 }
15521554 else throw("Strict value is not equal to itself.")
15531555 }
15541556 else throw("Strict value is not equal to itself.")
15551557 }
15561558
15571559
15581560
1559-@Callable(cP)
1560-func unstakeAndGetNoLess (hP,hQ,hF) = {
1561- let hs = if (aV())
1561+@Callable(cQ)
1562+func unstakeAndGetNoLess (hQ,hR,hG) = {
1563+ let ht = if (aW())
15621564 then true
1563- else (bk == s)
1564- let gG = [if (!(hs))
1565+ else (bl == t)
1566+ let gH = [if (!(ht))
15651567 then true
1566- else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1568+ else throw("get operation is blocked by admin"), if ((size(cQ.payments) == 0))
15671569 then true
15681570 else throw("no payments are expected")]
1569- if ((gG == gG))
1571+ if ((gH == gH))
15701572 then {
1571- let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0))
1572- if ((eR == eR))
1573+ let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0))
1574+ if ((eS == eS))
15731575 then {
1574- let hL = invoke(bu, "unstake", [toBase58String(bl), hP], nil)
1575- if ((hL == hL))
1576+ let hM = invoke(bv, "unstake", [toBase58String(bm), hQ], nil)
1577+ if ((hM == hM))
15761578 then {
1577- let hR = dd(toBase58String(cP.transactionId), toBase58String(bl), hP, cP.caller)
1578- let dz = hR._1
1579- let dA = hR._2
1580- let dB = hR._10
1581- let hS = [if ((dz >= hQ))
1579+ let hS = de(toBase58String(cQ.transactionId), toBase58String(bm), hQ, cQ.caller)
1580+ let dA = hS._1
1581+ let dB = hS._2
1582+ let dC = hS._10
1583+ let hT = [if ((dA >= hR))
15821584 then true
1583- else throw(makeString(["amount asset amount to receive is less than ", toString(hQ)], "")), if ((dA >= hF))
1585+ else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dB >= hG))
15841586 then true
1585- else throw(makeString(["price asset amount to receive is less than ", toString(hF)], ""))]
1586- if ((hS == hS))
1587+ else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))]
1588+ if ((hT == hT))
15871589 then {
1588- let hG = invoke(aQ, "burn", [hP], [AttachedPayment(bl, hP)])
1589- if ((hG == hG))
1590+ let hH = invoke(aR, "burn", [hQ], [AttachedPayment(bm, hQ)])
1591+ if ((hH == hH))
15901592 then {
1591- let hT = eS(-(dz), -(dA), 0)
1592- let gi = hT._1
1593- let eJ = hT._2
1594- let gj = eW(eR, eJ)
1595- if ((gj == gj))
1596- then (dB ++ gi)
1593+ let hU = eT(-(dA), -(dB), 0)
1594+ let gj = hU._1
1595+ let eK = hU._2
1596+ let gk = eX(eS, eK)
1597+ if ((gk == gk))
1598+ then (dC ++ gj)
15971599 else throw("Strict value is not equal to itself.")
15981600 }
15991601 else throw("Strict value is not equal to itself.")
16001602 }
16011603 else throw("Strict value is not equal to itself.")
16021604 }
16031605 else throw("Strict value is not equal to itself.")
16041606 }
16051607 else throw("Strict value is not equal to itself.")
16061608 }
16071609 else throw("Strict value is not equal to itself.")
16081610 }
16091611
16101612
16111613
1612-@Callable(cP)
1613-func unstakeAndGetOneTknV2 (hP,fL,fM) = {
1614- let hg = {
1615- let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1616- if ($isInstanceOf(aS, "Boolean"))
1617- then aS
1618- else throw(($getType(aS) + " couldn't be cast to Boolean"))
1614+@Callable(cQ)
1615+func unstakeAndGetOneTknV2 (hQ,fM,fN) = {
1616+ let hh = {
1617+ let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1618+ if ($isInstanceOf(aT, "Boolean"))
1619+ then aT
1620+ else throw(($getType(aT) + " couldn't be cast to Boolean"))
16191621 }
1620- let hs = if (if (aV())
1622+ let ht = if (if (aW())
16211623 then true
1622- else (bk == s))
1624+ else (bl == t))
16231625 then true
1624- else hg
1625- let gG = [if (if (!(hs))
1626+ else hh
1627+ let gH = [if (if (!(ht))
16261628 then true
1627- else go(cP))
1629+ else gp(cQ))
16281630 then true
1629- else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0))
1631+ else aO("get operation is blocked by admin"), if ((size(cQ.payments) == 0))
16301632 then true
1631- else aN("no payments are expected")]
1632- if ((gG == gG))
1633+ else aO("no payments are expected")]
1634+ if ((gH == gH))
16331635 then {
1634- let hJ = bs()
1635- let gW = bl
1636- let hK = valueOrErrorMessage(addressFromString(hJ[C]), "Wr st addr")
1637- let hL = invoke(hK, "unstake", [toBase58String(gW), hP], nil)
1638- if ((hL == hL))
1636+ let hK = bt()
1637+ let gX = bm
1638+ let hL = valueOrErrorMessage(addressFromString(hK[D]), "Wr st addr")
1639+ let hM = invoke(hL, "unstake", [toBase58String(gX), hQ], nil)
1640+ if ((hM == hM))
16391641 then {
1640- let hU = fK(fL, fM, [AttachedPayment(gW, hP)], cP.caller, cP.originCaller, cP.transactionId)
1641- let dB = hU._1
1642- let fV = hU._2
1643- $Tuple2(dB, fV)
1642+ let hV = fL(fM, fN, [AttachedPayment(gX, hQ)], cQ.caller, cQ.originCaller, cQ.transactionId)
1643+ let dC = hV._1
1644+ let fW = hV._2
1645+ $Tuple2(dC, fW)
16441646 }
16451647 else throw("Strict value is not equal to itself.")
16461648 }
16471649 else throw("Strict value is not equal to itself.")
16481650 }
16491651
16501652
16511653
1652-@Callable(cP)
1653-func putOneTknV2WithBonusREADONLY (hV,hW) = {
1654- let hX = fp(hV, hW, "", "", true)
1655- let fE = hX._1
1656- let dB = hX._2
1657- let cx = hX._3
1658- let fJ = hX._4
1659- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1654+@Callable(cQ)
1655+func putOneTknV2WithBonusREADONLY (hW,hX) = {
1656+ let hY = fq(hW, hX, "", "", true)
1657+ let fF = hY._1
1658+ let dC = hY._2
1659+ let cy = hY._3
1660+ let fK = hY._4
1661+ $Tuple2(nil, $Tuple3(fF, cy, fK))
16601662 }
16611663
16621664
16631665
1664-@Callable(cP)
1665-func putOneTknV2WithoutTakeFeeREADONLY (hV,hW) = {
1666- let hY = fp(hV, hW, "", "", false)
1667- let fE = hY._1
1668- let dB = hY._2
1669- let cx = hY._3
1670- let fJ = hY._4
1671- $Tuple2(nil, $Tuple3(fE, cx, fJ))
1666+@Callable(cQ)
1667+func putOneTknV2WithoutTakeFeeREADONLY (hW,hX) = {
1668+ let hZ = fq(hW, hX, "", "", false)
1669+ let fF = hZ._1
1670+ let dC = hZ._2
1671+ let cy = hZ._3
1672+ let fK = hZ._4
1673+ $Tuple2(nil, $Tuple3(fF, cy, fK))
16721674 }
16731675
16741676
16751677
1676-@Callable(cP)
1677-func activate (hZ,ia) = if ((toString(cP.caller) != toString(aQ)))
1678+@Callable(cQ)
1679+func activate (ia,ib) = if ((toString(cQ.caller) != toString(aR)))
16781680 then throw("denied")
1679- else $Tuple2([StringEntry(aj(), hZ), StringEntry(ak(), ia)], "success")
1681+ else $Tuple2([StringEntry(ak(), ia), StringEntry(al(), ib)], "success")
16801682
16811683
16821684
1683-@Callable(cP)
1684-func setS (ib,hM) = if ((toString(cP.caller) != aJ(this, am())))
1685- then gn
1686- else [StringEntry(ib, hM)]
1685+@Callable(cQ)
1686+func setS (ic,hN) = if ((toString(cQ.caller) != aK(this, an())))
1687+ then go
1688+ else [StringEntry(ic, hN)]
16871689
16881690
16891691
1690-@Callable(cP)
1691-func setI (ib,hM) = if ((toString(cP.caller) != aJ(this, am())))
1692- then gn
1693- else [IntegerEntry(ib, hM)]
1692+@Callable(cQ)
1693+func setI (ic,hN) = if ((toString(cQ.caller) != aK(this, an())))
1694+ then go
1695+ else [IntegerEntry(ic, hN)]
16941696
16951697
16961698
1697-@Callable(cP)
1698-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY())
1699+@Callable(cQ)
1700+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aZ())
16991701
17001702
17011703
1702-@Callable(cP)
1703-func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO))
1704+@Callable(cQ)
1705+func getAccBalanceWrapperREADONLY (bP) = $Tuple2(nil, bO(bP))
17041706
17051707
17061708
1707-@Callable(cP)
1708-func calcPricesWrapperREADONLY (ch,ci,cm) = {
1709- let ic = cl(ch, ci, cm)
1710- $Tuple2(nil, [toString(ic[0]), toString(ic[1]), toString(ic[2])])
1709+@Callable(cQ)
1710+func calcPricesWrapperREADONLY (ci,cj,cn) = {
1711+ let id = cm(ci, cj, cn)
1712+ $Tuple2(nil, [toString(id[0]), toString(id[1]), toString(id[2])])
17111713 }
17121714
17131715
17141716
1715-@Callable(cP)
1716-func fromX18WrapperREADONLY (M,id) = $Tuple2(nil, L(parseBigIntValue(M), id))
1717+@Callable(cQ)
1718+func fromX18WrapperREADONLY (N,ie) = $Tuple2(nil, M(parseBigIntValue(N), ie))
17171719
17181720
17191721
1720-@Callable(cP)
1721-func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J)))
1722+@Callable(cQ)
1723+func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K)))
17221724
17231725
17241726
1725-@Callable(cP)
1726-func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR))))
1727+@Callable(cQ)
1728+func calcPriceBigIntWrapperREADONLY (bR,bS) = $Tuple2(nil, toString(bQ(parseBigIntValue(bR), parseBigIntValue(bS))))
17271729
17281730
17291731
1730-@Callable(cP)
1731-func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,ie,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, ie, dH, dI, true, false, 0, ""))
1732+@Callable(cQ)
1733+func estimatePutOperationWrapperREADONLY (df,bX,dE,dF,dG,dH,if,dI,dJ) = $Tuple2(nil, dD(df, bX, dE, dF, dG, dH, if, dI, dJ, true, false, 0, ""))
17321734
17331735
17341736
1735-@Callable(cP)
1736-func estimateGetOperationWrapperREADONLY (de,if,dg,ie) = {
1737- let dX = dd(de, if, dg, addressFromStringValue(ie))
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))
1737+@Callable(cQ)
1738+func estimateGetOperationWrapperREADONLY (df,ig,dh,if) = {
1739+ let dY = de(df, ig, dh, addressFromStringValue(if))
1740+ $Tuple2(nil, $Tuple10(dY._1, dY._2, dY._3, dY._4, dY._5, dY._6, dY._7, toString(dY._8), dY._9, dY._10))
17391741 }
17401742
17411743
1742-@Verifier(ig)
1743-func ih () = {
1744- let ii = {
1745- let gl = gk()
1746- if ($isInstanceOf(gl, "ByteVector"))
1744+@Verifier(ih)
1745+func ii () = {
1746+ let ij = {
1747+ let gm = gl()
1748+ if ($isInstanceOf(gm, "ByteVector"))
17471749 then {
1748- let gp = gl
1749- gp
1750+ let gq = gm
1751+ gq
17501752 }
1751- else if ($isInstanceOf(gl, "Unit"))
1752- then ig.senderPublicKey
1753+ else if ($isInstanceOf(gm, "Unit"))
1754+ then ih.senderPublicKey
17531755 else throw("Match error")
17541756 }
1755- let gl = ig
1756- if ($isInstanceOf(gl, "Order"))
1757+ let gm = ih
1758+ if ($isInstanceOf(gm, "Order"))
17571759 then {
1758- let eZ = gl
1759- let ij = aW()
1760- let ik = eY(eZ)
1761- let aF = ik._1
1762- let aG = ik._2
1763- let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey)
1764- let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], ij)
1765- if (if (if (aF)
1766- then aH
1767- else false)
1760+ let fa = gm
1761+ let ik = aX()
1762+ let il = eZ(fa)
1763+ let aG = il._1
1764+ let aH = il._2
1765+ let aI = sigVerify(fa.bodyBytes, fa.proofs[0], fa.senderPublicKey)
1766+ let aJ = sigVerify(fa.bodyBytes, fa.proofs[1], ik)
1767+ if (if (if (aG)
17681768 then aI
17691769 else false)
1770+ then aJ
1771+ else false)
17701772 then true
1771- else aE(aF, aG, aH, aI)
1773+ else aF(aG, aH, aI, aJ)
17721774 }
1773- else if ($isInstanceOf(gl, "SetScriptTransaction"))
1775+ else if ($isInstanceOf(gm, "SetScriptTransaction"))
17741776 then {
1775- let cC = gl
1776- if (sigVerify(ig.bodyBytes, ig.proofs[0], ii))
1777+ let cD = gm
1778+ if (sigVerify(ih.bodyBytes, ih.proofs[0], ij))
17771779 then true
17781780 else {
1779- let il = blake2b256(value(cC.script))
1780- let im = fromBase64String(value(getString(aQ, aC())))
1781- let in = scriptHash(this)
1782- if ((im == il))
1783- then (in != il)
1781+ let im = blake2b256(value(cD.script))
1782+ let in = fromBase64String(value(getString(aR, aD())))
1783+ let io = scriptHash(this)
1784+ if ((in == im))
1785+ then (io != im)
17841786 else false
17851787 }
17861788 }
1787- else sigVerify(ig.bodyBytes, ig.proofs[0], ii)
1789+ else sigVerify(ih.bodyBytes, ih.proofs[0], ij)
17881790 }
17891791

github/deemru/w8io/169f3d6 
750.92 ms