feat: add L2 Contracts Manager #689
Draft
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.
Note
Introduces a base L2 contracts manager and an xFork implementation that upgrades all L2 predeploy proxies, with constructor and upgrade tests.
packages/contracts-bedrock/src/L2/L2ContractsManager.sol: abstract manager withupgrade()flow and hooks (_gatherNetworkConfig,_afterUpgrade,_upgrade).packages/contracts-bedrock/src/L2/XForkContractsManager.sol: implements manager for xFork; acceptsInputof implementation addresses (stored asimmutables) and upgrades all L2 predeploy proxies viaIProxy.upgradeTo(e.g.,LEGACY_MESSAGE_PASSER,L2_CROSS_DOMAIN_MESSENGER,GAS_PRICE_ORACLE, bridges, fee vaults, registries).packages/contracts-bedrock/test/L2/XForkContractsManager.t.sol: verifies constructor sets immutables and thatupgrade()triggers expectedupgradeTocalls for each predeploy (usingvm.mockCall/vm.expectCall).Written by Cursor Bugbot for commit eb5aded. This will update automatically on new commits. Configure here.