|
| 1 | +<p align="center"> |
| 2 | + <a href="https://layerzero.network"> |
| 3 | + <img alt="LayerZero" style="max-width: 500px" src="https://d3a2dpnnrypp5h.cloudfront.net/bridge-app/lz.png"/> |
| 4 | + </a> |
| 5 | +</p> |
| 6 | + |
| 7 | +<h1 align="center">@layerzerolabs/script-devtools-evm-foundry</h1> |
| 8 | + |
| 9 | +<!-- The badges section --> |
| 10 | +<p align="center"> |
| 11 | + <!-- Shields.io NPM published package version --> |
| 12 | + <a href="https://www.npmjs.com/package/@layerzerolabs/script-devtools-evm-foundry"><img alt="NPM Version" src="https://img.shields.io/npm/v/@layerzerolabs/script-devtools-evm-foundry"/></a> |
| 13 | + <!-- Shields.io NPM downloads --> |
| 14 | + <a href="https://www.npmjs.com/package/@layerzerolabs/script-devtools-evm-foundry"><img alt="Downloads" src="https://img.shields.io/npm/dm/@layerzerolabs/script-devtools-evm-foundry"/></a> |
| 15 | + <!-- Shields.io license badge --> |
| 16 | + <a href="https://www.npmjs.com/package/@layerzerolabs/script-devtools-evm-foundry"><img alt="NPM License" src="https://img.shields.io/npm/l/@layerzerolabs/script-devtools-evm-foundry"/></a> |
| 17 | +</p> |
| 18 | + |
| 19 | +## Installation |
| 20 | + |
| 21 | +```sh |
| 22 | +$ npm install @layerzerolabs/script-devtools-evm-foundry |
| 23 | +``` |
| 24 | + |
| 25 | +## Usage |
| 26 | + |
| 27 | +This package not only exports a bunch of scripts for you to use in your foundry projects. But since they compile into your `artifacts` folder, you can run them from your command line. |
| 28 | + |
| 29 | +```sh |
| 30 | +forge script SimulateReceive --rpc-url YOUR_DESTINATION_CHAIN_RPC_URL --ffi |
| 31 | +``` |
| 32 | + |
| 33 | +Since all the scripts are bundled into `LZScripts.s.sol`, you can import them in your own scripts like this: |
| 34 | + |
| 35 | +```solidity |
| 36 | +import { LZUtils } from "@layerzerolabs/script-devtools-evm-foundry/scripts/LZScripts.s.sol"; |
| 37 | +``` |
| 38 | + |
| 39 | +## List of scripts |
| 40 | + |
| 41 | +### 1. SimulateReceive |
| 42 | + |
| 43 | +Simulate receiving a message on an EVM chain - [Read more](./script/SimulateReceive/README.md) |
| 44 | +Source code: [SimulateReceive.s.sol](./script/SimulateReceive/SimulateReceive.s.sol) |
| 45 | +Shell command: |
| 46 | + |
| 47 | +```sh |
| 48 | +forge script SimulateReceive --rpc-url $DESTINATION_CHAIN_RPC_URL --ffi |
| 49 | +``` |
| 50 | + |
| 51 | +### 2. GasProfiler |
| 52 | + |
| 53 | +Profile the gas usage of OFT transfers on multiple mainnet networks - [Read more](./script/GasProfiling/README.md) |
| 54 | +Source code: [OFTProfilerExample.s.sol](./script/GasProfiling/OFTProfilerExample.s.sol) |
| 55 | +Shell command: Not available |
0 commit comments