adapters

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 51 Imported by: 0

Documentation

Overview

Package adapters registers Stellar with chainlink-ccip CCIP 2.0 tooling, with chainlink-ccv/deployment (per-concern FamilyRegistry singletons plus the shared JD identity plumbing), and with shared infrastructure (MCMS, transfer ownership, tokens, fees, curse).

Devenv-only hooks under chainlink-ccv/build/devenv (chain config loader, verifier/executor modifiers, ImplFactory, ExecutorInfo, CLDF provider, extra-args serializers) are not registered here; they live in ccv/chain/register.go and run when RegisterStellarDevenvComponents is called. See the package doc there for the full split. The ccvchain package blank-imports this package so its init runs as soon as ccvchain loads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StellarCCVCommitteeVerifierOnchainAdapter

type StellarCCVCommitteeVerifierOnchainAdapter struct{}

StellarCCVCommitteeVerifierOnchainAdapter implements chainlink-ccv/deployment/adapters.CommitteeVerifierOnchainAdapter for Stellar (Soroban committee_verifier), wiring GenerateAggregatorConfig and threshold changesets to the same on-chain reads/writes as the EVM adapter.

func (*StellarCCVCommitteeVerifierOnchainAdapter) ApplyAllowlistUpdates added in v0.0.7

func (a *StellarCCVCommitteeVerifierOnchainAdapter) ApplyAllowlistUpdates(
	ctx context.Context,
	env deployment.Environment,
	chainSelector uint64,
	qualifier string,
	destChainSelector uint64,
	allowlistEnabled bool,
	addedSenders []string,
	removedSenders []string,
) error

ApplyAllowlistUpdates updates the per-destination-chain sender allowlist on the Soroban committee_verifier.

Senders are Stellar strkeys (C… contract or G… account), not EVM hex: AllowListUpdate serializes them via scval.AddressSliceToScVal. Validate up front rather than letting a hex string through — HexToContractStrkey would happily mint a well-formed but wrong contract ID.

func (*StellarCCVCommitteeVerifierOnchainAdapter) ApplySignatureConfigs

func (a *StellarCCVCommitteeVerifierOnchainAdapter) ApplySignatureConfigs(
	ctx context.Context,
	env deployment.Environment,
	destChainSelector uint64,
	qualifier string,
	change ccvdeploymentadapters.SignatureConfigChange,
) error

func (*StellarCCVCommitteeVerifierOnchainAdapter) ScanCommitteeStates

func (*StellarCCVCommitteeVerifierOnchainAdapter) SetAllowedFinalityConfig added in v0.0.7

func (a *StellarCCVCommitteeVerifierOnchainAdapter) SetAllowedFinalityConfig(
	ctx context.Context,
	env deployment.Environment,
	chainSelector uint64,
	qualifier string,
	waitForFinality bool,
	waitForSafe bool,
	blockDepth uint16,
) error

SetAllowedFinalityConfig is a no-op for Stellar.

The Soroban committee_verifier has no allowed-finality gate — set_allowed_finality_config exists only on the token pools (contracts/common/pool), and the verifier stores no finality state. Stellar ledgers are final on close, so every requested finality level is already accepted and the caller's request is already satisfied; recording that as a no-op is accurate, and returning an error instead would block mixed-family SetAllowedFinalityConfig runs for no on-chain benefit.

If the contract ever gains set_allowed_finality_config, wire it here.

type StellarCCVDeploymentAggregatorConfigAdapter

type StellarCCVDeploymentAggregatorConfigAdapter struct{}

StellarCCVDeploymentAggregatorConfigAdapter implements github.com/smartcontractkit/chainlink-ccv/deployment/adapters.AggregatorConfigAdapter for the devenv (datastore-only verifier address resolution). On-chain committee state for GenerateAggregatorConfig lives on StellarCCVCommitteeVerifierOnchainAdapter.

func (*StellarCCVDeploymentAggregatorConfigAdapter) GetDeployedChains

func (a *StellarCCVDeploymentAggregatorConfigAdapter) GetDeployedChains(ds datastore.DataStore, qualifier string) []uint64

func (*StellarCCVDeploymentAggregatorConfigAdapter) ResolveDestinationVerifierAddress

func (a *StellarCCVDeploymentAggregatorConfigAdapter) ResolveDestinationVerifierAddress(
	ds datastore.DataStore,
	chainSelector uint64,
	qualifier string,
) (string, error)

