fix: fix: red-team prompt missing evm_increaseTime for TWAP-enforced recenter (#823)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d6e5990802
commit
7d0473ade7
1 changed files with 10 additions and 1 deletions
|
|
@ -131,8 +131,9 @@ log "Recentering to deploy funded WETH into positions ..."
|
|||
"$CAST" send "$LM" "recenter()" \
|
||||
--private-key "$RECENTER_PK" --rpc-url "$RPC_URL" >/dev/null 2>&1 \
|
||||
|| log " WARNING: initial recenter failed (may need amplitude — mining blocks)"
|
||||
# Mine blocks and retry if needed
|
||||
# Advance time and mine blocks, then retry recenter
|
||||
for _i in $(seq 1 3); do
|
||||
"$CAST" rpc evm_increaseTime 600 --rpc-url "$RPC_URL" >/dev/null 2>&1
|
||||
for _b in $(seq 1 50); do
|
||||
"$CAST" rpc evm_mine --rpc-url "$RPC_URL" >/dev/null 2>&1
|
||||
done
|
||||
|
|
@ -515,6 +516,14 @@ python3 -c "b=${LM_ETH_BEFORE:-0}; a=int('\$TOTAL'); d=b-a; print(f'Delta: {d} w
|
|||
--private-key ${ADV_PK} --rpc-url http://localhost:8545
|
||||
\`\`\`
|
||||
|
||||
### Advance time (REQUIRED before each recenter call)
|
||||
recenter() has a 60-second cooldown AND requires 300s of TWAP oracle history.
|
||||
You MUST advance time before calling recenter:
|
||||
\`\`\`bash
|
||||
/home/debian/.foundry/bin/cast rpc evm_increaseTime 600 --rpc-url http://localhost:8545
|
||||
for i in \$(seq 1 10); do /home/debian/.foundry/bin/cast rpc evm_mine --rpc-url http://localhost:8545; done
|
||||
\`\`\`
|
||||
|
||||
### Trigger recenter (account 2 only)
|
||||
\`\`\`bash
|
||||
/home/debian/.foundry/bin/cast send ${LM} "recenter()" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue