adapters

package
v0.0.0-...-6fd071a Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 86 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 StellarAddressNormalizer

type StellarAddressNormalizer struct{}

StellarAddressNormalizer provides the 0x-hex form the stellar datastore records for datastore-aligned lookups, mirroring EVM's EIP-55 normalizer. Stellar addresses are 32-byte contract or account IDs, carried either as C…/G… strkeys or as 0x-hex; both recorded forms normalize to the same lowercase hex so refs built from different sources compare equal.

func (StellarAddressNormalizer) BytesToString

func (StellarAddressNormalizer) BytesToString(addr []byte) (string, error)

BytesToString converts raw on-chain address bytes — a 32-byte contract or account ID — to the 0x-hex form the datastore records.

func (StellarAddressNormalizer) NormalizeAddress

func (StellarAddressNormalizer) NormalizeAddress(addr string) (string, error)

NormalizeAddress canonicalizes a stellar address in either recorded form — a contract/account strkey or 0x-hex — to the lowercase 0x-hex the datastore records.

func (StellarAddressNormalizer) StringToBytes

func (StellarAddressNormalizer) StringToBytes(addr string) ([]byte, error)

StringToBytes converts a contract/account strkey or a 0x-hex address to its raw 32 bytes.

type StellarCCVCommitteeVerifierDeployAdapter

type StellarCCVCommitteeVerifierDeployAdapter struct{}

StellarCCVCommitteeVerifierDeployAdapter implements ccvdeploymentadapters.CommitteeVerifierDeployAdapter for Stellar chains. It deploys the CommitteeVerifier AND its VersionedVerifierResolver (EVM deploys the verifier and its resolver as a pair) by reusing the existing skip-if-exists component sequences, which reconcile rather than redeploy on a re-run. The resolver run sees the verifier's refs as existing addresses, so the pair is skip-consistent across both halves.

Field mapping: StorageLocations strings pass through as bytes; FeeAggregator and AllowlistAdmin normalize to strkeys (AllowlistAdmin empty → the sequence defaults it to the owner); Qualifier "" deploys the default instance; the RMNProxy strkey is resolved from ExistingAddresses. Params.Version is ignored — the stellar deploy uses the pinned release wasm. DeployerContract has no stellar meaning (no deployer factory) and is ignored. Contracts remain owned by the deployer key (the sequence's owner default); BatchOps stays nil — Soroban deploys are EOA-only.

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

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

ApplyAllowlistUpdates updates the per-destination-chain sender allowlist. Senders are Stellar strkeys; a hex string would mint a well-formed but wrong contract ID, so validate before building the update.

func (*StellarCCVCommitteeVerifierOnchainAdapter) ApplySignatureConfigs

ApplySignatureConfigs applies the given change to the CommitteeVerifier at destChainSelector for the given committee qualifier.

func (*StellarCCVCommitteeVerifierOnchainAdapter) ScanCommitteeStates

func (*StellarCCVCommitteeVerifierOnchainAdapter) SetAllowedFinalityConfig

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

SetAllowedFinalityConfig sets the verifier-global allowed-finality config (EVM BaseVerifier.setAllowedFinalityConfig parity). The safe flag is bit 16 and the block depth the lower 16 bits; waitForFinality contributes no bits.

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) RequiresNodeChainSupportInJD

func (a *StellarCCVDeploymentExecutorConfigAdapter) RequiresNodeChainSupportInJD() bool

func (*StellarCCVDeploymentExecutorConfigAdapter) ResolveExecutorAddress

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) RequiresNodeChainSupportInJD

func (a *StellarCCVDeploymentVerifierConfigAdapter) RequiresNodeChainSupportInJD() bool

func (*StellarCCVDeploymentVerifierConfigAdapter) ResolveVerifierContractAddresses

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

type StellarCCVLaneConfigAdapter

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

StellarCCVLaneConfigAdapter implements ccvdeploymentadapters.LaneConfigAdapter for Stellar chains. It wires a single chain into one or more lanes by reusing the existing StellarConfigureChainForLanes sequence: per remote chain it configures the local OnRamp, OffRamp, FeeQuoter, Executor and Router, plus the committee verifiers' signature quorums and allowed-finality config.

