# tryFfi

Description: tryFfi cheatcode documentation

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/reference/cheatcodes/Utilities/try-ffi.mdx

### Signature

```solidity
struct FfiResult {
  /// The exit code of the call.
  int32 exitCode;
  /// The optionally hex-decoded `stdout` data.
  bytes stdout;
  /// The `stderr` data.
  bytes stderr;
}
function tryFfi(
  string[] calldata commandInput
) external returns (FfiResult memory result);
```

### Description

Performs a foreign function call via terminal and returns the exit code, stdout, and stderr.
