Files
mev-beta/orig/scripts/watch-opportunities.sh
Administrator c54c569f30 refactor: move all remaining files to orig/ directory
Completed clean root directory structure:
- Root now contains only: .git, .env, docs/, orig/
- Moved all remaining files and directories to orig/:
  - Config files (.claude, .dockerignore, .drone.yml, etc.)
  - All .env variants (except active .env)
  - Git config (.gitconfig, .github, .gitignore, etc.)
  - Tool configs (.golangci.yml, .revive.toml, etc.)
  - Documentation (*.md files, @prompts)
  - Build files (Dockerfiles, Makefile, go.mod, go.sum)
  - Docker compose files
  - All source directories (scripts, tests, tools, etc.)
  - Runtime directories (logs, monitoring, reports)
  - Dependency files (node_modules, lib, cache)
  - Special files (--delete)

- Removed empty runtime directories (bin/, data/)

V2 structure is now clean:
- docs/planning/ - V2 planning documents
- orig/ - Complete V1 codebase preserved
- .env - Active environment config (not in git)

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

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

58 lines
2.5 KiB
Bash
Executable File

#!/bin/bash
# Simple MEV Bot Opportunity Monitor
# Shows only arbitrage opportunities detected
echo "════════════════════════════════════════════════════════════"
echo "🎯 MEV Bot Opportunity Monitor"
echo "════════════════════════════════════════════════════════════"
echo ""
echo "Watching: logs/mev-bot.log"
echo "Press Ctrl+C to stop"
echo "════════════════════════════════════════════════════════════"
echo ""
# Color codes
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[1;33m'
NC='\033[0m'
COUNT=0
tail -f logs/mev-bot.log | grep --line-buffered "OPPORTUNITY DETECTED" | while read line; do
COUNT=$((COUNT + 1))
TIMESTAMP=$(echo "$line" | grep -oP '\d{4}/\d{2}/\d{2} \d{2}:\d{2}:\d{2}')
# Check if executable
if echo "$line" | grep -q "isExecutable:true"; then
echo -e "${GREEN}[$TIMESTAMP] ✅ #$COUNT - EXECUTABLE OPPORTUNITY!${NC}"
# Extract profit
PROFIT=$(echo "$line" | grep -oP 'netProfitETH:[0-9.-]+' | cut -d: -f2)
echo -e "${GREEN} 💰 Net Profit: $PROFIT ETH${NC}"
else
echo -e "${YELLOW}[$TIMESTAMP] 🎯 #$COUNT - Opportunity (not profitable)${NC}"
# Extract net profit
PROFIT=$(echo "$line" | grep -oP 'netProfitETH:-?[0-9.]+' | cut -d: -f2)
if [[ -n "$PROFIT" ]]; then
echo -e "${RED} ❌ Net Profit: $PROFIT ETH (loss)${NC}"
fi
# Extract reason
REASON=$(echo "$line" | grep -oP 'rejectReason:[^}]+' | cut -d: -f2 | head -c 60)
if [[ -n "$REASON" ]]; then
echo -e "${RED} ⚠️ Reason: $REASON${NC}"
fi
fi
echo ""
# Show stats every 10 opportunities
if [ $((COUNT % 10)) -eq 0 ]; then
echo -e "${YELLOW}────────────────────────────────────────────────────────────${NC}"
echo -e "${YELLOW}📊 Total opportunities detected: $COUNT${NC}"
echo -e "${YELLOW}────────────────────────────────────────────────────────────${NC}"
echo ""
fi
done