diff --git a/web/src/app/[cat]/InteractionClient.tsx b/web/src/app/[cat]/InteractionClient.tsx index bc64fffb..31359375 100644 --- a/web/src/app/[cat]/InteractionClient.tsx +++ b/web/src/app/[cat]/InteractionClient.tsx @@ -26,11 +26,11 @@ import { SupportedChainId } from "@/utils/indexedDB"; // Chain names mapping const CHAIN_NAMES: Record = { - // 137: "Polygon", - // 534351: "Scroll Sepolia", + 137: "Polygon", + 534351: "Scroll Sepolia", 5115: "Citrea Testnet", - // 61: "Ethereum Classic", - // 8453: "Base" + 61: "Ethereum Classic", + 8453: "Base" }; @@ -184,8 +184,7 @@ export default function InteractionClient() { // Type guard for chain ID validation const isValidChainId = useCallback((chainId: number): chainId is SupportedChainId => { - // const validChainIds: SupportedChainId[] = [ 137, 534351, 5115, 61, 8453]; - const validChainIds: SupportedChainId[] = [ 5115]; + const validChainIds: SupportedChainId[] = [ 137, 534351, 5115, 61, 8453]; return validChainIds.includes(chainId as SupportedChainId); }, []); @@ -226,7 +225,7 @@ export default function InteractionClient() { setIsSyncing(true); console.log('Fetching token details from blockchain...', { tokenAddress, chainId }); - const publicClient = getPublicClient(config, { chainId }); + const publicClient = getPublicClient(config, { chainId: chainId as any }); if (!publicClient) { throw new Error(`No public client available for chain ${chainId}`); } diff --git a/web/src/app/create/page.tsx b/web/src/app/create/page.tsx index 19464a46..9d1e01b5 100644 --- a/web/src/app/create/page.tsx +++ b/web/src/app/create/page.tsx @@ -22,23 +22,22 @@ import { ButtonLoadingState } from "@/components/ui/button-loading-state"; import { getPublicClient } from "@wagmi/core"; // Define supported chain IDs and names -// type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453; -type SupportedChainId = 5115; +type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453; const CHAIN_NAMES: Record = { - // 137: "Polygon", - // 534351: "Scroll Sepolia", + 137: "Polygon", + 534351: "Scroll Sepolia", 5115: "Citrea Testnet", - // 61: "Ethereum Classic", - // 8453: "Base Mainnet", + 61: "Ethereum Classic", + 8453: "Base Mainnet", }; const CHAIN_COLORS: Record = { - // 137: "bg-purple-500", - // 534351: "bg-orange-500", + 137: "bg-purple-500", + 534351: "bg-orange-500", 5115: "bg-yellow-500", - // 61: "bg-green-500", - // 8453: "bg-blue-500", + 61: "bg-green-500", + 8453: "bg-blue-500", }; interface DeployContractProps { diff --git a/web/src/app/my-cats/page.tsx b/web/src/app/my-cats/page.tsx index f8d7a2ea..8dca14bf 100644 --- a/web/src/app/my-cats/page.tsx +++ b/web/src/app/my-cats/page.tsx @@ -19,25 +19,22 @@ import { useCATStorage } from "@/hooks/useCATStorage"; import { SupportedChainId, CatDetails as StoredCatDetails } from "@/utils/indexedDB"; import toast from "react-hot-toast"; -// Define supported chain IDs - use the imported type from IndexedDB -// type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453; - // Chain ID to name mapping const CHAIN_NAMES: Record = { - // 137: "Polygon", - // 534351: "Scroll Sepolia", + 137: "Polygon", + 534351: "Scroll Sepolia", 5115: "Citrea Testnet", - // 61: "Ethereum Classic", - // 8453: "Base Mainnet", + 61: "Ethereum Classic", + 8453: "Base Mainnet", }; // Chain colors for visual distinction const CHAIN_COLORS: Record = { - // 137: "bg-purple-500", - // 534351: "bg-orange-500", + 137: "bg-purple-500", + 534351: "bg-orange-500", 5115: "bg-yellow-500", - // 61: "bg-green-500", - // 8453: "bg-blue-500", + 61: "bg-green-500", + 8453: "bg-blue-500", }; interface CatDetails { @@ -60,8 +57,7 @@ interface PaginationInfo { const isValidChainId = ( chainId: number | string ): chainId is SupportedChainId => { - // const validChainIds: SupportedChainId[] = [137, 534351, 5115, 61, 8453]; - const validChainIds: SupportedChainId[] = [5115]; + const validChainIds: SupportedChainId[] = [137, 534351, 5115, 61, 8453]; return validChainIds.includes(Number(chainId) as SupportedChainId); }; @@ -191,7 +187,7 @@ export default function MyCATsPage() { for (const [chainId, factoryAddress] of Object.entries(ClowderVaultFactories)) { if (!isValidChainId(chainId)) continue; - const publicClient = getPublicClient(config, { chainId: Number(chainId) as SupportedChainId }); + const publicClient = getPublicClient(config, { chainId: Number(chainId) as any }); if (!publicClient) continue; try { @@ -600,7 +596,7 @@ export default function MyCATsPage() { chainId: SupportedChainId, defaultRole: 'admin' | 'minter' | 'both' ): Promise => { - const publicClient = getPublicClient(config, { chainId }); + const publicClient = getPublicClient(config, { chainId: chainId as any }); if (!publicClient || !addresses.length) return []; try { diff --git a/web/src/app/page.tsx b/web/src/app/page.tsx index 60510e88..6f87ea71 100644 --- a/web/src/app/page.tsx +++ b/web/src/app/page.tsx @@ -21,11 +21,11 @@ import { showTransactionToast } from "@/components/ui/transaction-toast" const supportedChains = [ - // { id: "534351", name: "Scroll Sepolia" }, + { id: "534351", name: "Scroll Sepolia" }, { id: "5115", name: "Citrea Testnet" }, - // { id: "61", name: "Ethereum Classic" }, - // { id: "8453", name: "Base Mainnet" }, - // { id: "137", name: "Polygon Mainnet" }, + { id: "61", name: "Ethereum Classic" }, + { id: "8453", name: "Base Mainnet" }, + { id: "137", name: "Polygon Mainnet" }, ]; const contact_links = [ diff --git a/web/src/components/ChainDropdown.tsx b/web/src/components/ChainDropdown.tsx index 0a197277..468b82dd 100644 --- a/web/src/components/ChainDropdown.tsx +++ b/web/src/components/ChainDropdown.tsx @@ -5,25 +5,24 @@ import { motion, AnimatePresence } from "framer-motion"; import { ChevronDown, Check, Network } from "lucide-react"; // Define supported chain IDs -// type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453; -type SupportedChainId = 5115; +type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453; // Chain ID to name mapping const CHAIN_NAMES: Record = { - // 137: "Polygon", - // 534351: "Scroll Sepolia", + 137: "Polygon", + 534351: "Scroll Sepolia", 5115: "Citrea Testnet", - // 61: "Ethereum Classic", - // 8453: "Base Mainnet", + 61: "Ethereum Classic", + 8453: "Base Mainnet", }; // Chain colors for visual distinction const CHAIN_COLORS: Record = { - // 137: "bg-purple-500", - // 534351: "bg-orange-500", + 137: "bg-purple-500", + 534351: "bg-orange-500", 5115: "bg-yellow-500", - // 61: "bg-green-500", - // 8453: "bg-blue-500", + 61: "bg-green-500", + 8453: "bg-blue-500", }; interface ChainDropdownProps { diff --git a/web/src/utils/address.ts b/web/src/utils/address.ts index b3641cd5..6f4329cd 100644 --- a/web/src/utils/address.ts +++ b/web/src/utils/address.ts @@ -1,9 +1,9 @@ export const ClowderVaultFactories = { - // 534351: "0x9551a49da35158c97b5c7857b5ef46223c71e9e1", + 534351: "0x9551a49da35158c97b5c7857b5ef46223c71e9e1", 5115: "0x90070eD69ED51f606b899f5bB9069157Dec4A400", - // 61: "0x6300F69Ff4Bf96EB4AaD8bf99ee82D8f1a19Bb0F", - // 137: "0x562a404f844ea6097bd84feb005bd6f420d3640e", - // 8453: "0x553859a7e3f8841aed994a2a131ebfb38aa9dc10", + 61: "0x6300F69Ff4Bf96EB4AaD8bf99ee82D8f1a19Bb0F", + 137: "0x562a404f844ea6097bd84feb005bd6f420d3640e", + 8453: "0x553859a7e3f8841aed994a2a131ebfb38aa9dc10", } as { [key: number]: `0x${string}`; }; \ No newline at end of file diff --git a/web/src/utils/indexedDB.ts b/web/src/utils/indexedDB.ts index 5628b86b..00a3d051 100644 --- a/web/src/utils/indexedDB.ts +++ b/web/src/utils/indexedDB.ts @@ -1,8 +1,7 @@ // IndexedDB service for storing CAT and token data // Following best practices with versioning, proper indexing, and error handling -// export type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453; -export type SupportedChainId = 5115; +export type SupportedChainId = 137 | 534351 | 5115 | 61 | 8453; export interface CatDetails { chainId: SupportedChainId;