func (*StellarCCVDeploymentAggregatorConfigAdapter) ResolveSourceVerifierAddress

func (a *StellarCCVDeploymentAggregatorConfigAdapter) ResolveSourceVerifierAddress(
	ds datastore.DataStore,
	chainSelector uint64,
	qualifier string,
) (string, error)

type StellarCCVDeploymentExecutorConfigAdapter

type StellarCCVDeploymentExecutorConfigAdapter struct{}

StellarCCVDeploymentExecutorConfigAdapter implements github.com/smartcontractkit/chainlink-ccv/deployment/adapters.ExecutorConfigAdapter.

func (*StellarCCVDeploymentExecutorConfigAdapter) BuildChainConfig

func (a *StellarCCVDeploymentExecutorConfigAdapter) BuildChainConfig(
	ds datastore.DataStore,
	chainSelector uint64,
	qualifier string,
) (executor.ChainConfiguration, error)

func (*StellarCCVDeploymentExecutorConfigAdapter) GetDeployedChains

func (a *StellarCCVDeploymentExecutorConfigAdapter) GetDeployedChains(ds datastore.DataStore, qualifier string) []uint64

func (*StellarCCVDeploymentExecutorConfigAdapter) ResolveExecutorAddress added in v0.0.7

func (a *StellarCCVDeploymentExecutorConfigAdapter) ResolveExecutorAddress(
	ds datastore.DataStore,
	chainSelector uint64,
	qualifier string,
) (string, error)

ResolveExecutorAddress is the single source of truth for the Stellar executor address: BuildChainConfig uses it for DefaultExecutorAddress, and the committee verifier changeset uses it as the executor on-ramp address. Stellar keeps its existing ExecutorProxy datastore type — the adapter API no longer prescribes a contract-type name, but changing the recorded type would orphan every existing ref.

type StellarCCVDeploymentIndexerConfigAdapter

type StellarCCVDeploymentIndexerConfigAdapter struct{}

StellarCCVDeploymentIndexerConfigAdapter implements github.com/smartcontractkit/chainlink-ccv/deployment/adapters.IndexerConfigAdapter.

func (*StellarCCVDeploymentIndexerConfigAdapter) ResolveVerifierAddresses

func (a *StellarCCVDeploymentIndexerConfigAdapter) ResolveVerifierAddresses(
	ds datastore.DataStore,
	chainSelector uint64,
	qualifier string,
	kind ccvdeploymentadapters.VerifierKind,
) ([]string, error)

type StellarCCVDeploymentTokenVerifierConfigAdapter

type StellarCCVDeploymentTokenVerifierConfigAdapter struct{}

StellarCCVDeploymentTokenVerifierConfigAdapter implements github.com/smartcontractkit/chainlink-ccv/deployment/adapters.TokenVerifierConfigAdapter.

func (*StellarCCVDeploymentTokenVerifierConfigAdapter) ResolveTokenVerifierAddresses

type StellarCCVDeploymentVerifierConfigAdapter

type StellarCCVDeploymentVerifierConfigAdapter struct{}

StellarCCVDeploymentVerifierConfigAdapter implements github.com/smartcontractkit/chainlink-ccv/deployment/adapters.VerifierConfigAdapter.

func (*StellarCCVDeploymentVerifierConfigAdapter) GetSignerAddressFamily

func (a *StellarCCVDeploymentVerifierConfigAdapter) GetSignerAddressFamily() string

func (*StellarCCVDeploymentVerifierConfigAdapter) ResolveVerifierContractAddresses

func (a *StellarCCVDeploymentVerifierConfigAdapter) ResolveVerifierContractAddresses(
	ds datastore.DataStore,
	chainSelector uint64,
	committeeQualifier string,
	_ string,
) (*ccvdeploymentadapters.VerifierContractAddresses, error)

type StellarChainFamilyAdapter

type StellarChainFamilyAdapter struct{}

StellarChainFamilyAdapter implements ccvadapters.ChainFamily for CCIP 2.0. Stellar does not register deployment/lanes.LaneAdapter: lane wiring is done via DeployContractsForSelector / ConfigureChainsForLanesFromTopology; the ConfigureChainForLanes hook applies committee verifier signature quorums (sequences.StellarConfigureChainForLanes). Legacy lanes.ConnectChains is unsupported for Stellar unless a LaneAdapter is reintroduced.

func (*StellarChainFamilyAdapter) AddressRefToBytes

func (a *StellarChainFamilyAdapter) AddressRefToBytes(ref datastore.AddressRef) ([]byte, error)

