hardhat 3.1.9 → 3.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/src/config.d.ts +20 -0
  3. package/dist/src/config.d.ts.map +1 -1
  4. package/dist/src/config.js +31 -0
  5. package/dist/src/config.js.map +1 -1
  6. package/dist/src/internal/builtin-plugins/coverage/coverage-manager.d.ts.map +1 -1
  7. package/dist/src/internal/builtin-plugins/coverage/coverage-manager.js +33 -21
  8. package/dist/src/internal/builtin-plugins/coverage/coverage-manager.js.map +1 -1
  9. package/dist/src/internal/builtin-plugins/flatten/task-action.d.ts.map +1 -1
  10. package/dist/src/internal/builtin-plugins/flatten/task-action.js +1 -1
  11. package/dist/src/internal/builtin-plugins/flatten/task-action.js.map +1 -1
  12. package/dist/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.js +2 -2
  13. package/dist/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.js.map +1 -1
  14. package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/config.d.ts.map +1 -1
  15. package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/config.js +58 -20
  16. package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/config.js.map +1 -1
  17. package/dist/src/internal/builtin-plugins/network-manager/type-validation.d.ts.map +1 -1
  18. package/dist/src/internal/builtin-plugins/network-manager/type-validation.js +8 -0
  19. package/dist/src/internal/builtin-plugins/network-manager/type-validation.js.map +1 -1
  20. package/dist/src/internal/builtin-plugins/node/task-action.d.ts.map +1 -1
  21. package/dist/src/internal/builtin-plugins/node/task-action.js +1 -2
  22. package/dist/src/internal/builtin-plugins/node/task-action.js.map +1 -1
  23. package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.d.ts.map +1 -1
  24. package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js +1 -1
  25. package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js.map +1 -1
  26. package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.d.ts +0 -3
  27. package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.d.ts.map +1 -1
  28. package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.js +3 -5
  29. package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.js.map +1 -1
  30. package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.d.ts +2 -1
  31. package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.d.ts.map +1 -1
  32. package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.js +4 -2
  33. package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.js.map +1 -1
  34. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.d.ts +3 -1
  35. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.d.ts.map +1 -1
  36. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.js +8 -2
  37. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.js.map +1 -1
  38. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/error-messages.d.ts.map +1 -1
  39. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/error-messages.js +19 -5
  40. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/error-messages.js.map +1 -1
  41. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.d.ts +8 -1
  42. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.d.ts.map +1 -1
  43. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.js +54 -20
  44. package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.js.map +1 -1
  45. package/dist/src/internal/builtin-plugins/solidity/type-extensions.d.ts +22 -0
  46. package/dist/src/internal/builtin-plugins/solidity/type-extensions.d.ts.map +1 -1
  47. package/dist/src/internal/builtin-plugins/solidity-test/config.d.ts.map +1 -1
  48. package/dist/src/internal/builtin-plugins/solidity-test/config.js +1 -0
  49. package/dist/src/internal/builtin-plugins/solidity-test/config.js.map +1 -1
  50. package/dist/src/internal/builtin-plugins/solidity-test/type-extensions.d.ts +1 -0
  51. package/dist/src/internal/builtin-plugins/solidity-test/type-extensions.d.ts.map +1 -1
  52. package/dist/src/internal/cli/error-handler.d.ts.map +1 -1
  53. package/dist/src/internal/cli/error-handler.js +15 -0
  54. package/dist/src/internal/cli/error-handler.js.map +1 -1
  55. package/dist/src/internal/cli/telemetry/sentry/reporter.d.ts.map +1 -1
  56. package/dist/src/internal/cli/telemetry/sentry/reporter.js +4 -0
  57. package/dist/src/internal/cli/telemetry/sentry/reporter.js.map +1 -1
  58. package/dist/src/internal/core/config-validation.d.ts +3 -3
  59. package/dist/src/internal/core/config-validation.d.ts.map +1 -1
  60. package/dist/src/internal/core/config-validation.js +48 -18
  61. package/dist/src/internal/core/config-validation.js.map +1 -1
  62. package/dist/src/internal/core/tasks/builders.d.ts +26 -16
  63. package/dist/src/internal/core/tasks/builders.d.ts.map +1 -1
  64. package/dist/src/internal/core/tasks/builders.js +65 -6
  65. package/dist/src/internal/core/tasks/builders.js.map +1 -1
  66. package/dist/src/internal/core/tasks/resolved-task.d.ts +2 -2
  67. package/dist/src/internal/core/tasks/resolved-task.d.ts.map +1 -1
  68. package/dist/src/internal/core/tasks/resolved-task.js +23 -9
  69. package/dist/src/internal/core/tasks/resolved-task.js.map +1 -1
  70. package/dist/src/internal/core/tasks/task-manager.d.ts.map +1 -1
  71. package/dist/src/internal/core/tasks/task-manager.js +14 -6
  72. package/dist/src/internal/core/tasks/task-manager.js.map +1 -1
  73. package/dist/src/internal/core/tasks/validations.d.ts +2 -0
  74. package/dist/src/internal/core/tasks/validations.d.ts.map +1 -1
  75. package/dist/src/internal/core/tasks/validations.js +11 -0
  76. package/dist/src/internal/core/tasks/validations.js.map +1 -1
  77. package/dist/src/internal/deprecated-module-imported-from-hardhat2-plugin.d.ts +2 -0
  78. package/dist/src/internal/deprecated-module-imported-from-hardhat2-plugin.d.ts.map +1 -0
  79. package/dist/src/internal/deprecated-module-imported-from-hardhat2-plugin.js +12 -0
  80. package/dist/src/internal/deprecated-module-imported-from-hardhat2-plugin.js.map +1 -0
  81. package/dist/src/internal/using-hardhat2-plugin-errors.d.ts +35 -0
  82. package/dist/src/internal/using-hardhat2-plugin-errors.d.ts.map +1 -0
  83. package/dist/src/internal/using-hardhat2-plugin-errors.js +98 -0
  84. package/dist/src/internal/using-hardhat2-plugin-errors.js.map +1 -0
  85. package/dist/src/plugins.d.ts +8 -0
  86. package/dist/src/plugins.d.ts.map +1 -1
  87. package/dist/src/plugins.js +13 -0
  88. package/dist/src/plugins.js.map +1 -1
  89. package/dist/src/types/index.d.ts +15 -0
  90. package/dist/src/types/index.d.ts.map +1 -0
  91. package/dist/src/types/index.js +15 -0
  92. package/dist/src/types/index.js.map +1 -0
  93. package/dist/src/types/plugins.d.ts +2 -2
  94. package/dist/src/types/solidity/errors.d.ts +18 -0
  95. package/dist/src/types/solidity/errors.d.ts.map +1 -1
  96. package/dist/src/types/solidity/errors.js.map +1 -1
  97. package/dist/src/types/tasks.d.ts +95 -34
  98. package/dist/src/types/tasks.d.ts.map +1 -1
  99. package/package.json +10 -6
  100. package/src/config.ts +37 -0
  101. package/src/internal/builtin-plugins/coverage/coverage-manager.ts +57 -50
  102. package/src/internal/builtin-plugins/flatten/task-action.ts +1 -0
  103. package/src/internal/builtin-plugins/gas-analytics/gas-analytics-manager.ts +4 -4
  104. package/src/internal/builtin-plugins/network-manager/hook-handlers/config.ts +65 -21
  105. package/src/internal/builtin-plugins/network-manager/type-validation.ts +9 -0
  106. package/src/internal/builtin-plugins/node/task-action.ts +2 -2
  107. package/src/internal/builtin-plugins/solidity/build-system/build-system.ts +1 -0
  108. package/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.ts +7 -6
  109. package/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.ts +23 -1
  110. package/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.ts +16 -2
  111. package/src/internal/builtin-plugins/solidity/build-system/resolver/error-messages.ts +19 -5
  112. package/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.ts +103 -29
  113. package/src/internal/builtin-plugins/solidity/type-extensions.ts +28 -0
  114. package/src/internal/builtin-plugins/solidity-test/config.ts +1 -0
  115. package/src/internal/builtin-plugins/solidity-test/type-extensions.ts +1 -0
  116. package/src/internal/cli/error-handler.ts +18 -0
  117. package/src/internal/cli/telemetry/sentry/reporter.ts +5 -0
  118. package/src/internal/core/config-validation.ts +67 -18
  119. package/src/internal/core/tasks/builders.ts +174 -30
  120. package/src/internal/core/tasks/resolved-task.ts +31 -13
  121. package/src/internal/core/tasks/task-manager.ts +23 -5
  122. package/src/internal/core/tasks/validations.ts +40 -0
  123. package/src/internal/deprecated-module-imported-from-hardhat2-plugin.ts +12 -0
  124. package/src/internal/using-hardhat2-plugin-errors.ts +108 -0
  125. package/src/plugins.ts +16 -0
  126. package/src/types/index.ts +14 -0
  127. package/src/types/plugins.ts +2 -2
  128. package/src/types/solidity/errors.ts +22 -0
  129. package/src/types/tasks.ts +133 -36
  130. package/templates/hardhat-3/01-node-test-runner-viem/package.json +10 -10
  131. package/templates/hardhat-3/02-mocha-ethers/package.json +16 -16
  132. package/templates/hardhat-3/03-minimal/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tasks.d.ts","sourceRoot":"","sources":["../../../src/types/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,uBAAuB,EACvB,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAK1D,OAAO,QAAQ,UAAU,CAAC;IACxB,UAAiB,yBAAyB;QACxC,QAAQ,CAAC,KAAK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E,IAAI,CAAC,CAAC;IAE5B;;OAEG;IACH,GAAG,CAAC,aAAa,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;CAClD;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,SAAS,IAAI,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACnC;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;CAC1C;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,MAAM,OAAO,CAAC;IAC9C,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hardhat",
