IDelayedWithdrawalRouter

Git Source

Functions

createDelayedWithdrawal

Creates an delayed withdrawal for msg.value to the recipient.

Only callable by the podOwner's EigenPod contract.

function createDelayedWithdrawal(address podOwner, address recipient) external payable;

claimDelayedWithdrawals

Called in order to withdraw delayed withdrawals made to the recipient that have passed the withdrawalDelayBlocks period.

function claimDelayedWithdrawals(address recipient, uint256 maxNumberOfWithdrawalsToClaim) external;

Parameters

NameTypeDescription

recipient

address

The address to claim delayedWithdrawals for.

maxNumberOfWithdrawalsToClaim

uint256

Used to limit the maximum number of withdrawals to loop through claiming.

claimDelayedWithdrawals

Called in order to withdraw delayed withdrawals made to the caller that have passed the withdrawalDelayBlocks period.

function claimDelayedWithdrawals(uint256 maxNumberOfWithdrawalsToClaim) external;

Parameters

NameTypeDescription

maxNumberOfWithdrawalsToClaim

uint256

Used to limit the maximum number of withdrawals to loop through claiming.

setWithdrawalDelayBlocks

Owner-only function for modifying the value of the withdrawalDelayBlocks variable.

function setWithdrawalDelayBlocks(uint256 newValue) external;

userWithdrawals

Getter function for the mapping _userWithdrawals

function userWithdrawals(address user) external view returns (UserDelayedWithdrawals memory);

getUserDelayedWithdrawals

Getter function to get all delayedWithdrawals of the user

function getUserDelayedWithdrawals(address user) external view returns (DelayedWithdrawal[] memory);

getClaimableUserDelayedWithdrawals

Getter function to get all delayedWithdrawals that are currently claimable by the user

function getClaimableUserDelayedWithdrawals(address user) external view returns (DelayedWithdrawal[] memory);

userDelayedWithdrawalByIndex

Getter function for fetching the delayedWithdrawal at the indexth entry from the _userWithdrawals[user].delayedWithdrawals array

function userDelayedWithdrawalByIndex(address user, uint256 index) external view returns (DelayedWithdrawal memory);

userWithdrawalsLength

Getter function for fetching the length of the delayedWithdrawals array of a specific user

function userWithdrawalsLength(address user) external view returns (uint256);

canClaimDelayedWithdrawal

Convenience function for checking whether or not the delayedWithdrawal at the indexth entry from the _userWithdrawals[user].delayedWithdrawals array is currently claimable

function canClaimDelayedWithdrawal(address user, uint256 index) external view returns (bool);

withdrawalDelayBlocks

Delay enforced by this contract for completing any delayedWithdrawal. Measured in blocks, and adjustable by this contract's owner, up to a maximum of MAX_WITHDRAWAL_DELAY_BLOCKS. Minimum value is 0 (i.e. no delay enforced).

function withdrawalDelayBlocks() external view returns (uint256);

Events

DelayedWithdrawalCreated

event for delayedWithdrawal creation

event DelayedWithdrawalCreated(address podOwner, address recipient, uint256 amount, uint256 index);

DelayedWithdrawalsClaimed

event for the claiming of delayedWithdrawals

event DelayedWithdrawalsClaimed(address recipient, uint256 amountClaimed, uint256 delayedWithdrawalsCompleted);

WithdrawalDelayBlocksSet

Emitted when the withdrawalDelayBlocks variable is modified from previousValue to newValue.

event WithdrawalDelayBlocksSet(uint256 previousValue, uint256 newValue);

Structs

DelayedWithdrawal

struct used to pack data into a single storage slot

struct DelayedWithdrawal {
    uint224 amount;
    uint32 blockCreated;
}

UserDelayedWithdrawals

struct used to store a single users delayedWithdrawal data

struct UserDelayedWithdrawals {
    uint256 delayedWithdrawalsCompleted;
    DelayedWithdrawal[] delayedWithdrawals;
}

Last updated