-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: readme.md for data-fetcher service
- Loading branch information
1 parent
9592c3f
commit 33519dc
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,52 @@ | ||
# zkSync Era Block Explorer Data Fetcher | ||
## Overview | ||
|
||
`zkSync Era Block Explorer Data Fetcher` service exposes and implements an HTTP endpoint to retrieve all data for a certain block / range of blocks from the blockchain. This endpoint is called by the [Block Explorer Worker](/packages/worker) service. | ||
|
||
## Installation | ||
|
||
```bash | ||
$ npm install | ||
``` | ||
|
||
## Setting up env variables | ||
|
||
- Create `.env` file in the `data-fetcher` package folder and copy paste `.env.example` content in there. | ||
``` | ||
cp .env.example .env | ||
``` | ||
- In order to tell the service where to get the blockchain data from set the value of the `BLOCKCHAIN_RPC_URL` env var to your blockchain RPC API URL. For zkSync Era testnet it can be set to `https://zksync2-testnet.zksync.dev`. For zkSync Era mainnet - `https://zksync2-mainnet.zksync.io`. | ||
|
||
## Running the app | ||
|
||
```bash | ||
# development | ||
$ npm run dev | ||
|
||
# watch mode | ||
$ npm run dev:watch | ||
|
||
# debug mode | ||
$ npm run dev:debug | ||
|
||
# production mode | ||
$ npm run start | ||
``` | ||
|
||
## Test | ||
|
||
```bash | ||
# unit tests | ||
$ npm run test | ||
|
||
# unit tests debug mode | ||
$ npm run test:debug | ||
|
||
# test coverage | ||
$ npm run test:cov | ||
``` | ||
|
||
## Development | ||
|
||
### Linter | ||
Run `npm run lint` to make sure the code base follows configured linter rules. |