Introduction
Thecreate-lz-oapp CLI is a command-line tool for scaffolding LayerZero Omnichain Applications (OApps). This CLI toolkit simplifies the process of building, testing, deploying, and configuring omnichain applications by providing a structured project template and essential development tools.
With create-lz-oapp, you can quickly bootstrap a new LayerZero project with both Hardhat and Foundry development frameworks pre-configured, along with example contracts, crosschain unit tests, LayerZero configuration files, and deployment scripts.
Installation & Usage
Create a new LayerZero OApp project with a single command:CLI Options
Thecreate-lz-oapp CLI supports the following options:
Version Information
CI Mode
- Default:
false
Project Directory
Example Project Template
Always Available Examples
These examples are always available:Feature-Flagged Examples
These examples are available only when specific environment variables are set:Log Level
- Available choices:
"error","warn","info","http","verbose","debug","silly" - Default:
"info"
Package Manager
- Available choices:
"npm","pnpm","bun"
Environment Variables for Feature-Flagged Examples
To access feature-flagged examples, you can set the corresponding environment variables inline with the command. These examples provide access to experimental, specialized, or advanced features.Setting Environment Variables
On Unix/macOS/Linux:Example Usage
Basic Interactive Setup
Non-Interactive Setup with Options
Create an OFT Project
Create an ONFT721 Project
Using Feature-Flagged Examples
To use feature-flagged examples, include the required environment variable in the command:Next Steps
After creating your project withcreate-lz-oapp, you’ll have a fully structured omnichain application ready for development. The generated project includes:
- Example smart contracts implementing LayerZero standards
- Deployment scripts and configuration