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