Skip to content

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

Named
import { FrameRequest } from 'ox'

Examples

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

Definition

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

Source: src/core/FrameRequest.ts

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