Raisebox Faucet

First Flight #50
Beginner FriendlySolidity
100 EXP
Submission Details
Impact: low
Likelihood: low

Missing event for `adjustDailyClaimLimit`

Author Revealed upon completion

Description:
Consider emitting events for all major state changes.
You should emit events at the end of the function, after all the critical actions (payments, checks, and upgrade) have been performed.
This will allow any off-chain system to track what action occurs and which contract address is now active.

Impact
The impact of missing an emit statement for the event can be significant for usability, transparency, and integrations.

  • If you don’t emit the event, there’s no easy way for external systems to know that action happened, or to which address;

  • Debugging and auditing becomes harder

Mitigation:

+ event DailyClaimLimitAdjusted(uint256 newDailyClaimLimit);
function adjustDailyClaimLimit(uint256 by, bool increaseClaimLimit) public onlyOwner {
...
+ emit DailyClaimLimitAdjusted(dailyClaimLimit);
}

Support

FAQs

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