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