Apply suggestions from code review

pull/4377/head
Hadrien Croubois 2 years ago committed by GitHub
parent 1ed8f9ef2c
commit 7ec34355ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      contracts/token/ERC721/ERC721.sol

@ -387,7 +387,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er
} }
/** /**
* @dev Contraint: revert if token is already minted * @dev Constraint: revert if token is already minted
*/ */
function _constraintNotMinted(address from, address, uint256) internal pure { function _constraintNotMinted(address from, address, uint256) internal pure {
if (from != address(0)) { if (from != address(0)) {
@ -396,7 +396,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er
} }
/** /**
* @dev Contraint: revert if token is not yet minted * @dev Constraint: revert if token is not yet minted
*/ */
function _constraintMinted(address from, address, uint256 tokenId) internal pure { function _constraintMinted(address from, address, uint256 tokenId) internal pure {
if (from == address(0)) { if (from == address(0)) {
@ -405,7 +405,7 @@ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Er
} }
/** /**
* @dev Contraint: check that the caller is the current owner, or approved by the current owner * @dev Constraint: check that the caller is the current owner, or approved by the current owner
*/ */
function _constraintApprovedOrOwner(address owner, address, uint256 tokenId) internal view { function _constraintApprovedOrOwner(address owner, address, uint256 tokenId) internal view {
address spender = _msgSender(); address spender = _msgSender();

Loading…
Cancel
Save