diff --git a/examples/oapp/README.md b/examples/oapp/README.md index 5c9a23cf0..085c423c3 100644 --- a/examples/oapp/README.md +++ b/examples/oapp/README.md @@ -4,24 +4,72 @@

-

@layerzerolabs/oapp-example

+

+ Homepage | Docs | Developers +

-## Template repository for getting started with LayerZero using either Hardhat or Foundry in one project. +

OApp Example

+ +

+ Quickstart | Configuration | Message Execution Options | Endpoint Addresses +

+ +

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

### Getting Started -#### Using Foundry +#### Installing dependencies + +We recommend using `pnpm` as a package manager (but you can of course use a package manager of your choice): ```bash -forge install -forge build -forge test +pnpm install ``` -#### Using Hardhat +#### Compiling your contracts + +This project supports both `hardhat` and `forge` compilation. By default, the `compile` command will execute both: ```bash -pnpm -pnpm hardhat compile -pnpm hardhat test +pnpm compile +``` + +If you prefer one over the other, you can use the tooling-specific commands: + +```bash +pnpm compile:forge +pnpm compile:hardhat +``` + +Or adjust the `package.json` to for example remove `forge` build: + +```diff +- "compile": "$npm_execpath compile:forge && $npm_execpath compile:hardhat", +- "compile:forge": "forge build", +- "compile:hardhat": "$npm_execpath hardhat compile", ++ "compile": "$npm_execpath hardhat compile" +``` + +#### Running tests + +Similarly to the contract compilation, we support both `hardhat` and `forge` tests. By default, the `test` command will execute both: + +```bash +pnpm test +``` + +If you prefer one over the other, you can use the tooling-specific commands: + +```bash +pnpm test:forge +pnpm test:hardhat +``` + +Or adjust the `package.json` to for example remove `hardhat` tests: + +```diff +- "test": "$npm_execpath test:forge && $npm_execpath test:hardhat", +- "test:forge": "forge test", +- "test:hardhat": "$npm_execpath hardhat test" ++ "test": "forge test" ``` diff --git a/examples/oft/README.md b/examples/oft/README.md index 3cf7b33a3..4e304f406 100644 --- a/examples/oft/README.md +++ b/examples/oft/README.md @@ -4,24 +4,72 @@

-

@layerzerolabs/oft-example

+

+ Homepage | Docs | Developers +

-## Template repository for getting started with LayerZero using either Hardhat or Foundry in one project. +

OFT Example

+ +

+ Quickstart | Configuration | Message Execution Options | Endpoint Addresses +

+ +

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

### Getting Started -#### Using Foundry +#### Installing dependencies + +We recommend using `pnpm` as a package manager (but you can of course use a package manager of your choice): ```bash -forge install -forge build -forge test +pnpm install ``` -#### Using Hardhat +#### Compiling your contracts + +This project supports both `hardhat` and `forge` compilation. By default, the `compile` command will execute both: ```bash -pnpm -pnpm hardhat compile -pnpm hardhat test +pnpm compile +``` + +If you prefer one over the other, you can use the tooling-specific commands: + +```bash +pnpm compile:forge +pnpm compile:hardhat +``` + +Or adjust the `package.json` to for example remove `forge` build: + +```diff +- "compile": "$npm_execpath compile:forge && $npm_execpath compile:hardhat", +- "compile:forge": "forge build", +- "compile:hardhat": "$npm_execpath hardhat compile", ++ "compile": "$npm_execpath hardhat compile" +``` + +#### Running tests + +Similarly to the contract compilation, we support both `hardhat` and `forge` tests. By default, the `test` command will execute both: + +```bash +pnpm test +``` + +If you prefer one over the other, you can use the tooling-specific commands: + +```bash +pnpm test:forge +pnpm test:hardhat +``` + +Or adjust the `package.json` to for example remove `hardhat` tests: + +```diff +- "test": "$npm_execpath test:forge && $npm_execpath test:hardhat", +- "test:forge": "forge test", +- "test:hardhat": "$npm_execpath hardhat test" ++ "test": "forge test" ```