RulesEngineClientERC721
Inherits: [RulesEngineClient](/v2(/v2/reference/client/RulesEngineClient.sol/abstract.RulesEngineClient)
Author: @mpetersoCode55, @ShaneDuncan602, @TJ-Everett, @VoR0220
This contract is intended to be inherited and implemented by ERC721 token contracts requiring Rules Engine integration.
Abstract contract containing modifiers and functions for integrating ERC721 token operations with the Rules Engine.
This contract provides policy checks for safeMint
, transferFrom
, and safeTransferFrom
operations, both before and after execution.
Functions
checksPoliciesERC721SafeMintBefore
Modifier for checking policies before executing the safeMint
function.
Calls the _checkPoliciesERC721SafeMint
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
to | address | The receiving address. |
checksPoliciesERC721SafeMintAfter
Modifier for checking policies after executing the safeMint
function.
Calls the _checkPoliciesERC721SafeMint
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
to | address | The receiving address. |
checksPoliciesERC721SafeTransferFromBefore
Modifier for checking policies before 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. |
data | bytes | Generic data to pass along with the transfer. |
checksPoliciesERC721SafeTransferFromAfter
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. |
data | bytes | Generic data to pass along with the transfer. |
checksPoliciesERC721TransferFromBefore
Modifier for checking policies before executing the transferFrom
function.
Calls the _checkPoliciesERC721TransferFrom
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
from | address | The sending address. |
to | address | The receiving address. |
tokenId | uint256 | The token identifier. |
checksPoliciesERC721TransferFromAfter
Modifier for checking policies after executing the transferFrom
function.
Calls the _checkPoliciesERC721TransferFrom
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
from | address | The sending address. |
to | address | The receiving address. |
tokenId | uint256 | The token identifier. |
_checkPoliciesERC721SafeMint
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. |
_checkPoliciesERC721SafeTransferFrom
Calls the Rules Engine to evaluate policies for an ERC721 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. |
data | bytes | Generic data to pass along with the transfer. |
_checkPoliciesERC721TransferFrom
Calls the Rules Engine to evaluate policies for an ERC721 transferFrom
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. |