Improve revert reason in ERC721 (#2975)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -329,7 +329,7 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
|
||||
address to,
|
||||
uint256 tokenId
|
||||
) internal virtual {
|
||||
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
|
||||
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
|
||||
require(to != address(0), "ERC721: transfer to the zero address");
|
||||
|
||||
_beforeTokenTransfer(from, to, tokenId);
|
||||
|
||||
Reference in New Issue
Block a user