docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
85
scripts/complete-chain138-rpc-setup.sh
Executable file
85
scripts/complete-chain138-rpc-setup.sh
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/env bash
|
||||
# Complete Chain 138 RPC setup using .env: DNS → NPMplus create/update → verify.
|
||||
# Run from repo root. Requires: .env with Cloudflare + NPMplus credentials.
|
||||
# See: docs/04-configuration/NEXT_STEPS_CHAIN138_RPC.md
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
# Child scripts load .env themselves. Load here only for skip-logic checks.
|
||||
# Preserve NPM credentials from environment so "export NPM_PASSWORD=...; ./script" works even if .env has empty NPM_*
|
||||
_orig_npm_email="${NPM_EMAIL:-}"
|
||||
_orig_npm_password="${NPM_PASSWORD:-}"
|
||||
if [ -f .env ]; then
|
||||
set +u
|
||||
set -a
|
||||
# shellcheck source=/dev/null
|
||||
source .env 2>/dev/null || true
|
||||
set +a
|
||||
set -u
|
||||
[ -n "$_orig_npm_email" ] && export NPM_EMAIL="$_orig_npm_email"
|
||||
[ -n "$_orig_npm_password" ] && export NPM_PASSWORD="$_orig_npm_password"
|
||||
fi
|
||||
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "🔧 Complete Chain 138 RPC Setup (from .env)"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
|
||||
# 1. Cloudflare DNS: rpc + wss.defi-oracle.io and all RPC domains → PUBLIC_IP
|
||||
echo "📋 Step 1: Cloudflare DNS (all zones → PUBLIC_IP, DNS only)"
|
||||
if [ -z "${CLOUDFLARE_API_TOKEN:-}" ] && { [ -z "${CLOUDFLARE_EMAIL:-}" ] || [ -z "${CLOUDFLARE_API_KEY:-}" ]; }; then
|
||||
echo " ⚠️ Skipped: set CLOUDFLARE_API_TOKEN or (CLOUDFLARE_EMAIL + CLOUDFLARE_API_KEY) in .env"
|
||||
else
|
||||
if [ -z "${CLOUDFLARE_ZONE_ID_DEFI_ORACLE_IO:-}" ]; then
|
||||
echo " ⚠️ Skipped defi-oracle.io: set CLOUDFLARE_ZONE_ID_DEFI_ORACLE_IO in .env"
|
||||
fi
|
||||
"$SCRIPT_DIR/update-all-dns-to-public-ip.sh" || true
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# 2. NPMplus: create rpc.d-bis.org / rpc2.d-bis.org / ws.* and defi-oracle hosts if missing
|
||||
echo "📋 Step 2a: NPMplus – create rpc.d-bis.org / rpc2.d-bis.org / ws.* proxy hosts if missing"
|
||||
if [ -z "${NPM_PASSWORD:-}" ]; then
|
||||
echo " ⚠️ Skipped: set NPM_PASSWORD in .env"
|
||||
else
|
||||
"$SCRIPT_DIR/nginx-proxy-manager/create-npmplus-rpc-d-bis-hosts.sh" || true
|
||||
fi
|
||||
echo ""
|
||||
echo "📋 Step 2b: NPMplus – create Defi Oracle proxy hosts if missing"
|
||||
if [ -z "${NPM_PASSWORD:-}" ]; then
|
||||
echo " ⚠️ Skipped: set NPM_PASSWORD in .env"
|
||||
else
|
||||
"$SCRIPT_DIR/nginx-proxy-manager/create-npmplus-defi-oracle-hosts.sh" || true
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# 3. NPMplus: update all proxy hosts (forward_host/port, WebSocket)
|
||||
echo "📋 Step 3: NPMplus – update all proxy hosts"
|
||||
if [ -z "${NPM_PASSWORD:-}" ]; then
|
||||
echo " ⚠️ Skipped: set NPM_PASSWORD in .env"
|
||||
else
|
||||
"$SCRIPT_DIR/nginx-proxy-manager/update-npmplus-proxy-hosts-api.sh" || true
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# 4. NPMplus: request Let's Encrypt SSL for proxy hosts (incl. rpc/wss.defi-oracle.io)
|
||||
echo "📋 Step 4: NPMplus – request SSL certificates for proxy hosts"
|
||||
if [ -z "${NPM_PASSWORD:-}" ]; then
|
||||
echo " ⚠️ Skipped: set NPM_PASSWORD in .env"
|
||||
else
|
||||
"$SCRIPT_DIR/request-npmplus-certificates.sh" || true
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# 5. Verify public RPC
|
||||
echo "📋 Step 5: Verify public RPC (eth_chainId)"
|
||||
"$SCRIPT_DIR/fix-rpc-chain138-npmplus.sh" 2>/dev/null || true
|
||||
echo ""
|
||||
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "Done. See docs/04-configuration/NEXT_STEPS_CHAIN138_RPC.md for UDM Pro port forwarding and Chainlist."
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
Reference in New Issue
Block a user