CCIP v1.6.0 Aptos Events API Reference
Events
This document details the events emitted by the core CCIP modules on Aptos.
onramp
ccip_send
When the ccip_send entry function completes successfully, the onramp module emits a single event, CCIPMessageSent. This event signifies that a new cross-chain message has been initiated and sent from Aptos.
#[event]
struct CCIPMessageSent has store, drop {
    dest_chain_selector: u64,
    sequence_number: u64,
    message: Aptos2AnyRampMessage
}
| Field | Type | Description | 
|---|---|---|
| dest_chain_selector | u64 | The chain selector for the destination chain. This is the unique identifier for the target chain within the CCIP network (e.g., 16015286601757825753for Ethereum Sepolia). | 
| sequence_number | u64 | A unique, monotonically increasing number for each message sent to a specific destination chain. This helps in ordering messages and is unique per destination. | 
| message | Aptos2AnyRampMessage | The complete cross-chain message payload. This struct contains detailed information, including the sender's Aptos address, the receiver's address on the destination chain, the arbitrary datapayload, token transfer details, and fee information. | 
offramp
execute_single_report
After successfully processing an incoming message from a source chain, the offramp module emits an ExecutionStateChanged event to record the outcome of the message execution on Aptos.
#[event]
struct ExecutionStateChanged has store, drop {
    source_chain_selector: u64,
    sequence_number: u64,
    message_id: vector<u8>,
    message_hash: vector<u8>,
    state: u8
}
| Field | Type | Description | 
|---|---|---|
| source_chain_selector | u64 | The chain selector identifying the chain where the message originated. | 
| sequence_number | u64 | The sequence number of the message from the source chain. This corresponds to the sequence_numberin theCCIPMessageSentevent that was emitted on the source chain. | 
| message_id | vector<u8> | The unique, global identifier for the cross-chain message. This ID is consistent across both the source and destination chains and is the primary key for tracking a CCIP transaction. | 
| message_hash | vector<u8> | The hash of the message leaf in the Merkle tree. This value is used internally for verifying the message against a committed Merkle root, ensuring its authenticity and integrity. | 
| state | u8 | The outcome of the execution. Since Aptos transactions are atomic (either fully succeed or fail), a successfully processed CCIP message will always result in an EXECUTION_STATE_SUCCESS. |