Committee-verifier signature quorums are set only when the caller supplies InboundSigners on the RemoteLaneConfig; when omitted they are left untouched, owned by the incremental committee changesets. Remote chain ramps are supplied pre-resolved on the RemoteLaneConfig (the lane changeset resolves them via the remote chain's own adapter). The underlying sequence is idempotent.

One deliberate divergence from EVM's ccv LaneConfigAdapter: the remote-side defaults (FeeQuoter dest chain config, ChainFamilySelector, AddressBytesLength, RemoteChainDefaults) come from the remote chain family's adapter, matching the ccip topology changeset — the dest chain config describes the remote, so its family selector and address length are the remote family's. EVM's ccv adapter approximates them with its local family's defaults instead.

func (*StellarCCVLaneConfigAdapter) GetOffRampAddress

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

GetOffRampAddress resolves the stellar OffRamp as the raw 32-byte contract ID — destination-side addresses travel unpadded (delegates to StellarChainFamilyAdapter).

func (*StellarCCVLaneConfigAdapter) GetOnRampAddress

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

GetOnRampAddress resolves the stellar OnRamp as the 40-byte Address::to_xdr envelope it writes into the messages it sends — the exact bytes a remote OffRamp whitelists by hashing (delegates to StellarChainFamilyAdapter).

type StellarCCVProtocolContractsDeployAdapter

type StellarCCVProtocolContractsDeployAdapter struct{}

StellarCCVProtocolContractsDeployAdapter implements ccvdeploymentadapters.ProtocolContractsDeployAdapter for Stellar chains. It wraps the existing full-deploy sequence the ccip DeployChainContractsAdapter path uses (sequences.StellarDeployChainContracts), including the CCV PreDeploy topology stash it takes, so both registration paths drive the identical deploy. The full deploy deploys and initializes the whole protocol stack — RMN Remote + Proxy, RampRegistry, Router, OnRamp, OffRamp, FeeQuoter, and the default fee/policy Executor — skip-if-exists throughout.

Field mapping: DeployerContract is a placeholder on stellar (no deployer factory) and is ignored; DeployTestRouter has no stellar counterpart (no separate TestRouter exists) and is warned-and-ignored; FamilyExtras has no stellar interpretation and is warned-and-ignored; Executors may only request the default executor — the full deploy deploys exactly one, and non-default qualifiers fail fast. BatchOps stays nil: Soroban deploys are EOA-only. RefsToTransferOwnership carries the refs this run deployed or adopted, populated iff !DeployerKeyOwned, for the follow-up TransferOwnership changeset (a re-run where every contract already exists records no refs — collect the stack refs from the datastore instead when transferring after a no-op re-run).

type StellarCCVTokenPoolOnchainAdapter

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

StellarCCVTokenPoolOnchainAdapter implements ccvdeploymentadapters.TokenPoolOnchainAdapter for Stellar chains, backing the chain-agnostic RemoveRemotePool changeset. Deployer-key owned pools are reconfigured directly; the returned batch op is ExecInfo-marked and empty (dropped by the shared OutputBuilder, mirroring the ownership sequences).

func (*StellarCCVTokenPoolOnchainAdapter) RemoveRemotePool

RemoveRemotePool implements ccvdeploymentadapters.TokenPoolOnchainAdapter.

func (*StellarCCVTokenPoolOnchainAdapter) ResolveRemotePoolAddress

func (a *StellarCCVTokenPoolOnchainAdapter) ResolveRemotePoolAddress(e deployment.Environment, chainSelector uint64, tokenAddress string) ([]byte, error)

ResolveRemotePoolAddress implements ccvdeploymentadapters.TokenPoolOnchainAdapter. Resolves the token's active pool via the TokenAdminRegistry and returns its raw 32-byte contract ID — the form counterpart pools store to reference a stellar pool (left-padded to 32 bytes, the padding is the identity).

type StellarChainFamilyAdapter

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

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) GetOffRampSourceOnRamps

