All packages
usdy_solana_tracker
PaulieB14
Package ref
usdy-solana-tracker@v0.1.0Run package
CLI
Run map_usdy_holder_deltas from the command line.
substreams run usdy-solana-tracker@v0.1.0 map_usdy_holder_deltas -e solanaAuthenticate by running
substreams auth or directly on thegraph.market (see docs).README
USDY Solana Substreams
Real-time USDY token analytics pipeline for Solana blockchain data.
šÆ Overview
This project streams all USDY (Ondo US Dollar Yield) transactions from Solana, starting from the first mint (block 290789141), and stores them in efficient Parquet files for analytics and visualization.
Token Details:
- Mint:
A1KLoBrKBde8Ty9qtNQUtq3C2ortoC3u7twggz7sEto6 - Symbol: USDY
- Name: Ondo US Dollar Yield
š Quick Start
1. Setup Environment
# Install dependencies
make install
# Build the project
make build
2. Configure Authentication
Create a local.env file with your StreamingFast JWT token:
SUBSTREAMS_API_TOKEN=your_jwt_token_here
3. Start Parquet Streaming
# Start fresh streaming
make stream-parquet
# Resume from last position
make stream-parquet-resume
# Check progress
make check-progress
š Data Output
The system generates:
- Parquet chunks:
data/usdy_parquet/usdy_chunk_XXXX.parquet - Progress tracking:
data/usdy_parquet/progress.json
Each Parquet file contains:
signature: Transaction signatureblock_number: Block numberblock_timestamp: Block timestampblock_hash: Block hashevent_type: Type of USDY eventinstruction_index: Instruction indexraw_event: Complete event data (JSON)
š ļø Available Commands
Development
make install- Install dependencies and setup environmentmake build- Build the project for WebAssemblymake test- Run all testsmake format- Format code using rustfmtmake lint- Run clippy for code analysismake clean- Clean build artifacts
Running
make run-dev- Run in development mode with GUImake stream-parquet- Start clean Parquet streamingmake stream-parquet-resume- Resume Parquet streamingmake check-progress- Check streaming progress
Deployment
make package- Package substreams for distribution
š Project Structure
āāā src/
ā āāā lib.rs # Main Rust substreams logic
ā āāā pb/ # Protocol buffer definitions
āāā proto/
ā āāā usdy_events.proto # Event definitions
āāā data/
ā āāā usdy_parquet/ # Output Parquet files
āāā stream_usdy_parquet.py # Python streaming script
āāā check_progress.py # Progress monitoring
āāā substreams.yaml # Substreams configuration
āāā local.env # Environment variables (create this)
āāā Makefile # Build and run commands
š§ Technical Details
- Substreams: Real-time blockchain data processing
- Parquet: Columnar storage format for analytics
- Chunking: 10,000 blocks per Parquet file
- Resume: Automatic progress tracking and resume capability
- Authentication: JWT token authentication with StreamingFast
š Analytics Ready
The Parquet files are optimized for:
- Pandas/Python: Direct loading with
pd.read_parquet() - Apache Spark: Distributed processing
- DuckDB: Fast analytical queries
- Tableau/PowerBI: Business intelligence tools
šØ Important Notes
- Ensure your
local.envfile contains a valid JWT token - The system automatically resumes from the last processed block
- Each chunk processes 10,000 blocks (adjustable in the script)
- Progress is saved after each successful chunk
š Support
For issues or questions, check the logs and ensure:
- JWT token is valid and in
local.env - Network connectivity to StreamingFast endpoint
- Sufficient disk space for Parquet files
Happy streaming! š
Modules
Execution graph
Output
usdy.types.v1.UsdyEventsInputs
Inputs
Store value
proto:usdy.types.v1.UsdyHolderBalanceUpdate policy
set
Inputs