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:
@@ -37,13 +37,13 @@ func DefaultPathFinderConfig() *PathFinderConfig {
|
||||
|
||||
// PathFinder finds arbitrage paths between tokens
|
||||
type PathFinder struct {
|
||||
cache *cache.PoolCache
|
||||
cache cache.PoolCache
|
||||
config *PathFinderConfig
|
||||
logger *slog.Logger
|
||||
}
|
||||
|
||||
// NewPathFinder creates a new path finder
|
||||
func NewPathFinder(cache *cache.PoolCache, config *PathFinderConfig, logger *slog.Logger) *PathFinder {
|
||||
func NewPathFinder(cache cache.PoolCache, config *PathFinderConfig, logger *slog.Logger) *PathFinder {
|
||||
if config == nil {
|
||||
config = DefaultPathFinderConfig()
|
||||
}
|
||||
@@ -427,11 +427,11 @@ func (pf *PathFinder) getCommonTokens(ctx context.Context, baseToken common.Addr
|
||||
// ARB
|
||||
arb := common.HexToAddress("0x912CE59144191C1204E64559FE8253a0e49E6548")
|
||||
|
||||
common := []common.Address{weth, usdc, usdt, dai, arb}
|
||||
commonTokens := []common.Address{weth, usdc, usdt, dai, arb}
|
||||
|
||||
// Filter out the base token itself
|
||||
filtered := make([]common.Address, 0)
|
||||
for _, token := range common {
|
||||
for _, token := range commonTokens {
|
||||
if token != baseToken {
|
||||
filtered = append(filtered, token)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user