ERC1155BurnableLib
Title: ERC1155BurnableLib
Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/extensions/ERC1155Burnable.sol)
Library implementing the ERC-1155 burn extension. Adds no own storage: burns debit the ERC1155Lib balances.
Burns call ERC1155Lib directly: an ERC-1155 movement-replacing extension (a Pausable or Supply facet) would not see them, so the two are mutually exclusive (D25, #234).
Functions
__ERC1155Burnable_init
Registers the IERC1155Burnable interface for ERC-165 discovery.
Must be called inside a pre/postInitializer block. No own storage to initialize.
function __ERC1155Burnable_init() internal;registerInterface
Registers support for the IERC1155Burnable interface via ERC-165.
function registerInterface() internal;burn
Destroys value tokens of type id from account. The caller must be account or an approved
operator of account.
function burn(address account, uint256 id, uint256 value) internal;Parameters
| Name | Type | Description |
|---|---|---|
| account | address | |
| id | uint256 | |
| value | uint256 |
burnBatch
Batched version of burn.
function burnBatch(address account, uint256[] memory ids, uint256[] memory values) internal;Parameters
| Name | Type | Description |
|---|---|---|
| account | address | |
| ids | uint256[] | |
| values | uint256[] |