diff --git a/scripts/harb-evaluator/red-team.sh b/scripts/harb-evaluator/red-team.sh index 4eb999c..6837afb 100755 --- a/scripts/harb-evaluator/red-team.sh +++ b/scripts/harb-evaluator/red-team.sh @@ -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()" \