Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/devenv/cciptestinterfaces/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ type OnChainCommittees struct {
// express only the values they want to override; nil/zero means "use adapter default".
type ChainLaneProfile struct {
BaseExecutionGasCost *uint32
FeeQuoterDestChainConfig ccipChangesets.FeeQuoterDestChainConfigOverrides
FeeQuoterDestChainConfig adapters.FeeQuoterDestChainConfigOverrides
ExecutorDestChainConfig *adapters.ExecutorDestChainConfig
DefaultExecutorQualifier string
DefaultInboundCCVs []datastore.AddressRef
Expand Down
3 changes: 1 addition & 2 deletions build/devenv/components/indexer/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
devenvruntime "github.com/smartcontractkit/chainlink-ccv/build/devenv/runtime"
"github.com/smartcontractkit/chainlink-ccv/build/devenv/services"
ccvdeployment "github.com/smartcontractkit/chainlink-ccv/deployment"
ccvadapters "github.com/smartcontractkit/chainlink-ccv/deployment/adapters"
ccvchangesets "github.com/smartcontractkit/chainlink-ccv/deployment/changesets"
"github.com/smartcontractkit/chainlink-ccv/indexer/pkg/config"
"github.com/smartcontractkit/chainlink-deployments-framework/deployment"
Expand Down Expand Up @@ -60,7 +59,7 @@ func (c *component) RunPhase4(
}

firstIdx := inputs[0]
cs := ccvchangesets.GenerateIndexerConfig(ccvadapters.GetRegistry())
cs := ccvchangesets.GenerateIndexerConfig()
localEnv := *e
output, err := cs.Apply(localEnv, ccvchangesets.GenerateIndexerConfigInput{
ServiceIdentifier: "indexer",
Expand Down
3 changes: 1 addition & 2 deletions build/devenv/components/protocol_contracts/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"github.com/smartcontractkit/chainlink-ccv/build/devenv/services/committeeverifier"
"github.com/smartcontractkit/chainlink-ccv/build/devenv/timing"
ccvdeployment "github.com/smartcontractkit/chainlink-ccv/deployment"
ccvadapters "github.com/smartcontractkit/chainlink-ccv/deployment/adapters"
ccvchangesets "github.com/smartcontractkit/chainlink-ccv/deployment/changesets"
"github.com/smartcontractkit/chainlink-deployments-framework/datastore"
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain"
Expand Down Expand Up @@ -214,7 +213,7 @@ func (p *component) RunPhase3(
if !ok {
return nil, nil, fmt.Errorf("committee %q not found in topology", aggregatorInput.CommitteeName)
}
cs := ccvchangesets.GenerateAggregatorConfig(ccvadapters.GetRegistry())
cs := ccvchangesets.GenerateAggregatorConfig()
output, err := cs.Apply(*e, ccvchangesets.GenerateAggregatorConfigInput{
ServiceIdentifier: instanceName + "-aggregator",
CommitteeQualifier: aggregatorInput.CommitteeName,
Expand Down
5 changes: 2 additions & 3 deletions build/devenv/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
"github.com/smartcontractkit/chainlink-ccv/build/devenv/services/committeeverifier"
executorsvc "github.com/smartcontractkit/chainlink-ccv/build/devenv/services/executor"
ccvdeployment "github.com/smartcontractkit/chainlink-ccv/deployment"
ccvadapters "github.com/smartcontractkit/chainlink-ccv/deployment/adapters"
ccvchangesets "github.com/smartcontractkit/chainlink-ccv/deployment/changesets"
ccvshared "github.com/smartcontractkit/chainlink-ccv/deployment/shared"
"github.com/smartcontractkit/chainlink-ccv/indexer/pkg/config"
Expand Down Expand Up @@ -486,7 +485,7 @@ func generateExecutorJobSpecs(
if !ok {
return nil, fmt.Errorf("executor pool %q not found in topology", qualifier)
}
cs := ccvchangesets.ApplyExecutorConfig(ccvadapters.GetRegistry())
cs := ccvchangesets.ApplyExecutorConfig()
output, err := cs.Apply(*e, ccvchangesets.ApplyExecutorConfigInput{
ExecutorQualifier: qualifier,
NOPs: ccvchangesets.NOPInputsFromTopology(topology),
Expand Down Expand Up @@ -584,7 +583,7 @@ func generateVerifierJobSpecs(
if !ok {
return nil, fmt.Errorf("committee %q not found in topology", committeeName)
}
cs := ccvchangesets.ApplyVerifierConfig(ccvadapters.GetRegistry())
cs := ccvchangesets.ApplyVerifierConfig()
output, err := cs.Apply(*e, ccvchangesets.ApplyVerifierConfigInput{
CommitteeQualifier: committeeName,
DefaultExecutorQualifier: devenvcommon.DefaultExecutorQualifier,
Expand Down
7 changes: 3 additions & 4 deletions build/devenv/environment_monolith.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
"github.com/smartcontractkit/chainlink-ccv/build/devenv/timing"
"github.com/smartcontractkit/chainlink-ccv/build/devenv/util"
ccvdeployment "github.com/smartcontractkit/chainlink-ccv/deployment"
ccvadapters "github.com/smartcontractkit/chainlink-ccv/deployment/adapters"
ccvchangesets "github.com/smartcontractkit/chainlink-ccv/deployment/changesets"
ccvshared "github.com/smartcontractkit/chainlink-ccv/deployment/shared"
"github.com/smartcontractkit/chainlink-ccv/indexer/pkg/config"
Expand Down Expand Up @@ -461,7 +460,7 @@ func NewEnvironment() (in *Cfg, err error) {
if !ok {
return nil, fmt.Errorf("committee %q not found in topology", aggregatorInput.CommitteeName)
}
cs := ccvchangesets.GenerateAggregatorConfig(ccvadapters.GetRegistry())
cs := ccvchangesets.GenerateAggregatorConfig()
output, err := cs.Apply(*e, ccvchangesets.GenerateAggregatorConfigInput{
ServiceIdentifier: instanceName + "-aggregator",
CommitteeQualifier: aggregatorInput.CommitteeName,
Expand Down Expand Up @@ -502,7 +501,7 @@ func NewEnvironment() (in *Cfg, err error) {
// One shared config is generated; all indexers use the same config and duplicated secrets/auth.
if len(in.Aggregator) > 0 && len(in.Indexer) > 0 {
firstIdx := in.Indexer[0]
cs := ccvchangesets.GenerateIndexerConfig(ccvadapters.GetRegistry())
cs := ccvchangesets.GenerateIndexerConfig()
output, err := cs.Apply(*e, ccvchangesets.GenerateIndexerConfigInput{
ServiceIdentifier: "indexer",
CommitteeVerifierNameToQualifier: firstIdx.CommitteeVerifierNameToQualifier,
Expand Down Expand Up @@ -718,7 +717,7 @@ func NewEnvironment() (in *Cfg, err error) {
}

// Use changeset to generate token verifier config from on-chain state
cs := ccvchangesets.GenerateTokenVerifierConfig(ccvadapters.GetRegistry())
cs := ccvchangesets.GenerateTokenVerifierConfig()
output, err := cs.Apply(*e, ccvchangesets.GenerateTokenVerifierConfigInput{
ServiceIdentifier: "TokenVerifier",
ChainSelectors: selectors,
Expand Down
3 changes: 1 addition & 2 deletions build/devenv/environment_phased.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
executorsvc "github.com/smartcontractkit/chainlink-ccv/build/devenv/services/executor"
"github.com/smartcontractkit/chainlink-ccv/build/devenv/timing"
ccvdeployment "github.com/smartcontractkit/chainlink-ccv/deployment"
ccvadapters "github.com/smartcontractkit/chainlink-ccv/deployment/adapters"
ccvchangesets "github.com/smartcontractkit/chainlink-ccv/deployment/changesets"
"github.com/smartcontractkit/chainlink-deployments-framework/datastore"
"github.com/smartcontractkit/chainlink-deployments-framework/deployment"
Expand Down Expand Up @@ -211,7 +210,7 @@ func runPhasedEnvironmentFinish(
}

// Use changeset to generate token verifier config from on-chain state
cs := ccvchangesets.GenerateTokenVerifierConfig(ccvadapters.GetRegistry())
cs := ccvchangesets.GenerateTokenVerifierConfig()
output, err := cs.Apply(*e, ccvchangesets.GenerateTokenVerifierConfigInput{
ServiceIdentifier: "TokenVerifier",
ChainSelectors: selectors,
Expand Down
2 changes: 1 addition & 1 deletion build/devenv/evm/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ func evmFeeQuoterDestChainConfigOverride(selector uint64) *lanes.FeeQuoterDestCh

func (m *CCIP17EVMConfig) GetChainLaneProfile(_ *deployment.Environment, selector uint64) (cciptestinterfaces.ChainLaneProfile, error) {
return cciptestinterfaces.ChainLaneProfile{
FeeQuoterDestChainConfig: ccipChangesets.FeeQuoterDestChainConfigOverrides{
FeeQuoterDestChainConfig: adapters.FeeQuoterDestChainConfigOverrides{
USDPerUnitGas: big.NewInt(1e6),
},
}, nil
Expand Down
6 changes: 3 additions & 3 deletions build/devenv/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ require (
github.com/prometheus/client_golang v1.23.2
github.com/rs/zerolog v1.34.0
github.com/smartcontractkit/chain-selectors v1.0.98
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260512180815-d7a89b0a5784
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260512180815-d7a89b0a5784
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260520210346-c3a890f82ece
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260520171506-73298226c668
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260417081611-8bdbd9f45629
github.com/smartcontractkit/chainlink-deployments-framework v0.101.1
github.com/smartcontractkit/chainlink-testing-framework/framework v0.16.1
Expand All @@ -38,7 +38,7 @@ require (
github.com/lib/pq v1.11.1
github.com/sethvargo/go-retry v0.3.0
github.com/smartcontractkit/chainlink-ccv v0.0.2-0.20260501160109-2b5b8d344776
github.com/smartcontractkit/chainlink-ccv/deployment v0.0.2-0.20260512122614-dac96f8f568b
github.com/smartcontractkit/chainlink-ccv/deployment v0.0.2-0.20260520182028-cfd627ddb60c
github.com/smartcontractkit/chainlink-common/keystore v1.0.2
github.com/smartcontractkit/chainlink-evm/gethwrappers v0.0.0-20260119171452-39c98c3b33cd
github.com/smartcontractkit/chainlink-protos/chainlink-ccv/committee-verifier v0.0.0-20251211142334-5c3421fe2c8d
Expand Down
8 changes: 4 additions & 4 deletions build/devenv/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1122,14 +1122,14 @@ github.com/smartcontractkit/chain-selectors v1.0.98 h1:fuI7CQ1o5cX64eO4/Lvwtfhdp
github.com/smartcontractkit/chain-selectors v1.0.98/go.mod h1:qy7whtgG5g+7z0jt0nRyii9bLND9m15NZTzuQPkMZ5w=
github.com/smartcontractkit/chainlink-aptos v0.0.0-20260306142855-8d629e752265 h1:Q/sYLdOefZUKc/Bxssq1mg8ptQE/AOot2WI+QcLoiVA=
github.com/smartcontractkit/chainlink-aptos v0.0.0-20260306142855-8d629e752265/go.mod h1:CQGkKp3YDsUuxixxmmngmRKfh6yIcftGEZsQrsSIIM8=
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260512180815-d7a89b0a5784 h1:s0rW7GaIKf9m+kfv0dFJPdSbHaMqQiv3xamQP2RVWNE=
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260512180815-d7a89b0a5784/go.mod h1:0dcvbCc+HRK+nIweRSHu3FjkNTV9gi+irBIB3mUUe68=
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260520210346-c3a890f82ece h1:nilQlJxDw3XcmEgdk5xT0NpsawCQqthNLbaLLvoUDe4=
github.com/smartcontractkit/chainlink-ccip/chains/evm v0.0.0-20260520210346-c3a890f82ece/go.mod h1:91QdgssWiCOrxybF6FADOgTYznpzf/iE15cOxWOkbrU=
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260129103204-4c8453dd8139 h1:jkChf04hhdiMBApbb+lLDxHMY62Md6UeM7v++GSw3K8=
github.com/smartcontractkit/chainlink-ccip/chains/solana v0.0.0-20260129103204-4c8453dd8139/go.mod h1:wuhagkM/lU0GbV2YcrROOH0GlsfXJYwm6qmpa4CK70w=
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260129103204-4c8453dd8139 h1:tw3K4UkH5XfW5SoyYkvAlbzrccoGSLdz/XkxD6nyGC8=
github.com/smartcontractkit/chainlink-ccip/chains/solana/gobindings v0.0.0-20260129103204-4c8453dd8139/go.mod h1:1WcontO9PeuKdUf5HXfs3nuICtzUvFNnyCmrHkTCF9Y=
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260512180815-d7a89b0a5784 h1:WND8+86KW8p/mI/JBmn3BW3C4z6EqIjTRGx7EEqHYYM=
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260512180815-d7a89b0a5784/go.mod h1:Ls0oszLvhzV3/D0ivG85sh8qmmcsVhKplmepQdFq98E=
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260520171506-73298226c668 h1:ksqhvP0ykSunYR2H5dhn0HEV8ZIsC5S+RoXYjqidr/I=
github.com/smartcontractkit/chainlink-ccip/deployment v0.0.0-20260520171506-73298226c668/go.mod h1:Ls0oszLvhzV3/D0ivG85sh8qmmcsVhKplmepQdFq98E=
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260417081611-8bdbd9f45629 h1:YZCgnZteDIaV+Jrb6DDk4NQVJJ/ZwwYUaX9De/XUoCA=
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260417081611-8bdbd9f45629/go.mod h1:RnNTmxoheJYec/Gl/9t3wPLtFIHrlYjmWDdwZZJjchw=
github.com/smartcontractkit/chainlink-common/keystore v1.0.2 h1:AWisx4JT3QV8tcgh6J5NCrex+wAgTYpWyHsyNPSXzsQ=
Expand Down
64 changes: 64 additions & 0 deletions deployment/adapters/chain_contracts_deploy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package adapters

import (
"github.com/Masterminds/semver/v3"

mcmstypes "github.com/smartcontractkit/mcms/types"

"github.com/smartcontractkit/chainlink-deployments-framework/chain"
"github.com/smartcontractkit/chainlink-deployments-framework/datastore"
"github.com/smartcontractkit/chainlink-deployments-framework/operations"
)

// ExecutorDeployParams describes a single executor to deploy on a chain.
type ExecutorDeployParams struct {
Qualifier string
Version *semver.Version
}

// ProtocolContractsDeployInput is the per-chain input for deploying CCIP
// protocol contracts (RMNRemote, OnRamp, OffRamp, FeeQuoter, Router, Executors).
// Committee verifiers are deployed separately via CommitteeVerifierDeployAdapter.
type ProtocolContractsDeployInput struct {
// ChainSelector is the chain to deploy on.
ChainSelector uint64
// DeployerContract is the deployer/factory address (e.g. CREATE2Factory on EVM).
DeployerContract string
// DeployTestRouter deploys a TestRouter alongside the production Router.
DeployTestRouter bool
// ExistingAddresses are already-deployed addresses on this chain. The adapter
// uses these for idempotency — contracts that already exist are not redeployed.
ExistingAddresses []datastore.AddressRef
// Executors lists executor instances to deploy.
Executors []ExecutorDeployParams
// DeployerKeyOwned when true means deployed contracts remain owned by the
// deployer key. When false, ownership is transferred to the RBAC timelock.
DeployerKeyOwned bool
// FamilyExtras carries chain-family-specific deploy parameters (e.g. RMN
// params, gas limits) that the adapter interprets.
FamilyExtras map[string]any
}

// ProtocolContractsDeployOutput is the output of a protocol contracts deployment.
type ProtocolContractsDeployOutput struct {
// Addresses are newly deployed contract addresses.
Addresses []datastore.AddressRef
// BatchOps are MCMS batch operations (e.g. ownership transfer).
BatchOps []mcmstypes.BatchOperation
// RefsToTransferOwnership are addresses whose ownership should be
// transferred to the RBAC timelock in a follow-up step.
RefsToTransferOwnership []datastore.AddressRef
}

// ProtocolContractsDeployAdapter deploys CCIP protocol contracts on a single
// chain. Implementations are chain-family-specific and registered via the
// singleton FamilyRegistry.
//
// The adapter's sequence is expected to be idempotent: re-running on a chain
// where contracts already exist reconciles any drifted config rather than
// redeploying.
type ProtocolContractsDeployAdapter interface {
// DeployProtocolContracts returns the per-family sequence that deploys the
// core CCIP protocol contracts on one chain.
DeployProtocolContracts() *operations.Sequence[ProtocolContractsDeployInput, ProtocolContractsDeployOutput, chain.BlockChains]
}
72 changes: 72 additions & 0 deletions deployment/adapters/lane_config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package adapters

import (
mcmstypes "github.com/smartcontractkit/mcms/types"

"github.com/smartcontractkit/chainlink-deployments-framework/chain"
"github.com/smartcontractkit/chainlink-deployments-framework/datastore"
"github.com/smartcontractkit/chainlink-deployments-framework/operations"
)

// LaneConfigInput is the per-chain input for configuring lanes to/from remote chains.
// The adapter resolves local contract addresses (OnRamp, OffRamp, Router, FeeQuoter)
// from ExistingAddresses; callers do not need to supply them explicitly.
type LaneConfigInput struct {
// ChainSelector is the local chain being configured.
ChainSelector uint64
// UseTestRouter selects the TestRouter instead of the production Router.
UseTestRouter bool
// ExistingAddresses are the deployed addresses on this chain, used by the
// adapter to resolve OnRamp, OffRamp, Router, FeeQuoter, etc.
ExistingAddresses []datastore.AddressRef
// RemoteChains maps remote chain selector → lane config for that remote chain.
RemoteChains map[uint64]RemoteLaneConfig
}

// RemoteLaneConfig describes how the local chain should be configured for a
// specific remote chain. Nil pointer fields fall back to adapter defaults.
type RemoteLaneConfig struct {
// AllowTrafficFrom enables/disables inbound traffic from this remote chain.
// Nil uses the adapter default (typically true).
AllowTrafficFrom *bool
// ExecutorQualifier identifies the executor on the local chain for traffic
// from this remote chain. Empty uses the adapter default.
ExecutorQualifier string
// InboundCCVQualifiers are committee verifier qualifiers on the local chain
// used to verify inbound traffic from this remote chain.
InboundCCVQualifiers []string
// OutboundCCVQualifiers are committee verifier qualifiers on the local chain
// used to verify outbound traffic to this remote chain.
OutboundCCVQualifiers []string
// BaseExecutionGasCost overrides the default base execution gas cost.
BaseExecutionGasCost *uint32
// TokenReceiverAllowed overrides whether token receivers are allowed.
TokenReceiverAllowed *bool
// MessageNetworkFeeUSDCents overrides the message network fee.
MessageNetworkFeeUSDCents *uint16
// TokenNetworkFeeUSDCents overrides the token network fee.
TokenNetworkFeeUSDCents *uint16
// FamilyExtras carries chain-family-specific configuration (e.g. FeeQuoter
// overrides, executor dest chain config) that the adapter interprets.
FamilyExtras map[string]any
}

// LaneConfigOutput is the output of a lane configuration sequence.
type LaneConfigOutput struct {
// Addresses are any newly registered addresses.
Addresses []datastore.AddressRef
// BatchOps are MCMS batch operations for proposals. Empty in deployer-key mode.
BatchOps []mcmstypes.BatchOperation
}

// LaneConfigAdapter handles onchain lane configuration on a single chain.
// Implementations are chain-family-specific and registered via Registry.
//
// The adapter's ConfigureLane sequence is expected to be idempotent: re-running
// for an already-configured lane reconciles any drifted config rather than
// creating duplicate state.
type LaneConfigAdapter interface {
// ConfigureLane returns the per-family sequence that configures lanes on a
// single chain for traffic to/from the specified remote chains.
ConfigureLane() *operations.Sequence[LaneConfigInput, LaneConfigOutput, chain.BlockChains]
}
Loading
Loading