Tempulse is a high-performance stablecoin analytics platform for the Tempo blockchain. It crawls TIP-20 stablecoin events, indexes them into PostgreSQL, and serves analytics via a REST API.
bin/fin → Indexer daemon (crawls blocks, decodes events, writes to DB)
bin/api → REST API server (reads from DB, serves analytics)
crates/core → Config, errors, telemetry
crates/tempo → TIP-20/Factory ABIs, log decoders, RPC provider
crates/storage → PostgreSQL models, repositories, migrations
docker-compose up -dcp .env.example .env
# Edit .env if needed (defaults work for local development)cargo run --bin finThe indexer will:
- Discover TIP-20 tokens from the Factory contract
- Index all Transfer/Mint/Burn events
- Track account balances in real-time
- Persist progress and resume from where it left off
cargo run --bin api| Endpoint | Description |
|---|---|
GET /api/v1/tokens |
List all tracked stablecoins |
GET /api/v1/tokens/:address |
Single token details |
GET /api/v1/tokens/:address/holders |
Top holders with balances |
GET /api/v1/tokens/:address/transfers |
Token transfer history |
GET /api/v1/stats/tvl |
Total Value Locked |
GET /api/v1/activity/recent |
Latest transfers |
GET /health |
Health check |
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
postgres://tempulse:tempulse@localhost:5432/tempulse |
PostgreSQL connection |
RPC_URL |
https://rpc.moderato.tempo.xyz |
Tempo RPC endpoint |
START_BLOCK |
0 |
Block to start indexing from |
BATCH_SIZE |
100 |
Blocks per indexing batch |
API_PORT |
3000 |
API server port |
RUST_LOG |
info |
Log level |
cargo build # Build all
cargo test # Run tests
cargo clippy # Lint