Skip to main content
Version: Endpoint V2

Integration Checklist

The checklist below is intended to help prepare a project that integrates LayerZero for an external audit or Mainnet deployment

  1. Configure setPeers on every chain pathway you want to send/receive messages on. More info on setting peers here.

    info

    To ensure one-way messages between chains are successfully sent and executed, it's essential to establish peer configurations on both the source and destination chains. This setup is required because both chains' OApps perform peer verification before executing the message on the destination chain, ensuring secure and reliable cross-chain communication.

  2. You must configure DVNs manually on all of the chain pathways you are using for your given OApp/OFT, although there may be defaults on some pathways. LayerZero, as a protocol, maintains a neutral stance and does not presuppose any security assumptions on behalf of deployed OApps. This approach necessitates that you proactively define and implement security considerations that align with the unique requirements of your application. Please follow the guide here to configure DVNs for a given chain pathway.

  3. When setting a custom ULN Config, please make sure your Send and Receive Library configurations for a given chain only include DVN contract addresses that are on that chain.

  4. When setting a custom ULN Config, please make sure your Send and Receive Library configuration DVNs are the same.

    tip

    Example: If I'm on ETH using DVN A as my single required DVN, my send and receive DVN's should both be DVN A’s ETH address. If I'm on Base using DVN A as my single required DVN, my send and receive DVN's should both be DVN A’s Base address.

  5. When integrating the OptionsBuilder in Solidity, ensure your code includes using OptionsBuilder for bytes; to structure your Options successfully according to the LayerZero documentation.

  6. It is recommended to implement and set Enforced Options to ensure that the user of the OApp or OFT covers a predetermined amount of gas for every transaction. This setup guarantees that the message sent from a source has sufficient gas to be executed on the destination chain, effectively preventing failures due to gas-related issues. Please see Enforced Options for more information.

  7. When using a custom implementation of OApp (that does not include the LayerZero standard), you need to implement this function in your OApps with your own logic for peers. The messageLib will call allowInitializePath when a message is sent, and if returned true, will initialize the pathway and allow for message passing to occur.

  8. When calling quote or quoteSend smart contract method on OApp or OFT ensure that you’re correctly passing parameters and Message Options. If you don’t pass options argument (or if you use 0x) then the function will fail. If you’re just testing try these precomputed 200k gas limit Options: 0x00030100110100000000000000000000000000030d40. Please see Message Execution Options for more information.

  9. Make sure that you approve the OFTAdapter as a spender for the corresponding ERC20 token you plan to convert into an OFT, which will allow the OFTAdapter contract to send/receive tokens cross-chain on behalf of the ERC20.