Function: withdrawToken(address _token, uint256 amount, address to)
This function is used to withdraw ERC-20 tokens from the contract. It is only callable by the owner.
Inputs
_tokenControl: Arbitrary address.
Constraints: None.
Impact: Address of the token to withdraw.
amountControl: Arbitrary
uint256.Constraints: Must be less than or equal to the balance of the token.
Impact: Amount to withdraw.
toControl: Arbitrary address.
Constraints: None.
Impact: Address to receive the funds.
Branches and code coverage
Intended branches
Calculate the withdrawal amount.
Determine the recipient address.
Transfer the tokens to the recipient address.
Emit the
TokensWithdrawnevent.
Negative behavior
Revert if the caller is not the owner.
Revert if the amount is zero.