Function: withdrawToTreasury(address token, uint256 amount)
This function is used to withdraw tokens from the contract to the treasury address. It is only callable by the owner.
Inputs
tokenControl: Arbitrary address.
Constraints: Must not be zero.
Impact: Token address to withdraw.
amountControl: Arbitrary
uint256.Constraints: Must be greater than zero and less than or equal to the balance of the token.
Impact: Amount to withdraw.
Branches and code coverage
Intended branches
Emit the
FundsWithdrawnevent.Transfer tokens from the contract to the treasury address.
Negative behavior
Revert if the caller is not the owner.
Revert if the token address is zero.
Revert if the treasury address is zero.
Revert if the amount is zero.
Revert if the amount is greater than the balance of the token.