github NomicFoundation/hardhat hardhat-core-v2.3.0
Hardhat v2.3.0

This release adds support for the debug_traceTransaction RPC method, along with some other minor changes.

debug_traceTransaction

The debug_traceTransaction method receives the hash of a transaction and returns a low-level structure that describes how the EVM executed that transaction. This is mainly useful for higher-level tools, and it's a major step towards letting Brownie integrate with Hardhat.

debug_traceTransaction can be used both in local and fork modes. This means that you can use it with any transaction in mainnet, even if the node you are using doesn't support this method. If you use an archive node, you can trace any historical transaction after the Spurious Dragon fork (2016).

You can read more about this method here, but notice that Hardhat doesn't support the tracer and timeout options.

Return hash of a failed transaction

When a sent transaction fails, the JSON-RPC node will include its hash in the response. This is another component needed to better integrate Brownie with Hardhat, but it's also useful for any tool that wants to leverage it. The JSON response of a failed transaction now looks like this:

{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32603,
    "message": "Error: VM Exception while processing transaction: revert failed",
    "data": {
      "txHash": "0x03a5b783cfd268687f95b741c92ae7e2e7dc611535d6b4f2a8d291df410c33cc"
    }
  }
}

Other changes

This release also includes two minor improvements (thanks to @Bidon15 for these contributions!):

  • When you run Hardhat with the --verbose flag, the output will include the path to the hardhat config file that was loaded. This is useful when you are trying to initialize a project, but Hardhat detects a config file in an upper directory. Issue: #1443, PR: #1454.
  • There was a bug in the error message shown when a library was missing. Issue: #1401, PR: #1405.

Don't miss a new hardhat release

NewReleases is sending notifications on new releases.