Skip to content

Releases: NomicFoundation/hardhat

Hardhat v2.21.0 — Introducing EDR

04 Mar 16:26
Compare
Choose a tag to compare

This version of Hardhat marks the debut of EDR (Ethereum Development Runtime), our new Rust-based runtime that is a complete rewrite of the original TypeScript-based Hardhat Network. This release lays a new long-term foundation for Hardhat's evolution over the coming year.

There are no functional changes, but there are some performance improvements across the board, which we’ll continue to expand in future updates.

Given the significance of this internal change, there’s a possibility of bugs. If you encounter any problems specific to this version, please report them by opening an issue. You should be able to downgrade to v2.20.1 without losing functionality if needed.

solidity-coverage out-of-memory issues

The solidity-coverage plugin works by heavily instrumenting the code, which sometimes causes OOM (out-of-memory) issues. This new version of Hardhat can, in certain cases, make those problems more likely.

If you run into this, you can fix it by using Node.js’s --max-old-space-size flag:

NODE_OPTIONS="--max-old-space-size=8192" npx hardhat coverage

Dropping support for Node.js v16

As part of this release, we are dropping support for Node.js v16. This version of Node.js reached its end-of-life in September of last year. You can learn more about our support guarantees here.

@nomicfoundation/hardhat-viem@2.0.0

21 Feb 01:48
Compare
Choose a tag to compare

This release introduces compatibility with Viem 2.

The release introduces a breaking change in the API: publicClient and walletClient have been consolidated into a single client parameter for the deployContract, sendDeploymentTransaction, and getContractAt APIs. This modification is in alignment with Viem's update to the getContract API.

For users upgrading from an earlier version of hardhat-viem, please update your code as follows:

// Deploying a contract with the updated API
const contract = await hre.viem.deployContract(
  contractName,
  constructorArgs,
- { publicClient, walletClient }
+ { client: { publicClient, walletClient } }
);

// Sending a deployment transaction with the updated API
const { contract, deploymentTransaction } = await hre.viem.sendDeploymentTransaction(
  contractName,
  constructorArgs,
- { publicClient, walletClient }
+ { client: { publicClient, walletClient } }
  );

// Accessing a contract at a specific address with the updated API
const contract = await hre.viem.getContractAt(
  contractName,
  address,
- { publicClient, walletClient }
+ { client: { publicClient, walletClient } }
);

Hardhat v2.20.1

15 Feb 14:17
Compare
Choose a tag to compare

This release fixes a bug when hardhat_setStorageAt was used in untouched addresses.

@nomicfoundation/hardhat-viem@1.0.4

15 Feb 14:15
Compare
Choose a tag to compare

This release fixes a broken link in network error messages (thanks @sunsetlover36!).

@nomicfoundation/hardhat-chai-matchers@2.0.6

15 Feb 14:16
Compare
Choose a tag to compare

This release improves the error messages of the .withArgs matcher (thanks @RenanSouza2!)

Hardhat v2.20.0 — Cancun

14 Feb 14:41
Compare
Choose a tag to compare

This release adds support for the upcoming cancun hardfork. This hardfork is not enabled by default; if you want to use it, then you have to enable it in your Hardhat config:

module.exports = {
  networks: {
    hardhat: {
      hardfork: "cancun",
    },
  },
}

Keep in mind that blob transactions are not supported yet. If you need this, please upvote or comment on this issue.

In addition, this release adds support for solc 0.8.24.

@nomicfoundation/hardhat-ledger@1.0.2

14 Feb 14:33
Compare
Choose a tag to compare

This version fixes a problem that made hardhat-ledger unusable in the Hardhat console (thanks @area!).

@nomicfoundation/hardhat-chai-matchers@2.0.5

14 Feb 14:33
Compare
Choose a tag to compare

This version:

  • Adds support for Typed objects (thanks @RenanSouza2!)
  • Improves how .revertedWithCustomError handles wrong number of arguments (thanks @RenanSouza2!)

Hardhat v2.19.5

30 Jan 18:48
Compare
Choose a tag to compare

This release includes the following changes:

  • Notify users when a new Hardhat version is available
  • Fixed a bug during project initialization when using yarn or pnpm
  • Fixed a race condition that occurred when multiple Hardhat processes ran a compilation at the same time
  • Added a fix to prevent submitting transactions with 0 priority fee (thanks @itsdevbear!)

@nomicfoundation/hardhat-viem@1.0.3

30 Jan 18:50
Compare
Choose a tag to compare

This release improves the loading performance of the plugin