The withdrawFees()
function doesn't check for a zero balance before attempting to transfer funds.
Location: src/TrickOrTreat.sol:withdrawFees()
This can lead to unnecessary gas consumption and failed transactions when the contract balance is zero.
Forge
Add a check to ensure the contract balance is greater than zero before initiating the transfer:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.