Releases: NomicFoundation/hardhat
hardhat-etherscan v2.1.2
This release adds support for the HECO and fantom networks to the etherscan plugin.
Hardhat v2.2.1
This release fixes a bug where a contract's code was not being properly removed after a selfdestruct
(#1415).
Hardhat v2.2.0: Berlin support
Hardhat v2.2.0, which includes support for the new Berlin hard fork, has been released.
This version also includes some small fixes, most notably, it fixed some problems when downloading solc on MacOS.
Known issues
To workaround a recently discovered bug in @ethereumjs/vm
, this release saves the EVM state in a non-standard way which can't produce valid state roots.
What this means in practice is that the state root in block headers is not valid. If your tests don't depend on it, they should work correctly.
Note that this same limitation is always present when forking from another network, so if you are using this feature, you can ignore this section.
As soon as this issue is fixed upstream, we'll publish a new version which will compute valid state roots again.
Default config changes
This version changes Hardhat Network's default config to match Mainnet's behavior:
- The default
hardfork
is now"berlin"
. - The default
blockGasLimit
is now12450000
(a reasonable value for Mainnet blocks at the time of the release). - The default
gas
matches the block gas limit value.
Complete list of changes
- Add support for the Berlin hardfork (#1376 #1383 #1381 #1379)
- Update Hardhat Network's default config to match Mainnet (#1387)
- Make Hardhat Network's default gas match the block gas limit (#1390)
- Fix the Solidity compiler downloader, which was failing on MacOS (#1392)
- Fix our implementation of EIP-1898 so it matches Geth's (#1366)
- Fix a bug in
eth_estimateGas
that was triggered when running it with an old block (#1366) - Make the params of
eth_sendTransaction
,eth_estimateGas
, andeth_call
match those of Geth.eth_estimateGas
now ignores thenonce
field. (#1366) - Upgrade to
@ethereumjs/vm
v5 (#1337 #1370 #1394) - Workaround an issue in
@etheruemjs/vm
'sDefaultStateManager
(#1406)
Hardhat v2.1.2
This release makes it easier to use a custom VM with hardhat. Most users shouldn't be affected by this change.
This release also fixes an issue with mainnet forking when using ArchiveNode.io as the remote node.
hardhat-ethers v2.0.2
This release adds a new getSigner
method that can be used with an address to get a signer object for that address:
const signer = await ethers.getSigner("0xabc...");
Of course, this signer can be used for writing only if that address is unlocked. Otherwise it can be used in a read-only fashion.
This release also fixes getContractAt
so that, if there are no signers available, you still get a contract instance that can only be used for read operations.
Finally, it's now possible for a typescript plugin to declare which methods are added to the ethers
object.
Hardhat v2.1.1
This release fixes a bug introduced in 2.1.0 that was causing the gas estimation to be executed in the context of the latest block and not in the pending ("next") block.
Hardhat v2.1.0
This release adds mempool support to Hardhat, with two possible mechanisms for mining transactions: automining (the current behavior) and interval mining. You can also disable both mechanisms and mine new blocks programmatically. Check the docs to learn more.
Besides that:
- Starting now, Hardhat will warn you if you are using an unsupported version of solc. This doesn't mean that you can't use those versions, only that some Hardhat features, like stack traces, might not work correctly.
- Ropsten forking now has cache support, if you fork from a block that is at least 100 blocks old.
- A bug around the
eth_getStorageAt
was fixed (thanks @fubhy!)
Hardhat v2.0.11
This release fixes two bugs in the Hardhat Network.
The first one was related to how internal errors were handled during a fork. If you were seeing revert errors in some runs but not in others, this version should fix that.
The second bug was a race condition that caused the fork to sometimes throw an error about an nonexistent directory when it was started.
hardhat-vyper v2.0.1
This release adds support for mixing Solidity and Vyper files in the same project.
Thanks a lot to @transferAndCall for working on this!
Hardhat v2.0.10
This PR fixes a problem introduced in v2.0.9 that caused Hardhat to stop working with node 14.
Besides that, there are two important fixes to mainnet forking:
- The nonces of the unlocked accounts now use the values in the forked chain, instead of being set to 0. This was causing an issue when several contracts were deployed with the first default account.
- The timestamps of new blocks are now computed based on the forked block. This means that if, for example, the forked block has a timestamp of 2021-01-01 06:00, and you mine a block one minute after forking, the timestamp of that block will be 2021-01-01 06:01 instead of using the current date. There's a slight change that this fix breaks something for you, so keep this change in mind
Huge thanks to @fubhy for contributing to this release!