Analytics Dashboard
TypeScript CLI for analyzing on-chain program transaction data
TypeScript
CLI Tool
Repository
ExpertVagabond/solana-analytics-dashboard
Language
TypeScript
Runtime
Node.js / ts-node
Dependencies
@solana/web3.js
The Analytics Dashboard is a standalone TypeScript CLI tool (not an Anchor program) that fetches and analyzes on-chain transaction data for any Solana program. It provides compute unit usage, fee analysis, unique user counts, and instruction frequency breakdowns.
Usage
# Basic usage - analyze the last 100 transactions ts-node src/index.ts <program_id> # Custom limit ts-node src/index.ts <program_id> --limit 500 # Custom RPC endpoint ts-node src/index.ts <program_id> --rpc https://api.mainnet-beta.solana.com # Full example ts-node src/index.ts FKz12mj5HcA9wJRTmpEN2mstdat7KVrwJyy1QULaVi4J --limit 200 --rpc https://api.devnet.solana.com
Interfaces
ProgramStats
| Field | Type | Description |
|---|---|---|
programId | string | The program ID being analyzed |
totalTransactions | number | Total transactions fetched |
successCount | number | Number of successful transactions |
failureCount | number | Number of failed transactions |
uniqueUsers | number | Unique signer wallets |
avgComputeUnits | number | Average compute units consumed per transaction |
totalFees | number | Total fees paid in lamports |
avgFee | number | Average fee per transaction in lamports |
timeRange | { start: Date, end: Date } | Time range of analyzed transactions |
DashboardReport
| Field | Type | Description |
|---|---|---|
stats | ProgramStats | Aggregate statistics for the program |
instructionBreakdown | Map<string, number> | Frequency count of each instruction type |
dailyActivity | Map<string, number> | Transaction count by date |
topUsers | { wallet: string, count: number }[] | Most active wallets |
generatedAt | Date | Timestamp when the report was generated |
Sample Output
===================================== SOLANA PROGRAM ANALYTICS DASHBOARD ===================================== Program: FKz12mj5HcA9wJRTmpEN2mstdat7KVrwJyy1QULaVi4J Cluster: devnet Analyzed: 200 transactions --- Overview --- Success Rate: 94.5% (189/200) Unique Users: 47 Time Range: 2026-01-15 to 2026-02-28 --- Compute Units --- Average CU: 52,340 Min CU: 12,100 Max CU: 198,500 --- Fees --- Total Fees: 0.0294 SOL Average Fee: 5,000 lamports --- Instruction Breakdown --- make_offer: 82 (41.0%) take_offer: 67 (33.5%) cancel_offer: 40 (20.0%) unknown: 11 ( 5.5%) --- Top Users --- 1. 7xKX...m3Qp 34 txns 2. 9bFZ...kL2w 28 txns 3. 3vNR...pY5j 19 txns
Installation
# Clone the repository git clone https://github.com/ExpertVagabond/solana-analytics-dashboard.git cd solana-analytics-dashboard # Install dependencies npm install # Run the CLI npx ts-node src/index.ts <program_id>
Configuration
The CLI accepts the following command-line arguments:
| Flag | Default | Description |
|---|---|---|
--limit | 100 | Number of recent transactions to fetch |
--rpc | https://api.devnet.solana.com | RPC endpoint URL |
--json | false | Output raw JSON instead of formatted text |