Skip to content

Commit

Permalink
chore: cooldown to warmup
Browse files Browse the repository at this point in the history
  • Loading branch information
GalloDaSballo committed Oct 18, 2024
1 parent f91acf8 commit 9a9bb08
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Governance.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/E2E.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion test/recon/properties/GovernanceProperties.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 9a9bb08

Please sign in to comment.