Skip to main content
Version: 1.11.1

Class: EVMChain

Defined in: evm/index.ts:320

EVM chain implementation supporting Ethereum-compatible networks.

Provides methods for sending CCIP cross-chain messages, querying message status, fetching fee quotes, and manually executing pending messages on Ethereum Virtual Machine compatible chains.

Examples

Create from RPC URL

TypeScript
import { EVMChain } from '@chainlink/ccip-sdk'

const chain = await EVMChain.fromUrl('https://rpc.sepolia.org')
console.log(`Connected to: ${chain.network.name}`)

Query messages in a transaction

TypeScript
const requests = await chain.getMessagesInTx('0xabc123...')
for (const req of requests) {
console.log(`Message ID: ${req.message.messageId}`)
}

Extends

Indexable

[key: symbol]: () => string

Constructors

Constructor

new EVMChain(provider: JsonRpcApiProvider, network: NetworkInfo, ctx?: ChainContext): EVMChain

Defined in: evm/index.ts:341

Creates a new EVMChain instance.

Parameters

ParameterTypeDescription
providerJsonRpcApiProviderJSON-RPC provider for the EVM network.
networkNetworkInfoNetwork information for this chain.
ctx?ChainContext-

Returns

EVMChain

Overrides

Chain<typeof ChainFamily.EVM>.constructor

Properties

abort

readonly abort: AbortSignal

Defined in: chain.ts:728

Abort signal from ChainContext; fires when the chain should tear down.

Inherited from

Chain.abort


apiClient

readonly apiClient: CCIPAPIClient | null

Defined in: chain.ts:724

CCIP API client (null if opted out)

Inherited from

Chain.apiClient


apiRetryConfig

readonly apiRetryConfig: Required<ApiRetryConfig> | null

Defined in: chain.ts:726

Retry configuration for API fallback operations (null if API client is disabled)

Inherited from

Chain.apiRetryConfig


destroy

destroy: (reason?: unknown) => void

Defined in: chain.ts:767

Cleanup method to release resources (e.g., close connections).

Parameters

ParameterType
reason?unknown

Returns

void

Inherited from

Chain.destroy


logger

logger: Logger

Defined in: chain.ts:722

Inherited from

Chain.logger


network

readonly network: NetworkInfo<"EVM">

Defined in: chain.ts:721

Inherited from

Chain.network


nonces

nonces: Record<string, number>

Defined in: evm/index.ts:334

Cache of current nonces per wallet address. Used internally by sendMessage and execute to manage transaction ordering. Can be inspected for debugging or manually adjusted if needed.


provider

provider: JsonRpcApiProvider

Defined in: evm/index.ts:327


decimals

readonly static decimals: 18 = 18

Defined in: evm/index.ts:325


family

readonly static family: "EVM" = ChainFamily.EVM

Defined in: evm/index.ts:324

Methods

_getFeeQuoterDest()

_getFeeQuoterDest(feeQuoter: string, destChainSelector: bigint): Promise<{ destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }>

Defined in: evm/index.ts:854

Fetch FeeQuoter dest state for a given contract and remote chainSelector

Parameters

ParameterType
feeQuoterstring
destChainSelectorbigint

Returns

Promise<{ destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }>


_getSomeOnRampFor()

_getSomeOnRampFor(address: string, destChainSelector?: bigint): Promise<string>

Defined in: evm/index.ts:1203

Gets any available OnRamp for the given router.

Parameters

ParameterTypeDescription
addressstringRouter or OnRamp contract address.
destChainSelector?bigint-

Returns

Promise<string>

OnRamp contract address.


checkExecute()

checkExecute(opts: { message: Pick<{ accountIsWritableBitmap?: bigint; accounts?: string[]; data?: BytesLike; finality?: FinalityRequested; messageId?: string; offchainTokenData?: readonly OffchainTokenData[]; offRampAddress?: string; onRampAddress?: string; receiver: string; sender?: string; sourceChainSelector: bigint; tokenAmounts?: readonly { amount: bigint; extraData?: string; } & { token: string; } | { destTokenAddress: string; sourcePoolAddress: string; sourceTokenAddress?: string; tokenReceiver?: string; }[]; tokenArgs?: string; tokenReceiver?: string; }, "finality" | "sourceChainSelector" | "tokenAmounts"> & Partial<Pick<{ accountIsWritableBitmap?: bigint; accounts?: string[]; data?: BytesLike; finality?: FinalityRequested; messageId?: string; offchainTokenData?: readonly OffchainTokenData[]; offRampAddress?: string; onRampAddress?: string; receiver: string; sender?: string; sourceChainSelector: bigint; tokenAmounts?: readonly { amount: bigint; extraData?: string; } & { token: string; } | { destTokenAddress: string; sourcePoolAddress: string; sourceTokenAddress?: ... | ...; tokenReceiver?: ... | ...; }[]; tokenArgs?: string; tokenReceiver?: string; }, "offchainTokenData" | "onRampAddress" | "receiver" | "sender" | "tokenReceiver">>; offRamp: string; }): Promise<true>

Defined in: evm/index.ts:2575

Pre-flight check that the token transfers in a message can execute on this (destination) chain: a simulation of each destination pool's releaseOrMint (eth_call with from set to the registered OffRamp; the registry-registered pool is the OffRamp's own callee, so proxy pools — e.g. USDCTokenPoolProxy — are entered exactly like a real execution and forward to their authorized-caller-gated children themselves). The pool runs its full _validateReleaseOrMint before releasing, so this single simulation covers token support, the inbound rate limit, RMN curses, source-pool wiring, mint/burn authority and liquidity (see simulateReleaseOrMint). If the simulation reverts the message would strand on the destination, so the send is blocked: a recognized revert becomes a specific typed error and an unrecognized one becomes CCIPDestExecutionRevertError. Two cases are neither pass nor block, surfaced as CCIPDestSimulationUnavailableError: an RPC/transport failure that prevents a check from running ('transport', transient — retry), and pools whose releaseOrMint consumes offchain token data (CCTP attestation / bridge proof) that doesn't exist pre-send ('attestation-required', not transient — the check becomes possible post-send, when message.offchainTokenData carries the real attestations).

Parameters

ParameterType
opts{ message: Pick<{ accountIsWritableBitmap?: bigint; accounts?: string[]; data?: BytesLike; finality?: FinalityRequested; messageId?: string; offchainTokenData?: readonly OffchainTokenData[]; offRampAddress?: string; onRampAddress?: string; receiver: string; sender?: string; sourceChainSelector: bigint; tokenAmounts?: readonly { amount: bigint; extraData?: string; } & { token: string; } | { destTokenAddress: string; sourcePoolAddress: string; sourceTokenAddress?: string; tokenReceiver?: string; }[]; tokenArgs?: string; tokenReceiver?: string; }, "finality" | "sourceChainSelector" | "tokenAmounts"> & Partial<Pick<{ accountIsWritableBitmap?: bigint; accounts?: string[]; data?: BytesLike; finality?: FinalityRequested; messageId?: string; offchainTokenData?: readonly OffchainTokenData[]; offRampAddress?: string; onRampAddress?: string; receiver: string; sender?: string; sourceChainSelector: bigint; tokenAmounts?: readonly { amount: bigint; extraData?: string; } & { token: string; } | { destTokenAddress: string; sourcePoolAddress: string; sourceTokenAddress?: ... | ...; tokenReceiver?: ... | ...; }[]; tokenArgs?: string; tokenReceiver?: string; }, "offchainTokenData" | "onRampAddress" | "receiver" | "sender" | "tokenReceiver">>; offRamp: string; }
opts.messagePick<{ accountIsWritableBitmap?: bigint; accounts?: string[]; data?: BytesLike; finality?: FinalityRequested; messageId?: string; offchainTokenData?: readonly OffchainTokenData[]; offRampAddress?: string; onRampAddress?: string; receiver: string; sender?: string; sourceChainSelector: bigint; tokenAmounts?: readonly { amount: bigint; extraData?: string; } & { token: string; } | { destTokenAddress: string; sourcePoolAddress: string; sourceTokenAddress?: string; tokenReceiver?: string; }[]; tokenArgs?: string; tokenReceiver?: string; }, "finality" | "sourceChainSelector" | "tokenAmounts"> & Partial<Pick<{ accountIsWritableBitmap?: bigint; accounts?: string[]; data?: BytesLike; finality?: FinalityRequested; messageId?: string; offchainTokenData?: readonly OffchainTokenData[]; offRampAddress?: string; onRampAddress?: string; receiver: string; sender?: string; sourceChainSelector: bigint; tokenAmounts?: readonly { amount: bigint; extraData?: string; } & { token: string; } | { destTokenAddress: string; sourcePoolAddress: string; sourceTokenAddress?: ... | ...; tokenReceiver?: ... | ...; }[]; tokenArgs?: string; tokenReceiver?: string; }, "offchainTokenData" | "onRampAddress" | "receiver" | "sender" | "tokenReceiver">>
opts.offRampstring

Returns

Promise<true>

Throws

CCIPDestExecutionRevertError when the releaseOrMint simulation reverts (the raw encoded revert is in context.revert; isTransient is set when the revert is one that recovers on its own — liquidity, rate/bridge limit, or RMN curse)

Throws

