ExampleERC721A.sol
ExampleERC721A
Inherits: ERC721A, RulesEngineClientERC721A
Functions
constructor
Constructor for the Example ERC721A token.
Initializes the token with a name and symbol.
Parameters
Name | Type | Description |
---|---|---|
name | string | The name of the token. |
symbol | string | The symbol of the token. |
mint
Mints new tokens to the specified address.
Parameters
Name | Type | Description |
---|---|---|
to | address | The address of the recipient. |
quantity | uint256 | The number of tokens to mint. |
safeTransferFrom
Safely transfers a token from one address to another.
This function overrides the ERC721A-safeTransferFrom function and interacts with the Rules Engine to ensure compliance with transfer policies. It includes additional checks for policy compliance.
Parameters
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. |
safeBatchTransferFrom
Safely transfers tokenIds from one address to another.
Parameters
Name | Type | Description |
---|---|---|
by | address | The approved address. |
from | address | The sending address. |
to | address | The receiving address. |
tokenIds | uint256[] | The token identifiers. |
data | bytes | Generic data to pass along with the transfer. |