Brokex Docs
Docs/DEVELOPERS/Blockchain Indexer

Blockchain Indexer

Historical backfill, WebSocket + HTTP polling, and 32-block reorg handling.

BlockchainIndexer (src/indexer/index.ts) runs runHistoricalBackfill, attaches wsClient.watchBlockNumber, polls every 3000ms, reconciles on-chain state every 30000ms, and rolls back up to 32 blocks on reorgs.