Skip to main content
updatePolicy(config, rulesEnginePolicyContract, policyId, signatures, ids, ruleIds): Promise<number>
Updates an existing policy in the Rules Engine.

Parameters

ParameterTypeDescription
configConfigThe configuration object containing network and wallet information.
rulesEnginePolicyContractobjectThe contract instance for interacting with the Rules Engine Policy.
rulesEnginePolicyContract.abi(object | object)[]-
rulesEnginePolicyContract.address`0x${string}`-
policyIdnumberThe ID of the policy to update.
signaturesany[]The function signatures associated with the policy.
idsnumber[]The IDs of the rules associated with the policy.
ruleIdsany[]The mapping of rules to calling functions.

Returns

Promise<number> The result of the policy update if successful, or -1 if an error occurs.

Defined in

src/modules/policy.ts:286
I