feat: L2 Contracts Manager#18289
Closed
0xiamflux wants to merge 1 commit intoethereum-optimism:developfrom
Closed
Conversation
) * feat: add NUT lib * refactor: makes txn artifact lib to produce array instead of using keys * refactor: rename "artifactPath" to "forgeArtifactPath" * test: add test that checks the file is generated correctly * refactor: rename UpgradeTxn to NetworkUpgradeTxn * feat: add readArtifact to lib & fix writeArtifact test * feat(l2cm): add a generation script using NUT library, add sample L2CM (#663) * feat: add a generation script using NUT library, add sample L2CM * chore: rename script to match doc terms * feat(l2cm): add deterministic upgrades (#665) * feat: add deterministic upgrades to TransactionGeneration script & ProxyUpgrade struct to L2CM * fix: predeploy deployments with constructor * feat: add separate interface file for create2 preinstall * docs: add natspec * refactor: add single getChangedPredeploys * feat: add L2ImplementationsDeployer * refactor: add addFeeVault helper * refactor: remove l2impldeployer from script * fix: replace performDelegateCall signature with selector * refactor: move proxy upgrades logic to L2CM * refactor: use only upgradeTo * fix: revert console log --------- Co-authored-by: niha <205694301+0xniha@users.noreply.github.com> * feat: l2cm poc fixes (#674) * test: add idempotent upgrade test & hard fork name input param * fix: remove newDeploymentTx helper from NUT lib * fix: skip proxyadmin accordingly * fix: move tx gen script test to /scripts * fix: remove l1block check * refactor: l2cm execute without args * test: add implementation checks * refactor: remove returndata from l2cm functions * fix: remove extra comment on predeployhelper * docs: add natspec for XForkContractsManager * fix: remove xforkcm constructor checks * test: add expect upgrade event emission --------- Co-authored-by: Flux <175354924+0xiamflux@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add L2 Upgrade Transaction Generation
Adds support for generating Network Upgrade Transactions to deploy and upgrade L2 predeploy contracts during hard forks.
Changes
TransactionGeneration.s.sol
L2ContractsManager→ execute upgradesL2ImplementationsDeployerfor predeploy deployments and CREATE2 forL2ContractsManagerPredeployHelper.sol
OptimismMintableERC721FactoryProxyAdmin.sol
DEPOSITOR_ACCOUNTto executeL2ContractsManagerupgradesL2ImplementationsDeployer.sol
Create2Deployerfor conditional deployment of contracts, in case of an address collision simply returns the address without reverting.NOTE: Some of the contracts and functions will be eventually renamed in future PRs to adhere to Specifications Documents, for example:
ProxyAdmin->L2ProxyAdminL2ImplementationsDeployer->ConditionalDeployerDesign Docs
Specs