In function withdrawFees()
, transfer is used to send money to the owners address. however transfer
reverts on failure and forwards with exactly 2300 gas . issue is 2300gas fee may not be enough for the transaction causing a revert.
https://github.com/Cyfrin/2024-10-trick-or-treat/blob/9cb3955058cad9dd28a24eb5162a96d759bfa842/src/TrickOrTreat.sol#L146-L149 .
https://docs.soliditylang.org/en/latest/units-and-global-variables.html#members-of-address-types
Owner will not be able to withdraw the fees
manual research
call
is a better way to handle withdrawals
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.