Repository: NomicFoundation/hardhat (TypeScript)

Issue:
ISTHMUS missing in hardhat package while it's available in @nomicfoundation/edr
### Version of Hardhat

3.0.6

### What happened?

trying to run opstack chain with `hardforkHistory { isthmus }` and getting 👍 

```
Error HHE15: Invalid config:
	* Config error in config.chainDescriptors.84532.hardforkHistory.isthmus: Invalid hardfork name a found in chain descriptor for chain 84532. Expected bedrock | regolith | canyon | ecotone | fjord | granite | holocene
```

### Minimal reproduction steps

add following to your config:

```
  chainDescriptors: {
    "84532": {
      name: "base_sepolia",
      chainType: 'op',
      hardforkHistory: {
        isthmus: { blockNumber: 30000000 },
      }
    }
  },
```

run:


```
npx hardhat node --fork https://sepolia.base.org --fork-block-number 31993798
```

### Search terms

_No response_


Discussion:
OP support is being tackled as a whole, with Isthmus support included. See https://github.com/NomicFoundation/edr/issues/906. We'll keep you posted when this is released.
Some of the details for Isthmus haven't been finished yet, but it should be supported from a hardfork selection perspective at least.

This errors looks to be coming from something on the TS side:
```
Expected bedrock | regolith | canyon | ecotone | fjord | granite | holocene
```
Blocked by limited support for the `ISTHMUS` hardfork in EDR.
Requires https://github.com/NomicFoundation/edr/pull/1110 and https://github.com/NomicFoundation/edr/pull/1111 to be completed, released with EDR and the version of EDR updated in Hardhat.
Thanks. Do I understand correctly that OP stack chains are not supoort in hardhat 3? I'm trying to run node with --chain-type "op" and getting instant crash 
>  Do I understand correctly that OP stack chains are not supoort in hardhat 3?
OP stack is supported by Hardhat 3. We're still working on adding complete support for the latest hardfork (Isthmus). However, it's possible that you're experiencing a bug.

> I'm trying to run node with --chain-type "op" and getting instant crash

Could you please provide a stack trace of the crash?



Patch:
diff --git a/.changeset/cool-cougars-smile.md b/.changeset/cool-cougars-smile.md
new file mode 100644
index 00000000000..47d3e1c3397
--- /dev/null
+++ b/.changeset/cool-cougars-smile.md
@@ -0,0 +1,5 @@
+---
+"hardhat": patch
+---
+
+Optimism ISTHMUS hardfork support added to Hardhat ([#7517](https://github.com/NomicFoundation/hardhat/issues/7517))
diff --git a/v-next/hardhat/src/internal/builtin-plugins/network-manager/edr/types/hardfork.ts b/v-next/hardhat/src/internal/builtin-plugins/network-manager/edr/types/hardfork.ts
index 82dfb8f5e3e..5066b122c34 100644
--- a/v-next/hardhat/src/internal/builtin-plugins/network-manager/edr/types/hardfork.ts
+++ b/v-next/hardhat/src/internal/builtin-plugins/network-manager/edr/types/hardfork.ts
@@ -31,6 +31,7 @@ export enum OpHardforkName {
   FJORD = "fjord",
   GRANITE = "granite",
   HOLOCENE = "holocene",
+  ISTHMUS = "isthmus",
 }
 
 const L1_HARDFORK_ORDER = Object.values(L1HardforkName);
diff --git a/v-next/hardhat/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.ts b/v-next/hardhat/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.ts
index 39a92cb8f3d..88477dc4bcd 100644
--- a/v-next/hardhat/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.ts
+++ b/v-next/hardhat/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.ts
@@ -45,6 +45,7 @@ import {
   FJORD,
   GRANITE,
   HOLOCENE,
+  ISTHMUS,
   GasReportExecutionStatus,
 } from "@nomicfoundation/edr";
 import { getUnprefixedHexString } from "@nomicfoundation/hardhat-utils/hex";
@@ -92,6 +93,8 @@ function hardhatOpHardforkToEdrSpecId(hardfork: string): string {
       return GRANITE;
     case OpHardforkName.HOLOCENE:
       return HOLOCENE;
+    case OpHardforkName.ISTHMUS:
+      return ISTHMUS;
     // eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check -- trust but verify
     default:
       const _exhaustiveCheck: never = hardforkName;


Test patch:
diff --git a/v-next/hardhat/test/internal/builtin-plugins/network-manager/network-manager.ts b/v-next/hardhat/test/internal/builtin-plugins/network-manager/network-manager.ts
index e855736a125..4a3ef28a3f0 100644
--- a/v-next/hardhat/test/internal/builtin-plugins/network-manager/network-manager.ts
+++ b/v-next/hardhat/test/internal/builtin-plugins/network-manager/network-manager.ts
@@ -736,7 +736,7 @@ describe("NetworkManagerImplementation", () => {
           {
             path: ["chainDescriptors", "1", "hardforkHistory", "random string"],
             message:
-              "Invalid hardfork name random string found in chain descriptor for chain 1. Expected bedrock | regolith | canyon | ecotone | fjord | granite | holocene.",
+              "Invalid hardfork name random string found in chain descriptor for chain 1. Expected bedrock | regolith | canyon | ecotone | fjord | granite | holocene | isthmus.",
           },
         ]);
 
@@ -2171,7 +2171,7 @@ describe("NetworkManagerImplementation", () => {
             {
               path: ["networks", "hardhat", "hardfork"],
               message:
-                "Invalid hardfork name anything else for chainType op. Expected bedrock | regolith | canyon | ecotone | fjord | granite | holocene.",
+                "Invalid hardfork name anything else for chainType op. Expected bedrock | regolith | canyon | ecotone | fjord | granite | holocene | isthmus.",
             },
           ]);
         });