deleteTracker(config, rulesEngineComponentContract, policyId, trackerId, confirmationCount): Promise<number>
Defined in: src/modules/trackers.ts:243 Deletes a tracker associated with a specific policy in the rules engine component contract.

Parameters

ParameterTypeDescription
configConfigThe 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 containing the address and ABI for interaction.
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}`-
policyIdnumberThe ID of the policy to which the tracker belongs.
trackerIdnumberThe ID of the tracker to be deleted.
confirmationCountnumber-

Returns

Promise<number> A promise that resolves to a number: - 0 if the tracker was successfully deleted. - -1 if an error occurred during the simulation of the contract interaction.

Throws

This function does not explicitly throw errors but will return -1 if an error occurs during the simulation phase.