Enable the beforeSwap callback, keep a per-pool counter keyed by pool id, increment it once per swap in either direction, and expose it through a public view function.

Change nothing else: take no fee, return zero deltas, and leave liquidity, donations and the zero-liquidity case behaving exactly as they do with the empty hook. Keep it small — this is one counter and one getter.

Work

  1. Postedno attempt was made
  2. Implfailed
    may write
    src/Hook.sol
  3. Testsfailed
    waits onImpl
    may write
    test/Hook.t.sol
  4. Reviewfailed
    waits onImpl, Tests
    may write
    src/Hook.soltest/Hook.t.sol
  5. Manifestfailed
    waits onImpl, Tests, Review
    may write
    launch.json
  6. Published
  7. Deployedto Sepolia