diff --git a/.changeset/unlucky-tips-jam.md b/.changeset/unlucky-tips-jam.md new file mode 100644 index 0000000000..ac4ab73190 --- /dev/null +++ b/.changeset/unlucky-tips-jam.md @@ -0,0 +1,5 @@ +--- +"hardhat": patch +--- + +Added hardfork histories for Optimim and Arbitrum chains diff --git a/packages/hardhat-core/src/internal/core/config/default-config.ts b/packages/hardhat-core/src/internal/core/config/default-config.ts index ba77864c52..986b360821 100644 --- a/packages/hardhat-core/src/internal/core/config/default-config.ts +++ b/packages/hardhat-core/src/internal/core/config/default-config.ts @@ -141,6 +141,32 @@ export const defaultHardhatNetworkParams: Omit< ]), }, ], + // TODO: the rest of this config is a temporary workaround, + // see https://github.com/NomicFoundation/edr/issues/522 + [ + 10, // optimism mainnet + { + hardforkHistory: new Map([[HardforkName.SHANGHAI, 0]]), + }, + ], + [ + 11155420, // optimism sepolia + { + hardforkHistory: new Map([[HardforkName.SHANGHAI, 0]]), + }, + ], + [ + 42161, // arbitrum one + { + hardforkHistory: new Map([[HardforkName.SHANGHAI, 0]]), + }, + ], + [ + 421614, // arbitrum sepolia + { + hardforkHistory: new Map([[HardforkName.SHANGHAI, 0]]), + }, + ], ]), };