Skip to content

fix(ccip): LoadChainState handles EVM2EVMOnRamp/EVM2EVMOffRamp v1.5 address-book entries#22339

Draft
joaoluisam wants to merge 3 commits intodevelopfrom
fix/stateview-recognize-evm2evm-address-book
Draft

fix(ccip): LoadChainState handles EVM2EVMOnRamp/EVM2EVMOffRamp v1.5 address-book entries#22339
joaoluisam wants to merge 3 commits intodevelopfrom
fix/stateview-recognize-evm2evm-address-book

Conversation

@joaoluisam
Copy link
Copy Markdown
Contributor

This pull request adds support for recognizing and loading legacy v1.5 EVM2EVMOnRamp and EVM2EVMOffRamp contract types in the chain state loader, ensuring backward compatibility for migrations and legacy deployments. It also introduces a comprehensive test to verify the correct handling of these legacy contract keys and their mapping to the appropriate contract ABIs.

Legacy contract support and test coverage:

  • Updated LoadChainState in state.go to recognize both legacy and standard type/version keys for EVM2EVMOnRamp and EVM2EVMOffRamp contracts, allowing them to be loaded when the loadLegacyContracts flag is set. [1] [2]
  • Added new contract type constants EVM2EVMOnRamp and EVM2EVMOffRamp to types.go for legacy v1.5 datastore aliases, matching on-chain typeAndVersion values.

Testing enhancements:

  • Introduced TestLoadChainState_LegacyV15EVM2EVMDatastoreKeys in state_test.go to deploy v1.5 onramp/offramp contracts, verify their loading behavior with and without the legacy flag, and check correct ABI assignments.
  • Added necessary imports for v1.5.0 contract bindings in state_test.go to support the new tests.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

✅ No conflicts with other open PRs targeting develop

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented May 7, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

Failed Test Failure Summary Logs
TestMaybeLoadMCMSWithTimelockChainStateFromRefs_ProdTestnetMCM The test failed because a required canceller was not found. Logs ↗︎

View Full Report ↗︎Docs

@cl-sonarqube-production
Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)
21.69% Technical Debt Ratio on New Code (required ≤ 4%)

See analysis details on SonarQube

Catch issues before they fail your Quality Gate with our IDE extension SonarQube IDE SonarQube IDE

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.

1 participant