Skip to content

Commit 7a24f6b

Browse files
authored
chore: update DelegationManager docs to reflect plural queueWithdrawals function (#330)
1 parent 4e2ef13 commit 7a24f6b

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

docs/core/DelegationManager.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Registers the caller as an Operator in EigenLayer. The new Operator provides the
6363
* `address delegationApprover`: if set, this address must sign and approve new delegation from Stakers to this Operator *(optional)*
6464
* `uint32 stakerOptOutWindowBlocks`: the minimum delay (in blocks) between beginning and completing registration for an AVS. *(currently unused)*
6565

66-
`registerAsOperator` cements the Operator's `OperatorDetails`, and self-delegates the Operator to themselves - permanently marking the caller as an Operator. They cannot "deregister" as an Operator - however, they can exit the system by withdrawing their funds via `queueWithdrawal`.
66+
`registerAsOperator` cements the Operator's `OperatorDetails`, and self-delegates the Operator to themselves - permanently marking the caller as an Operator. They cannot "deregister" as an Operator - however, they can exit the system by withdrawing their funds via `queueWithdrawals`.
6767

6868
*Effects*:
6969
* Sets `OperatorDetails` for the Operator in question
@@ -165,7 +165,7 @@ Allows a Staker to delegate to an Operator by way of signature. This function ca
165165
These methods can be called by both Stakers AND Operators, and are used to (i) undelegate a Staker from an Operator, (ii) queue a withdrawal of a Staker/Operator's shares, or (iii) complete a queued withdrawal:
166166

167167
* [`DelegationManager.undelegate`](#undelegate)
168-
* [`DelegationManager.queueWithdrawal`](#queuewithdrawal)
168+
* [`DelegationManager.queueWithdrawals`](#queuewithdrawals)
169169
* [`DelegationManager.completeQueuedWithdrawal`](#completequeuedwithdrawal)
170170
* [`DelegationManager.completeQueuedWithdrawals`](#completequeuedwithdrawals)
171171

@@ -207,44 +207,44 @@ Note that becoming an Operator is irreversible! Although Operators can withdraw,
207207
* See [`EigenPodManager.removeShares`](./EigenPodManager.md#eigenpodmanagerremoveshares)
208208
* See [`StrategyManager.removeShares`](./StrategyManager.md#removeshares)
209209

210-
#### `queueWithdrawal`
210+
#### `queueWithdrawals`
211211

212212
```solidity
213-
function queueWithdrawal(
214-
IStrategy[] calldata strategies,
215-
uint[] calldata shares,
216-
address withdrawer
213+
function queueWithdrawals(
214+
QueuedWithdrawalParams[] calldata queuedWithdrawalParams
217215
)
218216
external
219217
onlyWhenNotPaused(PAUSED_ENTER_WITHDRAWAL_QUEUE)
220-
returns (bytes32)
218+
returns (bytes32[] memory)
221219
```
222220

223-
Allows the caller to queue a withdrawal of their held shares across any strategy (in either/both the `EigenPodManager` or `StrategyManager`). If the caller is delegated to an Operator, the `shares` and `strategies` being withdrawn are immediately removed from that Operator's delegated share balances. Note that if the caller is an Operator, this still applies, as Operators are essentially delegated to themselves.
221+
Allows the caller to queue one or more withdrawals of their held shares across any strategy (in either/both the `EigenPodManager` or `StrategyManager`). If the caller is delegated to an Operator, the `shares` and `strategies` being withdrawn are immediately removed from that Operator's delegated share balances. Note that if the caller is an Operator, this still applies, as Operators are essentially delegated to themselves.
224222

225-
`queueWithdrawal` works very similarly to `undelegate`, except that the caller is not undelegated, and also may:
223+
`queueWithdrawals` works very similarly to `undelegate`, except that the caller is not undelegated, and also may:
226224
* Choose which strategies and how many shares to withdraw (as opposed to ALL shares/strategies)
227225
* Specify a `withdrawer` to receive withdrawn funds once the withdrawal is completed
228226

229-
All shares being withdrawn (whether via the `EigenPodManager` or `StrategyManager`) are removed while the withdrawal is in the queue.
227+
All shares being withdrawn (whether via the `EigenPodManager` or `StrategyManager`) are removed while the withdrawals are in the queue.
230228

231-
The withdrawal can be completed by the `withdrawer` after `withdrawalDelayBlocks`, and does not require the `withdrawer` to "fully exit" from the system -- they may choose to receive their shares back in full once the withdrawal is completed (see [`completeQueuedWithdrawal`](#completequeuedwithdrawal) for details).
229+
Withdrawals can be completed by the `withdrawer` after `withdrawalDelayBlocks`, and does not require the `withdrawer` to "fully exit" from the system -- they may choose to receive their shares back in full once the withdrawal is completed (see [`completeQueuedWithdrawal`](#completequeuedwithdrawal) for details).
232230

233231
*Effects*:
234-
* If the caller is delegated to an Operator, that Operator's delegated balances are decreased according to the `strategies` and `shares` being withdrawn.
235-
* A `Withdrawal` is queued for the `withdrawer`, tracking the strategies and shares being withdrawn
236-
* The caller's withdrawal nonce is increased
237-
* The hash of the `Withdrawal` is marked as "pending"
238-
* See [`EigenPodManager.removeShares`](./EigenPodManager.md#eigenpodmanagerremoveshares)
239-
* See [`StrategyManager.removeShares`](./StrategyManager.md#removeshares)
232+
* For each withdrawal:
233+
* If the caller is delegated to an Operator, that Operator's delegated balances are decreased according to the `strategies` and `shares` being withdrawn.
234+
* A `Withdrawal` is queued for the `withdrawer`, tracking the strategies and shares being withdrawn
235+
* The caller's withdrawal nonce is increased
236+
* The hash of the `Withdrawal` is marked as "pending"
237+
* See [`EigenPodManager.removeShares`](./EigenPodManager.md#eigenpodmanagerremoveshares)
238+
* See [`StrategyManager.removeShares`](./StrategyManager.md#removeshares)
240239

241240
*Requirements*:
242241
* Pause status MUST NOT be set: `PAUSED_ENTER_WITHDRAWAL_QUEUE`
243-
* `strategies.length` MUST equal `shares.length`
244-
* `strategies.length` MUST NOT be equal to 0
245-
* The `withdrawer` MUST NOT be 0
246-
* See [`EigenPodManager.removeShares`](./EigenPodManager.md#eigenpodmanagerremoveshares)
247-
* See [`StrategyManager.removeShares`](./StrategyManager.md#removeshares)
242+
* For each withdrawal:
243+
* `strategies.length` MUST equal `shares.length`
244+
* `strategies.length` MUST NOT be equal to 0
245+
* The `withdrawer` MUST NOT be 0
246+
* See [`EigenPodManager.removeShares`](./EigenPodManager.md#eigenpodmanagerremoveshares)
247+
* See [`StrategyManager.removeShares`](./StrategyManager.md#removeshares)
248248

249249
#### `completeQueuedWithdrawal`
250250

@@ -390,7 +390,7 @@ Called by the `EigenPodManager` when a Staker's shares decrease. This method is
390390

391391
```solidity
392392
function setWithdrawalDelayBlocks(
393-
uint256 _newWithdrawalDelayBlocks
393+
uint256 newWithdrawalDelayBlocks
394394
)
395395
external
396396
onlyOwner
@@ -403,4 +403,4 @@ Allows the `owner` to update the number of blocks that must pass before a withdr
403403

404404
*Requirements*:
405405
* Caller MUST be the `owner`
406-
* `_withdrawalDelayBlocks` MUST NOT be greater than `MAX_WITHDRAWAL_DELAY_BLOCKS` (50400)
406+
* `newWithdrawalDelayBlocks` MUST NOT be greater than `MAX_WITHDRAWAL_DELAY_BLOCKS` (50400)

docs/core/EigenPodManager.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ This method is not allowed to cause the `Staker's` balance to go negative. This
308308

309309
*Entry Points*:
310310
* `DelegationManager.undelegate`
311-
* `DelegationManager.queueWithdrawal`
311+
* `DelegationManager.queueWithdrawals`
312312

313313
*Effects*:
314314
* Removes `shares` from `podOwner's` share balance
@@ -333,7 +333,7 @@ function addShares(
333333

334334
The `DelegationManager` calls this method when a queued withdrawal is completed and the withdrawer specifies that they want to receive the withdrawal as "shares" (rather than as the underlying tokens). A Pod Owner might want to do this in order to change their delegated Operator without needing to fully exit their validators.
335335

336-
Note that typically, shares from completed withdrawals are awarded to a `withdrawer` specified when the withdrawal is initiated in `DelegationManager.queueWithdrawal`. However, because beacon chain ETH shares are linked to proofs provided to a Pod Owner's `EigenPod`, this method is used to award shares to the original Pod Owner.
336+
Note that typically, shares from completed withdrawals are awarded to a `withdrawer` specified when the withdrawal is initiated in `DelegationManager.queueWithdrawals`. However, because beacon chain ETH shares are linked to proofs provided to a Pod Owner's `EigenPod`, this method is used to award shares to the original Pod Owner.
337337

338338
If the Pod Owner has a share deficit (negative shares), the deficit is repaid out of the added `shares`. If the Pod Owner's positive share count increases, this change is returned to the `DelegationManager` to be delegated to the Pod Owner's Operator (if they have one).
339339

docs/core/StrategyManager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ The Staker's share balance for the `strategy` is decreased by the removed `share
127127

128128
*Entry Points*:
129129
* `DelegationManager.undelegate`
130-
* `DelegationManager.queueWithdrawal`
130+
* `DelegationManager.queueWithdrawals`
131131

132132
*Effects*:
133133
* The Staker's share balance for the given `strategy` is decreased by the given `shares`

0 commit comments

Comments
 (0)