hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.

OTHER License

Downloads
1.5M
Stars
7.2K
Committers
373

Bot releases are hidden (Show)

hardhat - Hardhat v2.0.7

Published by fvictorio almost 4 years ago

This release makes console.sol work with solc 0.8.x, but this comes with a small breaking change: the console.logByte function doesn't exist anymore, since the byte type was removed. If you run into this issue, you just need to replace all your calls to logByte with logBytes1.

Besides that, this release adds support for hardhat-shorthand, a new tool we just released. It's an NPM package that installs a globally accessible binary called hh that runs the project's locally installed hardhat and supports shell autocompletion for tasks. Check the guide to learn more.

hh gif

hardhat - Hardhat v2.0.6

Published by fvictorio almost 4 years ago

This PR includes several improvements to Hardhat Network (PRs: #1083, #1086, #1100).

Most of these changes are internal and backward compatible. The exception is #1083, which changes the chainId used by the forked Hardhat Network. Before this version, when you forked the mainnet the chain id used was 1. Now it will use the default chain id (31337). You can change this via the Hardhat Network config.

Besides that, the names of the build info files are now deterministic (#1090).

hardhat - Hardhat v2.0.5

Published by fvictorio almost 4 years ago

This release fixes a couple of issues in Hardhat Network (#1048, #1088) and improves the error messages that are shown when an out of gas error causes a transaction to revert.

hardhat - hardhat-etherscan v2.1.0

Published by fvictorio almost 4 years ago

This release includes a frequently requested feature for this plugin: to minimize the number of source files that are sent to Etherscan for verification.

Now hardhat-etherscan will do its best to only send the file of the contract and its dependencies. It is possible (but unlikely) that this produces a different bytecode than when the whole project is compiled; if that happens, the plugin will detect it and all the files in the project will be used.

Thanks to @kartojal for doing the first steps towards this!

hardhat - hardhat-waffle v2.0.1

Published by fvictorio almost 4 years ago

This release fixes a couple of issues (#1020, #1061) related to some missing chai matchers in our waffle plugin. Notice that this also bumps the peer dependency on ethereum-waffle to at least 3.2.0.

Thanks to @dahifi for working on this!

hardhat - hardhat-ethers v2.0.1

Published by fvictorio almost 4 years ago

This release fixes some issues in the @nomiclabs/hardhat-ethers plugin:

  • The ethers provider works better when hardhat_reset is used (#1015)
  • A bug related to the getContractAt method and linked contracts was fixed (#950)
  • Fixed a problem that caused the plugin to seem to hang when certain errors were triggered (#1037)
hardhat - Hardhat v2.0.4

Published by fvictorio almost 4 years ago

This release changes the cache strategy used by Hardhat: instead of using the modification time, the hash of the content of the involved files is used (PR #1006). This should let you do things like taking advantage of your CI's cache (let us know if you do and if it works!)

Besides that, this release:

  • Adds support for EIP-1898 (PR #948). Thanks @fubhy for this!
  • Fixes a group of issues (#1004, #1005, #990, #1043) related to forking.
  • Adds the mixhash field to returned blocks (issue #1011).
  • Improves error messages when a project cannot be compiled (PR #989).
hardhat - hardhat-etherscan v2.0.1 released

Published by fvictorio almost 4 years ago

This release fixes an issue (https://github.com/nomiclabs/hardhat/issues/941) that caused an out of memory error when verifying contracts in big projects.

hardhat - Hardhat v2.0.3

Published by fvictorio almost 4 years ago

This release fixes several bugs:

hardhat - Hardhat v2.0.2

Published by alcuadrado almost 4 years ago

This release includes two changes:

hardhat - Hardhat v2.0.1

Published by alcuadrado almost 4 years ago

This version of Hardhat includes a fix that prevents the telemetry consent prompt from showing in CI servers (https://github.com/nomiclabs/hardhat/pull/943).

Thanks @fubhy for reporting and fixing this problem.

hardhat - Buidler is now Hardhat 👷‍♂️

Published by alcuadrado almost 4 years ago

We are pleased to announce the release of Hardhat, the new and evolved version of Buidler. This release is a special one for two reasons. Naturally, the first is due to the rebrand. The second reason this release is special is that this new release packs a lot of new functionality.

You can learn more about this release in our announcement. Check out our Migrating from Buidler guide to learn how to start using it in your existing projects, or the Getting started guide to try it out in a fresh project.

Changelog

This is the complete list of changes introduced in Hardhat.

Rebranded the different components

  • Buidler, as a development environment, is now called Hardhat.
  • The task runner component, used to extend and customize setups, is now called Hardhat Runner.
  • Buidler EVM, our development network with console.log and stack traces for Solidity, is now called Hardhat Network.

Package names and versions

  • The @nomiclabs/buidler package is now hardhat.
  • The official Buidler plugins, which used to have package names like @nomiclabs/buidler-<plugin> are now named @nomiclabs/hardhat-<plugin>.
  • All package versions start from 2.0.0. The only exceptions are @nomiclabs/hardhat-ethers and @nomiclabs/hardhat-waffle.
    • Use their 2.0.0 version if you want to use ethers.js v5.
    • Use their 1.0.0 version if you want to use ethers.js v4.

Mainnet forking on Hardhat Network

Hardhat Network can now fork from Mainnet and other live networks, replicating their state without having to sync an entire blockchain. Read the guide to learn how to use it.

Revamped compilation pipeline

Hardhat has a new Solidity compilation pipeline. This includes lots of improvements:

  • Native support for multiple Solidity versions in a single project. Check out the compiling your contracts guide to learn how to set it up.
  • Smarter caching and recompilation, leading to dramatically faster builds
  • Hardhat uses native versions of solc whenever possible, relying on solcjs only as a fallback.
  • You can now customize any setting of solc, not just the optimizer.

Improved ethers.js support

Hardhat comes with better support from ethers.js:

  • The @nomiclabs/hardhat-ethers now offers a native way of linking libraries.
  • The signers returned by ethers.getSigners() have an address property now. No more await signer.getAddress() everywhere.

Both versions of the plugin have received the same improvements. Please, refer to their documentation to learn more.

Improved TypeScript support

Setting up TypeScript in Hardhat is now simpler. All you need to do is install typescript, ts-node and have a hardhat.config.ts that imports your plugins.

There's no need to have a tsconfig.json with special settings. Check our TypeScript guide to learn more.

Other improvements

Hardhat's core

  • Global installations of Hardhat cannot be used anymore, except for initializing a project.
  • The function usePlugin doesn't exist anymore. Plugins are automatically loaded when imported/required.
  • Hardhat supports having multiple contracts with the same name.
  • When reading an artifact, an error will be thrown if there are multiple contracts with the same name (link).
  • The artifacts directory stores artifacts in a nested structure, and it has new files (link).
  • The readArtifact and readArtifactSync functions from hardhat/plugins don't exist anymore. Instead, the hre has an artifacts object to interact with artifacts (link).
  • internalTask is deprecated. Users should use subtask now.
  • The default solc used is now 0.7.3.
  • When configuring accounts, private keys are automatically 0x prefixed when appropriate.
  • type-extensions.d.ts and plugin entries in tsconfig.json#files are no longer needed
  • All the TypeScript types now live under hardhat/types. You shouldn't use deeper modules like hardhat/types/config, unless you are extending an interface.
  • The solc input/output jsons are no longer saved in the cache directory.
  • Hardhat providers are now compatible with EIP1193.
  • The project setup creates a package.json and (optionally) installs the needed dependencies.
  • subtask supports complex types, no need to use stringified objects anymore.
  • Solidity imports and artifacts names are case sensitive now.
  • The hre global variable is now present when running scripts, tests, and tasks.
  • Files can be imported from node_modules using relative paths.
  • There's a new solidity-files-cache.json file in the cache. This file is considered internal and shouldn't be depended upon nor modified.
  • Hardhat collects anonymous data if the user gives its consent.
  • If --network isn't used, the value of args.network is undefined instead of having the value of the default network.
  • tsconfig is now a reserved param (not used at the moment)

Hardhat Network

  • Hardhat Network accounts now can be configured using a mnemonic.
  • Hardhat Network has new RPC methods: hardhat_impersonateAccount, hardhat_stopImpersonatingAccount and hardhat_reset.
  • The value returned by the Hardhat Network for the web3_clientVersion method is now a Hardhat-specific value.
  • Hardhat Network's eth_getStorageAt method now always returns 32 bytes.

Builtin tasks

  • The flatten task can receive a list of files to be flattened.
  • The compile task has a new --quiet flag.
  • The subtasks of the compile task were significantly changed. This can affect you if you were overriding some of them.
  • Better error messages when solc returns an internal compiler error.
  • The clean task has a --global flag, which deletes the Solidity compilers and other global caches.
  • The default hostname of hardhat node is 0.0.0.0 when executed inside a docker container.

Hardhat ether.js plugins

  • hardhat-ethers: contract factories for abstract contracts cannot be created anymore. Use getContractAt if you want to use an abstract interface to interact with a deployed contract.
hardhat - Buidler 1.4.8 released

Published by alcuadrado about 4 years ago

This is a small version that improves the flatten task. It now supports multi-line imports.

hardhat - buidler-ethers v2.0.2 released

Published by alcuadrado about 4 years ago

This version includes a hotfix to an issue that prevented ethers from working with Buidler.

This version temporarily changed how buidler-ethers manages the gas setting in your networks, by substracting 1M from it. If this brings you any problem, you can increase it by 1M, making sure that it won't go beyond the block gas limit. In the case of the buidlerevm network, you can increase the block gas limit.

For more information about these settings, please go to: https://buidler.dev/config/#networks-configuration

hardhat - buidler-ethers v2.0.1

Published by alcuadrado about 4 years ago

This version was deprecated in favor of @nomiclabs/[email protected]

hardhat - buidler-vyper 1.3.4 released

Published by alcuadrado about 4 years ago

This version updates the docker images used for fetching the Vyper compiler.

hardhat - Buidler 1.4.7 released

Published by alcuadrado about 4 years ago

This new version of Buidler extends Buidler EVM's functionality, making it compatible with other tools like Tenderly and The Graph.

It's now possible to run RPC methods using any block number as blockTag. For more info, take a look at #778.

This release will also decrease the number of error messages when using buidler node with MetaMask.

hardhat - Buidler version 1.4.6 released

Published by alcuadrado about 4 years ago

This version of Buidler fixes a bug that prevented Buidler EVM to be properly initialised, and uses a global directory to store solc compilers.

Changelog

  • Improve the derivation of function selectors from the AST (#774)
  • Add global dir module to buidler-core internals (#781)
hardhat - buidler-etherscan 2.1.0 released

Published by fvictorio about 4 years ago

This version adds support for verifying libraries and improves some error messages.

hardhat - Buidler 1.4.5 released

Published by fvictorio about 4 years ago

This version adds better support for monorepos and yarn workspaces (issues #468 and #570) and fixes a bug related to having multiple config files (#737).