Skip to main content
Version: Endpoint V1 Docs

Develop a Relayer

To run your own Relayer, follow these high level requirements for each chain:

  • Deploy and maintain a contract that implements ILayerZeroRelayerV2 interface. A reference Relayer implementation can be found here.
  • Make sure your Relayer contract has access to up-to-date gas price information for all destination chains in order to accurately estimate transaction delivery fees.
  • Configure your application to use your custom Relayer contract by calling setConfig in Endpoint contract. More information about setting a custom configuration can be found here.
  • Have access to your own nodes RPC + WS (or rely on one or more providers).
  • Maintain and balance wallets used for delivering messages/payloads.
  • Create an off-chain service that listens to Packet event emitted by UltraLightNodeV2 on the source chain, waits for the configured number of confirmations and calls validateTransactionProof in UltraLightNodeV2 on the destination providing data from the event and the transaction proof. A reference implementation of transaction proof generation can be found here.
info

Off-chain Relayer is implementation agnostic. As long as it performs the core function of delivering the message, the implementation is open to interpretation and can be modified.