CCIP v1.6.1 Internal Library API Reference
Internal
A library for CCIP internal definitions common to multiple contracts. Provides core data structures and utilities for cross-chain message processing.
Enums
MessageExecutionState
Enum listing the possible message execution states within the offRamp contract.
enum MessageExecutionState {
UNTOUCHED,
IN_PROGRESS,
SUCCESS,
FAILURE
}
Structs
RampMessageHeader
Structure representing a family-agnostic header for OnRamp and OffRamp messages.
struct RampMessageHeader {
bytes32 messageId;
uint64 sourceChainSelector;
uint64 destChainSelector;
uint64 sequenceNumber;
uint64 nonce;
}
Properties
| Name | Type | Description |
|---|---|---|
messageId | bytes32 | Unique identifier generated with source chain's encoding scheme |
sourceChainSelector | uint64 | CCIP chain selector of the source chain (not chainId) |
destChainSelector | uint64 | CCIP chain selector of the destination chain (not chainId) |
sequenceNumber | uint64 | Sequence number, not unique across lanes |
nonce | uint64 | Nonce for this lane and sender, not unique across senders/lanes |
EVM2AnyTokenTransfer
Structure representing token transfers from EVM chains to any destination chain.
struct EVM2AnyTokenTransfer {
address sourcePoolAddress;
bytes destTokenAddress;
bytes extraData;
uint256 amount;
bytes destExecData;
}
Properties
| Name | Type | Description |
|---|---|---|
sourcePoolAddress | address | Source pool EVM address (trusted) |
destTokenAddress | bytes | EVM address of the destination token (untrusted) |
extraData | bytes | Optional pool data transferred to destination chain |
amount | uint256 | Amount of tokens to transfer |
destExecData | bytes | Destination chain execution data (e.g., gas for EVM chains) |
EVM2AnyRampMessage
Structure representing a family-agnostic message emitted from the OnRamp.
struct EVM2AnyRampMessage {
RampMessageHeader header;
address sender;
bytes data;
bytes receiver;
bytes extraArgs;
address feeToken;
uint256 feeTokenAmount;
uint256 feeValueJuels;
EVM2AnyTokenTransfer[] tokenAmounts;
}
Properties
| Name | Type | Description |
|---|---|---|
header | RampMessageHeader | Message header with identifiers and routing information |
sender | address | Sender address on the source chain |
data | bytes | Arbitrary data payload supplied by the message sender |
receiver | bytes | Receiver address on the destination chain |
extraArgs | bytes | Destination-chain specific args (e.g., gasLimit for EVM) |
feeToken | address | Token used to pay fees |
feeTokenAmount | uint256 | Amount of fee token paid |
feeValueJuels | uint256 | Fee amount denominated in Juels |
tokenAmounts | EVM2AnyTokenTransfer[] | Array of tokens and amounts to transfer |
State Variables
CHAIN_FAMILY_SELECTOR_EVM
bytes4 public constant CHAIN_FAMILY_SELECTOR_EVM = 0x2812d52c;
CHAIN_FAMILY_SELECTOR_SVM
bytes4 public constant CHAIN_FAMILY_SELECTOR_SVM = 0x1e10bdc4;
CHAIN_FAMILY_SELECTOR_APTOS
bytes4 public constant CHAIN_FAMILY_SELECTOR_APTOS = 0xac77ffec;
CHAIN_FAMILY_SELECTOR_SUI
bytes4 public constant CHAIN_FAMILY_SELECTOR_SUI = 0xc4e05953;
CHAIN_FAMILY_SELECTOR_TVM
bytes4 public constant CHAIN_FAMILY_SELECTOR_TVM = 0x647e2ba9;