Hooks
useGetMultipleContractsInfo
Hook for fetching contract information for multiple tokens and NFTs in parallel
Import
Usage
Return Type: UseQueryResult<ContractInfo[]>
The hook returns all properties from React Query’s UseQueryResult
with an array of contract information. Here’s the detailed structure:
Properties
data
ContractInfo[] | undefined
Array of objects containing contract information for each requested contract:
name
: Contract or token namesymbol
: Token symboldecimals
: Number of decimals (for ERC20 tokens)logoURI
: URL of the contract/token logotype
: Contract type (ERC20, ERC721, ERC1155)verified
: Whether the contract is verifieddescription
: Optional contract descriptionwebsiteURL
: Optional project website URLimageURL
: Optional project image URLbannerURL
: Optional banner image URLchainID
: Chain ID where the contract exists
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.
Parameters
The hook accepts two parameters:
args: GetContractInfoArgs[]
Parameter | Type | Description |
---|---|---|
chainID | string | Chain ID as string (e.g., “1” for Ethereum mainnet) |
contractAddress | string | Contract address to fetch info for |
options: HooksOptions
Parameter | Type | Description |
---|---|---|
disabled | boolean | (Optional) Disable the query from automatically running |
retry | boolean | (Optional) Whether to retry failed queries |
Was this page helpful?