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.
Parameters
etherQuantity
the amount of ether to convert to gwei
string | number | bigint
Returns
bigint
a bigint of gwei equivalent to the specified ether
Example
etherToGwei('1000').toString()// '1000000000000'etherToGwei(1000).toString()// '1000000000000'