Skip to content

Commit

Permalink
feat: add hooks' permissions
Browse files Browse the repository at this point in the history
Refers #389
  • Loading branch information
bidzyyys committed Nov 6, 2024
1 parent 274362b commit 5739399
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contracts/src/uniswap/v4/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ pub enum Error {
/// Uniswap V4 Hooks Interface.
#[allow(unused_variables)]
pub trait IHooks {
/// Returns a struct of permissions to signal
/// which hook functions are to be implemented.
///
/// Used at deployment to validate the address correctly represent
/// the expected permissions.
fn get_hook_permissions() -> Permissions;

/// The hook called before the state of a pool is initialized.
///
/// Returns the function selector for the hook.
Expand Down

0 comments on commit 5739399

Please sign in to comment.