Docs navigation · Events to index
Montra Docs | Events, Token Indexing & Trade Data
How to reconstruct Montra state from logs: discovering tokens, mapping pools, indexing trades and fees, and surviving reorgs without double counting.
Operational flow
Use this page as an operational reference: identify the correct surface, verify the live state, perform the intended action, then reconcile the result from on-chain or indexed data.
Start with launch discovery
Index the factory launch event first so every token can be mapped to its pool and launch terms. Store the block number, transaction and log index as stable ordering keys.
Join pool and fee events
A trade indexer needs the Uniswap v4 swap event for the actual pool movement plus Montra-specific fee events for the launch economics. Keep raw logs so derived metrics can be rebuilt when formulas change.
Handle reorgs explicitly
Do not mark a block final just because it was observed once. Retain enough ancestry to roll back affected logs, then replay forward. Idempotent keys prevent duplicate launches or trades after reconnects.
Derived analytics
Market cap, volume, holder metrics and fee totals are derived views. Calculate them from canonical indexed state and document the unit conversions so API consumers can reproduce them.
Events to index FAQ
Concise answers to the questions most likely to matter before using or integrating this part of Montra.
Which event discovers a Montra launch?
TokenLaunched from the launch factory is the key launch record.
Where do trades appear?
In Uniswap v4 Swap events for the relevant pool IDs.
Why store raw logs?
They let you recompute derived metrics after formula or schema changes.
How should reorgs be handled?
Roll back non-final logs and replay from the last trusted block.
Can an indexer reconstruct Montra from events?
The documented architecture is designed so core token, trade and fee state can be rebuilt from logs.