cctp.receive
Documentation for eth_defi.cctp.receive Python module.
Circle CCTP V2 message receiving.
Complete cross-chain USDC transfers by relaying attestation to the destination chain’s MessageTransmitterV2.
After obtaining the attestation from eth_defi.cctp.attestation,
call receiveMessage() on the destination chain to mint USDC.
Example:
from eth_defi.cctp.receive import prepare_receive_message
receive_fn = prepare_receive_message(
web3_destination,
message=attestation.message,
attestation=attestation.attestation,
)
tx_hash = receive_fn.transact({"from": relayer})
Functions
|
Build a bound |
- prepare_receive_message(web3, message, attestation)
Build a bound
receiveMessage()call on MessageTransmitterV2.This relays the attestation to the destination chain, causing USDC to be minted to the recipient specified in the original
depositForBurn()call.Anyone can call this function (unless
destinationCallerwas set in the original burn). No special permissions are required.- Parameters
- Returns
Bound contract function ready to be transacted
- Return type
web3.contract.contract.ContractFunction