-
Notifications
You must be signed in to change notification settings - Fork 99
Hardhat Overhaul #1306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Hardhat Overhaul #1306
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request comprehensively updates the Hardhat documentation to support Hardhat 3 (v3.0.17) and Node.js 22.10.0+, transitioning from CommonJS to ESM syntax and modernizing the development workflow. The changes ensure developers can follow current best practices with the latest versions of these tools while deploying smart contracts to Moonbeam networks.
Key changes:
- Updates all references from Hardhat 2 to Hardhat 3 (v3.0.17) and Node.js from v20 to v22.10.0+
- Migrates all code examples from CommonJS (
require/module.exports) to ESM syntax (import/export default) - Introduces the
@nomicfoundation/hardhat-keystoreplugin for encrypted secrets management - Updates network configuration to use
chainType: "l1"instead of"generic"for Moonbeam networks - Removes obsolete manual Hardhat patching instructions (fix now included in Hardhat 3)
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| builders/ethereum/dev-env/hardhat.md | Main documentation file updated with Hardhat 3 syntax, keystore usage, and correct deployment paths |
| llms-full.txt | Consolidated LLM training data updated with all Hardhat 3 changes |
| llms-files/llms-ethereum-toolkit.txt | Ethereum toolkit LLM data synchronized with main documentation changes |
| llms-files/llms-dev-environments.txt | Development environments LLM data synchronized with main documentation changes |
| .snippets/code/builders/ethereum/dev-env/hardhat/terminal/interact.md | Terminal output updated to show Node.js v22.10.0 |
| .snippets/code/builders/ethereum/dev-env/hardhat/terminal/hardhat-create.md | Terminal output updated to show Hardhat v3.0.17 welcome message |
| .snippets/code/builders/ethereum/dev-env/hardhat/terminal/deploy-moonbase.md | Deployment command updated with correct ignition modules path |
| .snippets/code/builders/ethereum/dev-env/hardhat/terminal/compile.md | Compilation output updated to show Hardhat 3 format with solc 0.8.28 and cancun target |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
As part of the Moonbeam Docs overhaul, we are keeping the Hardhat page so it needed a few updates (in addition to what's here: #1289
This pull request updates the Hardhat documentation and code snippets to reflect best practices and compatibility with Hardhat 3 (current release: 3.0.17), Node.js 22, and modern ESM-based configuration. The changes clarify setup instructions, update code samples to match the latest Hardhat conventions, and improve security and usability by highlighting the encrypted secrets manager and plugin usage.
Hardhat 3 and Node.js 22 updates:
import/export default) and modern Hardhat configuration practices. [1] [2] [3] [4]Project setup and configuration improvements:
npm install --save-dev hardhatandnpx hardhat initfor project initialization, matching Hardhat 3 conventions.@nomicfoundation/hardhat-keystore. [1] [2]type: "http"andchainType: "l1"for Moonbeam networks, and secrets are referenced viaconfigVariable.Security and usability enhancements:
Code and snippet corrections:
hardhat.config.js, supporting both JS and TS templates. [1] [2] F144d007L362R375, [3]Terminal output and snippet updates:
Hardhat 3 and Node.js 22 updates
Project setup and configuration
npm install --save-dev hardhatandnpx hardhat init, and clarified prompts for Hardhat 3 Beta. [1] [2]@nomicfoundation/hardhat-keystore). [1] [2]Security and usability
Code and snippet corrections
Terminal and output updates
Checklist
moonbeam-mkdocsto update redirectsTranslations
Does this PR update a page that also exists on the Chinese docs site? See mapping to confirm.
If Yes, complete the following:
Link to the corresponding CN docs PR: <INSERT_LINK>