Import
Usage
Return Type: UseQueryResult<TokenBalance[]>
The hook returns all properties from React Query’s UseQueryResult with token balance data, including metadata. Here’s the detailed structure:
Properties
data
TokenBalance[] | undefined
Array of token balance objects containing:
contractType: Type of the token contract (NATIVE, ERC20, ERC721, ERC1155)contractAddress: Address of the token contractaccountAddress: Address of the account holding the tokensbalance: Token balance as a string (in base units)chainId: Chain ID where the token existsblockHash: Hash of the block where balance was last updatedblockNumber: Block number where balance was last updatedtokenID: (for NFTs) ID of the tokencontractInfo: Token contract information including name, symbol, decimals, and logo URLtokenMetadata: (for NFTs) Detailed token metadata including name, description, image URL, and attributesuniqueCollectibles: Number of unique collectiblesisSummary: Whether the balance is a summary
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.