Retrieves the balance of an ERC20 token for a specific address.
import { getBalance } from "thirdweb/extensions/erc20"; const balance = await getBalance({ contract, address: "0x..." });
function getBalance( options: BaseTransactionOptions<GetBalanceParams>,): Promise<GetBalanceResult>;
The transaction options including the address.
let options: BaseTransactionOptions<GetBalanceParams>;
let returnType: { decimals: number; displayValue: string; name: string; symbol: string; value: bigint;};
An object containing the balance value, display value, and symbol.