RulesEngineClientERC721A
Inherits: RulesEngineClient
Author: @mpetersoCode55, @ShaneDuncan602, @TJ-Everett, @VoR0220, @Palmerg4
This contract is intended to be inherited and implemented by ERC721A token contracts requiring Rules Engine integration.
Abstract contract containing modifiers and functions for integrating ERC721A token operations with the Rules Engine.
This contract provides policy checks for mint
, safeBatchtransferFrom
, and safeTransferFrom
operations, both before and after execution.
Functions
checksPoliciesERC721ASafeTransferFromBefore
Modifier for checking policies before executing the safeTransferFrom
function.
Calls the _checkPoliciesERC721ASafeTransferFrom
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
from | address | The sending address. |
to | address | The receiving address. |
tokenId | uint256 | The token identifier. |
checksPoliciesERC721ASafeTransferFromAfter
Modifier for checking policies after executing the safeTransferFrom
function.
Calls the _checkPoliciesERC721SafeTransferFrom
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
from | address | The sending address. |
to | address | The receiving address. |
tokenId | uint256 | The token identifier. |
checksPoliciesERC721ASafeBatchTransferFromBefore
Modifier for checking policies before executing the safeBatchTransferFrom
function.
Calls the _checkPoliciesERC721ASafeTransferFrom
function to evaluate policies.
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. |
checksPoliciesERC721ASafeBatchTransferFromAfter
Modifier for checking policies after executing the safeBatchTransferFrom
function.
Calls the _checkPoliciesERC721SafeBatchTransferFrom
function to evaluate policies.
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. |
checksPoliciesERC721AMintBefore
Modifier for checking policies before executing the mint
function.
Calls the _checkPoliciesERC721SafeMint
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
to | address | The receiving address. |
quantity | uint256 | The amount of tokens minted. |
checksPoliciesERC721AMintAfter
Modifier for checking policies after executing the mint
function.
Calls the _checkPoliciesERC721AMint
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
to | address | The receiving address. |
quantity | uint256 | The amount of tokens minted. |
_checkPoliciesERC721ASafeTransferFrom
Calls the Rules Engine to evaluate policies for an ERC721A safeTransferFrom
operation.
Encodes the parameters and invokes the _invokeRulesEngine
function.
Parameters
Name | Type | Description |
---|---|---|
_from | address | The sending address. |
_to | address | The receiving address. |
_tokenId | uint256 | The token identifier. |
_checkPoliciesERC721ASafeBatchTransferFrom
Calls the Rules Engine to evaluate policies for an ERC721A safeTransferFrom
operation.
Encodes the parameters and invokes the _invokeRulesEngine
function.
Parameters
Name | Type | Description |
---|---|---|
_by | 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. |
_checkPoliciesERC721AMint
Calls the Rules Engine to evaluate policies for an ERC721 safeMint
operation.
Encodes the parameters and invokes the _invokeRulesEngine
function.
Parameters
Name | Type | Description |
---|---|---|
_to | address | The receiving address. |
_quantity | uint256 | The amount of tokens minted. |