Releases: NomicFoundation/hardhat
Hardhat v2.22.1
This release updates the starter projects available through hardhat init
to include Hardhat Ignition as the default deployment system.
@nomicfoundation/[email protected]
This version of Hardhat Toolbox adds Hardhat Ignition as the default deployment system. See the Hardhat Ignition docs for more information.
@nomicfoundation/[email protected]
This version of Hardhat Toolbox adds Hardhat Ignition as the default deployment system. See the Hardhat Ignition docs for more information.
The version of hardhat-viem
has been bumped to include viem@2
support, see the Viem@2 migration guide for more details.
Hardhat v2.22.0
This release sets Cancun as the default hardfork used by the Hardhat Network.
@nomicfoundation/[email protected]
This release updates polygonZkEVMTestnet to point to cardona testnet (thanks @invocamanman)
Hardhat v2.21.0 — Introducing EDR
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/[email protected]
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
This release fixes a bug when hardhat_setStorageAt
was used in untouched addresses.
@nomicfoundation/[email protected]
This release fixes a broken link in network error messages (thanks @sunsetlover36!).
@nomicfoundation/[email protected]
This release improves the error messages of the .withArgs
matcher (thanks @RenanSouza2!)