* Add IERC721Metadata implementation into ERC721 * Add IERC721Enumerable into ERC721 * Update ERC721Pausable and ERC721Burnable * Delete ERC721Metadata, ERC721Enumerable and ERC721 (now ERC721) * Update mocks * Update tests * Update contracts/token/ERC721/ERC721.sol Co-Authored-By: Francisco Giordano <frangio.1@gmail.com> * Make ERC721Pausable and ERC721Burnable abstract Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
21 lines
615 B
Solidity
21 lines
615 B
Solidity
pragma solidity ^0.6.0;
|
|
|
|
import "../../GSN/Context.sol";
|
|
import "./ERC721.sol";
|
|
|
|
/**
|
|
* @title ERC721 Burnable Token
|
|
* @dev ERC721 Token that can be irreversibly burned (destroyed).
|
|
*/
|
|
abstract contract ERC721Burnable is Context, ERC721 {
|
|
/**
|
|
* @dev Burns a specific ERC721 token.
|
|
* @param tokenId uint256 id of the ERC721 token to be burned.
|
|
*/
|
|
function burn(uint256 tokenId) public virtual {
|
|
//solhint-disable-next-line max-line-length
|
|
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
|
|
_burn(tokenId);
|
|
}
|
|
}
|