Homepage | Docs | Developers
Development | Cheatsheet | Examples
Please note that this repository is in a beta state and backwards-incompatible changes might be introduced in future releases. While we strive to comply to semver, we can not guarantee to avoid breaking changes in minor releases.
This toolkit is designed to streamline the process of building, testing, and deploying omnichain applications (OApps) using LayerZero. This tool is meant to support you through the end-to-end development lifecycle of a cross-chain project.
Visit our developer docs to get started building omnichain applications.
Kick-start your development with our create-lz-oapp
CLI utility. This command-line tool facilitates the creation of a new omnichain application project, setting up the necessary environment and dependencies:
npx create-lz-oapp@latest
Following this, you will be guided through setting up a project template. Choose from a variety of examples to match your project needs.
Our example project offers templates for both the Omnichain Application (OApp) and Omnichain Fungible Token (OFT) contracts. Select the template that suits your project:
Testing your contracts is crucial. We support both Hardhat and Foundry frameworks for writing and running unit tests for your LayerZero contracts.
Use npx hardhat compile
or forge build
to compile your smart contracts.
Test your contract using npx hardhat test
or forge test
.
To deploy your contracts to your desired blockchains, run the following command in your project's folder:
# TODO: Specify the exact command for deployment
After deploying your contracts across multiple chains, it's time to configure your application's Security Stack and Executor. Initialize your OApp configuration file with:
npx hardhat lz:oapp:config:init
Finally, pair your deployed contracts using:
npx hardhat lz:oapp:wire
By following these steps, you can focus more on creating innovative omnichain solutions and less on the complexities of cross-chain communication.