# Frame.fromTuple

Converts a [`Frame.Tuple`](/api/Frame/types#tuple) to a [`Frame.Frame`](/api/Frame/types#frame).

Returns numeric mode and flags. An empty target becomes an omitted `target`. Integer fields must use minimal whole-byte encodings, with empty bytes for zero.

## Imports

:::code-group
```ts [Named]
import { Frame } from 'ox'
```

```ts [Entrypoint]
import * as Frame from 'ox/Frame'
```
:::

## Examples

### Basic Usage

Decode a frame tuple with separate execution and state gas limits.

```ts twoslash
import { Frame } from 'ox'

const frame = Frame.fromTuple([
  '0x01',
  '0x03',
  '0x',
  ['0xc350', '0x'],
  '0x',
  '0x'
])
// @log: {
// @log:   data: '0x',
// @log:   flags: 3,
// @log:   gas: 50000n,
// @log:   mode: 1,
// @log:   stateGas: 0n,
// @log:   value: 0n
// @log: }
```

## Definition

```ts
function fromTuple(
  tuple: Tuple,
): Frame
```

**Source:** [src/core/Frame.ts](https://github.com/wevm/ox/blob/main/src/core/Frame.ts#L305)

## Parameters

### tuple

* **Type:** `Tuple`

The frame tuple to convert.

## Return Type

The decoded frame.

`Frame`
