Track GMP Messages
This section explains how to track GMP messages from Source Chain → Timechain → Destination Chain.
GMP Message Flow & Key Identifiers
- Message Initiation (Source Chain):
- A user or dApp calls the
submitMessagefunction on the Gateway contract on the source chain. - This action emits a
GmpCreatedevent. - Key takeaway: This event contains the crucial
Message ID(abytes32hash) and the Source Transaction Hash.
- A user or dApp calls the
- Timechain Processing:
- Timechain detects the
GmpCreatedevent after it's finalized on the source chain and creates internal tasks to manage this message. These tasks haveTask IDs. - Messages progress through the following statuses as they're processed:
CREATED: The message has been logged on the source chain by the Explorer's listeners.MESSAGE_RECEIVED: Timechain has officially acknowledged receiving the message.PROCESSING: Timechain is preparing the message for secure delivery to the destination chain.
- Timechain detects the
- Message Execution (Destination Chain):
- A Timechain node (relayer) calls the
executeorbatchExecutefunction on the Gateway contract on the destination chain. - This action emits a
GmpExecutedevent, which includes the sameMessage IDand the execution result. - Key takeaway: The transaction that executes the message on the destination chain is the Destination Transaction Hash.
- A Timechain node (relayer) calls the
- Confirmation (Timechain & Explorer):
MESSAGE_EXECUTED: TheGmpExecutedevent has been logged by the Explorer on the destination chain.COMPLETED/FAILED:Timechain confirms the final outcome of the message on the destination chain.
Timechain Explorer
The Timechain Explorer is your main tool for monitoring GMP messages as they move from a source chain, through the Timechain, to the destination chain. See Timechain Explorer for more details.
How to Track Your GMP Message
Let's say you've just sent a GMP message using an Analog GMP-powered dApp.
Step 1: Get Information from the Source Chain
- Get the Source Transaction Hash: After initiating a GMP message, your wallet or the dApp will provide a transaction hash for the action on the source blockchain.
- Access the Source Chain's Block Explorer: Go to the block explorer for the source chain. For example, use Arbiscan for Arbitrum or Etherscan for Ethereum Sepolia.
- Find Your Transaction: Use the Source Transaction Hash to locate your transaction on the block explorer.
- Locate the
GmpCreatedEvent: In the transaction details, look for the "Logs" or "Events" section. Find theGmpCreatedevent, which is emitted by the Gateway contract. - Extract the
messageId: Within theGmpCreatedevent details, you'll find themessageId. This is abytes32value, typically displayed as a hex string. Make sure to note it down. You can also record other details, likedestinationAddressanddestinationNetworkfor confirmation.
Step 2: Use the Timechain Explorer
- Access GMP Tab: Open the Timechain Explorer and navigate to the "GMP" tab.
- Search by Message ID: In the search bar, paste the
messageIdyou obtained from the source chain explorer. - View Message Details: The explorer will display the current status and detailed information of your GMP message.
- Interpreting the Status on Timechain Explorer:
CREATED: Message submitted on source chain.MESSAGE_RECEIVED: Timechain has received the messagePROCESSING: Timechain is preparing the message for submission to the destination chain.MESSAGE_EXECUTED: TheGmpExecutedevent has been logged by the Explorer on the destination chain.COMPLETED: Message successfully verified and executed on the destination chain, confirmed by the Timechain.FAILED: Message execution failed on the destination chain, or a critical error occurred during Timechain processing.
The Destination Transaction Hash should still be available to investigate the failure on the destination chain explorer. Other Searchable IDs include:
Task ID:If you have a specific Timechain Task ID related to your GMP message, you can also use this to search. Timechain Explorer linksTask IDstoMessage IDs.Batch ID:If your message was processed as part of a batch by the Timechain, searching byBatch IDwill show all messages in that batch.