fix(compilation): resolve type system and interface errors
- Add GetPoolsByToken method to cache interface and implementation - Fix interface pointer types (use interface not *interface) - Fix SwapEvent.TokenIn/TokenOut usage to use GetInputToken/GetOutputToken methods - Fix ethereum.CallMsg import and usage - Fix parser factory and validator initialization in main.go - Remove unused variables and imports WIP: Still fixing main.go config struct field mismatches 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,7 @@ type Detector struct {
|
||||
config *DetectorConfig
|
||||
pathFinder *PathFinder
|
||||
calculator *Calculator
|
||||
poolCache *cache.PoolCache
|
||||
poolCache cache.PoolCache
|
||||
logger *slog.Logger
|
||||
|
||||
// Statistics
|
||||
@@ -72,7 +72,7 @@ func NewDetector(
|
||||
config *DetectorConfig,
|
||||
pathFinder *PathFinder,
|
||||
calculator *Calculator,
|
||||
poolCache *cache.PoolCache,
|
||||
poolCache cache.PoolCache,
|
||||
logger *slog.Logger,
|
||||
) *Detector {
|
||||
if config == nil {
|
||||
@@ -153,7 +153,9 @@ func (d *Detector) DetectOpportunitiesForSwap(ctx context.Context, swapEvent *me
|
||||
)
|
||||
|
||||
// Get affected tokens
|
||||
tokens := []common.Address{swapEvent.TokenIn, swapEvent.TokenOut}
|
||||
tokenIn, _ := swapEvent.GetInputToken()
|
||||
tokenOut, _ := swapEvent.GetOutputToken()
|
||||
tokens := []common.Address{tokenIn, tokenOut}
|
||||
|
||||
allOpportunities := make([]*Opportunity, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user