harb/containers/anvil-entrypoint.sh
openhands 37b1002dae feat: add Otterscan block explorer to dev environment (#109)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:55:07 +00:00

14 lines
481 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
MNEMONIC_FILE=/workspace/onchain/.secret.local
ANVIL_CMD=(anvil --fork-url "${FORK_URL:-https://sepolia.base.org}" --chain-id 31337 --block-time 1 --host 0.0.0.0 --port 8545 --threads 4 --timeout 2000 --retries 2 --fork-retry-backoff 100 --steps-tracing)
if [[ -f "$MNEMONIC_FILE" ]]; then
MNEMONIC="$(tr -d '\n\r' <"$MNEMONIC_FILE")"
if [[ -n "$MNEMONIC" ]]; then
ANVIL_CMD+=(--mnemonic "$MNEMONIC")
fi
fi
exec "${ANVIL_CMD[@]}"