#!/bin/bash echo "Testing MEV Bot Fixes - $(date)" echo "================================" # Build the bot echo "Building bot..." go build -o test-mev-bot cmd/mev-bot/main.go # Run for 15 seconds and capture output echo "Running bot for 15 seconds..." LOG_LEVEL=info timeout 15 ./test-mev-bot start 2>&1 > test_output.log echo "" echo "Analyzing results..." echo "-------------------" # Check for specific errors echo "1. Pool token fetch errors:" grep -c "Failed to get tokens for pool" test_output.log || echo "0" echo "" echo "2. JSON unmarshal errors:" grep -c "cannot unmarshal array into Go value" test_output.log || echo "0" echo "" echo "3. WebSocket errors:" grep -c "notifications not supported" test_output.log || echo "0" echo "" echo "4. Blacklist activity:" grep "blacklist" test_output.log | head -5 echo "" echo "5. WebSocket fallback:" grep -i "websocket\|polling" test_output.log | head -5 echo "" echo "6. Overall error count:" grep -c "ERROR" test_output.log || echo "0" echo "" echo "7. Sample errors (if any):" grep "ERROR" test_output.log | head -10 # Clean up rm -f test-mev-bot test_output.log echo "" echo "Test complete!"