Created
January 9, 2019 23:56
-
-
Save yuyasugano/cc0510885bbe926641af6c5bc9b7dcde to your computer and use it in GitHub Desktop.
ERC721 Burnable implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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