Trick or Treat

First Flight #27
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Possible run out of gas in the `getTreats` function

Summary

Description: The getTreats function returns the list of the treats. The getTreats function uses the for loop to iterate over the treats. If the array of treats is too big, the getTreats function may run out of gas.

Line of code: TrickOrTreat.sol#L153

Impact

The getTreats function may run out of gas.

Tools Used

  • Manual code analysis

  • Foundry for testing

Recommendations

Consider using the pagination to return the list of the treats.

Updates

Appeal created

bube Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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