Skip to main content
Version: 1.15.0

Class: ApplyChainUpdates

Defined in: cct/solana/token-pool/operations/apply-chain-updates.ts:212

Applies the EVM applyChainUpdates equivalent as Solana instructions.

Remarks​

Chain selectors to add and remove must not contain duplicates. This preserves EVM ordering: all removals run first, then each added chain is initialized, configured with remote pools, and assigned both rate-limit configs. EVM-style replacement is supported by listing a selector in both remoteChainSelectorsToRemove and chainsToAdd; adding an existing selector without removing it fails. Updates are packed into one or more transactions, keeping each chain's initialization, configuration, and rate-limit instructions together. Batches are submitted sequentially; a later failure leaves earlier batches committed.

Extends​

  • SolanaOperation<ApplyChainUpdatesParams, UnsignedSolanaTx, ParsedApplyChainUpdatesParams>

Constructors​

Constructor​

new ApplyChainUpdates(): ApplyChainUpdates

Returns​

ApplyChainUpdates

Inherited from​

SolanaOperation< ApplyChainUpdatesParams, UnsignedSolanaTx, ParsedApplyChainUpdatesParams >.constructor

Properties​

name​

readonly name: "applyChainUpdates" = 'applyChainUpdates'

Defined in: cct/solana/token-pool/operations/apply-chain-updates.ts:217

camelCase id; matches the token-manager facade method and error context.

Overrides​

SolanaOperation.name


splitMode​

protected readonly splitMode: SolanaSplitMode = 'atomic'

Defined in: cct/solana/operation.ts:36

Multi-transaction safety policy; resource splitting requires an operation-specific audit.

Inherited from​

SolanaOperation.splitMode

Methods​

buildUnsigned()​

protected buildUnsigned(chain: SolanaChain, params: ParsedApplyChainUpdatesParams): Promise<UnsignedSolanaTx>

Defined in: cct/solana/token-pool/operations/apply-chain-updates.ts:320

Builds all instructions in contract-equivalent order as one unsigned transaction.

Parameters​

ParameterType
chainSolanaChain
paramsParsedApplyChainUpdatesParams

Returns​

Promise<UnsignedSolanaTx>

Overrides​

SolanaOperation.buildUnsigned


execute()​

execute(_chain: SolanaChain, _params: ExecuteApplyChainUpdatesParams): Promise<TransactionResult>

Defined in: cct/solana/token-pool/operations/apply-chain-updates.ts:361

Unsupported because this operation may require multiple transactions.

Parameters​

ParameterType
_chainSolanaChain
_paramsExecuteApplyChainUpdatesParams

Returns​

Promise<TransactionResult>

See​

executeBatch.

Overrides​

SolanaOperation.execute


executeBatch()​

executeBatch(chain: SolanaChain, params: ExecuteApplyChainUpdatesParams): Promise<ExecuteApplyChainUpdatesResult>

Defined in: cct/solana/token-pool/operations/apply-chain-updates.ts:369

Signs, submits, and confirms each packed transaction, returning every transaction hash.

Parameters​

ParameterType
chainSolanaChain
paramsExecuteApplyChainUpdatesParams

Returns​

Promise<ExecuteApplyChainUpdatesResult>


generate()​

generate(_chain: SolanaChain, _params: GenerateApplyChainUpdatesParams): Promise<UnsignedSolanaTx>

Defined in: cct/solana/token-pool/operations/apply-chain-updates.ts:337

Unsupported because this operation may require multiple transactions.

Parameters​

ParameterType
_chainSolanaChain
_paramsGenerateApplyChainUpdatesParams

Returns​

Promise<UnsignedSolanaTx>

See​

generateBatch.

Overrides​

SolanaOperation.generate


generateBatch()​

generateBatch(chain: SolanaChain, params: GenerateApplyChainUpdatesParams): Promise<GenerateApplyChainUpdatesResult>

Defined in: cct/solana/token-pool/operations/apply-chain-updates.ts:345

Builds one or more ordered transactions without splitting a per-chain update group.

Parameters​

ParameterType
chainSolanaChain
paramsGenerateApplyChainUpdatesParams

Returns​

Promise<GenerateApplyChainUpdatesResult>


parse()​

protected parse(params: GenerateApplyChainUpdatesParams): ParsedApplyChainUpdatesParams

Defined in: cct/solana/token-pool/operations/apply-chain-updates.ts:220

Validates the batch envelope; component operations validate each chain update.

Parameters​

ParameterType
paramsGenerateApplyChainUpdatesParams

Returns​

ParsedApplyChainUpdatesParams

Overrides​

SolanaOperation.parse


prepare()​

protected prepare(params: SolanaGenerateParams): ParsedApplyChainUpdatesParams

Defined in: cct/operation.ts:48

validate then parse — the single pre-RPC step, before any chain access.

Parameters​

ParameterType
paramsSolanaGenerateParams

Returns​

ParsedApplyChainUpdatesParams

Inherited from​

SolanaOperation.prepare


prepareWalletExecution()​

protected prepareWalletExecution(params: SolanaExecuteParams<ApplyChainUpdatesParams>): { computeUnits: number | undefined; parsed: ParsedApplyChainUpdatesParams; payer: PublicKey; wallet: Wallet; }

Defined in: cct/solana/operation.ts:47

Validates the wallet and prepares signed execution parameters with it as payer.

Parameters​

ParameterType
paramsSolanaExecuteParams<ApplyChainUpdatesParams>

Returns​

{ computeUnits: number | undefined; parsed: ParsedApplyChainUpdatesParams; payer: PublicKey; wallet: Wallet; }

computeUnits​

computeUnits: number | undefined

parsed​

parsed: ParsedApplyChainUpdatesParams

payer​

payer: PublicKey

wallet​

wallet: Wallet

Inherited from​

SolanaOperation.prepareWalletExecution


validate()​

protected validate(_params: SolanaGenerateParams): void

Defined in: cct/operation.ts:36

Reject invalid params before any chain RPC. No-op by default: an op that normalizes as it checks does that work in parse instead, and needs no empty stub here.

Parameters​

ParameterType
_paramsSolanaGenerateParams

Returns​

void

Inherited from​

SolanaOperation.validate