> ## 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.

# getForeignCallMetadata

> **getForeignCallMetadata**(`config`, `rulesEngineForeignCallContract`, `policyId`, `foreignCallId`): `Promise`\<`string`>

Retrieves the metadata for a foreign call from the rules engine component contract.

## Parameters

| Parameter                                | Type                                  | Description                                                           |
| ---------------------------------------- | ------------------------------------- | --------------------------------------------------------------------- |
| `config`                                 | `Config`                              | The configuration object containing network and wallet information.   |
| `rulesEngineForeignCallContract`         | `object`                              | The contract instance containing the address and ABI for interaction. |
| `rulesEngineForeignCallContract.abi`     | (`object` \| `object` \| `object`)\[] | -                                                                     |
| `rulesEngineForeignCallContract.address` | \`0x\$\{string}\`                     | -                                                                     |
| `policyId`                               | `number`                              | The ID of the policy associated with the foreign call.                |
| `foreignCallId`                          | `number`                              | The ID of the foreign call to retrieve.                               |

## Returns

`Promise`\<`string`>

A promise that resolves to the result of the foreign call, or `null` if an error occurs.

## Throws

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

## Defined in

[src/modules/foreign-calls.ts:455](https://github.com/forte-service-company-ltd/forte-rules-engine-sdk/blob/5aad4d7c3c8cc91280e4449c17ac8ea31219fbed/src/modules/foreign-calls.ts#L455)
