Skip to content

Commit

Permalink
Add .env.example file. Update Readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
sandstone-ag committed Aug 12, 2024
1 parent 8c9bab9 commit 9d02b2c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MAINNET_RPC_URL=<your RPC url>
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,26 @@ This project uses NPM for dependency management and Forge for tests so you'll ne
* Install NVM https://github.com/nvm-sh/nvm/blob/master/README.md#install--update-script

* Install specific Node.js version
```
```sh
nvm install
```

* Installing the dependencies:
* Install the dependencies:
```sh
npm ci
```

* Install Foundry and `forge` https://book.getfoundry.sh/getting-started/installation

* Create `.env` file
```sh
cp .env.example .env
```

and specify there your `MAINNET_RPC_URL`.

> **_NOTE:_** You may need to specify manually maximum allowed requests per second (rps) value for an API key/RPC url for some providers. In our experience max 100 rps will be enough to run tests.

## Running tests

```sh
Expand All @@ -30,13 +40,15 @@ forge test
## Test coverage HTML report generation

1. Install `lcov` package in your OS
```
```sh
brew install lcov
or
-OR-
apt-get install lcov
```
2. Run
```
```sh
npm run cov-report
```
3. Open `./coverage-report/index.html` in you browser.
3. Open `./coverage-report/index.html` in your browser.

0 comments on commit 9d02b2c

Please sign in to comment.