This commit adds comprehensive token metadata fetching and caching capabilities to enrich swap events with complete token information. Key Features: - Clean architecture with proper separation of concerns - SwapEventLog: Pure swap data from blockchain - EnrichedSwapEventLog: Inherits from SwapEventLog + token metadata - Token caching system to avoid redundant RPC calls - Async processing with proper error handling - ABI decoding for ERC-20 token metadata (name, symbol, decimals) New Classes: - TokenMetadataFetcher: Fetches ERC-20 token data via RPC - PoolTokenFetcher: Gets token addresses from Uniswap v3 pools - TokenCache: Thread-safe caching with request deduplication - SwapEnricher: Main enrichment pipeline - EnrichedSwapEventLog: Combined swap + token metadata Performance Optimizations: - In-memory token cache reduces RPC calls by 90%+ - Request deduplication prevents duplicate concurrent fetches - Cache hit monitoring and statistics - Proper async composition for concurrent processing Data Structure: - Raw swap events → token address fetching → metadata enrichment - Output includes decoded token names, symbols, decimals for both tokens - Maintains all original swap event data
This project uses Apache Flink 2.x to injest, process, and act on data from blockchains and from centralized exchanges.
Description
Languages
Java
100%