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

# convertForeignCallStructsToStrings

> **convertForeignCallStructsToStrings**(`callStrings`, `foreignCalls`, `functionMappings`, `names`): `void`

Converts an array of foreign call structures into formatted string representations
and appends them to the provided `callStrings` array.

## Parameters

| Parameter          | Type                                                                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------ | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `callStrings`      | `string`\[]                                                                         | An array to which the formatted foreign call strings will be appended.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `foreignCalls`     | [`ForeignCallOnChain`](../../../modules/types/type-aliases/ForeignCallOnChain)\[]   | An array of foreign call objects or `null`. Each object should contain details such as `function`, `returnType`, `parameterTypes`, and `foreignCallAddress`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `functionMappings` | [`hexToFunctionString`](../../../modules/types/type-aliases/hexToFunctionString)\[] | An array of mappings that associate a `hex` signature with a human-readable `functionSignature`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `names`            | `string`\[]                                                                         | An array of names corresponding to each foreign call, used for formatting the output. The function processes each foreign call by: - Matching its `signature` with the corresponding `functionSignature` from the mappings. - Resolving its `returnType` and `parameterTypes` to human-readable names using a predefined parameter type enumeration (`PT`). - Formatting the foreign call details into a string and appending it to the `callStrings` array. The output string format is: `Foreign Call <index> --> <foreignCallAddress> --> <functionSignature> --> <returnType> --> <parameterTypes>` Example: `Foreign Call 1 --> 0x1234567890abcdef --> myFunction(uint256) --> uint256 --> uint256, string` |

## Returns

`void`

## Defined in

[src/parsing/reverse-parsing-logic.ts:463](https://github.com/forte-service-company-ltd/forte-rules-engine-sdk/blob/5aad4d7c3c8cc91280e4449c17ac8ea31219fbed/src/parsing/reverse-parsing-logic.ts#L463)