CCIPContractTypeInvalidError when the registered pool is not CCIP-compatible

Throws

CCIPDestSimulationUnavailableError when a check could not be performed at all (RPC/transport error, or attestation-consuming pool pre-send)

Overrides

Chain.checkExecute


estimateReceiveExecution()

estimateReceiveExecution(opts: { message: Omit<EstimateMessageInput, "onRampAddress" | "offRampAddress">; offRamp: string; } | { messageId: string; }): Promise<number>

Defined in: evm/index.ts:3067

Estimate ccipReceive execution cost (gas, computeUnits) for this destination chain.

Parameters

ParameterTypeDescription
opts{ message: Omit<EstimateMessageInput, "onRampAddress" | "offRampAddress">; offRamp: string; } | { messageId: string; }Either: - { offRamp, message } — estimate from message fields directly. message must include sourceChainSelector, messageId, receiver, and optionally sender, data, destTokenAmounts. - { messageId } — fetch the message from the CCIP API via getMessageById, resolve the offRamp from the message metadata or getExecutionInput, then estimate. Requires apiClient to be available.

Returns

Promise<number>

Estimated execution cost (gas for EVM, compute units for Solana)

Overrides

Chain.estimateReceiveExecution


execute()

execute(opts: ExecuteOpts & { wallet: unknown; }): Promise<CCIPExecution>

Defined in: evm/index.ts:1907

Execute messages in report in an offRamp.

Parameters

ParameterTypeDescription
optsExecuteOpts & { wallet: unknown; }ExecuteOpts with chain-specific wallet to sign and send tx.

Returns

Promise<CCIPExecution>

Promise resolving to transaction of the execution.

Throws

CCIPWalletInvalidError if wallet is not a valid Signer.

Throws

CCIPExecTxNotConfirmedError if execution transaction fails to confirm.

Throws

CCIPExecTxRevertedError if execution transaction reverts.

Overrides

Chain.execute


generateUnsignedExecute()

generateUnsignedExecute(opts: ExecuteOpts & { payer: string; }): Promise<UnsignedEVMTx>

Defined in: evm/index.ts:1732

Generate unsigned tx to manuallyExecute a message.

Parameters

ParameterTypeDescription
optsExecuteOpts & { payer: string; }ExecuteOpts with payer address which will send the exec tx

Returns

Promise<UnsignedEVMTx>

Promise resolving to chain-family specific unsigned txs

Throws

CCIPVersionUnsupportedError if OffRamp version is not supported

Overrides

Chain.generateUnsignedExecute


generateUnsignedSendMessage()

generateUnsignedSendMessage(opts: SendMessageOpts & { sender: string; }): Promise<UnsignedEVMTx>

Defined in: evm/index.ts:1596

Generates unsigned EVM transactions for sending a CCIP message.

Parameters

ParameterTypeDescription
optsSendMessageOpts & { sender: string; }Send message options with sender address for populating transaction fields.

Returns

Promise<UnsignedEVMTx>

Unsigned EVM transaction set containing 0 or more token approval txs (if needed at the time of generation), followed by a ccipSend TransactionRequest.

Remarks

When a token in tokenAmounts has ZeroAddress as its address, the corresponding amount is included as native value in the ccipSend transaction instead of going through the ERC-20 approve flow.

Overrides

Chain.generateUnsignedSendMessage


getBalance()

getBalance(opts: GetBalanceOpts): Promise<bigint>

Defined in: evm/index.ts:1158

Query token balance for an address.

Parameters

ParameterTypeDescription
optsGetBalanceOptsBalance query options

Returns

Promise<bigint>

Token balance information including raw and formatted values

Overrides

Chain.getBalance


getBlockInfo()

getBlockInfo(block: bigint | EVMEndBlockTag): Promise<BlockInfo>

Defined in: evm/index.ts:570

Fetch info (number and timestamp) for a given block or finality tag.

Parameters

ParameterTypeDescription
blockbigint | EVMEndBlockTagBlock number, or tag like 'finalized' or 'latest'

Returns

Promise<BlockInfo>

Block info with number and timestamp

Overrides

Chain.getBlockInfo


getBlockTimestamp()

getBlockTimestamp(block: number | bigint | "finalized" | "latest"): Promise<number>

Defined in: chain.ts:796

Fetch the timestamp of a given block.

Parameters

ParameterTypeDescription
blocknumber | bigint | "finalized" | "latest"Block number or finality tag

Returns

Promise<number>

Unix timestamp in seconds

Deprecated

Use Chain.getBlockInfo instead.

Inherited from

Chain.getBlockTimestamp


getExecutionInput()

getExecutionInput(opts: { request: CCIPRequest; verifications: CCIPVerifications; } & Pick<LogFilter, "page">): Promise<ExecutionInput>

Defined in: chain.ts:1062

Fetch input data needed for executing messages Should be called on the source instance

Parameters

ParameterTypeDescription
opts{ request: CCIPRequest; verifications: CCIPVerifications; } & Pick<LogFilter, "page">getExecutionInput options containing request and verifications

Returns

Promise<ExecutionInput>

input payload to be passed to execute

See

execute - method to execute a message

Inherited from

Chain.getExecutionInput


getExecutionReceipts()

getExecutionReceipts(opts: { messageId?: string; offRamp: string; sourceChainSelector?: bigint; verifications?: CCIPVerifications; } & Pick<LogFilter, "page" | "startBlock" | "startTime" | "watch">): AsyncIterableIterator<CCIPExecution>

Defined in: evm/index.ts:2471

Default/generic implementation of getExecutionReceipts. Yields execution receipts for a given offRamp.

Parameters

ParameterTypeDescription
opts{ messageId?: string; offRamp: string; sourceChainSelector?: bigint; verifications?: CCIPVerifications; } & Pick<LogFilter, "page" | "startBlock" | "startTime" | "watch">getExecutionReceipts options

Returns

AsyncIterableIterator<CCIPExecution>

Async generator of CCIPExecution receipts

Overrides

Chain.getExecutionReceipts


getFee()

getFee(opts: Omit<SendMessageOpts, "approveMax">): Promise<bigint>

Defined in: evm/index.ts:1319

Fetch the current fee for a given intended message.

Parameters

ParameterTypeDescription
optsOmit<SendMessageOpts, "approveMax">SendMessageOpts without approveMax

Returns

Promise<bigint>

Fee amount in the feeToken's smallest units

Overrides

Chain.getFee


getFeeTokens()

getFeeTokens(address: string): Promise<{[k: string]: { decimals: number; name: string; symbol: string; }; }>

Defined in: evm/index.ts:2404

Fetch list and info of supported feeTokens.

Parameters

ParameterTypeDescription
addressstringRouter address on this chain

Returns

Promise<{[k: string]: { decimals: number; name: string; symbol: string; }; }>

Promise resolving to mapping of token addresses to TokenInfo objects

Throws

CCIPVersionUnsupportedError if OnRamp version is not supported

Overrides

Chain.getFeeTokens


getLaneFeatures()

getLaneFeatures(opts: { destChainSelector: bigint; router: string; token?: string; }): Promise<Partial<LaneFeatures>>

Defined in: chain.ts:1823

Retrieve features for a lane (router/destChainSelector/token triplet).

Parameters

ParameterType
opts{ destChainSelector: bigint; router: string; token?: string; }
opts.destChainSelectorbigint
opts.routerstring
opts.token?string

Returns

Promise<Partial<LaneFeatures>>

Promise resolving to partial lane features record

Throws

CCIPNotImplementedError if not implemented for this chain family

Example

Get lane features

TypeScript
const features = await chain.getLaneFeatures({
router: '0x...',
destChainSelector: 4949039107694359620n,
})
// FINALITY_FAST has three states:
// - undefined: FTF is not supported on this lane (pre-v2.0)
// - 0: the lane supports FTF, but it is not enabled for this token
// - > 0: FTF is enabled with this many block confirmations
const ftf = features[LaneFeature.FINALITY_FAST]
if (ftf != null && ftf > 0) {
console.log(`FTF enabled with ${ftf} block confirmations`)
} else if (ftf === 0) {
console.log('FTF supported on this lane but not enabled for this token')
}

Inherited from

Chain.getLaneFeatures


getLaneForOnRamp()

getLaneForOnRamp(onRamp: string): Promise<Lane<CCIPVersion>>

Defined in: evm/index.ts:833

Gets lane configuration from an OnRamp contract.

Parameters

ParameterTypeDescription
onRampstringOnRamp contract address.

Returns

Promise<Lane<CCIPVersion>>

Lane configuration.

Throws

CCIPContractTypeInvalidError if contract doesn't have destChainSelector


getLaneLatency()

getLaneLatency(destChainSelector: bigint, numberOfBlocks?: number): Promise<LaneLatencyResponse>

Defined in: chain.ts:1782

Fetches estimated lane latency to a destination chain. Uses this chain's selector as the source.

Parameters

ParameterTypeDescription
destChainSelectorbigintDestination CCIP chain selector (bigint)
numberOfBlocks?numberOptional number of block confirmations to use for latency calculation. When omitted or 0, uses the lane's default finality. When provided as a positive integer, the API returns latency for that custom finality value.

Returns

Promise<LaneLatencyResponse>

