Skip to content

move more logic to interfaces#1019

Merged
tt-cll merged 4 commits intomainfrom
tt/factory
Apr 13, 2026
Merged

move more logic to interfaces#1019
tt-cll merged 4 commits intomainfrom
tt/factory

Conversation

@tt-cll
Copy link
Copy Markdown
Contributor

@tt-cll tt-cll commented Apr 10, 2026

No description provided.

@tt-cll tt-cll marked this pull request as ready for review April 10, 2026 21:12
@tt-cll tt-cll requested review from a team and skudasov as code owners April 10, 2026 21:12
Copilot AI review requested due to automatic review settings April 10, 2026 21:12
Copy link
Copy Markdown
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 moves chain-family-specific behavior (signer key selection, fee aggregator fallback, executor transmitter key/address derivation, and message extra-args serialization) behind interfaces/registries so devenv can support additional chain families without editing central logic.

Changes:

  • Extend ImplFactory with family-specific hooks (default signer key, fee aggregator fallback, funding/bootstrap capabilities, transmitter key + address derivation) and update EVM factory to implement them.
  • Refactor executor transmitter key generation/address derivation to accept injected family-specific resolvers/generators.
  • Replace EVM’s hardcoded extraArgs family switch with a registry-dispatched serializer.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
build/devenv/services/executor/base.go Make transmitter key/address logic injectable via function types.
build/devenv/services/executor.go Same refactor for the services-layer executor input helpers.
build/devenv/evm/impl.go Dispatch extra-args serialization via a registered per-family serializer; register EVM serializer.
build/devenv/evm/cctp.go Add documentation clarifying CCTP selector filtering assumptions.
build/devenv/evm_factory.go Implement new ImplFactory methods for the EVM family (signer, fee aggregator, funding/bootstrap flags, transmitter key/address).
build/devenv/environment.go Delegate signer/fee-aggregator defaults and executor key/address derivation to registered ImplFactory implementations.
build/devenv/chain_impl_factory.go Extend ImplFactory interface and add GetAllImplFactories snapshot helper.
build/devenv/cciptestinterfaces/interface.go Add a global registry for destination-family extra-args serializers.

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

makramkd
makramkd previously approved these changes Apr 13, 2026
@github-actions
Copy link
Copy Markdown

Code coverage report:

Package main tt/factory diff
github.com/smartcontractkit/chainlink-ccv/aggregator 48.46% 48.44% -0.02%
github.com/smartcontractkit/chainlink-ccv/bootstrap 42.35% 42.35% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 65.13% 65.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 50.74% 50.74% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 45.74% 45.74% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 37.46% 37.51% +0.05%
github.com/smartcontractkit/chainlink-ccv/integration 47.97% 48.07% +0.10%
github.com/smartcontractkit/chainlink-ccv/pkg 38.00% 38.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 65.19% 65.19% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 32.43% 32.43% +0.00%

@tt-cll tt-cll enabled auto-merge April 13, 2026 12:01
Comment on lines +34 to +64

// DefaultSignerKey returns the default signer key for this chain family
// given the bootstrap keys from a verifier node. Each family selects the
// appropriate key type (e.g. EVM uses ECDSAAddress, Stellar uses EdDSA).
// Return "" if no default signer is available.
DefaultSignerKey(keys services.BootstrapKeys) string

// DefaultFeeAggregator returns a fee aggregator address to use as a
// fallback when topology omits one for the given chain. Each family
// extracts the deployer address in its native format from the environment.
// Return "" if no fallback is available for the given selector.
DefaultFeeAggregator(env *deployment.Environment, chainSelector uint64) string

// SupportsFunding reports whether this chain family supports native token
// funding of executor addresses. Families that lack on-chain transfer
// primitives in devenv (e.g. Canton) return false.
SupportsFunding() bool

// SupportsBootstrapExecutor reports whether executors for this family
// use the bootstrap.Run lifecycle (JD-managed with DB). Families that
// use standalone executors (legacy mode, no bootstrap) return false.
SupportsBootstrapExecutor() bool

// GenerateTransmitterKey generates a fresh private key for executor
// transaction signing in the native format for this chain family.
// Returns the hex-encoded private key string.
GenerateTransmitterKey() (string, error)

// TransmitterAddress derives the on-chain transmitter address from the
// given hex-encoded private key in the native format for this family.
TransmitterAddress(privateKeyHex string) (protocol.UnknownAddress, error)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These should probably all go in cciptestinterfaces.CCIP17Configuration

@tt-cll tt-cll added this pull request to the merge queue Apr 13, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 13, 2026
@tt-cll tt-cll added this pull request to the merge queue Apr 13, 2026
Merged via the queue into main with commit f82ccca Apr 13, 2026
34 of 47 checks passed
@tt-cll tt-cll deleted the tt/factory branch April 13, 2026 15:51
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