Skip to content

Commit

Permalink
Remove the logic for ejecting security council
Browse files Browse the repository at this point in the history
  • Loading branch information
elenadimitrova committed Mar 20, 2023
1 parent 01f297b commit bf65c4b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
4 changes: 0 additions & 4 deletions contracts/governance/src/ZeroExProtocolGovernor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ contract ZeroExProtocolGovernor is
bytes32 descriptionHash
) public override onlySecurityCouncil {
_cancel(targets, values, calldatas, descriptionHash);

ejectSecurityCouncil();
}

// Like the GovernorTimelockControl.queue function but without the proposal checks,
Expand All @@ -103,8 +101,6 @@ contract ZeroExProtocolGovernor is
// Execute the batch of rollbacks via the timelock controller
ZeroExTimelock timelockController = ZeroExTimelock(payable(timelock()));
timelockController.executeRollbackBatch(targets, values, calldatas, 0, descriptionHash);

ejectSecurityCouncil();
}

function assignSecurityCouncil(address _securityCouncil) public override onlyGovernance {
Expand Down
2 changes: 0 additions & 2 deletions contracts/governance/src/ZeroExTreasuryGovernor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ contract ZeroExTreasuryGovernor is
bytes32 descriptionHash
) public override onlySecurityCouncil {
_cancel(targets, values, calldatas, descriptionHash);

ejectSecurityCouncil();
}

function assignSecurityCouncil(address _securityCouncil) public override onlyGovernance {
Expand Down
4 changes: 3 additions & 1 deletion contracts/governance/test/ZeroExGovernorBaseTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ abstract contract ZeroExGovernorBaseTest is BaseTest {
governor.assignSecurityCouncil(account1);
}

function testSecurityCouncilAreEjectedAfterCancellingAProposal() public {
// This functionality is currently not enabled
// Leaving this test for potential future use.
function SecurityCouncilAreEjectedAfterCancellingAProposal() public {
// Create a proposal
address[] memory targets = new address[](1);
targets[0] = address(callReceiverMock);
Expand Down
7 changes: 5 additions & 2 deletions contracts/governance/test/ZeroExProtocolGovernor.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,11 @@ contract ZeroExProtocolGovernorTest is ZeroExGovernorBaseTest {
vm.expectEmit(true, true, true, true);
emit CallExecuted(proposalId, 0, targets[0], values[0], calldatas[0]);

vm.expectEmit(true, false, false, false);
emit SecurityCouncilEjected();
// This functionality is currently not enabled
// Leaving this test for potential future use.
// vm.expectEmit(true, false, false, false);
// emit SecurityCouncilEjected();

protocolGovernor.executeRollback(targets, values, calldatas, keccak256(bytes("Emergency rollback")));
}

Expand Down

0 comments on commit bf65c4b

Please sign in to comment.