Add mainnet cW remediation sequence helper
All checks were successful
Deploy to Phoenix / deploy (push) Successful in 10s
All checks were successful
Deploy to Phoenix / deploy (push) Successful in 10s
This commit is contained in:
@@ -277,6 +277,15 @@ This runs the currently validated tiny support swaps for `cwusdt-usdt`, `cwusdc-
|
||||
|
||||
Re-run with `--apply` only when you intentionally want to broadcast the full four-leg support round.
|
||||
|
||||
**Higher-level remediation sequence:**
|
||||
```bash
|
||||
bash scripts/deployment/run-mainnet-cw-remediation-sequence.sh --dry-run
|
||||
```
|
||||
Modes:
|
||||
- `--mode=micro` for the four-leg support sweep only
|
||||
- `--mode=flash-plan` for the `cWUSDC/USDC` flash quote-push plan only
|
||||
- `--mode=full` for both
|
||||
|
||||
### 15. Mainnet DODO Wave 1 pool deploy helper
|
||||
|
||||
Repeatable helper for creating and seeding a first-tier Mainnet DODO PMM Wave 1 `cW* / USDC` pair.
|
||||
|
||||
89
scripts/deployment/run-mainnet-cw-remediation-sequence.sh
Normal file
89
scripts/deployment/run-mainnet-cw-remediation-sequence.sh
Normal file
@@ -0,0 +1,89 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# High-level operator sequence for current Mainnet cW/USD PMM remediation.
|
||||
#
|
||||
# Modes:
|
||||
# - micro: run the validated four-leg tiny support sweep
|
||||
# - flash-plan: print the cWUSDC/USDC flash quote-push plan
|
||||
# - full: do both in sequence
|
||||
#
|
||||
# Defaults to dry-run/operator-planning behavior.
|
||||
#
|
||||
# Usage:
|
||||
# bash scripts/deployment/run-mainnet-cw-remediation-sequence.sh --dry-run
|
||||
# bash scripts/deployment/run-mainnet-cw-remediation-sequence.sh --mode=flash-plan
|
||||
# bash scripts/deployment/run-mainnet-cw-remediation-sequence.sh --mode=micro --apply
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROXMOX_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
|
||||
MICRO_HELPER="${PROXMOX_ROOT}/scripts/deployment/run-mainnet-cw-micro-support-round.sh"
|
||||
FLASH_PLAN="${PROXMOX_ROOT}/scripts/deployment/plan-mainnet-cwusdc-flash-quote-push-rebalance.sh"
|
||||
PEG_READINESS="${PROXMOX_ROOT}/scripts/verify/check-mainnet-pmm-peg-bot-readiness.sh"
|
||||
BOOTSTRAP_VERIFY="${PROXMOX_ROOT}/scripts/verify/check-mainnet-public-dodo-cw-bootstrap-pools.sh"
|
||||
|
||||
MODE="full"
|
||||
APPLY=0
|
||||
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--mode=*)
|
||||
MODE="${arg#*=}"
|
||||
;;
|
||||
--dry-run)
|
||||
APPLY=0
|
||||
;;
|
||||
--apply)
|
||||
APPLY=1
|
||||
;;
|
||||
-h|--help)
|
||||
sed -n '1,22p' "$0"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "[fail] unknown arg: $arg" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$MODE" in
|
||||
micro|flash-plan|full)
|
||||
;;
|
||||
*)
|
||||
echo "[fail] unsupported mode: $MODE (use micro, flash-plan, or full)" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "=== Mainnet cW remediation sequence ==="
|
||||
echo "mode=$MODE"
|
||||
echo "apply=$APPLY"
|
||||
echo
|
||||
|
||||
echo "== preflight =="
|
||||
bash "$BOOTSTRAP_VERIFY"
|
||||
echo
|
||||
bash "$PEG_READINESS" || true
|
||||
|
||||
if [[ "$MODE" == "micro" || "$MODE" == "full" ]]; then
|
||||
echo
|
||||
echo "== micro-support sweep =="
|
||||
if (( APPLY == 1 )); then
|
||||
bash "$MICRO_HELPER" --apply
|
||||
else
|
||||
bash "$MICRO_HELPER" --dry-run
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$MODE" == "flash-plan" || "$MODE" == "full" ]]; then
|
||||
echo
|
||||
echo "== flash quote-push planning =="
|
||||
bash "$FLASH_PLAN"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "== post-check =="
|
||||
echo "bash scripts/verify/check-mainnet-pmm-peg-bot-readiness.sh"
|
||||
echo "bash scripts/verify/check-mainnet-public-dodo-cw-bootstrap-pools.sh"
|
||||
|
||||
Reference in New Issue
Block a user