ethers.js
ethers.js copied to clipboard
Add formatGwei
Add formatGwei which works similarly to formatEther. Gwei is commonly used for units of eth gas fees.
How is this different than using formatUnits(value, "gwei")?
How is this different than using
formatUnits(value, "gwei")?
and there's formatEther(value) too, which is simply formatUnits(value, 18) or formatUnits(value, "ether")
So same idea, a special function could be useful since gwei is commonly used . Perhaps too much extra code to add a function for each value in the unit index - but since ether and gwei are the most used having functions for them makes sense