Shouldnt the ERC721 implementation revert on `ownerOf(address(0))`?
eugenioclrc opened this issue · 1 comments
eugenioclrc commented
This is a quote from eip-721
/// @notice Find the owner of an NFT
/// @param _tokenId The identifier for an NFT
/// @dev NFTs assigned to zero addresses are considered invalid, and queries
/// about them do throw.
/// @return The address of the owner of the NFT
function ownerOf(uint256 _tokenId) external view returns (address);
I dig into other implementations and see that ownerOf(address(0))
reverts;
- OZ ERC721.sol#L72
- Solmate ERC721.sol#L36
- Solady ERC721.sol#L130-L134
But in the Huffmate
implementation is returning always 0
, shoulndt revert instead?
Please view ERC721.t.sol#L821-L824
Buttplug
MathisGD commented
Do you mean that the view function returning the owner of a given tokenId should revert when the "owner" is address zero ? If yes it seems that your are right.