Skip to content

move common methods to chain adapters#1896

Merged
tt-cll merged 4 commits intomainfrom
tt/cleanup
Mar 25, 2026
Merged

move common methods to chain adapters#1896
tt-cll merged 4 commits intomainfrom
tt/cleanup

Conversation

@tt-cll
Copy link
Collaborator

@tt-cll tt-cll commented Mar 24, 2026

No description provided.

hexStr = SVMFamilySelector
case chain_selectors.FamilyAptos:
hexStr = AptosFamilySelector
hexStr = "ac77ffec"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

only keeping these for backwards compat while the usages are migrated

@github-actions
Copy link

Metric tt/cleanup main
Coverage 70.1% 69.9%

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR shifts “common” chain-specific defaults (notably FeeQuoter dest-chain config and chain-family selector bytes4) out of shared lane utilities and into per-chain adapters, so ConnectChains callers/tests no longer need to manually populate those fields.

Changes:

  • Remove caller-provided FeeQuoterDestChainConfig from integration tests; rely on adapters to supply expected defaults.
  • Introduce an optional ChainMetadataProvider adapter interface and a global chain-family-selector registry used by utils.GetSelectorHex.
  • Inline per-family selector constants into EVM/Solana adapters (and a few test helpers) and delete the prior shared defaults from lanes.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
integration-tests/deployment/set_token_transfer_fee_test.go Stops setting FeeQuoterDestChainConfig in ChainDefinition; relies on adapter defaults.
integration-tests/deployment/connect_chains_test.go Updates assertions to source expected FeeQuoter config from the appropriate adapter rather than from the chain definition.
deployment/v1_7_0/changesets/configure_committee_verifiers_test.go Updates mock adapter to provide an explicit FeeQuoter dest-chain config struct.
deployment/utils/common.go Adds a global registry for family selectors and changes GetSelectorHex resolution behavior.
deployment/lanes/product.go Adds ChainMetadataProvider and registers chain-family selectors during lane-adapter registration.
deployment/lanes/lane_update.go Removes shared default builders (DefaultFeeQuoterDestChainConfig, DefaultGasPrice).
chains/solana/deployment/v1_6_0/sequences/adapter.go Inlines SVM selector bytes4 and implements GetChainFamilySelector.
chains/evm/deployment/v1_6_0/sequences/adapter.go Inlines EVM selector bytes4 and implements GetChainFamilySelector.
ccv/chains/evm/deployment/v1_7_0/testsetup/testsetup.go Inlines EVM selector bytes4 for tests to avoid an import cycle.
ccv/chains/evm/deployment/v1_7_0/adapters/chain_family.go Implements GetChainFamilySelector and inlines FeeQuoter dest-chain defaults for the adapter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tt-cll tt-cll enabled auto-merge March 24, 2026 15:56
@tt-cll tt-cll added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit 498eba7 Mar 25, 2026
60 of 61 checks passed
@tt-cll tt-cll deleted the tt/cleanup branch March 25, 2026 00:06
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.

4 participants