From 9a9bb08cee0151670ed5c7390f7fcf9d1f9cc7c4 Mon Sep 17 00:00:00 2001 From: gallo Date: Fri, 18 Oct 2024 17:30:50 +0200 Subject: [PATCH] chore: cooldown to warmup --- src/Governance.sol | 6 +++--- test/E2E.t.sol | 2 +- test/recon/properties/GovernanceProperties.sol | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Governance.sol b/src/Governance.sol index 1b98170f..ad377b6f 100644 --- a/src/Governance.sol +++ b/src/Governance.sol @@ -361,7 +361,7 @@ contract Governance is Multicall, UserProxyFactory, ReentrancyGuard, IGovernance /// @notice Given an initiative, return whether the initiative will be unregisted, whether it can claim and which epoch it last claimed at enum InitiativeStatus { NONEXISTENT, /// This Initiative Doesn't exist | This is never returned - COOLDOWN, /// This epoch was just registered + WARM_UP, /// This epoch was just registered SKIP, /// This epoch will result in no rewards and no unregistering CLAIMABLE, /// This epoch will result in claiming rewards CLAIMED, /// The rewards for this epoch have been claimed @@ -393,7 +393,7 @@ contract Governance is Multicall, UserProxyFactory, ReentrancyGuard, IGovernance // == Just Registered Condition == // if(registeredInitiatives[_initiative] == epoch()) { - return (InitiativeStatus.COOLDOWN, 0, 0); /// Was registered this week, cannot have rewards + return (InitiativeStatus.WARM_UP, 0, 0); /// Was registered this week, cannot have rewards } // Fetch last epoch at which we claimed @@ -628,7 +628,7 @@ contract Governance is Multicall, UserProxyFactory, ReentrancyGuard, IGovernance (InitiativeStatus status, , ) = getInitiativeState(_initiative, votesSnapshot_, votesForInitiativeSnapshot_, initiativeState); require(status != InitiativeStatus.NONEXISTENT, "Governance: initiative-not-registered"); - require(status != InitiativeStatus.COOLDOWN, "Governance: initiative-in-warm-up"); + require(status != InitiativeStatus.WARM_UP, "Governance: initiative-in-warm-up"); require(status == InitiativeStatus.UNREGISTERABLE, "Governance: cannot-unregister-initiative"); // Remove weight from current state diff --git a/test/E2E.t.sol b/test/E2E.t.sol index c98fd5c6..2f9a3edf 100644 --- a/test/E2E.t.sol +++ b/test/E2E.t.sol @@ -142,7 +142,7 @@ contract E2ETests is Test { address newInitiative = address(0x123123); governance.registerInitiative(newInitiative); - assertEq(uint256(Governance.InitiativeStatus.COOLDOWN) , _getInitiativeStatus(newInitiative), "Cooldown"); + assertEq(uint256(Governance.InitiativeStatus.WARM_UP) , _getInitiativeStatus(newInitiative), "Cooldown"); uint256 skipCount; diff --git a/test/recon/properties/GovernanceProperties.sol b/test/recon/properties/GovernanceProperties.sol index 427f51fa..75aea04e 100644 --- a/test/recon/properties/GovernanceProperties.sol +++ b/test/recon/properties/GovernanceProperties.sol @@ -37,7 +37,7 @@ abstract contract GovernanceProperties is BeforeAfter { if(_before.initiativeStatus[initiative] == Governance.InitiativeStatus.NONEXISTENT) { // Registered -> SKIP is ok - if(_after.initiativeStatus[initiative] == Governance.InitiativeStatus.COOLDOWN) { + if(_after.initiativeStatus[initiative] == Governance.InitiativeStatus.WARM_UP) { return; } }