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

Ownable constructor initialization is missing

Summary

PuppyRaffle.sol constructor does not contain the Ownable constructor initialization

Vulnerability Details

PuppyRaffle.sol inherits from OZ Ownable contract as follows:

contract PuppyRaffle is ERC721, Ownable {

but in the constructor we see :

constructor(uint256 _entranceFee, address _feeAddress, uint256 _raffleDuration) ERC721("Puppy Raffle", "PR") {

the Ownable(address owner) is missing

Impact

This could introduce problems in compilation and - in the future- integration.

Tools Used

Mannual review

Recommendations

Add Ownable(address owner) to PuppyRaffle.sol's constructor like that:

- constructor(uint256 _entranceFee, address _feeAddress, uint256 _raffleDuration) ERC721("Puppy Raffle", "PR") {
+ constructor(uint256 _entranceFee, address _feeAddress, uint256 _raffleDuration) ERC721("Puppy Raffle", "PR") Ownable( address owner) {
Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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