Files
openzeppelin-contracts/contracts/token/ERC721/ERC721Burnable.sol
Hao (Alan) Tang 18552a8d5f Fix/add comment erc721 burnable #1464 (#1469)
* fix Add a comment to ERC721Enumerable #1465

* fix Add comments to ERC721Burnable #1464
2018-11-01 15:15:04 -03:00

22 lines
457 B
Solidity

pragma solidity ^0.4.24;
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(ownerOf(tokenId), tokenId);
}
}