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