updateTracker(
config
,rulesEngineComponentContract
,policyId
,trackerId
,trSyntax
):Promise
<number
>
Asynchronously updates a tracker in the rules engine component contract.
Parameter | Type | Description |
---|---|---|
config | Config | - |
rulesEngineComponentContract | object | The contract instance for interacting with the rules engine component. |
rulesEngineComponentContract.abi | (object | object | object )[] | - |
rulesEngineComponentContract.address | `0x${string}` | - |
policyId | number | The ID of the policy associated with the tracker. |
trackerId | number | The ID of the tracker to update. |
trSyntax | string | A JSON string representing the tracker syntax. |
Promise
<number
>
A promise that resolves to the existing tracker ID is returned. Returns -1 if the operation fails.
Will retry indefinitely with a 1-second delay between attempts if an error occurs during the contract simulation. Ensure proper error handling or timeout mechanisms are implemented to avoid infinite loops.
updateTracker(
config
,rulesEngineComponentContract
,policyId
,trackerId
,trSyntax
):Promise
<number
>
Asynchronously updates a tracker in the rules engine component contract.
Parameter | Type | Description |
---|---|---|
config | Config | - |
rulesEngineComponentContract | object | The contract instance for interacting with the rules engine component. |
rulesEngineComponentContract.abi | (object | object | object )[] | - |
rulesEngineComponentContract.address | `0x${string}` | - |
policyId | number | The ID of the policy associated with the tracker. |
trackerId | number | The ID of the tracker to update. |
trSyntax | string | A JSON string representing the tracker syntax. |
Promise
<number
>
A promise that resolves to the existing tracker ID is returned. Returns -1 if the operation fails.
Will retry indefinitely with a 1-second delay between attempts if an error occurs during the contract simulation. Ensure proper error handling or timeout mechanisms are implemented to avoid infinite loops.