moonstream/crawlers/mooncrawl
Neeraj Kashyap 6ae67d7a75
Merge pull request #283 from bugout-dev/fixing_nft_crawler
added reporter to nft crawler, removed global cache for addresses
2021-09-25 08:57:36 -07:00
..
mooncrawl Merge pull request #283 from bugout-dev/fixing_nft_crawler 2021-09-25 08:57:36 -07:00
.gitignore Cleaned up NFT crawler code a bit 2021-09-01 15:01:24 -07:00
README.md Moved mooncrawl Python package into subdirectory of crawlers/ 2021-08-18 11:14:47 -07:00
mypy.ini Cleaned up NFT crawler code a bit 2021-09-01 15:01:24 -07:00
requirements.txt added bugout dependency 2021-09-21 18:14:39 +03:00
sample.env MOONSTREAM_HUMBUG_TOKEN -> NFT_HUMBUG_TOKEN 2021-09-23 13:08:06 +03:00
setup.py Threads instead of pools, missing block cmd check num of transactions 2021-09-24 13:28:41 +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