tx · qCNfgCVqLiKRqVSryECdLLbaTnfhjJL5kHJeLFJy9L5

3N9KXr9JbnPwrN9oacmFjc3qB4tYrzvxWss:  -0.02200000 Waves

2022.10.27 10:05 [2290508] smart account 3N9KXr9JbnPwrN9oacmFjc3qB4tYrzvxWss > SELF 0.00000000 Waves

{ "type": 13, "id": "qCNfgCVqLiKRqVSryECdLLbaTnfhjJL5kHJeLFJy9L5", "fee": 2200000, "feeAssetId": null, "timestamp": 1666854337103, "version": 1, "sender": "3N9KXr9JbnPwrN9oacmFjc3qB4tYrzvxWss", "senderPublicKey": "CuH6mrgac4GztriBQFELtAx7gw4diUcD94EVLt78E1kt", "proofs": [ "4wAsVu9uTwfhQFLbiVfDNr19aJdLUznJzVMehCeX9pazqaooTscoadmXG6YUdHDnzEXGG5wGA23wxXCBJcAxawz8" ], "script": "base64:BgK1GwgCEgMKAQgSAwoBCBIAEgQKAgEEEgMKAQESABIECgIBARIDCgEBEgQKAggIEgASAwoBCBIFCgMBAQESBAoCAQESBAoCCAESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgSABIDCgEBEgMKAQESBAoCCAEiCmxQZGVjaW1hbHMiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXNzZXREY20iEmlkeFBvb2xBbXRBc3NldEFtdCIUaWR4UG9vbFByaWNlQXNzZXRBbXQiEWlkeFBvb2xMUEFzc2V0QW10I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IBQJiWQJfOQkAlAoCBQNuaWwJALkJAgkAzAgCAg4lZCVkJWQlZCVkJWQlZAkAzAgCCQCkAwEFAmJFCQDMCAIJAKQDAQUCYkYJAMwIAgkApAMBBQJidQkAzAgCCQCkAwEFAmJ3CQDMCAIJAKQDAQUCYnQJAMwIAgkApgMBBQJiegkAzAgCCQCkAwEFAmJzBQNuaWwFAWYBAmRIAQJkSQAEAmRKBAJjTAkBAmNLAAMJAAECBQJjTAIKQnl0ZVZlY3RvcgQCY1EFAmNMBQJjUQMJAAECBQJjTAIEVW5pdAgFAmRID3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yBAJjTAUCZEgDCQABAgUCY0wCBU9yZGVyBAJjcAUCY0wEAmRLCQECYXUABAJhbAkBAmNvAQUCY3AEAmFtCQD0AwMIBQJjcAlib2R5Qnl0ZXMJAJEDAggFAmNwBnByb29mcwAACAUCY3APc2VuZGVyUHVibGljS2V5BAJhbgkA9AMDCAUCY3AJYm9keUJ5dGVzCQCRAwIIBQJjcAZwcm9vZnMAAQUCZEsDAwMFAmFsBQJhbQcFAmFuBwYJAQJhawMFAmFsBQJhbQUCYW4DCQABAgUCY0wCFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJjTQUCY0wEAmRMCQD2AwEJAQV2YWx1ZQEIBQJjTQZzY3JpcHQEAmRNCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYXMJAQJhagAEAmROCQDxBwEFBHRoaXMDAwkAAAIFAmRNBQJkTAkBAiE9AgUCZE4FAmRMBwYJAPQDAwgFAmRICWJvZHlCeXRlcwkAkQMCCAUCZEgGcHJvb2ZzAAAFAmRKCQD0AwMIBQJkSAlib2R5Qnl0ZXMJAJEDAggFAmRIBnByb29mcwAABQJkSmyaPXk=", "chainId": 84, "height": 2290508, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8n8jddJVHRNPknR29pKGsNRQJQrdhzghcos9HCwZtDSQ Next: 64HdFdtrgVReDHXy7zogxkPqdxkeamX49vveSoAEj8AQ Diff:
OldNewDifferences
1111
1212 let e = toBigInt(0)
1313
14-let f = toBigInt(0)
14+let f = "__"
1515
16-let g = toBigInt(1)
16+let g = 1
1717
18-let h = toBigInt(2)
18+let h = 2
1919
20-let i = "WAVES"
20+let i = 3
2121
22-let j = "__"
22+let j = 4
2323
2424 let k = 1
2525
2929
3030 let n = 4
3131
32-let o = 1
32+let o = 5
3333
34-let p = 2
34+let p = 6
3535
36-let q = 3
36+let q = 7
3737
38-let r = 4
38+let r = 8
3939
40-let s = 5
40+let s = 9
4141
42-let t = 6
42+let t = 10
4343
44-let u = 7
44+let u = 1
4545
46-let v = 8
46+let v = 2
4747
48-let w = 9
48+let w = 3
4949
50-let x = 10
50+let x = 1
5151
52-let y = 1
52+let y = 7
5353
54-let z = 2
55-
56-let A = 3
57-
58-let B = 1
59-
60-let C = 7
61-
62-func D (E,F) = fraction(toBigInt(E), d, toBigInt(F))
54+func z (A,B) = fraction(toBigInt(A), d, toBigInt(B))
6355
6456
65-func G (H,I) = toInt(fraction(H, toBigInt(I), d))
57+func C (D,E) = toInt(fraction(D, toBigInt(E), d))
6658
6759
68-func J (K,L,M) = fraction(K, L, M)
60+func F (G,H,I) = fraction(G, H, I)
6961
7062
71-func N (H) = if ((0 > H))
72- then -(H)
73- else H
63+func J (D) = if ((e > D))
64+ then -(D)
65+ else D
7466
7567
76-func O (H) = if ((e > H))
77- then -(H)
78- else H
68+func K () = "%s__factoryContract"
7969
8070
81-func P () = "%s__factoryContract"
71+func L () = "%s__managerPublicKey"
8272
8373
84-func Q () = "%s__managerPublicKey"
74+func M () = "%s__pendingManagerPublicKey"
8575
8676
87-func R () = "%s__pendingManagerPublicKey"
77+func N () = "%s%s__price__last"
8878
8979
90-func S () = "%s%s__price__last"
80+func O (P,Q) = makeString(["%s%s%d%d__price__history", toString(P), toString(Q)], f)
9181
9282
93-func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j)
83+func R (S,T) = ((("%s%s%s__P__" + S) + "__") + T)
9484
9585
96-func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y)
86+func U (S,T) = ((("%s%s%s__G__" + S) + "__") + T)
9787
9888
99-func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y)
89+func V () = "%s__amountAsset"
10090
10191
102-func aa () = "%s__amountAsset"
92+func W () = "%s__priceAsset"
10393
10494
105-func ab () = "%s__priceAsset"
95+func X () = "%s__factoryConfig"
10696
10797
108-let ac = "%s__fee"
109-
110-let ad = fraction(5, b, 10000)
111-
112-let ae = valueOrElse(getInteger(this, ac), ad)
113-
114-func af () = "%s__factoryConfig"
98+func Y () = "%s%s__matcher__publicKey"
11599
116100
117-func ag () = "%s%s__matcher__publicKey"
101+func Z (aa) = (("%s%s%s__" + aa) + "__mappings__poolContract2LpAsset")
118102
119103
120-func ah (ai) = (("%s%s%s__" + ai) + "__mappings__poolContract2LpAsset")
104+func ab (ac,ad) = (((("%d%d%s__" + ac) + "__") + ad) + "__config")
121105
122106
123-func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config")
107+func ae (af) = ("%s%s%s__mappings__baseAsset2internalId__" + af)
124108
125109
126-func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an)
110+func ag () = "%s__shutdown"
127111
128112
129-func ao () = "%s__shutdown"
113+func ah (ai) = ("%s%s__poolWeight__" + ai)
130114
131115
132-func ap (aq) = ("%s%s__poolWeight__" + aq)
116+func aj () = "%s__allowedLpScriptHash"
133117
134118
135-func ar () = "%s__allowedLpScriptHash"
119+func ak (al,am,an) = throw(((((("order validation failed: orderValid=" + toString(al)) + " senderValid=") + toString(am)) + " matcherValid=") + toString(an)))
136120
137121
138-let as = "%s__feeCollectorAddress"
139-
140-func at (au,av,aw) = throw(((((("order validation failed: orderValid=" + toString(au)) + " senderValid=") + toString(av)) + " matcherValid=") + toString(aw)))
122+func ao (ap,aq) = valueOrErrorMessage(getString(ap, aq), makeString(["mandatory ", toString(ap), ".", aq, " is not defined"], ""))
141123
142124
143-func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
125+func ar (ap,aq) = valueOrErrorMessage(getInteger(ap, aq), makeString(["mandatory ", toString(ap), ".", aq, " is not defined"], ""))
144126
145127
146-func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
128+let as = addressFromStringValue(ao(this, K()))
129+
130+func at () = valueOrElse(getBoolean(as, ag()), false)
147131
148132
149-func aB (aC) = throw(makeString(["lp.ride:", aC], " "))
133+func au () = fromBase58String(ao(as, Y()))
150134
151135
152-let aD = addressFromStringValue(ax(this, P()))
153-
154-let aE = addressFromStringValue(ax(aD, as))
155-
156-func aF () = valueOrElse(getBoolean(aD, ao()), false)
157-
158-
159-func aG () = fromBase58String(ax(aD, ag()))
160-
161-
162-func aH () = {
163- let aI = ax(this, aa())
164- let aJ = ax(this, ab())
165- let al = aA(aD, am(aJ))
166- let ak = aA(aD, am(aI))
167- split(ax(aD, aj(toString(ak), toString(al))), j)
136+func av () = {
137+ let aw = ao(this, V())
138+ let ax = ao(this, W())
139+ let ad = ar(as, ae(ax))
140+ let ac = ar(as, ae(aw))
141+ split(ao(as, ab(toString(ac), toString(ad))), f)
168142 }
169143
170144
171-func aK (aL) = if ((aL == i))
172- then unit
173- else fromBase58String(aL)
145+func ay () = split(ao(as, X()), f)
174146
175147
176-func aM (aL) = if ((aL == unit))
177- then i
178- else toBase58String(value(aL))
148+func az (aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(aA), toString(aB), toString(aC), toString(aD), toString(aE), toString(aF), toString(aG), toString(aH), toString(aI), toString(aJ)], f)
179149
180150
181-func aN (aO) = $Tuple7(addressFromStringValue(aO[o]), parseIntValue(aO[p]), fromBase58String(aO[q]), aK(aO[r]), aK(aO[s]), parseIntValue(aO[t]), parseIntValue(aO[u]))
151+func aK (aL,aM,aN,aD,aG,aH) = makeString(["%d%d%d%d%d%d", toString(aL), toString(aM), toString(aN), toString(aD), toString(aG), toString(aH)], f)
182152
183153
184-let aP = aN(aH())
185-
186-let aQ = aP
187-
188-let aR = aQ._1
189-
190-let aS = aQ._2
191-
192-let aT = aQ._3
193-
194-let aU = aQ._4
195-
196-let aV = aQ._5
197-
198-let aW = aQ._6
199-
200-let aX = aQ._7
201-
202-func aY () = split(ax(aD, af()), j)
154+func aO (aP) = if ((aP == "WAVES"))
155+ then wavesBalance(this).available
156+ else assetBalance(this, fromBase58String(aP))
203157
204158
205-let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
206-
207-let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
208-
209-func bb (bc,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl)], j)
159+func aQ (aR,aS) = fraction(aR, d, aS)
210160
211161
212-func bm (bn,bo,bp,bf,bi,bj) = makeString(["%d%d%d%d%d%d", toString(bn), toString(bo), toString(bp), toString(bf), toString(bi), toString(bj)], j)
213-
214-
215-func bq (br) = if ((br == "WAVES"))
216- then wavesBalance(this).available
217- else assetBalance(this, fromBase58String(br))
218-
219-
220-func bs (bt,bu) = fraction(bt, d, bu)
221-
222-
223-func bv (bw,bx,by,bz) = {
224- let bA = D(by, bw)
225- let bB = D(bz, bx)
226- bs(bB, bA)
162+func aT (aU,aV,aW,aX) = {
163+ let aY = z(aW, aU)
164+ let aZ = z(aX, aV)
165+ aQ(aZ, aY)
227166 }
228167
229168
230-func bC (by,bz,bD) = {
231- let bE = aH()
232- let bF = parseIntValue(bE[t])
233- let bG = parseIntValue(bE[u])
234- let bH = bv(bF, bG, by, bz)
235- let bu = D(by, bF)
236- let bt = D(bz, bG)
237- let bI = D(bD, b)
238- let bJ = bs(bu, bI)
239- let bK = bs(bt, bI)
240-[bH, bJ, bK]
169+func ba (aW,aX,bb) = {
170+ let bc = av()
171+ let bd = parseIntValue(bc[p])
172+ let be = parseIntValue(bc[q])
173+ let bf = aT(bd, be, aW, aX)
174+ let aS = z(aW, bd)
175+ let aR = z(aX, be)
176+ let bg = z(bb, b)
177+ let bh = aQ(aS, bg)
178+ let bi = aQ(aR, bg)
179+[bf, bh, bi]
241180 }
242181
243182
244-func bL (by,bz,bD) = {
245- let bM = bC(by, bz, bD)
246-[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
183+func bj (aW,aX,bb) = {
184+ let bk = ba(aW, aX, bb)
185+[C(bk[0], b), C(bk[1], b), C(bk[2], b)]
247186 }
248187
249188
250-func bN (bO,bP,bQ,X) = {
251- let bE = aH()
252- let bR = bE[q]
253- let bS = bE[r]
254- let bT = bE[s]
255- let bw = parseIntValue(bE[t])
256- let bx = parseIntValue(bE[u])
257- let bU = bE[p]
258- let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
259- if ((bR != bP))
189+func bl (bm,bn,bo,S) = {
190+ let bc = av()
191+ let bp = bc[m]
192+ let bq = bc[n]
193+ let br = bc[o]
194+ let aU = parseIntValue(bc[p])
195+ let aV = parseIntValue(bc[q])
196+ let bs = bc[l]
197+ let bt = valueOrErrorMessage(assetInfo(fromBase58String(bp)), (("Asset " + bp) + " doesn't exist")).quantity
198+ if ((bp != bn))
260199 then throw("Invalid asset passed.")
261200 else {
262- let bW = bq(bS)
263- let bX = D(bW, bw)
264- let bY = bq(bT)
265- let bZ = D(bY, bx)
266- let ca = bs(bZ, bX)
267- let cb = G(ca, b)
268- let cc = D(bQ, b)
269- let cd = D(bV, b)
270- let ce = fraction(bX, cc, cd)
271- let cf = fraction(bZ, cc, cd)
272- let cg = G(ce, bw)
273- let ch = G(cf, bx)
274- let ci = if ((bO == ""))
201+ let bu = aO(bq)
202+ let bv = z(bu, aU)
203+ let bw = aO(br)
204+ let bx = z(bw, aV)
205+ let by = aQ(bx, bv)
206+ let bz = C(by, b)
207+ let bA = z(bo, b)
208+ let bB = z(bt, b)
209+ let bC = fraction(bv, bA, bB)
210+ let bD = fraction(bx, bA, bB)
211+ let bE = C(bC, aU)
212+ let bF = C(bD, aV)
213+ let bG = if ((bm == ""))
275214 then nil
276- else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
215+ else [ScriptTransfer(S, bE, if ((bq == "WAVES"))
277216 then unit
278- else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
217+ else fromBase58String(bq)), ScriptTransfer(S, bF, if ((br == "WAVES"))
279218 then unit
280- else fromBase58String(bT)), StringEntry(Z(toString(X), bO), bm(cg, ch, bQ, cb, height, lastBlock.timestamp)), IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb)]
281- $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
219+ else fromBase58String(br)), StringEntry(U(toString(S), bm), aK(bE, bF, bo, bz, height, lastBlock.timestamp)), IntegerEntry(N(), bz), IntegerEntry(O(height, lastBlock.timestamp), bz)]
220+ $Tuple10(bE, bF, bq, br, bu, bw, bt, by, bs, bG)
282221 }
283222 }
284223
285224
286-func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
287- let bE = aH()
288- let bR = fromBase58String(bE[q])
289- let cr = bE[r]
290- let cs = bE[s]
291- let ct = bE[v]
292- let cu = bE[w]
293- let bF = parseIntValue(bE[t])
294- let bG = parseIntValue(bE[u])
295- let bU = bE[p]
296- let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
297- let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
298- let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
299- if (if ((cr != cv))
225+func bH (bm,bI,bJ,bK,bL,bM,S,bN,bO) = {
226+ let bc = av()
227+ let bp = fromBase58String(bc[m])
228+ let bP = bc[n]
229+ let bQ = bc[o]
230+ let bR = bc[r]
231+ let bS = bc[s]
232+ let bd = parseIntValue(bc[p])
233+ let be = parseIntValue(bc[q])
234+ let bs = bc[l]
235+ let bt = valueOrErrorMessage(assetInfo(bp), (("Asset " + toBase58String(bp)) + " doesn't exist")).quantity
236+ let bT = toBase58String(valueOrElse(bK, fromBase58String("WAVES")))
237+ let bU = toBase58String(valueOrElse(bM, fromBase58String("WAVES")))
238+ if (if ((bP != bT))
300239 then true
301- else (cs != cw))
240+ else (bQ != bU))
302241 then throw("Invalid amt or price asset passed.")
303242 else {
304- let bW = if (cp)
305- then bq(cr)
306- else (bq(cr) - cl)
307- let bY = if (cp)
308- then bq(cs)
309- else (bq(cs) - cn)
310- let cx = D(cl, bF)
311- let cy = D(cn, bG)
312- let cz = bs(cy, cx)
313- let bX = D(bW, bF)
314- let bZ = D(bY, bG)
315- let cA = if ((bV == 0))
243+ let bu = if (bN)
244+ then aO(bP)
245+ else (aO(bP) - bJ)
246+ let bw = if (bN)
247+ then aO(bQ)
248+ else (aO(bQ) - bL)
249+ let bV = z(bJ, bd)
250+ let bW = z(bL, be)
251+ let bX = aQ(bW, bV)
252+ let bv = z(bu, bd)
253+ let bx = z(bw, be)
254+ let bY = if ((bt == 0))
316255 then {
317- let ca = e
318- let cB = e
319- let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
320- $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
256+ let by = e
257+ let bZ = e
258+ let bg = pow((bV * bW), 0, toBigInt(5), 1, 0, DOWN)
259+ $Tuple5(C(bg, b), C(bV, bd), C(bW, be), aQ((bx + bW), (bv + bV)), bZ)
321260 }
322261 else {
323- let ca = bs(bZ, bX)
324- let cB = fraction(O((ca - cz)), d, ca)
325- let cC = D(ck, b)
326- if (if ((ca != e))
327- then (cB > cC)
262+ let by = aQ(bx, bv)
263+ let bZ = fraction(J((by - bX)), d, by)
264+ let ca = z(bI, b)
265+ if (if ((by != e))
266+ then (bZ > ca)
328267 else false)
329- then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
268+ then throw(((("Price slippage " + toString(bZ)) + " exceeded the passed limit of ") + toString(ca)))
330269 else {
331- let cd = D(bV, b)
332- let cD = fraction(cx, ca, d)
333- let cE = fraction(cy, d, ca)
334- let cF = if ((cD > cy))
335- then $Tuple2(cE, cy)
336- else $Tuple2(cx, cD)
337- let cG = cF._1
338- let cH = cF._2
339- let bI = fraction(cd, cH, bZ)
340- $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
270+ let bB = z(bt, b)
271+ let cb = fraction(bV, by, d)
272+ let cc = fraction(bW, d, by)
273+ let cd = if ((cb > bW))
274+ then $Tuple2(cc, bW)
275+ else $Tuple2(bV, cb)
276+ let ce = cd._1
277+ let cf = cd._2
278+ let bg = fraction(bB, cf, bx)
279+ $Tuple5(C(bg, b), C(ce, bd), C(cf, be), by, bZ)
341280 }
342281 }
343- let cI = cA._1
344- let cJ = cA._2
345- let cK = cA._3
346- let cb = G(cA._4, b)
347- let cL = G(cA._5, b)
348- if ((0 >= cI))
282+ let cg = bY._1
283+ let ch = bY._2
284+ let ci = bY._3
285+ let bz = C(bY._4, b)
286+ let cj = C(bY._5, b)
287+ if ((0 >= cg))
349288 then throw("Invalid calculations. LP calculated is less than zero.")
350289 else {
351- let cM = if (!(cq))
290+ let ck = if (!(bO))
352291 then 0
353- else cI
354- let cN = (cl - cJ)
355- let cO = (cn - cK)
356- let cP = [IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb), StringEntry(W(X, bO), bb(cJ, cK, cM, cb, ck, cL, height, lastBlock.timestamp, cN, cO))]
357- $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
292+ else cg
293+ let cl = (bJ - ch)
294+ let cm = (bL - ci)
295+ let cn = [IntegerEntry(N(), bz), IntegerEntry(O(height, lastBlock.timestamp), bz), StringEntry(R(S, bm), az(ch, ci, ck, bz, bI, cj, height, lastBlock.timestamp, cl, cm))]
296+ $Tuple13(cg, ck, bz, bu, bw, bt, bp, bs, cn, cl, cm, bK, bM)
358297 }
359298 }
360299 }
361300
362301
363-func cQ (cR) = {
364- let bE = aH()
365- let cS = bE[r]
366- let cT = bE[s]
367- let bU = parseIntValue(bE[p])
368- let bF = parseIntValue(bE[t])
369- let bG = parseIntValue(bE[u])
370- let cU = bq(cS)
371- let cV = bq(cT)
372- let ca = if ((cR.orderType == Buy))
373- then bv(bF, bG, (cU + cR.amount), cV)
374- else bv(bF, bG, (cU - cR.amount), cV)
375- let cb = G(ca, b)
376- if (if (if (aF())
302+func co (cp) = {
303+ let bc = av()
304+ let cq = bc[n]
305+ let cr = bc[o]
306+ let bs = parseIntValue(bc[l])
307+ let bd = parseIntValue(bc[p])
308+ let be = parseIntValue(bc[q])
309+ let cs = aO(cq)
310+ let ct = aO(cr)
311+ let by = if ((cp.orderType == Buy))
312+ then aT(bd, be, (cs + cp.amount), ct)
313+ else aT(bd, be, (cs - cp.amount), ct)
314+ let bz = C(by, b)
315+ if (if (if (at())
377316 then true
378- else (bU == m))
317+ else (bs == i))
379318 then true
380- else (bU == n))
319+ else (bs == j))
381320 then throw("Exchange operations disabled")
382321 else {
383- let cW = cR.assetPair.amountAsset
384- let cX = if ((cW == unit))
322+ let cu = cp.assetPair.amountAsset
323+ let cv = if ((cu == unit))
385324 then "WAVES"
386- else toBase58String(value(cW))
387- let cY = cR.assetPair.priceAsset
388- let cZ = if ((cY == unit))
325+ else toBase58String(value(cu))
326+ let cw = cp.assetPair.priceAsset
327+ let cx = if ((cw == unit))
389328 then "WAVES"
390- else toBase58String(value(cY))
391- if (if ((cX != cS))
329+ else toBase58String(value(cw))
330+ if (if ((cv != cq))
392331 then true
393- else (cZ != cT))
332+ else (cx != cr))
394333 then throw("Wrong order assets.")
395334 else {
396- let da = cR.price
397- let db = fraction(b, bG, bF)
398- let dc = J(da, b, db)
399- let dd = if ((cR.orderType == Buy))
400- then (cb >= dc)
401- else (dc >= cb)
335+ let cy = cp.price
336+ let cz = fraction(b, be, bd)
337+ let cA = F(cy, b, cz)
338+ let cB = if ((cp.orderType == Buy))
339+ then (bz >= cA)
340+ else (cA >= bz)
402341 true
403342 }
404343 }
405344 }
406345
407346
408-func de (df) = if ((size(df.payments) != 1))
347+func cC (cD) = if ((size(cD.payments) != 1))
409348 then throw("exactly 1 payment is expected")
410349 else {
411- let dg = value(df.payments[0])
412- let bP = value(dg.assetId)
413- let dh = dg.amount
414- let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
415- let cg = cA._1
416- let ch = cA._2
417- let bU = parseIntValue(cA._9)
418- let ci = cA._10
419- if (if (aF())
350+ let cE = value(cD.payments[0])
351+ let bn = value(cE.assetId)
352+ let cF = cE.amount
353+ let bY = bl(toBase58String(cD.transactionId), toBase58String(bn), cF, cD.caller)
354+ let bE = bY._1
355+ let bF = bY._2
356+ let bs = parseIntValue(bY._9)
357+ let bG = bY._10
358+ if (if (at())
420359 then true
421- else (bU == n))
422- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
423- else $Tuple5(cg, ch, dh, bP, ci)
360+ else (bs == j))
361+ then throw(("Get operation is blocked by admin. Status = " + toString(bs)))
362+ else $Tuple5(bE, bF, cF, bn, bG)
424363 }
425364
426365
427-func di (df,ck,cq) = if ((size(df.payments) != 2))
366+func cG (cD,bI,bO) = if ((size(cD.payments) != 2))
428367 then throw("exactly 2 payments are expected")
429368 else {
430- let dj = value(df.payments[0])
431- let dk = value(df.payments[1])
432- let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
433- let bU = parseIntValue(dl._8)
434- if (if (if (aF())
369+ let cH = value(cD.payments[0])
370+ let cI = value(cD.payments[1])
371+ let cJ = bH(toBase58String(cD.transactionId), bI, cH.amount, cH.assetId, cI.amount, cI.assetId, toString(cD.caller), false, bO)
372+ let bs = parseIntValue(cJ._8)
373+ if (if (if (at())
435374 then true
436- else (bU == l))
375+ else (bs == h))
437376 then true
438- else (bU == n))
439- then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
440- else dl
377+ else (bs == j))
378+ then throw(("Put operation is blocked by admin. Status = " + toString(bs)))
379+ else cJ
441380 }
442381
443382
444-func dm (dn) = {
445- let do = invoke(aD, "emit", [dn], nil)
446- if ((do == do))
383+func cK () = {
384+ let cL = getString(L())
385+ if ($isInstanceOf(cL, "String"))
447386 then {
448- let dp = {
449- let dq = do
450- if ($isInstanceOf(dq, "Address"))
451- then {
452- let dr = dq
453- invoke(dr, "emit", [dn], nil)
454- }
455- else unit
456- }
457- if ((dp == dp))
458- then dn
459- else throw("Strict value is not equal to itself.")
387+ let cM = cL
388+ fromBase58String(cM)
460389 }
461- else throw("Strict value is not equal to itself.")
462- }
463-
464-
465-func ds (dn) = {
466- let dt = fraction(dn, ae, b)
467- $Tuple2((dn - dt), dt)
468- }
469-
470-
471-func du (dv,dw,X,Y) = {
472- let dx = (Y == unit)
473- let dy = bq(aM(aU))
474- let dz = bq(aM(aV))
475- let dA = if ((dw == aU))
476- then true
477- else if ((dw == aV))
478- then false
479- else aB("invalid asset")
480- let dB = if (dx)
481- then $Tuple2(dy, dz)
482- else if (dA)
483- then $Tuple2((dy - dv), dz)
484- else $Tuple2(dy, (dz - dv))
485- let dC = dB._1
486- let dD = dB._2
487- let dE = if (dA)
488- then $Tuple2(dv, 0)
489- else $Tuple2(0, dv)
490- let dF = dE._1
491- let dG = dE._2
492- let dH = ds(dF)._1
493- let dI = ds(dG)._1
494- let dJ = ds(dv)
495- let dK = dJ._1
496- let dt = dJ._2
497- let dL = (dC + dH)
498- let dM = (dD + dI)
499- let dN = bs(D(dM, aX), D(dL, aW))
500- let dO = G(dN, b)
501- let dP = if (dA)
502- then dC
503- else dD
504- let dQ = toBigInt(dP)
505- let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
506- let dS = if ((dR > f))
507- then true
508- else aB("initial deposit requires all coins")
509- if ((dS == dS))
510- then {
511- let dT = toBigInt(dK)
512- let dU = max([0, toInt(((dR * (sqrtBigInt((d + ((dT * d) / dQ)), 18, 18, DOWN) - d)) / d))])
513- let cP = if (dx)
514- then nil
515- else [IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dF, dG, dU, dO, 0, 0, height, lastBlock.timestamp, 0, 0))]
516- let dV = bs(D(dD, aX), D(dC, aW))
517- let dW = G(dV, b)
518- let dX = N((((dO - dW) * b) / dW))
519- $Tuple4(dU, cP, dt, dX)
520- }
521- else throw("Strict value is not equal to itself.")
522- }
523-
524-
525-func dY (dZ,dK,dw,X,Y) = {
526- let dx = (Y == unit)
527- let ea = [if ((dw == aT))
528- then true
529- else aB("invalid lp asset")]
530- if ((ea == ea))
531- then {
532- let eb = if ((dZ == aU))
533- then true
534- else if ((dZ == aV))
535- then false
536- else aB("invalid asset")
537- let ec = if (eb)
538- then toBigInt(bq(aM(aU)))
539- else toBigInt(bq(aM(aV)))
540- let ed = bq(aM(aU))
541- let ee = bq(aM(aV))
542- let ef = if (eb)
543- then ed
544- else ee
545- let eg = toBigInt(ef)
546- let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
547- let eh = toBigInt(dK)
548- let ei = max([0, toInt(((ec * (d - pow((d - ((eh * d) / dR)), 18, h, 0, 18, DOWN))) / d))])
549- let ej = ds(ei)
550- let ek = ej._1
551- let dt = ej._2
552- let el = if (eb)
553- then $Tuple4(ek, 0, (ed - ei), ee)
554- else $Tuple4(0, ek, ed, (ee - ei))
555- let em = el._1
556- let en = el._2
557- let eo = el._3
558- let ep = el._4
559- let dN = bs(D(ep, aX), D(eo, aW))
560- let dO = G(dN, b)
561- let cP = if (dx)
562- then nil
563- else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(em, en, dK, dO, height, lastBlock.timestamp)), IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO)]
564- let dV = bs(D(ee, aX), D(ed, aW))
565- let dW = G(dV, b)
566- let dX = N((((dO - dW) * b) / dW))
567- $Tuple4(ek, cP, dt, dX)
568- }
569- else throw("Strict value is not equal to itself.")
570- }
571-
572-
573-func eq () = {
574- let dq = getString(Q())
575- if ($isInstanceOf(dq, "String"))
576- then {
577- let er = dq
578- fromBase58String(er)
579- }
580- else if ($isInstanceOf(dq, "Unit"))
390+ else if ($isInstanceOf(cL, "Unit"))
581391 then unit
582392 else throw("Match error")
583393 }
584394
585395
586-func es () = {
587- let dq = getString(R())
588- if ($isInstanceOf(dq, "String"))
396+func cN () = {
397+ let cL = getString(M())
398+ if ($isInstanceOf(cL, "String"))
589399 then {
590- let er = dq
591- fromBase58String(er)
400+ let cM = cL
401+ fromBase58String(cM)
592402 }
593- else if ($isInstanceOf(dq, "Unit"))
403+ else if ($isInstanceOf(cL, "Unit"))
594404 then unit
595405 else throw("Match error")
596406 }
597407
598408
599-func et (df) = {
600- let eu = throw("Permission denied")
601- let dq = eq()
602- if ($isInstanceOf(dq, "ByteVector"))
409+func cO (cD) = {
410+ let cP = throw("Permission denied")
411+ let cL = cK()
412+ if ($isInstanceOf(cL, "ByteVector"))
603413 then {
604- let ev = dq
605- if ((df.callerPublicKey == ev))
414+ let cQ = cL
415+ if ((cD.callerPublicKey == cQ))
606416 then true
607- else eu
417+ else cP
608418 }
609- else if ($isInstanceOf(dq, "Unit"))
610- then if ((df.caller == this))
419+ else if ($isInstanceOf(cL, "Unit"))
420+ then if ((cD.caller == this))
611421 then true
612- else eu
422+ else cP
613423 else throw("Match error")
614424 }
615425
616426
617-@Callable(df)
618-func setManager (ew) = {
619- let ex = et(df)
620- if ((ex == ex))
427+@Callable(cD)
428+func constructor (as) = {
429+ let cR = cO(cD)
430+ if ((cR == cR))
431+ then [StringEntry(K(), as)]
432+ else throw("Strict value is not equal to itself.")
433+ }
434+
435+
436+
437+@Callable(cD)
438+func setManager (cS) = {
439+ let cR = cO(cD)
440+ if ((cR == cR))
621441 then {
622- let ey = fromBase58String(ew)
623- if ((ey == ey))
624- then [StringEntry(R(), ew)]
442+ let cT = fromBase58String(cS)
443+ if ((cT == cT))
444+ then [StringEntry(M(), cS)]
625445 else throw("Strict value is not equal to itself.")
626446 }
627447 else throw("Strict value is not equal to itself.")
629449
630450
631451
632-@Callable(df)
452+@Callable(cD)
633453 func confirmManager () = {
634- let ez = es()
635- let eA = if (isDefined(ez))
454+ let cU = cN()
455+ let cV = if (isDefined(cU))
636456 then true
637457 else throw("No pending manager")
638- if ((eA == eA))
458+ if ((cV == cV))
639459 then {
640- let eB = if ((df.callerPublicKey == value(ez)))
460+ let cW = if ((cD.callerPublicKey == value(cU)))
641461 then true
642462 else throw("You are not pending manager")
643- if ((eB == eB))
644- then [StringEntry(Q(), toBase58String(value(ez))), DeleteEntry(R())]
463+ if ((cW == cW))
464+ then [StringEntry(L(), toBase58String(value(cU))), DeleteEntry(M())]
645465 else throw("Strict value is not equal to itself.")
646466 }
647467 else throw("Strict value is not equal to itself.")
649469
650470
651471
652-@Callable(df)
653-func put (ck,eC) = if ((0 > ck))
654- then throw("Invalid slippageTolerance passed")
472+@Callable(cD)
473+func put (bI,cX) = {
474+ let cY = ay()
475+ let cZ = valueOrErrorMessage(addressFromString(cY[x]), "Error. Incorrect staking address.")
476+ let da = valueOrErrorMessage(addressFromString(cY[y]), "Error. Incorrect slippage contract address.")
477+ if ((0 > bI))
478+ then throw("Invalid slippageTolerance passed")
479+ else {
480+ let cJ = cG(cD, bI, true)
481+ let ck = cJ._2
482+ let bp = cJ._7
483+ let bG = cJ._9
484+ let cl = cJ._10
485+ let cm = cJ._11
486+ let db = cJ._12
487+ let dc = cJ._13
488+ let dd = invoke(as, "emit", [ck], nil)
489+ if ((dd == dd))
490+ then {
491+ let de = {
492+ let cL = dd
493+ if ($isInstanceOf(cL, "Address"))
494+ then {
495+ let df = cL
496+ invoke(df, "emit", [ck], nil)
497+ }
498+ else unit
499+ }
500+ if ((de == de))
501+ then {
502+ let dg = if ((cl > 0))
503+ then invoke(da, "put", nil, [AttachedPayment(db, cl)])
504+ else nil
505+ if ((dg == dg))
506+ then {
507+ let dh = if ((cm > 0))
508+ then invoke(da, "put", nil, [AttachedPayment(dc, cm)])
509+ else nil
510+ if ((dh == dh))
511+ then {
512+ let di = if (cX)
513+ then {
514+ let dj = invoke(cZ, "stake", nil, [AttachedPayment(bp, ck)])
515+ if ((dj == dj))
516+ then nil
517+ else throw("Strict value is not equal to itself.")
518+ }
519+ else [ScriptTransfer(cD.caller, ck, bp)]
520+ (bG ++ di)
521+ }
522+ else throw("Strict value is not equal to itself.")
523+ }
524+ else throw("Strict value is not equal to itself.")
525+ }
526+ else throw("Strict value is not equal to itself.")
527+ }
528+ else throw("Strict value is not equal to itself.")
529+ }
530+ }
531+
532+
533+
534+@Callable(cD)
535+func putForFree (dk) = if ((0 > dk))
536+ then throw("Invalid value passed")
655537 else {
656- let dl = di(df, ck, true)
657- let cM = dl._2
658- let bR = dl._7
659- let ci = dl._9
660- let cN = dl._10
661- let cO = dl._11
662- let eD = dl._12
663- let eE = dl._13
664- let do = invoke(aD, "emit", [cM], nil)
665- if ((do == do))
666- then {
667- let dp = {
668- let dq = do
669- if ($isInstanceOf(dq, "Address"))
670- then {
671- let dr = dq
672- invoke(dr, "emit", [cM], nil)
673- }
674- else unit
675- }
676- if ((dp == dp))
677- then {
678- let eF = if ((cN > 0))
679- then invoke(ba, "put", nil, [AttachedPayment(eD, cN)])
680- else nil
681- if ((eF == eF))
682- then {
683- let eG = if ((cO > 0))
684- then invoke(ba, "put", nil, [AttachedPayment(eE, cO)])
685- else nil
686- if ((eG == eG))
687- then {
688- let eH = if (eC)
689- then {
690- let eI = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
691- if ((eI == eI))
692- then nil
693- else throw("Strict value is not equal to itself.")
694- }
695- else [ScriptTransfer(df.caller, cM, bR)]
696- (ci ++ eH)
697- }
698- else throw("Strict value is not equal to itself.")
699- }
700- else throw("Strict value is not equal to itself.")
701- }
702- else throw("Strict value is not equal to itself.")
703- }
704- else throw("Strict value is not equal to itself.")
538+ let cJ = cG(cD, dk, false)
539+ cJ._9
705540 }
706541
707542
708543
709-@Callable(df)
710-func putForFree (eJ) = if ((0 > eJ))
711- then throw("Invalid value passed")
712- else {
713- let dl = di(df, eJ, false)
714- dl._9
715- }
716-
717-
718-
719-@Callable(df)
720-func putOneTkn (eK,eL) = {
721- let eM = {
722- let eN = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
723- if ($isInstanceOf(eN, "Boolean"))
724- then eN
725- else throw(($getType(eN) + " couldn't be cast to Boolean"))
726- }
727- let eO = if (if (if (aF())
728- then true
729- else (aS == l))
730- then true
731- else (aS == n))
732- then true
733- else eM
734- let ea = [if (!(eO))
735- then true
736- else aB("put operation is blocked by admin"), if ((size(df.payments) == 1))
737- then true
738- else aB("exactly 1 payment are expected")]
739- if ((ea == ea))
740- then {
741- let eP = df.payments[0]
742- let dw = eP.assetId
743- let dv = eP.amount
744- let X = df.caller
745- let Y = df.transactionId
746- let eQ = du(dv, dw, X, Y)
747- let eR = eQ._1
748- let cP = eQ._2
749- let dt = eQ._3
750- let eS = eQ._4
751- let eT = if (if ((eK > 0))
752- then (eK > eR)
753- else false)
754- then aB(makeString(["amount to receive is less than ", toString(eK)], ""))
755- else eR
756- let do = dm(eT)
757- if ((do == do))
758- then {
759- let eH = if (eL)
760- then {
761- let eU = invoke(aZ, "stake", nil, [AttachedPayment(aT, eT)])
762- if ((eU == eU))
763- then nil
764- else throw("Strict value is not equal to itself.")
765- }
766- else [ScriptTransfer(df.caller, eT, aT)]
767- let eV = if ((dt > 0))
768- then [ScriptTransfer(aE, dt, dw)]
769- else nil
770- $Tuple2(((cP ++ eH) ++ eV), eT)
771- }
772- else throw("Strict value is not equal to itself.")
773- }
544+@Callable(cD)
545+func get () = {
546+ let bY = cC(cD)
547+ let dl = bY._1
548+ let bF = bY._2
549+ let cF = bY._3
550+ let bn = bY._4
551+ let bG = bY._5
552+ let dm = invoke(as, "burn", [cF], [AttachedPayment(bn, cF)])
553+ if ((dm == dm))
554+ then bG
774555 else throw("Strict value is not equal to itself.")
775556 }
776557
777558
778559
779-@Callable(df)
780-func putOneTknREADONLY (dw,dv) = {
781- let eW = du(dv, aK(dw), unit, unit)
782- let eR = eW._1
783- let cP = eW._2
784- let dt = eW._3
785- let eS = eW._4
786- $Tuple2(nil, $Tuple3(eR, dt, eS))
787- }
788-
789-
790-
791-@Callable(df)
792-func getOneTkn (eX,eK) = {
793- let eM = {
794- let eN = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
795- if ($isInstanceOf(eN, "Boolean"))
796- then eN
797- else throw(($getType(eN) + " couldn't be cast to Boolean"))
798- }
799- let eY = if (if (aF())
800- then true
801- else (aS == n))
802- then true
803- else eM
804- let ea = [if (!(eY))
805- then true
806- else aB("get operation is blocked by admin"), if ((size(df.payments) == 1))
807- then true
808- else aB("exactly 1 payment are expected")]
809- if ((ea == ea))
810- then {
811- let dZ = aK(eX)
812- let eP = df.payments[0]
813- let dw = eP.assetId
814- let dK = eP.amount
815- let X = df.caller
816- let Y = df.transactionId
817- let eZ = dY(dZ, dK, dw, X, Y)
818- let fa = eZ._1
819- let cP = eZ._2
820- let dt = eZ._3
821- let eS = eZ._4
822- let dn = if (if ((eK > 0))
823- then (eK > fa)
824- else false)
825- then aB(makeString(["amount to receive is less than ", toString(eK)], ""))
826- else fa
827- let fb = invoke(aD, "burn", [dK], [AttachedPayment(dw, dK)])
828- if ((fb == fb))
829- then {
830- let fc = [ScriptTransfer(X, dn, dZ)]
831- let eV = if ((dt > 0))
832- then [ScriptTransfer(aE, dt, dZ)]
833- else nil
834- $Tuple2(((cP ++ fc) ++ eV), dn)
835- }
836- else throw("Strict value is not equal to itself.")
837- }
838- else throw("Strict value is not equal to itself.")
839- }
840-
841-
842-
843-@Callable(df)
844-func getOneTknREADONLY (dZ,dK) = {
845- let fd = dY(aK(dZ), dK, aT, unit, unit)
846- let fa = fd._1
847- let cP = fd._2
848- let dt = fd._3
849- let eS = fd._4
850- $Tuple2(nil, $Tuple3(fa, dt, eS))
851- }
852-
853-
854-
855-@Callable(df)
856-func unstakeAndGetOneTkn (fe,eX,eK) = {
857- let eM = {
858- let eN = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
859- if ($isInstanceOf(eN, "Boolean"))
860- then eN
861- else throw(($getType(eN) + " couldn't be cast to Boolean"))
862- }
863- let eY = if (if (aF())
864- then true
865- else (aS == n))
866- then true
867- else eM
868- let ea = [if (!(eY))
869- then true
870- else aB("get operation is blocked by admin"), if ((size(df.payments) == 0))
871- then true
872- else aB("no payments are expected")]
873- if ((ea == ea))
874- then {
875- let dZ = aK(eX)
876- let X = df.caller
877- let Y = df.transactionId
878- let ff = invoke(aZ, "unstake", [toBase58String(aT), fe], nil)
879- if ((ff == ff))
880- then {
881- let fg = dY(dZ, fe, aT, X, Y)
882- let fa = fg._1
883- let cP = fg._2
884- let dt = fg._3
885- let eS = fg._4
886- let dn = if (if ((eK > 0))
887- then (eK > fa)
888- else false)
889- then aB(makeString(["amount to receive is less than ", toString(eK)], ""))
890- else fa
891- let fb = invoke(aD, "burn", [fe], [AttachedPayment(aT, fe)])
892- if ((fb == fb))
893- then {
894- let fc = [ScriptTransfer(df.caller, dn, dZ)]
895- let eV = if ((dt > 0))
896- then [ScriptTransfer(aE, dt, dZ)]
897- else nil
898- $Tuple2(((cP ++ fc) ++ eV), dn)
899- }
900- else throw("Strict value is not equal to itself.")
901- }
902- else throw("Strict value is not equal to itself.")
903- }
904- else throw("Strict value is not equal to itself.")
905- }
906-
907-
908-
909-@Callable(df)
910-func get () = {
911- let cA = de(df)
912- let fh = cA._1
913- let ch = cA._2
914- let dh = cA._3
915- let bP = cA._4
916- let ci = cA._5
917- let fi = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
918- if ((fi == fi))
919- then ci
920- else throw("Strict value is not equal to itself.")
921- }
922-
923-
924-
925-@Callable(df)
926-func getNoLess (fj,fk) = {
927- let cA = de(df)
928- let cg = cA._1
929- let ch = cA._2
930- let dh = cA._3
931- let bP = cA._4
932- let ci = cA._5
933- if ((fj > cg))
934- then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fj)))
935- else if ((fk > ch))
936- then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fk)))
560+@Callable(cD)
561+func getNoLess (dn,do) = {
562+ let bY = cC(cD)
563+ let bE = bY._1
564+ let bF = bY._2
565+ let cF = bY._3
566+ let bn = bY._4
567+ let bG = bY._5
568+ if ((dn > bE))
569+ then throw(((("noLessThenAmtAsset failed: " + toString(bE)) + " < ") + toString(dn)))
570+ else if ((do > bF))
571+ then throw(((("noLessThenPriceAsset failed: " + toString(bF)) + " < ") + toString(do)))
937572 else {
938- let fi = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
939- if ((fi == fi))
940- then ci
573+ let dm = invoke(as, "burn", [cF], [AttachedPayment(bn, cF)])
574+ if ((dm == dm))
575+ then bG
941576 else throw("Strict value is not equal to itself.")
942577 }
943578 }
944579
945580
946581
947-@Callable(df)
948-func unstakeAndGet (dn) = {
949- let fl = if ((size(df.payments) != 0))
582+@Callable(cD)
583+func unstakeAndGet (dp) = {
584+ let dq = if ((size(cD.payments) != 0))
950585 then throw("No payments are expected")
951586 else true
952- if ((fl == fl))
587+ if ((dq == dq))
953588 then {
954- let bE = aH()
955- let bR = fromBase58String(bE[q])
956- let ff = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
957- if ((ff == ff))
589+ let bc = av()
590+ let cY = ay()
591+ let bp = fromBase58String(bc[m])
592+ let cZ = valueOrErrorMessage(addressFromString(cY[x]), "Error. Incorrect staking address.")
593+ let dr = invoke(cZ, "unstake", [toBase58String(bp), dp], nil)
594+ if ((dr == dr))
958595 then {
959- let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
960- let bU = parseIntValue(cA._9)
961- let ci = cA._10
962- let fm = if (if (aF())
596+ let bY = bl(toBase58String(cD.transactionId), toBase58String(bp), dp, cD.caller)
597+ let bs = parseIntValue(bY._9)
598+ let bG = bY._10
599+ let ds = if (if (at())
963600 then true
964- else (bU == n))
965- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
601+ else (bs == j))
602+ then throw(("Get operation is blocked by admin. Status = " + toString(bs)))
966603 else true
967- if ((fm == fm))
604+ if ((ds == ds))
968605 then {
969- let fi = invoke(aD, "burn", [dn], [AttachedPayment(bR, dn)])
970- if ((fi == fi))
971- then ci
606+ let dm = invoke(as, "burn", [dp], [AttachedPayment(bp, dp)])
607+ if ((dm == dm))
608+ then bG
972609 else throw("Strict value is not equal to itself.")
973610 }
974611 else throw("Strict value is not equal to itself.")
980617
981618
982619
983-@Callable(df)
984-func activate (fn,fo) = if ((toString(df.caller) != toString(aD)))
620+@Callable(cD)
621+func activate (dt,du) = if ((toString(cD.caller) != toString(as)))
985622 then throw("permissions denied")
986- else $Tuple2([StringEntry(aa(), fn), StringEntry(ab(), fo)], "success")
623+ else $Tuple2([StringEntry(V(), dt), StringEntry(W(), du)], "success")
987624
988625
989626
990-@Callable(df)
991-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
627+@Callable(cD)
628+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, av())
992629
993630
994631
995-@Callable(df)
996-func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
632+@Callable(cD)
633+func getAccBalanceWrapperREADONLY (aP) = $Tuple2(nil, aO(aP))
997634
998635
999636
1000-@Callable(df)
1001-func calcPricesWrapperREADONLY (by,bz,bD) = {
1002- let bM = bC(by, bz, bD)
1003- $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
637+@Callable(cD)
638+func calcPricesWrapperREADONLY (aW,aX,bb) = {
639+ let bk = ba(aW, aX, bb)
640+ $Tuple2(nil, [toString(bk[0]), toString(bk[1]), toString(bk[2])])
1004641 }
1005642
1006643
1007644
1008-@Callable(df)
1009-func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
645+@Callable(cD)
646+func toX18WrapperREADONLY (A,B) = $Tuple2(nil, toString(z(A, B)))
1010647
1011648
1012649
1013-@Callable(df)
1014-func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
650+@Callable(cD)
651+func fromX18WrapperREADONLY (D,E) = $Tuple2(nil, C(parseBigIntValue(D), E))
1015652
1016653
1017654
1018-@Callable(df)
1019-func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
655+@Callable(cD)
656+func calcPriceBigIntWrapperREADONLY (aR,aS) = $Tuple2(nil, toString(aQ(parseBigIntValue(aR), parseBigIntValue(aS))))
1020657
1021658
1022659
1023-@Callable(df)
1024-func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
660+@Callable(cD)
661+func estimatePutOperationWrapperREADONLY (bm,bI,bJ,bK,bL,bM,S,bN,bO) = $Tuple2(nil, bH(bm, bI, bJ, bK, bL, bM, S, bN, bO))
1025662
1026663
1027664
1028-@Callable(df)
1029-func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1030- let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1031- $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
665+@Callable(cD)
666+func estimateGetOperationWrapperREADONLY (bm,bn,bo,S) = {
667+ let bY = bl(bm, bn, bo, addressFromStringValue(S))
668+ $Tuple2(nil, $Tuple10(bY._1, bY._2, bY._3, bY._4, bY._5, bY._6, bY._7, toString(bY._8), bY._9, bY._10))
1032669 }
1033670
1034671
1035672
1036-@Callable(df)
673+@Callable(cD)
1037674 func statsREADONLY () = {
1038- let bE = aH()
1039- let bR = fromBase58String(bE[q])
1040- let cS = bE[r]
1041- let cT = bE[s]
1042- let ct = bE[v]
1043- let cu = bE[w]
1044- let bF = parseIntValue(bE[t])
1045- let bG = parseIntValue(bE[u])
1046- let fp = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1047- let cU = bq(cS)
1048- let cV = bq(cT)
1049- let fq = if ((fp == 0))
675+ let bc = av()
676+ let bp = fromBase58String(bc[m])
677+ let cq = bc[n]
678+ let cr = bc[o]
679+ let bR = bc[r]
680+ let bS = bc[s]
681+ let bd = parseIntValue(bc[p])
682+ let be = parseIntValue(bc[q])
683+ let dv = valueOrErrorMessage(assetInfo(bp), (("Asset " + toBase58String(bp)) + " doesn't exist")).quantity
684+ let cs = aO(cq)
685+ let ct = aO(cr)
686+ let dw = if ((dv == 0))
1050687 then [e, e, e]
1051- else bC(cU, cV, fp)
1052- let cb = 0
1053- let fr = G(fq[1], b)
1054- let fs = G(fq[2], b)
1055- let ft = value(getInteger(aD, ap(toString(this))))
1056- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fp), toString(cb), toString(fr), toString(fs), toString(ft)], j))
688+ else ba(cs, ct, dv)
689+ let bz = 0
690+ let dx = C(dw[1], b)
691+ let dy = C(dw[2], b)
692+ let dz = value(getInteger(as, ah(toString(this))))
693+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cs), toString(ct), toString(dv), toString(bz), toString(dx), toString(dy), toString(dz)], f))
1057694 }
1058695
1059696
1060697
1061-@Callable(df)
1062-func evaluatePutByAmountAssetREADONLY (cl) = {
1063- let bE = aH()
1064- let bR = fromBase58String(bE[q])
1065- let cr = bE[r]
1066- let bS = fromBase58String(cr)
1067- let cs = bE[s]
1068- let bT = fromBase58String(cs)
1069- let bF = parseIntValue(bE[t])
1070- let bG = parseIntValue(bE[u])
1071- let bU = bE[p]
1072- let fp = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1073- let cU = bq(cr)
1074- let cV = bq(cs)
1075- let bA = D(cU, bF)
1076- let bB = D(cV, bG)
1077- let ca = if ((fp == 0))
698+@Callable(cD)
699+func evaluatePutByAmountAssetREADONLY (bJ) = {
700+ let bc = av()
701+ let bp = fromBase58String(bc[m])
702+ let bP = bc[n]
703+ let bq = fromBase58String(bP)
704+ let bQ = bc[o]
705+ let br = fromBase58String(bQ)
706+ let bd = parseIntValue(bc[p])
707+ let be = parseIntValue(bc[q])
708+ let bs = bc[l]
709+ let dv = valueOrErrorMessage(assetInfo(bp), (("Asset " + toBase58String(bp)) + " doesn't exist")).quantity
710+ let cs = aO(bP)
711+ let ct = aO(bQ)
712+ let aY = z(cs, bd)
713+ let aZ = z(ct, be)
714+ let by = if ((dv == 0))
1078715 then e
1079- else bs(bB, bA)
1080- let cx = D(cl, bF)
1081- let cy = fraction(cx, ca, d)
1082- let cn = G(cy, bG)
1083- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1084- let cI = dl._1
1085- let fu = dl._3
1086- let bW = dl._4
1087- let bY = dl._5
1088- let bV = dl._6
1089- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
716+ else aQ(aZ, aY)
717+ let bV = z(bJ, bd)
718+ let bW = fraction(bV, by, d)
719+ let bL = C(bW, be)
720+ let cJ = bH("", 500000, bJ, bq, bL, br, "", true, false)
721+ let cg = cJ._1
722+ let dA = cJ._3
723+ let bu = cJ._4
724+ let bw = cJ._5
725+ let bt = cJ._6
726+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cg), toString(C(by, b)), toString(bu), toString(bw), toString(bt), bs, toString(bJ), toString(bL)], f))
1090727 }
1091728
1092729
1093730
1094-@Callable(df)
1095-func evaluatePutByPriceAssetREADONLY (cn) = {
1096- let bE = aH()
1097- let bR = fromBase58String(bE[q])
1098- let cr = bE[r]
1099- let bS = fromBase58String(cr)
1100- let cs = bE[s]
1101- let bT = fromBase58String(cs)
1102- let bF = parseIntValue(bE[t])
1103- let bG = parseIntValue(bE[u])
1104- let bU = bE[p]
1105- let fp = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1106- let fv = bq(cr)
1107- let fw = bq(cs)
1108- let fx = D(fv, bF)
1109- let fy = D(fw, bG)
1110- let ca = if ((fp == 0))
731+@Callable(cD)
732+func evaluatePutByPriceAssetREADONLY (bL) = {
733+ let bc = av()
734+ let bp = fromBase58String(bc[m])
735+ let bP = bc[n]
736+ let bq = fromBase58String(bP)
737+ let bQ = bc[o]
738+ let br = fromBase58String(bQ)
739+ let bd = parseIntValue(bc[p])
740+ let be = parseIntValue(bc[q])
741+ let bs = bc[l]
742+ let dv = valueOrErrorMessage(assetInfo(bp), (("Asset " + toBase58String(bp)) + " doesn't exist")).quantity
743+ let dB = aO(bP)
744+ let dC = aO(bQ)
745+ let dD = z(dB, bd)
746+ let dE = z(dC, be)
747+ let by = if ((dv == 0))
1111748 then e
1112- else bs(fy, fx)
1113- let cy = D(cn, bG)
1114- let cx = fraction(cy, d, ca)
1115- let cl = G(cx, bF)
1116- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1117- let cI = dl._1
1118- let fu = dl._3
1119- let bW = dl._4
1120- let bY = dl._5
1121- let bV = dl._6
1122- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
749+ else aQ(dE, dD)
750+ let bW = z(bL, be)
751+ let bV = fraction(bW, d, by)
752+ let bJ = C(bV, bd)
753+ let cJ = bH("", 500000, bJ, bq, bL, br, "", true, false)
754+ let cg = cJ._1
755+ let dA = cJ._3
756+ let bu = cJ._4
757+ let bw = cJ._5
758+ let bt = cJ._6
759+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cg), toString(C(by, b)), toString(bu), toString(bw), toString(bt), bs, toString(bJ), toString(bL)], f))
1123760 }
1124761
1125762
1126763
1127-@Callable(df)
1128-func evaluateGetREADONLY (fz,fA) = {
1129- let cA = bN("", fz, fA, this)
1130- let cg = cA._1
1131- let ch = cA._2
1132- let bW = cA._5
1133- let bY = cA._6
1134- let bV = cA._7
1135- let cb = cA._8
1136- let bU = parseIntValue(cA._9)
1137- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cg), toString(ch), toString(bW), toString(bY), toString(bV), toString(cb), toString(bU)], j))
764+@Callable(cD)
765+func evaluateGetREADONLY (dF,dG) = {
766+ let bY = bl("", dF, dG, this)
767+ let bE = bY._1
768+ let bF = bY._2
769+ let bu = bY._5
770+ let bw = bY._6
771+ let bt = bY._7
772+ let bz = bY._8
773+ let bs = parseIntValue(bY._9)
774+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(bE), toString(bF), toString(bu), toString(bw), toString(bt), toString(bz), toString(bs)], f))
1138775 }
1139776
1140777
1141-@Verifier(fB)
1142-func fC () = {
1143- let fD = {
1144- let dq = eq()
1145- if ($isInstanceOf(dq, "ByteVector"))
778+@Verifier(dH)
779+func dI () = {
780+ let dJ = {
781+ let cL = cK()
782+ if ($isInstanceOf(cL, "ByteVector"))
1146783 then {
1147- let ev = dq
1148- ev
784+ let cQ = cL
785+ cQ
1149786 }
1150- else if ($isInstanceOf(dq, "Unit"))
1151- then fB.senderPublicKey
787+ else if ($isInstanceOf(cL, "Unit"))
788+ then dH.senderPublicKey
1152789 else throw("Match error")
1153790 }
1154- let dq = fB
1155- if ($isInstanceOf(dq, "Order"))
791+ let cL = dH
792+ if ($isInstanceOf(cL, "Order"))
1156793 then {
1157- let cR = dq
1158- let fE = aG()
1159- let au = cQ(cR)
1160- let av = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1161- let aw = sigVerify(cR.bodyBytes, cR.proofs[1], fE)
1162- if (if (if (au)
1163- then av
794+ let cp = cL
795+ let dK = au()
796+ let al = co(cp)
797+ let am = sigVerify(cp.bodyBytes, cp.proofs[0], cp.senderPublicKey)
798+ let an = sigVerify(cp.bodyBytes, cp.proofs[1], dK)
799+ if (if (if (al)
800+ then am
1164801 else false)
1165- then aw
802+ then an
1166803 else false)
1167804 then true
1168- else at(au, av, aw)
805+ else ak(al, am, an)
1169806 }
1170- else if ($isInstanceOf(dq, "SetScriptTransaction"))
807+ else if ($isInstanceOf(cL, "SetScriptTransaction"))
1171808 then {
1172- let er = dq
1173- let fF = blake2b256(value(er.script))
1174- let fG = fromBase64String(value(getString(aD, ar())))
1175- let fH = scriptHash(this)
1176- if (if ((fG == fF))
1177- then (fH != fF)
809+ let cM = cL
810+ let dL = blake2b256(value(cM.script))
811+ let dM = fromBase64String(value(getString(as, aj())))
812+ let dN = scriptHash(this)
813+ if (if ((dM == dL))
814+ then (dN != dL)
1178815 else false)
1179816 then true
1180- else sigVerify(fB.bodyBytes, fB.proofs[0], fD)
817+ else sigVerify(dH.bodyBytes, dH.proofs[0], dJ)
1181818 }
1182- else sigVerify(fB.bodyBytes, fB.proofs[0], fD)
819+ else sigVerify(dH.bodyBytes, dH.proofs[0], dJ)
1183820 }
1184821
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 8
55
66 let b = 100000000
77
88 let c = toBigInt(100000000)
99
1010 let d = toBigInt(1000000000000000000)
1111
1212 let e = toBigInt(0)
1313
14-let f = toBigInt(0)
14+let f = "__"
1515
16-let g = toBigInt(1)
16+let g = 1
1717
18-let h = toBigInt(2)
18+let h = 2
1919
20-let i = "WAVES"
20+let i = 3
2121
22-let j = "__"
22+let j = 4
2323
2424 let k = 1
2525
2626 let l = 2
2727
2828 let m = 3
2929
3030 let n = 4
3131
32-let o = 1
32+let o = 5
3333
34-let p = 2
34+let p = 6
3535
36-let q = 3
36+let q = 7
3737
38-let r = 4
38+let r = 8
3939
40-let s = 5
40+let s = 9
4141
42-let t = 6
42+let t = 10
4343
44-let u = 7
44+let u = 1
4545
46-let v = 8
46+let v = 2
4747
48-let w = 9
48+let w = 3
4949
50-let x = 10
50+let x = 1
5151
52-let y = 1
52+let y = 7
5353
54-let z = 2
55-
56-let A = 3
57-
58-let B = 1
59-
60-let C = 7
61-
62-func D (E,F) = fraction(toBigInt(E), d, toBigInt(F))
54+func z (A,B) = fraction(toBigInt(A), d, toBigInt(B))
6355
6456
65-func G (H,I) = toInt(fraction(H, toBigInt(I), d))
57+func C (D,E) = toInt(fraction(D, toBigInt(E), d))
6658
6759
68-func J (K,L,M) = fraction(K, L, M)
60+func F (G,H,I) = fraction(G, H, I)
6961
7062
71-func N (H) = if ((0 > H))
72- then -(H)
73- else H
63+func J (D) = if ((e > D))
64+ then -(D)
65+ else D
7466
7567
76-func O (H) = if ((e > H))
77- then -(H)
78- else H
68+func K () = "%s__factoryContract"
7969
8070
81-func P () = "%s__factoryContract"
71+func L () = "%s__managerPublicKey"
8272
8373
84-func Q () = "%s__managerPublicKey"
74+func M () = "%s__pendingManagerPublicKey"
8575
8676
87-func R () = "%s__pendingManagerPublicKey"
77+func N () = "%s%s__price__last"
8878
8979
90-func S () = "%s%s__price__last"
80+func O (P,Q) = makeString(["%s%s%d%d__price__history", toString(P), toString(Q)], f)
9181
9282
93-func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j)
83+func R (S,T) = ((("%s%s%s__P__" + S) + "__") + T)
9484
9585
96-func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y)
86+func U (S,T) = ((("%s%s%s__G__" + S) + "__") + T)
9787
9888
99-func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y)
89+func V () = "%s__amountAsset"
10090
10191
102-func aa () = "%s__amountAsset"
92+func W () = "%s__priceAsset"
10393
10494
105-func ab () = "%s__priceAsset"
95+func X () = "%s__factoryConfig"
10696
10797
108-let ac = "%s__fee"
109-
110-let ad = fraction(5, b, 10000)
111-
112-let ae = valueOrElse(getInteger(this, ac), ad)
113-
114-func af () = "%s__factoryConfig"
98+func Y () = "%s%s__matcher__publicKey"
11599
116100
117-func ag () = "%s%s__matcher__publicKey"
101+func Z (aa) = (("%s%s%s__" + aa) + "__mappings__poolContract2LpAsset")
118102
119103
120-func ah (ai) = (("%s%s%s__" + ai) + "__mappings__poolContract2LpAsset")
104+func ab (ac,ad) = (((("%d%d%s__" + ac) + "__") + ad) + "__config")
121105
122106
123-func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config")
107+func ae (af) = ("%s%s%s__mappings__baseAsset2internalId__" + af)
124108
125109
126-func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an)
110+func ag () = "%s__shutdown"
127111
128112
129-func ao () = "%s__shutdown"
113+func ah (ai) = ("%s%s__poolWeight__" + ai)
130114
131115
132-func ap (aq) = ("%s%s__poolWeight__" + aq)
116+func aj () = "%s__allowedLpScriptHash"
133117
134118
135-func ar () = "%s__allowedLpScriptHash"
119+func ak (al,am,an) = throw(((((("order validation failed: orderValid=" + toString(al)) + " senderValid=") + toString(am)) + " matcherValid=") + toString(an)))
136120
137121
138-let as = "%s__feeCollectorAddress"
139-
140-func at (au,av,aw) = throw(((((("order validation failed: orderValid=" + toString(au)) + " senderValid=") + toString(av)) + " matcherValid=") + toString(aw)))
122+func ao (ap,aq) = valueOrErrorMessage(getString(ap, aq), makeString(["mandatory ", toString(ap), ".", aq, " is not defined"], ""))
141123
142124
143-func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
125+func ar (ap,aq) = valueOrErrorMessage(getInteger(ap, aq), makeString(["mandatory ", toString(ap), ".", aq, " is not defined"], ""))
144126
145127
146-func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], ""))
128+let as = addressFromStringValue(ao(this, K()))
129+
130+func at () = valueOrElse(getBoolean(as, ag()), false)
147131
148132
149-func aB (aC) = throw(makeString(["lp.ride:", aC], " "))
133+func au () = fromBase58String(ao(as, Y()))
150134
151135
152-let aD = addressFromStringValue(ax(this, P()))
153-
154-let aE = addressFromStringValue(ax(aD, as))
155-
156-func aF () = valueOrElse(getBoolean(aD, ao()), false)
157-
158-
159-func aG () = fromBase58String(ax(aD, ag()))
160-
161-
162-func aH () = {
163- let aI = ax(this, aa())
164- let aJ = ax(this, ab())
165- let al = aA(aD, am(aJ))
166- let ak = aA(aD, am(aI))
167- split(ax(aD, aj(toString(ak), toString(al))), j)
136+func av () = {
137+ let aw = ao(this, V())
138+ let ax = ao(this, W())
139+ let ad = ar(as, ae(ax))
140+ let ac = ar(as, ae(aw))
141+ split(ao(as, ab(toString(ac), toString(ad))), f)
168142 }
169143
170144
171-func aK (aL) = if ((aL == i))
172- then unit
173- else fromBase58String(aL)
145+func ay () = split(ao(as, X()), f)
174146
175147
176-func aM (aL) = if ((aL == unit))
177- then i
178- else toBase58String(value(aL))
148+func az (aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(aA), toString(aB), toString(aC), toString(aD), toString(aE), toString(aF), toString(aG), toString(aH), toString(aI), toString(aJ)], f)
179149
180150
181-func aN (aO) = $Tuple7(addressFromStringValue(aO[o]), parseIntValue(aO[p]), fromBase58String(aO[q]), aK(aO[r]), aK(aO[s]), parseIntValue(aO[t]), parseIntValue(aO[u]))
151+func aK (aL,aM,aN,aD,aG,aH) = makeString(["%d%d%d%d%d%d", toString(aL), toString(aM), toString(aN), toString(aD), toString(aG), toString(aH)], f)
182152
183153
184-let aP = aN(aH())
185-
186-let aQ = aP
187-
188-let aR = aQ._1
189-
190-let aS = aQ._2
191-
192-let aT = aQ._3
193-
194-let aU = aQ._4
195-
196-let aV = aQ._5
197-
198-let aW = aQ._6
199-
200-let aX = aQ._7
201-
202-func aY () = split(ax(aD, af()), j)
154+func aO (aP) = if ((aP == "WAVES"))
155+ then wavesBalance(this).available
156+ else assetBalance(this, fromBase58String(aP))
203157
204158
205-let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address")
206-
207-let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address")
208-
209-func bb (bc,bd,be,bf,bg,bh,bi,bj,bk,bl) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bc), toString(bd), toString(be), toString(bf), toString(bg), toString(bh), toString(bi), toString(bj), toString(bk), toString(bl)], j)
159+func aQ (aR,aS) = fraction(aR, d, aS)
210160
211161
212-func bm (bn,bo,bp,bf,bi,bj) = makeString(["%d%d%d%d%d%d", toString(bn), toString(bo), toString(bp), toString(bf), toString(bi), toString(bj)], j)
213-
214-
215-func bq (br) = if ((br == "WAVES"))
216- then wavesBalance(this).available
217- else assetBalance(this, fromBase58String(br))
218-
219-
220-func bs (bt,bu) = fraction(bt, d, bu)
221-
222-
223-func bv (bw,bx,by,bz) = {
224- let bA = D(by, bw)
225- let bB = D(bz, bx)
226- bs(bB, bA)
162+func aT (aU,aV,aW,aX) = {
163+ let aY = z(aW, aU)
164+ let aZ = z(aX, aV)
165+ aQ(aZ, aY)
227166 }
228167
229168
230-func bC (by,bz,bD) = {
231- let bE = aH()
232- let bF = parseIntValue(bE[t])
233- let bG = parseIntValue(bE[u])
234- let bH = bv(bF, bG, by, bz)
235- let bu = D(by, bF)
236- let bt = D(bz, bG)
237- let bI = D(bD, b)
238- let bJ = bs(bu, bI)
239- let bK = bs(bt, bI)
240-[bH, bJ, bK]
169+func ba (aW,aX,bb) = {
170+ let bc = av()
171+ let bd = parseIntValue(bc[p])
172+ let be = parseIntValue(bc[q])
173+ let bf = aT(bd, be, aW, aX)
174+ let aS = z(aW, bd)
175+ let aR = z(aX, be)
176+ let bg = z(bb, b)
177+ let bh = aQ(aS, bg)
178+ let bi = aQ(aR, bg)
179+[bf, bh, bi]
241180 }
242181
243182
244-func bL (by,bz,bD) = {
245- let bM = bC(by, bz, bD)
246-[G(bM[0], b), G(bM[1], b), G(bM[2], b)]
183+func bj (aW,aX,bb) = {
184+ let bk = ba(aW, aX, bb)
185+[C(bk[0], b), C(bk[1], b), C(bk[2], b)]
247186 }
248187
249188
250-func bN (bO,bP,bQ,X) = {
251- let bE = aH()
252- let bR = bE[q]
253- let bS = bE[r]
254- let bT = bE[s]
255- let bw = parseIntValue(bE[t])
256- let bx = parseIntValue(bE[u])
257- let bU = bE[p]
258- let bV = valueOrErrorMessage(assetInfo(fromBase58String(bR)), (("Asset " + bR) + " doesn't exist")).quantity
259- if ((bR != bP))
189+func bl (bm,bn,bo,S) = {
190+ let bc = av()
191+ let bp = bc[m]
192+ let bq = bc[n]
193+ let br = bc[o]
194+ let aU = parseIntValue(bc[p])
195+ let aV = parseIntValue(bc[q])
196+ let bs = bc[l]
197+ let bt = valueOrErrorMessage(assetInfo(fromBase58String(bp)), (("Asset " + bp) + " doesn't exist")).quantity
198+ if ((bp != bn))
260199 then throw("Invalid asset passed.")
261200 else {
262- let bW = bq(bS)
263- let bX = D(bW, bw)
264- let bY = bq(bT)
265- let bZ = D(bY, bx)
266- let ca = bs(bZ, bX)
267- let cb = G(ca, b)
268- let cc = D(bQ, b)
269- let cd = D(bV, b)
270- let ce = fraction(bX, cc, cd)
271- let cf = fraction(bZ, cc, cd)
272- let cg = G(ce, bw)
273- let ch = G(cf, bx)
274- let ci = if ((bO == ""))
201+ let bu = aO(bq)
202+ let bv = z(bu, aU)
203+ let bw = aO(br)
204+ let bx = z(bw, aV)
205+ let by = aQ(bx, bv)
206+ let bz = C(by, b)
207+ let bA = z(bo, b)
208+ let bB = z(bt, b)
209+ let bC = fraction(bv, bA, bB)
210+ let bD = fraction(bx, bA, bB)
211+ let bE = C(bC, aU)
212+ let bF = C(bD, aV)
213+ let bG = if ((bm == ""))
275214 then nil
276- else [ScriptTransfer(X, cg, if ((bS == "WAVES"))
215+ else [ScriptTransfer(S, bE, if ((bq == "WAVES"))
277216 then unit
278- else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES"))
217+ else fromBase58String(bq)), ScriptTransfer(S, bF, if ((br == "WAVES"))
279218 then unit
280- else fromBase58String(bT)), StringEntry(Z(toString(X), bO), bm(cg, ch, bQ, cb, height, lastBlock.timestamp)), IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb)]
281- $Tuple10(cg, ch, bS, bT, bW, bY, bV, ca, bU, ci)
219+ else fromBase58String(br)), StringEntry(U(toString(S), bm), aK(bE, bF, bo, bz, height, lastBlock.timestamp)), IntegerEntry(N(), bz), IntegerEntry(O(height, lastBlock.timestamp), bz)]
220+ $Tuple10(bE, bF, bq, br, bu, bw, bt, by, bs, bG)
282221 }
283222 }
284223
285224
286-func cj (bO,ck,cl,cm,cn,co,X,cp,cq) = {
287- let bE = aH()
288- let bR = fromBase58String(bE[q])
289- let cr = bE[r]
290- let cs = bE[s]
291- let ct = bE[v]
292- let cu = bE[w]
293- let bF = parseIntValue(bE[t])
294- let bG = parseIntValue(bE[u])
295- let bU = bE[p]
296- let bV = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
297- let cv = toBase58String(valueOrElse(cm, fromBase58String("WAVES")))
298- let cw = toBase58String(valueOrElse(co, fromBase58String("WAVES")))
299- if (if ((cr != cv))
225+func bH (bm,bI,bJ,bK,bL,bM,S,bN,bO) = {
226+ let bc = av()
227+ let bp = fromBase58String(bc[m])
228+ let bP = bc[n]
229+ let bQ = bc[o]
230+ let bR = bc[r]
231+ let bS = bc[s]
232+ let bd = parseIntValue(bc[p])
233+ let be = parseIntValue(bc[q])
234+ let bs = bc[l]
235+ let bt = valueOrErrorMessage(assetInfo(bp), (("Asset " + toBase58String(bp)) + " doesn't exist")).quantity
236+ let bT = toBase58String(valueOrElse(bK, fromBase58String("WAVES")))
237+ let bU = toBase58String(valueOrElse(bM, fromBase58String("WAVES")))
238+ if (if ((bP != bT))
300239 then true
301- else (cs != cw))
240+ else (bQ != bU))
302241 then throw("Invalid amt or price asset passed.")
303242 else {
304- let bW = if (cp)
305- then bq(cr)
306- else (bq(cr) - cl)
307- let bY = if (cp)
308- then bq(cs)
309- else (bq(cs) - cn)
310- let cx = D(cl, bF)
311- let cy = D(cn, bG)
312- let cz = bs(cy, cx)
313- let bX = D(bW, bF)
314- let bZ = D(bY, bG)
315- let cA = if ((bV == 0))
243+ let bu = if (bN)
244+ then aO(bP)
245+ else (aO(bP) - bJ)
246+ let bw = if (bN)
247+ then aO(bQ)
248+ else (aO(bQ) - bL)
249+ let bV = z(bJ, bd)
250+ let bW = z(bL, be)
251+ let bX = aQ(bW, bV)
252+ let bv = z(bu, bd)
253+ let bx = z(bw, be)
254+ let bY = if ((bt == 0))
316255 then {
317- let ca = e
318- let cB = e
319- let bI = pow((cx * cy), 0, toBigInt(5), 1, 0, DOWN)
320- $Tuple5(G(bI, b), G(cx, bF), G(cy, bG), bs((bZ + cy), (bX + cx)), cB)
256+ let by = e
257+ let bZ = e
258+ let bg = pow((bV * bW), 0, toBigInt(5), 1, 0, DOWN)
259+ $Tuple5(C(bg, b), C(bV, bd), C(bW, be), aQ((bx + bW), (bv + bV)), bZ)
321260 }
322261 else {
323- let ca = bs(bZ, bX)
324- let cB = fraction(O((ca - cz)), d, ca)
325- let cC = D(ck, b)
326- if (if ((ca != e))
327- then (cB > cC)
262+ let by = aQ(bx, bv)
263+ let bZ = fraction(J((by - bX)), d, by)
264+ let ca = z(bI, b)
265+ if (if ((by != e))
266+ then (bZ > ca)
328267 else false)
329- then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC)))
268+ then throw(((("Price slippage " + toString(bZ)) + " exceeded the passed limit of ") + toString(ca)))
330269 else {
331- let cd = D(bV, b)
332- let cD = fraction(cx, ca, d)
333- let cE = fraction(cy, d, ca)
334- let cF = if ((cD > cy))
335- then $Tuple2(cE, cy)
336- else $Tuple2(cx, cD)
337- let cG = cF._1
338- let cH = cF._2
339- let bI = fraction(cd, cH, bZ)
340- $Tuple5(G(bI, b), G(cG, bF), G(cH, bG), ca, cB)
270+ let bB = z(bt, b)
271+ let cb = fraction(bV, by, d)
272+ let cc = fraction(bW, d, by)
273+ let cd = if ((cb > bW))
274+ then $Tuple2(cc, bW)
275+ else $Tuple2(bV, cb)
276+ let ce = cd._1
277+ let cf = cd._2
278+ let bg = fraction(bB, cf, bx)
279+ $Tuple5(C(bg, b), C(ce, bd), C(cf, be), by, bZ)
341280 }
342281 }
343- let cI = cA._1
344- let cJ = cA._2
345- let cK = cA._3
346- let cb = G(cA._4, b)
347- let cL = G(cA._5, b)
348- if ((0 >= cI))
282+ let cg = bY._1
283+ let ch = bY._2
284+ let ci = bY._3
285+ let bz = C(bY._4, b)
286+ let cj = C(bY._5, b)
287+ if ((0 >= cg))
349288 then throw("Invalid calculations. LP calculated is less than zero.")
350289 else {
351- let cM = if (!(cq))
290+ let ck = if (!(bO))
352291 then 0
353- else cI
354- let cN = (cl - cJ)
355- let cO = (cn - cK)
356- let cP = [IntegerEntry(S(), cb), IntegerEntry(T(height, lastBlock.timestamp), cb), StringEntry(W(X, bO), bb(cJ, cK, cM, cb, ck, cL, height, lastBlock.timestamp, cN, cO))]
357- $Tuple13(cI, cM, cb, bW, bY, bV, bR, bU, cP, cN, cO, cm, co)
292+ else cg
293+ let cl = (bJ - ch)
294+ let cm = (bL - ci)
295+ let cn = [IntegerEntry(N(), bz), IntegerEntry(O(height, lastBlock.timestamp), bz), StringEntry(R(S, bm), az(ch, ci, ck, bz, bI, cj, height, lastBlock.timestamp, cl, cm))]
296+ $Tuple13(cg, ck, bz, bu, bw, bt, bp, bs, cn, cl, cm, bK, bM)
358297 }
359298 }
360299 }
361300
362301
363-func cQ (cR) = {
364- let bE = aH()
365- let cS = bE[r]
366- let cT = bE[s]
367- let bU = parseIntValue(bE[p])
368- let bF = parseIntValue(bE[t])
369- let bG = parseIntValue(bE[u])
370- let cU = bq(cS)
371- let cV = bq(cT)
372- let ca = if ((cR.orderType == Buy))
373- then bv(bF, bG, (cU + cR.amount), cV)
374- else bv(bF, bG, (cU - cR.amount), cV)
375- let cb = G(ca, b)
376- if (if (if (aF())
302+func co (cp) = {
303+ let bc = av()
304+ let cq = bc[n]
305+ let cr = bc[o]
306+ let bs = parseIntValue(bc[l])
307+ let bd = parseIntValue(bc[p])
308+ let be = parseIntValue(bc[q])
309+ let cs = aO(cq)
310+ let ct = aO(cr)
311+ let by = if ((cp.orderType == Buy))
312+ then aT(bd, be, (cs + cp.amount), ct)
313+ else aT(bd, be, (cs - cp.amount), ct)
314+ let bz = C(by, b)
315+ if (if (if (at())
377316 then true
378- else (bU == m))
317+ else (bs == i))
379318 then true
380- else (bU == n))
319+ else (bs == j))
381320 then throw("Exchange operations disabled")
382321 else {
383- let cW = cR.assetPair.amountAsset
384- let cX = if ((cW == unit))
322+ let cu = cp.assetPair.amountAsset
323+ let cv = if ((cu == unit))
385324 then "WAVES"
386- else toBase58String(value(cW))
387- let cY = cR.assetPair.priceAsset
388- let cZ = if ((cY == unit))
325+ else toBase58String(value(cu))
326+ let cw = cp.assetPair.priceAsset
327+ let cx = if ((cw == unit))
389328 then "WAVES"
390- else toBase58String(value(cY))
391- if (if ((cX != cS))
329+ else toBase58String(value(cw))
330+ if (if ((cv != cq))
392331 then true
393- else (cZ != cT))
332+ else (cx != cr))
394333 then throw("Wrong order assets.")
395334 else {
396- let da = cR.price
397- let db = fraction(b, bG, bF)
398- let dc = J(da, b, db)
399- let dd = if ((cR.orderType == Buy))
400- then (cb >= dc)
401- else (dc >= cb)
335+ let cy = cp.price
336+ let cz = fraction(b, be, bd)
337+ let cA = F(cy, b, cz)
338+ let cB = if ((cp.orderType == Buy))
339+ then (bz >= cA)
340+ else (cA >= bz)
402341 true
403342 }
404343 }
405344 }
406345
407346
408-func de (df) = if ((size(df.payments) != 1))
347+func cC (cD) = if ((size(cD.payments) != 1))
409348 then throw("exactly 1 payment is expected")
410349 else {
411- let dg = value(df.payments[0])
412- let bP = value(dg.assetId)
413- let dh = dg.amount
414- let cA = bN(toBase58String(df.transactionId), toBase58String(bP), dh, df.caller)
415- let cg = cA._1
416- let ch = cA._2
417- let bU = parseIntValue(cA._9)
418- let ci = cA._10
419- if (if (aF())
350+ let cE = value(cD.payments[0])
351+ let bn = value(cE.assetId)
352+ let cF = cE.amount
353+ let bY = bl(toBase58String(cD.transactionId), toBase58String(bn), cF, cD.caller)
354+ let bE = bY._1
355+ let bF = bY._2
356+ let bs = parseIntValue(bY._9)
357+ let bG = bY._10
358+ if (if (at())
420359 then true
421- else (bU == n))
422- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
423- else $Tuple5(cg, ch, dh, bP, ci)
360+ else (bs == j))
361+ then throw(("Get operation is blocked by admin. Status = " + toString(bs)))
362+ else $Tuple5(bE, bF, cF, bn, bG)
424363 }
425364
426365
427-func di (df,ck,cq) = if ((size(df.payments) != 2))
366+func cG (cD,bI,bO) = if ((size(cD.payments) != 2))
428367 then throw("exactly 2 payments are expected")
429368 else {
430- let dj = value(df.payments[0])
431- let dk = value(df.payments[1])
432- let dl = cj(toBase58String(df.transactionId), ck, dj.amount, dj.assetId, dk.amount, dk.assetId, toString(df.caller), false, cq)
433- let bU = parseIntValue(dl._8)
434- if (if (if (aF())
369+ let cH = value(cD.payments[0])
370+ let cI = value(cD.payments[1])
371+ let cJ = bH(toBase58String(cD.transactionId), bI, cH.amount, cH.assetId, cI.amount, cI.assetId, toString(cD.caller), false, bO)
372+ let bs = parseIntValue(cJ._8)
373+ if (if (if (at())
435374 then true
436- else (bU == l))
375+ else (bs == h))
437376 then true
438- else (bU == n))
439- then throw(("Put operation is blocked by admin. Status = " + toString(bU)))
440- else dl
377+ else (bs == j))
378+ then throw(("Put operation is blocked by admin. Status = " + toString(bs)))
379+ else cJ
441380 }
442381
443382
444-func dm (dn) = {
445- let do = invoke(aD, "emit", [dn], nil)
446- if ((do == do))
383+func cK () = {
384+ let cL = getString(L())
385+ if ($isInstanceOf(cL, "String"))
447386 then {
448- let dp = {
449- let dq = do
450- if ($isInstanceOf(dq, "Address"))
451- then {
452- let dr = dq
453- invoke(dr, "emit", [dn], nil)
454- }
455- else unit
456- }
457- if ((dp == dp))
458- then dn
459- else throw("Strict value is not equal to itself.")
387+ let cM = cL
388+ fromBase58String(cM)
460389 }
461- else throw("Strict value is not equal to itself.")
462- }
463-
464-
465-func ds (dn) = {
466- let dt = fraction(dn, ae, b)
467- $Tuple2((dn - dt), dt)
468- }
469-
470-
471-func du (dv,dw,X,Y) = {
472- let dx = (Y == unit)
473- let dy = bq(aM(aU))
474- let dz = bq(aM(aV))
475- let dA = if ((dw == aU))
476- then true
477- else if ((dw == aV))
478- then false
479- else aB("invalid asset")
480- let dB = if (dx)
481- then $Tuple2(dy, dz)
482- else if (dA)
483- then $Tuple2((dy - dv), dz)
484- else $Tuple2(dy, (dz - dv))
485- let dC = dB._1
486- let dD = dB._2
487- let dE = if (dA)
488- then $Tuple2(dv, 0)
489- else $Tuple2(0, dv)
490- let dF = dE._1
491- let dG = dE._2
492- let dH = ds(dF)._1
493- let dI = ds(dG)._1
494- let dJ = ds(dv)
495- let dK = dJ._1
496- let dt = dJ._2
497- let dL = (dC + dH)
498- let dM = (dD + dI)
499- let dN = bs(D(dM, aX), D(dL, aW))
500- let dO = G(dN, b)
501- let dP = if (dA)
502- then dC
503- else dD
504- let dQ = toBigInt(dP)
505- let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
506- let dS = if ((dR > f))
507- then true
508- else aB("initial deposit requires all coins")
509- if ((dS == dS))
510- then {
511- let dT = toBigInt(dK)
512- let dU = max([0, toInt(((dR * (sqrtBigInt((d + ((dT * d) / dQ)), 18, 18, DOWN) - d)) / d))])
513- let cP = if (dx)
514- then nil
515- else [IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bb(dF, dG, dU, dO, 0, 0, height, lastBlock.timestamp, 0, 0))]
516- let dV = bs(D(dD, aX), D(dC, aW))
517- let dW = G(dV, b)
518- let dX = N((((dO - dW) * b) / dW))
519- $Tuple4(dU, cP, dt, dX)
520- }
521- else throw("Strict value is not equal to itself.")
522- }
523-
524-
525-func dY (dZ,dK,dw,X,Y) = {
526- let dx = (Y == unit)
527- let ea = [if ((dw == aT))
528- then true
529- else aB("invalid lp asset")]
530- if ((ea == ea))
531- then {
532- let eb = if ((dZ == aU))
533- then true
534- else if ((dZ == aV))
535- then false
536- else aB("invalid asset")
537- let ec = if (eb)
538- then toBigInt(bq(aM(aU)))
539- else toBigInt(bq(aM(aV)))
540- let ed = bq(aM(aU))
541- let ee = bq(aM(aV))
542- let ef = if (eb)
543- then ed
544- else ee
545- let eg = toBigInt(ef)
546- let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity)
547- let eh = toBigInt(dK)
548- let ei = max([0, toInt(((ec * (d - pow((d - ((eh * d) / dR)), 18, h, 0, 18, DOWN))) / d))])
549- let ej = ds(ei)
550- let ek = ej._1
551- let dt = ej._2
552- let el = if (eb)
553- then $Tuple4(ek, 0, (ed - ei), ee)
554- else $Tuple4(0, ek, ed, (ee - ei))
555- let em = el._1
556- let en = el._2
557- let eo = el._3
558- let ep = el._4
559- let dN = bs(D(ep, aX), D(eo, aW))
560- let dO = G(dN, b)
561- let cP = if (dx)
562- then nil
563- else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(em, en, dK, dO, height, lastBlock.timestamp)), IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO)]
564- let dV = bs(D(ee, aX), D(ed, aW))
565- let dW = G(dV, b)
566- let dX = N((((dO - dW) * b) / dW))
567- $Tuple4(ek, cP, dt, dX)
568- }
569- else throw("Strict value is not equal to itself.")
570- }
571-
572-
573-func eq () = {
574- let dq = getString(Q())
575- if ($isInstanceOf(dq, "String"))
576- then {
577- let er = dq
578- fromBase58String(er)
579- }
580- else if ($isInstanceOf(dq, "Unit"))
390+ else if ($isInstanceOf(cL, "Unit"))
581391 then unit
582392 else throw("Match error")
583393 }
584394
585395
586-func es () = {
587- let dq = getString(R())
588- if ($isInstanceOf(dq, "String"))
396+func cN () = {
397+ let cL = getString(M())
398+ if ($isInstanceOf(cL, "String"))
589399 then {
590- let er = dq
591- fromBase58String(er)
400+ let cM = cL
401+ fromBase58String(cM)
592402 }
593- else if ($isInstanceOf(dq, "Unit"))
403+ else if ($isInstanceOf(cL, "Unit"))
594404 then unit
595405 else throw("Match error")
596406 }
597407
598408
599-func et (df) = {
600- let eu = throw("Permission denied")
601- let dq = eq()
602- if ($isInstanceOf(dq, "ByteVector"))
409+func cO (cD) = {
410+ let cP = throw("Permission denied")
411+ let cL = cK()
412+ if ($isInstanceOf(cL, "ByteVector"))
603413 then {
604- let ev = dq
605- if ((df.callerPublicKey == ev))
414+ let cQ = cL
415+ if ((cD.callerPublicKey == cQ))
606416 then true
607- else eu
417+ else cP
608418 }
609- else if ($isInstanceOf(dq, "Unit"))
610- then if ((df.caller == this))
419+ else if ($isInstanceOf(cL, "Unit"))
420+ then if ((cD.caller == this))
611421 then true
612- else eu
422+ else cP
613423 else throw("Match error")
614424 }
615425
616426
617-@Callable(df)
618-func setManager (ew) = {
619- let ex = et(df)
620- if ((ex == ex))
427+@Callable(cD)
428+func constructor (as) = {
429+ let cR = cO(cD)
430+ if ((cR == cR))
431+ then [StringEntry(K(), as)]
432+ else throw("Strict value is not equal to itself.")
433+ }
434+
435+
436+
437+@Callable(cD)
438+func setManager (cS) = {
439+ let cR = cO(cD)
440+ if ((cR == cR))
621441 then {
622- let ey = fromBase58String(ew)
623- if ((ey == ey))
624- then [StringEntry(R(), ew)]
442+ let cT = fromBase58String(cS)
443+ if ((cT == cT))
444+ then [StringEntry(M(), cS)]
625445 else throw("Strict value is not equal to itself.")
626446 }
627447 else throw("Strict value is not equal to itself.")
628448 }
629449
630450
631451
632-@Callable(df)
452+@Callable(cD)
633453 func confirmManager () = {
634- let ez = es()
635- let eA = if (isDefined(ez))
454+ let cU = cN()
455+ let cV = if (isDefined(cU))
636456 then true
637457 else throw("No pending manager")
638- if ((eA == eA))
458+ if ((cV == cV))
639459 then {
640- let eB = if ((df.callerPublicKey == value(ez)))
460+ let cW = if ((cD.callerPublicKey == value(cU)))
641461 then true
642462 else throw("You are not pending manager")
643- if ((eB == eB))
644- then [StringEntry(Q(), toBase58String(value(ez))), DeleteEntry(R())]
463+ if ((cW == cW))
464+ then [StringEntry(L(), toBase58String(value(cU))), DeleteEntry(M())]
645465 else throw("Strict value is not equal to itself.")
646466 }
647467 else throw("Strict value is not equal to itself.")
648468 }
649469
650470
651471
652-@Callable(df)
653-func put (ck,eC) = if ((0 > ck))
654- then throw("Invalid slippageTolerance passed")
472+@Callable(cD)
473+func put (bI,cX) = {
474+ let cY = ay()
475+ let cZ = valueOrErrorMessage(addressFromString(cY[x]), "Error. Incorrect staking address.")
476+ let da = valueOrErrorMessage(addressFromString(cY[y]), "Error. Incorrect slippage contract address.")
477+ if ((0 > bI))
478+ then throw("Invalid slippageTolerance passed")
479+ else {
480+ let cJ = cG(cD, bI, true)
481+ let ck = cJ._2
482+ let bp = cJ._7
483+ let bG = cJ._9
484+ let cl = cJ._10
485+ let cm = cJ._11
486+ let db = cJ._12
487+ let dc = cJ._13
488+ let dd = invoke(as, "emit", [ck], nil)
489+ if ((dd == dd))
490+ then {
491+ let de = {
492+ let cL = dd
493+ if ($isInstanceOf(cL, "Address"))
494+ then {
495+ let df = cL
496+ invoke(df, "emit", [ck], nil)
497+ }
498+ else unit
499+ }
500+ if ((de == de))
501+ then {
502+ let dg = if ((cl > 0))
503+ then invoke(da, "put", nil, [AttachedPayment(db, cl)])
504+ else nil
505+ if ((dg == dg))
506+ then {
507+ let dh = if ((cm > 0))
508+ then invoke(da, "put", nil, [AttachedPayment(dc, cm)])
509+ else nil
510+ if ((dh == dh))
511+ then {
512+ let di = if (cX)
513+ then {
514+ let dj = invoke(cZ, "stake", nil, [AttachedPayment(bp, ck)])
515+ if ((dj == dj))
516+ then nil
517+ else throw("Strict value is not equal to itself.")
518+ }
519+ else [ScriptTransfer(cD.caller, ck, bp)]
520+ (bG ++ di)
521+ }
522+ else throw("Strict value is not equal to itself.")
523+ }
524+ else throw("Strict value is not equal to itself.")
525+ }
526+ else throw("Strict value is not equal to itself.")
527+ }
528+ else throw("Strict value is not equal to itself.")
529+ }
530+ }
531+
532+
533+
534+@Callable(cD)
535+func putForFree (dk) = if ((0 > dk))
536+ then throw("Invalid value passed")
655537 else {
656- let dl = di(df, ck, true)
657- let cM = dl._2
658- let bR = dl._7
659- let ci = dl._9
660- let cN = dl._10
661- let cO = dl._11
662- let eD = dl._12
663- let eE = dl._13
664- let do = invoke(aD, "emit", [cM], nil)
665- if ((do == do))
666- then {
667- let dp = {
668- let dq = do
669- if ($isInstanceOf(dq, "Address"))
670- then {
671- let dr = dq
672- invoke(dr, "emit", [cM], nil)
673- }
674- else unit
675- }
676- if ((dp == dp))
677- then {
678- let eF = if ((cN > 0))
679- then invoke(ba, "put", nil, [AttachedPayment(eD, cN)])
680- else nil
681- if ((eF == eF))
682- then {
683- let eG = if ((cO > 0))
684- then invoke(ba, "put", nil, [AttachedPayment(eE, cO)])
685- else nil
686- if ((eG == eG))
687- then {
688- let eH = if (eC)
689- then {
690- let eI = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)])
691- if ((eI == eI))
692- then nil
693- else throw("Strict value is not equal to itself.")
694- }
695- else [ScriptTransfer(df.caller, cM, bR)]
696- (ci ++ eH)
697- }
698- else throw("Strict value is not equal to itself.")
699- }
700- else throw("Strict value is not equal to itself.")
701- }
702- else throw("Strict value is not equal to itself.")
703- }
704- else throw("Strict value is not equal to itself.")
538+ let cJ = cG(cD, dk, false)
539+ cJ._9
705540 }
706541
707542
708543
709-@Callable(df)
710-func putForFree (eJ) = if ((0 > eJ))
711- then throw("Invalid value passed")
712- else {
713- let dl = di(df, eJ, false)
714- dl._9
715- }
716-
717-
718-
719-@Callable(df)
720-func putOneTkn (eK,eL) = {
721- let eM = {
722- let eN = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
723- if ($isInstanceOf(eN, "Boolean"))
724- then eN
725- else throw(($getType(eN) + " couldn't be cast to Boolean"))
726- }
727- let eO = if (if (if (aF())
728- then true
729- else (aS == l))
730- then true
731- else (aS == n))
732- then true
733- else eM
734- let ea = [if (!(eO))
735- then true
736- else aB("put operation is blocked by admin"), if ((size(df.payments) == 1))
737- then true
738- else aB("exactly 1 payment are expected")]
739- if ((ea == ea))
740- then {
741- let eP = df.payments[0]
742- let dw = eP.assetId
743- let dv = eP.amount
744- let X = df.caller
745- let Y = df.transactionId
746- let eQ = du(dv, dw, X, Y)
747- let eR = eQ._1
748- let cP = eQ._2
749- let dt = eQ._3
750- let eS = eQ._4
751- let eT = if (if ((eK > 0))
752- then (eK > eR)
753- else false)
754- then aB(makeString(["amount to receive is less than ", toString(eK)], ""))
755- else eR
756- let do = dm(eT)
757- if ((do == do))
758- then {
759- let eH = if (eL)
760- then {
761- let eU = invoke(aZ, "stake", nil, [AttachedPayment(aT, eT)])
762- if ((eU == eU))
763- then nil
764- else throw("Strict value is not equal to itself.")
765- }
766- else [ScriptTransfer(df.caller, eT, aT)]
767- let eV = if ((dt > 0))
768- then [ScriptTransfer(aE, dt, dw)]
769- else nil
770- $Tuple2(((cP ++ eH) ++ eV), eT)
771- }
772- else throw("Strict value is not equal to itself.")
773- }
544+@Callable(cD)
545+func get () = {
546+ let bY = cC(cD)
547+ let dl = bY._1
548+ let bF = bY._2
549+ let cF = bY._3
550+ let bn = bY._4
551+ let bG = bY._5
552+ let dm = invoke(as, "burn", [cF], [AttachedPayment(bn, cF)])
553+ if ((dm == dm))
554+ then bG
774555 else throw("Strict value is not equal to itself.")
775556 }
776557
777558
778559
779-@Callable(df)
780-func putOneTknREADONLY (dw,dv) = {
781- let eW = du(dv, aK(dw), unit, unit)
782- let eR = eW._1
783- let cP = eW._2
784- let dt = eW._3
785- let eS = eW._4
786- $Tuple2(nil, $Tuple3(eR, dt, eS))
787- }
788-
789-
790-
791-@Callable(df)
792-func getOneTkn (eX,eK) = {
793- let eM = {
794- let eN = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
795- if ($isInstanceOf(eN, "Boolean"))
796- then eN
797- else throw(($getType(eN) + " couldn't be cast to Boolean"))
798- }
799- let eY = if (if (aF())
800- then true
801- else (aS == n))
802- then true
803- else eM
804- let ea = [if (!(eY))
805- then true
806- else aB("get operation is blocked by admin"), if ((size(df.payments) == 1))
807- then true
808- else aB("exactly 1 payment are expected")]
809- if ((ea == ea))
810- then {
811- let dZ = aK(eX)
812- let eP = df.payments[0]
813- let dw = eP.assetId
814- let dK = eP.amount
815- let X = df.caller
816- let Y = df.transactionId
817- let eZ = dY(dZ, dK, dw, X, Y)
818- let fa = eZ._1
819- let cP = eZ._2
820- let dt = eZ._3
821- let eS = eZ._4
822- let dn = if (if ((eK > 0))
823- then (eK > fa)
824- else false)
825- then aB(makeString(["amount to receive is less than ", toString(eK)], ""))
826- else fa
827- let fb = invoke(aD, "burn", [dK], [AttachedPayment(dw, dK)])
828- if ((fb == fb))
829- then {
830- let fc = [ScriptTransfer(X, dn, dZ)]
831- let eV = if ((dt > 0))
832- then [ScriptTransfer(aE, dt, dZ)]
833- else nil
834- $Tuple2(((cP ++ fc) ++ eV), dn)
835- }
836- else throw("Strict value is not equal to itself.")
837- }
838- else throw("Strict value is not equal to itself.")
839- }
840-
841-
842-
843-@Callable(df)
844-func getOneTknREADONLY (dZ,dK) = {
845- let fd = dY(aK(dZ), dK, aT, unit, unit)
846- let fa = fd._1
847- let cP = fd._2
848- let dt = fd._3
849- let eS = fd._4
850- $Tuple2(nil, $Tuple3(fa, dt, eS))
851- }
852-
853-
854-
855-@Callable(df)
856-func unstakeAndGetOneTkn (fe,eX,eK) = {
857- let eM = {
858- let eN = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
859- if ($isInstanceOf(eN, "Boolean"))
860- then eN
861- else throw(($getType(eN) + " couldn't be cast to Boolean"))
862- }
863- let eY = if (if (aF())
864- then true
865- else (aS == n))
866- then true
867- else eM
868- let ea = [if (!(eY))
869- then true
870- else aB("get operation is blocked by admin"), if ((size(df.payments) == 0))
871- then true
872- else aB("no payments are expected")]
873- if ((ea == ea))
874- then {
875- let dZ = aK(eX)
876- let X = df.caller
877- let Y = df.transactionId
878- let ff = invoke(aZ, "unstake", [toBase58String(aT), fe], nil)
879- if ((ff == ff))
880- then {
881- let fg = dY(dZ, fe, aT, X, Y)
882- let fa = fg._1
883- let cP = fg._2
884- let dt = fg._3
885- let eS = fg._4
886- let dn = if (if ((eK > 0))
887- then (eK > fa)
888- else false)
889- then aB(makeString(["amount to receive is less than ", toString(eK)], ""))
890- else fa
891- let fb = invoke(aD, "burn", [fe], [AttachedPayment(aT, fe)])
892- if ((fb == fb))
893- then {
894- let fc = [ScriptTransfer(df.caller, dn, dZ)]
895- let eV = if ((dt > 0))
896- then [ScriptTransfer(aE, dt, dZ)]
897- else nil
898- $Tuple2(((cP ++ fc) ++ eV), dn)
899- }
900- else throw("Strict value is not equal to itself.")
901- }
902- else throw("Strict value is not equal to itself.")
903- }
904- else throw("Strict value is not equal to itself.")
905- }
906-
907-
908-
909-@Callable(df)
910-func get () = {
911- let cA = de(df)
912- let fh = cA._1
913- let ch = cA._2
914- let dh = cA._3
915- let bP = cA._4
916- let ci = cA._5
917- let fi = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
918- if ((fi == fi))
919- then ci
920- else throw("Strict value is not equal to itself.")
921- }
922-
923-
924-
925-@Callable(df)
926-func getNoLess (fj,fk) = {
927- let cA = de(df)
928- let cg = cA._1
929- let ch = cA._2
930- let dh = cA._3
931- let bP = cA._4
932- let ci = cA._5
933- if ((fj > cg))
934- then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fj)))
935- else if ((fk > ch))
936- then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fk)))
560+@Callable(cD)
561+func getNoLess (dn,do) = {
562+ let bY = cC(cD)
563+ let bE = bY._1
564+ let bF = bY._2
565+ let cF = bY._3
566+ let bn = bY._4
567+ let bG = bY._5
568+ if ((dn > bE))
569+ then throw(((("noLessThenAmtAsset failed: " + toString(bE)) + " < ") + toString(dn)))
570+ else if ((do > bF))
571+ then throw(((("noLessThenPriceAsset failed: " + toString(bF)) + " < ") + toString(do)))
937572 else {
938- let fi = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)])
939- if ((fi == fi))
940- then ci
573+ let dm = invoke(as, "burn", [cF], [AttachedPayment(bn, cF)])
574+ if ((dm == dm))
575+ then bG
941576 else throw("Strict value is not equal to itself.")
942577 }
943578 }
944579
945580
946581
947-@Callable(df)
948-func unstakeAndGet (dn) = {
949- let fl = if ((size(df.payments) != 0))
582+@Callable(cD)
583+func unstakeAndGet (dp) = {
584+ let dq = if ((size(cD.payments) != 0))
950585 then throw("No payments are expected")
951586 else true
952- if ((fl == fl))
587+ if ((dq == dq))
953588 then {
954- let bE = aH()
955- let bR = fromBase58String(bE[q])
956- let ff = invoke(aZ, "unstake", [toBase58String(bR), dn], nil)
957- if ((ff == ff))
589+ let bc = av()
590+ let cY = ay()
591+ let bp = fromBase58String(bc[m])
592+ let cZ = valueOrErrorMessage(addressFromString(cY[x]), "Error. Incorrect staking address.")
593+ let dr = invoke(cZ, "unstake", [toBase58String(bp), dp], nil)
594+ if ((dr == dr))
958595 then {
959- let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller)
960- let bU = parseIntValue(cA._9)
961- let ci = cA._10
962- let fm = if (if (aF())
596+ let bY = bl(toBase58String(cD.transactionId), toBase58String(bp), dp, cD.caller)
597+ let bs = parseIntValue(bY._9)
598+ let bG = bY._10
599+ let ds = if (if (at())
963600 then true
964- else (bU == n))
965- then throw(("Get operation is blocked by admin. Status = " + toString(bU)))
601+ else (bs == j))
602+ then throw(("Get operation is blocked by admin. Status = " + toString(bs)))
966603 else true
967- if ((fm == fm))
604+ if ((ds == ds))
968605 then {
969- let fi = invoke(aD, "burn", [dn], [AttachedPayment(bR, dn)])
970- if ((fi == fi))
971- then ci
606+ let dm = invoke(as, "burn", [dp], [AttachedPayment(bp, dp)])
607+ if ((dm == dm))
608+ then bG
972609 else throw("Strict value is not equal to itself.")
973610 }
974611 else throw("Strict value is not equal to itself.")
975612 }
976613 else throw("Strict value is not equal to itself.")
977614 }
978615 else throw("Strict value is not equal to itself.")
979616 }
980617
981618
982619
983-@Callable(df)
984-func activate (fn,fo) = if ((toString(df.caller) != toString(aD)))
620+@Callable(cD)
621+func activate (dt,du) = if ((toString(cD.caller) != toString(as)))
985622 then throw("permissions denied")
986- else $Tuple2([StringEntry(aa(), fn), StringEntry(ab(), fo)], "success")
623+ else $Tuple2([StringEntry(V(), dt), StringEntry(W(), du)], "success")
987624
988625
989626
990-@Callable(df)
991-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH())
627+@Callable(cD)
628+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, av())
992629
993630
994631
995-@Callable(df)
996-func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br))
632+@Callable(cD)
633+func getAccBalanceWrapperREADONLY (aP) = $Tuple2(nil, aO(aP))
997634
998635
999636
1000-@Callable(df)
1001-func calcPricesWrapperREADONLY (by,bz,bD) = {
1002- let bM = bC(by, bz, bD)
1003- $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])])
637+@Callable(cD)
638+func calcPricesWrapperREADONLY (aW,aX,bb) = {
639+ let bk = ba(aW, aX, bb)
640+ $Tuple2(nil, [toString(bk[0]), toString(bk[1]), toString(bk[2])])
1004641 }
1005642
1006643
1007644
1008-@Callable(df)
1009-func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F)))
645+@Callable(cD)
646+func toX18WrapperREADONLY (A,B) = $Tuple2(nil, toString(z(A, B)))
1010647
1011648
1012649
1013-@Callable(df)
1014-func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I))
650+@Callable(cD)
651+func fromX18WrapperREADONLY (D,E) = $Tuple2(nil, C(parseBigIntValue(D), E))
1015652
1016653
1017654
1018-@Callable(df)
1019-func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu))))
655+@Callable(cD)
656+func calcPriceBigIntWrapperREADONLY (aR,aS) = $Tuple2(nil, toString(aQ(parseBigIntValue(aR), parseBigIntValue(aS))))
1020657
1021658
1022659
1023-@Callable(df)
1024-func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq))
660+@Callable(cD)
661+func estimatePutOperationWrapperREADONLY (bm,bI,bJ,bK,bL,bM,S,bN,bO) = $Tuple2(nil, bH(bm, bI, bJ, bK, bL, bM, S, bN, bO))
1025662
1026663
1027664
1028-@Callable(df)
1029-func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = {
1030- let cA = bN(bO, bP, bQ, addressFromStringValue(X))
1031- $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10))
665+@Callable(cD)
666+func estimateGetOperationWrapperREADONLY (bm,bn,bo,S) = {
667+ let bY = bl(bm, bn, bo, addressFromStringValue(S))
668+ $Tuple2(nil, $Tuple10(bY._1, bY._2, bY._3, bY._4, bY._5, bY._6, bY._7, toString(bY._8), bY._9, bY._10))
1032669 }
1033670
1034671
1035672
1036-@Callable(df)
673+@Callable(cD)
1037674 func statsREADONLY () = {
1038- let bE = aH()
1039- let bR = fromBase58String(bE[q])
1040- let cS = bE[r]
1041- let cT = bE[s]
1042- let ct = bE[v]
1043- let cu = bE[w]
1044- let bF = parseIntValue(bE[t])
1045- let bG = parseIntValue(bE[u])
1046- let fp = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1047- let cU = bq(cS)
1048- let cV = bq(cT)
1049- let fq = if ((fp == 0))
675+ let bc = av()
676+ let bp = fromBase58String(bc[m])
677+ let cq = bc[n]
678+ let cr = bc[o]
679+ let bR = bc[r]
680+ let bS = bc[s]
681+ let bd = parseIntValue(bc[p])
682+ let be = parseIntValue(bc[q])
683+ let dv = valueOrErrorMessage(assetInfo(bp), (("Asset " + toBase58String(bp)) + " doesn't exist")).quantity
684+ let cs = aO(cq)
685+ let ct = aO(cr)
686+ let dw = if ((dv == 0))
1050687 then [e, e, e]
1051- else bC(cU, cV, fp)
1052- let cb = 0
1053- let fr = G(fq[1], b)
1054- let fs = G(fq[2], b)
1055- let ft = value(getInteger(aD, ap(toString(this))))
1056- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fp), toString(cb), toString(fr), toString(fs), toString(ft)], j))
688+ else ba(cs, ct, dv)
689+ let bz = 0
690+ let dx = C(dw[1], b)
691+ let dy = C(dw[2], b)
692+ let dz = value(getInteger(as, ah(toString(this))))
693+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cs), toString(ct), toString(dv), toString(bz), toString(dx), toString(dy), toString(dz)], f))
1057694 }
1058695
1059696
1060697
1061-@Callable(df)
1062-func evaluatePutByAmountAssetREADONLY (cl) = {
1063- let bE = aH()
1064- let bR = fromBase58String(bE[q])
1065- let cr = bE[r]
1066- let bS = fromBase58String(cr)
1067- let cs = bE[s]
1068- let bT = fromBase58String(cs)
1069- let bF = parseIntValue(bE[t])
1070- let bG = parseIntValue(bE[u])
1071- let bU = bE[p]
1072- let fp = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1073- let cU = bq(cr)
1074- let cV = bq(cs)
1075- let bA = D(cU, bF)
1076- let bB = D(cV, bG)
1077- let ca = if ((fp == 0))
698+@Callable(cD)
699+func evaluatePutByAmountAssetREADONLY (bJ) = {
700+ let bc = av()
701+ let bp = fromBase58String(bc[m])
702+ let bP = bc[n]
703+ let bq = fromBase58String(bP)
704+ let bQ = bc[o]
705+ let br = fromBase58String(bQ)
706+ let bd = parseIntValue(bc[p])
707+ let be = parseIntValue(bc[q])
708+ let bs = bc[l]
709+ let dv = valueOrErrorMessage(assetInfo(bp), (("Asset " + toBase58String(bp)) + " doesn't exist")).quantity
710+ let cs = aO(bP)
711+ let ct = aO(bQ)
712+ let aY = z(cs, bd)
713+ let aZ = z(ct, be)
714+ let by = if ((dv == 0))
1078715 then e
1079- else bs(bB, bA)
1080- let cx = D(cl, bF)
1081- let cy = fraction(cx, ca, d)
1082- let cn = G(cy, bG)
1083- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1084- let cI = dl._1
1085- let fu = dl._3
1086- let bW = dl._4
1087- let bY = dl._5
1088- let bV = dl._6
1089- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
716+ else aQ(aZ, aY)
717+ let bV = z(bJ, bd)
718+ let bW = fraction(bV, by, d)
719+ let bL = C(bW, be)
720+ let cJ = bH("", 500000, bJ, bq, bL, br, "", true, false)
721+ let cg = cJ._1
722+ let dA = cJ._3
723+ let bu = cJ._4
724+ let bw = cJ._5
725+ let bt = cJ._6
726+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cg), toString(C(by, b)), toString(bu), toString(bw), toString(bt), bs, toString(bJ), toString(bL)], f))
1090727 }
1091728
1092729
1093730
1094-@Callable(df)
1095-func evaluatePutByPriceAssetREADONLY (cn) = {
1096- let bE = aH()
1097- let bR = fromBase58String(bE[q])
1098- let cr = bE[r]
1099- let bS = fromBase58String(cr)
1100- let cs = bE[s]
1101- let bT = fromBase58String(cs)
1102- let bF = parseIntValue(bE[t])
1103- let bG = parseIntValue(bE[u])
1104- let bU = bE[p]
1105- let fp = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity
1106- let fv = bq(cr)
1107- let fw = bq(cs)
1108- let fx = D(fv, bF)
1109- let fy = D(fw, bG)
1110- let ca = if ((fp == 0))
731+@Callable(cD)
732+func evaluatePutByPriceAssetREADONLY (bL) = {
733+ let bc = av()
734+ let bp = fromBase58String(bc[m])
735+ let bP = bc[n]
736+ let bq = fromBase58String(bP)
737+ let bQ = bc[o]
738+ let br = fromBase58String(bQ)
739+ let bd = parseIntValue(bc[p])
740+ let be = parseIntValue(bc[q])
741+ let bs = bc[l]
742+ let dv = valueOrErrorMessage(assetInfo(bp), (("Asset " + toBase58String(bp)) + " doesn't exist")).quantity
743+ let dB = aO(bP)
744+ let dC = aO(bQ)
745+ let dD = z(dB, bd)
746+ let dE = z(dC, be)
747+ let by = if ((dv == 0))
1111748 then e
1112- else bs(fy, fx)
1113- let cy = D(cn, bG)
1114- let cx = fraction(cy, d, ca)
1115- let cl = G(cx, bF)
1116- let dl = cj("", 500000, cl, bS, cn, bT, "", true, false)
1117- let cI = dl._1
1118- let fu = dl._3
1119- let bW = dl._4
1120- let bY = dl._5
1121- let bV = dl._6
1122- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cI), toString(G(ca, b)), toString(bW), toString(bY), toString(bV), bU, toString(cl), toString(cn)], j))
749+ else aQ(dE, dD)
750+ let bW = z(bL, be)
751+ let bV = fraction(bW, d, by)
752+ let bJ = C(bV, bd)
753+ let cJ = bH("", 500000, bJ, bq, bL, br, "", true, false)
754+ let cg = cJ._1
755+ let dA = cJ._3
756+ let bu = cJ._4
757+ let bw = cJ._5
758+ let bt = cJ._6
759+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cg), toString(C(by, b)), toString(bu), toString(bw), toString(bt), bs, toString(bJ), toString(bL)], f))
1123760 }
1124761
1125762
1126763
1127-@Callable(df)
1128-func evaluateGetREADONLY (fz,fA) = {
1129- let cA = bN("", fz, fA, this)
1130- let cg = cA._1
1131- let ch = cA._2
1132- let bW = cA._5
1133- let bY = cA._6
1134- let bV = cA._7
1135- let cb = cA._8
1136- let bU = parseIntValue(cA._9)
1137- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cg), toString(ch), toString(bW), toString(bY), toString(bV), toString(cb), toString(bU)], j))
764+@Callable(cD)
765+func evaluateGetREADONLY (dF,dG) = {
766+ let bY = bl("", dF, dG, this)
767+ let bE = bY._1
768+ let bF = bY._2
769+ let bu = bY._5
770+ let bw = bY._6
771+ let bt = bY._7
772+ let bz = bY._8
773+ let bs = parseIntValue(bY._9)
774+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(bE), toString(bF), toString(bu), toString(bw), toString(bt), toString(bz), toString(bs)], f))
1138775 }
1139776
1140777
1141-@Verifier(fB)
1142-func fC () = {
1143- let fD = {
1144- let dq = eq()
1145- if ($isInstanceOf(dq, "ByteVector"))
778+@Verifier(dH)
779+func dI () = {
780+ let dJ = {
781+ let cL = cK()
782+ if ($isInstanceOf(cL, "ByteVector"))
1146783 then {
1147- let ev = dq
1148- ev
784+ let cQ = cL
785+ cQ
1149786 }
1150- else if ($isInstanceOf(dq, "Unit"))
1151- then fB.senderPublicKey
787+ else if ($isInstanceOf(cL, "Unit"))
788+ then dH.senderPublicKey
1152789 else throw("Match error")
1153790 }
1154- let dq = fB
1155- if ($isInstanceOf(dq, "Order"))
791+ let cL = dH
792+ if ($isInstanceOf(cL, "Order"))
1156793 then {
1157- let cR = dq
1158- let fE = aG()
1159- let au = cQ(cR)
1160- let av = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey)
1161- let aw = sigVerify(cR.bodyBytes, cR.proofs[1], fE)
1162- if (if (if (au)
1163- then av
794+ let cp = cL
795+ let dK = au()
796+ let al = co(cp)
797+ let am = sigVerify(cp.bodyBytes, cp.proofs[0], cp.senderPublicKey)
798+ let an = sigVerify(cp.bodyBytes, cp.proofs[1], dK)
799+ if (if (if (al)
800+ then am
1164801 else false)
1165- then aw
802+ then an
1166803 else false)
1167804 then true
1168- else at(au, av, aw)
805+ else ak(al, am, an)
1169806 }
1170- else if ($isInstanceOf(dq, "SetScriptTransaction"))
807+ else if ($isInstanceOf(cL, "SetScriptTransaction"))
1171808 then {
1172- let er = dq
1173- let fF = blake2b256(value(er.script))
1174- let fG = fromBase64String(value(getString(aD, ar())))
1175- let fH = scriptHash(this)
1176- if (if ((fG == fF))
1177- then (fH != fF)
809+ let cM = cL
810+ let dL = blake2b256(value(cM.script))
811+ let dM = fromBase64String(value(getString(as, aj())))
812+ let dN = scriptHash(this)
813+ if (if ((dM == dL))
814+ then (dN != dL)
1178815 else false)
1179816 then true
1180- else sigVerify(fB.bodyBytes, fB.proofs[0], fD)
817+ else sigVerify(dH.bodyBytes, dH.proofs[0], dJ)
1181818 }
1182- else sigVerify(fB.bodyBytes, fB.proofs[0], fD)
819+ else sigVerify(dH.bodyBytes, dH.proofs[0], dJ)
1183820 }
1184821

github/deemru/w8io/026f985 
277.92 ms