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

Public functions could be external

Summary

Several functions in the ThePredicter contract are marked as public but could be external for gas optimization.

Vulnerability Details

The following functions in ThePredicter.sol are marked as public but are not called internally:

  • register()

  • cancelRegistration()

  • approvePlayer(address)

  • makePrediction(uint256, ScoreBoard.Result)

  • withdrawPredictionFees()

  • withdraw()

Impact

Using public instead of external for functions that are only called externally results higher gas costs for users interacting with the contract.

Tools Used

Manual code review

Recommendations

Change the visibility of these functions from public to external.

Updates

Lead Judging Commences

NightHawK 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.