High-Performance Data Ingestion for Solana
A production-grade, high-performance Solana blockchain indexer written in Rust. This application is designed to ingest transactions from various sources (gRPC, RPC, File), parse them into protocol-specific events, and persist them into a PostgreSQL database for analytics and monitoring.
▶ End-to-end live indexing demo (gRPC → Parse → Postgres → Telegram alerts)
- Live Yellowstone gRPC ingestion
- Jupiter / Raydium / Pump.fun parsing
- DLQ handling for malformed events
- Real-time Telegram whale alerts
https://github.com/user-attachments/assets/d96be5f9-8e6a-4bec-b6cb-fa1569f32b4e
tokio for efficient non-blocking I/O.sqlx for type-safe database interactions.
my-solana-indexer/
├── src/
│ ├── main.rs # Application entry point
│ ├── domain/ # Core types & models (ChainEvent)
│ ├── application/ # Business logic & pipeline
│ ├── adapters/ # External interfaces
│ │ ├── inbound/ # gRPC & File sources
│ │ ├── outbound/ # Postgres & Telegram adapters
│ │ └── parsers/ # Protocol-specific logic
│ └── infrastructure/ # Low-level buffers & utils
├── migrations/ # SQL database migrations
├── scripts/ # TypeScript testing utilities
├── idls/ # Protocol IDLs (Jupiter, Pump.fun)
└── docker-compose.yml # Infrastructure setup
bash
git clone https://github.com/your-username/my-solana-indexer.git
cd my-solana-indexer
.env file:```env # Source: 'grpc' or 'file' SOURCE_TYPE=grpc
# Connectivity RPC_URL=https://api.mainnet-beta.solana.com GRPC_URL=http://127.0.0.1:10000 DATABASE_URL=postgres://postgres:postgres@localhost:5432/solana_indexer
# Optional: Telegram Alerts TELEGRAM_BOT_TOKEN=your_token TELEGRAM_CHAT_ID=your_chat_id ```
bash
docker-compose up -d
bash
cargo install sqlx-cli
sqlx migrate run
bash
cargo run --releaseThe indexer is currently equipped to parse and store data for:
| Protocol | Type | Key Data Points |
|---|---|---|
| Jupiter | Aggregator | Swaps, Routes, ExactOut/In |
| Raydium | AMM | Swaps, Liquidity Changes |
| Pump.fun | Bonding Curve | Buys, Sells, Curve State |
| SPL Token | Standard | Transfers, Mints, Burns |
This project is licensed under the MIT License.
$ claude mcp add sol-indexer \
-- python -m otcore.mcp_server <graph>