> ## Documentation Index
> Fetch the complete documentation index at: https://thrackle.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# getTracker

> **getTracker**(`config`, `rulesEngineComponentContract`, `policyId`, `trackerId`): `Promise`\<[`TrackerOnChain`](../../types/type-aliases/TrackerOnChain)>

Retrieves a tracker from the Rules Engine Component Contract based on the provided policy ID and tracker ID.

## Parameters

| Parameter                              | Type                                  | Description                                                           |
| -------------------------------------- | ------------------------------------- | --------------------------------------------------------------------- |
| `config`                               | `Config`                              | The configuration object containing network and wallet information.   |
| `rulesEngineComponentContract`         | `object`                              | The contract instance containing the address and ABI for interaction. |
| `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 retrieve.                                    |

## Returns

`Promise`\<[`TrackerOnChain`](../../types/type-aliases/TrackerOnChain)>

A promise that resolves to the tracker result if successful, or `null` if an error occurs.

## Throws

Will log an error to the console if the contract interaction fails.

## Defined in

[src/modules/trackers.ts:277](https://github.com/forte-service-company-ltd/forte-rules-engine-sdk/blob/5aad4d7c3c8cc91280e4449c17ac8ea31219fbed/src/modules/trackers.ts#L277)
