updatePolicy(Defined in: src/modules/policy.ts:300 Updates an existing policy in the Rules Engine.config
,rulesEnginePolicyContract
,policyId
,signatures
,ruleIds
,policyName
,policyDescription
,confirmationCount
):Promise
<number
>
Parameters
Parameter | Type | Description |
---|---|---|
config | Config | The configuration object containing network and wallet information. |
rulesEnginePolicyContract | { abi : ({ anonymous : undefined ; inputs : object []; name : string ; outputs : object []; stateMutability : string ; type : string ; } | { anonymous : undefined ; inputs : object []; name : string ; outputs : object []; stateMutability : string ; type : string ; } | { anonymous : boolean ; inputs : object []; name : string ; outputs : undefined ; stateMutability : undefined ; type : string ; })[]; address : `0x${string}` ; } | The contract instance for interacting with the Rules Engine Policy. |
rulesEnginePolicyContract.abi | ({ anonymous : undefined ; inputs : object []; name : string ; outputs : object []; stateMutability : string ; type : string ; } | { anonymous : undefined ; inputs : object []; name : string ; outputs : object []; stateMutability : string ; type : string ; } | { anonymous : boolean ; inputs : object []; name : string ; outputs : undefined ; stateMutability : undefined ; type : string ; })[] | - |
rulesEnginePolicyContract.address | `0x${string}` | - |
policyId | number | The ID of the policy to update. |
signatures | any [] | The function signatures associated with the policy. |
ruleIds | any [] | The mapping of rules to calling functions. |
policyName | string | - |
policyDescription | string | - |
confirmationCount | number | - |
Returns
Promise
<number
>
The result of the policy update if successful, or -1 if an error occurs.