Nomic Foundation
Published in

Nomic Foundation

Buidler has evolved: Introducing Hardhat

Mainnet forking, support for multiple compiler versions, Etherscan code verification, and crazy-fast compiling

  • The task runner component, used to extend and customize setups, is now called Hardhat Runner.
  • Buidler EVM, our star development network with console.log and stack traces for Solidity, is now called Hardhat Network.
  • The NPM @nomiclabs/buidler package will go into maintenance mode and stop receiving new features. The new package name is hardhat.
  • All Nomic Labs plugins will start being published under a @nomiclabs/hardhat-<plugin> nomenclature.

Mainnet forking on Hardhat Network

A common task for Ethereum developers is to integrate contracts, dapps, or backend services against on-chain protocols that are difficult to deploy and populate with realistic data. Mainnet forking allows Hardhat Network to pull contract deployments and their state from the live mainnet network to use them locally. Besides the network delay when surgically pulling the data that is needed, it’s functionally identical to having a local copy of mainnet running on Hardhat Network, with all the usual debugging utilities we all love.

Revamped compilation pipeline

The Ethereum software development platform has a unique property around compilation due to its immutable nature. Once a contract is deployed, the compiler version that was used to compile that contract is the compiler that will always be used in the future for this contract. This leads to situations where projects have deployments in older Solidity versions to those they’re currently using in development, or sometimes several existing deployments across different versions. This means project setups that need to run several different compilers. Buidler always supported this use case through sheer flexibility by using multiple configuration files, but this approach has significant limitations. This property of Ethereum is not going anywhere and will only become more recurring as years go by, so we decided to take the hard path and completely rebuild Hardhat’s compilation pipeline to accurately match the inherent properties of the platform. Users should now be able to configure any arbitrarily complex compilation setup, down to the individual file level. Read the compilation guide to learn how to set it up.

Tenderly integration

Etherscan code verification

We released an update to our Etherscan plugin back in September, but I didn’t want to miss the opportunity to mention it again, since it’s such a meaningfully valuable piece of software. The latest release does a lot automatically, as well as simulating the verification process locally to diagnose exactly what’s going wrong. We know first-hand that developers have wasted countless hours dealing with this, but this is no longer necessary. Learn more about it on Github.

Complete list of changes

The list of updates in this release is long (more than 1000 commits went into it!), but the most substantial changes have been listed here. Check out the complete list of what’s new on Github.

New website, Twitter account, and Discord server

It’s time for Hardhat to have its own social media presence, so make sure to follow @HardhatHQ on Twitter to stay up to date on the latest news.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store