Skip to content

refactor: decouple AnchorStateRegistry from SystemConfig, use SuperchainConfig instead #16383

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

GarmashAlex
Copy link
Contributor

Description

This PR refactors the AnchorStateRegistry contract to remove its dependency on SystemConfig and instead use SuperchainConfig and ETHLockbox for chain-wide configuration and pause logic. The initialize function and related interfaces have been updated to accept ISuperchainConfig and IETHLockbox instead of ISystemConfig. All logic related to pausing and guardian checks now references SuperchainConfig. Deployment scripts, contract manager logic, and tests have been updated accordingly.
This change is required to support interop mode, where AnchorStateRegistry is shared across multiple chains, but SystemConfig remains chain-specific.

Tests

  • Updated all existing tests for AnchorStateRegistry to use the new constructor and interface.
  • Verified that pause and guardian logic now reference SuperchainConfig as intended.
  • All relevant deployment and migration scripts have been updated and checked for compatibility.

Additional context

This refactor is necessary to decouple AnchorStateRegistry from chain-specific configuration, ensuring it can be safely used in interop scenarios across multiple chains.
No new features are introduced; this is a structural and architectural improvement to support future multi-chain deployments.

Metadata

Closes #16114

@GarmashAlex GarmashAlex requested a review from a team as a code owner June 11, 2025 18:59
@smartcontracts
Copy link
Contributor

Hi - changes to smart contracts need to go through a design review and specs process. This implementation is also not entirely correct as it doesn't account for changes to the ETHLockbox contract, which is why the SystemConfig is valuable. For now I'm going to mark this PR as do-not-merge and I'll investigate to see if we'd accept a PR for this.

@smartcontracts smartcontracts added the M-do-not-merge Meta: Do not merge label Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M-do-not-merge Meta: Do not merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

op-contracts: Remove SystemConfig reference from AnchorStateRegistry
2 participants