diff --git a/script/deploy/mainnet/014_xOGNGovernanceScript.sol b/script/deploy/mainnet/014_xOGNGovernanceScript.sol index 263260dc..0ab0a603 100644 --- a/script/deploy/mainnet/014_xOGNGovernanceScript.sol +++ b/script/deploy/mainnet/014_xOGNGovernanceScript.sol @@ -3,7 +3,6 @@ pragma solidity 0.8.10; import "./BaseMainnetScript.sol"; -import {Vm} from "forge-std/Vm.sol"; import {Addresses} from "contracts/utils/Addresses.sol"; @@ -57,23 +56,6 @@ contract XOGNGovernanceScript is BaseMainnetScript { govProposal.action( Addresses.TIMELOCK, "grantRole(bytes32,address)", abi.encode(timelock.EXECUTOR_ROLE(), xognGov) ); - - // Revoke access from Multisig - govProposal.action( - Addresses.TIMELOCK, - "revokeRole(bytes32,address)", - abi.encode(timelock.PROPOSER_ROLE(), Addresses.GOV_MULTISIG) - ); - govProposal.action( - Addresses.TIMELOCK, - "revokeRole(bytes32,address)", - abi.encode(timelock.CANCELLER_ROLE(), Addresses.GOV_MULTISIG) - ); - govProposal.action( - Addresses.TIMELOCK, - "revokeRole(bytes32,address)", - abi.encode(timelock.EXECUTOR_ROLE(), Addresses.GOV_MULTISIG) - ); } function _fork() internal override { diff --git a/script/deploy/mainnet/015_RevokeMultisigGovernance.sol b/script/deploy/mainnet/015_RevokeMultisigGovernance.sol new file mode 100644 index 00000000..28377706 --- /dev/null +++ b/script/deploy/mainnet/015_RevokeMultisigGovernance.sol @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: MIT + +pragma solidity 0.8.10; + +import "./BaseMainnetScript.sol"; + +import {Addresses} from "contracts/utils/Addresses.sol"; + +import {Timelock} from "contracts/Timelock.sol"; +import {Governance} from "contracts/Governance.sol"; + +import {GovFive} from "contracts/utils/GovFive.sol"; + +contract XOGNGovernanceScript is BaseMainnetScript { + using GovFive for GovFive.GovFiveProposal; + + GovFive.GovFiveProposal public govProposal; + + string public constant override DEPLOY_NAME = "015_RevokeMultisigGovernance"; + bool public constant override proposalExecuted = false; + + constructor() {} + + function _execute() internal override {} + + function _buildGovernanceProposal() internal override { + Timelock timelock = Timelock(payable(Addresses.TIMELOCK)); + + address xognGov = deployedContracts["XOGN_GOV"]; + + govProposal.setName("Revoke access from Multisig"); + + govProposal.setDescription("Revoke access from Multisig"); + + // Revoke access from Multisig + govProposal.action( + Addresses.TIMELOCK, + "revokeRole(bytes32,address)", + abi.encode(timelock.PROPOSER_ROLE(), Addresses.GOV_MULTISIG) + ); + govProposal.action( + Addresses.TIMELOCK, + "revokeRole(bytes32,address)", + abi.encode(timelock.CANCELLER_ROLE(), Addresses.GOV_MULTISIG) + ); + govProposal.action( + Addresses.TIMELOCK, + "revokeRole(bytes32,address)", + abi.encode(timelock.EXECUTOR_ROLE(), Addresses.GOV_MULTISIG) + ); + } + + function _fork() internal override { + // Simulate execute on fork by impersonating Timelock + govProposal.execute(); + } + + function skip() external view override returns (bool) { + // Don't deploy it for now + return true; + } +}