# Frame.fromRpc

Converts an RPC frame to a frame.

## Imports

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

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

## Examples

### Basic Usage

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

const frame = Frame.fromRpc({
  data: '0x',
  executionGasLimit: '0xc350',
  flags: 3,
  mode: 1,
  stateGasLimit: '0x0',
  value: '0x0'
})
```

## Definition

```ts
function fromRpc(
  frame: Rpc,
): Frame
```

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

## Parameters

### frame

* **Type:** `Rpc`

The value to convert.

#### frame.data

* **Type:** `0x${string}`

Frame calldata.

#### frame.executionGasLimit

* **Type:** `0x${string}`

Execution gas budget.

#### frame.flags

* **Type:** `number`

Approval scope and batching bits.

#### frame.mode

* **Type:** `number`

Execution mode.

#### frame.stateGasLimit

* **Type:** `0x${string}`

State gas budget.

#### frame.target

* **Type:** `Address.Address | null | undefined`
* **Optional**

Target address; absent for the transaction sender.

#### frame.value

* **Type:** `0x${string}`

Value transferred in wei.

## Return Type

The converted value.

`Frame`
