Skip to content

Commit dd3e2c6

Browse files
authored
audit(spearbit): #6 (#148)
* fix comment * rewrite
1 parent 53a55b6 commit dd3e2c6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/libraries/SettingsLib.sol

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ import {IHook} from "../interfaces/IHook.sol";
55

66
type Settings is uint256;
77

8-
/// The most significant 8 bits are reserved to specify if the key is an admin key or not. An admin key is allowed to self-call.
9-
/// The least significant 160 bits specify an address to callout to for extra or overrideable validation.
10-
/// 6 bytes | 1 byte | 5 bytes | 20 bytes
11-
// UNUSED | isAdmin | expiration | VALIDATION_ADDRESS
8+
/// @title SettingsLib
9+
/// @notice Key settings are packed into a uint256 where
10+
/// - the least significant 20 bytes (0-19) specify an address to callout to for extra or overrideable validation.
11+
/// - bytes 20-24 are used for the expiration timestamp.
12+
/// - byte 25 is used to specify if the key is an admin key or not.
13+
/// - the remaining bytes are reserved for future use.
14+
/// 6 bytes | 1 byte | 5 bytes | 20 bytes
15+
/// UNUSED | isAdmin | expiration | VALIDATION_ADDRESS
1216
library SettingsLib {
1317
uint160 constant MASK_20_BYTES = uint160(0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF);
1418
uint40 constant MASK_5_BYTES = uint40(0xFFFFFFFFFF);

0 commit comments

Comments
 (0)