Complete launcher script that handles:
- Binary compilation (builds if needed)
- Configuration file verification
- Directory setup (logs, data)
- Environment variable configuration
- RPC endpoint setup
- Proper error handling and validation
- Graceful startup/shutdown with Ctrl+C support
- Optional Anvil fork support for local testing
- Pre-flight checks before launch
The script now correctly sets ARBITRUM_RPC_ENDPOINT environment variable
that the config.yaml expects, enabling the bot to start successfully.
Features:
- Colored output with progress indicators
- Comprehensive logging of configuration
- Builds binary automatically if missing
- Validates all required config files exist
- Sets security variables automatically
- Shows startup banner with status information
- Full pre-flight verification suite
- Graceful cleanup on shutdown
Usage:
./scripts/run-flash-swap-bot.sh # Run with defaults
./scripts/run-flash-swap-bot.sh --capital 10000 # Custom capital
./scripts/run-flash-swap-bot.sh --fork # Use local fork
./scripts/run-flash-swap-bot.sh --dry-run # Dry-run mode
✅ Tested and verified working - bot successfully starts and initializes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Created run-flash-swap-bot.sh with full command-line interface
- Supports --rpc, --capital, --dry-run, --fork options
- Automatic binary building if missing
- Integrated Anvil fork support for testing
- Production-ready deployment script
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>