Docs

detectDecimals

Detects if the contract has a function to retrieve the number of decimals.

Example

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

Parameters

Returns

A Promise that resolves to a boolean indicating whether the contract has a decimals function.