import "../../constants/chains.constants.mjs";
import { TokenType as e } from "../../constants/protocol.constants.mjs";
import { getERC20Registry as t } from "../../constants/token-data/ERC20Registry.mjs";
import "../../constants/token-data/index.mjs";
import { customTokenRegistry as n } from "../../data-structures/custom-token-registry/CustomTokenRegistry.mjs";
import "../web3/etherFunctions.mjs";
import "../../constants/tokens.constants.mjs";
//#region libs/shared/common/src/functions/utils/erc20tokenFunctions.ts
var r = (e) => {
	let r = t(e), i = n.getCustomTokens(e);
	return [...r, ...i];
}, i = (e, t, n) => (n ?? r(t))?.find((t) => e === void 0 ? !1 : t.erc20TokenAddress.toLowerCase() === e.toLowerCase()), a = (e, t) => {
	let n = i(e.erc20TokenAddress, t);
	return n ? {
		...e,
		name: n.name,
		symbol: n.symbol,
		logoURI: n.logoURI,
		decimals: n.decimals
	} : e;
}, o = (e, t) => r(t)?.find((t) => e === void 0 ? !1 : t.symbol.toLowerCase() === e.toLowerCase()), s = (t) => t.nftTokenType === e.ERC721 || t.nftTokenType === e.ERC1155 || t.nftTokenType === e.MetaplexNFT || t.nftTokenType === e.Token2022NFT || t.nftTokenType === e.CompressedNFT;
//#endregion
export { i as getERC20Token, o as getERC20TokenBySymbol, r as getErc20TokensForChain, s as isNFTToken, a as overlayTokenWithRegistryData };
