Skip to content

etherToGwei

etherToGwei(etherQuantity): bigint

Defined in: utils/ether-to-gwei.ts:20

Convert from Ether to Gwei

No direct equivalent in ether.js; requires multiple functions to achieve.

No direct equivalent in web3; requires multiple functions to achieve.

string | number | bigint

the amount of ether to convert to gwei

bigint

a bigint of gwei equivalent to the specified ether

etherToGwei('1000').toString()
// '1000000000000'
etherToGwei(1000).toString()
// '1000000000000'