OperatorRegistryV1Admin

OperatorRegistryV1Admin

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.

uint8 public constant MAX_ACTIVE_OPERATOR_COUNT = 64;

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 operatorDelegatorBeaconImpl,
    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.

operatorDelegatorBeaconImpl

address

The operator beacon implementation 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 asset manager.

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.

completeOperatorStrategyExit

Completes an exit from an EigenLayer strategy for the provided operatorId, forwarding the received assets to the deposit pool.

function completeOperatorStrategyExit(
    RioLRTOperatorRegistryStorageV1.StorageV1 storage s,
    IDelegationManager delegationManager,
    IRioLRTAssetRegistry assetRegistry,
    address depositPool,
    uint8 operatorId,
    IDelegationManager.Withdrawal calldata queuedWithdrawal,
    uint256 middlewareTimesIndex
) external;

Parameters

NameTypeDescription

s

RioLRTOperatorRegistryStorageV1.StorageV1

The operator registry v1 storage accessor.

delegationManager

IDelegationManager

The delegation manager contract.

assetRegistry

IRioLRTAssetRegistry

The asset registry contract.

depositPool

address

The deposit pool contract address.

operatorId

uint8

The ID of the operator who is exiting the strategy.

queuedWithdrawal

IDelegationManager.Withdrawal

The queued strategy withdrawal for the operator.

middlewareTimesIndex

uint256

The index of the middleware times for the operator.

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.

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.

setOperatorValidatorCap

Sets the operator's maximum active validator cap.

function setOperatorValidatorCap(
    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.

reducePrecisionToGwei

Reduces the precision of the given amount to the nearest Gwei.

function reducePrecisionToGwei(uint256 amount) internal pure returns (uint256);

Parameters

NameTypeDescription

amount

uint256

The amount whose precision is to be reduced.

Last updated