Root + Impact
_isActivePlayer (src/PuppyRaffle.sol:173-180) is never used — dead code.
withdrawFees has no access control; funds can only go to feeAddress, so impact is limited, but it can be triggered by anyone.
enterRaffle accepts an empty array (msg.value == 0), a harmless no-op.
selectWinner emits no winner event, hurting off-chain indexing.
Likelihood: N/A
Impact: Informational — code clarity and indexing only.
Expected: 5/5 passing (testReentrancyRefund, testPredictableWinner,
testRefundBricksRaffle, testTotalFeesTruncation, testRefundDuplicatesBrickEntry).
## Description Events for critical state changes (e.g. owner and other critical parameters like a winner selection or the fees withdrawn) should be emitted for tracking this off-chain ## Recommendations Add a WinnerSelected event that takes as parameter the currentWinner and the minted token id and emit this event in `PuppyRaffle::selectWinner` right after the call to [`_safeMing_`](https://github.com/Cyfrin/2023-10-Puppy-Raffle/blob/07399f4d02520a2abf6f462c024842e495ca82e4/src/PuppyRaffle.sol#L153) Add a FeesWithdrawn event that takes as parameter the amount withdrawn and emit this event in `PuppyRaffle::withdrawFees` right at the end of [the method](https://github.com/Cyfrin/2023-10-Puppy-Raffle/blob/07399f4d02520a2abf6f462c024842e495ca82e4/src/PuppyRaffle.sol#L162)
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.