Function: addToWithdrawalQueue(address vaultAddress, uint256 amountShares, address receiver)
Adds a vault withdrawal action to the withdrawalQueue
storage array.
Inputs
vaultAddress
Control: Fully controlled.
Constraints: N/A.
Impact: The withdrawal is queued for this specific vault.
amountShares
Control: Fully controlled.
Constraints: User must own at least this amount of shares.
Impact: This amount of shares are transferred out of the receiver's wallet.
receiver
Control: Fully controlled.
Constraints: N/A.
Impact: The shares are transferred out of this address.
Branches and code coverage (including function calls)
Intended branches
Should update the vault's metadata.
Should increase this contract's share token balance.
Negative behaviour
Should revert if the user has not approved this contract.
Function call analysis
IERC20(asset).safeTransferFrom(receiver, address(this), amountShares)
What is controllable? receiver, amountShares.
If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? If it reverts, the share transfer will fail. No other side effects as it follows the CEI pattern.