Skip to main content
The LayerZero CLI tool uses the hardhat-deploy plugin to deploy contracts on multiple chains. After adding your MNEMONIC or PRIVATE_KEY to your dotenv file and adding networks in your hardhat.config.ts, run the following command to deploy your LayerZero contracts:

Selecting Chains

You will be prompted to select which chains to deploy to:
If you wish to deploy to all blockchain networks selected, simply hit enter to continue deployment. To deselect a chain for deployment, highlight the chain and toggle the selection using the space bar or arrow keys:

Adding Deploy Script Tags

Afterwards you’ll be prompted to choose which deploy script tags to use. By default, each CLI example contains a starter deploy script, with the deploy script tag being the contract name:
The generic message passing standard for creating Omnichain Applications (OApps):
You will need to add a new deploy script for any new contracts added to the repo.

Running the Deployer

After selecting either all or a specific deploy script, the deployer will those contracts on your specified chains.
You should see an output in your ./deployments folder, or have one generated, containing your contracts:
Your contract deployments can now be configured in your layerzero.config.ts!