Giter VIP home page Giter VIP logo

devtools's Introduction

LayerZero

Homepage | Docs | Developers

LayerZero Developer Utilities

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.


Introduction

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.

Bootstrapping an Example Cross-Chain Project

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.

Writing Smart Contracts

Our example project offers templates for both the Omnichain Application (OApp) and Omnichain Fungible Token (OFT) contracts. Select the template that suits your project:

Writing Unit Tests

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.

Deploying Contracts

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

Configuring contracts

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.

Wiring Contracts

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.



Join our community on Discord | Follow us on Twitter

devtools's People

Contributors

janjakubnanista avatar layerzero-bot avatar sirarthurmoney avatar ryandgoulding avatar 0xiryna avatar trileyschwarz avatar st0rmbr3w avatar 0xfoobar avatar chengenh avatar nazreen avatar enjoyooor avatar intensodefi avatar wyattwestdev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.