Skip to main content
Version: Endpoint V2

Create OApp

The Create OApp package is designed to streamline the creation of omnichain applications by providing a robust starting point. This package creates an example repository containing two essential contract standards, along with a suite of tools to assist in development, testing, and deployment.

Prerequisites

  • Node.js and npm installed.

Installation

To get started with the lz-oapp package, run the following command in your terminal:

npx create lz-oapp

This will create a new directory where you can choose which example contracts to include (i.e., OApp and OFT), along with the necessary tooling.

Usage

After installation, navigate to the created directory and follow the instructions in the config folder to set up your OApp and OFT.

Usage Development Modify the OApp and OFT contracts as per your requirements. Use the provided tooling to configure and test your contracts. Deployment Follow the deployment guide in the deploy folder to deploy your contracts to the desired blockchains. Support For any issues or questions, please refer to the docs folder or contact our support team.

Key Components

  • OApp: The base contract standard for omnichain messaging and configuration.

  • OFT: An extension of OApp for handling and supporting transfers of omnichain fungible tokens.

  • Tooling: basic tooling for:

    Vanilla Hardhat Project: sets up a basic hardhat repo initialized with LayerZero contracts.

    Setting Trusted Peers: Configure trusted peer contracts for secure and reliable cross-chain communication.

    Configuring OApp: Easy-to-use interfaces and scripts for setting up and customizing your OApp.

    Generating Message Options: Tools for creating and managing messaging options tailored for omnichain communication.

    Testing Contracts: Integrated testing framework to ensure your contracts work as expected across different blockchain environments.

    Deploying: Simplified deployment scripts to help you launch your OApp and OFT on multiple chains.