getAllRules
getAllRules(
config
,rulesEnginePolicyContract
,policyId
):Promise
<null
|any
[]>
Retrieves all rules associated with a specific policy ID from the Rules Engine Policy Contract.
Parameters
Parameter | Type | Description |
---|---|---|
config | Config | - |
rulesEnginePolicyContract | object | An object representing the Rules Engine Policy Contract, including its address and ABI (Application Binary Interface). |
rulesEnginePolicyContract.abi | (object | object | object )[] | - |
rulesEnginePolicyContract.address | `0x${string}` | - |
policyId | number | The unique identifier of the policy for which rules are to be retrieved. |
Returns
Promise
<null
| any
[]>
A promise that resolves to an array of rules if successful, or null
if an error occurs.
Throws
Will log an error to the console if the operation fails.