GivingThanks

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

Missing Inheritance from Ownable Despite Import

  • Root Cause + Impact:

    • Root Cause: The contract imports Ownable from OpenZeppelin but does not inherit from it.

    • Impact: Essential ownership functionalities provided by Ownable are unavailable, potentially leading to unauthorized access and control over critical functions.

  • Vulnerability Details:

    • Without inheriting from Ownable, the contract cannot leverage modifiers like onlyOwner, which are crucial for restricting access to sensitive functions such as withdraw or updateRegistry.

  • Recommendations:

    • Inherit from Ownable to utilize its ownership management features.

    • Update the contract declaration as follows:

      contract GivingThanks is ERC721URIStorage, Ownable {
      // Contract code...
      }
    • Replace manual owner management with Ownable’s owner variable and onlyOwner modifier to enforce access control.

Updates

Lead Judging Commences

n0kto Lead Judge 12 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.