The usage of this scraper is very simple, to install it, run:
yarn install
yarn build
Then start it for a IOV development blockchain using:
yarn dev-start
It plays very well with ganache. So we recommend to have a local instance of ganache running on http://localhost:8545
Usage: iov-scraper-ethereum action [arguments...]
Positional arguments per action are listed below. Arguments in parentheses are optional.
help Shows a help text and exits
version Prints the version and exits
start Starts the scraper
1 Ganache base URL, e.g. http://localhost:8545
Environment variables
SCRAPER_PORT Port of the webserver. Defaults to 8546.
The yarn script dev-start
calls start
with a set of default options for local development. It uses the default development ganache node http://localhost:8545
, and exports the API enty point URL http://localhost:8546
.
This scraper is intended to use same API as etherscan
Get current status
curl http://localhost:8546/status
Get all blocks
curl http://localhost:8546/blocks
Get all accounts listed by address
curl http://localhost:8546/accounts
Get account by address
curl "http://localhost:8546/api?module=account&action=txlist&address=0x65E2fF4C989dd53387dfeFF8b36e58265047Cf34"
- Get a list of 'Internal' Transactions by Address
- Allow url path querying as etherscan
- Add tests
- Complete set of APIs
- Implement local DB to load full chain