ERC1155BurnableUpgradeable
Extension of {ERC1155} that allows token holders to destroy both their own tokens and those that they have been approved to use. Available since v3.1.
Methods
balanceOf
function balanceOf(address account, uint256 id) external view returns (uint256)
See {IERC1155-balanceOf}. Requirements: - account
cannot be the zero address.
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
id | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
balanceOfBatch
function balanceOfBatch(address[] accounts, uint256[] ids) external view returns (uint256[])
See {IERC1155-balanceOfBatch}. Requirements: - accounts
and ids
must have the same length.
Parameters
Name | Type | Description |
---|---|---|
accounts | address[] | undefined |
ids | uint256[] | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256[] | undefined |
burn
function burn(address account, uint256 id, uint256 value) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
id | uint256 | undefined |
value | uint256 | undefined |
burnBatch
function burnBatch(address account, uint256[] ids, uint256[] values) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
ids | uint256[] | undefined |
values | uint256[] | undefined |
isApprovedForAll
function isApprovedForAll(address account, address operator) external view returns (bool)
See {IERC1155-isApprovedForAll}.
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
operator | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
safeBatchTransferFrom
function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data) external nonpayable
See {IERC1155-safeBatchTransferFrom}.
Parameters
Name | Type | Description |
---|---|---|
from | address | undefined |
to | address | undefined |
ids | uint256[] | undefined |
amounts | uint256[] | undefined |
data | bytes | undefined |
safeTransferFrom
function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) external nonpayable
See {IERC1155-safeTransferFrom}.
Parameters
Name | Type | Description |
---|---|---|
from | address | undefined |
to | address | undefined |
id | uint256 | undefined |
amount | uint256 | undefined |
data | bytes | undefined |
setApprovalForAll
function setApprovalForAll(address operator, bool approved) external nonpayable
See {IERC1155-setApprovalForAll}.
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
approved | bool | undefined |
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool)
See {IERC165-supportsInterface}.
Parameters
Name | Type | Description |
---|---|---|
interfaceId | bytes4 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
uri
function uri(uint256) external view returns (string)
See {IERC1155MetadataURI-uri}. This implementation returns the same URI for all token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the \{id\}
substring with the actual token type ID.
Parameters
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | string | undefined |
Events
ApprovalForAll
event ApprovalForAll(address indexed account, address indexed operator, bool approved)
Parameters
Name | Type | Description |
---|---|---|
account indexed | address | undefined |
operator indexed | address | undefined |
approved | bool | undefined |
TransferBatch
event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values)
Parameters
Name | Type | Description |
---|---|---|
operator indexed | address | undefined |
from indexed | address | undefined |
to indexed | address | undefined |
ids | uint256[] | undefined |
values | uint256[] | undefined |
TransferSingle
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value)
Parameters
Name | Type | Description |
---|---|---|
operator indexed | address | undefined |
from indexed | address | undefined |
to indexed | address | undefined |
id | uint256 | undefined |
value | uint256 | undefined |
URI
event URI(string value, uint256 indexed id)
Parameters
Name | Type | Description |
---|---|---|
value | string | undefined |
id indexed | uint256 | undefined |