Function: queueWithdraw(uint256 shares)
This function allows a user to request queuing a specific number of shares for later withdrawal. It updates the queuedShares mapping to reflect the total shares the user has queued. The function records the withdrawal request details in the queuedWithdraw mapping and adds the withdrawal ID to the _withdrawQueue array.
Inputs
sharesControl: Full control.
Constraints: Must not exceed
balanceOf(msg.sender) - queuedShares[msg.sender]. There is no explicit check to ensureshares > 0.Impact: The amount requested for withdrawal.
Branches and code coverage
Intended branches
Updates user's
queuedShares.Updates data in
queuedWithdraw[id].Adds ID to
_withdrawQueue.Emits a
WithdrawQueuedevent.
Negative behavior
Reverts if the
sharesexceedsbalanceOf(msg.sender) - queuedShares[msg.sender].