getAllTrackers(config, rulesEngineComponentContract, policyId, blockParams?): Promise<TrackerOnChain[]>
Defined in: src/modules/trackers.ts:371 Retrieves all trackers associated with a specific policy ID from 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}`; }An object representing the Rules Engine Component Contract,
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?numberThe unique identifier of the policy for which trackers are to be retrieved.
blockParams?ContractBlockParametersOptional parameters to specify block number or tag for the contract read operation. including its address and ABI.

Returns

Promise<TrackerOnChain[]> A promise that resolves to an array of trackers if successful, or null if an error occurs.

Throws

Will log an error to the console if the operation fails.