formatGwei static method

String formatGwei(
  1. BigInt wei
)

Formats wei to a human-readable gwei string.

Example:

EthUnit.formatGwei(BigInt.from(1000000000)); // '1'
EthUnit.formatGwei(BigInt.from(1500000000)); // '1.5'

Implementation

static String formatGwei(BigInt wei) {
  return _formatDecimal(wei, 9);
}