# FrameRequest.toRpc

Converts a frame request to RPC fields without filling omitted gas limits.

Explicit zero limits remain zero. Omitted mode, flags, value, and data use frame defaults.

## Imports

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

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

## Examples

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

const frame = FrameRequest.toRpc({ mode: 'sender', stateGas: 0n })
```

## Definition

```ts
function toRpc(
  frame: toRpc.Input,
): Rpc
```

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

## Parameters

### frame

* **Type:** `toRpc.Input`

The frame request. Gas and value accept hex, bigint, or number values.

## Return Type

The RPC request with omitted gas limits preserved.

`Rpc`
