harb/onchain/script/backtesting
openhands cd065275be fix: address AI review feedback for #317 event replay
- Cache pool.tickSpacing() as immutable in EventReplayer constructor
  to avoid a repeated external call per _replayMint() invocation
- Rename driftCount → driftCheckpoints for consistency with log label
- Add sqrtDriftBps to the per-checkpoint progress log line, using the
  now-live lastExpectedSqrtPrice field (previously written but never read)
- Guard _replaySwap(): skip and count events where amountSpecified ≤ 0,
  which would silently flip exact-input into exact-output mode
- Add a final drift sample after the while-loop for trailing events not
  covered by the last LOG_INTERVAL checkpoint
- Move EventReplayer construction outside the broadcast block in
  BacktestRunner (it uses vm.* cheat codes incompatible with real RPC)
- Change second vm.closeFile() from try/catch to a direct call so errors
  surface rather than being silently swallowed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 07:09:29 +00:00
..
.gitignore fix: address review feedback on fetch-events.ts (#315) 2026-02-26 22:45:40 +00:00
BacktestRunner.s.sol fix: address AI review feedback for #317 event replay 2026-02-27 07:09:29 +00:00
EventReplayer.sol fix: address AI review feedback for #317 event replay 2026-02-27 07:09:29 +00:00
fetch-events.ts fix: address review feedback on fetch-events.ts (#315) 2026-02-26 22:45:40 +00:00
MockToken.sol fix: Backtesting #2: Foundry script skeleton + Uniswap V3 shadow pool deployment (#316) 2026-02-27 05:08:27 +00:00
package.json fix: Backtesting #1: Event fetcher (Infura → JSON Lines cache) (#315) 2026-02-26 22:04:43 +00:00
ShadowPoolDeployer.sol fix: Backtesting #2: Foundry script skeleton + Uniswap V3 shadow pool deployment (#316) 2026-02-27 05:08:27 +00:00
tsconfig.json fix: Backtesting #1: Event fetcher (Infura → JSON Lines cache) (#315) 2026-02-26 22:04:43 +00:00