The collectPresent
and buyPresent
functions are missing corresponding events, which would allow off-chain monitoring of present collection and present purchases.
Currently, the collectPresent
and buyPresent
functions do not emit any events to notify external systems or off-chain applications about the actions being performed. This absence of events makes it difficult to track and monitor present collection and purchases.
The absence of events for the collectPresent
and buyPresent
functions limits the ability to track and monitor present collection and purchases. Adding these events will greatly enhance the transparency and observability of these actions.
Manual review
It is recommended to add the following events to the contract:
PresentCollected
event: Emits when a user successfully collects their present. Includes the address of the person and their present status.
PresentPurchased
event: Emits when a user buys a present. Includes the address of the buyer and the recipient of the present.
Here is an example of how the events can be added to the contract:
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.