Promise resolving to LaneLatencyResponse containing:

  • totalMs - Estimated delivery time in milliseconds

Throws

CCIPApiClientNotAvailableError if apiClient was disabled (set to null)

Throws

CCIPLaneLatencyInsufficientDataError if the API has too little history for the lane

Throws

CCIPHttpError if API request fails (network error, 4xx, 5xx status)

Remarks

Each call makes a fresh API request. Consider caching results if making frequent calls for the same lane.

Examples

Get estimated delivery time

TypeScript
const chain = await EVMChain.fromUrl('https://eth-mainnet.example.com')
try {
const latency = await chain.getLaneLatency(4949039107694359620n) // Arbitrum
console.log(`Estimated delivery: ${Math.round(latency.totalMs / 60000)} minutes`)
} catch (err) {
if (err instanceof CCIPHttpError) {
console.error(`API error: ${err.context.apiErrorCode}`)
}
}

Get latency with custom block confirmations

TypeScript
const latency = await chain.getLaneLatency(4949039107694359620n, 10)
console.log(`Latency with 10 confirmations: ${Math.round(latency.totalMs / 60000)} minutes`)

Inherited from

Chain.getLaneLatency


getLogs()

getLogs(filter: { address?: string; endBefore?: string; endBlock?: bigint | EVMEndBlockTag; page?: number | bigint; startBlock?: number | bigint; startTime?: number | bigint; topics?: (string | string[] | null)[]; watch?: boolean | AbortSignal; }): AsyncGenerator<ChainLog, void, any>

Defined in: evm/index.ts:595

An async generator that yields logs based on the provided options.

Parameters

ParameterTypeDescription
filter{ address?: string; endBefore?: string; endBlock?: bigint | EVMEndBlockTag; page?: number | bigint; startBlock?: number | bigint; startTime?: number | bigint; topics?: (string | string[] | null)[]; watch?: boolean | AbortSignal; }Options object containing: - startBlock: fetch and generate logs forward starting from this block; required unless startTime is provided; explicit 0 is allowed - startTime: instead of a startBlock, a start timestamp may be provided; if either is provided, fetch logs forward from this starting point - endBlock: a fixed block height, finality tag or negative finality depth to stop iteration at; defaults to latest - endBefore: optional hint signature for end of iteration, instead of endBlock - address: if provided, fetch logs for this address only (may be required in some networks/implementations) - topics: if provided, fetch logs for these topics only; if string[], it's assumed to be a list of topic0s (i.e. string[] or string[][0], event_ids); some networks/implementations may not be able to filter topics other than topic0s, so one may want to assume those are optimization hints, instead of hard filters, and verify results - page: if provided, try to use this page/range for batches - watch: true or cancellation promise, stream logs after initial catch-up until endBlock finality tag (e.g. 'finalized'); requires endBlock to be a finality tag
filter.address?stringContract address to filter logs by.
filter.endBefore?stringCursor hint for the exclusive upper end of iteration on chains that support it.
filter.endBlock?bigint | EVMEndBlockTagEnding block number (inclusive).
filter.page?number | bigintPage size for pagination.
filter.startBlock?number | bigintStarting block number (inclusive). Required unless startTime is provided; explicit 0 is allowed.
filter.startTime?number | bigintStarting Unix timestamp (inclusive).
filter.topics?(string | string[] | null)[]Topics to filter logs by.
filter.watch?boolean | AbortSignalwatch mode: polls for new logs after fetching since start (required), until endBlock finality tag (e.g. endBlock=finalized polls only finalized logs); can be an AbortSignal to cancel loop

Returns

AsyncGenerator<ChainLog, void, any>

An async iterable iterator of logs.

Overrides

Chain.getLogs


getMessageById()

getMessageById(messageId: string, _opts?: { onRamp?: string; page?: number; }): Promise<CCIPRequest<CCIPVersion>>

Defined in: chain.ts:1010

Fetch a CCIP message by its unique message ID.

Parameters

ParameterTypeDescription
messageIdstringThe unique message ID (0x + 64 hex chars)
_opts?{ onRamp?: string; page?: number; }Optional: onRamp hint for non-EVM chains
_opts.onRamp?string-
_opts.page?number-

Returns

Promise<CCIPRequest<CCIPVersion>>

CCIPRequest with metadata populated from API

Remarks

Uses the CCIP API to retrieve message details. The returned request includes a metadata field with API-specific information.

Example

TypeScript
const request = await chain.getMessageById(messageId)
console.log(`Sender: ${request.message.sender}`)

if (request.metadata) {
console.log(`Status: ${request.metadata.status}`)
if (request.metadata.deliveryTime) {
console.log(`Delivered in ${request.metadata.deliveryTime}ms`)
}
}

Throws

CCIPApiClientNotAvailableError if API disabled

Throws

CCIPMessageIdNotFoundError if message not found

Throws

CCIPOnRampRequiredError if onRamp is required but not provided

Throws

CCIPHttpError if API request fails

Inherited from

Chain.getMessageById


getMessagesInBatch()

getMessagesInBatch<R>(request: R, range: Pick<CommitReport, "minSeqNr" | "maxSeqNr">, opts?: Pick<LogFilter, "page">): Promise<R["message"][]>

Defined in: evm/index.ts:611

Fetches all CCIP messages contained in a given commit batch. To be implemented for chains supporting CCIPVersion v1.6.0 and earlier

Type Parameters

Type ParameterDescription
R extends { lane: { destChainSelector: bigint; onRamp: string; sourceChainSelector: bigint; version: CCIPVersion; }; log: { blockTimestamp: number; }; message: { sequenceNumber: bigint; } | { sequenceNumber: bigint; } | { sequenceNumber: bigint; } | { sequenceNumber: bigint; } | { sequenceNumber: bigint; } | { sequenceNumber: bigint; }; }

Parameters

ParameterTypeDescription
requestRCCIPRequest to fetch batch for
rangePick<CommitReport, "minSeqNr" | "maxSeqNr">batch range { minSeqnr, maxSeqNr }, e.g. from CommitReport
opts?Pick<LogFilter, "page">Optional parameters (e.g., page for pagination width)

Returns

Promise<R["message"][]>

Array of messages in the batch

Overrides

Chain.getMessagesInBatch


getMessagesInRange()

getMessagesInRange(opts: { address?: string; endBefore?: string; endBlock?: number | bigint | "finalized" | "latest"; page?: number | bigint; startBlock?: number | bigint; startTime?: number | bigint; topics?: (string | string[] | null)[]; watch?: boolean | AbortSignal; }): AsyncIterableIterator<CCIPRequest<CCIPVersion>>

Defined in: chain.ts:976

Discover and decode CCIP messages within a block/slot/checkpoint range.

Parameters

ParameterTypeDescription
opts{ address?: string; endBefore?: string; endBlock?: number | bigint | "finalized" | "latest"; page?: number | bigint; startBlock?: number | bigint; startTime?: number | bigint; topics?: (string | string[] | null)[]; watch?: boolean | AbortSignal; }LogFilter options (startBlock, endBlock, address, topics, page)
opts.address?stringContract address to filter logs by.
opts.endBefore?stringCursor hint for the exclusive upper end of iteration on chains that support it.
opts.endBlock?number | bigint | "finalized" | "latest"Ending block number (inclusive).
opts.page?number | bigintPage size for pagination.
opts.startBlock?number | bigintStarting block number (inclusive). Required unless startTime is provided; explicit 0 is allowed.
opts.startTime?number | bigintStarting Unix timestamp (inclusive).
opts.topics?(string | string[] | null)[]Topics to filter logs by.
opts.watch?boolean | AbortSignalwatch mode: polls for new logs after fetching since start (required), until endBlock finality tag (e.g. endBlock=finalized polls only finalized logs); can be an AbortSignal to cancel loop

Returns

AsyncIterableIterator<CCIPRequest<CCIPVersion>>

Async iterator of CCIPRequest objects in native log order

Remarks

This is the range-scanning equivalent of getMessagesInTx. Results are yielded in native log order (block number + log index for EVM, slot order for Solana). Non-CCIP logs in the range are silently skipped.

On Solana, the address parameter is required (router program address). On EVM, it is optional but recommended for public RPCs that require address filtering.

Throws

CCIPChainFamilyUnsupportedError if a pre-v1.6 message is found on a non-EVM chain

Throws

CCIPLogsAddressRequiredError on Solana if address is not provided (thrown by underlying Chain.getLogs)

See

Example

Scan a block range on EVM

TypeScript
for await (const request of chain.getMessagesInRange({
startBlock: 1000000,
endBlock: 1001000,
address: '0xOnRampAddress...', // optional on EVM
})) {
console.log(`seqNr=${request.message.sequenceNumber} dest=${request.lane.destChainSelector}`)
}

Inherited from

Chain.getMessagesInRange


getMessagesInTx()

getMessagesInTx(tx: string | ChainTransaction): Promise<CCIPRequest<CCIPVersion>[]>

Defined in: chain.ts:917

Fetch all CCIP requests in a transaction.

Parameters

ParameterTypeDescription
txstring | ChainTransactionChainTransaction or txHash to fetch requests from

Returns

Promise<CCIPRequest<CCIPVersion>[]>

Promise resolving to CCIP messages in the transaction (at least one)

Throws

