moonstream/crawlers
kompotkot 6f0a224562 Fixes for crawler mypy 2021-08-24 14:13:20 +00:00
..
deploy "ethcrawler trending": default start, end 2021-08-09 19:37:57 -07:00
mooncrawl Fixes for crawler mypy 2021-08-24 14:13:20 +00:00
.gitignore Updated .gitignore 2021-07-29 11:32:59 -07:00
README.md Had to save setup.py 2021-08-05 15:54:19 -07:00
mypy.ini Ethereum smart contract registry updater 2021-07-28 21:35:49 -07:00
sample.env removed AWS_BUCKET_PREFIX 2021-08-18 19:18:28 +03:00
setup.py Fixes for crawler mypy 2021-08-24 14:13:20 +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