tx · 7TWuUDmGmaHU9G5CzN24GHdhCC47BJSULNmFnTyEkjjf

3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA:  -0.02600000 Waves

2022.08.15 17:50 [2185721] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves

{ "type": 13, "id": "7TWuUDmGmaHU9G5CzN24GHdhCC47BJSULNmFnTyEkjjf", "fee": 2600000, "feeAssetId": null, "timestamp": 1660575010319, "version": 1, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "4eFYMrEWe4Equ6vU71eipVXHFuS3JpwAauwzTmEPvZajaaG8nx1r4c41oXni7YEdzqhM7Trrhdj2VLXyDHjdmpzV" ], "script": "base64:BgL+HwgCEgMKAQgSAwoBCBIAEgQKAgEEEgcKBQEBAQEEEgMKAQESABIHCgUBAQEIARIECgIBARIDCgEBEgQKAggIEgQKAggIEgQKAggBEgASAwoBCBIFCgMBAQESBAoCCAESBAoCAQESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igh0aG91c2FuZCIKemVyb0JpZ0ludCIJb25lQmlnSW50IgpzbGlwcGFnZTREIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCINaWR4SVByaWNlQXNJZCIPaWR4RmFjdFN0YWtDbnRyIhBpZHhGYWN0U2xpcHBDbnRyIhFpZHhGYWN0R3d4UmV3Q250ciISZm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1hdGVQdXRPcGVyYXRpb25XcmFwcGVyUkVBRE9OTFkJAmJHAmJnAmNpAmVWAmNrAmVXAmVYAmNtAmNuCQCUCgIFA25pbAkBAmNnDAUCYkcFAmJnBQJjaQUCZVYFAmNrBQJlVwUCZVgFAmNtBQJjbgcAAAIAAmRpASNlc3RpbWF0ZUdldE9wZXJhdGlvbldyYXBwZXJSRUFET05MWQQCYkcCZVkCYkkCZVgEAmN5CQECYkYEBQJiRwUCZVkFAmJJCQERQGV4dHJOYXRpdmUoMTA2MikBBQJlWAkAlAoCBQNuaWwJAJwKCggFAmN5Al8xCAUCY3kCXzIIBQJjeQJfMwgFAmN5Al80CAUCY3kCXzUIBQJjeQJfNggFAmN5Al83CQCmAwEIBQJjeQJfOAgFAmN5Al85CAUCY3kDXzEwAQJlWgECZmEABAJhdAUCZVoDCQABAgUCYXQCBU9yZGVyBAJjVgUCYXQEAmZiCQECYUMABAJhcAkBAmNVAQUCY1YEAmZjCQD0AwMIBQJjVglib2R5Qnl0ZXMJAJEDAggFAmNWBnByb29mcwAACAUCY1YPc2VuZGVyUHVibGljS2V5BAJmZAkA9AMDCAUCY1YJYm9keUJ5dGVzCQCRAwIIBQJjVgZwcm9vZnMAAQUCZmIDAwMFAmFwBQJmYwcFAmZkBwYJAQJhbwMFAmFwBQJmYwUCZmQEAmZlBAJmZgkBAmRzAAMJAAECBQJmZgIKQnl0ZVZlY3RvcgQCZHgFAmZmBQJkeAMJAAECBQJmZgIEVW5pdAgFAmVaD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJlWglib2R5Qnl0ZXMJAJEDAggFAmVaBnByb29mcwAABQJmZd18zmc=", "chainId": 84, "height": 2185721, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 57oomHZowvc4bbyAq6vCSay5jsR46pp9aAPxKRFFQKy4 Next: FHFuEo3f5gS9dkWkpYJUAm5ft2KwiFXorwrhz6WGbojB Diff:
OldNewDifferences
77
88 let c = toBigInt(1000000000000000000)
99
10-let d = toBigInt(0)
10+let d = 1000
1111
12-let e = toBigInt(1)
12+let e = toBigInt(0)
1313
14-let f = toBigInt((a - ((a * 1) / a)))
14+let f = toBigInt(1)
1515
16-let g = "100"
16+let g = toBigInt((a - ((a * 1) / a)))
1717
18-let h = "1"
18+let h = "100"
1919
20-let i = "__"
20+let i = "1"
2121
22-let j = ""
22+let j = "__"
2323
24-let k = 1
24+let k = ""
2525
26-let l = 2
26+let l = 1
2727
28-let m = 3
28+let m = 2
2929
30-let n = 4
30+let n = 3
3131
32-let o = 1
32+let o = 4
3333
34-let p = 2
34+let p = 1
3535
36-let q = 3
36+let q = 2
3737
38-let r = 4
38+let r = 3
3939
40-let s = 5
40+let s = 4
4141
42-let t = 6
42+let t = 5
4343
44-let u = 7
44+let u = 6
4545
46-let v = 8
46+let v = 7
4747
48-let w = 9
48+let w = 8
4949
50-let x = 1
50+let x = 9
5151
52-let y = 7
52+let y = 1
5353
54-let z = 10
54+let z = 7
5555
56-let A = "%s__delay"
56+let A = 10
5757
58-func B (C,D) = fraction(toBigInt(C), c, toBigInt(D))
58+let B = 0
59+
60+func C (D,E) = fraction(toBigInt(D), c, toBigInt(E))
5961
6062
61-func E (F,G) = toInt(fraction(F, toBigInt(G), c))
63+func F (G,H) = toInt(fraction(G, toBigInt(H), c))
6264
6365
64-func H (I,J,K) = fraction(I, J, K)
66+func I (J,K,L) = fraction(J, K, L)
6567
6668
67-func L (F) = if ((d > F))
68- then -(F)
69- else F
69+func M (G) = if ((e > G))
70+ then -(G)
71+ else G
7072
7173
72-func M () = "%s__factoryContract"
74+func N () = "%s__factoryContract"
7375
7476
75-func N () = "%s__managerPublicKey"
77+func O () = "%s__managerPublicKey"
7678
7779
78-func O () = "%s__pendingManagerPublicKey"
80+func P () = "%s__pendingManagerPublicKey"
7981
8082
81-func P () = "%s%s__price__last"
83+func Q () = "%s%s__price__last"
8284
8385
84-func Q (R,S) = makeString(["%s%s%d%d__price__history", toString(R), toString(S)], i)
86+func R (S,T) = makeString(["%s%s%d%d__price__history", toString(S), toString(T)], j)
8587
8688
87-func T (U,V) = ((("%s%s%s__P__" + U) + "__") + V)
89+func U (V,W) = ((("%s%s%s__P__" + V) + "__") + W)
8890
8991
90-func W (U,V) = ((("%s%s%s__G__" + U) + "__") + V)
92+func X (V,W) = ((("%s%s%s__G__" + V) + "__") + W)
9193
9294
93-func X () = "%s__amountAsset"
95+func Y () = "%s__amountAsset"
9496
9597
96-func Y () = "%s__priceAsset"
98+func Z () = "%s__priceAsset"
9799
98100
99-func Z () = "%s__amp"
101+func aa () = "%s__amp"
100102
101103
102-func aa () = "%s__addonAddr"
104+func ab () = "%s__addonAddr"
103105
104106
105-func ab (ac) = makeString(["%s%s__lastGetOneTknCall", ac], i)
107+let ac = "%s__feePermille"
106108
107-
108-func ad (ac) = makeString(["%s%s__lastPutOneTknCall", ac], i)
109-
109+let ad = valueOrElse(getInteger(this, ac), B)
110110
111111 func ae () = "%s__factoryConfig"
112112
129129 func ao (ap,aq,ar) = am(((((("Failed: ordValid=" + toString(ap)) + " sndrValid=") + toString(aq)) + " mtchrValid=") + toString(ar)))
130130
131131
132-func as (F) = {
133- let at = F
132+func as (G) = {
133+ let at = G
134134 if ($isInstanceOf(at, "String"))
135135 then {
136136 let au = at
146146 func ay (aw,ax) = valueOrErrorMessage(getInteger(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " not defined"], ""))
147147
148148
149-let az = addressFromStringValue(av(this, M()))
149+let az = addressFromStringValue(av(this, N()))
150150
151-let aA = av(this, Z())
151+let aA = av(this, aa())
152152
153153 func aB () = valueOrElse(getBoolean(az, al()), false)
154154
156156 func aC () = fromBase58String(av(az, af()))
157157
158158
159-func aD () = {
160- let aE = av(this, X())
159+let aD = addressFromPublicKey(aC())
160+
161+func aE () = {
161162 let aF = av(this, Y())
162- let aG = ay(az, aj(aF))
163- let ah = ay(az, aj(aE))
164- split(av(az, ag(toString(ah), toString(aG))), i)
163+ let aG = av(this, Z())
164+ let aH = ay(az, aj(aG))
165+ let ah = ay(az, aj(aF))
166+ split(av(az, ag(toString(ah), toString(aH))), j)
165167 }
166168
167169
168-func aH () = split(av(az, ae()), i)
170+func aI () = split(av(az, ae()), j)
169171
170172
171-func aI (aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(aJ), toString(aK), toString(aL), toString(aM), toString(aN), toString(aO), toString(aP), toString(aQ), toString(aR), toString(aS)], i)
173+func aJ (aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(aK), toString(aL), toString(aM), toString(aN), toString(aO), toString(aP), toString(aQ), toString(aR), toString(aS), toString(aT)], j)
172174
173175
174-func aT (aU,aV,aW,aM,aP,aQ) = makeString(["%d%d%d%d%d%d", toString(aU), toString(aV), toString(aW), toString(aM), toString(aP), toString(aQ)], i)
176+func aU (aV,aW,aX,aN,aQ,aR) = makeString(["%d%d%d%d%d%d", toString(aV), toString(aW), toString(aX), toString(aN), toString(aQ), toString(aR)], j)
175177
176178
177-func aX (aY) = if ((aY == "WAVES"))
179+func aY (aZ) = if ((aZ == "WAVES"))
178180 then wavesBalance(this).available
179- else assetBalance(this, fromBase58String(aY))
181+ else assetBalance(this, fromBase58String(aZ))
180182
181183
182-func aZ (ba,bb) = fraction(ba, c, bb)
184+func ba (bb,bc) = fraction(bb, c, bc)
183185
184186
185-func bc (bd,be,bf) = {
186- let bg = fraction((bd - be), b, be)
187- let bh = ((bf - L(bg)) > d)
188- if (!(bh))
189- then am(("Big slippage: " + toString(bg)))
190- else $Tuple2(bh, min([bd, be]))
187+func bd (be,bf,bg) = {
188+ let bh = fraction((be - bf), b, bf)
189+ let bi = ((bg - M(bh)) > e)
190+ if (!(bi))
191+ then am(("Big slippage: " + toString(bh)))
192+ else $Tuple2(bi, min([be, bf]))
191193 }
192194
193195
194-func bi (bj,bk,bf) = {
195- let bg = fraction(bk, b, bj)
196- let bl = (bf > bg)
197- if (if (bl)
196+func bj (bk,bl,bg) = {
197+ let bh = fraction(bl, b, bk)
198+ let bm = (bg > bh)
199+ if (if (bm)
198200 then true
199- else (bk > bj))
200- then am(((((((toString(bk) + " ") + toString(bj)) + " ") + toString(bg)) + " ") + toString(bf)))
201- else bl
201+ else (bl > bk))
202+ then am(((((((toString(bl) + " ") + toString(bk)) + " ") + toString(bh)) + " ") + toString(bg)))
203+ else bm
202204 }
203205
204206
205-func bm (bn,bo,bp,bq) = {
206- let br = B(bp, bn)
207- let bs = B(bq, bo)
208- aZ(bs, br)
207+func bn (bo,bp,bq,br) = {
208+ let bs = C(bq, bo)
209+ let bt = C(br, bp)
210+ ba(bt, bs)
209211 }
210212
211213
212-func bt (bp,bq,bu) = {
213- let bv = aD()
214- let bw = parseIntValue(bv[t])
215- let bx = parseIntValue(bv[u])
216- let by = bm(bw, bx, bp, bq)
217- let bb = B(bp, bw)
218- let ba = B(bq, bx)
219- let bz = B(bu, a)
220- let bA = aZ(bb, bz)
221- let bB = aZ(ba, bz)
222-[by, bA, bB]
214+func bu (bq,br,bv) = {
215+ let bw = aE()
216+ let bx = parseIntValue(bw[u])
217+ let by = parseIntValue(bw[v])
218+ let bz = bn(bx, by, bq, br)
219+ let bc = C(bq, bx)
220+ let bb = C(br, by)
221+ let bA = C(bv, a)
222+ let bB = ba(bc, bA)
223+ let bC = ba(bb, bA)
224+[bz, bB, bC]
223225 }
224226
225227
226-func bC (bp,bq,bu) = {
227- let bD = bt(bp, bq, bu)
228-[E(bD[0], a), E(bD[1], a), E(bD[2], a)]
228+func bD (bq,br,bv) = {
229+ let bE = bu(bq, br, bv)
230+[F(bE[0], a), F(bE[1], a), F(bE[2], a)]
229231 }
230232
231233
232-func bE (bF,bG,bH,bI) = {
233- let bv = aD()
234- let bJ = bv[q]
235- let bK = bv[r]
236- let bL = bv[s]
237- let bM = parseIntValue(bv[t])
238- let bN = parseIntValue(bv[u])
239- let bO = bv[p]
240- let bP = valueOrErrorMessage(assetInfo(fromBase58String(bJ)), "Wrong LP id").quantity
241- let bQ = if ((bJ == bG))
234+func bF (bG,bH,bI,bJ) = {
235+ let bw = aE()
236+ let bK = bw[r]
237+ let bL = bw[s]
238+ let bM = bw[t]
239+ let bN = parseIntValue(bw[u])
240+ let bO = parseIntValue(bw[v])
241+ let bP = bw[q]
242+ let bQ = valueOrErrorMessage(assetInfo(fromBase58String(bK)), "Wrong LP id").quantity
243+ let bR = if ((bK == bH))
242244 then true
243245 else am("Wrong payment asset")
244- if ((bQ == bQ))
246+ if ((bR == bR))
245247 then {
246- let bR = if ((bM >= bN))
247- then bM
248- else bN
249- if ((bR == bR))
248+ let bS = if ((bN >= bO))
249+ then bN
250+ else bO
251+ if ((bS == bS))
250252 then {
251- let bS = aX(bK)
252- let bT = B(bS, bR)
253- let bU = aX(bL)
254- let bV = B(bU, bR)
255- let bW = aZ(bV, bT)
256- let bX = E(bW, a)
257- let bY = B(bH, a)
258- let bZ = B(bP, a)
259- let ca = fraction(bT, bY, bZ)
260- let cb = fraction(bV, bY, bZ)
261- let cc = E(ca, bR)
262- let cd = E(cb, bR)
263- let ce = if ((bF == ""))
253+ let bT = aY(bL)
254+ let bU = C(bT, bS)
255+ let bV = aY(bM)
256+ let bW = C(bV, bS)
257+ let bX = ba(bW, bU)
258+ let bY = F(bX, a)
259+ let bZ = C(bI, a)
260+ let ca = C(bQ, a)
261+ let cb = fraction(bU, bZ, ca)
262+ let cc = fraction(bW, bZ, ca)
263+ let cd = F(cb, bS)
264+ let ce = F(cc, bS)
265+ let cf = if ((bG == ""))
264266 then nil
265- else [ScriptTransfer(bI, cc, if ((bK == "WAVES"))
267+ else [ScriptTransfer(bJ, cd, if ((bL == "WAVES"))
266268 then unit
267- else fromBase58String(bK)), ScriptTransfer(bI, cd, if ((bL == "WAVES"))
269+ else fromBase58String(bL)), ScriptTransfer(bJ, ce, if ((bM == "WAVES"))
268270 then unit
269- else fromBase58String(bL)), StringEntry(W(toString(bI), bF), aT(cc, cd, bH, bX, height, lastBlock.timestamp)), IntegerEntry(P(), bX), IntegerEntry(Q(height, lastBlock.timestamp), bX)]
270- $Tuple10(cc, cd, bK, bL, bS, bU, bP, bW, bO, ce)
271+ else fromBase58String(bM)), StringEntry(X(toString(bJ), bG), aU(cd, ce, bI, bY, height, lastBlock.timestamp)), IntegerEntry(Q(), bY), IntegerEntry(R(height, lastBlock.timestamp), bY)]
272+ $Tuple10(cd, ce, bL, bM, bT, bV, bQ, bX, bP, cf)
271273 }
272274 else throw("Strict value is not equal to itself.")
273275 }
275277 }
276278
277279
278-func cf (bF,cg,ch,ci,cj,ck,bI,cl,cm,cn,co,cp) = {
279- let bv = aD()
280- let bJ = fromBase58String(bv[q])
281- let cq = bv[r]
282- let cr = bv[s]
283- let cs = bv[v]
284- let ct = bv[w]
285- let bM = parseIntValue(bv[t])
286- let bN = parseIntValue(bv[u])
287- let bO = bv[p]
288- let bP = valueOrErrorMessage(assetInfo(bJ), "Wrong lp asset").quantity
289- let bS = if (cl)
290- then aX(cq)
291- else if (if (cn)
292- then (cp == cq)
280+func cg (bG,ch,ci,cj,ck,cl,bJ,cm,cn,co,cp,cq) = {
281+ let bw = aE()
282+ let bK = fromBase58String(bw[r])
283+ let cr = bw[s]
284+ let cs = bw[t]
285+ let ct = bw[w]
286+ let cu = bw[x]
287+ let bN = parseIntValue(bw[u])
288+ let bO = parseIntValue(bw[v])
289+ let bP = bw[q]
290+ let bQ = valueOrErrorMessage(assetInfo(bK), "Wrong lp asset").quantity
291+ let bT = if (cm)
292+ then aY(cr)
293+ else if (if (co)
294+ then (cq == cr)
293295 else false)
294- then (aX(cq) - co)
295- else if (cn)
296- then aX(cq)
297- else (aX(cq) - ch)
298- let bU = if (cl)
299- then aX(cr)
300- else if (if (cn)
301- then (cp == cr)
296+ then (aY(cr) - cp)
297+ else if (co)
298+ then aY(cr)
299+ else (aY(cr) - ci)
300+ let bV = if (cm)
301+ then aY(cs)
302+ else if (if (co)
303+ then (cq == cs)
302304 else false)
303- then (aX(cr) - co)
304- else if (cn)
305- then aX(cr)
306- else (aX(cr) - cj)
307- let bR = if ((bM >= bN))
308- then bM
309- else bN
310- if ((bR == bR))
305+ then (aY(cs) - cp)
306+ else if (co)
307+ then aY(cs)
308+ else (aY(cs) - ck)
309+ let bS = if ((bN >= bO))
310+ then bN
311+ else bO
312+ if ((bS == bS))
311313 then {
312- let cu = B(ch, bR)
313- let cv = B(cj, bR)
314- let cw = aZ(cv, cu)
315- let bT = B(bS, bR)
316- let bV = B(bU, bR)
317- let cx = if ((bP == 0))
314+ let cv = C(ci, bS)
315+ let cw = C(ck, bS)
316+ let cx = ba(cw, cv)
317+ let bU = C(bT, bS)
318+ let bW = C(bV, bS)
319+ let cy = if ((bQ == 0))
318320 then {
319- let bW = d
320- let cy = d
321- let cz = pow((cu * cv), 0, toBigInt(5), 1, 0, DOWN)
322- $Tuple5(E(cz, a), E(cu, bR), E(cv, bR), aZ((bV + cv), (bT + cu)), cy)
321+ let bX = e
322+ let cz = e
323+ let cA = pow((cv * cw), 0, toBigInt(5), 1, 0, DOWN)
324+ $Tuple5(F(cA, a), F(cv, bS), F(cw, bS), ba((bW + cw), (bU + cv)), cz)
323325 }
324326 else {
325- let bW = aZ(bV, bT)
326- let cA = fraction(L((bW - cw)), c, bW)
327- let cy = B(cg, a)
328- let cB = if (((if ((bW != d))
329- then (cA > cy)
330- else false) == false))
331- then true
332- else am(((("Price slippage " + toString(cA)) + " > ") + toString(cy)))
333- if ((cB == cB))
334- then {
335- let bZ = B(bP, a)
336- let cC = fraction(cu, bW, c)
337- let cD = fraction(cv, c, bW)
338- let cE = if ((cC > cv))
339- then $Tuple2(cD, cu)
340- else $Tuple2(cu, cC)
327+ let bX = ba(bW, bU)
328+ let cB = fraction(M((bX - cx)), c, bX)
329+ let cz = C(ch, a)
330+ if (if ((bX != e))
331+ then (cB > cz)
332+ else false)
333+ then am(((("Price slippage " + toString(cB)) + " > ") + toString(cz)))
334+ else {
335+ let ca = C(bQ, a)
336+ let cC = fraction(cv, bX, c)
337+ let cD = fraction(cw, c, bX)
338+ let cE = if ((cC > cw))
339+ then $Tuple2(cD, cv)
340+ else $Tuple2(cv, cC)
341341 let cF = cE._1
342342 let cG = cE._2
343- let cz = fraction(bZ, cG, bV)
344- $Tuple5(E(cz, a), E(cF, bR), E(cG, bR), bW, cy)
343+ let cA = fraction(ca, cG, bW)
344+ $Tuple5(F(cA, a), F(cF, bS), F(cG, bS), bX, cz)
345345 }
346- else throw("Strict value is not equal to itself.")
347346 }
348- let cH = cx._1
349- let cI = cx._2
350- let cJ = cx._3
351- let cK = E(cx._4, a)
352- let cL = E(cx._5, a)
347+ let cH = cy._1
348+ let cI = cy._2
349+ let cJ = cy._3
350+ let cK = F(cy._4, a)
351+ let cL = F(cy._5, a)
353352 let cM = if ((cH > 0))
354353 then true
355354 else am("LP <= 0")
356355 if ((cM == cM))
357356 then {
358- let cN = if (!(cm))
357+ let cN = if (!(cn))
359358 then 0
360359 else cH
361- let cO = (ch - cI)
362- let cP = (cj - cJ)
363- let cQ = if (if (cn)
364- then (cp == cq)
360+ let cO = (ci - cI)
361+ let cP = (ck - cJ)
362+ let cQ = if (if (co)
363+ then (cq == cr)
365364 else false)
366- then $Tuple2(co, 0)
367- else if (if (cn)
368- then (cp == cr)
365+ then $Tuple2(cp, 0)
366+ else if (if (co)
367+ then (cq == cs)
369368 else false)
370- then $Tuple2(0, co)
369+ then $Tuple2(0, cp)
371370 else $Tuple2(cI, cJ)
372371 let cR = cQ._1
373372 let cS = cQ._2
374- let cT = [IntegerEntry(P(), cK), IntegerEntry(Q(height, lastBlock.timestamp), cK), StringEntry(T(bI, bF), aI(cR, cS, cN, cK, cg, cL, height, lastBlock.timestamp, cO, cP))]
375- $Tuple13(cH, cN, cK, bS, bU, bP, bJ, bO, cT, cO, cP, ci, ck)
373+ let cT = [IntegerEntry(Q(), cK), IntegerEntry(R(height, lastBlock.timestamp), cK), StringEntry(U(bJ, bG), aJ(cR, cS, cN, cK, ch, cL, height, lastBlock.timestamp, cO, cP))]
374+ $Tuple13(cH, cN, cK, bT, bV, bQ, bK, bP, cT, cO, cP, cj, cl)
376375 }
377376 else throw("Strict value is not equal to itself.")
378377 }
381380
382381
383382 func cU (cV) = {
384- let bv = aD()
385- let cW = bv[r]
386- let cX = bv[s]
387- let bO = parseIntValue(bv[p])
388- let bw = parseIntValue(bv[t])
389- let bx = parseIntValue(bv[u])
390- let cY = aX(cW)
391- let cZ = aX(cX)
392- let bW = if ((cV.orderType == Buy))
393- then bm(bw, bx, (cY + cV.amount), cZ)
394- else bm(bw, bx, (cY - cV.amount), cZ)
395- let bX = E(bW, a)
383+ let bw = aE()
384+ let cW = bw[s]
385+ let cX = bw[t]
386+ let bP = parseIntValue(bw[q])
387+ let bx = parseIntValue(bw[u])
388+ let by = parseIntValue(bw[v])
389+ let cY = aY(cW)
390+ let cZ = aY(cX)
391+ let bX = if ((cV.orderType == Buy))
392+ then bn(bx, by, (cY + cV.amount), cZ)
393+ else bn(bx, by, (cY - cV.amount), cZ)
394+ let bY = F(bX, a)
396395 if (if (if (aB())
397396 then true
398- else (bO == m))
397+ else (bP == n))
399398 then true
400- else (bO == n))
399+ else (bP == o))
401400 then am("Admin blocked")
402401 else {
403402 let da = cV.assetPair.amountAsset
414413 then am("Wr assets")
415414 else {
416415 let de = cV.price
417- let bN = fraction(a, bx, bw)
418- let df = H(de, a, bN)
416+ let bO = fraction(a, by, bx)
417+ let df = I(de, a, bO)
419418 let dg = if ((cV.orderType == Buy))
420- then (bX >= df)
421- else (df >= bX)
419+ then (bY >= df)
420+ else (df >= bY)
422421 true
423422 }
424423 }
432431 if ((dj == dj))
433432 then {
434433 let dk = value(di.payments[0])
435- let bG = value(dk.assetId)
436- let co = dk.amount
437- let cx = bE(toBase58String(di.transactionId), toBase58String(bG), co, di.caller)
438- let cc = cx._1
439- let cd = cx._2
440- let bO = parseIntValue(cx._9)
441- let ce = cx._10
434+ let bH = value(dk.assetId)
435+ let cp = dk.amount
436+ let cy = bF(toBase58String(di.transactionId), toBase58String(bH), cp, di.caller)
437+ let cd = cy._1
438+ let ce = cy._2
439+ let bP = parseIntValue(cy._9)
440+ let cf = cy._10
442441 if (if (aB())
443442 then true
444- else (bO == n))
445- then am(("Admin blocked: " + toString(bO)))
446- else $Tuple5(cc, cd, co, bG, ce)
443+ else (bP == o))
444+ then am(("Admin blocked: " + toString(bP)))
445+ else $Tuple5(cd, ce, cp, bH, cf)
447446 }
448447 else throw("Strict value is not equal to itself.")
449448 }
450449
451450
452-func dl (ac,V,dm,dn,bf,cm,cn,co,cp) = {
453- let cx = cf(V, bf, value(dm).amount, value(dm).assetId, value(dn).amount, value(dn).assetId, ac, false, cm, cn, co, cp)
454- let bO = parseIntValue(cx._8)
451+func dl (dm,W,dn,do,bg,cn,co,cp,cq) = {
452+ let cy = cg(W, bg, value(dn).amount, value(dn).assetId, value(do).amount, value(do).assetId, dm, false, cn, co, cp, cq)
453+ let bP = parseIntValue(cy._8)
455454 if (if (if (aB())
456455 then true
457- else (bO == l))
456+ else (bP == m))
458457 then true
459- else (bO == n))
460- then am(("Blocked:" + toString(bO)))
461- else cx
458+ else (bP == o))
459+ then am(("Blocked:" + toString(bP)))
460+ else cy
462461 }
463462
464463
465-func do () = {
466- let at = getString(N())
464+func dp (dq) = {
465+ let dr = fraction(dq, ad, d)
466+ $Tuple2((dq - dr), dr)
467+ }
468+
469+
470+func ds () = {
471+ let at = getString(O())
467472 if ($isInstanceOf(at, "String"))
468473 then {
469- let dp = at
470- fromBase58String(dp)
474+ let dt = at
475+ fromBase58String(dt)
471476 }
472477 else if ($isInstanceOf(at, "Unit"))
473478 then unit
475480 }
476481
477482
478-func dq () = {
479- let at = getString(O())
483+func du () = {
484+ let at = getString(P())
480485 if ($isInstanceOf(at, "String"))
481486 then {
482- let dp = at
483- fromBase58String(dp)
487+ let dt = at
488+ fromBase58String(dt)
484489 }
485490 else if ($isInstanceOf(at, "Unit"))
486491 then unit
488493 }
489494
490495
491-let dr = am("Permission denied")
496+let dv = am("Permission denied")
492497
493-func ds (di) = {
494- let at = do()
498+func dw (di) = {
499+ let at = ds()
495500 if ($isInstanceOf(at, "ByteVector"))
496501 then {
497- let dt = at
498- if ((di.callerPublicKey == dt))
502+ let dx = at
503+ if ((di.callerPublicKey == dx))
499504 then true
500- else dr
505+ else dv
501506 }
502507 else if ($isInstanceOf(at, "Unit"))
503508 then if ((di.caller == this))
504509 then true
505- else dr
510+ else dv
506511 else throw("Match error")
507512 }
508513
509514
510515 @Callable(di)
511516 func constructor (az) = {
512- let du = ds(di)
513- if ((du == du))
514- then [StringEntry(M(), az)]
517+ let dy = dw(di)
518+ if ((dy == dy))
519+ then [StringEntry(N(), az)]
515520 else throw("Strict value is not equal to itself.")
516521 }
517522
518523
519524
520525 @Callable(di)
521-func setManager (dv) = {
522- let du = ds(di)
523- if ((du == du))
526+func setManager (dz) = {
527+ let dy = dw(di)
528+ if ((dy == dy))
524529 then {
525- let dw = fromBase58String(dv)
526- if ((dw == dw))
527- then [StringEntry(O(), dv)]
530+ let dA = fromBase58String(dz)
531+ if ((dA == dA))
532+ then [StringEntry(P(), dz)]
528533 else throw("Strict value is not equal to itself.")
529534 }
530535 else throw("Strict value is not equal to itself.")
534539
535540 @Callable(di)
536541 func confirmManager () = {
537- let dx = dq()
538- let dy = if (isDefined(dx))
542+ let dB = du()
543+ let dC = if (isDefined(dB))
539544 then true
540545 else am("No pending manager")
541- if ((dy == dy))
546+ if ((dC == dC))
542547 then {
543- let dz = if ((di.callerPublicKey == value(dx)))
548+ let dD = if ((di.callerPublicKey == value(dB)))
544549 then true
545550 else am("You are not pending manager")
546- if ((dz == dz))
547- then [StringEntry(N(), toBase58String(value(dx))), DeleteEntry(O())]
551+ if ((dD == dD))
552+ then [StringEntry(O(), toBase58String(value(dB))), DeleteEntry(P())]
548553 else throw("Strict value is not equal to itself.")
549554 }
550555 else throw("Strict value is not equal to itself.")
553558
554559
555560 @Callable(di)
556-func put (bf,dA) = {
557- let dB = aH()
558- let dC = valueOrErrorMessage(addressFromString(dB[x]), "Wrong staking contract")
559- let dD = valueOrErrorMessage(addressFromString(dB[y]), "Wrogn slippage contract")
560- let dE = if ((bf >= 0))
561+func put (bg,dE) = {
562+ let dF = aI()
563+ let dG = valueOrErrorMessage(addressFromString(dF[y]), "Wrong staking contract")
564+ let dH = valueOrErrorMessage(addressFromString(dF[z]), "Wrogn slippage contract")
565+ let dI = if ((bg >= 0))
561566 then true
562567 else am("wrong slippage")
563- if ((dE == dE))
568+ if ((dI == dI))
564569 then {
565- let dF = if ((size(di.payments) == 2))
570+ let dJ = if ((size(di.payments) == 2))
566571 then true
567572 else am("2 payments expected")
568- if ((dF == dF))
573+ if ((dJ == dJ))
569574 then {
570- let dG = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(value(di.payments[0]).assetId, value(di.payments[0]).amount), di.payments[1], bf, true, false, 0, "")
571- let cN = dG._2
572- let bJ = dG._7
573- let ce = dG._9
574- let cO = dG._10
575- let cP = dG._11
576- let bK = dG._12
577- let bL = dG._13
578- let cx = invoke(az, "emit", [cN], nil)
579- if ((cx == cx))
575+ let dK = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(value(di.payments[0]).assetId, value(di.payments[0]).amount), di.payments[1], bg, true, false, 0, "")
576+ let cN = dK._2
577+ let bK = dK._7
578+ let cf = dK._9
579+ let cO = dK._10
580+ let cP = dK._11
581+ let bL = dK._12
582+ let bM = dK._13
583+ let cy = invoke(az, "emit", [cN], nil)
584+ if ((cy == cy))
580585 then {
581- let dH = {
582- let at = cx
586+ let dL = {
587+ let at = cy
583588 if ($isInstanceOf(at, "Address"))
584589 then {
585- let dI = at
586- invoke(dI, "emit", [cN], nil)
590+ let dM = at
591+ invoke(dM, "emit", [cN], nil)
587592 }
588593 else unit
589594 }
590- if ((dH == dH))
595+ if ((dL == dL))
591596 then {
592- let dJ = if ((cO > 0))
593- then invoke(dD, "put", nil, [AttachedPayment(bK, cO)])
597+ let dN = if ((cO > 0))
598+ then invoke(dH, "put", nil, [AttachedPayment(bL, cO)])
594599 else nil
595- if ((dJ == dJ))
600+ if ((dN == dN))
596601 then {
597- let dK = if ((cP > 0))
598- then invoke(dD, "put", nil, [AttachedPayment(bL, cP)])
602+ let dO = if ((cP > 0))
603+ then invoke(dH, "put", nil, [AttachedPayment(bM, cP)])
599604 else nil
600- if ((dK == dK))
605+ if ((dO == dO))
601606 then {
602- let dL = if (dA)
607+ let dP = if (dE)
603608 then {
604- let dM = invoke(dC, "stake", nil, [AttachedPayment(bJ, cN)])
605- if ((dM == dM))
609+ let dQ = invoke(dG, "stake", nil, [AttachedPayment(bK, cN)])
610+ if ((dQ == dQ))
606611 then nil
607612 else throw("Strict value is not equal to itself.")
608613 }
609- else [ScriptTransfer(di.caller, cN, bJ)]
610- (ce ++ dL)
614+ else [ScriptTransfer(di.caller, cN, bK)]
615+ (cf ++ dP)
611616 }
612617 else throw("Strict value is not equal to itself.")
613618 }
625630
626631
627632 @Callable(di)
628-func putOneTkn (dN,dO,be,bf,dA) = {
629- let bv = aH()
630- let dC = valueOrErrorMessage(addressFromString(bv[x]), "Wrong staking contract")
631- let dD = valueOrErrorMessage(addressFromString(bv[y]), "Wrong slippage contract")
632- let dP = valueOrErrorMessage(addressFromString(bv[z]), "Wrong gwx reward contract")
633- let dQ = aD()
634- let bK = dQ[r]
635- let bL = dQ[s]
636- let bM = parseIntValue(dQ[t])
637- let bN = parseIntValue(dQ[u])
638- let dR = valueOrElse(getString(this, aa()), "")
639- let bI = if ((dR == toString(di.caller)))
633+func putOneTkn (dR,dS,bf,bg,dE) = {
634+ let bw = aI()
635+ let dG = valueOrErrorMessage(addressFromString(bw[y]), "Wrong staking contract")
636+ let dH = valueOrErrorMessage(addressFromString(bw[z]), "Wrong slippage contract")
637+ let dT = valueOrErrorMessage(addressFromString(bw[A]), "Wrong gwx reward contract")
638+ let dU = aE()
639+ let bL = dU[s]
640+ let bM = dU[t]
641+ let bN = parseIntValue(dU[u])
642+ let bO = parseIntValue(dU[v])
643+ let dV = valueOrElse(getString(this, ab()), "")
644+ let bJ = if ((dV == toString(di.caller)))
640645 then di.originCaller
641646 else di.caller
642- let dS = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid")
643- let dT = reentrantInvoke(dS, "ensureCanPutOneTkn", [toString(bI)], nil)
644- if ((dT == dT))
645- then if (if (if (if ((0 >= bf))
646- then true
647- else (0 >= dN))
648- then true
649- else (0 >= dO))
650- then true
651- else (0 >= be))
652- then am("Wrong params")
653- else if ((size(di.payments) != 1))
654- then am("1 payment expected")
655- else {
656- let dk = value(di.payments[0])
657- let bG = toBase58String(value(dk.assetId))
658- let co = dk.amount
659- if (if (if ((dN > co))
660- then true
661- else (dO > co))
662- then true
663- else (10000000 > co))
664- then am("wrong payment amount")
665- else {
666- let bS = aX(bK)
667- let bU = aX(bL)
668- let dU = if ((bG == bK))
669- then $Tuple6((bS - co), bU, (co - dN), dO, 0, 0)
670- else if ((bG == bL))
671- then $Tuple6(bS, (bU - co), 0, 0, (co - dO), dN)
672- else am("wrong paymentAssetId")
673- let dV = dU._1
674- let dW = dU._2
675- let dX = dU._3
676- let dY = dU._4
677- let dZ = dU._5
678- let ea = dU._6
679- let bk = invoke(dP, "calcD", [toString(dV), toString(dW), aA, g, h], nil)
680- let bj = invoke(dP, "calcD", [toString(toBigInt(((dV + dX) - ea))), toString(toBigInt(((dW + dZ) - dY))), aA, g, h], nil)
681- let eb = bi(parseBigIntValue(as(bj)), parseBigIntValue(as(bk)), f)
682- if ((eb == eb))
683- then {
684- let dG = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(fromBase58String(bK), dN), AttachedPayment(fromBase58String(bL), dO), bf, true, true, co, bG)
685- let bd = dG._2
686- let bJ = dG._7
687- let ce = dG._9
688- let cO = dG._10
689- let cP = dG._11
690- let ec = bc(toBigInt(bd), toBigInt(be), toBigInt(bf))
691- let cN = toInt(ec._2)
692- let ed = invoke(az, "emit", [cN], nil)
693- if ((ed == ed))
694- then {
695- let dH = {
696- let at = ed
697- if ($isInstanceOf(at, "Address"))
647+ if (if (if (if ((0 >= bg))
648+ then true
649+ else (0 >= dR))
650+ then true
651+ else (0 >= dS))
652+ then true
653+ else (0 >= bf))
654+ then am("Wrong params")
655+ else if ((size(di.payments) != 1))
656+ then am("1 payment expected")
657+ else {
658+ let dk = value(di.payments[0])
659+ let bH = toBase58String(value(dk.assetId))
660+ let dW = dk.amount
661+ let dX = dp(dW)
662+ let cp = dX._1
663+ let dY = dX._2
664+ if (if (if ((dR > cp))
665+ then true
666+ else (dS > cp))
667+ then true
668+ else (10000000 > cp))
669+ then am("wrong payment amount")
670+ else {
671+ let bT = aY(bL)
672+ let bV = aY(bM)
673+ let dZ = if ((bH == bL))
674+ then $Tuple6((bT - cp), bV, (cp - dR), dS, 0, 0)
675+ else if ((bH == bM))
676+ then $Tuple6(bT, (bV - cp), 0, 0, (cp - dS), dR)
677+ else am("wrong paymentAssetId")
678+ let ea = dZ._1
679+ let eb = dZ._2
680+ let ec = dZ._3
681+ let ed = dZ._4
682+ let ee = dZ._5
683+ let ef = dZ._6
684+ let bl = invoke(dT, "calcD", [toString(ea), toString(eb), aA, h, i], nil)
685+ let bk = invoke(dT, "calcD", [toString(toBigInt(((ea + ec) - ef))), toString(toBigInt(((eb + ee) - ed))), aA, h, i], nil)
686+ let eg = bj(parseBigIntValue(as(bk)), parseBigIntValue(as(bl)), g)
687+ if ((eg == eg))
688+ then {
689+ let dK = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(fromBase58String(bL), dR), AttachedPayment(fromBase58String(bM), dS), bg, true, true, cp, bH)
690+ let be = dK._2
691+ let bK = dK._7
692+ let cf = dK._9
693+ let cO = dK._10
694+ let cP = dK._11
695+ let eh = bd(toBigInt(be), toBigInt(bf), toBigInt(bg))
696+ let cN = toInt(eh._2)
697+ let ei = invoke(az, "emit", [cN], nil)
698+ if ((ei == ei))
699+ then {
700+ let dL = {
701+ let at = ei
702+ if ($isInstanceOf(at, "Address"))
703+ then {
704+ let dM = at
705+ invoke(dM, "emit", [cN], nil)
706+ }
707+ else unit
708+ }
709+ if ((dL == dL))
710+ then {
711+ let dN = if ((cO > 0))
712+ then invoke(dH, "put", nil, [AttachedPayment(fromBase58String(bL), cO)])
713+ else nil
714+ if ((dN == dN))
698715 then {
699- let dI = at
700- invoke(dI, "emit", [cN], nil)
716+ let dO = if ((cP > 0))
717+ then invoke(dH, "put", nil, [AttachedPayment(fromBase58String(bM), cP)])
718+ else nil
719+ if ((dO == dO))
720+ then {
721+ let dP = if (dE)
722+ then {
723+ let dQ = invoke(dG, "stake", nil, [AttachedPayment(bK, cN)])
724+ if ((dQ == dQ))
725+ then nil
726+ else throw("Strict value is not equal to itself.")
727+ }
728+ else [ScriptTransfer(di.caller, cN, bK)]
729+ let ej = if ((dY > 0))
730+ then [ScriptTransfer(aD, dY, fromBase58String(bH))]
731+ else nil
732+ ((cf ++ dP) ++ ej)
733+ }
734+ else throw("Strict value is not equal to itself.")
701735 }
702- else unit
736+ else throw("Strict value is not equal to itself.")
703737 }
704- if ((dH == dH))
705- then {
706- let dJ = if ((cO > 0))
707- then invoke(dD, "put", nil, [AttachedPayment(fromBase58String(bK), cO)])
708- else nil
709- if ((dJ == dJ))
710- then {
711- let dK = if ((cP > 0))
712- then invoke(dD, "put", nil, [AttachedPayment(fromBase58String(bL), cP)])
713- else nil
714- if ((dK == dK))
715- then {
716- let dL = if (dA)
717- then {
718- let dM = invoke(dC, "stake", nil, [AttachedPayment(bJ, cN)])
719- if ((dM == dM))
720- then nil
721- else throw("Strict value is not equal to itself.")
722- }
723- else [ScriptTransfer(di.caller, cN, bJ)]
724- (ce ++ dL)
725- }
726- else throw("Strict value is not equal to itself.")
727- }
728- else throw("Strict value is not equal to itself.")
729- }
730- else throw("Strict value is not equal to itself.")
731- }
732- else throw("Strict value is not equal to itself.")
733- }
734- else throw("Strict value is not equal to itself.")
735- }
736- }
738+ else throw("Strict value is not equal to itself.")
739+ }
740+ else throw("Strict value is not equal to itself.")
741+ }
742+ else throw("Strict value is not equal to itself.")
743+ }
744+ }
745+ }
746+
747+
748+
749+@Callable(di)
750+func putForFree (ek) = if ((0 > ek))
751+ then am("wrong slippage")
752+ else if ((size(di.payments) != 2))
753+ then am("2 payments expected")
754+ else {
755+ let dK = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(value(di.payments[0]).assetId, value(di.payments[0]).amount), di.payments[1], ek, false, false, 0, "")
756+ dK._9
757+ }
758+
759+
760+
761+@Callable(di)
762+func get () = {
763+ let cy = dh(di)
764+ let el = cy._1
765+ let ce = cy._2
766+ let cp = cy._3
767+ let bH = cy._4
768+ let cf = cy._5
769+ let em = invoke(az, "burn", [cp], [AttachedPayment(bH, cp)])
770+ if ((em == em))
771+ then cf
737772 else throw("Strict value is not equal to itself.")
738773 }
739774
740775
741776
742777 @Callable(di)
743-func putForFree (ee) = if ((0 > ee))
744- then am("wrong slippage")
745- else if ((size(di.payments) != 2))
746- then am("2 payments expected")
747- else {
748- let dG = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(value(di.payments[0]).assetId, value(di.payments[0]).amount), di.payments[1], ee, false, false, 0, "")
749- dG._9
750- }
751-
752-
753-
754-@Callable(di)
755-func get () = {
756- let cx = dh(di)
757- let ef = cx._1
758- let cd = cx._2
759- let co = cx._3
760- let bG = cx._4
761- let ce = cx._5
762- let eg = invoke(az, "burn", [co], [AttachedPayment(bG, co)])
763- if ((eg == eg))
764- then ce
765- else throw("Strict value is not equal to itself.")
766- }
767-
768-
769-
770-@Callable(di)
771-func getOneTkn (eh,ei,ej,ek,bf) = if ((size(di.payments) != 1))
778+func getOneTkn (en,eo,ep,eq,bg) = if ((size(di.payments) != 1))
772779 then am("1 payment expected")
773780 else {
774- let bv = aD()
775- let bJ = bv[q]
776- let bK = bv[r]
777- let bL = bv[s]
778- let bM = parseIntValue(bv[t])
779- let bN = parseIntValue(bv[u])
780- let bO = bv[p]
781- let dB = aH()
782- let dP = valueOrErrorMessage(addressFromString(dB[z]), "Wrong gwxRewardContract address")
781+ let bw = aE()
782+ let bK = bw[r]
783+ let bL = bw[s]
784+ let bM = bw[t]
785+ let bN = parseIntValue(bw[u])
786+ let bO = parseIntValue(bw[v])
787+ let bP = bw[q]
788+ let dF = aI()
789+ let dT = valueOrErrorMessage(addressFromString(dF[A]), "Wrong gwxRewardContract address")
783790 let dk = value(di.payments[0])
784- let dR = valueOrElse(getString(this, aa()), "")
785- let bI = if ((dR == toString(di.caller)))
791+ let dV = valueOrElse(getString(this, ab()), "")
792+ let bJ = if ((dV == toString(di.caller)))
786793 then di.originCaller
787794 else di.caller
788- let bF = toBase58String(di.transactionId)
789- let bG = value(dk.assetId)
790- let co = dk.amount
791- let dS = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid")
792- let dT = reentrantInvoke(dS, "ensureCanGetOneTkn", [toString(bI)], nil)
793- if ((dT == dT))
794- then if ((1000000000 > co))
795- then am("Min payment 10 LP")
796- else if (if (if ((0 > bf))
797- then true
798- else (0 > eh))
799- then true
800- else (0 > ej))
801- then am("Wrong params")
802- else if ((bJ != toBase58String(bG)))
803- then am("Wrong LP")
804- else {
805- let cx = bE(toBase58String(di.transactionId), toBase58String(bG), co, di.caller)
806- let el = cx._1
807- let em = cx._2
808- let bS = aX(bK)
809- let bU = aX(bL)
810- let en = if ((ek == bK))
811- then $Tuple7((bS - el), (bU - em), eh, em, 0, 0, (el + eh))
812- else if ((ek == bL))
813- then $Tuple7((bS - el), (bU - em), 0, 0, eh, el, (em + eh))
814- else am("wrong outAssetId")
815- let dV = en._1
816- let dW = en._2
817- let dX = en._3
818- let dY = en._4
819- let dZ = en._5
820- let ea = en._6
821- let eo = en._7
822- if (if ((0 > dX))
823- then true
824- else (0 > dZ))
825- then am("Wrong calc")
826- else {
827- let bk = invoke(dP, "calcD", [toString(dV), toString(dW), aA, g, h], nil)
828- let bj = invoke(dP, "calcD", [toString(((dV - dX) + ea)), toString(((dW + dY) - dZ)), aA, g, h], nil)
829- let eb = bi(parseBigIntValue(as(bj)), parseBigIntValue(as(bk)), f)
830- if ((eb == eb))
831- then {
832- let ep = bc(toBigInt(eo), toBigInt(ej), toBigInt(bf))
833- if ((ep == ep))
834- then {
835- let eq = if ((ek == bK))
836- then $Tuple2(toInt(ep._2), 0)
837- else $Tuple2(0, toInt(ep._2))
838- let er = eq._1
839- let es = eq._2
840- let bR = if ((bM >= bN))
841- then bM
842- else bN
843- if ((bR == bR))
844- then {
845- let et = aZ(B(bU, bR), B(bS, bR))
846- let eu = E(et, a)
847- let ce = [ScriptTransfer(bI, (er + es), if ((ek == "WAVES"))
848- then unit
849- else fromBase58String(ek)), StringEntry(W(toString(bI), bF), aT(er, es, co, eu, height, lastBlock.timestamp)), IntegerEntry(P(), eu), IntegerEntry(Q(height, lastBlock.timestamp), eu)]
850- if ((ce == ce))
851- then {
852- let ev = invoke(az, "burn", [co], [AttachedPayment(bG, co)])
853- if ((ev == ev))
854- then ce
855- else throw("Strict value is not equal to itself.")
856- }
857- else throw("Strict value is not equal to itself.")
858- }
859- else throw("Strict value is not equal to itself.")
860- }
861- else throw("Strict value is not equal to itself.")
862- }
863- else throw("Strict value is not equal to itself.")
864- }
865- }
866- else throw("Strict value is not equal to itself.")
795+ let bG = toBase58String(di.transactionId)
796+ let bH = value(dk.assetId)
797+ let cp = dk.amount
798+ if ((1000000000 > cp))
799+ then am("Min payment 10 LP")
800+ else if (if (if ((0 > bg))
801+ then true
802+ else (0 > en))
803+ then true
804+ else (0 > ep))
805+ then am("Wrong params")
806+ else if ((bK != toBase58String(bH)))
807+ then am("Wrong LP")
808+ else {
809+ let cy = bF(toBase58String(di.transactionId), toBase58String(bH), cp, di.caller)
810+ let er = cy._1
811+ let es = cy._2
812+ let bT = aY(bL)
813+ let bV = aY(bM)
814+ let et = if ((eq == bL))
815+ then $Tuple7((bT - er), (bV - es), en, es, 0, 0, (er + en))
816+ else if ((eq == bM))
817+ then $Tuple7((bT - er), (bV - es), 0, 0, en, er, (es + en))
818+ else am("wrong outAssetId")
819+ let ea = et._1
820+ let eb = et._2
821+ let ec = et._3
822+ let ed = et._4
823+ let ee = et._5
824+ let ef = et._6
825+ let eu = et._7
826+ if (if ((0 > ec))
827+ then true
828+ else (0 > ee))
829+ then am("Wrong calc")
830+ else {
831+ let bl = invoke(dT, "calcD", [toString(ea), toString(eb), aA, h, i], nil)
832+ let bk = invoke(dT, "calcD", [toString(((ea - ec) + ef)), toString(((eb + ed) - ee)), aA, h, i], nil)
833+ let eg = bj(parseBigIntValue(as(bk)), parseBigIntValue(as(bl)), g)
834+ if ((eg == eg))
835+ then {
836+ let ev = bd(toBigInt(eu), toBigInt(ep), toBigInt(bg))
837+ if ((ev == ev))
838+ then {
839+ let ew = if ((eq == bL))
840+ then $Tuple2(toInt(ev._2), 0)
841+ else $Tuple2(0, toInt(ev._2))
842+ let ex = ew._1
843+ let ey = ew._2
844+ let ez = (ex + ey)
845+ let eA = dp(ez)
846+ let eB = eA._1
847+ let dY = eA._2
848+ let eC = if ((eq == "WAVES"))
849+ then unit
850+ else fromBase58String(eq)
851+ let ej = if ((dY > 0))
852+ then [ScriptTransfer(aD, dY, eC)]
853+ else nil
854+ let bS = if ((bN >= bO))
855+ then bN
856+ else bO
857+ if ((bS == bS))
858+ then {
859+ let eD = ba(C(bV, bS), C(bT, bS))
860+ let eE = F(eD, a)
861+ let cf = [ScriptTransfer(bJ, eB, eC), StringEntry(X(toString(bJ), bG), aU(ex, ey, cp, eE, height, lastBlock.timestamp)), IntegerEntry(Q(), eE), IntegerEntry(R(height, lastBlock.timestamp), eE)]
862+ if ((cf == cf))
863+ then {
864+ let eF = invoke(az, "burn", [cp], [AttachedPayment(bH, cp)])
865+ if ((eF == eF))
866+ then (cf ++ ej)
867+ else throw("Strict value is not equal to itself.")
868+ }
869+ else throw("Strict value is not equal to itself.")
870+ }
871+ else throw("Strict value is not equal to itself.")
872+ }
873+ else throw("Strict value is not equal to itself.")
874+ }
875+ else throw("Strict value is not equal to itself.")
876+ }
877+ }
867878 }
868879
869880
870881
871882 @Callable(di)
872-func getNoLess (ew,ex) = {
873- let cx = dh(di)
874- let cc = cx._1
875- let cd = cx._2
876- let co = cx._3
877- let bG = cx._4
878- let ce = cx._5
879- let ey = if ((cc >= ew))
883+func getNoLess (eG,eH) = {
884+ let cy = dh(di)
885+ let cd = cy._1
886+ let ce = cy._2
887+ let cp = cy._3
888+ let bH = cy._4
889+ let cf = cy._5
890+ let eI = if ((cd >= eG))
880891 then true
881- else am(((("Failed: " + toString(cc)) + " < ") + toString(ew)))
882- if ((ey == ey))
892+ else am(((("Failed: " + toString(cd)) + " < ") + toString(eG)))
893+ if ((eI == eI))
883894 then {
884- let ez = if ((cd >= ex))
895+ let eJ = if ((ce >= eH))
885896 then true
886- else am(((("Failed: " + toString(cd)) + " < ") + toString(ex)))
887- if ((ez == ez))
897+ else am(((("Failed: " + toString(ce)) + " < ") + toString(eH)))
898+ if ((eJ == eJ))
888899 then {
889- let eA = invoke(az, "burn", [co], [AttachedPayment(bG, co)])
890- if ((eA == eA))
891- then ce
900+ let eK = invoke(az, "burn", [cp], [AttachedPayment(bH, cp)])
901+ if ((eK == eK))
902+ then cf
892903 else throw("Strict value is not equal to itself.")
893904 }
894905 else throw("Strict value is not equal to itself.")
899910
900911
901912 @Callable(di)
902-func unstakeAndGet (eB) = {
913+func unstakeAndGet (dq) = {
903914 let dj = if ((size(di.payments) != 0))
904915 then am("no payments expected")
905916 else true
906917 if ((dj == dj))
907918 then {
908- let bv = aD()
909- let eC = aH()
910- let bJ = fromBase58String(bv[q])
911- let eD = valueOrErrorMessage(addressFromString(eC[x]), "wrong")
912- let eE = invoke(eD, "unstake", [toBase58String(bJ), eB], nil)
913- if ((eE == eE))
919+ let bw = aE()
920+ let eL = aI()
921+ let bK = fromBase58String(bw[r])
922+ let eM = valueOrErrorMessage(addressFromString(eL[y]), "wrong")
923+ let eN = invoke(eM, "unstake", [toBase58String(bK), dq], nil)
924+ if ((eN == eN))
914925 then {
915- let cx = bE(toBase58String(di.transactionId), toBase58String(bJ), eB, di.caller)
916- let bO = parseIntValue(cx._9)
917- let ce = cx._10
918- let eF = if (if (aB())
926+ let cy = bF(toBase58String(di.transactionId), toBase58String(bK), dq, di.caller)
927+ let bP = parseIntValue(cy._9)
928+ let cf = cy._10
929+ let eO = if (if (aB())
919930 then true
920- else (bO == n))
921- then am(("Blocked: " + toString(bO)))
931+ else (bP == o))
932+ then am(("Blocked: " + toString(bP)))
922933 else true
923- if ((eF == eF))
934+ if ((eO == eO))
924935 then {
925- let eG = invoke(az, "burn", [eB], [AttachedPayment(bJ, eB)])
926- if ((eG == eG))
927- then ce
936+ let eP = invoke(az, "burn", [dq], [AttachedPayment(bK, dq)])
937+ if ((eP == eP))
938+ then cf
928939 else throw("Strict value is not equal to itself.")
929940 }
930941 else throw("Strict value is not equal to itself.")
937948
938949
939950 @Callable(di)
940-func activate (eH,eI) = if ((toString(di.caller) != toString(az)))
951+func activate (eQ,eR) = if ((toString(di.caller) != toString(az)))
941952 then am("denied")
942- else $Tuple2([StringEntry(X(), eH), StringEntry(Y(), eI)], "success")
953+ else $Tuple2([StringEntry(Y(), eQ), StringEntry(Z(), eR)], "success")
943954
944955
945956
946957 @Callable(di)
947-func setS (eJ,eF) = if ((toString(di.caller) != av(this, aa())))
948- then dr
949- else [StringEntry(eJ, eF)]
958+func setS (eS,eO) = if ((toString(di.caller) != av(this, ab())))
959+ then dv
960+ else [StringEntry(eS, eO)]
950961
951962
952963
953964 @Callable(di)
954-func setI (eJ,eF) = if ((toString(di.caller) != av(this, aa())))
955- then dr
956- else [IntegerEntry(eJ, eF)]
965+func setI (eS,eO) = if ((toString(di.caller) != av(this, ab())))
966+ then dv
967+ else [IntegerEntry(eS, eO)]
957968
958969
959970
960971 @Callable(di)
961-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aD())
972+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aE())
962973
963974
964975
965976 @Callable(di)
966-func getAccBalanceWrapperREADONLY (aY) = $Tuple2(nil, aX(aY))
977+func getAccBalanceWrapperREADONLY (aZ) = $Tuple2(nil, aY(aZ))
967978
968979
969980
970981 @Callable(di)
971-func calcPricesWrapperREADONLY (bp,bq,bu) = {
972- let eK = bt(bp, bq, bu)
973- $Tuple2(nil, [toString(eK[0]), toString(eK[1]), toString(eK[2])])
982+func calcPricesWrapperREADONLY (bq,br,bv) = {
983+ let eT = bu(bq, br, bv)
984+ $Tuple2(nil, [toString(eT[0]), toString(eT[1]), toString(eT[2])])
974985 }
975986
976987
977988
978989 @Callable(di)
979-func fromX18WrapperREADONLY (F,eL) = $Tuple2(nil, E(parseBigIntValue(F), eL))
990+func fromX18WrapperREADONLY (G,eU) = $Tuple2(nil, F(parseBigIntValue(G), eU))
980991
981992
982993
983994 @Callable(di)
984-func toX18WrapperREADONLY (C,D) = $Tuple2(nil, toString(B(C, D)))
995+func toX18WrapperREADONLY (D,E) = $Tuple2(nil, toString(C(D, E)))
985996
986997
987998
988999 @Callable(di)
989-func calcPriceBigIntWrapperREADONLY (ba,bb) = $Tuple2(nil, toString(aZ(parseBigIntValue(ba), parseBigIntValue(bb))))
1000+func calcPriceBigIntWrapperREADONLY (bb,bc) = $Tuple2(nil, toString(ba(parseBigIntValue(bb), parseBigIntValue(bc))))
9901001
9911002
9921003
9931004 @Callable(di)
994-func estimatePutOperationWrapperREADONLY (bF,bf,ch,eM,cj,eN,eO,cl,cm) = $Tuple2(nil, cf(bF, bf, ch, eM, cj, eN, eO, cl, cm, false, 0, ""))
1005+func estimatePutOperationWrapperREADONLY (bG,bg,ci,eV,ck,eW,eX,cm,cn) = $Tuple2(nil, cg(bG, bg, ci, eV, ck, eW, eX, cm, cn, false, 0, ""))
9951006
9961007
9971008
9981009 @Callable(di)
999-func estimateGetOperationWrapperREADONLY (bF,eP,bH,eO) = {
1000- let cx = bE(bF, eP, bH, addressFromStringValue(eO))
1001- $Tuple2(nil, $Tuple10(cx._1, cx._2, cx._3, cx._4, cx._5, cx._6, cx._7, toString(cx._8), cx._9, cx._10))
1010+func estimateGetOperationWrapperREADONLY (bG,eY,bI,eX) = {
1011+ let cy = bF(bG, eY, bI, addressFromStringValue(eX))
1012+ $Tuple2(nil, $Tuple10(cy._1, cy._2, cy._3, cy._4, cy._5, cy._6, cy._7, toString(cy._8), cy._9, cy._10))
10021013 }
10031014
10041015
1005-@Verifier(eQ)
1006-func eR () = {
1007- let at = eQ
1016+@Verifier(eZ)
1017+func fa () = {
1018+ let at = eZ
10081019 if ($isInstanceOf(at, "Order"))
10091020 then {
10101021 let cV = at
1011- let eS = aC()
1022+ let fb = aC()
10121023 let ap = cU(cV)
1013- let eT = sigVerify(cV.bodyBytes, cV.proofs[0], cV.senderPublicKey)
1014- let eU = sigVerify(cV.bodyBytes, cV.proofs[1], eS)
1024+ let fc = sigVerify(cV.bodyBytes, cV.proofs[0], cV.senderPublicKey)
1025+ let fd = sigVerify(cV.bodyBytes, cV.proofs[1], fb)
10151026 if (if (if (ap)
1016- then eT
1027+ then fc
10171028 else false)
1018- then eU
1029+ then fd
10191030 else false)
10201031 then true
1021- else ao(ap, eT, eU)
1032+ else ao(ap, fc, fd)
10221033 }
10231034 else {
1024- let eV = {
1025- let eW = do()
1026- if ($isInstanceOf(eW, "ByteVector"))
1035+ let fe = {
1036+ let ff = ds()
1037+ if ($isInstanceOf(ff, "ByteVector"))
10271038 then {
1028- let dt = eW
1029- dt
1039+ let dx = ff
1040+ dx
10301041 }
1031- else if ($isInstanceOf(eW, "Unit"))
1032- then eQ.senderPublicKey
1042+ else if ($isInstanceOf(ff, "Unit"))
1043+ then eZ.senderPublicKey
10331044 else throw("Match error")
10341045 }
1035- sigVerify(eQ.bodyBytes, eQ.proofs[0], eV)
1046+ sigVerify(eZ.bodyBytes, eZ.proofs[0], fe)
10361047 }
10371048 }
10381049
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
10-let d = toBigInt(0)
10+let d = 1000
1111
12-let e = toBigInt(1)
12+let e = toBigInt(0)
1313
14-let f = toBigInt((a - ((a * 1) / a)))
14+let f = toBigInt(1)
1515
16-let g = "100"
16+let g = toBigInt((a - ((a * 1) / a)))
1717
18-let h = "1"
18+let h = "100"
1919
20-let i = "__"
20+let i = "1"
2121
22-let j = ""
22+let j = "__"
2323
24-let k = 1
24+let k = ""
2525
26-let l = 2
26+let l = 1
2727
28-let m = 3
28+let m = 2
2929
30-let n = 4
30+let n = 3
3131
32-let o = 1
32+let o = 4
3333
34-let p = 2
34+let p = 1
3535
36-let q = 3
36+let q = 2
3737
38-let r = 4
38+let r = 3
3939
40-let s = 5
40+let s = 4
4141
42-let t = 6
42+let t = 5
4343
44-let u = 7
44+let u = 6
4545
46-let v = 8
46+let v = 7
4747
48-let w = 9
48+let w = 8
4949
50-let x = 1
50+let x = 9
5151
52-let y = 7
52+let y = 1
5353
54-let z = 10
54+let z = 7
5555
56-let A = "%s__delay"
56+let A = 10
5757
58-func B (C,D) = fraction(toBigInt(C), c, toBigInt(D))
58+let B = 0
59+
60+func C (D,E) = fraction(toBigInt(D), c, toBigInt(E))
5961
6062
61-func E (F,G) = toInt(fraction(F, toBigInt(G), c))
63+func F (G,H) = toInt(fraction(G, toBigInt(H), c))
6264
6365
64-func H (I,J,K) = fraction(I, J, K)
66+func I (J,K,L) = fraction(J, K, L)
6567
6668
67-func L (F) = if ((d > F))
68- then -(F)
69- else F
69+func M (G) = if ((e > G))
70+ then -(G)
71+ else G
7072
7173
72-func M () = "%s__factoryContract"
74+func N () = "%s__factoryContract"
7375
7476
75-func N () = "%s__managerPublicKey"
77+func O () = "%s__managerPublicKey"
7678
7779
78-func O () = "%s__pendingManagerPublicKey"
80+func P () = "%s__pendingManagerPublicKey"
7981
8082
81-func P () = "%s%s__price__last"
83+func Q () = "%s%s__price__last"
8284
8385
84-func Q (R,S) = makeString(["%s%s%d%d__price__history", toString(R), toString(S)], i)
86+func R (S,T) = makeString(["%s%s%d%d__price__history", toString(S), toString(T)], j)
8587
8688
87-func T (U,V) = ((("%s%s%s__P__" + U) + "__") + V)
89+func U (V,W) = ((("%s%s%s__P__" + V) + "__") + W)
8890
8991
90-func W (U,V) = ((("%s%s%s__G__" + U) + "__") + V)
92+func X (V,W) = ((("%s%s%s__G__" + V) + "__") + W)
9193
9294
93-func X () = "%s__amountAsset"
95+func Y () = "%s__amountAsset"
9496
9597
96-func Y () = "%s__priceAsset"
98+func Z () = "%s__priceAsset"
9799
98100
99-func Z () = "%s__amp"
101+func aa () = "%s__amp"
100102
101103
102-func aa () = "%s__addonAddr"
104+func ab () = "%s__addonAddr"
103105
104106
105-func ab (ac) = makeString(["%s%s__lastGetOneTknCall", ac], i)
107+let ac = "%s__feePermille"
106108
107-
108-func ad (ac) = makeString(["%s%s__lastPutOneTknCall", ac], i)
109-
109+let ad = valueOrElse(getInteger(this, ac), B)
110110
111111 func ae () = "%s__factoryConfig"
112112
113113
114114 func af () = "%s%s__matcher__publicKey"
115115
116116
117117 func ag (ah,ai) = (((("%d%d%s__" + ah) + "__") + ai) + "__config")
118118
119119
120120 func aj (ak) = ("%s%s%s__mappings__baseAsset2internalId__" + ak)
121121
122122
123123 func al () = "%s__shutdown"
124124
125125
126126 func am (an) = throw(makeString(["lp_stable.ride:", an], " "))
127127
128128
129129 func ao (ap,aq,ar) = am(((((("Failed: ordValid=" + toString(ap)) + " sndrValid=") + toString(aq)) + " mtchrValid=") + toString(ar)))
130130
131131
132-func as (F) = {
133- let at = F
132+func as (G) = {
133+ let at = G
134134 if ($isInstanceOf(at, "String"))
135135 then {
136136 let au = at
137137 au
138138 }
139139 else am("fail cast to String")
140140 }
141141
142142
143143 func av (aw,ax) = valueOrErrorMessage(getString(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " not defined"], ""))
144144
145145
146146 func ay (aw,ax) = valueOrErrorMessage(getInteger(aw, ax), makeString(["mandatory ", toString(aw), ".", ax, " not defined"], ""))
147147
148148
149-let az = addressFromStringValue(av(this, M()))
149+let az = addressFromStringValue(av(this, N()))
150150
151-let aA = av(this, Z())
151+let aA = av(this, aa())
152152
153153 func aB () = valueOrElse(getBoolean(az, al()), false)
154154
155155
156156 func aC () = fromBase58String(av(az, af()))
157157
158158
159-func aD () = {
160- let aE = av(this, X())
159+let aD = addressFromPublicKey(aC())
160+
161+func aE () = {
161162 let aF = av(this, Y())
162- let aG = ay(az, aj(aF))
163- let ah = ay(az, aj(aE))
164- split(av(az, ag(toString(ah), toString(aG))), i)
163+ let aG = av(this, Z())
164+ let aH = ay(az, aj(aG))
165+ let ah = ay(az, aj(aF))
166+ split(av(az, ag(toString(ah), toString(aH))), j)
165167 }
166168
167169
168-func aH () = split(av(az, ae()), i)
170+func aI () = split(av(az, ae()), j)
169171
170172
171-func aI (aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(aJ), toString(aK), toString(aL), toString(aM), toString(aN), toString(aO), toString(aP), toString(aQ), toString(aR), toString(aS)], i)
173+func aJ (aK,aL,aM,aN,aO,aP,aQ,aR,aS,aT) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(aK), toString(aL), toString(aM), toString(aN), toString(aO), toString(aP), toString(aQ), toString(aR), toString(aS), toString(aT)], j)
172174
173175
174-func aT (aU,aV,aW,aM,aP,aQ) = makeString(["%d%d%d%d%d%d", toString(aU), toString(aV), toString(aW), toString(aM), toString(aP), toString(aQ)], i)
176+func aU (aV,aW,aX,aN,aQ,aR) = makeString(["%d%d%d%d%d%d", toString(aV), toString(aW), toString(aX), toString(aN), toString(aQ), toString(aR)], j)
175177
176178
177-func aX (aY) = if ((aY == "WAVES"))
179+func aY (aZ) = if ((aZ == "WAVES"))
178180 then wavesBalance(this).available
179- else assetBalance(this, fromBase58String(aY))
181+ else assetBalance(this, fromBase58String(aZ))
180182
181183
182-func aZ (ba,bb) = fraction(ba, c, bb)
184+func ba (bb,bc) = fraction(bb, c, bc)
183185
184186
185-func bc (bd,be,bf) = {
186- let bg = fraction((bd - be), b, be)
187- let bh = ((bf - L(bg)) > d)
188- if (!(bh))
189- then am(("Big slippage: " + toString(bg)))
190- else $Tuple2(bh, min([bd, be]))
187+func bd (be,bf,bg) = {
188+ let bh = fraction((be - bf), b, bf)
189+ let bi = ((bg - M(bh)) > e)
190+ if (!(bi))
191+ then am(("Big slippage: " + toString(bh)))
192+ else $Tuple2(bi, min([be, bf]))
191193 }
192194
193195
194-func bi (bj,bk,bf) = {
195- let bg = fraction(bk, b, bj)
196- let bl = (bf > bg)
197- if (if (bl)
196+func bj (bk,bl,bg) = {
197+ let bh = fraction(bl, b, bk)
198+ let bm = (bg > bh)
199+ if (if (bm)
198200 then true
199- else (bk > bj))
200- then am(((((((toString(bk) + " ") + toString(bj)) + " ") + toString(bg)) + " ") + toString(bf)))
201- else bl
201+ else (bl > bk))
202+ then am(((((((toString(bl) + " ") + toString(bk)) + " ") + toString(bh)) + " ") + toString(bg)))
203+ else bm
202204 }
203205
204206
205-func bm (bn,bo,bp,bq) = {
206- let br = B(bp, bn)
207- let bs = B(bq, bo)
208- aZ(bs, br)
207+func bn (bo,bp,bq,br) = {
208+ let bs = C(bq, bo)
209+ let bt = C(br, bp)
210+ ba(bt, bs)
209211 }
210212
211213
212-func bt (bp,bq,bu) = {
213- let bv = aD()
214- let bw = parseIntValue(bv[t])
215- let bx = parseIntValue(bv[u])
216- let by = bm(bw, bx, bp, bq)
217- let bb = B(bp, bw)
218- let ba = B(bq, bx)
219- let bz = B(bu, a)
220- let bA = aZ(bb, bz)
221- let bB = aZ(ba, bz)
222-[by, bA, bB]
214+func bu (bq,br,bv) = {
215+ let bw = aE()
216+ let bx = parseIntValue(bw[u])
217+ let by = parseIntValue(bw[v])
218+ let bz = bn(bx, by, bq, br)
219+ let bc = C(bq, bx)
220+ let bb = C(br, by)
221+ let bA = C(bv, a)
222+ let bB = ba(bc, bA)
223+ let bC = ba(bb, bA)
224+[bz, bB, bC]
223225 }
224226
225227
226-func bC (bp,bq,bu) = {
227- let bD = bt(bp, bq, bu)
228-[E(bD[0], a), E(bD[1], a), E(bD[2], a)]
228+func bD (bq,br,bv) = {
229+ let bE = bu(bq, br, bv)
230+[F(bE[0], a), F(bE[1], a), F(bE[2], a)]
229231 }
230232
231233
232-func bE (bF,bG,bH,bI) = {
233- let bv = aD()
234- let bJ = bv[q]
235- let bK = bv[r]
236- let bL = bv[s]
237- let bM = parseIntValue(bv[t])
238- let bN = parseIntValue(bv[u])
239- let bO = bv[p]
240- let bP = valueOrErrorMessage(assetInfo(fromBase58String(bJ)), "Wrong LP id").quantity
241- let bQ = if ((bJ == bG))
234+func bF (bG,bH,bI,bJ) = {
235+ let bw = aE()
236+ let bK = bw[r]
237+ let bL = bw[s]
238+ let bM = bw[t]
239+ let bN = parseIntValue(bw[u])
240+ let bO = parseIntValue(bw[v])
241+ let bP = bw[q]
242+ let bQ = valueOrErrorMessage(assetInfo(fromBase58String(bK)), "Wrong LP id").quantity
243+ let bR = if ((bK == bH))
242244 then true
243245 else am("Wrong payment asset")
244- if ((bQ == bQ))
246+ if ((bR == bR))
245247 then {
246- let bR = if ((bM >= bN))
247- then bM
248- else bN
249- if ((bR == bR))
248+ let bS = if ((bN >= bO))
249+ then bN
250+ else bO
251+ if ((bS == bS))
250252 then {
251- let bS = aX(bK)
252- let bT = B(bS, bR)
253- let bU = aX(bL)
254- let bV = B(bU, bR)
255- let bW = aZ(bV, bT)
256- let bX = E(bW, a)
257- let bY = B(bH, a)
258- let bZ = B(bP, a)
259- let ca = fraction(bT, bY, bZ)
260- let cb = fraction(bV, bY, bZ)
261- let cc = E(ca, bR)
262- let cd = E(cb, bR)
263- let ce = if ((bF == ""))
253+ let bT = aY(bL)
254+ let bU = C(bT, bS)
255+ let bV = aY(bM)
256+ let bW = C(bV, bS)
257+ let bX = ba(bW, bU)
258+ let bY = F(bX, a)
259+ let bZ = C(bI, a)
260+ let ca = C(bQ, a)
261+ let cb = fraction(bU, bZ, ca)
262+ let cc = fraction(bW, bZ, ca)
263+ let cd = F(cb, bS)
264+ let ce = F(cc, bS)
265+ let cf = if ((bG == ""))
264266 then nil
265- else [ScriptTransfer(bI, cc, if ((bK == "WAVES"))
267+ else [ScriptTransfer(bJ, cd, if ((bL == "WAVES"))
266268 then unit
267- else fromBase58String(bK)), ScriptTransfer(bI, cd, if ((bL == "WAVES"))
269+ else fromBase58String(bL)), ScriptTransfer(bJ, ce, if ((bM == "WAVES"))
268270 then unit
269- else fromBase58String(bL)), StringEntry(W(toString(bI), bF), aT(cc, cd, bH, bX, height, lastBlock.timestamp)), IntegerEntry(P(), bX), IntegerEntry(Q(height, lastBlock.timestamp), bX)]
270- $Tuple10(cc, cd, bK, bL, bS, bU, bP, bW, bO, ce)
271+ else fromBase58String(bM)), StringEntry(X(toString(bJ), bG), aU(cd, ce, bI, bY, height, lastBlock.timestamp)), IntegerEntry(Q(), bY), IntegerEntry(R(height, lastBlock.timestamp), bY)]
272+ $Tuple10(cd, ce, bL, bM, bT, bV, bQ, bX, bP, cf)
271273 }
272274 else throw("Strict value is not equal to itself.")
273275 }
274276 else throw("Strict value is not equal to itself.")
275277 }
276278
277279
278-func cf (bF,cg,ch,ci,cj,ck,bI,cl,cm,cn,co,cp) = {
279- let bv = aD()
280- let bJ = fromBase58String(bv[q])
281- let cq = bv[r]
282- let cr = bv[s]
283- let cs = bv[v]
284- let ct = bv[w]
285- let bM = parseIntValue(bv[t])
286- let bN = parseIntValue(bv[u])
287- let bO = bv[p]
288- let bP = valueOrErrorMessage(assetInfo(bJ), "Wrong lp asset").quantity
289- let bS = if (cl)
290- then aX(cq)
291- else if (if (cn)
292- then (cp == cq)
280+func cg (bG,ch,ci,cj,ck,cl,bJ,cm,cn,co,cp,cq) = {
281+ let bw = aE()
282+ let bK = fromBase58String(bw[r])
283+ let cr = bw[s]
284+ let cs = bw[t]
285+ let ct = bw[w]
286+ let cu = bw[x]
287+ let bN = parseIntValue(bw[u])
288+ let bO = parseIntValue(bw[v])
289+ let bP = bw[q]
290+ let bQ = valueOrErrorMessage(assetInfo(bK), "Wrong lp asset").quantity
291+ let bT = if (cm)
292+ then aY(cr)
293+ else if (if (co)
294+ then (cq == cr)
293295 else false)
294- then (aX(cq) - co)
295- else if (cn)
296- then aX(cq)
297- else (aX(cq) - ch)
298- let bU = if (cl)
299- then aX(cr)
300- else if (if (cn)
301- then (cp == cr)
296+ then (aY(cr) - cp)
297+ else if (co)
298+ then aY(cr)
299+ else (aY(cr) - ci)
300+ let bV = if (cm)
301+ then aY(cs)
302+ else if (if (co)
303+ then (cq == cs)
302304 else false)
303- then (aX(cr) - co)
304- else if (cn)
305- then aX(cr)
306- else (aX(cr) - cj)
307- let bR = if ((bM >= bN))
308- then bM
309- else bN
310- if ((bR == bR))
305+ then (aY(cs) - cp)
306+ else if (co)
307+ then aY(cs)
308+ else (aY(cs) - ck)
309+ let bS = if ((bN >= bO))
310+ then bN
311+ else bO
312+ if ((bS == bS))
311313 then {
312- let cu = B(ch, bR)
313- let cv = B(cj, bR)
314- let cw = aZ(cv, cu)
315- let bT = B(bS, bR)
316- let bV = B(bU, bR)
317- let cx = if ((bP == 0))
314+ let cv = C(ci, bS)
315+ let cw = C(ck, bS)
316+ let cx = ba(cw, cv)
317+ let bU = C(bT, bS)
318+ let bW = C(bV, bS)
319+ let cy = if ((bQ == 0))
318320 then {
319- let bW = d
320- let cy = d
321- let cz = pow((cu * cv), 0, toBigInt(5), 1, 0, DOWN)
322- $Tuple5(E(cz, a), E(cu, bR), E(cv, bR), aZ((bV + cv), (bT + cu)), cy)
321+ let bX = e
322+ let cz = e
323+ let cA = pow((cv * cw), 0, toBigInt(5), 1, 0, DOWN)
324+ $Tuple5(F(cA, a), F(cv, bS), F(cw, bS), ba((bW + cw), (bU + cv)), cz)
323325 }
324326 else {
325- let bW = aZ(bV, bT)
326- let cA = fraction(L((bW - cw)), c, bW)
327- let cy = B(cg, a)
328- let cB = if (((if ((bW != d))
329- then (cA > cy)
330- else false) == false))
331- then true
332- else am(((("Price slippage " + toString(cA)) + " > ") + toString(cy)))
333- if ((cB == cB))
334- then {
335- let bZ = B(bP, a)
336- let cC = fraction(cu, bW, c)
337- let cD = fraction(cv, c, bW)
338- let cE = if ((cC > cv))
339- then $Tuple2(cD, cu)
340- else $Tuple2(cu, cC)
327+ let bX = ba(bW, bU)
328+ let cB = fraction(M((bX - cx)), c, bX)
329+ let cz = C(ch, a)
330+ if (if ((bX != e))
331+ then (cB > cz)
332+ else false)
333+ then am(((("Price slippage " + toString(cB)) + " > ") + toString(cz)))
334+ else {
335+ let ca = C(bQ, a)
336+ let cC = fraction(cv, bX, c)
337+ let cD = fraction(cw, c, bX)
338+ let cE = if ((cC > cw))
339+ then $Tuple2(cD, cv)
340+ else $Tuple2(cv, cC)
341341 let cF = cE._1
342342 let cG = cE._2
343- let cz = fraction(bZ, cG, bV)
344- $Tuple5(E(cz, a), E(cF, bR), E(cG, bR), bW, cy)
343+ let cA = fraction(ca, cG, bW)
344+ $Tuple5(F(cA, a), F(cF, bS), F(cG, bS), bX, cz)
345345 }
346- else throw("Strict value is not equal to itself.")
347346 }
348- let cH = cx._1
349- let cI = cx._2
350- let cJ = cx._3
351- let cK = E(cx._4, a)
352- let cL = E(cx._5, a)
347+ let cH = cy._1
348+ let cI = cy._2
349+ let cJ = cy._3
350+ let cK = F(cy._4, a)
351+ let cL = F(cy._5, a)
353352 let cM = if ((cH > 0))
354353 then true
355354 else am("LP <= 0")
356355 if ((cM == cM))
357356 then {
358- let cN = if (!(cm))
357+ let cN = if (!(cn))
359358 then 0
360359 else cH
361- let cO = (ch - cI)
362- let cP = (cj - cJ)
363- let cQ = if (if (cn)
364- then (cp == cq)
360+ let cO = (ci - cI)
361+ let cP = (ck - cJ)
362+ let cQ = if (if (co)
363+ then (cq == cr)
365364 else false)
366- then $Tuple2(co, 0)
367- else if (if (cn)
368- then (cp == cr)
365+ then $Tuple2(cp, 0)
366+ else if (if (co)
367+ then (cq == cs)
369368 else false)
370- then $Tuple2(0, co)
369+ then $Tuple2(0, cp)
371370 else $Tuple2(cI, cJ)
372371 let cR = cQ._1
373372 let cS = cQ._2
374- let cT = [IntegerEntry(P(), cK), IntegerEntry(Q(height, lastBlock.timestamp), cK), StringEntry(T(bI, bF), aI(cR, cS, cN, cK, cg, cL, height, lastBlock.timestamp, cO, cP))]
375- $Tuple13(cH, cN, cK, bS, bU, bP, bJ, bO, cT, cO, cP, ci, ck)
373+ let cT = [IntegerEntry(Q(), cK), IntegerEntry(R(height, lastBlock.timestamp), cK), StringEntry(U(bJ, bG), aJ(cR, cS, cN, cK, ch, cL, height, lastBlock.timestamp, cO, cP))]
374+ $Tuple13(cH, cN, cK, bT, bV, bQ, bK, bP, cT, cO, cP, cj, cl)
376375 }
377376 else throw("Strict value is not equal to itself.")
378377 }
379378 else throw("Strict value is not equal to itself.")
380379 }
381380
382381
383382 func cU (cV) = {
384- let bv = aD()
385- let cW = bv[r]
386- let cX = bv[s]
387- let bO = parseIntValue(bv[p])
388- let bw = parseIntValue(bv[t])
389- let bx = parseIntValue(bv[u])
390- let cY = aX(cW)
391- let cZ = aX(cX)
392- let bW = if ((cV.orderType == Buy))
393- then bm(bw, bx, (cY + cV.amount), cZ)
394- else bm(bw, bx, (cY - cV.amount), cZ)
395- let bX = E(bW, a)
383+ let bw = aE()
384+ let cW = bw[s]
385+ let cX = bw[t]
386+ let bP = parseIntValue(bw[q])
387+ let bx = parseIntValue(bw[u])
388+ let by = parseIntValue(bw[v])
389+ let cY = aY(cW)
390+ let cZ = aY(cX)
391+ let bX = if ((cV.orderType == Buy))
392+ then bn(bx, by, (cY + cV.amount), cZ)
393+ else bn(bx, by, (cY - cV.amount), cZ)
394+ let bY = F(bX, a)
396395 if (if (if (aB())
397396 then true
398- else (bO == m))
397+ else (bP == n))
399398 then true
400- else (bO == n))
399+ else (bP == o))
401400 then am("Admin blocked")
402401 else {
403402 let da = cV.assetPair.amountAsset
404403 let db = if ((da == unit))
405404 then "WAVES"
406405 else toBase58String(value(da))
407406 let dc = cV.assetPair.priceAsset
408407 let dd = if ((dc == unit))
409408 then "WAVES"
410409 else toBase58String(value(dc))
411410 if (if ((db != cW))
412411 then true
413412 else (dd != cX))
414413 then am("Wr assets")
415414 else {
416415 let de = cV.price
417- let bN = fraction(a, bx, bw)
418- let df = H(de, a, bN)
416+ let bO = fraction(a, by, bx)
417+ let df = I(de, a, bO)
419418 let dg = if ((cV.orderType == Buy))
420- then (bX >= df)
421- else (df >= bX)
419+ then (bY >= df)
420+ else (df >= bY)
422421 true
423422 }
424423 }
425424 }
426425
427426
428427 func dh (di) = {
429428 let dj = if ((size(di.payments) == 1))
430429 then true
431430 else am("1 payment expected")
432431 if ((dj == dj))
433432 then {
434433 let dk = value(di.payments[0])
435- let bG = value(dk.assetId)
436- let co = dk.amount
437- let cx = bE(toBase58String(di.transactionId), toBase58String(bG), co, di.caller)
438- let cc = cx._1
439- let cd = cx._2
440- let bO = parseIntValue(cx._9)
441- let ce = cx._10
434+ let bH = value(dk.assetId)
435+ let cp = dk.amount
436+ let cy = bF(toBase58String(di.transactionId), toBase58String(bH), cp, di.caller)
437+ let cd = cy._1
438+ let ce = cy._2
439+ let bP = parseIntValue(cy._9)
440+ let cf = cy._10
442441 if (if (aB())
443442 then true
444- else (bO == n))
445- then am(("Admin blocked: " + toString(bO)))
446- else $Tuple5(cc, cd, co, bG, ce)
443+ else (bP == o))
444+ then am(("Admin blocked: " + toString(bP)))
445+ else $Tuple5(cd, ce, cp, bH, cf)
447446 }
448447 else throw("Strict value is not equal to itself.")
449448 }
450449
451450
452-func dl (ac,V,dm,dn,bf,cm,cn,co,cp) = {
453- let cx = cf(V, bf, value(dm).amount, value(dm).assetId, value(dn).amount, value(dn).assetId, ac, false, cm, cn, co, cp)
454- let bO = parseIntValue(cx._8)
451+func dl (dm,W,dn,do,bg,cn,co,cp,cq) = {
452+ let cy = cg(W, bg, value(dn).amount, value(dn).assetId, value(do).amount, value(do).assetId, dm, false, cn, co, cp, cq)
453+ let bP = parseIntValue(cy._8)
455454 if (if (if (aB())
456455 then true
457- else (bO == l))
456+ else (bP == m))
458457 then true
459- else (bO == n))
460- then am(("Blocked:" + toString(bO)))
461- else cx
458+ else (bP == o))
459+ then am(("Blocked:" + toString(bP)))
460+ else cy
462461 }
463462
464463
465-func do () = {
466- let at = getString(N())
464+func dp (dq) = {
465+ let dr = fraction(dq, ad, d)
466+ $Tuple2((dq - dr), dr)
467+ }
468+
469+
470+func ds () = {
471+ let at = getString(O())
467472 if ($isInstanceOf(at, "String"))
468473 then {
469- let dp = at
470- fromBase58String(dp)
474+ let dt = at
475+ fromBase58String(dt)
471476 }
472477 else if ($isInstanceOf(at, "Unit"))
473478 then unit
474479 else throw("Match error")
475480 }
476481
477482
478-func dq () = {
479- let at = getString(O())
483+func du () = {
484+ let at = getString(P())
480485 if ($isInstanceOf(at, "String"))
481486 then {
482- let dp = at
483- fromBase58String(dp)
487+ let dt = at
488+ fromBase58String(dt)
484489 }
485490 else if ($isInstanceOf(at, "Unit"))
486491 then unit
487492 else throw("Match error")
488493 }
489494
490495
491-let dr = am("Permission denied")
496+let dv = am("Permission denied")
492497
493-func ds (di) = {
494- let at = do()
498+func dw (di) = {
499+ let at = ds()
495500 if ($isInstanceOf(at, "ByteVector"))
496501 then {
497- let dt = at
498- if ((di.callerPublicKey == dt))
502+ let dx = at
503+ if ((di.callerPublicKey == dx))
499504 then true
500- else dr
505+ else dv
501506 }
502507 else if ($isInstanceOf(at, "Unit"))
503508 then if ((di.caller == this))
504509 then true
505- else dr
510+ else dv
506511 else throw("Match error")
507512 }
508513
509514
510515 @Callable(di)
511516 func constructor (az) = {
512- let du = ds(di)
513- if ((du == du))
514- then [StringEntry(M(), az)]
517+ let dy = dw(di)
518+ if ((dy == dy))
519+ then [StringEntry(N(), az)]
515520 else throw("Strict value is not equal to itself.")
516521 }
517522
518523
519524
520525 @Callable(di)
521-func setManager (dv) = {
522- let du = ds(di)
523- if ((du == du))
526+func setManager (dz) = {
527+ let dy = dw(di)
528+ if ((dy == dy))
524529 then {
525- let dw = fromBase58String(dv)
526- if ((dw == dw))
527- then [StringEntry(O(), dv)]
530+ let dA = fromBase58String(dz)
531+ if ((dA == dA))
532+ then [StringEntry(P(), dz)]
528533 else throw("Strict value is not equal to itself.")
529534 }
530535 else throw("Strict value is not equal to itself.")
531536 }
532537
533538
534539
535540 @Callable(di)
536541 func confirmManager () = {
537- let dx = dq()
538- let dy = if (isDefined(dx))
542+ let dB = du()
543+ let dC = if (isDefined(dB))
539544 then true
540545 else am("No pending manager")
541- if ((dy == dy))
546+ if ((dC == dC))
542547 then {
543- let dz = if ((di.callerPublicKey == value(dx)))
548+ let dD = if ((di.callerPublicKey == value(dB)))
544549 then true
545550 else am("You are not pending manager")
546- if ((dz == dz))
547- then [StringEntry(N(), toBase58String(value(dx))), DeleteEntry(O())]
551+ if ((dD == dD))
552+ then [StringEntry(O(), toBase58String(value(dB))), DeleteEntry(P())]
548553 else throw("Strict value is not equal to itself.")
549554 }
550555 else throw("Strict value is not equal to itself.")
551556 }
552557
553558
554559
555560 @Callable(di)
556-func put (bf,dA) = {
557- let dB = aH()
558- let dC = valueOrErrorMessage(addressFromString(dB[x]), "Wrong staking contract")
559- let dD = valueOrErrorMessage(addressFromString(dB[y]), "Wrogn slippage contract")
560- let dE = if ((bf >= 0))
561+func put (bg,dE) = {
562+ let dF = aI()
563+ let dG = valueOrErrorMessage(addressFromString(dF[y]), "Wrong staking contract")
564+ let dH = valueOrErrorMessage(addressFromString(dF[z]), "Wrogn slippage contract")
565+ let dI = if ((bg >= 0))
561566 then true
562567 else am("wrong slippage")
563- if ((dE == dE))
568+ if ((dI == dI))
564569 then {
565- let dF = if ((size(di.payments) == 2))
570+ let dJ = if ((size(di.payments) == 2))
566571 then true
567572 else am("2 payments expected")
568- if ((dF == dF))
573+ if ((dJ == dJ))
569574 then {
570- let dG = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(value(di.payments[0]).assetId, value(di.payments[0]).amount), di.payments[1], bf, true, false, 0, "")
571- let cN = dG._2
572- let bJ = dG._7
573- let ce = dG._9
574- let cO = dG._10
575- let cP = dG._11
576- let bK = dG._12
577- let bL = dG._13
578- let cx = invoke(az, "emit", [cN], nil)
579- if ((cx == cx))
575+ let dK = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(value(di.payments[0]).assetId, value(di.payments[0]).amount), di.payments[1], bg, true, false, 0, "")
576+ let cN = dK._2
577+ let bK = dK._7
578+ let cf = dK._9
579+ let cO = dK._10
580+ let cP = dK._11
581+ let bL = dK._12
582+ let bM = dK._13
583+ let cy = invoke(az, "emit", [cN], nil)
584+ if ((cy == cy))
580585 then {
581- let dH = {
582- let at = cx
586+ let dL = {
587+ let at = cy
583588 if ($isInstanceOf(at, "Address"))
584589 then {
585- let dI = at
586- invoke(dI, "emit", [cN], nil)
590+ let dM = at
591+ invoke(dM, "emit", [cN], nil)
587592 }
588593 else unit
589594 }
590- if ((dH == dH))
595+ if ((dL == dL))
591596 then {
592- let dJ = if ((cO > 0))
593- then invoke(dD, "put", nil, [AttachedPayment(bK, cO)])
597+ let dN = if ((cO > 0))
598+ then invoke(dH, "put", nil, [AttachedPayment(bL, cO)])
594599 else nil
595- if ((dJ == dJ))
600+ if ((dN == dN))
596601 then {
597- let dK = if ((cP > 0))
598- then invoke(dD, "put", nil, [AttachedPayment(bL, cP)])
602+ let dO = if ((cP > 0))
603+ then invoke(dH, "put", nil, [AttachedPayment(bM, cP)])
599604 else nil
600- if ((dK == dK))
605+ if ((dO == dO))
601606 then {
602- let dL = if (dA)
607+ let dP = if (dE)
603608 then {
604- let dM = invoke(dC, "stake", nil, [AttachedPayment(bJ, cN)])
605- if ((dM == dM))
609+ let dQ = invoke(dG, "stake", nil, [AttachedPayment(bK, cN)])
610+ if ((dQ == dQ))
606611 then nil
607612 else throw("Strict value is not equal to itself.")
608613 }
609- else [ScriptTransfer(di.caller, cN, bJ)]
610- (ce ++ dL)
614+ else [ScriptTransfer(di.caller, cN, bK)]
615+ (cf ++ dP)
611616 }
612617 else throw("Strict value is not equal to itself.")
613618 }
614619 else throw("Strict value is not equal to itself.")
615620 }
616621 else throw("Strict value is not equal to itself.")
617622 }
618623 else throw("Strict value is not equal to itself.")
619624 }
620625 else throw("Strict value is not equal to itself.")
621626 }
622627 else throw("Strict value is not equal to itself.")
623628 }
624629
625630
626631
627632 @Callable(di)
628-func putOneTkn (dN,dO,be,bf,dA) = {
629- let bv = aH()
630- let dC = valueOrErrorMessage(addressFromString(bv[x]), "Wrong staking contract")
631- let dD = valueOrErrorMessage(addressFromString(bv[y]), "Wrong slippage contract")
632- let dP = valueOrErrorMessage(addressFromString(bv[z]), "Wrong gwx reward contract")
633- let dQ = aD()
634- let bK = dQ[r]
635- let bL = dQ[s]
636- let bM = parseIntValue(dQ[t])
637- let bN = parseIntValue(dQ[u])
638- let dR = valueOrElse(getString(this, aa()), "")
639- let bI = if ((dR == toString(di.caller)))
633+func putOneTkn (dR,dS,bf,bg,dE) = {
634+ let bw = aI()
635+ let dG = valueOrErrorMessage(addressFromString(bw[y]), "Wrong staking contract")
636+ let dH = valueOrErrorMessage(addressFromString(bw[z]), "Wrong slippage contract")
637+ let dT = valueOrErrorMessage(addressFromString(bw[A]), "Wrong gwx reward contract")
638+ let dU = aE()
639+ let bL = dU[s]
640+ let bM = dU[t]
641+ let bN = parseIntValue(dU[u])
642+ let bO = parseIntValue(dU[v])
643+ let dV = valueOrElse(getString(this, ab()), "")
644+ let bJ = if ((dV == toString(di.caller)))
640645 then di.originCaller
641646 else di.caller
642- let dS = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid")
643- let dT = reentrantInvoke(dS, "ensureCanPutOneTkn", [toString(bI)], nil)
644- if ((dT == dT))
645- then if (if (if (if ((0 >= bf))
646- then true
647- else (0 >= dN))
648- then true
649- else (0 >= dO))
650- then true
651- else (0 >= be))
652- then am("Wrong params")
653- else if ((size(di.payments) != 1))
654- then am("1 payment expected")
655- else {
656- let dk = value(di.payments[0])
657- let bG = toBase58String(value(dk.assetId))
658- let co = dk.amount
659- if (if (if ((dN > co))
660- then true
661- else (dO > co))
662- then true
663- else (10000000 > co))
664- then am("wrong payment amount")
665- else {
666- let bS = aX(bK)
667- let bU = aX(bL)
668- let dU = if ((bG == bK))
669- then $Tuple6((bS - co), bU, (co - dN), dO, 0, 0)
670- else if ((bG == bL))
671- then $Tuple6(bS, (bU - co), 0, 0, (co - dO), dN)
672- else am("wrong paymentAssetId")
673- let dV = dU._1
674- let dW = dU._2
675- let dX = dU._3
676- let dY = dU._4
677- let dZ = dU._5
678- let ea = dU._6
679- let bk = invoke(dP, "calcD", [toString(dV), toString(dW), aA, g, h], nil)
680- let bj = invoke(dP, "calcD", [toString(toBigInt(((dV + dX) - ea))), toString(toBigInt(((dW + dZ) - dY))), aA, g, h], nil)
681- let eb = bi(parseBigIntValue(as(bj)), parseBigIntValue(as(bk)), f)
682- if ((eb == eb))
683- then {
684- let dG = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(fromBase58String(bK), dN), AttachedPayment(fromBase58String(bL), dO), bf, true, true, co, bG)
685- let bd = dG._2
686- let bJ = dG._7
687- let ce = dG._9
688- let cO = dG._10
689- let cP = dG._11
690- let ec = bc(toBigInt(bd), toBigInt(be), toBigInt(bf))
691- let cN = toInt(ec._2)
692- let ed = invoke(az, "emit", [cN], nil)
693- if ((ed == ed))
694- then {
695- let dH = {
696- let at = ed
697- if ($isInstanceOf(at, "Address"))
647+ if (if (if (if ((0 >= bg))
648+ then true
649+ else (0 >= dR))
650+ then true
651+ else (0 >= dS))
652+ then true
653+ else (0 >= bf))
654+ then am("Wrong params")
655+ else if ((size(di.payments) != 1))
656+ then am("1 payment expected")
657+ else {
658+ let dk = value(di.payments[0])
659+ let bH = toBase58String(value(dk.assetId))
660+ let dW = dk.amount
661+ let dX = dp(dW)
662+ let cp = dX._1
663+ let dY = dX._2
664+ if (if (if ((dR > cp))
665+ then true
666+ else (dS > cp))
667+ then true
668+ else (10000000 > cp))
669+ then am("wrong payment amount")
670+ else {
671+ let bT = aY(bL)
672+ let bV = aY(bM)
673+ let dZ = if ((bH == bL))
674+ then $Tuple6((bT - cp), bV, (cp - dR), dS, 0, 0)
675+ else if ((bH == bM))
676+ then $Tuple6(bT, (bV - cp), 0, 0, (cp - dS), dR)
677+ else am("wrong paymentAssetId")
678+ let ea = dZ._1
679+ let eb = dZ._2
680+ let ec = dZ._3
681+ let ed = dZ._4
682+ let ee = dZ._5
683+ let ef = dZ._6
684+ let bl = invoke(dT, "calcD", [toString(ea), toString(eb), aA, h, i], nil)
685+ let bk = invoke(dT, "calcD", [toString(toBigInt(((ea + ec) - ef))), toString(toBigInt(((eb + ee) - ed))), aA, h, i], nil)
686+ let eg = bj(parseBigIntValue(as(bk)), parseBigIntValue(as(bl)), g)
687+ if ((eg == eg))
688+ then {
689+ let dK = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(fromBase58String(bL), dR), AttachedPayment(fromBase58String(bM), dS), bg, true, true, cp, bH)
690+ let be = dK._2
691+ let bK = dK._7
692+ let cf = dK._9
693+ let cO = dK._10
694+ let cP = dK._11
695+ let eh = bd(toBigInt(be), toBigInt(bf), toBigInt(bg))
696+ let cN = toInt(eh._2)
697+ let ei = invoke(az, "emit", [cN], nil)
698+ if ((ei == ei))
699+ then {
700+ let dL = {
701+ let at = ei
702+ if ($isInstanceOf(at, "Address"))
703+ then {
704+ let dM = at
705+ invoke(dM, "emit", [cN], nil)
706+ }
707+ else unit
708+ }
709+ if ((dL == dL))
710+ then {
711+ let dN = if ((cO > 0))
712+ then invoke(dH, "put", nil, [AttachedPayment(fromBase58String(bL), cO)])
713+ else nil
714+ if ((dN == dN))
698715 then {
699- let dI = at
700- invoke(dI, "emit", [cN], nil)
716+ let dO = if ((cP > 0))
717+ then invoke(dH, "put", nil, [AttachedPayment(fromBase58String(bM), cP)])
718+ else nil
719+ if ((dO == dO))
720+ then {
721+ let dP = if (dE)
722+ then {
723+ let dQ = invoke(dG, "stake", nil, [AttachedPayment(bK, cN)])
724+ if ((dQ == dQ))
725+ then nil
726+ else throw("Strict value is not equal to itself.")
727+ }
728+ else [ScriptTransfer(di.caller, cN, bK)]
729+ let ej = if ((dY > 0))
730+ then [ScriptTransfer(aD, dY, fromBase58String(bH))]
731+ else nil
732+ ((cf ++ dP) ++ ej)
733+ }
734+ else throw("Strict value is not equal to itself.")
701735 }
702- else unit
736+ else throw("Strict value is not equal to itself.")
703737 }
704- if ((dH == dH))
705- then {
706- let dJ = if ((cO > 0))
707- then invoke(dD, "put", nil, [AttachedPayment(fromBase58String(bK), cO)])
708- else nil
709- if ((dJ == dJ))
710- then {
711- let dK = if ((cP > 0))
712- then invoke(dD, "put", nil, [AttachedPayment(fromBase58String(bL), cP)])
713- else nil
714- if ((dK == dK))
715- then {
716- let dL = if (dA)
717- then {
718- let dM = invoke(dC, "stake", nil, [AttachedPayment(bJ, cN)])
719- if ((dM == dM))
720- then nil
721- else throw("Strict value is not equal to itself.")
722- }
723- else [ScriptTransfer(di.caller, cN, bJ)]
724- (ce ++ dL)
725- }
726- else throw("Strict value is not equal to itself.")
727- }
728- else throw("Strict value is not equal to itself.")
729- }
730- else throw("Strict value is not equal to itself.")
731- }
732- else throw("Strict value is not equal to itself.")
733- }
734- else throw("Strict value is not equal to itself.")
735- }
736- }
738+ else throw("Strict value is not equal to itself.")
739+ }
740+ else throw("Strict value is not equal to itself.")
741+ }
742+ else throw("Strict value is not equal to itself.")
743+ }
744+ }
745+ }
746+
747+
748+
749+@Callable(di)
750+func putForFree (ek) = if ((0 > ek))
751+ then am("wrong slippage")
752+ else if ((size(di.payments) != 2))
753+ then am("2 payments expected")
754+ else {
755+ let dK = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(value(di.payments[0]).assetId, value(di.payments[0]).amount), di.payments[1], ek, false, false, 0, "")
756+ dK._9
757+ }
758+
759+
760+
761+@Callable(di)
762+func get () = {
763+ let cy = dh(di)
764+ let el = cy._1
765+ let ce = cy._2
766+ let cp = cy._3
767+ let bH = cy._4
768+ let cf = cy._5
769+ let em = invoke(az, "burn", [cp], [AttachedPayment(bH, cp)])
770+ if ((em == em))
771+ then cf
737772 else throw("Strict value is not equal to itself.")
738773 }
739774
740775
741776
742777 @Callable(di)
743-func putForFree (ee) = if ((0 > ee))
744- then am("wrong slippage")
745- else if ((size(di.payments) != 2))
746- then am("2 payments expected")
747- else {
748- let dG = dl(toString(di.caller), toBase58String(di.transactionId), AttachedPayment(value(di.payments[0]).assetId, value(di.payments[0]).amount), di.payments[1], ee, false, false, 0, "")
749- dG._9
750- }
751-
752-
753-
754-@Callable(di)
755-func get () = {
756- let cx = dh(di)
757- let ef = cx._1
758- let cd = cx._2
759- let co = cx._3
760- let bG = cx._4
761- let ce = cx._5
762- let eg = invoke(az, "burn", [co], [AttachedPayment(bG, co)])
763- if ((eg == eg))
764- then ce
765- else throw("Strict value is not equal to itself.")
766- }
767-
768-
769-
770-@Callable(di)
771-func getOneTkn (eh,ei,ej,ek,bf) = if ((size(di.payments) != 1))
778+func getOneTkn (en,eo,ep,eq,bg) = if ((size(di.payments) != 1))
772779 then am("1 payment expected")
773780 else {
774- let bv = aD()
775- let bJ = bv[q]
776- let bK = bv[r]
777- let bL = bv[s]
778- let bM = parseIntValue(bv[t])
779- let bN = parseIntValue(bv[u])
780- let bO = bv[p]
781- let dB = aH()
782- let dP = valueOrErrorMessage(addressFromString(dB[z]), "Wrong gwxRewardContract address")
781+ let bw = aE()
782+ let bK = bw[r]
783+ let bL = bw[s]
784+ let bM = bw[t]
785+ let bN = parseIntValue(bw[u])
786+ let bO = parseIntValue(bw[v])
787+ let bP = bw[q]
788+ let dF = aI()
789+ let dT = valueOrErrorMessage(addressFromString(dF[A]), "Wrong gwxRewardContract address")
783790 let dk = value(di.payments[0])
784- let dR = valueOrElse(getString(this, aa()), "")
785- let bI = if ((dR == toString(di.caller)))
791+ let dV = valueOrElse(getString(this, ab()), "")
792+ let bJ = if ((dV == toString(di.caller)))
786793 then di.originCaller
787794 else di.caller
788- let bF = toBase58String(di.transactionId)
789- let bG = value(dk.assetId)
790- let co = dk.amount
791- let dS = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid")
792- let dT = reentrantInvoke(dS, "ensureCanGetOneTkn", [toString(bI)], nil)
793- if ((dT == dT))
794- then if ((1000000000 > co))
795- then am("Min payment 10 LP")
796- else if (if (if ((0 > bf))
797- then true
798- else (0 > eh))
799- then true
800- else (0 > ej))
801- then am("Wrong params")
802- else if ((bJ != toBase58String(bG)))
803- then am("Wrong LP")
804- else {
805- let cx = bE(toBase58String(di.transactionId), toBase58String(bG), co, di.caller)
806- let el = cx._1
807- let em = cx._2
808- let bS = aX(bK)
809- let bU = aX(bL)
810- let en = if ((ek == bK))
811- then $Tuple7((bS - el), (bU - em), eh, em, 0, 0, (el + eh))
812- else if ((ek == bL))
813- then $Tuple7((bS - el), (bU - em), 0, 0, eh, el, (em + eh))
814- else am("wrong outAssetId")
815- let dV = en._1
816- let dW = en._2
817- let dX = en._3
818- let dY = en._4
819- let dZ = en._5
820- let ea = en._6
821- let eo = en._7
822- if (if ((0 > dX))
823- then true
824- else (0 > dZ))
825- then am("Wrong calc")
826- else {
827- let bk = invoke(dP, "calcD", [toString(dV), toString(dW), aA, g, h], nil)
828- let bj = invoke(dP, "calcD", [toString(((dV - dX) + ea)), toString(((dW + dY) - dZ)), aA, g, h], nil)
829- let eb = bi(parseBigIntValue(as(bj)), parseBigIntValue(as(bk)), f)
830- if ((eb == eb))
831- then {
832- let ep = bc(toBigInt(eo), toBigInt(ej), toBigInt(bf))
833- if ((ep == ep))
834- then {
835- let eq = if ((ek == bK))
836- then $Tuple2(toInt(ep._2), 0)
837- else $Tuple2(0, toInt(ep._2))
838- let er = eq._1
839- let es = eq._2
840- let bR = if ((bM >= bN))
841- then bM
842- else bN
843- if ((bR == bR))
844- then {
845- let et = aZ(B(bU, bR), B(bS, bR))
846- let eu = E(et, a)
847- let ce = [ScriptTransfer(bI, (er + es), if ((ek == "WAVES"))
848- then unit
849- else fromBase58String(ek)), StringEntry(W(toString(bI), bF), aT(er, es, co, eu, height, lastBlock.timestamp)), IntegerEntry(P(), eu), IntegerEntry(Q(height, lastBlock.timestamp), eu)]
850- if ((ce == ce))
851- then {
852- let ev = invoke(az, "burn", [co], [AttachedPayment(bG, co)])
853- if ((ev == ev))
854- then ce
855- else throw("Strict value is not equal to itself.")
856- }
857- else throw("Strict value is not equal to itself.")
858- }
859- else throw("Strict value is not equal to itself.")
860- }
861- else throw("Strict value is not equal to itself.")
862- }
863- else throw("Strict value is not equal to itself.")
864- }
865- }
866- else throw("Strict value is not equal to itself.")
795+ let bG = toBase58String(di.transactionId)
796+ let bH = value(dk.assetId)
797+ let cp = dk.amount
798+ if ((1000000000 > cp))
799+ then am("Min payment 10 LP")
800+ else if (if (if ((0 > bg))
801+ then true
802+ else (0 > en))
803+ then true
804+ else (0 > ep))
805+ then am("Wrong params")
806+ else if ((bK != toBase58String(bH)))
807+ then am("Wrong LP")
808+ else {
809+ let cy = bF(toBase58String(di.transactionId), toBase58String(bH), cp, di.caller)
810+ let er = cy._1
811+ let es = cy._2
812+ let bT = aY(bL)
813+ let bV = aY(bM)
814+ let et = if ((eq == bL))
815+ then $Tuple7((bT - er), (bV - es), en, es, 0, 0, (er + en))
816+ else if ((eq == bM))
817+ then $Tuple7((bT - er), (bV - es), 0, 0, en, er, (es + en))
818+ else am("wrong outAssetId")
819+ let ea = et._1
820+ let eb = et._2
821+ let ec = et._3
822+ let ed = et._4
823+ let ee = et._5
824+ let ef = et._6
825+ let eu = et._7
826+ if (if ((0 > ec))
827+ then true
828+ else (0 > ee))
829+ then am("Wrong calc")
830+ else {
831+ let bl = invoke(dT, "calcD", [toString(ea), toString(eb), aA, h, i], nil)
832+ let bk = invoke(dT, "calcD", [toString(((ea - ec) + ef)), toString(((eb + ed) - ee)), aA, h, i], nil)
833+ let eg = bj(parseBigIntValue(as(bk)), parseBigIntValue(as(bl)), g)
834+ if ((eg == eg))
835+ then {
836+ let ev = bd(toBigInt(eu), toBigInt(ep), toBigInt(bg))
837+ if ((ev == ev))
838+ then {
839+ let ew = if ((eq == bL))
840+ then $Tuple2(toInt(ev._2), 0)
841+ else $Tuple2(0, toInt(ev._2))
842+ let ex = ew._1
843+ let ey = ew._2
844+ let ez = (ex + ey)
845+ let eA = dp(ez)
846+ let eB = eA._1
847+ let dY = eA._2
848+ let eC = if ((eq == "WAVES"))
849+ then unit
850+ else fromBase58String(eq)
851+ let ej = if ((dY > 0))
852+ then [ScriptTransfer(aD, dY, eC)]
853+ else nil
854+ let bS = if ((bN >= bO))
855+ then bN
856+ else bO
857+ if ((bS == bS))
858+ then {
859+ let eD = ba(C(bV, bS), C(bT, bS))
860+ let eE = F(eD, a)
861+ let cf = [ScriptTransfer(bJ, eB, eC), StringEntry(X(toString(bJ), bG), aU(ex, ey, cp, eE, height, lastBlock.timestamp)), IntegerEntry(Q(), eE), IntegerEntry(R(height, lastBlock.timestamp), eE)]
862+ if ((cf == cf))
863+ then {
864+ let eF = invoke(az, "burn", [cp], [AttachedPayment(bH, cp)])
865+ if ((eF == eF))
866+ then (cf ++ ej)
867+ else throw("Strict value is not equal to itself.")
868+ }
869+ else throw("Strict value is not equal to itself.")
870+ }
871+ else throw("Strict value is not equal to itself.")
872+ }
873+ else throw("Strict value is not equal to itself.")
874+ }
875+ else throw("Strict value is not equal to itself.")
876+ }
877+ }
867878 }
868879
869880
870881
871882 @Callable(di)
872-func getNoLess (ew,ex) = {
873- let cx = dh(di)
874- let cc = cx._1
875- let cd = cx._2
876- let co = cx._3
877- let bG = cx._4
878- let ce = cx._5
879- let ey = if ((cc >= ew))
883+func getNoLess (eG,eH) = {
884+ let cy = dh(di)
885+ let cd = cy._1
886+ let ce = cy._2
887+ let cp = cy._3
888+ let bH = cy._4
889+ let cf = cy._5
890+ let eI = if ((cd >= eG))
880891 then true
881- else am(((("Failed: " + toString(cc)) + " < ") + toString(ew)))
882- if ((ey == ey))
892+ else am(((("Failed: " + toString(cd)) + " < ") + toString(eG)))
893+ if ((eI == eI))
883894 then {
884- let ez = if ((cd >= ex))
895+ let eJ = if ((ce >= eH))
885896 then true
886- else am(((("Failed: " + toString(cd)) + " < ") + toString(ex)))
887- if ((ez == ez))
897+ else am(((("Failed: " + toString(ce)) + " < ") + toString(eH)))
898+ if ((eJ == eJ))
888899 then {
889- let eA = invoke(az, "burn", [co], [AttachedPayment(bG, co)])
890- if ((eA == eA))
891- then ce
900+ let eK = invoke(az, "burn", [cp], [AttachedPayment(bH, cp)])
901+ if ((eK == eK))
902+ then cf
892903 else throw("Strict value is not equal to itself.")
893904 }
894905 else throw("Strict value is not equal to itself.")
895906 }
896907 else throw("Strict value is not equal to itself.")
897908 }
898909
899910
900911
901912 @Callable(di)
902-func unstakeAndGet (eB) = {
913+func unstakeAndGet (dq) = {
903914 let dj = if ((size(di.payments) != 0))
904915 then am("no payments expected")
905916 else true
906917 if ((dj == dj))
907918 then {
908- let bv = aD()
909- let eC = aH()
910- let bJ = fromBase58String(bv[q])
911- let eD = valueOrErrorMessage(addressFromString(eC[x]), "wrong")
912- let eE = invoke(eD, "unstake", [toBase58String(bJ), eB], nil)
913- if ((eE == eE))
919+ let bw = aE()
920+ let eL = aI()
921+ let bK = fromBase58String(bw[r])
922+ let eM = valueOrErrorMessage(addressFromString(eL[y]), "wrong")
923+ let eN = invoke(eM, "unstake", [toBase58String(bK), dq], nil)
924+ if ((eN == eN))
914925 then {
915- let cx = bE(toBase58String(di.transactionId), toBase58String(bJ), eB, di.caller)
916- let bO = parseIntValue(cx._9)
917- let ce = cx._10
918- let eF = if (if (aB())
926+ let cy = bF(toBase58String(di.transactionId), toBase58String(bK), dq, di.caller)
927+ let bP = parseIntValue(cy._9)
928+ let cf = cy._10
929+ let eO = if (if (aB())
919930 then true
920- else (bO == n))
921- then am(("Blocked: " + toString(bO)))
931+ else (bP == o))
932+ then am(("Blocked: " + toString(bP)))
922933 else true
923- if ((eF == eF))
934+ if ((eO == eO))
924935 then {
925- let eG = invoke(az, "burn", [eB], [AttachedPayment(bJ, eB)])
926- if ((eG == eG))
927- then ce
936+ let eP = invoke(az, "burn", [dq], [AttachedPayment(bK, dq)])
937+ if ((eP == eP))
938+ then cf
928939 else throw("Strict value is not equal to itself.")
929940 }
930941 else throw("Strict value is not equal to itself.")
931942 }
932943 else throw("Strict value is not equal to itself.")
933944 }
934945 else throw("Strict value is not equal to itself.")
935946 }
936947
937948
938949
939950 @Callable(di)
940-func activate (eH,eI) = if ((toString(di.caller) != toString(az)))
951+func activate (eQ,eR) = if ((toString(di.caller) != toString(az)))
941952 then am("denied")
942- else $Tuple2([StringEntry(X(), eH), StringEntry(Y(), eI)], "success")
953+ else $Tuple2([StringEntry(Y(), eQ), StringEntry(Z(), eR)], "success")
943954
944955
945956
946957 @Callable(di)
947-func setS (eJ,eF) = if ((toString(di.caller) != av(this, aa())))
948- then dr
949- else [StringEntry(eJ, eF)]
958+func setS (eS,eO) = if ((toString(di.caller) != av(this, ab())))
959+ then dv
960+ else [StringEntry(eS, eO)]
950961
951962
952963
953964 @Callable(di)
954-func setI (eJ,eF) = if ((toString(di.caller) != av(this, aa())))
955- then dr
956- else [IntegerEntry(eJ, eF)]
965+func setI (eS,eO) = if ((toString(di.caller) != av(this, ab())))
966+ then dv
967+ else [IntegerEntry(eS, eO)]
957968
958969
959970
960971 @Callable(di)
961-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aD())
972+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aE())
962973
963974
964975
965976 @Callable(di)
966-func getAccBalanceWrapperREADONLY (aY) = $Tuple2(nil, aX(aY))
977+func getAccBalanceWrapperREADONLY (aZ) = $Tuple2(nil, aY(aZ))
967978
968979
969980
970981 @Callable(di)
971-func calcPricesWrapperREADONLY (bp,bq,bu) = {
972- let eK = bt(bp, bq, bu)
973- $Tuple2(nil, [toString(eK[0]), toString(eK[1]), toString(eK[2])])
982+func calcPricesWrapperREADONLY (bq,br,bv) = {
983+ let eT = bu(bq, br, bv)
984+ $Tuple2(nil, [toString(eT[0]), toString(eT[1]), toString(eT[2])])
974985 }
975986
976987
977988
978989 @Callable(di)
979-func fromX18WrapperREADONLY (F,eL) = $Tuple2(nil, E(parseBigIntValue(F), eL))
990+func fromX18WrapperREADONLY (G,eU) = $Tuple2(nil, F(parseBigIntValue(G), eU))
980991
981992
982993
983994 @Callable(di)
984-func toX18WrapperREADONLY (C,D) = $Tuple2(nil, toString(B(C, D)))
995+func toX18WrapperREADONLY (D,E) = $Tuple2(nil, toString(C(D, E)))
985996
986997
987998
988999 @Callable(di)
989-func calcPriceBigIntWrapperREADONLY (ba,bb) = $Tuple2(nil, toString(aZ(parseBigIntValue(ba), parseBigIntValue(bb))))
1000+func calcPriceBigIntWrapperREADONLY (bb,bc) = $Tuple2(nil, toString(ba(parseBigIntValue(bb), parseBigIntValue(bc))))
9901001
9911002
9921003
9931004 @Callable(di)
994-func estimatePutOperationWrapperREADONLY (bF,bf,ch,eM,cj,eN,eO,cl,cm) = $Tuple2(nil, cf(bF, bf, ch, eM, cj, eN, eO, cl, cm, false, 0, ""))
1005+func estimatePutOperationWrapperREADONLY (bG,bg,ci,eV,ck,eW,eX,cm,cn) = $Tuple2(nil, cg(bG, bg, ci, eV, ck, eW, eX, cm, cn, false, 0, ""))
9951006
9961007
9971008
9981009 @Callable(di)
999-func estimateGetOperationWrapperREADONLY (bF,eP,bH,eO) = {
1000- let cx = bE(bF, eP, bH, addressFromStringValue(eO))
1001- $Tuple2(nil, $Tuple10(cx._1, cx._2, cx._3, cx._4, cx._5, cx._6, cx._7, toString(cx._8), cx._9, cx._10))
1010+func estimateGetOperationWrapperREADONLY (bG,eY,bI,eX) = {
1011+ let cy = bF(bG, eY, bI, addressFromStringValue(eX))
1012+ $Tuple2(nil, $Tuple10(cy._1, cy._2, cy._3, cy._4, cy._5, cy._6, cy._7, toString(cy._8), cy._9, cy._10))
10021013 }
10031014
10041015
1005-@Verifier(eQ)
1006-func eR () = {
1007- let at = eQ
1016+@Verifier(eZ)
1017+func fa () = {
1018+ let at = eZ
10081019 if ($isInstanceOf(at, "Order"))
10091020 then {
10101021 let cV = at
1011- let eS = aC()
1022+ let fb = aC()
10121023 let ap = cU(cV)
1013- let eT = sigVerify(cV.bodyBytes, cV.proofs[0], cV.senderPublicKey)
1014- let eU = sigVerify(cV.bodyBytes, cV.proofs[1], eS)
1024+ let fc = sigVerify(cV.bodyBytes, cV.proofs[0], cV.senderPublicKey)
1025+ let fd = sigVerify(cV.bodyBytes, cV.proofs[1], fb)
10151026 if (if (if (ap)
1016- then eT
1027+ then fc
10171028 else false)
1018- then eU
1029+ then fd
10191030 else false)
10201031 then true
1021- else ao(ap, eT, eU)
1032+ else ao(ap, fc, fd)
10221033 }
10231034 else {
1024- let eV = {
1025- let eW = do()
1026- if ($isInstanceOf(eW, "ByteVector"))
1035+ let fe = {
1036+ let ff = ds()
1037+ if ($isInstanceOf(ff, "ByteVector"))
10271038 then {
1028- let dt = eW
1029- dt
1039+ let dx = ff
1040+ dx
10301041 }
1031- else if ($isInstanceOf(eW, "Unit"))
1032- then eQ.senderPublicKey
1042+ else if ($isInstanceOf(ff, "Unit"))
1043+ then eZ.senderPublicKey
10331044 else throw("Match error")
10341045 }
1035- sigVerify(eQ.bodyBytes, eQ.proofs[0], eV)
1046+ sigVerify(eZ.bodyBytes, eZ.proofs[0], fe)
10361047 }
10371048 }
10381049

github/deemru/w8io/026f985 
438.58 ms