updateTracker(Defined in: src/modules/trackers.ts:283 Asynchronously updates a tracker in the rules engine component contract.config,rulesEngineComponentContract,policyId,trackerId,trSyntax,confirmationCount):Promise<{trackerId:number;transactionHash:`0x${string}`; }>
Parameters
| Parameter | Type | Description |
|---|---|---|
config | Config | The configuration object containing network and wallet information. |
rulesEngineComponentContract | { abi: ({ anonymous: undefined; inputs: ({ components: undefined; internalType: string; name: string; type: string; } | { components: object[]; internalType: string; name: string; type: string; })[]; 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 component. |
rulesEngineComponentContract.abi | ({ anonymous: undefined; inputs: ({ components: undefined; internalType: string; name: string; type: string; } | { components: object[]; internalType: string; name: string; type: string; })[]; 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; })[] | - |
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. |
confirmationCount | number | - |
Returns
Promise<{ trackerId: number; transactionHash: `0x${string}`; }>
A promise that resolves to the existing tracker ID is returned. Returns -1 if the operation fails.