ZKsync Era Block Explorer Data Fetcher
service exposes and implements an HTTP endpoint to retrieve aggregated data for a certain block / range of blocks from the blockchain. This endpoint is called by the Block Explorer Worker service.
$ npm install
- Create
.env
file in thedata-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 tohttps://sepolia.era.zksync.dev
. For ZKsync Era mainnet -https://mainnet.era.zksync.io
.
# development
$ npm run dev
# watch mode
$ npm run dev:watch
# debug mode
$ npm run dev:debug
# production mode
$ npm run start
# unit tests
$ npm run test
# unit tests debug mode
$ npm run test:debug
# test coverage
$ npm run test:cov
Run npm run lint
to make sure the code base follows configured linter rules.