feat: restore operator WIP — PMM JSON sync entrypoint, dotenv RPC trim + secrets, pool env alignment
- Resolve stash: merge load_deployment_env path with secure-secrets and CR/LF RPC strip - create-pmm-full-mesh-chain138.sh delegates to sync-chain138-pmm-pools-from-json.sh - env.additions.example: canonical PMM pool defaults (cUSDT/USDT per crosscheck) - Include Chain138 scripts, official mirror deploy scaffolding, and prior staged changes Made-with: Cursor
This commit is contained in:
@@ -14,12 +14,27 @@ SCRIPT_PATH="${BASH_SOURCE[0]}"
|
||||
[[ -z "$SCRIPT_PATH" ]] && SCRIPT_PATH="$0"
|
||||
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
|
||||
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
# Load .env via dotenv (RPC CR/LF trim). Fallback: raw source.
|
||||
if [[ -f "$SCRIPT_DIR/../lib/deployment/dotenv.sh" ]]; then
|
||||
# shellcheck disable=SC1090
|
||||
source "$SCRIPT_DIR/../lib/deployment/dotenv.sh"
|
||||
load_deployment_env --repo-root "${PROJECT_ROOT:-$REPO_ROOT}"
|
||||
elif [[ -n "${PROJECT_ROOT:-}" && -f "$PROJECT_ROOT/.env" ]]; then
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "$PROJECT_ROOT/.env"
|
||||
set +a
|
||||
elif [[ -n "${REPO_ROOT:-}" && -f "$REPO_ROOT/.env" ]]; then
|
||||
set -a
|
||||
# shellcheck disable=SC1090
|
||||
source "$REPO_ROOT/.env"
|
||||
set +a
|
||||
fi
|
||||
if [[ ! -d "$REPO_ROOT" ]]; then
|
||||
echo "Error: REPO_ROOT not found: $REPO_ROOT. Run from smom-dbis-138 repo, e.g. cd /path/to/smom-dbis-138 && ./scripts/deployment/run-e2e-trustless-live-test.sh"
|
||||
exit 1
|
||||
fi
|
||||
cd "$REPO_ROOT" || { echo "Error: cannot cd to $REPO_ROOT"; exit 1; }
|
||||
[[ -f .env ]] && set -a && source .env && set +a
|
||||
|
||||
# Use _MAINNET variants if unsuffixed not set (for .env that only has _MAINNET)
|
||||
export BOND_MANAGER="${BOND_MANAGER:-${BOND_MANAGER_MAINNET:-}}"
|
||||
|
||||
Reference in New Issue
Block a user