From 16698c6d5e233f052b0fbc7f28c3e10ef35f158d Mon Sep 17 00:00:00 2001 From: Ermyas Abebe Date: Thu, 12 Oct 2023 10:39:39 +1100 Subject: [PATCH] Update docs to describe setting .env (#105) * Remove unused RPC config param * Document setting of env variables for running tests * Minor edit --- .env.sample | 3 +-- README.md | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.env.sample b/.env.sample index 181fc4e..19d6310 100644 --- a/.env.sample +++ b/.env.sample @@ -1,5 +1,4 @@ FOUNDRY_PROFILE=local ETH_FORK_URL= BSC_FORK_URL= -POLYGON_FORK_URL= -ARB_FORK_URL= \ No newline at end of file +POLYGON_FORK_URL= \ No newline at end of file diff --git a/README.md b/README.md index bc72ebd..14d09bd 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,14 @@ $ forge build **Step 4:** Run Tests +To run the tests, you will need a local fork of Ethereum, Polygon, and BSC mainnet states. To accomplish this, you must specify RPC endpoints for each of these networks. You can obtain RPC endpoints to use for Ethereum and Polygon, from Alchemy, Infura, or other infrastructure providers. For BSC, you can choose from a list of public RPC endpoints available [here](https://docs.bscscan.com/misc-tools-and-utilities/public-rpc-nodes). + +To set the RPC endpoints, make a copy of the `.env.sample` file and name it `.env`. The file contains a list of parameter names (e.g. `ETH_FORK_URL`) that correspond to each network. Set the respective values of each of these parameters to the RPC endpoints you wish to use. + +Once you have set these values, you can run both the unit and integration tests using the following command: + +```sh + ```sh $ forge test ```