Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions web/src/app/[cat]/InteractionClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import { SupportedChainId } from "@/utils/indexedDB";

// Chain names mapping
const CHAIN_NAMES: Record<SupportedChainId, string> = {
137: "Polygon",
534351: "Scroll Sepolia",
// 137: "Polygon",
// 534351: "Scroll Sepolia",
5115: "Citrea Testnet",
61: "Ethereum Classic",
8453: "Base"
// 61: "Ethereum Classic",
// 8453: "Base"
};


Expand Down Expand Up @@ -237,7 +237,8 @@ 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[] = [ 137, 534351, 5115, 61, 8453];
const validChainIds: SupportedChainId[] = [ 5115];
return validChainIds.includes(chainId as SupportedChainId);
}, []);

Expand Down
19 changes: 10 additions & 9 deletions web/src/app/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ 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 = 137 | 534351 | 5115 | 61 | 8453;
type SupportedChainId = 5115;

const CHAIN_NAMES: Record<SupportedChainId, string> = {
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<SupportedChainId, string> = {
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 {
Expand Down
19 changes: 10 additions & 9 deletions web/src/app/my-cats/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,20 @@ import toast from "react-hot-toast";

// Chain ID to name mapping
const CHAIN_NAMES: Record<SupportedChainId, string> = {
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<SupportedChainId, string> = {
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 {
Expand All @@ -60,7 +60,8 @@ interface PaginationInfo {
const isValidChainId = (
chainId: number | string
): chainId is SupportedChainId => {
const validChainIds: SupportedChainId[] = [137, 534351, 5115, 61, 8453];
// const validChainIds: SupportedChainId[] = [137, 534351, 5115, 61, 8453];
const validChainIds: SupportedChainId[] = [5115];
return validChainIds.includes(Number(chainId) as SupportedChainId);
};

Expand Down
8 changes: 4 additions & 4 deletions web/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
19 changes: 10 additions & 9 deletions web/src/components/ChainDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@ 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 = 137 | 534351 | 5115 | 61 | 8453;
type SupportedChainId = 5115;

// Chain ID to name mapping
const CHAIN_NAMES: Record<SupportedChainId, string> = {
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<SupportedChainId, string> = {
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 {
Expand Down
50 changes: 25 additions & 25 deletions web/src/components/EthereumClassic.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import { defineChain } from "viem";
// import { defineChain } from "viem";

export const ethereumClassic = defineChain({
id: 61,
name: "Ethereum Classic",
network: "ethereumClassic",
nativeCurrency: {
name: "Ethereum Classic",
symbol: "ETC",
decimals: 18,
},
rpcUrls: {
default: {
http: ["https://etc.rivet.link"],
},
public: {
http: ["https://etc.rivet.link"],
},
},
blockExplorers: {
default: {
name: "BlockScout",
url: "https://blockscout.com/etc/mainnet",
},
},
});
// export const ethereumClassic = defineChain({
// id: 61,
// name: "Ethereum Classic",
// network: "ethereumClassic",
// nativeCurrency: {
// name: "Ethereum Classic",
// symbol: "ETC",
// decimals: 18,
// },
// rpcUrls: {
// default: {
// http: ["https://etc.rivet.link"],
// },
// public: {
// http: ["https://etc.rivet.link"],
// },
// },
// blockExplorers: {
// default: {
// name: "BlockScout",
// url: "https://blockscout.com/etc/mainnet",
// },
// },
// });
8 changes: 4 additions & 4 deletions web/src/utils/address.ts
Original file line number Diff line number Diff line change
@@ -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}`;
};
4 changes: 2 additions & 2 deletions web/src/utils/catExplorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ export const catExplorer = (hash: `0x${string}`, chainId: number): string => {
1: "https://etherscan.io/address/",
137: "https://polygonscan.com/address/",
534351: "https://sepolia.scrollscan.com/address/",
5115: "https://explorer.testnet.mantle.xyz/address/",
61: "https://explorer.testnet.rsk.co/address/",
5115: "https://explorer.testnet.citrea.xyz/address/",
61: "https://etc.blockscout.com/address/",
2001: "https://explorer.testnet.milkomeda.com/address/",
8453: "https://basescan.org/address/",
84531: "https://goerli.basescan.org/address/",
Expand Down
16 changes: 8 additions & 8 deletions web/src/utils/config.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import {
polygon,
scrollSepolia,
base,
// polygon,
// scrollSepolia,
// base,
} from "wagmi/chains";
import {
getDefaultConfig,
} from "@rainbow-me/rainbowkit";
import { citreaTestnet } from "@/components/CitreaTestnet";
import { ethereumClassic } from "@/components/EthereumClassic";
// import { ethereumClassic } from "@/components/EthereumClassic";

export const config = getDefaultConfig({
appName: "clowder",
projectId: process.env.NEXT_PUBLIC_PROJECT_ID ?? "",
chains: [
scrollSepolia,
base,
polygon,
ethereumClassic,
// scrollSepolia,
// base,
// polygon,
// ethereumClassic,
citreaTestnet,
] as const,
ssr: true, // Disable SSR for static export
Expand Down
6 changes: 3 additions & 3 deletions web/src/utils/explorer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ export const getExplorerUrl = (hash: `0x${string}`, chainId: number): string =>
1: "https://etherscan.io/tx/",
137: "https://polygonscan.com/tx/",
534351: "https://sepolia.scrollscan.com/tx/",
5115: "https://explorer.testnet.mantle.xyz/tx/",
61: "https://explorer.testnet.rsk.co/tx/",
5115: "https://explorer.testnet.citrea.xyz/tx/",
61: "https://etc.blockscout.com/tx/",
2001: "https://explorer.testnet.milkomeda.com/tx/",
8453: "https://basescan.org/tx/",
84531: "https://goerli.basescan.org/tx/",
// 84531: "https://goerli.basescan.org/tx/",
};

const baseUrl = baseUrls[chainId];
Expand Down
3 changes: 2 additions & 1 deletion web/src/utils/indexedDB.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// 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 = 137 | 534351 | 5115 | 61 | 8453;
export type SupportedChainId = 5115;

export interface CatDetails {
chainId: SupportedChainId;
Expand Down