Skip to main content
Version: Endpoint V2 Docs

Debugging LayerZero Errors

The LayerZero sample project provides powerful tools for listing and decoding custom errors from the protocol and your OApp.

Using the CLI tool, you can identify errors at the protocol level, debug, and resolve issues quickly during development and deployment.

Commands

To list all the custom errors defined in the LayerZero protocol and your project, run:

npx hardhat lz:errors:list

To decode custom error data based on the error selector, run:

npx hardhat lz:errors:decode <error selector>

The output will provide information about the custom error name, which you can compare against the error list.