etherToWei
etherToWei(
etherQuantity):bigint
Defined in: utils/ether-to-wei.ts:20
Convert Ether to Wei
Similar to “parseEther” in ethers.js
Similar to “toWei” in web3.js
Parameters
Section titled “Parameters”etherQuantity
Section titled “etherQuantity”string | number | bigint
the amount of ether to convert to wei
Returns
Section titled “Returns”bigint
a bigint of wei equivalent to the specified ether
Example
Section titled “Example”etherToWei('1000').toString()// '1000000000000000000000'etherToWei(1000).toString()// '1000000000000000000000'