convertForeignCallStructsToStrings
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
Parameter | Type | Description |
---|---|---|
callStrings | string [] | An array to which the formatted foreign call strings will be appended. |
foreignCalls | null | any [] | An array of foreign call objects or null . Each object should contain details such as signature , returnType , parameterTypes , and foreignCallAddress . |
functionSignatureMappings | any [] | 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