Functions
constructor
Constructor for the Example ERC1155 token. Initializes the token with a base uri.Name | Type | Description |
---|---|---|
_uri | string | The base uri of the token. |
mint
Mints new tokens to the specified address.Name | Type | Description |
---|---|---|
to | address | The address of the recipient. |
tokenId | uint256 | The ID of the token to transfer. |
value | uint256 | The value of tokenId being transfered. |
data | bytes | Additional data to pass to the recipient contract. |
mintBatch
Mints new tokens to the specified address.Name | Type | Description |
---|---|---|
to | address | The address of the recipient. |
tokenIds | uint256[] | The IDs of the tokens to transfer. |
values | uint256[] | The values of tokenIds being transfered. |
data | bytes | Additional data to pass to the recipient contract. |
safeTransferFrom
Safely transfers a token from one address to another. This function overrides the ERC1155-safeTransferFrom function and interacts with the Rules Engine to ensure compliance with transfer policies. It includes additional checks for policy compliance.Name | Type | Description |
---|---|---|
from | address | The address of the current token owner. |
to | address | The address of the recipient. |
tokenId | uint256 | The ID of the token to transfer. |
value | uint256 | The value of tokenId being transfered. |
data | bytes | Additional data to pass to the recipient contract. |
safeBatchTransferFrom
Safely transfers a token from one address to another. This function overrides the ERC1155-safeTransferFrom function and interacts with the Rules Engine to ensure compliance with transfer policies. It includes additional checks for policy compliance.Name | Type | Description |
---|---|---|
from | address | The address of the current token owner. |
to | address | The address of the recipient. |
tokenIds | uint256[] | The IDs of the tokens to transfer. |
values | uint256[] | The values of tokenIds being transfered. |
data | bytes | Additional data to pass to the recipient contract. |
supportsInterface
Returns true if this contract implements the interface defined byinterfaceId
. See the corresponding
https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
to learn more about how these ids are created.
This function call must use less than 30 000 gas.