useTokenSupply() function
This feature is currently in beta and may change based on feedback that we receive.
Use this to get a the total supply of your contract.
Example
const { data: totalSupply, isLoading, error } = useTokenSupply(<YourTokenContractInstance>);
Signature:
export declare function useTokenSupply(
contract: RequiredParam<Erc20>,
): import("@tanstack/react-query").UseQueryResult<
{
symbol: string;
value: import("ethers").BigNumber;
name: string;
decimals: number;
displayValue: string;
},
unknown
>;
Parameters
Parameter | Type | Description |
---|---|---|
contract | RequiredParam<Erc20> | an instance of a Token contract. |
Returns:
import("@tanstack/react-query").UseQueryResult<{ symbol: string; value: import("ethers").BigNumber; name: string; decimals: number; displayValue: string; }, unknown>
a response object that incudes the total minted supply