Standardize deployment env and deployer handling

This commit is contained in:
defiQUG
2026-04-22 14:47:28 -07:00
parent 768168de5e
commit c3d4c786fa
51 changed files with 424 additions and 621 deletions

View File

@@ -25,18 +25,10 @@ elif [[ -n "${REPO_ROOT:-}" && -f "$REPO_ROOT/.env" ]]; then
set +a
fi
# Load environment variables
if [ ! -f .env ]; then
log_error "Error: .env file not found"
echo "Please create .env file with required variables"
exit 1
fi
source .env
# Check required variables
RPC_URL="${RPC_URL:-${RPC_URL_138:-${CHAIN138_RPC_URL:-}}}"
if [ -z "$RPC_URL" ]; then
log_error "Error: RPC_URL not set in .env"
log_error "ERROR: Chain 138 RPC not available. Set RPC_URL, RPC_URL_138, or CHAIN138_RPC_URL."
exit 1
fi
@@ -90,7 +82,7 @@ CONTRACTS=(
for contract_info in "${CONTRACTS[@]}"; do
IFS=':' read -r env_var name <<< "$contract_info"
address="${!env_var}"
address="${!env_var:-}"
if [ -n "$address" ]; then
output_file="${TEMP_DIR}/${env_var}.out"
@@ -132,4 +124,3 @@ else
log_error "${FAILED} out of ${TOTAL} contract(s) failed verification"
exit 1
fi