tx · 5icAixP2HAxx5V1Tf9LnFxQXzcPkWYG2bP9q6nB6GPG2 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.28000000 Waves 2023.04.18 12:10 [2539794] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "5icAixP2HAxx5V1Tf9LnFxQXzcPkWYG2bP9q6nB6GPG2", "fee": 28000000, "feeAssetId": null, "timestamp": 1681809038184, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "5tPF22qaQyLPJ1CETkHiHMay5VFDRF5yhRN2BVYyyoMvGZktvu81dmTudAsGXsGoksAjjyLEkfrLR4WeBvC7GyZL" ], "script": "base64:BgJVCAISBQoDCAEIEgUKAwgBCBIDCgEIEgQKAggBEgMKAQgSDgoMCAgIAQQRGBgRAQEYEgoKCAgICAEECAEYEg4KDAgICAEEGBgYGBgBGBIHCgUICAEBAUIAB1NGX1BPT0wCAlNGAAdXWF9QT09MAgJXWAAHQ0FQX0ZFRQIDY2FwAAhMT0FOX0ZFRQIEbG9hbgALTk9fTE9BTl9GRUUCBm5vTG9hbgAGU0NBTEU4AIDC1y8AB1NDQUxFMTAAgMivoCUACkZFRV9TQ0FMRTYAwIQ9ABRrU0ZQb29sQUFzc2V0QmFsYW5jZQIPQV9hc3NldF9iYWxhbmNlABRrU0ZQb29sQkFzc2V0QmFsYW5jZQIPQl9hc3NldF9iYWxhbmNlAA9rU0ZQb29sQUFzc2V0SWQCCkFfYXNzZXRfaWQAD2tTRlBvb2xCQXNzZXRJZAIKQl9hc3NldF9pZAAOa1NGUG9vbFNoYXJlSWQCDnNoYXJlX2Fzc2V0X2lkAAprU0ZQb29sRmVlAgpjb21taXNzaW9uAA1rVXNlclBvc2l0aW9uAg5fdXNlcl9wb3NpdG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Qb29sBQR0eXBlCHBvb2xBZGRyC2luRmVlTm9Mb2FuCWluRmVlTG9hbgZjYXBGZWUDAwkBAiE9AgUEdHlwZQUHU0ZfUE9PTAkBAiE9AgUEdHlwZQUHV1hfUE9PTAcJAAIBAgpXcm9uZyB0eXBlCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRVrQXhseUluRmVlV2l0aG91dExvYW4FC2luRmVlTm9Mb2FuCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRJrQXhseUluRmVlV2l0aExvYW4FCWluRmVlTG9hbgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQhwb29sQWRkcgULa0F4bHlDYXBGZWUFBmNhcEZlZQkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQhwb29sQWRkcgUNa1Bvb2xJbnRlcmVzdAAACQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgUFa1Bvb2wFCHBvb2xBZGRyBQR0eXBlBQNuaWwBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5qbGlsQ==", "height": 2539794, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5DC9irA7VoBt7GYocYGE9q6omzp6KrEAKDU6yYu2wYr5 Next: BRGUuwmKsMY4YGncvLohaKebGnALhZaoJ1XW3Txh81pB Diff:
Old | New | Differences | |
---|---|---|---|
501 | 501 | else ca(ad, bQ, bR, aw, ax, bS, bT) | |
502 | 502 | ||
503 | 503 | ||
504 | + | func ch (ad,ci,cj,ck) = { | |
505 | + | let W = Address(fromBase58String(ad)) | |
506 | + | let cl = valueOrErrorMessage(getString(this, (A + ad)), "Unknown pool") | |
507 | + | let cm = aa(W, cl) | |
508 | + | let bQ = cm._1 | |
509 | + | let bR = cm._2 | |
510 | + | let aw = cm._3 | |
511 | + | let ax = cm._4 | |
512 | + | let cn = Q(ao(bQ)) | |
513 | + | if ((cn == cn)) | |
514 | + | then { | |
515 | + | let co = Q(ao(bR)) | |
516 | + | if ((co == co)) | |
517 | + | then { | |
518 | + | let bg = if ((cl == a)) | |
519 | + | then invoke(W, "callFunction", ["withdraw", [toString(ci)]], nil) | |
520 | + | else if ((cl == b)) | |
521 | + | then invoke(W, "unstakeAndGet", [ci], nil) | |
522 | + | else throw("Wrong position type") | |
523 | + | if ((bg == bg)) | |
524 | + | then { | |
525 | + | let cp = Q(ao(bQ)) | |
526 | + | let cq = Q(ao(bR)) | |
527 | + | let cr = $Tuple2((cp - cn), (cq - co)) | |
528 | + | let cs = cr._1 | |
529 | + | let ct = cr._2 | |
530 | + | let cu = if ((cj > 0)) | |
531 | + | then { | |
532 | + | let cv = if (if ((ck == bQ)) | |
533 | + | then (cj > cs) | |
534 | + | else false) | |
535 | + | then (cj - cs) | |
536 | + | else if (if ((ck == bR)) | |
537 | + | then (cj > ct) | |
538 | + | else false) | |
539 | + | then (cj - ct) | |
540 | + | else 0 | |
541 | + | let cw = if ((cv > 0)) | |
542 | + | then cg(cl, ad, bQ, bR, aw, ax, cv, ck) | |
543 | + | else 0 | |
544 | + | if ((cw == cw)) | |
545 | + | then { | |
546 | + | let cx = Q(ao(bQ)) | |
547 | + | let cy = Q(ao(bR)) | |
548 | + | $Tuple2((cx - cn), (cy - co)) | |
549 | + | } | |
550 | + | else throw("Strict value is not equal to itself.") | |
551 | + | } | |
552 | + | else $Tuple2(cs, ct) | |
553 | + | let cz = cu._1 | |
554 | + | let cA = cu._2 | |
555 | + | $Tuple4(cz, bQ, cA, bR) | |
556 | + | } | |
557 | + | else throw("Strict value is not equal to itself.") | |
558 | + | } | |
559 | + | else throw("Strict value is not equal to itself.") | |
560 | + | } | |
561 | + | else throw("Strict value is not equal to itself.") | |
562 | + | } | |
563 | + | ||
564 | + | ||
504 | 565 | @Callable(P) | |
505 | - | func replenishREADONLY (ad, | |
566 | + | func replenishREADONLY (ad,cB,cC) = if (if ((100 > cB)) | |
506 | 567 | then true | |
507 | - | else ( | |
568 | + | else (cB > 300)) | |
508 | 569 | then throw("Leverage can't be <100 and >300") | |
509 | 570 | else { | |
510 | 571 | let ab = valueOrErrorMessage(getString(this, (A + ad)), "Pool is not inited") | |
511 | - | let | |
512 | - | let bI = | |
513 | - | let bJ = | |
514 | - | let aw = | |
515 | - | let ax = | |
516 | - | let ay = | |
517 | - | let | |
572 | + | let cD = aa(Address(fromBase58String(ad)), ab) | |
573 | + | let bI = cD._1 | |
574 | + | let bJ = cD._2 | |
575 | + | let aw = cD._3 | |
576 | + | let ax = cD._4 | |
577 | + | let ay = cD._5 | |
578 | + | let cE = if ((size(P.payments) == 2)) | |
518 | 579 | then if ((an(P.payments[0].assetId) != bI)) | |
519 | 580 | then throw("Wrong payment asset A") | |
520 | 581 | else if ((an(P.payments[1].assetId) != bJ)) | |
527 | 588 | then $Tuple4(0, bI, P.payments[0].amount, bJ) | |
528 | 589 | else throw("Wrong payment") | |
529 | 590 | else throw("One or two payments expected") | |
530 | - | let as = | |
531 | - | let at = | |
532 | - | let au = | |
533 | - | let av = | |
534 | - | let | |
591 | + | let as = cE._1 | |
592 | + | let at = cE._2 | |
593 | + | let au = cE._3 | |
594 | + | let av = cE._4 | |
595 | + | let cF = if ((cB > 100)) | |
535 | 596 | then { | |
536 | - | let | |
597 | + | let cG = ( let Z = invoke(K, "getTWAP60", [at, false], nil) | |
537 | 598 | if ($isInstanceOf(Z, "(Int, Int)")) | |
538 | 599 | then Z | |
539 | 600 | else throw(($getType(Z) + " couldn't be cast to (Int, Int)")))._1 | |
540 | - | let | |
601 | + | let cH = ( let Z = invoke(K, "getTWAP60", [av, false], nil) | |
541 | 602 | if ($isInstanceOf(Z, "(Int, Int)")) | |
542 | 603 | then Z | |
543 | 604 | else throw(($getType(Z) + " couldn't be cast to (Int, Int)")))._1 | |
544 | - | let | |
545 | - | let | |
546 | - | if (( | |
547 | - | then $ | |
548 | - | else $ | |
605 | + | let cI = (fraction(cG, as, pow(10, 0, ap(at), 0, 0, DOWN)) + fraction(cH, au, pow(10, 0, ap(av), 0, 0, DOWN))) | |
606 | + | let cJ = fraction(cI, (cB - 100), 100) | |
607 | + | if ((cC == at)) | |
608 | + | then $Tuple4((as + cJ), au, d, cJ) | |
609 | + | else $Tuple4(as, (au + cJ), d, cJ) | |
549 | 610 | } | |
550 | - | else $Tuple3(as, au, e) | |
551 | - | let cq = cl._1 | |
552 | - | let cr = cl._2 | |
553 | - | let ah = cl._3 | |
554 | - | let cs = if ((ab == a)) | |
555 | - | then ar(ad, ah, cq, at, cr, av, aw, ax, ay) | |
611 | + | else $Tuple4(as, au, e, 0) | |
612 | + | let cK = cF._1 | |
613 | + | let cL = cF._2 | |
614 | + | let ah = cF._3 | |
615 | + | let cJ = cF._4 | |
616 | + | let cM = if ((ab == a)) | |
617 | + | then ar(ad, ah, cK, at, cL, av, aw, ax, ay) | |
556 | 618 | else aR(ad, ah, as, at, au, av, ay) | |
557 | - | let ct = cs._1 | |
558 | - | let bM = cs._2 | |
559 | - | $Tuple2(nil, ct) | |
619 | + | let cN = cM._1 | |
620 | + | let bM = cM._2 | |
621 | + | let cO = ch(ad, cN, cJ, cC) | |
622 | + | if ((cO == cO)) | |
623 | + | then { | |
624 | + | let bR = cO._4 | |
625 | + | let cA = cO._3 | |
626 | + | let bQ = cO._2 | |
627 | + | let cz = cO._1 | |
628 | + | $Tuple2(nil, $Tuple3(cN, cz, cA)) | |
629 | + | } | |
630 | + | else throw("Strict value is not equal to itself.") | |
560 | 631 | } | |
561 | 632 | ||
562 | 633 | ||
563 | 634 | ||
564 | 635 | @Callable(P) | |
565 | - | func replenish (ad, | |
636 | + | func replenish (ad,cB,cC) = if (if ((100 > cB)) | |
566 | 637 | then true | |
567 | - | else ( | |
638 | + | else (cB > 300)) | |
568 | 639 | then throw("Leverage can't be <100 and >300") | |
569 | 640 | else { | |
570 | 641 | let ab = valueOrErrorMessage(getString(this, (A + ad)), "Pool is not inited") | |
571 | - | let | |
572 | - | let bI = | |
573 | - | let bJ = | |
574 | - | let aw = | |
575 | - | let ax = | |
576 | - | let ay = | |
577 | - | let | |
642 | + | let cP = aa(Address(fromBase58String(ad)), ab) | |
643 | + | let bI = cP._1 | |
644 | + | let bJ = cP._2 | |
645 | + | let aw = cP._3 | |
646 | + | let ax = cP._4 | |
647 | + | let ay = cP._5 | |
648 | + | let cQ = if ((size(P.payments) == 2)) | |
578 | 649 | then if ((an(P.payments[0].assetId) != bI)) | |
579 | 650 | then throw("Wrong payment asset A") | |
580 | 651 | else if ((an(P.payments[1].assetId) != bJ)) | |
587 | 658 | then $Tuple4(0, bI, P.payments[0].amount, bJ) | |
588 | 659 | else throw("Wrong payment") | |
589 | 660 | else throw("One or two payments expected") | |
590 | - | let as = | |
591 | - | let at = | |
592 | - | let au = | |
593 | - | let av = | |
594 | - | let | |
595 | - | if (( | |
661 | + | let as = cQ._1 | |
662 | + | let at = cQ._2 | |
663 | + | let au = cQ._3 | |
664 | + | let av = cQ._4 | |
665 | + | let cR = ae(ad, toString(P.caller)) | |
666 | + | if ((cB > 100)) | |
596 | 667 | then { | |
597 | - | let | |
668 | + | let cG = ( let Z = invoke(K, "getTWAP60", [at, false], nil) | |
598 | 669 | if ($isInstanceOf(Z, "(Int, Int)")) | |
599 | 670 | then Z | |
600 | 671 | else throw(($getType(Z) + " couldn't be cast to (Int, Int)")))._1 | |
601 | - | let | |
672 | + | let cH = ( let Z = invoke(K, "getTWAP60", [av, false], nil) | |
602 | 673 | if ($isInstanceOf(Z, "(Int, Int)")) | |
603 | 674 | then Z | |
604 | 675 | else throw(($getType(Z) + " couldn't be cast to (Int, Int)")))._1 | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
608 | - | let | |
609 | - | let Z = invoke(this, "createNewRequest", [ | |
676 | + | let cI = (fraction(cG, as, pow(10, 0, ap(at), 0, 0, DOWN)) + fraction(cH, au, pow(10, 0, ap(av), 0, 0, DOWN))) | |
677 | + | let cJ = fraction(cI, (cB - 100), 100) | |
678 | + | let cS = makeString([ab, toString(P.caller), ad, toString(as), at, toString(au), av, toString(aw), toString(ax), ay, cC, toString(cJ), toString(cR)], ",") | |
679 | + | let cT = { | |
680 | + | let Z = invoke(this, "createNewRequest", [cS], nil) | |
610 | 681 | if ($isInstanceOf(Z, "Int")) | |
611 | 682 | then Z | |
612 | 683 | else throw(($getType(Z) + " couldn't be cast to Int")) | |
613 | 684 | } | |
614 | - | if (( | |
685 | + | if ((cT == cT)) | |
615 | 686 | then { | |
616 | - | let | |
617 | - | let bg = reentrantInvoke(am(), "flashPosition", | |
687 | + | let cU = [((toString(P.caller) + "_") + toString(cR)), ay, cC, cJ, toString(this), "replenishFromLand", toString(valueOrErrorMessage(cT, "Can't create new request"))] | |
688 | + | let bg = reentrantInvoke(am(), "flashPosition", cU, nil) | |
618 | 689 | if ((bg == bg)) | |
619 | 690 | then nil | |
620 | 691 | else throw("Strict value is not equal to itself.") | |
622 | 693 | else throw("Strict value is not equal to itself.") | |
623 | 694 | } | |
624 | 695 | else { | |
625 | - | let | |
696 | + | let cV = if ((ab == a)) | |
626 | 697 | then ar(ad, e, as, at, au, av, aw, ax, ay) | |
627 | 698 | else aR(ad, e, as, at, au, av, ay) | |
628 | - | let | |
629 | - | let bM = | |
630 | - | aZ(ad, toString(P.caller), | |
699 | + | let cN = cV._1 | |
700 | + | let bM = cV._2 | |
701 | + | aZ(ad, toString(P.caller), cN, bM, cR, ay, ab) | |
631 | 702 | } | |
632 | 703 | } | |
633 | 704 | ||
634 | 705 | ||
635 | 706 | ||
636 | 707 | @Callable(P) | |
637 | - | func replenishFromLand ( | |
638 | - | let | |
708 | + | func replenishFromLand (cW) = { | |
709 | + | let cS = split(valueOrErrorMessage(getString(this, (cW + y)), ("No request with id " + cW)), ",") | |
639 | 710 | if ((size(P.payments) != 1)) | |
640 | 711 | then throw("Wrong payment size") | |
641 | - | else if (if ((an(P.payments[0].assetId) != | |
712 | + | else if (if ((an(P.payments[0].assetId) != cS[10])) | |
642 | 713 | then true | |
643 | - | else (P.payments[0].amount != parseIntValue( | |
714 | + | else (P.payments[0].amount != parseIntValue(cS[11]))) | |
644 | 715 | then throw("Wrong payment") | |
645 | 716 | else { | |
646 | - | let as = if (( | |
647 | - | then (parseIntValue( | |
648 | - | else parseIntValue( | |
649 | - | let au = if (( | |
650 | - | then (parseIntValue( | |
651 | - | else parseIntValue( | |
652 | - | let ad = | |
653 | - | let af = | |
654 | - | let ay = | |
655 | - | let bb = parseIntValue( | |
656 | - | let | |
657 | - | then ar(ad, d, as, | |
658 | - | else if (( | |
659 | - | then aR(ad, d, as, | |
717 | + | let as = if ((cS[4] == an(P.payments[0].assetId))) | |
718 | + | then (parseIntValue(cS[3]) + P.payments[0].amount) | |
719 | + | else parseIntValue(cS[3]) | |
720 | + | let au = if ((cS[6] == an(P.payments[0].assetId))) | |
721 | + | then (parseIntValue(cS[5]) + P.payments[0].amount) | |
722 | + | else parseIntValue(cS[3]) | |
723 | + | let ad = cS[2] | |
724 | + | let af = cS[1] | |
725 | + | let ay = cS[9] | |
726 | + | let bb = parseIntValue(cS[12]) | |
727 | + | let cX = if ((cS[0] == a)) | |
728 | + | then ar(ad, d, as, cS[4], au, cS[6], parseIntValue(cS[7]), parseIntValue(cS[8]), ay) | |
729 | + | else if ((cS[0] == b)) | |
730 | + | then aR(ad, d, as, cS[4], au, cS[6], ay) | |
660 | 731 | else throw("Wrong request type") | |
661 | - | let | |
662 | - | let bM = | |
663 | - | let | |
664 | - | let | |
665 | - | $Tuple2((( | |
732 | + | let cN = cX._1 | |
733 | + | let bM = cX._2 | |
734 | + | let cY = [IntegerEntry((((((cS[2] + "_") + cS[1]) + "_") + cS[12]) + p), P.payments[0].amount), StringEntry((((((cS[2] + "_") + cS[1]) + "_") + cS[12]) + q), cS[10])] | |
735 | + | let cZ = aZ(ad, af, cN, bM, bb, ay, cS[0]) | |
736 | + | $Tuple2(((cZ ++ cY) :+ DeleteEntry((cW + y))), cN) | |
666 | 737 | } | |
667 | 738 | } | |
668 | 739 | ||
669 | 740 | ||
670 | 741 | ||
671 | 742 | @Callable(P) | |
672 | - | func withdraw (ad, | |
743 | + | func withdraw (ad,da) = { | |
673 | 744 | let af = toString(P.caller) | |
674 | - | let cG = valueOrErrorMessage(getString(this, (A + ad)), "Unknown pool") | |
675 | - | let cH = valueOrErrorMessage(getInteger(this, (((((ad + "_") + af) + "_") + toString(cF)) + o)), "Unknown position") | |
676 | - | let cI = getIntegerValue(this, (((((ad + "_") + af) + "_") + toString(cF)) + s)) | |
677 | - | let cJ = getIntegerValue(this, (ad + u)) | |
678 | - | let cK = ac(ad) | |
679 | - | let cL = (cH + fraction(cH, (cJ - cI), g)) | |
680 | - | let W = Address(fromBase58String(ad)) | |
681 | - | let cM = Address(fromBase58String(af)) | |
682 | - | let cp = getIntegerValue(this, (((((ad + "_") + af) + "_") + toString(cF)) + p)) | |
683 | - | let cN = getStringValue(this, (((((ad + "_") + af) + "_") + toString(cF)) + q)) | |
684 | - | let cO = aa(Address(fromBase58String(ad)), cG) | |
685 | - | let bQ = cO._1 | |
686 | - | let bR = cO._2 | |
687 | - | let aw = cO._3 | |
688 | - | let ax = cO._4 | |
689 | - | let ay = cO._5 | |
690 | - | let cP = Q(ao(bQ)) | |
691 | - | if ((cP == cP)) | |
745 | + | let db = valueOrErrorMessage(getInteger(this, (((((ad + "_") + af) + "_") + toString(da)) + o)), "Unknown position") | |
746 | + | let dc = getIntegerValue(this, (((((ad + "_") + af) + "_") + toString(da)) + s)) | |
747 | + | let dd = getIntegerValue(this, (ad + u)) | |
748 | + | let de = ac(ad) | |
749 | + | let ci = (db + fraction(db, (dd - dc), g)) | |
750 | + | let df = Address(fromBase58String(af)) | |
751 | + | let cJ = getIntegerValue(this, (((((ad + "_") + af) + "_") + toString(da)) + p)) | |
752 | + | let ck = getStringValue(this, (((((ad + "_") + af) + "_") + toString(da)) + q)) | |
753 | + | let cj = if ((cJ > 0)) | |
692 | 754 | then { | |
693 | - | let cQ = Q(ao(bR)) | |
694 | - | if ((cQ == cQ)) | |
695 | - | then { | |
696 | - | let bg = if ((cG == a)) | |
697 | - | then invoke(W, "callFunction", ["withdraw", [toString(cL)]], nil) | |
698 | - | else if ((cG == b)) | |
699 | - | then invoke(W, "unstakeAndGet", [cL], nil) | |
700 | - | else throw("Wrong position type") | |
701 | - | if ((bg == bg)) | |
702 | - | then { | |
703 | - | let cR = Q(ao(bQ)) | |
704 | - | let cS = Q(ao(bR)) | |
705 | - | let cT = $Tuple2((cR - cP), (cS - cQ)) | |
706 | - | let cU = cT._1 | |
707 | - | let cV = cT._2 | |
708 | - | let cW = if ((cp > 0)) | |
709 | - | then { | |
710 | - | let cX = { | |
711 | - | let Z = invoke(am(), "getAssetDebt", [false, ((((ad + "_") + af) + "_") + toString(cF)), cN], nil) | |
712 | - | if ($isInstanceOf(Z, "Int")) | |
713 | - | then Z | |
714 | - | else throw(($getType(Z) + " couldn't be cast to Int")) | |
715 | - | } | |
716 | - | let cY = if (if ((cN == bQ)) | |
717 | - | then (cX > cU) | |
718 | - | else false) | |
719 | - | then (cX - cU) | |
720 | - | else if (if ((cN == bR)) | |
721 | - | then (cX > cV) | |
722 | - | else false) | |
723 | - | then (cX - cV) | |
724 | - | else 0 | |
725 | - | let cZ = if ((cY > 0)) | |
726 | - | then cg(cG, ad, bQ, bR, aw, ax, cY, cN) | |
727 | - | else 0 | |
728 | - | if ((cZ == cZ)) | |
729 | - | then { | |
730 | - | let da = invoke(am(), "repayFor", [((af + "_") + toString(cF))], [AttachedPayment(ao(cN), cX)]) | |
731 | - | if ((da == da)) | |
732 | - | then { | |
733 | - | let db = Q(ao(bQ)) | |
734 | - | let dc = Q(ao(bR)) | |
735 | - | $Tuple2((db - cP), (dc - cQ)) | |
736 | - | } | |
737 | - | else throw("Strict value is not equal to itself.") | |
738 | - | } | |
739 | - | else throw("Strict value is not equal to itself.") | |
740 | - | } | |
741 | - | else $Tuple2(cU, cV) | |
742 | - | let dd = cW._1 | |
743 | - | let de = cW._2 | |
744 | - | [DeleteEntry((((((ad + "_") + af) + "_") + toString(cF)) + o)), DeleteEntry((((((ad + "_") + af) + "_") + toString(cF)) + s)), IntegerEntry((ad + t), (cK - cL)), ScriptTransfer(cM, cU, ao(bQ)), ScriptTransfer(cM, cV, ao(bR))] | |
745 | - | } | |
746 | - | else throw("Strict value is not equal to itself.") | |
747 | - | } | |
755 | + | let Z = invoke(am(), "getAssetDebt", [false, ((((ad + "_") + af) + "_") + toString(da)), ck], nil) | |
756 | + | if ($isInstanceOf(Z, "Int")) | |
757 | + | then Z | |
758 | + | else throw(($getType(Z) + " couldn't be cast to Int")) | |
759 | + | } | |
760 | + | else 0 | |
761 | + | let dg = ch(ad, ci, cj, ck) | |
762 | + | if ((dg == dg)) | |
763 | + | then { | |
764 | + | let bR = dg._4 | |
765 | + | let cA = dg._3 | |
766 | + | let bQ = dg._2 | |
767 | + | let cz = dg._1 | |
768 | + | let dh = if ((cj > 0)) | |
769 | + | then invoke(am(), "repayFor", [((af + "_") + toString(da))], [AttachedPayment(ao(ck), cj)]) | |
770 | + | else 0 | |
771 | + | if ((dh == dh)) | |
772 | + | then [DeleteEntry((((((ad + "_") + af) + "_") + toString(da)) + o)), DeleteEntry((((((ad + "_") + af) + "_") + toString(da)) + s)), IntegerEntry((ad + t), (de - ci)), ScriptTransfer(df, cz, ao(bQ)), ScriptTransfer(df, cA, ao(bR))] | |
748 | 773 | else throw("Strict value is not equal to itself.") | |
749 | 774 | } | |
750 | 775 | else throw("Strict value is not equal to itself.") | |
753 | 778 | ||
754 | 779 | ||
755 | 780 | @Callable(P) | |
756 | - | func createNewRequest ( | |
757 | - | let | |
758 | - | $Tuple2([StringEntry((toString( | |
781 | + | func createNewRequest (di) = valueOrElse(O(P), { | |
782 | + | let cT = (valueOrElse(getInteger(this, z), 0) + 1) | |
783 | + | $Tuple2([StringEntry((toString(cT) + y), di), IntegerEntry(z, cT)], cT) | |
759 | 784 | }) | |
760 | 785 | ||
761 | 786 | ||
762 | 787 | ||
763 | 788 | @Callable(P) | |
764 | - | func capitalizeExKeeper (ad,ab, | |
765 | - | let | |
789 | + | func capitalizeExKeeper (ad,ab,dj,dk,dl,bm,bn,bo,bp,bq,br,bs) = { | |
790 | + | let dm = if (dl) | |
766 | 791 | then be(ab, ad) | |
767 | 792 | else { | |
768 | - | let | |
793 | + | let dn = if ((ab == a)) | |
769 | 794 | then M | |
770 | 795 | else N | |
771 | - | $Tuple2( | |
796 | + | $Tuple2(dk, dn) | |
772 | 797 | } | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | let aG = ( | |
777 | - | let | |
798 | + | let do = dm._1 | |
799 | + | let dn = dm._2 | |
800 | + | let dp = bi(dj, dk, dn, bm, bn, bo, bp, bq, br, bs) | |
801 | + | let aG = (do - dk) | |
802 | + | let dq = if ((aG > 0)) | |
778 | 803 | then [IntegerEntry((ad + B), (aG + valueOrElse(getInteger(this, (ad + B)), 0)))] | |
779 | 804 | else nil | |
780 | - | (bE(ad, ab, | |
805 | + | (bE(ad, ab, dj, dp) ++ dq) | |
781 | 806 | } | |
782 | 807 | ||
783 | 808 | ||
784 | 809 | ||
785 | 810 | @Callable(P) | |
786 | - | func capitalizeExPazzle (ad,ab, | |
787 | - | let | |
811 | + | func capitalizeExPazzle (ad,ab,dj,dk,dl,bv,bw,bs) = { | |
812 | + | let dr = if (dl) | |
788 | 813 | then be(ab, ad) | |
789 | 814 | else { | |
790 | - | let | |
815 | + | let dn = if ((ab == a)) | |
791 | 816 | then M | |
792 | 817 | else N | |
793 | - | $Tuple2( | |
818 | + | $Tuple2(dk, dn) | |
794 | 819 | } | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | let aG = ( | |
799 | - | let | |
820 | + | let do = dr._1 | |
821 | + | let dn = dr._2 | |
822 | + | let dp = bu(dj, dk, dn, bv, bw, bs) | |
823 | + | let aG = (do - dk) | |
824 | + | let dq = if ((aG > 0)) | |
800 | 825 | then [IntegerEntry((ad + B), (aG + valueOrElse(getInteger(this, (ad + B)), 0)))] | |
801 | 826 | else nil | |
802 | - | (bE(ad, ab, | |
827 | + | (bE(ad, ab, dj, dp) ++ dq) | |
803 | 828 | } | |
804 | 829 | ||
805 | 830 | ||
806 | 831 | ||
807 | 832 | @Callable(P) | |
808 | - | func capitalizeExSwopFi (ad,ab, | |
809 | - | let | |
833 | + | func capitalizeExSwopFi (ad,ab,dj,dk,dl,by,bz,bA,bB,bC,bD,bs) = { | |
834 | + | let ds = if (dl) | |
810 | 835 | then be(ab, ad) | |
811 | 836 | else { | |
812 | - | let | |
837 | + | let dn = if ((ab == a)) | |
813 | 838 | then M | |
814 | 839 | else N | |
815 | - | $Tuple2( | |
840 | + | $Tuple2(dk, dn) | |
816 | 841 | } | |
817 | - | let | |
818 | - | let | |
819 | - | let | |
820 | - | let aG = ( | |
821 | - | let | |
842 | + | let do = ds._1 | |
843 | + | let dn = ds._2 | |
844 | + | let dp = bx(dj, dk, dn, by, bz, bA, bB, bC, bD, bs) | |
845 | + | let aG = (do - dk) | |
846 | + | let dq = if ((aG > 0)) | |
822 | 847 | then [IntegerEntry((ad + B), (aG + valueOrElse(getInteger(this, (ad + B)), 0)))] | |
823 | 848 | else nil | |
824 | - | (bE(ad, ab, | |
849 | + | (bE(ad, ab, dj, dp) ++ dq) | |
825 | 850 | } | |
826 | 851 | ||
827 | 852 | ||
828 | 853 | ||
829 | 854 | @Callable(P) | |
830 | - | func initNewPool (ab,W, | |
855 | + | func initNewPool (ab,W,dt,du,dv) = if (if ((ab != a)) | |
831 | 856 | then (ab != b) | |
832 | 857 | else false) | |
833 | 858 | then throw("Wrong type") | |
834 | - | else [IntegerEntry((W + v), | |
859 | + | else [IntegerEntry((W + v), dt), IntegerEntry((W + w), du), IntegerEntry((W + x), dv), IntegerEntry((W + u), 0), StringEntry((A + W), ab)] | |
835 | 860 | ||
836 | 861 | ||
837 | - | @Verifier( | |
838 | - | func | |
862 | + | @Verifier(dw) | |
863 | + | func dx () = sigVerify(dw.bodyBytes, dw.proofs[0], dw.senderPublicKey) | |
839 | 864 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "SF" | |
5 | 5 | ||
6 | 6 | let b = "WX" | |
7 | 7 | ||
8 | 8 | let c = "cap" | |
9 | 9 | ||
10 | 10 | let d = "loan" | |
11 | 11 | ||
12 | 12 | let e = "noLoan" | |
13 | 13 | ||
14 | 14 | let f = 100000000 | |
15 | 15 | ||
16 | 16 | let g = 10000000000 | |
17 | 17 | ||
18 | 18 | let h = 1000000 | |
19 | 19 | ||
20 | 20 | let i = "A_asset_balance" | |
21 | 21 | ||
22 | 22 | let j = "B_asset_balance" | |
23 | 23 | ||
24 | 24 | let k = "A_asset_id" | |
25 | 25 | ||
26 | 26 | let l = "B_asset_id" | |
27 | 27 | ||
28 | 28 | let m = "share_asset_id" | |
29 | 29 | ||
30 | 30 | let n = "commission" | |
31 | 31 | ||
32 | 32 | let o = "_user_position" | |
33 | 33 | ||
34 | 34 | let p = "_user_position_borrow_amount" | |
35 | 35 | ||
36 | 36 | let q = "_user_position_borrow_asset_id" | |
37 | 37 | ||
38 | 38 | let r = "_user_position_number" | |
39 | 39 | ||
40 | 40 | let s = "_user_position_interest" | |
41 | 41 | ||
42 | 42 | let t = "_pool_total" | |
43 | 43 | ||
44 | 44 | let u = "_pool_interest" | |
45 | 45 | ||
46 | 46 | let v = "_axly_fee_without_loan" | |
47 | 47 | ||
48 | 48 | let w = "_axly_fee_with_loan" | |
49 | 49 | ||
50 | 50 | let x = "_axly_fee_cap" | |
51 | 51 | ||
52 | 52 | let y = "_request_id" | |
53 | 53 | ||
54 | 54 | let z = "requests_iter" | |
55 | 55 | ||
56 | 56 | let A = "pool_" | |
57 | 57 | ||
58 | 58 | let B = "_pool_cap_change" | |
59 | 59 | ||
60 | 60 | let C = "axly_money_box" | |
61 | 61 | ||
62 | 62 | let D = "swopfi_farming_addr" | |
63 | 63 | ||
64 | 64 | let E = "lend_service_addr" | |
65 | 65 | ||
66 | 66 | let F = "price_oracle" | |
67 | 67 | ||
68 | 68 | let G = "exchange_contract" | |
69 | 69 | ||
70 | 70 | let H = "wx_swap_contract" | |
71 | 71 | ||
72 | 72 | let I = Address(fromBase58String(valueOrErrorMessage(getString(this, C), "No axly moneyBox address"))) | |
73 | 73 | ||
74 | 74 | let J = Address(fromBase58String(valueOrErrorMessage(getString(this, G), "No exchange contract address"))) | |
75 | 75 | ||
76 | 76 | let K = Address(fromBase58String(valueOrErrorMessage(getString(this, F), "No price oracle address"))) | |
77 | 77 | ||
78 | 78 | let L = Address(fromBase58String(valueOrErrorMessage(getString(this, H), "No wx swap address"))) | |
79 | 79 | ||
80 | 80 | let M = base58'4W19ndijcc2CsQa9HGW2dfXKTVXhnneWWttxXrtjPmEp' | |
81 | 81 | ||
82 | 82 | let N = base58'EMAMLxDnv3xiz8RXg8Btj33jcEw3wLczL3JKYYmuubpc' | |
83 | 83 | ||
84 | 84 | func O (P) = if ((P.caller == this)) | |
85 | 85 | then unit | |
86 | 86 | else throw("Only contract itself can call this function") | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func Q (R) = { | |
90 | 90 | let S = R | |
91 | 91 | if ($isInstanceOf(S, "ByteVector")) | |
92 | 92 | then { | |
93 | 93 | let T = S | |
94 | 94 | assetBalance(this, T) | |
95 | 95 | } | |
96 | 96 | else if ($isInstanceOf(S, "Unit")) | |
97 | 97 | then { | |
98 | 98 | let U = S | |
99 | 99 | wavesBalance(this).available | |
100 | 100 | } | |
101 | 101 | else throw("Match error") | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func V (W) = $Tuple5(valueOrErrorMessage(getString(W, k), "Can't get pool A asset id"), valueOrErrorMessage(getString(W, l), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(W, i), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(W, j), "Can't get pool B asset balance"), valueOrErrorMessage(getString(W, m), "Can't get share asset id")) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func X (W) = { | |
109 | 109 | let Y = { | |
110 | 110 | let Z = invoke(W, "getPoolConfigWrapperREADONLY", nil, nil) | |
111 | 111 | if ($isInstanceOf(Z, "List[Any]")) | |
112 | 112 | then Z | |
113 | 113 | else throw(($getType(Z) + " couldn't be cast to List[Any]")) | |
114 | 114 | } | |
115 | 115 | if ((Y == Y)) | |
116 | 116 | then $Tuple5(valueOrErrorMessage({ | |
117 | 117 | let Z = Y[4] | |
118 | 118 | if ($isInstanceOf(Z, "String")) | |
119 | 119 | then Z | |
120 | 120 | else unit | |
121 | 121 | }, "Can't get pool A asset id"), valueOrErrorMessage({ | |
122 | 122 | let Z = Y[5] | |
123 | 123 | if ($isInstanceOf(Z, "String")) | |
124 | 124 | then Z | |
125 | 125 | else unit | |
126 | 126 | }, "Can't get pool B asset id"), 0, 0, valueOrErrorMessage({ | |
127 | 127 | let Z = Y[3] | |
128 | 128 | if ($isInstanceOf(Z, "String")) | |
129 | 129 | then Z | |
130 | 130 | else unit | |
131 | 131 | }, "Can't get pool LP asset id")) | |
132 | 132 | else throw("Strict value is not equal to itself.") | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func aa (W,ab) = if ((ab == a)) | |
137 | 137 | then V(W) | |
138 | 138 | else if ((ab == b)) | |
139 | 139 | then X(W) | |
140 | 140 | else throw("Wrong pool type") | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func ac (ad) = valueOrElse(getInteger(this, (ad + t)), 0) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func ae (ad,af) = (valueOrElse(getInteger(this, (((ad + "_") + af) + r)), 0) + 1) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func ag (ad,ah) = if ((ah == "cap")) | |
150 | 150 | then getIntegerValue(this, (ad + x)) | |
151 | 151 | else if ((ah == "loan")) | |
152 | 152 | then getIntegerValue(this, (ad + w)) | |
153 | 153 | else if ((ah == "noLoan")) | |
154 | 154 | then getIntegerValue(this, (ad + v)) | |
155 | 155 | else throw("Wrong fee type") | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func ai () = Address(fromBase58String(valueOrErrorMessage(getString(this, D), "Can't get swopfi farming addr"))) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func aj (W) = { | |
162 | 162 | let ak = Address(fromBase58String(valueOrErrorMessage(getString(W, "%s__factoryContract"), "Can't get WX factory contract addr"))) | |
163 | 163 | let al = split(valueOrErrorMessage(getString(ak, "%s__factoryConfig"), "Can't get WX factory cfg"), "__") | |
164 | 164 | Address(fromBase58String(al[1])) | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func am () = Address(fromBase58String(valueOrErrorMessage(getString(this, E), "Can't get lend service addr"))) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func an (R) = { | |
172 | 172 | let S = R | |
173 | 173 | if ($isInstanceOf(S, "ByteVector")) | |
174 | 174 | then { | |
175 | 175 | let T = S | |
176 | 176 | toBase58String(T) | |
177 | 177 | } | |
178 | 178 | else if ($isInstanceOf(S, "Unit")) | |
179 | 179 | then { | |
180 | 180 | let U = S | |
181 | 181 | "WAVES" | |
182 | 182 | } | |
183 | 183 | else throw("Match error") | |
184 | 184 | } | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func ao (R) = if ((R == "WAVES")) | |
188 | 188 | then unit | |
189 | 189 | else fromBase58String(R) | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func ap (R) = if ((R == "WAVES")) | |
193 | 193 | then 8 | |
194 | 194 | else { | |
195 | 195 | let S = assetInfo(fromBase58String(R)) | |
196 | 196 | if ($isInstanceOf(S, "Asset")) | |
197 | 197 | then { | |
198 | 198 | let aq = S | |
199 | 199 | aq.decimals | |
200 | 200 | } | |
201 | 201 | else throw("Can't find asset") | |
202 | 202 | } | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func ar (ad,ah,as,at,au,av,aw,ax,ay) = { | |
206 | 206 | let az = Q(fromBase58String(ay)) | |
207 | 207 | if ((az == az)) | |
208 | 208 | then { | |
209 | 209 | let W = Address(fromBase58String(ad)) | |
210 | 210 | let aA = fraction(f, as, aw) | |
211 | 211 | let aB = fraction(f, au, ax) | |
212 | 212 | let aC = if ((aB > aA)) | |
213 | 213 | then { | |
214 | 214 | let aD = fraction(ax, aA, f, CEILING) | |
215 | 215 | $Tuple4(as, aD, (au - aD), av) | |
216 | 216 | } | |
217 | 217 | else { | |
218 | 218 | let aD = fraction(aw, aB, f, CEILING) | |
219 | 219 | $Tuple4(aD, au, (as - aD), at) | |
220 | 220 | } | |
221 | 221 | let aE = aC._1 | |
222 | 222 | let aF = aC._2 | |
223 | 223 | let aG = aC._3 | |
224 | 224 | let aH = aC._4 | |
225 | 225 | let aI = if (if ((aE > 0)) | |
226 | 226 | then (aF > 0) | |
227 | 227 | else false) | |
228 | 228 | then { | |
229 | 229 | let aJ = [AttachedPayment(ao(at), aE), AttachedPayment(ao(av), aF)] | |
230 | 230 | invoke(W, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], aJ) | |
231 | 231 | } | |
232 | 232 | else 0 | |
233 | 233 | if ((aI == aI)) | |
234 | 234 | then { | |
235 | 235 | let aK = if ((aG > 0)) | |
236 | 236 | then { | |
237 | 237 | let aJ = [AttachedPayment(ao(aH), aG)] | |
238 | 238 | let aL = ["0", "false", "0"] | |
239 | 239 | invoke(W, "callFunction", ["replenishWithOneToken", aL], aJ) | |
240 | 240 | } | |
241 | 241 | else 0 | |
242 | 242 | if ((aK == aK)) | |
243 | 243 | then { | |
244 | 244 | let aM = Q(fromBase58String(ay)) | |
245 | 245 | let aN = (aM - az) | |
246 | 246 | let aO = fraction(aN, ag(ad, ah), h) | |
247 | 247 | let aP = (aN - aO) | |
248 | 248 | if ((0 >= aP)) | |
249 | 249 | then throw("amount of staked sharetokens must be > 0") | |
250 | 250 | else { | |
251 | 251 | let aQ = invoke(ai(), "lockShareTokens", [ad, 0], [AttachedPayment(fromBase58String(ay), aP)]) | |
252 | 252 | if ((aQ == aQ)) | |
253 | 253 | then $Tuple2(aP, aO) | |
254 | 254 | else throw("Strict value is not equal to itself.") | |
255 | 255 | } | |
256 | 256 | } | |
257 | 257 | else throw("Strict value is not equal to itself.") | |
258 | 258 | } | |
259 | 259 | else throw("Strict value is not equal to itself.") | |
260 | 260 | } | |
261 | 261 | else throw("Strict value is not equal to itself.") | |
262 | 262 | } | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | func aR (ad,ah,as,at,au,av,ay) = { | |
266 | 266 | let W = Address(fromBase58String(ad)) | |
267 | 267 | let aS = if (if ((as > 0)) | |
268 | 268 | then (au > 0) | |
269 | 269 | else false) | |
270 | 270 | then { | |
271 | 271 | let aT = split({ | |
272 | 272 | let Z = invoke(W, "evaluatePutByAmountAssetREADONLY", [as], nil) | |
273 | 273 | if ($isInstanceOf(Z, "String")) | |
274 | 274 | then Z | |
275 | 275 | else throw(($getType(Z) + " couldn't be cast to String")) | |
276 | 276 | }, "__") | |
277 | 277 | if ((aT == aT)) | |
278 | 278 | then { | |
279 | 279 | let aU = split({ | |
280 | 280 | let Z = invoke(W, "evaluatePutByPriceAssetREADONLY", [au], nil) | |
281 | 281 | if ($isInstanceOf(Z, "String")) | |
282 | 282 | then Z | |
283 | 283 | else throw(($getType(Z) + " couldn't be cast to String")) | |
284 | 284 | }, "__") | |
285 | 285 | if ((aU == aU)) | |
286 | 286 | then { | |
287 | 287 | let aV = parseIntValue(aT[1]) | |
288 | 288 | let aW = parseIntValue(aU[1]) | |
289 | 289 | if ((aW > aV)) | |
290 | 290 | then { | |
291 | 291 | let aX = parseIntValue(aT[8]) | |
292 | 292 | $Tuple4(as, aX, (au - aX), av) | |
293 | 293 | } | |
294 | 294 | else { | |
295 | 295 | let aY = parseIntValue(aU[7]) | |
296 | 296 | $Tuple4(aY, au, (as - aY), at) | |
297 | 297 | } | |
298 | 298 | } | |
299 | 299 | else throw("Strict value is not equal to itself.") | |
300 | 300 | } | |
301 | 301 | else throw("Strict value is not equal to itself.") | |
302 | 302 | } | |
303 | 303 | else if ((as > 0)) | |
304 | 304 | then $Tuple4(as, au, as, at) | |
305 | 305 | else if ((au > 0)) | |
306 | 306 | then $Tuple4(as, au, au, av) | |
307 | 307 | else throw("pmts must be > 0") | |
308 | 308 | let aE = aS._1 | |
309 | 309 | let aF = aS._2 | |
310 | 310 | let aG = aS._3 | |
311 | 311 | let aH = aS._4 | |
312 | 312 | let az = Q(fromBase58String(ay)) | |
313 | 313 | if ((az == az)) | |
314 | 314 | then { | |
315 | 315 | let aI = if (if ((aE > 0)) | |
316 | 316 | then (aF > 0) | |
317 | 317 | else false) | |
318 | 318 | then { | |
319 | 319 | let aJ = [AttachedPayment(ao(at), aE), AttachedPayment(ao(av), aF)] | |
320 | 320 | invoke(W, "put", [1000000, false], aJ) | |
321 | 321 | } | |
322 | 322 | else 0 | |
323 | 323 | if ((aI == aI)) | |
324 | 324 | then { | |
325 | 325 | let aK = if ((aG > 0)) | |
326 | 326 | then { | |
327 | 327 | let aJ = [AttachedPayment(ao(aH), aG)] | |
328 | 328 | invoke(W, "putOneTkn", [0, false], aJ) | |
329 | 329 | } | |
330 | 330 | else 0 | |
331 | 331 | if ((aK == aK)) | |
332 | 332 | then { | |
333 | 333 | let aM = Q(fromBase58String(ay)) | |
334 | 334 | let aN = (aM - az) | |
335 | 335 | let aO = fraction(aN, ag(ad, ah), h) | |
336 | 336 | let aP = (aN - aO) | |
337 | 337 | if ((0 >= aP)) | |
338 | 338 | then throw("amount of staked sharetokens must be > 0") | |
339 | 339 | else { | |
340 | 340 | let aQ = invoke(aj(W), "stake", nil, [AttachedPayment(fromBase58String(ay), aP)]) | |
341 | 341 | if ((aQ == aQ)) | |
342 | 342 | then $Tuple2(aP, aO) | |
343 | 343 | else throw("Strict value is not equal to itself.") | |
344 | 344 | } | |
345 | 345 | } | |
346 | 346 | else throw("Strict value is not equal to itself.") | |
347 | 347 | } | |
348 | 348 | else throw("Strict value is not equal to itself.") | |
349 | 349 | } | |
350 | 350 | else throw("Strict value is not equal to itself.") | |
351 | 351 | } | |
352 | 352 | ||
353 | 353 | ||
354 | 354 | func aZ (ad,af,ba,aO,bb,ay,ab) = { | |
355 | 355 | let bc = ac(ad) | |
356 | 356 | let bd = getIntegerValue(this, (ad + u)) | |
357 | 357 | [IntegerEntry((ad + t), (bc + ba)), IntegerEntry((((((ad + "_") + af) + "_") + toString(bb)) + o), ba), IntegerEntry((((((ad + "_") + af) + "_") + toString(bb)) + s), bd), IntegerEntry((((ad + "_") + af) + r), bb), ScriptTransfer(I, aO, fromBase58String(ay))] | |
358 | 358 | } | |
359 | 359 | ||
360 | 360 | ||
361 | 361 | func be (ab,ad) = if ((ab == a)) | |
362 | 362 | then { | |
363 | 363 | let bf = Q(M) | |
364 | 364 | if ((bf == bf)) | |
365 | 365 | then { | |
366 | 366 | let bg = invoke(ai(), "claim", [ad], nil) | |
367 | 367 | if ((bg == bg)) | |
368 | 368 | then { | |
369 | 369 | let bh = Q(M) | |
370 | 370 | $Tuple2((bh - bf), M) | |
371 | 371 | } | |
372 | 372 | else throw("Strict value is not equal to itself.") | |
373 | 373 | } | |
374 | 374 | else throw("Strict value is not equal to itself.") | |
375 | 375 | } | |
376 | 376 | else if ((ab == b)) | |
377 | 377 | then { | |
378 | 378 | let bf = Q(N) | |
379 | 379 | if ((bf == bf)) | |
380 | 380 | then { | |
381 | 381 | let bg = invoke(aj(Address(fromBase58String(ad))), "claimWX", [ad], nil) | |
382 | 382 | if ((bg == bg)) | |
383 | 383 | then { | |
384 | 384 | let bh = Q(N) | |
385 | 385 | $Tuple2((bh - bf), N) | |
386 | 386 | } | |
387 | 387 | else throw("Strict value is not equal to itself.") | |
388 | 388 | } | |
389 | 389 | else throw("Strict value is not equal to itself.") | |
390 | 390 | } | |
391 | 391 | else throw("Wrong pool type") | |
392 | 392 | ||
393 | 393 | ||
394 | 394 | func bi (bj,bk,bl,bm,bn,bo,bp,bq,br,bs) = { | |
395 | 395 | let bt = Q(ao(bj)) | |
396 | 396 | if ((bt == bt)) | |
397 | 397 | then { | |
398 | 398 | let bg = invoke(J, "swap", [bm, bn, bo, bp, bq, br, bs], [AttachedPayment(bl, bk)]) | |
399 | 399 | if ((bg == bg)) | |
400 | 400 | then (Q(ao(bj)) - bt) | |
401 | 401 | else throw("Strict value is not equal to itself.") | |
402 | 402 | } | |
403 | 403 | else throw("Strict value is not equal to itself.") | |
404 | 404 | } | |
405 | 405 | ||
406 | 406 | ||
407 | 407 | func bu (bj,bk,bl,bv,bw,bs) = { | |
408 | 408 | let bt = Q(ao(bj)) | |
409 | 409 | if ((bt == bt)) | |
410 | 410 | then { | |
411 | 411 | let bg = invoke(J, "puzzleSwap", [bv, bw, bs], [AttachedPayment(bl, bk)]) | |
412 | 412 | if ((bg == bg)) | |
413 | 413 | then (Q(ao(bj)) - bt) | |
414 | 414 | else throw("Strict value is not equal to itself.") | |
415 | 415 | } | |
416 | 416 | else throw("Strict value is not equal to itself.") | |
417 | 417 | } | |
418 | 418 | ||
419 | 419 | ||
420 | 420 | func bx (bj,bk,bl,by,bz,bA,bB,bC,bD,bs) = { | |
421 | 421 | let bt = Q(ao(bj)) | |
422 | 422 | if ((bt == bt)) | |
423 | 423 | then { | |
424 | 424 | let bg = invoke(J, "swopfiSwap", [by, bz, bA, bB, bC, bD, bs], [AttachedPayment(bl, bk)]) | |
425 | 425 | if ((bg == bg)) | |
426 | 426 | then (Q(ao(bj)) - bt) | |
427 | 427 | else throw("Strict value is not equal to itself.") | |
428 | 428 | } | |
429 | 429 | else throw("Strict value is not equal to itself.") | |
430 | 430 | } | |
431 | 431 | ||
432 | 432 | ||
433 | 433 | func bE (ad,ab,bF,bG) = { | |
434 | 434 | let W = Address(fromBase58String(ad)) | |
435 | 435 | let bH = aa(W, ab) | |
436 | 436 | let bI = bH._1 | |
437 | 437 | let bJ = bH._2 | |
438 | 438 | let aw = bH._3 | |
439 | 439 | let ax = bH._4 | |
440 | 440 | let ay = bH._5 | |
441 | 441 | let bK = if ((bF == bI)) | |
442 | 442 | then $Tuple2(bG, 0) | |
443 | 443 | else $Tuple2(0, bG) | |
444 | 444 | let as = bK._1 | |
445 | 445 | let au = bK._2 | |
446 | 446 | let bL = if ((ab == a)) | |
447 | 447 | then ar(ad, c, as, bI, au, bJ, aw, ax, ay) | |
448 | 448 | else aR(ad, c, as, bI, au, bJ, ay) | |
449 | 449 | let ba = bL._1 | |
450 | 450 | let bM = bL._2 | |
451 | 451 | let bd = valueOrElse(getInteger(this, (ad + u)), 0) | |
452 | 452 | let bN = ac(ad) | |
453 | 453 | let bO = (bd + fraction(ba, g, bN)) | |
454 | 454 | [IntegerEntry((ad + u), bO), ScriptTransfer(I, bM, fromBase58String(ay))] | |
455 | 455 | } | |
456 | 456 | ||
457 | 457 | ||
458 | 458 | func bP (ad,bQ,bR,aw,ax,bS,bT) = { | |
459 | 459 | let W = Address(fromBase58String(ad)) | |
460 | 460 | let bU = 1000000 | |
461 | 461 | let bV = getIntegerValue(W, n) | |
462 | 462 | let bW = fraction(bS, bU, (bU - bV)) | |
463 | 463 | let bX = if ((bT == bQ)) | |
464 | 464 | then { | |
465 | 465 | let bY = fraction(aw, bW, (ax - bW)) | |
466 | 466 | $Tuple2(bY, bR) | |
467 | 467 | } | |
468 | 468 | else { | |
469 | 469 | let bY = fraction(ax, bW, (aw - bW)) | |
470 | 470 | $Tuple2(bY, bQ) | |
471 | 471 | } | |
472 | 472 | let bY = bX._1 | |
473 | 473 | let bZ = bX._2 | |
474 | 474 | invoke(W, "callFunction", ["exchange", "1"], [AttachedPayment(ao(bZ), bY)]) | |
475 | 475 | } | |
476 | 476 | ||
477 | 477 | ||
478 | 478 | func ca (ad,bQ,bR,aw,ax,bS,bT) = { | |
479 | 479 | let W = Address(fromBase58String(ad)) | |
480 | 480 | let cb = getIntegerValue(L, "%s__protocolFee") | |
481 | 481 | let cc = getIntegerValue(L, "%s__poolFee") | |
482 | 482 | let cd = toBigInt(100000000) | |
483 | 483 | let ce = if ((bT == bQ)) | |
484 | 484 | then { | |
485 | 485 | let bY = fraction(aw, bS, (ax - bS)) | |
486 | 486 | $Tuple2(bY, bR) | |
487 | 487 | } | |
488 | 488 | else { | |
489 | 489 | let bY = fraction(ax, bS, (aw - bS)) | |
490 | 490 | $Tuple2(bY, bQ) | |
491 | 491 | } | |
492 | 492 | let bY = ce._1 | |
493 | 493 | let bZ = ce._2 | |
494 | 494 | let cf = toInt(fraction(toBigInt(bY), cd, (cd - toBigInt((cb + cc))))) | |
495 | 495 | invoke(L, "swap", [1, bT, toString(this)], [AttachedPayment(ao(bZ), cf)]) | |
496 | 496 | } | |
497 | 497 | ||
498 | 498 | ||
499 | 499 | func cg (ab,ad,bQ,bR,aw,ax,bS,bT) = if ((ab == a)) | |
500 | 500 | then bP(ad, bQ, bR, aw, ax, bS, bT) | |
501 | 501 | else ca(ad, bQ, bR, aw, ax, bS, bT) | |
502 | 502 | ||
503 | 503 | ||
504 | + | func ch (ad,ci,cj,ck) = { | |
505 | + | let W = Address(fromBase58String(ad)) | |
506 | + | let cl = valueOrErrorMessage(getString(this, (A + ad)), "Unknown pool") | |
507 | + | let cm = aa(W, cl) | |
508 | + | let bQ = cm._1 | |
509 | + | let bR = cm._2 | |
510 | + | let aw = cm._3 | |
511 | + | let ax = cm._4 | |
512 | + | let cn = Q(ao(bQ)) | |
513 | + | if ((cn == cn)) | |
514 | + | then { | |
515 | + | let co = Q(ao(bR)) | |
516 | + | if ((co == co)) | |
517 | + | then { | |
518 | + | let bg = if ((cl == a)) | |
519 | + | then invoke(W, "callFunction", ["withdraw", [toString(ci)]], nil) | |
520 | + | else if ((cl == b)) | |
521 | + | then invoke(W, "unstakeAndGet", [ci], nil) | |
522 | + | else throw("Wrong position type") | |
523 | + | if ((bg == bg)) | |
524 | + | then { | |
525 | + | let cp = Q(ao(bQ)) | |
526 | + | let cq = Q(ao(bR)) | |
527 | + | let cr = $Tuple2((cp - cn), (cq - co)) | |
528 | + | let cs = cr._1 | |
529 | + | let ct = cr._2 | |
530 | + | let cu = if ((cj > 0)) | |
531 | + | then { | |
532 | + | let cv = if (if ((ck == bQ)) | |
533 | + | then (cj > cs) | |
534 | + | else false) | |
535 | + | then (cj - cs) | |
536 | + | else if (if ((ck == bR)) | |
537 | + | then (cj > ct) | |
538 | + | else false) | |
539 | + | then (cj - ct) | |
540 | + | else 0 | |
541 | + | let cw = if ((cv > 0)) | |
542 | + | then cg(cl, ad, bQ, bR, aw, ax, cv, ck) | |
543 | + | else 0 | |
544 | + | if ((cw == cw)) | |
545 | + | then { | |
546 | + | let cx = Q(ao(bQ)) | |
547 | + | let cy = Q(ao(bR)) | |
548 | + | $Tuple2((cx - cn), (cy - co)) | |
549 | + | } | |
550 | + | else throw("Strict value is not equal to itself.") | |
551 | + | } | |
552 | + | else $Tuple2(cs, ct) | |
553 | + | let cz = cu._1 | |
554 | + | let cA = cu._2 | |
555 | + | $Tuple4(cz, bQ, cA, bR) | |
556 | + | } | |
557 | + | else throw("Strict value is not equal to itself.") | |
558 | + | } | |
559 | + | else throw("Strict value is not equal to itself.") | |
560 | + | } | |
561 | + | else throw("Strict value is not equal to itself.") | |
562 | + | } | |
563 | + | ||
564 | + | ||
504 | 565 | @Callable(P) | |
505 | - | func replenishREADONLY (ad, | |
566 | + | func replenishREADONLY (ad,cB,cC) = if (if ((100 > cB)) | |
506 | 567 | then true | |
507 | - | else ( | |
568 | + | else (cB > 300)) | |
508 | 569 | then throw("Leverage can't be <100 and >300") | |
509 | 570 | else { | |
510 | 571 | let ab = valueOrErrorMessage(getString(this, (A + ad)), "Pool is not inited") | |
511 | - | let | |
512 | - | let bI = | |
513 | - | let bJ = | |
514 | - | let aw = | |
515 | - | let ax = | |
516 | - | let ay = | |
517 | - | let | |
572 | + | let cD = aa(Address(fromBase58String(ad)), ab) | |
573 | + | let bI = cD._1 | |
574 | + | let bJ = cD._2 | |
575 | + | let aw = cD._3 | |
576 | + | let ax = cD._4 | |
577 | + | let ay = cD._5 | |
578 | + | let cE = if ((size(P.payments) == 2)) | |
518 | 579 | then if ((an(P.payments[0].assetId) != bI)) | |
519 | 580 | then throw("Wrong payment asset A") | |
520 | 581 | else if ((an(P.payments[1].assetId) != bJ)) | |
521 | 582 | then throw("Wrong payment asset B") | |
522 | 583 | else $Tuple4(P.payments[0].amount, bI, P.payments[1].amount, bJ) | |
523 | 584 | else if ((size(P.payments) == 1)) | |
524 | 585 | then if ((an(P.payments[0].assetId) == bI)) | |
525 | 586 | then $Tuple4(P.payments[0].amount, bI, 0, bJ) | |
526 | 587 | else if ((an(P.payments[0].assetId) == bJ)) | |
527 | 588 | then $Tuple4(0, bI, P.payments[0].amount, bJ) | |
528 | 589 | else throw("Wrong payment") | |
529 | 590 | else throw("One or two payments expected") | |
530 | - | let as = | |
531 | - | let at = | |
532 | - | let au = | |
533 | - | let av = | |
534 | - | let | |
591 | + | let as = cE._1 | |
592 | + | let at = cE._2 | |
593 | + | let au = cE._3 | |
594 | + | let av = cE._4 | |
595 | + | let cF = if ((cB > 100)) | |
535 | 596 | then { | |
536 | - | let | |
597 | + | let cG = ( let Z = invoke(K, "getTWAP60", [at, false], nil) | |
537 | 598 | if ($isInstanceOf(Z, "(Int, Int)")) | |
538 | 599 | then Z | |
539 | 600 | else throw(($getType(Z) + " couldn't be cast to (Int, Int)")))._1 | |
540 | - | let | |
601 | + | let cH = ( let Z = invoke(K, "getTWAP60", [av, false], nil) | |
541 | 602 | if ($isInstanceOf(Z, "(Int, Int)")) | |
542 | 603 | then Z | |
543 | 604 | else throw(($getType(Z) + " couldn't be cast to (Int, Int)")))._1 | |
544 | - | let | |
545 | - | let | |
546 | - | if (( | |
547 | - | then $ | |
548 | - | else $ | |
605 | + | let cI = (fraction(cG, as, pow(10, 0, ap(at), 0, 0, DOWN)) + fraction(cH, au, pow(10, 0, ap(av), 0, 0, DOWN))) | |
606 | + | let cJ = fraction(cI, (cB - 100), 100) | |
607 | + | if ((cC == at)) | |
608 | + | then $Tuple4((as + cJ), au, d, cJ) | |
609 | + | else $Tuple4(as, (au + cJ), d, cJ) | |
549 | 610 | } | |
550 | - | else $Tuple3(as, au, e) | |
551 | - | let cq = cl._1 | |
552 | - | let cr = cl._2 | |
553 | - | let ah = cl._3 | |
554 | - | let cs = if ((ab == a)) | |
555 | - | then ar(ad, ah, cq, at, cr, av, aw, ax, ay) | |
611 | + | else $Tuple4(as, au, e, 0) | |
612 | + | let cK = cF._1 | |
613 | + | let cL = cF._2 | |
614 | + | let ah = cF._3 | |
615 | + | let cJ = cF._4 | |
616 | + | let cM = if ((ab == a)) | |
617 | + | then ar(ad, ah, cK, at, cL, av, aw, ax, ay) | |
556 | 618 | else aR(ad, ah, as, at, au, av, ay) | |
557 | - | let ct = cs._1 | |
558 | - | let bM = cs._2 | |
559 | - | $Tuple2(nil, ct) | |
619 | + | let cN = cM._1 | |
620 | + | let bM = cM._2 | |
621 | + | let cO = ch(ad, cN, cJ, cC) | |
622 | + | if ((cO == cO)) | |
623 | + | then { | |
624 | + | let bR = cO._4 | |
625 | + | let cA = cO._3 | |
626 | + | let bQ = cO._2 | |
627 | + | let cz = cO._1 | |
628 | + | $Tuple2(nil, $Tuple3(cN, cz, cA)) | |
629 | + | } | |
630 | + | else throw("Strict value is not equal to itself.") | |
560 | 631 | } | |
561 | 632 | ||
562 | 633 | ||
563 | 634 | ||
564 | 635 | @Callable(P) | |
565 | - | func replenish (ad, | |
636 | + | func replenish (ad,cB,cC) = if (if ((100 > cB)) | |
566 | 637 | then true | |
567 | - | else ( | |
638 | + | else (cB > 300)) | |
568 | 639 | then throw("Leverage can't be <100 and >300") | |
569 | 640 | else { | |
570 | 641 | let ab = valueOrErrorMessage(getString(this, (A + ad)), "Pool is not inited") | |
571 | - | let | |
572 | - | let bI = | |
573 | - | let bJ = | |
574 | - | let aw = | |
575 | - | let ax = | |
576 | - | let ay = | |
577 | - | let | |
642 | + | let cP = aa(Address(fromBase58String(ad)), ab) | |
643 | + | let bI = cP._1 | |
644 | + | let bJ = cP._2 | |
645 | + | let aw = cP._3 | |
646 | + | let ax = cP._4 | |
647 | + | let ay = cP._5 | |
648 | + | let cQ = if ((size(P.payments) == 2)) | |
578 | 649 | then if ((an(P.payments[0].assetId) != bI)) | |
579 | 650 | then throw("Wrong payment asset A") | |
580 | 651 | else if ((an(P.payments[1].assetId) != bJ)) | |
581 | 652 | then throw("Wrong payment asset B") | |
582 | 653 | else $Tuple4(P.payments[0].amount, bI, P.payments[1].amount, bJ) | |
583 | 654 | else if ((size(P.payments) == 1)) | |
584 | 655 | then if ((an(P.payments[0].assetId) == bI)) | |
585 | 656 | then $Tuple4(P.payments[0].amount, bI, 0, bJ) | |
586 | 657 | else if ((an(P.payments[0].assetId) == bJ)) | |
587 | 658 | then $Tuple4(0, bI, P.payments[0].amount, bJ) | |
588 | 659 | else throw("Wrong payment") | |
589 | 660 | else throw("One or two payments expected") | |
590 | - | let as = | |
591 | - | let at = | |
592 | - | let au = | |
593 | - | let av = | |
594 | - | let | |
595 | - | if (( | |
661 | + | let as = cQ._1 | |
662 | + | let at = cQ._2 | |
663 | + | let au = cQ._3 | |
664 | + | let av = cQ._4 | |
665 | + | let cR = ae(ad, toString(P.caller)) | |
666 | + | if ((cB > 100)) | |
596 | 667 | then { | |
597 | - | let | |
668 | + | let cG = ( let Z = invoke(K, "getTWAP60", [at, false], nil) | |
598 | 669 | if ($isInstanceOf(Z, "(Int, Int)")) | |
599 | 670 | then Z | |
600 | 671 | else throw(($getType(Z) + " couldn't be cast to (Int, Int)")))._1 | |
601 | - | let | |
672 | + | let cH = ( let Z = invoke(K, "getTWAP60", [av, false], nil) | |
602 | 673 | if ($isInstanceOf(Z, "(Int, Int)")) | |
603 | 674 | then Z | |
604 | 675 | else throw(($getType(Z) + " couldn't be cast to (Int, Int)")))._1 | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
608 | - | let | |
609 | - | let Z = invoke(this, "createNewRequest", [ | |
676 | + | let cI = (fraction(cG, as, pow(10, 0, ap(at), 0, 0, DOWN)) + fraction(cH, au, pow(10, 0, ap(av), 0, 0, DOWN))) | |
677 | + | let cJ = fraction(cI, (cB - 100), 100) | |
678 | + | let cS = makeString([ab, toString(P.caller), ad, toString(as), at, toString(au), av, toString(aw), toString(ax), ay, cC, toString(cJ), toString(cR)], ",") | |
679 | + | let cT = { | |
680 | + | let Z = invoke(this, "createNewRequest", [cS], nil) | |
610 | 681 | if ($isInstanceOf(Z, "Int")) | |
611 | 682 | then Z | |
612 | 683 | else throw(($getType(Z) + " couldn't be cast to Int")) | |
613 | 684 | } | |
614 | - | if (( | |
685 | + | if ((cT == cT)) | |
615 | 686 | then { | |
616 | - | let | |
617 | - | let bg = reentrantInvoke(am(), "flashPosition", | |
687 | + | let cU = [((toString(P.caller) + "_") + toString(cR)), ay, cC, cJ, toString(this), "replenishFromLand", toString(valueOrErrorMessage(cT, "Can't create new request"))] | |
688 | + | let bg = reentrantInvoke(am(), "flashPosition", cU, nil) | |
618 | 689 | if ((bg == bg)) | |
619 | 690 | then nil | |
620 | 691 | else throw("Strict value is not equal to itself.") | |
621 | 692 | } | |
622 | 693 | else throw("Strict value is not equal to itself.") | |
623 | 694 | } | |
624 | 695 | else { | |
625 | - | let | |
696 | + | let cV = if ((ab == a)) | |
626 | 697 | then ar(ad, e, as, at, au, av, aw, ax, ay) | |
627 | 698 | else aR(ad, e, as, at, au, av, ay) | |
628 | - | let | |
629 | - | let bM = | |
630 | - | aZ(ad, toString(P.caller), | |
699 | + | let cN = cV._1 | |
700 | + | let bM = cV._2 | |
701 | + | aZ(ad, toString(P.caller), cN, bM, cR, ay, ab) | |
631 | 702 | } | |
632 | 703 | } | |
633 | 704 | ||
634 | 705 | ||
635 | 706 | ||
636 | 707 | @Callable(P) | |
637 | - | func replenishFromLand ( | |
638 | - | let | |
708 | + | func replenishFromLand (cW) = { | |
709 | + | let cS = split(valueOrErrorMessage(getString(this, (cW + y)), ("No request with id " + cW)), ",") | |
639 | 710 | if ((size(P.payments) != 1)) | |
640 | 711 | then throw("Wrong payment size") | |
641 | - | else if (if ((an(P.payments[0].assetId) != | |
712 | + | else if (if ((an(P.payments[0].assetId) != cS[10])) | |
642 | 713 | then true | |
643 | - | else (P.payments[0].amount != parseIntValue( | |
714 | + | else (P.payments[0].amount != parseIntValue(cS[11]))) | |
644 | 715 | then throw("Wrong payment") | |
645 | 716 | else { | |
646 | - | let as = if (( | |
647 | - | then (parseIntValue( | |
648 | - | else parseIntValue( | |
649 | - | let au = if (( | |
650 | - | then (parseIntValue( | |
651 | - | else parseIntValue( | |
652 | - | let ad = | |
653 | - | let af = | |
654 | - | let ay = | |
655 | - | let bb = parseIntValue( | |
656 | - | let | |
657 | - | then ar(ad, d, as, | |
658 | - | else if (( | |
659 | - | then aR(ad, d, as, | |
717 | + | let as = if ((cS[4] == an(P.payments[0].assetId))) | |
718 | + | then (parseIntValue(cS[3]) + P.payments[0].amount) | |
719 | + | else parseIntValue(cS[3]) | |
720 | + | let au = if ((cS[6] == an(P.payments[0].assetId))) | |
721 | + | then (parseIntValue(cS[5]) + P.payments[0].amount) | |
722 | + | else parseIntValue(cS[3]) | |
723 | + | let ad = cS[2] | |
724 | + | let af = cS[1] | |
725 | + | let ay = cS[9] | |
726 | + | let bb = parseIntValue(cS[12]) | |
727 | + | let cX = if ((cS[0] == a)) | |
728 | + | then ar(ad, d, as, cS[4], au, cS[6], parseIntValue(cS[7]), parseIntValue(cS[8]), ay) | |
729 | + | else if ((cS[0] == b)) | |
730 | + | then aR(ad, d, as, cS[4], au, cS[6], ay) | |
660 | 731 | else throw("Wrong request type") | |
661 | - | let | |
662 | - | let bM = | |
663 | - | let | |
664 | - | let | |
665 | - | $Tuple2((( | |
732 | + | let cN = cX._1 | |
733 | + | let bM = cX._2 | |
734 | + | let cY = [IntegerEntry((((((cS[2] + "_") + cS[1]) + "_") + cS[12]) + p), P.payments[0].amount), StringEntry((((((cS[2] + "_") + cS[1]) + "_") + cS[12]) + q), cS[10])] | |
735 | + | let cZ = aZ(ad, af, cN, bM, bb, ay, cS[0]) | |
736 | + | $Tuple2(((cZ ++ cY) :+ DeleteEntry((cW + y))), cN) | |
666 | 737 | } | |
667 | 738 | } | |
668 | 739 | ||
669 | 740 | ||
670 | 741 | ||
671 | 742 | @Callable(P) | |
672 | - | func withdraw (ad, | |
743 | + | func withdraw (ad,da) = { | |
673 | 744 | let af = toString(P.caller) | |
674 | - | let cG = valueOrErrorMessage(getString(this, (A + ad)), "Unknown pool") | |
675 | - | let cH = valueOrErrorMessage(getInteger(this, (((((ad + "_") + af) + "_") + toString(cF)) + o)), "Unknown position") | |
676 | - | let cI = getIntegerValue(this, (((((ad + "_") + af) + "_") + toString(cF)) + s)) | |
677 | - | let cJ = getIntegerValue(this, (ad + u)) | |
678 | - | let cK = ac(ad) | |
679 | - | let cL = (cH + fraction(cH, (cJ - cI), g)) | |
680 | - | let W = Address(fromBase58String(ad)) | |
681 | - | let cM = Address(fromBase58String(af)) | |
682 | - | let cp = getIntegerValue(this, (((((ad + "_") + af) + "_") + toString(cF)) + p)) | |
683 | - | let cN = getStringValue(this, (((((ad + "_") + af) + "_") + toString(cF)) + q)) | |
684 | - | let cO = aa(Address(fromBase58String(ad)), cG) | |
685 | - | let bQ = cO._1 | |
686 | - | let bR = cO._2 | |
687 | - | let aw = cO._3 | |
688 | - | let ax = cO._4 | |
689 | - | let ay = cO._5 | |
690 | - | let cP = Q(ao(bQ)) | |
691 | - | if ((cP == cP)) | |
745 | + | let db = valueOrErrorMessage(getInteger(this, (((((ad + "_") + af) + "_") + toString(da)) + o)), "Unknown position") | |
746 | + | let dc = getIntegerValue(this, (((((ad + "_") + af) + "_") + toString(da)) + s)) | |
747 | + | let dd = getIntegerValue(this, (ad + u)) | |
748 | + | let de = ac(ad) | |
749 | + | let ci = (db + fraction(db, (dd - dc), g)) | |
750 | + | let df = Address(fromBase58String(af)) | |
751 | + | let cJ = getIntegerValue(this, (((((ad + "_") + af) + "_") + toString(da)) + p)) | |
752 | + | let ck = getStringValue(this, (((((ad + "_") + af) + "_") + toString(da)) + q)) | |
753 | + | let cj = if ((cJ > 0)) | |
692 | 754 | then { | |
693 | - | let cQ = Q(ao(bR)) | |
694 | - | if ((cQ == cQ)) | |
695 | - | then { | |
696 | - | let bg = if ((cG == a)) | |
697 | - | then invoke(W, "callFunction", ["withdraw", [toString(cL)]], nil) | |
698 | - | else if ((cG == b)) | |
699 | - | then invoke(W, "unstakeAndGet", [cL], nil) | |
700 | - | else throw("Wrong position type") | |
701 | - | if ((bg == bg)) | |
702 | - | then { | |
703 | - | let cR = Q(ao(bQ)) | |
704 | - | let cS = Q(ao(bR)) | |
705 | - | let cT = $Tuple2((cR - cP), (cS - cQ)) | |
706 | - | let cU = cT._1 | |
707 | - | let cV = cT._2 | |
708 | - | let cW = if ((cp > 0)) | |
709 | - | then { | |
710 | - | let cX = { | |
711 | - | let Z = invoke(am(), "getAssetDebt", [false, ((((ad + "_") + af) + "_") + toString(cF)), cN], nil) | |
712 | - | if ($isInstanceOf(Z, "Int")) | |
713 | - | then Z | |
714 | - | else throw(($getType(Z) + " couldn't be cast to Int")) | |
715 | - | } | |
716 | - | let cY = if (if ((cN == bQ)) | |
717 | - | then (cX > cU) | |
718 | - | else false) | |
719 | - | then (cX - cU) | |
720 | - | else if (if ((cN == bR)) | |
721 | - | then (cX > cV) | |
722 | - | else false) | |
723 | - | then (cX - cV) | |
724 | - | else 0 | |
725 | - | let cZ = if ((cY > 0)) | |
726 | - | then cg(cG, ad, bQ, bR, aw, ax, cY, cN) | |
727 | - | else 0 | |
728 | - | if ((cZ == cZ)) | |
729 | - | then { | |
730 | - | let da = invoke(am(), "repayFor", [((af + "_") + toString(cF))], [AttachedPayment(ao(cN), cX)]) | |
731 | - | if ((da == da)) | |
732 | - | then { | |
733 | - | let db = Q(ao(bQ)) | |
734 | - | let dc = Q(ao(bR)) | |
735 | - | $Tuple2((db - cP), (dc - cQ)) | |
736 | - | } | |
737 | - | else throw("Strict value is not equal to itself.") | |
738 | - | } | |
739 | - | else throw("Strict value is not equal to itself.") | |
740 | - | } | |
741 | - | else $Tuple2(cU, cV) | |
742 | - | let dd = cW._1 | |
743 | - | let de = cW._2 | |
744 | - | [DeleteEntry((((((ad + "_") + af) + "_") + toString(cF)) + o)), DeleteEntry((((((ad + "_") + af) + "_") + toString(cF)) + s)), IntegerEntry((ad + t), (cK - cL)), ScriptTransfer(cM, cU, ao(bQ)), ScriptTransfer(cM, cV, ao(bR))] | |
745 | - | } | |
746 | - | else throw("Strict value is not equal to itself.") | |
747 | - | } | |
755 | + | let Z = invoke(am(), "getAssetDebt", [false, ((((ad + "_") + af) + "_") + toString(da)), ck], nil) | |
756 | + | if ($isInstanceOf(Z, "Int")) | |
757 | + | then Z | |
758 | + | else throw(($getType(Z) + " couldn't be cast to Int")) | |
759 | + | } | |
760 | + | else 0 | |
761 | + | let dg = ch(ad, ci, cj, ck) | |
762 | + | if ((dg == dg)) | |
763 | + | then { | |
764 | + | let bR = dg._4 | |
765 | + | let cA = dg._3 | |
766 | + | let bQ = dg._2 | |
767 | + | let cz = dg._1 | |
768 | + | let dh = if ((cj > 0)) | |
769 | + | then invoke(am(), "repayFor", [((af + "_") + toString(da))], [AttachedPayment(ao(ck), cj)]) | |
770 | + | else 0 | |
771 | + | if ((dh == dh)) | |
772 | + | then [DeleteEntry((((((ad + "_") + af) + "_") + toString(da)) + o)), DeleteEntry((((((ad + "_") + af) + "_") + toString(da)) + s)), IntegerEntry((ad + t), (de - ci)), ScriptTransfer(df, cz, ao(bQ)), ScriptTransfer(df, cA, ao(bR))] | |
748 | 773 | else throw("Strict value is not equal to itself.") | |
749 | 774 | } | |
750 | 775 | else throw("Strict value is not equal to itself.") | |
751 | 776 | } | |
752 | 777 | ||
753 | 778 | ||
754 | 779 | ||
755 | 780 | @Callable(P) | |
756 | - | func createNewRequest ( | |
757 | - | let | |
758 | - | $Tuple2([StringEntry((toString( | |
781 | + | func createNewRequest (di) = valueOrElse(O(P), { | |
782 | + | let cT = (valueOrElse(getInteger(this, z), 0) + 1) | |
783 | + | $Tuple2([StringEntry((toString(cT) + y), di), IntegerEntry(z, cT)], cT) | |
759 | 784 | }) | |
760 | 785 | ||
761 | 786 | ||
762 | 787 | ||
763 | 788 | @Callable(P) | |
764 | - | func capitalizeExKeeper (ad,ab, | |
765 | - | let | |
789 | + | func capitalizeExKeeper (ad,ab,dj,dk,dl,bm,bn,bo,bp,bq,br,bs) = { | |
790 | + | let dm = if (dl) | |
766 | 791 | then be(ab, ad) | |
767 | 792 | else { | |
768 | - | let | |
793 | + | let dn = if ((ab == a)) | |
769 | 794 | then M | |
770 | 795 | else N | |
771 | - | $Tuple2( | |
796 | + | $Tuple2(dk, dn) | |
772 | 797 | } | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | let aG = ( | |
777 | - | let | |
798 | + | let do = dm._1 | |
799 | + | let dn = dm._2 | |
800 | + | let dp = bi(dj, dk, dn, bm, bn, bo, bp, bq, br, bs) | |
801 | + | let aG = (do - dk) | |
802 | + | let dq = if ((aG > 0)) | |
778 | 803 | then [IntegerEntry((ad + B), (aG + valueOrElse(getInteger(this, (ad + B)), 0)))] | |
779 | 804 | else nil | |
780 | - | (bE(ad, ab, | |
805 | + | (bE(ad, ab, dj, dp) ++ dq) | |
781 | 806 | } | |
782 | 807 | ||
783 | 808 | ||
784 | 809 | ||
785 | 810 | @Callable(P) | |
786 | - | func capitalizeExPazzle (ad,ab, | |
787 | - | let | |
811 | + | func capitalizeExPazzle (ad,ab,dj,dk,dl,bv,bw,bs) = { | |
812 | + | let dr = if (dl) | |
788 | 813 | then be(ab, ad) | |
789 | 814 | else { | |
790 | - | let | |
815 | + | let dn = if ((ab == a)) | |
791 | 816 | then M | |
792 | 817 | else N | |
793 | - | $Tuple2( | |
818 | + | $Tuple2(dk, dn) | |
794 | 819 | } | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | let aG = ( | |
799 | - | let | |
820 | + | let do = dr._1 | |
821 | + | let dn = dr._2 | |
822 | + | let dp = bu(dj, dk, dn, bv, bw, bs) | |
823 | + | let aG = (do - dk) | |
824 | + | let dq = if ((aG > 0)) | |
800 | 825 | then [IntegerEntry((ad + B), (aG + valueOrElse(getInteger(this, (ad + B)), 0)))] | |
801 | 826 | else nil | |
802 | - | (bE(ad, ab, | |
827 | + | (bE(ad, ab, dj, dp) ++ dq) | |
803 | 828 | } | |
804 | 829 | ||
805 | 830 | ||
806 | 831 | ||
807 | 832 | @Callable(P) | |
808 | - | func capitalizeExSwopFi (ad,ab, | |
809 | - | let | |
833 | + | func capitalizeExSwopFi (ad,ab,dj,dk,dl,by,bz,bA,bB,bC,bD,bs) = { | |
834 | + | let ds = if (dl) | |
810 | 835 | then be(ab, ad) | |
811 | 836 | else { | |
812 | - | let | |
837 | + | let dn = if ((ab == a)) | |
813 | 838 | then M | |
814 | 839 | else N | |
815 | - | $Tuple2( | |
840 | + | $Tuple2(dk, dn) | |
816 | 841 | } | |
817 | - | let | |
818 | - | let | |
819 | - | let | |
820 | - | let aG = ( | |
821 | - | let | |
842 | + | let do = ds._1 | |
843 | + | let dn = ds._2 | |
844 | + | let dp = bx(dj, dk, dn, by, bz, bA, bB, bC, bD, bs) | |
845 | + | let aG = (do - dk) | |
846 | + | let dq = if ((aG > 0)) | |
822 | 847 | then [IntegerEntry((ad + B), (aG + valueOrElse(getInteger(this, (ad + B)), 0)))] | |
823 | 848 | else nil | |
824 | - | (bE(ad, ab, | |
849 | + | (bE(ad, ab, dj, dp) ++ dq) | |
825 | 850 | } | |
826 | 851 | ||
827 | 852 | ||
828 | 853 | ||
829 | 854 | @Callable(P) | |
830 | - | func initNewPool (ab,W, | |
855 | + | func initNewPool (ab,W,dt,du,dv) = if (if ((ab != a)) | |
831 | 856 | then (ab != b) | |
832 | 857 | else false) | |
833 | 858 | then throw("Wrong type") | |
834 | - | else [IntegerEntry((W + v), | |
859 | + | else [IntegerEntry((W + v), dt), IntegerEntry((W + w), du), IntegerEntry((W + x), dv), IntegerEntry((W + u), 0), StringEntry((A + W), ab)] | |
835 | 860 | ||
836 | 861 | ||
837 | - | @Verifier( | |
838 | - | func | |
862 | + | @Verifier(dw) | |
863 | + | func dx () = sigVerify(dw.bodyBytes, dw.proofs[0], dw.senderPublicKey) | |
839 | 864 |
github/deemru/w8io/026f985 142.34 ms ◑