CCIPTransactionNotFoundError if transaction does not exist

Throws

CCIPMessageNotFoundInTxError if no CCIPSendRequested events in tx

Example

Get messages from transaction

TypeScript
const chain = await EVMChain.fromUrl('https://eth-mainnet.example.com')
const requests = await chain.getMessagesInTx('0xabc123...')
for (const req of requests) {
console.log(`Message ID: ${req.message.messageId}`)
}

Inherited from

Chain.getMessagesInTx


getNativeTokenForRouter()

getNativeTokenForRouter(router: string): Promise<string>

Defined in: evm/index.ts:991

Get the native token address for a Router.

Parameters

ParameterTypeDescription
routerstringRouter contract address

Returns

Promise<string>

Promise resolving to native token address (usually wrapped)

Overrides

Chain.getNativeTokenForRouter


getOffchainTokenData()

getOffchainTokenData(request: { log: { }; message: { data: string; feeToken: string; feeTokenAmount: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; sourceTokenData: readonly string[]; strict: boolean; tokenAmounts: readonly { amount: bigint; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; token: string; }[]; } | { ccipReceiveGasLimit: number; ccvAndExecutorHash: string; data: string; destBlob: string; destChainSelector: bigint; encodedMessage: string; executionGasLimit: number; feeToken: string; feeTokenAmount: bigint; finality: FinalityRequested; messageId: string; messageNumber: bigint; offRampAddress: string; onRampAddress: string; receipts: readonly { destBytesOverhead: bigint; destGasLimit: bigint; extraArgs: string; feeTokenAmount: bigint; issuer: string; }[]; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmountBeforeTokenPoolFees: bigint; tokenAmounts: readonly { amount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; sourceTokenAddress: string; tokenReceiver: string; }[]; verifierBlobs: readonly string[]; } | { data: string; feeToken: string; feeTokenAmount: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; sourceTokenData: readonly string[]; strict: boolean; tokenAmounts: readonly { amount: bigint; token: string; }[]; } | { allowOutOfOrderExecution: boolean; data: string; destChainSelector: bigint; extraArgs: string; feeToken: string; feeTokenAmount: bigint; feeValueJuels: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmounts: readonly { amount: bigint; destExecData: string; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; }[]; } | { accountIsWritableBitmap: bigint; accounts: string[]; allowOutOfOrderExecution: boolean; computeUnits: bigint; data: string; destChainSelector: bigint; extraArgs: string; feeToken: string; feeTokenAmount: bigint; feeValueJuels: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmounts: readonly { amount: bigint; destExecData: string; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; }[]; tokenReceiver: string; } | { allowOutOfOrderExecution: boolean; data: string; destChainSelector: bigint; extraArgs: string; feeToken: string; feeTokenAmount: bigint; feeValueJuels: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; receiverObjectIds: string[]; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmounts: readonly { amount: bigint; destExecData: string; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; }[]; tokenReceiver: string; }; }): Promise<OffchainTokenData[]>

Defined in: chain.ts:1559

Fetch supported offchain token data for a request from this network. It logs but doesn't throw in case it can't fetch attestation, as the transfers may not be from the expected attestation providers. It returns default offchainData=undefined for those.

Parameters

ParameterTypeDescription
request{ log: { }; message: { data: string; feeToken: string; feeTokenAmount: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; sourceTokenData: readonly string[]; strict: boolean; tokenAmounts: readonly { amount: bigint; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; token: string; }[]; } | { ccipReceiveGasLimit: number; ccvAndExecutorHash: string; data: string; destBlob: string; destChainSelector: bigint; encodedMessage: string; executionGasLimit: number; feeToken: string; feeTokenAmount: bigint; finality: FinalityRequested; messageId: string; messageNumber: bigint; offRampAddress: string; onRampAddress: string; receipts: readonly { destBytesOverhead: bigint; destGasLimit: bigint; extraArgs: string; feeTokenAmount: bigint; issuer: string; }[]; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmountBeforeTokenPoolFees: bigint; tokenAmounts: readonly { amount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; sourceTokenAddress: string; tokenReceiver: string; }[]; verifierBlobs: readonly string[]; } | { data: string; feeToken: string; feeTokenAmount: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; sourceTokenData: readonly string[]; strict: boolean; tokenAmounts: readonly { amount: bigint; token: string; }[]; } | { allowOutOfOrderExecution: boolean; data: string; destChainSelector: bigint; extraArgs: string; feeToken: string; feeTokenAmount: bigint; feeValueJuels: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmounts: readonly { amount: bigint; destExecData: string; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; }[]; } | { accountIsWritableBitmap: bigint; accounts: string[]; allowOutOfOrderExecution: boolean; computeUnits: bigint; data: string; destChainSelector: bigint; extraArgs: string; feeToken: string; feeTokenAmount: bigint; feeValueJuels: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmounts: readonly { amount: bigint; destExecData: string; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; }[]; tokenReceiver: string; } | { allowOutOfOrderExecution: boolean; data: string; destChainSelector: bigint; extraArgs: string; feeToken: string; feeTokenAmount: bigint; feeValueJuels: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; receiverObjectIds: string[]; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmounts: readonly { amount: bigint; destExecData: string; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; }[]; tokenReceiver: string; }; }CCIP request, with tx.hash and message
request.log{ }-
request.message{ data: string; feeToken: string; feeTokenAmount: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; sourceTokenData: readonly string[]; strict: boolean; tokenAmounts: readonly { amount: bigint; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; token: string; }[]; } | { ccipReceiveGasLimit: number; ccvAndExecutorHash: string; data: string; destBlob: string; destChainSelector: bigint; encodedMessage: string; executionGasLimit: number; feeToken: string; feeTokenAmount: bigint; finality: FinalityRequested; messageId: string; messageNumber: bigint; offRampAddress: string; onRampAddress: string; receipts: readonly { destBytesOverhead: bigint; destGasLimit: bigint; extraArgs: string; feeTokenAmount: bigint; issuer: string; }[]; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmountBeforeTokenPoolFees: bigint; tokenAmounts: readonly { amount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; sourceTokenAddress: string; tokenReceiver: string; }[]; verifierBlobs: readonly string[]; } | { data: string; feeToken: string; feeTokenAmount: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; sourceTokenData: readonly string[]; strict: boolean; tokenAmounts: readonly { amount: bigint; token: string; }[]; } | { allowOutOfOrderExecution: boolean; data: string; destChainSelector: bigint; extraArgs: string; feeToken: string; feeTokenAmount: bigint; feeValueJuels: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmounts: readonly { amount: bigint; destExecData: string; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; }[]; } | { accountIsWritableBitmap: bigint; accounts: string[]; allowOutOfOrderExecution: boolean; computeUnits: bigint; data: string; destChainSelector: bigint; extraArgs: string; feeToken: string; feeTokenAmount: bigint; feeValueJuels: bigint; messageId: string; nonce: bigint; receiver: string; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmounts: readonly { amount: bigint; destExecData: string; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; }[]; tokenReceiver: string; } | { allowOutOfOrderExecution: boolean; data: string; destChainSelector: bigint; extraArgs: string; feeToken: string; feeTokenAmount: bigint; feeValueJuels: bigint; gasLimit: bigint; messageId: string; nonce: bigint; receiver: string; receiverObjectIds: string[]; sender: string; sequenceNumber: bigint; sourceChainSelector: bigint; tokenAmounts: readonly { amount: bigint; destExecData: string; destGasAmount: bigint; destTokenAddress: string; extraData: string; sourcePoolAddress: string; }[]; tokenReceiver: string; }-

Returns

Promise<OffchainTokenData[]>

Promise resolving to array with one offchain token data for each token transfer

Example

Get offchain token data for USDC transfer

TypeScript
const offchainData = await source.getOffchainTokenData(request)
// Use in execution report

Inherited from

Chain.getOffchainTokenData


getOffRampConfig()

getOffRampConfig(offRamp: string, sourceChainSelector?: bigint): Promise<{ armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; maxPoolReleaseOrMintGas: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; router: string; sourceChainSelector: bigint; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; router: string; sourceChainSelector: bigint; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; maxPoolReleaseOrMintGas: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; maxPoolReleaseOrMintGas: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; typeAndVersion: string; } | { chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; maxPoolReleaseOrMintGas: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; } | { chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; } | { chainSelector: bigint; feeQuoter: string; gasForCallExactCheck: bigint; isEnabled: boolean; isRMNVerificationDisabled: boolean; messageInterceptor: string; minSeqNr: bigint; nonceManager: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; rmn?: string; rmnRemote: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; } | { defaultCCVs: readonly string[]; gasForCallExactCheck: bigint; isEnabled: boolean; laneMandatedCCVs: readonly string[]; localChainSelector: bigint; maxGasBufferToUpdateState: bigint; onRamps: string[]; rmn?: string; rmnRemote: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; }>

Defined in: evm/index.ts:1024

Fetch the full OffRamp configuration for a given source chain.

Parameters

ParameterTypeDescription
offRampstringOffRamp contract address.
sourceChainSelector?bigintSource chain selector.

Returns

