Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve UpdateProposer script documentation #253

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions setup-templates/template-incident/script/UpdateProposer.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -35,4 +52,4 @@ contract UpdateProposer is NestedMultisigBuilder {
function _ownerSafe() internal override view returns (address) {
return PROXY_ADMIN_OWNER;
}
}
}