Skip to content

FrameReceipt.fromRpc

Converts an RPC frame receipt to a FrameReceipt.FrameReceipt.

Imports

Named
import { FrameReceipt } from 'ox'

Examples

Basic Usage

import { FrameReceipt } from 'ox'
 
const receipt = FrameReceipt.fromRpc({
  executionGasUsed: '0x5208',
  logs: [],
  stateGasUsed: '0x0',
  status: 1
})

Definition

function fromRpc(
  receipt: Rpc,
): FrameReceipt

Source: src/core/FrameReceipt.ts

Parameters

receipt

  • Type: Rpc

The RPC frame receipt.

receipt.executionGasUsed

  • Type: 0x${string}

Execution gas used.

receipt.logs

  • Type: readonly Pick[]

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