Skip to content

Commit

Permalink
fix natspec around override fee flag (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
saucepoint authored Jun 18, 2024
1 parent 4caac19 commit ac47532
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/interfaces/IHooks.sol
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ interface IHooks {
/// @param hookData Arbitrary data handed into the PoolManager by the swapper to be be passed on to the hook
/// @return bytes4 The function selector for the hook
/// @return BeforeSwapDelta The hook's delta in specified and unspecified currencies. Positive: the hook is owed/took currency, negative: the hook owes/sent currency
/// @return uint24 Optionally override the lp fee, only used if three conditions are met: 1) the Pool has a dynamic fee, 2) the value's leading bit is set to 1 (24th bit, 0x800000), 3) the value is less than or equal to the maximum fee (1 million)
/// @return uint24 Optionally override the lp fee, only used if three conditions are met: 1. the Pool has a dynamic fee, 2. the value's 2nd highest bit is set (23rd bit, 0x400000), and 3. the value is less than or equal to the maximum fee (1 million)
function beforeSwap(
address sender,
PoolKey calldata key,
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/LPFeeLibrary.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ library LPFeeLibrary {
return self;
}

/// @notice returns true if the fee has the override flag set (top bit of the uint24)
/// @notice returns true if the fee has the override flag set (2nd highest bit of the uint24)
function isOverride(uint24 self) internal pure returns (bool) {
return self & OVERRIDE_FEE_FLAG != 0;
}
Expand Down

0 comments on commit ac47532

Please sign in to comment.