API Version: v1.6.3

CCIP v1.6.3 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.

Git Source

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

NameTypeDescription
messageIdbytes32Unique identifier generated with source chain's encoding scheme
sourceChainSelectoruint64CCIP chain selector of the source chain (not chainId)
destChainSelectoruint64CCIP chain selector of the destination chain (not chainId)
sequenceNumberuint64Sequence number, not unique across lanes
nonceuint64Nonce 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

NameTypeDescription
sourcePoolAddressaddressSource pool EVM address (trusted)
destTokenAddressbytesEVM address of the destination token (untrusted)
extraDatabytesOptional pool data transferred to destination chain
amountuint256Amount of tokens to transfer
destExecDatabytesDestination 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

NameTypeDescription
headerRampMessageHeaderMessage header with identifiers and routing information
senderaddressSender address on the source chain
databytesArbitrary data payload supplied by the message sender
receiverbytesReceiver address on the destination chain
extraArgsbytesDestination-chain specific args (e.g., gasLimit for EVM)
feeTokenaddressToken used to pay fees
feeTokenAmountuint256Amount of fee token paid
feeValueJuelsuint256Fee amount denominated in Juels
tokenAmountsEVM2AnyTokenTransfer[]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;

Get the latest Chainlink content straight to your inbox.