Git Source
OperatorManager
Manages operator registration and validation for the protocol
Inherits from NetworkStorage, SlashingWindowStorage, and CaptureTimestampManager
Methods
_getOperatorManagerStorage
function _getOperatorManagerStorage() internal pure returns (OperatorManagerStorage storage $)
Gets the storage pointer for OperatorManager state
Returns
Name | Type | Description |
---|
$ | OperatorManagerStorage storage | $ Storage pointer to OperatorManagerStorage struct |
__OperatorManager_init_private
function __OperatorManager_init_private(
address operatorRegistry,
address operatorNetOptin
) internal onlyInitializing
Initializes the OperatorManager with required parameters
Parameters
Name | Type | Description |
---|
operatorRegistry | address | The address of the operator registry contract |
operatorNetOptin | address | The address of the operator network opt-in service |
_OPERATOR_REGISTRY
function _OPERATOR_REGISTRY() internal view returns (address)
Gets the address of the operator registry contract
Returns
Name | Type | Description |
---|
| address | The operator registry contract address |
_OPERATOR_NET_OPTIN
function _OPERATOR_NET_OPTIN() internal view returns (address)
Gets the address of the operator network opt-in service contract
Returns
Name | Type | Description |
---|
| address | The operator network opt-in service contract address |
_operatorsLength
function _operatorsLength() internal view returns (uint256)
Returns the total number of registered operators, including both active and inactive
Returns
Name | Type | Description |
---|
| uint256 | The number of registered operators |
_operatorWithTimesAt
function _operatorWithTimesAt(
uint256 pos
) internal view returns (address, uint48, uint48)
Returns the operator and their associated enabled and disabled times at a specific position
Parameters
Name | Type | Description |
---|
pos | uint256 | The index position in the operators array |
Returns
Name | Type | Description |
---|
| address | The operator address |
| uint48 | The enabled timestamp |
| uint48 | The disabled timestamp |
_activeOperators
function _activeOperators() internal view returns (address[] memory)
Returns a list of active operators
Returns
Name | Type | Description |
---|
memory | address[] | Array of addresses representing the active operators |
_activeOperatorsAt
function _activeOperatorsAt(
uint48 timestamp
) internal view returns (address[] memory)
Returns a list of active operators at a specific timestamp
Parameters
Name | Type | Description |
---|
timestamp | uint48 | The timestamp to check |
Returns
Name | Type | Description |
---|
memory | address[] | Array of addresses representing the active operators at the timestamp |
_operatorWasActiveAt
function _operatorWasActiveAt(uint48 timestamp, address operator) internal view returns (bool)
Checks if a given operator was active at a specified timestamp
Parameters
Name | Type | Description |
---|
timestamp | uint48 | The timestamp to check |
operator | address | The operator address to check |
Returns
Name | Type | Description |
---|
| bool | True if the operator was active at the timestamp, false otherwise |
_isOperatorRegistered
function _isOperatorRegistered(
address operator
) internal view returns (bool)
Checks if an operator is registered
Parameters
Name | Type | Description |
---|
operator | address | The address of the operator to check |
Returns
Name | Type | Description |
---|
| bool | True if the operator is registered, false otherwise |
_registerOperator
function _registerOperator(
address operator
) internal
Registers a new operator
Parameters
Name | Type | Description |
---|
operator | address | The address of the operator to register |
_pauseOperator
function _pauseOperator(
address operator
) internal
Pauses a registered operator
Parameters
Name | Type | Description |
---|
operator | address | The address of the operator to pause |
_unpauseOperator
function _unpauseOperator(
address operator
) internal
Unpauses a paused operator
Parameters
Name | Type | Description |
---|
operator | address | The address of the operator to unpause |
_unregisterOperator
function _unregisterOperator(
address operator
) internal
Unregisters an operator
Parameters
Name | Type | Description |
---|
operator | address | The address of the operator to unregister |