Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Valid

Lack of Event Emission After Sensitive Actions

Summary

This bug report highlights the absence of event emissions and the lack of indexed event address arguments in the events' parameters.

Vulnerability Details

Constructor

In the constructor, it is important to emit appropriate events for any non-immutable variable set that emits an event when mutated elsewhere, such as feeAddress.

selectWinner

The selectWinner function lacks events for critical state changes, including actions like delete player, setting raffleStartTime = block.timestamp, and updating previousWinner to the new winner.

FeeAddressChanged Event

The FeeAddressChanged event emitted in the changeFeeAddress function should include indexing of event parameters of type address to facilitate off-chain tracking.

Impact

Poor Developer Experience: The absence of events or poorly designed events makes it challenging for blockchain applications and tools that monitor blockchain activities to keep track of the actions performed within the PuppyRaffle contract.

Recommendations

It is strongly recommended to emit events after every state change and to index event parameters of type address to improve transparency and off-chain tracking.

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

events are missing or not detailed enough

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!