3
- "version": "3.1.9",
3
+ "version": "3.1.10",
4
4
  "description": "Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.",
5
5
  "homepage": "https://github.com/nomicfoundation/hardhat/tree/v-next/v-next/hardhat",
6
6
  "repository": {
@@ -21,6 +21,7 @@
21
21
  "./hre": "./dist/src/hre.js",
22
22
  "./plugins": "./dist/src/plugins.js",
23
23
  "./internal/lsp-helpers": "./dist/src/lsp-helpers.js",
24
+ "./types": "./dist/src/types/index.js",
24
25
  "./types/arguments": "./dist/src/types/arguments.js",
25
26
  "./types/artifacts": "./dist/src/types/artifacts.js",
26
27
  "./types/config": "./dist/src/types/config.js",
@@ -38,7 +39,10 @@
38
39
  "./console.sol": "./console.sol",
39
40
  "./internal/coverage": "./dist/src/internal/builtin-plugins/coverage/exports.js",
40
41
  "./internal/gas-analytics": "./dist/src/internal/builtin-plugins/gas-analytics/exports.js",
41
- "./utils/contract-names": "./dist/src/utils/contract-names.js"
42
+ "./utils/contract-names": "./dist/src/utils/contract-names.js",
43
+ "./types/runtime": "./dist/src/internal/deprecated-module-imported-from-hardhat2-plugin.js",
44
+ "./builtin-tasks/task-names": "./dist/src/internal/deprecated-module-imported-from-hardhat2-plugin.js",
45
+ "./internal/artifacts": "./dist/src/internal/deprecated-module-imported-from-hardhat2-plugin.js"
42
46
  },
