diff --git a/src/getDefaultConfirmPeriodBlocks.ts b/src/getDefaultConfirmPeriodBlocks.ts index dbe1d64e..6a10b104 100644 --- a/src/getDefaultConfirmPeriodBlocks.ts +++ b/src/getDefaultConfirmPeriodBlocks.ts @@ -7,7 +7,14 @@ import { base, baseSepolia } from './chains'; export function getDefaultConfirmPeriodBlocks( parentChainIdOrClient: ParentChainId | Client, ): bigint { - const { chainId: parentChainId } = validateParentChain(parentChainIdOrClient, { custom: false }); + const { chainId: parentChainId, isCustom: parentChainIsCustom } = + validateParentChain(parentChainIdOrClient); + + if (parentChainIsCustom) { + throw new Error( + `[getDefaultConfirmPeriodBlocks] can't provide defaults for custom parent chain with id ${parentChainId}`, + ); + } const isMainnet = parentChainIsMainnet(parentChainId); const confirmPeriodBlocks = isMainnet ? 45_818n : 150n;