func (a *StellarChainFamilyAdapter) GetOffRampSourceOnRamps(
	e cldf.Environment,
	localChainSelector uint64,
	sourceChainSelector uint64,
) ([][]byte, error)

GetOffRampSourceOnRamps implements ccvadapters.OffRampSourceOnRampReader: the onramps currently whitelisted for sourceChainSelector on the local chain's OffRamp, as the source chain writes them into its messages (for a stellar source that is the 40-byte Address::to_xdr envelope). An unconfigured lane returns an empty whitelist, not an error.

func (*StellarChainFamilyAdapter) GetOnRampAddress

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

GetOnRampAddress returns the OnRamp address the way the Stellar OnRamp puts it on the wire: a full 40-byte Address::to_xdr envelope (onramp lib.rs `forward_from_router` populates the message's onramp_address with it). A destination OffRamp whitelists the onramp by hashing those exact message bytes, so the raw 32-byte contract ID would never match. Callers that need to invoke the contract decode it out via scval.ContractIDFromWireBytes.

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) SetOffRampSourceOnRamps

SetOffRampSourceOnRamps implements ccvadapters.OffRampSourceOnRampSetter: replaces the source-chain onramp whitelist on the local chain's OffRamp. Deployer-owned OffRamps are reconfigured directly; a timelock-owned OffRamp gets one MCMS proposal transaction (the invoking timelock satisfies the contract's owner require_auth). Already-matching whitelists skip.

func (*StellarChainFamilyAdapter) ValidateGasPricesForLanes

func (a *StellarChainFamilyAdapter) ValidateGasPricesForLanes(
	e cldf.Environment,
	chainSelector uint64,
	feeQuoter []byte,
	remoteChains map[uint64]ccvadapters.RemoteChainConfig[[]byte, string],
) error

ValidateGasPricesForLanes implements ccvadapters.GasPriceValidator: a read-only preflight asserting the local FeeQuoter carries a non-zero USD-per-unit-gas price for every remote lane about to be configured. A missing entry is not a local-transaction-gas concern (Soroban has no gas market) — it is the price the FeeQuoter uses to quote each remote's execution gas, and without it every quote on the lane fails. Running this before any chain is written surfaces the failure at lane-configuration time instead of at the first send; the deploy seeds one price per remote, and the offchain price updater owns them afterwards.

The lane input's USDPerUnitGas override is deliberately ignored, matching the sequence: the stellar ConfigureChainForLanes never writes prices (the updater owns them), so only the on-chain state can satisfy the check.

func (*StellarChainFamilyAdapter) ValidateNOPsTopology

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. Initialize gathers the on-chain facts the curse sequences need to route proposals: the RMN Remote / Router contract IDs (strkeys, cached per selector — they identify the deployment and do not change mid-run), and the RMN owner, curse-admin list and the RBACTimelock of every deployed MCMS stack keyed by qualifier. The governance facts are re-read on every Initialize: activation transfers RMN Remote ownership during a deployment lifecycle and apply_curse_admin_updates changes the admin list, so caching them across runs would route later runs on stale facts. The owner read is mandatory and fatal: routing (and the owner-only uncurse arm) is fail-closed on it, so an RPC failure surfaces from Initialize instead of degrading to an empty value. Direct-only deployments (no MCMS stacks) remain legitimate: missing timelocks and an unreadable admin list degrade to empty values, never an error.

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

BuildDeployContractParams implements ccvadapters.DeployChainContractsAdapter.

func (*StellarDeployChainContractsAdapter) DeployChainContracts

DeployChainContracts implements ccvadapters.DeployChainContractsAdapter.

func (*StellarDeployChainContractsAdapter) GetDefaultDeployContractParams

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

GetDefaultDeployContractParams implements ccvadapters.DeployChainContractsAdapter.

func (*StellarDeployChainContractsAdapter) ResolveDeployAddresses

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) GetOnRampRef

GetOnRampRef implements fees.FeeResolver: resolves the OnRamp serving the (src, dst) lane by reading the Router's get_onramp live, then returns the canonical OnRamp datastore ref. The shared fee changesets use the ref's version to pick the fee adapter.

