ITokenMessengerV2
Title: ITokenMessengerV2
Author: Vendored minimal subset of Circle's CCTP v2 TokenMessengerV2
(https://github.com/circlefin/evm-cctp-contracts). Upstream license: Apache-2.0. Upstream compiles at
Solidity 0.7.6 — this subset is REDECLARED at pragma ^0.8.30. Only the depositForBurn /
depositForBurnWithHook methods the CCTPBridgeAdapter calls are re-declared; do NOT add an
evm-cctp-contracts dependency.
Source-side entrypoint of CCTP v2: burns amount of burnToken (USDC) on the local chain and
emits the burn message an off-chain Circle attestation service (Iris) later attests for minting on
the destination domain. CCTP is a TOKEN BRIDGE, not an ERC-7786 message gateway.
Functions
depositForBurn
Burns amount of burnToken and signals a mint of the same amount on destinationDomain.
function depositForBurn(
uint256 amount,
uint32 destinationDomain,
bytes32 mintRecipient,
address burnToken,
bytes32 destinationCaller,
uint256 maxFee,
uint32 minFinalityThreshold
) external;Parameters
| Name | Type | Description |
|---|---|---|
| amount | uint256 | Amount of burnToken to burn (pulled from the caller — the adapter). |
| destinationDomain | uint32 | CCTP domain id of the destination chain (admin-registered, e.g. Eth 0). |
| mintRecipient | bytes32 | Recipient on the destination domain, as a right-aligned bytes32. |
| burnToken | address | Local token to burn (USDC). |
| destinationCaller | bytes32 | If non-zero, the only address permitted to call receiveMessage on thedestination; bytes32(0) makes the mint permissionless. |
| maxFee | uint256 | Maximum fee (in burnToken units) payable to CCTP for the transfer. |
| minFinalityThreshold | uint32 | Minimum finality (1000 = fast-eligible / soft finality, 2000 = standard / finalized) before Iris attests. |
depositForBurnWithHook
Same as depositForBurn but additionally carries hookData in the burn message. CCTP does NOT
execute the hook — it is emitted verbatim in the BurnMessageV2 body and the DESTINATION
recipient (here, the adapter's inbound relay via CCTPHookExecutor) is what interprets it.
function depositForBurnWithHook(
uint256 amount,
uint32 destinationDomain,
bytes32 mintRecipient,
address burnToken,
bytes32 destinationCaller,
uint256 maxFee,
uint32 minFinalityThreshold,
bytes calldata hookData
) external;Parameters
| Name | Type | Description |
|---|---|---|
| amount | uint256 | Amount of burnToken to burn (pulled from the caller — the adapter). |
| destinationDomain | uint32 | CCTP domain id of the destination chain (admin-registered, e.g. Eth 0). |
| mintRecipient | bytes32 | Recipient on the destination domain, as a right-aligned bytes32. |
| burnToken | address | Local token to burn (USDC). |
| destinationCaller | bytes32 | If non-zero, the only address permitted to call receiveMessage on thedestination; bytes32(0) makes the mint permissionless. |
| maxFee | uint256 | Maximum fee (in burnToken units) payable to CCTP for the transfer. |
| minFinalityThreshold | uint32 | Minimum finality (1000 = fast-eligible / soft finality, 2000 = standard / finalized) before Iris attests. |
| hookData | bytes | Opaque hook bytes appended to the burn message for the destination recipient. |