diff --git a/apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx b/apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx index 1a8665e077a..9a2581990c7 100644 --- a/apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx +++ b/apps/dashboard/src/components/smart-wallets/AccountFactories/index.tsx @@ -1,14 +1,21 @@ "use client"; +import { CopyAddressButton } from "@/components/ui/CopyAddressButton"; import { Button } from "@/components/ui/button"; import { TrackedLinkTW } from "@/components/ui/tracked-link"; import { useThirdwebClient } from "@/constants/thirdweb.client"; import { useLoggedInUser } from "@3rdweb-sdk/react/hooks/useLoggedInUser"; import { useMultiChainRegContractList } from "@3rdweb-sdk/react/hooks/useRegistry"; import { useQuery } from "@tanstack/react-query"; +import { createColumnHelper } from "@tanstack/react-table"; import { PlusIcon } from "lucide-react"; import { defineChain, getContract } from "thirdweb"; import { getCompilerMetadata } from "thirdweb/contract"; +import { + DEFAULT_ACCOUNT_FACTORY_V0_6, + DEFAULT_ACCOUNT_FACTORY_V0_7, +} from "thirdweb/wallets/smart"; +import { TWTable } from "../../shared/TWTable"; import { FactoryContracts } from "./factory-contracts"; function useFactories() { @@ -54,13 +61,58 @@ export const AccountFactories: React.FC = ({ const factories = useFactories(); return (
-
+ {/* Default factories */} +
+

Default Account Factories

- Click an account factory contract to view analytics and accounts - created. + Ready to use account factories that are pre-deployed on each chain.{" "} + + Learn how to use these in your apps. +

+
+ -
); }; + +type DefaultFactory = { + name: string; + address: string; + entrypointVersion: string; +}; + +const columnHelper = createColumnHelper(); + +const columns = [ + columnHelper.accessor((row) => row.name, { + header: "Name", + cell: (cell) => cell.row.original.name, + }), + columnHelper.accessor((row) => row.name, { + header: "Network", + cell: () => "All networks", + }), + columnHelper.accessor("address", { + header: "Contract address", + cell: (cell) => ( + + ), + }), + columnHelper.accessor((row) => row, { + header: "Entrypoint Version", + cell: (cell) => { + return cell.row.original.entrypointVersion; + }, + }), +];