Documentation Index
Fetch the complete documentation index at: https://thrackle.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Git Source
Inherits:
FacetCommonImports
Author:
@mpetersoCode55, @ShaneDuncan602, @TJ-Everett, @VoR0220
This contract is a critical component of the Rules Engine
This contract contains worker functions and initialization functions.
State Variables
initialized
bool private initialized;
Functions
initialize
Initializes the Rules Engine with the specified owner.
This function sets the initial owner of the diamond and ensures the contract is only initialized once.
function initialize(address owner) external onlyOnce;
Parameters
| Name | Type | Description |
|---|
owner | address | The initial owner of the diamond. |
retrieveRawStringFromInstructionSet
Retrieves the raw string associated with a specific instruction set within a rule and policy.
This function is used to fetch a StringVerificationStruct containing the raw string data.
function retrieveRawStringFromInstructionSet(uint256 policyId, uint256 ruleId, uint256 instructionSetId)
public
view
returns (StringVerificationStruct memory retVal);
Parameters
| Name | Type | Description |
|---|
policyId | uint256 | The ID of the policy containing the rule. |
ruleId | uint256 | The ID of the rule containing the instruction set. |
instructionSetId | uint256 | The ID of the instruction set to retrieve the raw string from. |
Returns
| Name | Type | Description |
|---|
retVal | StringVerificationStruct | A StringVerificationStruct containing the raw string data for the specified instruction set. |
retrieveRawAddressFromInstructionSet
Retrieves the raw address from a specific instruction set.
This function is used to fetch the raw address associated with a given
policy ID, rule ID, and instruction set ID.
function retrieveRawAddressFromInstructionSet(uint256 policyId, uint256 ruleId, uint256 instructionSetId)
public
view
returns (AddressVerificationStruct memory retVal);
Parameters
| Name | Type | Description |
|---|
policyId | uint256 | The ID of the policy to which the rule belongs. |
ruleId | uint256 | The ID of the rule within the policy. |
instructionSetId | uint256 | The ID of the instruction set to retrieve the address verification structure from. |
Returns
| Name | Type | Description |
|---|
retVal | AddressVerificationStruct | The AddressVerificationStruct containing the raw address data. |
_retreiveRawEncodedFromInstructionSet
Retrieves the raw encoded data and instruction set value from a given instruction set ID.
function _retreiveRawEncodedFromInstructionSet(
uint256 _policyId,
uint256 _ruleId,
uint256 _instructionSetId,
ParamTypes _pType
) internal view returns (uint256 instructionSetValue, bytes memory encoded);
Parameters
| Name | Type | Description |
|---|
_policyId | uint256 | The ID of the policy associated with the instruction set. |
_ruleId | uint256 | The ID of the rule associated with the instruction set. |
_instructionSetId | uint256 | The ID of the instruction set to retrieve data from. |
_pType | ParamTypes | The parameter type (PT) associated with the instruction set. |
Returns
| Name | Type | Description |
|---|
instructionSetValue | uint256 | The value of the instruction set. |
encoded | bytes | The raw encoded data associated with the instruction set. |
onlyOnce
Ensures that the function it modifies can only be executed once.
This modifier checks if the contract has already been initialized and prevents re-initialization.
If the contract is already initialized, it reverts with “Already initialized”.