Skip to content

Commit

Permalink
feat: remove hardfork default based on enableTransientStorage
Browse files Browse the repository at this point in the history
  • Loading branch information
schaable committed Feb 6, 2025
1 parent 31a9db6 commit 3cf0685
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,6 @@ function resolveHardhatNetworkConfig(
delete config.initialBaseFeePerGas;
}

if (
hardhatNetworkConfig.enableTransientStorage === true &&
hardhatNetworkConfig.hardfork === undefined
) {
config.hardfork = "cancun";
}
if (
hardhatNetworkConfig.enableTransientStorage === false &&
hardhatNetworkConfig.hardfork === undefined
) {
config.hardfork = "shanghai";
}

return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,30 +761,6 @@ describe("Config resolution", () => {
});
});
});

it("should use cancun as the hardfork when enableTransientStorage is set", async function () {
const config = resolveConfig(__filename, {
networks: {
hardhat: {
enableTransientStorage: true,
},
},
});

assert.equal(config.networks.hardhat.hardfork, "cancun");
});

it("should use shanghai as the hardfork when enableTransientStorage is disabled", async function () {
const config = resolveConfig(__filename, {
networks: {
hardhat: {
enableTransientStorage: false,
},
},
});

assert.equal(config.networks.hardhat.hardfork, "shanghai");
});
});

describe("HTTP networks resolution", function () {
Expand Down

0 comments on commit 3cf0685

Please sign in to comment.