Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: medium
Invalid

Missing Function Visibility Modifiers

Summary

Several functions in the contract lack explicit visibility modifiers, defaulting to public visibility.

Vulnerability Details

  • Locations: Lines 99, 115, 167, 180, 219, 233

  • Type: Missing function visibility modifiers

  • Description: Several functions in the contract lack explicit visibility modifiers, defaulting to public visibility.

Impact

Malicious actors could potentially manipulate the contract's state by calling these functions unintentionally.

Tools Used

Slither static analysis tool identified this vulnerability.

Recommendations

  1. Explicitly specify the visibility (public, private, internal, or external) for all functions in the contract.

  2. Review and update the contract's logic to ensure proper access control and prevent unintended state changes.

  3. Consider using OpenZeppelin's Ownable contract for functions that should only be accessible by the contract owner.

  4. Best practice: Always explicitly declare function visibility, even if it's intentionally set to public. Recent Solidity versions will show warnings for functions without explicit visibility.

Updates

Lead Judging Commences

0xtimefliez Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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