# FrameReceipt.fromRpc

Converts an RPC frame receipt to a [`FrameReceipt.FrameReceipt`](/api/FrameReceipt/types#framereceipt).

## Imports

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

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

## Examples

### Basic Usage

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

const receipt = FrameReceipt.fromRpc({
  executionGasUsed: '0x5208',
  gasUsed: '0x5208',
  logs: [],
  stateGasUsed: '0x0',
  status: '0x1'
})
```

## Definition

```ts
function fromRpc(
  receipt: Rpc,
): FrameReceipt
```

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

## Parameters

### receipt

* **Type:** `Rpc`

The RPC frame receipt.

#### receipt.executionGasUsed

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

Execution gas used.

#### receipt.gasUsed

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

Total execution and state gas used.

#### receipt.logs

* **Type:** `readonly { address: abitype_Address; data: 0x${string}; topics: 0x${string}[]; blockHash?: 0x${string}; blockNumber?: 0x${string}; blockTimestamp?: 0x${string}; logIndex?: 0x${string}; transactionHash?: 0x${string}; transactionIndex?: 0x${string}; removed?: boolean; }[]`

Logs emitted by this frame.

#### receipt.stateGasUsed

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

Final state gas used.

#### receipt.status

* **Type:** `RpcStatus`

Zero for failure, one for success, or two for a skipped frame.

## Return Type

The frame receipt with bigint gas and a named status.

`FrameReceipt.FrameReceipt`
