useBalance

A hook to get the native or (optional) ERC20 token balance of the connected wallet.

function useBalance(
  tokenAddress?: string,
): UseQueryResult<undefined | {}, unknown>;

Parameters


Returns

the balance of the connected wallet (native or ERC20)

type ReturnType = UseQueryResult<undefined | {}, unknown>;