getRule(config, rulesEnginePolicyContract, policyId, ruleId): Promise<null | RuleStruct>

Retrieves a specific rule from the Rules Engine.

Parameters

ParameterTypeDescription
configConfig-
rulesEnginePolicyContractobjectThe contract instance for interacting with the Rules Engine Policy.
rulesEnginePolicyContract.abi(object | object | object)[]-
rulesEnginePolicyContract.address`0x${string}`-
policyIdnumberThe ID of the policy containing the rule.
ruleIdnumberThe ID of the rule to retrieve.

Returns

Promise<null | RuleStruct>

The retrieved rule as a RuleStruct, or null if retrieval fails.

Defined in

src/modules/rules.ts:192