Promise<{ armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; maxPoolReleaseOrMintGas: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; router: string; sourceChainSelector: bigint; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; router: string; sourceChainSelector: bigint; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; maxPoolReleaseOrMintGas: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; maxPoolReleaseOrMintGas: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; typeAndVersion: string; } | { chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; maxPoolReleaseOrMintGas: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; } | { chainSelector: bigint; commitStore: string; maxDataBytes: bigint; maxNumberOfTokensPerMsg: bigint; onRamp: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; prevOffRamp: string; priceRegistry: string; rmn?: string; rmnProxy: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; } | { chainSelector: bigint; feeQuoter: string; gasForCallExactCheck: bigint; isEnabled: boolean; isRMNVerificationDisabled: boolean; messageInterceptor: string; minSeqNr: bigint; nonceManager: string; onRamps: string[]; permissionLessExecutionThresholdSeconds: bigint; rmn?: string; rmnRemote: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; } | { defaultCCVs: readonly string[]; gasForCallExactCheck: bigint; isEnabled: boolean; laneMandatedCCVs: readonly string[]; localChainSelector: bigint; maxGasBufferToUpdateState: bigint; onRamps: string[]; rmn?: string; rmnRemote: string; router: string; sourceChainSelector: bigint; tokenAdminRegistry: string; typeAndVersion: string; }>

Merged OffRamp config — at minimum router, onRamp, type, version, typeAndVersion.

Remarks

Returns a merged object containing every static (per-contract) and per-source field exposed by the underlying contract. Concrete subclasses preserve the contract-native field names and return richer objects than the OffRampConfig base interface declares — they may include extra fields available only on specific versions (e.g. EVM v2.0 exposes onRamps: string[]).

Overrides

Chain.getOffRampConfig


getOffRampsForRouter()

getOffRampsForRouter(router: string, sourceChainSelector: bigint): Promise<string[]>

Defined in: evm/index.ts:1001

Fetch the OffRamps allowlisted in a Router. Used to discover OffRamp connected to an OnRamp.

Parameters

ParameterTypeDescription
routerstringRouter contract address
sourceChainSelectorbigintSource chain selector

Returns

Promise<string[]>

Promise resolving to array of OffRamp addresses

Overrides

Chain.getOffRampsForRouter


getOnRampConfig()

getOnRampConfig(onRamp: string, destChainSelector?: bigint): Promise<{ chainSelector: bigint; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destChainSelector: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByte: bigint; enforceOutOfOrder: boolean; feeQuoter: string; linkToken: string; maxDataBytes: bigint; maxNopFeesJuels: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; prevOnRamp: string; priceRegistry: string; priceRegistryConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; rmnProxy: string; router: string; tokenAdminRegistry: string; typeAndVersion: string; } | { chainSelector: bigint; defaultTxGasLimit: bigint; destChainSelector: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByte: bigint; feeQuoter: string; linkToken: string; maxDataBytes: bigint; maxNopFeesJuels: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; prevOnRamp: string; priceRegistry: string; priceRegistryConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; rmnProxy: string; router: string; tokenAdminRegistry: string; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destChainSelector: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByte: bigint; enforceOutOfOrder: boolean; feeQuoter: string; linkToken: string; maxDataBytes: bigint; maxNopFeesJuels: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; prevOnRamp: string; priceRegistry: string; priceRegistryConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; router: string; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; defaultTxGasLimit: bigint; destChainSelector: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByte: bigint; feeQuoter: string; linkToken: string; maxDataBytes: bigint; maxNopFeesJuels: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; prevOnRamp: string; priceRegistry: string; priceRegistryConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; router: string; typeAndVersion: string; } | { allowlistAdmin: string; allowlistEnabled: boolean; chainSelector: bigint; destChainSelector: bigint; feeAggregator: string; feeQuoter: string; feeQuoterConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; messageInterceptor: string; nonceManager: string; reentrancyGuardEntered: boolean; rmnRemote: string; router: string; tokenAdminRegistry: string; typeAndVersion: string; } | { addressBytesLength: bigint; baseExecutionGasCost: bigint; chainSelector: bigint; defaultCCVs: readonly string[]; defaultExecutor: string; destChainSelector: bigint; feeAggregator: string; feeQuoter: string; feeQuoterConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; laneMandatedCCVs: readonly string[]; maxUSDCentsPerMessage: bigint; messageNetworkFeeUSDCents: bigint; messageNumber: bigint; offRamp: string; reentrancyGuardEntered: boolean; rmnRemote: string; router: string; tokenAdminRegistry: string; tokenNetworkFeeUSDCents: bigint; tokenReceiverAllowed: boolean; typeAndVersion: string; }>

Defined in: evm/index.ts:901

Fetch the full OnRamp configuration for a given destination chain.

Parameters

ParameterTypeDescription
onRampstringOnRamp contract address.
destChainSelector?bigintDestination chain selector.

Returns

Promise<{ chainSelector: bigint; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destChainSelector: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByte: bigint; enforceOutOfOrder: boolean; feeQuoter: string; linkToken: string; maxDataBytes: bigint; maxNopFeesJuels: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; prevOnRamp: string; priceRegistry: string; priceRegistryConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; rmnProxy: string; router: string; tokenAdminRegistry: string; typeAndVersion: string; } | { chainSelector: bigint; defaultTxGasLimit: bigint; destChainSelector: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByte: bigint; feeQuoter: string; linkToken: string; maxDataBytes: bigint; maxNopFeesJuels: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; prevOnRamp: string; priceRegistry: string; priceRegistryConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; rmnProxy: string; router: string; tokenAdminRegistry: string; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destChainSelector: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByte: bigint; enforceOutOfOrder: boolean; feeQuoter: string; linkToken: string; maxDataBytes: bigint; maxNopFeesJuels: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; prevOnRamp: string; priceRegistry: string; priceRegistryConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; router: string; typeAndVersion: string; } | { armProxy: string; chainSelector: bigint; defaultTxGasLimit: bigint; destChainSelector: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByte: bigint; feeQuoter: string; linkToken: string; maxDataBytes: bigint; maxNopFeesJuels: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; prevOnRamp: string; priceRegistry: string; priceRegistryConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; router: string; typeAndVersion: string; } | { allowlistAdmin: string; allowlistEnabled: boolean; chainSelector: bigint; destChainSelector: bigint; feeAggregator: string; feeQuoter: string; feeQuoterConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; messageInterceptor: string; nonceManager: string; reentrancyGuardEntered: boolean; rmnRemote: string; router: string; tokenAdminRegistry: string; typeAndVersion: string; } | { addressBytesLength: bigint; baseExecutionGasCost: bigint; chainSelector: bigint; defaultCCVs: readonly string[]; defaultExecutor: string; destChainSelector: bigint; feeAggregator: string; feeQuoter: string; feeQuoterConfig: { destChainGasPrice: { timestamp: bigint; value: bigint; }; stalenessThreshold: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destDataAvailabilityMultiplierBps: bigint; destDataAvailabilityOverheadGas: bigint; destGasOverhead: bigint; destGasPerDataAvailabilityByte: bigint; destGasPerPayloadByteBase: bigint; destGasPerPayloadByteHigh: bigint; destGasPerPayloadByteThreshold: bigint; enforceOutOfOrder: boolean; gasMultiplierWeiPerEth: bigint; gasPriceStalenessThreshold: bigint; isEnabled: boolean; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxNumberOfTokensPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; } | { chainFamilySelector: string; defaultTokenDestGasOverhead: bigint; defaultTokenFeeUSDCents: bigint; defaultTxGasLimit: bigint; destGasOverhead: bigint; destGasPerPayloadByteBase: bigint; isEnabled: boolean; linkFeeMultiplierPercent: bigint; linkToken: string; maxDataBytes: bigint; maxFeeJuelsPerMsg: bigint; maxPerMsgGasLimit: bigint; networkFeeUSDCents: bigint; typeAndVersion: string; }; laneMandatedCCVs: readonly string[]; maxUSDCentsPerMessage: bigint; messageNetworkFeeUSDCents: bigint; messageNumber: bigint; offRamp: string; reentrancyGuardEntered: boolean; rmnRemote: string; router: string; tokenAdminRegistry: string; tokenNetworkFeeUSDCents: bigint; tokenReceiverAllowed: boolean; typeAndVersion: string; }>

Merged OnRamp config — at minimum router, type, version, typeAndVersion.

Remarks

Returns a merged object containing every static (per-contract) and per-destination field exposed by the underlying contract. Concrete subclasses (e.g. EVMChain) preserve the contract-native field names and return richer objects than the OnRampConfig base interface declares — they may include extra fields available only on specific versions.

Overrides

Chain.getOnRampConfig


getOnRampForRouter()

getOnRampForRouter(router: string, destChainSelector: bigint): Promise<string>

Defined in: evm/index.ts:1014

Fetch the OnRamp registered in a Router for a destination chain.

Parameters

ParameterTypeDescription
routerstringRouter contract address
destChainSelectorbigintDestination chain selector

Returns

Promise<string>

Promise resolving to OnRamp address

Overrides

Chain.getOnRampForRouter


getOnRampsForOffRamp()

getOnRampsForOffRamp(offRamp: string, sourceChainSelector: bigint): Promise<string[]>

Defined in: chain.ts:1263

Fetch the OnRamps addresses set in OffRamp config. Used to discover OffRamp connected to an OnRamp.

Parameters

ParameterTypeDescription
offRampstringOffRamp contract address
sourceChainSelectorbigintSource chain selector

Returns

Promise<string[]>

Promise resolving to OnRamps addresses

Remarks

Default implementation reads from Chain.getOffRampConfig; if the concrete config exposes an onRamps: string[] (e.g. EVM v2.0 with multiple historical OnRamps), it is returned as-is; otherwise [cfg.onRamp] is returned.

Example

Get onRamp from offRamp config

TypeScript
const [onRamp] = await dest.getOnRampsForOffRamp(offRampAddress, sourceSelector)
console.log(`OnRamp: ${onRamp}`)

Inherited from

Chain.getOnRampsForOffRamp


getRegistryTokenConfig()

getRegistryTokenConfig(registry: string, token: string): Promise<{ administrator: string; pendingAdministrator?: string; tokenPool?: string; }>

Defined in: evm/index.ts:1974

Fetch token configuration from a TokenAdminRegistry.

Parameters

ParameterTypeDescription
registrystringTokenAdminRegistry contract address.
tokenstringToken address to query.

Returns

Promise<{ administrator: string; pendingAdministrator?: string; tokenPool?: string; }>

RegistryTokenConfig containing administrator and pool information.

Remarks

The TokenAdminRegistry is a contract that tracks token administrators and their associated pools. Each token has an administrator who can update pool configurations.

Throws

CCIPTokenNotConfiguredError if token is not configured in registry

Overrides

Chain.getRegistryTokenConfig


getRequiredCCVs()

getRequiredCCVs(opts: { message: GetRequiredCCVsMessage; offRamp: string; }): Promise<GetRequiredCCVsResult>

Defined in: evm/index.ts:2996

Resolve the CCVs the destination OffRamp will require for a candidate message, and whether its finality is accepted, via the on-chain getCCVsForMessage(bytes) view (a read; no send). Builds the MessageV1 candidate with encodeMessageV1; a rejected finality throws CCIPFinalityNotAllowedError (decoded from the resolver's InvalidRequestedFinality).

The required set is sender-scoped: pass the real sender, or an omitted one yields the lane-default view. CCIP v2.0 lanes only.

Parameters

ParameterTypeDescription
opts{ message: GetRequiredCCVsMessage; offRamp: string; }Destination OffRamp (v2.0) address and the candidate message.
opts.messageGetRequiredCCVsMessage-
opts.offRampstring-

Returns

Promise<GetRequiredCCVsResult>

{ requiredCCVs, optionalCCVs, optionalThreshold }.

Overrides

Chain.getRequiredCCVs


getRouterForOffRamp()

getRouterForOffRamp(offRamp: string, sourceChainSelector: bigint): Promise<string>

Defined in: chain.ts:1197

Fetch the Router address set in OffRamp config.

Parameters

ParameterTypeDescription
offRampstringOffRamp contract address
sourceChainSelectorbigintSource chain selector

Returns

Promise<string>

Promise resolving to Router address

Remarks

Default implementation reads .router from Chain.getOffRampConfig; subclasses generally need not override this.

Throws

CCIPContractTypeInvalidError if address is not an OffRamp

Example

Get router from offRamp

TypeScript
const router = await chain.getRouterForOffRamp(offRampAddress, sourceSelector)
console.log(`Router: ${router}`)

Inherited from

Chain.getRouterForOffRamp


getRouterForOnRamp()

getRouterForOnRamp(onRamp: string, destChainSelector: bigint): Promise<string>

Defined in: chain.ts:1175

Fetch the Router address set in OnRamp config. Used to discover OffRamp connected to OnRamp.

Parameters

ParameterTypeDescription
onRampstringOnRamp contract address
destChainSelectorbigintDestination chain selector

Returns

Promise<string>

Promise resolving to Router address

Remarks

Default implementation reads .router from Chain.getOnRampConfig; subclasses generally need not override this.

Throws

CCIPContractTypeInvalidError if address is not an OnRamp

Example

Get router from onRamp

TypeScript
const router = await chain.getRouterForOnRamp(onRampAddress, destSelector)
console.log(`Router: ${router}`)

Inherited from

Chain.getRouterForOnRamp


getSupportedTokens()

getSupportedTokens(registry: string, opts?: { page?: number; }): Promise<string[]>

Defined in: evm/index.ts:1953

Get the supported tokens for a given contract address.

Parameters

ParameterTypeDescription
registrystringRouter, OnRamp, OffRamp or TokenAdminRegistry contract address.
opts?{ page?: number; }Optional parameters.
opts.page?number-

Returns

Promise<string[]>

An array of supported token addresses.

Overrides

Chain.getSupportedTokens


getTokenAdminRegistryFor()

getTokenAdminRegistryFor(address: string, destChainSelector?: bigint): Promise<string>

Defined in: evm/index.ts:1228

Fetch TokenAdminRegistry configured in a given OnRamp, Router, etc. Needed to map a source token to its dest counterparts.

Parameters

ParameterTypeDescription
addressstringContract address (OnRamp, Router, etc.)
destChainSelector?bigintSome dest chain connected to this address/router

Returns

Promise<string>

Promise resolving to TokenAdminRegistry address

Throws

CCIPContractNotRouterError if address is not a Router, OnRamp, or OffRamp

Overrides

Chain.getTokenAdminRegistryFor


getTokenForTokenPool()

getTokenForTokenPool(tokenPool: string): Promise<string>

Defined in: chain.ts:1280

Fetch the TokenPool's token/mint.

Parameters

ParameterTypeDescription
tokenPoolstringTokenPool address

Returns

Promise<string>

Promise resolving to token or mint address

Example

Get token for pool

TypeScript
const token = await chain.getTokenForTokenPool(tokenPoolAddress)
console.log(`Token: ${token}`)

Inherited from

Chain.getTokenForTokenPool


getTokenInfo()

getTokenInfo(token: string): Promise<{ decimals: number; name: string; symbol: string; }>

Defined in: evm/index.ts:1145

Fetch token metadata.

Parameters

ParameterTypeDescription
tokenstringToken address

Returns

Promise<{ decimals: number; name: string; symbol: string; }>

Promise resolving to token symbol, decimals, and optionally name

Overrides

Chain.getTokenInfo


getTokenPoolConfig()

getTokenPoolConfig(tokenPool: string, feeOpts?: TokenTransferFeeOpts): Promise<{ finalityDepth?: number; finalitySafe?: boolean; lockBox?: string; previousPool?: string; previousPoolTypeAndVersion?: string; router: string; token: string; tokenTransferFeeConfig?: TokenTransferFeeConfig; typeAndVersion: string; }>

Defined in: evm/index.ts:2019

Fetches the token pool configuration for an EVM token pool contract.

Parameters

ParameterTypeDescription
tokenPoolstringToken pool contract address.
feeOpts?TokenTransferFeeOptsOptional parameters to also fetch token transfer fee config: - destChainSelector — destination chain selector. - finality — requested finality ('finalized', 'safe', or block depth number). - tokenArgs — hex-encoded bytes passed to the pool contract.

Returns

Promise<{ finalityDepth?: number; finalitySafe?: boolean; lockBox?: string; previousPool?: string; previousPoolTypeAndVersion?: string; router: string; token: string; tokenTransferFeeConfig?: TokenTransferFeeConfig; typeAndVersion: string; }>

Token pool config containing token, router, typeAndVersion, and optionally finalityDepth, finalitySafe, and tokenTransferFeeConfig. LockReleaseV2 TPs also return its lockBox address

Remarks

For pools with version \>= 2.0, also returns finalityDepth and finalitySafe for Faster-Than-Finality (FTF) and FCR support. Pre-2.0 pools omit these fields. When feeOpts is provided and the pool is v2.0+, also fetches token transfer fee config.

Overrides

Chain.getTokenPoolConfig


getTokenPoolRemote()

getTokenPoolRemote(tokenPool: string, remoteChainSelector: bigint): Promise<TokenPoolRemote>

Defined in: chain.ts:2166

Fetch remote chain configuration for a token pool for a specific destination.

Parameters

ParameterTypeDescription
tokenPoolstringToken pool address on the current chain.
remoteChainSelectorbigintChain selector of the desired remote chain.

Returns

Promise<TokenPoolRemote>

TokenPoolRemote config for the specified remote chain.

Remarks

Convenience wrapper around getTokenPoolRemotes that returns a single configuration instead of a Record. Use this when you need configuration for a specific destination chain.

Example

TypeScript
const arbitrumSelector = 4949039107694359620n
const remote = await chain.getTokenPoolRemote(poolAddress, arbitrumSelector)
console.log(`Remote token: ${remote.remoteToken}`)
console.log(`Remote pools: ${remote.remotePools.join(', ')}`)

Throws

CCIPTokenPoolChainConfigNotFoundError if no configuration found for the specified remote chain.

Inherited from

Chain.getTokenPoolRemote


getTokenPoolRemotes()

getTokenPoolRemotes(tokenPool: string, remoteChainSelector?: bigint): Promise<Record<string, TokenPoolRemote>>

Defined in: evm/index.ts:2152

Fetches remote chain configurations for an EVM token pool contract.

Parameters

ParameterTypeDescription
tokenPoolstringToken pool address on the current chain.
remoteChainSelector?bigintOptional chain selector to filter results to a single destination.

Returns

Promise<Record<string, TokenPoolRemote>>

Record mapping chain names to TokenPoolRemote configs.

Remarks

Handles 3 pool version branches:

  • v1.5: single remote pool via getRemotePool, standard rate limiters.
  • v1.6: multiple remote pools via getRemotePools, standard rate limiters.
  • v2.0+: multiple remote pools plus FTF (Faster-Than-Finality) rate limiters (fastOutboundRateLimiterState / fastInboundRateLimiterState).

Throws

CCIPTokenPoolChainConfigNotFoundError if remote token is not configured for a chain.

Overrides

Chain.getTokenPoolRemotes


getTokenPrice()

getTokenPrice(opts: { router: string; timestamp?: number; token: string; }): Promise<TokenPrice>

Defined in: evm/index.ts:1444

Fetch the on-chain USD price of a token from the FeeQuoter or PriceRegistry.

Parameters

ParameterTypeDescription
opts{ router: string; timestamp?: number; token: string; }-
opts.routerstring-
opts.timestamp?number-
opts.tokenstring-

Returns

Promise<TokenPrice>

Promise resolving to TokenPrice with the USD price per whole token.

Remarks

On EVM, the price contract is resolved via the Router's OnRamp: PriceRegistry for v1.2/v1.5 lanes, FeeQuoter for v1.6+ lanes. When timestamp is provided on EVM, the price is read at the block closest to that timestamp (requires archive node). On Solana and Aptos, the FeeQuoter is resolved directly from the Router config; timestamp is not yet supported and will be ignored.

Overrides

Chain.getTokenPrice


getTotalFeesEstimate()

getTotalFeesEstimate(opts: Omit<SendMessageOpts, "approveMax">): Promise<TotalFeesEstimate>

Defined in: evm/index.ts:1489

Estimate total fees for a cross-chain message.

Returns two components:

  • ccipFee: from Router.getFee(), denominated in the message's feeToken (native token if omitted). Includes gas, DON costs, and FeeQuoter-level token transfer overhead (all CCIP versions).
  • tokenTransferFee: pool-level BPS fee deducted from the transferred token amount (v2.0+ only). The recipient receives amount - feeDeducted on the destination chain. Absent on pre-v2.0 lanes or data-only messages.

Parameters

ParameterTypeDescription
optsOmit<SendMessageOpts, "approveMax">SendMessageOpts without approveMax

Returns

Promise<TotalFeesEstimate>

Promise resolving to TotalFeesEstimate

Overrides

Chain.getTotalFeesEstimate


getTransaction()

getTransaction(hash: string | TransactionReceipt): Promise<ChainTransaction>

Defined in: evm/index.ts:577

Fetch a transaction by its hash.

Parameters

ParameterTypeDescription
hashstring | TransactionReceiptTransaction hash

Returns

Promise<ChainTransaction>

Promise resolving to generic transaction details

Overrides

Chain.getTransaction


getVerifications()

getVerifications(opts: { indexer?: readonly string[] | NetworkType; offRamp: string; request: { lane: { destChainSelector: bigint; onRamp: string; sourceChainSelector: bigint; version: CCIPVersion; }; log: { blockTimestamp: number; }; message: { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; }; }; } & Pick<LogFilter, "page" | "startBlock" | "watch">): Promise<CCIPVerifications>

Defined in: evm/index.ts:2423

Look for a CommitReport at dest for given CCIP request. May be specialized by some subclasses.

Parameters

ParameterTypeDescription
opts{ indexer?: readonly string[] | NetworkType; offRamp: string; request: { lane: { destChainSelector: bigint; onRamp: string; sourceChainSelector: bigint; version: CCIPVersion; }; log: { blockTimestamp: number; }; message: { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; } | { messageId: string; sequenceNumber: bigint; }; }; } & Pick<LogFilter, "page" | "startBlock" | "watch">getVerifications options

Returns

Promise<CCIPVerifications>

CCIPVerifications

Overrides

Chain.getVerifications


listAccounts()

listAccounts(): Promise<string[]>

Defined in: evm/index.ts:461

Expose ethers provider's listAccounts, if provider supports it

Returns

Promise<string[]>


nextNonce()

nextNonce(address: string): Promise<number>

Defined in: evm/index.ts:471

Get the next nonce for a wallet address and increment the internal counter. Fetches from the network on first call, then uses cached value.

Parameters

ParameterTypeDescription
addressstringWallet address to get nonce for

Returns

Promise<number>

The next available nonce


resolveExecuteOpts()

protected resolveExecuteOpts(opts: ExecuteOpts): Promise<{ input: ExecutionInput; offRamp: string; } & { forceBuffer?: boolean; forceLookupTable?: boolean; gasLimit?: number; receiver?: string; tokensGasLimit?: number; txGasLimit?: number; }>

Defined in: chain.ts:1576

Resolves ExecuteOpts that may contain a messageId (API shorthand) into the canonical { offRamp, input } form required by generateUnsignedExecute.

When opts already contains input the method is a no-op and returns it unchanged. When opts contains only a messageId it calls apiClient.getExecutionInput and merges the result back with any extra opts fields (e.g. gasLimit). If opts.gasLimit is undefined and estimateReceiveExecution is available, try to estimate gasLimitOverride

Parameters

ParameterType
optsExecuteOpts

Returns

Promise<{ input: ExecutionInput; offRamp: string; } & { forceBuffer?: boolean; forceLookupTable?: boolean; gasLimit?: number; receiver?: string; tokensGasLimit?: number; txGasLimit?: number; }>

Throws

CCIPApiClientNotAvailableError if messageId is provided but no apiClient

Inherited from

Chain.resolveExecuteOpts


sendMessage()

sendMessage(opts: SendMessageOpts & { txGasLimit?: number; wallet: unknown; }): Promise<CCIPRequest<CCIPVersion>>

Defined in: evm/index.ts:1678

Send a CCIP message through a router using provided wallet.

Parameters

ParameterTypeDescription
optsSendMessageOpts & { txGasLimit?: number; wallet: unknown; }SendMessageOpts with chain-specific wallet for signing

Returns

Promise<CCIPRequest<CCIPVersion>>

Promise resolving to CCIP request with message details

Throws

CCIPWalletInvalidError if wallet is not a valid Signer

Overrides

Chain.sendMessage


simulateLockOrBurn()

simulateLockOrBurn(opts: { amount: bigint; destChainSelector: bigint; finality?: FinalityRequested; onRamp: string; originalSender?: string; receiver?: string; token: string; tokenArgs?: string; tokenReceiver?: string; }): Promise<{ destPoolData: string; destTokenAddress: string; destTokenAmount: bigint; sourcePoolAddress: string; }>

Defined in: evm/index.ts:2883

Simulate the source pool's lockOrBurn for a prospective token transfer and return the pool-reported destTokenAddress, destPoolData (the value the destination pool's releaseOrMint consumes as sourcePoolData) and destTokenAmount (the post-fee amount the OnRamp writes into the emitted message), plus the resolved source pool address.

