logoAcademy

Dataflow

Learn the complete flow of a Cross-Chain message.

These can be described as follows:

  1. Cross-Chain dApp initiating the message calls the Interchain Messaging Contract
  2. The Interchain Messaging contracts interacts with the AWM precompile of the EVM
  3. An AWM Relayer relays the message to the destination Chain. It periodically checks the source Avalanche L1 for outgoing messages and delivers these by calling the Interchain Messaging contract on the destination Avalanche L1
  4. The Interchain Messaging contract on the destination chain interacts with AWM to verify the signature the message and whether it has been signed by a sufficiently large stake share of the source Avalanche L1's validator set.
  5. The Interchain Messaging contract then calls the destination dApp contract
  6. The dApp decodes the message payload

As you noticed in the Teleporter Basics chapter most of the cross-chain communication has been abstracted away from the dApp developer. The only interfaces for them are:

  • Sending a message: Simply calling the Interchain Messaging contract on the source chain
  • Receiving a message: Being able to be called by the Interchain Messaging on the destination chain

To start, we will assume there is always an AWM Relayer to deliver our messages without any incentives. Let's dive deeper into the sending and receiving of messages in the next sections.

Updated:

On this page

No Headings
Edit on Github