Files
mev-beta/scripts/run.sh
2025-09-14 06:21:10 -05:00

29 lines
901 B
Bash
Executable File

#!/bin/bash
# run.sh - Run the MEV bot
echo "Running MEV bot..."
# Build the application first
./scripts/build.sh
if [ $? -eq 0 ]; then
# Set required environment variables
export ARBITRUM_RPC_ENDPOINT="${ARBITRUM_RPC_ENDPOINT:-wss://arbitrum-mainnet.core.chainstack.com/73bc682fe9c5bd23b42ef40f752fa89a}"
export ARBITRUM_WS_ENDPOINT="${ARBITRUM_WS_ENDPOINT:-wss://arbitrum-mainnet.core.chainstack.com/73bc682fe9c5bd23b42ef40f752fa89a}"
export METRICS_ENABLED="${METRICS_ENABLED:-true}"
# Use fixed port 8765 to avoid conflicts with common ports
export METRICS_PORT="${METRICS_PORT:-8765}"
echo "Using WebSocket endpoints:"
echo " RPC: $ARBITRUM_RPC_ENDPOINT"
echo " WS: $ARBITRUM_WS_ENDPOINT"
echo " Metrics Port: $METRICS_PORT"
# Run the application
./bin/mev-bot start
else
echo "Failed to build the application!"
exit 1
fi