tx · Kmq6NEHiQCRptgSEpUo7ddHUF7KmgC6jT2vr1xDwXmR 3MqjK2SfnefGxk4fiaeRHZaxg6wHAZ6tbd2: -0.03100000 Waves 2022.12.09 09:39 [2352434] smart account 3MqjK2SfnefGxk4fiaeRHZaxg6wHAZ6tbd2 > SELF 0.00000000 Waves
{ "type": 13, "id": "Kmq6NEHiQCRptgSEpUo7ddHUF7KmgC6jT2vr1xDwXmR", "fee": 3100000, "feeAssetId": null, "timestamp": 1670567514534, "version": 1, "sender": "3MqjK2SfnefGxk4fiaeRHZaxg6wHAZ6tbd2", "senderPublicKey": "4eCcSEdDzsn3CVYwcVcGA3AbMH8prX8N1GVuLubC57iy", "proofs": [ "5RMosy5B5KtsFumLxjp4SVmDbNLVN4G6HvhEP8DwgRZ8i2WhmZxHWtc7WLkX2VXsCJtDyoyZ92V1UPEFdAxHAQDG" ], "script": "base64:BgK8JwgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASAwoBCBIFCgMBAQESBAoCAQESBAoCCAESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgSABIDCgEBEgMKAQESBAoCCAEiCmxQZGVjaW1hbHMiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgt3YXZlc1N0cmluZyIDU0VQIgpQb29sQWN0aXZlIg9Qb29sUHV0RGlzYWJsZWQiE1Bvb2xNYXRjaGVyRGlzYWJsZWQiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiDWlkeFBvb2xTdGF0dXMiEGlkeFBvb2xMUEFzc2V0SWQiDWlkeEFtdEFzc2V0SWQiD2lkeFByaWNlQXNzZXRJZCIOaWR4QW10QXNzZXREY20iEGlkeFByaWNlQXNzZXREY20iDmlkeElBbXRBc3NldElkIhBpZHhJUHJ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dmFsdWUBCAUCZXYGc2NyaXB0BAJmTgkA2wQBCQEFdmFsdWUBCQCdCAIFAmFECQECYXIABAJmTwkA8QcBBQR0aGlzAwMJAAACBQJmTgUCZk0JAQIhPQIFAmZPBQJmTQcGCQD0AwMIBQJmSQlib2R5Qnl0ZXMJAJEDAggFAmZJBnByb29mcwAABQJmSwkA9AMDCAUCZkkJYm9keUJ5dGVzCQCRAwIIBQJmSQZwcm9vZnMAAAUCZkuCh+//", "chainId": 84, "height": 2352434, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9Ci4gMT2nbiaccbBr7FthShMRAQAKYKpHCu8WBWnk93v Next: 4P2VtTpYjcQ95kLkoUEk7puwxeATEP94TehVBbZMebVm Diff:
Old | New | Differences | |
---|---|---|---|
65 | 65 | func G (H,I) = toInt(fraction(H, toBigInt(I), d)) | |
66 | 66 | ||
67 | 67 | ||
68 | - | func J ( | |
68 | + | func J (K,L,M) = fraction(K, L, M) | |
69 | 69 | ||
70 | 70 | ||
71 | - | func L (M,N,O) = fraction(M, N, O) | |
72 | - | ||
73 | - | ||
74 | - | func P (H) = if ((0 > H)) | |
71 | + | func N (H) = if ((0 > H)) | |
75 | 72 | then -(H) | |
76 | 73 | else H | |
77 | 74 | ||
78 | 75 | ||
79 | - | func | |
76 | + | func O (H) = if ((e > H)) | |
80 | 77 | then -(H) | |
81 | 78 | else H | |
82 | 79 | ||
83 | 80 | ||
84 | - | func | |
81 | + | func P () = "%s__factoryContract" | |
85 | 82 | ||
86 | 83 | ||
87 | - | func | |
84 | + | func Q () = "%s__managerPublicKey" | |
88 | 85 | ||
89 | 86 | ||
90 | - | func | |
87 | + | func R () = "%s__pendingManagerPublicKey" | |
91 | 88 | ||
92 | 89 | ||
93 | - | func | |
90 | + | func S () = "%s%s__price__last" | |
94 | 91 | ||
95 | 92 | ||
96 | - | func | |
93 | + | func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j) | |
97 | 94 | ||
98 | 95 | ||
99 | - | func | |
96 | + | func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y) | |
100 | 97 | ||
101 | 98 | ||
102 | - | func | |
99 | + | func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y) | |
103 | 100 | ||
104 | 101 | ||
105 | - | func | |
102 | + | func aa () = "%s__amountAsset" | |
106 | 103 | ||
107 | 104 | ||
108 | - | func | |
105 | + | func ab () = "%s__priceAsset" | |
109 | 106 | ||
110 | 107 | ||
111 | - | let | |
108 | + | let ac = "%s__fee" | |
112 | 109 | ||
113 | - | let | |
110 | + | let ad = fraction(10, b, 10000) | |
114 | 111 | ||
115 | - | let | |
112 | + | let ae = valueOrElse(getInteger(this, ac), ad) | |
116 | 113 | ||
117 | - | let ah = makeString(["%s", "kLp"], j) | |
118 | - | ||
119 | - | let ai = makeString(["%s", "kLpRefreshedHeight"], j) | |
120 | - | ||
121 | - | let aj = makeString(["%s", "refreshKLpDelay"], j) | |
122 | - | ||
123 | - | let ak = 30 | |
124 | - | ||
125 | - | let al = valueOrElse(getInteger(this, aj), ak) | |
126 | - | ||
127 | - | func am () = "%s__factoryConfig" | |
114 | + | func af () = "%s__factoryConfig" | |
128 | 115 | ||
129 | 116 | ||
130 | - | func | |
117 | + | func ag () = "%s%s__matcher__publicKey" | |
131 | 118 | ||
132 | 119 | ||
133 | - | func | |
120 | + | func ah (ai) = (("%s%s%s__" + ai) + "__mappings__poolContract2LpAsset") | |
134 | 121 | ||
135 | 122 | ||
136 | - | func | |
123 | + | func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config") | |
137 | 124 | ||
138 | 125 | ||
139 | - | func | |
126 | + | func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an) | |
140 | 127 | ||
141 | 128 | ||
142 | - | func | |
129 | + | func ao () = "%s__shutdown" | |
143 | 130 | ||
144 | 131 | ||
145 | - | func | |
132 | + | func ap (aq) = ("%s%s__poolWeight__" + aq) | |
146 | 133 | ||
147 | 134 | ||
148 | - | func | |
135 | + | func ar () = "%s__allowedLpScriptHash" | |
149 | 136 | ||
150 | 137 | ||
151 | - | let | |
138 | + | let as = "%s__feeCollectorAddress" | |
152 | 139 | ||
153 | - | func | |
140 | + | func at (au,av,aw) = throw(((((("order validation failed: orderValid=" + toString(au)) + " senderValid=") + toString(av)) + " matcherValid=") + toString(aw))) | |
154 | 141 | ||
155 | 142 | ||
156 | - | func | |
143 | + | func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], "")) | |
157 | 144 | ||
158 | 145 | ||
159 | - | func | |
146 | + | func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], "")) | |
160 | 147 | ||
161 | 148 | ||
162 | - | func | |
149 | + | func aB (aC) = throw(makeString(["lp.ride:", aC], " ")) | |
163 | 150 | ||
164 | 151 | ||
165 | - | func aK (aJ) = makeString(["lp.ride:", aJ], " ") | |
152 | + | let aD = addressFromStringValue(ax(this, P())) | |
153 | + | ||
154 | + | let aE = addressFromStringValue(ax(aD, as)) | |
155 | + | ||
156 | + | func aF () = valueOrElse(getBoolean(aD, ao()), false) | |
166 | 157 | ||
167 | 158 | ||
168 | - | let aL = addressFromStringValue(aE(this, R())) | |
169 | - | ||
170 | - | let aM = addressFromStringValue(aE(aL, az)) | |
171 | - | ||
172 | - | func aN () = valueOrElse(getBoolean(aL, av()), false) | |
159 | + | func aG () = fromBase58String(ax(aD, ag())) | |
173 | 160 | ||
174 | 161 | ||
175 | - | func aO () = fromBase58String(aE(aL, an())) | |
176 | - | ||
177 | - | ||
178 | - | func aP () = { | |
179 | - | let aQ = aE(this, ac()) | |
180 | - | let aR = aE(this, ad()) | |
181 | - | let as = aH(aL, at(aR)) | |
182 | - | let ar = aH(aL, at(aQ)) | |
183 | - | split(aE(aL, aq(toString(ar), toString(as))), j) | |
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) | |
184 | 168 | } | |
185 | 169 | ||
186 | 170 | ||
187 | - | func | |
171 | + | func aK (aL) = if ((aL == i)) | |
188 | 172 | then unit | |
189 | - | else fromBase58String( | |
173 | + | else fromBase58String(aL) | |
190 | 174 | ||
191 | 175 | ||
192 | - | func | |
176 | + | func aM (aL) = if ((aL == unit)) | |
193 | 177 | then i | |
194 | - | else toBase58String(value( | |
178 | + | else toBase58String(value(aL)) | |
195 | 179 | ||
196 | 180 | ||
197 | - | func | |
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])) | |
198 | 182 | ||
199 | 183 | ||
200 | - | let | |
184 | + | let aP = aN(aH()) | |
201 | 185 | ||
202 | - | let | |
186 | + | let aQ = aP | |
203 | 187 | ||
204 | - | let | |
188 | + | let aR = aQ._1 | |
205 | 189 | ||
206 | - | let | |
190 | + | let aS = aQ._2 | |
207 | 191 | ||
208 | - | let | |
192 | + | let aT = aQ._3 | |
209 | 193 | ||
210 | - | let | |
194 | + | let aU = aQ._4 | |
211 | 195 | ||
212 | - | let | |
196 | + | let aV = aQ._5 | |
213 | 197 | ||
214 | - | let | |
198 | + | let aW = aQ._6 | |
215 | 199 | ||
216 | - | let | |
200 | + | let aX = aQ._7 | |
217 | 201 | ||
218 | - | func | |
202 | + | func aY () = split(ax(aD, af()), j) | |
219 | 203 | ||
220 | 204 | ||
221 | - | let | |
205 | + | let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address") | |
222 | 206 | ||
223 | - | let | |
207 | + | let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address") | |
224 | 208 | ||
225 | - | func | |
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) | |
226 | 210 | ||
227 | 211 | ||
228 | - | func | |
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) | |
229 | 213 | ||
230 | 214 | ||
231 | - | func | |
215 | + | func bq (br) = if ((br == "WAVES")) | |
232 | 216 | then wavesBalance(this).available | |
233 | - | else assetBalance(this, fromBase58String( | |
217 | + | else assetBalance(this, fromBase58String(br)) | |
234 | 218 | ||
235 | 219 | ||
236 | - | func | |
220 | + | func bs (bt,bu) = fraction(bt, d, bu) | |
237 | 221 | ||
238 | 222 | ||
239 | - | func bD (bB,bC,K) = fraction(bB, d, bC, K) | |
240 | - | ||
241 | - | ||
242 | - | func bE (bF,bG,bH,bI) = { | |
243 | - | let bJ = D(bH, bF) | |
244 | - | let bK = D(bI, bG) | |
245 | - | bA(bK, bJ) | |
223 | + | func bv (bw,bx,by,bz) = { | |
224 | + | let bA = D(by, bw) | |
225 | + | let bB = D(bz, bx) | |
226 | + | bs(bB, bA) | |
246 | 227 | } | |
247 | 228 | ||
248 | 229 | ||
249 | - | func | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | let | |
258 | - | let | |
259 | - | [ | |
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] | |
260 | 241 | } | |
261 | 242 | ||
262 | 243 | ||
263 | - | func | |
264 | - | let | |
265 | - | [G( | |
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)] | |
266 | 247 | } | |
267 | 248 | ||
268 | 249 | ||
269 | - | func | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | if (( | |
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)) | |
279 | 260 | then throw("Invalid asset passed.") | |
280 | 261 | else { | |
281 | - | let | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
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 == "")) | |
294 | 275 | then nil | |
295 | - | else [ScriptTransfer( | |
276 | + | else [ScriptTransfer(X, cg, if ((bS == "WAVES")) | |
296 | 277 | then unit | |
297 | - | else fromBase58String( | |
278 | + | else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES")) | |
298 | 279 | then unit | |
299 | - | else fromBase58String( | |
300 | - | $Tuple10( | |
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) | |
301 | 282 | } | |
302 | 283 | } | |
303 | 284 | ||
304 | 285 | ||
305 | - | func | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | if (if (( | |
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)) | |
319 | 300 | then true | |
320 | - | else ( | |
301 | + | else (cs != cw)) | |
321 | 302 | then throw("Invalid amt or price asset passed.") | |
322 | 303 | else { | |
323 | - | let | |
324 | - | then | |
325 | - | else ( | |
326 | - | let | |
327 | - | then | |
328 | - | else ( | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
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)) | |
335 | 316 | then { | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | $Tuple5(G( | |
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) | |
340 | 321 | } | |
341 | 322 | else { | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | if (if (( | |
346 | - | then ( | |
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) | |
347 | 328 | else false) | |
348 | - | then throw(((("Price slippage " + toString( | |
329 | + | then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC))) | |
349 | 330 | else { | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | then $Tuple2( | |
355 | - | else $Tuple2( | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | $Tuple5( | |
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) | |
360 | 341 | } | |
361 | 342 | } | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | let | |
366 | - | let | |
367 | - | if ((0 >= | |
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)) | |
368 | 349 | then throw("Invalid calculations. LP calculated is less than zero.") | |
369 | 350 | else { | |
370 | - | let | |
351 | + | let cM = if (!(cq)) | |
371 | 352 | then 0 | |
372 | - | else | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | $Tuple13( | |
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) | |
377 | 358 | } | |
378 | 359 | } | |
379 | 360 | } | |
380 | 361 | ||
381 | 362 | ||
382 | - | func cZ (da,db,ce) = { | |
383 | - | let dc = fraction(pow((da * db), 0, toBigInt(5), 1, 18, DOWN), g, ce) | |
384 | - | if ((ce == f)) | |
385 | - | then f | |
386 | - | else dc | |
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()) | |
377 | + | then true | |
378 | + | else (bU == m)) | |
379 | + | then true | |
380 | + | else (bU == n)) | |
381 | + | then throw("Exchange operations disabled") | |
382 | + | else { | |
383 | + | let cW = cR.assetPair.amountAsset | |
384 | + | let cX = if ((cW == unit)) | |
385 | + | then "WAVES" | |
386 | + | else toBase58String(value(cW)) | |
387 | + | let cY = cR.assetPair.priceAsset | |
388 | + | let cZ = if ((cY == unit)) | |
389 | + | then "WAVES" | |
390 | + | else toBase58String(value(cY)) | |
391 | + | if (if ((cX != cS)) | |
392 | + | then true | |
393 | + | else (cZ != cT)) | |
394 | + | then throw("Wrong order assets.") | |
395 | + | 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) | |
402 | + | true | |
403 | + | } | |
404 | + | } | |
387 | 405 | } | |
388 | 406 | ||
389 | 407 | ||
390 | - | func dd (de,df,dg) = { | |
391 | - | let dh = (toBigInt(by(aU(bc))) - de) | |
392 | - | let di = (toBigInt(by(aU(bd))) - df) | |
393 | - | let dj = (toBigInt(value(assetInfo(bb)).quantity) - dg) | |
394 | - | let dk = cZ(dh, di, dj) | |
395 | - | dk | |
396 | - | } | |
397 | - | ||
398 | - | ||
399 | - | func dl (dm,dn,dg) = { | |
400 | - | let dh = (by(aU(bc)) + dm) | |
401 | - | let di = (by(aU(bd)) + dn) | |
402 | - | let dj = (value(assetInfo(bb)).quantity + dg) | |
403 | - | let dc = cZ(toBigInt(dh), toBigInt(di), toBigInt(dj)) | |
404 | - | let do = [IntegerEntry(ai, height), StringEntry(ah, toString(dc))] | |
405 | - | $Tuple2(do, dc) | |
406 | - | } | |
407 | - | ||
408 | - | ||
409 | - | func dp (dq,dc) = if ((dc >= dq)) | |
410 | - | then true | |
411 | - | else aI(makeString(["updated KLp lower than current KLp", toString(dq), toString(dc)], " ")) | |
412 | - | ||
413 | - | ||
414 | - | func dr (ds) = { | |
415 | - | let dt = ds.amount | |
416 | - | let du = fraction(ds.amount, ds.price, b, FLOOR) | |
417 | - | let dv = if ((ds.orderType == Buy)) | |
418 | - | then $Tuple2(dt, -(du)) | |
419 | - | else $Tuple2(-(dt), du) | |
420 | - | let dm = dv._1 | |
421 | - | let dn = dv._2 | |
422 | - | if (if (if (aN()) | |
423 | - | then true | |
424 | - | else (ba == m)) | |
425 | - | then true | |
426 | - | else (ba == n)) | |
427 | - | then throw("Exchange operations disabled") | |
428 | - | else if (if ((ds.assetPair.amountAsset != bc)) | |
429 | - | then true | |
430 | - | else (ds.assetPair.priceAsset != bd)) | |
431 | - | then throw("Wrong order assets.") | |
432 | - | else { | |
433 | - | let dw = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, ah), aK("kLp is required"))), aK("invalid kLp")) | |
434 | - | let dx = dl(dm, dn, 0) | |
435 | - | let dy = dx._1 | |
436 | - | let dz = dx._2 | |
437 | - | let dA = (dz >= dw) | |
438 | - | dA | |
439 | - | } | |
440 | - | } | |
441 | - | ||
442 | - | ||
443 | - | func dB (dC) = if ((size(dC.payments) != 1)) | |
408 | + | func de (df) = if ((size(df.payments) != 1)) | |
444 | 409 | then throw("exactly 1 payment is expected") | |
445 | 410 | else { | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
454 | - | if (if ( | |
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()) | |
455 | 420 | then true | |
456 | - | else ( | |
457 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
458 | - | else $Tuple5( | |
421 | + | else (bU == n)) | |
422 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bU))) | |
423 | + | else $Tuple5(cg, ch, dh, bP, ci) | |
459 | 424 | } | |
460 | 425 | ||
461 | 426 | ||
462 | - | func | |
427 | + | func di (df,ck,cq) = if ((size(df.payments) != 2)) | |
463 | 428 | then throw("exactly 2 payments are expected") | |
464 | 429 | else { | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | if (if (if ( | |
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()) | |
470 | 435 | then true | |
471 | - | else ( | |
436 | + | else (bU == l)) | |
472 | 437 | then true | |
473 | - | else ( | |
474 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
475 | - | else | |
438 | + | else (bU == n)) | |
439 | + | then throw(("Put operation is blocked by admin. Status = " + toString(bU))) | |
440 | + | else dl | |
476 | 441 | } | |
477 | 442 | ||
478 | 443 | ||
479 | - | func | |
480 | - | let | |
481 | - | if (( | |
444 | + | func dm (dn) = { | |
445 | + | let do = invoke(aD, "emit", [dn], nil) | |
446 | + | if ((do == do)) | |
482 | 447 | then { | |
483 | - | let | |
484 | - | let | |
485 | - | if ($isInstanceOf( | |
448 | + | let dp = { | |
449 | + | let dq = do | |
450 | + | if ($isInstanceOf(dq, "Address")) | |
486 | 451 | then { | |
487 | - | let | |
488 | - | invoke( | |
452 | + | let dr = dq | |
453 | + | invoke(dr, "emit", [dn], nil) | |
489 | 454 | } | |
490 | 455 | else unit | |
491 | 456 | } | |
492 | - | if (( | |
493 | - | then | |
457 | + | if ((dp == dp)) | |
458 | + | then dn | |
494 | 459 | else throw("Strict value is not equal to itself.") | |
495 | 460 | } | |
496 | 461 | else throw("Strict value is not equal to itself.") | |
497 | 462 | } | |
498 | 463 | ||
499 | 464 | ||
500 | - | func | |
501 | - | let | |
502 | - | $Tuple2(( | |
465 | + | func ds (dn) = { | |
466 | + | let dt = fraction(dn, ae, b) | |
467 | + | $Tuple2((dn - dt), dt) | |
503 | 468 | } | |
504 | 469 | ||
505 | 470 | ||
506 | - | func | |
507 | - | let | |
508 | - | let | |
509 | - | let | |
510 | - | let | |
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)) | |
511 | 476 | then true | |
512 | - | else if (( | |
477 | + | else if ((dw == aV)) | |
513 | 478 | then false | |
514 | - | else | |
515 | - | let | |
516 | - | then $Tuple2( | |
517 | - | else if ( | |
518 | - | then $Tuple2(( | |
519 | - | else $Tuple2( | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | then $Tuple2( | |
524 | - | else $Tuple2(0, | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
532 | - | let | |
533 | - | let | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | then | |
538 | - | else | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
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)) | |
542 | 507 | then true | |
543 | - | else | |
544 | - | if (( | |
508 | + | else aB("initial deposit requires all coins") | |
509 | + | if ((dS == dS)) | |
545 | 510 | then { | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
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) | |
549 | 514 | then nil | |
550 | - | else [IntegerEntry( | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | then $Tuple2( | |
556 | - | else $Tuple2( | |
557 | - | let | |
558 | - | let | |
559 | - | let | |
560 | - | fraction(( | |
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 = { | |
519 | + | let dY = if (dA) | |
520 | + | then $Tuple2(dF, dC) | |
521 | + | else $Tuple2(dG, dD) | |
522 | + | let dn = dY._1 | |
523 | + | let dZ = dY._2 | |
524 | + | let ea = toInt(fraction(dR, toBigInt((dn / 2)), toBigInt(dZ))) | |
525 | + | fraction((dU - ea), b, ea) | |
561 | 526 | } | |
562 | - | $ | |
527 | + | $Tuple4(dU, cP, dt, dX) | |
563 | 528 | } | |
564 | 529 | else throw("Strict value is not equal to itself.") | |
565 | 530 | } | |
566 | 531 | ||
567 | 532 | ||
568 | - | func | |
569 | - | let | |
570 | - | let | |
533 | + | func eb (ec,dK,dw,X,Y) = { | |
534 | + | let dx = (Y == unit) | |
535 | + | let ed = [if ((dw == aT)) | |
571 | 536 | then true | |
572 | - | else | |
573 | - | if (( | |
537 | + | else aB("invalid lp asset")] | |
538 | + | if ((ed == ed)) | |
574 | 539 | then { | |
575 | - | let | |
540 | + | let ee = if ((ec == aU)) | |
576 | 541 | then true | |
577 | - | else if (( | |
542 | + | else if ((ec == aV)) | |
578 | 543 | then false | |
579 | - | else | |
580 | - | let | |
581 | - | then toBigInt( | |
582 | - | else toBigInt( | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | then | |
587 | - | else | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
595 | - | let | |
596 | - | then $Tuple4( | |
597 | - | else $Tuple4(0, | |
598 | - | let | |
599 | - | let | |
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | let | |
604 | - | let | |
544 | + | else aB("invalid asset") | |
545 | + | let ef = if (ee) | |
546 | + | then toBigInt(bq(aM(aU))) | |
547 | + | else toBigInt(bq(aM(aV))) | |
548 | + | let eg = bq(aM(aU)) | |
549 | + | let eh = bq(aM(aV)) | |
550 | + | let ei = if (ee) | |
551 | + | then eg | |
552 | + | else eh | |
553 | + | let ej = toBigInt(ei) | |
554 | + | let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity) | |
555 | + | let ek = toBigInt(dK) | |
556 | + | let el = max([0, toInt(((ef * (d - pow((d - ((ek * d) / dR)), 18, h, 0, 18, DOWN))) / d))]) | |
557 | + | let em = ds(el) | |
558 | + | let en = em._1 | |
559 | + | let dt = em._2 | |
560 | + | let eo = if (ee) | |
561 | + | then $Tuple4(en, 0, (eg - el), eh) | |
562 | + | else $Tuple4(0, en, eg, (eh - el)) | |
563 | + | let ep = eo._1 | |
564 | + | let eq = eo._2 | |
565 | + | let er = eo._3 | |
566 | + | let es = eo._4 | |
567 | + | let dN = bs(D(es, aX), D(er, aW)) | |
568 | + | let dO = G(dN, b) | |
569 | + | let cP = if (dx) | |
605 | 570 | then nil | |
606 | - | else [StringEntry( | |
607 | - | let | |
608 | - | let | |
609 | - | let | |
610 | - | let | |
611 | - | fraction(( | |
571 | + | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(ep, eq, dK, dO, height, lastBlock.timestamp)), IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO)] | |
572 | + | let dV = bs(D(eh, aX), D(eg, aW)) | |
573 | + | let dW = G(dV, b) | |
574 | + | let dX = { | |
575 | + | let et = (toInt(fraction(ef, ek, dR)) * 2) | |
576 | + | fraction((en - et), b, et) | |
612 | 577 | } | |
613 | - | $ | |
578 | + | $Tuple4(en, cP, dt, dX) | |
614 | 579 | } | |
615 | 580 | else throw("Strict value is not equal to itself.") | |
616 | 581 | } | |
617 | 582 | ||
618 | 583 | ||
619 | - | func | |
620 | - | let | |
621 | - | if ($isInstanceOf( | |
584 | + | func eu () = { | |
585 | + | let dq = getString(Q()) | |
586 | + | if ($isInstanceOf(dq, "String")) | |
622 | 587 | then { | |
623 | - | let | |
624 | - | fromBase58String( | |
588 | + | let ev = dq | |
589 | + | fromBase58String(ev) | |
625 | 590 | } | |
626 | - | else if ($isInstanceOf( | |
591 | + | else if ($isInstanceOf(dq, "Unit")) | |
627 | 592 | then unit | |
628 | 593 | else throw("Match error") | |
629 | 594 | } | |
630 | 595 | ||
631 | 596 | ||
632 | - | func | |
633 | - | let | |
634 | - | if ($isInstanceOf( | |
597 | + | func ew () = { | |
598 | + | let dq = getString(R()) | |
599 | + | if ($isInstanceOf(dq, "String")) | |
635 | 600 | then { | |
636 | - | let | |
637 | - | fromBase58String( | |
601 | + | let ev = dq | |
602 | + | fromBase58String(ev) | |
638 | 603 | } | |
639 | - | else if ($isInstanceOf( | |
604 | + | else if ($isInstanceOf(dq, "Unit")) | |
640 | 605 | then unit | |
641 | 606 | else throw("Match error") | |
642 | 607 | } | |
643 | 608 | ||
644 | 609 | ||
645 | - | func | |
646 | - | let | |
647 | - | if ($isInstanceOf( | |
610 | + | func ex (df) = { | |
611 | + | let dq = eu() | |
612 | + | if ($isInstanceOf(dq, "ByteVector")) | |
648 | 613 | then { | |
649 | - | let | |
650 | - | ( | |
614 | + | let ey = dq | |
615 | + | (df.callerPublicKey == ey) | |
651 | 616 | } | |
652 | - | else if ($isInstanceOf( | |
653 | - | then ( | |
617 | + | else if ($isInstanceOf(dq, "Unit")) | |
618 | + | then (df.caller == this) | |
654 | 619 | else throw("Match error") | |
655 | 620 | } | |
656 | 621 | ||
657 | 622 | ||
658 | - | func | |
659 | - | let | |
660 | - | let | |
661 | - | if ($isInstanceOf( | |
623 | + | func ez (df) = { | |
624 | + | let eA = throw("Permission denied") | |
625 | + | let dq = eu() | |
626 | + | if ($isInstanceOf(dq, "ByteVector")) | |
662 | 627 | then { | |
663 | - | let | |
664 | - | if (( | |
628 | + | let ey = dq | |
629 | + | if ((df.callerPublicKey == ey)) | |
665 | 630 | then true | |
666 | - | else | |
631 | + | else eA | |
667 | 632 | } | |
668 | - | else if ($isInstanceOf( | |
669 | - | then if (( | |
633 | + | else if ($isInstanceOf(dq, "Unit")) | |
634 | + | then if ((df.caller == this)) | |
670 | 635 | then true | |
671 | - | else | |
636 | + | else eA | |
672 | 637 | else throw("Match error") | |
673 | 638 | } | |
674 | 639 | ||
675 | 640 | ||
676 | - | @Callable( | |
677 | - | func setManager ( | |
678 | - | let | |
679 | - | if (( | |
641 | + | @Callable(df) | |
642 | + | func setManager (eB) = { | |
643 | + | let eC = ez(df) | |
644 | + | if ((eC == eC)) | |
680 | 645 | then { | |
681 | - | let | |
682 | - | if (( | |
683 | - | then [StringEntry( | |
646 | + | let eD = fromBase58String(eB) | |
647 | + | if ((eD == eD)) | |
648 | + | then [StringEntry(R(), eB)] | |
684 | 649 | else throw("Strict value is not equal to itself.") | |
685 | 650 | } | |
686 | 651 | else throw("Strict value is not equal to itself.") | |
688 | 653 | ||
689 | 654 | ||
690 | 655 | ||
691 | - | @Callable( | |
656 | + | @Callable(df) | |
692 | 657 | func confirmManager () = { | |
693 | - | let | |
694 | - | let | |
658 | + | let eE = ew() | |
659 | + | let eF = if (isDefined(eE)) | |
695 | 660 | then true | |
696 | 661 | else throw("No pending manager") | |
697 | - | if (( | |
662 | + | if ((eF == eF)) | |
698 | 663 | then { | |
699 | - | let | |
664 | + | let eG = if ((df.callerPublicKey == value(eE))) | |
700 | 665 | then true | |
701 | 666 | else throw("You are not pending manager") | |
702 | - | if (( | |
703 | - | then [StringEntry( | |
667 | + | if ((eG == eG)) | |
668 | + | then [StringEntry(Q(), toBase58String(value(eE))), DeleteEntry(R())] | |
704 | 669 | else throw("Strict value is not equal to itself.") | |
705 | 670 | } | |
706 | 671 | else throw("Strict value is not equal to itself.") | |
708 | 673 | ||
709 | 674 | ||
710 | 675 | ||
711 | - | @Callable( | |
712 | - | func put ( | |
676 | + | @Callable(df) | |
677 | + | func put (ck,eH) = if ((0 > ck)) | |
713 | 678 | then throw("Invalid slippageTolerance passed") | |
714 | 679 | else { | |
715 | - | let dI = dF(dC, ct, true) | |
716 | - | let cV = dI._2 | |
717 | - | let ca = dI._7 | |
718 | - | let cr = dI._9 | |
719 | - | let cW = dI._10 | |
720 | - | let cX = dI._11 | |
721 | - | let fd = dI._12 | |
722 | - | let fe = dI._13 | |
723 | - | let dG = toBigInt(value(dC.payments[0]).amount) | |
724 | - | let dH = toBigInt(value(dC.payments[1]).amount) | |
725 | - | let dk = dd(dG, dH, toBigInt(0)) | |
726 | - | if ((dk == dk)) | |
680 | + | let dl = di(df, ck, true) | |
681 | + | let cM = dl._2 | |
682 | + | let bR = dl._7 | |
683 | + | let ci = dl._9 | |
684 | + | let cN = dl._10 | |
685 | + | let cO = dl._11 | |
686 | + | let eI = dl._12 | |
687 | + | let eJ = dl._13 | |
688 | + | let do = invoke(aD, "emit", [cM], nil) | |
689 | + | if ((do == do)) | |
727 | 690 | then { | |
728 | - | let dL = invoke(aL, "emit", [cV], nil) | |
729 | - | if ((dL == dL)) | |
691 | + | let dp = { | |
692 | + | let dq = do | |
693 | + | if ($isInstanceOf(dq, "Address")) | |
694 | + | then { | |
695 | + | let dr = dq | |
696 | + | invoke(dr, "emit", [cM], nil) | |
697 | + | } | |
698 | + | else unit | |
699 | + | } | |
700 | + | if ((dp == dp)) | |
730 | 701 | then { | |
731 | - | let dM = { | |
732 | - | let dN = dL | |
733 | - | if ($isInstanceOf(dN, "Address")) | |
734 | - | then { | |
735 | - | let dO = dN | |
736 | - | invoke(dO, "emit", [cV], nil) | |
737 | - | } | |
738 | - | else unit | |
739 | - | } | |
740 | - | if ((dM == dM)) | |
702 | + | let eK = if ((cN > 0)) | |
703 | + | then invoke(ba, "put", nil, [AttachedPayment(eI, cN)]) | |
704 | + | else nil | |
705 | + | if ((eK == eK)) | |
741 | 706 | then { | |
742 | - | let | |
743 | - | then invoke( | |
707 | + | let eL = if ((cO > 0)) | |
708 | + | then invoke(ba, "put", nil, [AttachedPayment(eJ, cO)]) | |
744 | 709 | else nil | |
745 | - | if (( | |
710 | + | if ((eL == eL)) | |
746 | 711 | then { | |
747 | - | let fg = if ((cX > 0)) | |
748 | - | then invoke(bi, "put", nil, [AttachedPayment(fe, cX)]) | |
749 | - | else nil | |
750 | - | if ((fg == fg)) | |
712 | + | let eM = if (eH) | |
751 | 713 | then { | |
752 | - | let fh = if (fc) | |
753 | - | then { | |
754 | - | let fi = invoke(bh, "stake", nil, [AttachedPayment(ca, cV)]) | |
755 | - | if ((fi == fi)) | |
756 | - | then nil | |
757 | - | else throw("Strict value is not equal to itself.") | |
758 | - | } | |
759 | - | else [ScriptTransfer(dC.caller, cV, ca)] | |
760 | - | let fj = dl(0, 0, 0) | |
761 | - | if ((fj == fj)) | |
762 | - | then { | |
763 | - | let dc = fj._2 | |
764 | - | let fk = fj._1 | |
765 | - | let fl = dp(dk, dc) | |
766 | - | if ((fl == fl)) | |
767 | - | then ((cr ++ fh) ++ fk) | |
768 | - | else throw("Strict value is not equal to itself.") | |
769 | - | } | |
714 | + | let eN = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)]) | |
715 | + | if ((eN == eN)) | |
716 | + | then nil | |
770 | 717 | else throw("Strict value is not equal to itself.") | |
771 | 718 | } | |
772 | - | else throw("Strict value is not equal to itself.") | |
719 | + | else [ScriptTransfer(df.caller, cM, bR)] | |
720 | + | (ci ++ eM) | |
773 | 721 | } | |
774 | 722 | else throw("Strict value is not equal to itself.") | |
775 | 723 | } | |
782 | 730 | ||
783 | 731 | ||
784 | 732 | ||
785 | - | @Callable( | |
786 | - | func putForFree ( | |
733 | + | @Callable(df) | |
734 | + | func putForFree (eO) = if ((0 > eO)) | |
787 | 735 | then throw("Invalid value passed") | |
788 | 736 | else { | |
789 | - | let dI = dF(dC, fm, false) | |
790 | - | let cr = dI._9 | |
791 | - | let dG = toBigInt(value(dC.payments[0]).amount) | |
792 | - | let dH = toBigInt(value(dC.payments[1]).amount) | |
793 | - | let dk = dd(dG, dH, toBigInt(0)) | |
794 | - | if ((dk == dk)) | |
795 | - | then { | |
796 | - | let fn = dl(0, 0, 0) | |
797 | - | let fk = fn._1 | |
798 | - | let dc = fn._2 | |
799 | - | let fl = dp(dk, dc) | |
800 | - | if ((fl == fl)) | |
801 | - | then (cr ++ fk) | |
802 | - | else throw("Strict value is not equal to itself.") | |
803 | - | } | |
804 | - | else throw("Strict value is not equal to itself.") | |
737 | + | let dl = di(df, eO, false) | |
738 | + | dl._9 | |
805 | 739 | } | |
806 | 740 | ||
807 | 741 | ||
808 | 742 | ||
809 | - | @Callable( | |
810 | - | func putOneTkn ( | |
811 | - | let | |
812 | - | let | |
813 | - | if ($isInstanceOf( | |
814 | - | then | |
815 | - | else throw(($getType( | |
743 | + | @Callable(df) | |
744 | + | func putOneTkn (eP,eQ) = { | |
745 | + | let eR = { | |
746 | + | let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
747 | + | if ($isInstanceOf(eS, "Boolean")) | |
748 | + | then eS | |
749 | + | else throw(($getType(eS) + " couldn't be cast to Boolean")) | |
816 | 750 | } | |
817 | - | let | |
751 | + | let eT = if (if (if (aF()) | |
818 | 752 | then true | |
819 | - | else ( | |
753 | + | else (aS == l)) | |
820 | 754 | then true | |
821 | - | else ( | |
755 | + | else (aS == n)) | |
822 | 756 | then true | |
823 | - | else | |
824 | - | let | |
757 | + | else eR | |
758 | + | let ed = [if (if (!(eT)) | |
825 | 759 | then true | |
826 | - | else | |
760 | + | else ex(df)) | |
827 | 761 | then true | |
828 | - | else | |
762 | + | else aB("put operation is blocked by admin"), if ((size(df.payments) == 1)) | |
829 | 763 | then true | |
830 | - | else | |
831 | - | if (( | |
764 | + | else aB("exactly 1 payment are expected")] | |
765 | + | if ((ed == ed)) | |
832 | 766 | then { | |
833 | - | let ft = dC.payments[0] | |
834 | - | let dT = ft.assetId | |
835 | - | let dS = ft.amount | |
836 | - | let dk = if ((dT == bc)) | |
837 | - | then dd(toBigInt(dS), toBigInt(0), toBigInt(0)) | |
838 | - | else if ((dT == bd)) | |
839 | - | then dd(toBigInt(0), toBigInt(dS), toBigInt(0)) | |
840 | - | else aI("payment asset is not supported") | |
841 | - | let Z = dC.caller | |
842 | - | let aa = dC.transactionId | |
843 | - | let fu = dR(dS, dT, Z, aa) | |
844 | - | if ((fu == fu)) | |
767 | + | let eU = df.payments[0] | |
768 | + | let dw = eU.assetId | |
769 | + | let dv = eU.amount | |
770 | + | let X = df.caller | |
771 | + | let Y = df.transactionId | |
772 | + | let eV = du(dv, dw, X, Y) | |
773 | + | if ((eV == eV)) | |
845 | 774 | then { | |
846 | - | let dX = fu._5 | |
847 | - | let fv = fu._4 | |
848 | - | let dQ = fu._3 | |
849 | - | let cY = fu._2 | |
850 | - | let fw = fu._1 | |
851 | - | let fx = if (if ((fo > 0)) | |
852 | - | then (fo > fw) | |
775 | + | let eW = eV._4 | |
776 | + | let dt = eV._3 | |
777 | + | let cP = eV._2 | |
778 | + | let eX = eV._1 | |
779 | + | let eY = if (if ((eP > 0)) | |
780 | + | then (eP > eX) | |
853 | 781 | else false) | |
854 | - | then | |
855 | - | else | |
856 | - | let | |
857 | - | if (( | |
782 | + | then aB(makeString(["amount to receive is less than ", toString(eP)], "")) | |
783 | + | else eX | |
784 | + | let do = dm(eY) | |
785 | + | if ((do == do)) | |
858 | 786 | then { | |
859 | - | let | |
787 | + | let eM = if (eQ) | |
860 | 788 | then { | |
861 | - | let | |
862 | - | if (( | |
789 | + | let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)]) | |
790 | + | if ((eZ == eZ)) | |
863 | 791 | then nil | |
864 | 792 | else throw("Strict value is not equal to itself.") | |
865 | 793 | } | |
866 | - | else [ScriptTransfer( | |
867 | - | let | |
868 | - | then [ScriptTransfer( | |
794 | + | else [ScriptTransfer(df.caller, eY, aT)] | |
795 | + | let fa = if ((dt > 0)) | |
796 | + | then [ScriptTransfer(aE, dt, dw)] | |
869 | 797 | else nil | |
870 | - | let fA = if ((this == aM)) | |
871 | - | then $Tuple2(0, 0) | |
872 | - | else if (dX) | |
873 | - | then $Tuple2(-(dQ), 0) | |
874 | - | else $Tuple2(0, -(dQ)) | |
875 | - | let dm = fA._1 | |
876 | - | let dn = fA._2 | |
877 | - | let fB = dl(dm, dn, 0) | |
878 | - | let fk = fB._1 | |
879 | - | let dc = fB._2 | |
880 | - | let dw = value(getString(ah)) | |
881 | - | let fl = dp(dk, dc) | |
882 | - | if ((fl == fl)) | |
883 | - | then $Tuple2((((cY ++ fh) ++ fz) ++ fk), fx) | |
884 | - | else throw("Strict value is not equal to itself.") | |
798 | + | $Tuple2(((cP ++ eM) ++ fa), eY) | |
885 | 799 | } | |
886 | 800 | else throw("Strict value is not equal to itself.") | |
887 | 801 | } | |
892 | 806 | ||
893 | 807 | ||
894 | 808 | ||
895 | - | @Callable(dC) | |
896 | - | func putOneTknREADONLY (dT,dS) = { | |
897 | - | let fC = dR(dS, aS(dT), unit, unit) | |
898 | - | let fw = fC._1 | |
899 | - | let cY = fC._2 | |
900 | - | let dQ = fC._3 | |
901 | - | let fv = fC._4 | |
902 | - | let dX = fC._5 | |
903 | - | $Tuple2(nil, $Tuple3(fw, dQ, fv)) | |
809 | + | @Callable(df) | |
810 | + | func putOneTknREADONLY (dw,dv) = { | |
811 | + | let fb = du(dv, aK(dw), unit, unit) | |
812 | + | let eX = fb._1 | |
813 | + | let cP = fb._2 | |
814 | + | let dt = fb._3 | |
815 | + | let eW = fb._4 | |
816 | + | $Tuple2(nil, $Tuple3(eX, dt, eW)) | |
904 | 817 | } | |
905 | 818 | ||
906 | 819 | ||
907 | 820 | ||
908 | - | @Callable( | |
909 | - | func getOneTkn ( | |
910 | - | let | |
911 | - | let | |
912 | - | if ($isInstanceOf( | |
913 | - | then | |
914 | - | else throw(($getType( | |
821 | + | @Callable(df) | |
822 | + | func getOneTkn (fc,eP) = { | |
823 | + | let eR = { | |
824 | + | let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
825 | + | if ($isInstanceOf(eS, "Boolean")) | |
826 | + | then eS | |
827 | + | else throw(($getType(eS) + " couldn't be cast to Boolean")) | |
915 | 828 | } | |
916 | - | let | |
829 | + | let fd = if (if (aF()) | |
917 | 830 | then true | |
918 | - | else ( | |
831 | + | else (aS == n)) | |
919 | 832 | then true | |
920 | - | else | |
921 | - | let | |
833 | + | else eR | |
834 | + | let ed = [if (if (!(fd)) | |
922 | 835 | then true | |
923 | - | else | |
836 | + | else ex(df)) | |
924 | 837 | then true | |
925 | - | else | |
838 | + | else aB("get operation is blocked by admin"), if ((size(df.payments) == 1)) | |
926 | 839 | then true | |
927 | - | else | |
928 | - | if (( | |
840 | + | else aB("exactly 1 payment are expected")] | |
841 | + | if ((ed == ed)) | |
929 | 842 | then { | |
930 | - | let ex = aS(fD) | |
931 | - | let ft = dC.payments[0] | |
932 | - | let dT = ft.assetId | |
933 | - | let ef = ft.amount | |
934 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(ef)) | |
935 | - | let Z = dC.caller | |
936 | - | let aa = dC.transactionId | |
937 | - | let fF = ew(ex, ef, dT, Z, aa) | |
938 | - | if ((fF == fF)) | |
843 | + | let ec = aK(fc) | |
844 | + | let eU = df.payments[0] | |
845 | + | let dw = eU.assetId | |
846 | + | let dK = eU.amount | |
847 | + | let X = df.caller | |
848 | + | let Y = df.transactionId | |
849 | + | let fe = eb(ec, dK, dw, X, Y) | |
850 | + | if ((fe == fe)) | |
939 | 851 | then { | |
940 | - | let ez = fF._5 | |
941 | - | let fv = fF._4 | |
942 | - | let dQ = fF._3 | |
943 | - | let cY = fF._2 | |
944 | - | let fG = fF._1 | |
945 | - | let dK = if (if ((fo > 0)) | |
946 | - | then (fo > fG) | |
852 | + | let eW = fe._4 | |
853 | + | let dt = fe._3 | |
854 | + | let cP = fe._2 | |
855 | + | let ff = fe._1 | |
856 | + | let dn = if (if ((eP > 0)) | |
857 | + | then (eP > ff) | |
947 | 858 | else false) | |
948 | - | then | |
949 | - | else | |
950 | - | let | |
951 | - | if (( | |
859 | + | then aB(makeString(["amount to receive is less than ", toString(eP)], "")) | |
860 | + | else ff | |
861 | + | let fg = invoke(aD, "burn", [dK], [AttachedPayment(dw, dK)]) | |
862 | + | if ((fg == fg)) | |
952 | 863 | then { | |
953 | - | let | |
954 | - | let | |
955 | - | then [ScriptTransfer( | |
864 | + | let fh = [ScriptTransfer(X, dn, ec)] | |
865 | + | let fa = if ((dt > 0)) | |
866 | + | then [ScriptTransfer(aE, dt, ec)] | |
956 | 867 | else nil | |
957 | - | let fJ = { | |
958 | - | let fK = if ((this == aM)) | |
959 | - | then 0 | |
960 | - | else dQ | |
961 | - | if (ez) | |
962 | - | then $Tuple2(-((dK + fK)), 0) | |
963 | - | else $Tuple2(0, -((dK + fK))) | |
964 | - | } | |
965 | - | let dm = fJ._1 | |
966 | - | let dn = fJ._2 | |
967 | - | let fL = dl(dm, dn, 0) | |
968 | - | let fk = fL._1 | |
969 | - | let dc = fL._2 | |
970 | - | let fl = dp(dk, dc) | |
971 | - | if ((fl == fl)) | |
972 | - | then $Tuple2((((cY ++ fI) ++ fz) ++ fk), dK) | |
973 | - | else throw("Strict value is not equal to itself.") | |
868 | + | $Tuple2(((cP ++ fh) ++ fa), dn) | |
974 | 869 | } | |
975 | 870 | else throw("Strict value is not equal to itself.") | |
976 | 871 | } | |
981 | 876 | ||
982 | 877 | ||
983 | 878 | ||
984 | - | @Callable(dC) | |
985 | - | func getOneTknREADONLY (ex,ef) = { | |
986 | - | let fM = ew(aS(ex), ef, bb, unit, unit) | |
987 | - | let fG = fM._1 | |
988 | - | let cY = fM._2 | |
989 | - | let dQ = fM._3 | |
990 | - | let fv = fM._4 | |
991 | - | let ez = fM._5 | |
992 | - | $Tuple2(nil, $Tuple3(fG, dQ, fv)) | |
879 | + | @Callable(df) | |
880 | + | func getOneTknREADONLY (ec,dK) = { | |
881 | + | let fi = eb(aK(ec), dK, aT, unit, unit) | |
882 | + | let ff = fi._1 | |
883 | + | let cP = fi._2 | |
884 | + | let dt = fi._3 | |
885 | + | let eW = fi._4 | |
886 | + | $Tuple2(nil, $Tuple3(ff, dt, eW)) | |
993 | 887 | } | |
994 | 888 | ||
995 | 889 | ||
996 | 890 | ||
997 | - | @Callable( | |
998 | - | func unstakeAndGetOneTkn ( | |
999 | - | let | |
1000 | - | let | |
1001 | - | if ($isInstanceOf( | |
1002 | - | then | |
1003 | - | else throw(($getType( | |
891 | + | @Callable(df) | |
892 | + | func unstakeAndGetOneTkn (fj,fc,eP) = { | |
893 | + | let eR = { | |
894 | + | let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
895 | + | if ($isInstanceOf(eS, "Boolean")) | |
896 | + | then eS | |
897 | + | else throw(($getType(eS) + " couldn't be cast to Boolean")) | |
1004 | 898 | } | |
1005 | - | let | |
899 | + | let fd = if (if (aF()) | |
1006 | 900 | then true | |
1007 | - | else ( | |
901 | + | else (aS == n)) | |
1008 | 902 | then true | |
1009 | - | else | |
1010 | - | let | |
903 | + | else eR | |
904 | + | let ed = [if (if (!(fd)) | |
1011 | 905 | then true | |
1012 | - | else | |
906 | + | else ex(df)) | |
1013 | 907 | then true | |
1014 | - | else | |
908 | + | else aB("get operation is blocked by admin"), if ((size(df.payments) == 0)) | |
1015 | 909 | then true | |
1016 | - | else | |
1017 | - | if (( | |
910 | + | else aB("no payments are expected")] | |
911 | + | if ((ed == ed)) | |
1018 | 912 | then { | |
1019 | - | let ex = aS(fD) | |
1020 | - | let Z = dC.caller | |
1021 | - | let aa = dC.transactionId | |
1022 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1023 | - | let fO = invoke(bh, "unstake", [toBase58String(bb), fN], nil) | |
1024 | - | if ((fO == fO)) | |
913 | + | let ec = aK(fc) | |
914 | + | let X = df.caller | |
915 | + | let Y = df.transactionId | |
916 | + | let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil) | |
917 | + | if ((fk == fk)) | |
1025 | 918 | then { | |
1026 | - | let | |
1027 | - | if (( | |
919 | + | let fl = eb(ec, fj, aT, X, Y) | |
920 | + | if ((fl == fl)) | |
1028 | 921 | then { | |
1029 | - | let ez = fP._5 | |
1030 | - | let fv = fP._4 | |
1031 | - | let dQ = fP._3 | |
1032 | - | let cY = fP._2 | |
1033 | - | let fG = fP._1 | |
1034 | - | let dK = if (if ((fo > 0)) | |
1035 | - | then (fo > fG) | |
922 | + | let eW = fl._4 | |
923 | + | let dt = fl._3 | |
924 | + | let cP = fl._2 | |
925 | + | let ff = fl._1 | |
926 | + | let dn = if (if ((eP > 0)) | |
927 | + | then (eP > ff) | |
1036 | 928 | else false) | |
1037 | - | then | |
1038 | - | else | |
1039 | - | let | |
1040 | - | if (( | |
929 | + | then aB(makeString(["amount to receive is less than ", toString(eP)], "")) | |
930 | + | else ff | |
931 | + | let fg = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)]) | |
932 | + | if ((fg == fg)) | |
1041 | 933 | then { | |
1042 | - | let | |
1043 | - | let | |
1044 | - | then [ScriptTransfer( | |
934 | + | let fh = [ScriptTransfer(df.caller, dn, ec)] | |
935 | + | let fa = if ((dt > 0)) | |
936 | + | then [ScriptTransfer(aE, dt, ec)] | |
1045 | 937 | else nil | |
1046 | - | let fQ = { | |
1047 | - | let fK = if ((this == aM)) | |
1048 | - | then 0 | |
1049 | - | else dQ | |
1050 | - | if (ez) | |
1051 | - | then $Tuple2(-((dK + fK)), 0) | |
1052 | - | else $Tuple2(0, -((dK + fK))) | |
1053 | - | } | |
1054 | - | let dm = fQ._1 | |
1055 | - | let dn = fQ._2 | |
1056 | - | let fR = dl(dm, dn, 0) | |
1057 | - | let fk = fR._1 | |
1058 | - | let dc = fR._2 | |
1059 | - | let fl = dp(dk, dc) | |
1060 | - | if ((fl == fl)) | |
1061 | - | then $Tuple2((((cY ++ fI) ++ fz) ++ fk), dK) | |
1062 | - | else throw("Strict value is not equal to itself.") | |
938 | + | $Tuple2(((cP ++ fh) ++ fa), dn) | |
1063 | 939 | } | |
1064 | 940 | else throw("Strict value is not equal to itself.") | |
1065 | 941 | } | |
1072 | 948 | ||
1073 | 949 | ||
1074 | 950 | ||
1075 | - | @Callable( | |
951 | + | @Callable(df) | |
1076 | 952 | func get () = { | |
1077 | - | let cJ = dB(dC) | |
1078 | - | let fS = cJ._1 | |
1079 | - | let cq = cJ._2 | |
1080 | - | let dE = cJ._3 | |
1081 | - | let bY = cJ._4 | |
1082 | - | let cr = cJ._5 | |
1083 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE)) | |
1084 | - | let fT = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)]) | |
1085 | - | if ((fT == fT)) | |
1086 | - | then { | |
1087 | - | let fU = dl(-(fS), -(cq), 0) | |
1088 | - | let fk = fU._1 | |
1089 | - | let dc = fU._2 | |
1090 | - | let fl = dp(dk, dc) | |
1091 | - | if ((fl == fl)) | |
1092 | - | then (cr ++ fk) | |
1093 | - | else throw("Strict value is not equal to itself.") | |
1094 | - | } | |
953 | + | let cA = de(df) | |
954 | + | let fm = cA._1 | |
955 | + | let ch = cA._2 | |
956 | + | let dh = cA._3 | |
957 | + | let bP = cA._4 | |
958 | + | let ci = cA._5 | |
959 | + | let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)]) | |
960 | + | if ((fn == fn)) | |
961 | + | then ci | |
1095 | 962 | else throw("Strict value is not equal to itself.") | |
1096 | 963 | } | |
1097 | 964 | ||
1098 | 965 | ||
1099 | 966 | ||
1100 | - | @Callable( | |
1101 | - | func getNoLess ( | |
1102 | - | let | |
1103 | - | let | |
1104 | - | let | |
1105 | - | let | |
1106 | - | let | |
1107 | - | let | |
1108 | - | if (( | |
1109 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1110 | - | else if (( | |
1111 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
967 | + | @Callable(df) | |
968 | + | func getNoLess (fo,fp) = { | |
969 | + | let cA = de(df) | |
970 | + | let cg = cA._1 | |
971 | + | let ch = cA._2 | |
972 | + | let dh = cA._3 | |
973 | + | let bP = cA._4 | |
974 | + | let ci = cA._5 | |
975 | + | if ((fo > cg)) | |
976 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo))) | |
977 | + | else if ((fp > ch)) | |
978 | + | then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp))) | |
1112 | 979 | else { | |
1113 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE)) | |
1114 | - | let fT = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)]) | |
1115 | - | if ((fT == fT)) | |
1116 | - | then { | |
1117 | - | let fX = dl(-(cp), -(cq), 0) | |
1118 | - | let fk = fX._1 | |
1119 | - | let dc = fX._2 | |
1120 | - | let fl = dp(dk, dc) | |
1121 | - | if ((fl == fl)) | |
1122 | - | then (cr ++ fk) | |
1123 | - | else throw("Strict value is not equal to itself.") | |
1124 | - | } | |
980 | + | let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)]) | |
981 | + | if ((fn == fn)) | |
982 | + | then ci | |
1125 | 983 | else throw("Strict value is not equal to itself.") | |
1126 | 984 | } | |
1127 | 985 | } | |
1128 | 986 | ||
1129 | 987 | ||
1130 | 988 | ||
1131 | - | @Callable( | |
1132 | - | func unstakeAndGet ( | |
1133 | - | let | |
989 | + | @Callable(df) | |
990 | + | func unstakeAndGet (dn) = { | |
991 | + | let fq = if ((size(df.payments) != 0)) | |
1134 | 992 | then throw("No payments are expected") | |
1135 | 993 | else true | |
1136 | - | if (( | |
994 | + | if ((fq == fq)) | |
1137 | 995 | then { | |
1138 | - | let bN = aP() | |
1139 | - | let ca = fromBase58String(bN[q]) | |
1140 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1141 | - | let fO = invoke(bh, "unstake", [toBase58String(ca), dK], nil) | |
1142 | - | if ((fO == fO)) | |
996 | + | let bE = aH() | |
997 | + | let bR = fromBase58String(bE[q]) | |
998 | + | let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil) | |
999 | + | if ((fk == fk)) | |
1143 | 1000 | then { | |
1144 | - | let cJ = bW(toBase58String(dC.transactionId), toBase58String(ca), dK, dC.caller) | |
1145 | - | let cp = cJ._1 | |
1146 | - | let cq = cJ._2 | |
1147 | - | let cd = parseIntValue(cJ._9) | |
1148 | - | let cr = cJ._10 | |
1149 | - | let fZ = if (if (aN()) | |
1001 | + | let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller) | |
1002 | + | let bU = parseIntValue(cA._9) | |
1003 | + | let ci = cA._10 | |
1004 | + | let fr = if (if (aF()) | |
1150 | 1005 | then true | |
1151 | - | else ( | |
1152 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1006 | + | else (bU == n)) | |
1007 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bU))) | |
1153 | 1008 | else true | |
1154 | - | if (( | |
1009 | + | if ((fr == fr)) | |
1155 | 1010 | then { | |
1156 | - | let fT = invoke(aL, "burn", [dK], [AttachedPayment(ca, dK)]) | |
1157 | - | if ((fT == fT)) | |
1158 | - | then { | |
1159 | - | let ga = dl(-(cp), -(cq), 0) | |
1160 | - | let fk = ga._1 | |
1161 | - | let dc = ga._2 | |
1162 | - | let fl = dp(dk, dc) | |
1163 | - | if ((fl == fl)) | |
1164 | - | then (cr ++ fk) | |
1165 | - | else throw("Strict value is not equal to itself.") | |
1166 | - | } | |
1011 | + | let fn = invoke(aD, "burn", [dn], [AttachedPayment(bR, dn)]) | |
1012 | + | if ((fn == fn)) | |
1013 | + | then ci | |
1167 | 1014 | else throw("Strict value is not equal to itself.") | |
1168 | 1015 | } | |
1169 | 1016 | else throw("Strict value is not equal to itself.") | |
1175 | 1022 | ||
1176 | 1023 | ||
1177 | 1024 | ||
1178 | - | @Callable( | |
1179 | - | func unstakeAndGetNoLess ( | |
1180 | - | let | |
1025 | + | @Callable(df) | |
1026 | + | func unstakeAndGetNoLess (fj,fs,fp) = { | |
1027 | + | let fd = if (aF()) | |
1181 | 1028 | then true | |
1182 | - | else ( | |
1183 | - | let | |
1029 | + | else (aS == n) | |
1030 | + | let ed = [if (!(fd)) | |
1184 | 1031 | then true | |
1185 | - | else throw("get operation is blocked by admin"), if ((size( | |
1032 | + | else throw("get operation is blocked by admin"), if ((size(df.payments) == 0)) | |
1186 | 1033 | then true | |
1187 | 1034 | else throw("no payments are expected")] | |
1188 | - | if (( | |
1035 | + | if ((ed == ed)) | |
1189 | 1036 | then { | |
1190 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1191 | - | let fO = invoke(bh, "unstake", [toBase58String(bb), fN], nil) | |
1192 | - | if ((fO == fO)) | |
1037 | + | let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil) | |
1038 | + | if ((fk == fk)) | |
1193 | 1039 | then { | |
1194 | - | let | |
1195 | - | let | |
1196 | - | let | |
1197 | - | let | |
1198 | - | let | |
1040 | + | let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller) | |
1041 | + | let cg = cA._1 | |
1042 | + | let ch = cA._2 | |
1043 | + | let ci = cA._10 | |
1044 | + | let ft = [if ((cg >= fs)) | |
1199 | 1045 | then true | |
1200 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1046 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp)) | |
1201 | 1047 | then true | |
1202 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1203 | - | if (( | |
1048 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))] | |
1049 | + | if ((ft == ft)) | |
1204 | 1050 | then { | |
1205 | - | let fT = invoke(aL, "burn", [fN], [AttachedPayment(bb, fN)]) | |
1206 | - | if ((fT == fT)) | |
1207 | - | then { | |
1208 | - | let gd = dl(-(cp), -(cq), 0) | |
1209 | - | let fk = gd._1 | |
1210 | - | let dc = gd._2 | |
1211 | - | let fl = dp(dk, dc) | |
1212 | - | if ((fl == fl)) | |
1213 | - | then (cr ++ fk) | |
1214 | - | else throw("Strict value is not equal to itself.") | |
1215 | - | } | |
1051 | + | let fn = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)]) | |
1052 | + | if ((fn == fn)) | |
1053 | + | then ci | |
1216 | 1054 | else throw("Strict value is not equal to itself.") | |
1217 | 1055 | } | |
1218 | 1056 | else throw("Strict value is not equal to itself.") | |
1224 | 1062 | ||
1225 | 1063 | ||
1226 | 1064 | ||
1227 | - | @Callable( | |
1228 | - | func activate ( | |
1065 | + | @Callable(df) | |
1066 | + | func activate (fu,fv) = if ((toString(df.caller) != toString(aD))) | |
1229 | 1067 | then throw("permissions denied") | |
1230 | - | else $Tuple2([StringEntry( | |
1068 | + | else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success") | |
1231 | 1069 | ||
1232 | 1070 | ||
1233 | 1071 | ||
1234 | - | @Callable(dC) | |
1235 | - | func refreshKLp () = { | |
1236 | - | let gg = valueOrElse(getInteger(ai), 0) | |
1237 | - | let gh = if (((height - gg) >= al)) | |
1238 | - | then unit | |
1239 | - | else aI(makeString([toString(al), " blocks have not passed since the previous call"], "")) | |
1240 | - | if ((gh == gh)) | |
1241 | - | then { | |
1242 | - | let dw = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ah), "0")), aK("invalid kLp")) | |
1243 | - | let gi = dl(0, 0, 0) | |
1244 | - | let gj = gi._1 | |
1245 | - | let dc = gi._2 | |
1246 | - | let do = if ((dw != dc)) | |
1247 | - | then gj | |
1248 | - | else aI("nothing to refresh") | |
1249 | - | $Tuple2(do, toString(dc)) | |
1250 | - | } | |
1251 | - | else throw("Strict value is not equal to itself.") | |
1072 | + | @Callable(df) | |
1073 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH()) | |
1074 | + | ||
1075 | + | ||
1076 | + | ||
1077 | + | @Callable(df) | |
1078 | + | func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br)) | |
1079 | + | ||
1080 | + | ||
1081 | + | ||
1082 | + | @Callable(df) | |
1083 | + | func calcPricesWrapperREADONLY (by,bz,bD) = { | |
1084 | + | let bM = bC(by, bz, bD) | |
1085 | + | $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])]) | |
1252 | 1086 | } | |
1253 | 1087 | ||
1254 | 1088 | ||
1255 | 1089 | ||
1256 | - | @Callable( | |
1257 | - | func | |
1090 | + | @Callable(df) | |
1091 | + | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1258 | 1092 | ||
1259 | 1093 | ||
1260 | 1094 | ||
1261 | - | @Callable( | |
1262 | - | func | |
1095 | + | @Callable(df) | |
1096 | + | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1263 | 1097 | ||
1264 | 1098 | ||
1265 | 1099 | ||
1266 | - | @Callable(dC) | |
1267 | - | func calcPricesWrapperREADONLY (bH,bI,bM) = { | |
1268 | - | let bV = bL(bH, bI, bM) | |
1269 | - | $Tuple2(nil, [toString(bV[0]), toString(bV[1]), toString(bV[2])]) | |
1100 | + | @Callable(df) | |
1101 | + | func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu)))) | |
1102 | + | ||
1103 | + | ||
1104 | + | ||
1105 | + | @Callable(df) | |
1106 | + | func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq)) | |
1107 | + | ||
1108 | + | ||
1109 | + | ||
1110 | + | @Callable(df) | |
1111 | + | func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = { | |
1112 | + | let cA = bN(bO, bP, bQ, addressFromStringValue(X)) | |
1113 | + | $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10)) | |
1270 | 1114 | } | |
1271 | 1115 | ||
1272 | 1116 | ||
1273 | 1117 | ||
1274 | - | @Callable(dC) | |
1275 | - | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1276 | - | ||
1277 | - | ||
1278 | - | ||
1279 | - | @Callable(dC) | |
1280 | - | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1281 | - | ||
1282 | - | ||
1283 | - | ||
1284 | - | @Callable(dC) | |
1285 | - | func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC)))) | |
1286 | - | ||
1287 | - | ||
1288 | - | ||
1289 | - | @Callable(dC) | |
1290 | - | func estimatePutOperationWrapperREADONLY (bX,ct,cu,cv,cw,cx,Z,cy,cz) = $Tuple2(nil, cs(bX, ct, cu, cv, cw, cx, Z, cy, cz)) | |
1291 | - | ||
1292 | - | ||
1293 | - | ||
1294 | - | @Callable(dC) | |
1295 | - | func estimateGetOperationWrapperREADONLY (bX,bY,bZ,Z) = { | |
1296 | - | let cJ = bW(bX, bY, bZ, addressFromStringValue(Z)) | |
1297 | - | $Tuple2(nil, $Tuple10(cJ._1, cJ._2, cJ._3, cJ._4, cJ._5, cJ._6, cJ._7, toString(cJ._8), cJ._9, cJ._10)) | |
1118 | + | @Callable(df) | |
1119 | + | func statsREADONLY () = { | |
1120 | + | let bE = aH() | |
1121 | + | let bR = fromBase58String(bE[q]) | |
1122 | + | let cS = bE[r] | |
1123 | + | let cT = bE[s] | |
1124 | + | let ct = bE[v] | |
1125 | + | let cu = bE[w] | |
1126 | + | let bF = parseIntValue(bE[t]) | |
1127 | + | let bG = parseIntValue(bE[u]) | |
1128 | + | let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity | |
1129 | + | let cU = bq(cS) | |
1130 | + | let cV = bq(cT) | |
1131 | + | let fx = if ((fw == 0)) | |
1132 | + | then [e, e, e] | |
1133 | + | else bC(cU, cV, fw) | |
1134 | + | let cb = 0 | |
1135 | + | let fy = G(fx[1], b) | |
1136 | + | let fz = G(fx[2], b) | |
1137 | + | let fA = value(getInteger(aD, ap(toString(this)))) | |
1138 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fw), toString(cb), toString(fy), toString(fz), toString(fA)], j)) | |
1298 | 1139 | } | |
1299 | 1140 | ||
1300 | 1141 | ||
1301 | 1142 | ||
1302 | - | @Callable(dC) | |
1303 | - | func statsREADONLY () = { | |
1304 | - | let bN = aP() | |
1305 | - | let ca = fromBase58String(bN[q]) | |
1306 | - | let gk = bN[r] | |
1307 | - | let gl = bN[s] | |
1308 | - | let cC = bN[v] | |
1309 | - | let cD = bN[w] | |
1310 | - | let bO = parseIntValue(bN[t]) | |
1311 | - | let bP = parseIntValue(bN[u]) | |
1312 | - | let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1313 | - | let gn = by(gk) | |
1314 | - | let go = by(gl) | |
1315 | - | let gp = if ((gm == 0)) | |
1316 | - | then [e, e, e] | |
1317 | - | else bL(gn, go, gm) | |
1318 | - | let ck = 0 | |
1319 | - | let gq = G(gp[1], b) | |
1320 | - | let gr = G(gp[2], b) | |
1321 | - | let gs = value(getInteger(aL, aw(toString(this)))) | |
1322 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gn), toString(go), toString(gm), toString(ck), toString(gq), toString(gr), toString(gs)], j)) | |
1143 | + | @Callable(df) | |
1144 | + | func evaluatePutByAmountAssetREADONLY (cl) = { | |
1145 | + | let bE = aH() | |
1146 | + | let bR = fromBase58String(bE[q]) | |
1147 | + | let cr = bE[r] | |
1148 | + | let bS = fromBase58String(cr) | |
1149 | + | let cs = bE[s] | |
1150 | + | let bT = fromBase58String(cs) | |
1151 | + | let bF = parseIntValue(bE[t]) | |
1152 | + | let bG = parseIntValue(bE[u]) | |
1153 | + | let bU = bE[p] | |
1154 | + | let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity | |
1155 | + | let cU = bq(cr) | |
1156 | + | let cV = bq(cs) | |
1157 | + | let bA = D(cU, bF) | |
1158 | + | let bB = D(cV, bG) | |
1159 | + | let ca = if ((fw == 0)) | |
1160 | + | then e | |
1161 | + | else bs(bB, bA) | |
1162 | + | let cx = D(cl, bF) | |
1163 | + | let cy = fraction(cx, ca, d) | |
1164 | + | let cn = G(cy, bG) | |
1165 | + | let dl = cj("", 500000, cl, bS, cn, bT, "", true, false) | |
1166 | + | let cI = dl._1 | |
1167 | + | let fB = dl._3 | |
1168 | + | let bW = dl._4 | |
1169 | + | let bY = dl._5 | |
1170 | + | let bV = dl._6 | |
1171 | + | $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)) | |
1323 | 1172 | } | |
1324 | 1173 | ||
1325 | 1174 | ||
1326 | 1175 | ||
1327 | - | @Callable( | |
1328 | - | func | |
1329 | - | let | |
1330 | - | let | |
1331 | - | let | |
1332 | - | let | |
1333 | - | let | |
1334 | - | let | |
1335 | - | let | |
1336 | - | let | |
1337 | - | let | |
1338 | - | let | |
1339 | - | let | |
1340 | - | let | |
1341 | - | let | |
1342 | - | let | |
1343 | - | let | |
1176 | + | @Callable(df) | |
1177 | + | func evaluatePutByPriceAssetREADONLY (cn) = { | |
1178 | + | let bE = aH() | |
1179 | + | let bR = fromBase58String(bE[q]) | |
1180 | + | let cr = bE[r] | |
1181 | + | let bS = fromBase58String(cr) | |
1182 | + | let cs = bE[s] | |
1183 | + | let bT = fromBase58String(cs) | |
1184 | + | let bF = parseIntValue(bE[t]) | |
1185 | + | let bG = parseIntValue(bE[u]) | |
1186 | + | let bU = bE[p] | |
1187 | + | let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity | |
1188 | + | let fC = bq(cr) | |
1189 | + | let fD = bq(cs) | |
1190 | + | let fE = D(fC, bF) | |
1191 | + | let fF = D(fD, bG) | |
1192 | + | let ca = if ((fw == 0)) | |
1344 | 1193 | then e | |
1345 | - | else | |
1346 | - | let | |
1347 | - | let | |
1348 | - | let | |
1349 | - | let | |
1350 | - | let | |
1351 | - | let | |
1352 | - | let | |
1353 | - | let | |
1354 | - | let | |
1355 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1194 | + | else bs(fF, fE) | |
1195 | + | let cy = D(cn, bG) | |
1196 | + | let cx = fraction(cy, d, ca) | |
1197 | + | let cl = G(cx, bF) | |
1198 | + | let dl = cj("", 500000, cl, bS, cn, bT, "", true, false) | |
1199 | + | let cI = dl._1 | |
1200 | + | let fB = dl._3 | |
1201 | + | let bW = dl._4 | |
1202 | + | let bY = dl._5 | |
1203 | + | let bV = dl._6 | |
1204 | + | $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)) | |
1356 | 1205 | } | |
1357 | 1206 | ||
1358 | 1207 | ||
1359 | 1208 | ||
1360 | - | @Callable(dC) | |
1361 | - | func evaluatePutByPriceAssetREADONLY (cw) = { | |
1362 | - | let bN = aP() | |
1363 | - | let ca = fromBase58String(bN[q]) | |
1364 | - | let cA = bN[r] | |
1365 | - | let cb = fromBase58String(cA) | |
1366 | - | let cB = bN[s] | |
1367 | - | let cc = fromBase58String(cB) | |
1368 | - | let bO = parseIntValue(bN[t]) | |
1369 | - | let bP = parseIntValue(bN[u]) | |
1370 | - | let cd = bN[p] | |
1371 | - | let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1372 | - | let gu = by(cA) | |
1373 | - | let gv = by(cB) | |
1374 | - | let gw = D(gu, bO) | |
1375 | - | let gx = D(gv, bP) | |
1376 | - | let cj = if ((gm == 0)) | |
1377 | - | then e | |
1378 | - | else bA(gx, gw) | |
1379 | - | let cH = D(cw, bP) | |
1380 | - | let cG = fraction(cH, d, cj) | |
1381 | - | let cu = G(cG, bO) | |
1382 | - | let dI = cs("", 500000, cu, cb, cw, cc, "", true, false) | |
1383 | - | let cR = dI._1 | |
1384 | - | let gt = dI._3 | |
1385 | - | let cf = dI._4 | |
1386 | - | let ch = dI._5 | |
1387 | - | let ce = dI._6 | |
1388 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j)) | |
1209 | + | @Callable(df) | |
1210 | + | func evaluateGetREADONLY (fG,fH) = { | |
1211 | + | let cA = bN("", fG, fH, this) | |
1212 | + | let cg = cA._1 | |
1213 | + | let ch = cA._2 | |
1214 | + | let bW = cA._5 | |
1215 | + | let bY = cA._6 | |
1216 | + | let bV = cA._7 | |
1217 | + | let cb = cA._8 | |
1218 | + | let bU = parseIntValue(cA._9) | |
1219 | + | $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)) | |
1389 | 1220 | } | |
1390 | 1221 | ||
1391 | 1222 | ||
1392 | - | ||
1393 | - | @Callable(dC) | |
1394 | - | func evaluateGetREADONLY (gy,gz) = { | |
1395 | - | let cJ = bW("", gy, gz, this) | |
1396 | - | let cp = cJ._1 | |
1397 | - | let cq = cJ._2 | |
1398 | - | let cf = cJ._5 | |
1399 | - | let ch = cJ._6 | |
1400 | - | let ce = cJ._7 | |
1401 | - | let ck = cJ._8 | |
1402 | - | let cd = parseIntValue(cJ._9) | |
1403 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cp), toString(cq), toString(cf), toString(ch), toString(ce), toString(ck), toString(cd)], j)) | |
1404 | - | } | |
1405 | - | ||
1406 | - | ||
1407 | - | @Verifier(gA) | |
1408 | - | func gB () = { | |
1409 | - | let gC = { | |
1410 | - | let dN = eP() | |
1411 | - | if ($isInstanceOf(dN, "ByteVector")) | |
1223 | + | @Verifier(fI) | |
1224 | + | func fJ () = { | |
1225 | + | let fK = { | |
1226 | + | let dq = eu() | |
1227 | + | if ($isInstanceOf(dq, "ByteVector")) | |
1412 | 1228 | then { | |
1413 | - | let | |
1414 | - | | |
1229 | + | let ey = dq | |
1230 | + | ey | |
1415 | 1231 | } | |
1416 | - | else if ($isInstanceOf( | |
1417 | - | then | |
1232 | + | else if ($isInstanceOf(dq, "Unit")) | |
1233 | + | then fI.senderPublicKey | |
1418 | 1234 | else throw("Match error") | |
1419 | 1235 | } | |
1420 | - | let | |
1421 | - | if ($isInstanceOf( | |
1236 | + | let dq = fI | |
1237 | + | if ($isInstanceOf(dq, "Order")) | |
1422 | 1238 | then { | |
1423 | - | let | |
1424 | - | let | |
1425 | - | let | |
1426 | - | let | |
1427 | - | let | |
1428 | - | if (if (if ( | |
1429 | - | then | |
1239 | + | let cR = dq | |
1240 | + | let fL = aG() | |
1241 | + | let au = cQ(cR) | |
1242 | + | let av = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey) | |
1243 | + | let aw = sigVerify(cR.bodyBytes, cR.proofs[1], fL) | |
1244 | + | if (if (if (au) | |
1245 | + | then av | |
1430 | 1246 | else false) | |
1431 | - | then | |
1247 | + | then aw | |
1432 | 1248 | else false) | |
1433 | 1249 | then true | |
1434 | - | else | |
1250 | + | else at(au, av, aw) | |
1435 | 1251 | } | |
1436 | - | else if ($isInstanceOf( | |
1252 | + | else if ($isInstanceOf(dq, "SetScriptTransaction")) | |
1437 | 1253 | then { | |
1438 | - | let | |
1439 | - | let | |
1440 | - | let | |
1441 | - | let | |
1442 | - | if (if (( | |
1443 | - | then ( | |
1254 | + | let ev = dq | |
1255 | + | let fM = blake2b256(value(ev.script)) | |
1256 | + | let fN = fromBase64String(value(getString(aD, ar()))) | |
1257 | + | let fO = scriptHash(this) | |
1258 | + | if (if ((fN == fM)) | |
1259 | + | then (fO != fM) | |
1444 | 1260 | else false) | |
1445 | 1261 | then true | |
1446 | - | else sigVerify( | |
1262 | + | else sigVerify(fI.bodyBytes, fI.proofs[0], fK) | |
1447 | 1263 | } | |
1448 | - | else sigVerify( | |
1264 | + | else sigVerify(fI.bodyBytes, fI.proofs[0], fK) | |
1449 | 1265 | } | |
1450 | 1266 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 8 | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = toBigInt(100000000) | |
9 | 9 | ||
10 | 10 | let d = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = toBigInt(0) | |
15 | 15 | ||
16 | 16 | let g = toBigInt(1) | |
17 | 17 | ||
18 | 18 | let h = toBigInt(2) | |
19 | 19 | ||
20 | 20 | let i = "WAVES" | |
21 | 21 | ||
22 | 22 | let j = "__" | |
23 | 23 | ||
24 | 24 | let k = 1 | |
25 | 25 | ||
26 | 26 | let l = 2 | |
27 | 27 | ||
28 | 28 | let m = 3 | |
29 | 29 | ||
30 | 30 | let n = 4 | |
31 | 31 | ||
32 | 32 | let o = 1 | |
33 | 33 | ||
34 | 34 | let p = 2 | |
35 | 35 | ||
36 | 36 | let q = 3 | |
37 | 37 | ||
38 | 38 | let r = 4 | |
39 | 39 | ||
40 | 40 | let s = 5 | |
41 | 41 | ||
42 | 42 | let t = 6 | |
43 | 43 | ||
44 | 44 | let u = 7 | |
45 | 45 | ||
46 | 46 | let v = 8 | |
47 | 47 | ||
48 | 48 | let w = 9 | |
49 | 49 | ||
50 | 50 | let x = 10 | |
51 | 51 | ||
52 | 52 | let y = 1 | |
53 | 53 | ||
54 | 54 | let z = 2 | |
55 | 55 | ||
56 | 56 | let A = 3 | |
57 | 57 | ||
58 | 58 | let B = 1 | |
59 | 59 | ||
60 | 60 | let C = 7 | |
61 | 61 | ||
62 | 62 | func D (E,F) = fraction(toBigInt(E), d, toBigInt(F)) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func G (H,I) = toInt(fraction(H, toBigInt(I), d)) | |
66 | 66 | ||
67 | 67 | ||
68 | - | func J ( | |
68 | + | func J (K,L,M) = fraction(K, L, M) | |
69 | 69 | ||
70 | 70 | ||
71 | - | func L (M,N,O) = fraction(M, N, O) | |
72 | - | ||
73 | - | ||
74 | - | func P (H) = if ((0 > H)) | |
71 | + | func N (H) = if ((0 > H)) | |
75 | 72 | then -(H) | |
76 | 73 | else H | |
77 | 74 | ||
78 | 75 | ||
79 | - | func | |
76 | + | func O (H) = if ((e > H)) | |
80 | 77 | then -(H) | |
81 | 78 | else H | |
82 | 79 | ||
83 | 80 | ||
84 | - | func | |
81 | + | func P () = "%s__factoryContract" | |
85 | 82 | ||
86 | 83 | ||
87 | - | func | |
84 | + | func Q () = "%s__managerPublicKey" | |
88 | 85 | ||
89 | 86 | ||
90 | - | func | |
87 | + | func R () = "%s__pendingManagerPublicKey" | |
91 | 88 | ||
92 | 89 | ||
93 | - | func | |
90 | + | func S () = "%s%s__price__last" | |
94 | 91 | ||
95 | 92 | ||
96 | - | func | |
93 | + | func T (U,V) = makeString(["%s%s%d%d__price__history", toString(U), toString(V)], j) | |
97 | 94 | ||
98 | 95 | ||
99 | - | func | |
96 | + | func W (X,Y) = ((("%s%s%s__P__" + X) + "__") + Y) | |
100 | 97 | ||
101 | 98 | ||
102 | - | func | |
99 | + | func Z (X,Y) = ((("%s%s%s__G__" + X) + "__") + Y) | |
103 | 100 | ||
104 | 101 | ||
105 | - | func | |
102 | + | func aa () = "%s__amountAsset" | |
106 | 103 | ||
107 | 104 | ||
108 | - | func | |
105 | + | func ab () = "%s__priceAsset" | |
109 | 106 | ||
110 | 107 | ||
111 | - | let | |
108 | + | let ac = "%s__fee" | |
112 | 109 | ||
113 | - | let | |
110 | + | let ad = fraction(10, b, 10000) | |
114 | 111 | ||
115 | - | let | |
112 | + | let ae = valueOrElse(getInteger(this, ac), ad) | |
116 | 113 | ||
117 | - | let ah = makeString(["%s", "kLp"], j) | |
118 | - | ||
119 | - | let ai = makeString(["%s", "kLpRefreshedHeight"], j) | |
120 | - | ||
121 | - | let aj = makeString(["%s", "refreshKLpDelay"], j) | |
122 | - | ||
123 | - | let ak = 30 | |
124 | - | ||
125 | - | let al = valueOrElse(getInteger(this, aj), ak) | |
126 | - | ||
127 | - | func am () = "%s__factoryConfig" | |
114 | + | func af () = "%s__factoryConfig" | |
128 | 115 | ||
129 | 116 | ||
130 | - | func | |
117 | + | func ag () = "%s%s__matcher__publicKey" | |
131 | 118 | ||
132 | 119 | ||
133 | - | func | |
120 | + | func ah (ai) = (("%s%s%s__" + ai) + "__mappings__poolContract2LpAsset") | |
134 | 121 | ||
135 | 122 | ||
136 | - | func | |
123 | + | func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config") | |
137 | 124 | ||
138 | 125 | ||
139 | - | func | |
126 | + | func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an) | |
140 | 127 | ||
141 | 128 | ||
142 | - | func | |
129 | + | func ao () = "%s__shutdown" | |
143 | 130 | ||
144 | 131 | ||
145 | - | func | |
132 | + | func ap (aq) = ("%s%s__poolWeight__" + aq) | |
146 | 133 | ||
147 | 134 | ||
148 | - | func | |
135 | + | func ar () = "%s__allowedLpScriptHash" | |
149 | 136 | ||
150 | 137 | ||
151 | - | let | |
138 | + | let as = "%s__feeCollectorAddress" | |
152 | 139 | ||
153 | - | func | |
140 | + | func at (au,av,aw) = throw(((((("order validation failed: orderValid=" + toString(au)) + " senderValid=") + toString(av)) + " matcherValid=") + toString(aw))) | |
154 | 141 | ||
155 | 142 | ||
156 | - | func | |
143 | + | func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], "")) | |
157 | 144 | ||
158 | 145 | ||
159 | - | func | |
146 | + | func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " is not defined"], "")) | |
160 | 147 | ||
161 | 148 | ||
162 | - | func | |
149 | + | func aB (aC) = throw(makeString(["lp.ride:", aC], " ")) | |
163 | 150 | ||
164 | 151 | ||
165 | - | func aK (aJ) = makeString(["lp.ride:", aJ], " ") | |
152 | + | let aD = addressFromStringValue(ax(this, P())) | |
153 | + | ||
154 | + | let aE = addressFromStringValue(ax(aD, as)) | |
155 | + | ||
156 | + | func aF () = valueOrElse(getBoolean(aD, ao()), false) | |
166 | 157 | ||
167 | 158 | ||
168 | - | let aL = addressFromStringValue(aE(this, R())) | |
169 | - | ||
170 | - | let aM = addressFromStringValue(aE(aL, az)) | |
171 | - | ||
172 | - | func aN () = valueOrElse(getBoolean(aL, av()), false) | |
159 | + | func aG () = fromBase58String(ax(aD, ag())) | |
173 | 160 | ||
174 | 161 | ||
175 | - | func aO () = fromBase58String(aE(aL, an())) | |
176 | - | ||
177 | - | ||
178 | - | func aP () = { | |
179 | - | let aQ = aE(this, ac()) | |
180 | - | let aR = aE(this, ad()) | |
181 | - | let as = aH(aL, at(aR)) | |
182 | - | let ar = aH(aL, at(aQ)) | |
183 | - | split(aE(aL, aq(toString(ar), toString(as))), j) | |
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) | |
184 | 168 | } | |
185 | 169 | ||
186 | 170 | ||
187 | - | func | |
171 | + | func aK (aL) = if ((aL == i)) | |
188 | 172 | then unit | |
189 | - | else fromBase58String( | |
173 | + | else fromBase58String(aL) | |
190 | 174 | ||
191 | 175 | ||
192 | - | func | |
176 | + | func aM (aL) = if ((aL == unit)) | |
193 | 177 | then i | |
194 | - | else toBase58String(value( | |
178 | + | else toBase58String(value(aL)) | |
195 | 179 | ||
196 | 180 | ||
197 | - | func | |
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])) | |
198 | 182 | ||
199 | 183 | ||
200 | - | let | |
184 | + | let aP = aN(aH()) | |
201 | 185 | ||
202 | - | let | |
186 | + | let aQ = aP | |
203 | 187 | ||
204 | - | let | |
188 | + | let aR = aQ._1 | |
205 | 189 | ||
206 | - | let | |
190 | + | let aS = aQ._2 | |
207 | 191 | ||
208 | - | let | |
192 | + | let aT = aQ._3 | |
209 | 193 | ||
210 | - | let | |
194 | + | let aU = aQ._4 | |
211 | 195 | ||
212 | - | let | |
196 | + | let aV = aQ._5 | |
213 | 197 | ||
214 | - | let | |
198 | + | let aW = aQ._6 | |
215 | 199 | ||
216 | - | let | |
200 | + | let aX = aQ._7 | |
217 | 201 | ||
218 | - | func | |
202 | + | func aY () = split(ax(aD, af()), j) | |
219 | 203 | ||
220 | 204 | ||
221 | - | let | |
205 | + | let aZ = valueOrErrorMessage(addressFromString(aY()[B]), "incorrect staking address") | |
222 | 206 | ||
223 | - | let | |
207 | + | let ba = valueOrErrorMessage(addressFromString(aY()[C]), "incorrect staking address") | |
224 | 208 | ||
225 | - | func | |
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) | |
226 | 210 | ||
227 | 211 | ||
228 | - | func | |
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) | |
229 | 213 | ||
230 | 214 | ||
231 | - | func | |
215 | + | func bq (br) = if ((br == "WAVES")) | |
232 | 216 | then wavesBalance(this).available | |
233 | - | else assetBalance(this, fromBase58String( | |
217 | + | else assetBalance(this, fromBase58String(br)) | |
234 | 218 | ||
235 | 219 | ||
236 | - | func | |
220 | + | func bs (bt,bu) = fraction(bt, d, bu) | |
237 | 221 | ||
238 | 222 | ||
239 | - | func bD (bB,bC,K) = fraction(bB, d, bC, K) | |
240 | - | ||
241 | - | ||
242 | - | func bE (bF,bG,bH,bI) = { | |
243 | - | let bJ = D(bH, bF) | |
244 | - | let bK = D(bI, bG) | |
245 | - | bA(bK, bJ) | |
223 | + | func bv (bw,bx,by,bz) = { | |
224 | + | let bA = D(by, bw) | |
225 | + | let bB = D(bz, bx) | |
226 | + | bs(bB, bA) | |
246 | 227 | } | |
247 | 228 | ||
248 | 229 | ||
249 | - | func | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | let | |
258 | - | let | |
259 | - | [ | |
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] | |
260 | 241 | } | |
261 | 242 | ||
262 | 243 | ||
263 | - | func | |
264 | - | let | |
265 | - | [G( | |
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)] | |
266 | 247 | } | |
267 | 248 | ||
268 | 249 | ||
269 | - | func | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | if (( | |
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)) | |
279 | 260 | then throw("Invalid asset passed.") | |
280 | 261 | else { | |
281 | - | let | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
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 == "")) | |
294 | 275 | then nil | |
295 | - | else [ScriptTransfer( | |
276 | + | else [ScriptTransfer(X, cg, if ((bS == "WAVES")) | |
296 | 277 | then unit | |
297 | - | else fromBase58String( | |
278 | + | else fromBase58String(bS)), ScriptTransfer(X, ch, if ((bT == "WAVES")) | |
298 | 279 | then unit | |
299 | - | else fromBase58String( | |
300 | - | $Tuple10( | |
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) | |
301 | 282 | } | |
302 | 283 | } | |
303 | 284 | ||
304 | 285 | ||
305 | - | func | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | if (if (( | |
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)) | |
319 | 300 | then true | |
320 | - | else ( | |
301 | + | else (cs != cw)) | |
321 | 302 | then throw("Invalid amt or price asset passed.") | |
322 | 303 | else { | |
323 | - | let | |
324 | - | then | |
325 | - | else ( | |
326 | - | let | |
327 | - | then | |
328 | - | else ( | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
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)) | |
335 | 316 | then { | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | $Tuple5(G( | |
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) | |
340 | 321 | } | |
341 | 322 | else { | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | if (if (( | |
346 | - | then ( | |
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) | |
347 | 328 | else false) | |
348 | - | then throw(((("Price slippage " + toString( | |
329 | + | then throw(((("Price slippage " + toString(cB)) + " exceeded the passed limit of ") + toString(cC))) | |
349 | 330 | else { | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | then $Tuple2( | |
355 | - | else $Tuple2( | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | $Tuple5( | |
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) | |
360 | 341 | } | |
361 | 342 | } | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | let | |
366 | - | let | |
367 | - | if ((0 >= | |
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)) | |
368 | 349 | then throw("Invalid calculations. LP calculated is less than zero.") | |
369 | 350 | else { | |
370 | - | let | |
351 | + | let cM = if (!(cq)) | |
371 | 352 | then 0 | |
372 | - | else | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | $Tuple13( | |
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) | |
377 | 358 | } | |
378 | 359 | } | |
379 | 360 | } | |
380 | 361 | ||
381 | 362 | ||
382 | - | func cZ (da,db,ce) = { | |
383 | - | let dc = fraction(pow((da * db), 0, toBigInt(5), 1, 18, DOWN), g, ce) | |
384 | - | if ((ce == f)) | |
385 | - | then f | |
386 | - | else dc | |
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()) | |
377 | + | then true | |
378 | + | else (bU == m)) | |
379 | + | then true | |
380 | + | else (bU == n)) | |
381 | + | then throw("Exchange operations disabled") | |
382 | + | else { | |
383 | + | let cW = cR.assetPair.amountAsset | |
384 | + | let cX = if ((cW == unit)) | |
385 | + | then "WAVES" | |
386 | + | else toBase58String(value(cW)) | |
387 | + | let cY = cR.assetPair.priceAsset | |
388 | + | let cZ = if ((cY == unit)) | |
389 | + | then "WAVES" | |
390 | + | else toBase58String(value(cY)) | |
391 | + | if (if ((cX != cS)) | |
392 | + | then true | |
393 | + | else (cZ != cT)) | |
394 | + | then throw("Wrong order assets.") | |
395 | + | 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) | |
402 | + | true | |
403 | + | } | |
404 | + | } | |
387 | 405 | } | |
388 | 406 | ||
389 | 407 | ||
390 | - | func dd (de,df,dg) = { | |
391 | - | let dh = (toBigInt(by(aU(bc))) - de) | |
392 | - | let di = (toBigInt(by(aU(bd))) - df) | |
393 | - | let dj = (toBigInt(value(assetInfo(bb)).quantity) - dg) | |
394 | - | let dk = cZ(dh, di, dj) | |
395 | - | dk | |
396 | - | } | |
397 | - | ||
398 | - | ||
399 | - | func dl (dm,dn,dg) = { | |
400 | - | let dh = (by(aU(bc)) + dm) | |
401 | - | let di = (by(aU(bd)) + dn) | |
402 | - | let dj = (value(assetInfo(bb)).quantity + dg) | |
403 | - | let dc = cZ(toBigInt(dh), toBigInt(di), toBigInt(dj)) | |
404 | - | let do = [IntegerEntry(ai, height), StringEntry(ah, toString(dc))] | |
405 | - | $Tuple2(do, dc) | |
406 | - | } | |
407 | - | ||
408 | - | ||
409 | - | func dp (dq,dc) = if ((dc >= dq)) | |
410 | - | then true | |
411 | - | else aI(makeString(["updated KLp lower than current KLp", toString(dq), toString(dc)], " ")) | |
412 | - | ||
413 | - | ||
414 | - | func dr (ds) = { | |
415 | - | let dt = ds.amount | |
416 | - | let du = fraction(ds.amount, ds.price, b, FLOOR) | |
417 | - | let dv = if ((ds.orderType == Buy)) | |
418 | - | then $Tuple2(dt, -(du)) | |
419 | - | else $Tuple2(-(dt), du) | |
420 | - | let dm = dv._1 | |
421 | - | let dn = dv._2 | |
422 | - | if (if (if (aN()) | |
423 | - | then true | |
424 | - | else (ba == m)) | |
425 | - | then true | |
426 | - | else (ba == n)) | |
427 | - | then throw("Exchange operations disabled") | |
428 | - | else if (if ((ds.assetPair.amountAsset != bc)) | |
429 | - | then true | |
430 | - | else (ds.assetPair.priceAsset != bd)) | |
431 | - | then throw("Wrong order assets.") | |
432 | - | else { | |
433 | - | let dw = valueOrErrorMessage(parseBigInt(valueOrErrorMessage(getString(this, ah), aK("kLp is required"))), aK("invalid kLp")) | |
434 | - | let dx = dl(dm, dn, 0) | |
435 | - | let dy = dx._1 | |
436 | - | let dz = dx._2 | |
437 | - | let dA = (dz >= dw) | |
438 | - | dA | |
439 | - | } | |
440 | - | } | |
441 | - | ||
442 | - | ||
443 | - | func dB (dC) = if ((size(dC.payments) != 1)) | |
408 | + | func de (df) = if ((size(df.payments) != 1)) | |
444 | 409 | then throw("exactly 1 payment is expected") | |
445 | 410 | else { | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
454 | - | if (if ( | |
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()) | |
455 | 420 | then true | |
456 | - | else ( | |
457 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
458 | - | else $Tuple5( | |
421 | + | else (bU == n)) | |
422 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bU))) | |
423 | + | else $Tuple5(cg, ch, dh, bP, ci) | |
459 | 424 | } | |
460 | 425 | ||
461 | 426 | ||
462 | - | func | |
427 | + | func di (df,ck,cq) = if ((size(df.payments) != 2)) | |
463 | 428 | then throw("exactly 2 payments are expected") | |
464 | 429 | else { | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | if (if (if ( | |
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()) | |
470 | 435 | then true | |
471 | - | else ( | |
436 | + | else (bU == l)) | |
472 | 437 | then true | |
473 | - | else ( | |
474 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
475 | - | else | |
438 | + | else (bU == n)) | |
439 | + | then throw(("Put operation is blocked by admin. Status = " + toString(bU))) | |
440 | + | else dl | |
476 | 441 | } | |
477 | 442 | ||
478 | 443 | ||
479 | - | func | |
480 | - | let | |
481 | - | if (( | |
444 | + | func dm (dn) = { | |
445 | + | let do = invoke(aD, "emit", [dn], nil) | |
446 | + | if ((do == do)) | |
482 | 447 | then { | |
483 | - | let | |
484 | - | let | |
485 | - | if ($isInstanceOf( | |
448 | + | let dp = { | |
449 | + | let dq = do | |
450 | + | if ($isInstanceOf(dq, "Address")) | |
486 | 451 | then { | |
487 | - | let | |
488 | - | invoke( | |
452 | + | let dr = dq | |
453 | + | invoke(dr, "emit", [dn], nil) | |
489 | 454 | } | |
490 | 455 | else unit | |
491 | 456 | } | |
492 | - | if (( | |
493 | - | then | |
457 | + | if ((dp == dp)) | |
458 | + | then dn | |
494 | 459 | else throw("Strict value is not equal to itself.") | |
495 | 460 | } | |
496 | 461 | else throw("Strict value is not equal to itself.") | |
497 | 462 | } | |
498 | 463 | ||
499 | 464 | ||
500 | - | func | |
501 | - | let | |
502 | - | $Tuple2(( | |
465 | + | func ds (dn) = { | |
466 | + | let dt = fraction(dn, ae, b) | |
467 | + | $Tuple2((dn - dt), dt) | |
503 | 468 | } | |
504 | 469 | ||
505 | 470 | ||
506 | - | func | |
507 | - | let | |
508 | - | let | |
509 | - | let | |
510 | - | let | |
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)) | |
511 | 476 | then true | |
512 | - | else if (( | |
477 | + | else if ((dw == aV)) | |
513 | 478 | then false | |
514 | - | else | |
515 | - | let | |
516 | - | then $Tuple2( | |
517 | - | else if ( | |
518 | - | then $Tuple2(( | |
519 | - | else $Tuple2( | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | then $Tuple2( | |
524 | - | else $Tuple2(0, | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
532 | - | let | |
533 | - | let | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | then | |
538 | - | else | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
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)) | |
542 | 507 | then true | |
543 | - | else | |
544 | - | if (( | |
508 | + | else aB("initial deposit requires all coins") | |
509 | + | if ((dS == dS)) | |
545 | 510 | then { | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
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) | |
549 | 514 | then nil | |
550 | - | else [IntegerEntry( | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | then $Tuple2( | |
556 | - | else $Tuple2( | |
557 | - | let | |
558 | - | let | |
559 | - | let | |
560 | - | fraction(( | |
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 = { | |
519 | + | let dY = if (dA) | |
520 | + | then $Tuple2(dF, dC) | |
521 | + | else $Tuple2(dG, dD) | |
522 | + | let dn = dY._1 | |
523 | + | let dZ = dY._2 | |
524 | + | let ea = toInt(fraction(dR, toBigInt((dn / 2)), toBigInt(dZ))) | |
525 | + | fraction((dU - ea), b, ea) | |
561 | 526 | } | |
562 | - | $ | |
527 | + | $Tuple4(dU, cP, dt, dX) | |
563 | 528 | } | |
564 | 529 | else throw("Strict value is not equal to itself.") | |
565 | 530 | } | |
566 | 531 | ||
567 | 532 | ||
568 | - | func | |
569 | - | let | |
570 | - | let | |
533 | + | func eb (ec,dK,dw,X,Y) = { | |
534 | + | let dx = (Y == unit) | |
535 | + | let ed = [if ((dw == aT)) | |
571 | 536 | then true | |
572 | - | else | |
573 | - | if (( | |
537 | + | else aB("invalid lp asset")] | |
538 | + | if ((ed == ed)) | |
574 | 539 | then { | |
575 | - | let | |
540 | + | let ee = if ((ec == aU)) | |
576 | 541 | then true | |
577 | - | else if (( | |
542 | + | else if ((ec == aV)) | |
578 | 543 | then false | |
579 | - | else | |
580 | - | let | |
581 | - | then toBigInt( | |
582 | - | else toBigInt( | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | then | |
587 | - | else | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
595 | - | let | |
596 | - | then $Tuple4( | |
597 | - | else $Tuple4(0, | |
598 | - | let | |
599 | - | let | |
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | let | |
604 | - | let | |
544 | + | else aB("invalid asset") | |
545 | + | let ef = if (ee) | |
546 | + | then toBigInt(bq(aM(aU))) | |
547 | + | else toBigInt(bq(aM(aV))) | |
548 | + | let eg = bq(aM(aU)) | |
549 | + | let eh = bq(aM(aV)) | |
550 | + | let ei = if (ee) | |
551 | + | then eg | |
552 | + | else eh | |
553 | + | let ej = toBigInt(ei) | |
554 | + | let dR = toBigInt(valueOrErrorMessage(assetInfo(aT), (("asset " + toBase58String(aT)) + " doesn't exist")).quantity) | |
555 | + | let ek = toBigInt(dK) | |
556 | + | let el = max([0, toInt(((ef * (d - pow((d - ((ek * d) / dR)), 18, h, 0, 18, DOWN))) / d))]) | |
557 | + | let em = ds(el) | |
558 | + | let en = em._1 | |
559 | + | let dt = em._2 | |
560 | + | let eo = if (ee) | |
561 | + | then $Tuple4(en, 0, (eg - el), eh) | |
562 | + | else $Tuple4(0, en, eg, (eh - el)) | |
563 | + | let ep = eo._1 | |
564 | + | let eq = eo._2 | |
565 | + | let er = eo._3 | |
566 | + | let es = eo._4 | |
567 | + | let dN = bs(D(es, aX), D(er, aW)) | |
568 | + | let dO = G(dN, b) | |
569 | + | let cP = if (dx) | |
605 | 570 | then nil | |
606 | - | else [StringEntry( | |
607 | - | let | |
608 | - | let | |
609 | - | let | |
610 | - | let | |
611 | - | fraction(( | |
571 | + | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bm(ep, eq, dK, dO, height, lastBlock.timestamp)), IntegerEntry(S(), dO), IntegerEntry(T(height, lastBlock.timestamp), dO)] | |
572 | + | let dV = bs(D(eh, aX), D(eg, aW)) | |
573 | + | let dW = G(dV, b) | |
574 | + | let dX = { | |
575 | + | let et = (toInt(fraction(ef, ek, dR)) * 2) | |
576 | + | fraction((en - et), b, et) | |
612 | 577 | } | |
613 | - | $ | |
578 | + | $Tuple4(en, cP, dt, dX) | |
614 | 579 | } | |
615 | 580 | else throw("Strict value is not equal to itself.") | |
616 | 581 | } | |
617 | 582 | ||
618 | 583 | ||
619 | - | func | |
620 | - | let | |
621 | - | if ($isInstanceOf( | |
584 | + | func eu () = { | |
585 | + | let dq = getString(Q()) | |
586 | + | if ($isInstanceOf(dq, "String")) | |
622 | 587 | then { | |
623 | - | let | |
624 | - | fromBase58String( | |
588 | + | let ev = dq | |
589 | + | fromBase58String(ev) | |
625 | 590 | } | |
626 | - | else if ($isInstanceOf( | |
591 | + | else if ($isInstanceOf(dq, "Unit")) | |
627 | 592 | then unit | |
628 | 593 | else throw("Match error") | |
629 | 594 | } | |
630 | 595 | ||
631 | 596 | ||
632 | - | func | |
633 | - | let | |
634 | - | if ($isInstanceOf( | |
597 | + | func ew () = { | |
598 | + | let dq = getString(R()) | |
599 | + | if ($isInstanceOf(dq, "String")) | |
635 | 600 | then { | |
636 | - | let | |
637 | - | fromBase58String( | |
601 | + | let ev = dq | |
602 | + | fromBase58String(ev) | |
638 | 603 | } | |
639 | - | else if ($isInstanceOf( | |
604 | + | else if ($isInstanceOf(dq, "Unit")) | |
640 | 605 | then unit | |
641 | 606 | else throw("Match error") | |
642 | 607 | } | |
643 | 608 | ||
644 | 609 | ||
645 | - | func | |
646 | - | let | |
647 | - | if ($isInstanceOf( | |
610 | + | func ex (df) = { | |
611 | + | let dq = eu() | |
612 | + | if ($isInstanceOf(dq, "ByteVector")) | |
648 | 613 | then { | |
649 | - | let | |
650 | - | ( | |
614 | + | let ey = dq | |
615 | + | (df.callerPublicKey == ey) | |
651 | 616 | } | |
652 | - | else if ($isInstanceOf( | |
653 | - | then ( | |
617 | + | else if ($isInstanceOf(dq, "Unit")) | |
618 | + | then (df.caller == this) | |
654 | 619 | else throw("Match error") | |
655 | 620 | } | |
656 | 621 | ||
657 | 622 | ||
658 | - | func | |
659 | - | let | |
660 | - | let | |
661 | - | if ($isInstanceOf( | |
623 | + | func ez (df) = { | |
624 | + | let eA = throw("Permission denied") | |
625 | + | let dq = eu() | |
626 | + | if ($isInstanceOf(dq, "ByteVector")) | |
662 | 627 | then { | |
663 | - | let | |
664 | - | if (( | |
628 | + | let ey = dq | |
629 | + | if ((df.callerPublicKey == ey)) | |
665 | 630 | then true | |
666 | - | else | |
631 | + | else eA | |
667 | 632 | } | |
668 | - | else if ($isInstanceOf( | |
669 | - | then if (( | |
633 | + | else if ($isInstanceOf(dq, "Unit")) | |
634 | + | then if ((df.caller == this)) | |
670 | 635 | then true | |
671 | - | else | |
636 | + | else eA | |
672 | 637 | else throw("Match error") | |
673 | 638 | } | |
674 | 639 | ||
675 | 640 | ||
676 | - | @Callable( | |
677 | - | func setManager ( | |
678 | - | let | |
679 | - | if (( | |
641 | + | @Callable(df) | |
642 | + | func setManager (eB) = { | |
643 | + | let eC = ez(df) | |
644 | + | if ((eC == eC)) | |
680 | 645 | then { | |
681 | - | let | |
682 | - | if (( | |
683 | - | then [StringEntry( | |
646 | + | let eD = fromBase58String(eB) | |
647 | + | if ((eD == eD)) | |
648 | + | then [StringEntry(R(), eB)] | |
684 | 649 | else throw("Strict value is not equal to itself.") | |
685 | 650 | } | |
686 | 651 | else throw("Strict value is not equal to itself.") | |
687 | 652 | } | |
688 | 653 | ||
689 | 654 | ||
690 | 655 | ||
691 | - | @Callable( | |
656 | + | @Callable(df) | |
692 | 657 | func confirmManager () = { | |
693 | - | let | |
694 | - | let | |
658 | + | let eE = ew() | |
659 | + | let eF = if (isDefined(eE)) | |
695 | 660 | then true | |
696 | 661 | else throw("No pending manager") | |
697 | - | if (( | |
662 | + | if ((eF == eF)) | |
698 | 663 | then { | |
699 | - | let | |
664 | + | let eG = if ((df.callerPublicKey == value(eE))) | |
700 | 665 | then true | |
701 | 666 | else throw("You are not pending manager") | |
702 | - | if (( | |
703 | - | then [StringEntry( | |
667 | + | if ((eG == eG)) | |
668 | + | then [StringEntry(Q(), toBase58String(value(eE))), DeleteEntry(R())] | |
704 | 669 | else throw("Strict value is not equal to itself.") | |
705 | 670 | } | |
706 | 671 | else throw("Strict value is not equal to itself.") | |
707 | 672 | } | |
708 | 673 | ||
709 | 674 | ||
710 | 675 | ||
711 | - | @Callable( | |
712 | - | func put ( | |
676 | + | @Callable(df) | |
677 | + | func put (ck,eH) = if ((0 > ck)) | |
713 | 678 | then throw("Invalid slippageTolerance passed") | |
714 | 679 | else { | |
715 | - | let dI = dF(dC, ct, true) | |
716 | - | let cV = dI._2 | |
717 | - | let ca = dI._7 | |
718 | - | let cr = dI._9 | |
719 | - | let cW = dI._10 | |
720 | - | let cX = dI._11 | |
721 | - | let fd = dI._12 | |
722 | - | let fe = dI._13 | |
723 | - | let dG = toBigInt(value(dC.payments[0]).amount) | |
724 | - | let dH = toBigInt(value(dC.payments[1]).amount) | |
725 | - | let dk = dd(dG, dH, toBigInt(0)) | |
726 | - | if ((dk == dk)) | |
680 | + | let dl = di(df, ck, true) | |
681 | + | let cM = dl._2 | |
682 | + | let bR = dl._7 | |
683 | + | let ci = dl._9 | |
684 | + | let cN = dl._10 | |
685 | + | let cO = dl._11 | |
686 | + | let eI = dl._12 | |
687 | + | let eJ = dl._13 | |
688 | + | let do = invoke(aD, "emit", [cM], nil) | |
689 | + | if ((do == do)) | |
727 | 690 | then { | |
728 | - | let dL = invoke(aL, "emit", [cV], nil) | |
729 | - | if ((dL == dL)) | |
691 | + | let dp = { | |
692 | + | let dq = do | |
693 | + | if ($isInstanceOf(dq, "Address")) | |
694 | + | then { | |
695 | + | let dr = dq | |
696 | + | invoke(dr, "emit", [cM], nil) | |
697 | + | } | |
698 | + | else unit | |
699 | + | } | |
700 | + | if ((dp == dp)) | |
730 | 701 | then { | |
731 | - | let dM = { | |
732 | - | let dN = dL | |
733 | - | if ($isInstanceOf(dN, "Address")) | |
734 | - | then { | |
735 | - | let dO = dN | |
736 | - | invoke(dO, "emit", [cV], nil) | |
737 | - | } | |
738 | - | else unit | |
739 | - | } | |
740 | - | if ((dM == dM)) | |
702 | + | let eK = if ((cN > 0)) | |
703 | + | then invoke(ba, "put", nil, [AttachedPayment(eI, cN)]) | |
704 | + | else nil | |
705 | + | if ((eK == eK)) | |
741 | 706 | then { | |
742 | - | let | |
743 | - | then invoke( | |
707 | + | let eL = if ((cO > 0)) | |
708 | + | then invoke(ba, "put", nil, [AttachedPayment(eJ, cO)]) | |
744 | 709 | else nil | |
745 | - | if (( | |
710 | + | if ((eL == eL)) | |
746 | 711 | then { | |
747 | - | let fg = if ((cX > 0)) | |
748 | - | then invoke(bi, "put", nil, [AttachedPayment(fe, cX)]) | |
749 | - | else nil | |
750 | - | if ((fg == fg)) | |
712 | + | let eM = if (eH) | |
751 | 713 | then { | |
752 | - | let fh = if (fc) | |
753 | - | then { | |
754 | - | let fi = invoke(bh, "stake", nil, [AttachedPayment(ca, cV)]) | |
755 | - | if ((fi == fi)) | |
756 | - | then nil | |
757 | - | else throw("Strict value is not equal to itself.") | |
758 | - | } | |
759 | - | else [ScriptTransfer(dC.caller, cV, ca)] | |
760 | - | let fj = dl(0, 0, 0) | |
761 | - | if ((fj == fj)) | |
762 | - | then { | |
763 | - | let dc = fj._2 | |
764 | - | let fk = fj._1 | |
765 | - | let fl = dp(dk, dc) | |
766 | - | if ((fl == fl)) | |
767 | - | then ((cr ++ fh) ++ fk) | |
768 | - | else throw("Strict value is not equal to itself.") | |
769 | - | } | |
714 | + | let eN = invoke(aZ, "stake", nil, [AttachedPayment(bR, cM)]) | |
715 | + | if ((eN == eN)) | |
716 | + | then nil | |
770 | 717 | else throw("Strict value is not equal to itself.") | |
771 | 718 | } | |
772 | - | else throw("Strict value is not equal to itself.") | |
719 | + | else [ScriptTransfer(df.caller, cM, bR)] | |
720 | + | (ci ++ eM) | |
773 | 721 | } | |
774 | 722 | else throw("Strict value is not equal to itself.") | |
775 | 723 | } | |
776 | 724 | else throw("Strict value is not equal to itself.") | |
777 | 725 | } | |
778 | 726 | else throw("Strict value is not equal to itself.") | |
779 | 727 | } | |
780 | 728 | else throw("Strict value is not equal to itself.") | |
781 | 729 | } | |
782 | 730 | ||
783 | 731 | ||
784 | 732 | ||
785 | - | @Callable( | |
786 | - | func putForFree ( | |
733 | + | @Callable(df) | |
734 | + | func putForFree (eO) = if ((0 > eO)) | |
787 | 735 | then throw("Invalid value passed") | |
788 | 736 | else { | |
789 | - | let dI = dF(dC, fm, false) | |
790 | - | let cr = dI._9 | |
791 | - | let dG = toBigInt(value(dC.payments[0]).amount) | |
792 | - | let dH = toBigInt(value(dC.payments[1]).amount) | |
793 | - | let dk = dd(dG, dH, toBigInt(0)) | |
794 | - | if ((dk == dk)) | |
795 | - | then { | |
796 | - | let fn = dl(0, 0, 0) | |
797 | - | let fk = fn._1 | |
798 | - | let dc = fn._2 | |
799 | - | let fl = dp(dk, dc) | |
800 | - | if ((fl == fl)) | |
801 | - | then (cr ++ fk) | |
802 | - | else throw("Strict value is not equal to itself.") | |
803 | - | } | |
804 | - | else throw("Strict value is not equal to itself.") | |
737 | + | let dl = di(df, eO, false) | |
738 | + | dl._9 | |
805 | 739 | } | |
806 | 740 | ||
807 | 741 | ||
808 | 742 | ||
809 | - | @Callable( | |
810 | - | func putOneTkn ( | |
811 | - | let | |
812 | - | let | |
813 | - | if ($isInstanceOf( | |
814 | - | then | |
815 | - | else throw(($getType( | |
743 | + | @Callable(df) | |
744 | + | func putOneTkn (eP,eQ) = { | |
745 | + | let eR = { | |
746 | + | let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
747 | + | if ($isInstanceOf(eS, "Boolean")) | |
748 | + | then eS | |
749 | + | else throw(($getType(eS) + " couldn't be cast to Boolean")) | |
816 | 750 | } | |
817 | - | let | |
751 | + | let eT = if (if (if (aF()) | |
818 | 752 | then true | |
819 | - | else ( | |
753 | + | else (aS == l)) | |
820 | 754 | then true | |
821 | - | else ( | |
755 | + | else (aS == n)) | |
822 | 756 | then true | |
823 | - | else | |
824 | - | let | |
757 | + | else eR | |
758 | + | let ed = [if (if (!(eT)) | |
825 | 759 | then true | |
826 | - | else | |
760 | + | else ex(df)) | |
827 | 761 | then true | |
828 | - | else | |
762 | + | else aB("put operation is blocked by admin"), if ((size(df.payments) == 1)) | |
829 | 763 | then true | |
830 | - | else | |
831 | - | if (( | |
764 | + | else aB("exactly 1 payment are expected")] | |
765 | + | if ((ed == ed)) | |
832 | 766 | then { | |
833 | - | let ft = dC.payments[0] | |
834 | - | let dT = ft.assetId | |
835 | - | let dS = ft.amount | |
836 | - | let dk = if ((dT == bc)) | |
837 | - | then dd(toBigInt(dS), toBigInt(0), toBigInt(0)) | |
838 | - | else if ((dT == bd)) | |
839 | - | then dd(toBigInt(0), toBigInt(dS), toBigInt(0)) | |
840 | - | else aI("payment asset is not supported") | |
841 | - | let Z = dC.caller | |
842 | - | let aa = dC.transactionId | |
843 | - | let fu = dR(dS, dT, Z, aa) | |
844 | - | if ((fu == fu)) | |
767 | + | let eU = df.payments[0] | |
768 | + | let dw = eU.assetId | |
769 | + | let dv = eU.amount | |
770 | + | let X = df.caller | |
771 | + | let Y = df.transactionId | |
772 | + | let eV = du(dv, dw, X, Y) | |
773 | + | if ((eV == eV)) | |
845 | 774 | then { | |
846 | - | let dX = fu._5 | |
847 | - | let fv = fu._4 | |
848 | - | let dQ = fu._3 | |
849 | - | let cY = fu._2 | |
850 | - | let fw = fu._1 | |
851 | - | let fx = if (if ((fo > 0)) | |
852 | - | then (fo > fw) | |
775 | + | let eW = eV._4 | |
776 | + | let dt = eV._3 | |
777 | + | let cP = eV._2 | |
778 | + | let eX = eV._1 | |
779 | + | let eY = if (if ((eP > 0)) | |
780 | + | then (eP > eX) | |
853 | 781 | else false) | |
854 | - | then | |
855 | - | else | |
856 | - | let | |
857 | - | if (( | |
782 | + | then aB(makeString(["amount to receive is less than ", toString(eP)], "")) | |
783 | + | else eX | |
784 | + | let do = dm(eY) | |
785 | + | if ((do == do)) | |
858 | 786 | then { | |
859 | - | let | |
787 | + | let eM = if (eQ) | |
860 | 788 | then { | |
861 | - | let | |
862 | - | if (( | |
789 | + | let eZ = invoke(aZ, "stake", nil, [AttachedPayment(aT, eY)]) | |
790 | + | if ((eZ == eZ)) | |
863 | 791 | then nil | |
864 | 792 | else throw("Strict value is not equal to itself.") | |
865 | 793 | } | |
866 | - | else [ScriptTransfer( | |
867 | - | let | |
868 | - | then [ScriptTransfer( | |
794 | + | else [ScriptTransfer(df.caller, eY, aT)] | |
795 | + | let fa = if ((dt > 0)) | |
796 | + | then [ScriptTransfer(aE, dt, dw)] | |
869 | 797 | else nil | |
870 | - | let fA = if ((this == aM)) | |
871 | - | then $Tuple2(0, 0) | |
872 | - | else if (dX) | |
873 | - | then $Tuple2(-(dQ), 0) | |
874 | - | else $Tuple2(0, -(dQ)) | |
875 | - | let dm = fA._1 | |
876 | - | let dn = fA._2 | |
877 | - | let fB = dl(dm, dn, 0) | |
878 | - | let fk = fB._1 | |
879 | - | let dc = fB._2 | |
880 | - | let dw = value(getString(ah)) | |
881 | - | let fl = dp(dk, dc) | |
882 | - | if ((fl == fl)) | |
883 | - | then $Tuple2((((cY ++ fh) ++ fz) ++ fk), fx) | |
884 | - | else throw("Strict value is not equal to itself.") | |
798 | + | $Tuple2(((cP ++ eM) ++ fa), eY) | |
885 | 799 | } | |
886 | 800 | else throw("Strict value is not equal to itself.") | |
887 | 801 | } | |
888 | 802 | else throw("Strict value is not equal to itself.") | |
889 | 803 | } | |
890 | 804 | else throw("Strict value is not equal to itself.") | |
891 | 805 | } | |
892 | 806 | ||
893 | 807 | ||
894 | 808 | ||
895 | - | @Callable(dC) | |
896 | - | func putOneTknREADONLY (dT,dS) = { | |
897 | - | let fC = dR(dS, aS(dT), unit, unit) | |
898 | - | let fw = fC._1 | |
899 | - | let cY = fC._2 | |
900 | - | let dQ = fC._3 | |
901 | - | let fv = fC._4 | |
902 | - | let dX = fC._5 | |
903 | - | $Tuple2(nil, $Tuple3(fw, dQ, fv)) | |
809 | + | @Callable(df) | |
810 | + | func putOneTknREADONLY (dw,dv) = { | |
811 | + | let fb = du(dv, aK(dw), unit, unit) | |
812 | + | let eX = fb._1 | |
813 | + | let cP = fb._2 | |
814 | + | let dt = fb._3 | |
815 | + | let eW = fb._4 | |
816 | + | $Tuple2(nil, $Tuple3(eX, dt, eW)) | |
904 | 817 | } | |
905 | 818 | ||
906 | 819 | ||
907 | 820 | ||
908 | - | @Callable( | |
909 | - | func getOneTkn ( | |
910 | - | let | |
911 | - | let | |
912 | - | if ($isInstanceOf( | |
913 | - | then | |
914 | - | else throw(($getType( | |
821 | + | @Callable(df) | |
822 | + | func getOneTkn (fc,eP) = { | |
823 | + | let eR = { | |
824 | + | let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
825 | + | if ($isInstanceOf(eS, "Boolean")) | |
826 | + | then eS | |
827 | + | else throw(($getType(eS) + " couldn't be cast to Boolean")) | |
915 | 828 | } | |
916 | - | let | |
829 | + | let fd = if (if (aF()) | |
917 | 830 | then true | |
918 | - | else ( | |
831 | + | else (aS == n)) | |
919 | 832 | then true | |
920 | - | else | |
921 | - | let | |
833 | + | else eR | |
834 | + | let ed = [if (if (!(fd)) | |
922 | 835 | then true | |
923 | - | else | |
836 | + | else ex(df)) | |
924 | 837 | then true | |
925 | - | else | |
838 | + | else aB("get operation is blocked by admin"), if ((size(df.payments) == 1)) | |
926 | 839 | then true | |
927 | - | else | |
928 | - | if (( | |
840 | + | else aB("exactly 1 payment are expected")] | |
841 | + | if ((ed == ed)) | |
929 | 842 | then { | |
930 | - | let ex = aS(fD) | |
931 | - | let ft = dC.payments[0] | |
932 | - | let dT = ft.assetId | |
933 | - | let ef = ft.amount | |
934 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(ef)) | |
935 | - | let Z = dC.caller | |
936 | - | let aa = dC.transactionId | |
937 | - | let fF = ew(ex, ef, dT, Z, aa) | |
938 | - | if ((fF == fF)) | |
843 | + | let ec = aK(fc) | |
844 | + | let eU = df.payments[0] | |
845 | + | let dw = eU.assetId | |
846 | + | let dK = eU.amount | |
847 | + | let X = df.caller | |
848 | + | let Y = df.transactionId | |
849 | + | let fe = eb(ec, dK, dw, X, Y) | |
850 | + | if ((fe == fe)) | |
939 | 851 | then { | |
940 | - | let ez = fF._5 | |
941 | - | let fv = fF._4 | |
942 | - | let dQ = fF._3 | |
943 | - | let cY = fF._2 | |
944 | - | let fG = fF._1 | |
945 | - | let dK = if (if ((fo > 0)) | |
946 | - | then (fo > fG) | |
852 | + | let eW = fe._4 | |
853 | + | let dt = fe._3 | |
854 | + | let cP = fe._2 | |
855 | + | let ff = fe._1 | |
856 | + | let dn = if (if ((eP > 0)) | |
857 | + | then (eP > ff) | |
947 | 858 | else false) | |
948 | - | then | |
949 | - | else | |
950 | - | let | |
951 | - | if (( | |
859 | + | then aB(makeString(["amount to receive is less than ", toString(eP)], "")) | |
860 | + | else ff | |
861 | + | let fg = invoke(aD, "burn", [dK], [AttachedPayment(dw, dK)]) | |
862 | + | if ((fg == fg)) | |
952 | 863 | then { | |
953 | - | let | |
954 | - | let | |
955 | - | then [ScriptTransfer( | |
864 | + | let fh = [ScriptTransfer(X, dn, ec)] | |
865 | + | let fa = if ((dt > 0)) | |
866 | + | then [ScriptTransfer(aE, dt, ec)] | |
956 | 867 | else nil | |
957 | - | let fJ = { | |
958 | - | let fK = if ((this == aM)) | |
959 | - | then 0 | |
960 | - | else dQ | |
961 | - | if (ez) | |
962 | - | then $Tuple2(-((dK + fK)), 0) | |
963 | - | else $Tuple2(0, -((dK + fK))) | |
964 | - | } | |
965 | - | let dm = fJ._1 | |
966 | - | let dn = fJ._2 | |
967 | - | let fL = dl(dm, dn, 0) | |
968 | - | let fk = fL._1 | |
969 | - | let dc = fL._2 | |
970 | - | let fl = dp(dk, dc) | |
971 | - | if ((fl == fl)) | |
972 | - | then $Tuple2((((cY ++ fI) ++ fz) ++ fk), dK) | |
973 | - | else throw("Strict value is not equal to itself.") | |
868 | + | $Tuple2(((cP ++ fh) ++ fa), dn) | |
974 | 869 | } | |
975 | 870 | else throw("Strict value is not equal to itself.") | |
976 | 871 | } | |
977 | 872 | else throw("Strict value is not equal to itself.") | |
978 | 873 | } | |
979 | 874 | else throw("Strict value is not equal to itself.") | |
980 | 875 | } | |
981 | 876 | ||
982 | 877 | ||
983 | 878 | ||
984 | - | @Callable(dC) | |
985 | - | func getOneTknREADONLY (ex,ef) = { | |
986 | - | let fM = ew(aS(ex), ef, bb, unit, unit) | |
987 | - | let fG = fM._1 | |
988 | - | let cY = fM._2 | |
989 | - | let dQ = fM._3 | |
990 | - | let fv = fM._4 | |
991 | - | let ez = fM._5 | |
992 | - | $Tuple2(nil, $Tuple3(fG, dQ, fv)) | |
879 | + | @Callable(df) | |
880 | + | func getOneTknREADONLY (ec,dK) = { | |
881 | + | let fi = eb(aK(ec), dK, aT, unit, unit) | |
882 | + | let ff = fi._1 | |
883 | + | let cP = fi._2 | |
884 | + | let dt = fi._3 | |
885 | + | let eW = fi._4 | |
886 | + | $Tuple2(nil, $Tuple3(ff, dt, eW)) | |
993 | 887 | } | |
994 | 888 | ||
995 | 889 | ||
996 | 890 | ||
997 | - | @Callable( | |
998 | - | func unstakeAndGetOneTkn ( | |
999 | - | let | |
1000 | - | let | |
1001 | - | if ($isInstanceOf( | |
1002 | - | then | |
1003 | - | else throw(($getType( | |
891 | + | @Callable(df) | |
892 | + | func unstakeAndGetOneTkn (fj,fc,eP) = { | |
893 | + | let eR = { | |
894 | + | let eS = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
895 | + | if ($isInstanceOf(eS, "Boolean")) | |
896 | + | then eS | |
897 | + | else throw(($getType(eS) + " couldn't be cast to Boolean")) | |
1004 | 898 | } | |
1005 | - | let | |
899 | + | let fd = if (if (aF()) | |
1006 | 900 | then true | |
1007 | - | else ( | |
901 | + | else (aS == n)) | |
1008 | 902 | then true | |
1009 | - | else | |
1010 | - | let | |
903 | + | else eR | |
904 | + | let ed = [if (if (!(fd)) | |
1011 | 905 | then true | |
1012 | - | else | |
906 | + | else ex(df)) | |
1013 | 907 | then true | |
1014 | - | else | |
908 | + | else aB("get operation is blocked by admin"), if ((size(df.payments) == 0)) | |
1015 | 909 | then true | |
1016 | - | else | |
1017 | - | if (( | |
910 | + | else aB("no payments are expected")] | |
911 | + | if ((ed == ed)) | |
1018 | 912 | then { | |
1019 | - | let ex = aS(fD) | |
1020 | - | let Z = dC.caller | |
1021 | - | let aa = dC.transactionId | |
1022 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1023 | - | let fO = invoke(bh, "unstake", [toBase58String(bb), fN], nil) | |
1024 | - | if ((fO == fO)) | |
913 | + | let ec = aK(fc) | |
914 | + | let X = df.caller | |
915 | + | let Y = df.transactionId | |
916 | + | let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil) | |
917 | + | if ((fk == fk)) | |
1025 | 918 | then { | |
1026 | - | let | |
1027 | - | if (( | |
919 | + | let fl = eb(ec, fj, aT, X, Y) | |
920 | + | if ((fl == fl)) | |
1028 | 921 | then { | |
1029 | - | let ez = fP._5 | |
1030 | - | let fv = fP._4 | |
1031 | - | let dQ = fP._3 | |
1032 | - | let cY = fP._2 | |
1033 | - | let fG = fP._1 | |
1034 | - | let dK = if (if ((fo > 0)) | |
1035 | - | then (fo > fG) | |
922 | + | let eW = fl._4 | |
923 | + | let dt = fl._3 | |
924 | + | let cP = fl._2 | |
925 | + | let ff = fl._1 | |
926 | + | let dn = if (if ((eP > 0)) | |
927 | + | then (eP > ff) | |
1036 | 928 | else false) | |
1037 | - | then | |
1038 | - | else | |
1039 | - | let | |
1040 | - | if (( | |
929 | + | then aB(makeString(["amount to receive is less than ", toString(eP)], "")) | |
930 | + | else ff | |
931 | + | let fg = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)]) | |
932 | + | if ((fg == fg)) | |
1041 | 933 | then { | |
1042 | - | let | |
1043 | - | let | |
1044 | - | then [ScriptTransfer( | |
934 | + | let fh = [ScriptTransfer(df.caller, dn, ec)] | |
935 | + | let fa = if ((dt > 0)) | |
936 | + | then [ScriptTransfer(aE, dt, ec)] | |
1045 | 937 | else nil | |
1046 | - | let fQ = { | |
1047 | - | let fK = if ((this == aM)) | |
1048 | - | then 0 | |
1049 | - | else dQ | |
1050 | - | if (ez) | |
1051 | - | then $Tuple2(-((dK + fK)), 0) | |
1052 | - | else $Tuple2(0, -((dK + fK))) | |
1053 | - | } | |
1054 | - | let dm = fQ._1 | |
1055 | - | let dn = fQ._2 | |
1056 | - | let fR = dl(dm, dn, 0) | |
1057 | - | let fk = fR._1 | |
1058 | - | let dc = fR._2 | |
1059 | - | let fl = dp(dk, dc) | |
1060 | - | if ((fl == fl)) | |
1061 | - | then $Tuple2((((cY ++ fI) ++ fz) ++ fk), dK) | |
1062 | - | else throw("Strict value is not equal to itself.") | |
938 | + | $Tuple2(((cP ++ fh) ++ fa), dn) | |
1063 | 939 | } | |
1064 | 940 | else throw("Strict value is not equal to itself.") | |
1065 | 941 | } | |
1066 | 942 | else throw("Strict value is not equal to itself.") | |
1067 | 943 | } | |
1068 | 944 | else throw("Strict value is not equal to itself.") | |
1069 | 945 | } | |
1070 | 946 | else throw("Strict value is not equal to itself.") | |
1071 | 947 | } | |
1072 | 948 | ||
1073 | 949 | ||
1074 | 950 | ||
1075 | - | @Callable( | |
951 | + | @Callable(df) | |
1076 | 952 | func get () = { | |
1077 | - | let cJ = dB(dC) | |
1078 | - | let fS = cJ._1 | |
1079 | - | let cq = cJ._2 | |
1080 | - | let dE = cJ._3 | |
1081 | - | let bY = cJ._4 | |
1082 | - | let cr = cJ._5 | |
1083 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE)) | |
1084 | - | let fT = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)]) | |
1085 | - | if ((fT == fT)) | |
1086 | - | then { | |
1087 | - | let fU = dl(-(fS), -(cq), 0) | |
1088 | - | let fk = fU._1 | |
1089 | - | let dc = fU._2 | |
1090 | - | let fl = dp(dk, dc) | |
1091 | - | if ((fl == fl)) | |
1092 | - | then (cr ++ fk) | |
1093 | - | else throw("Strict value is not equal to itself.") | |
1094 | - | } | |
953 | + | let cA = de(df) | |
954 | + | let fm = cA._1 | |
955 | + | let ch = cA._2 | |
956 | + | let dh = cA._3 | |
957 | + | let bP = cA._4 | |
958 | + | let ci = cA._5 | |
959 | + | let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)]) | |
960 | + | if ((fn == fn)) | |
961 | + | then ci | |
1095 | 962 | else throw("Strict value is not equal to itself.") | |
1096 | 963 | } | |
1097 | 964 | ||
1098 | 965 | ||
1099 | 966 | ||
1100 | - | @Callable( | |
1101 | - | func getNoLess ( | |
1102 | - | let | |
1103 | - | let | |
1104 | - | let | |
1105 | - | let | |
1106 | - | let | |
1107 | - | let | |
1108 | - | if (( | |
1109 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1110 | - | else if (( | |
1111 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
967 | + | @Callable(df) | |
968 | + | func getNoLess (fo,fp) = { | |
969 | + | let cA = de(df) | |
970 | + | let cg = cA._1 | |
971 | + | let ch = cA._2 | |
972 | + | let dh = cA._3 | |
973 | + | let bP = cA._4 | |
974 | + | let ci = cA._5 | |
975 | + | if ((fo > cg)) | |
976 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cg)) + " < ") + toString(fo))) | |
977 | + | else if ((fp > ch)) | |
978 | + | then throw(((("noLessThenPriceAsset failed: " + toString(ch)) + " < ") + toString(fp))) | |
1112 | 979 | else { | |
1113 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(dE)) | |
1114 | - | let fT = invoke(aL, "burn", [dE], [AttachedPayment(bY, dE)]) | |
1115 | - | if ((fT == fT)) | |
1116 | - | then { | |
1117 | - | let fX = dl(-(cp), -(cq), 0) | |
1118 | - | let fk = fX._1 | |
1119 | - | let dc = fX._2 | |
1120 | - | let fl = dp(dk, dc) | |
1121 | - | if ((fl == fl)) | |
1122 | - | then (cr ++ fk) | |
1123 | - | else throw("Strict value is not equal to itself.") | |
1124 | - | } | |
980 | + | let fn = invoke(aD, "burn", [dh], [AttachedPayment(bP, dh)]) | |
981 | + | if ((fn == fn)) | |
982 | + | then ci | |
1125 | 983 | else throw("Strict value is not equal to itself.") | |
1126 | 984 | } | |
1127 | 985 | } | |
1128 | 986 | ||
1129 | 987 | ||
1130 | 988 | ||
1131 | - | @Callable( | |
1132 | - | func unstakeAndGet ( | |
1133 | - | let | |
989 | + | @Callable(df) | |
990 | + | func unstakeAndGet (dn) = { | |
991 | + | let fq = if ((size(df.payments) != 0)) | |
1134 | 992 | then throw("No payments are expected") | |
1135 | 993 | else true | |
1136 | - | if (( | |
994 | + | if ((fq == fq)) | |
1137 | 995 | then { | |
1138 | - | let bN = aP() | |
1139 | - | let ca = fromBase58String(bN[q]) | |
1140 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1141 | - | let fO = invoke(bh, "unstake", [toBase58String(ca), dK], nil) | |
1142 | - | if ((fO == fO)) | |
996 | + | let bE = aH() | |
997 | + | let bR = fromBase58String(bE[q]) | |
998 | + | let fk = invoke(aZ, "unstake", [toBase58String(bR), dn], nil) | |
999 | + | if ((fk == fk)) | |
1143 | 1000 | then { | |
1144 | - | let cJ = bW(toBase58String(dC.transactionId), toBase58String(ca), dK, dC.caller) | |
1145 | - | let cp = cJ._1 | |
1146 | - | let cq = cJ._2 | |
1147 | - | let cd = parseIntValue(cJ._9) | |
1148 | - | let cr = cJ._10 | |
1149 | - | let fZ = if (if (aN()) | |
1001 | + | let cA = bN(toBase58String(df.transactionId), toBase58String(bR), dn, df.caller) | |
1002 | + | let bU = parseIntValue(cA._9) | |
1003 | + | let ci = cA._10 | |
1004 | + | let fr = if (if (aF()) | |
1150 | 1005 | then true | |
1151 | - | else ( | |
1152 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1006 | + | else (bU == n)) | |
1007 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bU))) | |
1153 | 1008 | else true | |
1154 | - | if (( | |
1009 | + | if ((fr == fr)) | |
1155 | 1010 | then { | |
1156 | - | let fT = invoke(aL, "burn", [dK], [AttachedPayment(ca, dK)]) | |
1157 | - | if ((fT == fT)) | |
1158 | - | then { | |
1159 | - | let ga = dl(-(cp), -(cq), 0) | |
1160 | - | let fk = ga._1 | |
1161 | - | let dc = ga._2 | |
1162 | - | let fl = dp(dk, dc) | |
1163 | - | if ((fl == fl)) | |
1164 | - | then (cr ++ fk) | |
1165 | - | else throw("Strict value is not equal to itself.") | |
1166 | - | } | |
1011 | + | let fn = invoke(aD, "burn", [dn], [AttachedPayment(bR, dn)]) | |
1012 | + | if ((fn == fn)) | |
1013 | + | then ci | |
1167 | 1014 | else throw("Strict value is not equal to itself.") | |
1168 | 1015 | } | |
1169 | 1016 | else throw("Strict value is not equal to itself.") | |
1170 | 1017 | } | |
1171 | 1018 | else throw("Strict value is not equal to itself.") | |
1172 | 1019 | } | |
1173 | 1020 | else throw("Strict value is not equal to itself.") | |
1174 | 1021 | } | |
1175 | 1022 | ||
1176 | 1023 | ||
1177 | 1024 | ||
1178 | - | @Callable( | |
1179 | - | func unstakeAndGetNoLess ( | |
1180 | - | let | |
1025 | + | @Callable(df) | |
1026 | + | func unstakeAndGetNoLess (fj,fs,fp) = { | |
1027 | + | let fd = if (aF()) | |
1181 | 1028 | then true | |
1182 | - | else ( | |
1183 | - | let | |
1029 | + | else (aS == n) | |
1030 | + | let ed = [if (!(fd)) | |
1184 | 1031 | then true | |
1185 | - | else throw("get operation is blocked by admin"), if ((size( | |
1032 | + | else throw("get operation is blocked by admin"), if ((size(df.payments) == 0)) | |
1186 | 1033 | then true | |
1187 | 1034 | else throw("no payments are expected")] | |
1188 | - | if (( | |
1035 | + | if ((ed == ed)) | |
1189 | 1036 | then { | |
1190 | - | let dk = dd(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1191 | - | let fO = invoke(bh, "unstake", [toBase58String(bb), fN], nil) | |
1192 | - | if ((fO == fO)) | |
1037 | + | let fk = invoke(aZ, "unstake", [toBase58String(aT), fj], nil) | |
1038 | + | if ((fk == fk)) | |
1193 | 1039 | then { | |
1194 | - | let | |
1195 | - | let | |
1196 | - | let | |
1197 | - | let | |
1198 | - | let | |
1040 | + | let cA = bN(toBase58String(df.transactionId), toBase58String(aT), fj, df.caller) | |
1041 | + | let cg = cA._1 | |
1042 | + | let ch = cA._2 | |
1043 | + | let ci = cA._10 | |
1044 | + | let ft = [if ((cg >= fs)) | |
1199 | 1045 | then true | |
1200 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1046 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(fs)], "")), if ((ch >= fp)) | |
1201 | 1047 | then true | |
1202 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1203 | - | if (( | |
1048 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fp)], ""))] | |
1049 | + | if ((ft == ft)) | |
1204 | 1050 | then { | |
1205 | - | let fT = invoke(aL, "burn", [fN], [AttachedPayment(bb, fN)]) | |
1206 | - | if ((fT == fT)) | |
1207 | - | then { | |
1208 | - | let gd = dl(-(cp), -(cq), 0) | |
1209 | - | let fk = gd._1 | |
1210 | - | let dc = gd._2 | |
1211 | - | let fl = dp(dk, dc) | |
1212 | - | if ((fl == fl)) | |
1213 | - | then (cr ++ fk) | |
1214 | - | else throw("Strict value is not equal to itself.") | |
1215 | - | } | |
1051 | + | let fn = invoke(aD, "burn", [fj], [AttachedPayment(aT, fj)]) | |
1052 | + | if ((fn == fn)) | |
1053 | + | then ci | |
1216 | 1054 | else throw("Strict value is not equal to itself.") | |
1217 | 1055 | } | |
1218 | 1056 | else throw("Strict value is not equal to itself.") | |
1219 | 1057 | } | |
1220 | 1058 | else throw("Strict value is not equal to itself.") | |
1221 | 1059 | } | |
1222 | 1060 | else throw("Strict value is not equal to itself.") | |
1223 | 1061 | } | |
1224 | 1062 | ||
1225 | 1063 | ||
1226 | 1064 | ||
1227 | - | @Callable( | |
1228 | - | func activate ( | |
1065 | + | @Callable(df) | |
1066 | + | func activate (fu,fv) = if ((toString(df.caller) != toString(aD))) | |
1229 | 1067 | then throw("permissions denied") | |
1230 | - | else $Tuple2([StringEntry( | |
1068 | + | else $Tuple2([StringEntry(aa(), fu), StringEntry(ab(), fv)], "success") | |
1231 | 1069 | ||
1232 | 1070 | ||
1233 | 1071 | ||
1234 | - | @Callable(dC) | |
1235 | - | func refreshKLp () = { | |
1236 | - | let gg = valueOrElse(getInteger(ai), 0) | |
1237 | - | let gh = if (((height - gg) >= al)) | |
1238 | - | then unit | |
1239 | - | else aI(makeString([toString(al), " blocks have not passed since the previous call"], "")) | |
1240 | - | if ((gh == gh)) | |
1241 | - | then { | |
1242 | - | let dw = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ah), "0")), aK("invalid kLp")) | |
1243 | - | let gi = dl(0, 0, 0) | |
1244 | - | let gj = gi._1 | |
1245 | - | let dc = gi._2 | |
1246 | - | let do = if ((dw != dc)) | |
1247 | - | then gj | |
1248 | - | else aI("nothing to refresh") | |
1249 | - | $Tuple2(do, toString(dc)) | |
1250 | - | } | |
1251 | - | else throw("Strict value is not equal to itself.") | |
1072 | + | @Callable(df) | |
1073 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aH()) | |
1074 | + | ||
1075 | + | ||
1076 | + | ||
1077 | + | @Callable(df) | |
1078 | + | func getAccBalanceWrapperREADONLY (br) = $Tuple2(nil, bq(br)) | |
1079 | + | ||
1080 | + | ||
1081 | + | ||
1082 | + | @Callable(df) | |
1083 | + | func calcPricesWrapperREADONLY (by,bz,bD) = { | |
1084 | + | let bM = bC(by, bz, bD) | |
1085 | + | $Tuple2(nil, [toString(bM[0]), toString(bM[1]), toString(bM[2])]) | |
1252 | 1086 | } | |
1253 | 1087 | ||
1254 | 1088 | ||
1255 | 1089 | ||
1256 | - | @Callable( | |
1257 | - | func | |
1090 | + | @Callable(df) | |
1091 | + | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1258 | 1092 | ||
1259 | 1093 | ||
1260 | 1094 | ||
1261 | - | @Callable( | |
1262 | - | func | |
1095 | + | @Callable(df) | |
1096 | + | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1263 | 1097 | ||
1264 | 1098 | ||
1265 | 1099 | ||
1266 | - | @Callable(dC) | |
1267 | - | func calcPricesWrapperREADONLY (bH,bI,bM) = { | |
1268 | - | let bV = bL(bH, bI, bM) | |
1269 | - | $Tuple2(nil, [toString(bV[0]), toString(bV[1]), toString(bV[2])]) | |
1100 | + | @Callable(df) | |
1101 | + | func calcPriceBigIntWrapperREADONLY (bt,bu) = $Tuple2(nil, toString(bs(parseBigIntValue(bt), parseBigIntValue(bu)))) | |
1102 | + | ||
1103 | + | ||
1104 | + | ||
1105 | + | @Callable(df) | |
1106 | + | func estimatePutOperationWrapperREADONLY (bO,ck,cl,cm,cn,co,X,cp,cq) = $Tuple2(nil, cj(bO, ck, cl, cm, cn, co, X, cp, cq)) | |
1107 | + | ||
1108 | + | ||
1109 | + | ||
1110 | + | @Callable(df) | |
1111 | + | func estimateGetOperationWrapperREADONLY (bO,bP,bQ,X) = { | |
1112 | + | let cA = bN(bO, bP, bQ, addressFromStringValue(X)) | |
1113 | + | $Tuple2(nil, $Tuple10(cA._1, cA._2, cA._3, cA._4, cA._5, cA._6, cA._7, toString(cA._8), cA._9, cA._10)) | |
1270 | 1114 | } | |
1271 | 1115 | ||
1272 | 1116 | ||
1273 | 1117 | ||
1274 | - | @Callable(dC) | |
1275 | - | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1276 | - | ||
1277 | - | ||
1278 | - | ||
1279 | - | @Callable(dC) | |
1280 | - | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1281 | - | ||
1282 | - | ||
1283 | - | ||
1284 | - | @Callable(dC) | |
1285 | - | func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC)))) | |
1286 | - | ||
1287 | - | ||
1288 | - | ||
1289 | - | @Callable(dC) | |
1290 | - | func estimatePutOperationWrapperREADONLY (bX,ct,cu,cv,cw,cx,Z,cy,cz) = $Tuple2(nil, cs(bX, ct, cu, cv, cw, cx, Z, cy, cz)) | |
1291 | - | ||
1292 | - | ||
1293 | - | ||
1294 | - | @Callable(dC) | |
1295 | - | func estimateGetOperationWrapperREADONLY (bX,bY,bZ,Z) = { | |
1296 | - | let cJ = bW(bX, bY, bZ, addressFromStringValue(Z)) | |
1297 | - | $Tuple2(nil, $Tuple10(cJ._1, cJ._2, cJ._3, cJ._4, cJ._5, cJ._6, cJ._7, toString(cJ._8), cJ._9, cJ._10)) | |
1118 | + | @Callable(df) | |
1119 | + | func statsREADONLY () = { | |
1120 | + | let bE = aH() | |
1121 | + | let bR = fromBase58String(bE[q]) | |
1122 | + | let cS = bE[r] | |
1123 | + | let cT = bE[s] | |
1124 | + | let ct = bE[v] | |
1125 | + | let cu = bE[w] | |
1126 | + | let bF = parseIntValue(bE[t]) | |
1127 | + | let bG = parseIntValue(bE[u]) | |
1128 | + | let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity | |
1129 | + | let cU = bq(cS) | |
1130 | + | let cV = bq(cT) | |
1131 | + | let fx = if ((fw == 0)) | |
1132 | + | then [e, e, e] | |
1133 | + | else bC(cU, cV, fw) | |
1134 | + | let cb = 0 | |
1135 | + | let fy = G(fx[1], b) | |
1136 | + | let fz = G(fx[2], b) | |
1137 | + | let fA = value(getInteger(aD, ap(toString(this)))) | |
1138 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cU), toString(cV), toString(fw), toString(cb), toString(fy), toString(fz), toString(fA)], j)) | |
1298 | 1139 | } | |
1299 | 1140 | ||
1300 | 1141 | ||
1301 | 1142 | ||
1302 | - | @Callable(dC) | |
1303 | - | func statsREADONLY () = { | |
1304 | - | let bN = aP() | |
1305 | - | let ca = fromBase58String(bN[q]) | |
1306 | - | let gk = bN[r] | |
1307 | - | let gl = bN[s] | |
1308 | - | let cC = bN[v] | |
1309 | - | let cD = bN[w] | |
1310 | - | let bO = parseIntValue(bN[t]) | |
1311 | - | let bP = parseIntValue(bN[u]) | |
1312 | - | let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1313 | - | let gn = by(gk) | |
1314 | - | let go = by(gl) | |
1315 | - | let gp = if ((gm == 0)) | |
1316 | - | then [e, e, e] | |
1317 | - | else bL(gn, go, gm) | |
1318 | - | let ck = 0 | |
1319 | - | let gq = G(gp[1], b) | |
1320 | - | let gr = G(gp[2], b) | |
1321 | - | let gs = value(getInteger(aL, aw(toString(this)))) | |
1322 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gn), toString(go), toString(gm), toString(ck), toString(gq), toString(gr), toString(gs)], j)) | |
1143 | + | @Callable(df) | |
1144 | + | func evaluatePutByAmountAssetREADONLY (cl) = { | |
1145 | + | let bE = aH() | |
1146 | + | let bR = fromBase58String(bE[q]) | |
1147 | + | let cr = bE[r] | |
1148 | + | let bS = fromBase58String(cr) | |
1149 | + | let cs = bE[s] | |
1150 | + | let bT = fromBase58String(cs) | |
1151 | + | let bF = parseIntValue(bE[t]) | |
1152 | + | let bG = parseIntValue(bE[u]) | |
1153 | + | let bU = bE[p] | |
1154 | + | let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity | |
1155 | + | let cU = bq(cr) | |
1156 | + | let cV = bq(cs) | |
1157 | + | let bA = D(cU, bF) | |
1158 | + | let bB = D(cV, bG) | |
1159 | + | let ca = if ((fw == 0)) | |
1160 | + | then e | |
1161 | + | else bs(bB, bA) | |
1162 | + | let cx = D(cl, bF) | |
1163 | + | let cy = fraction(cx, ca, d) | |
1164 | + | let cn = G(cy, bG) | |
1165 | + | let dl = cj("", 500000, cl, bS, cn, bT, "", true, false) | |
1166 | + | let cI = dl._1 | |
1167 | + | let fB = dl._3 | |
1168 | + | let bW = dl._4 | |
1169 | + | let bY = dl._5 | |
1170 | + | let bV = dl._6 | |
1171 | + | $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)) | |
1323 | 1172 | } | |
1324 | 1173 | ||
1325 | 1174 | ||
1326 | 1175 | ||
1327 | - | @Callable( | |
1328 | - | func | |
1329 | - | let | |
1330 | - | let | |
1331 | - | let | |
1332 | - | let | |
1333 | - | let | |
1334 | - | let | |
1335 | - | let | |
1336 | - | let | |
1337 | - | let | |
1338 | - | let | |
1339 | - | let | |
1340 | - | let | |
1341 | - | let | |
1342 | - | let | |
1343 | - | let | |
1176 | + | @Callable(df) | |
1177 | + | func evaluatePutByPriceAssetREADONLY (cn) = { | |
1178 | + | let bE = aH() | |
1179 | + | let bR = fromBase58String(bE[q]) | |
1180 | + | let cr = bE[r] | |
1181 | + | let bS = fromBase58String(cr) | |
1182 | + | let cs = bE[s] | |
1183 | + | let bT = fromBase58String(cs) | |
1184 | + | let bF = parseIntValue(bE[t]) | |
1185 | + | let bG = parseIntValue(bE[u]) | |
1186 | + | let bU = bE[p] | |
1187 | + | let fw = valueOrErrorMessage(assetInfo(bR), (("Asset " + toBase58String(bR)) + " doesn't exist")).quantity | |
1188 | + | let fC = bq(cr) | |
1189 | + | let fD = bq(cs) | |
1190 | + | let fE = D(fC, bF) | |
1191 | + | let fF = D(fD, bG) | |
1192 | + | let ca = if ((fw == 0)) | |
1344 | 1193 | then e | |
1345 | - | else | |
1346 | - | let | |
1347 | - | let | |
1348 | - | let | |
1349 | - | let | |
1350 | - | let | |
1351 | - | let | |
1352 | - | let | |
1353 | - | let | |
1354 | - | let | |
1355 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1194 | + | else bs(fF, fE) | |
1195 | + | let cy = D(cn, bG) | |
1196 | + | let cx = fraction(cy, d, ca) | |
1197 | + | let cl = G(cx, bF) | |
1198 | + | let dl = cj("", 500000, cl, bS, cn, bT, "", true, false) | |
1199 | + | let cI = dl._1 | |
1200 | + | let fB = dl._3 | |
1201 | + | let bW = dl._4 | |
1202 | + | let bY = dl._5 | |
1203 | + | let bV = dl._6 | |
1204 | + | $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)) | |
1356 | 1205 | } | |
1357 | 1206 | ||
1358 | 1207 | ||
1359 | 1208 | ||
1360 | - | @Callable(dC) | |
1361 | - | func evaluatePutByPriceAssetREADONLY (cw) = { | |
1362 | - | let bN = aP() | |
1363 | - | let ca = fromBase58String(bN[q]) | |
1364 | - | let cA = bN[r] | |
1365 | - | let cb = fromBase58String(cA) | |
1366 | - | let cB = bN[s] | |
1367 | - | let cc = fromBase58String(cB) | |
1368 | - | let bO = parseIntValue(bN[t]) | |
1369 | - | let bP = parseIntValue(bN[u]) | |
1370 | - | let cd = bN[p] | |
1371 | - | let gm = valueOrErrorMessage(assetInfo(ca), (("Asset " + toBase58String(ca)) + " doesn't exist")).quantity | |
1372 | - | let gu = by(cA) | |
1373 | - | let gv = by(cB) | |
1374 | - | let gw = D(gu, bO) | |
1375 | - | let gx = D(gv, bP) | |
1376 | - | let cj = if ((gm == 0)) | |
1377 | - | then e | |
1378 | - | else bA(gx, gw) | |
1379 | - | let cH = D(cw, bP) | |
1380 | - | let cG = fraction(cH, d, cj) | |
1381 | - | let cu = G(cG, bO) | |
1382 | - | let dI = cs("", 500000, cu, cb, cw, cc, "", true, false) | |
1383 | - | let cR = dI._1 | |
1384 | - | let gt = dI._3 | |
1385 | - | let cf = dI._4 | |
1386 | - | let ch = dI._5 | |
1387 | - | let ce = dI._6 | |
1388 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cR), toString(G(cj, b)), toString(cf), toString(ch), toString(ce), cd, toString(cu), toString(cw)], j)) | |
1209 | + | @Callable(df) | |
1210 | + | func evaluateGetREADONLY (fG,fH) = { | |
1211 | + | let cA = bN("", fG, fH, this) | |
1212 | + | let cg = cA._1 | |
1213 | + | let ch = cA._2 | |
1214 | + | let bW = cA._5 | |
1215 | + | let bY = cA._6 | |
1216 | + | let bV = cA._7 | |
1217 | + | let cb = cA._8 | |
1218 | + | let bU = parseIntValue(cA._9) | |
1219 | + | $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)) | |
1389 | 1220 | } | |
1390 | 1221 | ||
1391 | 1222 | ||
1392 | - | ||
1393 | - | @Callable(dC) | |
1394 | - | func evaluateGetREADONLY (gy,gz) = { | |
1395 | - | let cJ = bW("", gy, gz, this) | |
1396 | - | let cp = cJ._1 | |
1397 | - | let cq = cJ._2 | |
1398 | - | let cf = cJ._5 | |
1399 | - | let ch = cJ._6 | |
1400 | - | let ce = cJ._7 | |
1401 | - | let ck = cJ._8 | |
1402 | - | let cd = parseIntValue(cJ._9) | |
1403 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cp), toString(cq), toString(cf), toString(ch), toString(ce), toString(ck), toString(cd)], j)) | |
1404 | - | } | |
1405 | - | ||
1406 | - | ||
1407 | - | @Verifier(gA) | |
1408 | - | func gB () = { | |
1409 | - | let gC = { | |
1410 | - | let dN = eP() | |
1411 | - | if ($isInstanceOf(dN, "ByteVector")) | |
1223 | + | @Verifier(fI) | |
1224 | + | func fJ () = { | |
1225 | + | let fK = { | |
1226 | + | let dq = eu() | |
1227 | + | if ($isInstanceOf(dq, "ByteVector")) | |
1412 | 1228 | then { | |
1413 | - | let | |
1414 | - | | |
1229 | + | let ey = dq | |
1230 | + | ey | |
1415 | 1231 | } | |
1416 | - | else if ($isInstanceOf( | |
1417 | - | then | |
1232 | + | else if ($isInstanceOf(dq, "Unit")) | |
1233 | + | then fI.senderPublicKey | |
1418 | 1234 | else throw("Match error") | |
1419 | 1235 | } | |
1420 | - | let | |
1421 | - | if ($isInstanceOf( | |
1236 | + | let dq = fI | |
1237 | + | if ($isInstanceOf(dq, "Order")) | |
1422 | 1238 | then { | |
1423 | - | let | |
1424 | - | let | |
1425 | - | let | |
1426 | - | let | |
1427 | - | let | |
1428 | - | if (if (if ( | |
1429 | - | then | |
1239 | + | let cR = dq | |
1240 | + | let fL = aG() | |
1241 | + | let au = cQ(cR) | |
1242 | + | let av = sigVerify(cR.bodyBytes, cR.proofs[0], cR.senderPublicKey) | |
1243 | + | let aw = sigVerify(cR.bodyBytes, cR.proofs[1], fL) | |
1244 | + | if (if (if (au) | |
1245 | + | then av | |
1430 | 1246 | else false) | |
1431 | - | then | |
1247 | + | then aw | |
1432 | 1248 | else false) | |
1433 | 1249 | then true | |
1434 | - | else | |
1250 | + | else at(au, av, aw) | |
1435 | 1251 | } | |
1436 | - | else if ($isInstanceOf( | |
1252 | + | else if ($isInstanceOf(dq, "SetScriptTransaction")) | |
1437 | 1253 | then { | |
1438 | - | let | |
1439 | - | let | |
1440 | - | let | |
1441 | - | let | |
1442 | - | if (if (( | |
1443 | - | then ( | |
1254 | + | let ev = dq | |
1255 | + | let fM = blake2b256(value(ev.script)) | |
1256 | + | let fN = fromBase64String(value(getString(aD, ar()))) | |
1257 | + | let fO = scriptHash(this) | |
1258 | + | if (if ((fN == fM)) | |
1259 | + | then (fO != fM) | |
1444 | 1260 | else false) | |
1445 | 1261 | then true | |
1446 | - | else sigVerify( | |
1262 | + | else sigVerify(fI.bodyBytes, fI.proofs[0], fK) | |
1447 | 1263 | } | |
1448 | - | else sigVerify( | |
1264 | + | else sigVerify(fI.bodyBytes, fI.proofs[0], fK) | |
1449 | 1265 | } | |
1450 | 1266 |
github/deemru/w8io/026f985 377.69 ms ◑