ERC721Burnable.sol 452 B

123456789101112131415161718
  1. pragma solidity ^0.4.24;
  2. import "./ERC721.sol";
  3. /**
  4. * @title ERC721 Burnable Token
  5. * @dev ERC721 Token that can be irreversibly burned (destroyed).
  6. */
  7. contract ERC721Burnable is ERC721 {
  8. /**
  9. * @dev Burns a specific ERC721 token.
  10. * @param tokenId uint256 id of the ERC721 token to be burned.
  11. */
  12. function burn(uint256 tokenId) public {
  13. require(_isApprovedOrOwner(msg.sender, tokenId));
  14. _burn(tokenId);
  15. }
  16. }