moonstream/crawlers/mooncrawl
Andrey b8b72ea35d Remove refetch add later after apear hash of paramaters in s3 route. 2022-11-17 18:20:33 +02:00
..
mooncrawl Remove refetch add later after apear hash of paramaters in s3 route. 2022-11-17 18:20:33 +02:00
.gitignore Cleaned up NFT crawler code a bit 2021-09-01 15:01:24 -07:00
.isort.cfg try except for init py to ignore humbug import 2021-11-09 10:22:13 +00:00
README.md Update README.md 2022-10-20 11:36:17 -05:00
dev.sh dev.sh file for dev server api testing 2021-11-13 15:54:37 +00:00
mypy.ini Cleaned up NFT crawler code a bit 2021-09-01 15:01:24 -07:00
sample.env Add MOONSTREAM_PUBLIC_QUERIES_DATA_ACCESS_TOKEN for run queries for public dashboard. 2022-11-16 15:20:05 +02:00
setup.py Merge branch 'main' into add-cu-reports-crawler 2022-11-09 21:20:12 +02: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