diff --git a/setup-templates/template-incident/script/UpdateProposer.s.sol b/setup-templates/template-incident/script/UpdateProposer.s.sol index 53aa4ad5..0be6c3a7 100644 --- a/setup-templates/template-incident/script/UpdateProposer.s.sol +++ b/setup-templates/template-incident/script/UpdateProposer.s.sol @@ -4,13 +4,30 @@ pragma solidity 0.8.15; import "@eth-optimism-bedrock/src/universal/ProxyAdmin.sol"; import "@base-contracts/script/universal/NestedMultisigBuilder.sol"; +/** + * @title UpdateProposer + * @notice Script to update the L2OutputOracle implementation contract + * @dev This script requires the following environment variables to be set: + * - L1_PROXY_ADMIN: Address of the ProxyAdmin contract that manages the L2OutputOracle proxy + * - L1_NESTED_SAFE: Address of the nested safe that owns the ProxyAdmin + * - L2_OUTPUT_PROPOSER: Address of the L2OutputOracle proxy contract + * - L2_OUTPUT_PROPOSER_NEW_IMPL: Address of the new L2OutputOracle implementation + */ contract UpdateProposer is NestedMultisigBuilder { - // TODO: this assumes a new L2OutputOracle implementation contract has already been deployed. See SetupNewProposer.s.sol. - - address internal PROXY_ADMIN_CONTRACT = vm.envAddress("L1_PROXY_ADMIN"); // TODO: define L1_PROXY_ADMIN=xxx in the .env file - address internal PROXY_ADMIN_OWNER = vm.envAddress("L1_NESTED_SAFE"); // TODO: define L1_NESTED_SAFE=xxx in the .env file - address internal L2_OUTPUT_PROPOSER = vm.envAddress("L2_OUTPUT_PROPOSER"); // TODO: define L2_OUTPUT_PROPOSER=xxx in the .env file - address internal L2_OUTPUT_PROPOSER_NEW_IMPL = vm.envAddress("L2_OUTPUT_PROPOSER_NEW_IMPL"); // TODO: define L2_OUTPUT_PROPOSER_NEW_IMPL=xxx in the .env file + // Note: A new L2OutputOracle implementation contract must be deployed first + // See SetupNewProposer.s.sol for deployment of new implementation + + // ProxyAdmin contract that manages the upgradeability of the L2OutputOracle + address internal PROXY_ADMIN_CONTRACT = vm.envAddress("L1_PROXY_ADMIN"); + + // Owner of the ProxyAdmin contract (typically a nested safe) + address internal PROXY_ADMIN_OWNER = vm.envAddress("L1_NESTED_SAFE"); + + // Current L2OutputOracle proxy contract address + address internal L2_OUTPUT_PROPOSER = vm.envAddress("L2_OUTPUT_PROPOSER"); + + // Address of the new L2OutputOracle implementation contract + address internal L2_OUTPUT_PROPOSER_NEW_IMPL = vm.envAddress("L2_OUTPUT_PROPOSER_NEW_IMPL"); function _postCheck() internal override view { ProxyAdmin proxyAdmin = ProxyAdmin(PROXY_ADMIN_CONTRACT); @@ -35,4 +52,4 @@ contract UpdateProposer is NestedMultisigBuilder { function _ownerSafe() internal override view returns (address) { return PROXY_ADMIN_OWNER; } -} \ No newline at end of file +}