Skip to content

UserOperationGas.toRpc

Converts a UserOperationGas.UserOperationGas to a UserOperationGas.Rpc.

Imports

Named
import { UserOperationGas } from 'ox/erc4337'

Examples

import { UserOperationGas } from 'ox/erc4337'
 
const userOperationGas = UserOperationGas.toRpc({
  callGasLimit: 300_000n,
  preVerificationGas: 100_000n,
  verificationGasLimit: 100_000n,
})

Definition

function toRpc(
  userOperationGas: UserOperationGas.UserOperationGas,
): Rpc

Source: src/erc4337/UserOperationGas.ts

Parameters

userOperationGas

The user operation gas to convert.

userOperationGas.callGasLimit

  • Type: bigintType

userOperationGas.preVerificationGas

  • Type: bigintType

userOperationGas.verificationGasLimit

  • Type: bigintType

Return Type

An RPC-formatted user operation gas.

Rpc