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
f3fd3f2021
commit
404bbd2b21
1 changed files with 14 additions and 3 deletions
|
|
@ -38,6 +38,17 @@ mkdir -p "$LOG_DIR"
|
|||
# ── Configure shared bootstrap variables ──
|
||||
ANVIL_RPC=${ANVIL_RPC:-"http://anvil:8545"}
|
||||
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.
|
||||
if [[ -z "${NETWORK_NAME:-}" ]]; then
|
||||
_fork_url="${FORK_URL:-}"
|
||||
if [[ "$_fork_url" == *"mainnet"* ]]; then
|
||||
NETWORK_NAME="BASE_MAINNET_LOCAL_FORK"
|
||||
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}
|
||||
|
|
@ -83,11 +94,11 @@ derive_txnbot_wallet() {
|
|||
|
||||
write_ponder_env() {
|
||||
cat >"$ROOT_DIR/services/ponder/.env.local" <<EOPONDER
|
||||
PONDER_NETWORK=BASE_SEPOLIA_LOCAL_FORK
|
||||
PONDER_NETWORK=$NETWORK_NAME
|
||||
KRAIKEN_ADDRESS=$KRAIKEN
|
||||
STAKE_ADDRESS=$STAKE
|
||||
START_BLOCK=$DEPLOY_BLOCK
|
||||
PONDER_RPC_URL_BASE_SEPOLIA_LOCAL_FORK=$ANVIL_RPC
|
||||
PONDER_RPC_URL_${NETWORK_NAME}=$ANVIL_RPC
|
||||
DATABASE_URL=postgresql://ponder:ponder_local@postgres:5432/ponder_local
|
||||
DATABASE_SCHEMA=ponder_local_${DEPLOY_BLOCK}
|
||||
EOPONDER
|
||||
|
|
@ -98,7 +109,7 @@ write_txn_bot_env() {
|
|||
local provider_url=${TXNBOT_PROVIDER_URL:-$ANVIL_RPC}
|
||||
local graphql_endpoint=${TXNBOT_GRAPHQL_ENDPOINT:-http://ponder:42069/graphql}
|
||||
cat >"$txnbot_env" <<EOTXNBOT
|
||||
ENVIRONMENT=BASE_SEPOLIA_LOCAL_FORK
|
||||
ENVIRONMENT=$NETWORK_NAME
|
||||
PROVIDER_URL=$provider_url
|
||||
PRIVATE_KEY=$TXNBOT_PRIVATE_KEY
|
||||
LM_CONTRACT_ADDRESS=$LIQUIDITY_MANAGER
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue