Commit Graph

8 Commits

Author SHA1 Message Date
5429649a39 Implement token metadata enrichment for Uniswap v3 swap events
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
2025-09-28 16:24:02 -04:00
267ff8baf2 Add Uniswap v3 swap event streaming
- Added SwapEventLog data stream to DataStreamJob
- Created SwapEventLog DTO for swap event processing
- Added JSON mapping and printing for swap events
2025-09-25 13:34:12 -04:00
tim
21f0f986d2 Token DTO 2025-09-25 13:32:06 -04:00
tim
ebce35c972 Swap DTO 2025-09-25 13:07:16 -04:00
tim
adb80ee7c9 updated to Flink 2.1.0 and added flink-cep 2025-09-25 12:42:15 -04:00
tim
bd82c431f9 added project files 2025-09-24 11:10:32 -04:00
tim
a80593b9c2 DTO's and other infra 2025-09-22 17:34:05 -04:00
tim
0cd8e1e28f initial checkin with basic arbitrum head blocks working 2025-05-17 20:28:20 -04:00