Normal behavior: The listNFT function should only allow the token’s owner to list it for auction. Non-owners attempting to list should revert with "Not the owner".
Issue: In the test test_fail_listNFT_notOwner, the token is never minted before the listing attempt. This results in a revert from the ERC721 implementation (ERC721NonexistentToken(tokenId)) rather than the intended "Not the owner" error.
Likelihood:
This issue will always occur in the test case because the token is not minted before calling listNFT.
Impact:
False negatives: Developers may incorrectly believe ownership logic is broken.
Reduced confidence: Misaligned tests make debugging harder and reduce trust in test coverage.
Explanation:
Without minting, the token doesn’t exist, so the function reverts early. The test therefore, never validates the "Not the owner" path.
Explanation:
Update the test to mint the token before attempting to list it as a non-owner. This ensures the test case is aligned with expected contract behavior.
Fix:
This validates the true ownership restriction logic rather than an unrelated ERC721 revert.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.