formatEther

Learn about the formatEther utils method

Introduction

The formatEther method is used to format a value in wei to a more human-readable string representation in ether.

Usage

The formatEther method can be used to format a value in Wei to Ether. This can be useful when working with Ether amounts in your code. Here's an example of how you can use it:

const { Utils } = require("alchemy-sdk");

let weiValue = "1000000000000000000";
let formattedEther = Utils.formatEther(weiValue);
console.log(formattedEther); // '1.0 ETH'
ReadMe