Git Source
Functions
initialize
Initializes the contract.
Copy function initialize ( address initialOwner , address token) external ;
Parameters
getCurrentEpoch
Retrieve the current withdrawal epoch for a given asset.
Copy function getCurrentEpoch ( address asset) external view returns ( uint256 );
Parameters
getRestakingTokensInCurrentEpoch
Get the amount of restaking tokens requested for withdrawal in the current epoch
for asset
.
Copy function getRestakingTokensInCurrentEpoch ( address asset) external view returns ( uint256 );
Parameters
getTotalSharesOwed
Get the total amount of shares owed to withdrawers across all epochs for asset
.
Copy function getTotalSharesOwed ( address asset) external view returns ( uint256 );
Parameters
getEpochWithdrawalSummary
Retrieve withdrawal epoch information for a given asset and epoch.
Copy function getEpochWithdrawalSummary ( address asset , uint256 epoch)
external
view
returns ( EpochWithdrawalSummary memory );
Parameters
getUserWithdrawalSummary
Retrieve a user's withdrawal information for a given asset and epoch.
Copy function getUserWithdrawalSummary ( address asset , uint256 epoch , address user)
external
view
returns ( UserWithdrawalSummary memory );
Parameters
queueWithdrawal
Queue withdrawal of asset
to withdrawer
in the current epoch. The withdrawal can be claimed as the underlying asset by the withdrawer once the current epoch is settled.
Copy function queueWithdrawal ( address withdrawer , address asset , uint256 amountIn) external ;
Parameters
claimWithdrawalsForEpoch
Withdraws all asset
owed to the caller in a given epoch.
Copy function claimWithdrawalsForEpoch ( ClaimRequest calldata request) external returns ( uint256 amountOut);
Parameters
claimWithdrawalsForManyEpochs
Withdraws owed assets owed to the caller from many withdrawal requests.
Copy function claimWithdrawalsForManyEpochs ( ClaimRequest [] calldata requests)
external
returns ( uint256 [] memory amountsOut);
Parameters
settleCurrentEpochFromDepositPool
Settle the current epoch for asset
using assetsReceived
from the deposit pool.
Copy function settleCurrentEpochFromDepositPool ( address asset , uint256 assetsReceived) external ;
Parameters
queueCurrentEpochSettlementFromEigenLayer
Queues the current epoch for asset
settlement via EigenLayer and record the amount of assets received from the deposit pool.
Copy function queueCurrentEpochSettlementFromEigenLayer (
address asset ,
uint256 assetsReceived ,
uint256 shareValueOfAssetsReceived ,
uint256 totalShareValueAtRebalance ,
bytes32 aggregateRoot
) external ;
Parameters
Events
WithdrawalQueued
Emitted when a user withdrawal is queued.
Copy event WithdrawalQueued ( uint256 indexed epoch, address asset, address withdrawer, uint256 amountIn);
Parameters
WithdrawalsClaimedForEpoch
Emitted when a user claims a withdrawal.
Copy event WithdrawalsClaimedForEpoch ( uint256 indexed epoch, address asset, address withdrawer, uint256 amountOut);
Parameters
EpochSettledFromDepositPool
Emitted when an epoch is settled from the deposit pool.
Copy event EpochSettledFromDepositPool ( uint256 indexed epoch, address asset, uint256 assetsReceived);
Parameters
EpochQueuedForSettlementFromEigenLayer
Emitted when an epoch is queued for settlement via EigenLayer.
Copy event EpochQueuedForSettlementFromEigenLayer (
uint256 indexed epoch,
address asset,
uint256 assetsReceived,
uint256 shareValueOfAssetsReceived,
uint256 totalShareValueAtRebalance,
uint256 restakingTokensBurned,
bytes32 aggregateRoot
);
Parameters
EpochSettledFromEigenLayer
Emitted when an epoch is settled from EigenLayer.
Copy event EpochSettledFromEigenLayer ( uint256 indexed epoch, address asset, uint256 assetsReceived);
Parameters
Errors
NO_AMOUNT_IN
Thrown when the amount in is zero.
Copy error NO_AMOUNT_IN ();
NOTHING_TO_CLAIM
Thrown when there is nothing to claim.
Copy error NOTHING_TO_CLAIM ();
NO_WITHDRAWALS_IN_EPOCH
Thrown when attempting an operation on an epoch with no withdrawals.
Copy error NO_WITHDRAWALS_IN_EPOCH ();
EPOCH_ALREADY_SETTLED
Thrown when attempting to settle an epoch that has already been settled.
Copy error EPOCH_ALREADY_SETTLED ();
EPOCH_NOT_SETTLED
Thrown when attempting to withdraw from an epoch that has not been settled.
Copy error EPOCH_NOT_SETTLED ();
WITHDRAWALS_ALREADY_QUEUED_FOR_EPOCH
Thrown when attempting to queue withdrawals for an epoch that has already been queued.
Copy error WITHDRAWALS_ALREADY_QUEUED_FOR_EPOCH ();
WITHDRAWALS_NOT_QUEUED_FOR_EPOCH
Thrown when attempting to settle an epoch that has not been queued from EigenLayer.
Copy error WITHDRAWALS_NOT_QUEUED_FOR_EPOCH ();
WITHDRAWAL_ALREADY_CLAIMED
Thrown when attempting to claim a withdrawal that has already been claimed.
Copy error WITHDRAWAL_ALREADY_CLAIMED ();
INVALID_AGGREGATE_WITHDRAWAL_ROOT
Thrown when the calculated aggregate withdrawal root does not match the stored root.
Copy error INVALID_AGGREGATE_WITHDRAWAL_ROOT ();
INVALID_MIDDLEWARE_TIMES_INDEXES_LENGTH
Thrown when an incorrect number of middleware times indexes are provided.
Copy error INVALID_MIDDLEWARE_TIMES_INDEXES_LENGTH ();
Structs
UserWithdrawalSummary
How many shares are owed to a user in a given epoch, as well as whether or not the user has completed the withdrawal.
Copy struct UserWithdrawalSummary {
bool claimed;
uint120 amountIn;
}
EpochWithdrawals
How many shares owed to all users in a given epoch, as well as whether or not the epoch's withdrawals have been completed.
Copy struct EpochWithdrawals {
bool settled;
uint120 assetsReceived;
uint120 sharesOutstanding;
uint120 amountIn;
uint120 amountToBurnAtSettlement;
bytes32 aggregateRoot;
mapping ( address => UserWithdrawalSummary) users;
}
EpochWithdrawalSummary
Epoch withdrawal information without the mapping, which allows us to return the struct from a view function.
Copy struct EpochWithdrawalSummary {
bool settled;
uint120 amountIn;
uint120 assetsReceived;
uint120 sharesOutstanding;
uint120 amountToBurnAtSettlement;
bytes32 aggregateRoot;
}
ClaimRequest
The information needed to claim an owed asset in a given epoch.
Copy struct ClaimRequest {
address asset;
uint256 epoch;
}