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:
npx hardhat lz:deploy
More information about available CLI arguments can be found using the --help
flag:
npx hardhat lz:deploy --help
The examples come with basic layerzero.config.ts
files that should get you started on testnet straight away.
More information on how to configure your OApp
will be available in our docs soon.
Pair your deployed contracts using:
npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts
By following these steps, you can focus more on creating innovative omnichain solutions and less on the complexities of cross-chain communication.