Skip to main content
Denomination exports three distinct branded bigint types — Wei, Gwei, and Ether — so gas prices, transaction values, and balances cannot be mixed across scales without an explicit conversion.

Scale Table

Quick Start

Import from @tevm/voltaire or @tevm/voltaire/Denomination.

API Reference

Wei

Gwei

Ether

Downward conversions (Wei.toGwei, Wei.toEther, Gwei.toEther) perform integer division and truncate fractional remainders. Keep calculations in Wei until final display.
  • FeeMarket — EIP-1559 and EIP-4844 gas fee calculations
  • Uint256 — 256-bit unsigned integer arithmetic
  • Transaction — Transaction value, maxFeePerGas, and maxPriorityFeePerGas