Service for indexing blocks, transactions, and logs from EVM-compatible RPC endpoints and publishing them to Kafka.
- High-performance indexing using
viem. - Support for Ethereum Mainnet, Base, and HyperEVM.
- Configurable backfill on startup.
- Graceful shutdown handling.
Required and optional environment variables:
| Variable | Description | Default |
|---|---|---|
RPC_URL |
Ethereum/EVM RPC URL (WS/WSS preferred) | Required |
KAFKA_BROKERS |
Comma-separated list of Kafka brokers | localhost:9092 |
CHAIN_ID |
Network ID (1=Mainnet, 8453=Base, 999=HyperEVM) | 1 |
BACKFILL_BLOCKS |
Number of recent blocks to index on startup | 10 |
LOG_LEVEL |
Logging level (trace, debug, info, warn, error) | info |
export RPC_URL="wss://..."
npm run devnpm run build
npm start- Source: Fetches data from EVM nodes via JSON-RPC.
- Producer: Publishes structured events to Kafka topics defined in
@ethereum-kafka-indexer/shared. - Utils: Shared logging and configuration management.