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
dee44f6Thanks @alcuadrado! - Add acleanupArtifactsoption toSolidityBuildSystem#build. Whentrue, the build system runscleanupArtifactsagainst the build's root file paths after a successful build, deleting orphan artifacts and unreachable build-info files for the scope. -
#8327
dee44f6Thanks @alcuadrado! - Deprecate the followingSolidityHooks:getCompiler,onCleanUpArtifacts,preprocessProjectFileBeforeBuilding,preprocessSolcInputBeforeBuilding,readSourceFile,invokeSolc, andreadNpmPackageRemappings. They will be removed in a future release.Use
processArtifactsAfterSuccessfulBuildinstead ofonCleanUpArtifacts, andgetCompilationJobErrorsinstead ofinvokeSolc. -
#8327
dee44f6Thanks @alcuadrado! - AddSolidityHooks#getCompilationJobErrorshook, which lets plugins process the compiler output errors of a compilation job before they are reported to the user. -
#8327
dee44f6Thanks @alcuadrado! - AddSolidityHooks#processArtifactsAfterSuccessfulBuildhook to let plugins post-process the artifacts. The hook receives the resolved build options as a new exportedResolvedBuildOptionstype. -
#8327
dee44f6Thanks @alcuadrado! -SolidityBuildSystem#cleanupArtifactsnow returns the list of artifact paths that remain after the cleanup. -
#8335
a4bf547Thanks @gultekinmakif! - Allow STRING_WITHOUT_DEFAULT and FILE_WITHOUT_DEFAULT as positional arguments -
#8326
959f2e1Thanks @kanej! - Fixedhardhat flattensilently producing a misleading output for projects with cyclic Solidity dependencies. -
#8262
d3ba170Thanks @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.