tx · 49ph2Ubvht8ehPvo4xNmpUuTRfhN1WX4eJwhQb5u7yJz 3N8WuBjQMQE3EL6bnrQifBKswJTBoQBioa4: -0.03300000 Waves 2022.11.28 15:31 [2336959] smart account 3N8WuBjQMQE3EL6bnrQifBKswJTBoQBioa4 > SELF 0.00000000 Waves
{ "type": 13, "id": "49ph2Ubvht8ehPvo4xNmpUuTRfhN1WX4eJwhQb5u7yJz", "fee": 3300000, "feeAssetId": null, "timestamp": 1669638537289, "version": 1, "sender": "3N8WuBjQMQE3EL6bnrQifBKswJTBoQBioa4", "senderPublicKey": "233hzBgW8CWQjBMZqjU8qQFzxHgwg2D2zYpDA7XEuNV9", "proofs": [ "bEDQXugkc8KqYmxtKHifHLFsjVfpy2G3FzyQG85iaaLAW2LaipGpnLbxZnGQNMm6Rgf1U3QEWQhK8RfhHpydbtn" ], "script": "base64:BgKsLAgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXN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AJEDAggFAmd1BnByb29mcwAABQJndwkA9AMDCAUCZ3UJYm9keUJ5dGVzCQCRAwIIBQJndQZwcm9vZnMAAAUCZ3ew/TAY", "chainId": 84, "height": 2336959, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EdiGUyLXds39RkW7tc7c1t4Kk3gRSfqX2sWhrCr5VDnb Next: 58hziLiL8NNUT2q3pcQsyaz7LxEkbUS5NrmdyBivvWTs Diff:
Old | New | Differences | |
---|---|---|---|
412 | 412 | let dj = if ((cX.orderType == Buy)) | |
413 | 413 | then (ch >= di) | |
414 | 414 | else (di >= ch) | |
415 | - | true | |
415 | + | let dk = valueOrErrorMessage(getInteger(this, af), aI("kLp is required")) | |
416 | + | let dl = 0 | |
417 | + | let dm = (dl > dk) | |
418 | + | dm | |
416 | 419 | } | |
417 | 420 | } | |
418 | 421 | } | |
419 | 422 | ||
420 | 423 | ||
421 | - | func | |
424 | + | func dn (do) = if ((size(do.payments) != 1)) | |
422 | 425 | then throw("exactly 1 payment is expected") | |
423 | 426 | else { | |
424 | - | let | |
425 | - | let bV = value( | |
426 | - | let | |
427 | - | let cG = bT(toBase58String( | |
427 | + | let dp = value(do.payments[0]) | |
428 | + | let bV = value(dp.assetId) | |
429 | + | let dq = dp.amount | |
430 | + | let cG = bT(toBase58String(do.transactionId), toBase58String(bV), dq, do.caller) | |
428 | 431 | let cm = cG._1 | |
429 | 432 | let cn = cG._2 | |
430 | 433 | let ca = parseIntValue(cG._9) | |
433 | 436 | then true | |
434 | 437 | else (ca == n)) | |
435 | 438 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
436 | - | else $Tuple5(cm, cn, | |
439 | + | else $Tuple5(cm, cn, dq, bV, co) | |
437 | 440 | } | |
438 | 441 | ||
439 | 442 | ||
440 | - | func | |
443 | + | func dr (do,cq,cw) = if ((size(do.payments) != 2)) | |
441 | 444 | then throw("exactly 2 payments are expected") | |
442 | 445 | else { | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let ca = parseIntValue( | |
446 | + | let ds = value(do.payments[0]) | |
447 | + | let dt = value(do.payments[1]) | |
448 | + | let du = cp(toBase58String(do.transactionId), cq, ds.amount, ds.assetId, dt.amount, dt.assetId, toString(do.caller), false, cw) | |
449 | + | let ca = parseIntValue(du._8) | |
447 | 450 | if (if (if (aL()) | |
448 | 451 | then true | |
449 | 452 | else (ca == l)) | |
450 | 453 | then true | |
451 | 454 | else (ca == n)) | |
452 | 455 | then throw(("Put operation is blocked by admin. Status = " + toString(ca))) | |
453 | - | else | |
456 | + | else du | |
454 | 457 | } | |
455 | 458 | ||
456 | 459 | ||
457 | - | func | |
458 | - | let | |
459 | - | if (( | |
460 | + | func dv (dw) = { | |
461 | + | let dx = invoke(aJ, "emit", [dw], nil) | |
462 | + | if ((dx == dx)) | |
460 | 463 | then { | |
461 | - | let | |
462 | - | let | |
463 | - | if ($isInstanceOf( | |
464 | + | let dy = { | |
465 | + | let dz = dx | |
466 | + | if ($isInstanceOf(dz, "Address")) | |
464 | 467 | then { | |
465 | - | let | |
466 | - | invoke( | |
468 | + | let dA = dz | |
469 | + | invoke(dA, "emit", [dw], nil) | |
467 | 470 | } | |
468 | 471 | else unit | |
469 | 472 | } | |
470 | - | if (( | |
471 | - | then | |
473 | + | if ((dy == dy)) | |
474 | + | then dw | |
472 | 475 | else throw("Strict value is not equal to itself.") | |
473 | 476 | } | |
474 | 477 | else throw("Strict value is not equal to itself.") | |
475 | 478 | } | |
476 | 479 | ||
477 | 480 | ||
478 | - | func | |
479 | - | let | |
480 | - | $Tuple2(( | |
481 | + | func dB (dw) = { | |
482 | + | let dC = fraction(dw, ae, b) | |
483 | + | $Tuple2((dw - dC), dC) | |
481 | 484 | } | |
482 | 485 | ||
483 | 486 | ||
484 | - | func | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | let | |
487 | + | func dD (dE,dF,X,Y) = { | |
488 | + | let dG = (Y == unit) | |
489 | + | let dH = bw(aS(ba)) | |
490 | + | let dI = bw(aS(bb)) | |
491 | + | let dJ = if ((dF == ba)) | |
489 | 492 | then true | |
490 | - | else if (( | |
493 | + | else if ((dF == bb)) | |
491 | 494 | then false | |
492 | 495 | else aG("invalid asset") | |
493 | - | let dH = if (dD) | |
494 | - | then $Tuple2(dE, dF) | |
495 | - | else if (dG) | |
496 | - | then $Tuple2((dE - dB), dF) | |
497 | - | else $Tuple2(dE, (dF - dB)) | |
498 | - | let dI = dH._1 | |
499 | - | let dJ = dH._2 | |
500 | 496 | let dK = if (dG) | |
501 | - | then $Tuple2(dB, 0) | |
502 | - | else $Tuple2(0, dB) | |
497 | + | then $Tuple2(dH, dI) | |
498 | + | else if (dJ) | |
499 | + | then $Tuple2((dH - dE), dI) | |
500 | + | else $Tuple2(dH, (dI - dE)) | |
503 | 501 | let dL = dK._1 | |
504 | 502 | let dM = dK._2 | |
505 | - | let dN = dy(dL)._1 | |
506 | - | let dO = dy(dM)._1 | |
507 | - | let dP = dy(dB) | |
508 | - | let dQ = dP._1 | |
509 | - | let dz = dP._2 | |
510 | - | let dR = (dI + dN) | |
511 | - | let dS = (dJ + dO) | |
512 | - | let dT = by(D(dS, bd), D(dR, bc)) | |
513 | - | let dU = G(dT, b) | |
514 | - | let dV = if (dG) | |
515 | - | then dI | |
516 | - | else dJ | |
517 | - | let dW = toBigInt(dV) | |
518 | - | let dX = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
519 | - | let dY = if ((dX > f)) | |
503 | + | let dN = if (dJ) | |
504 | + | then $Tuple2(dE, 0) | |
505 | + | else $Tuple2(0, dE) | |
506 | + | let dO = dN._1 | |
507 | + | let dP = dN._2 | |
508 | + | let dQ = dB(dO)._1 | |
509 | + | let dR = dB(dP)._1 | |
510 | + | let dS = dB(dE) | |
511 | + | let dT = dS._1 | |
512 | + | let dC = dS._2 | |
513 | + | let dU = (dL + dQ) | |
514 | + | let dV = (dM + dR) | |
515 | + | let dW = by(D(dV, bd), D(dU, bc)) | |
516 | + | let dX = G(dW, b) | |
517 | + | let dY = if (dJ) | |
518 | + | then dL | |
519 | + | else dM | |
520 | + | let dZ = toBigInt(dY) | |
521 | + | let ea = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
522 | + | let eb = if ((ea > f)) | |
520 | 523 | then true | |
521 | 524 | else aG("initial deposit requires all coins") | |
522 | - | if (( | |
525 | + | if ((eb == eb)) | |
523 | 526 | then { | |
524 | - | let | |
525 | - | let | |
526 | - | let cV = if ( | |
527 | + | let ec = toBigInt(dT) | |
528 | + | let ed = max([0, toInt(((ea * (sqrtBigInt((d + ((ec * d) / dZ)), 18, 18, DOWN) - d)) / d))]) | |
529 | + | let cV = if (dG) | |
527 | 530 | 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(( | |
531 | + | else [IntegerEntry(S(), dX), IntegerEntry(T(height, lastBlock.timestamp), dX), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bh(dO, dP, ed, dX, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
532 | + | let ee = by(D(dM, bd), D(dL, bc)) | |
533 | + | let ef = G(ee, b) | |
534 | + | let eg = { | |
535 | + | let eh = if (dJ) | |
536 | + | then $Tuple2(dO, dL) | |
537 | + | else $Tuple2(dP, dM) | |
538 | + | let dw = eh._1 | |
539 | + | let ei = eh._2 | |
540 | + | let ej = toInt(fraction(ea, toBigInt((dw / 2)), toBigInt(ei))) | |
541 | + | fraction((ed - ej), b, ej) | |
539 | 542 | } | |
540 | - | $Tuple5( | |
543 | + | $Tuple5(ed, cV, dC, eg, dJ) | |
541 | 544 | } | |
542 | 545 | else throw("Strict value is not equal to itself.") | |
543 | 546 | } | |
544 | 547 | ||
545 | 548 | ||
546 | - | func | |
547 | - | let | |
548 | - | let | |
549 | + | func ek (el,dT,dF,X,Y) = { | |
550 | + | let dG = (Y == unit) | |
551 | + | let em = [if ((dF == aZ)) | |
549 | 552 | then true | |
550 | 553 | else aG("invalid lp asset")] | |
551 | - | if (( | |
554 | + | if ((em == em)) | |
552 | 555 | then { | |
553 | - | let | |
556 | + | let en = if ((el == ba)) | |
554 | 557 | then true | |
555 | - | else if (( | |
558 | + | else if ((el == bb)) | |
556 | 559 | then false | |
557 | 560 | else aG("invalid asset") | |
558 | - | let | |
561 | + | let eo = if (en) | |
559 | 562 | then toBigInt(bw(aS(ba))) | |
560 | 563 | else toBigInt(bw(aS(bb))) | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | then | |
565 | - | else | |
566 | - | let | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | then $Tuple4( | |
575 | - | else $Tuple4(0, | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let cV = if ( | |
564 | + | let ep = bw(aS(ba)) | |
565 | + | let eq = bw(aS(bb)) | |
566 | + | let er = if (en) | |
567 | + | then ep | |
568 | + | else eq | |
569 | + | let es = toBigInt(er) | |
570 | + | let ea = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
571 | + | let et = toBigInt(dT) | |
572 | + | let eu = max([0, toInt(((eo * (d - pow((d - ((et * d) / ea)), 18, h, 0, 18, DOWN))) / d))]) | |
573 | + | let ev = dB(eu) | |
574 | + | let ew = ev._1 | |
575 | + | let dC = ev._2 | |
576 | + | let ex = if (en) | |
577 | + | then $Tuple4(ew, 0, (ep - eu), eq) | |
578 | + | else $Tuple4(0, ew, ep, (eq - eu)) | |
579 | + | let ey = ex._1 | |
580 | + | let ez = ex._2 | |
581 | + | let eA = ex._3 | |
582 | + | let eB = ex._4 | |
583 | + | let dW = by(D(eB, bd), D(eA, bc)) | |
584 | + | let dX = G(dW, b) | |
585 | + | let cV = if (dG) | |
583 | 586 | then nil | |
584 | - | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs( | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | fraction(( | |
587 | + | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs(ey, ez, dT, dX, height, lastBlock.timestamp)), IntegerEntry(S(), dX), IntegerEntry(T(height, lastBlock.timestamp), dX)] | |
588 | + | let ee = by(D(eq, bd), D(ep, bc)) | |
589 | + | let ef = G(ee, b) | |
590 | + | let eg = { | |
591 | + | let eC = (toInt(fraction(eo, et, ea)) * 2) | |
592 | + | fraction((ew - eC), b, eC) | |
590 | 593 | } | |
591 | - | $Tuple5( | |
594 | + | $Tuple5(ew, cV, dC, eg, en) | |
592 | 595 | } | |
593 | 596 | else throw("Strict value is not equal to itself.") | |
594 | 597 | } | |
595 | 598 | ||
596 | 599 | ||
597 | - | func | |
598 | - | let | |
599 | - | | |
600 | + | func eD (eE,eF,cb) = { | |
601 | + | let eG = fraction(pow((eE * eF), 0, toBigInt(5), 1, 0, DOWN), d, cb) | |
602 | + | eG | |
600 | 603 | } | |
601 | 604 | ||
602 | 605 | ||
603 | - | func | |
604 | - | let | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
608 | - | let | |
609 | - | $Tuple2( | |
606 | + | func eH (eI,eJ,eK) = { | |
607 | + | let eL = (bw(aS(ba)) + eI) | |
608 | + | let eM = (bw(aS(bb)) + eJ) | |
609 | + | let eN = (value(assetInfo(aZ)).quantity + eK) | |
610 | + | let eG = eD(toBigInt(eL), toBigInt(eM), toBigInt(eN)) | |
611 | + | let eO = [IntegerEntry(ag, height), StringEntry(af, toString(eG))] | |
612 | + | $Tuple2(eO, eG) | |
610 | 613 | } | |
611 | 614 | ||
612 | 615 | ||
613 | - | func | |
614 | - | let | |
615 | - | if ($isInstanceOf( | |
616 | + | func eP () = { | |
617 | + | let dz = getString(Q()) | |
618 | + | if ($isInstanceOf(dz, "String")) | |
616 | 619 | then { | |
617 | - | let | |
618 | - | fromBase58String( | |
620 | + | let eQ = dz | |
621 | + | fromBase58String(eQ) | |
619 | 622 | } | |
620 | - | else if ($isInstanceOf( | |
623 | + | else if ($isInstanceOf(dz, "Unit")) | |
621 | 624 | then unit | |
622 | 625 | else throw("Match error") | |
623 | 626 | } | |
624 | 627 | ||
625 | 628 | ||
626 | - | func | |
627 | - | let | |
628 | - | if ($isInstanceOf( | |
629 | + | func eR () = { | |
630 | + | let dz = getString(R()) | |
631 | + | if ($isInstanceOf(dz, "String")) | |
629 | 632 | then { | |
630 | - | let | |
631 | - | fromBase58String( | |
633 | + | let eQ = dz | |
634 | + | fromBase58String(eQ) | |
632 | 635 | } | |
633 | - | else if ($isInstanceOf( | |
636 | + | else if ($isInstanceOf(dz, "Unit")) | |
634 | 637 | then unit | |
635 | 638 | else throw("Match error") | |
636 | 639 | } | |
637 | 640 | ||
638 | 641 | ||
639 | - | func | |
640 | - | let | |
641 | - | if ($isInstanceOf( | |
642 | + | func eS (do) = { | |
643 | + | let dz = eP() | |
644 | + | if ($isInstanceOf(dz, "ByteVector")) | |
642 | 645 | then { | |
643 | - | let | |
644 | - | ( | |
646 | + | let eT = dz | |
647 | + | (do.callerPublicKey == eT) | |
645 | 648 | } | |
646 | - | else if ($isInstanceOf( | |
647 | - | then ( | |
649 | + | else if ($isInstanceOf(dz, "Unit")) | |
650 | + | then (do.caller == this) | |
648 | 651 | else throw("Match error") | |
649 | 652 | } | |
650 | 653 | ||
651 | 654 | ||
652 | - | func | |
653 | - | let | |
654 | - | let | |
655 | - | if ($isInstanceOf( | |
655 | + | func eU (do) = { | |
656 | + | let eV = throw("Permission denied") | |
657 | + | let dz = eP() | |
658 | + | if ($isInstanceOf(dz, "ByteVector")) | |
656 | 659 | then { | |
657 | - | let | |
658 | - | if (( | |
660 | + | let eT = dz | |
661 | + | if ((do.callerPublicKey == eT)) | |
659 | 662 | then true | |
660 | - | else | |
663 | + | else eV | |
661 | 664 | } | |
662 | - | else if ($isInstanceOf( | |
663 | - | then if (( | |
665 | + | else if ($isInstanceOf(dz, "Unit")) | |
666 | + | then if ((do.caller == this)) | |
664 | 667 | then true | |
665 | - | else | |
668 | + | else eV | |
666 | 669 | else throw("Match error") | |
667 | 670 | } | |
668 | 671 | ||
669 | 672 | ||
670 | - | @Callable( | |
671 | - | func setManager ( | |
672 | - | let | |
673 | - | if (( | |
673 | + | @Callable(do) | |
674 | + | func setManager (eW) = { | |
675 | + | let eX = eU(do) | |
676 | + | if ((eX == eX)) | |
674 | 677 | then { | |
675 | - | let | |
676 | - | if (( | |
677 | - | then [StringEntry(R(), | |
678 | + | let eY = fromBase58String(eW) | |
679 | + | if ((eY == eY)) | |
680 | + | then [StringEntry(R(), eW)] | |
678 | 681 | else throw("Strict value is not equal to itself.") | |
679 | 682 | } | |
680 | 683 | else throw("Strict value is not equal to itself.") | |
682 | 685 | ||
683 | 686 | ||
684 | 687 | ||
685 | - | @Callable( | |
688 | + | @Callable(do) | |
686 | 689 | func confirmManager () = { | |
687 | - | let | |
688 | - | let | |
690 | + | let eZ = eR() | |
691 | + | let fa = if (isDefined(eZ)) | |
689 | 692 | then true | |
690 | 693 | else throw("No pending manager") | |
691 | - | if (( | |
694 | + | if ((fa == fa)) | |
692 | 695 | then { | |
693 | - | let | |
696 | + | let fb = if ((do.callerPublicKey == value(eZ))) | |
694 | 697 | then true | |
695 | 698 | else throw("You are not pending manager") | |
696 | - | if (( | |
697 | - | then [StringEntry(Q(), toBase58String(value( | |
699 | + | if ((fb == fb)) | |
700 | + | then [StringEntry(Q(), toBase58String(value(eZ))), DeleteEntry(R())] | |
698 | 701 | else throw("Strict value is not equal to itself.") | |
699 | 702 | } | |
700 | 703 | else throw("Strict value is not equal to itself.") | |
702 | 705 | ||
703 | 706 | ||
704 | 707 | ||
705 | - | @Callable( | |
706 | - | func put (cq, | |
708 | + | @Callable(do) | |
709 | + | func put (cq,fc) = if ((0 > cq)) | |
707 | 710 | then throw("Invalid slippageTolerance passed") | |
708 | 711 | else { | |
709 | - | let | |
710 | - | let cS = | |
711 | - | let bX = | |
712 | - | let co = | |
713 | - | let cT = | |
714 | - | let cU = | |
715 | - | let | |
716 | - | let | |
717 | - | let | |
718 | - | if (( | |
712 | + | let du = dr(do, cq, true) | |
713 | + | let cS = du._2 | |
714 | + | let bX = du._7 | |
715 | + | let co = du._9 | |
716 | + | let cT = du._10 | |
717 | + | let cU = du._11 | |
718 | + | let fd = du._12 | |
719 | + | let fe = du._13 | |
720 | + | let dx = invoke(aJ, "emit", [cS], nil) | |
721 | + | if ((dx == dx)) | |
719 | 722 | then { | |
720 | - | let | |
721 | - | let | |
722 | - | if ($isInstanceOf( | |
723 | + | let dy = { | |
724 | + | let dz = dx | |
725 | + | if ($isInstanceOf(dz, "Address")) | |
723 | 726 | then { | |
724 | - | let | |
725 | - | invoke( | |
727 | + | let dA = dz | |
728 | + | invoke(dA, "emit", [cS], nil) | |
726 | 729 | } | |
727 | 730 | else unit | |
728 | 731 | } | |
729 | - | if (( | |
732 | + | if ((dy == dy)) | |
730 | 733 | then { | |
731 | - | let | |
732 | - | then invoke(bg, "put", nil, [AttachedPayment( | |
734 | + | let ff = if ((cT > 0)) | |
735 | + | then invoke(bg, "put", nil, [AttachedPayment(fd, cT)]) | |
733 | 736 | else nil | |
734 | - | if (( | |
737 | + | if ((ff == ff)) | |
735 | 738 | then { | |
736 | - | let | |
737 | - | then invoke(bg, "put", nil, [AttachedPayment( | |
739 | + | let fg = if ((cU > 0)) | |
740 | + | then invoke(bg, "put", nil, [AttachedPayment(fe, cU)]) | |
738 | 741 | else nil | |
739 | - | if (( | |
742 | + | if ((fg == fg)) | |
740 | 743 | then { | |
741 | - | let | |
744 | + | let fh = if (fc) | |
742 | 745 | then { | |
743 | - | let | |
744 | - | if (( | |
746 | + | let fi = invoke(bf, "stake", nil, [AttachedPayment(bX, cS)]) | |
747 | + | if ((fi == fi)) | |
745 | 748 | then nil | |
746 | 749 | else throw("Strict value is not equal to itself.") | |
747 | 750 | } | |
748 | - | else [ScriptTransfer( | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | ((co ++ | |
751 | + | else [ScriptTransfer(do.caller, cS, bX)] | |
752 | + | let fj = eH(0, 0, 0) | |
753 | + | let fk = fj._1 | |
754 | + | let eG = fj._2 | |
755 | + | ((co ++ fh) ++ fk) | |
753 | 756 | } | |
754 | 757 | else throw("Strict value is not equal to itself.") | |
755 | 758 | } | |
762 | 765 | ||
763 | 766 | ||
764 | 767 | ||
765 | - | @Callable( | |
766 | - | func putForFree ( | |
768 | + | @Callable(do) | |
769 | + | func putForFree (fl) = if ((0 > fl)) | |
767 | 770 | then throw("Invalid value passed") | |
768 | 771 | else { | |
769 | - | let | |
770 | - | let co = | |
771 | - | let | |
772 | - | let | |
773 | - | let | |
774 | - | (co ++ | |
772 | + | let du = dr(do, fl, false) | |
773 | + | let co = du._9 | |
774 | + | let fm = eH(0, 0, 0) | |
775 | + | let fk = fm._1 | |
776 | + | let eG = fm._2 | |
777 | + | (co ++ fk) | |
775 | 778 | } | |
776 | 779 | ||
777 | 780 | ||
778 | 781 | ||
779 | - | @Callable( | |
780 | - | func putOneTkn ( | |
781 | - | let | |
782 | - | let | |
783 | - | if ($isInstanceOf( | |
784 | - | then | |
785 | - | else throw(($getType( | |
782 | + | @Callable(do) | |
783 | + | func putOneTkn (fn,fo) = { | |
784 | + | let fp = { | |
785 | + | let fq = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
786 | + | if ($isInstanceOf(fq, "Boolean")) | |
787 | + | then fq | |
788 | + | else throw(($getType(fq) + " couldn't be cast to Boolean")) | |
786 | 789 | } | |
787 | - | let | |
790 | + | let fr = if (if (if (aL()) | |
788 | 791 | then true | |
789 | 792 | else (aY == l)) | |
790 | 793 | then true | |
791 | 794 | else (aY == n)) | |
792 | 795 | then true | |
793 | - | else | |
794 | - | let | |
796 | + | else fp | |
797 | + | let em = [if (if (!(fr)) | |
795 | 798 | then true | |
796 | - | else | |
799 | + | else eS(do)) | |
797 | 800 | then true | |
798 | - | else aG("put operation is blocked by admin"), if ((size( | |
801 | + | else aG("put operation is blocked by admin"), if ((size(do.payments) == 1)) | |
799 | 802 | then true | |
800 | 803 | else aG("exactly 1 payment are expected")] | |
801 | - | if (( | |
804 | + | if ((em == em)) | |
802 | 805 | then { | |
803 | - | let | |
804 | - | let | |
805 | - | let | |
806 | - | let X = | |
807 | - | let Y = | |
808 | - | let | |
809 | - | let | |
810 | - | let cV = | |
811 | - | let | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | then ( | |
806 | + | let fs = do.payments[0] | |
807 | + | let dF = fs.assetId | |
808 | + | let dE = fs.amount | |
809 | + | let X = do.caller | |
810 | + | let Y = do.transactionId | |
811 | + | let ft = dD(dE, dF, X, Y) | |
812 | + | let fu = ft._1 | |
813 | + | let cV = ft._2 | |
814 | + | let dC = ft._3 | |
815 | + | let fv = ft._4 | |
816 | + | let dJ = ft._5 | |
817 | + | let fw = if (if ((fn > 0)) | |
818 | + | then (fn > fu) | |
816 | 819 | else false) | |
817 | - | then aG(makeString(["amount to receive is less than ", toString( | |
818 | - | else | |
819 | - | let | |
820 | - | if (( | |
820 | + | then aG(makeString(["amount to receive is less than ", toString(fn)], "")) | |
821 | + | else fu | |
822 | + | let dx = dv(fw) | |
823 | + | if ((dx == dx)) | |
821 | 824 | then { | |
822 | - | let | |
825 | + | let fh = if (fo) | |
823 | 826 | then { | |
824 | - | let | |
825 | - | if (( | |
827 | + | let fx = invoke(bf, "stake", nil, [AttachedPayment(aZ, fw)]) | |
828 | + | if ((fx == fx)) | |
826 | 829 | then nil | |
827 | 830 | else throw("Strict value is not equal to itself.") | |
828 | 831 | } | |
829 | - | else [ScriptTransfer( | |
830 | - | let | |
831 | - | then [ScriptTransfer(aK, | |
832 | + | else [ScriptTransfer(do.caller, fw, aZ)] | |
833 | + | let fy = if ((dC > 0)) | |
834 | + | then [ScriptTransfer(aK, dC, dF)] | |
832 | 835 | else nil | |
833 | - | let | |
836 | + | let fz = if ((this == aK)) | |
834 | 837 | then $Tuple2(0, 0) | |
835 | - | else if ( | |
836 | - | then $Tuple2(-( | |
837 | - | else $Tuple2(0, -( | |
838 | - | let | |
839 | - | let | |
840 | - | let | |
841 | - | let | |
842 | - | let | |
843 | - | $Tuple2((((cV ++ | |
838 | + | else if (dJ) | |
839 | + | then $Tuple2(-(dC), 0) | |
840 | + | else $Tuple2(0, -(dC)) | |
841 | + | let eI = fz._1 | |
842 | + | let eJ = fz._2 | |
843 | + | let fA = eH(eI, eJ, 0) | |
844 | + | let fk = fA._1 | |
845 | + | let eG = fA._2 | |
846 | + | $Tuple2((((cV ++ fh) ++ fy) ++ fk), fw) | |
844 | 847 | } | |
845 | 848 | else throw("Strict value is not equal to itself.") | |
846 | 849 | } | |
849 | 852 | ||
850 | 853 | ||
851 | 854 | ||
852 | - | @Callable( | |
853 | - | func putOneTknREADONLY ( | |
854 | - | let | |
855 | - | let | |
856 | - | let cV = | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
860 | - | $Tuple2(nil, $Tuple3( | |
855 | + | @Callable(do) | |
856 | + | func putOneTknREADONLY (dF,dE) = { | |
857 | + | let fB = dD(dE, aQ(dF), unit, unit) | |
858 | + | let fu = fB._1 | |
859 | + | let cV = fB._2 | |
860 | + | let dC = fB._3 | |
861 | + | let fv = fB._4 | |
862 | + | let dJ = fB._5 | |
863 | + | $Tuple2(nil, $Tuple3(fu, dC, fv)) | |
861 | 864 | } | |
862 | 865 | ||
863 | 866 | ||
864 | 867 | ||
865 | - | @Callable( | |
866 | - | func getOneTkn ( | |
867 | - | let | |
868 | - | let | |
869 | - | if ($isInstanceOf( | |
870 | - | then | |
871 | - | else throw(($getType( | |
868 | + | @Callable(do) | |
869 | + | func getOneTkn (fC,fn) = { | |
870 | + | let fp = { | |
871 | + | let fq = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
872 | + | if ($isInstanceOf(fq, "Boolean")) | |
873 | + | then fq | |
874 | + | else throw(($getType(fq) + " couldn't be cast to Boolean")) | |
872 | 875 | } | |
873 | - | let | |
876 | + | let fD = if (if (aL()) | |
874 | 877 | then true | |
875 | 878 | else (aY == n)) | |
876 | 879 | then true | |
877 | - | else | |
878 | - | let | |
880 | + | else fp | |
881 | + | let em = [if (if (!(fD)) | |
879 | 882 | then true | |
880 | - | else | |
883 | + | else eS(do)) | |
881 | 884 | then true | |
882 | - | else aG("get operation is blocked by admin"), if ((size( | |
885 | + | else aG("get operation is blocked by admin"), if ((size(do.payments) == 1)) | |
883 | 886 | then true | |
884 | 887 | else aG("exactly 1 payment are expected")] | |
885 | - | if (( | |
888 | + | if ((em == em)) | |
886 | 889 | then { | |
887 | - | let | |
888 | - | let | |
889 | - | let | |
890 | - | let | |
891 | - | let X = | |
892 | - | let Y = | |
893 | - | let | |
894 | - | let | |
895 | - | let cV = | |
896 | - | let | |
897 | - | let | |
898 | - | let | |
899 | - | let | |
900 | - | then ( | |
890 | + | let el = aQ(fC) | |
891 | + | let fs = do.payments[0] | |
892 | + | let dF = fs.assetId | |
893 | + | let dT = fs.amount | |
894 | + | let X = do.caller | |
895 | + | let Y = do.transactionId | |
896 | + | let fE = ek(el, dT, dF, X, Y) | |
897 | + | let fF = fE._1 | |
898 | + | let cV = fE._2 | |
899 | + | let dC = fE._3 | |
900 | + | let fv = fE._4 | |
901 | + | let en = fE._5 | |
902 | + | let dw = if (if ((fn > 0)) | |
903 | + | then (fn > fF) | |
901 | 904 | else false) | |
902 | - | then aG(makeString(["amount to receive is less than ", toString( | |
903 | - | else | |
904 | - | let | |
905 | - | if (( | |
905 | + | then aG(makeString(["amount to receive is less than ", toString(fn)], "")) | |
906 | + | else fF | |
907 | + | let fG = invoke(aJ, "burn", [dT], [AttachedPayment(dF, dT)]) | |
908 | + | if ((fG == fG)) | |
906 | 909 | then { | |
907 | - | let | |
908 | - | let | |
909 | - | then [ScriptTransfer(aK, | |
910 | + | let fH = [ScriptTransfer(X, dw, el)] | |
911 | + | let fy = if ((dC > 0)) | |
912 | + | then [ScriptTransfer(aK, dC, el)] | |
910 | 913 | else nil | |
911 | - | let | |
912 | - | let | |
914 | + | let fI = { | |
915 | + | let fJ = if ((this == aK)) | |
913 | 916 | then 0 | |
914 | - | else | |
915 | - | if ( | |
916 | - | then $Tuple2(-(( | |
917 | - | else $Tuple2(0, -(( | |
917 | + | else dC | |
918 | + | if (en) | |
919 | + | then $Tuple2(-((dw + fJ)), 0) | |
920 | + | else $Tuple2(0, -((dw + fJ))) | |
918 | 921 | } | |
919 | - | let | |
920 | - | let | |
921 | - | let | |
922 | - | let | |
923 | - | let | |
924 | - | $Tuple2((((cV ++ | |
922 | + | let eI = fI._1 | |
923 | + | let eJ = fI._2 | |
924 | + | let fK = eH(eI, eJ, 0) | |
925 | + | let fk = fK._1 | |
926 | + | let eG = fK._2 | |
927 | + | $Tuple2((((cV ++ fH) ++ fy) ++ fk), dw) | |
925 | 928 | } | |
926 | 929 | else throw("Strict value is not equal to itself.") | |
927 | 930 | } | |
930 | 933 | ||
931 | 934 | ||
932 | 935 | ||
933 | - | @Callable( | |
934 | - | func getOneTknREADONLY ( | |
935 | - | let | |
936 | - | let | |
937 | - | let cV = | |
938 | - | let | |
939 | - | let | |
940 | - | let | |
941 | - | $Tuple2(nil, $Tuple3( | |
936 | + | @Callable(do) | |
937 | + | func getOneTknREADONLY (el,dT) = { | |
938 | + | let fL = ek(aQ(el), dT, aZ, unit, unit) | |
939 | + | let fF = fL._1 | |
940 | + | let cV = fL._2 | |
941 | + | let dC = fL._3 | |
942 | + | let fv = fL._4 | |
943 | + | let en = fL._5 | |
944 | + | $Tuple2(nil, $Tuple3(fF, dC, fv)) | |
942 | 945 | } | |
943 | 946 | ||
944 | 947 | ||
945 | 948 | ||
946 | - | @Callable( | |
947 | - | func unstakeAndGetOneTkn ( | |
948 | - | let | |
949 | - | let | |
950 | - | if ($isInstanceOf( | |
951 | - | then | |
952 | - | else throw(($getType( | |
949 | + | @Callable(do) | |
950 | + | func unstakeAndGetOneTkn (fM,fC,fn) = { | |
951 | + | let fp = { | |
952 | + | let fq = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
953 | + | if ($isInstanceOf(fq, "Boolean")) | |
954 | + | then fq | |
955 | + | else throw(($getType(fq) + " couldn't be cast to Boolean")) | |
953 | 956 | } | |
954 | - | let | |
957 | + | let fD = if (if (aL()) | |
955 | 958 | then true | |
956 | 959 | else (aY == n)) | |
957 | 960 | then true | |
958 | - | else | |
959 | - | let | |
961 | + | else fp | |
962 | + | let em = [if (if (!(fD)) | |
960 | 963 | then true | |
961 | - | else | |
964 | + | else eS(do)) | |
962 | 965 | then true | |
963 | - | else aG("get operation is blocked by admin"), if ((size( | |
966 | + | else aG("get operation is blocked by admin"), if ((size(do.payments) == 0)) | |
964 | 967 | then true | |
965 | 968 | else aG("no payments are expected")] | |
966 | - | if (( | |
969 | + | if ((em == em)) | |
967 | 970 | then { | |
968 | - | let | |
969 | - | let X = | |
970 | - | let Y = | |
971 | - | let | |
972 | - | if (( | |
971 | + | let el = aQ(fC) | |
972 | + | let X = do.caller | |
973 | + | let Y = do.transactionId | |
974 | + | let fN = invoke(bf, "unstake", [toBase58String(aZ), fM], nil) | |
975 | + | if ((fN == fN)) | |
973 | 976 | then { | |
974 | - | let | |
975 | - | let | |
976 | - | let cV = | |
977 | - | let | |
978 | - | let | |
979 | - | let | |
980 | - | let | |
981 | - | then ( | |
977 | + | let fO = ek(el, fM, aZ, X, Y) | |
978 | + | let fF = fO._1 | |
979 | + | let cV = fO._2 | |
980 | + | let dC = fO._3 | |
981 | + | let fv = fO._4 | |
982 | + | let en = fO._5 | |
983 | + | let dw = if (if ((fn > 0)) | |
984 | + | then (fn > fF) | |
982 | 985 | else false) | |
983 | - | then aG(makeString(["amount to receive is less than ", toString( | |
984 | - | else | |
985 | - | let | |
986 | - | if (( | |
986 | + | then aG(makeString(["amount to receive is less than ", toString(fn)], "")) | |
987 | + | else fF | |
988 | + | let fG = invoke(aJ, "burn", [fM], [AttachedPayment(aZ, fM)]) | |
989 | + | if ((fG == fG)) | |
987 | 990 | then { | |
988 | - | let | |
989 | - | let | |
990 | - | then [ScriptTransfer(aK, | |
991 | + | let fH = [ScriptTransfer(do.caller, dw, el)] | |
992 | + | let fy = if ((dC > 0)) | |
993 | + | then [ScriptTransfer(aK, dC, el)] | |
991 | 994 | else nil | |
992 | - | let | |
993 | - | let | |
995 | + | let fP = { | |
996 | + | let fJ = if ((this == aK)) | |
994 | 997 | then 0 | |
995 | - | else | |
996 | - | if ( | |
997 | - | then $Tuple2(-(( | |
998 | - | else $Tuple2(0, -(( | |
998 | + | else dC | |
999 | + | if (en) | |
1000 | + | then $Tuple2(-((dw + fJ)), 0) | |
1001 | + | else $Tuple2(0, -((dw + fJ))) | |
999 | 1002 | } | |
1000 | - | let | |
1001 | - | let | |
1002 | - | let | |
1003 | - | let | |
1004 | - | let | |
1005 | - | $Tuple2((((cV ++ | |
1003 | + | let eI = fP._1 | |
1004 | + | let eJ = fP._2 | |
1005 | + | let fQ = eH(eI, eJ, 0) | |
1006 | + | let fk = fQ._1 | |
1007 | + | let eG = fQ._2 | |
1008 | + | $Tuple2((((cV ++ fH) ++ fy) ++ fk), dw) | |
1006 | 1009 | } | |
1007 | 1010 | else throw("Strict value is not equal to itself.") | |
1008 | 1011 | } | |
1013 | 1016 | ||
1014 | 1017 | ||
1015 | 1018 | ||
1016 | - | @Callable( | |
1019 | + | @Callable(do) | |
1017 | 1020 | func get () = { | |
1018 | - | let cG = | |
1019 | - | let | |
1021 | + | let cG = dn(do) | |
1022 | + | let fR = cG._1 | |
1020 | 1023 | let cn = cG._2 | |
1021 | - | let | |
1024 | + | let dq = cG._3 | |
1022 | 1025 | let bV = cG._4 | |
1023 | 1026 | let co = cG._5 | |
1024 | - | let | |
1025 | - | if (( | |
1027 | + | let fS = invoke(aJ, "burn", [dq], [AttachedPayment(bV, dq)]) | |
1028 | + | if ((fS == fS)) | |
1026 | 1029 | then { | |
1027 | - | let | |
1028 | - | let | |
1029 | - | let | |
1030 | - | (co ++ | |
1030 | + | let fT = eH(-(fR), -(cn), 0) | |
1031 | + | let fk = fT._1 | |
1032 | + | let eG = fT._2 | |
1033 | + | (co ++ fk) | |
1031 | 1034 | } | |
1032 | 1035 | else throw("Strict value is not equal to itself.") | |
1033 | 1036 | } | |
1034 | 1037 | ||
1035 | 1038 | ||
1036 | 1039 | ||
1037 | - | @Callable( | |
1038 | - | func getNoLess ( | |
1039 | - | let cG = | |
1040 | + | @Callable(do) | |
1041 | + | func getNoLess (fU,fV) = { | |
1042 | + | let cG = dn(do) | |
1040 | 1043 | let cm = cG._1 | |
1041 | 1044 | let cn = cG._2 | |
1042 | - | let | |
1045 | + | let dq = cG._3 | |
1043 | 1046 | let bV = cG._4 | |
1044 | 1047 | let co = cG._5 | |
1045 | - | if (( | |
1046 | - | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString( | |
1047 | - | else if (( | |
1048 | - | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString( | |
1048 | + | if ((fU > cm)) | |
1049 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString(fU))) | |
1050 | + | else if ((fV > cn)) | |
1051 | + | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString(fV))) | |
1049 | 1052 | else { | |
1050 | - | let | |
1051 | - | if (( | |
1053 | + | let fS = invoke(aJ, "burn", [dq], [AttachedPayment(bV, dq)]) | |
1054 | + | if ((fS == fS)) | |
1052 | 1055 | then { | |
1053 | - | let | |
1054 | - | let | |
1055 | - | let | |
1056 | - | (co ++ | |
1056 | + | let fW = eH(-(cm), -(cn), 0) | |
1057 | + | let fk = fW._1 | |
1058 | + | let eG = fW._2 | |
1059 | + | (co ++ fk) | |
1057 | 1060 | } | |
1058 | 1061 | else throw("Strict value is not equal to itself.") | |
1059 | 1062 | } | |
1061 | 1064 | ||
1062 | 1065 | ||
1063 | 1066 | ||
1064 | - | @Callable( | |
1065 | - | func unstakeAndGet ( | |
1066 | - | let | |
1067 | + | @Callable(do) | |
1068 | + | func unstakeAndGet (dw) = { | |
1069 | + | let fX = if ((size(do.payments) != 0)) | |
1067 | 1070 | then throw("No payments are expected") | |
1068 | 1071 | else true | |
1069 | - | if (( | |
1072 | + | if ((fX == fX)) | |
1070 | 1073 | then { | |
1071 | 1074 | let bK = aN() | |
1072 | 1075 | let bX = fromBase58String(bK[q]) | |
1073 | - | let | |
1074 | - | if (( | |
1076 | + | let fN = invoke(bf, "unstake", [toBase58String(bX), dw], nil) | |
1077 | + | if ((fN == fN)) | |
1075 | 1078 | then { | |
1076 | - | let cG = bT(toBase58String( | |
1079 | + | let cG = bT(toBase58String(do.transactionId), toBase58String(bX), dw, do.caller) | |
1077 | 1080 | let cm = cG._1 | |
1078 | 1081 | let cn = cG._2 | |
1079 | 1082 | let ca = parseIntValue(cG._9) | |
1080 | 1083 | let co = cG._10 | |
1081 | - | let | |
1084 | + | let fY = if (if (aL()) | |
1082 | 1085 | then true | |
1083 | 1086 | else (ca == n)) | |
1084 | 1087 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
1085 | 1088 | else true | |
1086 | - | if (( | |
1089 | + | if ((fY == fY)) | |
1087 | 1090 | then { | |
1088 | - | let | |
1089 | - | if (( | |
1091 | + | let fS = invoke(aJ, "burn", [dw], [AttachedPayment(bX, dw)]) | |
1092 | + | if ((fS == fS)) | |
1090 | 1093 | then { | |
1091 | - | let | |
1092 | - | let | |
1093 | - | let | |
1094 | - | (co ++ | |
1094 | + | let fZ = eH(-(cm), -(cn), 0) | |
1095 | + | let fk = fZ._1 | |
1096 | + | let eG = fZ._2 | |
1097 | + | (co ++ fk) | |
1095 | 1098 | } | |
1096 | 1099 | else throw("Strict value is not equal to itself.") | |
1097 | 1100 | } | |
1104 | 1107 | ||
1105 | 1108 | ||
1106 | 1109 | ||
1107 | - | @Callable( | |
1108 | - | func unstakeAndGetNoLess ( | |
1109 | - | let | |
1110 | + | @Callable(do) | |
1111 | + | func unstakeAndGetNoLess (fM,ga,fV) = { | |
1112 | + | let fD = if (aL()) | |
1110 | 1113 | then true | |
1111 | 1114 | else (aY == n) | |
1112 | - | let | |
1115 | + | let em = [if (!(fD)) | |
1113 | 1116 | then true | |
1114 | - | else throw("get operation is blocked by admin"), if ((size( | |
1117 | + | else throw("get operation is blocked by admin"), if ((size(do.payments) == 0)) | |
1115 | 1118 | then true | |
1116 | 1119 | else throw("no payments are expected")] | |
1117 | - | if (( | |
1120 | + | if ((em == em)) | |
1118 | 1121 | then { | |
1119 | - | let | |
1120 | - | if (( | |
1122 | + | let fN = invoke(bf, "unstake", [toBase58String(aZ), fM], nil) | |
1123 | + | if ((fN == fN)) | |
1121 | 1124 | then { | |
1122 | - | let cG = bT(toBase58String( | |
1125 | + | let cG = bT(toBase58String(do.transactionId), toBase58String(aZ), fM, do.caller) | |
1123 | 1126 | let cm = cG._1 | |
1124 | 1127 | let cn = cG._2 | |
1125 | 1128 | let co = cG._10 | |
1126 | - | let | |
1129 | + | let gb = [if ((cm >= ga)) | |
1127 | 1130 | then true | |
1128 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1131 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(ga)], "")), if ((cn >= fV)) | |
1129 | 1132 | then true | |
1130 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1131 | - | if (( | |
1133 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fV)], ""))] | |
1134 | + | if ((gb == gb)) | |
1132 | 1135 | then { | |
1133 | - | let | |
1134 | - | if (( | |
1136 | + | let fS = invoke(aJ, "burn", [fM], [AttachedPayment(aZ, fM)]) | |
1137 | + | if ((fS == fS)) | |
1135 | 1138 | then { | |
1136 | - | let | |
1137 | - | let | |
1138 | - | let | |
1139 | - | (co ++ | |
1139 | + | let gc = eH(-(cm), -(cn), 0) | |
1140 | + | let fk = gc._1 | |
1141 | + | let eG = gc._2 | |
1142 | + | (co ++ fk) | |
1140 | 1143 | } | |
1141 | 1144 | else throw("Strict value is not equal to itself.") | |
1142 | 1145 | } | |
1149 | 1152 | ||
1150 | 1153 | ||
1151 | 1154 | ||
1152 | - | @Callable( | |
1153 | - | func activate ( | |
1155 | + | @Callable(do) | |
1156 | + | func activate (gd,ge) = if ((toString(do.caller) != toString(aJ))) | |
1154 | 1157 | then throw("permissions denied") | |
1155 | - | else $Tuple2([StringEntry(aa(), | |
1158 | + | else $Tuple2([StringEntry(aa(), gd), StringEntry(ab(), ge)], "success") | |
1156 | 1159 | ||
1157 | 1160 | ||
1158 | 1161 | ||
1159 | - | @Callable( | |
1162 | + | @Callable(do) | |
1160 | 1163 | func refreshKLp () = { | |
1161 | - | let | |
1162 | - | let | |
1164 | + | let gf = valueOrElse(getInteger(ag), 0) | |
1165 | + | let gg = if (((height - gf) >= aj)) | |
1163 | 1166 | then unit | |
1164 | 1167 | else aG(makeString([toString(aj), " blocks have not passed since the previous call"], "")) | |
1165 | - | if (( | |
1168 | + | if ((gg == gg)) | |
1166 | 1169 | then { | |
1167 | - | let | |
1168 | - | let | |
1169 | - | let | |
1170 | - | $Tuple2( | |
1170 | + | let gh = eH(0, 0, 0) | |
1171 | + | let eO = gh._1 | |
1172 | + | let eG = gh._2 | |
1173 | + | $Tuple2(eO, toString(eG)) | |
1171 | 1174 | } | |
1172 | 1175 | else throw("Strict value is not equal to itself.") | |
1173 | 1176 | } | |
1174 | 1177 | ||
1175 | 1178 | ||
1176 | 1179 | ||
1177 | - | @Callable( | |
1180 | + | @Callable(do) | |
1178 | 1181 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aN()) | |
1179 | 1182 | ||
1180 | 1183 | ||
1181 | 1184 | ||
1182 | - | @Callable( | |
1185 | + | @Callable(do) | |
1183 | 1186 | func getAccBalanceWrapperREADONLY (bx) = $Tuple2(nil, bw(bx)) | |
1184 | 1187 | ||
1185 | 1188 | ||
1186 | 1189 | ||
1187 | - | @Callable( | |
1190 | + | @Callable(do) | |
1188 | 1191 | func calcPricesWrapperREADONLY (bE,bF,bJ) = { | |
1189 | 1192 | let bS = bI(bE, bF, bJ) | |
1190 | 1193 | $Tuple2(nil, [toString(bS[0]), toString(bS[1]), toString(bS[2])]) | |
1192 | 1195 | ||
1193 | 1196 | ||
1194 | 1197 | ||
1195 | - | @Callable( | |
1198 | + | @Callable(do) | |
1196 | 1199 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1197 | 1200 | ||
1198 | 1201 | ||
1199 | 1202 | ||
1200 | - | @Callable( | |
1203 | + | @Callable(do) | |
1201 | 1204 | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1202 | 1205 | ||
1203 | 1206 | ||
1204 | 1207 | ||
1205 | - | @Callable( | |
1208 | + | @Callable(do) | |
1206 | 1209 | func calcPriceBigIntWrapperREADONLY (bz,bA) = $Tuple2(nil, toString(by(parseBigIntValue(bz), parseBigIntValue(bA)))) | |
1207 | 1210 | ||
1208 | 1211 | ||
1209 | 1212 | ||
1210 | - | @Callable( | |
1213 | + | @Callable(do) | |
1211 | 1214 | func estimatePutOperationWrapperREADONLY (bU,cq,cr,cs,ct,cu,X,cv,cw) = $Tuple2(nil, cp(bU, cq, cr, cs, ct, cu, X, cv, cw)) | |
1212 | 1215 | ||
1213 | 1216 | ||
1214 | 1217 | ||
1215 | - | @Callable( | |
1218 | + | @Callable(do) | |
1216 | 1219 | func estimateGetOperationWrapperREADONLY (bU,bV,bW,X) = { | |
1217 | 1220 | let cG = bT(bU, bV, bW, addressFromStringValue(X)) | |
1218 | 1221 | $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 | 1223 | ||
1221 | 1224 | ||
1222 | 1225 | ||
1223 | - | @Callable( | |
1226 | + | @Callable(do) | |
1224 | 1227 | func statsREADONLY () = { | |
1225 | 1228 | let bK = aN() | |
1226 | 1229 | let bX = fromBase58String(bK[q]) | |
1230 | 1233 | let cA = bK[w] | |
1231 | 1234 | let bL = parseIntValue(bK[t]) | |
1232 | 1235 | let bM = parseIntValue(bK[u]) | |
1233 | - | let | |
1236 | + | let gi = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1234 | 1237 | let da = bw(cY) | |
1235 | 1238 | let db = bw(cZ) | |
1236 | - | let | |
1239 | + | let gj = if ((gi == 0)) | |
1237 | 1240 | then [e, e, e] | |
1238 | - | else bI(da, db, | |
1241 | + | else bI(da, db, gi) | |
1239 | 1242 | let ch = 0 | |
1240 | - | let | |
1241 | - | let | |
1242 | - | let | |
1243 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(da), toString(db), toString( | |
1243 | + | let gk = G(gj[1], b) | |
1244 | + | let gl = G(gj[2], b) | |
1245 | + | let gm = value(getInteger(aJ, au(toString(this)))) | |
1246 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(da), toString(db), toString(gi), toString(ch), toString(gk), toString(gl), toString(gm)], j)) | |
1244 | 1247 | } | |
1245 | 1248 | ||
1246 | 1249 | ||
1247 | 1250 | ||
1248 | - | @Callable( | |
1251 | + | @Callable(do) | |
1249 | 1252 | func evaluatePutByAmountAssetREADONLY (cr) = { | |
1250 | 1253 | let bK = aN() | |
1251 | 1254 | let bX = fromBase58String(bK[q]) | |
1256 | 1259 | let bL = parseIntValue(bK[t]) | |
1257 | 1260 | let bM = parseIntValue(bK[u]) | |
1258 | 1261 | let ca = bK[p] | |
1259 | - | let | |
1262 | + | let gi = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1260 | 1263 | let da = bw(cx) | |
1261 | 1264 | let db = bw(cy) | |
1262 | 1265 | let bG = D(da, bL) | |
1263 | 1266 | let bH = D(db, bM) | |
1264 | - | let cg = if (( | |
1267 | + | let cg = if ((gi == 0)) | |
1265 | 1268 | then e | |
1266 | 1269 | else by(bH, bG) | |
1267 | 1270 | let cD = D(cr, bL) | |
1268 | 1271 | let cE = fraction(cD, cg, d) | |
1269 | 1272 | let ct = G(cE, bM) | |
1270 | - | let | |
1271 | - | let cO = | |
1272 | - | let | |
1273 | - | let cc = | |
1274 | - | let ce = | |
1275 | - | let cb = | |
1273 | + | let du = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1274 | + | let cO = du._1 | |
1275 | + | let gn = du._3 | |
1276 | + | let cc = du._4 | |
1277 | + | let ce = du._5 | |
1278 | + | let cb = du._6 | |
1276 | 1279 | $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 | 1280 | } | |
1278 | 1281 | ||
1279 | 1282 | ||
1280 | 1283 | ||
1281 | - | @Callable( | |
1284 | + | @Callable(do) | |
1282 | 1285 | func evaluatePutByPriceAssetREADONLY (ct) = { | |
1283 | 1286 | let bK = aN() | |
1284 | 1287 | let bX = fromBase58String(bK[q]) | |
1289 | 1292 | let bL = parseIntValue(bK[t]) | |
1290 | 1293 | let bM = parseIntValue(bK[u]) | |
1291 | 1294 | let ca = bK[p] | |
1292 | - | let | |
1293 | - | let | |
1294 | - | let | |
1295 | - | let | |
1296 | - | let | |
1297 | - | let cg = if (( | |
1295 | + | let gi = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1296 | + | let go = bw(cx) | |
1297 | + | let gp = bw(cy) | |
1298 | + | let gq = D(go, bL) | |
1299 | + | let gr = D(gp, bM) | |
1300 | + | let cg = if ((gi == 0)) | |
1298 | 1301 | then e | |
1299 | - | else by( | |
1302 | + | else by(gr, gq) | |
1300 | 1303 | let cE = D(ct, bM) | |
1301 | 1304 | let cD = fraction(cE, d, cg) | |
1302 | 1305 | let cr = G(cD, bL) | |
1303 | - | let | |
1304 | - | let cO = | |
1305 | - | let | |
1306 | - | let cc = | |
1307 | - | let ce = | |
1308 | - | let cb = | |
1306 | + | let du = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1307 | + | let cO = du._1 | |
1308 | + | let gn = du._3 | |
1309 | + | let cc = du._4 | |
1310 | + | let ce = du._5 | |
1311 | + | let cb = du._6 | |
1309 | 1312 | $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 | 1313 | } | |
1311 | 1314 | ||
1312 | 1315 | ||
1313 | 1316 | ||
1314 | - | @Callable( | |
1315 | - | func evaluateGetREADONLY ( | |
1316 | - | let cG = bT("", | |
1317 | + | @Callable(do) | |
1318 | + | func evaluateGetREADONLY (gs,gt) = { | |
1319 | + | let cG = bT("", gs, gt, this) | |
1317 | 1320 | let cm = cG._1 | |
1318 | 1321 | let cn = cG._2 | |
1319 | 1322 | let cc = cG._5 | |
1325 | 1328 | } | |
1326 | 1329 | ||
1327 | 1330 | ||
1328 | - | @Verifier( | |
1329 | - | func | |
1330 | - | let | |
1331 | - | let | |
1332 | - | if ($isInstanceOf( | |
1331 | + | @Verifier(gu) | |
1332 | + | func gv () = { | |
1333 | + | let gw = { | |
1334 | + | let dz = eP() | |
1335 | + | if ($isInstanceOf(dz, "ByteVector")) | |
1333 | 1336 | then { | |
1334 | - | let | |
1335 | - | | |
1337 | + | let eT = dz | |
1338 | + | eT | |
1336 | 1339 | } | |
1337 | - | else if ($isInstanceOf( | |
1338 | - | then | |
1340 | + | else if ($isInstanceOf(dz, "Unit")) | |
1341 | + | then gu.senderPublicKey | |
1339 | 1342 | else throw("Match error") | |
1340 | 1343 | } | |
1341 | - | let | |
1342 | - | if ($isInstanceOf( | |
1344 | + | let dz = gu | |
1345 | + | if ($isInstanceOf(dz, "Order")) | |
1343 | 1346 | then { | |
1344 | - | let cX = | |
1345 | - | let | |
1347 | + | let cX = dz | |
1348 | + | let gx = aM() | |
1346 | 1349 | let az = cW(cX) | |
1347 | 1350 | let aA = sigVerify(cX.bodyBytes, cX.proofs[0], cX.senderPublicKey) | |
1348 | - | let aB = sigVerify(cX.bodyBytes, cX.proofs[1], | |
1351 | + | let aB = sigVerify(cX.bodyBytes, cX.proofs[1], gx) | |
1349 | 1352 | if (if (if (az) | |
1350 | 1353 | then aA | |
1351 | 1354 | else false) | |
1354 | 1357 | then true | |
1355 | 1358 | else ay(az, aA, aB) | |
1356 | 1359 | } | |
1357 | - | else if ($isInstanceOf( | |
1360 | + | else if ($isInstanceOf(dz, "SetScriptTransaction")) | |
1358 | 1361 | then { | |
1359 | - | let | |
1360 | - | let | |
1361 | - | let | |
1362 | - | let | |
1363 | - | if (if (( | |
1364 | - | then ( | |
1362 | + | let eQ = dz | |
1363 | + | let gy = blake2b256(value(eQ.script)) | |
1364 | + | let gz = fromBase64String(value(getString(aJ, aw()))) | |
1365 | + | let gA = scriptHash(this) | |
1366 | + | if (if ((gz == gy)) | |
1367 | + | then (gA != gy) | |
1365 | 1368 | else false) | |
1366 | 1369 | then true | |
1367 | - | else sigVerify( | |
1370 | + | else sigVerify(gu.bodyBytes, gu.proofs[0], gw) | |
1368 | 1371 | } | |
1369 | - | else sigVerify( | |
1372 | + | else sigVerify(gu.bodyBytes, gu.proofs[0], gw) | |
1370 | 1373 | } | |
1371 | 1374 |
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) = { | |
377 | 377 | let bK = aN() | |
378 | 378 | let cY = bK[r] | |
379 | 379 | let cZ = bK[s] | |
380 | 380 | let ca = parseIntValue(bK[p]) | |
381 | 381 | let bL = parseIntValue(bK[t]) | |
382 | 382 | let bM = parseIntValue(bK[u]) | |
383 | 383 | let da = bw(cY) | |
384 | 384 | let db = bw(cZ) | |
385 | 385 | let cg = if ((cX.orderType == Buy)) | |
386 | 386 | then bB(bL, bM, (da + cX.amount), db) | |
387 | 387 | else bB(bL, bM, (da - cX.amount), db) | |
388 | 388 | let ch = G(cg, b) | |
389 | 389 | if (if (if (aL()) | |
390 | 390 | then true | |
391 | 391 | else (ca == m)) | |
392 | 392 | then true | |
393 | 393 | else (ca == n)) | |
394 | 394 | then throw("Exchange operations disabled") | |
395 | 395 | else { | |
396 | 396 | let dc = cX.assetPair.amountAsset | |
397 | 397 | let dd = if ((dc == unit)) | |
398 | 398 | then "WAVES" | |
399 | 399 | else toBase58String(value(dc)) | |
400 | 400 | let de = cX.assetPair.priceAsset | |
401 | 401 | let df = if ((de == unit)) | |
402 | 402 | then "WAVES" | |
403 | 403 | else toBase58String(value(de)) | |
404 | 404 | if (if ((dd != cY)) | |
405 | 405 | then true | |
406 | 406 | else (df != cZ)) | |
407 | 407 | then throw("Wrong order assets.") | |
408 | 408 | else { | |
409 | 409 | let dg = cX.price | |
410 | 410 | let dh = fraction(b, bM, bL) | |
411 | 411 | let di = J(dg, b, dh) | |
412 | 412 | let dj = if ((cX.orderType == Buy)) | |
413 | 413 | then (ch >= di) | |
414 | 414 | else (di >= ch) | |
415 | - | true | |
415 | + | let dk = valueOrErrorMessage(getInteger(this, af), aI("kLp is required")) | |
416 | + | let dl = 0 | |
417 | + | let dm = (dl > dk) | |
418 | + | dm | |
416 | 419 | } | |
417 | 420 | } | |
418 | 421 | } | |
419 | 422 | ||
420 | 423 | ||
421 | - | func | |
424 | + | func dn (do) = if ((size(do.payments) != 1)) | |
422 | 425 | then throw("exactly 1 payment is expected") | |
423 | 426 | else { | |
424 | - | let | |
425 | - | let bV = value( | |
426 | - | let | |
427 | - | let cG = bT(toBase58String( | |
427 | + | let dp = value(do.payments[0]) | |
428 | + | let bV = value(dp.assetId) | |
429 | + | let dq = dp.amount | |
430 | + | let cG = bT(toBase58String(do.transactionId), toBase58String(bV), dq, do.caller) | |
428 | 431 | let cm = cG._1 | |
429 | 432 | let cn = cG._2 | |
430 | 433 | let ca = parseIntValue(cG._9) | |
431 | 434 | let co = cG._10 | |
432 | 435 | if (if (aL()) | |
433 | 436 | then true | |
434 | 437 | else (ca == n)) | |
435 | 438 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
436 | - | else $Tuple5(cm, cn, | |
439 | + | else $Tuple5(cm, cn, dq, bV, co) | |
437 | 440 | } | |
438 | 441 | ||
439 | 442 | ||
440 | - | func | |
443 | + | func dr (do,cq,cw) = if ((size(do.payments) != 2)) | |
441 | 444 | then throw("exactly 2 payments are expected") | |
442 | 445 | else { | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let ca = parseIntValue( | |
446 | + | let ds = value(do.payments[0]) | |
447 | + | let dt = value(do.payments[1]) | |
448 | + | let du = cp(toBase58String(do.transactionId), cq, ds.amount, ds.assetId, dt.amount, dt.assetId, toString(do.caller), false, cw) | |
449 | + | let ca = parseIntValue(du._8) | |
447 | 450 | if (if (if (aL()) | |
448 | 451 | then true | |
449 | 452 | else (ca == l)) | |
450 | 453 | then true | |
451 | 454 | else (ca == n)) | |
452 | 455 | then throw(("Put operation is blocked by admin. Status = " + toString(ca))) | |
453 | - | else | |
456 | + | else du | |
454 | 457 | } | |
455 | 458 | ||
456 | 459 | ||
457 | - | func | |
458 | - | let | |
459 | - | if (( | |
460 | + | func dv (dw) = { | |
461 | + | let dx = invoke(aJ, "emit", [dw], nil) | |
462 | + | if ((dx == dx)) | |
460 | 463 | then { | |
461 | - | let | |
462 | - | let | |
463 | - | if ($isInstanceOf( | |
464 | + | let dy = { | |
465 | + | let dz = dx | |
466 | + | if ($isInstanceOf(dz, "Address")) | |
464 | 467 | then { | |
465 | - | let | |
466 | - | invoke( | |
468 | + | let dA = dz | |
469 | + | invoke(dA, "emit", [dw], nil) | |
467 | 470 | } | |
468 | 471 | else unit | |
469 | 472 | } | |
470 | - | if (( | |
471 | - | then | |
473 | + | if ((dy == dy)) | |
474 | + | then dw | |
472 | 475 | else throw("Strict value is not equal to itself.") | |
473 | 476 | } | |
474 | 477 | else throw("Strict value is not equal to itself.") | |
475 | 478 | } | |
476 | 479 | ||
477 | 480 | ||
478 | - | func | |
479 | - | let | |
480 | - | $Tuple2(( | |
481 | + | func dB (dw) = { | |
482 | + | let dC = fraction(dw, ae, b) | |
483 | + | $Tuple2((dw - dC), dC) | |
481 | 484 | } | |
482 | 485 | ||
483 | 486 | ||
484 | - | func | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | let | |
487 | + | func dD (dE,dF,X,Y) = { | |
488 | + | let dG = (Y == unit) | |
489 | + | let dH = bw(aS(ba)) | |
490 | + | let dI = bw(aS(bb)) | |
491 | + | let dJ = if ((dF == ba)) | |
489 | 492 | then true | |
490 | - | else if (( | |
493 | + | else if ((dF == bb)) | |
491 | 494 | then false | |
492 | 495 | else aG("invalid asset") | |
493 | - | let dH = if (dD) | |
494 | - | then $Tuple2(dE, dF) | |
495 | - | else if (dG) | |
496 | - | then $Tuple2((dE - dB), dF) | |
497 | - | else $Tuple2(dE, (dF - dB)) | |
498 | - | let dI = dH._1 | |
499 | - | let dJ = dH._2 | |
500 | 496 | let dK = if (dG) | |
501 | - | then $Tuple2(dB, 0) | |
502 | - | else $Tuple2(0, dB) | |
497 | + | then $Tuple2(dH, dI) | |
498 | + | else if (dJ) | |
499 | + | then $Tuple2((dH - dE), dI) | |
500 | + | else $Tuple2(dH, (dI - dE)) | |
503 | 501 | let dL = dK._1 | |
504 | 502 | let dM = dK._2 | |
505 | - | let dN = dy(dL)._1 | |
506 | - | let dO = dy(dM)._1 | |
507 | - | let dP = dy(dB) | |
508 | - | let dQ = dP._1 | |
509 | - | let dz = dP._2 | |
510 | - | let dR = (dI + dN) | |
511 | - | let dS = (dJ + dO) | |
512 | - | let dT = by(D(dS, bd), D(dR, bc)) | |
513 | - | let dU = G(dT, b) | |
514 | - | let dV = if (dG) | |
515 | - | then dI | |
516 | - | else dJ | |
517 | - | let dW = toBigInt(dV) | |
518 | - | let dX = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
519 | - | let dY = if ((dX > f)) | |
503 | + | let dN = if (dJ) | |
504 | + | then $Tuple2(dE, 0) | |
505 | + | else $Tuple2(0, dE) | |
506 | + | let dO = dN._1 | |
507 | + | let dP = dN._2 | |
508 | + | let dQ = dB(dO)._1 | |
509 | + | let dR = dB(dP)._1 | |
510 | + | let dS = dB(dE) | |
511 | + | let dT = dS._1 | |
512 | + | let dC = dS._2 | |
513 | + | let dU = (dL + dQ) | |
514 | + | let dV = (dM + dR) | |
515 | + | let dW = by(D(dV, bd), D(dU, bc)) | |
516 | + | let dX = G(dW, b) | |
517 | + | let dY = if (dJ) | |
518 | + | then dL | |
519 | + | else dM | |
520 | + | let dZ = toBigInt(dY) | |
521 | + | let ea = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
522 | + | let eb = if ((ea > f)) | |
520 | 523 | then true | |
521 | 524 | else aG("initial deposit requires all coins") | |
522 | - | if (( | |
525 | + | if ((eb == eb)) | |
523 | 526 | then { | |
524 | - | let | |
525 | - | let | |
526 | - | let cV = if ( | |
527 | + | let ec = toBigInt(dT) | |
528 | + | let ed = max([0, toInt(((ea * (sqrtBigInt((d + ((ec * d) / dZ)), 18, 18, DOWN) - d)) / d))]) | |
529 | + | let cV = if (dG) | |
527 | 530 | 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(( | |
531 | + | else [IntegerEntry(S(), dX), IntegerEntry(T(height, lastBlock.timestamp), dX), StringEntry(W(toString(value(X)), toBase58String(value(Y))), bh(dO, dP, ed, dX, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
532 | + | let ee = by(D(dM, bd), D(dL, bc)) | |
533 | + | let ef = G(ee, b) | |
534 | + | let eg = { | |
535 | + | let eh = if (dJ) | |
536 | + | then $Tuple2(dO, dL) | |
537 | + | else $Tuple2(dP, dM) | |
538 | + | let dw = eh._1 | |
539 | + | let ei = eh._2 | |
540 | + | let ej = toInt(fraction(ea, toBigInt((dw / 2)), toBigInt(ei))) | |
541 | + | fraction((ed - ej), b, ej) | |
539 | 542 | } | |
540 | - | $Tuple5( | |
543 | + | $Tuple5(ed, cV, dC, eg, dJ) | |
541 | 544 | } | |
542 | 545 | else throw("Strict value is not equal to itself.") | |
543 | 546 | } | |
544 | 547 | ||
545 | 548 | ||
546 | - | func | |
547 | - | let | |
548 | - | let | |
549 | + | func ek (el,dT,dF,X,Y) = { | |
550 | + | let dG = (Y == unit) | |
551 | + | let em = [if ((dF == aZ)) | |
549 | 552 | then true | |
550 | 553 | else aG("invalid lp asset")] | |
551 | - | if (( | |
554 | + | if ((em == em)) | |
552 | 555 | then { | |
553 | - | let | |
556 | + | let en = if ((el == ba)) | |
554 | 557 | then true | |
555 | - | else if (( | |
558 | + | else if ((el == bb)) | |
556 | 559 | then false | |
557 | 560 | else aG("invalid asset") | |
558 | - | let | |
561 | + | let eo = if (en) | |
559 | 562 | then toBigInt(bw(aS(ba))) | |
560 | 563 | else toBigInt(bw(aS(bb))) | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | then | |
565 | - | else | |
566 | - | let | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | then $Tuple4( | |
575 | - | else $Tuple4(0, | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let cV = if ( | |
564 | + | let ep = bw(aS(ba)) | |
565 | + | let eq = bw(aS(bb)) | |
566 | + | let er = if (en) | |
567 | + | then ep | |
568 | + | else eq | |
569 | + | let es = toBigInt(er) | |
570 | + | let ea = toBigInt(valueOrErrorMessage(assetInfo(aZ), (("asset " + toBase58String(aZ)) + " doesn't exist")).quantity) | |
571 | + | let et = toBigInt(dT) | |
572 | + | let eu = max([0, toInt(((eo * (d - pow((d - ((et * d) / ea)), 18, h, 0, 18, DOWN))) / d))]) | |
573 | + | let ev = dB(eu) | |
574 | + | let ew = ev._1 | |
575 | + | let dC = ev._2 | |
576 | + | let ex = if (en) | |
577 | + | then $Tuple4(ew, 0, (ep - eu), eq) | |
578 | + | else $Tuple4(0, ew, ep, (eq - eu)) | |
579 | + | let ey = ex._1 | |
580 | + | let ez = ex._2 | |
581 | + | let eA = ex._3 | |
582 | + | let eB = ex._4 | |
583 | + | let dW = by(D(eB, bd), D(eA, bc)) | |
584 | + | let dX = G(dW, b) | |
585 | + | let cV = if (dG) | |
583 | 586 | then nil | |
584 | - | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs( | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | fraction(( | |
587 | + | else [StringEntry(Z(toString(value(X)), toBase58String(value(Y))), bs(ey, ez, dT, dX, height, lastBlock.timestamp)), IntegerEntry(S(), dX), IntegerEntry(T(height, lastBlock.timestamp), dX)] | |
588 | + | let ee = by(D(eq, bd), D(ep, bc)) | |
589 | + | let ef = G(ee, b) | |
590 | + | let eg = { | |
591 | + | let eC = (toInt(fraction(eo, et, ea)) * 2) | |
592 | + | fraction((ew - eC), b, eC) | |
590 | 593 | } | |
591 | - | $Tuple5( | |
594 | + | $Tuple5(ew, cV, dC, eg, en) | |
592 | 595 | } | |
593 | 596 | else throw("Strict value is not equal to itself.") | |
594 | 597 | } | |
595 | 598 | ||
596 | 599 | ||
597 | - | func | |
598 | - | let | |
599 | - | | |
600 | + | func eD (eE,eF,cb) = { | |
601 | + | let eG = fraction(pow((eE * eF), 0, toBigInt(5), 1, 0, DOWN), d, cb) | |
602 | + | eG | |
600 | 603 | } | |
601 | 604 | ||
602 | 605 | ||
603 | - | func | |
604 | - | let | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
608 | - | let | |
609 | - | $Tuple2( | |
606 | + | func eH (eI,eJ,eK) = { | |
607 | + | let eL = (bw(aS(ba)) + eI) | |
608 | + | let eM = (bw(aS(bb)) + eJ) | |
609 | + | let eN = (value(assetInfo(aZ)).quantity + eK) | |
610 | + | let eG = eD(toBigInt(eL), toBigInt(eM), toBigInt(eN)) | |
611 | + | let eO = [IntegerEntry(ag, height), StringEntry(af, toString(eG))] | |
612 | + | $Tuple2(eO, eG) | |
610 | 613 | } | |
611 | 614 | ||
612 | 615 | ||
613 | - | func | |
614 | - | let | |
615 | - | if ($isInstanceOf( | |
616 | + | func eP () = { | |
617 | + | let dz = getString(Q()) | |
618 | + | if ($isInstanceOf(dz, "String")) | |
616 | 619 | then { | |
617 | - | let | |
618 | - | fromBase58String( | |
620 | + | let eQ = dz | |
621 | + | fromBase58String(eQ) | |
619 | 622 | } | |
620 | - | else if ($isInstanceOf( | |
623 | + | else if ($isInstanceOf(dz, "Unit")) | |
621 | 624 | then unit | |
622 | 625 | else throw("Match error") | |
623 | 626 | } | |
624 | 627 | ||
625 | 628 | ||
626 | - | func | |
627 | - | let | |
628 | - | if ($isInstanceOf( | |
629 | + | func eR () = { | |
630 | + | let dz = getString(R()) | |
631 | + | if ($isInstanceOf(dz, "String")) | |
629 | 632 | then { | |
630 | - | let | |
631 | - | fromBase58String( | |
633 | + | let eQ = dz | |
634 | + | fromBase58String(eQ) | |
632 | 635 | } | |
633 | - | else if ($isInstanceOf( | |
636 | + | else if ($isInstanceOf(dz, "Unit")) | |
634 | 637 | then unit | |
635 | 638 | else throw("Match error") | |
636 | 639 | } | |
637 | 640 | ||
638 | 641 | ||
639 | - | func | |
640 | - | let | |
641 | - | if ($isInstanceOf( | |
642 | + | func eS (do) = { | |
643 | + | let dz = eP() | |
644 | + | if ($isInstanceOf(dz, "ByteVector")) | |
642 | 645 | then { | |
643 | - | let | |
644 | - | ( | |
646 | + | let eT = dz | |
647 | + | (do.callerPublicKey == eT) | |
645 | 648 | } | |
646 | - | else if ($isInstanceOf( | |
647 | - | then ( | |
649 | + | else if ($isInstanceOf(dz, "Unit")) | |
650 | + | then (do.caller == this) | |
648 | 651 | else throw("Match error") | |
649 | 652 | } | |
650 | 653 | ||
651 | 654 | ||
652 | - | func | |
653 | - | let | |
654 | - | let | |
655 | - | if ($isInstanceOf( | |
655 | + | func eU (do) = { | |
656 | + | let eV = throw("Permission denied") | |
657 | + | let dz = eP() | |
658 | + | if ($isInstanceOf(dz, "ByteVector")) | |
656 | 659 | then { | |
657 | - | let | |
658 | - | if (( | |
660 | + | let eT = dz | |
661 | + | if ((do.callerPublicKey == eT)) | |
659 | 662 | then true | |
660 | - | else | |
663 | + | else eV | |
661 | 664 | } | |
662 | - | else if ($isInstanceOf( | |
663 | - | then if (( | |
665 | + | else if ($isInstanceOf(dz, "Unit")) | |
666 | + | then if ((do.caller == this)) | |
664 | 667 | then true | |
665 | - | else | |
668 | + | else eV | |
666 | 669 | else throw("Match error") | |
667 | 670 | } | |
668 | 671 | ||
669 | 672 | ||
670 | - | @Callable( | |
671 | - | func setManager ( | |
672 | - | let | |
673 | - | if (( | |
673 | + | @Callable(do) | |
674 | + | func setManager (eW) = { | |
675 | + | let eX = eU(do) | |
676 | + | if ((eX == eX)) | |
674 | 677 | then { | |
675 | - | let | |
676 | - | if (( | |
677 | - | then [StringEntry(R(), | |
678 | + | let eY = fromBase58String(eW) | |
679 | + | if ((eY == eY)) | |
680 | + | then [StringEntry(R(), eW)] | |
678 | 681 | else throw("Strict value is not equal to itself.") | |
679 | 682 | } | |
680 | 683 | else throw("Strict value is not equal to itself.") | |
681 | 684 | } | |
682 | 685 | ||
683 | 686 | ||
684 | 687 | ||
685 | - | @Callable( | |
688 | + | @Callable(do) | |
686 | 689 | func confirmManager () = { | |
687 | - | let | |
688 | - | let | |
690 | + | let eZ = eR() | |
691 | + | let fa = if (isDefined(eZ)) | |
689 | 692 | then true | |
690 | 693 | else throw("No pending manager") | |
691 | - | if (( | |
694 | + | if ((fa == fa)) | |
692 | 695 | then { | |
693 | - | let | |
696 | + | let fb = if ((do.callerPublicKey == value(eZ))) | |
694 | 697 | then true | |
695 | 698 | else throw("You are not pending manager") | |
696 | - | if (( | |
697 | - | then [StringEntry(Q(), toBase58String(value( | |
699 | + | if ((fb == fb)) | |
700 | + | then [StringEntry(Q(), toBase58String(value(eZ))), DeleteEntry(R())] | |
698 | 701 | else throw("Strict value is not equal to itself.") | |
699 | 702 | } | |
700 | 703 | else throw("Strict value is not equal to itself.") | |
701 | 704 | } | |
702 | 705 | ||
703 | 706 | ||
704 | 707 | ||
705 | - | @Callable( | |
706 | - | func put (cq, | |
708 | + | @Callable(do) | |
709 | + | func put (cq,fc) = if ((0 > cq)) | |
707 | 710 | then throw("Invalid slippageTolerance passed") | |
708 | 711 | else { | |
709 | - | let | |
710 | - | let cS = | |
711 | - | let bX = | |
712 | - | let co = | |
713 | - | let cT = | |
714 | - | let cU = | |
715 | - | let | |
716 | - | let | |
717 | - | let | |
718 | - | if (( | |
712 | + | let du = dr(do, cq, true) | |
713 | + | let cS = du._2 | |
714 | + | let bX = du._7 | |
715 | + | let co = du._9 | |
716 | + | let cT = du._10 | |
717 | + | let cU = du._11 | |
718 | + | let fd = du._12 | |
719 | + | let fe = du._13 | |
720 | + | let dx = invoke(aJ, "emit", [cS], nil) | |
721 | + | if ((dx == dx)) | |
719 | 722 | then { | |
720 | - | let | |
721 | - | let | |
722 | - | if ($isInstanceOf( | |
723 | + | let dy = { | |
724 | + | let dz = dx | |
725 | + | if ($isInstanceOf(dz, "Address")) | |
723 | 726 | then { | |
724 | - | let | |
725 | - | invoke( | |
727 | + | let dA = dz | |
728 | + | invoke(dA, "emit", [cS], nil) | |
726 | 729 | } | |
727 | 730 | else unit | |
728 | 731 | } | |
729 | - | if (( | |
732 | + | if ((dy == dy)) | |
730 | 733 | then { | |
731 | - | let | |
732 | - | then invoke(bg, "put", nil, [AttachedPayment( | |
734 | + | let ff = if ((cT > 0)) | |
735 | + | then invoke(bg, "put", nil, [AttachedPayment(fd, cT)]) | |
733 | 736 | else nil | |
734 | - | if (( | |
737 | + | if ((ff == ff)) | |
735 | 738 | then { | |
736 | - | let | |
737 | - | then invoke(bg, "put", nil, [AttachedPayment( | |
739 | + | let fg = if ((cU > 0)) | |
740 | + | then invoke(bg, "put", nil, [AttachedPayment(fe, cU)]) | |
738 | 741 | else nil | |
739 | - | if (( | |
742 | + | if ((fg == fg)) | |
740 | 743 | then { | |
741 | - | let | |
744 | + | let fh = if (fc) | |
742 | 745 | then { | |
743 | - | let | |
744 | - | if (( | |
746 | + | let fi = invoke(bf, "stake", nil, [AttachedPayment(bX, cS)]) | |
747 | + | if ((fi == fi)) | |
745 | 748 | then nil | |
746 | 749 | else throw("Strict value is not equal to itself.") | |
747 | 750 | } | |
748 | - | else [ScriptTransfer( | |
749 | - | let | |
750 | - | let | |
751 | - | let | |
752 | - | ((co ++ | |
751 | + | else [ScriptTransfer(do.caller, cS, bX)] | |
752 | + | let fj = eH(0, 0, 0) | |
753 | + | let fk = fj._1 | |
754 | + | let eG = fj._2 | |
755 | + | ((co ++ fh) ++ fk) | |
753 | 756 | } | |
754 | 757 | else throw("Strict value is not equal to itself.") | |
755 | 758 | } | |
756 | 759 | else throw("Strict value is not equal to itself.") | |
757 | 760 | } | |
758 | 761 | else throw("Strict value is not equal to itself.") | |
759 | 762 | } | |
760 | 763 | else throw("Strict value is not equal to itself.") | |
761 | 764 | } | |
762 | 765 | ||
763 | 766 | ||
764 | 767 | ||
765 | - | @Callable( | |
766 | - | func putForFree ( | |
768 | + | @Callable(do) | |
769 | + | func putForFree (fl) = if ((0 > fl)) | |
767 | 770 | then throw("Invalid value passed") | |
768 | 771 | else { | |
769 | - | let | |
770 | - | let co = | |
771 | - | let | |
772 | - | let | |
773 | - | let | |
774 | - | (co ++ | |
772 | + | let du = dr(do, fl, false) | |
773 | + | let co = du._9 | |
774 | + | let fm = eH(0, 0, 0) | |
775 | + | let fk = fm._1 | |
776 | + | let eG = fm._2 | |
777 | + | (co ++ fk) | |
775 | 778 | } | |
776 | 779 | ||
777 | 780 | ||
778 | 781 | ||
779 | - | @Callable( | |
780 | - | func putOneTkn ( | |
781 | - | let | |
782 | - | let | |
783 | - | if ($isInstanceOf( | |
784 | - | then | |
785 | - | else throw(($getType( | |
782 | + | @Callable(do) | |
783 | + | func putOneTkn (fn,fo) = { | |
784 | + | let fp = { | |
785 | + | let fq = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
786 | + | if ($isInstanceOf(fq, "Boolean")) | |
787 | + | then fq | |
788 | + | else throw(($getType(fq) + " couldn't be cast to Boolean")) | |
786 | 789 | } | |
787 | - | let | |
790 | + | let fr = if (if (if (aL()) | |
788 | 791 | then true | |
789 | 792 | else (aY == l)) | |
790 | 793 | then true | |
791 | 794 | else (aY == n)) | |
792 | 795 | then true | |
793 | - | else | |
794 | - | let | |
796 | + | else fp | |
797 | + | let em = [if (if (!(fr)) | |
795 | 798 | then true | |
796 | - | else | |
799 | + | else eS(do)) | |
797 | 800 | then true | |
798 | - | else aG("put operation is blocked by admin"), if ((size( | |
801 | + | else aG("put operation is blocked by admin"), if ((size(do.payments) == 1)) | |
799 | 802 | then true | |
800 | 803 | else aG("exactly 1 payment are expected")] | |
801 | - | if (( | |
804 | + | if ((em == em)) | |
802 | 805 | then { | |
803 | - | let | |
804 | - | let | |
805 | - | let | |
806 | - | let X = | |
807 | - | let Y = | |
808 | - | let | |
809 | - | let | |
810 | - | let cV = | |
811 | - | let | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | then ( | |
806 | + | let fs = do.payments[0] | |
807 | + | let dF = fs.assetId | |
808 | + | let dE = fs.amount | |
809 | + | let X = do.caller | |
810 | + | let Y = do.transactionId | |
811 | + | let ft = dD(dE, dF, X, Y) | |
812 | + | let fu = ft._1 | |
813 | + | let cV = ft._2 | |
814 | + | let dC = ft._3 | |
815 | + | let fv = ft._4 | |
816 | + | let dJ = ft._5 | |
817 | + | let fw = if (if ((fn > 0)) | |
818 | + | then (fn > fu) | |
816 | 819 | else false) | |
817 | - | then aG(makeString(["amount to receive is less than ", toString( | |
818 | - | else | |
819 | - | let | |
820 | - | if (( | |
820 | + | then aG(makeString(["amount to receive is less than ", toString(fn)], "")) | |
821 | + | else fu | |
822 | + | let dx = dv(fw) | |
823 | + | if ((dx == dx)) | |
821 | 824 | then { | |
822 | - | let | |
825 | + | let fh = if (fo) | |
823 | 826 | then { | |
824 | - | let | |
825 | - | if (( | |
827 | + | let fx = invoke(bf, "stake", nil, [AttachedPayment(aZ, fw)]) | |
828 | + | if ((fx == fx)) | |
826 | 829 | then nil | |
827 | 830 | else throw("Strict value is not equal to itself.") | |
828 | 831 | } | |
829 | - | else [ScriptTransfer( | |
830 | - | let | |
831 | - | then [ScriptTransfer(aK, | |
832 | + | else [ScriptTransfer(do.caller, fw, aZ)] | |
833 | + | let fy = if ((dC > 0)) | |
834 | + | then [ScriptTransfer(aK, dC, dF)] | |
832 | 835 | else nil | |
833 | - | let | |
836 | + | let fz = if ((this == aK)) | |
834 | 837 | then $Tuple2(0, 0) | |
835 | - | else if ( | |
836 | - | then $Tuple2(-( | |
837 | - | else $Tuple2(0, -( | |
838 | - | let | |
839 | - | let | |
840 | - | let | |
841 | - | let | |
842 | - | let | |
843 | - | $Tuple2((((cV ++ | |
838 | + | else if (dJ) | |
839 | + | then $Tuple2(-(dC), 0) | |
840 | + | else $Tuple2(0, -(dC)) | |
841 | + | let eI = fz._1 | |
842 | + | let eJ = fz._2 | |
843 | + | let fA = eH(eI, eJ, 0) | |
844 | + | let fk = fA._1 | |
845 | + | let eG = fA._2 | |
846 | + | $Tuple2((((cV ++ fh) ++ fy) ++ fk), fw) | |
844 | 847 | } | |
845 | 848 | else throw("Strict value is not equal to itself.") | |
846 | 849 | } | |
847 | 850 | else throw("Strict value is not equal to itself.") | |
848 | 851 | } | |
849 | 852 | ||
850 | 853 | ||
851 | 854 | ||
852 | - | @Callable( | |
853 | - | func putOneTknREADONLY ( | |
854 | - | let | |
855 | - | let | |
856 | - | let cV = | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
860 | - | $Tuple2(nil, $Tuple3( | |
855 | + | @Callable(do) | |
856 | + | func putOneTknREADONLY (dF,dE) = { | |
857 | + | let fB = dD(dE, aQ(dF), unit, unit) | |
858 | + | let fu = fB._1 | |
859 | + | let cV = fB._2 | |
860 | + | let dC = fB._3 | |
861 | + | let fv = fB._4 | |
862 | + | let dJ = fB._5 | |
863 | + | $Tuple2(nil, $Tuple3(fu, dC, fv)) | |
861 | 864 | } | |
862 | 865 | ||
863 | 866 | ||
864 | 867 | ||
865 | - | @Callable( | |
866 | - | func getOneTkn ( | |
867 | - | let | |
868 | - | let | |
869 | - | if ($isInstanceOf( | |
870 | - | then | |
871 | - | else throw(($getType( | |
868 | + | @Callable(do) | |
869 | + | func getOneTkn (fC,fn) = { | |
870 | + | let fp = { | |
871 | + | let fq = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
872 | + | if ($isInstanceOf(fq, "Boolean")) | |
873 | + | then fq | |
874 | + | else throw(($getType(fq) + " couldn't be cast to Boolean")) | |
872 | 875 | } | |
873 | - | let | |
876 | + | let fD = if (if (aL()) | |
874 | 877 | then true | |
875 | 878 | else (aY == n)) | |
876 | 879 | then true | |
877 | - | else | |
878 | - | let | |
880 | + | else fp | |
881 | + | let em = [if (if (!(fD)) | |
879 | 882 | then true | |
880 | - | else | |
883 | + | else eS(do)) | |
881 | 884 | then true | |
882 | - | else aG("get operation is blocked by admin"), if ((size( | |
885 | + | else aG("get operation is blocked by admin"), if ((size(do.payments) == 1)) | |
883 | 886 | then true | |
884 | 887 | else aG("exactly 1 payment are expected")] | |
885 | - | if (( | |
888 | + | if ((em == em)) | |
886 | 889 | then { | |
887 | - | let | |
888 | - | let | |
889 | - | let | |
890 | - | let | |
891 | - | let X = | |
892 | - | let Y = | |
893 | - | let | |
894 | - | let | |
895 | - | let cV = | |
896 | - | let | |
897 | - | let | |
898 | - | let | |
899 | - | let | |
900 | - | then ( | |
890 | + | let el = aQ(fC) | |
891 | + | let fs = do.payments[0] | |
892 | + | let dF = fs.assetId | |
893 | + | let dT = fs.amount | |
894 | + | let X = do.caller | |
895 | + | let Y = do.transactionId | |
896 | + | let fE = ek(el, dT, dF, X, Y) | |
897 | + | let fF = fE._1 | |
898 | + | let cV = fE._2 | |
899 | + | let dC = fE._3 | |
900 | + | let fv = fE._4 | |
901 | + | let en = fE._5 | |
902 | + | let dw = if (if ((fn > 0)) | |
903 | + | then (fn > fF) | |
901 | 904 | else false) | |
902 | - | then aG(makeString(["amount to receive is less than ", toString( | |
903 | - | else | |
904 | - | let | |
905 | - | if (( | |
905 | + | then aG(makeString(["amount to receive is less than ", toString(fn)], "")) | |
906 | + | else fF | |
907 | + | let fG = invoke(aJ, "burn", [dT], [AttachedPayment(dF, dT)]) | |
908 | + | if ((fG == fG)) | |
906 | 909 | then { | |
907 | - | let | |
908 | - | let | |
909 | - | then [ScriptTransfer(aK, | |
910 | + | let fH = [ScriptTransfer(X, dw, el)] | |
911 | + | let fy = if ((dC > 0)) | |
912 | + | then [ScriptTransfer(aK, dC, el)] | |
910 | 913 | else nil | |
911 | - | let | |
912 | - | let | |
914 | + | let fI = { | |
915 | + | let fJ = if ((this == aK)) | |
913 | 916 | then 0 | |
914 | - | else | |
915 | - | if ( | |
916 | - | then $Tuple2(-(( | |
917 | - | else $Tuple2(0, -(( | |
917 | + | else dC | |
918 | + | if (en) | |
919 | + | then $Tuple2(-((dw + fJ)), 0) | |
920 | + | else $Tuple2(0, -((dw + fJ))) | |
918 | 921 | } | |
919 | - | let | |
920 | - | let | |
921 | - | let | |
922 | - | let | |
923 | - | let | |
924 | - | $Tuple2((((cV ++ | |
922 | + | let eI = fI._1 | |
923 | + | let eJ = fI._2 | |
924 | + | let fK = eH(eI, eJ, 0) | |
925 | + | let fk = fK._1 | |
926 | + | let eG = fK._2 | |
927 | + | $Tuple2((((cV ++ fH) ++ fy) ++ fk), dw) | |
925 | 928 | } | |
926 | 929 | else throw("Strict value is not equal to itself.") | |
927 | 930 | } | |
928 | 931 | else throw("Strict value is not equal to itself.") | |
929 | 932 | } | |
930 | 933 | ||
931 | 934 | ||
932 | 935 | ||
933 | - | @Callable( | |
934 | - | func getOneTknREADONLY ( | |
935 | - | let | |
936 | - | let | |
937 | - | let cV = | |
938 | - | let | |
939 | - | let | |
940 | - | let | |
941 | - | $Tuple2(nil, $Tuple3( | |
936 | + | @Callable(do) | |
937 | + | func getOneTknREADONLY (el,dT) = { | |
938 | + | let fL = ek(aQ(el), dT, aZ, unit, unit) | |
939 | + | let fF = fL._1 | |
940 | + | let cV = fL._2 | |
941 | + | let dC = fL._3 | |
942 | + | let fv = fL._4 | |
943 | + | let en = fL._5 | |
944 | + | $Tuple2(nil, $Tuple3(fF, dC, fv)) | |
942 | 945 | } | |
943 | 946 | ||
944 | 947 | ||
945 | 948 | ||
946 | - | @Callable( | |
947 | - | func unstakeAndGetOneTkn ( | |
948 | - | let | |
949 | - | let | |
950 | - | if ($isInstanceOf( | |
951 | - | then | |
952 | - | else throw(($getType( | |
949 | + | @Callable(do) | |
950 | + | func unstakeAndGetOneTkn (fM,fC,fn) = { | |
951 | + | let fp = { | |
952 | + | let fq = invoke(aJ, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
953 | + | if ($isInstanceOf(fq, "Boolean")) | |
954 | + | then fq | |
955 | + | else throw(($getType(fq) + " couldn't be cast to Boolean")) | |
953 | 956 | } | |
954 | - | let | |
957 | + | let fD = if (if (aL()) | |
955 | 958 | then true | |
956 | 959 | else (aY == n)) | |
957 | 960 | then true | |
958 | - | else | |
959 | - | let | |
961 | + | else fp | |
962 | + | let em = [if (if (!(fD)) | |
960 | 963 | then true | |
961 | - | else | |
964 | + | else eS(do)) | |
962 | 965 | then true | |
963 | - | else aG("get operation is blocked by admin"), if ((size( | |
966 | + | else aG("get operation is blocked by admin"), if ((size(do.payments) == 0)) | |
964 | 967 | then true | |
965 | 968 | else aG("no payments are expected")] | |
966 | - | if (( | |
969 | + | if ((em == em)) | |
967 | 970 | then { | |
968 | - | let | |
969 | - | let X = | |
970 | - | let Y = | |
971 | - | let | |
972 | - | if (( | |
971 | + | let el = aQ(fC) | |
972 | + | let X = do.caller | |
973 | + | let Y = do.transactionId | |
974 | + | let fN = invoke(bf, "unstake", [toBase58String(aZ), fM], nil) | |
975 | + | if ((fN == fN)) | |
973 | 976 | then { | |
974 | - | let | |
975 | - | let | |
976 | - | let cV = | |
977 | - | let | |
978 | - | let | |
979 | - | let | |
980 | - | let | |
981 | - | then ( | |
977 | + | let fO = ek(el, fM, aZ, X, Y) | |
978 | + | let fF = fO._1 | |
979 | + | let cV = fO._2 | |
980 | + | let dC = fO._3 | |
981 | + | let fv = fO._4 | |
982 | + | let en = fO._5 | |
983 | + | let dw = if (if ((fn > 0)) | |
984 | + | then (fn > fF) | |
982 | 985 | else false) | |
983 | - | then aG(makeString(["amount to receive is less than ", toString( | |
984 | - | else | |
985 | - | let | |
986 | - | if (( | |
986 | + | then aG(makeString(["amount to receive is less than ", toString(fn)], "")) | |
987 | + | else fF | |
988 | + | let fG = invoke(aJ, "burn", [fM], [AttachedPayment(aZ, fM)]) | |
989 | + | if ((fG == fG)) | |
987 | 990 | then { | |
988 | - | let | |
989 | - | let | |
990 | - | then [ScriptTransfer(aK, | |
991 | + | let fH = [ScriptTransfer(do.caller, dw, el)] | |
992 | + | let fy = if ((dC > 0)) | |
993 | + | then [ScriptTransfer(aK, dC, el)] | |
991 | 994 | else nil | |
992 | - | let | |
993 | - | let | |
995 | + | let fP = { | |
996 | + | let fJ = if ((this == aK)) | |
994 | 997 | then 0 | |
995 | - | else | |
996 | - | if ( | |
997 | - | then $Tuple2(-(( | |
998 | - | else $Tuple2(0, -(( | |
998 | + | else dC | |
999 | + | if (en) | |
1000 | + | then $Tuple2(-((dw + fJ)), 0) | |
1001 | + | else $Tuple2(0, -((dw + fJ))) | |
999 | 1002 | } | |
1000 | - | let | |
1001 | - | let | |
1002 | - | let | |
1003 | - | let | |
1004 | - | let | |
1005 | - | $Tuple2((((cV ++ | |
1003 | + | let eI = fP._1 | |
1004 | + | let eJ = fP._2 | |
1005 | + | let fQ = eH(eI, eJ, 0) | |
1006 | + | let fk = fQ._1 | |
1007 | + | let eG = fQ._2 | |
1008 | + | $Tuple2((((cV ++ fH) ++ fy) ++ fk), dw) | |
1006 | 1009 | } | |
1007 | 1010 | else throw("Strict value is not equal to itself.") | |
1008 | 1011 | } | |
1009 | 1012 | else throw("Strict value is not equal to itself.") | |
1010 | 1013 | } | |
1011 | 1014 | else throw("Strict value is not equal to itself.") | |
1012 | 1015 | } | |
1013 | 1016 | ||
1014 | 1017 | ||
1015 | 1018 | ||
1016 | - | @Callable( | |
1019 | + | @Callable(do) | |
1017 | 1020 | func get () = { | |
1018 | - | let cG = | |
1019 | - | let | |
1021 | + | let cG = dn(do) | |
1022 | + | let fR = cG._1 | |
1020 | 1023 | let cn = cG._2 | |
1021 | - | let | |
1024 | + | let dq = cG._3 | |
1022 | 1025 | let bV = cG._4 | |
1023 | 1026 | let co = cG._5 | |
1024 | - | let | |
1025 | - | if (( | |
1027 | + | let fS = invoke(aJ, "burn", [dq], [AttachedPayment(bV, dq)]) | |
1028 | + | if ((fS == fS)) | |
1026 | 1029 | then { | |
1027 | - | let | |
1028 | - | let | |
1029 | - | let | |
1030 | - | (co ++ | |
1030 | + | let fT = eH(-(fR), -(cn), 0) | |
1031 | + | let fk = fT._1 | |
1032 | + | let eG = fT._2 | |
1033 | + | (co ++ fk) | |
1031 | 1034 | } | |
1032 | 1035 | else throw("Strict value is not equal to itself.") | |
1033 | 1036 | } | |
1034 | 1037 | ||
1035 | 1038 | ||
1036 | 1039 | ||
1037 | - | @Callable( | |
1038 | - | func getNoLess ( | |
1039 | - | let cG = | |
1040 | + | @Callable(do) | |
1041 | + | func getNoLess (fU,fV) = { | |
1042 | + | let cG = dn(do) | |
1040 | 1043 | let cm = cG._1 | |
1041 | 1044 | let cn = cG._2 | |
1042 | - | let | |
1045 | + | let dq = cG._3 | |
1043 | 1046 | let bV = cG._4 | |
1044 | 1047 | let co = cG._5 | |
1045 | - | if (( | |
1046 | - | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString( | |
1047 | - | else if (( | |
1048 | - | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString( | |
1048 | + | if ((fU > cm)) | |
1049 | + | then throw(((("noLessThenAmtAsset failed: " + toString(cm)) + " < ") + toString(fU))) | |
1050 | + | else if ((fV > cn)) | |
1051 | + | then throw(((("noLessThenPriceAsset failed: " + toString(cn)) + " < ") + toString(fV))) | |
1049 | 1052 | else { | |
1050 | - | let | |
1051 | - | if (( | |
1053 | + | let fS = invoke(aJ, "burn", [dq], [AttachedPayment(bV, dq)]) | |
1054 | + | if ((fS == fS)) | |
1052 | 1055 | then { | |
1053 | - | let | |
1054 | - | let | |
1055 | - | let | |
1056 | - | (co ++ | |
1056 | + | let fW = eH(-(cm), -(cn), 0) | |
1057 | + | let fk = fW._1 | |
1058 | + | let eG = fW._2 | |
1059 | + | (co ++ fk) | |
1057 | 1060 | } | |
1058 | 1061 | else throw("Strict value is not equal to itself.") | |
1059 | 1062 | } | |
1060 | 1063 | } | |
1061 | 1064 | ||
1062 | 1065 | ||
1063 | 1066 | ||
1064 | - | @Callable( | |
1065 | - | func unstakeAndGet ( | |
1066 | - | let | |
1067 | + | @Callable(do) | |
1068 | + | func unstakeAndGet (dw) = { | |
1069 | + | let fX = if ((size(do.payments) != 0)) | |
1067 | 1070 | then throw("No payments are expected") | |
1068 | 1071 | else true | |
1069 | - | if (( | |
1072 | + | if ((fX == fX)) | |
1070 | 1073 | then { | |
1071 | 1074 | let bK = aN() | |
1072 | 1075 | let bX = fromBase58String(bK[q]) | |
1073 | - | let | |
1074 | - | if (( | |
1076 | + | let fN = invoke(bf, "unstake", [toBase58String(bX), dw], nil) | |
1077 | + | if ((fN == fN)) | |
1075 | 1078 | then { | |
1076 | - | let cG = bT(toBase58String( | |
1079 | + | let cG = bT(toBase58String(do.transactionId), toBase58String(bX), dw, do.caller) | |
1077 | 1080 | let cm = cG._1 | |
1078 | 1081 | let cn = cG._2 | |
1079 | 1082 | let ca = parseIntValue(cG._9) | |
1080 | 1083 | let co = cG._10 | |
1081 | - | let | |
1084 | + | let fY = if (if (aL()) | |
1082 | 1085 | then true | |
1083 | 1086 | else (ca == n)) | |
1084 | 1087 | then throw(("Get operation is blocked by admin. Status = " + toString(ca))) | |
1085 | 1088 | else true | |
1086 | - | if (( | |
1089 | + | if ((fY == fY)) | |
1087 | 1090 | then { | |
1088 | - | let | |
1089 | - | if (( | |
1091 | + | let fS = invoke(aJ, "burn", [dw], [AttachedPayment(bX, dw)]) | |
1092 | + | if ((fS == fS)) | |
1090 | 1093 | then { | |
1091 | - | let | |
1092 | - | let | |
1093 | - | let | |
1094 | - | (co ++ | |
1094 | + | let fZ = eH(-(cm), -(cn), 0) | |
1095 | + | let fk = fZ._1 | |
1096 | + | let eG = fZ._2 | |
1097 | + | (co ++ fk) | |
1095 | 1098 | } | |
1096 | 1099 | else throw("Strict value is not equal to itself.") | |
1097 | 1100 | } | |
1098 | 1101 | else throw("Strict value is not equal to itself.") | |
1099 | 1102 | } | |
1100 | 1103 | else throw("Strict value is not equal to itself.") | |
1101 | 1104 | } | |
1102 | 1105 | else throw("Strict value is not equal to itself.") | |
1103 | 1106 | } | |
1104 | 1107 | ||
1105 | 1108 | ||
1106 | 1109 | ||
1107 | - | @Callable( | |
1108 | - | func unstakeAndGetNoLess ( | |
1109 | - | let | |
1110 | + | @Callable(do) | |
1111 | + | func unstakeAndGetNoLess (fM,ga,fV) = { | |
1112 | + | let fD = if (aL()) | |
1110 | 1113 | then true | |
1111 | 1114 | else (aY == n) | |
1112 | - | let | |
1115 | + | let em = [if (!(fD)) | |
1113 | 1116 | then true | |
1114 | - | else throw("get operation is blocked by admin"), if ((size( | |
1117 | + | else throw("get operation is blocked by admin"), if ((size(do.payments) == 0)) | |
1115 | 1118 | then true | |
1116 | 1119 | else throw("no payments are expected")] | |
1117 | - | if (( | |
1120 | + | if ((em == em)) | |
1118 | 1121 | then { | |
1119 | - | let | |
1120 | - | if (( | |
1122 | + | let fN = invoke(bf, "unstake", [toBase58String(aZ), fM], nil) | |
1123 | + | if ((fN == fN)) | |
1121 | 1124 | then { | |
1122 | - | let cG = bT(toBase58String( | |
1125 | + | let cG = bT(toBase58String(do.transactionId), toBase58String(aZ), fM, do.caller) | |
1123 | 1126 | let cm = cG._1 | |
1124 | 1127 | let cn = cG._2 | |
1125 | 1128 | let co = cG._10 | |
1126 | - | let | |
1129 | + | let gb = [if ((cm >= ga)) | |
1127 | 1130 | then true | |
1128 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1131 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(ga)], "")), if ((cn >= fV)) | |
1129 | 1132 | then true | |
1130 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1131 | - | if (( | |
1133 | + | else throw(makeString(["price asset amount to receive is less than ", toString(fV)], ""))] | |
1134 | + | if ((gb == gb)) | |
1132 | 1135 | then { | |
1133 | - | let | |
1134 | - | if (( | |
1136 | + | let fS = invoke(aJ, "burn", [fM], [AttachedPayment(aZ, fM)]) | |
1137 | + | if ((fS == fS)) | |
1135 | 1138 | then { | |
1136 | - | let | |
1137 | - | let | |
1138 | - | let | |
1139 | - | (co ++ | |
1139 | + | let gc = eH(-(cm), -(cn), 0) | |
1140 | + | let fk = gc._1 | |
1141 | + | let eG = gc._2 | |
1142 | + | (co ++ fk) | |
1140 | 1143 | } | |
1141 | 1144 | else throw("Strict value is not equal to itself.") | |
1142 | 1145 | } | |
1143 | 1146 | else throw("Strict value is not equal to itself.") | |
1144 | 1147 | } | |
1145 | 1148 | else throw("Strict value is not equal to itself.") | |
1146 | 1149 | } | |
1147 | 1150 | else throw("Strict value is not equal to itself.") | |
1148 | 1151 | } | |
1149 | 1152 | ||
1150 | 1153 | ||
1151 | 1154 | ||
1152 | - | @Callable( | |
1153 | - | func activate ( | |
1155 | + | @Callable(do) | |
1156 | + | func activate (gd,ge) = if ((toString(do.caller) != toString(aJ))) | |
1154 | 1157 | then throw("permissions denied") | |
1155 | - | else $Tuple2([StringEntry(aa(), | |
1158 | + | else $Tuple2([StringEntry(aa(), gd), StringEntry(ab(), ge)], "success") | |
1156 | 1159 | ||
1157 | 1160 | ||
1158 | 1161 | ||
1159 | - | @Callable( | |
1162 | + | @Callable(do) | |
1160 | 1163 | func refreshKLp () = { | |
1161 | - | let | |
1162 | - | let | |
1164 | + | let gf = valueOrElse(getInteger(ag), 0) | |
1165 | + | let gg = if (((height - gf) >= aj)) | |
1163 | 1166 | then unit | |
1164 | 1167 | else aG(makeString([toString(aj), " blocks have not passed since the previous call"], "")) | |
1165 | - | if (( | |
1168 | + | if ((gg == gg)) | |
1166 | 1169 | then { | |
1167 | - | let | |
1168 | - | let | |
1169 | - | let | |
1170 | - | $Tuple2( | |
1170 | + | let gh = eH(0, 0, 0) | |
1171 | + | let eO = gh._1 | |
1172 | + | let eG = gh._2 | |
1173 | + | $Tuple2(eO, toString(eG)) | |
1171 | 1174 | } | |
1172 | 1175 | else throw("Strict value is not equal to itself.") | |
1173 | 1176 | } | |
1174 | 1177 | ||
1175 | 1178 | ||
1176 | 1179 | ||
1177 | - | @Callable( | |
1180 | + | @Callable(do) | |
1178 | 1181 | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aN()) | |
1179 | 1182 | ||
1180 | 1183 | ||
1181 | 1184 | ||
1182 | - | @Callable( | |
1185 | + | @Callable(do) | |
1183 | 1186 | func getAccBalanceWrapperREADONLY (bx) = $Tuple2(nil, bw(bx)) | |
1184 | 1187 | ||
1185 | 1188 | ||
1186 | 1189 | ||
1187 | - | @Callable( | |
1190 | + | @Callable(do) | |
1188 | 1191 | func calcPricesWrapperREADONLY (bE,bF,bJ) = { | |
1189 | 1192 | let bS = bI(bE, bF, bJ) | |
1190 | 1193 | $Tuple2(nil, [toString(bS[0]), toString(bS[1]), toString(bS[2])]) | |
1191 | 1194 | } | |
1192 | 1195 | ||
1193 | 1196 | ||
1194 | 1197 | ||
1195 | - | @Callable( | |
1198 | + | @Callable(do) | |
1196 | 1199 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1197 | 1200 | ||
1198 | 1201 | ||
1199 | 1202 | ||
1200 | - | @Callable( | |
1203 | + | @Callable(do) | |
1201 | 1204 | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
1202 | 1205 | ||
1203 | 1206 | ||
1204 | 1207 | ||
1205 | - | @Callable( | |
1208 | + | @Callable(do) | |
1206 | 1209 | func calcPriceBigIntWrapperREADONLY (bz,bA) = $Tuple2(nil, toString(by(parseBigIntValue(bz), parseBigIntValue(bA)))) | |
1207 | 1210 | ||
1208 | 1211 | ||
1209 | 1212 | ||
1210 | - | @Callable( | |
1213 | + | @Callable(do) | |
1211 | 1214 | func estimatePutOperationWrapperREADONLY (bU,cq,cr,cs,ct,cu,X,cv,cw) = $Tuple2(nil, cp(bU, cq, cr, cs, ct, cu, X, cv, cw)) | |
1212 | 1215 | ||
1213 | 1216 | ||
1214 | 1217 | ||
1215 | - | @Callable( | |
1218 | + | @Callable(do) | |
1216 | 1219 | func estimateGetOperationWrapperREADONLY (bU,bV,bW,X) = { | |
1217 | 1220 | let cG = bT(bU, bV, bW, addressFromStringValue(X)) | |
1218 | 1221 | $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 | 1222 | } | |
1220 | 1223 | ||
1221 | 1224 | ||
1222 | 1225 | ||
1223 | - | @Callable( | |
1226 | + | @Callable(do) | |
1224 | 1227 | func statsREADONLY () = { | |
1225 | 1228 | let bK = aN() | |
1226 | 1229 | let bX = fromBase58String(bK[q]) | |
1227 | 1230 | let cY = bK[r] | |
1228 | 1231 | let cZ = bK[s] | |
1229 | 1232 | let cz = bK[v] | |
1230 | 1233 | let cA = bK[w] | |
1231 | 1234 | let bL = parseIntValue(bK[t]) | |
1232 | 1235 | let bM = parseIntValue(bK[u]) | |
1233 | - | let | |
1236 | + | let gi = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1234 | 1237 | let da = bw(cY) | |
1235 | 1238 | let db = bw(cZ) | |
1236 | - | let | |
1239 | + | let gj = if ((gi == 0)) | |
1237 | 1240 | then [e, e, e] | |
1238 | - | else bI(da, db, | |
1241 | + | else bI(da, db, gi) | |
1239 | 1242 | let ch = 0 | |
1240 | - | let | |
1241 | - | let | |
1242 | - | let | |
1243 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(da), toString(db), toString( | |
1243 | + | let gk = G(gj[1], b) | |
1244 | + | let gl = G(gj[2], b) | |
1245 | + | let gm = value(getInteger(aJ, au(toString(this)))) | |
1246 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(da), toString(db), toString(gi), toString(ch), toString(gk), toString(gl), toString(gm)], j)) | |
1244 | 1247 | } | |
1245 | 1248 | ||
1246 | 1249 | ||
1247 | 1250 | ||
1248 | - | @Callable( | |
1251 | + | @Callable(do) | |
1249 | 1252 | func evaluatePutByAmountAssetREADONLY (cr) = { | |
1250 | 1253 | let bK = aN() | |
1251 | 1254 | let bX = fromBase58String(bK[q]) | |
1252 | 1255 | let cx = bK[r] | |
1253 | 1256 | let bY = fromBase58String(cx) | |
1254 | 1257 | let cy = bK[s] | |
1255 | 1258 | let bZ = fromBase58String(cy) | |
1256 | 1259 | let bL = parseIntValue(bK[t]) | |
1257 | 1260 | let bM = parseIntValue(bK[u]) | |
1258 | 1261 | let ca = bK[p] | |
1259 | - | let | |
1262 | + | let gi = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1260 | 1263 | let da = bw(cx) | |
1261 | 1264 | let db = bw(cy) | |
1262 | 1265 | let bG = D(da, bL) | |
1263 | 1266 | let bH = D(db, bM) | |
1264 | - | let cg = if (( | |
1267 | + | let cg = if ((gi == 0)) | |
1265 | 1268 | then e | |
1266 | 1269 | else by(bH, bG) | |
1267 | 1270 | let cD = D(cr, bL) | |
1268 | 1271 | let cE = fraction(cD, cg, d) | |
1269 | 1272 | let ct = G(cE, bM) | |
1270 | - | let | |
1271 | - | let cO = | |
1272 | - | let | |
1273 | - | let cc = | |
1274 | - | let ce = | |
1275 | - | let cb = | |
1273 | + | let du = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1274 | + | let cO = du._1 | |
1275 | + | let gn = du._3 | |
1276 | + | let cc = du._4 | |
1277 | + | let ce = du._5 | |
1278 | + | let cb = du._6 | |
1276 | 1279 | $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 | 1280 | } | |
1278 | 1281 | ||
1279 | 1282 | ||
1280 | 1283 | ||
1281 | - | @Callable( | |
1284 | + | @Callable(do) | |
1282 | 1285 | func evaluatePutByPriceAssetREADONLY (ct) = { | |
1283 | 1286 | let bK = aN() | |
1284 | 1287 | let bX = fromBase58String(bK[q]) | |
1285 | 1288 | let cx = bK[r] | |
1286 | 1289 | let bY = fromBase58String(cx) | |
1287 | 1290 | let cy = bK[s] | |
1288 | 1291 | let bZ = fromBase58String(cy) | |
1289 | 1292 | let bL = parseIntValue(bK[t]) | |
1290 | 1293 | let bM = parseIntValue(bK[u]) | |
1291 | 1294 | let ca = bK[p] | |
1292 | - | let | |
1293 | - | let | |
1294 | - | let | |
1295 | - | let | |
1296 | - | let | |
1297 | - | let cg = if (( | |
1295 | + | let gi = valueOrErrorMessage(assetInfo(bX), (("Asset " + toBase58String(bX)) + " doesn't exist")).quantity | |
1296 | + | let go = bw(cx) | |
1297 | + | let gp = bw(cy) | |
1298 | + | let gq = D(go, bL) | |
1299 | + | let gr = D(gp, bM) | |
1300 | + | let cg = if ((gi == 0)) | |
1298 | 1301 | then e | |
1299 | - | else by( | |
1302 | + | else by(gr, gq) | |
1300 | 1303 | let cE = D(ct, bM) | |
1301 | 1304 | let cD = fraction(cE, d, cg) | |
1302 | 1305 | let cr = G(cD, bL) | |
1303 | - | let | |
1304 | - | let cO = | |
1305 | - | let | |
1306 | - | let cc = | |
1307 | - | let ce = | |
1308 | - | let cb = | |
1306 | + | let du = cp("", 500000, cr, bY, ct, bZ, "", true, false) | |
1307 | + | let cO = du._1 | |
1308 | + | let gn = du._3 | |
1309 | + | let cc = du._4 | |
1310 | + | let ce = du._5 | |
1311 | + | let cb = du._6 | |
1309 | 1312 | $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 | 1313 | } | |
1311 | 1314 | ||
1312 | 1315 | ||
1313 | 1316 | ||
1314 | - | @Callable( | |
1315 | - | func evaluateGetREADONLY ( | |
1316 | - | let cG = bT("", | |
1317 | + | @Callable(do) | |
1318 | + | func evaluateGetREADONLY (gs,gt) = { | |
1319 | + | let cG = bT("", gs, gt, this) | |
1317 | 1320 | let cm = cG._1 | |
1318 | 1321 | let cn = cG._2 | |
1319 | 1322 | let cc = cG._5 | |
1320 | 1323 | let ce = cG._6 | |
1321 | 1324 | let cb = cG._7 | |
1322 | 1325 | let ch = cG._8 | |
1323 | 1326 | let ca = parseIntValue(cG._9) | |
1324 | 1327 | $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 | 1328 | } | |
1326 | 1329 | ||
1327 | 1330 | ||
1328 | - | @Verifier( | |
1329 | - | func | |
1330 | - | let | |
1331 | - | let | |
1332 | - | if ($isInstanceOf( | |
1331 | + | @Verifier(gu) | |
1332 | + | func gv () = { | |
1333 | + | let gw = { | |
1334 | + | let dz = eP() | |
1335 | + | if ($isInstanceOf(dz, "ByteVector")) | |
1333 | 1336 | then { | |
1334 | - | let | |
1335 | - | | |
1337 | + | let eT = dz | |
1338 | + | eT | |
1336 | 1339 | } | |
1337 | - | else if ($isInstanceOf( | |
1338 | - | then | |
1340 | + | else if ($isInstanceOf(dz, "Unit")) | |
1341 | + | then gu.senderPublicKey | |
1339 | 1342 | else throw("Match error") | |
1340 | 1343 | } | |
1341 | - | let | |
1342 | - | if ($isInstanceOf( | |
1344 | + | let dz = gu | |
1345 | + | if ($isInstanceOf(dz, "Order")) | |
1343 | 1346 | then { | |
1344 | - | let cX = | |
1345 | - | let | |
1347 | + | let cX = dz | |
1348 | + | let gx = aM() | |
1346 | 1349 | let az = cW(cX) | |
1347 | 1350 | let aA = sigVerify(cX.bodyBytes, cX.proofs[0], cX.senderPublicKey) | |
1348 | - | let aB = sigVerify(cX.bodyBytes, cX.proofs[1], | |
1351 | + | let aB = sigVerify(cX.bodyBytes, cX.proofs[1], gx) | |
1349 | 1352 | if (if (if (az) | |
1350 | 1353 | then aA | |
1351 | 1354 | else false) | |
1352 | 1355 | then aB | |
1353 | 1356 | else false) | |
1354 | 1357 | then true | |
1355 | 1358 | else ay(az, aA, aB) | |
1356 | 1359 | } | |
1357 | - | else if ($isInstanceOf( | |
1360 | + | else if ($isInstanceOf(dz, "SetScriptTransaction")) | |
1358 | 1361 | then { | |
1359 | - | let | |
1360 | - | let | |
1361 | - | let | |
1362 | - | let | |
1363 | - | if (if (( | |
1364 | - | then ( | |
1362 | + | let eQ = dz | |
1363 | + | let gy = blake2b256(value(eQ.script)) | |
1364 | + | let gz = fromBase64String(value(getString(aJ, aw()))) | |
1365 | + | let gA = scriptHash(this) | |
1366 | + | if (if ((gz == gy)) | |
1367 | + | then (gA != gy) | |
1365 | 1368 | else false) | |
1366 | 1369 | then true | |
1367 | - | else sigVerify( | |
1370 | + | else sigVerify(gu.bodyBytes, gu.proofs[0], gw) | |
1368 | 1371 | } | |
1369 | - | else sigVerify( | |
1372 | + | else sigVerify(gu.bodyBytes, gu.proofs[0], gw) | |
1370 | 1373 | } | |
1371 | 1374 |
github/deemru/w8io/026f985 320.97 ms ◑