RulesEngineClientERC1155
Inherits: RulesEngineClient
Author: @mpetersoCode55, @ShaneDuncan602, @TJ-Everett, @VoR0220, @Palmerg4
This contract is intended to be inherited and implemented by ERC1155 token contracts requiring Rules Engine integration.
Abstract contract containing modifiers and functions for integrating ERC1155 token operations with the Rules Engine.
This contract provides policy checks for safeMint
, transferFrom
, and safeTransferFrom
operations, both before and after execution.
Functions
checksPoliciesERC1155MintBefore
Modifier for checking policies before executing the safeMint
function.
Calls the _checkPoliciesERC1155SafeMint
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
to | address | The receiving address. |
tokenId | uint256 | The token identifier. |
value | uint256 | The value of tokenId being transfered. |
data | bytes | Generic data to pass along with the transfer. |
checksPoliciesERC1155MintAfter
Modifier for checking policies after executing the safeMint
function.
Calls the _checkPoliciesERC1155SafeMint
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
to | address | The receiving address. |
tokenId | uint256 | The token identifier. |
value | uint256 | The value of tokenId being transfered. |
data | bytes | Generic data to pass along with the transfer. |
checksPoliciesERC1155BatchMintBefore
Modifier for checking policies before executing the safeMint
function.
Calls the _checkPoliciesERC1155SafeMint
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
to | address | The receiving address. |
tokenIds | uint256[] | The token identifiers. |
values | uint256[] | The values of tokenIds being transfered. |
data | bytes | Generic data to pass along with the transfer. |
checksPoliciesERC1155BatchMintAfter
Modifier for checking policies after executing the safeMint
function.
Calls the _checkPoliciesERC1155SafeMint
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
to | address | The receiving address. |
tokenIds | uint256[] | The token identifiers. |
values | uint256[] | The values of tokenIds being transfered. |
data | bytes | Generic data to pass along with the transfer. |
checksPoliciesERC1155SafeTransferFromBefore
Modifier for checking policies before executing the safeTransferFrom
function.
Calls the _checkPoliciesERC1155SafeTransferFrom
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
from | address | The sending address. |
to | address | The receiving address. |
tokenId | uint256 | The token identifier. |
value | uint256 | The value of tokenId being transfered. |
data | bytes | Generic data to pass along with the transfer. |
checksPoliciesERC1155SafeTransferFromAfter
Modifier for checking policies after executing the safeTransferFrom
function.
Calls the _checkPoliciesERC1155SafeTransferFrom
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
from | address | The sending address. |
to | address | The receiving address. |
tokenId | uint256 | The token identifier. |
value | uint256 | The value of tokenId being transfered. |
data | bytes | Generic data to pass along with the transfer. |
checksPoliciesERC1155SafeBatchTransferFromBefore
Modifier for checking policies before executing the transferFrom
function.
Calls the _checkPoliciesERC1155TransferFrom
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
from | address | The sending address. |
to | address | The receiving address. |
tokenIds | uint256[] | The token identifiers. |
values | uint256[] | The values of tokenIds being transfered. |
data | bytes |
checksPoliciesERC1155SafeBatchTransferFromAfter
Modifier for checking policies before executing the transferFrom
function.
Calls the _checkPoliciesERC1155TransferFrom
function to evaluate policies.
Parameters
Name | Type | Description |
---|---|---|
from | address | The sending address. |
to | address | The receiving address. |
tokenIds | uint256[] | The token identifiers. |
values | uint256[] | The values of tokenIds being transfered. |
data | bytes |
_checkPoliciesERC1155Mint
Calls the Rules Engine to evaluate policies for an ERC1155 Mint
operation.
Encodes the parameters and invokes the _invokeRulesEngine
function.
Parameters
Name | Type | Description |
---|---|---|
_to | address | The receiving address. |
_tokenId | uint256 | The token identifier. |
_value | uint256 | The value of tokenId being transfered. |
_data | bytes | Generic data to pass along with the transfer. |
_checkPoliciesERC1155MintBatch
Calls the Rules Engine to evaluate policies for an ERC1155 MintBatch
operation.
Encodes the parameters and invokes the _invokeRulesEngine
function.
Parameters
Name | Type | Description |
---|---|---|
_to | address | The receiving address. |
_tokenIds | uint256[] | The token identifiers. |
_values | uint256[] | The values of tokenIds being transfered. |
_data | bytes | Generic data to pass along with the transfer. |
_checkPoliciesERC1155SafeTransferFrom
Calls the Rules Engine to evaluate policies for an ERC1155 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. |
_value | uint256 | The value of tokenId being transfered. |
_data | bytes | Generic data to pass along with the transfer. |
_checkPoliciesERC1155SafeBatchTransferFrom
Calls the Rules Engine to evaluate policies for an ERC1155 safeTransferFrom
operation.
Encodes the parameters and invokes the _invokeRulesEngine
function.
Parameters
Name | Type | Description |
---|---|---|
_from | address | The sending address. |
_to | address | The receiving address. |
_tokenIds | uint256[] | The token identifiers. |
_values | uint256[] | The values of tokenIds being transfered. |
_data | bytes | Generic data to pass along with the transfer. |
_checkPoliciesERC1155TransferFrom
Calls the Rules Engine to evaluate policies for an ERC1155 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. |