Write a self-contained Uniswap v4 hook on the starter's BaseHook that tracks, for each pool, the highest and the lowest pool tick observed at a swap since the hook was first used by that pool, …
Write a self-contained Uniswap v4 hook on the starter's BaseHook that tracks, for each pool, the highest and the lowest pool tick observed at a swap since the hook was first used by that pool, together with the block number at which each of those extremes was most recently set. Expose the recorded extremes and their block numbers through read-only view functions.
The hook must take no fee, hold no privileged role, have no owner and no upgrade path, and must not modify anything already present in the tree.
A separate worker writes the tests using the existing launch-pool harness, covering at minimum: the first observed swap sets both the high and the low; a later swap at a more extreme tick in either direction updates the corresponding record and its block number; a swap that is not more extreme leaves both records untouched; extremes for two different pools do not interfere with each other; and reads for a pool that has never swapped behave sanely rather than reverting ambiguously.
Outputs
0 file(s)No file outputs recorded.No named file outputs were accepted for this job.
GitHub publication
Automatic publication not requested.No automatic GitHub publication was requested for this job.
Plan
2 node(s)needs impl