OperatorRegistryV1Admin

Git Source

State Variables

MAX_OPERATOR_COUNT

The maximum number of operators allowed in the registry.

uint8 public constant MAX_OPERATOR_COUNT = 254;

MAX_ACTIVE_OPERATOR_COUNT

The maximum number of active operators allowed. This may be increased to 64 in the future.

uint8 public constant MAX_ACTIVE_OPERATOR_COUNT = 32;

VALIDATOR_DETAILS_POSITION

The validator details storage position.

bytes32 internal constant VALIDATOR_DETAILS_POSITION = keccak256('RIO.OPERATOR_REGISTRY.VALIDATOR_DETAILS');

Functions

addOperator

Adds a new operator to the registry, deploying a delegator contract and delegating to the provided operator.

function addOperator(
    RioLRTOperatorRegistryStorageV1.StorageV1 storage s,
    address token,
    address operatorDelegatorBeacon,
    IRioLRTOperatorRegistry.OperatorConfig memory config
) external returns (uint8 operatorId, address delegator);

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

token

address

The address of the liquid restaking token.

operatorDelegatorBeacon

address

The operator delegator beacon address.

config

IRioLRTOperatorRegistry.OperatorConfig

The new operator's configuration.

activateOperator

Activates an operator.

function activateOperator(RioLRTOperatorRegistryStorageV1.StorageV1 storage s, uint8 operatorId) external;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

operatorId

uint8

The operator's ID.

deactivateOperator

Deactivates an operator, exiting all remaining stake to the deposit pool.

function deactivateOperator(
    RioLRTOperatorRegistryStorageV1.StorageV1 storage s,
    IRioLRTAssetRegistry assetRegistry,
    uint8 operatorId
) external;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

assetRegistry

IRioLRTAssetRegistry

The asset registry contract.

operatorId

uint8

The operator's ID.

queueOperatorStrategyExit

Queues a complete exit from the specified strategy for the provided operator.

function queueOperatorStrategyExit(
    IRioLRTOperatorRegistry.OperatorDetails storage operator,
    uint8 operatorId,
    address strategy
) internal;

Parameters

NameTypeDescription

operator

IRioLRTOperatorRegistry.OperatorDetails

The storage accessor for the operator that's exiting.

operatorId

uint8

The operator's ID.

strategy

address

The strategy to exit.

setOperatorStrategyShareCaps

Sets the operator's strategy share allocation caps.

function setOperatorStrategyShareCaps(
    RioLRTOperatorRegistryStorageV1.StorageV1 storage s,
    uint8 operatorId,
    IRioLRTOperatorRegistry.StrategyShareCap[] calldata newStrategyShareCaps
) external;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

operatorId

uint8

The operator's ID.

newStrategyShareCaps

IRioLRTOperatorRegistry.StrategyShareCap[]

The new strategy share allocation caps.

setSecurityDaemon

Sets the security daemon to a new account (newSecurityDaemon).

function setSecurityDaemon(RioLRTOperatorRegistryStorageV1.StorageV1 storage s, address newSecurityDaemon) external;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

newSecurityDaemon

address

The new security daemon address.

setProofUploader

Sets the proof uploader to a new account (newProofUploader).

function setProofUploader(RioLRTOperatorRegistryStorageV1.StorageV1 storage s, address newProofUploader) external;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

newProofUploader

address

The new proof uploader address.

setMinStakerOptOutBlocks

Sets the minimum acceptable delay between an operator signaling intent to register

function setMinStakerOptOutBlocks(RioLRTOperatorRegistryStorageV1.StorageV1 storage s, uint24 newMinStakerOptOutBlocks)
    external;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

newMinStakerOptOutBlocks

uint24

The new min staker opt out blocks.

setValidatorKeyReviewPeriod

Sets the amount of time (in seconds) before uploaded validator keys are considered "vetted".

function setValidatorKeyReviewPeriod(
    RioLRTOperatorRegistryStorageV1.StorageV1 storage s,
    uint24 newValidatorKeyReviewPeriod
) external;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

newValidatorKeyReviewPeriod

uint24

The new validator key review period.

setOperatorValidatorCap

Sets the operator's maximum active validator cap.

function setOperatorValidatorCap(
    RioLRTOperatorRegistryStorageV1.StorageV1 storage s,
    uint8 operatorId,
    uint40 newValidatorCap
) external;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

operatorId

uint8

The unique identifier of the operator.

newValidatorCap

uint40

The new maximum active validator cap.

setOperatorStrategyCap

Sets the strategy share cap for a given operator.

function setOperatorStrategyCap(
    RioLRTOperatorRegistryStorageV1.StorageV1 storage s,
    uint8 operatorId,
    IRioLRTOperatorRegistry.StrategyShareCap memory newShareCap
) internal;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

operatorId

uint8

The unique identifier of the operator.

newShareCap

IRioLRTOperatorRegistry.StrategyShareCap

The new share cap details including the strategy and cap.

setOperatorValidatorCapInternal

Sets the operator's maximum active validator cap.

function setOperatorValidatorCapInternal(
    RioLRTOperatorRegistryStorageV1.StorageV1 storage s,
    uint8 operatorId,
    uint40 newValidatorCap
) internal;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

operatorId

uint8

The unique identifier of the operator.

newValidatorCap

uint40

The new maximum active validator cap.

getOperatorUtilizationHeapForStrategy

Returns the operator utilization heap for the specified strategy. Utilization is calculated as the operator's current allocation divided by their cap, unless the cap is 0, in which case the operator is considered to have max utilization.

function getOperatorUtilizationHeapForStrategy(RioLRTOperatorRegistryStorageV1.StorageV1 storage s, address strategy)
    internal
    view
    returns (OperatorUtilizationHeap.Data memory heap);

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

strategy

address

The strategy to get the heap for.

getOperatorUtilizationHeapForETH

Returns the ETH deposit operator utilization heap. Utilization is calculated as the operator's active deposit count divided by their cap, unless the cap is 0, in which case the operator is considered to have max utilization.

function getOperatorUtilizationHeapForETH(RioLRTOperatorRegistryStorageV1.StorageV1 storage s)
    internal
    view
    returns (OperatorUtilizationHeap.Data memory heap);

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

computeOperatorSalt

Computes the salt for an operator delegator, which is the operator ID converted to bytes32.

function computeOperatorSalt(uint8 operatorId) internal pure returns (bytes32);

Parameters

NameTypeDescription

operatorId

uint8

The operator's ID.

Last updated