refactor(contracts): remove OPCMv1 from all Solidity code#19795
Draft
smartcontracts wants to merge 7 commits intodevelopfrom
Draft
refactor(contracts): remove OPCMv1 from all Solidity code#19795smartcontracts wants to merge 7 commits intodevelopfrom
smartcontracts wants to merge 7 commits intodevelopfrom
Conversation
Delete OPContractsManager v1 contract, interface, tests, snapshots, and all v1/v2 branching logic. OPContractsManagerV2 is now the sole OPCM — all deploy scripts and test infrastructure use V2 exclusively. Key changes: - Delete OPContractsManager.sol (2203 lines, 7 inner contracts) - Gut IOPContractsManager.sol interface to empty - Remove DevFeatures.OPCM_V2 flag and Constants.OPCM_V2_MIN_VERSION - Remove AddGameType.s.sol (v1-only script) - Remove opcm-upgrade-checks (v1-only CI check) - Update all deploy scripts to unconditionally use V2 types - Update all test files to remove v1 branches and assertions - Delete 12 v1 snapshot files (ABI + storage layout) V2 contracts in src/L1/opcm/ are untouched (zero V1 dependencies). This is PR 1 of the OPCMv1 removal series. Go code and CI matrix changes follow in subsequent PRs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #19795 +/- ##
==========================================
+ Coverage 75.5% 75.7% +0.2%
==========================================
Files 194 138 -56
Lines 11275 6749 -4526
==========================================
- Hits 8515 5113 -3402
+ Misses 2616 1636 -980
+ Partials 144 0 -144
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Add back v1 OPCM fields as address/bytes32 placeholders in Solidity script structs to maintain ABI compatibility with Go op-deployer. - DeployImplementations.Output: 6 deprecated address fields (always zero) - ReadSuperchainDeployment.Input: opcmAddress field (ignored) - ReadSuperchainDeployment.Output: 5 ProtocolVersions fields (always zero) These fields are never populated — they exist solely so Go's ABI encoding matches the Solidity struct layout. They will be removed atomically with the Go struct fields in a follow-up PR. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update Go op-deployer to unconditionally use OPCMv2 instead of branching on the OPCM_V2 dev feature flag, matching the Solidity contract deletion. - opchain.go: unconditionally use OpcmV2Impl instead of defaulting to v1 OpcmImpl - init.go: update ReadSuperchainDeployment call for new struct layout - artifacts.go: point Opcm mapping to V2 artifact, remove 5 deleted v1 sub-contract artifact mappings - Tests updated to match new behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mpat Since v1 OPContractsManager is deleted, dio.Opcm is always zero. Populate OpcmImpl with dio.OpcmV2 so downstream consumers (op-devstack, e2e tests) get a valid OPCM address. The OpcmImpl field will be renamed/removed in the follow-up Go PR. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The v1 OPCM Go bindings are stale (v1 contract deleted), so superroot.go can no longer use OPContractsManagerMetaData to ABI-encode migrate calls. Remove the v1 path entirely and use an inline v2 migrator ABI for the migrate call. - Remove isOPCMV2 version check (always v2 now) - Remove v1 MigrateInput path with UsePermissionlessGame/GameParameters - Add OPContractsManagerMigratorABI() helper with inline v2 ABI JSON - Remove unused deployer import and versionFn var Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- apply_test: OpcmImpl now equals OpcmV2Impl (not zero) - implementations_test: check OpcmV2 instead of Opcm (deprecated zero field) - migrate_test: remove opcm-v1 test case from table-driven test - migrate_test (CLI): skip TestCLIMigrateV1 (v1 contract deleted) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dead code left behind when v1 migration path was removed. Caught by go-lint CI check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Remove OPContractsManager v1 from all Solidity code, making OPContractsManagerV2 the sole OPCM.
OPContractsManager.sol(2203 lines, 7 inner contracts) and gutIOPContractsManager.solinterfaceDevFeatures.OPCM_V2flag,Constants.OPCM_V2_MIN_VERSION,Config.devFeatureOpcmV2()AddGameType.s.sol,opcm-upgrade-checks/directory, 3 test files, 12 snapshot filesV2 contracts in
src/L1/opcm/are completely untouched — they have zero V1 dependencies.56 files changed, +212 / -13,404 lines (net deletion of ~13,200 lines)
This is PR 1 of the OPCMv1 removal series. Breaks out the Solidity-side changes from #19385. Go code (
op-deployer) and CI matrix changes follow in subsequent PRs.Test plan
mise exec -- just build-devpasses (zero compilation errors)mise exec -- just prpasses (17/17 checks: lint, semgrep, snapshots, semver-diff, interfaces, size-check, etc.)IOPContractsManagerorOPContractsManager(non-V2)DevFeatures.OPCM_V2orConstants.OPCM_V2_MIN_VERSIONisOPCMv2/isOPCMV2variablessrc/L1/opcm/verified untouchedmise exec -- just test-devpasses (not yet run — long-running)🤖 Generated with Claude Code