circle-cctp
Circle CCTP
Produce a burn-to-mint ledger for one Circle CCTP transfer. This workflow covers native USDC CCTP; token swaps, Circle Gateway and CCTP for other configured assets require their own contracts and terms.
Establish version and message identity
Collect source hash, source/destination chains and domains, USDC contracts, raw amount, depositor and encoded mint recipient. Domain IDs are CCTP identifiers, not EVM chain IDs. Resolve CCTP version, supported domains, contract addresses and finality from current Circle sources. Never combine a V1 burn with a V2 receive path.
For planning, inspect burn allowance, max fee, requested finality, destination caller restriction and recipient encoding. Fast-transfer fees, forwarding-service fees and destination gas are separate costs. Return unsigned terms; do not burn, sign an authorization or enable forwarding to test readiness.
Read burn and attestation
Confirm source receipt, actual burn event and emitted message. Save message bytes/hash and source domain before waiting. Query Circle's current message endpoint in reads, matching the correct message if a source transaction emitted several. An attestation can remain pending until the required source finality; a successful source receipt is not a destination balance.
Verify the returned source/destination domains, token, recipient, amount and finality against the saved intent. Pending or rate-limited retrieval gets bounded backoff; do not poll indefinitely or switch to a new burn.
Reconcile mint or recovery
For a completed transfer inspect destination receiveMessage receipt/events and actual USDC credit to the encoded recipient. Check used-message/nonce state with the deployed version's ABI. A forwarding service's accepted status is weaker than that proof.