getRule
getRule(
config
,rulesEnginePolicyContract
,policyId
,ruleId
):Promise
<null
|RuleStruct
>
Retrieves a specific rule from the Rules Engine.
Parameters
Parameter | Type | Description |
---|---|---|
config | Config | - |
rulesEnginePolicyContract | object | The contract instance for interacting with the Rules Engine Policy. |
rulesEnginePolicyContract.abi | (object | object | object )[] | - |
rulesEnginePolicyContract.address | `0x${string}` | - |
policyId | number | The ID of the policy containing the rule. |
ruleId | number | The ID of the rule to retrieve. |
Returns
Promise
<null
| RuleStruct
>
The retrieved rule as a RuleStruct
, or null
if retrieval fails.