You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
880 B
26 lines
880 B
// SPDX-License-Identifier: MIT
|
|
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Burnable.sol)
|
|
|
|
pragma solidity ^0.8.20;
|
|
|
|
import {ERC721} from "../ERC721.sol";
|
|
import {Context} from "../../../utils/Context.sol";
|
|
|
|
/**
|
|
* @title ERC-721 Burnable Token
|
|
* @dev ERC-721 Token that can be burned (destroyed).
|
|
*/
|
|
abstract contract ERC721Burnable is Context, ERC721 {
|
|
/**
|
|
* @dev Burns `tokenId`. See {ERC721-_burn}.
|
|
*
|
|
* Requirements:
|
|
*
|
|
* - The caller must own `tokenId` or be an approved operator.
|
|
*/
|
|
function burn(uint256 tokenId) public virtual {
|
|
// Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
|
|
// (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
|
|
_update(address(0), tokenId, _msgSender());
|
|
}
|
|
}
|
|
|