Web3JS Online
Viem Online
Webhooks, Alerts, and a simple API.
The formatGwei function is used to convert a numerical value in wei to a string representation in gwei. Wei is the smallest denomination of ether, which is the cryptocurrency coin used on the Ethereum network. One ether is equal to 1,000,000,000,000,000,000 wei.
To use the formatGwei function, you need to import it from the 'viem' library and then call it with the desired numerical value in wei as an argument. The function will return a string representation of the value in gwei. Here's an example:
In this example, the function formatGwei is called with a numerical value of 1,000,000,000,000,000 wei. The function will return the string representation of this value in gwei, which is '1'.