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
Author:
@mpetersoCode55, @ShaneDuncan602, @TJ-Everett, @VoR0220
SPDX-License-Identifier: BUSL-1.1
This interface is intended to be implemented by contracts that require rules evaluation and role management.
Interface for the Rules Engine Run Logic. This interface defines the core functions and data types
required for evaluating rules and managing roles in a rules-enabled contract.
Functions
checkPolicies
Evaluates the conditions associated with all applicable rules and returns the result.
This function checks the rules associated with the provided contract address and arguments.
function checkPolicies(bytes calldata arguments) external;
Parameters
| Name | Type | Description |
|---|
arguments | bytes | Additional context and global variables to pass in for evaluation, similar to msg.data. |
grantCallingContractRole
Grants the calling contract admin role to a specified account.
Call this function from your contract to assign the admin role for a specific calling contract.
function grantCallingContractRole(address _callingContract, address _account) external returns (bytes32);
Parameters
| Name | Type | Description |
|---|
_callingContract | address | The address of the calling contract for which the admin role is being assigned. |
_account | address | The address of the account to assign the admin role. |
Returns
| Name | Type | Description |
|---|
<none> | bytes32 | bytes32 The ID of the assigned admin role. |
grantForeignCallAdminRole
Grants the calling contract admin role to a specified account.
Call this function from your contract to assign the admin role for a specific calling contract.
function grantForeignCallAdminRole(address _foreignCallContract, address _account, bytes4 functionSignature)
external
returns (bytes32);
Parameters
| Name | Type | Description |
|---|
_foreignCallContract | address | The address of the calling contract for which the admin role is being assigned. |
_account | address | The address of the account to assign the admin role. |
functionSignature | bytes4 | |
Returns
| Name | Type | Description |
|---|
<none> | bytes32 | bytes32 The ID of the assigned admin role. |