Skip to content
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

feat: port the node task to hardhat v3 #6025

Merged
merged 3 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 57 additions & 28 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions v-next/hardhat-errors/src/descriptors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const ERROR_CATEGORIES: {
},
SOLIDITY: { min: 1200, max: 1299, websiteTitle: "Solidity errors" },
VIEM: { min: 1300, max: 1399, websiteTitle: "Hardhat-viem errors" },
NODE: { min: 1400, max: 1499, websiteTitle: "Hardhat node errors" },
};

export const ERRORS = {
Expand Down Expand Up @@ -1248,4 +1249,13 @@ Please check Hardhat's output for more details.`,
"The deployment transaction was mined but its receipt doesn't contain a contract address.",
},
},
NODE: {
INVALID_NETWORK_TYPE: {
number: 1400,
messageTemplate:
"The provided node network type {networkType} for network {networkName} is not recognized, only `edr` is supported.",
websiteTitle: "Invalid node network type",
websiteDescription: `The node only supports the 'edr' network type.`,
},
},
} as const;
2 changes: 2 additions & 0 deletions v-next/hardhat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"@types/debug": "^4.1.4",
"@types/node": "^20.14.9",
"@types/semver": "^7.5.8",
"@types/ws": "^8.5.13",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"eslint": "8.57.0",
Expand Down Expand Up @@ -99,6 +100,7 @@
"semver": "^7.6.3",
"solc": "^0.8.27",
"tsx": "^4.11.0",
"ws": "^8.18.0",
"zod": "^3.23.8"
}
}
3 changes: 3 additions & 0 deletions v-next/hardhat/src/internal/builtin-plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import artifacts from "./artifacts/index.js";
import clean from "./clean/index.js";
import console from "./console/index.js";
import networkManager from "./network-manager/index.js";
import node from "./node/index.js";
import run from "./run/index.js";
import solidity from "./solidity/index.js";
import solidityTest from "./solidity-test/index.js";
Expand All @@ -19,6 +20,7 @@ export type * from "./network-manager/index.js";
export type * from "./clean/index.js";
export type * from "./console/index.js";
export type * from "./run/index.js";
export type * from "./node/index.js";

// This array should be kept in order, respecting the dependencies between the
// plugins.
Expand All @@ -31,4 +33,5 @@ export const builtinPlugins: HardhatPlugin[] = [
clean,
console,
run,
node,
];
Loading
Loading