Tighten mainnet PMM bootstrap verification
All checks were successful
Deploy to Phoenix / deploy (push) Successful in 9s
All checks were successful
Deploy to Phoenix / deploy (push) Successful in 9s
This commit is contained in:
@@ -53,6 +53,7 @@ pairs=(
|
||||
)
|
||||
|
||||
failures=0
|
||||
warnings=0
|
||||
|
||||
echo "=== Mainnet Public DODO cW Bootstrap Pools ==="
|
||||
echo "Integration: $INTEGRATION"
|
||||
@@ -92,13 +93,40 @@ for row in "${pairs[@]}"; do
|
||||
continue
|
||||
fi
|
||||
|
||||
dry_run_output="$(
|
||||
dry_run_output=""
|
||||
dry_run_status=0
|
||||
if ! dry_run_output="$(
|
||||
bash "${REPO_ROOT}/scripts/deployment/run-mainnet-public-dodo-cw-swap.sh" \
|
||||
--pair="$pair" \
|
||||
--direction="$direction" \
|
||||
--amount="$amount" \
|
||||
--dry-run
|
||||
)"
|
||||
--dry-run 2>&1
|
||||
)"; then
|
||||
dry_run_status=$?
|
||||
fi
|
||||
|
||||
if (( dry_run_status != 0 )); then
|
||||
if grep -q 'insufficient input-token balance' <<<"$dry_run_output"; then
|
||||
echo "- $pair"
|
||||
echo " pool=$pool"
|
||||
if [[ -n "$configured_pool" && "${configured_pool,,}" != "${pool,,}" ]]; then
|
||||
echo " note=env_pool_overridden_by_registry"
|
||||
echo " configuredPool=$configured_pool"
|
||||
fi
|
||||
echo " mappedPool=$mapped_pool"
|
||||
echo " reserves=$base_reserve/$quote_reserve"
|
||||
echo " dryRunDirection=$direction"
|
||||
echo " dryRunAmount=$amount"
|
||||
echo " warning=operator_wallet_lacks_input_balance_for_dry_run"
|
||||
warnings=$((warnings + 1))
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "[fail] $pair dry-run quote failed" >&2
|
||||
printf '%s\n' "$dry_run_output" >&2
|
||||
failures=$((failures + 1))
|
||||
continue
|
||||
fi
|
||||
|
||||
quote_source="$(printf '%s\n' "$dry_run_output" | awk -F= '/^quoteSource=/ {print $2}')"
|
||||
estimated_out="$(printf '%s\n' "$dry_run_output" | awk -F= '/^estimatedOut=/ {print $2}')"
|
||||
@@ -121,9 +149,14 @@ done
|
||||
|
||||
if (( failures > 0 )); then
|
||||
echo
|
||||
echo "[WARN] Bootstrap pool verification found $failures issue(s)." >&2
|
||||
echo "[WARN] Bootstrap pool verification found $failures issue(s) and $warnings warning(s)." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo
|
||||
if (( warnings > 0 )); then
|
||||
echo "Result: all 11 recorded Mainnet public DODO cW bootstrap pools are mapped and funded; $warnings dry-run check(s) were skipped because the operator wallet lacked the input token."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Result: all 11 recorded Mainnet public DODO cW bootstrap pools are mapped, funded, and dry-run routable."
|
||||
|
||||
Reference in New Issue
Block a user