convertForeignCallStructsToStrings(callStrings, foreignCalls, functionSignatureMappings): void

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

Parameters

ParameterTypeDescription
callStringsstring[]An array to which the formatted foreign call strings will be appended.
foreignCallsnull | any[]An array of foreign call objects or null. Each object should contain details such as signature, returnType, parameterTypes, and foreignCallAddress.
functionSignatureMappingsany[]An array of mappings that associate a hex signature with a human-readable functionSignature. 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/modules/parser.ts:672