From 82ce7c39579c30e47a0bb45fa941e17073a5ba8c Mon Sep 17 00:00:00 2001 From: johba Date: Sat, 21 Mar 2026 01:37:06 +0000 Subject: [PATCH 1/2] fix: deploy-optimizer.sh reads LM_ADDR inside a guard that silently skips on missing broadcast JSON (#1051) Co-Authored-By: Claude Sonnet 4.6 --- tools/deploy-optimizer.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/deploy-optimizer.sh b/tools/deploy-optimizer.sh index b6504e7..2a6a3d3 100755 --- a/tools/deploy-optimizer.sh +++ b/tools/deploy-optimizer.sh @@ -263,9 +263,11 @@ PYEOF # Verify that the seed trade bootstrapped VWAP during deployment. # DeployLocal.sol runs a first recenter + seed buy + second recenter so that # cumulativeVolume>0 before any user can interact with the protocol. + if [ ! -f "$BROADCAST_JSON" ]; then + fail "Broadcast JSON not found: $BROADCAST_JSON — cannot verify VWAP bootstrap" + fi LM_ADDR="" - if [ -f "$BROADCAST_JSON" ]; then - LM_ADDR="$(python3 - "$BROADCAST_JSON" <<'PYEOF' + LM_ADDR="$(python3 - "$BROADCAST_JSON" <<'PYEOF' import json, sys with open(sys.argv[1]) as f: data = json.load(f) @@ -275,6 +277,8 @@ for tx in data.get('transactions', []): break PYEOF )" + if [ -z "$LM_ADDR" ]; then + info "WARNING: LiquidityManager address not found in $BROADCAST_JSON — skipping VWAP check" fi if [ -n "$LM_ADDR" ]; then CUMVOL_HEX="$(cast call "$LM_ADDR" "cumulativeVolume()(uint256)" \ From daf0bac7d48cabce906ee866e9fbf1a01e92f396 Mon Sep 17 00:00:00 2001 From: johba Date: Sat, 21 Mar 2026 01:37:11 +0000 Subject: [PATCH 2/2] fix: deploy-optimizer.sh reads LM_ADDR inside a guard that silently skips on missing broadcast JSON (#1051) --- STATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/STATE.md b/STATE.md index ba61a71..52f87ec 100644 --- a/STATE.md +++ b/STATE.md @@ -50,3 +50,4 @@ - [2026-03-15] txnBot AGENTS.md ENVIRONMENT enum is stale (#784) - [2026-03-20] Adoption milestone state ambiguity in MEMORY.md (#1068) - [2026-03-20] OptimizerV3Push3 as IOptimizer always returns bear defaults — integration risk (#1063) +- [2026-03-21] deploy-optimizer.sh reads LM_ADDR inside a guard that silently skips on missing broadcast JSON (#1051)