EVM Scanner π

A high-performance, industrial-grade EVM event scanning and indexing framework. Built for developers who need reliable, real-time access to blockchain data without the overhead of complex indexing solutions.
Features β’ Installation β’ Quick Start β’ Documentation β’ Contributing
π Features
- βοΈ Multi-Chain Native: Optimized for Ethereum, BSC, Polygon, Arbitrum, and any EVM-compatible network.
- πΎ Pluggable Storage: Choose your persistence layerβMemory (dev), Redis (performance), or PostgreSQL (durability).
- π High Performance:
- Batch Processing: Efficient RPC call batching to minimize latency and costs.
- Bloom Filter Support: Leverages node-level filtering for massive speed gains.
- Worker Pool: Parallel output processing (sinks) for high-throughput environments.
- π Rich Ecosystem (Sinks): Stream data directly to Webhooks, Kafka, RabbitMQ, Redis, PostgreSQL, or flat files.
- π‘οΈ Production Ready: Automatic reorg handling with configurable safety windows and cursor management.
- π Human Readable: Built-in ABI decoding turns raw hex logs into structured JSON data automatically.
π¦ Installation
Binary (Recommended)
Download the pre-compiled binary for your architecture from the Releases page.
Using Go
go install github.com/84hero/evm-scanner/cmd/scanner-cli@latest
From Source
git clone https://github.com/84hero/evm-scanner.git
cd evm-scanner
make build
π Quick Start
1. Initialize Configuration
cp config.yaml.example config.yaml
cp app.yaml.example app.yaml
2. Run the CLI
# Start scanning based on app.yaml filters
./bin/scanner-cli
3. Docker (One-Liner)
docker-compose up -d
π Usage Examples
CLI Mode (Standalone)
Define your filters in app.yaml:
filters:
- description: "USDT Transfer Tracker"
contracts: ["0xdAC17F958D2ee523a2206206994597C13D831ec7"]
topics: ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
abi: '[{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},...],"name":"Transfer","type":"event"}]'
SDK Mode (As a Library)
Explore our curated examples to see how to integrate evm-scanner into your stack:
| Example |
Description |
| Basic SDK |
Minimal setup to start scanning from a Go app. |
| Custom Decoder |
How to decode raw logs into human-readable data using ABIs. |
| PostgreSQL Integration |
Production-ready setup using Postgres for both progress tracking and data storage. |
| Enterprise MQ |
Streaming event data to Kafka for high-throughput microservices. |
| Multi-Sink Pipeline |
Dispatching events to Console and Files simultaneously. |
| Custom Chain Preset |
Configure parameters for a new L2 or AppChain (BlockTime, ReorgSafe). |
| Custom Sink |
Extend the framework by implementing your own output destination (e.g., Slack). |
| Webhook Receiver |
A simple server to receive and process events via Webhook. |
import (
"github.com/84hero/evm-scanner/pkg/scanner"
"github.com/84hero/evm-scanner/pkg/rpc"
)
func main() {
client, _ := rpc.NewClient(ctx, rpcCfg, 10)
s := scanner.New(client, storage, scanCfg, filter)
s.SetHandler(func(ctx context.Context, logs []types.Log) error {
// Your custom business logic here
return nil
})
s.Start(ctx)
}
βοΈ Configuration
The project uses two primary configuration files:
| File |
Purpose |
Key Settings |
config.yaml |
Infrastructure |
RPC Nodes, DB/Redis connections, Scan speed |
app.yaml |
Business Logic |
Contracts, Topics, ABI, Output Destinations |
π Supported Sinks (Outputs)
| Sink |
Status |
Use Case |
| Webhook |
β
|
Real-time API integration |
| PostgreSQL |
β
|
Permanent event storage & querying |
| Redis |
β
|
Fast message passing (List/PubSub) |
| Kafka |
β
|
Big data pipelines & stream processing |
| RabbitMQ |
β
|
Enterprise message queuing |
| Console/File |
β
|
Debugging and logging |
π Development
We use Makefile for common tasks:
make test: Run the test suite.
make lint: Run code quality checks.
make snapshot: Local build validation with GoReleaser.
π€ Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature)
- Commit your Changes (
git commit -m 'Add some AmazingFeature')
- Push to the Branch (
git push origin feature/AmazingFeature)
- Open a Pull Request
π License
Distributed under the MIT License. See LICENSE for more information.
Built with β€οΈ for the Web3 Community.