tx · CTRfpKuBhPrSohAaLoopKiyvAn2htBoPoc2NepCTSjXs 3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA: -0.02400000 Waves 2022.12.09 11:38 [2352549] smart account 3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA > SELF 0.00000000 Waves
{ "type": 13, "id": "CTRfpKuBhPrSohAaLoopKiyvAn2htBoPoc2NepCTSjXs", "fee": 2400000, "feeAssetId": null, "timestamp": 1670575073088, "version": 2, "chainId": 84, "sender": "3Mp3nG9T5fKGziHW8mcCqx3jMFx3towh3WA", "senderPublicKey": "D46gQxzmdzdCTYRg6dMcwFoUrc6ZmxF6GKd5ZoTkvzp1", "proofs": [ "2DNTj9ocPvM7TSErQy1qK3PWA5uYVSCPeHnk9CV9vHHw1toscFid1ZsLkzMEEJeR3XzAyvZmqqUezVck1LGN3gkC" ], "script": "base64:BgJcCAISAwoBCBIAEgQKAggBEgcKBQgICAgBEgQKAggIEgUKAwgIARIECgIICBIDCgEBEgMKAQESBAoCCAgSBAoCCAQSABIDCgEBEgASBAoCCAgSBAoCCAgSBAoCCAgyAAlzZXBhcmF0b3ICAl9fAA5wb29sV2VpZ2h0TXVsdACAwtcvAA9tYXhEZXB0aERlZmF1bHQACgAWZmluYWxpemF0aW9uU3RhZ2VUb3RhbAAAABdmaW5hbGl6YXRpb25TdGFnZVNoYXJlcwABAA5rZXlFcG9jaExlbmd0aAkAuQkCCQDMCAICAiVzCQDMCAICC2Vwb2NoTGVuZ3RoBQNuaWwFCXNlcGFyYXRvcgAPa2V5Q3VycmVudEVwb2NoCQC5CQIJAMwIAgICJXMJAMwIAgIMY3VycmVudEVwb2NoBQNuaWwFCXNlcGFyYXRvcgALa2V5TWF4RGVwdGgJALkJAgkAzAgCAgIlcwkAzAgCAghtYXhEZXB0aAUDbmlsBQlzZXBhcmF0b3IAImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QJALkJAgkAzAgCAgIlcwkAzAgCAh92b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pAQpkZWxldGVOb2RlAghsaXN0TmFtZQJpZAQLY2hlY2tDYWxsZXIJAQttdXN0TWFuYWdlcgEFAWkDCQAAAgULY2hlY2tDYWxsZXIFC2NoZWNrQ2FsbGVyCQCUCgIJARFkZWxldGVOb2RlQWN0aW9ucwIFCGxpc3ROYW1lBQJpZAUEdW5pdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleYZ5hVI=", "height": 2352549, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7kgLpjyXegDCmDuWXnPDFboirXWvnwiMqHX2pS7dR5fE Next: H1K2u4rQ2pRmD3uGHNEUoJimbdsBVXhfL6seYoYTnzkv Diff:
Old | New | Differences | |
---|---|---|---|
37 | 37 | ||
38 | 38 | let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator) | |
39 | 39 | ||
40 | + | let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator) | |
41 | + | ||
40 | 42 | func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator) | |
41 | 43 | ||
42 | 44 | ||
44 | 46 | ||
45 | 47 | ||
46 | 48 | func keyInList (pool) = { | |
47 | - | let $ | |
48 | - | let amountAssetId = $ | |
49 | - | let priceAssetId = $ | |
49 | + | let $t015111551 = pool | |
50 | + | let amountAssetId = $t015111551._1 | |
51 | + | let priceAssetId = $t015111551._2 | |
50 | 52 | makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
51 | 53 | } | |
52 | 54 | ||
55 | 57 | ||
56 | 58 | ||
57 | 59 | func keyVote (pool,address,epoch) = { | |
58 | - | let $ | |
59 | - | let amountAssetId = $ | |
60 | - | let priceAssetId = $ | |
60 | + | let $t018251865 = pool | |
61 | + | let amountAssetId = $t018251865._1 | |
62 | + | let priceAssetId = $t018251865._2 | |
61 | 63 | makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator) | |
62 | 64 | } | |
63 | 65 | ||
64 | 66 | ||
65 | 67 | func keyVotingResult (pool,epoch) = { | |
66 | - | let $ | |
67 | - | let amountAssetId = $ | |
68 | - | let priceAssetId = $ | |
68 | + | let $t020472087 = pool | |
69 | + | let amountAssetId = $t020472087._1 | |
70 | + | let priceAssetId = $t020472087._2 | |
69 | 71 | makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator) | |
70 | 72 | } | |
71 | 73 | ||
72 | 74 | ||
73 | 75 | func keyPoolShare (pool,epoch) = { | |
74 | - | let $ | |
75 | - | let amountAssetId = $ | |
76 | - | let priceAssetId = $ | |
76 | + | let $t022522292 = pool | |
77 | + | let amountAssetId = $t022522292._1 | |
78 | + | let priceAssetId = $t022522292._2 | |
77 | 79 | makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator) | |
78 | 80 | } | |
79 | 81 | ||
138 | 140 | ||
139 | 141 | ||
140 | 142 | func checkWxEmissionPoolLabel (pool) = { | |
141 | - | let $ | |
142 | - | let amountAssetId = $ | |
143 | - | let priceAssetId = $ | |
143 | + | let $t045344574 = pool | |
144 | + | let amountAssetId = $t045344574._1 | |
145 | + | let priceAssetId = $t045344574._2 | |
144 | 146 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
145 | 147 | let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
146 | 148 | if ($isInstanceOf(@, "Boolean")) | |
152 | 154 | let poolsListName = "pools" | |
153 | 155 | ||
154 | 156 | func getVotesListName (pool) = { | |
155 | - | let $ | |
156 | - | let amountAssetId = $ | |
157 | - | let priceAssetId = $ | |
157 | + | let $t048754915 = pool | |
158 | + | let amountAssetId = $t048754915._1 | |
159 | + | let priceAssetId = $t048754915._2 | |
158 | 160 | makeString(["votes", amountAssetId, priceAssetId], separator) | |
159 | 161 | } | |
160 | 162 | ||
497 | 499 | if ((checkTargetEpoch == checkTargetEpoch)) | |
498 | 500 | then { | |
499 | 501 | let pool = stringToPool(poolStr) | |
500 | - | let $ | |
501 | - | let amountAssetId = $ | |
502 | - | let priceAssetId = $ | |
502 | + | let $t01727017310 = pool | |
503 | + | let amountAssetId = $t01727017310._1 | |
504 | + | let priceAssetId = $t01727017310._2 | |
503 | 505 | let wxEmission = checkWxEmissionPoolLabel(pool) | |
504 | 506 | let gwxAmountAtEndTotal = { | |
505 | 507 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil) | |
535 | 537 | ||
536 | 538 | ||
537 | 539 | @Callable(i) | |
538 | - | func processPoolINTERNAL (poolStr) = { | |
540 | + | func processPoolINTERNAL (poolStr,force) = { | |
539 | 541 | let checkCaller = mustThis(i) | |
540 | 542 | if ((checkCaller == checkCaller)) | |
541 | 543 | then { | |
542 | - | let targetEpoch = (getIntOrFail(this, keyCurrentEpoch) - 1) | |
544 | + | let targetEpoch = { | |
545 | + | let currentEpoch = getIntOrFail(this, keyCurrentEpoch) | |
546 | + | if (force) | |
547 | + | then currentEpoch | |
548 | + | else (currentEpoch - 1) | |
549 | + | } | |
543 | 550 | let checkTargetEpoch = if ((targetEpoch >= 0)) | |
544 | 551 | then true | |
545 | 552 | else throw("processPoolINTERNAL: invalid target epoch") | |
546 | 553 | if ((checkTargetEpoch == checkTargetEpoch)) | |
547 | 554 | then { | |
548 | 555 | let pool = stringToPool(poolStr) | |
549 | - | let $ | |
550 | - | let amountAssetId = $ | |
551 | - | let priceAssetId = $ | |
556 | + | let $t01903619076 = pool | |
557 | + | let amountAssetId = $t01903619076._1 | |
558 | + | let priceAssetId = $t01903619076._2 | |
552 | 559 | let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract)) | |
553 | 560 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
554 | 561 | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
573 | 580 | let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil) | |
574 | 581 | if ((modifyWeightInv == modifyWeightInv)) | |
575 | 582 | then { | |
576 | - | let poolsListActions = if (wxEmission) | |
583 | + | let poolsListActions = if (if (wxEmission) | |
584 | + | then true | |
585 | + | else force) | |
577 | 586 | then nil | |
578 | 587 | else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr)) | |
579 | 588 | $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false) | |
591 | 600 | ||
592 | 601 | @Callable(i) | |
593 | 602 | func finalizeHelper () = { | |
603 | + | let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false) | |
594 | 604 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
595 | 605 | let previousEpoch = (epoch - 1) | |
596 | 606 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
597 | 607 | let epochLength = getIntOrFail(this, keyEpochLength) | |
598 | 608 | let endHeight = (startHeight + epochLength) | |
599 | 609 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
600 | - | if (if ((height >= endHeight)) | |
610 | + | if (if (if ((height >= endHeight)) | |
601 | 611 | then (finalizationStageOrUnit == unit) | |
612 | + | else false) | |
613 | + | then !(force) | |
602 | 614 | else false) | |
603 | 615 | then { | |
604 | 616 | let newEpoch = (epoch + 1) | |
605 | 617 | $Tuple2([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal)], true) | |
606 | 618 | } | |
607 | - | else if ((finalizationStageOrUnit == unit)) | |
608 | - | then $Tuple2(nil, false) | |
609 | - | else if ((finalizationStageOrUnit == finalizationStageTotal)) | |
610 | - | then { | |
611 | - | let poolOrUnit = getString(keyNextPool) | |
612 | - | let userOrUnit = getString(keyNextUser) | |
613 | - | match poolOrUnit { | |
614 | - | case _: Unit => | |
615 | - | match getString(keyListHead(poolsListName)) { | |
619 | + | else if (if (force) | |
620 | + | then (finalizationStageOrUnit == unit) | |
621 | + | else false) | |
622 | + | then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true) | |
623 | + | else if ((finalizationStageOrUnit == unit)) | |
624 | + | then $Tuple2(nil, false) | |
625 | + | else if ((finalizationStageOrUnit == finalizationStageTotal)) | |
626 | + | then { | |
627 | + | let poolOrUnit = getString(keyNextPool) | |
628 | + | let userOrUnit = getString(keyNextUser) | |
629 | + | match poolOrUnit { | |
630 | + | case _: Unit => | |
631 | + | match getString(keyListHead(poolsListName)) { | |
632 | + | case _: Unit => | |
633 | + | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
634 | + | case poolsHeadStr: String => | |
635 | + | $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true) | |
636 | + | case _ => | |
637 | + | throw("Match error") | |
638 | + | } | |
639 | + | case poolStr: String => | |
640 | + | let pool = stringToPool(poolStr) | |
641 | + | let nextUserOrUnit = match userOrUnit { | |
642 | + | case _: Unit => | |
643 | + | getString(keyListHead(getVotesListName(pool))) | |
644 | + | case user: String => | |
645 | + | let next = getString(keyListNext(getVotesListName(pool), user)) | |
646 | + | if ((next == next)) | |
647 | + | then { | |
648 | + | let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil) | |
649 | + | if ((processVoteInv == processVoteInv)) | |
650 | + | then next | |
651 | + | else throw("Strict value is not equal to itself.") | |
652 | + | } | |
653 | + | else throw("Strict value is not equal to itself.") | |
654 | + | case _ => | |
655 | + | throw("Match error") | |
656 | + | } | |
657 | + | match nextUserOrUnit { | |
658 | + | case _: Unit => | |
659 | + | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
660 | + | match nextPoolOrUnit { | |
661 | + | case _: Unit => | |
662 | + | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
663 | + | case s: String => | |
664 | + | $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true) | |
665 | + | case _ => | |
666 | + | throw("Match error") | |
667 | + | } | |
668 | + | case nextUser: String => | |
669 | + | $Tuple2([StringEntry(keyNextUser, nextUser)], true) | |
670 | + | case _ => | |
671 | + | throw("Match error") | |
672 | + | } | |
673 | + | case _ => | |
674 | + | throw("Match error") | |
675 | + | } | |
676 | + | } | |
677 | + | else if ((finalizationStageOrUnit == finalizationStageShares)) | |
678 | + | then { | |
679 | + | let poolOrUnit = getString(keyNextPool) | |
680 | + | match poolOrUnit { | |
616 | 681 | case _: Unit => | |
617 | - | | |
618 | - | case | |
619 | - | | |
620 | - | | |
621 | - | | |
622 | - | | |
623 | - | case | |
624 | - | | |
625 | - | ||
626 | - | | |
627 | - | | |
628 | - | case | |
629 | - | let | |
630 | - | if (( | |
682 | + | match getString(keyListHead(poolsListName)) { | |
683 | + | case _: Unit => | |
684 | + | let actions = if (force) | |
685 | + | then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)] | |
686 | + | else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)] | |
687 | + | $Tuple2(actions, true) | |
688 | + | case nextPoolStr: String => | |
689 | + | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
690 | + | case _ => | |
691 | + | throw("Match error") | |
692 | + | } | |
693 | + | case poolStr: String => | |
694 | + | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
695 | + | if ((nextPoolOrUnit == nextPoolOrUnit)) | |
631 | 696 | then { | |
632 | - | let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil) | |
633 | - | if ((processVoteInv == processVoteInv)) | |
634 | - | then next | |
697 | + | let r = { | |
698 | + | let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil) | |
699 | + | if ($isInstanceOf(@, "Boolean")) | |
700 | + | then @ | |
701 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
702 | + | } | |
703 | + | if ((r == r)) | |
704 | + | then if (r) | |
705 | + | then $Tuple2(nil, true) | |
706 | + | else match nextPoolOrUnit { | |
707 | + | case _: Unit => | |
708 | + | let actions = if (force) | |
709 | + | then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)] | |
710 | + | else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)] | |
711 | + | $Tuple2(actions, true) | |
712 | + | case nextPoolStr: String => | |
713 | + | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
714 | + | case _ => | |
715 | + | throw("Match error") | |
716 | + | } | |
635 | 717 | else throw("Strict value is not equal to itself.") | |
636 | 718 | } | |
637 | 719 | else throw("Strict value is not equal to itself.") | |
638 | 720 | case _ => | |
639 | 721 | throw("Match error") | |
640 | 722 | } | |
641 | - | match nextUserOrUnit { | |
642 | - | case _: Unit => | |
643 | - | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
644 | - | match nextPoolOrUnit { | |
645 | - | case _: Unit => | |
646 | - | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
647 | - | case s: String => | |
648 | - | $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true) | |
649 | - | case _ => | |
650 | - | throw("Match error") | |
651 | - | } | |
652 | - | case nextUser: String => | |
653 | - | $Tuple2([StringEntry(keyNextUser, nextUser)], true) | |
654 | - | case _ => | |
655 | - | throw("Match error") | |
656 | 723 | } | |
657 | - | case _ => | |
658 | - | throw("Match error") | |
659 | - | } | |
660 | - | } | |
661 | - | else if ((finalizationStageOrUnit == finalizationStageShares)) | |
662 | - | then { | |
663 | - | let poolOrUnit = getString(keyNextPool) | |
664 | - | match poolOrUnit { | |
665 | - | case _: Unit => | |
666 | - | match getString(keyListHead(poolsListName)) { | |
667 | - | case _: Unit => | |
668 | - | $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)], true) | |
669 | - | case nextPoolStr: String => | |
670 | - | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
671 | - | case _ => | |
672 | - | throw("Match error") | |
673 | - | } | |
674 | - | case poolStr: String => | |
675 | - | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
676 | - | if ((nextPoolOrUnit == nextPoolOrUnit)) | |
677 | - | then { | |
678 | - | let r = { | |
679 | - | let @ = invoke(this, "processPoolINTERNAL", [poolStr], nil) | |
680 | - | if ($isInstanceOf(@, "Boolean")) | |
681 | - | then @ | |
682 | - | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
683 | - | } | |
684 | - | if ((r == r)) | |
685 | - | then if (r) | |
686 | - | then $Tuple2(nil, true) | |
687 | - | else match nextPoolOrUnit { | |
688 | - | case _: Unit => | |
689 | - | $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)], true) | |
690 | - | case nextPoolStr: String => | |
691 | - | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
692 | - | case _ => | |
693 | - | throw("Match error") | |
694 | - | } | |
695 | - | else throw("Strict value is not equal to itself.") | |
696 | - | } | |
697 | - | else throw("Strict value is not equal to itself.") | |
698 | - | case _ => | |
699 | - | throw("Match error") | |
700 | - | } | |
701 | - | } | |
702 | - | else throw("finalization is broken") | |
724 | + | else throw("finalization is broken") | |
703 | 725 | } | |
704 | 726 | ||
705 | 727 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let poolWeightMult = 100000000 | |
7 | 7 | ||
8 | 8 | let maxDepthDefault = 10 | |
9 | 9 | ||
10 | 10 | let finalizationStageTotal = 0 | |
11 | 11 | ||
12 | 12 | let finalizationStageShares = 1 | |
13 | 13 | ||
14 | 14 | let keyEpochLength = makeString(["%s", "epochLength"], separator) | |
15 | 15 | ||
16 | 16 | let keyCurrentEpoch = makeString(["%s", "currentEpoch"], separator) | |
17 | 17 | ||
18 | 18 | let keyMaxDepth = makeString(["%s", "maxDepth"], separator) | |
19 | 19 | ||
20 | 20 | let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], separator) | |
21 | 21 | ||
22 | 22 | let keyFactoryContract = makeString(["%s", "factoryContract"], separator) | |
23 | 23 | ||
24 | 24 | let keyBoostingContract = makeString(["%s", "boostingContract"], separator) | |
25 | 25 | ||
26 | 26 | let keyStakingContract = makeString(["%s", "stakingContract"], separator) | |
27 | 27 | ||
28 | 28 | let keyFinalizationStage = makeString(["%s", "finalizationStage"], separator) | |
29 | 29 | ||
30 | 30 | let keyNextPool = makeString(["%s", "nextPool"], separator) | |
31 | 31 | ||
32 | 32 | let keyNextUser = makeString(["%s", "nextUser"], separator) | |
33 | 33 | ||
34 | 34 | let keyStartHeight = makeString(["%s", "startHeight"], separator) | |
35 | 35 | ||
36 | 36 | let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], separator) | |
37 | 37 | ||
38 | 38 | let keyStartHeightUi = makeString(["%s", "startHeightUi"], separator) | |
39 | 39 | ||
40 | + | let keyFinalizationShouldBeForced = makeString(["%s", "force"], separator) | |
41 | + | ||
40 | 42 | func keyStartHeightByEpoch (epoch) = makeString(["%s%d", "startHeight", toString(epoch)], separator) | |
41 | 43 | ||
42 | 44 | ||
43 | 45 | func keyFinalized (epoch) = makeString(["%s%d", "finalized", toString(epoch)], separator) | |
44 | 46 | ||
45 | 47 | ||
46 | 48 | func keyInList (pool) = { | |
47 | - | let $ | |
48 | - | let amountAssetId = $ | |
49 | - | let priceAssetId = $ | |
49 | + | let $t015111551 = pool | |
50 | + | let amountAssetId = $t015111551._1 | |
51 | + | let priceAssetId = $t015111551._2 | |
50 | 52 | makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator) | |
51 | 53 | } | |
52 | 54 | ||
53 | 55 | ||
54 | 56 | func keyUsed (address,epoch) = makeString(["%s%s%d", "used", toString(address), toString(epoch)], separator) | |
55 | 57 | ||
56 | 58 | ||
57 | 59 | func keyVote (pool,address,epoch) = { | |
58 | - | let $ | |
59 | - | let amountAssetId = $ | |
60 | - | let priceAssetId = $ | |
60 | + | let $t018251865 = pool | |
61 | + | let amountAssetId = $t018251865._1 | |
62 | + | let priceAssetId = $t018251865._2 | |
61 | 63 | makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], separator) | |
62 | 64 | } | |
63 | 65 | ||
64 | 66 | ||
65 | 67 | func keyVotingResult (pool,epoch) = { | |
66 | - | let $ | |
67 | - | let amountAssetId = $ | |
68 | - | let priceAssetId = $ | |
68 | + | let $t020472087 = pool | |
69 | + | let amountAssetId = $t020472087._1 | |
70 | + | let priceAssetId = $t020472087._2 | |
69 | 71 | makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], separator) | |
70 | 72 | } | |
71 | 73 | ||
72 | 74 | ||
73 | 75 | func keyPoolShare (pool,epoch) = { | |
74 | - | let $ | |
75 | - | let amountAssetId = $ | |
76 | - | let priceAssetId = $ | |
76 | + | let $t022522292 = pool | |
77 | + | let amountAssetId = $t022522292._1 | |
78 | + | let priceAssetId = $t022522292._2 | |
77 | 79 | makeString(["%s%s%s%d", "poolShare", amountAssetId, priceAssetId, toString(epoch)], separator) | |
78 | 80 | } | |
79 | 81 | ||
80 | 82 | ||
81 | 83 | func keyTotalVotes (epoch) = makeString(["%s%d", "totalVotes", toString(epoch)], separator) | |
82 | 84 | ||
83 | 85 | ||
84 | 86 | func getValueOrFail (address,key,type) = { | |
85 | 87 | let error = makeString(["mandatory ", toString(address), ".", key, " is not defined"], "") | |
86 | 88 | valueOrErrorMessage( match type { | |
87 | 89 | case str: String => | |
88 | 90 | getString(address, key) | |
89 | 91 | case int: Int => | |
90 | 92 | getInteger(address, key) | |
91 | 93 | case _ => | |
92 | 94 | throw("invalid entry type") | |
93 | 95 | }, error) | |
94 | 96 | } | |
95 | 97 | ||
96 | 98 | ||
97 | 99 | func getStrOrFail (address,key) = { | |
98 | 100 | let @ = getValueOrFail(address, key, "") | |
99 | 101 | if ($isInstanceOf(@, "String")) | |
100 | 102 | then @ | |
101 | 103 | else throw(($getType(@) + " couldn't be cast to String")) | |
102 | 104 | } | |
103 | 105 | ||
104 | 106 | ||
105 | 107 | func getIntOrFail (address,key) = { | |
106 | 108 | let @ = getValueOrFail(address, key, 0) | |
107 | 109 | if ($isInstanceOf(@, "Int")) | |
108 | 110 | then @ | |
109 | 111 | else throw(($getType(@) + " couldn't be cast to Int")) | |
110 | 112 | } | |
111 | 113 | ||
112 | 114 | ||
113 | 115 | func poolToString (pool) = ((pool._1 + separator) + pool._2) | |
114 | 116 | ||
115 | 117 | ||
116 | 118 | func stringToPool (str) = { | |
117 | 119 | let parts = split(str, separator) | |
118 | 120 | if ((size(parts) == 2)) | |
119 | 121 | then $Tuple2(parts[0], parts[1]) | |
120 | 122 | else throw("invalid pool string") | |
121 | 123 | } | |
122 | 124 | ||
123 | 125 | ||
124 | 126 | func getLpAssetByPoolAssets (amountAssetId,priceAssetId) = { | |
125 | 127 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
126 | 128 | ||
127 | 129 | func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract") | |
128 | 130 | ||
129 | 131 | func keyMappingPoolContractToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
130 | 132 | ||
131 | 133 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
132 | 134 | let amountAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amountAssetId)) | |
133 | 135 | let priceAssetInternalId = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAssetId)) | |
134 | 136 | let poolContractAddress = getStrOrFail(factoryContract, keyMappingPoolAssetsToPoolContractAddress(amountAssetInternalId, priceAssetInternalId)) | |
135 | 137 | let lpAssetId = getStrOrFail(factoryContract, keyMappingPoolContractToLPAsset(poolContractAddress)) | |
136 | 138 | lpAssetId | |
137 | 139 | } | |
138 | 140 | ||
139 | 141 | ||
140 | 142 | func checkWxEmissionPoolLabel (pool) = { | |
141 | - | let $ | |
142 | - | let amountAssetId = $ | |
143 | - | let priceAssetId = $ | |
143 | + | let $t045344574 = pool | |
144 | + | let amountAssetId = $t045344574._1 | |
145 | + | let priceAssetId = $t045344574._2 | |
144 | 146 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
145 | 147 | let @ = invoke(factoryContract, "checkWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil) | |
146 | 148 | if ($isInstanceOf(@, "Boolean")) | |
147 | 149 | then @ | |
148 | 150 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
149 | 151 | } | |
150 | 152 | ||
151 | 153 | ||
152 | 154 | let poolsListName = "pools" | |
153 | 155 | ||
154 | 156 | func getVotesListName (pool) = { | |
155 | - | let $ | |
156 | - | let amountAssetId = $ | |
157 | - | let priceAssetId = $ | |
157 | + | let $t048754915 = pool | |
158 | + | let amountAssetId = $t048754915._1 | |
159 | + | let priceAssetId = $t048754915._2 | |
158 | 160 | makeString(["votes", amountAssetId, priceAssetId], separator) | |
159 | 161 | } | |
160 | 162 | ||
161 | 163 | ||
162 | 164 | func keyListHead (listName) = { | |
163 | 165 | let meta = if ((listName == poolsListName)) | |
164 | 166 | then "%s%s" | |
165 | 167 | else "%s%s%s%s" | |
166 | 168 | makeString([meta, listName, "head"], separator) | |
167 | 169 | } | |
168 | 170 | ||
169 | 171 | ||
170 | 172 | func keyListSize (listName) = { | |
171 | 173 | let meta = if ((listName == poolsListName)) | |
172 | 174 | then "%s%s" | |
173 | 175 | else "%s%s%s%s" | |
174 | 176 | makeString([meta, listName, "size"], separator) | |
175 | 177 | } | |
176 | 178 | ||
177 | 179 | ||
178 | 180 | func keyListPrev (listName,id) = { | |
179 | 181 | let meta = if ((listName == poolsListName)) | |
180 | 182 | then "%s%s%s%s" | |
181 | 183 | else "%s%s%s%s%s" | |
182 | 184 | makeString([meta, listName, id, "prev"], separator) | |
183 | 185 | } | |
184 | 186 | ||
185 | 187 | ||
186 | 188 | func keyListNext (listName,id) = { | |
187 | 189 | let meta = if ((listName == poolsListName)) | |
188 | 190 | then "%s%s%s%s" | |
189 | 191 | else "%s%s%s%s%s" | |
190 | 192 | makeString([meta, listName, id, "next"], separator) | |
191 | 193 | } | |
192 | 194 | ||
193 | 195 | ||
194 | 196 | func containsNode (listName,id) = { | |
195 | 197 | let headOrUnit = getString(this, keyListHead(listName)) | |
196 | 198 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
197 | 199 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
198 | 200 | if (if ((id == valueOrElse(headOrUnit, ""))) | |
199 | 201 | then true | |
200 | 202 | else (prevOrUnit != unit)) | |
201 | 203 | then true | |
202 | 204 | else (nextOrUnit != unit) | |
203 | 205 | } | |
204 | 206 | ||
205 | 207 | ||
206 | 208 | func insertNodeActions (listName,id) = { | |
207 | 209 | let headOrUnit = getString(this, keyListHead(listName)) | |
208 | 210 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
209 | 211 | let checkNode = if (!(containsNode(listName, id))) | |
210 | 212 | then true | |
211 | 213 | else throw("Node exists") | |
212 | 214 | if ((checkNode == checkNode)) | |
213 | 215 | then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit)) | |
214 | 216 | then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)] | |
215 | 217 | else nil)) ++ [StringEntry(keyListHead(listName), id)]) | |
216 | 218 | else throw("Strict value is not equal to itself.") | |
217 | 219 | } | |
218 | 220 | ||
219 | 221 | ||
220 | 222 | func deleteNodeActions (listName,id) = { | |
221 | 223 | let headOrUnit = getString(this, keyListHead(listName)) | |
222 | 224 | let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0) | |
223 | 225 | let prevOrUnit = getString(this, keyListPrev(listName, id)) | |
224 | 226 | let nextOrUnit = getString(this, keyListNext(listName, id)) | |
225 | 227 | ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit)) | |
226 | 228 | then (nextOrUnit != unit) | |
227 | 229 | else false) | |
228 | 230 | then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))] | |
229 | 231 | else if ((nextOrUnit != unit)) | |
230 | 232 | then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))] | |
231 | 233 | else if ((prevOrUnit != unit)) | |
232 | 234 | then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))] | |
233 | 235 | else if ((id == valueOrElse(headOrUnit, ""))) | |
234 | 236 | then [DeleteEntry(keyListHead(listName))] | |
235 | 237 | else throw(((("invalid node: " + listName) + ".") + id)))) | |
236 | 238 | } | |
237 | 239 | ||
238 | 240 | ||
239 | 241 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
240 | 242 | ||
241 | 243 | ||
242 | 244 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
243 | 245 | ||
244 | 246 | ||
245 | 247 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
246 | 248 | case s: String => | |
247 | 249 | fromBase58String(s) | |
248 | 250 | case _: Unit => | |
249 | 251 | unit | |
250 | 252 | case _ => | |
251 | 253 | throw("Match error") | |
252 | 254 | } | |
253 | 255 | ||
254 | 256 | ||
255 | 257 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
256 | 258 | case s: String => | |
257 | 259 | fromBase58String(s) | |
258 | 260 | case _: Unit => | |
259 | 261 | unit | |
260 | 262 | case _ => | |
261 | 263 | throw("Match error") | |
262 | 264 | } | |
263 | 265 | ||
264 | 266 | ||
265 | 267 | let permissionDeniedError = throw("Permission denied") | |
266 | 268 | ||
267 | 269 | func mustThis (i) = if ((i.caller == this)) | |
268 | 270 | then true | |
269 | 271 | else permissionDeniedError | |
270 | 272 | ||
271 | 273 | ||
272 | 274 | func mustManager (i) = match managerPublicKeyOrUnit() { | |
273 | 275 | case pk: ByteVector => | |
274 | 276 | if ((i.callerPublicKey == pk)) | |
275 | 277 | then true | |
276 | 278 | else permissionDeniedError | |
277 | 279 | case _: Unit => | |
278 | 280 | mustThis(i) | |
279 | 281 | case _ => | |
280 | 282 | throw("Match error") | |
281 | 283 | } | |
282 | 284 | ||
283 | 285 | ||
284 | 286 | @Callable(i) | |
285 | 287 | func setManager (pendingManagerPublicKey) = { | |
286 | 288 | let checkCaller = mustManager(i) | |
287 | 289 | if ((checkCaller == checkCaller)) | |
288 | 290 | then { | |
289 | 291 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
290 | 292 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
291 | 293 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
292 | 294 | else throw("Strict value is not equal to itself.") | |
293 | 295 | } | |
294 | 296 | else throw("Strict value is not equal to itself.") | |
295 | 297 | } | |
296 | 298 | ||
297 | 299 | ||
298 | 300 | ||
299 | 301 | @Callable(i) | |
300 | 302 | func confirmManager () = { | |
301 | 303 | let pm = pendingManagerPublicKeyOrUnit() | |
302 | 304 | let hasPM = if (isDefined(pm)) | |
303 | 305 | then true | |
304 | 306 | else throw("No pending manager") | |
305 | 307 | if ((hasPM == hasPM)) | |
306 | 308 | then { | |
307 | 309 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
308 | 310 | then true | |
309 | 311 | else throw("You are not pending manager") | |
310 | 312 | if ((checkPM == checkPM)) | |
311 | 313 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
312 | 314 | else throw("Strict value is not equal to itself.") | |
313 | 315 | } | |
314 | 316 | else throw("Strict value is not equal to itself.") | |
315 | 317 | } | |
316 | 318 | ||
317 | 319 | ||
318 | 320 | ||
319 | 321 | @Callable(i) | |
320 | 322 | func getUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
321 | 323 | let boostingContractAddress = valueOrErrorMessage(addressFromString(getStrOrFail(this, keyBoostingContract)), "invalid boosting contract address") | |
322 | 324 | $Tuple2(nil, { | |
323 | 325 | let @ = invoke(boostingContractAddress, "getUserGwxAmountAtHeightREADONLY", [userAddress, targetHeight], nil) | |
324 | 326 | if ($isInstanceOf(@, "Int")) | |
325 | 327 | then @ | |
326 | 328 | else throw(($getType(@) + " couldn't be cast to Int")) | |
327 | 329 | }) | |
328 | 330 | } | |
329 | 331 | ||
330 | 332 | ||
331 | 333 | ||
332 | 334 | @Callable(i) | |
333 | 335 | func constructor (factoryContract,votingEmissionCandidateContract,boostingContract,stakingContract,epochLength) = { | |
334 | 336 | let checks = [mustManager(i), if ((addressFromString(factoryContract) != unit)) | |
335 | 337 | then true | |
336 | 338 | else "invalid factory contract address", if ((addressFromString(votingEmissionCandidateContract) != unit)) | |
337 | 339 | then true | |
338 | 340 | else "invalid voting emission candidate contract address", if ((addressFromString(boostingContract) != unit)) | |
339 | 341 | then true | |
340 | 342 | else "invalid boosting contract address", if ((addressFromString(stakingContract) != unit)) | |
341 | 343 | then true | |
342 | 344 | else "invalid staking contract address", if ((epochLength > 0)) | |
343 | 345 | then true | |
344 | 346 | else throw("invalid epoch length")] | |
345 | 347 | if ((checks == checks)) | |
346 | 348 | then $Tuple2([StringEntry(keyFactoryContract, factoryContract), StringEntry(keyVotingEmissionCandidateContract, votingEmissionCandidateContract), StringEntry(keyBoostingContract, boostingContract), StringEntry(keyStakingContract, stakingContract), IntegerEntry(keyEpochLength, epochLength)], unit) | |
347 | 349 | else throw("Strict value is not equal to itself.") | |
348 | 350 | } | |
349 | 351 | ||
350 | 352 | ||
351 | 353 | ||
352 | 354 | @Callable(i) | |
353 | 355 | func create (amountAssetId,priceAssetId) = { | |
354 | 356 | let checks = [if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionCandidateContract), ""))) | |
355 | 357 | then true | |
356 | 358 | else mustManager(i)] | |
357 | 359 | if ((checks == checks)) | |
358 | 360 | then { | |
359 | 361 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
360 | 362 | let inListActions = ([BooleanEntry(keyInList(pool), true)] ++ insertNodeActions(poolsListName, poolToString(pool))) | |
361 | 363 | let currentEpochIsNotDefined = (getInteger(this, keyCurrentEpoch) == unit) | |
362 | 364 | let startHeightActions = if (currentEpochIsNotDefined) | |
363 | 365 | then { | |
364 | 366 | let epoch = 0 | |
365 | 367 | [IntegerEntry(keyCurrentEpoch, epoch), IntegerEntry(keyStartHeightByEpoch(epoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, height)] | |
366 | 368 | } | |
367 | 369 | else nil | |
368 | 370 | $Tuple2((inListActions ++ startHeightActions), unit) | |
369 | 371 | } | |
370 | 372 | else throw("Strict value is not equal to itself.") | |
371 | 373 | } | |
372 | 374 | ||
373 | 375 | ||
374 | 376 | ||
375 | 377 | @Callable(i) | |
376 | 378 | func vote (amountAssetId,priceAssetId,amount) = { | |
377 | 379 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
378 | 380 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
379 | 381 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
380 | 382 | let epochLength = getIntOrFail(this, keyEpochLength) | |
381 | 383 | let endHeight = (startHeight + epochLength) | |
382 | 384 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
383 | 385 | let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0) | |
384 | 386 | let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0) | |
385 | 387 | let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0) | |
386 | 388 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0) | |
387 | 389 | let gwxAmountAtEndTotal = { | |
388 | 390 | let @ = invoke(this, "getUserGwxAmountAtHeight", [toBase58String(i.caller.bytes), endHeight], nil) | |
389 | 391 | if ($isInstanceOf(@, "Int")) | |
390 | 392 | then @ | |
391 | 393 | else throw(($getType(@) + " couldn't be cast to Int")) | |
392 | 394 | } | |
393 | 395 | let available = (gwxAmountAtEndTotal - used) | |
394 | 396 | let newVote = (vote + amount) | |
395 | 397 | let wxEmission = checkWxEmissionPoolLabel(pool) | |
396 | 398 | let checks = [if ((getBoolean(keyInList(pool)) != unit)) | |
397 | 399 | then true | |
398 | 400 | else throw("invalid assets"), if ((endHeight > height)) | |
399 | 401 | then true | |
400 | 402 | else throw("invalid height"), if ((finalizationStageOrUnit == unit)) | |
401 | 403 | then true | |
402 | 404 | else throw("finalization in progress"), if ((gwxAmountAtEndTotal > 0)) | |
403 | 405 | then true | |
404 | 406 | else throw("you do not have gWX"), if (if ((amount > 0)) | |
405 | 407 | then (available >= amount) | |
406 | 408 | else false) | |
407 | 409 | then true | |
408 | 410 | else throw("invalid amount"), if (wxEmission) | |
409 | 411 | then true | |
410 | 412 | else throw("pool hasn't WX_EMISSION label")] | |
411 | 413 | if ((checks == checks)) | |
412 | 414 | then { | |
413 | 415 | let votesListName = getVotesListName(pool) | |
414 | 416 | let userAddressStr = toString(i.caller) | |
415 | 417 | let votesListActions = if (containsNode(votesListName, userAddressStr)) | |
416 | 418 | then nil | |
417 | 419 | else insertNodeActions(votesListName, userAddressStr) | |
418 | 420 | $Tuple2(([IntegerEntry(keyUsed(i.caller, epoch), (used + amount)), IntegerEntry(keyVote(pool, i.caller, epoch), newVote), IntegerEntry(keyVotingResult(pool, epoch), (poolResult + amount)), IntegerEntry(keyTotalVotes(epoch), (totalVotes + amount))] ++ votesListActions), unit) | |
419 | 421 | } | |
420 | 422 | else throw("Strict value is not equal to itself.") | |
421 | 423 | } | |
422 | 424 | ||
423 | 425 | ||
424 | 426 | ||
425 | 427 | @Callable(i) | |
426 | 428 | func cancelVote (amountAssetId,priceAssetId) = { | |
427 | 429 | let pool = $Tuple2(amountAssetId, priceAssetId) | |
428 | 430 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
429 | 431 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
430 | 432 | let epochLength = getIntOrFail(this, keyEpochLength) | |
431 | 433 | let endHeight = (startHeight + epochLength) | |
432 | 434 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
433 | 435 | let used = valueOrElse(getInteger(this, keyUsed(i.caller, epoch)), 0) | |
434 | 436 | let vote = valueOrElse(getInteger(this, keyVote(pool, i.caller, epoch)), 0) | |
435 | 437 | let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, epoch)), 0) | |
436 | 438 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(epoch)), 0) | |
437 | 439 | let checks = [if ((getBoolean(keyInList(pool)) != unit)) | |
438 | 440 | then true | |
439 | 441 | else throw("invalid assets"), if ((endHeight > height)) | |
440 | 442 | then true | |
441 | 443 | else throw("invalid height"), if ((finalizationStageOrUnit == unit)) | |
442 | 444 | then true | |
443 | 445 | else throw("finalization in progress"), if ((vote > 0)) | |
444 | 446 | then true | |
445 | 447 | else throw("no vote")] | |
446 | 448 | if ((checks == checks)) | |
447 | 449 | then { | |
448 | 450 | let votesListName = getVotesListName(pool) | |
449 | 451 | let userAddressStr = toString(i.caller) | |
450 | 452 | $Tuple2(([IntegerEntry(keyUsed(i.caller, epoch), max([(used - vote), 0])), DeleteEntry(keyVote(pool, i.caller, epoch)), IntegerEntry(keyVotingResult(pool, epoch), (poolResult - vote)), IntegerEntry(keyTotalVotes(epoch), (totalVotes - vote))] ++ deleteNodeActions(votesListName, userAddressStr)), unit) | |
451 | 453 | } | |
452 | 454 | else throw("Strict value is not equal to itself.") | |
453 | 455 | } | |
454 | 456 | ||
455 | 457 | ||
456 | 458 | ||
457 | 459 | @Callable(i) | |
458 | 460 | func setEpochLength (newEpochLength) = { | |
459 | 461 | let checks = [mustManager(i), if ((newEpochLength > 0)) | |
460 | 462 | then true | |
461 | 463 | else throw("invalid epoch length")] | |
462 | 464 | if ((checks == checks)) | |
463 | 465 | then $Tuple2([IntegerEntry(keyEpochLength, newEpochLength)], unit) | |
464 | 466 | else throw("Strict value is not equal to itself.") | |
465 | 467 | } | |
466 | 468 | ||
467 | 469 | ||
468 | 470 | ||
469 | 471 | @Callable(i) | |
470 | 472 | func setMaxDepth (newMaxDepth) = { | |
471 | 473 | let checks = [mustManager(i), if ((newMaxDepth > 0)) | |
472 | 474 | then true | |
473 | 475 | else throw("invalid max depth")] | |
474 | 476 | if ((checks == checks)) | |
475 | 477 | then $Tuple2([IntegerEntry(keyMaxDepth, newMaxDepth)], unit) | |
476 | 478 | else throw("Strict value is not equal to itself.") | |
477 | 479 | } | |
478 | 480 | ||
479 | 481 | ||
480 | 482 | ||
481 | 483 | @Callable(i) | |
482 | 484 | func processVoteINTERNAL (poolStr,userAddressStr) = { | |
483 | 485 | let checkCaller = mustThis(i) | |
484 | 486 | if ((checkCaller == checkCaller)) | |
485 | 487 | then { | |
486 | 488 | let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), ("processVoteINTERNAL: invalid user address " + userAddressStr)) | |
487 | 489 | let epoch = getIntOrFail(this, keyCurrentEpoch) | |
488 | 490 | let epochPrevious = (epoch - 1) | |
489 | 491 | let epochLength = getIntOrFail(this, keyEpochLength) | |
490 | 492 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
491 | 493 | let endHeight = (startHeight + epochLength) | |
492 | 494 | let startHeightPrevious = getIntOrFail(this, keyStartHeightByEpoch(epochPrevious)) | |
493 | 495 | let endHeightPrevious = (startHeightPrevious + epochLength) | |
494 | 496 | let checkTargetEpoch = if ((epochPrevious >= 0)) | |
495 | 497 | then true | |
496 | 498 | else throw("processVoteINTERNAL: invalid previous epoch") | |
497 | 499 | if ((checkTargetEpoch == checkTargetEpoch)) | |
498 | 500 | then { | |
499 | 501 | let pool = stringToPool(poolStr) | |
500 | - | let $ | |
501 | - | let amountAssetId = $ | |
502 | - | let priceAssetId = $ | |
502 | + | let $t01727017310 = pool | |
503 | + | let amountAssetId = $t01727017310._1 | |
504 | + | let priceAssetId = $t01727017310._2 | |
503 | 505 | let wxEmission = checkWxEmissionPoolLabel(pool) | |
504 | 506 | let gwxAmountAtEndTotal = { | |
505 | 507 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeight], nil) | |
506 | 508 | if ($isInstanceOf(@, "Int")) | |
507 | 509 | then @ | |
508 | 510 | else throw(($getType(@) + " couldn't be cast to Int")) | |
509 | 511 | } | |
510 | 512 | let gwxAmountAtEndTotalPrevious = { | |
511 | 513 | let @ = invoke(this, "getUserGwxAmountAtHeight", [userAddressStr, endHeightPrevious], nil) | |
512 | 514 | if ($isInstanceOf(@, "Int")) | |
513 | 515 | then @ | |
514 | 516 | else throw(($getType(@) + " couldn't be cast to Int")) | |
515 | 517 | } | |
516 | 518 | let totalVotes = valueOrElse(getInteger(keyTotalVotes(epoch)), 0) | |
517 | 519 | let votingResult = valueOrElse(getInteger(keyVotingResult(pool, epoch)), 0) | |
518 | 520 | let votePrevious = valueOrErrorMessage(getInteger(keyVote(pool, userAddress, epochPrevious)), (((("processVoteINTERNAL " + poolStr) + " ") + userAddressStr) + ": no previous vote")) | |
519 | 521 | let used = valueOrElse(getInteger(this, keyUsed(userAddress, epoch)), 0) | |
520 | 522 | let newVote = if ((gwxAmountAtEndTotalPrevious > 0)) | |
521 | 523 | then fraction(votePrevious, gwxAmountAtEndTotal, gwxAmountAtEndTotalPrevious) | |
522 | 524 | else 0 | |
523 | 525 | let actions = if (if ((newVote > 0)) | |
524 | 526 | then wxEmission | |
525 | 527 | else false) | |
526 | 528 | then [IntegerEntry(keyVote(pool, userAddress, epoch), newVote), IntegerEntry(keyTotalVotes(epoch), (totalVotes + newVote)), IntegerEntry(keyVotingResult(pool, epoch), (votingResult + newVote)), IntegerEntry(keyUsed(userAddress, epoch), (used + newVote))] | |
527 | 529 | else deleteNodeActions(getVotesListName(pool), userAddressStr) | |
528 | 530 | $Tuple2(actions, unit) | |
529 | 531 | } | |
530 | 532 | else throw("Strict value is not equal to itself.") | |
531 | 533 | } | |
532 | 534 | else throw("Strict value is not equal to itself.") | |
533 | 535 | } | |
534 | 536 | ||
535 | 537 | ||
536 | 538 | ||
537 | 539 | @Callable(i) | |
538 | - | func processPoolINTERNAL (poolStr) = { | |
540 | + | func processPoolINTERNAL (poolStr,force) = { | |
539 | 541 | let checkCaller = mustThis(i) | |
540 | 542 | if ((checkCaller == checkCaller)) | |
541 | 543 | then { | |
542 | - | let targetEpoch = (getIntOrFail(this, keyCurrentEpoch) - 1) | |
544 | + | let targetEpoch = { | |
545 | + | let currentEpoch = getIntOrFail(this, keyCurrentEpoch) | |
546 | + | if (force) | |
547 | + | then currentEpoch | |
548 | + | else (currentEpoch - 1) | |
549 | + | } | |
543 | 550 | let checkTargetEpoch = if ((targetEpoch >= 0)) | |
544 | 551 | then true | |
545 | 552 | else throw("processPoolINTERNAL: invalid target epoch") | |
546 | 553 | if ((checkTargetEpoch == checkTargetEpoch)) | |
547 | 554 | then { | |
548 | 555 | let pool = stringToPool(poolStr) | |
549 | - | let $ | |
550 | - | let amountAssetId = $ | |
551 | - | let priceAssetId = $ | |
556 | + | let $t01903619076 = pool | |
557 | + | let amountAssetId = $t01903619076._1 | |
558 | + | let priceAssetId = $t01903619076._2 | |
552 | 559 | let stakingContract = addressFromStringValue(getStrOrFail(this, keyStakingContract)) | |
553 | 560 | let factoryContract = addressFromStringValue(getStrOrFail(this, keyFactoryContract)) | |
554 | 561 | let lpAssetId = getLpAssetByPoolAssets(amountAssetId, priceAssetId) | |
555 | 562 | let r = { | |
556 | 563 | let @ = invoke(stakingContract, "usersListTraversal", [lpAssetId], nil) | |
557 | 564 | if ($isInstanceOf(@, "Boolean")) | |
558 | 565 | then @ | |
559 | 566 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
560 | 567 | } | |
561 | 568 | if ((r == r)) | |
562 | 569 | then if (r) | |
563 | 570 | then $Tuple2(nil, true) | |
564 | 571 | else { | |
565 | 572 | let wxEmission = checkWxEmissionPoolLabel(pool) | |
566 | 573 | let totalVotes = valueOrElse(getInteger(this, keyTotalVotes(targetEpoch)), 0) | |
567 | 574 | let votingResult = valueOrElse(getInteger(this, keyVotingResult(pool, targetEpoch)), 0) | |
568 | 575 | let share = if (if ((totalVotes == 0)) | |
569 | 576 | then true | |
570 | 577 | else !(wxEmission)) | |
571 | 578 | then 0 | |
572 | 579 | else fraction(votingResult, poolWeightMult, totalVotes) | |
573 | 580 | let modifyWeightInv = invoke(factoryContract, "modifyWeight", [lpAssetId, share], nil) | |
574 | 581 | if ((modifyWeightInv == modifyWeightInv)) | |
575 | 582 | then { | |
576 | - | let poolsListActions = if (wxEmission) | |
583 | + | let poolsListActions = if (if (wxEmission) | |
584 | + | then true | |
585 | + | else force) | |
577 | 586 | then nil | |
578 | 587 | else ([DeleteEntry(keyInList(pool))] ++ deleteNodeActions(poolsListName, poolStr)) | |
579 | 588 | $Tuple2(([IntegerEntry(keyPoolShare(pool, targetEpoch), share)] ++ poolsListActions), false) | |
580 | 589 | } | |
581 | 590 | else throw("Strict value is not equal to itself.") | |
582 | 591 | } | |
583 | 592 | else throw("Strict value is not equal to itself.") | |
584 | 593 | } | |
585 | 594 | else throw("Strict value is not equal to itself.") | |
586 | 595 | } | |
587 | 596 | else throw("Strict value is not equal to itself.") | |
588 | 597 | } | |
589 | 598 | ||
590 | 599 | ||
591 | 600 | ||
592 | 601 | @Callable(i) | |
593 | 602 | func finalizeHelper () = { | |
603 | + | let force = valueOrElse(getBoolean(keyFinalizationShouldBeForced), false) | |
594 | 604 | let epoch = valueOrElse(getInteger(this, keyCurrentEpoch), 0) | |
595 | 605 | let previousEpoch = (epoch - 1) | |
596 | 606 | let startHeight = getIntOrFail(this, keyStartHeightByEpoch(epoch)) | |
597 | 607 | let epochLength = getIntOrFail(this, keyEpochLength) | |
598 | 608 | let endHeight = (startHeight + epochLength) | |
599 | 609 | let finalizationStageOrUnit = getInteger(this, keyFinalizationStage) | |
600 | - | if (if ((height >= endHeight)) | |
610 | + | if (if (if ((height >= endHeight)) | |
601 | 611 | then (finalizationStageOrUnit == unit) | |
612 | + | else false) | |
613 | + | then !(force) | |
602 | 614 | else false) | |
603 | 615 | then { | |
604 | 616 | let newEpoch = (epoch + 1) | |
605 | 617 | $Tuple2([IntegerEntry(keyStartHeightByEpoch(newEpoch), height), IntegerEntry(keyStartHeight, height), IntegerEntry(keyCurrentEpoch, newEpoch), IntegerEntry(keyFinalizationStage, finalizationStageTotal)], true) | |
606 | 618 | } | |
607 | - | else if ((finalizationStageOrUnit == unit)) | |
608 | - | then $Tuple2(nil, false) | |
609 | - | else if ((finalizationStageOrUnit == finalizationStageTotal)) | |
610 | - | then { | |
611 | - | let poolOrUnit = getString(keyNextPool) | |
612 | - | let userOrUnit = getString(keyNextUser) | |
613 | - | match poolOrUnit { | |
614 | - | case _: Unit => | |
615 | - | match getString(keyListHead(poolsListName)) { | |
619 | + | else if (if (force) | |
620 | + | then (finalizationStageOrUnit == unit) | |
621 | + | else false) | |
622 | + | then $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares)], true) | |
623 | + | else if ((finalizationStageOrUnit == unit)) | |
624 | + | then $Tuple2(nil, false) | |
625 | + | else if ((finalizationStageOrUnit == finalizationStageTotal)) | |
626 | + | then { | |
627 | + | let poolOrUnit = getString(keyNextPool) | |
628 | + | let userOrUnit = getString(keyNextUser) | |
629 | + | match poolOrUnit { | |
630 | + | case _: Unit => | |
631 | + | match getString(keyListHead(poolsListName)) { | |
632 | + | case _: Unit => | |
633 | + | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
634 | + | case poolsHeadStr: String => | |
635 | + | $Tuple2([StringEntry(keyNextPool, poolsHeadStr)], true) | |
636 | + | case _ => | |
637 | + | throw("Match error") | |
638 | + | } | |
639 | + | case poolStr: String => | |
640 | + | let pool = stringToPool(poolStr) | |
641 | + | let nextUserOrUnit = match userOrUnit { | |
642 | + | case _: Unit => | |
643 | + | getString(keyListHead(getVotesListName(pool))) | |
644 | + | case user: String => | |
645 | + | let next = getString(keyListNext(getVotesListName(pool), user)) | |
646 | + | if ((next == next)) | |
647 | + | then { | |
648 | + | let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil) | |
649 | + | if ((processVoteInv == processVoteInv)) | |
650 | + | then next | |
651 | + | else throw("Strict value is not equal to itself.") | |
652 | + | } | |
653 | + | else throw("Strict value is not equal to itself.") | |
654 | + | case _ => | |
655 | + | throw("Match error") | |
656 | + | } | |
657 | + | match nextUserOrUnit { | |
658 | + | case _: Unit => | |
659 | + | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
660 | + | match nextPoolOrUnit { | |
661 | + | case _: Unit => | |
662 | + | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
663 | + | case s: String => | |
664 | + | $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true) | |
665 | + | case _ => | |
666 | + | throw("Match error") | |
667 | + | } | |
668 | + | case nextUser: String => | |
669 | + | $Tuple2([StringEntry(keyNextUser, nextUser)], true) | |
670 | + | case _ => | |
671 | + | throw("Match error") | |
672 | + | } | |
673 | + | case _ => | |
674 | + | throw("Match error") | |
675 | + | } | |
676 | + | } | |
677 | + | else if ((finalizationStageOrUnit == finalizationStageShares)) | |
678 | + | then { | |
679 | + | let poolOrUnit = getString(keyNextPool) | |
680 | + | match poolOrUnit { | |
616 | 681 | case _: Unit => | |
617 | - | | |
618 | - | case | |
619 | - | | |
620 | - | | |
621 | - | | |
622 | - | | |
623 | - | case | |
624 | - | | |
625 | - | ||
626 | - | | |
627 | - | | |
628 | - | case | |
629 | - | let | |
630 | - | if (( | |
682 | + | match getString(keyListHead(poolsListName)) { | |
683 | + | case _: Unit => | |
684 | + | let actions = if (force) | |
685 | + | then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced)] | |
686 | + | else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)] | |
687 | + | $Tuple2(actions, true) | |
688 | + | case nextPoolStr: String => | |
689 | + | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
690 | + | case _ => | |
691 | + | throw("Match error") | |
692 | + | } | |
693 | + | case poolStr: String => | |
694 | + | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
695 | + | if ((nextPoolOrUnit == nextPoolOrUnit)) | |
631 | 696 | then { | |
632 | - | let processVoteInv = invoke(this, "processVoteINTERNAL", [poolStr, user], nil) | |
633 | - | if ((processVoteInv == processVoteInv)) | |
634 | - | then next | |
697 | + | let r = { | |
698 | + | let @ = invoke(this, "processPoolINTERNAL", [poolStr, force], nil) | |
699 | + | if ($isInstanceOf(@, "Boolean")) | |
700 | + | then @ | |
701 | + | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
702 | + | } | |
703 | + | if ((r == r)) | |
704 | + | then if (r) | |
705 | + | then $Tuple2(nil, true) | |
706 | + | else match nextPoolOrUnit { | |
707 | + | case _: Unit => | |
708 | + | let actions = if (force) | |
709 | + | then [DeleteEntry(keyFinalizationStage), DeleteEntry(keyFinalizationShouldBeForced), DeleteEntry(keyNextPool)] | |
710 | + | else [DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)] | |
711 | + | $Tuple2(actions, true) | |
712 | + | case nextPoolStr: String => | |
713 | + | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
714 | + | case _ => | |
715 | + | throw("Match error") | |
716 | + | } | |
635 | 717 | else throw("Strict value is not equal to itself.") | |
636 | 718 | } | |
637 | 719 | else throw("Strict value is not equal to itself.") | |
638 | 720 | case _ => | |
639 | 721 | throw("Match error") | |
640 | 722 | } | |
641 | - | match nextUserOrUnit { | |
642 | - | case _: Unit => | |
643 | - | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
644 | - | match nextPoolOrUnit { | |
645 | - | case _: Unit => | |
646 | - | $Tuple2([IntegerEntry(keyFinalizationStage, finalizationStageShares), DeleteEntry(keyNextPool), DeleteEntry(keyNextUser)], true) | |
647 | - | case s: String => | |
648 | - | $Tuple2([StringEntry(keyNextPool, s), DeleteEntry(keyNextUser)], true) | |
649 | - | case _ => | |
650 | - | throw("Match error") | |
651 | - | } | |
652 | - | case nextUser: String => | |
653 | - | $Tuple2([StringEntry(keyNextUser, nextUser)], true) | |
654 | - | case _ => | |
655 | - | throw("Match error") | |
656 | 723 | } | |
657 | - | case _ => | |
658 | - | throw("Match error") | |
659 | - | } | |
660 | - | } | |
661 | - | else if ((finalizationStageOrUnit == finalizationStageShares)) | |
662 | - | then { | |
663 | - | let poolOrUnit = getString(keyNextPool) | |
664 | - | match poolOrUnit { | |
665 | - | case _: Unit => | |
666 | - | match getString(keyListHead(poolsListName)) { | |
667 | - | case _: Unit => | |
668 | - | $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight)], true) | |
669 | - | case nextPoolStr: String => | |
670 | - | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
671 | - | case _ => | |
672 | - | throw("Match error") | |
673 | - | } | |
674 | - | case poolStr: String => | |
675 | - | let nextPoolOrUnit = getString(keyListNext(poolsListName, poolStr)) | |
676 | - | if ((nextPoolOrUnit == nextPoolOrUnit)) | |
677 | - | then { | |
678 | - | let r = { | |
679 | - | let @ = invoke(this, "processPoolINTERNAL", [poolStr], nil) | |
680 | - | if ($isInstanceOf(@, "Boolean")) | |
681 | - | then @ | |
682 | - | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
683 | - | } | |
684 | - | if ((r == r)) | |
685 | - | then if (r) | |
686 | - | then $Tuple2(nil, true) | |
687 | - | else match nextPoolOrUnit { | |
688 | - | case _: Unit => | |
689 | - | $Tuple2([DeleteEntry(keyFinalizationStage), BooleanEntry(keyFinalized(previousEpoch), true), IntegerEntry(keyCurrentEpochUi, epoch), IntegerEntry(keyStartHeightUi, startHeight), DeleteEntry(keyNextPool)], true) | |
690 | - | case nextPoolStr: String => | |
691 | - | $Tuple2([StringEntry(keyNextPool, nextPoolStr)], true) | |
692 | - | case _ => | |
693 | - | throw("Match error") | |
694 | - | } | |
695 | - | else throw("Strict value is not equal to itself.") | |
696 | - | } | |
697 | - | else throw("Strict value is not equal to itself.") | |
698 | - | case _ => | |
699 | - | throw("Match error") | |
700 | - | } | |
701 | - | } | |
702 | - | else throw("finalization is broken") | |
724 | + | else throw("finalization is broken") | |
703 | 725 | } | |
704 | 726 | ||
705 | 727 | ||
706 | 728 | ||
707 | 729 | @Callable(i) | |
708 | 730 | func finalizeWrapper (counter) = { | |
709 | 731 | let result = { | |
710 | 732 | let @ = invoke(this, "finalizeHelper", nil, nil) | |
711 | 733 | if ($isInstanceOf(@, "Boolean")) | |
712 | 734 | then @ | |
713 | 735 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
714 | 736 | } | |
715 | 737 | if ((result == result)) | |
716 | 738 | then if (!(result)) | |
717 | 739 | then if ((counter == 0)) | |
718 | 740 | then throw("Current voting is not over yet") | |
719 | 741 | else $Tuple2(nil, unit) | |
720 | 742 | else { | |
721 | 743 | let maxDepth = valueOrElse(getInteger(this, keyMaxDepth), maxDepthDefault) | |
722 | 744 | if ((maxDepth > counter)) | |
723 | 745 | then { | |
724 | 746 | let inv = invoke(this, "finalizeWrapper", [(counter + 1)], nil) | |
725 | 747 | if ((inv == inv)) | |
726 | 748 | then $Tuple2(nil, unit) | |
727 | 749 | else throw("Strict value is not equal to itself.") | |
728 | 750 | } | |
729 | 751 | else $Tuple2(nil, unit) | |
730 | 752 | } | |
731 | 753 | else throw("Strict value is not equal to itself.") | |
732 | 754 | } | |
733 | 755 | ||
734 | 756 | ||
735 | 757 | ||
736 | 758 | @Callable(i) | |
737 | 759 | func finalize () = { | |
738 | 760 | let inv = invoke(this, "finalizeWrapper", [0], nil) | |
739 | 761 | if ((inv == inv)) | |
740 | 762 | then $Tuple2(nil, unit) | |
741 | 763 | else throw("Strict value is not equal to itself.") | |
742 | 764 | } | |
743 | 765 | ||
744 | 766 | ||
745 | 767 | ||
746 | 768 | @Callable(i) | |
747 | 769 | func containsNodeREADONLY (listName,id) = $Tuple2(nil, containsNode(listName, id)) | |
748 | 770 | ||
749 | 771 | ||
750 | 772 | ||
751 | 773 | @Callable(i) | |
752 | 774 | func insertNode (listName,id) = { | |
753 | 775 | let checkCaller = mustManager(i) | |
754 | 776 | if ((checkCaller == checkCaller)) | |
755 | 777 | then $Tuple2(insertNodeActions(listName, id), unit) | |
756 | 778 | else throw("Strict value is not equal to itself.") | |
757 | 779 | } | |
758 | 780 | ||
759 | 781 | ||
760 | 782 | ||
761 | 783 | @Callable(i) | |
762 | 784 | func deleteNode (listName,id) = { | |
763 | 785 | let checkCaller = mustManager(i) | |
764 | 786 | if ((checkCaller == checkCaller)) | |
765 | 787 | then $Tuple2(deleteNodeActions(listName, id), unit) | |
766 | 788 | else throw("Strict value is not equal to itself.") | |
767 | 789 | } | |
768 | 790 | ||
769 | 791 | ||
770 | 792 | @Verifier(tx) | |
771 | 793 | func verify () = { | |
772 | 794 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
773 | 795 | case pk: ByteVector => | |
774 | 796 | pk | |
775 | 797 | case _: Unit => | |
776 | 798 | tx.senderPublicKey | |
777 | 799 | case _ => | |
778 | 800 | throw("Match error") | |
779 | 801 | } | |
780 | 802 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
781 | 803 | } | |
782 | 804 |
github/deemru/w8io/026f985 105.69 ms ◑