func (*StellarChainFamilyAdapter) GetAddressBytesLength

func (a *StellarChainFamilyAdapter) GetAddressBytesLength() uint8

func (*StellarChainFamilyAdapter) GetChainFamilySelector

func (a *StellarChainFamilyAdapter) GetChainFamilySelector() [4]byte

func (*StellarChainFamilyAdapter) GetDefaultCommitteeVerifierRemoteChainConfig

func (a *StellarChainFamilyAdapter) GetDefaultCommitteeVerifierRemoteChainConfig() ccvadapters.CommitteeVerifierRemoteChainDefaults

func (*StellarChainFamilyAdapter) GetDefaultFeeQuoterDestChainConfig

func (a *StellarChainFamilyAdapter) GetDefaultFeeQuoterDestChainConfig(
	_, _ uint64, chainFamilySelector [4]byte,
) ccvadapters.FeeQuoterDestChainConfigOverrides

func (*StellarChainFamilyAdapter) GetDefaultFinalityConfig

func (a *StellarChainFamilyAdapter) GetDefaultFinalityConfig() finality.Config

func (*StellarChainFamilyAdapter) GetDefaultGasPrice

func (a *StellarChainFamilyAdapter) GetDefaultGasPrice() *big.Int

func (*StellarChainFamilyAdapter) GetDefaultRemoteChainConfig

func (a *StellarChainFamilyAdapter) GetDefaultRemoteChainConfig(_, _ uint64) ccvadapters.RemoteChainDefaults

func (*StellarChainFamilyAdapter) GetFQAddress

func (a *StellarChainFamilyAdapter) GetFQAddress(ds datastore.DataStore, chainSelector uint64) ([]byte, error)

func (*StellarChainFamilyAdapter) GetFeeQuoterDestChainConfig

func (a *StellarChainFamilyAdapter) GetFeeQuoterDestChainConfig() lanes.FeeQuoterDestChainConfig

GetFeeQuoterDestChainConfig returns defaults for the legacy lanes package (e.g. connection profile helpers).

func (*StellarChainFamilyAdapter) GetOffRampAddress

func (a *StellarChainFamilyAdapter) GetOffRampAddress(ds datastore.DataStore, chainSelector uint64) ([]byte, error)

func (*StellarChainFamilyAdapter) GetOnRampAddress

func (a *StellarChainFamilyAdapter) GetOnRampAddress(ds datastore.DataStore, chainSelector uint64) ([]byte, error)

func (*StellarChainFamilyAdapter) GetRouterAddress

func (a *StellarChainFamilyAdapter) GetRouterAddress(ds datastore.DataStore, chainSelector uint64) ([]byte, error)

func (*StellarChainFamilyAdapter) GetTestRouter

func (a *StellarChainFamilyAdapter) GetTestRouter(ds datastore.DataStore, chainSelector uint64) ([]byte, error)

func (*StellarChainFamilyAdapter) ResolveExecutor

func (a *StellarChainFamilyAdapter) ResolveExecutor(ds datastore.DataStore, chainSelector uint64, qualifier string) (string, error)

func (*StellarChainFamilyAdapter) ValidateNOPsTopology added in v0.0.7

func (a *StellarChainFamilyAdapter) ValidateNOPsTopology(_ string, _ int) error

ValidateNOPsTopology accepts any NOP count for Stellar.

The EVM adapter enforces a production floor (minProductionChainNOPs). Stellar has no such requirement agreed yet, and the devenv runs far fewer NOPs than EVM's floor, so copying that constant would fail every local and CI environment. Revisit when Stellar has a production committee-size policy.

type StellarCommitteeVerifierContractAdapter

type StellarCommitteeVerifierContractAdapter struct{}

func (*StellarCommitteeVerifierContractAdapter) GetCommitteeVerifierResolver

func (a *StellarCommitteeVerifierContractAdapter) GetCommitteeVerifierResolver(
	ds datastore.DataStore,
	chainSelector uint64,
	qualifier string,
) ([]datastore.AddressRef, error)

func (*StellarCommitteeVerifierContractAdapter) ResolveCommitteeVerifierContracts

func (a *StellarCommitteeVerifierContractAdapter) ResolveCommitteeVerifierContracts(
	ds datastore.DataStore,
	chainSelector uint64,
	qualifier string,
) ([]datastore.AddressRef, error)

type StellarCurseAdapter

type StellarCurseAdapter struct {
	// contains filtered or unexported fields
}

