-
Notifications
You must be signed in to change notification settings - Fork 99
Update Hardhat Console Docs #1289
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?
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 modernizes the Hardhat contract interaction documentation by replacing the interactive console workflow with a TypeScript helper script approach. This change improves the developer experience for Hardhat 3 users and those using encrypted keystores.
- Replaces interactive console examples with a script-based approach using
box-console.ts - Adds comprehensive error handling and validation for contract addresses
- Updates terminal output examples to reflect the new workflow with keystore password prompts
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
llms-full.txt |
Updates contract interaction section to recommend helper script approach, includes full box-console.ts script and updated terminal output |
llms-files/llms-ethereum-toolkit.txt |
Mirrors the documentation changes from llms-full.txt for consistency |
llms-files/llms-dev-environments.txt |
Mirrors the documentation changes from llms-full.txt for consistency |
builders/ethereum/dev-env/hardhat.md |
Updates main documentation to reference the new box-console.ts script via file includes |
.snippets/code/builders/ethereum/dev-env/hardhat/terminal/run.md |
Removes legacy set-value.js terminal output snippet |
.snippets/code/builders/ethereum/dev-env/hardhat/terminal/interact.md |
Replaces console-based terminal output with box-console.ts script execution output |
.snippets/code/builders/ethereum/dev-env/hardhat/scripts/box-console.ts |
Adds new TypeScript helper script for contract interaction with validation and detailed logging |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.snippets/code/builders/ethereum/dev-env/hardhat/scripts/box-console.ts
Outdated
Show resolved
Hide resolved
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.
Automated style guide suggestions (1-2 of 2)
…onsole.ts Co-authored-by: Copilot <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
0xlukem
left a comment
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.
Sorry, I miss some things to address
.snippets/code/builders/ethereum/dev-env/hardhat/terminal/interact.md
Outdated
Show resolved
Hide resolved
.snippets/code/builders/ethereum/dev-env/hardhat/scripts/box-console.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Lucas Malizia <[email protected]>
Co-authored-by: Lucas Malizia <[email protected]>
…ract.md Co-authored-by: Lucas Malizia <[email protected]>
…onsole.ts Co-authored-by: Lucas Malizia <[email protected]>
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 7 out of 7 changed files in this pull request and generated 6 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 7 out of 7 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.
0xlukem
left a comment
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.
Excellent work, ty! I looked at the whole page, and could you please update the Prerequisites section to add a period in the first sentence and change the snippets to this text/_common/faucet/faucet-sentence.md and text/_common/endpoint-examples.md
I promise this is the last thing haha
Description
This pull request updates the Hardhat contract interaction workflow to recommend using a TypeScript helper script instead of the interactive console, and streamlines the documentation and example outputs accordingly. The changes improve developer experience for Hardhat 3 and keystore usage, and remove legacy examples and scripts.
Documentation and workflow improvements:
builders/ethereum/dev-env/hardhat.mdandllms-files/llms-dev-environments.txtnow recommends using a helper script (box-console.ts) for contract interactions, clarifies the keystore compatibility benefits, and provides a complete example script and output. [1] [2]npx hardhat run --network moonbase scripts/box-console.tsinstead of the Hardhat console, and reflects the new script's output. (terminal/interact.md)Code and example cleanup:
scripts/box-console.tsdemonstrating contract interaction via a TypeScript script, including keystore unlock and transaction confirmation. (scripts/box-console.ts)set-value.js, consolidating all interaction guidance around the new helper script approach. (terminal/run.md)These changes make contract interaction more robust and user-friendly, especially for workflows involving encrypted credentials and Hardhat 3.
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>