ERC 1155 Supply Upgradeable
Extension of ERC1155 that adds tracking of total supply per id. Useful for scenarios where Fungible and Non-fungible tokens have to be clearly identified. Note: While a totalSupply of 1 might mean the corresponding is an NFT, there is no guarantees that no other token with the same id are not going to be minted.
Methods
balanceOf
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
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 |
exists
Indicates weither any token exist with a given id, or not.
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
isApprovedForAll
See {IERC1155-isApprovedForAll}.
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
operator | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
safeBatchTransferFrom
See {IERC1155-safeBatchTransferFrom}.
Parameters
Name | Type | Description |
---|---|---|
from | address | undefined |
to | address | undefined |
ids | uint256[] | undefined |
amounts | uint256[] | undefined |
data | bytes | undefined |
safeTransferFrom
See {IERC1155-safeTransferFrom}.
Parameters
Name | Type | Description |
---|---|---|
from | address | undefined |
to | address | undefined |
id | uint256 | undefined |
amount | uint256 | undefined |
data | bytes | undefined |
setApprovalForAll
See {IERC1155-setApprovalForAll}.
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
approved | bool | undefined |
supportsInterface
See {IERC165-supportsInterface}.
Parameters
Name | Type | Description |
---|---|---|
interfaceId | bytes4 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
totalSupply
Total amount of tokens in with a given id.
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
uri
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
Parameters
Name | Type | Description |
---|---|---|
account | address | undefined |
operator | address | undefined |
approved | bool | undefined |
TransferBatch
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
from | address | undefined |
to | address | undefined |
ids | uint256[] | undefined |
values | uint256[] | undefined |
TransferSingle
Parameters
Name | Type | Description |
---|---|---|
operator | address | undefined |
from | address | undefined |
to | address | undefined |
id | uint256 | undefined |
value | uint256 | undefined |
URI
Parameters
Name | Type | Description |
---|---|---|
value | string | undefined |
id | uint256 | undefined |
Last updated