Skip to content

Conversation

@0xiamflux
Copy link

@0xiamflux 0xiamflux commented Nov 16, 2025

Note

Introduces a base L2 contracts manager and an xFork implementation that upgrades all L2 predeploy proxies, with constructor and upgrade tests.

  • Contracts:
    • Add packages/contracts-bedrock/src/L2/L2ContractsManager.sol: abstract manager with upgrade() flow and hooks (_gatherNetworkConfig, _afterUpgrade, _upgrade).
    • Add packages/contracts-bedrock/src/L2/XForkContractsManager.sol: implements manager for xFork; accepts Input of implementation addresses (stored as immutables) and upgrades all L2 predeploy proxies via IProxy.upgradeTo (e.g., LEGACY_MESSAGE_PASSER, L2_CROSS_DOMAIN_MESSENGER, GAS_PRICE_ORACLE, bridges, fee vaults, registries).
  • Tests:
    • Add packages/contracts-bedrock/test/L2/XForkContractsManager.t.sol: verifies constructor sets immutables and that upgrade() triggers expected upgradeTo calls for each predeploy (using vm.mockCall/vm.expectCall).

Written by Cursor Bugbot for commit eb5aded. This will update automatically on new commits. Configure here.

@0xiamflux 0xiamflux requested a review from 0xOneTony November 16, 2025 13:50
@0xiamflux 0xiamflux self-assigned this Nov 16, 2025
@0xiamflux 0xiamflux requested a review from 0xniha November 17, 2025 15:03
/// Relies on specific L2ContractsManager contracts interpretation of the network config required.
/// @param networkConfig The network specific configuration.
struct FullConfig {
bytes networkConfig;
Copy link
Member

Choose a reason for hiding this comment

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

eventually this will change to each individual var we will have to set but for now bytes i guess is good

@0xOneTony 0xOneTony marked this pull request as draft November 27, 2025 14:29
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.

3 participants