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