ERC721BurnableLib
Title: ERC721BurnableLib
Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721Burnable.sol)
Library implementing the ERC-721 burn extension. Adds no own storage: it burns through ERC721Lib.
Burns call ERC721Lib._update directly. Under the 0.5.0 hook model (D25, option (a)) the base library has
no hook, so the movement overrides that Replace the transfer selectors do not see these burns:
ERC721Enumerable and ERC721Votes are mutually exclusive with this extension, and ERC721Pausable does
not pause it (pinned by CompositionHazardsTest).
Functions
__ERC721Burnable_init
Registers the IERC721Burnable interface for ERC-165 discovery.
Must be called inside a pre/postInitializer block. No own storage to initialize.
function __ERC721Burnable_init() internal;registerInterface
Registers support for the IERC721Burnable interface via ERC-165.
function registerInterface() internal;burn
Destroys tokenId, authorized by the caller.
A non-zero auth makes ERC721Lib._update run _checkAuthorized, which reverts
IERC721.ERC721NonexistentToken for an unminted or burned id, so the previous owner needs no check here.
function burn(uint256 tokenId) internal;Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 |