#!/usr/bin/env bash # Local Z Chain without Docker — Anvil (chainId 900002) for contract deploy / wallet dev. set -euo pipefail RPC_PORT="${Z_CHAIN_RPC_PORT:-8546}" CHAIN_ID=900002 if ! command -v anvil &>/dev/null; then echo "ERROR: install Foundry (anvil) — https://book.getfoundry.sh/getting-started/installation" exit 1 fi echo "Starting Anvil as Z Chain on http://127.0.0.1:$RPC_PORT (chainId $CHAIN_ID)" echo "Account #0 private key is printed by Anvil — use as PRIVATE_KEY for deploy." echo "" exec anvil --chain-id "$CHAIN_ID" --port "$RPC_PORT" --host 127.0.0.1