43
47
  "keywords": [
44
48
  "ethereum",
@@ -68,14 +72,14 @@
68
72
  "prettier": "3.2.5",
69
73
  "rimraf": "^5.0.5",
70
74
  "typescript": "~5.8.0",
71
- "@nomicfoundation/hardhat-test-utils": "^2.0.1"
75
+ "@nomicfoundation/hardhat-test-utils": "^2.0.2"
72
76
  },
73
77
  "dependencies": {
74
78
  "@nomicfoundation/edr": "0.12.0-next.24",
75
- "@nomicfoundation/hardhat-errors": "^3.0.6",
76
- "@nomicfoundation/hardhat-utils": "^3.0.6",
79
+ "@nomicfoundation/hardhat-errors": "^3.0.7",
80
+ "@nomicfoundation/hardhat-utils": "^4.0.0",
77
81
  "@nomicfoundation/hardhat-vendored": "^3.0.1",
78
- "@nomicfoundation/hardhat-zod-utils": "^3.0.1",
82
+ "@nomicfoundation/hardhat-zod-utils": "^3.0.2",
79
83
  "@nomicfoundation/solidity-analyzer": "^0.1.1",
80
84
  "@sentry/core": "^9.4.0",
81
85
  "adm-zip": "^0.4.16",
package/src/config.ts CHANGED
@@ -8,6 +8,8 @@ export type { HardhatUserConfig } from "./types/config.js";
8
8
  import "./internal/builtin-plugins/index.js";
9
9
  import type { HardhatUserConfig } from "./types/config.js";
10
10
 
11
+ import { throwUsingHardhat2PluginError } from "./internal/using-hardhat2-plugin-errors.js";
12
+
11
13
  /**
12
14
  * Defines a Hardhat user config.
13
15
  *
@@ -38,3 +40,38 @@ export function defineConfig(config: HardhatUserConfig): HardhatUserConfig {
38
40
  // use it and have a better user experience.
39
41
  return config;
40
42
  }
43
+
44
+ /**
45
+ * @deprecated This function is part of the Hardhat 2 plugin API.
46
+ */
47
+ export function extendConfig(..._args: any): any {
48
+ throwUsingHardhat2PluginError();
49
+ }
50
+
51
+ /**
52
+ * @deprecated This function is part of the Hardhat 2 plugin API.
53
+ */
54
+ export function extendEnvironment(..._args: any): any {
55
+ throwUsingHardhat2PluginError();
56
+ }
57
+
58
+ /**
59
+ * @deprecated This function is part of the Hardhat 2 plugin API.
60
+ */
61
+ export function extendProvider(..._args: any): any {
62
+ throwUsingHardhat2PluginError();
63
+ }
64
+
65
+ /**
66
+ * @deprecated This function is part of the Hardhat 2 plugin API.
67
+ */
68
+ export function scope(..._args: any): any {
69
+ throwUsingHardhat2PluginError();
70
+ }
71
+
72
+ /**
73
+ * @deprecated This function is part of the Hardhat 2 plugin API.
74
+ */
75
+ export function subtask(..._args: any): any {
76
+ throwUsingHardhat2PluginError();
77
+ }
@@ -8,7 +8,7 @@ import type { TableItem } from "@nomicfoundation/hardhat-utils/format";
8
8
 
9
9
  import path from "node:path";
10
10
 
11
- import { divider, formatTable } from "@nomicfoundation/hardhat-utils/format";
11
+ import { formatTable } from "@nomicfoundation/hardhat-utils/format";
12
12
  import {
13
13
  ensureDir,
14
14
  getAllFilesMatching,
@@ -433,55 +433,60 @@ export class CoverageManagerImplementation implements CoverageManager {
433
433
 
434
434
  const rows: TableItem[] = [];
435
435
 
436
- rows.push([chalk.bold("Coverage Report")]);
437
- rows.push(divider);
436
+ rows.push({
437
+ type: "title",
438
+ text: chalk.bold("Coverage Report"),
439
+ });
438
440
 
439
- rows.push(
440
- ["File Path", "Line %", "Statement %", "Uncovered Lines"].map((s) =>
441
- chalk.yellow(s),
441
+ rows.push({
442
+ type: "section-header",
443
+ text: chalk.bold("File Coverage"),
444
+ });
445
+
446
+ rows.push({
447
+ type: "header",
448
+ cells: ["File Path", "Line %", "Statement %", "Uncovered Lines"].map(
449
+ (s) => chalk.yellow(s),
442
450
  ),
443
- );
451
+ });
444
452
 
445
- const bodyRows = Object.entries(report).map(
446
- ([
447
- relativePath,
448
- {
449
- executedStatementsCount,
450
- unexecutedStatementsCount,
451
- lineExecutionCounts,
452
- executedLinesCount,
453
- unexecutedLines,
454
- },
455
- ]) => {
456
- const lineCoverage =
457
- lineExecutionCounts.size === 0
458
- ? 0
459
- : (executedLinesCount * 100.0) / lineExecutionCounts.size;
460
- const statementCoverage =
461
- executedStatementsCount === 0
462
- ? 0
463
- : (executedStatementsCount * 100.0) /
464
- (executedStatementsCount + unexecutedStatementsCount);
465
-
466
- totalExecutedLines += executedLinesCount;
467
- totalExecutableLines += lineExecutionCounts.size;
468
-
469
- totalExecutedStatements += executedStatementsCount;
470
- totalExecutableStatements +=
471
- executedStatementsCount + unexecutedStatementsCount;
472
-
473
- const row: string[] = [
453
+ for (const [
454
+ relativePath,
455
+ {
456
+ executedStatementsCount,
457
+ unexecutedStatementsCount,
458
+ lineExecutionCounts,
459
+ executedLinesCount,
460
+ unexecutedLines,
461
+ },
462
+ ] of Object.entries(report)) {
463
+ const lineCoverage =
464
+ lineExecutionCounts.size === 0
465
+ ? 0
466
+ : (executedLinesCount * 100.0) / lineExecutionCounts.size;
467
+ const statementCoverage =
468
+ executedStatementsCount === 0
469
+ ? 0
470
+ : (executedStatementsCount * 100.0) /
471
+ (executedStatementsCount + unexecutedStatementsCount);
472
+
473
+ totalExecutedLines += executedLinesCount;
474
+ totalExecutableLines += lineExecutionCounts.size;
475
+
476
+ totalExecutedStatements += executedStatementsCount;
477
+ totalExecutableStatements +=
478
+ executedStatementsCount + unexecutedStatementsCount;
479
+
480
+ rows.push({
481
+ type: "row",
482
+ cells: [
474
483
  this.formatRelativePath(relativePath),
475
484
  this.formatCoverage(lineCoverage),
476
485
  this.formatCoverage(statementCoverage),
477
486
  this.formatLines(unexecutedLines),
478
- ];
479
-
480
- return row;
481
- },
482
- );
483
-
484
- rows.push(...bodyRows);
487
+ ],
488
+ });
489
+ }
485
490
 
486
491
  const totalLineCoverage =
487
492
  totalExecutableLines === 0
@@ -492,13 +497,15 @@ export class CoverageManagerImplementation implements CoverageManager {
492
497
  ? 0
493
498
  : (totalExecutedStatements * 100.0) / totalExecutableStatements;
494
499
 
495
- rows.push(divider);
496
- rows.push([
497
- chalk.yellow("Total"),
498
- this.formatCoverage(totalLineCoverage),
499
- this.formatCoverage(totalStatementCoverage),
500
- "",
501
- ]);
500
+ rows.push({
501
+ type: "header",
502
+ cells: [
503
+ chalk.yellow("Total"),
504
+ this.formatCoverage(totalLineCoverage),
505
+ this.formatCoverage(totalStatementCoverage),
506
+ "",
507
+ ],
508
+ });
502
509
 
503
510
  return formatTable(rows);
504
511
  }
@@ -64,6 +64,7 @@ const flattenAction: NewTaskActionFunction<FlattenActionArguments> = async (
64
64
  rootPaths.toSorted(), // We sort them to have a deterministic order
65
65
  config.paths.root,
66
66
  readSourceFileFactory(hooks),
67
+ hooks,
67
68
  );
68
69
 
69
70
  let flattened = "";
@@ -1,10 +1,10 @@
1
1
  import type { GasAnalyticsManager, GasMeasurement } from "./types.js";
2
- import type { TableItemV2 } from "@nomicfoundation/hardhat-utils/format";
2
+ import type { TableItem } from "@nomicfoundation/hardhat-utils/format";
3
3
 
4
4
  import crypto from "node:crypto";
5
5
  import path from "node:path";
6
6
 
7
- import { formatTableV2 } from "@nomicfoundation/hardhat-utils/format";
7
+ import { formatTable } from "@nomicfoundation/hardhat-utils/format";
8
8
  import {
9
9
  ensureDir,
10
10
  getAllFilesMatching,
@@ -209,7 +209,7 @@ export class GasAnalyticsManagerImplementation implements GasAnalyticsManager {
209
209
  public _generateGasStatsReport(
210
210
  gasStatsByContract: GasStatsByContract,
211
211
  ): string {
212
- const rows: TableItemV2[] = [];
212
+ const rows: TableItem[] = [];
213
213
 
214
214
  if (gasStatsByContract.size > 0) {
215
215
  rows.push({ type: "title", text: chalk.bold("Gas Usage Statistics") });
@@ -279,7 +279,7 @@ export class GasAnalyticsManagerImplementation implements GasAnalyticsManager {
279
279
  }
280
280
  }
281
281
 
282
- return formatTableV2(rows);
282
+ return formatTable(rows);
283
283
  }
284
284
  }
285
285
 
@@ -38,33 +38,77 @@ export async function extendUserConfig(
38
38
  const networks: Record<string, NetworkUserConfig> =
39
39
  extendedConfig.networks ?? {};
40
40
 
41
- const localhostConfig: Omit<HttpNetworkUserConfig, "url"> = {
42
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- This is always http
43
- ...(networks.localhost as HttpNetworkUserConfig),
44
- };
41
+ const localhostConfig: NetworkUserConfig | undefined = networks.localhost;
42
+ const defaultConfig: NetworkUserConfig | undefined = networks.default;
43
+ const nodeConfig: NetworkUserConfig | undefined = networks.node;
45
44
 
46
- const defaultConfig: Partial<EdrNetworkUserConfig> = {
47
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- This is always edr
48
- ...(networks.default as EdrNetworkUserConfig),
49
- };
45
+ let extendedLocalhostConfig: NetworkUserConfig;
46
+ if (
47
+ localhostConfig === undefined ||
48
+ localhostConfig.type === undefined ||
49
+ localhostConfig.type === "http"
50
+ ) {
51
+ extendedLocalhostConfig = {
52
+ url: "http://localhost:8545",
53
+ type: "http",
54
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions
55
+ -- We cast it here because otherwise TS complains that some fields are
56
+ always overwritten, which is not true for js incomplete configs. */
57
+ ...(localhostConfig as Partial<HttpNetworkUserConfig>),
58
+ };
59
+ } else {
60
+ extendedLocalhostConfig = localhostConfig;
61
+ }
62
+
63
+ const defaultEdrNetworkConfigValues = {
64
+ chainId: 31337,
65
+ gas: "auto",
66
+ gasMultiplier: 1,
67
+ gasPrice: "auto",
68
+ type: "edr-simulated",
69
+ } as const;
70
+
71
+ let extendedDefaultConfig: NetworkUserConfig;
72
+ if (
73
+ defaultConfig === undefined ||
74
+ defaultConfig.type === undefined ||
75
+ defaultConfig.type === "edr-simulated"
76
+ ) {
77
+ extendedDefaultConfig = {
78
+ ...defaultEdrNetworkConfigValues,
79
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions
80
+ -- We cast it here because otherwise TS complains that some fields are
81
+ always overwritten, which is not true for js incomplete configs. */
82
+ ...(defaultConfig as Partial<EdrNetworkUserConfig>),
83
+ };
84
+ } else {
85
+ extendedDefaultConfig = defaultConfig;
86
+ }
87
+
88
+ let extendedNodeConfig: NetworkUserConfig;
89
+ if (
90
+ nodeConfig === undefined ||
91
+ nodeConfig.type === undefined ||
92
+ nodeConfig.type === "edr-simulated"
93
+ ) {
94
+ extendedNodeConfig = {
95
+ ...defaultEdrNetworkConfigValues,
96
+ /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions
97
+ -- We cast it here because otherwise TS complains that url and http will
98
+ be always overwritten, which is not true for js incomplete configs. */
99
+ ...(nodeConfig as Partial<EdrNetworkUserConfig>),
100
+ };
101
+ } else {
102
+ extendedNodeConfig = nodeConfig;
103
+ }
50
104
 
51
105
  return {
52
106
  ...extendedConfig,
53
107
  networks: {
54
108
  ...networks,
55
- localhost: {
56
- url: "http://localhost:8545",
57
- ...localhostConfig,
58
- type: "http",
59
- },
60
- [DEFAULT_NETWORK_NAME]: {
61
- chainId: 31337,
62
- gas: "auto",
63
- gasMultiplier: 1,
64
- gasPrice: "auto",
65
- ...defaultConfig,
66
- type: "edr-simulated",
67
- },
109
+ localhost: extendedLocalhostConfig,
110
+ [DEFAULT_NETWORK_NAME]: extendedDefaultConfig,
111
+ node: extendedNodeConfig,
68
112
  },
69
113
  };
70
114
  }
@@ -344,6 +344,15 @@ function refineEdrNetworkUserConfig(
344
344
  { defaultChainType = GENERIC_CHAIN_TYPE, networks = {} }: HardhatUserConfig,
345
345
  ctx: RefinementCtx,
346
346
  ): void {
347
+ const nodeNetwork = networks.node;
348
+ if (nodeNetwork !== undefined && nodeNetwork.type !== "edr-simulated") {
349
+ ctx.addIssue({
350
+ code: z.ZodIssueCode.custom,
351
+ path: ["networks", "node", "type"],
352
+ message: "The node network type must be 'edr-simulated'",
353
+ });
354
+ }
355
+
347
356
  for (const [networkName, network] of Object.entries(networks)) {
348
357
  if (network.type === "edr-simulated") {
349
358
  const { chainType, hardfork, minGasPrice, initialBaseFeePerGas } =
@@ -12,7 +12,6 @@ import { ensureDir, exists } from "@nomicfoundation/hardhat-utils/fs";
12
12
  import chalk from "chalk";
13
13
  import debug from "debug";
14
14
 
15
- import { DEFAULT_NETWORK_NAME } from "../../constants.js";
16
15
  import { isSupportedChainType } from "../../edr/chain-type.js";
17
16
  import { BUILD_INFO_DIR_NAME } from "../artifacts/artifact-manager.js";
18
17
  import { EdrProvider } from "../network-manager/edr/edr-provider.js";
@@ -42,7 +41,7 @@ const nodeAction: NewTaskActionFunction<NodeActionArguments> = async (
42
41
  const network =
43
42
  hre.globalOptions.network !== undefined
44
43
  ? hre.globalOptions.network
45
- : DEFAULT_NETWORK_NAME;
44
+ : "node";
46
45
 
47
46
  if (!(network in hre.config.networks)) {
48
47
  throw new HardhatError(HardhatError.ERRORS.CORE.NETWORK.NETWORK_NOT_FOUND, {
@@ -64,6 +63,7 @@ const nodeAction: NewTaskActionFunction<NodeActionArguments> = async (
64
63
  } = {
65
64
  network,
66
65
  };
66
+
67
67
  // NOTE: We create an empty network config override here. We add to it based
68
68
  // on the result of arguments parsing. We can expand the list of arguments
69
69
  // as much as needed.
@@ -418,6 +418,7 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
418
418
  rootFilePaths.toSorted(), // We sort them to have a deterministic order
419
419
  this.#options.projectRoot,
420
420
  readSourceFileFactory(this.#hooks),
421
+ this.#hooks,
421
422
  );
422
423
 
423
424
  const { buildProfileName, buildProfile } = this.#getBuildProfile(
@@ -152,12 +152,8 @@ export class CompilerDownloaderImplementation implements CompilerDownloader {
152
152
  readonly #platform: CompilerPlatform;
153
153
  readonly #compilersDir: string;
154
154
  readonly #downloadFunction: typeof download;
155
+ readonly #mutexCompilerList: MultiProcessMutex;
155
156
 
156
- readonly #mutexCompilerList = new MultiProcessMutex("compiler-download-list");
157
-
158
- /**
159
- * Use CompilerDownloader.getConcurrencySafeDownloader instead
160
- */
161
157
  constructor(
162
158
  platform: CompilerPlatform,
163
159
  compilersDir: string,
@@ -165,6 +161,9 @@ export class CompilerDownloaderImplementation implements CompilerDownloader {
165
161
  ) {
166
162
  this.#platform = platform;
167
163
  this.#compilersDir = compilersDir;
164
+ this.#mutexCompilerList = new MultiProcessMutex(
165
+ path.join(compilersDir, "compiler-download-list"),
166
+ );
168
167
  this.#downloadFunction = downloadFunction;
169
168
  }
170
169
 
@@ -204,7 +203,9 @@ export class CompilerDownloaderImplementation implements CompilerDownloader {
204
203
  // Without the mutex, a concurrent process might check whether a version exists, incorrectly
205
204
  // find it missing (because another process is still downloading it), and start a redundant download.
206
205
 
207
- const mutex = new MultiProcessMutex(`compiler-download-${version}`);
206
+ const mutex = new MultiProcessMutex(
207
+ path.join(this.#compilersDir, `compiler-download-${version}`),
208
+ );
208
209
 
209
210
  return mutex.use(async () => {
210
211
  const isCompilerDownloaded = await this.isCompilerDownloaded(version);
@@ -1,3 +1,5 @@
1
+ import type { RemappingsReaderFunction } from "./resolver/remapped-npm-packages-graph.js";
2
+ import type { HookManager } from "../../../../types/hooks.js";
1
3
  import type { ResolvedFile } from "../../../../types/solidity/resolved-file.js";
2
4
 
3
5
  import { HardhatError } from "@nomicfoundation/hardhat-errors";
@@ -17,8 +19,28 @@ export async function buildDependencyGraph(
17
19
  rootFiles: string[],
18
20
  projectRoot: string,
19
21
  readFile: (absPath: string) => Promise<string>,
22
+ hookManager: HookManager,
20
23
  ): Promise<DependencyGraphImplementation> {
21
- const resolver = await ResolverImplementation.create(projectRoot, readFile);
24
+ // Create the wrapper function that captures the hook manager
25
+ const remappingsReader: RemappingsReaderFunction = (
26
+ packageName,
27
+ packageVersion,
28
+ packagePath,
29
+ defaultBehavior,
30
+ ) =>
31
+ hookManager.runHandlerChain(
32
+ "solidity",
33
+ "readNpmPackageRemappings",
34
+ [packageName, packageVersion, packagePath],
35
+ async (_context, name, version, path) =>
36
+ defaultBehavior(name, version, path),
37
+ );
38
+
39
+ const resolver = await ResolverImplementation.create(
40
+ projectRoot,
41
+ readFile,
42
+ remappingsReader,
43
+ );
22
44
 
23
45
  const dependencyGraph = new DependencyGraphImplementation();
24
46
 
@@ -38,6 +38,7 @@ import { parseNpmDirectImport } from "./npm-module-parsing.js";
38
38
  import {
39
39
  isResolvedUserRemapping,
40
40
  RemappedNpmPackagesGraphImplementation,
41
+ type RemappingsReaderFunction,
41
42
  } from "./remapped-npm-packages-graph.js";
42
43
  import { applyValidRemapping, formatRemapping } from "./remappings.js";
43
44
  import {
@@ -86,14 +87,18 @@ export class ResolverImplementation implements Resolver {
86
87
  *
87
88
  * @param projectRoot The absolute path to the Hardhat project root.
88
89
  * @param readUtf8File A function that reads a UTF-8 file.
90
+ * @param remappingsReader Optional function to read remappings from packages.
89
91
  * @returns The resolver or the user remapping errors found.
90
92
  */
91
93
  public static async create(
92
94
  projectRoot: string,
93
95
  readUtf8File: (absPath: string) => Promise<string>,
96
+ remappingsReader?: RemappingsReaderFunction,
94
97
  ): Promise<Resolver> {
95
- const map =
96
- await RemappedNpmPackagesGraphImplementation.create(projectRoot);
98
+ const map = await RemappedNpmPackagesGraphImplementation.create(
99
+ projectRoot,
100
+ remappingsReader,
101
+ );
97
102
 
98
103
  return new ResolverImplementation(projectRoot, map, readUtf8File);
99
104
  }
@@ -691,6 +696,13 @@ export class ResolverImplementation implements Resolver {
691
696
  );
692
697
 
693
698
  if (dependencyResolution === undefined) {
699
+ // Check if the from file's package has foundry.toml
700
+ const foundryTomlPath = path.join(
701
+ from.package.rootFsPath,
702
+ "foundry.toml",
703
+ );
704
+ const fromHasFoundryToml = await exists(foundryTomlPath);
705
+
694
706
  return {
695
707
  success: false,
696
708
  error: {
@@ -698,6 +710,7 @@ export class ResolverImplementation implements Resolver {
698
710
  fromFsPath: from.fsPath,
699
711
  importPath,
700
712
  installationName: parsedDirectImport.package,
713
+ importerPackageHasFoundryToml: fromHasFoundryToml,
701
714
  },
702
715
  };
703
716
  }
@@ -1098,6 +1111,7 @@ export class ResolverImplementation implements Resolver {
1098
1111
  type: RootResolutionErrorType.NPM_ROOT_FILE_OF_UNINSTALLED_PACKAGE,
1099
1112
  npmModule,
1100
1113
  installationName: error.installationName,
1114
+ projectHasFoundryToml: error.importerPackageHasFoundryToml,
1101
1115
  };
1102
1116
  }
1103
1117
  case ImportResolutionErrorType.IMPORT_WITH_REMAPPING_ERRORS: {
@@ -57,7 +57,14 @@ Note that the npm module is being remapped by ${formatRemappingReference(error.u
57
57
  }
58
58
 
59
59
  case RootResolutionErrorType.NPM_ROOT_FILE_OF_UNINSTALLED_PACKAGE: {
60
- return `The package "${error.installationName}" is not installed.`;
60
+ const baseMessage = `The package "${error.installationName}" is not installed.`;
61
+ if (error.projectHasFoundryToml === true) {
62
+ return `${baseMessage}
63
+
64
+ Your project has a foundry.toml, and you may need to install the "@nomicfoundation/hardhat-foundry" plugin.
65
+ Learn more about Hardhat's Foundry compatibility here: https://hardhat.org/foundry-compatibility`;
66
+ }
67
+ return baseMessage;
61
68
  }
62
69
 
63
70
  case RootResolutionErrorType.NPM_ROOT_FILE_RESOLUTION_WITH_REMAPPING_ERRORS: {
@@ -107,13 +114,13 @@ export function formatImportResolutionError(
107
114
  }
108
115
 
109
116
  case ImportResolutionErrorType.ILLEGAL_RELATIVE_IMPORT: {
110
- return "The import has too many '../', and trying to leave its package.";
117
+ return "The import has too many '../' and is trying to leave its package.";
111
118
  }
112
119
 
113
120
  case ImportResolutionErrorType.RELATIVE_IMPORT_INTO_NODE_MODULES: {
114
121
  return `You are trying to import a file from your node_modules directory with its file system path.
115
122
 
116
- You should write your the path of your imports into npm modules just as you would do in JavaScript files.`;
123
+ You should write your imports into npm modules just as you would do in JavaScript files.`;
117
124
  }
118
125
 
119
126
  case ImportResolutionErrorType.IMPORT_WITH_INVALID_NPM_SYNTAX: {
@@ -121,7 +128,14 @@ You should write your the path of your imports into npm modules just as you woul
121
128
  }
122
129
 
123
130
  case ImportResolutionErrorType.IMPORT_OF_UNINSTALLED_PACKAGE: {
124
- return `The package "${error.installationName}" is not installed.`;
131
+ const baseMessage = `The package "${error.installationName}" is not installed.`;
132
+ if (error.importerPackageHasFoundryToml === true) {
133
+ return `${baseMessage}
134
+
135
+ The file importing this package is inside a Foundry project (foundry.toml detected), and you may need to install the "@nomicfoundation/hardhat-foundry" plugin.
136
+ Learn more about Hardhat's Foundry compatibility here: https://hardhat.org/foundry-compatibility`;
137
+ }
138
+ return baseMessage;
125
139
  }
126
140
 
127
141
  case ImportResolutionErrorType.IMPORT_WITH_REMAPPING_ERRORS: {
@@ -148,7 +162,7 @@ If you still want to be able to do it, try adding this remapping "${error.sugges
148
162
  ? "the package"
149
163
  : "the project";
150
164
 
151
- const message = `The file ${error.packageExportsResolvedSubpath ?? error.subpath} doesn't exist within ${packageOrProject}.`;
165
+ const message = `The file "${error.packageExportsResolvedSubpath ?? error.subpath}" doesn't exist within ${packageOrProject}.`;
152
166
 
153
167
  return formatResolutionErrorRemappingsOrPackageExportsNotes({
154
168
  message,