Skip to content

Commit

Permalink
Update docs to describe setting .env (#105)
Browse files Browse the repository at this point in the history
* Remove unused RPC config param

* Document setting of env variables for running tests

* Minor edit
  • Loading branch information
ermyas authored Oct 11, 2023
1 parent 5dab5e2 commit 16698c6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FOUNDRY_PROFILE=local
ETH_FORK_URL=
BSC_FORK_URL=
POLYGON_FORK_URL=
ARB_FORK_URL=
POLYGON_FORK_URL=
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down

0 comments on commit 16698c6

Please sign in to comment.