#!/usr/bin/env bash set -euo pipefail # Setup script for MEV Bot environment echo "Setting up MEV Bot environment..." # Copy the fixed .env file if it exists if [[ -f ".env.fixed" ]]; then cp .env.fixed .env echo "✅ Copied .env.fixed to .env" else echo "⚠️ Warning: .env.fixed not found, skipping copy" fi # Create required directories mkdir -p keystore backups logs # Set proper permissions chmod 600 .env echo "Environment setup complete!" echo "" echo "IMPORTANT: Please update the following variables in .env:" echo " - ETHEREUM_PRIVATE_KEY: Your actual private key" echo " - ETHEREUM_ACCOUNT_ADDRESS: Your Ethereum account address" echo " - CONTRACT_ARBITRAGE_EXECUTOR: Your deployed arbitrage contract address" echo " - CONTRACT_FLASH_SWAPPER: Your deployed flash swapper contract address" echo "" echo "You can generate a new encryption key with:" echo " openssl rand -base64 32"