# @nomicfoundation/hardhat-utils ## 5.2.0 ### Minor Changes - [#8834](https://github.com/NomicFoundation/hardhat/pull/8834) [`1f60b03`](https://github.com/NomicFoundation/hardhat/commit/1f60b034572b424e319f1d22bbb7e58afa4d4066) Thanks [@AliBaig-xD](https://github.com/AliBaig-xD)! - Added a `mode` option to `writeUtf8File` and `writeJsonFile` to set file permissions; the `flag` argument of `writeUtf8File` moved into an options object. ## 5.1.2 ### Patch Changes - [#8748](https://github.com/NomicFoundation/hardhat/pull/8748) [`e2c81c4`](https://github.com/NomicFoundation/hardhat/commit/e2c81c4e8a2ddb951e525f8f91811b7911e5e2e7) Thanks [@ChristopherDedominici](https://github.com/ChristopherDedominici)! - Fixed `encodeAbiParameters` accepting the invalid types `bytes01` to `bytes09` as `bytes1` to `bytes9`. - [#8755](https://github.com/NomicFoundation/hardhat/pull/8755) [`5c2887e`](https://github.com/NomicFoundation/hardhat/commit/5c2887ea05a2881b6196218493183927850c934e) Thanks [@ChristopherDedominici](https://github.com/ChristopherDedominici)! - Made the `kind` argument of `isAbiEncodingError` optional, so it can check for an ABI encoding error of any kind. - [#8748](https://github.com/NomicFoundation/hardhat/pull/8748) [`cd4987c`](https://github.com/NomicFoundation/hardhat/commit/cd4987c947b1ce8f1a5da63b8b8e5f65950a2606) Thanks [@ChristopherDedominici](https://github.com/ChristopherDedominici)! - Added functions to parse human-readable ABI signatures and parameters, and compute their selectors and event topics. - [#8712](https://github.com/NomicFoundation/hardhat/pull/8712) [`665c386`](https://github.com/NomicFoundation/hardhat/commit/665c386fc8f62c77e47d180ef31d41cfef5dc04d) Thanks [@schaable](https://github.com/schaable)! - Improved the reliability of network requests on slow or unstable connections. - [#8838](https://github.com/NomicFoundation/hardhat/pull/8838) [`9d453de`](https://github.com/NomicFoundation/hardhat/commit/9d453de8770f394b966e4592dee22c79fb98f0b2) Thanks [@zjuncal](https://github.com/zjuncal)! - Fixed `setLengthLeft` returning the whole byte array instead of an empty array when truncating to a length of `0`. ## 5.1.1 ### Patch Changes - [#8765](https://github.com/NomicFoundation/hardhat/pull/8765) [`7de90f0`](https://github.com/NomicFoundation/hardhat/commit/7de90f062be9997e68992232a681ba7803766443) Thanks [@schaable](https://github.com/schaable)! - Fixed `hexStringToBytes` converting `0x` and the empty string to a zero byte instead of empty bytes. - [#8757](https://github.com/NomicFoundation/hardhat/pull/8757) [`69ba19b`](https://github.com/NomicFoundation/hardhat/commit/69ba19b9dcd54079758814f7c9f8606fc8490949) Thanks [@fengxueweilai](https://github.com/fengxueweilai)! - Fixed `setLengthLeft` returning the whole hex string instead of `0x` when truncating to a length of `0`. ## 5.1.0 ### Minor Changes - [#8670](https://github.com/NomicFoundation/hardhat/pull/8670) [`dbbf7c0`](https://github.com/NomicFoundation/hardhat/commit/dbbf7c00625f443f75d641872659b027bfffc123) Thanks [@schaable](https://github.com/schaable)! - Added `isPrivateKey` to `@nomicfoundation/hardhat-utils/eth`. - [#8733](https://github.com/NomicFoundation/hardhat/pull/8733) [`9fdef26`](https://github.com/NomicFoundation/hardhat/commit/9fdef2672b2196d11cdbc1cd34d65c8ba7dc0b72) Thanks [@schaable](https://github.com/schaable)! - Added `splitQueryParams` to `@nomicfoundation/hardhat-utils/request`. ## 5.0.0 ### Major Changes - [#8693](https://github.com/NomicFoundation/hardhat/pull/8693) [`98db1b3`](https://github.com/NomicFoundation/hardhat/commit/98db1b30c9471a5f3db6424909b1f2c3bc43e093) Thanks [@schaable](https://github.com/schaable)! - Removed the deprecated `readJsonFileAsStream`, `writeJsonFileAsStream` and `getFileTrueCase`; use `readJsonFile`, `writeLargeJsonFile` and `TrueCasePathResolver` instead. ### Minor Changes - [#8690](https://github.com/NomicFoundation/hardhat/pull/8690) [`0058149`](https://github.com/NomicFoundation/hardhat/commit/0058149a39f2ac9063f140e85a7949bd7e42fff2) Thanks [@schaable](https://github.com/schaable)! - Added `writeLargeJsonFile` and made `readJsonFile` read files of any size, deprecating `writeJsonFileAsStream` and `readJsonFileAsStream`. ### Patch Changes - [#8690](https://github.com/NomicFoundation/hardhat/pull/8690) [`0058149`](https://github.com/NomicFoundation/hardhat/commit/0058149a39f2ac9063f140e85a7949bd7e42fff2) Thanks [@schaable](https://github.com/schaable)! - Sped up compilation by reading and writing solc's output with `JSON.parse` and `JSON.stringify` when memory allows ([#8565](https://github.com/NomicFoundation/hardhat/issues/8565)). - [#8695](https://github.com/NomicFoundation/hardhat/pull/8695) [`38041a8`](https://github.com/NomicFoundation/hardhat/commit/38041a8200553583bbdf228956b48de2edb0cf5a) Thanks [@kanej](https://github.com/kanej)! - Reduced the startup time and memory use of Hardhat commands that make no network request. ## 4.4.0 ### Minor Changes - [#8632](https://github.com/NomicFoundation/hardhat/pull/8632) [`eb2b13d`](https://github.com/NomicFoundation/hardhat/commit/eb2b13da0a4395006e39bc5927403dd21be13b02) Thanks [@schaable](https://github.com/schaable)! - Added an `abi` module with `encodeAbiParameters()` for ABI-encoding values against a list of Solidity parameter types. ### Patch Changes - [#8646](https://github.com/NomicFoundation/hardhat/pull/8646) [`ac45dab`](https://github.com/NomicFoundation/hardhat/commit/ac45dab636432dbe98da5eb2909913dab0e202f5) Thanks [@renovate](https://github.com/apps/renovate)! - Updated the `@streamparser/json-node` dependency to 0.0.26. ## 4.3.0 ### Minor Changes - [#8616](https://github.com/NomicFoundation/hardhat/pull/8616) [`8b73917`](https://github.com/NomicFoundation/hardhat/commit/8b73917cbf830b58c773ea7580d2d30c4fb11b43) Thanks [@rome-xi](https://github.com/rome-xi)! - Fixed invalid `HTTPS_PROXY`/`HTTP_PROXY` values being reported as unexpected errors instead of a Hardhat error. ### Patch Changes - [#8601](https://github.com/NomicFoundation/hardhat/pull/8601) [`34087dd`](https://github.com/NomicFoundation/hardhat/commit/34087dd349e40be5bf4d5dbdce557b23b98cfefd) Thanks [@cdesch](https://github.com/cdesch)! - Improved HTTP proxy support. ## 4.2.0 ### Minor Changes - [#8583](https://github.com/NomicFoundation/hardhat/pull/8583) [`2c98fa5`](https://github.com/NomicFoundation/hardhat/commit/2c98fa5b05c3f2b8d06b44aae4ebea88b82ae132) Thanks [@schaable](https://github.com/schaable)! - Updated undici to v7. - [#8210](https://github.com/NomicFoundation/hardhat/pull/8210) [`024b422`](https://github.com/NomicFoundation/hardhat/commit/024b422340705f1ff5fc14b9dcc6a1f143487d86) Thanks [@renovate](https://github.com/apps/renovate)! - Update the cryptography dependencies to their latest major versions: `@noble/hashes` and `@noble/ciphers` to 2, `ethereum-cryptography` to 3, and `micro-eth-signer` to 0.19. ## 4.1.9 ### Patch Changes - [#8457](https://github.com/NomicFoundation/hardhat/pull/8457) [`48286e0`](https://github.com/NomicFoundation/hardhat/commit/48286e0a69b49d814689073ce9897ac1b007ac19) Thanks [@ChristopherDedominici](https://github.com/ChristopherDedominici)! - Improve compilation speed for Solidity test runs by porting inline configuration parsing to Rust. ## 4.1.8 ### Patch Changes - [#8533](https://github.com/NomicFoundation/hardhat/pull/8533) [`cbe361a`](https://github.com/NomicFoundation/hardhat/commit/cbe361a667804f71fef69e608cf50030221380d2) Thanks [@kanej](https://github.com/kanej)! - Update the `fast-equals` runtime dependency to its latest major version. ## 4.1.7 ### Patch Changes - [#8470](https://github.com/NomicFoundation/hardhat/pull/8470) [`ca29a30`](https://github.com/NomicFoundation/hardhat/commit/ca29a307c7d4b8f7539ea49268a751dfe63a6c72) Thanks [@kanej](https://github.com/kanej)! - Update the `env-paths` runtime dependency to its latest major version. - [#8461](https://github.com/NomicFoundation/hardhat/pull/8461) [`841423a`](https://github.com/NomicFoundation/hardhat/commit/841423a913e25591a83458b39738e3e8aa5b81bc) Thanks [@kanej](https://github.com/kanej)! - Reduce installation warnings with updated dependencies. ## 4.1.6 ### Patch Changes - [#8429](https://github.com/NomicFoundation/hardhat/pull/8429) [`448a980`](https://github.com/NomicFoundation/hardhat/commit/448a9807c962eb02ed81e7ddce2718a0399f2335) Thanks [@marianfe](https://github.com/marianfe)! - Add `detectAgentEnvironment` and `isInteractive` utils ## 4.1.5 ### Patch Changes - [#8414](https://github.com/NomicFoundation/hardhat/pull/8414) [`6ba2bf3`](https://github.com/NomicFoundation/hardhat/commit/6ba2bf38b5d3b7cfd9f081b61dba50503694ce0e) Thanks [@goutamadwant](https://github.com/goutamadwant)! - Fixed Solidity tests failing to run in projects with very large compilation outputs. ## 4.1.4 ### Patch Changes - [#8402](https://github.com/NomicFoundation/hardhat/pull/8402) [`afa9bc4`](https://github.com/NomicFoundation/hardhat/commit/afa9bc44e14563c1fd77440228ef6fbc785774b4) Thanks [@flag4table](https://github.com/flag4table)! - Make `sanitizeFilename` avoid Windows reserved device names while preserving filename extensions. ## 4.1.3 ### Patch Changes - [#8262](https://github.com/NomicFoundation/hardhat/pull/8262) [`d3ba170`](https://github.com/NomicFoundation/hardhat/commit/d3ba17006874715de86194c6a136cd0b7afb9bc4) Thanks [@fvictorio](https://github.com/fvictorio)! - Add symlink functionality - [#8262](https://github.com/NomicFoundation/hardhat/pull/8262) [`d3ba170`](https://github.com/NomicFoundation/hardhat/commit/d3ba17006874715de86194c6a136cd0b7afb9bc4) Thanks [@fvictorio](https://github.com/fvictorio)! - Add AGENTS.md and agentic skills to sample projects ## 4.1.2 ### Patch Changes - [#8264](https://github.com/NomicFoundation/hardhat/pull/8264) [`8452f97`](https://github.com/NomicFoundation/hardhat/commit/8452f9726205540e1684d3f8458bfd145e790226) Thanks [@alcuadrado](https://github.com/alcuadrado)! - Export `./package.json` so consumers can import the package's manifest. ## 4.1.1 ### Patch Changes - [#8228](https://github.com/NomicFoundation/hardhat/pull/8228) [`417bbf9`](https://github.com/NomicFoundation/hardhat/commit/417bbf9f5d8ee4f9e19788aa40571452d36086d2) Thanks [@alcuadrado](https://github.com/alcuadrado)! - Small performance optimizations ## 4.1.0 ### Minor Changes - [#8205](https://github.com/NomicFoundation/hardhat/pull/8205) [`99a4556`](https://github.com/NomicFoundation/hardhat/commit/99a4556698e1d0776951fb160641f5e2529b68ee) Thanks [@alcuadrado](https://github.com/alcuadrado)! - Introduce the SharedPromiseCache synchronization primitive ### Patch Changes - [#8219](https://github.com/NomicFoundation/hardhat/pull/8219) [`2cad309`](https://github.com/NomicFoundation/hardhat/commit/2cad309eb8d35fcc5d2aba5d75a5af4d63d50508) Thanks [@schaable](https://github.com/schaable)! - Improved performance by replacing the semver dependency with a lightweight in-tree implementation. - [#8196](https://github.com/NomicFoundation/hardhat/pull/8196) [`73436aa`](https://github.com/NomicFoundation/hardhat/commit/73436aaa1ddac805f8d855627b5b40ad69cf7d2e) Thanks [@alcuadrado](https://github.com/alcuadrado)! - Export missing error types - [#8207](https://github.com/NomicFoundation/hardhat/pull/8207) [`d594209`](https://github.com/NomicFoundation/hardhat/commit/d59420968bffca83e1ad2712c6881d19cc7e1a99) Thanks [@alcuadrado](https://github.com/alcuadrado)! - Improved performance by replacing the debug logging library with a lightweight in-tree implementation. - [#8189](https://github.com/NomicFoundation/hardhat/pull/8189) [`b5ca1ae`](https://github.com/NomicFoundation/hardhat/commit/b5ca1aee1eb2571ec23f54ac8a9b2c39a90361c6) Thanks [@alcuadrado](https://github.com/alcuadrado)! - Introduce a TrueCasePathResolver class to optimize repeated filesystem casing resolution ## 4.0.5 ### Patch Changes - [#8187](https://github.com/NomicFoundation/hardhat/pull/8187) [`8f6a418`](https://github.com/NomicFoundation/hardhat/commit/8f6a418203e78b699ca1a4d9b498d13a428e71f6) Thanks [@ChristopherDedominici](https://github.com/ChristopherDedominici)! - Improved the logic for handling `Node.js` versions that fall below the minimum requirement. - [#8180](https://github.com/NomicFoundation/hardhat/pull/8180) [`4122faa`](https://github.com/NomicFoundation/hardhat/commit/4122faa3da2b588d83f2c94574f04ae2abd2e723) Thanks [@alcuadrado](https://github.com/alcuadrado)! - Optimize file system traversal helpers ## 4.0.4 ### Patch Changes - [#8179](https://github.com/NomicFoundation/hardhat/pull/8179) [`d16d82a`](https://github.com/NomicFoundation/hardhat/commit/d16d82abfd5c9fa044cb508468cd4b50a5fcfd8a) Thanks [@alcuadrado](https://github.com/alcuadrado)! - Await all returned promises for better debuggability ## 4.0.3 ### Patch Changes - [#8096](https://github.com/NomicFoundation/hardhat/pull/8096) [`7fb721b`](https://github.com/NomicFoundation/hardhat/commit/7fb721bb2b1c521d0073a156f361c60a049e8fdf) Thanks [@alcuadrado](https://github.com/alcuadrado)! - [chore] Move to packages/ folder. - [#8119](https://github.com/NomicFoundation/hardhat/pull/8119) [`ff5a97e`](https://github.com/NomicFoundation/hardhat/commit/ff5a97e32468b0f841dc8a530ba8c2aac91a5c22) Thanks [@schaable](https://github.com/schaable)! - Show proxy chain information in --gas-stats and --gas-stats-json output ## 4.0.2 ### Patch Changes - [#7983](https://github.com/NomicFoundation/hardhat/pull/7983) [`8e194d0`](https://github.com/NomicFoundation/hardhat/commit/8e194d0899bf9a74d9cacf84e289e41ed3966c14) Thanks [@ChristopherDedominici](https://github.com/ChristopherDedominici)! - Added `--verbosity` (and `-v`, `-vv`, and the other shorthands) to all tasks, including TypeScript tests ([7983](https://github.com/NomicFoundation/hardhat/pull/7983)), ([7963](https://github.com/NomicFoundation/hardhat/issues/7963)). - [#8073](https://github.com/NomicFoundation/hardhat/pull/8073) [`dfe4ffe`](https://github.com/NomicFoundation/hardhat/commit/dfe4ffeb57b97419ae0cca8929c9bd9c25912dbe) Thanks [@schaable](https://github.com/schaable)! - Add support for per-test inline configuration in solidity tests. - [#8088](https://github.com/NomicFoundation/hardhat/pull/8088) [`23c0d36`](https://github.com/NomicFoundation/hardhat/commit/23c0d3658f29305bf0adbbce4644a54d7ef22550) Thanks [@alcuadrado](https://github.com/alcuadrado)! - Optimize imports. ## 4.0.1 ### Patch Changes - 01b41ee: Added support for function gas snapshots and snapshot cheatcodes in Solidity tests with `--snapshot` and `--snapshot-check` flags ([#7769](https://github.com/NomicFoundation/hardhat/issues/7769)) ## 4.0.0 ### Major Changes - 87623db: Introduce new inter-process mutex implementation ([7942](https://github.com/NomicFoundation/hardhat/pull/7942)). - 726ff37: Update the `--coverage` table output to match the style used by `--gas-stats`. Thanks @jose-blockchain! ([#7733](https://github.com/NomicFoundation/hardhat/issues/7733)) ### Patch Changes - 87623db: Fix two issues in the `download` function ([7942](https://github.com/NomicFoundation/hardhat/pull/7942)). ## 3.0.6 ### Patch Changes - 2bc18b2: Bumped `viem` version across all packages [7861](https://github.com/NomicFoundation/hardhat/pull/7861). ## 3.0.5 ### Patch Changes - d45234d: Fixed Etherscan verification failures by removing hardcoded v1 API URLs from chain descriptors ([#7623](https://github.com/NomicFoundation/hardhat/issues/7623)). Also enhanced config resolution to support partial overrides in block explorer configurations for future extensibility. ## 3.0.4 ### Patch Changes - d1969e7: Added support for showing gas statistics after running nodejs tests ([#7472](https://github.com/NomicFoundation/hardhat/issues/7428)). ## 3.0.3 ### Patch Changes - d821a0a: Fix npm artifact cleanup on windows ([#7459](https://github.com/NomicFoundation/hardhat/issues/7459)) - b13620a: Add compilation progress spinner to show build progress ([#7460](https://github.com/NomicFoundation/hardhat/pull/7460)) ## 3.0.2 ### Patch Changes - 8c1cb1e: Fixed peer dependencies for Hardhat so `rpc` utils can be loaded ([#7415](https://github.com/NomicFoundation/hardhat/issues/7415)) ## 3.0.1 ### Patch Changes - 49cc9ba: Load resolved global options into environment variables during tests ([#7305](https://github.com/NomicFoundation/hardhat/pull/7305)) - 8d3b16c: Support for custom compilers ([#7130](https://github.com/NomicFoundation/hardhat/issues/7130)) - a475780: Added automatic proxy detection for `hardhat-verify` and fixed case-insensitive proxy environment variables for network requests ([#7407](https://github.com/NomicFoundation/hardhat/pull/7407)) ## 3.0.0 ### Major Changes - 29cc141: First release of Hardhat 3!