Import
Usage
Return Type: UseQueryResult<TokenBalance>
The hook returns all properties from React Query’s UseQueryResult with token balance data. Here’s the detailed structure:
Properties
data
TokenBalance | undefined
Token balance object containing:
contractType: The type of contract (ERC20, ERC721, ERC1155)contractAddress: The token contract addressaccountAddress: The address whose balance was queriedbalance: The balance amount in the token’s base unitschainId: The chain ID where the balance was fetched fromblockHash: Hash of the block containing the balanceblockNumber: Number of the block containing the balancetokenID: Optional token ID for NFTsuniqueCollectibles: Number of unique collectiblesisSummary: Whether this is a summary balancecontractInfo: Optional contract informationtokenMetadata: Optional token metadata
isLoading
boolean
Loading state for the data fetch.
isError
boolean
Error state indicating if the query failed.
error
Error | null
Any error that occurred during data fetching.