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

# deleteForeignCall

> **deleteForeignCall**(`config`, `rulesEngineForeignCallContract`, `policyId`, `foreignCallId`): `Promise`\<`number`>

Deletes a foreign call associated with a specific policy in 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 interacting with the rules engine component. |
| `rulesEngineForeignCallContract.abi`     | (`object` \| `object` \| `object`)\[] | -                                                                                                     |
| `rulesEngineForeignCallContract.address` | \`0x\$\{string}\`                     | -                                                                                                     |
| `policyId`                               | `number`                              | The ID of the policy to which the foreign call belongs.                                               |
| `foreignCallId`                          | `number`                              | The ID of the foreign call to be deleted.                                                             |

## Returns

`Promise`\<`number`>

A promise that resolves to a number: - `0` if the operation is successful. - `-1` if an error occurs 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.

## Defined in

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