moonstream/crawlers/mooncrawl
Sergei Sumarokov f6992a5af7
Updated entity client version
2023-05-02 17:57:45 +03:00
..
mooncrawl Bump versions. 2023-04-27 19:07:18 +03:00
.gitignore
.isort.cfg
README.md Update README.md 2022-10-20 11:36:17 -05:00
dev.sh
mypy.ini
sample.env Change env name in sample.env 2023-04-27 19:13:49 +03:00
setup.py Updated entity client version 2023-05-02 17:57:45 +03: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://www.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