Skip to content

Blockchain scraper for ethereum, built with iov-core, API compatible with etherscan

License

Notifications You must be signed in to change notification settings

iov-one/iov-scraper-ethereum

Repository files navigation

iov-scraper-ethereum

Build Status Docker Pulls

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

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.

Development

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.

API

This scraper is intended to use same API as etherscan

Status

Get current status

curl http://localhost:8546/status

Blocks

Get all blocks

curl http://localhost:8546/blocks

Accounts

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"

TODO

  • 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

About

Blockchain scraper for ethereum, built with iov-core, API compatible with etherscan

Resources

License

Stars

Watchers

Forks

Packages

No packages published