Skip to content

feat[contracts]: enable initiating L2 upgrade via L1 to L2 message #887

Merged
smartcontracts merged 2 commits intov0.4.0-rcfrom
kelvin/chugsplash-owner
May 17, 2021
Merged

feat[contracts]: enable initiating L2 upgrade via L1 to L2 message #887
smartcontracts merged 2 commits intov0.4.0-rcfrom
kelvin/chugsplash-owner

Conversation

@smartcontracts
Copy link
Contributor

Description
Adds a new contract L2ChugSplashOwner which acts as an authenticated proxy to the L2ChugSplashDeployer contract. I've decided to do it this way because it gives us more options and ends up being simpler to test than #854. Writing this contract made me realize we really should have an CrossDomainOwnable helper contract (cc: @ben-chain).

@changeset-bot
Copy link

changeset-bot bot commented May 17, 2021

🦋 Changeset detected

Latest commit: f01dc0a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eth-optimism/contracts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@ben-chain ben-chain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, nice! I originally had figured that we would do it this way, and agree that this is 100% the way to go if to enable the upgrade to be initiated via an L2 account if desired.

For what it's worth, I think we are 95% of the way there to an OVM_CrossDomainOwnedProxy with this contract. Only update would require replacing the fallback function with a doCall(address _target, bytes memory _data) so that we can call arbitrary targets. Maybe we want the target to be hardcoded in this case, or maybe we just want it as-is to focus on getting stuff merged quickly. Approving under the assumption that that is the case.

@smartcontracts smartcontracts force-pushed the kelvin/chugsplash-owner branch from 4fc259f to f01dc0a Compare May 17, 2021 18:15
@smartcontracts smartcontracts merged commit 422e608 into v0.4.0-rc May 17, 2021
@smartcontracts smartcontracts deleted the kelvin/chugsplash-owner branch May 17, 2021 18:37
ben-chain pushed a commit to ben-chain/optimism that referenced this pull request May 18, 2021
…thereum-optimism#887)

* feat[contracts]: enable initiating L2 upgrade via L1 to L2 message

* chore: add changeset
gakonst pushed a commit that referenced this pull request May 20, 2021
)

* feat[contracts]: enable initiating L2 upgrade via L1 to L2 message

* chore: add changeset
gakonst pushed a commit that referenced this pull request May 21, 2021
)

* feat[contracts]: enable initiating L2 upgrade via L1 to L2 message

* chore: add changeset
smartcontracts added a commit that referenced this pull request May 30, 2021
)

* feat[contracts]: enable initiating L2 upgrade via L1 to L2 message

* chore: add changeset
ben-chain pushed a commit to ben-chain/optimism that referenced this pull request Jun 23, 2021
…thereum-optimism#887)

* feat[contracts]: enable initiating L2 upgrade via L1 to L2 message

* chore: add changeset
theochap pushed a commit that referenced this pull request Dec 10, 2025
github-merge-queue bot pushed a commit that referenced this pull request Feb 25, 2026
* feat: l2cm impl l2contractsmanager (#837)

* feat: add initial iteration of L2ContractsManager

* feat: add network configuration structs

* feat: load full config for L2ContractsManager

* feat: implement L2CM::_apply

* feat: add gas price oracle

* refactor: move L2CM types to library

* fix: upgrade ProxyAdmin predeploy

* chore: enforce delegatecall for L2CM::upgrade

* feat: add conditional upgrade for CGT

* refactor: remove non-proxied predeploys

* chore: renamed l2cm

* refactor: l2cm address comments (#839)

* refactor: rename _fullConfig to _loadFullConfig to match OPCM v2

* chore: remove non-proxied weth from implementations struct

* test: add config preservation test

* test: add CGT specific tests

* refactor: avoid casting network config values to address

* test: add test cases

* chore: pr ready (#844)

* chore: remove unnecesary casting on L2CM

* feat: add interface for XForkL2ContractsManager

* chore: add natspec to XForkL2ContractsManager

* chore: pr ready

* refactor: moves util functions out of L2CM implementation (#848)

* feat: l2cm address comments (#850)

* chore: add comment clarifying use `useCustomGasToken`

* chore: upgrade both native native asset liquidity and liquidity controller predeploys together

* feat: prohibit downgrading predeploy implementations

* refactor: make isCustomGasToken part of the network full config

* fix: add missing import

* fix: use FeeVault legacy getters for backward compat

* chore: update name XForkL2ContractsManager to L2ContractsManager

* feat: conditionally skip some predeploys based on them being supported in a given chain (#857)

* fix: l2cm address comments (#872)

* chore: add todo tracking removal of L2ProxyAdmin skips

* chore: add natspec comment for isPredeployNamespace

* chore: use vm.prank(address,bool) to prank a delegatecall

* chore: add todo for dev flags for CrossL2Inbox and L2ToL2CrossDomainMessenger

* feat: allow immutables for L2CM in semgrep rules

* chore: pr ready

* test: L2CM verify testing (#874)

* test: add coverage test for predeploy upgrades

* chore: update test natspec

* chore: just pr ready

* chore: L2CM round comments (#877)

* refactor: move helper function into Predeploys.s.sol

* fix: add conditional deployer to L2CM

* chore: update to l1block and l1blockCGT

* test: fixes issue where OptimismSuperchainERC20 tests fail due to profile ambiguity

* chore: just pr ready

* chore: l2cm round comments2 (#883)

* fix: move code length check out of isUpgradeable

* chore: inline fullCofig_.isCustomGasToken initialization

* chore: add public getters for the implementations on the L2CM

* chore: remove XForkL2ContractsManager sol rule exclusion

* test: add downgrade prevention test suite

* chore: just pr ready

* refactor: check for address 0 instead code length

* Revert "refactor: check for address 0 instead code length"

This reverts commit 1fa8694.

* chore: remove non-needed check

* chore: remove unused function in tests (#884)

* refactor: l2cm group impls (#885)

* refactor: remove individual getters in favor of a unified one

* test: add test for getImplementations

* test: add OZ v5 Initializable compatibility in L2ContractsManagerUtils (#887)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants