Skip to content
Lattice

IRouterClient

Git Source

Title: IRouterClient (Chainlink CCIP) — vendored subset

Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Vendored minimal subset of Chainlink CCIP's IRouterClient (https://github.com/smartcontractkit/chainlink-ccip). Upstream license: MIT.

Minimal vendored subset of Chainlink CCIP's IRouterClient: the source-side ccipSend/getFee surface used by CCIPGatewayAdapter. getSupportedTokens is intentionally omitted — upstream it lives on IEVM2AnyOnRampClient, not here.

Verified verbatim against smartcontractkit/chainlink-ccip @ main commit 828897a (2026-06-24): chains/evm/contracts/interfaces/IRouterClient.sol. Routes by uint64 chain selector (NOT chainId). feeToken == address(0) ⇒ pay native via msg.value; an ERC-20 fee token is pulled via the router.

Note:

  • lattice-source: Chainlink

Functions

isChainSupported

Whether the router has a configured route to destChainSelector.

function isChainSupported(uint64 destChainSelector) external view returns (bool supported);

Parameters

NameTypeDescription
destChainSelectoruint64

Returns

NameTypeDescription
supportedbool

getFee

Quotes the fee (in the message's feeToken) for message to destinationChainSelector.

Must be quoted with the EXACT message later passed to ccipSend or the send may revert.

function getFee(uint64 destinationChainSelector, Client.EVM2AnyMessage memory message)
        external
        view
        returns (uint256 fee);

Parameters

NameTypeDescription
destinationChainSelectoruint64
messageClient.EVM2AnyMessage

Returns

NameTypeDescription
feeuint256

ccipSend

Submits message to destinationChainSelector; returns the CCIP message id.

function ccipSend(uint64 destinationChainSelector, Client.EVM2AnyMessage calldata message)
        external
        payable
        returns (bytes32);

Parameters

NameTypeDescription
destinationChainSelectoruint64
messageClient.EVM2AnyMessage

Returns

NameTypeDescription
<none>bytes32

Errors

UnsupportedDestinationChain

The destination chain selector is not configured / supported by the router.

error UnsupportedDestinationChain(uint64 destChainSelector);

Parameters

NameTypeDescription
destChainSelectoruint64

InsufficientFeeTokenAmount

The fee-token amount supplied is below the quoted fee.

error InsufficientFeeTokenAmount();

InvalidMsgValue

msg.value was supplied with an ERC-20 fee token, or mismatched the native fee.

error InvalidMsgValue();