- 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
114 lines
3.5 KiB
Bash
114 lines
3.5 KiB
Bash
#!/usr/bin/env bash
|
|
# PMM soak pool lists — Chain 138 DVM pools (see docs/11-references/ADDRESS_MATRIX_AND_STATUS.md).
|
|
#
|
|
# Resolution order (first wins):
|
|
# 1) PMM_SOAK_POOLS — space-separated addresses
|
|
# 2) PMM_SOAK_POOLS_FILE — one 0x address per line (# comments allowed)
|
|
# 3) PMM_SOAK_POOL_PRESET — see presets below
|
|
# 4) all — full default set (9 pools)
|
|
#
|
|
# Presets:
|
|
# all — 9 funded PMM pools (default)
|
|
# stable — cUSDT/cUSDC + USDT + USDC mirror pools (3)
|
|
# cusdt-cusdc — single cUSDT/cUSDC pool only (narrowest)
|
|
# mirrors — cUSDT/USDT + cUSDC/USDC only (2; no cUSDT/cUSDC cross)
|
|
# xau-public — 3 public XAU pools
|
|
# xau-private — 3 private XAU pools
|
|
# xau-all — all 6 XAU pools
|
|
#
|
|
# After sourcing, POOLS is a bash array of checksummed or lower-case addresses.
|
|
# shellcheck shell=bash
|
|
|
|
pmm_soak_pools_default_all() {
|
|
POOLS=(
|
|
0x9e89bAe009adf128782E19e8341996c596ac40dC
|
|
0x866Cb44b59303d8dc5f4F9E3E7A8e8b0bf238d66
|
|
0xc39B7D0F40838cbFb54649d327f49a6DAC964062
|
|
0x1AA55E2001E5651349AfF5A63FD7A7Ae44f0F1b0
|
|
0xEA9Ac6357CaCB42a83b9082B870610363B177cBa
|
|
0xbA99bc1eAAC164569d5AcA96C806934DDaF970Cf
|
|
0x94316511621430423a2cff0C036902BAB4aA70c2
|
|
0x7867D58567948e5b9908F1057055Ee4440de0851
|
|
0x505403093826D494983A93b43Aa0B8601078A44e
|
|
)
|
|
}
|
|
|
|
pmm_soak_load_pools() {
|
|
POOLS=()
|
|
|
|
if [[ -n "${PMM_SOAK_POOLS:-}" ]]; then
|
|
read -r -a POOLS <<<"${PMM_SOAK_POOLS}"
|
|
return 0
|
|
fi
|
|
|
|
if [[ -n "${PMM_SOAK_POOLS_FILE:-}" ]]; then
|
|
if [[ ! -f "${PMM_SOAK_POOLS_FILE}" ]]; then
|
|
echo "[pmm-soak-pools] PMM_SOAK_POOLS_FILE not found: ${PMM_SOAK_POOLS_FILE}" >&2
|
|
return 1
|
|
fi
|
|
while IFS= read -r raw || [[ -n "$raw" ]]; do
|
|
line="$(printf '%s' "${raw%%#*}" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
|
|
[[ -z "$line" ]] && continue
|
|
[[ "$line" == 0x* ]] || continue
|
|
POOLS+=("$line")
|
|
done <"${PMM_SOAK_POOLS_FILE}"
|
|
[[ "${#POOLS[@]}" -gt 0 ]] || {
|
|
echo "[pmm-soak-pools] no addresses in ${PMM_SOAK_POOLS_FILE}" >&2
|
|
return 1
|
|
}
|
|
return 0
|
|
fi
|
|
|
|
local preset="${PMM_SOAK_POOL_PRESET:-all}"
|
|
case "$preset" in
|
|
all)
|
|
pmm_soak_pools_default_all
|
|
;;
|
|
stable | stable-mirrors)
|
|
POOLS=(
|
|
0x9e89bAe009adf128782E19e8341996c596ac40dC
|
|
0x866Cb44b59303d8dc5f4F9E3E7A8e8b0bf238d66
|
|
0xc39B7D0F40838cbFb54649d327f49a6DAC964062
|
|
)
|
|
;;
|
|
cusdt-cusdc)
|
|
POOLS=(0x9e89bAe009adf128782E19e8341996c596ac40dC)
|
|
;;
|
|
mirrors)
|
|
POOLS=(
|
|
0x866Cb44b59303d8dc5f4F9E3E7A8e8b0bf238d66
|
|
0xc39B7D0F40838cbFb54649d327f49a6DAC964062
|
|
)
|
|
;;
|
|
xau-public)
|
|
POOLS=(
|
|
0x1AA55E2001E5651349AfF5A63FD7A7Ae44f0F1b0
|
|
0xEA9Ac6357CaCB42a83b9082B870610363B177cBa
|
|
0xbA99bc1eAAC164569d5AcA96C806934DDaF970Cf
|
|
)
|
|
;;
|
|
xau-private)
|
|
POOLS=(
|
|
0x94316511621430423a2cff0C036902BAB4aA70c2
|
|
0x7867D58567948e5b9908F1057055Ee4440de0851
|
|
0x505403093826D494983A93b43Aa0B8601078A44e
|
|
)
|
|
;;
|
|
xau-all)
|
|
POOLS=(
|
|
0x1AA55E2001E5651349AfF5A63FD7A7Ae44f0F1b0
|
|
0xEA9Ac6357CaCB42a83b9082B870610363B177cBa
|
|
0xbA99bc1eAAC164569d5AcA96C806934DDaF970Cf
|
|
0x94316511621430423a2cff0C036902BAB4aA70c2
|
|
0x7867D58567948e5b9908F1057055Ee4440de0851
|
|
0x505403093826D494983A93b43Aa0B8601078A44e
|
|
)
|
|
;;
|
|
*)
|
|
echo "[pmm-soak-pools] unknown PMM_SOAK_POOL_PRESET=$preset (use: all, stable, cusdt-cusdc, mirrors, xau-public, xau-private, xau-all)" >&2
|
|
return 1
|
|
;;
|
|
esac
|
|
return 0
|
|
}
|