diff --git a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx index 0d2025f47eb..c95a69a7912 100644 --- a/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx +++ b/apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/layout.tsx @@ -5,7 +5,7 @@ import { DeprecatedAlert } from "components/shared/DeprecatedAlert"; import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { getContractMetadata } from "thirdweb/extensions/common"; -import { isContractDeployed } from "thirdweb/utils"; +import { isAddress, isContractDeployed } from "thirdweb/utils"; import { resolveFunctionSelectors } from "../../../../../lib/selectors"; import { shortenIfAddress } from "../../../../../utils/usedapp-external"; import { ConfigureCustomChain } from "./ConfigureCustomChain"; @@ -22,6 +22,10 @@ export default async function Layout(props: { }; children: React.ReactNode; }) { + if (!isAddress(props.params.contractAddress)) { + return notFound(); + } + const info = await getContractPageParamsInfo(props.params); if (!info) {