From ba63cad97f7c64fea6bb8576dcbcdbccb255d02a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lz=2Ew=CE=94rlock=28=29?= Date: Tue, 6 Feb 2024 15:22:41 -0800 Subject: [PATCH] Rebase and fix commits --- examples/oapp/README.md | 30 ++++++++++++++++++++++++++- examples/oapp/hardhat.config.ts | 4 ++-- examples/oft/README.md | 30 ++++++++++++++++++++++++++- examples/oft/hardhat.config.ts | 4 ++-- packages/create-lz-oapp/src/config.ts | 2 +- 5 files changed, 63 insertions(+), 7 deletions(-) diff --git a/examples/oapp/README.md b/examples/oapp/README.md index 923e08556..54741fc2f 100644 --- a/examples/oapp/README.md +++ b/examples/oapp/README.md @@ -16,7 +16,7 @@

Template project for getting started with LayerZero's OApp contract development.

-### Getting Started +## 1) Developing Contracts #### Installing dependencies @@ -73,3 +73,31 @@ Or adjust the `package.json` to for example remove `hardhat` tests: - "test:hardhat": "$npm_execpath hardhat test" + "test": "forge test" ``` + +## 2) Deploying Contracts + +Set up deployer wallet/account: + +> - Rename `.env.example` -> `.env` +> - Replace the existing 12 word mnemonic with yours, this will be used to deploy your contracts. +> - Fund this address with the corresponding chain's native tokens you want to deploy to. + +To deploy your contracts to your desired blockchains, run the following command in your project's folder: + +```bash +npx hardhat lz:deploy +``` + +More information about available CLI arguments can be found using the `--help` flag: + +```bash +npx hardhat lz:deploy --help +``` + +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 +

diff --git a/examples/oapp/hardhat.config.ts b/examples/oapp/hardhat.config.ts index bb28bb5f2..53a73e657 100644 --- a/examples/oapp/hardhat.config.ts +++ b/examples/oapp/hardhat.config.ts @@ -56,12 +56,12 @@ const config: HardhatUserConfig = { }, fuji: { eid: EndpointId.AVALANCHE_V2_TESTNET, - url: 'https://api.avax-test.network/', + url: 'https://rpc.ankr.com/avalanche_fuji', accounts, }, mumbai: { eid: EndpointId.POLYGON_V2_TESTNET, - url: 'https://rpc-mumbai.matic.today', + url: 'https://rpc.ankr.com/polygon_mumbai', accounts, }, }, diff --git a/examples/oft/README.md b/examples/oft/README.md index 6ac6f3b90..c54d49995 100644 --- a/examples/oft/README.md +++ b/examples/oft/README.md @@ -16,7 +16,7 @@

Template project for getting started with LayerZero's OFT contract development.

-### Getting Started +## 1) Developing Contracts #### Installing dependencies @@ -73,3 +73,31 @@ Or adjust the `package.json` to for example remove `hardhat` tests: - "test:hardhat": "$npm_execpath hardhat test" + "test": "forge test" ``` + +## 2) Deploying Contracts + +Set up deployer wallet/account: + +> - Rename `.env.example` -> `.env` +> - Replace the existing 12 word mnemonic with yours, this will be used to deploy your contracts. +> - Fund this address with the corresponding chain's native tokens you want to deploy to. + +To deploy your contracts to your desired blockchains, run the following command in your project's folder: + +```bash +npx hardhat lz:deploy +``` + +More information about available CLI arguments can be found using the `--help` flag: + +```bash +npx hardhat lz:deploy --help +``` + +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 +

diff --git a/examples/oft/hardhat.config.ts b/examples/oft/hardhat.config.ts index bb28bb5f2..53a73e657 100644 --- a/examples/oft/hardhat.config.ts +++ b/examples/oft/hardhat.config.ts @@ -56,12 +56,12 @@ const config: HardhatUserConfig = { }, fuji: { eid: EndpointId.AVALANCHE_V2_TESTNET, - url: 'https://api.avax-test.network/', + url: 'https://rpc.ankr.com/avalanche_fuji', accounts, }, mumbai: { eid: EndpointId.POLYGON_V2_TESTNET, - url: 'https://rpc-mumbai.matic.today', + url: 'https://rpc.ankr.com/polygon_mumbai', accounts, }, }, diff --git a/packages/create-lz-oapp/src/config.ts b/packages/create-lz-oapp/src/config.ts index 0b760a18a..a5f5b2120 100644 --- a/packages/create-lz-oapp/src/config.ts +++ b/packages/create-lz-oapp/src/config.ts @@ -50,7 +50,7 @@ export const PACKAGE_MANAGERS: PackageManager[] = [ id: 'pnpm', executable: 'pnpm', args: ['install'], - label: 'pnpm', + label: 'pnpm (recommended)', }, { id: 'bun',