fix: bootstrap.sh hardcodes BASE_SEPOLIA_LOCAL_FORK even on mainnet forks (#746)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
12fa97bae7
commit
9b7143af55
2 changed files with 20 additions and 2 deletions
|
|
@ -41,14 +41,21 @@ CONTRACT_ENV=$STATE_DIR/contracts.env
|
|||
|
||||
# Derive NETWORK_NAME from FORK_URL if not explicitly set.
|
||||
# Callers may override by exporting NETWORK_NAME before starting the stack.
|
||||
# Chain ID 8453 = Base mainnet; anything else (including 84532 Base Sepolia) defaults to Sepolia fork.
|
||||
if [[ -z "${NETWORK_NAME:-}" ]]; then
|
||||
_fork_url="${FORK_URL:-}"
|
||||
if [[ "$_fork_url" == *"mainnet"* ]]; then
|
||||
NETWORK_NAME="BASE_MAINNET_LOCAL_FORK"
|
||||
if [[ -n "$_fork_url" ]]; then
|
||||
_chain_id=$(cast chain-id --rpc-url "$_fork_url" 2>/dev/null || echo "")
|
||||
if [[ "$_chain_id" == "8453" ]]; then
|
||||
NETWORK_NAME="BASE_MAINNET_LOCAL_FORK"
|
||||
else
|
||||
NETWORK_NAME="BASE_SEPOLIA_LOCAL_FORK"
|
||||
fi
|
||||
else
|
||||
NETWORK_NAME="BASE_SEPOLIA_LOCAL_FORK"
|
||||
fi
|
||||
fi
|
||||
|
||||
LOG_FILE=$SETUP_LOG
|
||||
ONCHAIN_DIR=$ROOT_DIR/onchain
|
||||
TXNBOT_FUND_VALUE=${TXNBOT_FUND_VALUE:-1ether}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue