File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,14 @@ import {IHook} from "../interfaces/IHook.sol";
5
5
6
6
type Settings is uint256 ;
7
7
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
12
16
library SettingsLib {
13
17
uint160 constant MASK_20_BYTES = uint160 (0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF );
14
18
uint40 constant MASK_5_BYTES = uint40 (0xFFFFFFFFFF );
You can’t perform that action at this time.
0 commit comments