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

Confusing error message in `request_raffle_winner`

Summary

The message in the request_raffle_winner function doesn't display the real reason why the call was reverted to the user.

Vulnerability Details

There are several checks in the request_raffle_winner function:

  1. raffle_state is OPEN

  2. RAFFLE_DURATION has passed since start of the raffle

  3. The number of players is more than 0

  4. The balance of the contract is more than 0
    After these checks are combined by the and operator and in case if resulting value is false transaction is reverted with an ERROR_NOT_ENDED error. That error name doesn't reflect the reason why the transaction was reverted.

Impact

Low

Tools Used

VS Code.

Recommendations

Consider changing the error message to a more meaningful message.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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