Skip to content

[NEVER MERGE] Update the plugin for the tutorial#2

Closed
alcuadrado wants to merge 1 commit intomainfrom
tutorial
Closed

[NEVER MERGE] Update the plugin for the tutorial#2
alcuadrado wants to merge 1 commit intomainfrom
tutorial

Conversation

@alcuadrado
Copy link
Member

@alcuadrado alcuadrado commented Sep 15, 2025

I think the plugin is mostly ready for the tutorial, except for its readme.

NOTE: THIS PR SHOULD NEVER BE MERGED, ONLY HERE FOR REVIEWS

@alcuadrado alcuadrado requested a review from Copilot September 15, 2025 22:16
Copy link

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 PR transforms the Hardhat plugin from a simple greeting system to an account management plugin. The plugin now provides functionality to access specific accounts from the available accounts list based on a configurable index.

  • Replaces the greeting configuration with network-level account index configuration
  • Updates tasks to print account information instead of greetings
  • Implements network hooks to populate account information on connections

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/plugin/test/example-tests.ts Comments out all existing tests
packages/plugin/test/config.ts Comments out all existing configuration tests
packages/plugin/src/types.ts Removes greeting-related type definitions
packages/plugin/src/type-extensions.ts Replaces greeting config with account index config for network types
packages/plugin/src/tasks/my-task.ts Removes greeting task implementation
packages/plugin/src/tasks/my-account.ts Adds new task to display account information
packages/plugin/src/index.ts Updates task registration from greeting to account display
packages/plugin/src/hooks/network.ts Implements account selection logic in network connection hook
packages/plugin/src/config.ts Replaces greeting validation/resolution with account index logic
packages/example-project/hardhat.config.ts Updates config to use account index instead of greeting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

return next(context, networkConnection, jsonRpcRequest);
if (accounts.length <= myAccountIndex) {
throw new HardhatPluginError(
`hardhat-plugin-template`, // TODO: This is duplicated
Copy link

Copilot AI Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plugin name 'hardhat-plugin-template' is hardcoded and duplicated. Consider extracting this to a constant or importing from package.json to maintain consistency across the codebase.

Copilot uses AI. Check for mistakes.
Copy link

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 10 out of 10 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@alcuadrado alcuadrado changed the title First commit to the tutorial branch [NEVER MERGE] Update the plugin for the tutorial Sep 15, 2025
@alcuadrado alcuadrado force-pushed the tutorial branch 4 times, most recently from 16e1bd3 to 7842760 Compare September 24, 2025 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants