KeyManager
KeyManager
Abstract contract for managing keys
Methods
_updateKey
function _updateKey(address operator, bytes memory key) internal virtual
Updates the key associated with an operator
Parameters
Name | Type | Description |
---|---|---|
operator | address | The address of the operator |
key | bytes memory | The key to update |
operatorByKey
function operatorByKey(
bytes memory key
) public view virtual returns (address)
Returns the operator address associated with a given key
Parameters
Name | Type | Description |
---|---|---|
key | bytes memory | The key for which to find the associated operator |
Returns
Name | Type | Description |
---|---|---|
address | The address of the operator linked to the specified key |
operatorKey
function operatorKey(
address operator
) public view virtual returns (bytes memory)
Returns the current or previous key for a given operator
Returns the previous key if the key was updated in the current epoch
Parameters
Name | Type | Description |
---|---|---|
operator | address | The address of the operator |
Returns
Name | Type | Description |
---|---|---|
memory | bytes | The key associated with the specified operator |
keyWasActiveAt
function keyWasActiveAt(uint48 timestamp, bytes memory key) public view virtual returns (bool)
Checks if a key was active at a specific timestamp
Parameters
Name | Type | Description |
---|---|---|
timestamp | uint48 | The timestamp to check |
key | bytes memory | The key to check |
Returns
Name | Type | Description |
---|---|---|
bool | True if the key was active at the timestamp, false otherwise |