wait_for_cctp_attestation
Documentation for eth_defi.cctp.attestation.wait_for_cctp_attestation function.
- wait_for_cctp_attestation(source_chain_id, dest_chain_id, burn_tx_hash, dest_safe_address, amount, simulate=False, test_attester=None, timeout=3600.0, nonce_base=999999000)
Wait for CCTP attestation and return message + attestation bytes.
Convenience wrapper that handles both simulation (forged attestation) and production (Iris API polling) modes.
In simulation mode, crafts a fake CCTP message and forges an attestation using the provided test attester key. In production mode, polls the Circle Iris API until the attestation is ready.
- Parameters
source_chain_id (int) – Numeric chain ID of the source chain (where USDC was burned).
dest_chain_id (int) – Numeric chain ID of the destination chain (where USDC will be minted).
burn_tx_hash (str) – Transaction hash of the
depositForBurn()call.dest_safe_address (str) – Address that will receive the minted USDC on the destination chain.
amount (int) – Amount of USDC burned (in raw units, e.g. 1_000_000 for 1 USDC).
simulate (bool) – If
True, forge attestation locally usingtest_attester.test_attester (LocalAccount | None) – LocalAccount used to forge attestation in simulation mode. Required when
simulate=True.timeout (float) – Maximum seconds to wait for attestation (production mode only).
nonce_base (int) – Base nonce for forged messages in simulation mode.
- Returns
Tuple of
(message_bytes, attestation_bytes)ready forreceive_usdc_cctp().- Return type