DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

In `SoulboundProfileNFT.sol::tokenURI` function did not implemented properly as `virtual` and `override` both keywords used.

Description

`SoulboundProfileNFT.sol::tokenURI` function implementes the functionality from `ERC721.sol::tokenURI` function which is `virtual`. If any function implments this same functionality in inherited contract then it should be override for that specific contract.
But in `SoulboundProfileNFT.sol::tokenURI` there is `virtual` and `override` both keywords are used in same contract.
```javascript
@> function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (ownerOf(tokenId) == address(0)) {
revert ERC721Metadata__URI_QueryFor_NonExistentToken();
}
```

Recommendations

Should remove `virtual` keyword from function.
```diff
- function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
+ function tokenURI(uint256 tokenId) public view override returns (string memory) {
if (ownerOf(tokenId) == address(0)) {
revert ERC721Metadata__URI_QueryFor_NonExistentToken();
}
```
Updates

Appeal created

n0kto Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

gaurangbrdv Submitter
5 months ago
n0kto Lead Judge
5 months ago
n0kto Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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