Add mainnet cW micro-support operator 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:
76
scripts/deployment/run-mainnet-cw-micro-support-round.sh
Normal file
76
scripts/deployment/run-mainnet-cw-micro-support-round.sh
Normal file
@@ -0,0 +1,76 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Deterministic micro-support sweep for the four current Mainnet cW/USD public PMM rails.
|
||||
#
|
||||
# Purpose:
|
||||
# - run the current validated tiny support swaps in one sequence
|
||||
# - default to dry-run for safe operator review
|
||||
# - preserve explicit pair/direction/amount choices in one place
|
||||
#
|
||||
# Usage:
|
||||
# bash scripts/deployment/run-mainnet-cw-micro-support-round.sh --dry-run
|
||||
# bash scripts/deployment/run-mainnet-cw-micro-support-round.sh --apply
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROXMOX_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
|
||||
SWAP_HELPER="${PROXMOX_ROOT}/scripts/deployment/run-mainnet-public-dodo-cw-swap.sh"
|
||||
|
||||
DRY_RUN=1
|
||||
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--dry-run)
|
||||
DRY_RUN=1
|
||||
;;
|
||||
--apply)
|
||||
DRY_RUN=0
|
||||
;;
|
||||
-h|--help)
|
||||
sed -n '1,20p' "$0"
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "[fail] unknown arg: $arg" >&2
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
DRY_FLAG=()
|
||||
if (( DRY_RUN == 1 )); then
|
||||
DRY_FLAG=(--dry-run)
|
||||
else
|
||||
echo "[warn] --apply will broadcast four Mainnet PMM support swaps in sequence." >&2
|
||||
fi
|
||||
|
||||
run_leg() {
|
||||
local pair="$1"
|
||||
local direction="$2"
|
||||
local amount="$3"
|
||||
|
||||
echo
|
||||
echo "=== $pair $direction amount=$amount dryRun=$DRY_RUN ==="
|
||||
bash "$SWAP_HELPER" \
|
||||
--pair="$pair" \
|
||||
--direction="$direction" \
|
||||
--amount="$amount" \
|
||||
"${DRY_FLAG[@]}"
|
||||
}
|
||||
|
||||
echo "=== Mainnet cW micro-support round ==="
|
||||
echo "Validated support amounts:"
|
||||
echo "- cwusdt-usdt base-to-quote 8131"
|
||||
echo "- cwusdc-usdc base-to-quote 575113"
|
||||
echo "- cwusdt-usdc base-to-quote 7541"
|
||||
echo "- cwusdc-usdt base-to-quote 5478"
|
||||
|
||||
run_leg "cwusdt-usdt" "base-to-quote" "8131"
|
||||
run_leg "cwusdc-usdc" "base-to-quote" "575113"
|
||||
run_leg "cwusdt-usdc" "base-to-quote" "7541"
|
||||
run_leg "cwusdc-usdt" "base-to-quote" "5478"
|
||||
|
||||
echo
|
||||
echo "=== post-check ==="
|
||||
echo "bash scripts/verify/check-mainnet-pmm-peg-bot-readiness.sh"
|
||||
|
||||
Reference in New Issue
Block a user