import "../../constants/token-data/ERC20Registry.mjs";
import { transactionErrorCodes as e } from "../../error-handling/error-codes.constants.mjs";
import { caseInsensitiveEqual as t } from "./caseInsensitive.utils.mjs";
import "../../API/API.mjs";
//#region libs/shared/common/src/functions/utils/token-check.utils.ts
var n = (t) => {
	if (t.length === 0) throw Error("Token array cannot be empty");
	let n = t.map((e) => e.chainId), r = n[0];
	if (!n.every((e) => e === r)) throw Error(e.TOKENS_DO_NOT_BELONG_SAME_CHAIN);
	return r;
}, r = (e, n) => !e || !n ? !1 : t(e.erc20TokenAddress, n.erc20TokenAddress) && e.chainId === n.chainId;
//#endregion
export { r as isSameERC20Token, n as validateAndGetChainId };
