Make ERC721._approve internal

(cherry picked from commit bb068ed5d9)
This commit is contained in:
Francisco Giordano
2021-03-03 16:39:08 -03:00
parent fa64a1ced0
commit a686a906bc

View File

@ -449,7 +449,12 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable
return (retval == _ERC721_RECEIVED); return (retval == _ERC721_RECEIVED);
} }
function _approve(address to, uint256 tokenId) private { /**
* @dev Approve `to` to operate on `tokenId`
*
* Emits an {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to; _tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner
} }