diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..baa5a015 --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +MAINNET_RPC_URL= diff --git a/README.md b/README.md index 913430ca..39ce3557 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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.