A comprehensive Substreams-based indexer for Wormhole cross-chain messaging and asset transfers on Solana.
This project indexes Wormhole's ecosystem on Solana, tracking:
The indexer provides rich analytics about cross-chain activity, chain pair interactions, and token metrics.
Program | Address | Description |
---|---|---|
Core Bridge | worm2ZoG2kUd4vFXhvjh93UUH596ayRfgQ2MgjNMTth |
Handles message publications and verifications |
Token Bridge | wormDTUJ6AWPNvk59vGQbDvGJmqbDTdgWgAqcLBCgUb |
Manages token transfers between chains |
NFT Bridge | WnFt12ZrnzZrFZkt2xsNsaNWoQribnuQ5B5FrDbwDhD |
Manages NFT transfers between chains |
Wormhole Program | HDwcJBJXjL9FpJ7UBsYBtaDjsBUhuLCUYoz3zr8SWWaQ |
Main Wormhole program |
Module | Description |
---|---|
map_core_bridge_data |
Extracts MessagePublication events from the Core Bridge |
map_token_bridge_data |
Extracts token transfer events from the Token Bridge |
map_nft_bridge_data |
Extracts NFT transfer events from the NFT Bridge |
map_wormhole_program_data |
Extracts message events from the main Wormhole program |
combine_wormhole_activity |
Combines data from all bridges to provide rich analytics |
Track cross-chain messages with:
Track token movements with:
Track NFT movements with:
Provides aggregated insights:
The indexer supports all chains in the Wormhole ecosystem, including:
Chain ID | Name |
---|---|
1 | Solana |
2 | Ethereum |
4 | BSC |
5 | Polygon |
6 | Avalanche |
10 | Fantom |
22 | Arbitrum |
23 | Optimism |
30 | Base |
... and many more!
The indexer handles three main event types from the Token Bridge:
Each event type is properly deserialized using Anchor's IDL definitions.
Example queries to extract insights from the indexed data:
# Get recent token transfers
query {
tokenTransfers(limit: 10, orderBy: BLOCK_TIMESTAMP_DESC) {
txId
blockTimestamp
fromAddress
toAddress
tokenSymbol
amount
toChain
}
}
# Get chain pair activity
query {
chainPairs(orderBy: TOKEN_TRANSFER_COUNT_DESC, limit: 5) {
sourceChain
destinationChain
messageCount
tokenTransferCount
nftTransferCount
tokenVolumeUsd
}
}
Build the Substreams:
cargo build --target wasm32-unknown-unknown --release
substreams pack
Deploy the package to Substreams.dev:
substreams deploy ./wormhole-indexer-v0.1.0.spkg
Run the Substreams:
substreams run -e <ENDPOINT> map_token_bridge_data -s <START_BLOCK> -t <STOP_BLOCK>
substreams run -e <ENDPOINT> combine_wormhole_activity -s <START_BLOCK> -t <STOP_BLOCK>
MIT
substreams gui wormhole-indexer@v0.2.0 map_core_bridge_data
substreams gui wormhole-indexer@v0.2.0 map_token_bridge_data
substreams gui wormhole-indexer@v0.2.0 map_nft_bridge_data
substreams gui wormhole-indexer@v0.2.0 map_wormhole_program_data
substreams gui wormhole-indexer@v0.2.0 combine_wormhole_activity
substreams gui wormhole-indexer@v0.2.0 solana:blocks_without_votes
blocks_without_votes
allows you to consume a full Solana Block without Vote instructions (Vote111111111111111111111111111111111111111
).
If you consume it on HISTORICAL data (+1000 blocks from HEAD), you will be reading from the StreamingFast cache, thus saving costs on the amount of TB read.
substreams gui wormhole-indexer@v0.2.0 solana:v020:blocks_without_votes
substreams gui wormhole-indexer@v0.2.0 solana:program_ids_without_votes