CCTP

CCTP EVM Contracts and Interfaces

CCTP smart contracts for EVM-compatible blockchains
  • TokenMessengerV2: Entrypoint for cross-chain USDC transfer. Routes messages to burn USDC on a source chain, and mint USDC on a destination chain.

  • MessageTransmitterV2: Generic message passing. Sends all messages on the source chain, and receives all messages on the destination chain.

  • TokenMinterV2: Responsible for minting and burning USDC. Contains chain-specific settings used by burners and minters.

  • MessageV2: 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.

This section provides the Smart Contract Interface exposed by CCTP, outlining the available functions, and their parameters.

The interface below serves as a reference for permissionless messaging functions exposed by the TokenMessengerV2 and MessageTransmitterV2 functions.

Deposits and burns tokens from sender to be minted on destination domain, and emits a crosschain message by calling MessageTransmitter's sendMessage function. Minted tokens will be transferred to mintRecipient.

Parameters

FieldTypeDescription
amountuint256Amount of tokens to deposit and burn
destinationDomainuint32Destination domain ID to send the message to
mintRecipientbytes32Address of mint recipient on destination domain (must be converted to 32 byte array, that is, prefix with zeros if needed)
burnTokenaddressAddress of contract to burn deposited tokens on local domain
destinationCallerbytes32Address as bytes32 which can call receiveMessage on destination domain. If set to bytes32(0), any address can call receiveMessage
maxFeeuint256Max fee paid for fast burn, specified in units of burnToken
minFinalityThresholduint32Minimum finality threshold at which burn will be attested

Deposits and burns tokens from sender to be minted on destination domain, and emits a cross-chain message with additional hook data appended. In addition to the standard depositForBurn parameters, depositForBurnWithHook accepts a dynamic-length hookData parameter, allowing the caller to include additional metadata to the attested message, which can be used to trigger custom logic on the destination chain.

Parameters

FieldTypeDescription
amountuint256Amount of tokens to burn
destinationDomainuint32Destination domain to send the message to
mintRecipientbytes32Address of mint recipient on destination domain (must be converted to 32 byte array, that is, prefix with zeros if needed)
burnTokenaddressAddress of contract to burn deposited tokens on local domain
destinationCallerbytes32Address as bytes32 which can call receiveMessage on destination domain. If set to bytes32(0), any address can call receiveMessage
maxFeeuint256Max fee paid for fast burn, specified in units of burnToken
minFinalityThresholduint32Minimum finality threshold at which burn will be attested
hookDatabytesAdditional metadata attached to the attested message, which can be used to trigger custom logic on the destination chain

Calculates and returns the minimum fee required for a given amount in a Standard Transfer. If the minFee (per unit of burnToken) is non-zero, the specified maxFee must be at least the returned minimum fee. Otherwise, the burn will revert onchain.

Parameters

FieldTypeDescription
amountuint256The amount used to compute the minimum fee. Must be greater than 1 if standard fee is applied

Handles incoming message received by the local MessageTransmitter, and takes the appropriate action. For a burn message, mints the associated token to the requested recipient on the local domain. Validates the function sender is the local MessageTransmitter, and the remote sender is a registered remote TokenMessenger for remoteDomain.

Parameters

FieldTypeDescription
remoteDomainuint32The domain where the message originated from
senderbytes32The sender of the message (remote TokenMessenger)
finalityThresholdExecuteduint32Specifies the level of finality Iris signed the message with
messageBodybytes (dynamic length)The message body bytes

Handles incoming message received by the local MessageTransmitter, and takes the appropriate action. For a burn message, mints the associated token to the requested recipient on the local domain. Validates the function sender is the local MessageTransmitter, and the remote sender is a registered remote TokenMessenger for remoteDomain.

Similar to handleReceiveFinalizedMessage, but is called for messages which are not finalized (finalityThresholdExecuted < 2000).

Unlike handleReceiveFinalizedMessage, handleReceiveUnfinalizedMessage has the following messageBody parameters:

  • expirationBlock. If expirationBlockblockNumber on the destination domain, the message will revert and must be re-signed without the expiration block.
  • feeExecuted. If nonzero, the feeExecuted is minted to the feeRecipient.

Parameters

FieldTypeDescription
remoteDomainuint32The domain where the message originated from
senderbytes32The sender of the message (remote TokenMessenger)
finalityThresholdExecuteduint32Specifies the level of finality Iris signed the message with
messageBodybytes (dynamic length)The message body bytes (see Message format)

Receive message on destination chain by passing message and attestation. Emits MessageReceived event. 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

FieldTypeDescription
messagebytesEncoded message (see Message format)
attestationbytesSigned attestation received from attestation service (Iris)

Sends a message to the recipient on the destination domain. Emits a MessageSent event which will be attested by Circle's attestation service.

Parameters

FieldTypeDescription
destinationDomainuint32Destination domain ID to send the message to
recipientbytes32Address of recipient on destination domain
destinationCallerbytes32Address as bytes32 which can call receiveMessage on destination domain. If set to bytes32(0), any address can call receiveMessage
minFinalityThresholduint32Minimum finality threshold requested.

Initially, supported values for minFinalityThreshold are [1, 2000]. A value outside of the support values range will be interpreted as 2000 (finalized) by the attestation service (Iris).

For a value within the supported range, the attestation service (Iris) will attest the message with a finalityThresholdExecuted >= minFinalityThreshold.

Initial thresholds supported:

1000: Confirmed
2000: Finalized
messageBodybytesApp-specific message to be handled by recipient
Did this page help you?
© 2023-2025 Circle Technology Services, LLC. All rights reserved.