Improve revert reason in ERC721 (#2975)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
robriks
2021-12-09 18:42:18 -05:00
committed by GitHub
parent 4625192940
commit 0c858e2071
3 changed files with 3 additions and 2 deletions

View File

@ -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);