Optional; currently implemented for EVM chains. Used by estimateReceiveExecution to feed the destination-liquidity simulation the same source pool data a real transfer would carry.

Parameters

ParameterTypeDescription
opts{ amount: bigint; destChainSelector: bigint; finality?: FinalityRequested; onRamp: string; originalSender?: string; receiver?: string; token: string; tokenArgs?: string; tokenReceiver?: string; }lane (onRamp, destChainSelector), token and amount (source decimals), and optionally originalSender, receiver, tokenReceiver, tokenArgs, and the requested finality
opts.amountbigint-
opts.destChainSelectorbigint-
opts.finality?FinalityRequested-
opts.onRampstring-
opts.originalSender?string-
opts.receiver?string-
opts.tokenstring-
opts.tokenArgs?string-
opts.tokenReceiver?string-

Returns

Promise<{ destPoolData: string; destTokenAddress: string; destTokenAmount: bigint; sourcePoolAddress: string; }>

resolved sourcePoolAddress, destTokenAddress + destPoolData as returned by the pool, and the post-fee destTokenAmount

Overrides

Chain.simulateLockOrBurn


typeAndVersion()

typeAndVersion(address: string): Promise<[string, string, string, string]>

Defined in: evm/index.ts:635

Fetch typeAndVersion for a given CCIP contract address.

Parameters

ParameterTypeDescription
addressstringCCIP contract address

Returns

Promise<[string, string, string, string]>

Promise resolving to tuple:

  • type - Parsed type of the contract, e.g. OnRamp
  • version - Parsed version of the contract, e.g. 1.6.0
  • typeAndVersion - Original (unparsed) typeAndVersion() string
  • suffix - Suffix of the version, if any (e.g. -dev)

Overrides

Chain.typeAndVersion


waitFinalized()

waitFinalized(opts: { abort?: AbortSignal; finality?: number | bigint | "finalized" | "latest"; pollInterval?: number; reorgSafetyBlocks?: number; } & { request: { log: { blockTimestamp: number | bigint; }; }; } | { log: { blockTimestamp: number | bigint; }; }): Promise<BlockInfo | undefined>

Defined in: chain.ts:842

Confirm a log tx is finalized or wait for it to be finalized.

