Pieces Protocol

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

[L-3] `TokenDivider::divideNft` has duplicate `onlyNftOwner` modifier

Description: In TokenDivider::divideNft it lists the onlyNftOwner modifier twice.

function divideNft(
address nftAddress,
uint256 tokenId,
uint256 amount
)
external
onlyNftOwner(nftAddress, tokenId)
onlyNftOwner(nftAddress, tokenId)
{

Impact: Listing the same modifier twice leads to wasted gas due to the same modifier exwecuting twice.

Recommended Mitigation: Remove the duplicate modifier.

function divideNft(
address nftAddress,
uint256 tokenId,
uint256 amount
)
external
onlyNftOwner(nftAddress, tokenId)
- onlyNftOwner(nftAddress, tokenId)
{
Updates

Lead Judging Commences

fishy Lead Judge 5 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.