Circle CCTP v2 on Optimism

Deployments

NameAddress
TokenMessenger0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d (opens in a new tab)
MessageTransmitter0x81D40F21F12A8F0E3252Bccb954D722d4c464B64 (opens in a new tab)
USDC0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85 (opens in a new tab)

Action: bridge

Parameters

NameTypeDescription
targetsstring[] (required)Destination Chains prefixes | Chains descriptions
recipientstring (required)Recipient address on the destination chain(s)
🚫

The source and destination blockchains cannot be the same. If the same blockchain is provided in the targets parameter, an error will be thrown.

USDC · approve

Approve TokenMessenger to spend USDC tokens on behalf of the avatar.

  • Contract: USDC

  • Function: approve(address,uint256)

    ParameterConstraint
    spenderequal to TokenMessenger
    amount-

TokenMessenger · depositForBurn

Bridge USDC tokens to the recipient address on the destination blockchain.

  • Contract: TokenMessenger

  • Function: depositForBurn(uint256,uint32,bytes32,address,bytes32,uint256,uint32)

    ParameterConstraint
    amount-
    destinationDomainequal to DOMAIN (see reference table below)
    mintRecipientequal to recipient (left-padded with zeros to 32 bytes)
    burnTokenequal to USDC
    destinationCaller-
    maxFee-
    minFinalityThreshold -

Blockchain-to-Domain Mapping:

BlockchainDomain
Ethereum0
Optimism2
Arbitrum3
Base6

Action: receive

Parameters

NameTypeDescription
targetsstring[] (required)Source Chains prefixes | Chains descriptions
senderstring (required)Sender address on the source chain(s)
recipientstring (required)Recipient address on the destination chain(s)
🚫

The source and destination blockchains cannot be the same. If the same blockchain is provided in the targets parameter, an error will be thrown.

TokenMessenger · receiveMessage

Claim USDC tokens for the recipient address on the destination blockchain.

  • Contract: TokenMessenger
  • Function: receiveMessage(bytes,bytes)
ParameterConstraint
messageSee breakdown below
attestation-

Breakdown of message Parameter Scoping
The message parameter contains structured data that is scoped to enforce specific values. The table below details how each part is extracted and validated.

FieldBytes (from/to)ScopedDescription
Version0-3NoMessage format version
Source Domain4-7YesExpected source blockchain domain
Destination Domain8-11YesExpected destination blockchain domain
Nonce12-43NoUnique transaction identifier
Source Token Messenger Address44-75YesToken Messenger on the source blockchain (12-byte zero-padding + 20-byte address)
Destination Token Messenger Address76-107YesToken Messenger on the destination blockchain (12-byte zero-padding + 20-byte address)
Destination Caller108-139NoAuthorized caller on the destination domain
Minimum Finality Threshold140-143NoThe minimum finality at which a burn message will be attested to
Finality Threshold Executed144-147NoThe finality threshold at which the message was attested to
Selector148-151NoFunction selector
Bridged Token Address (USDC)152-183YesUSDC token address on the source blockchain (12-byte zero-padding + 20-byte address)
Recipient Address184-215YesActual recipient address (12-byte zero-padding + 20-byte address)
Amount216-247NoBridged amount
Sender Address248-279YesActual sender address (12-byte zero-padding + 20-byte address)