diff --git a/.env.example b/.env.example index c161cc3..4474de6 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,6 @@ SERVER_PORT=3000 SERVER_HOST=127.0.0.1 - +ETHERSCAN_API_URL="https://api.etherscan.io" ETHERSCAN_API_KEY= # DB Statediff diff --git a/README.md b/README.md index eb6513a..cd2b129 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ And then open in browser `http://172.17.0.2:3000/metrics` ``` docker run \ -e SERVER_HOST=0.0.0.0 \ + -e ETHERSCAN_API_KEY="https://api.etherscan.io" \ -e ETHERSCAN_API_KEY=*** \ -e STATEDIFF_PG_HOST=*** \ -d vulcanize/eth-state-metrics diff --git a/src/etherscan.js b/src/etherscan.js index 075b9d2..3a8239b 100644 --- a/src/etherscan.js +++ b/src/etherscan.js @@ -2,7 +2,7 @@ const axios = require('axios'); const AppError = require('./error'); const etherscanClient = axios.create({ - baseURL: 'https://api.etherscan.io', + baseURL: process.env.ETHERSCAN_API_URL, });