Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
This release updates the starter projects available through hardhat init
to include Hardhat Ignition as the default deployment system.
This version of Hardhat Toolbox adds Hardhat Ignition as the default deployment system. See the Hardhat Ignition docs for more information.
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.
This release updates polygonZkEVMTestnet to point to cardona testnet (thanks @invocamanman)
This release sets Cancun as the default hardfork used by the Hardhat Network.
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.
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
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.
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 } }
);
This release fixes a bug when hardhat_setStorageAt
was used in untouched addresses.
This release improves the error messages of the .withArgs
matcher (thanks @RenanSouza2!)