StellarCurseAdapter implements both CurseAdapter and CurseSubjectAdapter for Stellar.

func NewStellarCurseAdapter

func NewStellarCurseAdapter() *StellarCurseAdapter

func (*StellarCurseAdapter) DeriveCurseAdapterVersion

func (a *StellarCurseAdapter) DeriveCurseAdapterVersion(_ cldf.Environment, _ uint64) (*semver.Version, error)

func (*StellarCurseAdapter) Initialize

func (a *StellarCurseAdapter) Initialize(e cldf.Environment, selector uint64) error

func (*StellarCurseAdapter) IsChainConnectedToTargetChain

func (a *StellarCurseAdapter) IsChainConnectedToTargetChain(e cldf.Environment, selector uint64, targetSel uint64) (bool, error)

func (*StellarCurseAdapter) IsCurseEnabledForChain

func (a *StellarCurseAdapter) IsCurseEnabledForChain(_ cldf.Environment, selector uint64) (bool, error)

func (*StellarCurseAdapter) IsSubjectCursedOnChain

func (a *StellarCurseAdapter) IsSubjectCursedOnChain(e cldf.Environment, selector uint64, subject api.Subject) (bool, error)

func (*StellarCurseAdapter) ListConnectedChains

func (a *StellarCurseAdapter) ListConnectedChains(e cldf.Environment, selector uint64) ([]uint64, error)

func (*StellarCurseAdapter) SelectorToSubject

func (a *StellarCurseAdapter) SelectorToSubject(selector uint64) api.Subject

func (*StellarCurseAdapter) SubjectToSelector

func (a *StellarCurseAdapter) SubjectToSelector(subject api.Subject) (uint64, error)

type StellarDeployChainContractsAdapter

type StellarDeployChainContractsAdapter struct{}

StellarDeployChainContractsAdapter connects Stellar to the shared deployment/v2_0_0 DeployChainContracts changeset.

The Stellar deploy sequence derives its on-chain contract parameters from the offchain topology stashed during CCV PreDeployContractsForSelector (see sequences.StellarDeployChainContracts), so DeployContractParams and DeployerContract are threaded through for changeset parity but not consumed by the deploy itself.

func (*StellarDeployChainContractsAdapter) BuildDeployContractParams added in v0.0.7

BuildDeployContractParams implements ccvadapters.DeployChainContractsAdapter.

func (*StellarDeployChainContractsAdapter) DeployChainContracts

DeployChainContracts implements ccvadapters.DeployChainContractsAdapter.

func (*StellarDeployChainContractsAdapter) GetDefaultDeployContractParams added in v0.0.7

func (a *StellarDeployChainContractsAdapter) GetDefaultDeployContractParams(_ uint64) ccvadapters.DeployContractParams

GetDefaultDeployContractParams implements ccvadapters.DeployChainContractsAdapter.

func (*StellarDeployChainContractsAdapter) ResolveDeployAddresses added in v0.0.7

ResolveDeployAddresses implements ccvadapters.DeployChainContractsAdapter. Soroban has no CREATE2-style deployer factory to resolve; this only validates the chain is present in the environment.

type StellarFeeAdapter

type StellarFeeAdapter struct{}

StellarFeeAdapter implements fees.FeeAdapter for the Stellar FeeQuoter.

func (*StellarFeeAdapter) GetDefaultDestChainConfig

func (a *StellarFeeAdapter) GetDefaultDestChainConfig(_, _ uint64) lanes.FeeQuoterDestChainConfig

func (*StellarFeeAdapter) GetDefaultTokenTransferFeeConfig

func (a *StellarFeeAdapter) GetDefaultTokenTransferFeeConfig(_, _ uint64) fees.TokenTransferFeeArgs

func (*StellarFeeAdapter) GetFeeContractRef

func (*StellarFeeAdapter) GetOnchainDestChainConfig

func (*StellarFeeAdapter) GetOnchainTokenTransferFeeConfig

func (a *StellarFeeAdapter) GetOnchainTokenTransferFeeConfig(_ cldf_ops.Bundle, _ cldf_chain.BlockChains, fq datastore.AddressRef, _ uint64, _ uint64, _ string) (fees.TokenTransferFeeArgs, error)

func (*StellarFeeAdapter) Validate

Validate validates the FeeQuoter address reference for Stellar. Stellar contract IDs should be 32 bytes when decoded from hex.

type StellarFeeAggregatorAdapter

type StellarFeeAggregatorAdapter struct{}

