Skip to content

UserOperationGas.fromRpc

Converts an UserOperationGas.Rpc to an UserOperationGas.UserOperationGas.

Imports

Named
import { UserOperationGas } from 'ox/erc4337'

Examples

import { UserOperationGas } from 'ox/erc4337'
 
const userOperationGas = UserOperationGas.fromRpc({
  callGasLimit: '0x69420',
  preVerificationGas: '0x69420',
  verificationGasLimit: '0x69420',
})

Definition

function fromRpc(
  rpc: Rpc,
): UserOperationGas

Source: src/erc4337/UserOperationGas.ts

Parameters

rpc

  • Type: Rpc

The RPC user operation gas to convert.

Return Type

An instantiated UserOperationGas.UserOperationGas.

UserOperationGas.UserOperationGas