Function: withdrawTo(address token, address to, uint256 amount)
This function withdraws the caller’s available (unlocked) funds of token to the specified to address after settling lockups.
Inputs
tokenControl: Fully controlled by the caller.
Constraints: N/A.
Impact: Asset to withdraw from the caller’s account.
toControl: Fully controlled by the caller.
Constraints: Must be nonzero.
Impact: Recipient of withdrawal.
amountControl: Fully controlled by the caller.
Constraints: Must be less than or equal to the unlocked balance after settlement.
Impact: Amount to withdraw to the
toaddress.
Branches and code coverage
Intended branches
Success — withdraw to
to(native/ERC-20).Revert —
to == address(0).Revert — amount > unlocked after settlement.