Commit Graph

2 Commits

Author SHA1 Message Date
Administrator
9935246022 fix: correct Protocol and PoolType enum mappings
- Use ProtocolSushiSwapV2/V3 instead of ProtocolSushiSwap
- Use ProtocolCamelotV2/V3 instead of ProtocolCamelot
- Use ProtocolBalancerV2/V3 instead of ProtocolBalancer
- Use PoolTypeConstantProduct instead of PoolTypeV2
- Use PoolTypeConcentrated instead of PoolTypeV3
- Add default fallbacks to prevent undefined enum usage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 10:09:08 +01:00
Administrator
e79e0d960d feat: add pool cache adapter and strict event validation
- Created PoolCacheAdapter to wrap PoolDiscovery for EventParser
- Updated ArbitrumMonitor to pass pool cache to parser via NewEventParserFull
- Added strict validation to reject events with zero addresses
- Added strict validation to reject events with zero amounts
- Parser now uses discovered pools from cache for token enrichment

This ensures zero addresses and zero amounts NEVER reach the scanner.
Events with invalid data are logged and rejected at the monitor level.

Changes:
- pkg/pools/pool_cache_adapter.go: New adapter implementing PoolCache interface
- pkg/monitor/concurrent.go: Pool cache integration and validation logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-10 10:03:28 +01:00