Skip to content

Conversation

@themacexpert
Copy link
Contributor

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:

  • The contract interaction section in both builders/ethereum/dev-env/hardhat.md and llms-files/llms-dev-environments.txt now 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]
  • Example terminal output for contract interaction is updated to show usage of npx hardhat run --network moonbase scripts/box-console.ts instead of the Hardhat console, and reflects the new script's output. (terminal/interact.md)

Code and example cleanup:

  • Adds a new example script scripts/box-console.ts demonstrating contract interaction via a TypeScript script, including keystore unlock and transaction confirmation. (scripts/box-console.ts)
  • Removes the legacy script example and terminal output for 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

  • Added a label 🏷️ to this PR
  • Ran my changes through Grammarly
  • Added a disclaimer if required
  • If pages were moved, opened a corresponding PR in moonbeam-mkdocs to update redirects

Translations

Does this PR update a page that also exists on the Chinese docs site? See mapping to confirm.

  • Yes
  • No

If Yes, complete the following:

  • Opened a PR on the Chinese docs repo for the corresponding page
  • Updated images, snippets, or variables if they were moved, renamed, or deleted

Link to the corresponding CN docs PR: <INSERT_LINK>

Copilot AI review requested due to automatic review settings November 18, 2025 23:53
@themacexpert themacexpert added the A2 - Maintenance Minor Pull request contains minor updates to an existing page (i.e., modifying parameters, steps, etc.) label Nov 18, 2025
@themacexpert themacexpert requested a review from a team as a code owner November 18, 2025 23:53
Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

@github-actions github-actions bot left a 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)

themacexpert and others added 4 commits November 19, 2025 10:14
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>
@kapetan3sid kapetan3sid requested a review from 0xlukem November 24, 2025 13:43
@0xlukem 0xlukem added the B1 - Ready to Merge Pull request is ready to be merged label Dec 2, 2025
0xlukem

This comment was marked as outdated.

@0xlukem 0xlukem added B0 - Needs Review Pull request is ready for review and removed B1 - Ready to Merge Pull request is ready to be merged labels Dec 2, 2025
Copy link
Contributor

@0xlukem 0xlukem left a 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

@themacexpert themacexpert mentioned this pull request Dec 3, 2025
8 tasks
Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

Copilot AI left a 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.

@themacexpert themacexpert requested a review from eshaben December 22, 2025 17:38
Copy link
Contributor

@0xlukem 0xlukem left a 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A2 - Maintenance Minor Pull request contains minor updates to an existing page (i.e., modifying parameters, steps, etc.) B0 - Needs Review Pull request is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants