TransactionEnvelopeLegacy.assert
Asserts a TransactionEnvelopeLegacy.TransactionEnvelopeLegacy
is valid.
Imports
Named
import { TransactionEnvelopeLegacy } from 'ox'
Examples
import { TransactionEnvelopeLegacy, Value } from 'ox'
TransactionEnvelopeLegacy.assert({
gasPrice: 2n ** 256n - 1n + 1n,
chainId: 1,
to: '0x0000000000000000000000000000000000000000',
value: Value.fromEther('1'),
})
GasPriceTooHighError: The gas price (`gasPrice` = 115792089237316195423570985008687907853269984665640564039457584007913 gwei) cannot be higher than the maximum allowed value (2^256-1).
Definition
function assert(
envelope: PartialBy<TransactionEnvelopeLegacy, 'type'>,
): void
Source: src/TransactionEnvelopeLegacy.ts
Parameters
envelope
- Type:
PartialBy<TransactionEnvelopeLegacy, 'type'>
The transaction envelope to assert.
Return Type
void
Error Type
TransactionEnvelopeLegacy.assert.ErrorType