@0xfutbol/id
Version:
React component library with shared providers for 0xFutbol ID
20 lines (19 loc) • 1.06 kB
JavaScript
import {ag as withCache}from'./index-DNoa140s.js';import {d as decimals$1}from'./decimals-CUdgsyo0.js';import'react';import'react/jsx-runtime';import'@0xfutbol/id-sign';import'react-use';import'@0xfutbol/constants';import'thirdweb';import'@matchain/matchid-sdk-react';import'@tanstack/react-query';import'@matchain/matchid-sdk-react/index.css';import'react-dom';/**
* Retrieves the number of decimal places for a given ERC20 contract.
* @param options - The options for the transaction.
* @returns A promise that resolves to the number of decimal places.
* @extension ERC20
* @example
* ```ts
* import { decimals } from "thirdweb/extensions/erc20";
*
* const tokenDecimals = await decimals({ contract });
* ```
*/
async function decimals(options) {
return withCache(() => decimals$1(options), {
cacheKey: `${options.contract.chain.id}:${options.contract.address}:decimals`,
// can never change, so cache forever
cacheTime: Number.POSITIVE_INFINITY,
});
}export{decimals};//# sourceMappingURL=decimals-CxnsnJ8p.js.map