β―οΈRun the Indexer
How to run Guru Network Indexer
Last updated
How to run Guru Network Indexer
Last updated
Prerequisites
Ensure you have the following installed:
Docker
Docker Compose
Step-by-Step Instructions
Prepare Environment Variables
Copy the env.sample
file and rename it to .env
.
Edit the .env
file to set the following variables according to your needs:
CHAIN_ID
: The ID of the blockchain network you are indexing.
DATABASE
: The name of the database that will be created in ClickHouse.
PROVIDER_URL
: The URL of your RPC provider, such as a public node, Infura, or a local node.
See Environment Variables
Start Indexing
Open your terminal and navigate to the directory containing your docker-compose.yml
file.
Run the command:
This command will start indexing the Ethereum blockchain into ClickHouse.
Verify Database Content
Once the indexing process begins, you can inspect the database to see the tables created for each entity type and a few service-related tables.
Install Ethereum ETL:
β οΈ If you want to use Clickhouse as a destination, make sure to apply migrations:
Export blocks and transactions (Schema, Reference):
Export ERC20 and ERC721 transfers (Schema, Reference):
Export traces (Schema, Reference):
Stream blocks, transactions, logs, token_transfers continually to console (Reference):
Find other commands here.
Supported export destinations here.
all-at-once run and fix:
Or one-by-one:
Check and auto-fix with: ruff --fix .
Check typing: mypy .
Auto-format all: black .