-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(v4-sdk): swap function accepts pools with all hooks except swap hooks #195
Conversation
sdks/v4-sdk/src/entities/pool.ts
Outdated
return this.hooks === ADDRESS_ZERO | ||
private hookHasSwapPermissions(): boolean { | ||
return ( | ||
Hook.hasPermission(this.hooks, HookOptions.BeforeSwap) || Hook.hasPermission(this.hooks, HookOptions.AfterSwap) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to check BeforeSwapReturnsDelta
and AfterSwapReturnsDelta
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because these options only get hit if either beforeSwap or AfterSwap are true. (before/afterSwapReturnsDelta cannot be true if beforeSwap or afterSwap are false)
https://github.com/Uniswap/v4-core/blob/main/src/libraries/Hooks.sol#L265
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can leave a code comment
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Graphite Automations"Request reviewers once CI passes on sdks monorepo" took an action on this PR • (11/13/24)1 assignee was added and 1 reviewer was added to this PR based on 's automation. |
No description provided.