chore(scripts): use load_explorer_runtime_env + address-inventory helper
Align remaining shell scripts with shared env loading (no direct .env source). Made-with: Cursor
This commit is contained in:
@@ -7,6 +7,7 @@ set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
source "$PROJECT_ROOT/scripts/lib/address-inventory.sh"
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
@@ -20,16 +21,11 @@ log_success() { echo -e "${GREEN}[✓]${NC} $1"; }
|
||||
log_warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
|
||||
log_error() { echo -e "${RED}[ERROR]${NC} $1"; }
|
||||
|
||||
# Load environment variables if .env exists
|
||||
if [ -f "$PROJECT_ROOT/.env" ]; then
|
||||
source "$PROJECT_ROOT/.env"
|
||||
elif [ -f "$PROJECT_ROOT/../.env" ]; then
|
||||
source "$PROJECT_ROOT/../.env"
|
||||
fi
|
||||
load_explorer_runtime_env
|
||||
|
||||
# Configuration
|
||||
RPC_URL="${RPC_URL_138:-http://192.168.11.250:8545}"
|
||||
WETH10_ADDRESS="0xf4BB2e28688e89fCcE3c0580D37d36A7672E8A9f"
|
||||
WETH10_ADDRESS="$(resolve_address_value WETH10_ADDRESS WETH10_ADDRESS 0xf4BB2e28688e89fCcE3c0580D37d36A7672E8A9f)"
|
||||
|
||||
log_info "========================================="
|
||||
log_info "WETH10 Contract Inspection"
|
||||
@@ -123,4 +119,3 @@ fi
|
||||
log_info ""
|
||||
log_info "For detailed analysis, use:"
|
||||
log_info " cast code $WETH10_ADDRESS --rpc-url $RPC_URL > weth10_bytecode.bin"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user