This is CCTP V1 version. For the latest version, see CCTP.
This is CCTP V1 version. For the latest version, see CCTP.
The top-level message header format is standard for all messages passing through CCTP V1.
Field | Offset | Solidity Type | Length (bytes) | Description |
---|---|---|---|---|
version | 0 | uint32 | 4 | Version identifier - use 0 for CCTP V1 |
sourceDomain | 4 | uint32 | 4 | Source domain ID |
destinationDomain | 8 | uint32 | 4 | Destination domain ID |
nonce | 12 | uint64 | 8 | Unique message nonce (see Sequential Nonces) |
sender | 20 | bytes32 | 32 | Address of MessageTransmitter caller on source domain |
recipient | 52 | bytes32 | 32 | Address to handle message body on destination domain |
destinationCaller | 84 | bytes32 | 32 | Address permitted to call MessageTransmitter on destination domain, or bytes32(0) if message can be received by any address |
messageBody | 116 | bytes | dynamic | Application-specific message to be handled by recipient |
A message nonce is a unique identifier for a message that can only be used once on the destination domain. In CCTP V1, message nonces are implemented using Sequential Nonces, where the next available nonce on a source domain is an integer. On the destination domain, messages can be received in any order, and used nonces are stored as a hash of the source domain and nonce integer value.
Why we use bytes32
type for addresses
CCTP V1 is built to support EVM chains, which use 20 byte addresses, and
non-EVM chains, many of which use 32 byte addresses. We provide a
Message.sol library
as a reference implementation for converting between address and bytes32
in
Solidity.
The message format includes a dynamically sized messageBody
field, used for
application-specific messages. For example, TokenMessenger defines a
BurnMessage
with data related to cross-chain transfers.
Field | Offset | Solidity Type | Length (bytes) | Description |
---|---|---|---|---|
version | 0 | uint32 | 4 | Version identifier (0, for CCTP V1) |
burnToken | 4 | bytes32 | 32 | Address of burned token on source domain |
mintRecipient | 36 | bytes32 | 32 | Address to receive minted tokens on destination domain |
amount | 68 | uint256 | 32 | Amount of burned tokens |
messageSender | 100 | bytes32 | 32 | Address of caller of depositForBurn (or depositForBurnWithCaller ) on source domain |
WHAT'S NEXT