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>
70 lines
1.8 KiB
Bash
Executable File
70 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Test script for MEV Bot fixes
|
|
echo "Testing MEV Bot fixes..."
|
|
|
|
# Run the setup script
|
|
./setup-env.sh
|
|
|
|
# Test environment variables
|
|
echo "Testing environment variables..."
|
|
if [ -f .env ]; then
|
|
source .env
|
|
echo "✓ .env file exists"
|
|
else
|
|
echo "✗ .env file missing"
|
|
exit 1
|
|
fi
|
|
|
|
# Check required variables
|
|
required_vars=("ARBITRUM_RPC_ENDPOINT" "MEV_BOT_ENCRYPTION_KEY")
|
|
missing_vars=()
|
|
|
|
for var in "${required_vars[@]}"; do
|
|
if [ -z "${!var}" ]; then
|
|
missing_vars+=("$var")
|
|
fi
|
|
done
|
|
|
|
if [ ${#missing_vars[@]} -eq 0 ]; then
|
|
echo "✓ All required environment variables are set"
|
|
else
|
|
echo "✗ Missing environment variables: ${missing_vars[*]}"
|
|
exit 1
|
|
fi
|
|
|
|
# Test configuration files
|
|
echo "Testing configuration files..."
|
|
if [ -f config/config.yaml ]; then
|
|
echo "✓ config.yaml exists"
|
|
else
|
|
echo "✗ config.yaml missing"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -f config/initial_markets.yaml ]; then
|
|
echo "✓ initial_markets.yaml exists"
|
|
else
|
|
echo "✗ initial_markets.yaml missing"
|
|
exit 1
|
|
fi
|
|
|
|
# Test rate limiting configuration
|
|
echo "Checking rate limiting configuration..."
|
|
requests_per_second=$(grep "requests_per_second:" config/config.yaml | awk '{print $2}' | head -1)
|
|
if [ "$requests_per_second" -le 5 ]; then
|
|
echo "✓ Rate limiting is properly configured (RPS: $requests_per_second)"
|
|
else
|
|
echo "✗ Rate limiting may be too high (RPS: $requests_per_second)"
|
|
fi
|
|
|
|
# Test market scan configuration
|
|
echo "Checking market scan configuration..."
|
|
max_blocks_back=$(grep "max_blocks_back:" config/initial_markets.yaml | awk '{print $2}')
|
|
if [ "$max_blocks_back" -le 1000 ]; then
|
|
echo "✓ Market scan block range is properly configured ($max_blocks_back blocks)"
|
|
else
|
|
echo "✗ Market scan block range may be too high ($max_blocks_back blocks)"
|
|
fi
|
|
|
|
echo "All tests completed!" |