github NomicFoundation/hardhat hardhat@3.6.0
Hardhat v3.6.0

4 hours ago

This release include some changes to the Solidity hooks, introducing some new ones, and deprecating existing ones, to give Hardhat more opportunities to optimize the build process.

It also includes AGENTS.md/CLAUDE.md files and skills in new projects.

See the full list of changes below.

Changes

  • #8327 dee44f6 Thanks @alcuadrado! - Add a cleanupArtifacts option to SolidityBuildSystem#build. When true, the build system runs cleanupArtifacts against the build's root file paths after a successful build, deleting orphan artifacts and unreachable build-info files for the scope.

  • #8327 dee44f6 Thanks @alcuadrado! - Deprecate the following SolidityHooks: getCompiler, onCleanUpArtifacts, preprocessProjectFileBeforeBuilding, preprocessSolcInputBeforeBuilding, readSourceFile, invokeSolc, and readNpmPackageRemappings. They will be removed in a future release.

    Use processArtifactsAfterSuccessfulBuild instead of onCleanUpArtifacts, and getCompilationJobErrors instead of invokeSolc.

  • #8327 dee44f6 Thanks @alcuadrado! - Add SolidityHooks#getCompilationJobErrors hook, which lets plugins process the compiler output errors of a compilation job before they are reported to the user.

  • #8327 dee44f6 Thanks @alcuadrado! - Add SolidityHooks#processArtifactsAfterSuccessfulBuild hook to let plugins post-process the artifacts. The hook receives the resolved build options as a new exported ResolvedBuildOptions type.

  • #8327 dee44f6 Thanks @alcuadrado! - SolidityBuildSystem#cleanupArtifacts now returns the list of artifact paths that remain after the cleanup.

  • #8335 a4bf547 Thanks @gultekinmakif! - Allow STRING_WITHOUT_DEFAULT and FILE_WITHOUT_DEFAULT as positional arguments

  • #8326 959f2e1 Thanks @kanej! - Fixed hardhat flatten silently producing a misleading output for projects with cyclic Solidity dependencies.

  • #8262 d3ba170 Thanks @fvictorio! - Add AGENTS.md and agentic skills to sample projects

  • Updated dependencies:

    • @nomicfoundation/hardhat-utils@4.1.3
    • @nomicfoundation/hardhat-errors@3.0.14

💡 The Nomic Foundation is hiring! Check our open positions.


Don't miss a new hardhat release

NewReleases is sending notifications on new releases.