func (*StellarFeeAdapter) GetOnchainDestChainConfig

func (*StellarFeeAdapter) GetOnchainTokenTransferFeeConfig

func (a *StellarFeeAdapter) GetOnchainTokenTransferFeeConfig(b cldf_ops.Bundle, chains cldf_chain.BlockChains, fq datastore.AddressRef, src uint64, dst uint64, token 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). WithdrawFeeTokens sweeps accumulated fee token balances to the configured fee aggregator on the same contracts (see stellarsequences.ApplyStellarWithdrawFeeTokens). 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 Stellar. Each role (proposer, canceller, bypasser) is its own MCMS contract; the timelock action picks which one.

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. Returns an empty ref (and no error) when the chain has no RBACTimelock in the datastore at the MCMS version — EOA lanes deploy none: callers such as token expansion resolve the timelock unconditionally and detect MCMS-less chains via the empty ref (the EVM/Solana reader contract; an empty input qualifier matches any qualifier, mirroring the shared GetAddressRef semantics). No fallback to an MCMS contract (we deploy a distinct timelock).

type StellarTokenAdapter

type StellarTokenAdapter struct{}

StellarTokenAdapter implements tokens.TokenAdapter for Stellar token pools. Pool deployment is handled by the deploy sequences below (shared TokenExpansion pipeline); pool ops (UpdateAuthorities, rate limits, TAR registration, per-remote chain updates) live in token_adapter_pool_ops.go and token_adapter_configure_transfers.go. Address/decimals resolution lets the shared ConfigureTokensForTransfers changeset 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) ConfigureTokenForTransfersSequence

ConfigureTokenForTransfersSequence configures a Stellar token pool for transfers with its remote chains (EVM ConfigureTokenForTransfers parity): per-remote chain updates with the left-padded-32 wire encoding (idempotent via read-before-write, safe alongside devenv PostConnect), rate limits for the buckets the input provides, and the TokenAdminRegistry registration unless suppressed. Two arms are unsupported on this adapter and error loudly when used (documented in the parity doc): per-remote CCV lists and pool-level token transfer fee configs.

func (*StellarTokenAdapter) DeployToken

DeployToken deploys a BnM Soroban token for a shared-pipeline pair and pre-mints the deployer allocation. The pre-mint goes through mint_as before any pool exists: the deployer is still MINTERS[0] right after initialize (DeployTokenPoolForToken hands mint authority to the pool afterwards), so no secondary-minter setup is needed — the adapter's equivalent of the EVM constructor pre-mint.

func (*StellarTokenAdapter) DeployTokenPoolForToken

DeployTokenPoolForToken deploys a stellar burn-mint pool for the token the shared pipeline deployed for the pair: deploy the pool, hand the token's mint authority to it via set_admin, initialize it against the core CCIP stack (Router/RampRegistry/RMN proxy resolved from the pipeline datastore), and register the token↔pool link in the TokenAdminRegistry.

func (*StellarTokenAdapter) DeployTokenVerify

DeployTokenVerify validates a shared-pipeline BnM token deploy (EVM parity): only the inputs are checked — the framework runs verify before the deploy that creates the BnmToken row, so a missing row must not fail. The deploy sequence is idempotent on the row (qualifier = symbol).

func (*StellarTokenAdapter) DeriveTokenAddress

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

DeriveTokenAddress resolves the token a Stellar pool wraps for cross-family config. EVM parity: the pool contract itself is authoritative — its wrapped token is read on chain — with the qualified BnmToken row (the pipeline convention: one BnM token per pool, keyed by the pool's qualifier) as the fallback; the bespoke lock-release pools wrap the single SAC test token.

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)

func (*StellarTokenAdapter) GetDefaultTokenTransferFeeConfig

func (a *StellarTokenAdapter) GetDefaultTokenTransferFeeConfig(src uint64, dst uint64) tokens.TokenTransferFeeConfig

GetDefaultTokenTransferFeeConfig implements tokens.TokenFeeAdapter.

