Message Format

Formatting arbitrary and application-specific CCTP messages

Message Header

The top-level message header format is standard for all messages passing through CCTP:

version4uint320Version identifier
sourceDomain4uint324Source domain id
destinationDomain4uint328Destination domain id
nonce8uint6412Unique message nonce
sender32bytes3220Address of MessageTransmitter caller on source domain
recipient32bytes3252Address to handle message body on destination domain
destinationCaller32bytes3284Address permitted to call MessageTransmitter on destination domain, or bytes32(0) if message can be received by any address
messageBodydynamicbytes116Application-specific message to be handled by recipient


Why we use bytes32 type for addresses

CCTP 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.

Message Body

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:

version4uint320Version identifier
burnToken32bytes324Address of burned token on source domain
mintRecipient32bytes3236Address to receive minted tokens on destination domain
amount32uint25668Amount of burned tokens
messageSender32bytes32100Address of caller of depositForBurn (or depositForBurnWithCaller) on source domain

Message Nonce

A message nonce is a unique identifier for a message that can only be used once on the destination domain. 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.