Skip to content

Instantly share code, notes, and snippets.

@yuyasugano
Created January 9, 2019 23:56
Show Gist options
  • Save yuyasugano/cc0510885bbe926641af6c5bc9b7dcde to your computer and use it in GitHub Desktop.
Save yuyasugano/cc0510885bbe926641af6c5bc9b7dcde to your computer and use it in GitHub Desktop.
ERC721 Burnable implementation
pragma solidity ^0.4.23;
import "./ERC721.sol";
/**
* @title ERC721 Burnable Token
* @dev ERC721 Token that can be irreversibly burned (destroyed).
*/
contract ERC721Burnable is ERC721 {
/**
* @dev Burns a specific ERC721 token.
* @param tokenId uint256 id of the ERC721 token to be burned.
*/
function burn(uint256 tokenId) public {
require(_isApprovedOrOwner(msg.sender, tokenId));
_burn(tokenId);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment