Skip to content

Frame.fromRpc

Converts an RPC frame to a frame.

Imports

Named
import { Frame } from 'ox'

Examples

Basic Usage

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

Definition

function fromRpc(
  frame: Rpc,
): Frame

Source: src/core/Frame.ts

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