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>
68 lines
2.2 KiB
Bash
68 lines
2.2 KiB
Bash
#!/usr/bin/env bash
|
|
# Wave 0: run from host on LAN. Runs W0-1 (NPMplus RPC fix) and W0-3 (NPMplus backup).
|
|
# W0-2 (sendCrossChain real): run scripts/bridge/run-send-cross-chain.sh without --dry-run when ready.
|
|
#
|
|
# Usage: bash scripts/run-wave0-from-lan.sh [--dry-run] [--skip-backup|--skip-rpc-fix]
|
|
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
cd "$PROJECT_ROOT"
|
|
|
|
DRY_RUN=false
|
|
SKIP_BACKUP=false
|
|
SKIP_RPC_FIX=false
|
|
for a in "$@"; do
|
|
[[ "$a" == "--dry-run" ]] && DRY_RUN=true
|
|
[[ "$a" == "--skip-backup" ]] && SKIP_BACKUP=true
|
|
[[ "$a" == "--skip-rpc-fix" ]] && SKIP_RPC_FIX=true
|
|
done
|
|
|
|
log_info() { echo -e "\033[0;34m[INFO]\033[0m $1"; }
|
|
log_ok() { echo -e "\033[0;32m[✓]\033[0m $1"; }
|
|
log_warn() { echo -e "\033[0;33m[⚠]\033[0m $1"; }
|
|
log_err() { echo -e "\033[0;31m[✗]\033[0m $1"; }
|
|
|
|
echo ""
|
|
echo "Wave 0 (from LAN): NPMplus RPC fix + Backup"
|
|
echo ""
|
|
|
|
# Ensure jq (required by update-npmplus-proxy-hosts-api.sh) on remote host
|
|
if ! command -v jq &>/dev/null; then
|
|
log_info "Installing jq..."
|
|
if command -v apt-get &>/dev/null; then
|
|
apt-get update -qq && apt-get install -y -qq jq >/dev/null 2>&1 || { log_err "Could not install jq. Install manually: apt-get install jq"; exit 1; }
|
|
else
|
|
log_err "jq is required. Install it (e.g. apt-get install jq) and re-run."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
if [[ "$SKIP_RPC_FIX" != true ]]; then
|
|
log_info "W0-1: NPMplus RPC fix..."
|
|
if [[ "$DRY_RUN" == true ]]; then
|
|
echo " [DRY-RUN] bash scripts/nginx-proxy-manager/update-npmplus-proxy-hosts-api.sh"
|
|
else
|
|
bash "$SCRIPT_DIR/nginx-proxy-manager/update-npmplus-proxy-hosts-api.sh" && log_ok "W0-1 done" || { log_err "W0-1 failed"; exit 1; }
|
|
fi
|
|
else
|
|
log_warn "W0-1 skipped"
|
|
fi
|
|
|
|
if [[ "$SKIP_BACKUP" != true ]]; then
|
|
log_info "W0-3: NPMplus backup..."
|
|
if [[ "$DRY_RUN" == true ]]; then
|
|
echo " [DRY-RUN] bash scripts/verify/backup-npmplus.sh"
|
|
else
|
|
bash "$SCRIPT_DIR/verify/backup-npmplus.sh" && log_ok "W0-3 done" || log_warn "W0-3 failed (container may be stopped)"
|
|
fi
|
|
else
|
|
log_warn "W0-3 skipped"
|
|
fi
|
|
|
|
echo ""
|
|
log_info "W0-2 (sendCrossChain real): bash scripts/bridge/run-send-cross-chain.sh <amount> [recipient] # omit --dry-run"
|
|
log_ok "Wave 0 script finished."
|
|
echo ""
|