Skip to content

Commit

Permalink
feat: add hook utilities for permission handling and validation (#19)
Browse files Browse the repository at this point in the history
* feat: add hook utilities for permission handling and validation

Introduces `HookOptions` and `HookPermissions` enums to manage hooks and their permissions. Implements utility functions to check individual permissions such as `has_initialize_permissions`, `has_liquidity_permissions`, and more. Also updates the utils module to include the new hook utilities.

* Optimize `HookPermissions` functions with `const` and tests

Marked several functions as `const`, `#[inline]`, and `#[must_use]` to enhance performance and enforce usage. Added comprehensive unit tests to validate permission logic for hook configurations.

* fmt
  • Loading branch information
shuhuiluo authored Dec 25, 2024
1 parent a86c558 commit c747fa3
Show file tree
Hide file tree
Showing 2 changed files with 541 additions and 0 deletions.
Loading

0 comments on commit c747fa3

Please sign in to comment.