Skip to content

Commit

Permalink
revert virtual changes
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Jun 2, 2023
1 parent 4b38ece commit 71ff0c4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,3 @@ In addition to the official Solidity Style Guide we have a number of other conve
```

* Unchecked arithmetic blocks should contain comments explaining why overflow is guaranteed not to happen. If the reason is immediately apparent from the line above the unchecked block, the comment may be omitted.

* Functions should be by default `virtual`, because users frequently want to customize some behaviors. Functions that should not be virtual are those that are aliases of another function, such that any overrides to it should instead be done in the function that is aliased, usually a more general function.
4 changes: 1 addition & 3 deletions contracts/token/ERC721/ERC721.sol
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,8 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {

/**
* @dev See {IERC721-ownerOf}.
*
* This function wraps {_ownerOf}. Any desired overrides must go there.
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _ownerOf(tokenId);
require(owner != address(0), "ERC721: invalid token ID");
return owner;
Expand Down

0 comments on commit 71ff0c4

Please sign in to comment.