Documentation Index
Fetch the complete documentation index at: https://docs.forterulesengine.io/llms.txt
Use this file to discover all available pages before exploring further.
Git Source
Inherits:
Script
Author:
@mpetersoCode55, @ShaneDuncan602, @TJ-Everett, @VoR0220
SPDX-License-Identifier: BUSL-1.1
This contract is intended to be reused in scenarios where a Rules Engine Diamond needs to be deployed and configured.
This contract is an abstract template for deploying and configuring a Rules Engine Diamond. It provides functionality
to deploy the diamond, initialize it with facets, and set up the Rules Engine. The contract uses the diamond proxy
pattern to enable modular and dynamic functionality.
State Variables
_ruleProcessorFacetCuts
FacetCut[] _ruleProcessorFacetCuts;
red
OWNER
address constant OWNER = address(0xB0b);
Functions
createRulesEngineDiamond
Deploy and set up the Rules Engine Diamond.
This function deploys the diamond, initializes it with the required facets, and sets the owner.
function createRulesEngineDiamond(address owner) public returns (ForteRulesEngine diamond);
Parameters
| Name | Type | Description |
|---|
owner | address | The address to be set as the owner of the diamond. |
Returns
| Name | Type | Description |
|---|
diamond | ForteRulesEngine | The fully configured Rules Engine Diamond. |
createSelectorArray
Create the selector array for a given facet.
This function uses a Python script to generate the function selectors for the specified facet.
function createSelectorArray(string memory facet) public returns (bytes4[] memory selectors);
Parameters
| Name | Type | Description |
|---|
facet | string | The name of the facet for which to generate selectors. |
Returns
| Name | Type | Description |
|---|
selectors | bytes4[] | The array of function selectors for the facet. |