Wallet Address: 0xYourEthereumAddress
Wallet Balance: 2.345 ETH
- Ethers.js: We are using Ethers.js to interact with the Ethereum blockchain. Ethers.js simplifies the process of querying the blockchain and formatting the data for developers.
- Provider: Whether you use Infura or a public node, the provider allows us to connect to the Ethereum network. Infura is commonly used because of its reliability and scalability, but public nodes can work as well if you're looking for a simple alternative.
- getBalance(): This function queries the Ethereum network for the balance of the wallet in wei (the smallest unit of ETH). We then use
ethers.utils.formatEther()
to convert the balance from wei to Ether.