- 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
26 lines
948 B
Bash
Executable File
26 lines
948 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# One-shot: set PriceFeedKeeper.updateInterval to match PMM mesh cadence (default 6 seconds).
|
|
# Caller must hold DEFAULT_ADMIN_ROLE on the keeper.
|
|
#
|
|
# Usage:
|
|
# ./scripts/reserve/set-price-feed-keeper-interval.sh [seconds]
|
|
# Env: PRICE_FEED_KEEPER_ADDRESS, PRIVATE_KEY (admin), RPC_URL_138
|
|
#
|
|
set -euo pipefail
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
cd "$(cd "$SCRIPT_DIR/../.." && pwd)"
|
|
[ -f .env ] && set -a && source .env && set +a
|
|
|
|
SEC="${1:-6}"
|
|
K="${PRICE_FEED_KEEPER_ADDRESS:-}"
|
|
RPC="${RPC_URL_138:-${RPC_URL:-http://192.168.11.211:8545}}"
|
|
PK="${PRIVATE_KEY:-}"
|
|
|
|
[ -n "$K" ] || { echo "PRICE_FEED_KEEPER_ADDRESS required"; exit 1; }
|
|
[ -n "$PK" ] || { echo "PRIVATE_KEY required (admin on keeper)"; exit 1; }
|
|
|
|
echo "Setting PriceFeedKeeper $K updateInterval to ${SEC}s"
|
|
cast send "$K" "setUpdateInterval(uint256)" "$SEC" \
|
|
--rpc-url "$RPC" --private-key "$PK" --legacy --gas-limit 120000
|
|
echo "Done."
|