Skip to content

TransactionEnvelopeEip2930.validate

Validates a TransactionEnvelopeEip2930.TransactionEnvelopeEip2930. Returns true if the envelope is valid, false otherwise.

Imports

Named
import { TransactionEnvelopeEip2930 } from 'ox'

Examples

import { TransactionEnvelopeEip2930, Value } from 'ox'
 
const valid = TransactionEnvelopeEip2930.assert({
  gasPrice: 2n ** 256n - 1n + 1n,
  chainId: 1,
  to: '0x0000000000000000000000000000000000000000',
  value: Value.fromEther('1'),
})
false

Definition

function validate(
  envelope: PartialBy<TransactionEnvelopeEip2930, 'type'>,
): boolean

Source: src/TransactionEnvelopeEip2930.ts

Parameters

envelope

  • Type: PartialBy<TransactionEnvelopeEip2930, 'type'>

The transaction envelope to validate.

Return Type

boolean