Token(ERC-20) balance is stored in an ERC-20 standard smart contract. Learn more about .
We use DAI token in goerli testnet as an example.
The ERC-20 Contract ABI, which is a common contract interface for tokens (this is the Human-Readable ABI format).
Set the provider that can be used to query the chain data.
Create the contract object. A contract object is an abstraction of a smart contract on the Ethereum Network. It allows for easy interaction with the smart contract.
Get the balance of an address. Format the DAI for displaying to the user