tx · EZMvj2m1oh5YJpKww5WieUP77CjQgxPQpbLSXbNQyq4 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA: -0.04000000 Waves 2023.03.22 13:32 [2501114] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves
{ "type": 13, "id": "EZMvj2m1oh5YJpKww5WieUP77CjQgxPQpbLSXbNQyq4", "fee": 4000000, "feeAssetId": null, "timestamp": 1679481206060, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "HGt3tjrdYEnTWLSGsimuLoQT1iLHqJhh98EB9FbATB8PF1Kzd5Zv7emNkRuZ11rgxQru4vvQ4YXG2N18tGWxNgx" ], "script": "base64:BgKCKwgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgMKAQgSABIECgIBBBIECgIBBBIDCgEBEgASBAoCCAESABIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCCIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiBGJpZzMiBGJpZzQiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCIN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AJlWgUCZ2wEAmlsCQECYVcABAJpbQkBAmVZAQUCZVoEAmFGCAUCaW0CXzEEAmFHCAUCaW0CXzIEAmFICQD0AwMIBQJlWglib2R5Qnl0ZXMJAJEDAggFAmVaBnByb29mcwAACAUCZVoPc2VuZGVyUHVibGljS2V5BAJhSQkA9AMDCAUCZVoJYm9keUJ5dGVzCQCRAwIIBQJlWgZwcm9vZnMAAQUCaWwDAwMFAmFGBQJhSAcFAmFJBwYJAQJhRQQFAmFGBQJhRwUCYUgFAmFJAwkAAQIFAmdsAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQCY0MFAmdsAwkA9AMDCAUCaWkJYm9keUJ5dGVzCQCRAwIIBQJpaQZwcm9vZnMAAAUCaWsGBAJpbgkA9gMBCQEFdmFsdWUBCAUCY0MGc2NyaXB0BAJpbwkA2wQBCQEFdmFsdWUBCQCdCAIFAmFRCQECYUMABAJpcAkA8QcBBQR0aGlzAwkAAAIFAmlvBQJpbgkBAiE9AgUCaXAFAmluBwkA9AMDCAUCaWkJYm9keUJ5dGVzCQCRAwIIBQJpaQZwcm9vZnMAAAUCaWso85DP", "height": 2501114, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9yi73B8L9tyhLcBjCmEBiMe291ZPiqL75Y7odWKPVeup Next: 2iEA3YKceXiVoeaJ1oir6mQv7kESks2LVeGPtAauBsjV Diff:
Old | New | Differences | |
---|---|---|---|
166 | 166 | func aD () = "%s__feeCollectorAddress" | |
167 | 167 | ||
168 | 168 | ||
169 | - | func aE (aF) = (" | |
169 | + | func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI))) | |
170 | 170 | ||
171 | 171 | ||
172 | - | func | |
172 | + | func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], "")) | |
173 | 173 | ||
174 | 174 | ||
175 | - | func | |
175 | + | func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], "")) | |
176 | 176 | ||
177 | 177 | ||
178 | - | func | |
178 | + | func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " ")) | |
179 | 179 | ||
180 | 180 | ||
181 | - | func aP ( | |
181 | + | func aP (aO) = makeString(["lp_stable.ride:", aO], " ") | |
182 | 182 | ||
183 | 183 | ||
184 | - | func aR (aQ) = makeString(["lp_stable.ride:", aQ], " ") | |
184 | + | let aQ = addressFromStringValue(aJ(this, Y())) | |
185 | + | ||
186 | + | let aR = { | |
187 | + | let aS = invoke(aQ, "getInFeeREADONLY", [toString(this)], nil) | |
188 | + | if ($isInstanceOf(aS, "Int")) | |
189 | + | then aS | |
190 | + | else throw(($getType(aS) + " couldn't be cast to Int")) | |
191 | + | } | |
192 | + | ||
193 | + | let aT = { | |
194 | + | let aS = invoke(aQ, "getOutFeeREADONLY", [toString(this)], nil) | |
195 | + | if ($isInstanceOf(aS, "Int")) | |
196 | + | then aS | |
197 | + | else throw(($getType(aS) + " couldn't be cast to Int")) | |
198 | + | } | |
199 | + | ||
200 | + | let aU = aJ(this, al()) | |
201 | + | ||
202 | + | func aV () = valueOrElse(getBoolean(aQ, aB()), false) | |
185 | 203 | ||
186 | 204 | ||
187 | - | let aS = addressFromStringValue(aL(this, Y())) | |
188 | - | ||
189 | - | let aT = { | |
190 | - | let aU = invoke(aS, "getInFeeREADONLY", [toString(this)], nil) | |
191 | - | if ($isInstanceOf(aU, "Int")) | |
192 | - | then aU | |
193 | - | else throw(($getType(aU) + " couldn't be cast to Int")) | |
194 | - | } | |
195 | - | ||
196 | - | let aV = { | |
197 | - | let aU = invoke(aS, "getOutFeeREADONLY", [toString(this)], nil) | |
198 | - | if ($isInstanceOf(aU, "Int")) | |
199 | - | then aU | |
200 | - | else throw(($getType(aU) + " couldn't be cast to Int")) | |
201 | - | } | |
202 | - | ||
203 | - | let aW = aL(this, al()) | |
204 | - | ||
205 | - | func aX () = valueOrElse(getBoolean(aS, aB()), false) | |
205 | + | func aW () = fromBase58String(aJ(aQ, av())) | |
206 | 206 | ||
207 | 207 | ||
208 | - | ||
208 | + | let aX = addressFromStringValue(aJ(aQ, aD())) | |
209 | 209 | ||
210 | - | ||
211 | - | let aZ = addressFromStringValue(aL(aS, aD())) | |
212 | - | ||
213 | - | func ba () = { | |
214 | - | let bb = aL(this, aj()) | |
215 | - | let bc = aL(this, ak()) | |
216 | - | let bd = aO(aS, az(bc)) | |
217 | - | let ax = aO(aS, az(bb)) | |
218 | - | split(aL(aS, aw(toString(ax), toString(bd))), n) | |
210 | + | func aY () = { | |
211 | + | let aZ = aJ(this, aj()) | |
212 | + | let ba = aJ(this, ak()) | |
213 | + | let bb = aM(aQ, az(ba)) | |
214 | + | let ax = aM(aQ, az(aZ)) | |
215 | + | split(aJ(aQ, aw(toString(ax), toString(bb))), n) | |
219 | 216 | } | |
220 | 217 | ||
221 | 218 | ||
222 | - | func | |
219 | + | func bc (bd) = if ((bd == k)) | |
223 | 220 | then unit | |
224 | - | else fromBase58String( | |
221 | + | else fromBase58String(bd) | |
225 | 222 | ||
226 | 223 | ||
227 | - | func | |
224 | + | func be (bd) = if ((bd == unit)) | |
228 | 225 | then k | |
229 | - | else toBase58String(value( | |
226 | + | else toBase58String(value(bd)) | |
230 | 227 | ||
231 | 228 | ||
232 | - | func | |
229 | + | func bf (bg) = $Tuple9(addressFromStringValue(bg[t]), parseIntValue(bg[u]), fromBase58String(bg[v]), bc(bg[w]), bc(bg[x]), parseIntValue(bg[y]), parseIntValue(bg[z]), fromBase58String(bg[A]), fromBase58String(bg[B])) | |
233 | 230 | ||
234 | 231 | ||
235 | - | let | |
232 | + | let bh = bf(aY()) | |
236 | 233 | ||
237 | - | let | |
234 | + | let bi = bh | |
238 | 235 | ||
239 | - | let | |
236 | + | let bj = bi._1 | |
240 | 237 | ||
241 | - | let | |
238 | + | let bk = bi._2 | |
242 | 239 | ||
243 | - | let | |
240 | + | let bl = bi._3 | |
244 | 241 | ||
245 | - | let | |
242 | + | let bm = bi._4 | |
246 | 243 | ||
247 | - | let | |
244 | + | let bn = bi._5 | |
248 | 245 | ||
249 | - | let | |
246 | + | let bo = bi._6 | |
250 | 247 | ||
251 | - | let | |
248 | + | let bp = bi._7 | |
252 | 249 | ||
253 | - | let | |
250 | + | let bq = bi._8 | |
254 | 251 | ||
255 | - | let | |
252 | + | let br = bi._9 | |
256 | 253 | ||
257 | - | func | |
254 | + | func bs () = split(aJ(aQ, au()), n) | |
258 | 255 | ||
259 | 256 | ||
260 | - | let | |
257 | + | let bt = bs() | |
261 | 258 | ||
262 | - | let | |
259 | + | let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address") | |
263 | 260 | ||
264 | - | let | |
261 | + | let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address") | |
265 | 262 | ||
266 | - | let | |
263 | + | let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address") | |
267 | 264 | ||
268 | - | let | |
265 | + | let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address") | |
269 | 266 | ||
270 | - | func | |
267 | + | func by (bz,bA,bB,bC,bD,bE,bF,bG,bH,bI) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI)], n) | |
271 | 268 | ||
272 | 269 | ||
273 | - | func | |
270 | + | func bJ (bK,bL,bM,bC,bF,bG) = makeString(["%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bC), toString(bF), toString(bG)], n) | |
274 | 271 | ||
275 | 272 | ||
276 | - | func | |
273 | + | func bN (bO) = if ((bO == "WAVES")) | |
277 | 274 | then wavesBalance(this).available | |
278 | - | else assetBalance(this, fromBase58String( | |
275 | + | else assetBalance(this, fromBase58String(bO)) | |
279 | 276 | ||
280 | 277 | ||
281 | - | func | |
278 | + | func bP (bQ,bR) = fraction(bQ, c, bR) | |
282 | 279 | ||
283 | 280 | ||
284 | - | func | |
281 | + | func bS (bQ,bR,P) = fraction(bQ, c, bR, P) | |
285 | 282 | ||
286 | 283 | ||
287 | - | func | |
288 | - | let | |
289 | - | let | |
290 | - | if (!( | |
291 | - | then throw(("Big slpg: " + toString( | |
292 | - | else $Tuple2( | |
284 | + | func bT (bU,bV,bW) = { | |
285 | + | let bX = fraction((bU - bV), b, bV) | |
286 | + | let bY = ((bW - W(bX)) > d) | |
287 | + | if (!(bY)) | |
288 | + | then throw(("Big slpg: " + toString(bX))) | |
289 | + | else $Tuple2(bY, min([bU, bV])) | |
293 | 290 | } | |
294 | 291 | ||
295 | 292 | ||
296 | - | func | |
297 | - | let | |
298 | - | let | |
299 | - | if (if ( | |
293 | + | func bZ (ca,cb,cc) = { | |
294 | + | let bX = fraction(cb, b, ca) | |
295 | + | let cd = (cc > bX) | |
296 | + | if (if (cd) | |
300 | 297 | then true | |
301 | - | else ( | |
302 | - | then throw(((((((toString( | |
303 | - | else | |
298 | + | else (cb > ca)) | |
299 | + | then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc))) | |
300 | + | else cd | |
304 | 301 | } | |
305 | 302 | ||
306 | 303 | ||
307 | - | func | |
308 | - | let | |
309 | - | let | |
310 | - | | |
304 | + | func ce (cf,cg,ch,ci) = { | |
305 | + | let cj = H(ch, cf) | |
306 | + | let ck = H(ci, cg) | |
307 | + | bP(ck, cj) | |
311 | 308 | } | |
312 | 309 | ||
313 | 310 | ||
314 | - | func | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | [cr, | |
311 | + | func cl (ch,ci,cm) = { | |
312 | + | let cn = bo | |
313 | + | let co = bp | |
314 | + | let cp = ce(cn, co, ch, ci) | |
315 | + | let bR = H(ch, cn) | |
316 | + | let bQ = H(ci, co) | |
317 | + | let cq = H(cm, a) | |
318 | + | let cr = bP(bR, cq) | |
319 | + | let cs = bP(bQ, cq) | |
320 | + | [cp, cr, cs] | |
324 | 321 | } | |
325 | 322 | ||
326 | 323 | ||
327 | - | func | |
328 | - | let | |
329 | - | [L( | |
324 | + | func ct (ch,ci,cm) = { | |
325 | + | let cu = cl(ch, ci, cm) | |
326 | + | [L(cu[0], a), L(cu[1], a), L(cu[2], a)] | |
330 | 327 | } | |
331 | 328 | ||
332 | 329 | ||
333 | - | func | |
334 | - | let | |
330 | + | func cv (cw,ao) = { | |
331 | + | let cx = if ((ao == 0)) | |
335 | 332 | then 0 | |
336 | - | else fraction( | |
337 | - | $Tuple2(( | |
333 | + | else fraction(cw, ao, a) | |
334 | + | $Tuple2((cw - cx), cx) | |
338 | 335 | } | |
339 | 336 | ||
340 | 337 | ||
341 | - | func | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | if (( | |
338 | + | func cy (cz) = { | |
339 | + | let cA = cz[0] | |
340 | + | let cB = cz[1] | |
341 | + | let cC = (cA + cB) | |
342 | + | if ((cC == e)) | |
346 | 343 | then e | |
347 | 344 | else { | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | func | |
355 | - | let | |
356 | - | let | |
357 | - | let | |
358 | - | fraction(( | |
345 | + | let cD = parseIntValue(aU) | |
346 | + | let cE = (cD * 2) | |
347 | + | let cu = fraction(cA, cB, f) | |
348 | + | let cF = fraction(cu, i, f) | |
349 | + | let cG = fraction(toBigInt(cE), cC, f) | |
350 | + | let cH = toBigInt((cE - 1)) | |
351 | + | func cI (cJ) = { | |
352 | + | let cK = fraction(cJ, cJ, f) | |
353 | + | let cL = fraction(cK, cJ, f) | |
354 | + | let cM = fraction(cL, f, cF) | |
355 | + | fraction((cG + fraction(cM, g, f)), cJ, (fraction(cH, cJ, f) + fraction(h, cM, f))) | |
359 | 356 | } | |
360 | 357 | ||
361 | - | func | |
362 | - | then | |
358 | + | func cN (cO,cP) = if (cO._2) | |
359 | + | then cO | |
363 | 360 | else { | |
364 | - | let | |
365 | - | let | |
366 | - | let | |
367 | - | let | |
368 | - | then -( | |
369 | - | else | |
370 | - | if ((f >= | |
371 | - | then $Tuple2( | |
372 | - | else $Tuple2( | |
361 | + | let cJ = cO._1 | |
362 | + | let cQ = cI(cJ) | |
363 | + | let cR = (cQ - value(cJ)) | |
364 | + | let cS = if ((e > cR)) | |
365 | + | then -(cR) | |
366 | + | else cR | |
367 | + | if ((f >= cS)) | |
368 | + | then $Tuple2(cQ, true) | |
369 | + | else $Tuple2(cQ, false) | |
373 | 370 | } | |
374 | 371 | ||
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | func | |
381 | - | then | |
382 | - | else | |
372 | + | let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] | |
373 | + | let cU = { | |
374 | + | let cV = cT | |
375 | + | let cW = size(cV) | |
376 | + | let cX = $Tuple2(cC, false) | |
377 | + | func cY (cZ,da) = if ((da >= cW)) | |
378 | + | then cZ | |
379 | + | else cN(cZ, cV[da]) | |
383 | 380 | ||
384 | - | func | |
385 | - | then | |
386 | - | else throw("List size exceeds | |
381 | + | func db (cZ,da) = if ((da >= cW)) | |
382 | + | then cZ | |
383 | + | else throw("List size exceeds 18") | |
387 | 384 | ||
388 | - | | |
385 | + | db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18) | |
389 | 386 | } | |
390 | - | let | |
391 | - | let | |
392 | - | if ( | |
393 | - | then | |
394 | - | else throw(("D calculation error, D = " + toString( | |
387 | + | let cJ = cU._1 | |
388 | + | let dc = cU._2 | |
389 | + | if (dc) | |
390 | + | then cJ | |
391 | + | else throw(("D calculation error, D = " + toString(cJ))) | |
395 | 392 | } | |
396 | 393 | } | |
397 | 394 | ||
398 | 395 | ||
399 | - | func | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | let | |
407 | - | if ((toBase58String( | |
396 | + | func dd (de,df,dg,dh) = { | |
397 | + | let di = bl | |
398 | + | let dj = toBase58String(value(bm)) | |
399 | + | let dk = toBase58String(value(bn)) | |
400 | + | let dl = bo | |
401 | + | let dm = bp | |
402 | + | let dn = toString(bk) | |
403 | + | let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity | |
404 | + | if ((toBase58String(di) != df)) | |
408 | 405 | then throw("Wrong pmt asset") | |
409 | 406 | else { | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
407 | + | let dp = bN(dj) | |
408 | + | let dq = H(dp, dl) | |
409 | + | let dr = bN(dk) | |
410 | + | let ds = H(dr, dm) | |
411 | + | let dt = bP(ds, dq) | |
412 | + | let du = L(dt, a) | |
413 | + | let dv = H(dg, a) | |
414 | + | let dw = H(do, a) | |
415 | + | let dx = fraction(dq, dv, dw) | |
416 | + | let dy = fraction(ds, dv, dw) | |
417 | + | let dz = O(dx, dl, FLOOR) | |
418 | + | let dA = O(dy, dm, FLOOR) | |
419 | + | let dB = if ((de == "")) | |
423 | 420 | then nil | |
424 | - | else [ScriptTransfer( | |
421 | + | else [ScriptTransfer(dh, dz, if ((dj == "WAVES")) | |
425 | 422 | then unit | |
426 | - | else fromBase58String( | |
423 | + | else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES")) | |
427 | 424 | then unit | |
428 | - | else fromBase58String( | |
429 | - | $Tuple10( | |
425 | + | else fromBase58String(dk)), StringEntry(ai(toString(dh), de), bJ(dz, dA, dg, du, height, lastBlock.timestamp)), IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du)] | |
426 | + | $Tuple10(dz, dA, dj, dk, dp, dr, do, dt, dn, dB) | |
430 | 427 | } | |
431 | 428 | } | |
432 | 429 | ||
433 | 430 | ||
434 | - | func | |
435 | - | let | |
436 | - | let | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | let | |
441 | - | let | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | then | |
446 | - | else if (if ( | |
447 | - | then ( | |
431 | + | func dC (de,bW,dD,dE,dF,dG,dh,dH,dI,dJ,dK,dL,dM) = { | |
432 | + | let di = bl | |
433 | + | let dN = toBase58String(value(bm)) | |
434 | + | let dO = toBase58String(value(bn)) | |
435 | + | let dP = bq | |
436 | + | let dQ = br | |
437 | + | let dR = bo | |
438 | + | let dS = bp | |
439 | + | let dn = toString(bk) | |
440 | + | let dT = valueOrErrorMessage(assetInfo(di), "Wr lp as").quantity | |
441 | + | let dp = if (dH) | |
442 | + | then bN(dN) | |
443 | + | else if (if (dJ) | |
444 | + | then (dM == dN) | |
448 | 445 | else false) | |
449 | - | then ( | |
450 | - | else if ( | |
451 | - | then | |
452 | - | else ( | |
453 | - | let | |
454 | - | then | |
455 | - | else if (if ( | |
456 | - | then ( | |
446 | + | then (bN(dN) - dL) | |
447 | + | else if (dJ) | |
448 | + | then bN(dN) | |
449 | + | else (bN(dN) - dD) | |
450 | + | let dr = if (dH) | |
451 | + | then bN(dO) | |
452 | + | else if (if (dJ) | |
453 | + | then (dM == dO) | |
457 | 454 | else false) | |
458 | - | then ( | |
459 | - | else if ( | |
460 | - | then | |
461 | - | else ( | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
455 | + | then (bN(dO) - dL) | |
456 | + | else if (dJ) | |
457 | + | then bN(dO) | |
458 | + | else (bN(dO) - dF) | |
459 | + | let dU = H(dD, dR) | |
460 | + | let dV = H(dF, dS) | |
461 | + | let dW = bP(dV, dU) | |
462 | + | let dq = H(dp, dR) | |
463 | + | let ds = H(dr, dS) | |
464 | + | let cb = cy([dq, ds]) | |
465 | + | let dX = if ((dT == 0)) | |
469 | 466 | then { | |
470 | - | let | |
471 | - | let | |
467 | + | let ca = cy([(dq + dU), (ds + dV)]) | |
468 | + | let dY = if ((ca > cb)) | |
472 | 469 | then true | |
473 | 470 | else throw("D1 should be greater than D0") | |
474 | - | if (( | |
471 | + | if ((dY == dY)) | |
475 | 472 | then { | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | $Tuple5(L( | |
473 | + | let dt = d | |
474 | + | let dZ = d | |
475 | + | let cq = ca | |
476 | + | $Tuple5(L(cq, a), L(dU, dR), L(dV, dS), bP((ds + dV), (dq + dU)), dZ) | |
480 | 477 | } | |
481 | 478 | else throw("Strict value is not equal to itself.") | |
482 | 479 | } | |
483 | 480 | else { | |
484 | - | let | |
485 | - | let | |
486 | - | let | |
487 | - | if (if (if ( | |
488 | - | then ( | |
481 | + | let dt = bP(ds, dq) | |
482 | + | let ea = fraction(W((dt - dW)), c, dt) | |
483 | + | let dZ = H(bW, a) | |
484 | + | if (if (if (dK) | |
485 | + | then (dt != d) | |
489 | 486 | else false) | |
490 | - | then ( | |
487 | + | then (ea > dZ) | |
491 | 488 | else false) | |
492 | - | then throw(((("Price slippage " + toString( | |
489 | + | then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ))) | |
493 | 490 | else { | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | then $Tuple2( | |
499 | - | else $Tuple2( | |
500 | - | let | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
491 | + | let eb = H(dT, a) | |
492 | + | let ec = fraction(dU, bS(ds, dq, CEILING), c, CEILING) | |
493 | + | let ed = fraction(dV, c, bS(ds, dq, FLOOR), CEILING) | |
494 | + | let ee = if ((ec > dV)) | |
495 | + | then $Tuple2(ed, dV) | |
496 | + | else $Tuple2(dU, ec) | |
497 | + | let ef = ee._1 | |
498 | + | let eg = ee._2 | |
499 | + | let ca = cy([(dq + ef), (ds + eg)]) | |
500 | + | let dY = if ((ca > cb)) | |
504 | 501 | then true | |
505 | 502 | else throw("D1 should be greater than D0") | |
506 | - | if (( | |
503 | + | if ((dY == dY)) | |
507 | 504 | then { | |
508 | - | let | |
509 | - | $Tuple5(O( | |
505 | + | let cq = fraction(eb, (ca - cb), cb) | |
506 | + | $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ) | |
510 | 507 | } | |
511 | 508 | else throw("Strict value is not equal to itself.") | |
512 | 509 | } | |
513 | 510 | } | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | if ((0 >= | |
511 | + | let eh = dX._1 | |
512 | + | let ei = dX._2 | |
513 | + | let ej = dX._3 | |
514 | + | let du = L(dX._4, a) | |
515 | + | let ek = L(dX._5, a) | |
516 | + | if ((0 >= eh)) | |
520 | 517 | then throw("LP <= 0") | |
521 | 518 | else { | |
522 | - | let | |
519 | + | let el = if (!(dI)) | |
523 | 520 | then 0 | |
524 | - | else | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | then ( | |
521 | + | else eh | |
522 | + | let em = (dD - ei) | |
523 | + | let en = (dF - ej) | |
524 | + | let eo = if (if (dJ) | |
525 | + | then (dM == dN) | |
529 | 526 | else false) | |
530 | - | then $Tuple2( | |
531 | - | else if (if ( | |
532 | - | then ( | |
527 | + | then $Tuple2(dL, 0) | |
528 | + | else if (if (dJ) | |
529 | + | then (dM == dO) | |
533 | 530 | else false) | |
534 | - | then $Tuple2(0, | |
535 | - | else $Tuple2( | |
536 | - | let | |
537 | - | let | |
538 | - | let | |
539 | - | $Tuple13( | |
531 | + | then $Tuple2(0, dL) | |
532 | + | else $Tuple2(ei, ej) | |
533 | + | let ep = eo._1 | |
534 | + | let eq = eo._2 | |
535 | + | let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, de), by(ep, eq, el, du, bW, ek, height, lastBlock.timestamp, em, en))] | |
536 | + | $Tuple13(eh, el, du, dp, dr, dT, di, dn, er, em, en, dE, dG) | |
540 | 537 | } | |
541 | 538 | } | |
542 | 539 | ||
543 | 540 | ||
544 | - | func | |
545 | - | let | |
546 | - | let | |
541 | + | func es (cz,cP,et) = { | |
542 | + | let eu = g | |
543 | + | let ev = cz[if ((cP == 0)) | |
547 | 544 | then 1 | |
548 | 545 | else 0] | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | func | |
556 | - | let | |
557 | - | let | |
558 | - | let | |
559 | - | if (( | |
560 | - | then | |
546 | + | let ew = parseBigIntValue(l) | |
547 | + | let cD = (parseBigIntValue(aU) * ew) | |
548 | + | let cC = ev | |
549 | + | let cE = (cD * eu) | |
550 | + | let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu)) | |
551 | + | let ey = ((cC + ((et * ew) / cE)) - et) | |
552 | + | func cN (cO,ez) = { | |
553 | + | let eA = cO | |
554 | + | let eB = eA._1 | |
555 | + | let dc = eA._2 | |
556 | + | if ((dc != unit)) | |
557 | + | then cO | |
561 | 558 | else { | |
562 | - | let | |
563 | - | let | |
564 | - | if ((f >= | |
565 | - | then $Tuple2( | |
566 | - | else $Tuple2( | |
559 | + | let eC = (((eB * eB) + ex) / ((g * eB) + ey)) | |
560 | + | let eD = X((eC - value(eB))) | |
561 | + | if ((f >= eD)) | |
562 | + | then $Tuple2(eC, ez) | |
563 | + | else $Tuple2(eC, unit) | |
567 | 564 | } | |
568 | 565 | } | |
569 | 566 | ||
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | func | |
576 | - | then | |
577 | - | else | |
567 | + | let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
568 | + | let eE = { | |
569 | + | let cV = cT | |
570 | + | let cW = size(cV) | |
571 | + | let cX = $Tuple2(et, unit) | |
572 | + | func cY (cZ,da) = if ((da >= cW)) | |
573 | + | then cZ | |
574 | + | else cN(cZ, cV[da]) | |
578 | 575 | ||
579 | - | func | |
580 | - | then | |
576 | + | func db (cZ,da) = if ((da >= cW)) | |
577 | + | then cZ | |
581 | 578 | else throw("List size exceeds 15") | |
582 | 579 | ||
583 | - | | |
580 | + | db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
584 | 581 | } | |
585 | - | let | |
586 | - | let | |
587 | - | if (( | |
588 | - | then | |
589 | - | else throw(("Y calculation error, Y = " + toString( | |
582 | + | let eB = eE._1 | |
583 | + | let dc = eE._2 | |
584 | + | if ((dc != unit)) | |
585 | + | then eB | |
586 | + | else throw(("Y calculation error, Y = " + toString(eB))) | |
590 | 587 | } | |
591 | 588 | ||
592 | 589 | ||
593 | - | func | |
594 | - | let | |
595 | - | if (( | |
590 | + | func eF (eG,eH,eI) = { | |
591 | + | let eJ = fraction(cy([K(eG, toBigInt(bo)), K(eH, toBigInt(bp))]), c, eI) | |
592 | + | if ((eI == e)) | |
596 | 593 | then e | |
597 | - | else | |
594 | + | else eJ | |
598 | 595 | } | |
599 | 596 | ||
600 | 597 | ||
601 | - | func | |
602 | - | let | |
603 | - | let | |
604 | - | let | |
605 | - | let | |
606 | - | | |
598 | + | func eK (eL,eM,eN) = { | |
599 | + | let eO = (toBigInt(bN(be(bm))) - eL) | |
600 | + | let eP = (toBigInt(bN(be(bn))) - eM) | |
601 | + | let eQ = (toBigInt(value(assetInfo(bl)).quantity) - eN) | |
602 | + | let eR = eF(eO, eP, eQ) | |
603 | + | eR | |
607 | 604 | } | |
608 | 605 | ||
609 | 606 | ||
610 | - | func | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | let | |
615 | - | let | |
616 | - | $Tuple2( | |
607 | + | func eS (eT,eU,eN) = { | |
608 | + | let eO = (bN(be(bm)) + eT) | |
609 | + | let eP = (bN(be(bn)) + eU) | |
610 | + | let eQ = (value(assetInfo(bl)).quantity + eN) | |
611 | + | let eJ = eF(toBigInt(eO), toBigInt(eP), toBigInt(eQ)) | |
612 | + | let eV = [IntegerEntry(aq, height), StringEntry(ap, toString(eJ))] | |
613 | + | $Tuple2(eV, eJ) | |
617 | 614 | } | |
618 | 615 | ||
619 | 616 | ||
620 | - | func | |
617 | + | func eW (eX,eJ) = if ((eJ >= eX)) | |
621 | 618 | then true | |
622 | - | else | |
619 | + | else aN("updated DLp lower than current DLp") | |
623 | 620 | ||
624 | 621 | ||
625 | - | func | |
626 | - | let | |
627 | - | let | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | then $Tuple2( | |
632 | - | else $Tuple2(-( | |
633 | - | let | |
634 | - | let | |
635 | - | if (if (if ( | |
622 | + | func eY (eZ) = { | |
623 | + | let eO = bN(be(bm)) | |
624 | + | let eP = bN(be(bn)) | |
625 | + | let fa = eZ.amount | |
626 | + | let fb = fraction(eZ.amount, eZ.price, a, FLOOR) | |
627 | + | let fc = if ((eZ.orderType == Buy)) | |
628 | + | then $Tuple2(fa, -(fb)) | |
629 | + | else $Tuple2(-(fa), fb) | |
630 | + | let eT = fc._1 | |
631 | + | let eU = fc._2 | |
632 | + | if (if (if (aV()) | |
636 | 633 | then true | |
637 | - | else ( | |
634 | + | else (bk == r)) | |
638 | 635 | then true | |
639 | - | else ( | |
636 | + | else (bk == s)) | |
640 | 637 | then throw("Admin blocked") | |
641 | - | else if (if (( | |
638 | + | else if (if ((eZ.assetPair.amountAsset != bm)) | |
642 | 639 | then true | |
643 | - | else ( | |
640 | + | else (eZ.assetPair.priceAsset != bn)) | |
644 | 641 | then throw("Wr assets") | |
645 | 642 | else { | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | $Tuple2( | |
643 | + | let fd = parseBigIntValue(valueOrElse(getString(this, ap), "0")) | |
644 | + | let fe = eS(eT, eU, 0) | |
645 | + | let ff = fe._1 | |
646 | + | let fg = fe._2 | |
647 | + | let fh = (fg >= fd) | |
648 | + | let fi = makeString(["dLp=", toString(fd), " dLpNew=", toString(fg), " amountAssetBalance=", toString(eO), " priceAssetBalance=", toString(eP), " amountAssetBalanceDelta=", toString(eT), " priceAssetBalanceDelta=", toString(eU), " height=", toString(height)], "") | |
649 | + | $Tuple2(fh, fi) | |
653 | 650 | } | |
654 | 651 | } | |
655 | 652 | ||
656 | 653 | ||
657 | - | func | |
654 | + | func fj (cP) = if ((size(cP.payments) != 1)) | |
658 | 655 | then throw("1 pmnt exp") | |
659 | 656 | else { | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | let | |
668 | - | if (if ( | |
657 | + | let fk = value(cP.payments[0]) | |
658 | + | let df = value(fk.assetId) | |
659 | + | let dL = fk.amount | |
660 | + | let dX = dd(toBase58String(cP.transactionId), toBase58String(df), dL, cP.caller) | |
661 | + | let dz = dX._1 | |
662 | + | let dA = dX._2 | |
663 | + | let dn = parseIntValue(dX._9) | |
664 | + | let dB = dX._10 | |
665 | + | if (if (aV()) | |
669 | 666 | then true | |
670 | - | else ( | |
671 | - | then throw(("Admin blocked: " + toString( | |
672 | - | else $Tuple5( | |
667 | + | else (dn == s)) | |
668 | + | then throw(("Admin blocked: " + toString(dn))) | |
669 | + | else $Tuple5(dz, dA, dL, df, dB) | |
673 | 670 | } | |
674 | 671 | ||
675 | 672 | ||
676 | - | func | |
677 | - | let | |
678 | - | let | |
679 | - | if (if (if ( | |
673 | + | func fl (fm,ah,fn,fo,bW,dI,dJ,dK,dL,dM) = { | |
674 | + | let dX = dC(ah, bW, value(fn).amount, value(fn).assetId, value(fo).amount, value(fo).assetId, fm, (ah == ""), dI, dJ, dK, dL, dM) | |
675 | + | let dn = parseIntValue(dX._8) | |
676 | + | if (if (if (aV()) | |
680 | 677 | then true | |
681 | - | else ( | |
678 | + | else (dn == q)) | |
682 | 679 | then true | |
683 | - | else ( | |
684 | - | then throw(("Blocked:" + toString( | |
685 | - | else | |
680 | + | else (dn == s)) | |
681 | + | then throw(("Blocked:" + toString(dn))) | |
682 | + | else dX | |
686 | 683 | } | |
687 | 684 | ||
688 | 685 | ||
689 | - | func | |
690 | - | let | |
691 | - | let | |
692 | - | let | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
686 | + | func fp (fq,df,dh,ah,fr) = { | |
687 | + | let dj = toBase58String(value(bm)) | |
688 | + | let dk = toBase58String(value(bn)) | |
689 | + | let di = bl | |
690 | + | let dR = bo | |
691 | + | let dS = bp | |
692 | + | let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity) | |
693 | + | let fs = if ((eQ > e)) | |
697 | 694 | then true | |
698 | 695 | else throw("initial deposit requires all coins") | |
699 | - | if (( | |
696 | + | if ((fs == fs)) | |
700 | 697 | then { | |
701 | - | let | |
702 | - | let | |
703 | - | let | |
704 | - | then $Tuple2( | |
705 | - | else if (( | |
706 | - | then if (( | |
698 | + | let dp = bN(dj) | |
699 | + | let dr = bN(dk) | |
700 | + | let ft = if ((ah == "")) | |
701 | + | then $Tuple2(dp, dr) | |
702 | + | else if ((df == dj)) | |
703 | + | then if ((fq > dp)) | |
707 | 704 | then throw("invalid payment amount") | |
708 | - | else $Tuple2(( | |
709 | - | else if (( | |
710 | - | then if (( | |
705 | + | else $Tuple2((dp - fq), dr) | |
706 | + | else if ((df == dk)) | |
707 | + | then if ((fq > dr)) | |
711 | 708 | then throw("invalid payment amount") | |
712 | - | else $Tuple2( | |
709 | + | else $Tuple2(dp, (dr - fq)) | |
713 | 710 | else throw("wrong pmtAssetId") | |
714 | - | let | |
715 | - | let | |
716 | - | let | |
717 | - | then $Tuple2( | |
718 | - | else if (( | |
719 | - | then $Tuple2(0, | |
711 | + | let fu = ft._1 | |
712 | + | let fv = ft._2 | |
713 | + | let fw = if ((df == dj)) | |
714 | + | then $Tuple2(fq, 0) | |
715 | + | else if ((df == dk)) | |
716 | + | then $Tuple2(0, fq) | |
720 | 717 | else throw("invalid payment") | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | then $Tuple3( | |
725 | - | else $Tuple3( | |
726 | - | let | |
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
718 | + | let fx = fw._1 | |
719 | + | let fy = fw._2 | |
720 | + | let fz = if (fr) | |
721 | + | then $Tuple3(cv(fx, aR)._1, cv(fy, aR)._1, cv(fq, aR)._2) | |
722 | + | else $Tuple3(fx, fy, 0) | |
723 | + | let fA = fz._1 | |
724 | + | let fB = fz._2 | |
725 | + | let cx = fz._3 | |
726 | + | let fC = (fu + fA) | |
727 | + | let fD = (fv + fB) | |
728 | + | let cb = cy([H(fu, bo), H(fv, bp)]) | |
729 | + | let ca = cy([H(fC, bo), H(fD, bp)]) | |
730 | + | let dY = if ((ca > cb)) | |
734 | 731 | then true | |
735 | 732 | else throw() | |
736 | - | if (( | |
733 | + | if ((dY == dY)) | |
737 | 734 | then { | |
738 | - | let | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | $Tuple4(toInt( | |
735 | + | let fE = fraction(eQ, (ca - cb), cb, FLOOR) | |
736 | + | let du = L(bP(H(fD, dS), H(fC, dR)), a) | |
737 | + | let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, ah), by(fx, fy, toInt(fE), du, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
738 | + | let fF = fraction(fv, a, fu) | |
739 | + | let fG = fraction(fq, a, (fF + a)) | |
740 | + | let fH = (fq - fG) | |
741 | + | let fI = fraction(eQ, toBigInt(fH), toBigInt(fv)) | |
742 | + | let fJ = toInt(fraction((fE - fI), b, fI)) | |
743 | + | $Tuple4(toInt(fE), er, cx, fJ) | |
747 | 744 | } | |
748 | 745 | else throw("Strict value is not equal to itself.") | |
749 | 746 | } | |
751 | 748 | } | |
752 | 749 | ||
753 | 750 | ||
754 | - | func fM (fN,fO,fP,fo,fQ,fR) = { | |
751 | + | func fK (fL,fM,fN,fm,fO,fP) = { | |
752 | + | let di = toBase58String(value(bl)) | |
753 | + | let dj = toBase58String(value(bm)) | |
755 | 754 | let dk = toBase58String(value(bn)) | |
756 | - | let dl = toBase58String(value(bo)) | |
757 | - | let dm = toBase58String(value(bp)) | |
758 | - | let fS = bq | |
759 | - | let fT = br | |
760 | - | let fU = bm | |
761 | - | let dj = if ((fo == bz)) | |
762 | - | then fQ | |
763 | - | else fo | |
764 | - | let fm = value(fP[0]) | |
765 | - | let dh = value(fm.assetId) | |
766 | - | let dN = fm.amount | |
767 | - | let eT = eM(e, e, e) | |
768 | - | if ((eT == eT)) | |
755 | + | let fQ = bo | |
756 | + | let fR = bp | |
757 | + | let fS = bk | |
758 | + | let dh = if ((fm == bx)) | |
759 | + | then fO | |
760 | + | else fm | |
761 | + | let fk = value(fN[0]) | |
762 | + | let df = value(fk.assetId) | |
763 | + | let dL = fk.amount | |
764 | + | let eR = eK(e, e, e) | |
765 | + | if ((eR == eR)) | |
769 | 766 | then { | |
770 | - | let | |
771 | - | if (( | |
767 | + | let de = toBase58String(fP) | |
768 | + | if ((di != toBase58String(df))) | |
772 | 769 | then throw("Wrong LP") | |
773 | 770 | else { | |
774 | - | let | |
775 | - | let | |
776 | - | let | |
777 | - | let | |
778 | - | if ($isInstanceOf( | |
779 | - | then | |
780 | - | else throw(($getType( | |
771 | + | let dp = bN(dj) | |
772 | + | let dr = bN(dk) | |
773 | + | let fT = { | |
774 | + | let aS = invoke(this, "getOneTknV2READONLY", [fL, dL], nil) | |
775 | + | if ($isInstanceOf(aS, "(Int, Int)")) | |
776 | + | then aS | |
777 | + | else throw(($getType(aS) + " couldn't be cast to (Int, Int)")) | |
781 | 778 | } | |
782 | - | if (( | |
779 | + | if ((fT == fT)) | |
783 | 780 | then { | |
784 | - | let | |
785 | - | let | |
786 | - | let | |
787 | - | then ( | |
781 | + | let cx = fT._2 | |
782 | + | let fU = fT._1 | |
783 | + | let fV = if (if ((fM > 0)) | |
784 | + | then (fM > fU) | |
788 | 785 | else false) | |
789 | - | then | |
790 | - | else | |
791 | - | let | |
792 | - | then $Tuple4( | |
793 | - | else if (( | |
794 | - | then $Tuple4(0, | |
786 | + | then aN(makeString(["amount to receive is less than ", toString(fM)], "")) | |
787 | + | else fU | |
788 | + | let fW = if ((fL == dj)) | |
789 | + | then $Tuple4(fV, 0, ((dp - fV) - cx), dr) | |
790 | + | else if ((fL == dk)) | |
791 | + | then $Tuple4(0, fV, dp, ((dr - fV) - cx)) | |
795 | 792 | else throw("invalid out asset id") | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let | |
801 | - | let | |
802 | - | let | |
793 | + | let fX = fW._1 | |
794 | + | let fY = fW._2 | |
795 | + | let fC = fW._3 | |
796 | + | let fD = fW._4 | |
797 | + | let fZ = bP(H(fD, fR), H(fC, fQ)) | |
798 | + | let ga = L(fZ, a) | |
799 | + | let gb = if ((fL == "WAVES")) | |
803 | 800 | then unit | |
804 | - | else fromBase58String( | |
805 | - | let | |
806 | - | then [ScriptTransfer( | |
801 | + | else fromBase58String(fL) | |
802 | + | let gc = if ((cx > 0)) | |
803 | + | then [ScriptTransfer(aX, cx, gb)] | |
807 | 804 | else nil | |
808 | - | let | |
809 | - | if (( | |
805 | + | let dB = ([ScriptTransfer(dh, fV, gb), StringEntry(ai(toString(dh), de), bJ(fX, fY, dL, ga, height, lastBlock.timestamp)), IntegerEntry(ab(), ga), IntegerEntry(ac(height, lastBlock.timestamp), ga)] ++ gc) | |
806 | + | if ((dB == dB)) | |
810 | 807 | then { | |
811 | - | let | |
812 | - | if (( | |
808 | + | let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)]) | |
809 | + | if ((gd == gd)) | |
813 | 810 | then { | |
814 | - | let | |
815 | - | let | |
811 | + | let ge = { | |
812 | + | let gf = if ((this == aX)) | |
816 | 813 | then 0 | |
817 | - | else | |
818 | - | let | |
814 | + | else cx | |
815 | + | let gg = if ((bc(fL) == bm)) | |
819 | 816 | then true | |
820 | 817 | else false | |
821 | - | if ( | |
822 | - | then $Tuple2(-(( | |
823 | - | else $Tuple2(0, -(( | |
818 | + | if (gg) | |
819 | + | then $Tuple2(-((fU + gf)), 0) | |
820 | + | else $Tuple2(0, -((fU + gf))) | |
824 | 821 | } | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | if (( | |
832 | - | then $Tuple2(( | |
822 | + | let eT = ge._1 | |
823 | + | let eU = ge._2 | |
824 | + | let gh = eS(eT, eU, 0) | |
825 | + | let gi = gh._1 | |
826 | + | let eJ = gh._2 | |
827 | + | let gj = eW(eR, eJ) | |
828 | + | if ((gj == gj)) | |
829 | + | then $Tuple2((dB ++ gi), fV) | |
833 | 830 | else throw("Strict value is not equal to itself.") | |
834 | 831 | } | |
835 | 832 | else throw("Strict value is not equal to itself.") | |
843 | 840 | } | |
844 | 841 | ||
845 | 842 | ||
846 | - | func | |
847 | - | let | |
848 | - | if ($isInstanceOf( | |
843 | + | func gk () = { | |
844 | + | let gl = getString(Z()) | |
845 | + | if ($isInstanceOf(gl, "String")) | |
849 | 846 | then { | |
850 | - | let | |
851 | - | fromBase58String( | |
847 | + | let cC = gl | |
848 | + | fromBase58String(cC) | |
852 | 849 | } | |
853 | - | else if ($isInstanceOf( | |
850 | + | else if ($isInstanceOf(gl, "Unit")) | |
854 | 851 | then unit | |
855 | 852 | else throw("Match error") | |
856 | 853 | } | |
857 | 854 | ||
858 | 855 | ||
859 | - | func | |
860 | - | let | |
861 | - | if ($isInstanceOf( | |
856 | + | func gm () = { | |
857 | + | let gl = getString(aa()) | |
858 | + | if ($isInstanceOf(gl, "String")) | |
862 | 859 | then { | |
863 | - | let | |
864 | - | fromBase58String( | |
860 | + | let cC = gl | |
861 | + | fromBase58String(cC) | |
865 | 862 | } | |
866 | - | else if ($isInstanceOf( | |
863 | + | else if ($isInstanceOf(gl, "Unit")) | |
867 | 864 | then unit | |
868 | 865 | else throw("Match error") | |
869 | 866 | } | |
870 | 867 | ||
871 | 868 | ||
872 | - | let | |
869 | + | let gn = throw("Permission denied") | |
873 | 870 | ||
874 | - | func | |
875 | - | let | |
876 | - | if ($isInstanceOf( | |
871 | + | func go (cP) = { | |
872 | + | let gl = gk() | |
873 | + | if ($isInstanceOf(gl, "ByteVector")) | |
877 | 874 | then { | |
878 | - | let | |
879 | - | ( | |
875 | + | let gp = gl | |
876 | + | (cP.callerPublicKey == gp) | |
880 | 877 | } | |
881 | - | else if ($isInstanceOf( | |
882 | - | then ( | |
878 | + | else if ($isInstanceOf(gl, "Unit")) | |
879 | + | then (cP.caller == this) | |
883 | 880 | else throw("Match error") | |
884 | 881 | } | |
885 | 882 | ||
886 | 883 | ||
887 | - | func | |
888 | - | let | |
889 | - | if ($isInstanceOf( | |
884 | + | func gq (cP) = { | |
885 | + | let gl = gk() | |
886 | + | if ($isInstanceOf(gl, "ByteVector")) | |
890 | 887 | then { | |
891 | - | let | |
892 | - | if (( | |
888 | + | let gp = gl | |
889 | + | if ((cP.callerPublicKey == gp)) | |
893 | 890 | then true | |
894 | - | else | |
891 | + | else gn | |
895 | 892 | } | |
896 | - | else if ($isInstanceOf( | |
897 | - | then if (( | |
893 | + | else if ($isInstanceOf(gl, "Unit")) | |
894 | + | then if ((cP.caller == this)) | |
898 | 895 | then true | |
899 | - | else | |
896 | + | else gn | |
900 | 897 | else throw("Match error") | |
901 | 898 | } | |
902 | 899 | ||
903 | 900 | ||
904 | - | func | |
905 | - | let | |
906 | - | let | |
907 | - | let | |
908 | - | let | |
909 | - | let | |
910 | - | let | |
911 | - | let | |
912 | - | then [(toBigInt( | |
913 | - | else [(toBigInt( | |
914 | - | let | |
915 | - | let | |
916 | - | let | |
917 | - | let | |
918 | - | let | |
919 | - | func | |
920 | - | let | |
921 | - | let | |
922 | - | let | |
923 | - | if (( | |
924 | - | then | |
901 | + | func gr (gs,et,gt) = { | |
902 | + | let bg = aY() | |
903 | + | let dj = bg[w] | |
904 | + | let dk = bg[x] | |
905 | + | let eu = g | |
906 | + | let ew = parseBigIntValue(l) | |
907 | + | let cD = (parseBigIntValue(aU) * ew) | |
908 | + | let cz = if ((gs == false)) | |
909 | + | then [(toBigInt(bN(dj)) + gt), toBigInt(bN(dk))] | |
910 | + | else [(toBigInt(bN(dk)) + gt), toBigInt(bN(dj))] | |
911 | + | let ev = cz[0] | |
912 | + | let cC = ev | |
913 | + | let cE = (cD * eu) | |
914 | + | let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu)) | |
915 | + | let ey = ((cC + ((et * ew) / cE)) - et) | |
916 | + | func cN (cO,ez) = { | |
917 | + | let gu = cO | |
918 | + | let eB = gu._1 | |
919 | + | let dc = gu._2 | |
920 | + | if ((dc != unit)) | |
921 | + | then cO | |
925 | 922 | else { | |
926 | - | let | |
927 | - | let | |
928 | - | if ((f >= | |
929 | - | then $Tuple2( | |
930 | - | else $Tuple2( | |
923 | + | let eC = (((eB * eB) + ex) / ((g * eB) + ey)) | |
924 | + | let eD = X((eC - value(eB))) | |
925 | + | if ((f >= eD)) | |
926 | + | then $Tuple2(eC, ez) | |
927 | + | else $Tuple2(eC, unit) | |
931 | 928 | } | |
932 | 929 | } | |
933 | 930 | ||
934 | - | let | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
939 | - | func | |
940 | - | then | |
941 | - | else | |
931 | + | let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
932 | + | let gv = { | |
933 | + | let cV = cT | |
934 | + | let cW = size(cV) | |
935 | + | let cX = $Tuple2(et, unit) | |
936 | + | func cY (cZ,da) = if ((da >= cW)) | |
937 | + | then cZ | |
938 | + | else cN(cZ, cV[da]) | |
942 | 939 | ||
943 | - | func | |
944 | - | then | |
940 | + | func db (cZ,da) = if ((da >= cW)) | |
941 | + | then cZ | |
945 | 942 | else throw("List size exceeds 15") | |
946 | 943 | ||
947 | - | | |
944 | + | db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
948 | 945 | } | |
949 | - | let | |
950 | - | let | |
951 | - | if (( | |
952 | - | then | |
953 | - | else throw(("Y calculation error, Y = " + toString( | |
946 | + | let eB = gv._1 | |
947 | + | let dc = gv._2 | |
948 | + | if ((dc != unit)) | |
949 | + | then eB | |
950 | + | else throw(("Y calculation error, Y = " + toString(eB))) | |
954 | 951 | } | |
955 | 952 | ||
956 | 953 | ||
957 | - | func gy () = valueOrElse(getBoolean(aS, aE(toString(this))), false) | |
958 | - | ||
959 | - | ||
960 | - | @Callable(cR) | |
961 | - | func calculateAmountOutForSwapREADONLY (gz,gu,gA) = { | |
962 | - | let gB = if ((gu == false)) | |
954 | + | @Callable(cP) | |
955 | + | func calculateAmountOutForSwapREADONLY (gw,gs,gx) = { | |
956 | + | let gy = if ((gs == false)) | |
963 | 957 | then { | |
964 | - | let | |
965 | - | let | |
966 | - | $Tuple2( | |
958 | + | let gz = aJ(this, ak()) | |
959 | + | let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw)) | |
960 | + | $Tuple2(gz, gt) | |
967 | 961 | } | |
968 | 962 | else { | |
969 | - | let | |
970 | - | let | |
971 | - | $Tuple2( | |
963 | + | let gz = aJ(this, aj()) | |
964 | + | let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw)) | |
965 | + | $Tuple2(gz, gt) | |
972 | 966 | } | |
973 | - | let | |
974 | - | let | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | let | |
980 | - | let | |
981 | - | let | |
982 | - | let | |
983 | - | let | |
984 | - | then [((toBigInt( | |
985 | - | else [(toBigInt( | |
986 | - | let | |
987 | - | let | |
967 | + | let gz = gy._1 | |
968 | + | let gt = gy._2 | |
969 | + | let bg = aY() | |
970 | + | let dj = bg[w] | |
971 | + | let dk = bg[x] | |
972 | + | let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))] | |
973 | + | let et = cy(cz) | |
974 | + | let eB = gr(gs, et, toBigInt(gw)) | |
975 | + | let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1)) | |
976 | + | let gB = max([0, toInt(gA)]) | |
977 | + | let gC = if ((gs == false)) | |
978 | + | then [((toBigInt(bN(dj)) + toBigInt(gw)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)] | |
979 | + | else [(toBigInt(bN(dj)) - gA), ((toBigInt(bN(dk)) + toBigInt(gw)) + toBigInt(gx))] | |
980 | + | let gD = cy(gC) | |
981 | + | let dY = if ((gD >= et)) | |
988 | 982 | then true | |
989 | - | else throw(makeString(["new D is fewer error", toString( | |
990 | - | if (( | |
991 | - | then $Tuple2(nil, | |
983 | + | else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__")) | |
984 | + | if ((dY == dY)) | |
985 | + | then $Tuple2(nil, gB) | |
992 | 986 | else throw("Strict value is not equal to itself.") | |
993 | 987 | } | |
994 | 988 | ||
995 | 989 | ||
996 | 990 | ||
997 | - | @Callable( | |
998 | - | func calculateAmountOutForSwapAndSendTokens ( | |
999 | - | let | |
1000 | - | let | |
1001 | - | if ($isInstanceOf( | |
1002 | - | then | |
1003 | - | else throw(($getType( | |
991 | + | @Callable(cP) | |
992 | + | func calculateAmountOutForSwapAndSendTokens (gw,gs,gE,gF,gx) = { | |
993 | + | let gG = { | |
994 | + | let aS = invoke(aQ, "getSwapContractREADONLY", nil, nil) | |
995 | + | if ($isInstanceOf(aS, "String")) | |
996 | + | then aS | |
997 | + | else throw(($getType(aS) + " couldn't be cast to String")) | |
1004 | 998 | } | |
1005 | - | let | |
999 | + | let gH = [if ((value(cP.payments[0]).amount >= gw)) | |
1006 | 1000 | then true | |
1007 | - | else | |
1001 | + | else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG))) | |
1008 | 1002 | then true | |
1009 | - | else | |
1010 | - | if (( | |
1003 | + | else aN("Permission denied")] | |
1004 | + | if ((gH == gH)) | |
1011 | 1005 | then { | |
1012 | - | let | |
1013 | - | let | |
1014 | - | let | |
1006 | + | let fk = value(cP.payments[0]) | |
1007 | + | let gI = be(fk.assetId) | |
1008 | + | let gJ = if ((gs == false)) | |
1015 | 1009 | then { | |
1016 | - | let | |
1017 | - | let | |
1018 | - | $Tuple2( | |
1010 | + | let gz = aJ(this, ak()) | |
1011 | + | let gt = (bN(gI) - value(cP.payments[0]).amount) | |
1012 | + | $Tuple2(gz, gt) | |
1019 | 1013 | } | |
1020 | 1014 | else { | |
1021 | - | let | |
1022 | - | let | |
1023 | - | $Tuple2( | |
1015 | + | let gz = aJ(this, aj()) | |
1016 | + | let gt = (bN(gI) - value(cP.payments[0]).amount) | |
1017 | + | $Tuple2(gz, gt) | |
1024 | 1018 | } | |
1025 | - | let | |
1026 | - | let | |
1027 | - | let | |
1028 | - | let | |
1029 | - | let | |
1030 | - | let | |
1031 | - | then [(toBigInt( | |
1032 | - | else [toBigInt( | |
1033 | - | let | |
1034 | - | let | |
1035 | - | let | |
1036 | - | let | |
1037 | - | let | |
1019 | + | let gz = gJ._1 | |
1020 | + | let gt = gJ._2 | |
1021 | + | let bg = aY() | |
1022 | + | let dj = bg[w] | |
1023 | + | let dk = bg[x] | |
1024 | + | let cz = if ((gs == false)) | |
1025 | + | then [(toBigInt(bN(dj)) - toBigInt(value(cP.payments[0]).amount)), toBigInt(bN(dk))] | |
1026 | + | else [toBigInt(bN(dj)), (toBigInt(bN(dk)) - toBigInt(value(cP.payments[0]).amount))] | |
1027 | + | let et = cy(cz) | |
1028 | + | let eB = gr(gs, et, toBigInt(0)) | |
1029 | + | let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1)) | |
1030 | + | let gB = max([0, toInt(gA)]) | |
1031 | + | let gK = if ((gB >= gE)) | |
1038 | 1032 | then true | |
1039 | 1033 | else throw("Exchange result is fewer coins than expected") | |
1040 | - | if (( | |
1034 | + | if ((gK == gK)) | |
1041 | 1035 | then { | |
1042 | - | let | |
1043 | - | then [(toBigInt( | |
1044 | - | else [(toBigInt( | |
1045 | - | let | |
1046 | - | let | |
1036 | + | let gC = if ((gs == false)) | |
1037 | + | then [(toBigInt(bN(dj)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)] | |
1038 | + | else [(toBigInt(bN(dj)) - gA), (toBigInt(bN(dk)) + toBigInt(gx))] | |
1039 | + | let gD = cy(gC) | |
1040 | + | let dY = if ((gD >= et)) | |
1047 | 1041 | then true | |
1048 | 1042 | else throw("new D is fewer error") | |
1049 | - | if (( | |
1050 | - | then $Tuple2([ScriptTransfer(addressFromStringValue( | |
1043 | + | if ((dY == dY)) | |
1044 | + | then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB) | |
1051 | 1045 | else throw("Strict value is not equal to itself.") | |
1052 | 1046 | } | |
1053 | 1047 | else throw("Strict value is not equal to itself.") | |
1057 | 1051 | ||
1058 | 1052 | ||
1059 | 1053 | ||
1060 | - | @Callable( | |
1054 | + | @Callable(cP) | |
1061 | 1055 | func constructor (Y) = { | |
1062 | - | let | |
1063 | - | if (( | |
1056 | + | let ex = gq(cP) | |
1057 | + | if ((ex == ex)) | |
1064 | 1058 | then [StringEntry(Y(), Y)] | |
1065 | 1059 | else throw("Strict value is not equal to itself.") | |
1066 | 1060 | } | |
1067 | 1061 | ||
1068 | 1062 | ||
1069 | 1063 | ||
1070 | - | @Callable( | |
1071 | - | func setManager ( | |
1072 | - | let | |
1073 | - | if (( | |
1064 | + | @Callable(cP) | |
1065 | + | func setManager (gL) = { | |
1066 | + | let ex = gq(cP) | |
1067 | + | if ((ex == ex)) | |
1074 | 1068 | then { | |
1075 | - | let | |
1076 | - | if (( | |
1077 | - | then [StringEntry(aa(), | |
1069 | + | let gM = fromBase58String(gL) | |
1070 | + | if ((gM == gM)) | |
1071 | + | then [StringEntry(aa(), gL)] | |
1078 | 1072 | else throw("Strict value is not equal to itself.") | |
1079 | 1073 | } | |
1080 | 1074 | else throw("Strict value is not equal to itself.") | |
1082 | 1076 | ||
1083 | 1077 | ||
1084 | 1078 | ||
1085 | - | @Callable( | |
1079 | + | @Callable(cP) | |
1086 | 1080 | func confirmManager () = { | |
1087 | - | let | |
1088 | - | let | |
1081 | + | let cu = gm() | |
1082 | + | let gN = if (isDefined(cu)) | |
1089 | 1083 | then true | |
1090 | 1084 | else throw("No pending manager") | |
1091 | - | if (( | |
1085 | + | if ((gN == gN)) | |
1092 | 1086 | then { | |
1093 | - | let | |
1087 | + | let gO = if ((cP.callerPublicKey == value(cu))) | |
1094 | 1088 | then true | |
1095 | 1089 | else throw("You are not pending manager") | |
1096 | - | if (( | |
1097 | - | then [StringEntry(Z(), toBase58String(value( | |
1090 | + | if ((gO == gO)) | |
1091 | + | then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())] | |
1098 | 1092 | else throw("Strict value is not equal to itself.") | |
1099 | 1093 | } | |
1100 | 1094 | else throw("Strict value is not equal to itself.") | |
1102 | 1096 | ||
1103 | 1097 | ||
1104 | 1098 | ||
1105 | - | @Callable( | |
1106 | - | func put ( | |
1107 | - | let | |
1108 | - | let | |
1109 | - | let | |
1110 | - | if ((0 > | |
1099 | + | @Callable(cP) | |
1100 | + | func put (gP,gQ) = { | |
1101 | + | let gR = bs() | |
1102 | + | let gS = valueOrErrorMessage(addressFromString(gR[C]), "Wr st addr") | |
1103 | + | let gT = valueOrErrorMessage(addressFromString(gR[E]), "Wr sl addr") | |
1104 | + | if ((0 > gP)) | |
1111 | 1105 | then throw("Wrong slippage") | |
1112 | - | else if ((size( | |
1106 | + | else if ((size(cP.payments) != 2)) | |
1113 | 1107 | then throw("2 pmnts expd") | |
1114 | 1108 | else { | |
1115 | - | let | |
1116 | - | let | |
1117 | - | let | |
1118 | - | if (( | |
1109 | + | let gU = toBigInt(value(cP.payments[0]).amount) | |
1110 | + | let gV = toBigInt(value(cP.payments[1]).amount) | |
1111 | + | let eO = (toBigInt(bN(be(bm))) - gU) | |
1112 | + | if ((eO == eO)) | |
1119 | 1113 | then { | |
1120 | - | let | |
1121 | - | if (( | |
1114 | + | let eP = (toBigInt(bN(be(bn))) - gV) | |
1115 | + | if ((eP == eP)) | |
1122 | 1116 | then { | |
1123 | - | let | |
1124 | - | if (( | |
1117 | + | let eQ = toBigInt(value(assetInfo(bl)).quantity) | |
1118 | + | if ((eQ == eQ)) | |
1125 | 1119 | then { | |
1126 | - | let | |
1127 | - | if (( | |
1120 | + | let eR = eK(gU, gV, toBigInt(0)) | |
1121 | + | if ((eR == eR)) | |
1128 | 1122 | then { | |
1129 | - | let | |
1130 | - | let | |
1131 | - | let | |
1132 | - | let | |
1133 | - | let | |
1134 | - | let | |
1135 | - | let | |
1136 | - | let | |
1137 | - | let | |
1138 | - | if (( | |
1123 | + | let gW = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gP, true, false, true, 0, "") | |
1124 | + | let el = gW._2 | |
1125 | + | let gX = gW._7 | |
1126 | + | let dB = gW._9 | |
1127 | + | let em = gW._10 | |
1128 | + | let en = gW._11 | |
1129 | + | let dj = gW._12 | |
1130 | + | let dk = gW._13 | |
1131 | + | let dX = invoke(aQ, "emit", [el], nil) | |
1132 | + | if ((dX == dX)) | |
1139 | 1133 | then { | |
1140 | - | let | |
1141 | - | let | |
1142 | - | if ($isInstanceOf( | |
1134 | + | let gY = { | |
1135 | + | let gl = dX | |
1136 | + | if ($isInstanceOf(gl, "Address")) | |
1143 | 1137 | then { | |
1144 | - | let | |
1145 | - | invoke( | |
1138 | + | let gZ = gl | |
1139 | + | invoke(gZ, "emit", [el], nil) | |
1146 | 1140 | } | |
1147 | 1141 | else unit | |
1148 | 1142 | } | |
1149 | - | if (( | |
1143 | + | if ((gY == gY)) | |
1150 | 1144 | then { | |
1151 | - | let | |
1152 | - | then invoke( | |
1145 | + | let ha = if ((em > 0)) | |
1146 | + | then invoke(gT, "put", nil, [AttachedPayment(dj, em)]) | |
1153 | 1147 | else nil | |
1154 | - | if (( | |
1148 | + | if ((ha == ha)) | |
1155 | 1149 | then { | |
1156 | - | let | |
1157 | - | then invoke( | |
1150 | + | let hb = if ((en > 0)) | |
1151 | + | then invoke(gT, "put", nil, [AttachedPayment(dk, en)]) | |
1158 | 1152 | else nil | |
1159 | - | if (( | |
1153 | + | if ((hb == hb)) | |
1160 | 1154 | then { | |
1161 | - | let | |
1155 | + | let hc = if (gQ) | |
1162 | 1156 | then { | |
1163 | - | let | |
1164 | - | if (( | |
1157 | + | let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)]) | |
1158 | + | if ((hd == hd)) | |
1165 | 1159 | then nil | |
1166 | 1160 | else throw("Strict value is not equal to itself.") | |
1167 | 1161 | } | |
1168 | - | else [ScriptTransfer( | |
1169 | - | let | |
1170 | - | let | |
1171 | - | let | |
1172 | - | let | |
1162 | + | else [ScriptTransfer(cP.caller, el, gX)] | |
1163 | + | let he = eS(0, 0, 0) | |
1164 | + | let gi = he._1 | |
1165 | + | let eJ = he._2 | |
1166 | + | let hf = if ((eJ >= eR)) | |
1173 | 1167 | then true | |
1174 | - | else | |
1175 | - | if (( | |
1168 | + | else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " ")) | |
1169 | + | if ((hf == hf)) | |
1176 | 1170 | then { | |
1177 | - | let | |
1178 | - | if (( | |
1179 | - | then (( | |
1171 | + | let hg = value(assetInfo(bl)).quantity | |
1172 | + | if ((hg == hg)) | |
1173 | + | then ((dB ++ hc) ++ gi) | |
1180 | 1174 | else throw("Strict value is not equal to itself.") | |
1181 | 1175 | } | |
1182 | 1176 | else throw("Strict value is not equal to itself.") | |
1201 | 1195 | ||
1202 | 1196 | ||
1203 | 1197 | ||
1204 | - | @Callable( | |
1205 | - | func putOneTknV2 ( | |
1206 | - | let | |
1207 | - | let | |
1208 | - | if ($isInstanceOf( | |
1209 | - | then | |
1210 | - | else throw(($getType( | |
1198 | + | @Callable(cP) | |
1199 | + | func putOneTknV2 (fM,gQ) = { | |
1200 | + | let hh = { | |
1201 | + | let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1202 | + | if ($isInstanceOf(aS, "Boolean")) | |
1203 | + | then aS | |
1204 | + | else throw(($getType(aS) + " couldn't be cast to Boolean")) | |
1211 | 1205 | } | |
1212 | - | let | |
1206 | + | let hi = if (if (if (aV()) | |
1213 | 1207 | then true | |
1214 | - | else ( | |
1208 | + | else (bk == q)) | |
1215 | 1209 | then true | |
1216 | - | else ( | |
1210 | + | else (bk == s)) | |
1217 | 1211 | then true | |
1218 | - | else | |
1219 | - | let | |
1212 | + | else hh | |
1213 | + | let gH = [if (if (!(hi)) | |
1220 | 1214 | then true | |
1221 | - | else | |
1215 | + | else go(cP)) | |
1222 | 1216 | then true | |
1223 | - | else | |
1217 | + | else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1)) | |
1224 | 1218 | then true | |
1225 | - | else | |
1226 | - | if (( | |
1219 | + | else aN("exactly 1 payment are expected")] | |
1220 | + | if ((gH == gH)) | |
1227 | 1221 | then { | |
1228 | - | let | |
1229 | - | let | |
1230 | - | let | |
1231 | - | let | |
1232 | - | let | |
1233 | - | let | |
1234 | - | then | |
1235 | - | else | |
1236 | - | let | |
1237 | - | let | |
1238 | - | let | |
1239 | - | let | |
1240 | - | then | |
1241 | - | else | |
1242 | - | if (( | |
1222 | + | let dj = toBase58String(value(bm)) | |
1223 | + | let dk = toBase58String(value(bn)) | |
1224 | + | let di = bl | |
1225 | + | let fQ = bo | |
1226 | + | let fR = bp | |
1227 | + | let dh = if ((cP.caller == this)) | |
1228 | + | then cP.originCaller | |
1229 | + | else cP.caller | |
1230 | + | let fk = value(cP.payments[0]) | |
1231 | + | let df = toBase58String(value(fk.assetId)) | |
1232 | + | let dL = fk.amount | |
1233 | + | let eR = if ((fk.assetId == bm)) | |
1234 | + | then eK(toBigInt(dL), toBigInt(0), toBigInt(0)) | |
1235 | + | else eK(toBigInt(0), toBigInt(dL), toBigInt(0)) | |
1236 | + | if ((eR == eR)) | |
1243 | 1237 | then { | |
1244 | - | let | |
1245 | - | if (( | |
1238 | + | let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true) | |
1239 | + | if ((hj == hj)) | |
1246 | 1240 | then { | |
1247 | - | let | |
1248 | - | let | |
1249 | - | let | |
1250 | - | let | |
1251 | - | then ( | |
1241 | + | let cx = hj._3 | |
1242 | + | let dB = hj._2 | |
1243 | + | let hk = hj._1 | |
1244 | + | let el = if (if ((fM > 0)) | |
1245 | + | then (fM > hk) | |
1252 | 1246 | else false) | |
1253 | - | then | |
1254 | - | else | |
1255 | - | let | |
1256 | - | if (( | |
1247 | + | then aN(makeString(["amount to receive is less than ", toString(fM)], "")) | |
1248 | + | else hk | |
1249 | + | let gW = invoke(aQ, "emit", [el], nil) | |
1250 | + | if ((gW == gW)) | |
1257 | 1251 | then { | |
1258 | - | let | |
1259 | - | let | |
1260 | - | if ($isInstanceOf( | |
1252 | + | let gY = { | |
1253 | + | let gl = gW | |
1254 | + | if ($isInstanceOf(gl, "Address")) | |
1261 | 1255 | then { | |
1262 | - | let | |
1263 | - | invoke( | |
1256 | + | let gZ = gl | |
1257 | + | invoke(gZ, "emit", [el], nil) | |
1264 | 1258 | } | |
1265 | 1259 | else unit | |
1266 | 1260 | } | |
1267 | - | if (( | |
1261 | + | if ((gY == gY)) | |
1268 | 1262 | then { | |
1269 | - | let | |
1263 | + | let hc = if (gQ) | |
1270 | 1264 | then { | |
1271 | - | let | |
1272 | - | if (( | |
1265 | + | let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)]) | |
1266 | + | if ((hd == hd)) | |
1273 | 1267 | then nil | |
1274 | 1268 | else throw("Strict value is not equal to itself.") | |
1275 | 1269 | } | |
1276 | - | else [ScriptTransfer( | |
1277 | - | let | |
1278 | - | then [ScriptTransfer( | |
1270 | + | else [ScriptTransfer(cP.caller, el, di)] | |
1271 | + | let gc = if ((cx > 0)) | |
1272 | + | then [ScriptTransfer(aX, cx, fromBase58String(df))] | |
1279 | 1273 | else nil | |
1280 | - | let | |
1274 | + | let hl = if ((this == aX)) | |
1281 | 1275 | then $Tuple2(0, 0) | |
1282 | 1276 | else { | |
1283 | - | let | |
1277 | + | let hm = if ((fk.assetId == bm)) | |
1284 | 1278 | then true | |
1285 | 1279 | else false | |
1286 | - | if ( | |
1287 | - | then $Tuple2(-( | |
1288 | - | else $Tuple2(0, -( | |
1280 | + | if (hm) | |
1281 | + | then $Tuple2(-(cx), 0) | |
1282 | + | else $Tuple2(0, -(cx)) | |
1289 | 1283 | } | |
1290 | - | let | |
1291 | - | let | |
1292 | - | let | |
1293 | - | let | |
1294 | - | let | |
1295 | - | let | |
1296 | - | if (( | |
1297 | - | then $Tuple2(((( | |
1284 | + | let eT = hl._1 | |
1285 | + | let eU = hl._2 | |
1286 | + | let hn = eS(eT, eU, 0) | |
1287 | + | let gi = hn._1 | |
1288 | + | let eJ = hn._2 | |
1289 | + | let gj = eW(eR, eJ) | |
1290 | + | if ((gj == gj)) | |
1291 | + | then $Tuple2((((dB ++ hc) ++ gc) ++ gi), el) | |
1298 | 1292 | else throw("Strict value is not equal to itself.") | |
1299 | 1293 | } | |
1300 | 1294 | else throw("Strict value is not equal to itself.") | |
1310 | 1304 | ||
1311 | 1305 | ||
1312 | 1306 | ||
1313 | - | @Callable( | |
1314 | - | func putForFree ( | |
1307 | + | @Callable(cP) | |
1308 | + | func putForFree (ho) = if ((0 > ho)) | |
1315 | 1309 | then throw("Wrong slpg") | |
1316 | - | else if ((size( | |
1310 | + | else if ((size(cP.payments) != 2)) | |
1317 | 1311 | then throw("2 pmnts expd") | |
1318 | 1312 | else { | |
1319 | - | let | |
1320 | - | let | |
1321 | - | let | |
1322 | - | let | |
1323 | - | let | |
1324 | - | if (( | |
1313 | + | let hp = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], ho, false, false, true, 0, "") | |
1314 | + | let dB = hp._9 | |
1315 | + | let gU = toBigInt(value(cP.payments[0]).amount) | |
1316 | + | let gV = toBigInt(value(cP.payments[1]).amount) | |
1317 | + | let eR = eK(gU, gV, toBigInt(0)) | |
1318 | + | if ((eR == eR)) | |
1325 | 1319 | then { | |
1326 | - | let | |
1327 | - | let | |
1328 | - | let | |
1329 | - | let | |
1330 | - | if (( | |
1331 | - | then ( | |
1320 | + | let hq = eS(0, 0, 0) | |
1321 | + | let gi = hq._1 | |
1322 | + | let eJ = hq._2 | |
1323 | + | let gj = eW(eR, eJ) | |
1324 | + | if ((gj == gj)) | |
1325 | + | then (dB ++ gi) | |
1332 | 1326 | else throw("Strict value is not equal to itself.") | |
1333 | 1327 | } | |
1334 | 1328 | else throw("Strict value is not equal to itself.") | |
1336 | 1330 | ||
1337 | 1331 | ||
1338 | 1332 | ||
1339 | - | @Callable( | |
1333 | + | @Callable(cP) | |
1340 | 1334 | func get () = { | |
1341 | - | let | |
1342 | - | if (( | |
1335 | + | let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1336 | + | if ((eR == eR)) | |
1343 | 1337 | then { | |
1344 | - | let | |
1345 | - | let | |
1346 | - | let | |
1347 | - | let | |
1348 | - | let | |
1349 | - | let | |
1350 | - | let | |
1351 | - | if (( | |
1338 | + | let dX = fj(cP) | |
1339 | + | let hr = dX._1 | |
1340 | + | let dA = dX._2 | |
1341 | + | let dL = dX._3 | |
1342 | + | let df = dX._4 | |
1343 | + | let dB = dX._5 | |
1344 | + | let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)]) | |
1345 | + | if ((ey == ey)) | |
1352 | 1346 | then { | |
1353 | - | let | |
1354 | - | let | |
1355 | - | let | |
1356 | - | let | |
1357 | - | if (( | |
1358 | - | then ( | |
1347 | + | let hs = eS(-(hr), -(dA), 0) | |
1348 | + | let gi = hs._1 | |
1349 | + | let eJ = hs._2 | |
1350 | + | let gj = eW(eR, eJ) | |
1351 | + | if ((gj == gj)) | |
1352 | + | then (dB ++ gi) | |
1359 | 1353 | else throw("Strict value is not equal to itself.") | |
1360 | 1354 | } | |
1361 | 1355 | else throw("Strict value is not equal to itself.") | |
1365 | 1359 | ||
1366 | 1360 | ||
1367 | 1361 | ||
1368 | - | @Callable( | |
1369 | - | func getOneTknV2 ( | |
1370 | - | let | |
1371 | - | let | |
1372 | - | if ($isInstanceOf( | |
1373 | - | then | |
1374 | - | else throw(($getType( | |
1362 | + | @Callable(cP) | |
1363 | + | func getOneTknV2 (fL,fM) = { | |
1364 | + | let hh = { | |
1365 | + | let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1366 | + | if ($isInstanceOf(aS, "Boolean")) | |
1367 | + | then aS | |
1368 | + | else throw(($getType(aS) + " couldn't be cast to Boolean")) | |
1375 | 1369 | } | |
1376 | - | let | |
1370 | + | let ht = if (if (aV()) | |
1377 | 1371 | then true | |
1378 | - | else ( | |
1372 | + | else (bk == s)) | |
1379 | 1373 | then true | |
1380 | - | else | |
1381 | - | let | |
1374 | + | else hh | |
1375 | + | let gH = [if (if (!(ht)) | |
1382 | 1376 | then true | |
1383 | - | else | |
1377 | + | else go(cP)) | |
1384 | 1378 | then true | |
1385 | - | else | |
1379 | + | else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1)) | |
1386 | 1380 | then true | |
1387 | - | else | |
1388 | - | if (( | |
1381 | + | else aN("exactly 1 payment are expected")] | |
1382 | + | if ((gH == gH)) | |
1389 | 1383 | then { | |
1390 | - | let | |
1391 | - | let | |
1392 | - | let | |
1393 | - | $Tuple2( | |
1384 | + | let hu = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId) | |
1385 | + | let dB = hu._1 | |
1386 | + | let fV = hu._2 | |
1387 | + | $Tuple2(dB, fV) | |
1394 | 1388 | } | |
1395 | 1389 | else throw("Strict value is not equal to itself.") | |
1396 | 1390 | } | |
1397 | 1391 | ||
1398 | 1392 | ||
1399 | 1393 | ||
1400 | - | @Callable( | |
1394 | + | @Callable(cP) | |
1401 | 1395 | func refreshDLp () = { | |
1402 | - | let | |
1403 | - | let | |
1396 | + | let hv = valueOrElse(getInteger(aq), 0) | |
1397 | + | let hw = if (((height - hv) >= at)) | |
1404 | 1398 | then unit | |
1405 | - | else | |
1406 | - | if (( | |
1399 | + | else aN(makeString([toString(at), " blocks have not passed since the previous call"], "")) | |
1400 | + | if ((hw == hw)) | |
1407 | 1401 | then { | |
1408 | - | let | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | let | |
1413 | - | then | |
1414 | - | else | |
1415 | - | $Tuple2( | |
1402 | + | let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp")) | |
1403 | + | let hx = eS(0, 0, 0) | |
1404 | + | let hy = hx._1 | |
1405 | + | let eJ = hx._2 | |
1406 | + | let eV = if ((fd != eJ)) | |
1407 | + | then hy | |
1408 | + | else aN("nothing to refresh") | |
1409 | + | $Tuple2(eV, toString(eJ)) | |
1416 | 1410 | } | |
1417 | 1411 | else throw("Strict value is not equal to itself.") | |
1418 | 1412 | } | |
1419 | 1413 | ||
1420 | 1414 | ||
1421 | 1415 | ||
1422 | - | @Callable(cR) | |
1423 | - | func getOneTknV2READONLY (fN,hC) = { | |
1424 | - | let dl = toBase58String(value(bo)) | |
1425 | - | let dm = toBase58String(value(bp)) | |
1416 | + | @Callable(cP) | |
1417 | + | func getOneTknV2READONLY (fL,hz) = { | |
1418 | + | let dj = toBase58String(value(bm)) | |
1426 | 1419 | let dk = toBase58String(value(bn)) | |
1427 | - | let cB = [toBigInt(bP(dl)), toBigInt(bP(dm))] | |
1428 | - | let eK = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dk)), "invalid lp asset").quantity) | |
1429 | - | let cd = cA(cB) | |
1430 | - | let cc = (cd - fraction(toBigInt(hC), cd, eK)) | |
1431 | - | let hD = if ((fN == dl)) | |
1420 | + | let di = toBase58String(value(bl)) | |
1421 | + | let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))] | |
1422 | + | let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity) | |
1423 | + | let cb = cy(cz) | |
1424 | + | let ca = (cb - fraction(toBigInt(hz), cb, eI)) | |
1425 | + | let hA = if ((fL == dj)) | |
1432 | 1426 | then 0 | |
1433 | - | else if (( | |
1427 | + | else if ((fL == dk)) | |
1434 | 1428 | then 1 | |
1435 | 1429 | else throw("invalid out asset id") | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | let | |
1440 | - | let | |
1441 | - | let | |
1442 | - | $Tuple2(nil, $Tuple2( | |
1430 | + | let hB = es(cz, hA, ca) | |
1431 | + | let gA = (cz[hA] - hB) | |
1432 | + | let gB = max([0, toInt((gA - f))]) | |
1433 | + | let hC = cv(gB, aT) | |
1434 | + | let fU = hC._1 | |
1435 | + | let cx = hC._2 | |
1436 | + | $Tuple2(nil, $Tuple2(fU, cx)) | |
1443 | 1437 | } | |
1444 | 1438 | ||
1445 | 1439 | ||
1446 | 1440 | ||
1447 | - | @Callable(cR) | |
1448 | - | func getOneTknV2WithBonusREADONLY (fN,hC) = { | |
1449 | - | let dl = toBase58String(value(bo)) | |
1450 | - | let dm = toBase58String(value(bp)) | |
1441 | + | @Callable(cP) | |
1442 | + | func getOneTknV2WithBonusREADONLY (fL,hz) = { | |
1443 | + | let dj = toBase58String(value(bm)) | |
1451 | 1444 | let dk = toBase58String(value(bn)) | |
1452 | - | let dr = bP(dl) | |
1453 | - | let dt = bP(dm) | |
1454 | - | let hG = { | |
1455 | - | let aU = invoke(this, "getOneTknV2READONLY", [fN, hC], nil) | |
1456 | - | if ($isInstanceOf(aU, "(Int, Int)")) | |
1457 | - | then aU | |
1458 | - | else throw(($getType(aU) + " couldn't be cast to (Int, Int)")) | |
1445 | + | let di = toBase58String(value(bl)) | |
1446 | + | let dp = bN(dj) | |
1447 | + | let dr = bN(dk) | |
1448 | + | let hD = { | |
1449 | + | let aS = invoke(this, "getOneTknV2READONLY", [fL, hz], nil) | |
1450 | + | if ($isInstanceOf(aS, "(Int, Int)")) | |
1451 | + | then aS | |
1452 | + | else throw(($getType(aS) + " couldn't be cast to (Int, Int)")) | |
1459 | 1453 | } | |
1460 | - | let | |
1461 | - | let | |
1462 | - | let | |
1463 | - | let | |
1464 | - | let | |
1465 | - | let | |
1466 | - | let | |
1467 | - | then if (( | |
1454 | + | let fU = hD._1 | |
1455 | + | let cx = hD._2 | |
1456 | + | let dX = dd("", di, hz, this) | |
1457 | + | let dz = dX._1 | |
1458 | + | let dA = dX._2 | |
1459 | + | let hE = (dz + dA) | |
1460 | + | let fJ = if ((hE == 0)) | |
1461 | + | then if ((fU == 0)) | |
1468 | 1462 | then 0 | |
1469 | 1463 | else throw("bonus calculation error") | |
1470 | - | else fraction(( | |
1471 | - | $Tuple2(nil, $Tuple3( | |
1464 | + | else fraction((fU - hE), a, hE) | |
1465 | + | $Tuple2(nil, $Tuple3(fU, cx, fJ)) | |
1472 | 1466 | } | |
1473 | 1467 | ||
1474 | 1468 | ||
1475 | 1469 | ||
1476 | - | @Callable( | |
1477 | - | func getNoLess ( | |
1478 | - | let | |
1479 | - | let | |
1480 | - | let | |
1481 | - | let | |
1482 | - | let | |
1483 | - | let | |
1484 | - | if (( | |
1485 | - | then throw(((("Failed: " + toString( | |
1486 | - | else if (( | |
1487 | - | then throw(((("Failed: " + toString( | |
1470 | + | @Callable(cP) | |
1471 | + | func getNoLess (hF,hG) = { | |
1472 | + | let dX = fj(cP) | |
1473 | + | let dz = dX._1 | |
1474 | + | let dA = dX._2 | |
1475 | + | let dL = dX._3 | |
1476 | + | let df = dX._4 | |
1477 | + | let dB = dX._5 | |
1478 | + | if ((hF > dz)) | |
1479 | + | then throw(((("Failed: " + toString(dz)) + " < ") + toString(hF))) | |
1480 | + | else if ((hG > dA)) | |
1481 | + | then throw(((("Failed: " + toString(dA)) + " < ") + toString(hG))) | |
1488 | 1482 | else { | |
1489 | - | let | |
1490 | - | if (( | |
1483 | + | let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1484 | + | if ((eR == eR)) | |
1491 | 1485 | then { | |
1492 | - | let | |
1493 | - | if (( | |
1486 | + | let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)]) | |
1487 | + | if ((hH == hH)) | |
1494 | 1488 | then { | |
1495 | - | let | |
1496 | - | let | |
1497 | - | let | |
1498 | - | let | |
1499 | - | if (( | |
1500 | - | then ( | |
1489 | + | let hI = eS(-(dz), -(dA), 0) | |
1490 | + | let gi = hI._1 | |
1491 | + | let eJ = hI._2 | |
1492 | + | let gj = eW(eR, eJ) | |
1493 | + | if ((gj == gj)) | |
1494 | + | then (dB ++ gi) | |
1501 | 1495 | else throw("Strict value is not equal to itself.") | |
1502 | 1496 | } | |
1503 | 1497 | else throw("Strict value is not equal to itself.") | |
1508 | 1502 | ||
1509 | 1503 | ||
1510 | 1504 | ||
1511 | - | @Callable( | |
1512 | - | func unstakeAndGet ( | |
1513 | - | let | |
1505 | + | @Callable(cP) | |
1506 | + | func unstakeAndGet (cw) = { | |
1507 | + | let hJ = if ((size(cP.payments) != 0)) | |
1514 | 1508 | then throw("No pmnts expd") | |
1515 | 1509 | else true | |
1516 | - | if (( | |
1510 | + | if ((hJ == hJ)) | |
1517 | 1511 | then { | |
1518 | - | let | |
1519 | - | let | |
1520 | - | let | |
1521 | - | let | |
1522 | - | if (( | |
1512 | + | let hK = bs() | |
1513 | + | let gX = bl | |
1514 | + | let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr") | |
1515 | + | let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1516 | + | if ((eR == eR)) | |
1523 | 1517 | then { | |
1524 | - | let | |
1525 | - | if (( | |
1518 | + | let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil) | |
1519 | + | if ((hM == hM)) | |
1526 | 1520 | then { | |
1527 | - | let | |
1528 | - | let | |
1529 | - | let | |
1530 | - | let | |
1531 | - | let | |
1532 | - | let | |
1521 | + | let dX = dd(toBase58String(cP.transactionId), toBase58String(gX), cw, cP.caller) | |
1522 | + | let dz = dX._1 | |
1523 | + | let dA = dX._2 | |
1524 | + | let dn = parseIntValue(dX._9) | |
1525 | + | let dB = dX._10 | |
1526 | + | let hN = if (if (aV()) | |
1533 | 1527 | then true | |
1534 | - | else ( | |
1535 | - | then throw(("Blocked: " + toString( | |
1528 | + | else (dn == s)) | |
1529 | + | then throw(("Blocked: " + toString(dn))) | |
1536 | 1530 | else true | |
1537 | - | if (( | |
1531 | + | if ((hN == hN)) | |
1538 | 1532 | then { | |
1539 | - | let | |
1540 | - | if (( | |
1533 | + | let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)]) | |
1534 | + | if ((hO == hO)) | |
1541 | 1535 | then { | |
1542 | - | let | |
1543 | - | let | |
1544 | - | let | |
1545 | - | let | |
1546 | - | if (( | |
1547 | - | then ( | |
1536 | + | let hP = eS(-(dz), -(dA), 0) | |
1537 | + | let gi = hP._1 | |
1538 | + | let eJ = hP._2 | |
1539 | + | let gj = eW(eR, eJ) | |
1540 | + | if ((gj == gj)) | |
1541 | + | then (dB ++ gi) | |
1548 | 1542 | else throw("Strict value is not equal to itself.") | |
1549 | 1543 | } | |
1550 | 1544 | else throw("Strict value is not equal to itself.") | |
1560 | 1554 | ||
1561 | 1555 | ||
1562 | 1556 | ||
1563 | - | @Callable( | |
1564 | - | func unstakeAndGetNoLess ( | |
1565 | - | let | |
1557 | + | @Callable(cP) | |
1558 | + | func unstakeAndGetNoLess (hQ,hR,hG) = { | |
1559 | + | let ht = if (aV()) | |
1566 | 1560 | then true | |
1567 | - | else ( | |
1568 | - | let | |
1561 | + | else (bk == s) | |
1562 | + | let gH = [if (!(ht)) | |
1569 | 1563 | then true | |
1570 | - | else throw("get operation is blocked by admin"), if ((size( | |
1564 | + | else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0)) | |
1571 | 1565 | then true | |
1572 | 1566 | else throw("no payments are expected")] | |
1573 | - | if (( | |
1567 | + | if ((gH == gH)) | |
1574 | 1568 | then { | |
1575 | - | let | |
1576 | - | if (( | |
1569 | + | let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1570 | + | if ((eR == eR)) | |
1577 | 1571 | then { | |
1578 | - | let | |
1579 | - | if (( | |
1572 | + | let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil) | |
1573 | + | if ((hM == hM)) | |
1580 | 1574 | then { | |
1581 | - | let | |
1582 | - | let | |
1583 | - | let | |
1584 | - | let | |
1585 | - | let | |
1575 | + | let hS = dd(toBase58String(cP.transactionId), toBase58String(bl), hQ, cP.caller) | |
1576 | + | let dz = hS._1 | |
1577 | + | let dA = hS._2 | |
1578 | + | let dB = hS._10 | |
1579 | + | let hT = [if ((dz >= hR)) | |
1586 | 1580 | then true | |
1587 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1581 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG)) | |
1588 | 1582 | then true | |
1589 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1590 | - | if (( | |
1583 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))] | |
1584 | + | if ((hT == hT)) | |
1591 | 1585 | then { | |
1592 | - | let | |
1593 | - | if (( | |
1586 | + | let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)]) | |
1587 | + | if ((hH == hH)) | |
1594 | 1588 | then { | |
1595 | - | let | |
1596 | - | let | |
1597 | - | let | |
1598 | - | let | |
1599 | - | if (( | |
1600 | - | then ( | |
1589 | + | let hU = eS(-(dz), -(dA), 0) | |
1590 | + | let gi = hU._1 | |
1591 | + | let eJ = hU._2 | |
1592 | + | let gj = eW(eR, eJ) | |
1593 | + | if ((gj == gj)) | |
1594 | + | then (dB ++ gi) | |
1601 | 1595 | else throw("Strict value is not equal to itself.") | |
1602 | 1596 | } | |
1603 | 1597 | else throw("Strict value is not equal to itself.") | |
1613 | 1607 | ||
1614 | 1608 | ||
1615 | 1609 | ||
1616 | - | @Callable( | |
1617 | - | func unstakeAndGetOneTknV2 ( | |
1618 | - | let | |
1619 | - | let | |
1620 | - | if ($isInstanceOf( | |
1621 | - | then | |
1622 | - | else throw(($getType( | |
1610 | + | @Callable(cP) | |
1611 | + | func unstakeAndGetOneTknV2 (hQ,fL,fM) = { | |
1612 | + | let hh = { | |
1613 | + | let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1614 | + | if ($isInstanceOf(aS, "Boolean")) | |
1615 | + | then aS | |
1616 | + | else throw(($getType(aS) + " couldn't be cast to Boolean")) | |
1623 | 1617 | } | |
1624 | - | let | |
1618 | + | let ht = if (if (aV()) | |
1625 | 1619 | then true | |
1626 | - | else ( | |
1620 | + | else (bk == s)) | |
1627 | 1621 | then true | |
1628 | - | else | |
1629 | - | let | |
1622 | + | else hh | |
1623 | + | let gH = [if (if (!(ht)) | |
1630 | 1624 | then true | |
1631 | - | else | |
1625 | + | else go(cP)) | |
1632 | 1626 | then true | |
1633 | - | else | |
1627 | + | else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0)) | |
1634 | 1628 | then true | |
1635 | - | else | |
1636 | - | if (( | |
1629 | + | else aN("no payments are expected")] | |
1630 | + | if ((gH == gH)) | |
1637 | 1631 | then { | |
1638 | - | let | |
1639 | - | let | |
1640 | - | let | |
1641 | - | let | |
1642 | - | let | |
1643 | - | let | |
1644 | - | if (( | |
1632 | + | let hK = bs() | |
1633 | + | let gX = bl | |
1634 | + | let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr") | |
1635 | + | let dh = cP.caller | |
1636 | + | let hV = this | |
1637 | + | let hM = invoke(hL, "unstakeINTERNAL", [gX, hQ, dh.bytes, hV.bytes], nil) | |
1638 | + | if ((hM == hM)) | |
1645 | 1639 | then { | |
1646 | - | let | |
1647 | - | let | |
1648 | - | let | |
1649 | - | $Tuple2( | |
1640 | + | let hW = fK(fL, fM, [AttachedPayment(gX, hQ)], cP.caller, cP.originCaller, cP.transactionId) | |
1641 | + | let dB = hW._1 | |
1642 | + | let fV = hW._2 | |
1643 | + | $Tuple2(dB, fV) | |
1650 | 1644 | } | |
1651 | 1645 | else throw("Strict value is not equal to itself.") | |
1652 | 1646 | } | |
1655 | 1649 | ||
1656 | 1650 | ||
1657 | 1651 | ||
1658 | - | @Callable( | |
1659 | - | func putOneTknV2WithBonusREADONLY ( | |
1660 | - | let | |
1661 | - | let | |
1662 | - | let | |
1663 | - | let | |
1664 | - | let | |
1665 | - | $Tuple2(nil, $Tuple3( | |
1652 | + | @Callable(cP) | |
1653 | + | func putOneTknV2WithBonusREADONLY (hX,hY) = { | |
1654 | + | let hZ = fp(hX, hY, "", "", true) | |
1655 | + | let fE = hZ._1 | |
1656 | + | let dB = hZ._2 | |
1657 | + | let cx = hZ._3 | |
1658 | + | let fJ = hZ._4 | |
1659 | + | $Tuple2(nil, $Tuple3(fE, cx, fJ)) | |
1666 | 1660 | } | |
1667 | 1661 | ||
1668 | 1662 | ||
1669 | 1663 | ||
1670 | - | @Callable( | |
1671 | - | func putOneTknV2WithoutTakeFeeREADONLY ( | |
1672 | - | let | |
1673 | - | let | |
1674 | - | let | |
1675 | - | let | |
1676 | - | let | |
1677 | - | $Tuple2(nil, $Tuple3( | |
1664 | + | @Callable(cP) | |
1665 | + | func putOneTknV2WithoutTakeFeeREADONLY (hX,hY) = { | |
1666 | + | let ia = fp(hX, hY, "", "", false) | |
1667 | + | let fE = ia._1 | |
1668 | + | let dB = ia._2 | |
1669 | + | let cx = ia._3 | |
1670 | + | let fJ = ia._4 | |
1671 | + | $Tuple2(nil, $Tuple3(fE, cx, fJ)) | |
1678 | 1672 | } | |
1679 | 1673 | ||
1680 | 1674 | ||
1681 | 1675 | ||
1682 | - | @Callable( | |
1683 | - | func activate ( | |
1676 | + | @Callable(cP) | |
1677 | + | func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ))) | |
1684 | 1678 | then throw("denied") | |
1685 | - | else $Tuple2([StringEntry(aj(), | |
1679 | + | else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success") | |
1686 | 1680 | ||
1687 | 1681 | ||
1688 | 1682 | ||
1689 | - | @Callable( | |
1690 | - | func setS ( | |
1691 | - | then | |
1692 | - | else [StringEntry( | |
1683 | + | @Callable(cP) | |
1684 | + | func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am()))) | |
1685 | + | then gn | |
1686 | + | else [StringEntry(id, hN)] | |
1693 | 1687 | ||
1694 | 1688 | ||
1695 | 1689 | ||
1696 | - | @Callable( | |
1697 | - | func setI ( | |
1698 | - | then | |
1699 | - | else [IntegerEntry( | |
1690 | + | @Callable(cP) | |
1691 | + | func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am()))) | |
1692 | + | then gn | |
1693 | + | else [IntegerEntry(id, hN)] | |
1700 | 1694 | ||
1701 | 1695 | ||
1702 | 1696 | ||
1703 | - | @Callable( | |
1704 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1697 | + | @Callable(cP) | |
1698 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY()) | |
1705 | 1699 | ||
1706 | 1700 | ||
1707 | 1701 | ||
1708 | - | @Callable( | |
1709 | - | func getAccBalanceWrapperREADONLY ( | |
1702 | + | @Callable(cP) | |
1703 | + | func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO)) | |
1710 | 1704 | ||
1711 | 1705 | ||
1712 | 1706 | ||
1713 | - | @Callable( | |
1714 | - | func calcPricesWrapperREADONLY ( | |
1715 | - | let | |
1716 | - | $Tuple2(nil, [toString( | |
1707 | + | @Callable(cP) | |
1708 | + | func calcPricesWrapperREADONLY (ch,ci,cm) = { | |
1709 | + | let ie = cl(ch, ci, cm) | |
1710 | + | $Tuple2(nil, [toString(ie[0]), toString(ie[1]), toString(ie[2])]) | |
1717 | 1711 | } | |
1718 | 1712 | ||
1719 | 1713 | ||
1720 | 1714 | ||
1721 | - | @Callable( | |
1722 | - | func fromX18WrapperREADONLY (M, | |
1715 | + | @Callable(cP) | |
1716 | + | func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if)) | |
1723 | 1717 | ||
1724 | 1718 | ||
1725 | 1719 | ||
1726 | - | @Callable( | |
1720 | + | @Callable(cP) | |
1727 | 1721 | func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J))) | |
1728 | 1722 | ||
1729 | 1723 | ||
1730 | 1724 | ||
1731 | - | @Callable( | |
1732 | - | func calcPriceBigIntWrapperREADONLY ( | |
1725 | + | @Callable(cP) | |
1726 | + | func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR)))) | |
1733 | 1727 | ||
1734 | 1728 | ||
1735 | 1729 | ||
1736 | - | @Callable( | |
1737 | - | func estimatePutOperationWrapperREADONLY ( | |
1730 | + | @Callable(cP) | |
1731 | + | func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,ig,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, ig, dH, dI, true, false, 0, "")) | |
1738 | 1732 | ||
1739 | 1733 | ||
1740 | 1734 | ||
1741 | - | @Callable( | |
1742 | - | func estimateGetOperationWrapperREADONLY (dg, | |
1743 | - | let | |
1744 | - | $Tuple2(nil, $Tuple10( | |
1735 | + | @Callable(cP) | |
1736 | + | func estimateGetOperationWrapperREADONLY (de,ih,dg,ig) = { | |
1737 | + | let dX = dd(de, ih, dg, addressFromStringValue(ig)) | |
1738 | + | $Tuple2(nil, $Tuple10(dX._1, dX._2, dX._3, dX._4, dX._5, dX._6, dX._7, toString(dX._8), dX._9, dX._10)) | |
1745 | 1739 | } | |
1746 | 1740 | ||
1747 | 1741 | ||
1748 | - | @Verifier( | |
1749 | - | func | |
1750 | - | let | |
1751 | - | let | |
1752 | - | if ($isInstanceOf( | |
1742 | + | @Verifier(ii) | |
1743 | + | func ij () = { | |
1744 | + | let ik = { | |
1745 | + | let gl = gk() | |
1746 | + | if ($isInstanceOf(gl, "ByteVector")) | |
1753 | 1747 | then { | |
1754 | - | let | |
1755 | - | | |
1748 | + | let gp = gl | |
1749 | + | gp | |
1756 | 1750 | } | |
1757 | - | else if ($isInstanceOf( | |
1758 | - | then | |
1751 | + | else if ($isInstanceOf(gl, "Unit")) | |
1752 | + | then ii.senderPublicKey | |
1759 | 1753 | else throw("Match error") | |
1760 | 1754 | } | |
1761 | - | let | |
1762 | - | if ($isInstanceOf( | |
1755 | + | let gl = ii | |
1756 | + | if ($isInstanceOf(gl, "Order")) | |
1763 | 1757 | then { | |
1764 | - | let fb = gn | |
1765 | - | let io = aY() | |
1766 | - | let ip = if (gy()) | |
1767 | - | then $Tuple2(true, "") | |
1768 | - | else fa(fb) | |
1769 | - | let aH = ip._1 | |
1770 | - | let aI = ip._2 | |
1771 | - | let aJ = sigVerify(fb.bodyBytes, fb.proofs[0], fb.senderPublicKey) | |
1772 | - | let aK = sigVerify(fb.bodyBytes, fb.proofs[1], io) | |
1773 | - | if (if (if (aH) | |
1774 | - | then aJ | |
1758 | + | let eZ = gl | |
1759 | + | let il = aW() | |
1760 | + | let im = eY(eZ) | |
1761 | + | let aF = im._1 | |
1762 | + | let aG = im._2 | |
1763 | + | let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey) | |
1764 | + | let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], il) | |
1765 | + | if (if (if (aF) | |
1766 | + | then aH | |
1775 | 1767 | else false) | |
1776 | - | then | |
1768 | + | then aI | |
1777 | 1769 | else false) | |
1778 | 1770 | then true | |
1779 | - | else aG | |
1771 | + | else aE(aF, aG, aH, aI) | |
1780 | 1772 | } | |
1781 | - | else if ($isInstanceOf( | |
1773 | + | else if ($isInstanceOf(gl, "SetScriptTransaction")) | |
1782 | 1774 | then { | |
1783 | - | let | |
1784 | - | if (sigVerify( | |
1775 | + | let cC = gl | |
1776 | + | if (sigVerify(ii.bodyBytes, ii.proofs[0], ik)) | |
1785 | 1777 | then true | |
1786 | 1778 | else { | |
1787 | - | let | |
1788 | - | let | |
1789 | - | let | |
1790 | - | if (( | |
1791 | - | then ( | |
1779 | + | let in = blake2b256(value(cC.script)) | |
1780 | + | let io = fromBase64String(value(getString(aQ, aC()))) | |
1781 | + | let ip = scriptHash(this) | |
1782 | + | if ((io == in)) | |
1783 | + | then (ip != in) | |
1792 | 1784 | else false | |
1793 | 1785 | } | |
1794 | 1786 | } | |
1795 | - | else sigVerify( | |
1787 | + | else sigVerify(ii.bodyBytes, ii.proofs[0], ik) | |
1796 | 1788 | } | |
1797 | 1789 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 100000000 | |
5 | 5 | ||
6 | 6 | let b = toBigInt(100000000) | |
7 | 7 | ||
8 | 8 | let c = toBigInt(1000000000000000000) | |
9 | 9 | ||
10 | 10 | let d = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = toBigInt(1) | |
15 | 15 | ||
16 | 16 | let g = toBigInt(2) | |
17 | 17 | ||
18 | 18 | let h = toBigInt(3) | |
19 | 19 | ||
20 | 20 | let i = toBigInt(4) | |
21 | 21 | ||
22 | 22 | let j = toBigInt((a - ((a * 1) / a))) | |
23 | 23 | ||
24 | 24 | let k = "WAVES" | |
25 | 25 | ||
26 | 26 | let l = "100" | |
27 | 27 | ||
28 | 28 | let m = "1" | |
29 | 29 | ||
30 | 30 | let n = "__" | |
31 | 31 | ||
32 | 32 | let o = "" | |
33 | 33 | ||
34 | 34 | let p = 1 | |
35 | 35 | ||
36 | 36 | let q = 2 | |
37 | 37 | ||
38 | 38 | let r = 3 | |
39 | 39 | ||
40 | 40 | let s = 4 | |
41 | 41 | ||
42 | 42 | let t = 1 | |
43 | 43 | ||
44 | 44 | let u = 2 | |
45 | 45 | ||
46 | 46 | let v = 3 | |
47 | 47 | ||
48 | 48 | let w = 4 | |
49 | 49 | ||
50 | 50 | let x = 5 | |
51 | 51 | ||
52 | 52 | let y = 6 | |
53 | 53 | ||
54 | 54 | let z = 7 | |
55 | 55 | ||
56 | 56 | let A = 8 | |
57 | 57 | ||
58 | 58 | let B = 9 | |
59 | 59 | ||
60 | 60 | let C = 1 | |
61 | 61 | ||
62 | 62 | let D = 6 | |
63 | 63 | ||
64 | 64 | let E = 7 | |
65 | 65 | ||
66 | 66 | let F = 10 | |
67 | 67 | ||
68 | 68 | let G = fraction(10, a, 10000) | |
69 | 69 | ||
70 | 70 | func H (I,J) = fraction(toBigInt(I), c, toBigInt(J)) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func K (I,J) = fraction(I, c, J) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func L (M,N) = toInt(fraction(M, toBigInt(N), c)) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P)) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func Q (I,J) = fraction(I, c, toBigInt(J)) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func R (M,N) = fraction(M, toBigInt(N), c) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func S (T,U,V) = fraction(T, U, V) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func W (M) = if ((d > M)) | |
92 | 92 | then -(M) | |
93 | 93 | else M | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func X (M) = if ((d > M)) | |
97 | 97 | then -(M) | |
98 | 98 | else M | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func Y () = "%s__factoryContract" | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func Z () = "%s__managerPublicKey" | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func aa () = "%s__pendingManagerPublicKey" | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func ab () = "%s%s__price__last" | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func aj () = "%s__amountAsset" | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func ak () = "%s__priceAsset" | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func al () = "%s__amp" | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func am () = "%s__addonAddr" | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | let an = "%s__fee" | |
135 | 135 | ||
136 | 136 | let ao = valueOrElse(getInteger(this, an), G) | |
137 | 137 | ||
138 | 138 | let ap = makeString(["%s", "dLp"], n) | |
139 | 139 | ||
140 | 140 | let aq = makeString(["%s", "dLpRefreshedHeight"], n) | |
141 | 141 | ||
142 | 142 | let ar = makeString(["%s", "refreshDLpDelay"], n) | |
143 | 143 | ||
144 | 144 | let as = 30 | |
145 | 145 | ||
146 | 146 | let at = valueOrElse(getInteger(this, ar), as) | |
147 | 147 | ||
148 | 148 | func au () = "%s__factoryConfig" | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func av () = "%s%s__matcher__publicKey" | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func aw (ax,ay) = (((("%d%d%s__" + ax) + "__") + ay) + "__config") | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func az (aA) = ("%s%s%s__mappings__baseAsset2internalId__" + aA) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func aB () = "%s__shutdown" | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func aC () = "%s__allowedLpStableScriptHash" | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func aD () = "%s__feeCollectorAddress" | |
167 | 167 | ||
168 | 168 | ||
169 | - | func aE (aF) = (" | |
169 | + | func aE (aF,aG,aH,aI) = throw((((((((("order validation failed: orderValid=" + toString(aF)) + " (") + aG) + ")") + " senderValid=") + toString(aH)) + " matcherValid=") + toString(aI))) | |
170 | 170 | ||
171 | 171 | ||
172 | - | func | |
172 | + | func aJ (aK,aL) = valueOrErrorMessage(getString(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], "")) | |
173 | 173 | ||
174 | 174 | ||
175 | - | func | |
175 | + | func aM (aK,aL) = valueOrErrorMessage(getInteger(aK, aL), makeString(["mandatory ", toString(aK), ".", aL, " not defined"], "")) | |
176 | 176 | ||
177 | 177 | ||
178 | - | func | |
178 | + | func aN (aO) = throw(makeString(["lp_stable.ride:", aO], " ")) | |
179 | 179 | ||
180 | 180 | ||
181 | - | func aP ( | |
181 | + | func aP (aO) = makeString(["lp_stable.ride:", aO], " ") | |
182 | 182 | ||
183 | 183 | ||
184 | - | func aR (aQ) = makeString(["lp_stable.ride:", aQ], " ") | |
184 | + | let aQ = addressFromStringValue(aJ(this, Y())) | |
185 | + | ||
186 | + | let aR = { | |
187 | + | let aS = invoke(aQ, "getInFeeREADONLY", [toString(this)], nil) | |
188 | + | if ($isInstanceOf(aS, "Int")) | |
189 | + | then aS | |
190 | + | else throw(($getType(aS) + " couldn't be cast to Int")) | |
191 | + | } | |
192 | + | ||
193 | + | let aT = { | |
194 | + | let aS = invoke(aQ, "getOutFeeREADONLY", [toString(this)], nil) | |
195 | + | if ($isInstanceOf(aS, "Int")) | |
196 | + | then aS | |
197 | + | else throw(($getType(aS) + " couldn't be cast to Int")) | |
198 | + | } | |
199 | + | ||
200 | + | let aU = aJ(this, al()) | |
201 | + | ||
202 | + | func aV () = valueOrElse(getBoolean(aQ, aB()), false) | |
185 | 203 | ||
186 | 204 | ||
187 | - | let aS = addressFromStringValue(aL(this, Y())) | |
188 | - | ||
189 | - | let aT = { | |
190 | - | let aU = invoke(aS, "getInFeeREADONLY", [toString(this)], nil) | |
191 | - | if ($isInstanceOf(aU, "Int")) | |
192 | - | then aU | |
193 | - | else throw(($getType(aU) + " couldn't be cast to Int")) | |
194 | - | } | |
195 | - | ||
196 | - | let aV = { | |
197 | - | let aU = invoke(aS, "getOutFeeREADONLY", [toString(this)], nil) | |
198 | - | if ($isInstanceOf(aU, "Int")) | |
199 | - | then aU | |
200 | - | else throw(($getType(aU) + " couldn't be cast to Int")) | |
201 | - | } | |
202 | - | ||
203 | - | let aW = aL(this, al()) | |
204 | - | ||
205 | - | func aX () = valueOrElse(getBoolean(aS, aB()), false) | |
205 | + | func aW () = fromBase58String(aJ(aQ, av())) | |
206 | 206 | ||
207 | 207 | ||
208 | - | ||
208 | + | let aX = addressFromStringValue(aJ(aQ, aD())) | |
209 | 209 | ||
210 | - | ||
211 | - | let aZ = addressFromStringValue(aL(aS, aD())) | |
212 | - | ||
213 | - | func ba () = { | |
214 | - | let bb = aL(this, aj()) | |
215 | - | let bc = aL(this, ak()) | |
216 | - | let bd = aO(aS, az(bc)) | |
217 | - | let ax = aO(aS, az(bb)) | |
218 | - | split(aL(aS, aw(toString(ax), toString(bd))), n) | |
210 | + | func aY () = { | |
211 | + | let aZ = aJ(this, aj()) | |
212 | + | let ba = aJ(this, ak()) | |
213 | + | let bb = aM(aQ, az(ba)) | |
214 | + | let ax = aM(aQ, az(aZ)) | |
215 | + | split(aJ(aQ, aw(toString(ax), toString(bb))), n) | |
219 | 216 | } | |
220 | 217 | ||
221 | 218 | ||
222 | - | func | |
219 | + | func bc (bd) = if ((bd == k)) | |
223 | 220 | then unit | |
224 | - | else fromBase58String( | |
221 | + | else fromBase58String(bd) | |
225 | 222 | ||
226 | 223 | ||
227 | - | func | |
224 | + | func be (bd) = if ((bd == unit)) | |
228 | 225 | then k | |
229 | - | else toBase58String(value( | |
226 | + | else toBase58String(value(bd)) | |
230 | 227 | ||
231 | 228 | ||
232 | - | func | |
229 | + | func bf (bg) = $Tuple9(addressFromStringValue(bg[t]), parseIntValue(bg[u]), fromBase58String(bg[v]), bc(bg[w]), bc(bg[x]), parseIntValue(bg[y]), parseIntValue(bg[z]), fromBase58String(bg[A]), fromBase58String(bg[B])) | |
233 | 230 | ||
234 | 231 | ||
235 | - | let | |
232 | + | let bh = bf(aY()) | |
236 | 233 | ||
237 | - | let | |
234 | + | let bi = bh | |
238 | 235 | ||
239 | - | let | |
236 | + | let bj = bi._1 | |
240 | 237 | ||
241 | - | let | |
238 | + | let bk = bi._2 | |
242 | 239 | ||
243 | - | let | |
240 | + | let bl = bi._3 | |
244 | 241 | ||
245 | - | let | |
242 | + | let bm = bi._4 | |
246 | 243 | ||
247 | - | let | |
244 | + | let bn = bi._5 | |
248 | 245 | ||
249 | - | let | |
246 | + | let bo = bi._6 | |
250 | 247 | ||
251 | - | let | |
248 | + | let bp = bi._7 | |
252 | 249 | ||
253 | - | let | |
250 | + | let bq = bi._8 | |
254 | 251 | ||
255 | - | let | |
252 | + | let br = bi._9 | |
256 | 253 | ||
257 | - | func | |
254 | + | func bs () = split(aJ(aQ, au()), n) | |
258 | 255 | ||
259 | 256 | ||
260 | - | let | |
257 | + | let bt = bs() | |
261 | 258 | ||
262 | - | let | |
259 | + | let bu = valueOrErrorMessage(addressFromString(bt[C]), "Invalid staking contract address") | |
263 | 260 | ||
264 | - | let | |
261 | + | let bv = valueOrErrorMessage(addressFromString(bt[E]), "Invalid slipage contract address") | |
265 | 262 | ||
266 | - | let | |
263 | + | let bw = valueOrErrorMessage(addressFromString(bt[F]), "Invalid gwx contract address") | |
267 | 264 | ||
268 | - | let | |
265 | + | let bx = valueOrErrorMessage(addressFromString(bt[D]), "Invalid gwx contract address") | |
269 | 266 | ||
270 | - | func | |
267 | + | func by (bz,bA,bB,bC,bD,bE,bF,bG,bH,bI) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI)], n) | |
271 | 268 | ||
272 | 269 | ||
273 | - | func | |
270 | + | func bJ (bK,bL,bM,bC,bF,bG) = makeString(["%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bC), toString(bF), toString(bG)], n) | |
274 | 271 | ||
275 | 272 | ||
276 | - | func | |
273 | + | func bN (bO) = if ((bO == "WAVES")) | |
277 | 274 | then wavesBalance(this).available | |
278 | - | else assetBalance(this, fromBase58String( | |
275 | + | else assetBalance(this, fromBase58String(bO)) | |
279 | 276 | ||
280 | 277 | ||
281 | - | func | |
278 | + | func bP (bQ,bR) = fraction(bQ, c, bR) | |
282 | 279 | ||
283 | 280 | ||
284 | - | func | |
281 | + | func bS (bQ,bR,P) = fraction(bQ, c, bR, P) | |
285 | 282 | ||
286 | 283 | ||
287 | - | func | |
288 | - | let | |
289 | - | let | |
290 | - | if (!( | |
291 | - | then throw(("Big slpg: " + toString( | |
292 | - | else $Tuple2( | |
284 | + | func bT (bU,bV,bW) = { | |
285 | + | let bX = fraction((bU - bV), b, bV) | |
286 | + | let bY = ((bW - W(bX)) > d) | |
287 | + | if (!(bY)) | |
288 | + | then throw(("Big slpg: " + toString(bX))) | |
289 | + | else $Tuple2(bY, min([bU, bV])) | |
293 | 290 | } | |
294 | 291 | ||
295 | 292 | ||
296 | - | func | |
297 | - | let | |
298 | - | let | |
299 | - | if (if ( | |
293 | + | func bZ (ca,cb,cc) = { | |
294 | + | let bX = fraction(cb, b, ca) | |
295 | + | let cd = (cc > bX) | |
296 | + | if (if (cd) | |
300 | 297 | then true | |
301 | - | else ( | |
302 | - | then throw(((((((toString( | |
303 | - | else | |
298 | + | else (cb > ca)) | |
299 | + | then throw(((((((toString(cb) + " ") + toString(ca)) + " ") + toString(bX)) + " ") + toString(cc))) | |
300 | + | else cd | |
304 | 301 | } | |
305 | 302 | ||
306 | 303 | ||
307 | - | func | |
308 | - | let | |
309 | - | let | |
310 | - | | |
304 | + | func ce (cf,cg,ch,ci) = { | |
305 | + | let cj = H(ch, cf) | |
306 | + | let ck = H(ci, cg) | |
307 | + | bP(ck, cj) | |
311 | 308 | } | |
312 | 309 | ||
313 | 310 | ||
314 | - | func | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | [cr, | |
311 | + | func cl (ch,ci,cm) = { | |
312 | + | let cn = bo | |
313 | + | let co = bp | |
314 | + | let cp = ce(cn, co, ch, ci) | |
315 | + | let bR = H(ch, cn) | |
316 | + | let bQ = H(ci, co) | |
317 | + | let cq = H(cm, a) | |
318 | + | let cr = bP(bR, cq) | |
319 | + | let cs = bP(bQ, cq) | |
320 | + | [cp, cr, cs] | |
324 | 321 | } | |
325 | 322 | ||
326 | 323 | ||
327 | - | func | |
328 | - | let | |
329 | - | [L( | |
324 | + | func ct (ch,ci,cm) = { | |
325 | + | let cu = cl(ch, ci, cm) | |
326 | + | [L(cu[0], a), L(cu[1], a), L(cu[2], a)] | |
330 | 327 | } | |
331 | 328 | ||
332 | 329 | ||
333 | - | func | |
334 | - | let | |
330 | + | func cv (cw,ao) = { | |
331 | + | let cx = if ((ao == 0)) | |
335 | 332 | then 0 | |
336 | - | else fraction( | |
337 | - | $Tuple2(( | |
333 | + | else fraction(cw, ao, a) | |
334 | + | $Tuple2((cw - cx), cx) | |
338 | 335 | } | |
339 | 336 | ||
340 | 337 | ||
341 | - | func | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | if (( | |
338 | + | func cy (cz) = { | |
339 | + | let cA = cz[0] | |
340 | + | let cB = cz[1] | |
341 | + | let cC = (cA + cB) | |
342 | + | if ((cC == e)) | |
346 | 343 | then e | |
347 | 344 | else { | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | func | |
355 | - | let | |
356 | - | let | |
357 | - | let | |
358 | - | fraction(( | |
345 | + | let cD = parseIntValue(aU) | |
346 | + | let cE = (cD * 2) | |
347 | + | let cu = fraction(cA, cB, f) | |
348 | + | let cF = fraction(cu, i, f) | |
349 | + | let cG = fraction(toBigInt(cE), cC, f) | |
350 | + | let cH = toBigInt((cE - 1)) | |
351 | + | func cI (cJ) = { | |
352 | + | let cK = fraction(cJ, cJ, f) | |
353 | + | let cL = fraction(cK, cJ, f) | |
354 | + | let cM = fraction(cL, f, cF) | |
355 | + | fraction((cG + fraction(cM, g, f)), cJ, (fraction(cH, cJ, f) + fraction(h, cM, f))) | |
359 | 356 | } | |
360 | 357 | ||
361 | - | func | |
362 | - | then | |
358 | + | func cN (cO,cP) = if (cO._2) | |
359 | + | then cO | |
363 | 360 | else { | |
364 | - | let | |
365 | - | let | |
366 | - | let | |
367 | - | let | |
368 | - | then -( | |
369 | - | else | |
370 | - | if ((f >= | |
371 | - | then $Tuple2( | |
372 | - | else $Tuple2( | |
361 | + | let cJ = cO._1 | |
362 | + | let cQ = cI(cJ) | |
363 | + | let cR = (cQ - value(cJ)) | |
364 | + | let cS = if ((e > cR)) | |
365 | + | then -(cR) | |
366 | + | else cR | |
367 | + | if ((f >= cS)) | |
368 | + | then $Tuple2(cQ, true) | |
369 | + | else $Tuple2(cQ, false) | |
373 | 370 | } | |
374 | 371 | ||
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | func | |
381 | - | then | |
382 | - | else | |
372 | + | let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] | |
373 | + | let cU = { | |
374 | + | let cV = cT | |
375 | + | let cW = size(cV) | |
376 | + | let cX = $Tuple2(cC, false) | |
377 | + | func cY (cZ,da) = if ((da >= cW)) | |
378 | + | then cZ | |
379 | + | else cN(cZ, cV[da]) | |
383 | 380 | ||
384 | - | func | |
385 | - | then | |
386 | - | else throw("List size exceeds | |
381 | + | func db (cZ,da) = if ((da >= cW)) | |
382 | + | then cZ | |
383 | + | else throw("List size exceeds 18") | |
387 | 384 | ||
388 | - | | |
385 | + | db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18) | |
389 | 386 | } | |
390 | - | let | |
391 | - | let | |
392 | - | if ( | |
393 | - | then | |
394 | - | else throw(("D calculation error, D = " + toString( | |
387 | + | let cJ = cU._1 | |
388 | + | let dc = cU._2 | |
389 | + | if (dc) | |
390 | + | then cJ | |
391 | + | else throw(("D calculation error, D = " + toString(cJ))) | |
395 | 392 | } | |
396 | 393 | } | |
397 | 394 | ||
398 | 395 | ||
399 | - | func | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | let | |
407 | - | if ((toBase58String( | |
396 | + | func dd (de,df,dg,dh) = { | |
397 | + | let di = bl | |
398 | + | let dj = toBase58String(value(bm)) | |
399 | + | let dk = toBase58String(value(bn)) | |
400 | + | let dl = bo | |
401 | + | let dm = bp | |
402 | + | let dn = toString(bk) | |
403 | + | let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity | |
404 | + | if ((toBase58String(di) != df)) | |
408 | 405 | then throw("Wrong pmt asset") | |
409 | 406 | else { | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
407 | + | let dp = bN(dj) | |
408 | + | let dq = H(dp, dl) | |
409 | + | let dr = bN(dk) | |
410 | + | let ds = H(dr, dm) | |
411 | + | let dt = bP(ds, dq) | |
412 | + | let du = L(dt, a) | |
413 | + | let dv = H(dg, a) | |
414 | + | let dw = H(do, a) | |
415 | + | let dx = fraction(dq, dv, dw) | |
416 | + | let dy = fraction(ds, dv, dw) | |
417 | + | let dz = O(dx, dl, FLOOR) | |
418 | + | let dA = O(dy, dm, FLOOR) | |
419 | + | let dB = if ((de == "")) | |
423 | 420 | then nil | |
424 | - | else [ScriptTransfer( | |
421 | + | else [ScriptTransfer(dh, dz, if ((dj == "WAVES")) | |
425 | 422 | then unit | |
426 | - | else fromBase58String( | |
423 | + | else fromBase58String(dj)), ScriptTransfer(dh, dA, if ((dk == "WAVES")) | |
427 | 424 | then unit | |
428 | - | else fromBase58String( | |
429 | - | $Tuple10( | |
425 | + | else fromBase58String(dk)), StringEntry(ai(toString(dh), de), bJ(dz, dA, dg, du, height, lastBlock.timestamp)), IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du)] | |
426 | + | $Tuple10(dz, dA, dj, dk, dp, dr, do, dt, dn, dB) | |
430 | 427 | } | |
431 | 428 | } | |
432 | 429 | ||
433 | 430 | ||
434 | - | func | |
435 | - | let | |
436 | - | let | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | let | |
441 | - | let | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | then | |
446 | - | else if (if ( | |
447 | - | then ( | |
431 | + | func dC (de,bW,dD,dE,dF,dG,dh,dH,dI,dJ,dK,dL,dM) = { | |
432 | + | let di = bl | |
433 | + | let dN = toBase58String(value(bm)) | |
434 | + | let dO = toBase58String(value(bn)) | |
435 | + | let dP = bq | |
436 | + | let dQ = br | |
437 | + | let dR = bo | |
438 | + | let dS = bp | |
439 | + | let dn = toString(bk) | |
440 | + | let dT = valueOrErrorMessage(assetInfo(di), "Wr lp as").quantity | |
441 | + | let dp = if (dH) | |
442 | + | then bN(dN) | |
443 | + | else if (if (dJ) | |
444 | + | then (dM == dN) | |
448 | 445 | else false) | |
449 | - | then ( | |
450 | - | else if ( | |
451 | - | then | |
452 | - | else ( | |
453 | - | let | |
454 | - | then | |
455 | - | else if (if ( | |
456 | - | then ( | |
446 | + | then (bN(dN) - dL) | |
447 | + | else if (dJ) | |
448 | + | then bN(dN) | |
449 | + | else (bN(dN) - dD) | |
450 | + | let dr = if (dH) | |
451 | + | then bN(dO) | |
452 | + | else if (if (dJ) | |
453 | + | then (dM == dO) | |
457 | 454 | else false) | |
458 | - | then ( | |
459 | - | else if ( | |
460 | - | then | |
461 | - | else ( | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
455 | + | then (bN(dO) - dL) | |
456 | + | else if (dJ) | |
457 | + | then bN(dO) | |
458 | + | else (bN(dO) - dF) | |
459 | + | let dU = H(dD, dR) | |
460 | + | let dV = H(dF, dS) | |
461 | + | let dW = bP(dV, dU) | |
462 | + | let dq = H(dp, dR) | |
463 | + | let ds = H(dr, dS) | |
464 | + | let cb = cy([dq, ds]) | |
465 | + | let dX = if ((dT == 0)) | |
469 | 466 | then { | |
470 | - | let | |
471 | - | let | |
467 | + | let ca = cy([(dq + dU), (ds + dV)]) | |
468 | + | let dY = if ((ca > cb)) | |
472 | 469 | then true | |
473 | 470 | else throw("D1 should be greater than D0") | |
474 | - | if (( | |
471 | + | if ((dY == dY)) | |
475 | 472 | then { | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | $Tuple5(L( | |
473 | + | let dt = d | |
474 | + | let dZ = d | |
475 | + | let cq = ca | |
476 | + | $Tuple5(L(cq, a), L(dU, dR), L(dV, dS), bP((ds + dV), (dq + dU)), dZ) | |
480 | 477 | } | |
481 | 478 | else throw("Strict value is not equal to itself.") | |
482 | 479 | } | |
483 | 480 | else { | |
484 | - | let | |
485 | - | let | |
486 | - | let | |
487 | - | if (if (if ( | |
488 | - | then ( | |
481 | + | let dt = bP(ds, dq) | |
482 | + | let ea = fraction(W((dt - dW)), c, dt) | |
483 | + | let dZ = H(bW, a) | |
484 | + | if (if (if (dK) | |
485 | + | then (dt != d) | |
489 | 486 | else false) | |
490 | - | then ( | |
487 | + | then (ea > dZ) | |
491 | 488 | else false) | |
492 | - | then throw(((("Price slippage " + toString( | |
489 | + | then throw(((("Price slippage " + toString(ea)) + " > ") + toString(dZ))) | |
493 | 490 | else { | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | then $Tuple2( | |
499 | - | else $Tuple2( | |
500 | - | let | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
491 | + | let eb = H(dT, a) | |
492 | + | let ec = fraction(dU, bS(ds, dq, CEILING), c, CEILING) | |
493 | + | let ed = fraction(dV, c, bS(ds, dq, FLOOR), CEILING) | |
494 | + | let ee = if ((ec > dV)) | |
495 | + | then $Tuple2(ed, dV) | |
496 | + | else $Tuple2(dU, ec) | |
497 | + | let ef = ee._1 | |
498 | + | let eg = ee._2 | |
499 | + | let ca = cy([(dq + ef), (ds + eg)]) | |
500 | + | let dY = if ((ca > cb)) | |
504 | 501 | then true | |
505 | 502 | else throw("D1 should be greater than D0") | |
506 | - | if (( | |
503 | + | if ((dY == dY)) | |
507 | 504 | then { | |
508 | - | let | |
509 | - | $Tuple5(O( | |
505 | + | let cq = fraction(eb, (ca - cb), cb) | |
506 | + | $Tuple5(O(cq, a, FLOOR), O(ef, dR, CEILING), O(eg, dS, CEILING), dt, dZ) | |
510 | 507 | } | |
511 | 508 | else throw("Strict value is not equal to itself.") | |
512 | 509 | } | |
513 | 510 | } | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | if ((0 >= | |
511 | + | let eh = dX._1 | |
512 | + | let ei = dX._2 | |
513 | + | let ej = dX._3 | |
514 | + | let du = L(dX._4, a) | |
515 | + | let ek = L(dX._5, a) | |
516 | + | if ((0 >= eh)) | |
520 | 517 | then throw("LP <= 0") | |
521 | 518 | else { | |
522 | - | let | |
519 | + | let el = if (!(dI)) | |
523 | 520 | then 0 | |
524 | - | else | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | then ( | |
521 | + | else eh | |
522 | + | let em = (dD - ei) | |
523 | + | let en = (dF - ej) | |
524 | + | let eo = if (if (dJ) | |
525 | + | then (dM == dN) | |
529 | 526 | else false) | |
530 | - | then $Tuple2( | |
531 | - | else if (if ( | |
532 | - | then ( | |
527 | + | then $Tuple2(dL, 0) | |
528 | + | else if (if (dJ) | |
529 | + | then (dM == dO) | |
533 | 530 | else false) | |
534 | - | then $Tuple2(0, | |
535 | - | else $Tuple2( | |
536 | - | let | |
537 | - | let | |
538 | - | let | |
539 | - | $Tuple13( | |
531 | + | then $Tuple2(0, dL) | |
532 | + | else $Tuple2(ei, ej) | |
533 | + | let ep = eo._1 | |
534 | + | let eq = eo._2 | |
535 | + | let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, de), by(ep, eq, el, du, bW, ek, height, lastBlock.timestamp, em, en))] | |
536 | + | $Tuple13(eh, el, du, dp, dr, dT, di, dn, er, em, en, dE, dG) | |
540 | 537 | } | |
541 | 538 | } | |
542 | 539 | ||
543 | 540 | ||
544 | - | func | |
545 | - | let | |
546 | - | let | |
541 | + | func es (cz,cP,et) = { | |
542 | + | let eu = g | |
543 | + | let ev = cz[if ((cP == 0)) | |
547 | 544 | then 1 | |
548 | 545 | else 0] | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | func | |
556 | - | let | |
557 | - | let | |
558 | - | let | |
559 | - | if (( | |
560 | - | then | |
546 | + | let ew = parseBigIntValue(l) | |
547 | + | let cD = (parseBigIntValue(aU) * ew) | |
548 | + | let cC = ev | |
549 | + | let cE = (cD * eu) | |
550 | + | let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu)) | |
551 | + | let ey = ((cC + ((et * ew) / cE)) - et) | |
552 | + | func cN (cO,ez) = { | |
553 | + | let eA = cO | |
554 | + | let eB = eA._1 | |
555 | + | let dc = eA._2 | |
556 | + | if ((dc != unit)) | |
557 | + | then cO | |
561 | 558 | else { | |
562 | - | let | |
563 | - | let | |
564 | - | if ((f >= | |
565 | - | then $Tuple2( | |
566 | - | else $Tuple2( | |
559 | + | let eC = (((eB * eB) + ex) / ((g * eB) + ey)) | |
560 | + | let eD = X((eC - value(eB))) | |
561 | + | if ((f >= eD)) | |
562 | + | then $Tuple2(eC, ez) | |
563 | + | else $Tuple2(eC, unit) | |
567 | 564 | } | |
568 | 565 | } | |
569 | 566 | ||
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | func | |
576 | - | then | |
577 | - | else | |
567 | + | let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
568 | + | let eE = { | |
569 | + | let cV = cT | |
570 | + | let cW = size(cV) | |
571 | + | let cX = $Tuple2(et, unit) | |
572 | + | func cY (cZ,da) = if ((da >= cW)) | |
573 | + | then cZ | |
574 | + | else cN(cZ, cV[da]) | |
578 | 575 | ||
579 | - | func | |
580 | - | then | |
576 | + | func db (cZ,da) = if ((da >= cW)) | |
577 | + | then cZ | |
581 | 578 | else throw("List size exceeds 15") | |
582 | 579 | ||
583 | - | | |
580 | + | db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
584 | 581 | } | |
585 | - | let | |
586 | - | let | |
587 | - | if (( | |
588 | - | then | |
589 | - | else throw(("Y calculation error, Y = " + toString( | |
582 | + | let eB = eE._1 | |
583 | + | let dc = eE._2 | |
584 | + | if ((dc != unit)) | |
585 | + | then eB | |
586 | + | else throw(("Y calculation error, Y = " + toString(eB))) | |
590 | 587 | } | |
591 | 588 | ||
592 | 589 | ||
593 | - | func | |
594 | - | let | |
595 | - | if (( | |
590 | + | func eF (eG,eH,eI) = { | |
591 | + | let eJ = fraction(cy([K(eG, toBigInt(bo)), K(eH, toBigInt(bp))]), c, eI) | |
592 | + | if ((eI == e)) | |
596 | 593 | then e | |
597 | - | else | |
594 | + | else eJ | |
598 | 595 | } | |
599 | 596 | ||
600 | 597 | ||
601 | - | func | |
602 | - | let | |
603 | - | let | |
604 | - | let | |
605 | - | let | |
606 | - | | |
598 | + | func eK (eL,eM,eN) = { | |
599 | + | let eO = (toBigInt(bN(be(bm))) - eL) | |
600 | + | let eP = (toBigInt(bN(be(bn))) - eM) | |
601 | + | let eQ = (toBigInt(value(assetInfo(bl)).quantity) - eN) | |
602 | + | let eR = eF(eO, eP, eQ) | |
603 | + | eR | |
607 | 604 | } | |
608 | 605 | ||
609 | 606 | ||
610 | - | func | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | let | |
615 | - | let | |
616 | - | $Tuple2( | |
607 | + | func eS (eT,eU,eN) = { | |
608 | + | let eO = (bN(be(bm)) + eT) | |
609 | + | let eP = (bN(be(bn)) + eU) | |
610 | + | let eQ = (value(assetInfo(bl)).quantity + eN) | |
611 | + | let eJ = eF(toBigInt(eO), toBigInt(eP), toBigInt(eQ)) | |
612 | + | let eV = [IntegerEntry(aq, height), StringEntry(ap, toString(eJ))] | |
613 | + | $Tuple2(eV, eJ) | |
617 | 614 | } | |
618 | 615 | ||
619 | 616 | ||
620 | - | func | |
617 | + | func eW (eX,eJ) = if ((eJ >= eX)) | |
621 | 618 | then true | |
622 | - | else | |
619 | + | else aN("updated DLp lower than current DLp") | |
623 | 620 | ||
624 | 621 | ||
625 | - | func | |
626 | - | let | |
627 | - | let | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | then $Tuple2( | |
632 | - | else $Tuple2(-( | |
633 | - | let | |
634 | - | let | |
635 | - | if (if (if ( | |
622 | + | func eY (eZ) = { | |
623 | + | let eO = bN(be(bm)) | |
624 | + | let eP = bN(be(bn)) | |
625 | + | let fa = eZ.amount | |
626 | + | let fb = fraction(eZ.amount, eZ.price, a, FLOOR) | |
627 | + | let fc = if ((eZ.orderType == Buy)) | |
628 | + | then $Tuple2(fa, -(fb)) | |
629 | + | else $Tuple2(-(fa), fb) | |
630 | + | let eT = fc._1 | |
631 | + | let eU = fc._2 | |
632 | + | if (if (if (aV()) | |
636 | 633 | then true | |
637 | - | else ( | |
634 | + | else (bk == r)) | |
638 | 635 | then true | |
639 | - | else ( | |
636 | + | else (bk == s)) | |
640 | 637 | then throw("Admin blocked") | |
641 | - | else if (if (( | |
638 | + | else if (if ((eZ.assetPair.amountAsset != bm)) | |
642 | 639 | then true | |
643 | - | else ( | |
640 | + | else (eZ.assetPair.priceAsset != bn)) | |
644 | 641 | then throw("Wr assets") | |
645 | 642 | else { | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | $Tuple2( | |
643 | + | let fd = parseBigIntValue(valueOrElse(getString(this, ap), "0")) | |
644 | + | let fe = eS(eT, eU, 0) | |
645 | + | let ff = fe._1 | |
646 | + | let fg = fe._2 | |
647 | + | let fh = (fg >= fd) | |
648 | + | let fi = makeString(["dLp=", toString(fd), " dLpNew=", toString(fg), " amountAssetBalance=", toString(eO), " priceAssetBalance=", toString(eP), " amountAssetBalanceDelta=", toString(eT), " priceAssetBalanceDelta=", toString(eU), " height=", toString(height)], "") | |
649 | + | $Tuple2(fh, fi) | |
653 | 650 | } | |
654 | 651 | } | |
655 | 652 | ||
656 | 653 | ||
657 | - | func | |
654 | + | func fj (cP) = if ((size(cP.payments) != 1)) | |
658 | 655 | then throw("1 pmnt exp") | |
659 | 656 | else { | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | let | |
668 | - | if (if ( | |
657 | + | let fk = value(cP.payments[0]) | |
658 | + | let df = value(fk.assetId) | |
659 | + | let dL = fk.amount | |
660 | + | let dX = dd(toBase58String(cP.transactionId), toBase58String(df), dL, cP.caller) | |
661 | + | let dz = dX._1 | |
662 | + | let dA = dX._2 | |
663 | + | let dn = parseIntValue(dX._9) | |
664 | + | let dB = dX._10 | |
665 | + | if (if (aV()) | |
669 | 666 | then true | |
670 | - | else ( | |
671 | - | then throw(("Admin blocked: " + toString( | |
672 | - | else $Tuple5( | |
667 | + | else (dn == s)) | |
668 | + | then throw(("Admin blocked: " + toString(dn))) | |
669 | + | else $Tuple5(dz, dA, dL, df, dB) | |
673 | 670 | } | |
674 | 671 | ||
675 | 672 | ||
676 | - | func | |
677 | - | let | |
678 | - | let | |
679 | - | if (if (if ( | |
673 | + | func fl (fm,ah,fn,fo,bW,dI,dJ,dK,dL,dM) = { | |
674 | + | let dX = dC(ah, bW, value(fn).amount, value(fn).assetId, value(fo).amount, value(fo).assetId, fm, (ah == ""), dI, dJ, dK, dL, dM) | |
675 | + | let dn = parseIntValue(dX._8) | |
676 | + | if (if (if (aV()) | |
680 | 677 | then true | |
681 | - | else ( | |
678 | + | else (dn == q)) | |
682 | 679 | then true | |
683 | - | else ( | |
684 | - | then throw(("Blocked:" + toString( | |
685 | - | else | |
680 | + | else (dn == s)) | |
681 | + | then throw(("Blocked:" + toString(dn))) | |
682 | + | else dX | |
686 | 683 | } | |
687 | 684 | ||
688 | 685 | ||
689 | - | func | |
690 | - | let | |
691 | - | let | |
692 | - | let | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
686 | + | func fp (fq,df,dh,ah,fr) = { | |
687 | + | let dj = toBase58String(value(bm)) | |
688 | + | let dk = toBase58String(value(bn)) | |
689 | + | let di = bl | |
690 | + | let dR = bo | |
691 | + | let dS = bp | |
692 | + | let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity) | |
693 | + | let fs = if ((eQ > e)) | |
697 | 694 | then true | |
698 | 695 | else throw("initial deposit requires all coins") | |
699 | - | if (( | |
696 | + | if ((fs == fs)) | |
700 | 697 | then { | |
701 | - | let | |
702 | - | let | |
703 | - | let | |
704 | - | then $Tuple2( | |
705 | - | else if (( | |
706 | - | then if (( | |
698 | + | let dp = bN(dj) | |
699 | + | let dr = bN(dk) | |
700 | + | let ft = if ((ah == "")) | |
701 | + | then $Tuple2(dp, dr) | |
702 | + | else if ((df == dj)) | |
703 | + | then if ((fq > dp)) | |
707 | 704 | then throw("invalid payment amount") | |
708 | - | else $Tuple2(( | |
709 | - | else if (( | |
710 | - | then if (( | |
705 | + | else $Tuple2((dp - fq), dr) | |
706 | + | else if ((df == dk)) | |
707 | + | then if ((fq > dr)) | |
711 | 708 | then throw("invalid payment amount") | |
712 | - | else $Tuple2( | |
709 | + | else $Tuple2(dp, (dr - fq)) | |
713 | 710 | else throw("wrong pmtAssetId") | |
714 | - | let | |
715 | - | let | |
716 | - | let | |
717 | - | then $Tuple2( | |
718 | - | else if (( | |
719 | - | then $Tuple2(0, | |
711 | + | let fu = ft._1 | |
712 | + | let fv = ft._2 | |
713 | + | let fw = if ((df == dj)) | |
714 | + | then $Tuple2(fq, 0) | |
715 | + | else if ((df == dk)) | |
716 | + | then $Tuple2(0, fq) | |
720 | 717 | else throw("invalid payment") | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | then $Tuple3( | |
725 | - | else $Tuple3( | |
726 | - | let | |
727 | - | let | |
728 | - | let | |
729 | - | let | |
730 | - | let | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
718 | + | let fx = fw._1 | |
719 | + | let fy = fw._2 | |
720 | + | let fz = if (fr) | |
721 | + | then $Tuple3(cv(fx, aR)._1, cv(fy, aR)._1, cv(fq, aR)._2) | |
722 | + | else $Tuple3(fx, fy, 0) | |
723 | + | let fA = fz._1 | |
724 | + | let fB = fz._2 | |
725 | + | let cx = fz._3 | |
726 | + | let fC = (fu + fA) | |
727 | + | let fD = (fv + fB) | |
728 | + | let cb = cy([H(fu, bo), H(fv, bp)]) | |
729 | + | let ca = cy([H(fC, bo), H(fD, bp)]) | |
730 | + | let dY = if ((ca > cb)) | |
734 | 731 | then true | |
735 | 732 | else throw() | |
736 | - | if (( | |
733 | + | if ((dY == dY)) | |
737 | 734 | then { | |
738 | - | let | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | $Tuple4(toInt( | |
735 | + | let fE = fraction(eQ, (ca - cb), cb, FLOOR) | |
736 | + | let du = L(bP(H(fD, dS), H(fC, dR)), a) | |
737 | + | let er = [IntegerEntry(ab(), du), IntegerEntry(ac(height, lastBlock.timestamp), du), StringEntry(af(dh, ah), by(fx, fy, toInt(fE), du, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
738 | + | let fF = fraction(fv, a, fu) | |
739 | + | let fG = fraction(fq, a, (fF + a)) | |
740 | + | let fH = (fq - fG) | |
741 | + | let fI = fraction(eQ, toBigInt(fH), toBigInt(fv)) | |
742 | + | let fJ = toInt(fraction((fE - fI), b, fI)) | |
743 | + | $Tuple4(toInt(fE), er, cx, fJ) | |
747 | 744 | } | |
748 | 745 | else throw("Strict value is not equal to itself.") | |
749 | 746 | } | |
750 | 747 | else throw("Strict value is not equal to itself.") | |
751 | 748 | } | |
752 | 749 | ||
753 | 750 | ||
754 | - | func fM (fN,fO,fP,fo,fQ,fR) = { | |
751 | + | func fK (fL,fM,fN,fm,fO,fP) = { | |
752 | + | let di = toBase58String(value(bl)) | |
753 | + | let dj = toBase58String(value(bm)) | |
755 | 754 | let dk = toBase58String(value(bn)) | |
756 | - | let dl = toBase58String(value(bo)) | |
757 | - | let dm = toBase58String(value(bp)) | |
758 | - | let fS = bq | |
759 | - | let fT = br | |
760 | - | let fU = bm | |
761 | - | let dj = if ((fo == bz)) | |
762 | - | then fQ | |
763 | - | else fo | |
764 | - | let fm = value(fP[0]) | |
765 | - | let dh = value(fm.assetId) | |
766 | - | let dN = fm.amount | |
767 | - | let eT = eM(e, e, e) | |
768 | - | if ((eT == eT)) | |
755 | + | let fQ = bo | |
756 | + | let fR = bp | |
757 | + | let fS = bk | |
758 | + | let dh = if ((fm == bx)) | |
759 | + | then fO | |
760 | + | else fm | |
761 | + | let fk = value(fN[0]) | |
762 | + | let df = value(fk.assetId) | |
763 | + | let dL = fk.amount | |
764 | + | let eR = eK(e, e, e) | |
765 | + | if ((eR == eR)) | |
769 | 766 | then { | |
770 | - | let | |
771 | - | if (( | |
767 | + | let de = toBase58String(fP) | |
768 | + | if ((di != toBase58String(df))) | |
772 | 769 | then throw("Wrong LP") | |
773 | 770 | else { | |
774 | - | let | |
775 | - | let | |
776 | - | let | |
777 | - | let | |
778 | - | if ($isInstanceOf( | |
779 | - | then | |
780 | - | else throw(($getType( | |
771 | + | let dp = bN(dj) | |
772 | + | let dr = bN(dk) | |
773 | + | let fT = { | |
774 | + | let aS = invoke(this, "getOneTknV2READONLY", [fL, dL], nil) | |
775 | + | if ($isInstanceOf(aS, "(Int, Int)")) | |
776 | + | then aS | |
777 | + | else throw(($getType(aS) + " couldn't be cast to (Int, Int)")) | |
781 | 778 | } | |
782 | - | if (( | |
779 | + | if ((fT == fT)) | |
783 | 780 | then { | |
784 | - | let | |
785 | - | let | |
786 | - | let | |
787 | - | then ( | |
781 | + | let cx = fT._2 | |
782 | + | let fU = fT._1 | |
783 | + | let fV = if (if ((fM > 0)) | |
784 | + | then (fM > fU) | |
788 | 785 | else false) | |
789 | - | then | |
790 | - | else | |
791 | - | let | |
792 | - | then $Tuple4( | |
793 | - | else if (( | |
794 | - | then $Tuple4(0, | |
786 | + | then aN(makeString(["amount to receive is less than ", toString(fM)], "")) | |
787 | + | else fU | |
788 | + | let fW = if ((fL == dj)) | |
789 | + | then $Tuple4(fV, 0, ((dp - fV) - cx), dr) | |
790 | + | else if ((fL == dk)) | |
791 | + | then $Tuple4(0, fV, dp, ((dr - fV) - cx)) | |
795 | 792 | else throw("invalid out asset id") | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let | |
801 | - | let | |
802 | - | let | |
793 | + | let fX = fW._1 | |
794 | + | let fY = fW._2 | |
795 | + | let fC = fW._3 | |
796 | + | let fD = fW._4 | |
797 | + | let fZ = bP(H(fD, fR), H(fC, fQ)) | |
798 | + | let ga = L(fZ, a) | |
799 | + | let gb = if ((fL == "WAVES")) | |
803 | 800 | then unit | |
804 | - | else fromBase58String( | |
805 | - | let | |
806 | - | then [ScriptTransfer( | |
801 | + | else fromBase58String(fL) | |
802 | + | let gc = if ((cx > 0)) | |
803 | + | then [ScriptTransfer(aX, cx, gb)] | |
807 | 804 | else nil | |
808 | - | let | |
809 | - | if (( | |
805 | + | let dB = ([ScriptTransfer(dh, fV, gb), StringEntry(ai(toString(dh), de), bJ(fX, fY, dL, ga, height, lastBlock.timestamp)), IntegerEntry(ab(), ga), IntegerEntry(ac(height, lastBlock.timestamp), ga)] ++ gc) | |
806 | + | if ((dB == dB)) | |
810 | 807 | then { | |
811 | - | let | |
812 | - | if (( | |
808 | + | let gd = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)]) | |
809 | + | if ((gd == gd)) | |
813 | 810 | then { | |
814 | - | let | |
815 | - | let | |
811 | + | let ge = { | |
812 | + | let gf = if ((this == aX)) | |
816 | 813 | then 0 | |
817 | - | else | |
818 | - | let | |
814 | + | else cx | |
815 | + | let gg = if ((bc(fL) == bm)) | |
819 | 816 | then true | |
820 | 817 | else false | |
821 | - | if ( | |
822 | - | then $Tuple2(-(( | |
823 | - | else $Tuple2(0, -(( | |
818 | + | if (gg) | |
819 | + | then $Tuple2(-((fU + gf)), 0) | |
820 | + | else $Tuple2(0, -((fU + gf))) | |
824 | 821 | } | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | if (( | |
832 | - | then $Tuple2(( | |
822 | + | let eT = ge._1 | |
823 | + | let eU = ge._2 | |
824 | + | let gh = eS(eT, eU, 0) | |
825 | + | let gi = gh._1 | |
826 | + | let eJ = gh._2 | |
827 | + | let gj = eW(eR, eJ) | |
828 | + | if ((gj == gj)) | |
829 | + | then $Tuple2((dB ++ gi), fV) | |
833 | 830 | else throw("Strict value is not equal to itself.") | |
834 | 831 | } | |
835 | 832 | else throw("Strict value is not equal to itself.") | |
836 | 833 | } | |
837 | 834 | else throw("Strict value is not equal to itself.") | |
838 | 835 | } | |
839 | 836 | else throw("Strict value is not equal to itself.") | |
840 | 837 | } | |
841 | 838 | } | |
842 | 839 | else throw("Strict value is not equal to itself.") | |
843 | 840 | } | |
844 | 841 | ||
845 | 842 | ||
846 | - | func | |
847 | - | let | |
848 | - | if ($isInstanceOf( | |
843 | + | func gk () = { | |
844 | + | let gl = getString(Z()) | |
845 | + | if ($isInstanceOf(gl, "String")) | |
849 | 846 | then { | |
850 | - | let | |
851 | - | fromBase58String( | |
847 | + | let cC = gl | |
848 | + | fromBase58String(cC) | |
852 | 849 | } | |
853 | - | else if ($isInstanceOf( | |
850 | + | else if ($isInstanceOf(gl, "Unit")) | |
854 | 851 | then unit | |
855 | 852 | else throw("Match error") | |
856 | 853 | } | |
857 | 854 | ||
858 | 855 | ||
859 | - | func | |
860 | - | let | |
861 | - | if ($isInstanceOf( | |
856 | + | func gm () = { | |
857 | + | let gl = getString(aa()) | |
858 | + | if ($isInstanceOf(gl, "String")) | |
862 | 859 | then { | |
863 | - | let | |
864 | - | fromBase58String( | |
860 | + | let cC = gl | |
861 | + | fromBase58String(cC) | |
865 | 862 | } | |
866 | - | else if ($isInstanceOf( | |
863 | + | else if ($isInstanceOf(gl, "Unit")) | |
867 | 864 | then unit | |
868 | 865 | else throw("Match error") | |
869 | 866 | } | |
870 | 867 | ||
871 | 868 | ||
872 | - | let | |
869 | + | let gn = throw("Permission denied") | |
873 | 870 | ||
874 | - | func | |
875 | - | let | |
876 | - | if ($isInstanceOf( | |
871 | + | func go (cP) = { | |
872 | + | let gl = gk() | |
873 | + | if ($isInstanceOf(gl, "ByteVector")) | |
877 | 874 | then { | |
878 | - | let | |
879 | - | ( | |
875 | + | let gp = gl | |
876 | + | (cP.callerPublicKey == gp) | |
880 | 877 | } | |
881 | - | else if ($isInstanceOf( | |
882 | - | then ( | |
878 | + | else if ($isInstanceOf(gl, "Unit")) | |
879 | + | then (cP.caller == this) | |
883 | 880 | else throw("Match error") | |
884 | 881 | } | |
885 | 882 | ||
886 | 883 | ||
887 | - | func | |
888 | - | let | |
889 | - | if ($isInstanceOf( | |
884 | + | func gq (cP) = { | |
885 | + | let gl = gk() | |
886 | + | if ($isInstanceOf(gl, "ByteVector")) | |
890 | 887 | then { | |
891 | - | let | |
892 | - | if (( | |
888 | + | let gp = gl | |
889 | + | if ((cP.callerPublicKey == gp)) | |
893 | 890 | then true | |
894 | - | else | |
891 | + | else gn | |
895 | 892 | } | |
896 | - | else if ($isInstanceOf( | |
897 | - | then if (( | |
893 | + | else if ($isInstanceOf(gl, "Unit")) | |
894 | + | then if ((cP.caller == this)) | |
898 | 895 | then true | |
899 | - | else | |
896 | + | else gn | |
900 | 897 | else throw("Match error") | |
901 | 898 | } | |
902 | 899 | ||
903 | 900 | ||
904 | - | func | |
905 | - | let | |
906 | - | let | |
907 | - | let | |
908 | - | let | |
909 | - | let | |
910 | - | let | |
911 | - | let | |
912 | - | then [(toBigInt( | |
913 | - | else [(toBigInt( | |
914 | - | let | |
915 | - | let | |
916 | - | let | |
917 | - | let | |
918 | - | let | |
919 | - | func | |
920 | - | let | |
921 | - | let | |
922 | - | let | |
923 | - | if (( | |
924 | - | then | |
901 | + | func gr (gs,et,gt) = { | |
902 | + | let bg = aY() | |
903 | + | let dj = bg[w] | |
904 | + | let dk = bg[x] | |
905 | + | let eu = g | |
906 | + | let ew = parseBigIntValue(l) | |
907 | + | let cD = (parseBigIntValue(aU) * ew) | |
908 | + | let cz = if ((gs == false)) | |
909 | + | then [(toBigInt(bN(dj)) + gt), toBigInt(bN(dk))] | |
910 | + | else [(toBigInt(bN(dk)) + gt), toBigInt(bN(dj))] | |
911 | + | let ev = cz[0] | |
912 | + | let cC = ev | |
913 | + | let cE = (cD * eu) | |
914 | + | let ex = (((((et * et) / (ev * eu)) * et) * ew) / (cE * eu)) | |
915 | + | let ey = ((cC + ((et * ew) / cE)) - et) | |
916 | + | func cN (cO,ez) = { | |
917 | + | let gu = cO | |
918 | + | let eB = gu._1 | |
919 | + | let dc = gu._2 | |
920 | + | if ((dc != unit)) | |
921 | + | then cO | |
925 | 922 | else { | |
926 | - | let | |
927 | - | let | |
928 | - | if ((f >= | |
929 | - | then $Tuple2( | |
930 | - | else $Tuple2( | |
923 | + | let eC = (((eB * eB) + ex) / ((g * eB) + ey)) | |
924 | + | let eD = X((eC - value(eB))) | |
925 | + | if ((f >= eD)) | |
926 | + | then $Tuple2(eC, ez) | |
927 | + | else $Tuple2(eC, unit) | |
931 | 928 | } | |
932 | 929 | } | |
933 | 930 | ||
934 | - | let | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
939 | - | func | |
940 | - | then | |
941 | - | else | |
931 | + | let cT = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
932 | + | let gv = { | |
933 | + | let cV = cT | |
934 | + | let cW = size(cV) | |
935 | + | let cX = $Tuple2(et, unit) | |
936 | + | func cY (cZ,da) = if ((da >= cW)) | |
937 | + | then cZ | |
938 | + | else cN(cZ, cV[da]) | |
942 | 939 | ||
943 | - | func | |
944 | - | then | |
940 | + | func db (cZ,da) = if ((da >= cW)) | |
941 | + | then cZ | |
945 | 942 | else throw("List size exceeds 15") | |
946 | 943 | ||
947 | - | | |
944 | + | db(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cY(cX, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
948 | 945 | } | |
949 | - | let | |
950 | - | let | |
951 | - | if (( | |
952 | - | then | |
953 | - | else throw(("Y calculation error, Y = " + toString( | |
946 | + | let eB = gv._1 | |
947 | + | let dc = gv._2 | |
948 | + | if ((dc != unit)) | |
949 | + | then eB | |
950 | + | else throw(("Y calculation error, Y = " + toString(eB))) | |
954 | 951 | } | |
955 | 952 | ||
956 | 953 | ||
957 | - | func gy () = valueOrElse(getBoolean(aS, aE(toString(this))), false) | |
958 | - | ||
959 | - | ||
960 | - | @Callable(cR) | |
961 | - | func calculateAmountOutForSwapREADONLY (gz,gu,gA) = { | |
962 | - | let gB = if ((gu == false)) | |
954 | + | @Callable(cP) | |
955 | + | func calculateAmountOutForSwapREADONLY (gw,gs,gx) = { | |
956 | + | let gy = if ((gs == false)) | |
963 | 957 | then { | |
964 | - | let | |
965 | - | let | |
966 | - | $Tuple2( | |
958 | + | let gz = aJ(this, ak()) | |
959 | + | let gt = (toBigInt(bN(aJ(this, aj()))) + toBigInt(gw)) | |
960 | + | $Tuple2(gz, gt) | |
967 | 961 | } | |
968 | 962 | else { | |
969 | - | let | |
970 | - | let | |
971 | - | $Tuple2( | |
963 | + | let gz = aJ(this, aj()) | |
964 | + | let gt = (toBigInt(bN(aJ(this, ak()))) + toBigInt(gw)) | |
965 | + | $Tuple2(gz, gt) | |
972 | 966 | } | |
973 | - | let | |
974 | - | let | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | let | |
980 | - | let | |
981 | - | let | |
982 | - | let | |
983 | - | let | |
984 | - | then [((toBigInt( | |
985 | - | else [(toBigInt( | |
986 | - | let | |
987 | - | let | |
967 | + | let gz = gy._1 | |
968 | + | let gt = gy._2 | |
969 | + | let bg = aY() | |
970 | + | let dj = bg[w] | |
971 | + | let dk = bg[x] | |
972 | + | let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))] | |
973 | + | let et = cy(cz) | |
974 | + | let eB = gr(gs, et, toBigInt(gw)) | |
975 | + | let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1)) | |
976 | + | let gB = max([0, toInt(gA)]) | |
977 | + | let gC = if ((gs == false)) | |
978 | + | then [((toBigInt(bN(dj)) + toBigInt(gw)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)] | |
979 | + | else [(toBigInt(bN(dj)) - gA), ((toBigInt(bN(dk)) + toBigInt(gw)) + toBigInt(gx))] | |
980 | + | let gD = cy(gC) | |
981 | + | let dY = if ((gD >= et)) | |
988 | 982 | then true | |
989 | - | else throw(makeString(["new D is fewer error", toString( | |
990 | - | if (( | |
991 | - | then $Tuple2(nil, | |
983 | + | else throw(makeString(["new D is fewer error", toString(et), toString(gD)], "__")) | |
984 | + | if ((dY == dY)) | |
985 | + | then $Tuple2(nil, gB) | |
992 | 986 | else throw("Strict value is not equal to itself.") | |
993 | 987 | } | |
994 | 988 | ||
995 | 989 | ||
996 | 990 | ||
997 | - | @Callable( | |
998 | - | func calculateAmountOutForSwapAndSendTokens ( | |
999 | - | let | |
1000 | - | let | |
1001 | - | if ($isInstanceOf( | |
1002 | - | then | |
1003 | - | else throw(($getType( | |
991 | + | @Callable(cP) | |
992 | + | func calculateAmountOutForSwapAndSendTokens (gw,gs,gE,gF,gx) = { | |
993 | + | let gG = { | |
994 | + | let aS = invoke(aQ, "getSwapContractREADONLY", nil, nil) | |
995 | + | if ($isInstanceOf(aS, "String")) | |
996 | + | then aS | |
997 | + | else throw(($getType(aS) + " couldn't be cast to String")) | |
1004 | 998 | } | |
1005 | - | let | |
999 | + | let gH = [if ((value(cP.payments[0]).amount >= gw)) | |
1006 | 1000 | then true | |
1007 | - | else | |
1001 | + | else aN("Wrong amount"), if ((cP.caller == addressFromStringValue(gG))) | |
1008 | 1002 | then true | |
1009 | - | else | |
1010 | - | if (( | |
1003 | + | else aN("Permission denied")] | |
1004 | + | if ((gH == gH)) | |
1011 | 1005 | then { | |
1012 | - | let | |
1013 | - | let | |
1014 | - | let | |
1006 | + | let fk = value(cP.payments[0]) | |
1007 | + | let gI = be(fk.assetId) | |
1008 | + | let gJ = if ((gs == false)) | |
1015 | 1009 | then { | |
1016 | - | let | |
1017 | - | let | |
1018 | - | $Tuple2( | |
1010 | + | let gz = aJ(this, ak()) | |
1011 | + | let gt = (bN(gI) - value(cP.payments[0]).amount) | |
1012 | + | $Tuple2(gz, gt) | |
1019 | 1013 | } | |
1020 | 1014 | else { | |
1021 | - | let | |
1022 | - | let | |
1023 | - | $Tuple2( | |
1015 | + | let gz = aJ(this, aj()) | |
1016 | + | let gt = (bN(gI) - value(cP.payments[0]).amount) | |
1017 | + | $Tuple2(gz, gt) | |
1024 | 1018 | } | |
1025 | - | let | |
1026 | - | let | |
1027 | - | let | |
1028 | - | let | |
1029 | - | let | |
1030 | - | let | |
1031 | - | then [(toBigInt( | |
1032 | - | else [toBigInt( | |
1033 | - | let | |
1034 | - | let | |
1035 | - | let | |
1036 | - | let | |
1037 | - | let | |
1019 | + | let gz = gJ._1 | |
1020 | + | let gt = gJ._2 | |
1021 | + | let bg = aY() | |
1022 | + | let dj = bg[w] | |
1023 | + | let dk = bg[x] | |
1024 | + | let cz = if ((gs == false)) | |
1025 | + | then [(toBigInt(bN(dj)) - toBigInt(value(cP.payments[0]).amount)), toBigInt(bN(dk))] | |
1026 | + | else [toBigInt(bN(dj)), (toBigInt(bN(dk)) - toBigInt(value(cP.payments[0]).amount))] | |
1027 | + | let et = cy(cz) | |
1028 | + | let eB = gr(gs, et, toBigInt(0)) | |
1029 | + | let gA = ((toBigInt(bN(gz)) - eB) - toBigInt(1)) | |
1030 | + | let gB = max([0, toInt(gA)]) | |
1031 | + | let gK = if ((gB >= gE)) | |
1038 | 1032 | then true | |
1039 | 1033 | else throw("Exchange result is fewer coins than expected") | |
1040 | - | if (( | |
1034 | + | if ((gK == gK)) | |
1041 | 1035 | then { | |
1042 | - | let | |
1043 | - | then [(toBigInt( | |
1044 | - | else [(toBigInt( | |
1045 | - | let | |
1046 | - | let | |
1036 | + | let gC = if ((gs == false)) | |
1037 | + | then [(toBigInt(bN(dj)) + toBigInt(gx)), (toBigInt(bN(dk)) - gA)] | |
1038 | + | else [(toBigInt(bN(dj)) - gA), (toBigInt(bN(dk)) + toBigInt(gx))] | |
1039 | + | let gD = cy(gC) | |
1040 | + | let dY = if ((gD >= et)) | |
1047 | 1041 | then true | |
1048 | 1042 | else throw("new D is fewer error") | |
1049 | - | if (( | |
1050 | - | then $Tuple2([ScriptTransfer(addressFromStringValue( | |
1043 | + | if ((dY == dY)) | |
1044 | + | then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bc(gz))], gB) | |
1051 | 1045 | else throw("Strict value is not equal to itself.") | |
1052 | 1046 | } | |
1053 | 1047 | else throw("Strict value is not equal to itself.") | |
1054 | 1048 | } | |
1055 | 1049 | else throw("Strict value is not equal to itself.") | |
1056 | 1050 | } | |
1057 | 1051 | ||
1058 | 1052 | ||
1059 | 1053 | ||
1060 | - | @Callable( | |
1054 | + | @Callable(cP) | |
1061 | 1055 | func constructor (Y) = { | |
1062 | - | let | |
1063 | - | if (( | |
1056 | + | let ex = gq(cP) | |
1057 | + | if ((ex == ex)) | |
1064 | 1058 | then [StringEntry(Y(), Y)] | |
1065 | 1059 | else throw("Strict value is not equal to itself.") | |
1066 | 1060 | } | |
1067 | 1061 | ||
1068 | 1062 | ||
1069 | 1063 | ||
1070 | - | @Callable( | |
1071 | - | func setManager ( | |
1072 | - | let | |
1073 | - | if (( | |
1064 | + | @Callable(cP) | |
1065 | + | func setManager (gL) = { | |
1066 | + | let ex = gq(cP) | |
1067 | + | if ((ex == ex)) | |
1074 | 1068 | then { | |
1075 | - | let | |
1076 | - | if (( | |
1077 | - | then [StringEntry(aa(), | |
1069 | + | let gM = fromBase58String(gL) | |
1070 | + | if ((gM == gM)) | |
1071 | + | then [StringEntry(aa(), gL)] | |
1078 | 1072 | else throw("Strict value is not equal to itself.") | |
1079 | 1073 | } | |
1080 | 1074 | else throw("Strict value is not equal to itself.") | |
1081 | 1075 | } | |
1082 | 1076 | ||
1083 | 1077 | ||
1084 | 1078 | ||
1085 | - | @Callable( | |
1079 | + | @Callable(cP) | |
1086 | 1080 | func confirmManager () = { | |
1087 | - | let | |
1088 | - | let | |
1081 | + | let cu = gm() | |
1082 | + | let gN = if (isDefined(cu)) | |
1089 | 1083 | then true | |
1090 | 1084 | else throw("No pending manager") | |
1091 | - | if (( | |
1085 | + | if ((gN == gN)) | |
1092 | 1086 | then { | |
1093 | - | let | |
1087 | + | let gO = if ((cP.callerPublicKey == value(cu))) | |
1094 | 1088 | then true | |
1095 | 1089 | else throw("You are not pending manager") | |
1096 | - | if (( | |
1097 | - | then [StringEntry(Z(), toBase58String(value( | |
1090 | + | if ((gO == gO)) | |
1091 | + | then [StringEntry(Z(), toBase58String(value(cu))), DeleteEntry(aa())] | |
1098 | 1092 | else throw("Strict value is not equal to itself.") | |
1099 | 1093 | } | |
1100 | 1094 | else throw("Strict value is not equal to itself.") | |
1101 | 1095 | } | |
1102 | 1096 | ||
1103 | 1097 | ||
1104 | 1098 | ||
1105 | - | @Callable( | |
1106 | - | func put ( | |
1107 | - | let | |
1108 | - | let | |
1109 | - | let | |
1110 | - | if ((0 > | |
1099 | + | @Callable(cP) | |
1100 | + | func put (gP,gQ) = { | |
1101 | + | let gR = bs() | |
1102 | + | let gS = valueOrErrorMessage(addressFromString(gR[C]), "Wr st addr") | |
1103 | + | let gT = valueOrErrorMessage(addressFromString(gR[E]), "Wr sl addr") | |
1104 | + | if ((0 > gP)) | |
1111 | 1105 | then throw("Wrong slippage") | |
1112 | - | else if ((size( | |
1106 | + | else if ((size(cP.payments) != 2)) | |
1113 | 1107 | then throw("2 pmnts expd") | |
1114 | 1108 | else { | |
1115 | - | let | |
1116 | - | let | |
1117 | - | let | |
1118 | - | if (( | |
1109 | + | let gU = toBigInt(value(cP.payments[0]).amount) | |
1110 | + | let gV = toBigInt(value(cP.payments[1]).amount) | |
1111 | + | let eO = (toBigInt(bN(be(bm))) - gU) | |
1112 | + | if ((eO == eO)) | |
1119 | 1113 | then { | |
1120 | - | let | |
1121 | - | if (( | |
1114 | + | let eP = (toBigInt(bN(be(bn))) - gV) | |
1115 | + | if ((eP == eP)) | |
1122 | 1116 | then { | |
1123 | - | let | |
1124 | - | if (( | |
1117 | + | let eQ = toBigInt(value(assetInfo(bl)).quantity) | |
1118 | + | if ((eQ == eQ)) | |
1125 | 1119 | then { | |
1126 | - | let | |
1127 | - | if (( | |
1120 | + | let eR = eK(gU, gV, toBigInt(0)) | |
1121 | + | if ((eR == eR)) | |
1128 | 1122 | then { | |
1129 | - | let | |
1130 | - | let | |
1131 | - | let | |
1132 | - | let | |
1133 | - | let | |
1134 | - | let | |
1135 | - | let | |
1136 | - | let | |
1137 | - | let | |
1138 | - | if (( | |
1123 | + | let gW = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], gP, true, false, true, 0, "") | |
1124 | + | let el = gW._2 | |
1125 | + | let gX = gW._7 | |
1126 | + | let dB = gW._9 | |
1127 | + | let em = gW._10 | |
1128 | + | let en = gW._11 | |
1129 | + | let dj = gW._12 | |
1130 | + | let dk = gW._13 | |
1131 | + | let dX = invoke(aQ, "emit", [el], nil) | |
1132 | + | if ((dX == dX)) | |
1139 | 1133 | then { | |
1140 | - | let | |
1141 | - | let | |
1142 | - | if ($isInstanceOf( | |
1134 | + | let gY = { | |
1135 | + | let gl = dX | |
1136 | + | if ($isInstanceOf(gl, "Address")) | |
1143 | 1137 | then { | |
1144 | - | let | |
1145 | - | invoke( | |
1138 | + | let gZ = gl | |
1139 | + | invoke(gZ, "emit", [el], nil) | |
1146 | 1140 | } | |
1147 | 1141 | else unit | |
1148 | 1142 | } | |
1149 | - | if (( | |
1143 | + | if ((gY == gY)) | |
1150 | 1144 | then { | |
1151 | - | let | |
1152 | - | then invoke( | |
1145 | + | let ha = if ((em > 0)) | |
1146 | + | then invoke(gT, "put", nil, [AttachedPayment(dj, em)]) | |
1153 | 1147 | else nil | |
1154 | - | if (( | |
1148 | + | if ((ha == ha)) | |
1155 | 1149 | then { | |
1156 | - | let | |
1157 | - | then invoke( | |
1150 | + | let hb = if ((en > 0)) | |
1151 | + | then invoke(gT, "put", nil, [AttachedPayment(dk, en)]) | |
1158 | 1152 | else nil | |
1159 | - | if (( | |
1153 | + | if ((hb == hb)) | |
1160 | 1154 | then { | |
1161 | - | let | |
1155 | + | let hc = if (gQ) | |
1162 | 1156 | then { | |
1163 | - | let | |
1164 | - | if (( | |
1157 | + | let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, el)]) | |
1158 | + | if ((hd == hd)) | |
1165 | 1159 | then nil | |
1166 | 1160 | else throw("Strict value is not equal to itself.") | |
1167 | 1161 | } | |
1168 | - | else [ScriptTransfer( | |
1169 | - | let | |
1170 | - | let | |
1171 | - | let | |
1172 | - | let | |
1162 | + | else [ScriptTransfer(cP.caller, el, gX)] | |
1163 | + | let he = eS(0, 0, 0) | |
1164 | + | let gi = he._1 | |
1165 | + | let eJ = he._2 | |
1166 | + | let hf = if ((eJ >= eR)) | |
1173 | 1167 | then true | |
1174 | - | else | |
1175 | - | if (( | |
1168 | + | else aN(makeString(["updated DLp lower than current DLp", toString(eO), toString(eP), toString(eQ), toString(eR), toString(eJ), toString(em), toString(en)], " ")) | |
1169 | + | if ((hf == hf)) | |
1176 | 1170 | then { | |
1177 | - | let | |
1178 | - | if (( | |
1179 | - | then (( | |
1171 | + | let hg = value(assetInfo(bl)).quantity | |
1172 | + | if ((hg == hg)) | |
1173 | + | then ((dB ++ hc) ++ gi) | |
1180 | 1174 | else throw("Strict value is not equal to itself.") | |
1181 | 1175 | } | |
1182 | 1176 | else throw("Strict value is not equal to itself.") | |
1183 | 1177 | } | |
1184 | 1178 | else throw("Strict value is not equal to itself.") | |
1185 | 1179 | } | |
1186 | 1180 | else throw("Strict value is not equal to itself.") | |
1187 | 1181 | } | |
1188 | 1182 | else throw("Strict value is not equal to itself.") | |
1189 | 1183 | } | |
1190 | 1184 | else throw("Strict value is not equal to itself.") | |
1191 | 1185 | } | |
1192 | 1186 | else throw("Strict value is not equal to itself.") | |
1193 | 1187 | } | |
1194 | 1188 | else throw("Strict value is not equal to itself.") | |
1195 | 1189 | } | |
1196 | 1190 | else throw("Strict value is not equal to itself.") | |
1197 | 1191 | } | |
1198 | 1192 | else throw("Strict value is not equal to itself.") | |
1199 | 1193 | } | |
1200 | 1194 | } | |
1201 | 1195 | ||
1202 | 1196 | ||
1203 | 1197 | ||
1204 | - | @Callable( | |
1205 | - | func putOneTknV2 ( | |
1206 | - | let | |
1207 | - | let | |
1208 | - | if ($isInstanceOf( | |
1209 | - | then | |
1210 | - | else throw(($getType( | |
1198 | + | @Callable(cP) | |
1199 | + | func putOneTknV2 (fM,gQ) = { | |
1200 | + | let hh = { | |
1201 | + | let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1202 | + | if ($isInstanceOf(aS, "Boolean")) | |
1203 | + | then aS | |
1204 | + | else throw(($getType(aS) + " couldn't be cast to Boolean")) | |
1211 | 1205 | } | |
1212 | - | let | |
1206 | + | let hi = if (if (if (aV()) | |
1213 | 1207 | then true | |
1214 | - | else ( | |
1208 | + | else (bk == q)) | |
1215 | 1209 | then true | |
1216 | - | else ( | |
1210 | + | else (bk == s)) | |
1217 | 1211 | then true | |
1218 | - | else | |
1219 | - | let | |
1212 | + | else hh | |
1213 | + | let gH = [if (if (!(hi)) | |
1220 | 1214 | then true | |
1221 | - | else | |
1215 | + | else go(cP)) | |
1222 | 1216 | then true | |
1223 | - | else | |
1217 | + | else aN("put operation is blocked by admin"), if ((size(cP.payments) == 1)) | |
1224 | 1218 | then true | |
1225 | - | else | |
1226 | - | if (( | |
1219 | + | else aN("exactly 1 payment are expected")] | |
1220 | + | if ((gH == gH)) | |
1227 | 1221 | then { | |
1228 | - | let | |
1229 | - | let | |
1230 | - | let | |
1231 | - | let | |
1232 | - | let | |
1233 | - | let | |
1234 | - | then | |
1235 | - | else | |
1236 | - | let | |
1237 | - | let | |
1238 | - | let | |
1239 | - | let | |
1240 | - | then | |
1241 | - | else | |
1242 | - | if (( | |
1222 | + | let dj = toBase58String(value(bm)) | |
1223 | + | let dk = toBase58String(value(bn)) | |
1224 | + | let di = bl | |
1225 | + | let fQ = bo | |
1226 | + | let fR = bp | |
1227 | + | let dh = if ((cP.caller == this)) | |
1228 | + | then cP.originCaller | |
1229 | + | else cP.caller | |
1230 | + | let fk = value(cP.payments[0]) | |
1231 | + | let df = toBase58String(value(fk.assetId)) | |
1232 | + | let dL = fk.amount | |
1233 | + | let eR = if ((fk.assetId == bm)) | |
1234 | + | then eK(toBigInt(dL), toBigInt(0), toBigInt(0)) | |
1235 | + | else eK(toBigInt(0), toBigInt(dL), toBigInt(0)) | |
1236 | + | if ((eR == eR)) | |
1243 | 1237 | then { | |
1244 | - | let | |
1245 | - | if (( | |
1238 | + | let hj = fp(dL, df, toString(dh), toBase58String(cP.transactionId), true) | |
1239 | + | if ((hj == hj)) | |
1246 | 1240 | then { | |
1247 | - | let | |
1248 | - | let | |
1249 | - | let | |
1250 | - | let | |
1251 | - | then ( | |
1241 | + | let cx = hj._3 | |
1242 | + | let dB = hj._2 | |
1243 | + | let hk = hj._1 | |
1244 | + | let el = if (if ((fM > 0)) | |
1245 | + | then (fM > hk) | |
1252 | 1246 | else false) | |
1253 | - | then | |
1254 | - | else | |
1255 | - | let | |
1256 | - | if (( | |
1247 | + | then aN(makeString(["amount to receive is less than ", toString(fM)], "")) | |
1248 | + | else hk | |
1249 | + | let gW = invoke(aQ, "emit", [el], nil) | |
1250 | + | if ((gW == gW)) | |
1257 | 1251 | then { | |
1258 | - | let | |
1259 | - | let | |
1260 | - | if ($isInstanceOf( | |
1252 | + | let gY = { | |
1253 | + | let gl = gW | |
1254 | + | if ($isInstanceOf(gl, "Address")) | |
1261 | 1255 | then { | |
1262 | - | let | |
1263 | - | invoke( | |
1256 | + | let gZ = gl | |
1257 | + | invoke(gZ, "emit", [el], nil) | |
1264 | 1258 | } | |
1265 | 1259 | else unit | |
1266 | 1260 | } | |
1267 | - | if (( | |
1261 | + | if ((gY == gY)) | |
1268 | 1262 | then { | |
1269 | - | let | |
1263 | + | let hc = if (gQ) | |
1270 | 1264 | then { | |
1271 | - | let | |
1272 | - | if (( | |
1265 | + | let hd = invoke(bu, "stake", nil, [AttachedPayment(di, el)]) | |
1266 | + | if ((hd == hd)) | |
1273 | 1267 | then nil | |
1274 | 1268 | else throw("Strict value is not equal to itself.") | |
1275 | 1269 | } | |
1276 | - | else [ScriptTransfer( | |
1277 | - | let | |
1278 | - | then [ScriptTransfer( | |
1270 | + | else [ScriptTransfer(cP.caller, el, di)] | |
1271 | + | let gc = if ((cx > 0)) | |
1272 | + | then [ScriptTransfer(aX, cx, fromBase58String(df))] | |
1279 | 1273 | else nil | |
1280 | - | let | |
1274 | + | let hl = if ((this == aX)) | |
1281 | 1275 | then $Tuple2(0, 0) | |
1282 | 1276 | else { | |
1283 | - | let | |
1277 | + | let hm = if ((fk.assetId == bm)) | |
1284 | 1278 | then true | |
1285 | 1279 | else false | |
1286 | - | if ( | |
1287 | - | then $Tuple2(-( | |
1288 | - | else $Tuple2(0, -( | |
1280 | + | if (hm) | |
1281 | + | then $Tuple2(-(cx), 0) | |
1282 | + | else $Tuple2(0, -(cx)) | |
1289 | 1283 | } | |
1290 | - | let | |
1291 | - | let | |
1292 | - | let | |
1293 | - | let | |
1294 | - | let | |
1295 | - | let | |
1296 | - | if (( | |
1297 | - | then $Tuple2(((( | |
1284 | + | let eT = hl._1 | |
1285 | + | let eU = hl._2 | |
1286 | + | let hn = eS(eT, eU, 0) | |
1287 | + | let gi = hn._1 | |
1288 | + | let eJ = hn._2 | |
1289 | + | let gj = eW(eR, eJ) | |
1290 | + | if ((gj == gj)) | |
1291 | + | then $Tuple2((((dB ++ hc) ++ gc) ++ gi), el) | |
1298 | 1292 | else throw("Strict value is not equal to itself.") | |
1299 | 1293 | } | |
1300 | 1294 | else throw("Strict value is not equal to itself.") | |
1301 | 1295 | } | |
1302 | 1296 | else throw("Strict value is not equal to itself.") | |
1303 | 1297 | } | |
1304 | 1298 | else throw("Strict value is not equal to itself.") | |
1305 | 1299 | } | |
1306 | 1300 | else throw("Strict value is not equal to itself.") | |
1307 | 1301 | } | |
1308 | 1302 | else throw("Strict value is not equal to itself.") | |
1309 | 1303 | } | |
1310 | 1304 | ||
1311 | 1305 | ||
1312 | 1306 | ||
1313 | - | @Callable( | |
1314 | - | func putForFree ( | |
1307 | + | @Callable(cP) | |
1308 | + | func putForFree (ho) = if ((0 > ho)) | |
1315 | 1309 | then throw("Wrong slpg") | |
1316 | - | else if ((size( | |
1310 | + | else if ((size(cP.payments) != 2)) | |
1317 | 1311 | then throw("2 pmnts expd") | |
1318 | 1312 | else { | |
1319 | - | let | |
1320 | - | let | |
1321 | - | let | |
1322 | - | let | |
1323 | - | let | |
1324 | - | if (( | |
1313 | + | let hp = fl(toString(cP.caller), toBase58String(cP.transactionId), AttachedPayment(value(cP.payments[0]).assetId, value(cP.payments[0]).amount), cP.payments[1], ho, false, false, true, 0, "") | |
1314 | + | let dB = hp._9 | |
1315 | + | let gU = toBigInt(value(cP.payments[0]).amount) | |
1316 | + | let gV = toBigInt(value(cP.payments[1]).amount) | |
1317 | + | let eR = eK(gU, gV, toBigInt(0)) | |
1318 | + | if ((eR == eR)) | |
1325 | 1319 | then { | |
1326 | - | let | |
1327 | - | let | |
1328 | - | let | |
1329 | - | let | |
1330 | - | if (( | |
1331 | - | then ( | |
1320 | + | let hq = eS(0, 0, 0) | |
1321 | + | let gi = hq._1 | |
1322 | + | let eJ = hq._2 | |
1323 | + | let gj = eW(eR, eJ) | |
1324 | + | if ((gj == gj)) | |
1325 | + | then (dB ++ gi) | |
1332 | 1326 | else throw("Strict value is not equal to itself.") | |
1333 | 1327 | } | |
1334 | 1328 | else throw("Strict value is not equal to itself.") | |
1335 | 1329 | } | |
1336 | 1330 | ||
1337 | 1331 | ||
1338 | 1332 | ||
1339 | - | @Callable( | |
1333 | + | @Callable(cP) | |
1340 | 1334 | func get () = { | |
1341 | - | let | |
1342 | - | if (( | |
1335 | + | let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1336 | + | if ((eR == eR)) | |
1343 | 1337 | then { | |
1344 | - | let | |
1345 | - | let | |
1346 | - | let | |
1347 | - | let | |
1348 | - | let | |
1349 | - | let | |
1350 | - | let | |
1351 | - | if (( | |
1338 | + | let dX = fj(cP) | |
1339 | + | let hr = dX._1 | |
1340 | + | let dA = dX._2 | |
1341 | + | let dL = dX._3 | |
1342 | + | let df = dX._4 | |
1343 | + | let dB = dX._5 | |
1344 | + | let ey = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)]) | |
1345 | + | if ((ey == ey)) | |
1352 | 1346 | then { | |
1353 | - | let | |
1354 | - | let | |
1355 | - | let | |
1356 | - | let | |
1357 | - | if (( | |
1358 | - | then ( | |
1347 | + | let hs = eS(-(hr), -(dA), 0) | |
1348 | + | let gi = hs._1 | |
1349 | + | let eJ = hs._2 | |
1350 | + | let gj = eW(eR, eJ) | |
1351 | + | if ((gj == gj)) | |
1352 | + | then (dB ++ gi) | |
1359 | 1353 | else throw("Strict value is not equal to itself.") | |
1360 | 1354 | } | |
1361 | 1355 | else throw("Strict value is not equal to itself.") | |
1362 | 1356 | } | |
1363 | 1357 | else throw("Strict value is not equal to itself.") | |
1364 | 1358 | } | |
1365 | 1359 | ||
1366 | 1360 | ||
1367 | 1361 | ||
1368 | - | @Callable( | |
1369 | - | func getOneTknV2 ( | |
1370 | - | let | |
1371 | - | let | |
1372 | - | if ($isInstanceOf( | |
1373 | - | then | |
1374 | - | else throw(($getType( | |
1362 | + | @Callable(cP) | |
1363 | + | func getOneTknV2 (fL,fM) = { | |
1364 | + | let hh = { | |
1365 | + | let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1366 | + | if ($isInstanceOf(aS, "Boolean")) | |
1367 | + | then aS | |
1368 | + | else throw(($getType(aS) + " couldn't be cast to Boolean")) | |
1375 | 1369 | } | |
1376 | - | let | |
1370 | + | let ht = if (if (aV()) | |
1377 | 1371 | then true | |
1378 | - | else ( | |
1372 | + | else (bk == s)) | |
1379 | 1373 | then true | |
1380 | - | else | |
1381 | - | let | |
1374 | + | else hh | |
1375 | + | let gH = [if (if (!(ht)) | |
1382 | 1376 | then true | |
1383 | - | else | |
1377 | + | else go(cP)) | |
1384 | 1378 | then true | |
1385 | - | else | |
1379 | + | else aN("get operation is blocked by admin"), if ((size(cP.payments) == 1)) | |
1386 | 1380 | then true | |
1387 | - | else | |
1388 | - | if (( | |
1381 | + | else aN("exactly 1 payment are expected")] | |
1382 | + | if ((gH == gH)) | |
1389 | 1383 | then { | |
1390 | - | let | |
1391 | - | let | |
1392 | - | let | |
1393 | - | $Tuple2( | |
1384 | + | let hu = fK(fL, fM, cP.payments, cP.caller, cP.originCaller, cP.transactionId) | |
1385 | + | let dB = hu._1 | |
1386 | + | let fV = hu._2 | |
1387 | + | $Tuple2(dB, fV) | |
1394 | 1388 | } | |
1395 | 1389 | else throw("Strict value is not equal to itself.") | |
1396 | 1390 | } | |
1397 | 1391 | ||
1398 | 1392 | ||
1399 | 1393 | ||
1400 | - | @Callable( | |
1394 | + | @Callable(cP) | |
1401 | 1395 | func refreshDLp () = { | |
1402 | - | let | |
1403 | - | let | |
1396 | + | let hv = valueOrElse(getInteger(aq), 0) | |
1397 | + | let hw = if (((height - hv) >= at)) | |
1404 | 1398 | then unit | |
1405 | - | else | |
1406 | - | if (( | |
1399 | + | else aN(makeString([toString(at), " blocks have not passed since the previous call"], "")) | |
1400 | + | if ((hw == hw)) | |
1407 | 1401 | then { | |
1408 | - | let | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | let | |
1413 | - | then | |
1414 | - | else | |
1415 | - | $Tuple2( | |
1402 | + | let fd = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ap), "0")), aP("invalid dLp")) | |
1403 | + | let hx = eS(0, 0, 0) | |
1404 | + | let hy = hx._1 | |
1405 | + | let eJ = hx._2 | |
1406 | + | let eV = if ((fd != eJ)) | |
1407 | + | then hy | |
1408 | + | else aN("nothing to refresh") | |
1409 | + | $Tuple2(eV, toString(eJ)) | |
1416 | 1410 | } | |
1417 | 1411 | else throw("Strict value is not equal to itself.") | |
1418 | 1412 | } | |
1419 | 1413 | ||
1420 | 1414 | ||
1421 | 1415 | ||
1422 | - | @Callable(cR) | |
1423 | - | func getOneTknV2READONLY (fN,hC) = { | |
1424 | - | let dl = toBase58String(value(bo)) | |
1425 | - | let dm = toBase58String(value(bp)) | |
1416 | + | @Callable(cP) | |
1417 | + | func getOneTknV2READONLY (fL,hz) = { | |
1418 | + | let dj = toBase58String(value(bm)) | |
1426 | 1419 | let dk = toBase58String(value(bn)) | |
1427 | - | let cB = [toBigInt(bP(dl)), toBigInt(bP(dm))] | |
1428 | - | let eK = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dk)), "invalid lp asset").quantity) | |
1429 | - | let cd = cA(cB) | |
1430 | - | let cc = (cd - fraction(toBigInt(hC), cd, eK)) | |
1431 | - | let hD = if ((fN == dl)) | |
1420 | + | let di = toBase58String(value(bl)) | |
1421 | + | let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))] | |
1422 | + | let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity) | |
1423 | + | let cb = cy(cz) | |
1424 | + | let ca = (cb - fraction(toBigInt(hz), cb, eI)) | |
1425 | + | let hA = if ((fL == dj)) | |
1432 | 1426 | then 0 | |
1433 | - | else if (( | |
1427 | + | else if ((fL == dk)) | |
1434 | 1428 | then 1 | |
1435 | 1429 | else throw("invalid out asset id") | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | let | |
1440 | - | let | |
1441 | - | let | |
1442 | - | $Tuple2(nil, $Tuple2( | |
1430 | + | let hB = es(cz, hA, ca) | |
1431 | + | let gA = (cz[hA] - hB) | |
1432 | + | let gB = max([0, toInt((gA - f))]) | |
1433 | + | let hC = cv(gB, aT) | |
1434 | + | let fU = hC._1 | |
1435 | + | let cx = hC._2 | |
1436 | + | $Tuple2(nil, $Tuple2(fU, cx)) | |
1443 | 1437 | } | |
1444 | 1438 | ||
1445 | 1439 | ||
1446 | 1440 | ||
1447 | - | @Callable(cR) | |
1448 | - | func getOneTknV2WithBonusREADONLY (fN,hC) = { | |
1449 | - | let dl = toBase58String(value(bo)) | |
1450 | - | let dm = toBase58String(value(bp)) | |
1441 | + | @Callable(cP) | |
1442 | + | func getOneTknV2WithBonusREADONLY (fL,hz) = { | |
1443 | + | let dj = toBase58String(value(bm)) | |
1451 | 1444 | let dk = toBase58String(value(bn)) | |
1452 | - | let dr = bP(dl) | |
1453 | - | let dt = bP(dm) | |
1454 | - | let hG = { | |
1455 | - | let aU = invoke(this, "getOneTknV2READONLY", [fN, hC], nil) | |
1456 | - | if ($isInstanceOf(aU, "(Int, Int)")) | |
1457 | - | then aU | |
1458 | - | else throw(($getType(aU) + " couldn't be cast to (Int, Int)")) | |
1445 | + | let di = toBase58String(value(bl)) | |
1446 | + | let dp = bN(dj) | |
1447 | + | let dr = bN(dk) | |
1448 | + | let hD = { | |
1449 | + | let aS = invoke(this, "getOneTknV2READONLY", [fL, hz], nil) | |
1450 | + | if ($isInstanceOf(aS, "(Int, Int)")) | |
1451 | + | then aS | |
1452 | + | else throw(($getType(aS) + " couldn't be cast to (Int, Int)")) | |
1459 | 1453 | } | |
1460 | - | let | |
1461 | - | let | |
1462 | - | let | |
1463 | - | let | |
1464 | - | let | |
1465 | - | let | |
1466 | - | let | |
1467 | - | then if (( | |
1454 | + | let fU = hD._1 | |
1455 | + | let cx = hD._2 | |
1456 | + | let dX = dd("", di, hz, this) | |
1457 | + | let dz = dX._1 | |
1458 | + | let dA = dX._2 | |
1459 | + | let hE = (dz + dA) | |
1460 | + | let fJ = if ((hE == 0)) | |
1461 | + | then if ((fU == 0)) | |
1468 | 1462 | then 0 | |
1469 | 1463 | else throw("bonus calculation error") | |
1470 | - | else fraction(( | |
1471 | - | $Tuple2(nil, $Tuple3( | |
1464 | + | else fraction((fU - hE), a, hE) | |
1465 | + | $Tuple2(nil, $Tuple3(fU, cx, fJ)) | |
1472 | 1466 | } | |
1473 | 1467 | ||
1474 | 1468 | ||
1475 | 1469 | ||
1476 | - | @Callable( | |
1477 | - | func getNoLess ( | |
1478 | - | let | |
1479 | - | let | |
1480 | - | let | |
1481 | - | let | |
1482 | - | let | |
1483 | - | let | |
1484 | - | if (( | |
1485 | - | then throw(((("Failed: " + toString( | |
1486 | - | else if (( | |
1487 | - | then throw(((("Failed: " + toString( | |
1470 | + | @Callable(cP) | |
1471 | + | func getNoLess (hF,hG) = { | |
1472 | + | let dX = fj(cP) | |
1473 | + | let dz = dX._1 | |
1474 | + | let dA = dX._2 | |
1475 | + | let dL = dX._3 | |
1476 | + | let df = dX._4 | |
1477 | + | let dB = dX._5 | |
1478 | + | if ((hF > dz)) | |
1479 | + | then throw(((("Failed: " + toString(dz)) + " < ") + toString(hF))) | |
1480 | + | else if ((hG > dA)) | |
1481 | + | then throw(((("Failed: " + toString(dA)) + " < ") + toString(hG))) | |
1488 | 1482 | else { | |
1489 | - | let | |
1490 | - | if (( | |
1483 | + | let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1484 | + | if ((eR == eR)) | |
1491 | 1485 | then { | |
1492 | - | let | |
1493 | - | if (( | |
1486 | + | let hH = invoke(aQ, "burn", [dL], [AttachedPayment(df, dL)]) | |
1487 | + | if ((hH == hH)) | |
1494 | 1488 | then { | |
1495 | - | let | |
1496 | - | let | |
1497 | - | let | |
1498 | - | let | |
1499 | - | if (( | |
1500 | - | then ( | |
1489 | + | let hI = eS(-(dz), -(dA), 0) | |
1490 | + | let gi = hI._1 | |
1491 | + | let eJ = hI._2 | |
1492 | + | let gj = eW(eR, eJ) | |
1493 | + | if ((gj == gj)) | |
1494 | + | then (dB ++ gi) | |
1501 | 1495 | else throw("Strict value is not equal to itself.") | |
1502 | 1496 | } | |
1503 | 1497 | else throw("Strict value is not equal to itself.") | |
1504 | 1498 | } | |
1505 | 1499 | else throw("Strict value is not equal to itself.") | |
1506 | 1500 | } | |
1507 | 1501 | } | |
1508 | 1502 | ||
1509 | 1503 | ||
1510 | 1504 | ||
1511 | - | @Callable( | |
1512 | - | func unstakeAndGet ( | |
1513 | - | let | |
1505 | + | @Callable(cP) | |
1506 | + | func unstakeAndGet (cw) = { | |
1507 | + | let hJ = if ((size(cP.payments) != 0)) | |
1514 | 1508 | then throw("No pmnts expd") | |
1515 | 1509 | else true | |
1516 | - | if (( | |
1510 | + | if ((hJ == hJ)) | |
1517 | 1511 | then { | |
1518 | - | let | |
1519 | - | let | |
1520 | - | let | |
1521 | - | let | |
1522 | - | if (( | |
1512 | + | let hK = bs() | |
1513 | + | let gX = bl | |
1514 | + | let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr") | |
1515 | + | let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1516 | + | if ((eR == eR)) | |
1523 | 1517 | then { | |
1524 | - | let | |
1525 | - | if (( | |
1518 | + | let hM = invoke(hL, "unstake", [toBase58String(gX), cw], nil) | |
1519 | + | if ((hM == hM)) | |
1526 | 1520 | then { | |
1527 | - | let | |
1528 | - | let | |
1529 | - | let | |
1530 | - | let | |
1531 | - | let | |
1532 | - | let | |
1521 | + | let dX = dd(toBase58String(cP.transactionId), toBase58String(gX), cw, cP.caller) | |
1522 | + | let dz = dX._1 | |
1523 | + | let dA = dX._2 | |
1524 | + | let dn = parseIntValue(dX._9) | |
1525 | + | let dB = dX._10 | |
1526 | + | let hN = if (if (aV()) | |
1533 | 1527 | then true | |
1534 | - | else ( | |
1535 | - | then throw(("Blocked: " + toString( | |
1528 | + | else (dn == s)) | |
1529 | + | then throw(("Blocked: " + toString(dn))) | |
1536 | 1530 | else true | |
1537 | - | if (( | |
1531 | + | if ((hN == hN)) | |
1538 | 1532 | then { | |
1539 | - | let | |
1540 | - | if (( | |
1533 | + | let hO = invoke(aQ, "burn", [cw], [AttachedPayment(gX, cw)]) | |
1534 | + | if ((hO == hO)) | |
1541 | 1535 | then { | |
1542 | - | let | |
1543 | - | let | |
1544 | - | let | |
1545 | - | let | |
1546 | - | if (( | |
1547 | - | then ( | |
1536 | + | let hP = eS(-(dz), -(dA), 0) | |
1537 | + | let gi = hP._1 | |
1538 | + | let eJ = hP._2 | |
1539 | + | let gj = eW(eR, eJ) | |
1540 | + | if ((gj == gj)) | |
1541 | + | then (dB ++ gi) | |
1548 | 1542 | else throw("Strict value is not equal to itself.") | |
1549 | 1543 | } | |
1550 | 1544 | else throw("Strict value is not equal to itself.") | |
1551 | 1545 | } | |
1552 | 1546 | else throw("Strict value is not equal to itself.") | |
1553 | 1547 | } | |
1554 | 1548 | else throw("Strict value is not equal to itself.") | |
1555 | 1549 | } | |
1556 | 1550 | else throw("Strict value is not equal to itself.") | |
1557 | 1551 | } | |
1558 | 1552 | else throw("Strict value is not equal to itself.") | |
1559 | 1553 | } | |
1560 | 1554 | ||
1561 | 1555 | ||
1562 | 1556 | ||
1563 | - | @Callable( | |
1564 | - | func unstakeAndGetNoLess ( | |
1565 | - | let | |
1557 | + | @Callable(cP) | |
1558 | + | func unstakeAndGetNoLess (hQ,hR,hG) = { | |
1559 | + | let ht = if (aV()) | |
1566 | 1560 | then true | |
1567 | - | else ( | |
1568 | - | let | |
1561 | + | else (bk == s) | |
1562 | + | let gH = [if (!(ht)) | |
1569 | 1563 | then true | |
1570 | - | else throw("get operation is blocked by admin"), if ((size( | |
1564 | + | else throw("get operation is blocked by admin"), if ((size(cP.payments) == 0)) | |
1571 | 1565 | then true | |
1572 | 1566 | else throw("no payments are expected")] | |
1573 | - | if (( | |
1567 | + | if ((gH == gH)) | |
1574 | 1568 | then { | |
1575 | - | let | |
1576 | - | if (( | |
1569 | + | let eR = eK(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1570 | + | if ((eR == eR)) | |
1577 | 1571 | then { | |
1578 | - | let | |
1579 | - | if (( | |
1572 | + | let hM = invoke(bu, "unstake", [toBase58String(bl), hQ], nil) | |
1573 | + | if ((hM == hM)) | |
1580 | 1574 | then { | |
1581 | - | let | |
1582 | - | let | |
1583 | - | let | |
1584 | - | let | |
1585 | - | let | |
1575 | + | let hS = dd(toBase58String(cP.transactionId), toBase58String(bl), hQ, cP.caller) | |
1576 | + | let dz = hS._1 | |
1577 | + | let dA = hS._2 | |
1578 | + | let dB = hS._10 | |
1579 | + | let hT = [if ((dz >= hR)) | |
1586 | 1580 | then true | |
1587 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1581 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dA >= hG)) | |
1588 | 1582 | then true | |
1589 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1590 | - | if (( | |
1583 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))] | |
1584 | + | if ((hT == hT)) | |
1591 | 1585 | then { | |
1592 | - | let | |
1593 | - | if (( | |
1586 | + | let hH = invoke(aQ, "burn", [hQ], [AttachedPayment(bl, hQ)]) | |
1587 | + | if ((hH == hH)) | |
1594 | 1588 | then { | |
1595 | - | let | |
1596 | - | let | |
1597 | - | let | |
1598 | - | let | |
1599 | - | if (( | |
1600 | - | then ( | |
1589 | + | let hU = eS(-(dz), -(dA), 0) | |
1590 | + | let gi = hU._1 | |
1591 | + | let eJ = hU._2 | |
1592 | + | let gj = eW(eR, eJ) | |
1593 | + | if ((gj == gj)) | |
1594 | + | then (dB ++ gi) | |
1601 | 1595 | else throw("Strict value is not equal to itself.") | |
1602 | 1596 | } | |
1603 | 1597 | else throw("Strict value is not equal to itself.") | |
1604 | 1598 | } | |
1605 | 1599 | else throw("Strict value is not equal to itself.") | |
1606 | 1600 | } | |
1607 | 1601 | else throw("Strict value is not equal to itself.") | |
1608 | 1602 | } | |
1609 | 1603 | else throw("Strict value is not equal to itself.") | |
1610 | 1604 | } | |
1611 | 1605 | else throw("Strict value is not equal to itself.") | |
1612 | 1606 | } | |
1613 | 1607 | ||
1614 | 1608 | ||
1615 | 1609 | ||
1616 | - | @Callable( | |
1617 | - | func unstakeAndGetOneTknV2 ( | |
1618 | - | let | |
1619 | - | let | |
1620 | - | if ($isInstanceOf( | |
1621 | - | then | |
1622 | - | else throw(($getType( | |
1610 | + | @Callable(cP) | |
1611 | + | func unstakeAndGetOneTknV2 (hQ,fL,fM) = { | |
1612 | + | let hh = { | |
1613 | + | let aS = invoke(aQ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1614 | + | if ($isInstanceOf(aS, "Boolean")) | |
1615 | + | then aS | |
1616 | + | else throw(($getType(aS) + " couldn't be cast to Boolean")) | |
1623 | 1617 | } | |
1624 | - | let | |
1618 | + | let ht = if (if (aV()) | |
1625 | 1619 | then true | |
1626 | - | else ( | |
1620 | + | else (bk == s)) | |
1627 | 1621 | then true | |
1628 | - | else | |
1629 | - | let | |
1622 | + | else hh | |
1623 | + | let gH = [if (if (!(ht)) | |
1630 | 1624 | then true | |
1631 | - | else | |
1625 | + | else go(cP)) | |
1632 | 1626 | then true | |
1633 | - | else | |
1627 | + | else aN("get operation is blocked by admin"), if ((size(cP.payments) == 0)) | |
1634 | 1628 | then true | |
1635 | - | else | |
1636 | - | if (( | |
1629 | + | else aN("no payments are expected")] | |
1630 | + | if ((gH == gH)) | |
1637 | 1631 | then { | |
1638 | - | let | |
1639 | - | let | |
1640 | - | let | |
1641 | - | let | |
1642 | - | let | |
1643 | - | let | |
1644 | - | if (( | |
1632 | + | let hK = bs() | |
1633 | + | let gX = bl | |
1634 | + | let hL = valueOrErrorMessage(addressFromString(hK[C]), "Wr st addr") | |
1635 | + | let dh = cP.caller | |
1636 | + | let hV = this | |
1637 | + | let hM = invoke(hL, "unstakeINTERNAL", [gX, hQ, dh.bytes, hV.bytes], nil) | |
1638 | + | if ((hM == hM)) | |
1645 | 1639 | then { | |
1646 | - | let | |
1647 | - | let | |
1648 | - | let | |
1649 | - | $Tuple2( | |
1640 | + | let hW = fK(fL, fM, [AttachedPayment(gX, hQ)], cP.caller, cP.originCaller, cP.transactionId) | |
1641 | + | let dB = hW._1 | |
1642 | + | let fV = hW._2 | |
1643 | + | $Tuple2(dB, fV) | |
1650 | 1644 | } | |
1651 | 1645 | else throw("Strict value is not equal to itself.") | |
1652 | 1646 | } | |
1653 | 1647 | else throw("Strict value is not equal to itself.") | |
1654 | 1648 | } | |
1655 | 1649 | ||
1656 | 1650 | ||
1657 | 1651 | ||
1658 | - | @Callable( | |
1659 | - | func putOneTknV2WithBonusREADONLY ( | |
1660 | - | let | |
1661 | - | let | |
1662 | - | let | |
1663 | - | let | |
1664 | - | let | |
1665 | - | $Tuple2(nil, $Tuple3( | |
1652 | + | @Callable(cP) | |
1653 | + | func putOneTknV2WithBonusREADONLY (hX,hY) = { | |
1654 | + | let hZ = fp(hX, hY, "", "", true) | |
1655 | + | let fE = hZ._1 | |
1656 | + | let dB = hZ._2 | |
1657 | + | let cx = hZ._3 | |
1658 | + | let fJ = hZ._4 | |
1659 | + | $Tuple2(nil, $Tuple3(fE, cx, fJ)) | |
1666 | 1660 | } | |
1667 | 1661 | ||
1668 | 1662 | ||
1669 | 1663 | ||
1670 | - | @Callable( | |
1671 | - | func putOneTknV2WithoutTakeFeeREADONLY ( | |
1672 | - | let | |
1673 | - | let | |
1674 | - | let | |
1675 | - | let | |
1676 | - | let | |
1677 | - | $Tuple2(nil, $Tuple3( | |
1664 | + | @Callable(cP) | |
1665 | + | func putOneTknV2WithoutTakeFeeREADONLY (hX,hY) = { | |
1666 | + | let ia = fp(hX, hY, "", "", false) | |
1667 | + | let fE = ia._1 | |
1668 | + | let dB = ia._2 | |
1669 | + | let cx = ia._3 | |
1670 | + | let fJ = ia._4 | |
1671 | + | $Tuple2(nil, $Tuple3(fE, cx, fJ)) | |
1678 | 1672 | } | |
1679 | 1673 | ||
1680 | 1674 | ||
1681 | 1675 | ||
1682 | - | @Callable( | |
1683 | - | func activate ( | |
1676 | + | @Callable(cP) | |
1677 | + | func activate (ib,ic) = if ((toString(cP.caller) != toString(aQ))) | |
1684 | 1678 | then throw("denied") | |
1685 | - | else $Tuple2([StringEntry(aj(), | |
1679 | + | else $Tuple2([StringEntry(aj(), ib), StringEntry(ak(), ic)], "success") | |
1686 | 1680 | ||
1687 | 1681 | ||
1688 | 1682 | ||
1689 | - | @Callable( | |
1690 | - | func setS ( | |
1691 | - | then | |
1692 | - | else [StringEntry( | |
1683 | + | @Callable(cP) | |
1684 | + | func setS (id,hN) = if ((toString(cP.caller) != aJ(this, am()))) | |
1685 | + | then gn | |
1686 | + | else [StringEntry(id, hN)] | |
1693 | 1687 | ||
1694 | 1688 | ||
1695 | 1689 | ||
1696 | - | @Callable( | |
1697 | - | func setI ( | |
1698 | - | then | |
1699 | - | else [IntegerEntry( | |
1690 | + | @Callable(cP) | |
1691 | + | func setI (id,hN) = if ((toString(cP.caller) != aJ(this, am()))) | |
1692 | + | then gn | |
1693 | + | else [IntegerEntry(id, hN)] | |
1700 | 1694 | ||
1701 | 1695 | ||
1702 | 1696 | ||
1703 | - | @Callable( | |
1704 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1697 | + | @Callable(cP) | |
1698 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aY()) | |
1705 | 1699 | ||
1706 | 1700 | ||
1707 | 1701 | ||
1708 | - | @Callable( | |
1709 | - | func getAccBalanceWrapperREADONLY ( | |
1702 | + | @Callable(cP) | |
1703 | + | func getAccBalanceWrapperREADONLY (bO) = $Tuple2(nil, bN(bO)) | |
1710 | 1704 | ||
1711 | 1705 | ||
1712 | 1706 | ||
1713 | - | @Callable( | |
1714 | - | func calcPricesWrapperREADONLY ( | |
1715 | - | let | |
1716 | - | $Tuple2(nil, [toString( | |
1707 | + | @Callable(cP) | |
1708 | + | func calcPricesWrapperREADONLY (ch,ci,cm) = { | |
1709 | + | let ie = cl(ch, ci, cm) | |
1710 | + | $Tuple2(nil, [toString(ie[0]), toString(ie[1]), toString(ie[2])]) | |
1717 | 1711 | } | |
1718 | 1712 | ||
1719 | 1713 | ||
1720 | 1714 | ||
1721 | - | @Callable( | |
1722 | - | func fromX18WrapperREADONLY (M, | |
1715 | + | @Callable(cP) | |
1716 | + | func fromX18WrapperREADONLY (M,if) = $Tuple2(nil, L(parseBigIntValue(M), if)) | |
1723 | 1717 | ||
1724 | 1718 | ||
1725 | 1719 | ||
1726 | - | @Callable( | |
1720 | + | @Callable(cP) | |
1727 | 1721 | func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J))) | |
1728 | 1722 | ||
1729 | 1723 | ||
1730 | 1724 | ||
1731 | - | @Callable( | |
1732 | - | func calcPriceBigIntWrapperREADONLY ( | |
1725 | + | @Callable(cP) | |
1726 | + | func calcPriceBigIntWrapperREADONLY (bQ,bR) = $Tuple2(nil, toString(bP(parseBigIntValue(bQ), parseBigIntValue(bR)))) | |
1733 | 1727 | ||
1734 | 1728 | ||
1735 | 1729 | ||
1736 | - | @Callable( | |
1737 | - | func estimatePutOperationWrapperREADONLY ( | |
1730 | + | @Callable(cP) | |
1731 | + | func estimatePutOperationWrapperREADONLY (de,bW,dD,dE,dF,dG,ig,dH,dI) = $Tuple2(nil, dC(de, bW, dD, dE, dF, dG, ig, dH, dI, true, false, 0, "")) | |
1738 | 1732 | ||
1739 | 1733 | ||
1740 | 1734 | ||
1741 | - | @Callable( | |
1742 | - | func estimateGetOperationWrapperREADONLY (dg, | |
1743 | - | let | |
1744 | - | $Tuple2(nil, $Tuple10( | |
1735 | + | @Callable(cP) | |
1736 | + | func estimateGetOperationWrapperREADONLY (de,ih,dg,ig) = { | |
1737 | + | let dX = dd(de, ih, dg, addressFromStringValue(ig)) | |
1738 | + | $Tuple2(nil, $Tuple10(dX._1, dX._2, dX._3, dX._4, dX._5, dX._6, dX._7, toString(dX._8), dX._9, dX._10)) | |
1745 | 1739 | } | |
1746 | 1740 | ||
1747 | 1741 | ||
1748 | - | @Verifier( | |
1749 | - | func | |
1750 | - | let | |
1751 | - | let | |
1752 | - | if ($isInstanceOf( | |
1742 | + | @Verifier(ii) | |
1743 | + | func ij () = { | |
1744 | + | let ik = { | |
1745 | + | let gl = gk() | |
1746 | + | if ($isInstanceOf(gl, "ByteVector")) | |
1753 | 1747 | then { | |
1754 | - | let | |
1755 | - | | |
1748 | + | let gp = gl | |
1749 | + | gp | |
1756 | 1750 | } | |
1757 | - | else if ($isInstanceOf( | |
1758 | - | then | |
1751 | + | else if ($isInstanceOf(gl, "Unit")) | |
1752 | + | then ii.senderPublicKey | |
1759 | 1753 | else throw("Match error") | |
1760 | 1754 | } | |
1761 | - | let | |
1762 | - | if ($isInstanceOf( | |
1755 | + | let gl = ii | |
1756 | + | if ($isInstanceOf(gl, "Order")) | |
1763 | 1757 | then { | |
1764 | - | let fb = gn | |
1765 | - | let io = aY() | |
1766 | - | let ip = if (gy()) | |
1767 | - | then $Tuple2(true, "") | |
1768 | - | else fa(fb) | |
1769 | - | let aH = ip._1 | |
1770 | - | let aI = ip._2 | |
1771 | - | let aJ = sigVerify(fb.bodyBytes, fb.proofs[0], fb.senderPublicKey) | |
1772 | - | let aK = sigVerify(fb.bodyBytes, fb.proofs[1], io) | |
1773 | - | if (if (if (aH) | |
1774 | - | then aJ | |
1758 | + | let eZ = gl | |
1759 | + | let il = aW() | |
1760 | + | let im = eY(eZ) | |
1761 | + | let aF = im._1 | |
1762 | + | let aG = im._2 | |
1763 | + | let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey) | |
1764 | + | let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], il) | |
1765 | + | if (if (if (aF) | |
1766 | + | then aH | |
1775 | 1767 | else false) | |
1776 | - | then | |
1768 | + | then aI | |
1777 | 1769 | else false) | |
1778 | 1770 | then true | |
1779 | - | else aG | |
1771 | + | else aE(aF, aG, aH, aI) | |
1780 | 1772 | } | |
1781 | - | else if ($isInstanceOf( | |
1773 | + | else if ($isInstanceOf(gl, "SetScriptTransaction")) | |
1782 | 1774 | then { | |
1783 | - | let | |
1784 | - | if (sigVerify( | |
1775 | + | let cC = gl | |
1776 | + | if (sigVerify(ii.bodyBytes, ii.proofs[0], ik)) | |
1785 | 1777 | then true | |
1786 | 1778 | else { | |
1787 | - | let | |
1788 | - | let | |
1789 | - | let | |
1790 | - | if (( | |
1791 | - | then ( | |
1779 | + | let in = blake2b256(value(cC.script)) | |
1780 | + | let io = fromBase64String(value(getString(aQ, aC()))) | |
1781 | + | let ip = scriptHash(this) | |
1782 | + | if ((io == in)) | |
1783 | + | then (ip != in) | |
1792 | 1784 | else false | |
1793 | 1785 | } | |
1794 | 1786 | } | |
1795 | - | else sigVerify( | |
1787 | + | else sigVerify(ii.bodyBytes, ii.proofs[0], ik) | |
1796 | 1788 | } | |
1797 | 1789 |
github/deemru/w8io/026f985 674.20 ms ◑