decimals

Retrieves the number of decimal places for a given ERC20 contract.

Example

import { decimals } from "thirdweb/extensions/erc20";
const tokenDecimals = await decimals({ contract });

Parameters

Returns

A promise that resolves to the number of decimal places.