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 <noreply@anthropic.com>
This commit is contained in:
parent
4f6b6cf586
commit
82ce7c3957
1 changed files with 6 additions and 2 deletions
|
|
@ -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)" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue