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>
This commit is contained in:
82
orig/scripts/test-setup.sh
Executable file
82
orig/scripts/test-setup.sh
Executable file
@@ -0,0 +1,82 @@
|
||||
#!/bin/bash
|
||||
# MEV Bot Testing Environment Setup
|
||||
# This script sets up a forked Arbitrum environment for testing
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 Setting up MEV Bot testing environment..."
|
||||
|
||||
# Configuration
|
||||
ARBITRUM_RPC_URL="https://arb1.arbitrum.io/rpc"
|
||||
FORK_BLOCK_NUMBER="latest"
|
||||
ANVIL_PORT="8545"
|
||||
ANVIL_CHAIN_ID="31337"
|
||||
|
||||
# Directories
|
||||
TEST_DIR="./tests"
|
||||
CONTRACTS_DIR="./tests/contracts"
|
||||
SCENARIOS_DIR="./tests/scenarios"
|
||||
LOGS_DIR="./tests/logs"
|
||||
|
||||
# Create test directories
|
||||
mkdir -p "$TEST_DIR"
|
||||
mkdir -p "$CONTRACTS_DIR"
|
||||
mkdir -p "$SCENARIOS_DIR"
|
||||
mkdir -p "$LOGS_DIR"
|
||||
|
||||
echo "📁 Created test directory structure"
|
||||
|
||||
# Check if Foundry is installed
|
||||
if ! command -v forge &> /dev/null; then
|
||||
echo "❌ Foundry not found. Please install Foundry first:"
|
||||
echo " curl -L https://foundry.paradigm.xyz | bash"
|
||||
echo " foundryup"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v anvil &> /dev/null; then
|
||||
echo "❌ Anvil not found. Please install Foundry first:"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ Foundry installation verified"
|
||||
|
||||
# Create foundry.toml configuration
|
||||
cat > foundry.toml << EOF
|
||||
[profile.default]
|
||||
src = "tests/contracts"
|
||||
out = "tests/out"
|
||||
libs = ["lib"]
|
||||
test = "tests"
|
||||
cache_path = "tests/cache"
|
||||
force = false
|
||||
|
||||
[profile.default.optimizer]
|
||||
enabled = true
|
||||
runs = 200
|
||||
|
||||
[profile.default.fmt]
|
||||
line_length = 120
|
||||
tab_width = 4
|
||||
|
||||
[rpc_endpoints]
|
||||
arbitrum = "$ARBITRUM_RPC_URL"
|
||||
local = "http://localhost:$ANVIL_PORT"
|
||||
EOF
|
||||
|
||||
echo "⚙️ Created foundry.toml configuration"
|
||||
|
||||
echo "✅ Test environment setup complete!"
|
||||
|
||||
echo ""
|
||||
echo "🎯 Next steps:"
|
||||
echo "1. Install Foundry: curl -L https://foundry.paradigm.xyz | bash && foundryup"
|
||||
echo "2. Run: source tests/setup_env.sh"
|
||||
echo "3. Run: cd tests/scenarios && ./run_tests.sh"
|
||||
echo ""
|
||||
echo "📊 The testing environment includes:"
|
||||
echo " - Forked Arbitrum network with Anvil"
|
||||
echo " - Solidity contracts for realistic scenarios"
|
||||
echo " - Go integration tests"
|
||||
echo " - Automated test runner"
|
||||
echo " - Comprehensive logging"
|
||||
Reference in New Issue
Block a user