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:
defiQUG
2026-03-27 22:10:38 -07:00
parent ed0af8aaa0
commit 292a5eca0f
28 changed files with 130 additions and 246 deletions

View File

@@ -4,9 +4,11 @@
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR/.."
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "$PROJECT_ROOT/scripts/lib/address-inventory.sh"
cd "$PROJECT_ROOT"
source .env 2>/dev/null || true
load_explorer_runtime_env
RPC_URL="${RPC_URL_138:-http://192.168.11.250:8545}"
ACCOUNT=$(cast wallet address "$PRIVATE_KEY" 2>/dev/null || echo "")
@@ -89,14 +91,14 @@ echo ""
echo "6. After deployment:"
echo " - Copy the deployed contract address"
echo " - Mint tokens: call mint($ACCOUNT, 1000000000000000000000000)"
echo " - Update .env: LINK_TOKEN=<deployed_address>"
echo " - Update config/address-inventory.json: LINK_TOKEN=<deployed_address>"
echo ""
echo "7. Alternative: Use Custom RPC in Remix"
echo " - Environment: 'Custom'"
echo " - RPC URL: $RPC_URL"
echo " - Chain ID: 138"
echo " - Currency Symbol: ETH"
echo " - Use private key from .env (import account in MetaMask first)"
echo " - Use the same private key from your effective environment (import account in MetaMask first)"
echo ""
echo "╔══════════════════════════════════════════════════════════════╗"
echo "║ QUICK REFERENCE ║"
@@ -107,10 +109,9 @@ echo " RPC URL: $RPC_URL"
echo " Chain ID: 138"
echo " Account: $ACCOUNT"
echo ""
echo "After deployment, update .env:"
echo "After deployment, update config/address-inventory.json:"
echo " LINK_TOKEN=<deployed_address>"
echo ""
echo "Then run:"
echo " ./scripts/fund-bridge-contracts.sh 10"
echo ""