Files
proxmox/scripts/deployment/run-mainnet-aave-cwusdc-quote-push-loop.sh
defiQUG dbd517b279 Sync workspace: config, docs, scripts, CI, operator rules, and submodule pointers.
- Update dbis_core, cross-chain-pmm-lps, explorer-monorepo, metamask-integration, pr-workspace/chains
- Omit embedded publish git dirs and empty placeholders from index

Made-with: Cursor
2026-04-12 06:12:20 -07:00

39 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Repeat run-mainnet-aave-cwusdc-quote-push-once.sh (same FLASH_QUOTE_AMOUNT_RAW) N times.
# Reserves move each round; the forge script recomputes MIN_OUT_PMM when MIN_OUT_PMM is unset.
#
# Env:
# FLASH_LOOP_COUNT default 3
# FLASH_LOOP_SLEEP_SECS default 15 (pause between broadcasts for inclusion / indexing)
# Same env as run-mainnet-aave-cwusdc-quote-push-once.sh
#
# Usage:
# FLASH_LOOP_COUNT=5 bash scripts/deployment/run-mainnet-aave-cwusdc-quote-push-loop.sh --dry-run
# FLASH_LOOP_COUNT=5 bash scripts/deployment/run-mainnet-aave-cwusdc-quote-push-loop.sh --apply
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ONCE="${SCRIPT_DIR}/run-mainnet-aave-cwusdc-quote-push-once.sh"
COUNT="${FLASH_LOOP_COUNT:-3}"
SLEEP_SECS="${FLASH_LOOP_SLEEP_SECS:-15}"
if [[ ! -f "$ONCE" ]]; then
echo "[fail] missing $ONCE" >&2
exit 1
fi
for ((i = 1; i <= COUNT; i++)); do
echo "=== quote-push loop $i / $COUNT ==="
bash "$ONCE" "$@"
if [[ "$*" != *--apply* ]]; then
continue
fi
if ((i < COUNT)); then
echo "sleep ${SLEEP_SECS}s before next round..."
sleep "$SLEEP_SECS"
fi
done
echo "Loop finished ($COUNT rounds)."