func (*StellarTokenAdapter) GetOnchainRateLimits

func (a *StellarTokenAdapter) GetOnchainRateLimits(
	b cldf_ops.Bundle,
	chains cldf_chain.BlockChains,
	_ datastore.DataStore,
	chainSelector uint64,
	poolRef datastore.AddressRef,
	_ datastore.AddressRef,
	remoteSelector uint64,
	fastFinality bool,
) (tokens.OnchainRateLimits, error)

GetOnchainRateLimits implements tokens.RateLimitReaderAdapter: reads the pool's current outbound and inbound rate-limiter buckets for one remote lane and finality bucket. Used by the outbound-only arm of SetTokenPoolRateLimits to pass the current inbound through unchanged (the stellar setter is atomic over both directions), and to validate a counterpart's inbound against a new outbound. TokenRef is ignored: a stellar pool address alone identifies the lane config. An unconfigured lane reads as the contract's default zero-value buckets with no error.

func (*StellarTokenAdapter) GetOnchainTokenTransferFeeConfig

func (a *StellarTokenAdapter) GetOnchainTokenTransferFeeConfig(e deployment.Environment, poolAddress string, src uint64, dst uint64) (tokens.TokenTransferFeeConfig, error)

GetOnchainTokenTransferFeeConfig implements tokens.TokenFeeAdapter: reads the pool's per-remote token transfer fee config (the pool's own get_token_transfer_fee_config, which fronts the fee machinery the same way EVM v2 pools front the FeeQuoter).

func (*StellarTokenAdapter) GetRemotePools

func (a *StellarTokenAdapter) GetRemotePools(e deployment.Environment, chainSelector uint64, poolAddr, _ []byte, remoteSelector uint64) ([][]byte, error)

GetRemotePools implements tokens.TokenPoolMigrator: the remote pool entries the pool stores for one remote chain, as stored (raw or left-padded-32 wire forms). tokenAddr is ignored: a stellar pool contract alone identifies its remote-chain config.

func (*StellarTokenAdapter) GetRemoteToken

func (a *StellarTokenAdapter) GetRemoteToken(e deployment.Environment, chainSelector uint64, poolAddr, _ []byte, remoteSelector uint64) ([]byte, error)