StellarFeeAggregatorAdapter implements fees.FeeAggregatorAdapter. SetFeeAggregator updates OnRamp dynamic config, VVR, and CommitteeVerifier (see stellarsequences.ApplyStellarFeeAggregator). GetFeeAggregator reads the canonical value from the Versioned Verifier Resolver.

func (*StellarFeeAggregatorAdapter) GetFeeAggregator

func (a *StellarFeeAggregatorAdapter) GetFeeAggregator(e cldf.Environment, chainSelector uint64) (string, error)

type StellarMCMSDeployer

type StellarMCMSDeployer struct{}

StellarMCMSDeployer implements deploy.Deployer MCMS-related methods for Soroban. DeployChainContracts and SetOCR3Config are nil (CCIP 2.0 uses DeployChainContractsAdapter).

type StellarMCMSReader

type StellarMCMSReader struct{}

StellarMCMSReader implements changesets.MCMSReader for a single Soroban MCMS contract (proposer/bypasser/canceller share one on-chain instance; datastore may hold alias refs).

func (StellarMCMSReader) GetChainMetadata

func (StellarMCMSReader) GetChainMetadata(e cldf.Environment, chainSelector uint64, input mcmsutils.Input) (mcmstypes.ChainMetadata, error)

GetChainMetadata implements changesets.MCMSReader.

func (StellarMCMSReader) GetMCMSRef

GetMCMSRef implements changesets.MCMSReader.

func (StellarMCMSReader) GetTimelockRef

func (StellarMCMSReader) GetTimelockRef(e cldf.Environment, chainSelector uint64, input mcmsutils.Input) (frameworkdatastore.AddressRef, error)

GetTimelockRef implements changesets.MCMSReader. Prefers RBACTimelock in the datastore; falls back to the MCMS contract id for legacy deployments.

type StellarTokenAdapter

type StellarTokenAdapter struct{}

StellarTokenAdapter implements tokens.TokenAdapter for Stellar token pools. Pool deployment and TAR registration are handled by the Stellar deploy pipeline (PostDeployContractsForSelector), so most sequences are no-ops. The adapter's primary role is to provide address encoding so that the shared ConfigureTokensForTransfers changeset can resolve Stellar pool/token addresses when configuring EVM pools with Stellar remotes.

func (*StellarTokenAdapter) AddressRefToBytes

func (a *StellarTokenAdapter) AddressRefToBytes(ref datastore.AddressRef) ([]byte, error)

func (*StellarTokenAdapter) DeployTokenVerify

func (*StellarTokenAdapter) DeriveTokenAddress

func (a *StellarTokenAdapter) DeriveTokenAddress(e deployment.Environment, chainSelector uint64, poolRef datastore.AddressRef) (string, error)

func (*StellarTokenAdapter) DeriveTokenDecimals

func (a *StellarTokenAdapter) DeriveTokenDecimals(_ deployment.Environment, _ uint64, _ datastore.AddressRef, _ []byte) (uint8, error)

func (*StellarTokenAdapter) DeriveTokenPoolCounterpart

func (a *StellarTokenAdapter) DeriveTokenPoolCounterpart(_ deployment.Environment, _ uint64, tokenPool []byte, _ []byte) ([]byte, error)

type StellarTransferOwnershipAdapter

type StellarTransferOwnershipAdapter struct {
	// contains filtered or unexported fields
}

StellarTransferOwnershipAdapter builds MCMS batch operations (or executes directly when the deployer account is still owner). Wiring matches EVM OpTransferOwnership / OpAcceptOwnership: the datastore timelock (governance) address gates the MCMS-batch path; MCMS contract address is not required to equal timelock.

func (*StellarTransferOwnershipAdapter) InitializeTimelockAddress

func (a *StellarTransferOwnershipAdapter) InitializeTimelockAddress(e cldf.Environment, input mcms.Input) error

InitializeTimelockAddress caches the RBAC timelock (governance) address per chain from the datastore — same responsibility as the EVM adapter’s timelock cache.

func (*StellarTransferOwnershipAdapter) ShouldAcceptOwnershipWithTransferOwnership

func (a *StellarTransferOwnershipAdapter) ShouldAcceptOwnershipWithTransferOwnership(e cldf.Environment, in deploy.TransferOwnershipPerChainInput) (bool, error)

ShouldAcceptOwnershipWithTransferOwnership matches EVM: run accept when ProposedOwner is the timelock (governance) or the deployer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL