useContractType() function
This feature is currently in beta and may change based on feedback that we receive.
Use this to get the contract type for a (built-in or custom) contract.
Example
const {
data: contractType,
isLoading,
error,
} = useContractType("{{contract_address}}");
Signature:
export declare function useContractType(
contractAddress: RequiredParam<ContractAddress>,
): import("@tanstack/react-query").UseQueryResult<
| "split"
| "custom"
| "nft-drop"
| "signature-drop"
| "nft-collection"
| "edition-drop"
| "edition"
| "token-drop"
| "token"
| "vote"
| "marketplace"
| "pack"
| "multiwrap"
| undefined,
unknown
>;
Parameters
Parameter | Type | Description |
---|---|---|
contractAddress | RequiredParam<ContractAddress> | the address of the deployed contract |
Returns:
import("@tanstack/react-query").UseQueryResult<"split" | "custom" | "nft-drop" | "signature-drop" | "nft-collection" | "edition-drop" | "edition" | "token-drop" | "token" | "vote" | "marketplace" | "pack" | "multiwrap" | undefined, unknown>
a response object that includes the contract type of the contract