useTokenDecimals
Get token decimals
function useTokenDecimals(
contract: RequiredParam<TokenContract>,
): UseQueryResult<number, unknown>;
Parameters
Returns
a response object that includes the decimals of the ERC20 token
type ReturnType = UseQueryResult<number, unknown>;
Example
const {
data: decimals,
isLoading,
error,
} = useTokenDecimals(contract);