Docs

decimals

Retrieves the number of decimal places for an ERC20 token.

Example

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

Parameters

Returns

A promise that resolves to the number of decimal places (uint8).