This is CCTP V1 version. For the latest version, see CCTP.
Contract responsibilities
- TokenMessenger: Entrypoint for cross-chain USDC transfer. Routes messages
to burn USDC on a source chain, and mint USDC on a destination chain.
- MessageTransmitter: Generic message passing. Sends all messages on the
source chain, and receives all messages on the destination chain.
- TokenMinter: Responsible for minting and burning USDC. Contains
chain-specific settings used by burners and minters.
- Message: Provides helper functions for cross-chain transfers, such as
bytes32ToAddress and addressToBytes32, which are commonly used when
bridging between EVM and non-EVM chains. These conversions are simple: prepend
12 zero bytes to an EVM address, or strip them to convert back.
Full contract source code is
available on GitHub.
Mainnet contract addresses
TokenMessenger: Mainnet
MessageTransmitter: Mainnet
TokenMinter: Mainnet
Message: Mainnet
Testnet contract addresses
TokenMessenger: Testnet
MessageTransmitter: Testnet
TokenMinter: Testnet
Message: Testnet
CCTP V1 Interface
This section provides the CCTP V1 Smart Contract Interface exposed by CCTP
V1, outlining the available functions, and their parameters.
The interface below serves as a reference for permissionless messaging functions
exposed by the TokenMessenger and MessageTransmitter functions. The full
ABIs are
available on GitHub.
TokenMessenger
depositForBurn
Deposits and burns tokens from sender to be minted on destination domain. Minted
tokens will be transferred to mintRecipient.
Parameters
| Field | Type | Description |
|---|
amount | uint256 | Amount of tokens to deposit and burn |
destinationDomain | uint32 | Destination domain identifier |
mintRecipient | bytes32 | Address of mint recipient on destination domain |
burnToken | address | Address of contract to burn deposited tokens on local domain |
depositForBurnWithCaller
Same as depositForBurn but with an additional parameter, destinationCaller.
This parameter specifies which address has permission to call receiveMessage
on the destination domain for the message.
Parameters
| Field | Type | Description |
|---|
amount | uint256 | Amount of tokens to deposit and burn |
destinationDomain | uint32 | Destination domain identifier |
mintRecipient | bytes32 | Address of mint recipient on destination domain |
burnToken | address | Address of contract to burn deposited tokens on local domain |
destinationCaller | bytes32 | Address of caller on the destination domain |
replaceDepositForBurn
Replace a BurnMessage to change the mint recipient and/or destination caller.
Allows the sender of a previous BurnMessage (created by depositForBurn or
depositForBurnWithCaller) to send a new BurnMessage to replace the original.
The new BurnMessage will reuse the amount and burn token of the original,
without requiring a new deposit.
This is useful in situations where the user specified an incorrect address and
has no way to safely mint the previously burned USDC.
The sender of the original depositForBurn has access to call
replaceDepositForBurn. The resulting mint will supersede the original mint,
as long as the original mint has not confirmed yet onchain. When using a
third-party app/bridge that integrates with CCTP V1 to burn and mint USDC, it
is the choice of the app/bridge if and when to replace messages on behalf of
users. When sending USDC to smart contracts, be aware of the functionality
that those contracts have and their respective trust model.
Parameters
| Field | Type | Description |
|---|
originalMessage | bytes calldata | Original message bytes (to replace) |
originalAttestation | bytes calldata | Original attestation bytes |
newDestinationCaller | bytes32 | The new destination caller, which may be the same as the original destination caller, a new destination caller, or an empty destination caller, indicating that any destination caller is valid |
newMintRecipient | bytes32 | The new mint recipient, which may be the same as the original mint recipient, or different |
MessageTransmitter
receiveMessage
Messages with a given nonce can only be broadcast successfully once for a pair
of domains. The message body of a valid message is passed to the specified
recipient for further processing.
Parameters
| Field | Type | Description |
|---|
message | bytes calldata | Message bytes |
attestation | bytes calldata | Signed attestation of message |
sendMessage
Sends a message to the destination domain and recipient. Emits a MessageSent
event which will be attested by Circle’s attestation service (Iris).
Parameters
| Field | Type | Description |
|---|
destinationDomain | uint32 | Destination domain identifier |
recipient | bytes32 | Address to handle message body on destination domain |
messageBody | bytes calldata | App-specific message to be handled by recipient |
sendMessageWithCaller
Same as sendMessage but with an additional parameter, destinationCaller.
This parameter specifies which address has permission to call receiveMessage
on the destination domain for the message.
Parameters
| Field | Type | Description |
|---|
destinationDomain | uint32 | Destination domain identifier |
recipient | bytes32 | Address of message recipient on destination domain |
destinationCaller | bytes32 | Address of caller on the destination domain |
messageBody | bytes calldata | App-specific message to be handled by recipient |
replaceMessage
Replace a message with a new message body and/or destination caller. The
originalAttestation must be a valid attestation of originalMessage, produced
by Circle’s attestation service (Iris).
Parameters
| Field | Type | Description |
|---|
originalMessage | bytes calldata | Original message to replace |
originalAttestation | bytes calldata | Attestation of originalMessage |
newMessageBody | bytes calldata | New message body of replaced message |
newDestinationCaller | bytes32 | The new destination caller, which may be the same as the original destination caller, a new destination caller, or an empty destination caller (bytes32(0), indicating that any destination caller is valid) |
WHAT’S NEXT