github NomicFoundation/hardhat hardhat@2.7.0
Hardhat v2.7.0

latest releases: hardhat@2.22.4, @nomiclabs/hardhat-solhint@3.1.0, @nomicfoundation/hardhat-viem@2.0.2...
2 years ago

This release adds a FIFO mode to Hardhat Network's mempool and makes the coinbase address customizable. It also includes some minor bug fixes and improvements.

Mempool modes

The way Hardhat Network's mempool orders transactions is now customizable. By default, they are prioritized following Geth's rules, but you can enable a FIFO (first in, first out) mode instead. This mode ensures that transactions are added to blocks in the same order they are sent, and it's useful to recreate blocks from other networks.

You can enable the FIFO mode in your config with:

networks: {
  hardhat: {
    mining: {
      auto: false,
      mempool: {
        order: "fifo",
      },
    },
  },
}

Huge thanks to @ngotchac for this contribution!

Customizable coinbase address

You can configure the coinbase address via a config field and a new RPC method. This is the address that will receive the block reward when a new block is mined.

The config field is part of the Hardhat Network configuration:

networks: {
  hardhat: {
    coinbase: "0x590c193534A11590b1BcE02896d2805bAC54Da2C"
  },
},

You can also use the new hardhat_setCoinbase RPC method to change the coinbase address in runtime:

await network.provider.send("hardhat_setCoinbase", [
  "0x590c193534A11590b1BcE02896d2805bAC54Da2C",
]);

Other changes

  • Suggest similar artifact names when a given name is not found
  • Fixed how the cumulative gas is computed for receipts and added a missing field (Thanks @ngotchac!)
  • Improve validation of private keys in the Hardhat config
  • Fix an issue with new versions of Node.js that prevented clients from connecting to Hardhat's node using 127.0.0.1
  • Enable user configurable tsconfig path
  • Print warning when user tries to use solc remapping (#1877)
  • Bump uuid package to remove a deprecation warning (thanks @yhuard!)

Don't miss a new hardhat release

NewReleases is sending notifications on new releases.