TypeScript shape
EventData is a GraphQL union with seven variants. The __typename field identifies the variant:
union
A trade. See SwapEventData.
union
An LP add. See MintEventData.
union
An LP remove. See BurnEventData.
union
V2 reserve sync. See SyncEventData.
union
V3 fee collection. See CollectEventData.
union
V3 protocol fee collection. See CollectProtocolEventData.
union
Balancer V2 / Uniswap V4 pool rebalance. See PoolBalanceChangedEventData.
Usage
getTokenEvents returns Swap / Mint / Burn / PoolBalanceChanged payloads. Sync / Collect / CollectProtocol are short-circuited to empty by the query (Codex contract).