GetRemoteToken implements tokens.TokenPoolMigrator: the remote token bytes the pool stores for one remote chain, as stored (the remote family's native form). tokenAddr is ignored: a stellar pool contract alone identifies its remote-chain config.

func (*StellarTokenAdapter) GetSupportedChains

func (a *StellarTokenAdapter) GetSupportedChains(e deployment.Environment, chainSelector uint64, poolAddr, _ []byte) ([]uint64, error)

GetSupportedChains implements tokens.TokenPoolMigrator. The pool has no supported-chains enumeration entrypoint (is_supported_chain answers per remote chain), so every other chain in the environment is probed — the same probing approach the committee-verifier scan takes. tokenAddr is ignored: a stellar pool contract alone identifies its remote-chain config.

func (*StellarTokenAdapter) IsPoolExternallyOwned

func (a *StellarTokenAdapter) IsPoolExternallyOwned(e cldf.Environment, chainSelector uint64, poolRef datastore.AddressRef, _ datastore.AddressRef) (bool, error)

IsPoolExternallyOwned implements tokens.TokenPoolOwnershipChecker: the pool is externally owned when its on-chain owner is neither the chain's CLL timelock (EOA lanes deploy none) nor the chain deployer. tokenRef is ignored — a stellar pool contract alone identifies the pool (EVM parity). A failed owner read is an error and must be treated as fatal by the caller, never a skip.

func (*StellarTokenAdapter) ManualRegistration

ManualRegistration registers a token and its pool in the TokenAdminRegistry (EVM ManualRegistration parity). Divergence (documented in the parity doc): EVM hands the token admin role to ProposedOwner; Stellar's SAC admin controls minting and must stay with the pool on BnM tokens, so the SAC mint-authority handoff is deliberately not performed.

func (*StellarTokenAdapter) RemoveRemotePools

RemoveRemotePools implements tokens.RemotePoolRemover: each requested remote pool is matched against the pool's current on-chain list and removed by its exact stored bytes; a remote pool that is not currently configured is skipped with a warning so re-runs are idempotent. The input carries no datastore, so routing follows setTokenPoolDynamicConfig: a deployer-owned pool executes the removals directly, any other owner gets one MCMS proposal transaction per removal, which the owning timelock must execute.

func (*StellarTokenAdapter) SetAllowedFinalityConfig

SetAllowedFinalityConfig implements tokens.TokenFeeAdapter: sets the allowed-finality config on one or more pools, keyed by the pool's address in either recorded form. The Settings map is keyed by the pool counterpart address the changeset derives, so the full pool ref (and its type) is recovered from the datastore by address.

func (*StellarTokenAdapter) SetTokenPoolDynamicConfig

SetTokenPoolDynamicConfig implements tokens.TokenPoolDynamicConfigAdapter: sets the pool's router, rate-limit admin, and fee admin. EVM applies all three through one setDynamicConfig call; the Soroban pool exposes three separate owner-only entrypoints, so each changed field is applied on its own and an unchanged field emits no write (read-before-write). TokenRef is ignored: a stellar pool address alone identifies the pool.

Routing: a deployer-owned pool is reconfigured directly; any other owner gets one MCMS proposal transaction per changed field, which the owning timelock must execute (the proposal is targeted from the MCMS qualifier by the shared changeset; the input carries no datastore to verify the owner against a deployed timelock here).

func (*StellarTokenAdapter) SetTokenPoolRateLimits

SetTokenPoolRateLimits sets rate limits (and the optional allowed finality config) on a Stellar token pool for one remote chain, applying every finality bucket as a separate call (EVM v2 parity).

func (*StellarTokenAdapter) SetTokenTransferFee

SetTokenTransferFee implements tokens.TokenFeeAdapter: sets per-remote token transfer fee configs on one or more pools. A nil or disabled fee config for a remote disables the pool's override for it (EVM parity). The pool's apply_token_fee_config_updates is owner-only on chain, so the same deployer-direct vs CLL-timelock-proposal routing as the finality arm applies.

func (*StellarTokenAdapter) UpdateAuthorities

UpdateAuthorities transfers ownership of the pool — plus per-type lockboxes and the optional AdvancedPoolHooks — to the CLL timelock, mirroring EVM TokenAdapter.UpdateAuthorities: ref collection per pool type, then the transfer + accept ownership sequences.

type StellarTokenAdminRegistryManager

type StellarTokenAdminRegistryManager struct{}

StellarTokenAdminRegistryManager implements tokens.TokenAdminRegistryManager (reader + writer) for Stellar chains: reads the pool a token's registry entry points at, and unregisters a token by clearing that entry (set_pool with the None option, the on-chain delist convention — EVM uses the zero address, Solana the zero pubkey).

func (*StellarTokenAdminRegistryManager) GetActivePool

func (m *StellarTokenAdminRegistryManager) GetActivePool(e deployment.Environment, chainSelector uint64, tokenRef datastore.AddressRef, overrides ...datastore.AddressRef) ([]byte, error)

GetActivePool returns the pool currently registered for tokenRef as raw 32 bytes — the same form StellarTokenAdapter.AddressRefToBytes returns for the resolved pool ref, so callers compare chain-agnostically with bytes.Equal. A token with no registry entry or no pool set is empty bytes with no error; any other read failure is an error, never empty bytes.

func (*StellarTokenAdminRegistryManager) GetTokenAdminRegistryRef

func (m *StellarTokenAdminRegistryManager) GetTokenAdminRegistryRef(e deployment.Environment, chainSelector uint64) (datastore.AddressRef, error)

GetTokenAdminRegistryRef resolves the TokenAdminRegistry ref for the chain from the datastore.

func (*StellarTokenAdminRegistryManager) UnregisterToken

UnregisterToken clears the token's registry pool (set_pool with the None option). The unregister is unconditional w.r.t. the current pool — the caller owns the read-check guard (tokens.TokenAdminRegistryWriter).

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