moonstream/crawlers/mooncrawl
kompotkot 6388716156 Hardcoded version in setup.py 2021-09-01 17:34:02 +00:00
..
mooncrawl Specified a name for report for crawlers 2021-09-01 13:56:11 +00:00
README.md Moved mooncrawl Python package into subdirectory of crawlers/ 2021-08-18 11:14:47 -07:00
mypy.ini Moved mooncrawl Python package into subdirectory of crawlers/ 2021-08-18 11:14:47 -07:00
sample.env Humbug reporter for moonstream python crawlers 2021-09-01 13:41:31 +00:00
setup.py Hardcoded version in setup.py 2021-09-01 17:34:02 +00:00

README.md

Moonstream Crawlers

Installation

(Use Python 3)

pip install -e .

Database access and environment variables

Make sure that the MOONSTREAM_DB_URI environment variable is set as a Postgres connection string.

For a sample, view sample.env.

Crawlers

Ethereum Signature Database

This crawler retrieves Ethereum function signatures from the Ethereum Signature Database at https://4byte.directory.

Crawling ESD function signatures

python -m mooncrawl.esd --interval 0.3 functions

Crawling ESD event signatures

python -m mooncrawl.esd --interval 0.3 events

Ethereum contract registrar

This crawler scans new transactions for smart contract deployments and retrieves their deployment addresses from transaction receipts.

To run this crawler:

python -m mooncrawl.cli ethcrawler contracts update

Output is JSON list of pairs [..., (<transaction_hash>, <contract_address>), ...], so you can pipe to jq:

python -m mooncrawl.cli ethcrawler contracts update | jq .

You can also specify an output file:

python -m mooncrawl.cli ethcrawler contracts update -o new_contracts.json