tx · BjfNSEf9Uc77Rz52ZKbB7KaNSrqGbbqoFQBwV4vnFgGj

3MxuKn3ZoWnX58Q4ooAraNxabpcdaAtpufk:  -0.01300000 Waves

2022.06.09 11:04 [2088569] smart account 3MxuKn3ZoWnX58Q4ooAraNxabpcdaAtpufk > SELF 0.00000000 Waves

{ "type": 13, "id": "BjfNSEf9Uc77Rz52ZKbB7KaNSrqGbbqoFQBwV4vnFgGj", "fee": 1300000, "feeAssetId": null, "timestamp": 1654761887942, "version": 1, "sender": "3MxuKn3ZoWnX58Q4ooAraNxabpcdaAtpufk", "senderPublicKey": "3GJt6j9wqqWrm9ontm1mnLfeW2wgWZYSqzVb9ueSKL1E", "proofs": [ "2Vi2kcKCeAfcqPmhd7V9Ke856Cn9XUXKSeaWpNPCGeXQw5dwRDQe9311hv8j9sWKALVQkpCHXJswwcUvD7SRKvhG" ], "script": "base64:AAIFAAAAAAAAACcIAhIDCgEIEgMKAQgSABIDCgEYEggKBgEBAQEIARIDCgEIEgMKAQgAAAAhAAAAAANTRVACAAAAAl9fAAAAAAVFTVBUWQIAAAAAAAAAAA5pZHhQb29sQWRkcmVzcwAAAAAAAAAAAQAAAAAJaWR4TFBBc0lkAAAAAAAAAAADAAAAAAlpZHhBbUFzSWQAAAAAAAAAAAQAAAAACWlkeFByQXNJZAAAAAAAAAAABQAAAAAPaWR4RmFjdFN0YWtDbnRyAAAAAAAAAAABAAAAAAVkZWxheQIAAAAJJXNfX2RlbGF5AQAAAAtrZXlGYWN0Q250cgAAAAACAAAAEyVzX19mYWN0b3J5Q29udHJhY3QBAAAAE2tleU1hbmFnZXJQdWJsaWNLZXkAAAAAAgAAABQlc19fbWFuYWdlclB1YmxpY0tleQEAAAAaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAAAAAgAAABslc19fcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkBAAAAC2tleVBvb2xBZGRyAAAAAAIAAAAPJXNfX3Bvb2xBZGRyZXNzAQAAAAtrZXlB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AJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAPdGFyZ2V0UHVibGljS2V5pyjxuQ==", "chainId": 84, "height": 2088569, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4VGLz6Pnc3PMQMvpCT1zc1ep6Ywimx9e3LhhkUsoHuoE Next: 249Dx19baZsH7xCc4c2CbUar3HqMzQtALhVmiWdf7a9H Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = 100000000
4+let a = "__"
55
6-let b = toBigInt(100000000)
6+let b = ""
77
8-let c = toBigInt(1000000000000000000)
8+let c = 1
99
10-let d = toBigInt(0)
10+let d = 3
1111
12-let e = toBigInt(1)
12+let e = 4
1313
14-let f = toBigInt((a - ((a * 1) / a)))
14+let f = 5
1515
16-let g = "100"
16+let g = 1
1717
18-let h = "1"
18+let h = "%s__delay"
1919
20-let i = "__"
21-
22-let j = ""
23-
24-let k = 1
25-
26-let l = 2
27-
28-let m = 3
29-
30-let n = 4
31-
32-let o = 1
33-
34-let p = 2
35-
36-let q = 3
37-
38-let r = 4
39-
40-let s = 5
41-
42-let t = 6
43-
44-let u = 7
45-
46-let v = 8
47-
48-let w = 9
49-
50-let x = 1
51-
52-let y = 7
53-
54-let z = 10
55-
56-let A = "%s__delay"
57-
58-func B (C,D) = fraction(toBigInt(C), c, toBigInt(D))
20+func i () = "%s__factoryContract"
5921
6022
61-func E (F,G) = toInt(fraction(F, toBigInt(G), c))
23+func j () = "%s__managerPublicKey"
6224
6325
64-func H (I,J,K) = fraction(I, J, K)
26+func k () = "%s__pendingManagerPublicKey"
6527
6628
67-func L (F) = if ((d > F))
68- then -(F)
69- else F
29+func l () = "%s__poolAddress"
7030
7131
72-func M () = "%s__factoryContract"
32+func m () = "%s__amountAsset"
7333
7434
75-func N () = "%s__managerPublicKey"
35+func n () = "%s__priceAsset"
7636
7737
78-func O () = "%s__pendingManagerPublicKey"
38+func o () = "%s__adminPubKeys"
7939
8040
81-func P () = "%s%s__price__last"
41+func p () = "%s__amp"
8242
8343
84-func Q (R,S) = makeString(["%s%s%d%d__price__history", toString(R), toString(S)], i)
44+func q (r) = ("%s%d__amp__" + toString(r))
8545
8646
87-func T (U,V) = ((("%s%s%s__P__" + U) + "__") + V)
47+func s (t) = makeString(["%s%s__lastGetOrPutOneTknCall", t], a)
8848
8949
90-func W (U,V) = ((("%s%s%s__G__" + U) + "__") + V)
50+func u () = "%s__factoryConfig"
9151
9252
93-func X () = "%s__amountAsset"
53+func v (w,x) = (((("%d%d%s__" + w) + "__") + x) + "__config")
9454
9555
96-func Y () = "%s__priceAsset"
56+func y (z) = ("%s%s%s__mappings__baseAsset2internalId__" + z)
9757
9858
99-func Z () = "%s__amp"
59+func A (B,C) = valueOrErrorMessage(getString(B, C), makeString(["mandatory ", toString(B), ".", C, " not defined"], ""))
10060
10161
102-func aa () = "%s__addonAddr"
62+func D (B,C) = valueOrErrorMessage(getInteger(B, C), makeString(["mandatory ", toString(B), ".", C, " not defined"], ""))
10363
10464
105-func ab (ac) = makeString(["%s%s__lastGetOrPutOneTknCall", ac], i)
65+let E = addressFromStringValue(A(this, l()))
10666
67+let F = addressFromStringValue(A(E, i()))
10768
108-func ad () = "%s__factoryConfig"
109-
110-
111-func ae () = "%s%s__matcher__publicKey"
112-
113-
114-func af (ag,ah) = (((("%d%d%s__" + ag) + "__") + ah) + "__config")
115-
116-
117-func ai (aj) = ("%s%s%s__mappings__baseAsset2internalId__" + aj)
118-
119-
120-func ak () = "%s__shutdown"
121-
122-
123-func al (am,an,ao) = throw(((((("Failed: ordValid=" + toString(am)) + " sndrValid=") + toString(an)) + " mtchrValid=") + toString(ao)))
124-
125-
126-func ap (F) = {
127- let aq = F
128- if ($isInstanceOf(aq, "String"))
129- then {
130- let ar = aq
131- ar
132- }
133- else throw("fail cast to String")
69+func G () = {
70+ let H = A(E, m())
71+ let I = A(E, n())
72+ let J = D(F, y(I))
73+ let w = D(F, y(H))
74+ split(A(F, v(toString(w), toString(J))), a)
13475 }
13576
13677
137-func as (at,au) = valueOrErrorMessage(getString(at, au), makeString(["mandatory ", toString(at), ".", au, " not defined"], ""))
78+func K () = split(A(F, u()), a)
13879
13980
140-func av (at,au) = valueOrErrorMessage(getInteger(at, au), makeString(["mandatory ", toString(at), ".", au, " not defined"], ""))
141-
142-
143-let aw = addressFromStringValue(as(this, M()))
144-
145-let ax = as(this, Z())
146-
147-func ay () = valueOrElse(getBoolean(aw, ak()), false)
148-
149-
150-func az () = fromBase58String(as(aw, ae()))
151-
152-
153-func aA () = {
154- let aB = as(this, X())
155- let aC = as(this, Y())
156- let aD = av(aw, ai(aC))
157- let ag = av(aw, ai(aB))
158- split(as(aw, af(toString(ag), toString(aD))), i)
159- }
160-
161-
162-func aE () = split(as(aw, ad()), i)
163-
164-
165-func aF (aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(aG), toString(aH), toString(aI), toString(aJ), toString(aK), toString(aL), toString(aM), toString(aN), toString(aO), toString(aP)], i)
166-
167-
168-func aQ (aR,aS,aT,aJ,aM,aN) = makeString(["%d%d%d%d%d%d", toString(aR), toString(aS), toString(aT), toString(aJ), toString(aM), toString(aN)], i)
169-
170-
171-func aU (aV) = if ((aV == "WAVES"))
172- then wavesBalance(this).available
173- else assetBalance(this, fromBase58String(aV))
174-
175-
176-func aW (aX,aY) = fraction(aX, c, aY)
177-
178-
179-func aZ (ba,bb,bc) = {
180- let bd = fraction((ba - bb), b, bb)
181- let be = ((bc - L(bd)) > d)
182- if (!(be))
183- then throw(("Big slpg: " + toString(bd)))
184- else $Tuple2(be, min([ba, bb]))
185- }
186-
187-
188-func bf (bg,bh,bi) = {
189- let bd = fraction(bh, b, bg)
190- let bj = (bi > bd)
191- if (if (bj)
192- then true
193- else (bh > bg))
194- then throw(((((((toString(bh) + " ") + toString(bg)) + " ") + toString(bd)) + " ") + toString(bi)))
195- else bj
196- }
197-
198-
199-func bk (bl,bm,bn,bo) = {
200- let bp = B(bn, bl)
201- let bq = B(bo, bm)
202- aW(bq, bp)
203- }
204-
205-
206-func br (bn,bo,bs) = {
207- let bt = aA()
208- let bu = parseIntValue(bt[t])
209- let bv = parseIntValue(bt[u])
210- let bw = bk(bu, bv, bn, bo)
211- let aY = B(bn, bu)
212- let aX = B(bo, bv)
213- let bx = B(bs, a)
214- let by = aW(aY, bx)
215- let bz = aW(aX, bx)
216-[bw, by, bz]
217- }
218-
219-
220-func bA (bn,bo,bs) = {
221- let bB = br(bn, bo, bs)
222-[E(bB[0], a), E(bB[1], a), E(bB[2], a)]
223- }
224-
225-
226-func bC (bD,bE,bF,bG) = {
227- let bt = aA()
228- let bH = bt[q]
229- let bI = bt[r]
230- let bJ = bt[s]
231- let bK = parseIntValue(bt[t])
232- let bL = parseIntValue(bt[u])
233- let bM = bt[p]
234- let bN = valueOrErrorMessage(assetInfo(fromBase58String(bH)), "Wrong LP id").quantity
235- if ((bH != bE))
236- then throw("Wrong pmt asset")
237- else {
238- let bO = aU(bI)
239- let bP = B(bO, bK)
240- let bQ = aU(bJ)
241- let bR = B(bQ, bL)
242- let bS = aW(bR, bP)
243- let bT = E(bS, a)
244- let bU = B(bF, a)
245- let bV = B(bN, a)
246- let bW = fraction(bP, bU, bV)
247- let bX = fraction(bR, bU, bV)
248- let bY = E(bW, bK)
249- let bZ = E(bX, bL)
250- let ca = if ((bD == ""))
251- then nil
252- else [ScriptTransfer(bG, bY, if ((bI == "WAVES"))
253- then unit
254- else fromBase58String(bI)), ScriptTransfer(bG, bZ, if ((bJ == "WAVES"))
255- then unit
256- else fromBase58String(bJ)), StringEntry(W(toString(bG), bD), aQ(bY, bZ, bF, bT, height, lastBlock.timestamp)), IntegerEntry(P(), bT), IntegerEntry(Q(height, lastBlock.timestamp), bT)]
257- $Tuple10(bY, bZ, bI, bJ, bO, bQ, bN, bS, bM, ca)
81+func L () = {
82+ let M = getString(j())
83+ if ($isInstanceOf(M, "String"))
84+ then {
85+ let N = M
86+ fromBase58String(N)
25887 }
259- }
260-
261-
262-func cb (bD,bc,cc,cd,ce,cf,bG,cg,ch,ci,cj,ck) = {
263- let bt = aA()
264- let bH = fromBase58String(bt[q])
265- let cl = bt[r]
266- let cm = bt[s]
267- let cn = bt[v]
268- let co = bt[w]
269- let cp = parseIntValue(bt[t])
270- let cq = parseIntValue(bt[u])
271- let bM = bt[p]
272- let cr = valueOrErrorMessage(assetInfo(bH), "Wr lp as").quantity
273- let bO = if (cg)
274- then aU(cl)
275- else if (if (ci)
276- then (ck == cl)
277- else false)
278- then (aU(cl) - cj)
279- else if (ci)
280- then aU(cl)
281- else (aU(cl) - cc)
282- let bQ = if (cg)
283- then aU(cm)
284- else if (if (ci)
285- then (ck == cm)
286- else false)
287- then (aU(cm) - cj)
288- else if (ci)
289- then aU(cm)
290- else (aU(cm) - ce)
291- let cs = B(cc, cp)
292- let ct = B(ce, cq)
293- let cu = aW(ct, cs)
294- let bP = B(bO, cp)
295- let bR = B(bQ, cq)
296- let cv = if ((cr == 0))
297- then {
298- let bS = d
299- let cw = d
300- let bx = pow((cs * ct), 0, toBigInt(5), 1, 0, DOWN)
301- $Tuple5(E(bx, a), E(cs, cp), E(ct, cq), aW((bR + ct), (bP + cs)), cw)
302- }
303- else {
304- let bS = aW(bR, bP)
305- let cx = fraction(L((bS - cu)), c, bS)
306- let cw = B(bc, a)
307- if (if ((bS != d))
308- then (cx > cw)
309- else false)
310- then throw(((("Price slippage " + toString(cx)) + " > ") + toString(cw)))
311- else {
312- let cy = B(cr, a)
313- let cz = fraction(cs, bS, c)
314- let cA = fraction(ct, c, bS)
315- let cB = if ((cz > ct))
316- then $Tuple2(cA, ct)
317- else $Tuple2(cs, cz)
318- let cC = cB._1
319- let cD = cB._2
320- let bx = fraction(cy, cD, bR)
321- $Tuple5(E(bx, a), E(cC, cp), E(cD, cq), bS, cw)
322- }
323- }
324- let cE = cv._1
325- let cF = cv._2
326- let cG = cv._3
327- let bT = E(cv._4, a)
328- let cH = E(cv._5, a)
329- if ((0 >= cE))
330- then throw("LP <= 0")
331- else {
332- let cI = if (!(ch))
333- then 0
334- else cE
335- let cJ = (cc - cF)
336- let cK = (ce - cG)
337- let cL = if (if (ci)
338- then (ck == cl)
339- else false)
340- then $Tuple2(cj, 0)
341- else if (if (ci)
342- then (ck == cm)
343- else false)
344- then $Tuple2(0, cj)
345- else $Tuple2(cF, cG)
346- let cM = cL._1
347- let cN = cL._2
348- let cO = [IntegerEntry(P(), bT), IntegerEntry(Q(height, lastBlock.timestamp), bT), StringEntry(T(bG, bD), aF(cM, cN, cI, bT, bc, cH, height, lastBlock.timestamp, cJ, cK))]
349- $Tuple13(cE, cI, bT, bO, bQ, cr, bH, bM, cO, cJ, cK, cd, cf)
350- }
351- }
352-
353-
354-func cP (cQ) = {
355- let bt = aA()
356- let cR = bt[r]
357- let cS = bt[s]
358- let bM = parseIntValue(bt[p])
359- let bu = parseIntValue(bt[t])
360- let bv = parseIntValue(bt[u])
361- let cT = aU(cR)
362- let cU = aU(cS)
363- let bS = if ((cQ.orderType == Buy))
364- then bk(bu, bv, (cT + cQ.amount), cU)
365- else bk(bu, bv, (cT - cQ.amount), cU)
366- let bT = E(bS, a)
367- if (if (if (ay())
368- then true
369- else (bM == m))
370- then true
371- else (bM == n))
372- then throw("Admin blocked")
373- else {
374- let cV = cQ.assetPair.amountAsset
375- let cW = if ((cV == unit))
376- then "WAVES"
377- else toBase58String(value(cV))
378- let cX = cQ.assetPair.priceAsset
379- let cY = if ((cX == unit))
380- then "WAVES"
381- else toBase58String(value(cX))
382- if (if ((cW != cR))
383- then true
384- else (cY != cS))
385- then throw("Wr assets")
386- else {
387- let cZ = cQ.price
388- let cq = fraction(a, bv, bu)
389- let da = H(cZ, a, cq)
390- let db = if ((cQ.orderType == Buy))
391- then (bT >= da)
392- else (da >= bT)
393- true
394- }
395- }
396- }
397-
398-
399-func dc (dd) = if ((size(dd.payments) != 1))
400- then throw("1 pmnt exp")
401- else {
402- let de = value(dd.payments[0])
403- let bE = value(de.assetId)
404- let cj = de.amount
405- let cv = bC(toBase58String(dd.transactionId), toBase58String(bE), cj, dd.caller)
406- let bY = cv._1
407- let bZ = cv._2
408- let bM = parseIntValue(cv._9)
409- let ca = cv._10
410- if (if (ay())
411- then true
412- else (bM == n))
413- then throw(("Admin blocked: " + toString(bM)))
414- else $Tuple5(bY, bZ, cj, bE, ca)
415- }
416-
417-
418-func df (ac,V,dg,dh,bc,ch,ci,cj,ck) = {
419- let cv = cb(V, bc, value(dg).amount, value(dg).assetId, value(dh).amount, value(dh).assetId, ac, false, ch, ci, cj, ck)
420- let bM = parseIntValue(cv._8)
421- if (if (if (ay())
422- then true
423- else (bM == l))
424- then true
425- else (bM == n))
426- then throw(("Blocked:" + toString(bM)))
427- else cv
428- }
429-
430-
431-func di () = {
432- let aq = getString(N())
433- if ($isInstanceOf(aq, "String"))
434- then {
435- let dj = aq
436- fromBase58String(dj)
437- }
438- else if ($isInstanceOf(aq, "Unit"))
88+ else if ($isInstanceOf(M, "Unit"))
43989 then unit
44090 else throw("Match error")
44191 }
44292
44393
444-func dk () = {
445- let aq = getString(O())
446- if ($isInstanceOf(aq, "String"))
94+func O () = {
95+ let M = getString(k())
96+ if ($isInstanceOf(M, "String"))
44797 then {
448- let dj = aq
449- fromBase58String(dj)
98+ let N = M
99+ fromBase58String(N)
450100 }
451- else if ($isInstanceOf(aq, "Unit"))
101+ else if ($isInstanceOf(M, "Unit"))
452102 then unit
453103 else throw("Match error")
454104 }
455105
456106
457-let dl = throw("Permission denied")
458-
459-func dm (dd) = {
460- let aq = di()
461- if ($isInstanceOf(aq, "ByteVector"))
107+func P (Q) = {
108+ let R = throw("Permission denied")
109+ let M = L()
110+ if ($isInstanceOf(M, "ByteVector"))
462111 then {
463- let dn = aq
464- if ((dd.callerPublicKey == dn))
112+ let S = M
113+ if ((Q.callerPublicKey == S))
465114 then true
466- else dl
115+ else R
467116 }
468- else if ($isInstanceOf(aq, "Unit"))
469- then if ((dd.caller == this))
117+ else if ($isInstanceOf(M, "Unit"))
118+ then if ((Q.caller == this))
470119 then true
471- else dl
120+ else R
472121 else throw("Match error")
473122 }
474123
475124
476-@Callable(dd)
477-func constructor (M,aa) = {
478- let do = dm(dd)
479- if ((do == do))
480- then [StringEntry(M(), M), StringEntry(aa(), aa)]
125+func T () = {
126+ let M = getString(o())
127+ if ($isInstanceOf(M, "String"))
128+ then {
129+ let N = M
130+ if ((size(N) == 0))
131+ then nil
132+ else split(N, a)
133+ }
134+ else nil
135+ }
136+
137+
138+func U (Q) = if (containsElement(T(), toBase58String(Q.callerPublicKey)))
139+ then true
140+ else P(Q)
141+
142+
143+func V (Q) = if ((Q.caller == E))
144+ then true
145+ else throw("caller must be the pool")
146+
147+
148+@Callable(Q)
149+func constructor (W) = {
150+ let X = P(Q)
151+ if ((X == X))
152+ then [StringEntry(l(), W)]
481153 else throw("Strict value is not equal to itself.")
482154 }
483155
484156
485157
486-@Callable(dd)
487-func setManager (dp) = {
488- let do = dm(dd)
489- if ((do == do))
158+@Callable(Q)
159+func setManager (Y) = {
160+ let X = P(Q)
161+ if ((X == X))
490162 then {
491- let dq = fromBase58String(dp)
492- if ((dq == dq))
493- then [StringEntry(O(), dp)]
163+ let Z = fromBase58String(Y)
164+ if ((Z == Z))
165+ then [StringEntry(k(), Y)]
494166 else throw("Strict value is not equal to itself.")
495167 }
496168 else throw("Strict value is not equal to itself.")
498170
499171
500172
501-@Callable(dd)
173+@Callable(Q)
502174 func confirmManager () = {
503- let bB = dk()
504- let dr = if (isDefined(bB))
175+ let aa = O()
176+ let ab = if (isDefined(aa))
505177 then true
506178 else throw("No pending manager")
507- if ((dr == dr))
179+ if ((ab == ab))
508180 then {
509- let ds = if ((dd.callerPublicKey == value(bB)))
181+ let ac = if ((Q.callerPublicKey == value(aa)))
510182 then true
511183 else throw("You are not pending manager")
512- if ((ds == ds))
513- then [StringEntry(N(), toBase58String(value(bB))), DeleteEntry(O())]
184+ if ((ac == ac))
185+ then [StringEntry(j(), toBase58String(value(aa))), DeleteEntry(k())]
514186 else throw("Strict value is not equal to itself.")
515187 }
516188 else throw("Strict value is not equal to itself.")
518190
519191
520192
521-@Callable(dd)
522-func put (dt,du) = {
523- let dv = aE()
524- let dw = valueOrErrorMessage(addressFromString(dv[x]), "Wr st addr")
525- let dx = valueOrErrorMessage(addressFromString(dv[y]), "Wr sl addr")
526- if ((0 > dt))
527- then throw("Wrong slippage")
528- else if ((size(dd.payments) != 2))
529- then throw("2 pmnts expd")
530- else {
531- let dy = df(toString(dd.caller), toBase58String(dd.transactionId), AttachedPayment(value(dd.payments[0]).assetId, value(dd.payments[0]).amount), dd.payments[1], dt, true, false, 0, "")
532- let cI = dy._2
533- let dz = dy._7
534- let ca = dy._9
535- let cJ = dy._10
536- let cK = dy._11
537- let bI = dy._12
538- let bJ = dy._13
539- let cv = invoke(aw, "emit", [cI], nil)
540- if ((cv == cv))
541- then {
542- let dA = {
543- let aq = cv
544- if ($isInstanceOf(aq, "Address"))
545- then {
546- let dB = aq
547- invoke(dB, "emit", [cI], nil)
548- }
549- else unit
550- }
551- if ((dA == dA))
552- then {
553- let dC = if ((cJ > 0))
554- then invoke(dx, "put", nil, [AttachedPayment(bI, cJ)])
555- else nil
556- if ((dC == dC))
557- then {
558- let dD = if ((cK > 0))
559- then invoke(dx, "put", nil, [AttachedPayment(bJ, cK)])
560- else nil
561- if ((dD == dD))
562- then {
563- let dE = if (du)
564- then {
565- let dF = invoke(dw, "stake", nil, [AttachedPayment(dz, cI)])
566- if ((dF == dF))
567- then nil
568- else throw("Strict value is not equal to itself.")
569- }
570- else [ScriptTransfer(dd.caller, cI, dz)]
571- (ca ++ dE)
572- }
573- else throw("Strict value is not equal to itself.")
574- }
575- else throw("Strict value is not equal to itself.")
576- }
577- else throw("Strict value is not equal to itself.")
578- }
579- else throw("Strict value is not equal to itself.")
580- }
581- }
582-
583-
584-
585-@Callable(dd)
586-func putOneTkn (dG,dH,dI,bc,du) = {
587- let bt = aE()
588- let dw = valueOrErrorMessage(addressFromString(bt[x]), "Wr st addr")
589- let dx = valueOrErrorMessage(addressFromString(bt[y]), "Wr sl addr")
590- let dJ = valueOrErrorMessage(addressFromString(bt[z]), "Wr gwx addr")
591- let dK = aA()
592- let bI = dK[r]
593- let bJ = dK[s]
594- let bK = parseIntValue(dK[t])
595- let bL = parseIntValue(dK[u])
596- let dL = valueOrElse(getString(this, aa()), "")
597- let bG = if ((dL == toString(dd.caller)))
598- then dd.originCaller
599- else dd.caller
600- let dM = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid")
601- let dN = reentrantInvoke(dM, "ensureCanGetOrPutOneTkn", [toString(bG)], nil)
602- if ((dN == dN))
603- then if (if (if (if ((0 >= bc))
604- then true
605- else (0 >= dG))
606- then true
607- else (0 >= dH))
608- then true
609- else (0 >= dI))
610- then throw("Wrong params")
611- else if ((size(dd.payments) != 1))
612- then throw("1 pmnt expd")
613- else {
614- let de = value(dd.payments[0])
615- let bE = toBase58String(value(de.assetId))
616- let cj = de.amount
617- if (if (if ((dG > cj))
618- then true
619- else (dH > cj))
620- then true
621- else (10000000 > cj))
622- then throw("Wrong pmt amt")
623- else {
624- let bO = aU(bI)
625- let bQ = aU(bJ)
626- let dO = if ((bE == bI))
627- then $Tuple6((bO - cj), bQ, (cj - dG), dH, 0, 0)
628- else if ((bE == bJ))
629- then $Tuple6(bO, (bQ - cj), 0, 0, (cj - dH), dG)
630- else throw("wrong pmtAssetId")
631- let dP = dO._1
632- let dQ = dO._2
633- let dR = dO._3
634- let dS = dO._4
635- let dT = dO._5
636- let dU = dO._6
637- let bh = invoke(dJ, "calcD", [toString(dP), toString(dQ), ax, g, h], nil)
638- let bg = invoke(dJ, "calcD", [toString(toBigInt(((dP + dR) - dU))), toString(toBigInt(((dQ + dT) - dS))), ax, g, h], nil)
639- let dV = bf(parseBigIntValue(ap(bg)), parseBigIntValue(ap(bh)), f)
640- if ((dV == dV))
641- then {
642- let dW = df(toString(dd.caller), toBase58String(dd.transactionId), AttachedPayment(fromBase58String(bI), dG), AttachedPayment(fromBase58String(bJ), dH), bc, true, true, cj, bE)
643- let dX = dW._2
644- let dz = dW._7
645- let ca = dW._9
646- let cJ = dW._10
647- let cK = dW._11
648- let dY = aZ(toBigInt(dX), toBigInt(dI), toBigInt(bc))
649- let cI = toInt(dY._2)
650- let dy = invoke(aw, "emit", [cI], nil)
651- if ((dy == dy))
652- then {
653- let dA = {
654- let aq = dy
655- if ($isInstanceOf(aq, "Address"))
656- then {
657- let dB = aq
658- invoke(dB, "emit", [cI], nil)
659- }
660- else unit
661- }
662- if ((dA == dA))
663- then {
664- let dC = if ((cJ > 0))
665- then invoke(dx, "put", nil, [AttachedPayment(fromBase58String(bI), cJ)])
666- else nil
667- if ((dC == dC))
668- then {
669- let dD = if ((cK > 0))
670- then invoke(dx, "put", nil, [AttachedPayment(fromBase58String(bJ), cK)])
671- else nil
672- if ((dD == dD))
673- then {
674- let dE = if (du)
675- then {
676- let dF = invoke(dw, "stake", nil, [AttachedPayment(dz, cI)])
677- if ((dF == dF))
678- then nil
679- else throw("Strict value is not equal to itself.")
680- }
681- else [ScriptTransfer(dd.caller, cI, dz)]
682- (ca ++ dE)
683- }
684- else throw("Strict value is not equal to itself.")
685- }
686- else throw("Strict value is not equal to itself.")
687- }
688- else throw("Strict value is not equal to itself.")
689- }
690- else throw("Strict value is not equal to itself.")
691- }
692- else throw("Strict value is not equal to itself.")
693- }
694- }
193+@Callable(Q)
194+func setAdmins (ad) = {
195+ let X = P(Q)
196+ if ((X == X))
197+ then [StringEntry(o(), makeString(ad, a))]
695198 else throw("Strict value is not equal to itself.")
696199 }
697200
698201
699202
700-@Callable(dd)
701-func putForFree (dZ) = if ((0 > dZ))
702- then throw("Wrong slpg")
703- else if ((size(dd.payments) != 2))
704- then throw("2 pmnts expd")
705- else {
706- let dW = df(toString(dd.caller), toBase58String(dd.transactionId), AttachedPayment(value(dd.payments[0]).assetId, value(dd.payments[0]).amount), dd.payments[1], dZ, false, false, 0, "")
707- dW._9
708- }
709-
710-
711-
712-@Callable(dd)
713-func get () = {
714- let cv = dc(dd)
715- let ea = cv._1
716- let bZ = cv._2
717- let cj = cv._3
718- let bE = cv._4
719- let ca = cv._5
720- let eb = invoke(aw, "burn", [cj], [AttachedPayment(bE, cj)])
721- if ((eb == eb))
722- then ca
723- else throw("Strict value is not equal to itself.")
724- }
725-
726-
727-
728-@Callable(dd)
729-func getOneTkn (ec,ed,ee,ef,bc) = if ((size(dd.payments) != 1))
730- then throw("1 pmnt expd")
731- else {
732- let bt = aA()
733- let bH = bt[q]
734- let bI = bt[r]
735- let bJ = bt[s]
736- let bK = parseIntValue(bt[t])
737- let bL = parseIntValue(bt[u])
738- let bM = bt[p]
739- let dv = aE()
740- let dJ = valueOrErrorMessage(addressFromString(dv[z]), "Wr sl addr")
741- let de = value(dd.payments[0])
742- let dL = valueOrElse(getString(this, aa()), "")
743- let bG = if ((dL == toString(dd.caller)))
744- then dd.originCaller
745- else dd.caller
746- let bD = toBase58String(dd.transactionId)
747- let bE = value(de.assetId)
748- let cj = de.amount
749- let dM = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid")
750- let dN = reentrantInvoke(dM, "ensureCanGetOrPutOneTkn", [toString(bG)], nil)
751- if ((dN == dN))
752- then if ((1000000000 > cj))
753- then throw("Min pmt 10 LP")
754- else if (if (if ((0 > bc))
755- then true
756- else (0 > ec))
757- then true
758- else (0 > ee))
759- then throw("Wrong params")
760- else if ((bH != toBase58String(bE)))
761- then throw("Wrong LP")
762- else {
763- let cv = bC(toBase58String(dd.transactionId), toBase58String(bE), cj, dd.caller)
764- let eg = cv._1
765- let eh = cv._2
766- let bO = aU(bI)
767- let bQ = aU(bJ)
768- let ei = if ((ef == bI))
769- then $Tuple7((bO - eg), (bQ - eh), ec, eh, 0, 0, (eg + ec))
770- else if ((ef == bJ))
771- then $Tuple7((bO - eg), (bQ - eh), 0, 0, ec, eg, (eh + ec))
772- else throw("wrong outAssetId")
773- let dP = ei._1
774- let dQ = ei._2
775- let dR = ei._3
776- let dS = ei._4
777- let dT = ei._5
778- let dU = ei._6
779- let ej = ei._7
780- if (if ((0 > dR))
781- then true
782- else (0 > dT))
783- then throw("Wrong calc")
784- else {
785- let bh = invoke(dJ, "calcD", [toString(dP), toString(dQ), ax, g, h], nil)
786- let bg = invoke(dJ, "calcD", [toString(((dP - dR) + dU)), toString(((dQ + dS) - dT)), ax, g, h], nil)
787- let dV = bf(parseBigIntValue(ap(bg)), parseBigIntValue(ap(bh)), f)
788- if ((dV == dV))
789- then {
790- let ek = aZ(toBigInt(ej), toBigInt(ee), toBigInt(bc))
791- if ((ek == ek))
792- then {
793- let el = if ((ef == bI))
794- then $Tuple2(toInt(ek._2), 0)
795- else $Tuple2(0, toInt(ek._2))
796- let em = el._1
797- let en = el._2
798- let eo = aW(B(bQ, bL), B(bO, bK))
799- let ep = E(eo, a)
800- let ca = [ScriptTransfer(bG, (em + en), if ((ef == "WAVES"))
801- then unit
802- else fromBase58String(ef)), StringEntry(W(toString(bG), bD), aQ(em, en, cj, ep, height, lastBlock.timestamp)), IntegerEntry(P(), ep), IntegerEntry(Q(height, lastBlock.timestamp), ep)]
803- if ((ca == ca))
804- then {
805- let eq = invoke(aw, "burn", [cj], [AttachedPayment(bE, cj)])
806- if ((eq == eq))
807- then ca
808- else throw("Strict value is not equal to itself.")
809- }
810- else throw("Strict value is not equal to itself.")
811- }
812- else throw("Strict value is not equal to itself.")
813- }
814- else throw("Strict value is not equal to itself.")
815- }
816- }
817- else throw("Strict value is not equal to itself.")
818- }
819-
820-
821-
822-@Callable(dd)
823-func getNoLess (er,es) = {
824- let cv = dc(dd)
825- let bY = cv._1
826- let bZ = cv._2
827- let cj = cv._3
828- let bE = cv._4
829- let ca = cv._5
830- if ((er > bY))
831- then throw(((("Failed: " + toString(bY)) + " < ") + toString(er)))
832- else if ((es > bZ))
833- then throw(((("Failed: " + toString(bZ)) + " < ") + toString(es)))
834- else {
835- let et = invoke(aw, "burn", [cj], [AttachedPayment(bE, cj)])
836- if ((et == et))
837- then ca
838- else throw("Strict value is not equal to itself.")
839- }
840- }
841-
842-
843-
844-@Callable(dd)
845-func unstakeAndGet (eu) = {
846- let ev = if ((size(dd.payments) != 0))
203+@Callable(Q)
204+func unstakeAndGetOneTkn (ae,af,ag,ah,ai,aj) = {
205+ let ak = if ((size(Q.payments) != 0))
847206 then throw("No pmnts expd")
848207 else true
849- if ((ev == ev))
208+ if ((ak == ak))
850209 then {
851- let bt = aA()
852- let ew = aE()
853- let dz = fromBase58String(bt[q])
854- let ex = valueOrErrorMessage(addressFromString(ew[x]), "Wr st addr")
855- let ey = invoke(ex, "unstake", [toBase58String(dz), eu], nil)
856- if ((ey == ey))
210+ let al = G()
211+ let am = K()
212+ let an = fromBase58String(al[d])
213+ let ao = valueOrErrorMessage(addressFromString(am[g]), "Wr st addr")
214+ let ap = invoke(ao, "unstake", [toBase58String(an), ae], nil)
215+ if ((ap == ap))
857216 then {
858- let cv = bC(toBase58String(dd.transactionId), toBase58String(dz), eu, dd.caller)
859- let bM = parseIntValue(cv._9)
860- let ca = cv._10
861- let ez = if (if (ay())
862- then true
863- else (bM == n))
864- then throw(("Blocked: " + toString(bM)))
865- else true
866- if ((ez == ez))
867- then {
868- let eA = invoke(aw, "burn", [eu], [AttachedPayment(dz, eu)])
869- if ((eA == eA))
870- then ca
871- else throw("Strict value is not equal to itself.")
872- }
217+ let aq = reentrantInvoke(E, "getOneTkn", [af, ag, ah, ai, aj], [AttachedPayment(an, ae)])
218+ if ((aq == aq))
219+ then nil
873220 else throw("Strict value is not equal to itself.")
874221 }
875222 else throw("Strict value is not equal to itself.")
879226
880227
881228
882-@Callable(dd)
883-func activate (eB,eC) = if ((toString(dd.caller) != toString(aw)))
884- then throw("denied")
885- else $Tuple2([StringEntry(X(), eB), StringEntry(Y(), eC)], "success")
886-
887-
888-
889-@Callable(dd)
890-func setS (eD,ez) = if ((toString(dd.caller) != as(this, aa())))
891- then dl
892- else [StringEntry(eD, ez)]
893-
894-
895-
896-@Callable(dd)
897-func setI (eD,ez) = if ((toString(dd.caller) != as(this, aa())))
898- then dl
899- else [IntegerEntry(eD, ez)]
900-
901-
902-
903-@Callable(dd)
904-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aA())
905-
906-
907-
908-@Callable(dd)
909-func getAccBalanceWrapperREADONLY (aV) = $Tuple2(nil, aU(aV))
910-
911-
912-
913-@Callable(dd)
914-func calcPricesWrapperREADONLY (bn,bo,bs) = {
915- let eE = br(bn, bo, bs)
916- $Tuple2(nil, [toString(eE[0]), toString(eE[1]), toString(eE[2])])
229+@Callable(Q)
230+func setAmp (ar) = {
231+ let X = U(Q)
232+ if ((X == X))
233+ then {
234+ let as = invoke(E, "setS", [p(), ar], nil)
235+ let at = invoke(E, "setS", [q(height), ar], nil)
236+ $Tuple2(nil, $Tuple2(as, at))
237+ }
238+ else throw("Strict value is not equal to itself.")
917239 }
918240
919241
920242
921-@Callable(dd)
922-func fromX18WrapperREADONLY (F,eF) = $Tuple2(nil, E(parseBigIntValue(F), eF))
923-
924-
925-
926-@Callable(dd)
927-func toX18WrapperREADONLY (C,D) = $Tuple2(nil, toString(B(C, D)))
928-
929-
930-
931-@Callable(dd)
932-func calcPriceBigIntWrapperREADONLY (aX,aY) = $Tuple2(nil, toString(aW(parseBigIntValue(aX), parseBigIntValue(aY))))
933-
934-
935-
936-@Callable(dd)
937-func estimatePutOperationWrapperREADONLY (bD,bc,cc,cd,ce,cf,eG,cg,ch) = $Tuple2(nil, cb(bD, bc, cc, cd, ce, cf, eG, cg, ch, false, 0, ""))
938-
939-
940-
941-@Callable(dd)
942-func estimateGetOperationWrapperREADONLY (bD,eH,bF,eG) = {
943- let cv = bC(bD, eH, bF, addressFromStringValue(eG))
944- $Tuple2(nil, $Tuple10(cv._1, cv._2, cv._3, cv._4, cv._5, cv._6, cv._7, toString(cv._8), cv._9, cv._10))
243+@Callable(Q)
244+func ensureCanGetOrPutOneTkn (t) = {
245+ let X = V(Q)
246+ if ((X == X))
247+ then {
248+ let au = {
249+ let M = getInteger(E, s(t))
250+ if ($isInstanceOf(M, "Int"))
251+ then {
252+ let av = M
253+ let aw = (av + value(getInteger(E, h)))
254+ let ax = (height >= aw)
255+ let ay = (aw - height)
256+ if (ax)
257+ then true
258+ else throw(makeString(["you should wait", toString(ay), "blocks more to perform the action"], " "))
259+ }
260+ else true
261+ }
262+ if ((au == au))
263+ then {
264+ let az = invoke(E, "setI", [s(t), height], nil)
265+ if ((az == az))
266+ then nil
267+ else throw("Strict value is not equal to itself.")
268+ }
269+ else throw("Strict value is not equal to itself.")
270+ }
271+ else throw("Strict value is not equal to itself.")
945272 }
946273
947274
948-@Verifier(eI)
949-func eJ () = {
950- let aq = eI
951- if ($isInstanceOf(aq, "Order"))
952- then {
953- let cQ = aq
954- let eK = az()
955- let am = cP(cQ)
956- let eL = sigVerify(cQ.bodyBytes, cQ.proofs[0], cQ.senderPublicKey)
957- let eM = sigVerify(cQ.bodyBytes, cQ.proofs[1], eK)
958- if (if (if (am)
959- then eL
960- else false)
961- then eM
962- else false)
963- then true
964- else al(am, eL, eM)
965- }
966- else {
967- let eN = {
968- let eO = di()
969- if ($isInstanceOf(eO, "ByteVector"))
970- then {
971- let dn = eO
972- dn
973- }
974- else if ($isInstanceOf(eO, "Unit"))
975- then eI.senderPublicKey
976- else throw("Match error")
275+@Verifier(aA)
276+func aB () = {
277+ let aC = {
278+ let M = L()
279+ if ($isInstanceOf(M, "ByteVector"))
280+ then {
281+ let S = M
282+ S
977283 }
978- sigVerify(eI.bodyBytes, eI.proofs[0], eN)
979- }
284+ else if ($isInstanceOf(M, "Unit"))
285+ then aA.senderPublicKey
286+ else throw("Match error")
287+ }
288+ sigVerify(aA.bodyBytes, aA.proofs[0], aC)
980289 }
981290
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = 100000000
4+let a = "__"
55
6-let b = toBigInt(100000000)
6+let b = ""
77
8-let c = toBigInt(1000000000000000000)
8+let c = 1
99
10-let d = toBigInt(0)
10+let d = 3
1111
12-let e = toBigInt(1)
12+let e = 4
1313
14-let f = toBigInt((a - ((a * 1) / a)))
14+let f = 5
1515
16-let g = "100"
16+let g = 1
1717
18-let h = "1"
18+let h = "%s__delay"
1919
20-let i = "__"
21-
22-let j = ""
23-
24-let k = 1
25-
26-let l = 2
27-
28-let m = 3
29-
30-let n = 4
31-
32-let o = 1
33-
34-let p = 2
35-
36-let q = 3
37-
38-let r = 4
39-
40-let s = 5
41-
42-let t = 6
43-
44-let u = 7
45-
46-let v = 8
47-
48-let w = 9
49-
50-let x = 1
51-
52-let y = 7
53-
54-let z = 10
55-
56-let A = "%s__delay"
57-
58-func B (C,D) = fraction(toBigInt(C), c, toBigInt(D))
20+func i () = "%s__factoryContract"
5921
6022
61-func E (F,G) = toInt(fraction(F, toBigInt(G), c))
23+func j () = "%s__managerPublicKey"
6224
6325
64-func H (I,J,K) = fraction(I, J, K)
26+func k () = "%s__pendingManagerPublicKey"
6527
6628
67-func L (F) = if ((d > F))
68- then -(F)
69- else F
29+func l () = "%s__poolAddress"
7030
7131
72-func M () = "%s__factoryContract"
32+func m () = "%s__amountAsset"
7333
7434
75-func N () = "%s__managerPublicKey"
35+func n () = "%s__priceAsset"
7636
7737
78-func O () = "%s__pendingManagerPublicKey"
38+func o () = "%s__adminPubKeys"
7939
8040
81-func P () = "%s%s__price__last"
41+func p () = "%s__amp"
8242
8343
84-func Q (R,S) = makeString(["%s%s%d%d__price__history", toString(R), toString(S)], i)
44+func q (r) = ("%s%d__amp__" + toString(r))
8545
8646
87-func T (U,V) = ((("%s%s%s__P__" + U) + "__") + V)
47+func s (t) = makeString(["%s%s__lastGetOrPutOneTknCall", t], a)
8848
8949
90-func W (U,V) = ((("%s%s%s__G__" + U) + "__") + V)
50+func u () = "%s__factoryConfig"
9151
9252
93-func X () = "%s__amountAsset"
53+func v (w,x) = (((("%d%d%s__" + w) + "__") + x) + "__config")
9454
9555
96-func Y () = "%s__priceAsset"
56+func y (z) = ("%s%s%s__mappings__baseAsset2internalId__" + z)
9757
9858
99-func Z () = "%s__amp"
59+func A (B,C) = valueOrErrorMessage(getString(B, C), makeString(["mandatory ", toString(B), ".", C, " not defined"], ""))
10060
10161
102-func aa () = "%s__addonAddr"
62+func D (B,C) = valueOrErrorMessage(getInteger(B, C), makeString(["mandatory ", toString(B), ".", C, " not defined"], ""))
10363
10464
105-func ab (ac) = makeString(["%s%s__lastGetOrPutOneTknCall", ac], i)
65+let E = addressFromStringValue(A(this, l()))
10666
67+let F = addressFromStringValue(A(E, i()))
10768
108-func ad () = "%s__factoryConfig"
109-
110-
111-func ae () = "%s%s__matcher__publicKey"
112-
113-
114-func af (ag,ah) = (((("%d%d%s__" + ag) + "__") + ah) + "__config")
115-
116-
117-func ai (aj) = ("%s%s%s__mappings__baseAsset2internalId__" + aj)
118-
119-
120-func ak () = "%s__shutdown"
121-
122-
123-func al (am,an,ao) = throw(((((("Failed: ordValid=" + toString(am)) + " sndrValid=") + toString(an)) + " mtchrValid=") + toString(ao)))
124-
125-
126-func ap (F) = {
127- let aq = F
128- if ($isInstanceOf(aq, "String"))
129- then {
130- let ar = aq
131- ar
132- }
133- else throw("fail cast to String")
69+func G () = {
70+ let H = A(E, m())
71+ let I = A(E, n())
72+ let J = D(F, y(I))
73+ let w = D(F, y(H))
74+ split(A(F, v(toString(w), toString(J))), a)
13475 }
13576
13677
137-func as (at,au) = valueOrErrorMessage(getString(at, au), makeString(["mandatory ", toString(at), ".", au, " not defined"], ""))
78+func K () = split(A(F, u()), a)
13879
13980
140-func av (at,au) = valueOrErrorMessage(getInteger(at, au), makeString(["mandatory ", toString(at), ".", au, " not defined"], ""))
141-
142-
143-let aw = addressFromStringValue(as(this, M()))
144-
145-let ax = as(this, Z())
146-
147-func ay () = valueOrElse(getBoolean(aw, ak()), false)
148-
149-
150-func az () = fromBase58String(as(aw, ae()))
151-
152-
153-func aA () = {
154- let aB = as(this, X())
155- let aC = as(this, Y())
156- let aD = av(aw, ai(aC))
157- let ag = av(aw, ai(aB))
158- split(as(aw, af(toString(ag), toString(aD))), i)
159- }
160-
161-
162-func aE () = split(as(aw, ad()), i)
163-
164-
165-func aF (aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(aG), toString(aH), toString(aI), toString(aJ), toString(aK), toString(aL), toString(aM), toString(aN), toString(aO), toString(aP)], i)
166-
167-
168-func aQ (aR,aS,aT,aJ,aM,aN) = makeString(["%d%d%d%d%d%d", toString(aR), toString(aS), toString(aT), toString(aJ), toString(aM), toString(aN)], i)
169-
170-
171-func aU (aV) = if ((aV == "WAVES"))
172- then wavesBalance(this).available
173- else assetBalance(this, fromBase58String(aV))
174-
175-
176-func aW (aX,aY) = fraction(aX, c, aY)
177-
178-
179-func aZ (ba,bb,bc) = {
180- let bd = fraction((ba - bb), b, bb)
181- let be = ((bc - L(bd)) > d)
182- if (!(be))
183- then throw(("Big slpg: " + toString(bd)))
184- else $Tuple2(be, min([ba, bb]))
185- }
186-
187-
188-func bf (bg,bh,bi) = {
189- let bd = fraction(bh, b, bg)
190- let bj = (bi > bd)
191- if (if (bj)
192- then true
193- else (bh > bg))
194- then throw(((((((toString(bh) + " ") + toString(bg)) + " ") + toString(bd)) + " ") + toString(bi)))
195- else bj
196- }
197-
198-
199-func bk (bl,bm,bn,bo) = {
200- let bp = B(bn, bl)
201- let bq = B(bo, bm)
202- aW(bq, bp)
203- }
204-
205-
206-func br (bn,bo,bs) = {
207- let bt = aA()
208- let bu = parseIntValue(bt[t])
209- let bv = parseIntValue(bt[u])
210- let bw = bk(bu, bv, bn, bo)
211- let aY = B(bn, bu)
212- let aX = B(bo, bv)
213- let bx = B(bs, a)
214- let by = aW(aY, bx)
215- let bz = aW(aX, bx)
216-[bw, by, bz]
217- }
218-
219-
220-func bA (bn,bo,bs) = {
221- let bB = br(bn, bo, bs)
222-[E(bB[0], a), E(bB[1], a), E(bB[2], a)]
223- }
224-
225-
226-func bC (bD,bE,bF,bG) = {
227- let bt = aA()
228- let bH = bt[q]
229- let bI = bt[r]
230- let bJ = bt[s]
231- let bK = parseIntValue(bt[t])
232- let bL = parseIntValue(bt[u])
233- let bM = bt[p]
234- let bN = valueOrErrorMessage(assetInfo(fromBase58String(bH)), "Wrong LP id").quantity
235- if ((bH != bE))
236- then throw("Wrong pmt asset")
237- else {
238- let bO = aU(bI)
239- let bP = B(bO, bK)
240- let bQ = aU(bJ)
241- let bR = B(bQ, bL)
242- let bS = aW(bR, bP)
243- let bT = E(bS, a)
244- let bU = B(bF, a)
245- let bV = B(bN, a)
246- let bW = fraction(bP, bU, bV)
247- let bX = fraction(bR, bU, bV)
248- let bY = E(bW, bK)
249- let bZ = E(bX, bL)
250- let ca = if ((bD == ""))
251- then nil
252- else [ScriptTransfer(bG, bY, if ((bI == "WAVES"))
253- then unit
254- else fromBase58String(bI)), ScriptTransfer(bG, bZ, if ((bJ == "WAVES"))
255- then unit
256- else fromBase58String(bJ)), StringEntry(W(toString(bG), bD), aQ(bY, bZ, bF, bT, height, lastBlock.timestamp)), IntegerEntry(P(), bT), IntegerEntry(Q(height, lastBlock.timestamp), bT)]
257- $Tuple10(bY, bZ, bI, bJ, bO, bQ, bN, bS, bM, ca)
81+func L () = {
82+ let M = getString(j())
83+ if ($isInstanceOf(M, "String"))
84+ then {
85+ let N = M
86+ fromBase58String(N)
25887 }
259- }
260-
261-
262-func cb (bD,bc,cc,cd,ce,cf,bG,cg,ch,ci,cj,ck) = {
263- let bt = aA()
264- let bH = fromBase58String(bt[q])
265- let cl = bt[r]
266- let cm = bt[s]
267- let cn = bt[v]
268- let co = bt[w]
269- let cp = parseIntValue(bt[t])
270- let cq = parseIntValue(bt[u])
271- let bM = bt[p]
272- let cr = valueOrErrorMessage(assetInfo(bH), "Wr lp as").quantity
273- let bO = if (cg)
274- then aU(cl)
275- else if (if (ci)
276- then (ck == cl)
277- else false)
278- then (aU(cl) - cj)
279- else if (ci)
280- then aU(cl)
281- else (aU(cl) - cc)
282- let bQ = if (cg)
283- then aU(cm)
284- else if (if (ci)
285- then (ck == cm)
286- else false)
287- then (aU(cm) - cj)
288- else if (ci)
289- then aU(cm)
290- else (aU(cm) - ce)
291- let cs = B(cc, cp)
292- let ct = B(ce, cq)
293- let cu = aW(ct, cs)
294- let bP = B(bO, cp)
295- let bR = B(bQ, cq)
296- let cv = if ((cr == 0))
297- then {
298- let bS = d
299- let cw = d
300- let bx = pow((cs * ct), 0, toBigInt(5), 1, 0, DOWN)
301- $Tuple5(E(bx, a), E(cs, cp), E(ct, cq), aW((bR + ct), (bP + cs)), cw)
302- }
303- else {
304- let bS = aW(bR, bP)
305- let cx = fraction(L((bS - cu)), c, bS)
306- let cw = B(bc, a)
307- if (if ((bS != d))
308- then (cx > cw)
309- else false)
310- then throw(((("Price slippage " + toString(cx)) + " > ") + toString(cw)))
311- else {
312- let cy = B(cr, a)
313- let cz = fraction(cs, bS, c)
314- let cA = fraction(ct, c, bS)
315- let cB = if ((cz > ct))
316- then $Tuple2(cA, ct)
317- else $Tuple2(cs, cz)
318- let cC = cB._1
319- let cD = cB._2
320- let bx = fraction(cy, cD, bR)
321- $Tuple5(E(bx, a), E(cC, cp), E(cD, cq), bS, cw)
322- }
323- }
324- let cE = cv._1
325- let cF = cv._2
326- let cG = cv._3
327- let bT = E(cv._4, a)
328- let cH = E(cv._5, a)
329- if ((0 >= cE))
330- then throw("LP <= 0")
331- else {
332- let cI = if (!(ch))
333- then 0
334- else cE
335- let cJ = (cc - cF)
336- let cK = (ce - cG)
337- let cL = if (if (ci)
338- then (ck == cl)
339- else false)
340- then $Tuple2(cj, 0)
341- else if (if (ci)
342- then (ck == cm)
343- else false)
344- then $Tuple2(0, cj)
345- else $Tuple2(cF, cG)
346- let cM = cL._1
347- let cN = cL._2
348- let cO = [IntegerEntry(P(), bT), IntegerEntry(Q(height, lastBlock.timestamp), bT), StringEntry(T(bG, bD), aF(cM, cN, cI, bT, bc, cH, height, lastBlock.timestamp, cJ, cK))]
349- $Tuple13(cE, cI, bT, bO, bQ, cr, bH, bM, cO, cJ, cK, cd, cf)
350- }
351- }
352-
353-
354-func cP (cQ) = {
355- let bt = aA()
356- let cR = bt[r]
357- let cS = bt[s]
358- let bM = parseIntValue(bt[p])
359- let bu = parseIntValue(bt[t])
360- let bv = parseIntValue(bt[u])
361- let cT = aU(cR)
362- let cU = aU(cS)
363- let bS = if ((cQ.orderType == Buy))
364- then bk(bu, bv, (cT + cQ.amount), cU)
365- else bk(bu, bv, (cT - cQ.amount), cU)
366- let bT = E(bS, a)
367- if (if (if (ay())
368- then true
369- else (bM == m))
370- then true
371- else (bM == n))
372- then throw("Admin blocked")
373- else {
374- let cV = cQ.assetPair.amountAsset
375- let cW = if ((cV == unit))
376- then "WAVES"
377- else toBase58String(value(cV))
378- let cX = cQ.assetPair.priceAsset
379- let cY = if ((cX == unit))
380- then "WAVES"
381- else toBase58String(value(cX))
382- if (if ((cW != cR))
383- then true
384- else (cY != cS))
385- then throw("Wr assets")
386- else {
387- let cZ = cQ.price
388- let cq = fraction(a, bv, bu)
389- let da = H(cZ, a, cq)
390- let db = if ((cQ.orderType == Buy))
391- then (bT >= da)
392- else (da >= bT)
393- true
394- }
395- }
396- }
397-
398-
399-func dc (dd) = if ((size(dd.payments) != 1))
400- then throw("1 pmnt exp")
401- else {
402- let de = value(dd.payments[0])
403- let bE = value(de.assetId)
404- let cj = de.amount
405- let cv = bC(toBase58String(dd.transactionId), toBase58String(bE), cj, dd.caller)
406- let bY = cv._1
407- let bZ = cv._2
408- let bM = parseIntValue(cv._9)
409- let ca = cv._10
410- if (if (ay())
411- then true
412- else (bM == n))
413- then throw(("Admin blocked: " + toString(bM)))
414- else $Tuple5(bY, bZ, cj, bE, ca)
415- }
416-
417-
418-func df (ac,V,dg,dh,bc,ch,ci,cj,ck) = {
419- let cv = cb(V, bc, value(dg).amount, value(dg).assetId, value(dh).amount, value(dh).assetId, ac, false, ch, ci, cj, ck)
420- let bM = parseIntValue(cv._8)
421- if (if (if (ay())
422- then true
423- else (bM == l))
424- then true
425- else (bM == n))
426- then throw(("Blocked:" + toString(bM)))
427- else cv
428- }
429-
430-
431-func di () = {
432- let aq = getString(N())
433- if ($isInstanceOf(aq, "String"))
434- then {
435- let dj = aq
436- fromBase58String(dj)
437- }
438- else if ($isInstanceOf(aq, "Unit"))
88+ else if ($isInstanceOf(M, "Unit"))
43989 then unit
44090 else throw("Match error")
44191 }
44292
44393
444-func dk () = {
445- let aq = getString(O())
446- if ($isInstanceOf(aq, "String"))
94+func O () = {
95+ let M = getString(k())
96+ if ($isInstanceOf(M, "String"))
44797 then {
448- let dj = aq
449- fromBase58String(dj)
98+ let N = M
99+ fromBase58String(N)
450100 }
451- else if ($isInstanceOf(aq, "Unit"))
101+ else if ($isInstanceOf(M, "Unit"))
452102 then unit
453103 else throw("Match error")
454104 }
455105
456106
457-let dl = throw("Permission denied")
458-
459-func dm (dd) = {
460- let aq = di()
461- if ($isInstanceOf(aq, "ByteVector"))
107+func P (Q) = {
108+ let R = throw("Permission denied")
109+ let M = L()
110+ if ($isInstanceOf(M, "ByteVector"))
462111 then {
463- let dn = aq
464- if ((dd.callerPublicKey == dn))
112+ let S = M
113+ if ((Q.callerPublicKey == S))
465114 then true
466- else dl
115+ else R
467116 }
468- else if ($isInstanceOf(aq, "Unit"))
469- then if ((dd.caller == this))
117+ else if ($isInstanceOf(M, "Unit"))
118+ then if ((Q.caller == this))
470119 then true
471- else dl
120+ else R
472121 else throw("Match error")
473122 }
474123
475124
476-@Callable(dd)
477-func constructor (M,aa) = {
478- let do = dm(dd)
479- if ((do == do))
480- then [StringEntry(M(), M), StringEntry(aa(), aa)]
125+func T () = {
126+ let M = getString(o())
127+ if ($isInstanceOf(M, "String"))
128+ then {
129+ let N = M
130+ if ((size(N) == 0))
131+ then nil
132+ else split(N, a)
133+ }
134+ else nil
135+ }
136+
137+
138+func U (Q) = if (containsElement(T(), toBase58String(Q.callerPublicKey)))
139+ then true
140+ else P(Q)
141+
142+
143+func V (Q) = if ((Q.caller == E))
144+ then true
145+ else throw("caller must be the pool")
146+
147+
148+@Callable(Q)
149+func constructor (W) = {
150+ let X = P(Q)
151+ if ((X == X))
152+ then [StringEntry(l(), W)]
481153 else throw("Strict value is not equal to itself.")
482154 }
483155
484156
485157
486-@Callable(dd)
487-func setManager (dp) = {
488- let do = dm(dd)
489- if ((do == do))
158+@Callable(Q)
159+func setManager (Y) = {
160+ let X = P(Q)
161+ if ((X == X))
490162 then {
491- let dq = fromBase58String(dp)
492- if ((dq == dq))
493- then [StringEntry(O(), dp)]
163+ let Z = fromBase58String(Y)
164+ if ((Z == Z))
165+ then [StringEntry(k(), Y)]
494166 else throw("Strict value is not equal to itself.")
495167 }
496168 else throw("Strict value is not equal to itself.")
497169 }
498170
499171
500172
501-@Callable(dd)
173+@Callable(Q)
502174 func confirmManager () = {
503- let bB = dk()
504- let dr = if (isDefined(bB))
175+ let aa = O()
176+ let ab = if (isDefined(aa))
505177 then true
506178 else throw("No pending manager")
507- if ((dr == dr))
179+ if ((ab == ab))
508180 then {
509- let ds = if ((dd.callerPublicKey == value(bB)))
181+ let ac = if ((Q.callerPublicKey == value(aa)))
510182 then true
511183 else throw("You are not pending manager")
512- if ((ds == ds))
513- then [StringEntry(N(), toBase58String(value(bB))), DeleteEntry(O())]
184+ if ((ac == ac))
185+ then [StringEntry(j(), toBase58String(value(aa))), DeleteEntry(k())]
514186 else throw("Strict value is not equal to itself.")
515187 }
516188 else throw("Strict value is not equal to itself.")
517189 }
518190
519191
520192
521-@Callable(dd)
522-func put (dt,du) = {
523- let dv = aE()
524- let dw = valueOrErrorMessage(addressFromString(dv[x]), "Wr st addr")
525- let dx = valueOrErrorMessage(addressFromString(dv[y]), "Wr sl addr")
526- if ((0 > dt))
527- then throw("Wrong slippage")
528- else if ((size(dd.payments) != 2))
529- then throw("2 pmnts expd")
530- else {
531- let dy = df(toString(dd.caller), toBase58String(dd.transactionId), AttachedPayment(value(dd.payments[0]).assetId, value(dd.payments[0]).amount), dd.payments[1], dt, true, false, 0, "")
532- let cI = dy._2
533- let dz = dy._7
534- let ca = dy._9
535- let cJ = dy._10
536- let cK = dy._11
537- let bI = dy._12
538- let bJ = dy._13
539- let cv = invoke(aw, "emit", [cI], nil)
540- if ((cv == cv))
541- then {
542- let dA = {
543- let aq = cv
544- if ($isInstanceOf(aq, "Address"))
545- then {
546- let dB = aq
547- invoke(dB, "emit", [cI], nil)
548- }
549- else unit
550- }
551- if ((dA == dA))
552- then {
553- let dC = if ((cJ > 0))
554- then invoke(dx, "put", nil, [AttachedPayment(bI, cJ)])
555- else nil
556- if ((dC == dC))
557- then {
558- let dD = if ((cK > 0))
559- then invoke(dx, "put", nil, [AttachedPayment(bJ, cK)])
560- else nil
561- if ((dD == dD))
562- then {
563- let dE = if (du)
564- then {
565- let dF = invoke(dw, "stake", nil, [AttachedPayment(dz, cI)])
566- if ((dF == dF))
567- then nil
568- else throw("Strict value is not equal to itself.")
569- }
570- else [ScriptTransfer(dd.caller, cI, dz)]
571- (ca ++ dE)
572- }
573- else throw("Strict value is not equal to itself.")
574- }
575- else throw("Strict value is not equal to itself.")
576- }
577- else throw("Strict value is not equal to itself.")
578- }
579- else throw("Strict value is not equal to itself.")
580- }
581- }
582-
583-
584-
585-@Callable(dd)
586-func putOneTkn (dG,dH,dI,bc,du) = {
587- let bt = aE()
588- let dw = valueOrErrorMessage(addressFromString(bt[x]), "Wr st addr")
589- let dx = valueOrErrorMessage(addressFromString(bt[y]), "Wr sl addr")
590- let dJ = valueOrErrorMessage(addressFromString(bt[z]), "Wr gwx addr")
591- let dK = aA()
592- let bI = dK[r]
593- let bJ = dK[s]
594- let bK = parseIntValue(dK[t])
595- let bL = parseIntValue(dK[u])
596- let dL = valueOrElse(getString(this, aa()), "")
597- let bG = if ((dL == toString(dd.caller)))
598- then dd.originCaller
599- else dd.caller
600- let dM = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid")
601- let dN = reentrantInvoke(dM, "ensureCanGetOrPutOneTkn", [toString(bG)], nil)
602- if ((dN == dN))
603- then if (if (if (if ((0 >= bc))
604- then true
605- else (0 >= dG))
606- then true
607- else (0 >= dH))
608- then true
609- else (0 >= dI))
610- then throw("Wrong params")
611- else if ((size(dd.payments) != 1))
612- then throw("1 pmnt expd")
613- else {
614- let de = value(dd.payments[0])
615- let bE = toBase58String(value(de.assetId))
616- let cj = de.amount
617- if (if (if ((dG > cj))
618- then true
619- else (dH > cj))
620- then true
621- else (10000000 > cj))
622- then throw("Wrong pmt amt")
623- else {
624- let bO = aU(bI)
625- let bQ = aU(bJ)
626- let dO = if ((bE == bI))
627- then $Tuple6((bO - cj), bQ, (cj - dG), dH, 0, 0)
628- else if ((bE == bJ))
629- then $Tuple6(bO, (bQ - cj), 0, 0, (cj - dH), dG)
630- else throw("wrong pmtAssetId")
631- let dP = dO._1
632- let dQ = dO._2
633- let dR = dO._3
634- let dS = dO._4
635- let dT = dO._5
636- let dU = dO._6
637- let bh = invoke(dJ, "calcD", [toString(dP), toString(dQ), ax, g, h], nil)
638- let bg = invoke(dJ, "calcD", [toString(toBigInt(((dP + dR) - dU))), toString(toBigInt(((dQ + dT) - dS))), ax, g, h], nil)
639- let dV = bf(parseBigIntValue(ap(bg)), parseBigIntValue(ap(bh)), f)
640- if ((dV == dV))
641- then {
642- let dW = df(toString(dd.caller), toBase58String(dd.transactionId), AttachedPayment(fromBase58String(bI), dG), AttachedPayment(fromBase58String(bJ), dH), bc, true, true, cj, bE)
643- let dX = dW._2
644- let dz = dW._7
645- let ca = dW._9
646- let cJ = dW._10
647- let cK = dW._11
648- let dY = aZ(toBigInt(dX), toBigInt(dI), toBigInt(bc))
649- let cI = toInt(dY._2)
650- let dy = invoke(aw, "emit", [cI], nil)
651- if ((dy == dy))
652- then {
653- let dA = {
654- let aq = dy
655- if ($isInstanceOf(aq, "Address"))
656- then {
657- let dB = aq
658- invoke(dB, "emit", [cI], nil)
659- }
660- else unit
661- }
662- if ((dA == dA))
663- then {
664- let dC = if ((cJ > 0))
665- then invoke(dx, "put", nil, [AttachedPayment(fromBase58String(bI), cJ)])
666- else nil
667- if ((dC == dC))
668- then {
669- let dD = if ((cK > 0))
670- then invoke(dx, "put", nil, [AttachedPayment(fromBase58String(bJ), cK)])
671- else nil
672- if ((dD == dD))
673- then {
674- let dE = if (du)
675- then {
676- let dF = invoke(dw, "stake", nil, [AttachedPayment(dz, cI)])
677- if ((dF == dF))
678- then nil
679- else throw("Strict value is not equal to itself.")
680- }
681- else [ScriptTransfer(dd.caller, cI, dz)]
682- (ca ++ dE)
683- }
684- else throw("Strict value is not equal to itself.")
685- }
686- else throw("Strict value is not equal to itself.")
687- }
688- else throw("Strict value is not equal to itself.")
689- }
690- else throw("Strict value is not equal to itself.")
691- }
692- else throw("Strict value is not equal to itself.")
693- }
694- }
193+@Callable(Q)
194+func setAdmins (ad) = {
195+ let X = P(Q)
196+ if ((X == X))
197+ then [StringEntry(o(), makeString(ad, a))]
695198 else throw("Strict value is not equal to itself.")
696199 }
697200
698201
699202
700-@Callable(dd)
701-func putForFree (dZ) = if ((0 > dZ))
702- then throw("Wrong slpg")
703- else if ((size(dd.payments) != 2))
704- then throw("2 pmnts expd")
705- else {
706- let dW = df(toString(dd.caller), toBase58String(dd.transactionId), AttachedPayment(value(dd.payments[0]).assetId, value(dd.payments[0]).amount), dd.payments[1], dZ, false, false, 0, "")
707- dW._9
708- }
709-
710-
711-
712-@Callable(dd)
713-func get () = {
714- let cv = dc(dd)
715- let ea = cv._1
716- let bZ = cv._2
717- let cj = cv._3
718- let bE = cv._4
719- let ca = cv._5
720- let eb = invoke(aw, "burn", [cj], [AttachedPayment(bE, cj)])
721- if ((eb == eb))
722- then ca
723- else throw("Strict value is not equal to itself.")
724- }
725-
726-
727-
728-@Callable(dd)
729-func getOneTkn (ec,ed,ee,ef,bc) = if ((size(dd.payments) != 1))
730- then throw("1 pmnt expd")
731- else {
732- let bt = aA()
733- let bH = bt[q]
734- let bI = bt[r]
735- let bJ = bt[s]
736- let bK = parseIntValue(bt[t])
737- let bL = parseIntValue(bt[u])
738- let bM = bt[p]
739- let dv = aE()
740- let dJ = valueOrErrorMessage(addressFromString(dv[z]), "Wr sl addr")
741- let de = value(dd.payments[0])
742- let dL = valueOrElse(getString(this, aa()), "")
743- let bG = if ((dL == toString(dd.caller)))
744- then dd.originCaller
745- else dd.caller
746- let bD = toBase58String(dd.transactionId)
747- let bE = value(de.assetId)
748- let cj = de.amount
749- let dM = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid")
750- let dN = reentrantInvoke(dM, "ensureCanGetOrPutOneTkn", [toString(bG)], nil)
751- if ((dN == dN))
752- then if ((1000000000 > cj))
753- then throw("Min pmt 10 LP")
754- else if (if (if ((0 > bc))
755- then true
756- else (0 > ec))
757- then true
758- else (0 > ee))
759- then throw("Wrong params")
760- else if ((bH != toBase58String(bE)))
761- then throw("Wrong LP")
762- else {
763- let cv = bC(toBase58String(dd.transactionId), toBase58String(bE), cj, dd.caller)
764- let eg = cv._1
765- let eh = cv._2
766- let bO = aU(bI)
767- let bQ = aU(bJ)
768- let ei = if ((ef == bI))
769- then $Tuple7((bO - eg), (bQ - eh), ec, eh, 0, 0, (eg + ec))
770- else if ((ef == bJ))
771- then $Tuple7((bO - eg), (bQ - eh), 0, 0, ec, eg, (eh + ec))
772- else throw("wrong outAssetId")
773- let dP = ei._1
774- let dQ = ei._2
775- let dR = ei._3
776- let dS = ei._4
777- let dT = ei._5
778- let dU = ei._6
779- let ej = ei._7
780- if (if ((0 > dR))
781- then true
782- else (0 > dT))
783- then throw("Wrong calc")
784- else {
785- let bh = invoke(dJ, "calcD", [toString(dP), toString(dQ), ax, g, h], nil)
786- let bg = invoke(dJ, "calcD", [toString(((dP - dR) + dU)), toString(((dQ + dS) - dT)), ax, g, h], nil)
787- let dV = bf(parseBigIntValue(ap(bg)), parseBigIntValue(ap(bh)), f)
788- if ((dV == dV))
789- then {
790- let ek = aZ(toBigInt(ej), toBigInt(ee), toBigInt(bc))
791- if ((ek == ek))
792- then {
793- let el = if ((ef == bI))
794- then $Tuple2(toInt(ek._2), 0)
795- else $Tuple2(0, toInt(ek._2))
796- let em = el._1
797- let en = el._2
798- let eo = aW(B(bQ, bL), B(bO, bK))
799- let ep = E(eo, a)
800- let ca = [ScriptTransfer(bG, (em + en), if ((ef == "WAVES"))
801- then unit
802- else fromBase58String(ef)), StringEntry(W(toString(bG), bD), aQ(em, en, cj, ep, height, lastBlock.timestamp)), IntegerEntry(P(), ep), IntegerEntry(Q(height, lastBlock.timestamp), ep)]
803- if ((ca == ca))
804- then {
805- let eq = invoke(aw, "burn", [cj], [AttachedPayment(bE, cj)])
806- if ((eq == eq))
807- then ca
808- else throw("Strict value is not equal to itself.")
809- }
810- else throw("Strict value is not equal to itself.")
811- }
812- else throw("Strict value is not equal to itself.")
813- }
814- else throw("Strict value is not equal to itself.")
815- }
816- }
817- else throw("Strict value is not equal to itself.")
818- }
819-
820-
821-
822-@Callable(dd)
823-func getNoLess (er,es) = {
824- let cv = dc(dd)
825- let bY = cv._1
826- let bZ = cv._2
827- let cj = cv._3
828- let bE = cv._4
829- let ca = cv._5
830- if ((er > bY))
831- then throw(((("Failed: " + toString(bY)) + " < ") + toString(er)))
832- else if ((es > bZ))
833- then throw(((("Failed: " + toString(bZ)) + " < ") + toString(es)))
834- else {
835- let et = invoke(aw, "burn", [cj], [AttachedPayment(bE, cj)])
836- if ((et == et))
837- then ca
838- else throw("Strict value is not equal to itself.")
839- }
840- }
841-
842-
843-
844-@Callable(dd)
845-func unstakeAndGet (eu) = {
846- let ev = if ((size(dd.payments) != 0))
203+@Callable(Q)
204+func unstakeAndGetOneTkn (ae,af,ag,ah,ai,aj) = {
205+ let ak = if ((size(Q.payments) != 0))
847206 then throw("No pmnts expd")
848207 else true
849- if ((ev == ev))
208+ if ((ak == ak))
850209 then {
851- let bt = aA()
852- let ew = aE()
853- let dz = fromBase58String(bt[q])
854- let ex = valueOrErrorMessage(addressFromString(ew[x]), "Wr st addr")
855- let ey = invoke(ex, "unstake", [toBase58String(dz), eu], nil)
856- if ((ey == ey))
210+ let al = G()
211+ let am = K()
212+ let an = fromBase58String(al[d])
213+ let ao = valueOrErrorMessage(addressFromString(am[g]), "Wr st addr")
214+ let ap = invoke(ao, "unstake", [toBase58String(an), ae], nil)
215+ if ((ap == ap))
857216 then {
858- let cv = bC(toBase58String(dd.transactionId), toBase58String(dz), eu, dd.caller)
859- let bM = parseIntValue(cv._9)
860- let ca = cv._10
861- let ez = if (if (ay())
862- then true
863- else (bM == n))
864- then throw(("Blocked: " + toString(bM)))
865- else true
866- if ((ez == ez))
867- then {
868- let eA = invoke(aw, "burn", [eu], [AttachedPayment(dz, eu)])
869- if ((eA == eA))
870- then ca
871- else throw("Strict value is not equal to itself.")
872- }
217+ let aq = reentrantInvoke(E, "getOneTkn", [af, ag, ah, ai, aj], [AttachedPayment(an, ae)])
218+ if ((aq == aq))
219+ then nil
873220 else throw("Strict value is not equal to itself.")
874221 }
875222 else throw("Strict value is not equal to itself.")
876223 }
877224 else throw("Strict value is not equal to itself.")
878225 }
879226
880227
881228
882-@Callable(dd)
883-func activate (eB,eC) = if ((toString(dd.caller) != toString(aw)))
884- then throw("denied")
885- else $Tuple2([StringEntry(X(), eB), StringEntry(Y(), eC)], "success")
886-
887-
888-
889-@Callable(dd)
890-func setS (eD,ez) = if ((toString(dd.caller) != as(this, aa())))
891- then dl
892- else [StringEntry(eD, ez)]
893-
894-
895-
896-@Callable(dd)
897-func setI (eD,ez) = if ((toString(dd.caller) != as(this, aa())))
898- then dl
899- else [IntegerEntry(eD, ez)]
900-
901-
902-
903-@Callable(dd)
904-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aA())
905-
906-
907-
908-@Callable(dd)
909-func getAccBalanceWrapperREADONLY (aV) = $Tuple2(nil, aU(aV))
910-
911-
912-
913-@Callable(dd)
914-func calcPricesWrapperREADONLY (bn,bo,bs) = {
915- let eE = br(bn, bo, bs)
916- $Tuple2(nil, [toString(eE[0]), toString(eE[1]), toString(eE[2])])
229+@Callable(Q)
230+func setAmp (ar) = {
231+ let X = U(Q)
232+ if ((X == X))
233+ then {
234+ let as = invoke(E, "setS", [p(), ar], nil)
235+ let at = invoke(E, "setS", [q(height), ar], nil)
236+ $Tuple2(nil, $Tuple2(as, at))
237+ }
238+ else throw("Strict value is not equal to itself.")
917239 }
918240
919241
920242
921-@Callable(dd)
922-func fromX18WrapperREADONLY (F,eF) = $Tuple2(nil, E(parseBigIntValue(F), eF))
923-
924-
925-
926-@Callable(dd)
927-func toX18WrapperREADONLY (C,D) = $Tuple2(nil, toString(B(C, D)))
928-
929-
930-
931-@Callable(dd)
932-func calcPriceBigIntWrapperREADONLY (aX,aY) = $Tuple2(nil, toString(aW(parseBigIntValue(aX), parseBigIntValue(aY))))
933-
934-
935-
936-@Callable(dd)
937-func estimatePutOperationWrapperREADONLY (bD,bc,cc,cd,ce,cf,eG,cg,ch) = $Tuple2(nil, cb(bD, bc, cc, cd, ce, cf, eG, cg, ch, false, 0, ""))
938-
939-
940-
941-@Callable(dd)
942-func estimateGetOperationWrapperREADONLY (bD,eH,bF,eG) = {
943- let cv = bC(bD, eH, bF, addressFromStringValue(eG))
944- $Tuple2(nil, $Tuple10(cv._1, cv._2, cv._3, cv._4, cv._5, cv._6, cv._7, toString(cv._8), cv._9, cv._10))
243+@Callable(Q)
244+func ensureCanGetOrPutOneTkn (t) = {
245+ let X = V(Q)
246+ if ((X == X))
247+ then {
248+ let au = {
249+ let M = getInteger(E, s(t))
250+ if ($isInstanceOf(M, "Int"))
251+ then {
252+ let av = M
253+ let aw = (av + value(getInteger(E, h)))
254+ let ax = (height >= aw)
255+ let ay = (aw - height)
256+ if (ax)
257+ then true
258+ else throw(makeString(["you should wait", toString(ay), "blocks more to perform the action"], " "))
259+ }
260+ else true
261+ }
262+ if ((au == au))
263+ then {
264+ let az = invoke(E, "setI", [s(t), height], nil)
265+ if ((az == az))
266+ then nil
267+ else throw("Strict value is not equal to itself.")
268+ }
269+ else throw("Strict value is not equal to itself.")
270+ }
271+ else throw("Strict value is not equal to itself.")
945272 }
946273
947274
948-@Verifier(eI)
949-func eJ () = {
950- let aq = eI
951- if ($isInstanceOf(aq, "Order"))
952- then {
953- let cQ = aq
954- let eK = az()
955- let am = cP(cQ)
956- let eL = sigVerify(cQ.bodyBytes, cQ.proofs[0], cQ.senderPublicKey)
957- let eM = sigVerify(cQ.bodyBytes, cQ.proofs[1], eK)
958- if (if (if (am)
959- then eL
960- else false)
961- then eM
962- else false)
963- then true
964- else al(am, eL, eM)
965- }
966- else {
967- let eN = {
968- let eO = di()
969- if ($isInstanceOf(eO, "ByteVector"))
970- then {
971- let dn = eO
972- dn
973- }
974- else if ($isInstanceOf(eO, "Unit"))
975- then eI.senderPublicKey
976- else throw("Match error")
275+@Verifier(aA)
276+func aB () = {
277+ let aC = {
278+ let M = L()
279+ if ($isInstanceOf(M, "ByteVector"))
280+ then {
281+ let S = M
282+ S
977283 }
978- sigVerify(eI.bodyBytes, eI.proofs[0], eN)
979- }
284+ else if ($isInstanceOf(M, "Unit"))
285+ then aA.senderPublicKey
286+ else throw("Match error")
287+ }
288+ sigVerify(aA.bodyBytes, aA.proofs[0], aC)
980289 }
981290

github/deemru/w8io/026f985 
102.22 ms