Parameters

ParameterTypeDescription
opts{ abort?: AbortSignal; finality?: number | bigint | "finalized" | "latest"; pollInterval?: number; reorgSafetyBlocks?: number; } & { request: { log: { blockTimestamp: number | bigint; }; }; } | { log: { blockTimestamp: number | bigint; }; }Options containing the request, finality level, and optional cancel promise

Returns

Promise<BlockInfo | undefined>

Some block info at or after tx finalization

Throws

CCIPTransactionNotFinalizedError if the transaction is not included (e.g., due to a reorg)

Example

Wait for message finality

TypeScript
const request = await source.getMessagesInTx(txHash)
try {
await source.waitFinalized({ request: request[0] })
console.log('Transaction finalized')
} catch (err) {
if (err instanceof CCIPTransactionNotFinalizedError) {
console.log('Transaction not yet finalized')
}
}

Inherited from

Chain.waitFinalized


_getProvider()

static _getProvider(url: string, ctx?: { abort?: AbortSignal; fetch?: (input: string | Request | URL, init?: RequestInit) => Promise<Response>; } & { abort?: AbortSignal; } & WithLogger): Promise<JsonRpcApiProvider>

Defined in: evm/index.ts:486

Creates a JSON-RPC provider from a URL.

Parameters

ParameterTypeDescription
urlstringWebSocket (wss://) or HTTP (https://) endpoint URL.
ctx?{ abort?: AbortSignal; fetch?: (input: string | Request | URL, init?: RequestInit) => Promise<Response>; } & { abort?: AbortSignal; } & WithLogger-

Returns

Promise<JsonRpcApiProvider>

A ready JSON-RPC provider.


buildMessageForDest()

static buildMessageForDest(this: ChainStatic, message: MessageInput): AnyMessage

Defined in: chain.ts:2209

Returns a copy of a message, populating missing fields like extraArgs with defaults. It's expected to return a message suitable at least for basic token transfers.

Parameters

ParameterTypeDescription
thisChainStatic-
messageMessageInputAnyMessage (from source), containing at least receiver.

Returns

AnyMessage

A message suitable for sendMessage to this destination chain family.

Remarks

V3 (GenericExtraArgsV3) is auto-detected when any V3-only field is present (e.g. finality, ccvs, ccvArgs, executor, executorArgs, tokenReceiver, tokenArgs). Otherwise defaults to V2 (EVMExtraArgsV2).

Throws

CCIPArgumentInvalidError if extraArgs contains unknown fields for the detected version.

Inherited from

Chain.buildMessageForDest


decodeCommits()

static decodeCommits(log: { data: unknown; topics?: readonly string[]; }, lane?: Omit<Lane<CCIPVersion>, "destChainSelector">): { maxSeqNr: bigint; merkleRoot: string; minSeqNr: bigint; onRampAddress: string; sourceChainSelector: bigint; }[] | undefined

Defined in: evm/index.ts:694

Decodes commit reports from a log event.

Parameters

ParameterTypeDescription
log{ data: unknown; topics?: readonly string[]; }Log event with topics and data.
log.dataunknown-
log.topics?readonly string[]-
lane?Omit<Lane<CCIPVersion>, "destChainSelector">Lane info (required for CCIP v1.5 and earlier).

Returns

{ maxSeqNr: bigint; merkleRoot: string; minSeqNr: bigint; onRampAddress: string; sourceChainSelector: bigint; }[] | undefined

Array of CommitReport or undefined if not a valid commit event.

Throws

CCIPLogDataInvalidError if log data is not valid bytes

Throws

CCIPVersionRequiresLaneError if CCIP v1.5 event but no lane provided


decodeExtraArgs()

static decodeExtraArgs(extraArgs: BytesLike): EVMExtraArgsV1 & { _tag: "EVMExtraArgsV1"; } | GenericExtraArgsV3 & { _tag: "GenericExtraArgsV3"; } | SVMExtraArgsV1 & { _tag: "SVMExtraArgsV1"; } | EVMExtraArgsV1 & { allowOutOfOrderExecution: boolean; } & { _tag: "EVMExtraArgsV2"; } | EVMExtraArgsV1 & { allowOutOfOrderExecution: boolean; } & { receiverObjectIds: string[]; tokenReceiver: string; } & { _tag: "SuiExtraArgsV1"; } | undefined

Defined in: evm/index.ts:787

Decodes extra arguments from a CCIP message.

Parameters

ParameterTypeDescription
extraArgsBytesLikeEncoded extra arguments bytes.

Returns

Decoded extra arguments with tag, or undefined if unknown format.

EVMExtraArgsV1 & { _tag: "EVMExtraArgsV1"; }


GenericExtraArgsV3 & { _tag: "GenericExtraArgsV3"; }


SVMExtraArgsV1 & { _tag: "SVMExtraArgsV1"; }


EVMExtraArgsV1 & { allowOutOfOrderExecution: boolean; } & { _tag: "EVMExtraArgsV2"; }


EVMExtraArgsV1 & { allowOutOfOrderExecution: boolean; } & { receiverObjectIds: string[]; tokenReceiver: string; } & { _tag: "SuiExtraArgsV1"; }


undefined


decodeMessage()

static decodeMessage(log: { data: unknown; topics?: readonly string[]; }): CCIPMessage | undefined

Defined in: evm/index.ts:652

Decodes a CCIP message from a log event.

Parameters

ParameterTypeDescription
log{ data: unknown; topics?: readonly string[]; }Log event with topics and data.
log.dataunknown-
log.topics?readonly string[]-

Returns

CCIPMessage | undefined

Decoded CCIPMessage or undefined if not a valid CCIP message.

Throws

CCIPLogDataInvalidError if log data is not valid bytes

Throws

CCIPMessageDecodeError if message cannot be decoded


decodeReceipt()

static decodeReceipt(log: { data: unknown; topics?: readonly string[]; }): ExecutionReceipt | undefined

Defined in: evm/index.ts:750

Decodes an execution receipt from a log event.

Parameters

ParameterTypeDescription
log{ data: unknown; topics?: readonly string[]; }Log event with topics and data.
log.dataunknown-
log.topics?readonly string[]-

Returns

ExecutionReceipt | undefined

ExecutionReceipt or undefined if not a valid execution event.

Throws

CCIPLogDataInvalidError if log data is not valid bytes


encodeExtraArgs()

static encodeExtraArgs(args: ExtraArgs | undefined): string

Defined in: evm/index.ts:796

Encodes extra arguments for a CCIP message.

Parameters

ParameterTypeDescription
argsExtraArgs | undefinedExtra arguments to encode.

Returns

string

Encoded extra arguments as hex string.


fromProvider()

static fromProvider(provider: JsonRpcApiProvider, ctx?: ChainContext): Promise<EVMChain>

Defined in: evm/index.ts:539

Creates an EVMChain instance from an existing provider.

Parameters

ParameterTypeDescription
providerJsonRpcApiProviderJSON-RPC provider instance.
ctx?ChainContextcontext containing logger.

Returns

Promise<EVMChain>

A new EVMChain instance.


fromUrl()

static fromUrl(url: string, ctx?: ChainContext): Promise<EVMChain>

Defined in: evm/index.ts:565

Creates an EVMChain instance from an RPC URL.

Parameters

ParameterTypeDescription
urlstringWebSocket (wss://) or HTTP (https://) endpoint URL.
ctx?ChainContextOptional context containing logger and API client configuration.

Returns

Promise<EVMChain>

A new EVMChain instance connected to the specified network.

Throws

CCIPChainNotFoundError if chain cannot be identified from chainId

Example

TypeScript
// HTTP connection
const chain = await EVMChain.fromUrl('https://rpc.sepolia.org')

// With custom logger
const chain = await EVMChain.fromUrl(url, { logger: customLogger })

getAddress()

static getAddress(bytes: BytesLike): string

Defined in: evm/index.ts:806

Converts bytes to a checksummed EVM address.

Parameters

ParameterTypeDescription
bytesBytesLikeBytes to convert (must be 20 bytes or 32 bytes with leading zeros).

Returns

string

Checksummed EVM address.

Throws

CCIPAddressInvalidEvmError if bytes cannot be converted to a valid EVM address


getDestLeafHasher()

static getDestLeafHasher(lane: Lane, ctx?: WithLogger): LeafHasher

Defined in: evm/index.ts:1181

Gets the leaf hasher for computing Merkle proofs on the destination chain.

Parameters

ParameterTypeDescription
laneLaneLane configuration.
ctx?WithLoggerContext object containing logger.

Returns

LeafHasher

Leaf hasher function.

Throws

CCIPSourceChainUnsupportedError if source chain is not EVM for v1.2/v1.5

Throws

CCIPHasherVersionUnsupportedError if lane version is not supported


isTxHash()

static isTxHash(v: unknown): v is `0x${string}`

Defined in: evm/index.ts:823

Validates a transaction hash format for EVM

Parameters

ParameterType
vunknown

Returns

v is `0x${string}`


parse()

static parse(data: unknown): Record<string, unknown> | undefined

Defined in: evm/index.ts:1943

Parses raw data into typed structures.

Parameters

ParameterTypeDescription
dataunknownRaw data to parse.

Returns

Record<string, unknown> | undefined

Parsed data.