IRioLRTOperatorDelegator

Git Source

Functions

initialize

Initializes the contract by delegating to the provided EigenLayer operator.

function initialize(address token, address operator) external;

Parameters

NameTypeDescription

token

address

The address of the liquid restaking token.

operator

address

The operator's address.

delegationManager

The primary delegation contract for EigenLayer.

function delegationManager() external view returns (IDelegationManager);

eigenPod

The operator delegator's EigenPod.

function eigenPod() external view returns (IEigenPod);

getEigenPodShares

Returns the number of shares in the operator delegator's EigenPod.

function getEigenPodShares() external view returns (int256);

getETHQueuedForWithdrawal

The amount of ETH queued for withdrawal from EigenLayer, in wei.

function getETHQueuedForWithdrawal() external view returns (uint256);

getETHUnderManagement

Returns the total amount of ETH under management by the operator delegator.

This includes EigenPod shares (verified validator balances minus queued withdrawals) and ETH in the operator delegator's EigenPod.

function getETHUnderManagement() external view returns (uint256);

verifyWithdrawalCredentials

Verifies withdrawal credentials of validator(s) owned by this operator. It also verifies the effective balance of the validator(s).

function verifyWithdrawalCredentials(
    uint64 oracleTimestamp,
    IBeaconChainProofs.StateRootProof calldata stateRootProof,
    uint40[] calldata validatorIndices,
    bytes[] calldata validatorFieldsProofs,
    bytes32[][] calldata validatorFields
) external;

Parameters

NameTypeDescription

oracleTimestamp

uint64

The Beacon Chain timestamp whose state root the proof will be proven against.

stateRootProof

IBeaconChainProofs.StateRootProof

Proves a beaconStateRoot against a block root fetched from the oracle.

validatorIndices

uint40[]

The list of indices of the validators being proven, refer to consensus specs.

validatorFieldsProofs

bytes[]

Proofs against the beaconStateRoot for each validator in validatorFields.

validatorFields

bytes32[][]

The fields of the "Validator Container", refer to consensus specs.

stakeERC20

Approve EigenLayer to spend an ERC20 token, then stake it into an EigenLayer strategy.

function stakeERC20(address strategy, address token, uint256 amount) external returns (uint256 shares);

Parameters

NameTypeDescription

strategy

address

The strategy to stake the tokens into.

token

address

The token to stake.

amount

uint256

The amount of tokens to stake.

stakeETH

Stake ETH via the operator delegator's EigenPod, using the provided validator information.

function stakeETH(uint256 validatorCount, bytes calldata pubkeyBatch, bytes calldata signatureBatch) external payable;

Parameters

NameTypeDescription

validatorCount

uint256

The number of validators to deposit into.

pubkeyBatch

bytes

Batched validator public keys.

signatureBatch

bytes

Batched validator signatures.

queueWithdrawalForUserSettlement

Queues a withdrawal of the specified amount of shares from the given strategy to the withdrawal queue, intended for settling user withdrawals.

function queueWithdrawalForUserSettlement(address strategy, uint256 shares) external returns (bytes32 root);

Parameters

NameTypeDescription

strategy

address

The strategy from which to withdraw.

shares

uint256

The amount of shares to withdraw.

queueWithdrawalForOperatorExit

Queues a withdrawal of the specified amount of shares from the given strategy to the deposit pool, specifically for facilitating operator exits.

function queueWithdrawalForOperatorExit(address strategy, uint256 shares) external returns (bytes32 root);

Parameters

NameTypeDescription

strategy

address

The strategy from which to withdraw.

shares

uint256

The amount of shares to withdraw.

completeQueuedWithdrawal

Completes a queued withdrawal of the specified queuedWithdrawal for the given asset.

function completeQueuedWithdrawal(
    IDelegationManager.Withdrawal calldata queuedWithdrawal,
    address asset,
    uint256 middlewareTimesIndex
) external returns (bytes32 root);

Parameters

NameTypeDescription

queuedWithdrawal

IDelegationManager.Withdrawal

The withdrawal to complete.

asset

address

The asset to withdraw.

middlewareTimesIndex

uint256

The index of the middleware times to use for the withdrawal.

Errors

INVALID_EARNINGS_RECEIVER

Thrown when the earnings receiver is not set to the reward distributor.

error INVALID_EARNINGS_RECEIVER();

INVALID_DELEGATION_APPROVER

Thrown when the delegation approver is not the zero address.

error INVALID_DELEGATION_APPROVER();

INVALID_STAKER_OPT_OUT_BLOCKS

Thrown when the operator's staker opt out blocks is below the minimum.

error INVALID_STAKER_OPT_OUT_BLOCKS();

INVALID_VALIDATOR_COUNT

Thrown when the validator count is 0 or does not match the provided ETH value.

error INVALID_VALIDATOR_COUNT();

INVALID_ASSET_FOR_BEACON_CHAIN_STRATEGY

Thrown when the asset provided for the beacon chain strategy is not valid.

error INVALID_ASSET_FOR_BEACON_CHAIN_STRATEGY();

INVALID_PUBLIC_KEYS_BATCH_LENGTH

Thrown when the public keys batch length does not match the validator count.

error INVALID_PUBLIC_KEYS_BATCH_LENGTH(uint256 actual, uint256 expected);

Parameters

NameTypeDescription

actual

uint256

The actual length of the batch.

expected

uint256

The expected length of the batch.

INVALID_SIGNATURES_BATCH_LENGTH

Thrown when the signatures batch length does not match the validator count.

error INVALID_SIGNATURES_BATCH_LENGTH(uint256 actual, uint256 expected);

Parameters

NameTypeDescription

actual

uint256

The actual length of the batch.

expected

uint256

The expected length of the batch.

INSUFFICIENT_EXCESS_FULL_WITHDRAWAL_ETH

Thrown when there isn't enough excess full withdrawal ETH to initiate a scrape from the EigenPod.

error INSUFFICIENT_EXCESS_FULL_WITHDRAWAL_ETH();

UNAUTHORIZED_CLAIMER

Thrown when the calling account is not authorized to claim a withdrawal.

error UNAUTHORIZED_CLAIMER();

ONLY_REGISTRY_OWNER

Thrown when the caller is not the owner of the operator registry contract.

error ONLY_REGISTRY_OWNER();

Last updated