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

`totalSupply()` not implemented at all, will cause compiler error.

Summary

totalSupply() not implemented at all, will cause compiler error.

Vulnerability Details

Since totalSupply() not implemented in PuppyRaffle contract or the relevant ERC721Enumerable extension contract not imported, the solidity compiler will errorrr.

Impact

Contract won't compile.
And IF the contract magically compiles, the index of the NFT will be zero always.

Tools Used

VSC.

Recommendations

Either implement the totalSupply() in the PuppyRaffle contract and import the IERC721Enumerable interface, or import and inherit the ERC721Enumerable contract to use totalSupply() in the PuppyRaffle contract.

import {IERC721Enumerable} from "./IERC721Enumerable.sol";
OR
import {ERC721Enumerable} from "./ERC721Enumerable.sol";

Updates

Lead Judging Commences

patrickalphac Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other
0xscsamurai Submitter
over 1 year ago
patrickalphac Lead Judge
over 1 year ago
patrickalphac Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other
patrickalphac Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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