Skip to main content
A hook receiver is a destination-side contract that receives CCTP for non-USDC tokens and runs custom logic in the same transaction that delivers them. The receiver must implement executeWithCrossChainToken and return EXECUTE_SUCCESS. For background, see Hooks.

Prerequisites

Before you begin, ensure that you’ve:

Steps

1

Implement executeWithCrossChainToken

Create a contract that exposes the hook entrypoint the destination service calls. Restrict the caller to the local CrossChainTokenService, run your logic, and return EXECUTE_SUCCESS.
Solidity
Reverting inside executeWithCrossChainToken rolls back the entire crosschain transfer. Choose deliberately whether you want a failure to preserve the source-domain transfer or to deliver tokens without running your logic.
2

Deploy the receiver on every destination blockchain

Deploy the receiver on every blockchain where transfers will arrive with hook data. Each deployment must bind to the local CrossChainTokenService.
3

Send a transfer with hook data

On the source blockchain, encode the hook payload and call crossChainTransfer with destinationAddress set to the receiver contract and autoExecuteHookData set to true.
TypeScript
The claim and feeTotalAmount values are returned by the Iris fee-quote endpoint. Use a standard quote body (amount + feeToken only) unless your token is enabled for fast transfer. Do not include FORWARD when autoExecuteHookData is true—hook transfers require self-relay. See QuoteClaim.For BURN_MINT or LOCK_UNLOCK tokens, approve the source TokenManager (not the service) before calling crossChainTransfer.
4

Relay the message to the destination

Iris does not relay transfers that carry hook data with autoExecuteHookData set to true. After Iris attests the source blockchain message, you or your own relayer must call receiveMessage on the destination MessageTransmitterV2 to deliver the transfer and trigger the hook. See Self-relay required for hook transfers.When the destination service receives the message, it delivers the tokens and calls your receiver’s hook in the same transaction.