SessionKeyStorage
ERC-7201 namespaced storage for session keys.
Note:
- storage-location: erc7201:lattice.storage.SessionKey
struct SessionKeyStorage {
/// @notice Validity window per key. APPEND-ONLY.
mapping(address key => SessionKeyData) _keys;
/// @notice Allowlist: `_allowed[key][_permHash(target, selector, _epoch[key])]`; epoch 0 keeps the original
/// `keccak256(abi.encode(target, selector))` hash. APPEND-ONLY.
mapping(address key => mapping(bytes32 permHash => bool)) _allowed;
/// @notice Per-token cumulative spend caps. APPEND-ONLY.
mapping(address key => mapping(address token => SpendLimit)) _spend;
/// @notice Distinct tokens with a configured cap per key, so a batch's actual balance decrease can be
/// settled against every capped token (balance-diff accounting). APPEND-ONLY.
mapping(address key => address[]) _cappedTokens;
/// @notice Grant generation per key. {SessionKeyLib.revokeSessionKey} bumps it so the key's earlier
/// `_allowed` entries stop matching. APPEND-ONLY.
mapping(address key => uint256) _epoch;
}Properties
| Name | Type | Description |
|---|---|---|
| _keys | mapping(address key => SessionKeyData) | |
| _allowed | mapping(address key => mapping(bytes32 permHash => bool)) | |
| _spend | mapping(address key => mapping(address token => SpendLimit)) | |
| _cappedTokens | mapping(address key => address[]) | |
| _epoch | mapping(address key => uint256) |