Skip to content

Commit

Permalink
Merge pull request #6025 from NomicFoundation/feat/v-next-node
Browse files Browse the repository at this point in the history
feat: port the node task to hardhat v3
  • Loading branch information
galargh authored Dec 18, 2024
2 parents 2c3614d + 5b91fdb commit 4aade7e
Show file tree
Hide file tree
Showing 11 changed files with 737 additions and 28 deletions.
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

0 comments on commit 4aade7e

Please sign in to comment.