v4-periphery icon indicating copy to clipboard operation
v4-periphery copied to clipboard

[Bug]: Hook examples should check that the caller is the poolManager and that the sender is the hook itself

Open snreynolds opened this issue 1 year ago • 1 comments

Describe the bug

I think some hook examples like FullRange.sol do not call out to the onlyByManager modifier and also need to check that the original sender is itself.

Expected Behavior

Add onlyByManager modifier, check sender == address(this)

To Reproduce

No response

Additional context

No response

snreynolds avatar Dec 14 '23 17:12 snreynolds

sender == address(this) isnt for hooks necessarily - its for contracts with a lockAcquired which shouldnt be all hooks

hensha256 avatar Dec 14 '23 18:12 hensha256

Hi! thanks for flagging -- going to close this issue because:

  1. hook examples no longer live in the main branch

  2. custom accounting will allow for a more v2-style curve with v2 interfaces. reference implementation https://github.com/hensha256/v2-on-v4

saucepoint avatar Sep 04 '24 22:09 saucepoint