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