CCIP v1.6.0 TON Events API Reference
Events
TON contracts emit events by calling emit(topic, data) ā a convention that serializes the topic (a 32-bit CRC) and data into an external message. Events can be observed by indexers and explorers.
Receiver Events
CCIPMessageReceived
Emitted by receiver contracts to signal a successful CCIP message processing. This is a convention used in the Starter Kit examples, not a protocol-level event.
const RECEIVED_MESSAGE_TOPIC = 0xc5a40ab3; // crc32("Receiver_CCIPMessageReceived")
struct CCIPMessageReceived {
message: Any2TVMMessage;
}
OnRamp Events
CCIPMessageSent
Emitted by the OnRamp when a Router_CCIPSend message is accepted and a CCIP message is committed to the cross-chain pipeline.
const CCIP_MESSAGE_SENT_TOPIC: int = stringCrc32("CCIPMessageSent");
struct CCIPMessageSent {
message: TVM2AnyRampMessage;
}
Fields of TVM2AnyRampMessage
| Field | Type | Description |
|---|---|---|
header | RampMessageHeader | Message metadata: messageId, sourceChainSelector, destChainSelector, sequenceNumber, nonce. |
sender | address | TON address of the sender (the Router on behalf of the user). |
body | Cell<TVM2AnyRampMessageBody> | Encoded message body containing receiver, data, extraArgs, feeToken, feeTokenAmount. |
feeValueJuels | uint96 | Fee value in LINK Juels for standardized cross-chain accounting. |
When it's emitted: After the FeeQuoter validates the message and the OnRamp processes the CCIP send. Use the messageId in this event to track your message in the CCIP Explorer.
DestChainSelectorAdded
Emitted when a new destination chain is configured on the OnRamp.
const DEST_CHAIN_SELECTOR_ADDED_TOPIC: int = stringCrc32("DestChainSelectorAdded");
struct DestChainSelectorAdded {
destChainSelector: uint64;
}
DestChainConfigUpdated
Emitted when the configuration for a destination chain is updated on the OnRamp.
const DEST_CHAIN_CONFIG_UPDATED_TOPIC: int = stringCrc32("DestChainConfigUpdated");
struct DestChainConfigUpdated {
destChainSelector: uint64;
destChainConfig: OnRamp_DestChainConfig;
}
Router Admin Events
OnRampSet
Emitted when an OnRamp is configured or updated for a destination chain selector.
const ON_RAMP_SET_TOPIC: int = stringCrc32("OnRampSet");
struct OnRampSet {
destChainSelectors: SnakedCell;
onRamp: address?;
}
OffRampAdded
Emitted when an OffRamp is added for a source chain selector.
const OFF_RAMP_ADDED_TOPIC: int = stringCrc32("OffRampAdded");
struct OffRampAdded {
sourceChainSelectors: SnakedCell;
offRampAdded: address;
}
OffRampRemoved
Emitted when an OffRamp is removed.
const OFF_RAMP_REMOVED_TOPIC: int = stringCrc32("OffRampRemoved");
struct OffRampRemoved {
sourceChainSelectors: SnakedCell;
offRampRemoved: address;
}
Cursed / Uncursed
Emitted by the Router when an RMN curse is applied or lifted for a subject (e.g., a source chain).
const CURSED_TOPIC: int = stringCrc32("Cursed");
struct Cursed { subject: uint128; }
const UNCURSED_TOPIC: int = stringCrc32("Uncursed");
struct Uncursed { subject: uint128; }