hardhat 3.7.0 → 3.9.0
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.
- package/CHANGELOG.md +59 -0
- package/dist/src/cli.js +4 -1
- package/dist/src/cli.js.map +1 -1
- package/dist/src/internal/builtin-plugins/artifacts/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/artifacts/index.js +3 -2
- package/dist/src/internal/builtin-plugins/artifacts/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/clean/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/clean/index.js +3 -2
- package/dist/src/internal/builtin-plugins/clean/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/console/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/console/index.js +3 -2
- package/dist/src/internal/builtin-plugins/console/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/config.d.ts +6 -0
- package/dist/src/internal/builtin-plugins/coverage/config.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/coverage/config.js +18 -0
- package/dist/src/internal/builtin-plugins/coverage/config.js.map +1 -0
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/config.d.ts +4 -0
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/config.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/config.js +15 -0
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/config.js.map +1 -0
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/solidity.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/solidity.js +10 -1
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/solidity.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/index.js +4 -2
- package/dist/src/internal/builtin-plugins/coverage/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/type-extensions.d.ts +20 -0
- package/dist/src/internal/builtin-plugins/coverage/type-extensions.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/flatten/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/flatten/index.js +3 -2
- package/dist/src/internal/builtin-plugins/flatten/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/index.js +3 -2
- package/dist/src/internal/builtin-plugins/gas-analytics/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/genesis-state.d.ts +2 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/genesis-state.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/genesis-state.js +13 -10
- package/dist/src/internal/builtin-plugins/network-manager/edr/genesis-state.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.d.ts +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.js +5 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/index.js +3 -2
- package/dist/src/internal/builtin-plugins/network-manager/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/provider-errors.d.ts +0 -12
- package/dist/src/internal/builtin-plugins/network-manager/provider-errors.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/provider-errors.js +0 -28
- package/dist/src/internal/builtin-plugins/network-manager/provider-errors.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/type-validation.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/type-validation.js +10 -1
- package/dist/src/internal/builtin-plugins/network-manager/type-validation.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/node/index.js +3 -2
- package/dist/src/internal/builtin-plugins/node/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/run/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/run/index.js +3 -2
- package/dist/src/internal/builtin-plugins/run/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.d.ts +6 -0
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js +8 -0
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/warning-suppression.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/warning-suppression.js +4 -0
- package/dist/src/internal/builtin-plugins/solidity/build-system/warning-suppression.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/config.js +7 -1
- package/dist/src/internal/builtin-plugins/solidity/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/index.js +3 -2
- package/dist/src/internal/builtin-plugins/solidity/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/solidity-hooks.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/solidity-hooks.js +5 -2
- package/dist/src/internal/builtin-plugins/solidity/solidity-hooks.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/source-names.d.ts +12 -0
- package/dist/src/internal/builtin-plugins/solidity/source-names.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity/source-names.js +18 -0
- package/dist/src/internal/builtin-plugins/solidity/source-names.js.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/index.js +7 -12
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/index.js +3 -2
- package/dist/src/internal/builtin-plugins/solidity-test/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/telemetry/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/telemetry/index.js +3 -2
- package/dist/src/internal/builtin-plugins/telemetry/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/test/index.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/test/index.js +3 -2
- package/dist/src/internal/builtin-plugins/test/index.js.map +1 -1
- package/dist/src/internal/cli/main.d.ts +1 -0
- package/dist/src/internal/cli/main.d.ts.map +1 -1
- package/dist/src/internal/cli/main.js +4 -0
- package/dist/src/internal/cli/main.js.map +1 -1
- package/dist/src/internal/core/plugins/loaded-plugins-registry.d.ts +4 -0
- package/dist/src/internal/core/plugins/loaded-plugins-registry.d.ts.map +1 -0
- package/dist/src/internal/core/plugins/loaded-plugins-registry.js +8 -0
- package/dist/src/internal/core/plugins/loaded-plugins-registry.js.map +1 -0
- package/dist/src/internal/core/plugins/unused-plugins-warning.d.ts +3 -0
- package/dist/src/internal/core/plugins/unused-plugins-warning.d.ts.map +1 -0
- package/dist/src/internal/core/plugins/unused-plugins-warning.js +29 -0
- package/dist/src/internal/core/plugins/unused-plugins-warning.js.map +1 -0
- package/dist/src/internal/edr/context.d.ts.map +1 -1
- package/dist/src/internal/edr/context.js +25 -7
- package/dist/src/internal/edr/context.js.map +1 -1
- package/dist/src/internal/{builtin-plugins/solidity-test/eip712 → utils}/glob.d.ts +4 -0
- package/dist/src/internal/utils/glob.d.ts.map +1 -0
- package/dist/src/internal/{builtin-plugins/solidity-test/eip712 → utils}/glob.js +3 -3
- package/dist/src/internal/utils/glob.js.map +1 -0
- package/dist/src/plugins.d.ts +13 -0
- package/dist/src/plugins.d.ts.map +1 -1
- package/dist/src/plugins.js +16 -0
- package/dist/src/plugins.js.map +1 -1
- package/package.json +4 -4
- package/src/cli.ts +4 -1
- package/src/internal/builtin-plugins/artifacts/index.ts +5 -2
- package/src/internal/builtin-plugins/clean/index.ts +3 -2
- package/src/internal/builtin-plugins/console/index.ts +3 -2
- package/src/internal/builtin-plugins/coverage/config.ts +28 -0
- package/src/internal/builtin-plugins/coverage/hook-handlers/config.ts +30 -0
- package/src/internal/builtin-plugins/coverage/hook-handlers/solidity.ts +15 -2
- package/src/internal/builtin-plugins/coverage/index.ts +4 -2
- package/src/internal/builtin-plugins/coverage/type-extensions.ts +24 -0
- package/src/internal/builtin-plugins/flatten/index.ts +3 -2
- package/src/internal/builtin-plugins/gas-analytics/index.ts +3 -2
- package/src/internal/builtin-plugins/network-manager/edr/genesis-state.ts +22 -14
- package/src/internal/builtin-plugins/network-manager/edr/stack-traces/stack-trace-solidity-errors.ts +5 -0
- package/src/internal/builtin-plugins/network-manager/index.ts +3 -2
- package/src/internal/builtin-plugins/network-manager/provider-errors.ts +0 -34
- package/src/internal/builtin-plugins/network-manager/type-validation.ts +14 -1
- package/src/internal/builtin-plugins/node/index.ts +3 -2
- package/src/internal/builtin-plugins/run/index.ts +3 -2
- package/src/internal/builtin-plugins/solidity/build-system/build-system.ts +11 -0
- package/src/internal/builtin-plugins/solidity/build-system/warning-suppression.ts +4 -0
- package/src/internal/builtin-plugins/solidity/config.ts +7 -1
- package/src/internal/builtin-plugins/solidity/index.ts +3 -2
- package/src/internal/builtin-plugins/solidity/solidity-hooks.ts +8 -2
- package/src/internal/builtin-plugins/solidity/source-names.ts +19 -0
- package/src/internal/builtin-plugins/solidity-test/eip712/index.ts +8 -16
- package/src/internal/builtin-plugins/solidity-test/index.ts +3 -2
- package/src/internal/builtin-plugins/telemetry/index.ts +3 -2
- package/src/internal/builtin-plugins/test/index.ts +3 -2
- package/src/internal/cli/main.ts +6 -0
- package/src/internal/core/plugins/loaded-plugins-registry.ts +11 -0
- package/src/internal/core/plugins/unused-plugins-warning.ts +47 -0
- package/src/internal/edr/context.ts +39 -23
- package/src/internal/{builtin-plugins/solidity-test/eip712 → utils}/glob.ts +3 -3
- package/src/plugins.ts +19 -0
- package/templates/hardhat-3/01-node-test-runner-viem/package.json +11 -11
- package/templates/hardhat-3/01-node-test-runner-viem/tsconfig.json +2 -1
- package/templates/hardhat-3/02-mocha-ethers/package.json +14 -14
- package/templates/hardhat-3/02-mocha-ethers/tsconfig.json +2 -1
- package/templates/hardhat-3/03-minimal/package.json +1 -1
- package/templates/hardhat-3/03-minimal/tsconfig.json +2 -1
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/glob.d.ts.map +0 -1
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/glob.js.map +0 -1
|
@@ -8,6 +8,7 @@ export const SPDX_WARNING = "SPDX license identifier not provided";
|
|
|
8
8
|
export const PRAGMA_WARNING =
|
|
9
9
|
"Source file does not specify required compiler version";
|
|
10
10
|
const CONTRACT_SIZE_WARNING = "Contract code size is";
|
|
11
|
+
const INIT_CODE_SIZE_WARNING = "Contract initcode size is";
|
|
11
12
|
|
|
12
13
|
// Suppression rules are grouped by scope. Each array has its own match logic
|
|
13
14
|
// in `shouldSuppressWarning` function; add new entries to the array that fits, or add
|
|
@@ -31,6 +32,8 @@ const SPECIFIC_FILE_RULES: ReadonlyArray<{
|
|
|
31
32
|
const TEST_FILE_WARNING_MESSAGES: readonly string[] = [
|
|
32
33
|
SPDX_WARNING,
|
|
33
34
|
PRAGMA_WARNING,
|
|
35
|
+
CONTRACT_SIZE_WARNING,
|
|
36
|
+
INIT_CODE_SIZE_WARNING,
|
|
34
37
|
];
|
|
35
38
|
|
|
36
39
|
// Warnings suppressed only when running with `--coverage`. An entry with no
|
|
@@ -43,6 +46,7 @@ const COVERAGE_MODE_RULES: ReadonlyArray<{
|
|
|
43
46
|
filePath?: string;
|
|
44
47
|
}> = [
|
|
45
48
|
{ message: CONTRACT_SIZE_WARNING },
|
|
49
|
+
{ message: INIT_CODE_SIZE_WARNING },
|
|
46
50
|
{
|
|
47
51
|
message: NATSPEC_MEMORY_SAFE_ASSEMBLY_WARNING,
|
|
48
52
|
filePath: COVERAGE_LIBRARY_FILE_NAME,
|
|
@@ -613,6 +613,7 @@ function copyFromDefault(
|
|
|
613
613
|
return {
|
|
614
614
|
version: defaultSolidityConfig.version,
|
|
615
615
|
type: defaultSolidityConfig.type,
|
|
616
|
+
path: defaultSolidityConfig.path,
|
|
616
617
|
};
|
|
617
618
|
}
|
|
618
619
|
|
|
@@ -620,12 +621,17 @@ function copyFromDefault(
|
|
|
620
621
|
compilers: defaultSolidityConfig.compilers.map((c) => ({
|
|
621
622
|
version: c.version,
|
|
622
623
|
type: c.type,
|
|
624
|
+
path: c.path,
|
|
623
625
|
})),
|
|
624
626
|
overrides: Object.fromEntries(
|
|
625
627
|
Object.entries(defaultSolidityConfig.overrides ?? {}).map(
|
|
626
628
|
([userSourceName, override]) => [
|
|
627
629
|
userSourceName,
|
|
628
|
-
{
|
|
630
|
+
{
|
|
631
|
+
version: override.version,
|
|
632
|
+
type: override.type,
|
|
633
|
+
path: override.path,
|
|
634
|
+
},
|
|
629
635
|
],
|
|
630
636
|
),
|
|
631
637
|
),
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HardhatPlugin } from "../../../types/plugins.js";
|
|
2
2
|
|
|
3
|
+
import { definePlugin } from "../../../plugins.js";
|
|
3
4
|
import { ArgumentType } from "../../../types/arguments.js";
|
|
4
5
|
import { globalOption, task } from "../../core/config.js";
|
|
5
6
|
|
|
@@ -35,7 +36,7 @@ const buildTask = task("build", "Build project")
|
|
|
35
36
|
.setAction(async () => await import("./tasks/build.js"))
|
|
36
37
|
.build();
|
|
37
38
|
|
|
38
|
-
const hardhatPlugin: HardhatPlugin = {
|
|
39
|
+
const hardhatPlugin: HardhatPlugin = definePlugin({
|
|
39
40
|
id: "builtin:solidity",
|
|
40
41
|
dependencies: () => [import("../artifacts/index.js")],
|
|
41
42
|
hookHandlers: {
|
|
@@ -65,6 +66,6 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
65
66
|
}),
|
|
66
67
|
],
|
|
67
68
|
npmPackage: "hardhat",
|
|
68
|
-
};
|
|
69
|
+
});
|
|
69
70
|
|
|
70
71
|
export default hardhatPlugin;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { SolidityCompilerConfig } from "../../../types/config.js";
|
|
2
2
|
import type { Compiler } from "../../../types/solidity.js";
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
isSolcSolidityCompilerConfig,
|
|
6
|
+
isSolcSolidityCompilerLocalBinary,
|
|
7
|
+
} from "./build-system/build-system.js";
|
|
5
8
|
import {
|
|
6
9
|
downloadSolcCompilers,
|
|
7
10
|
getCompiler,
|
|
@@ -16,7 +19,10 @@ export async function downloadSolcCompilersHandler(
|
|
|
16
19
|
quiet: boolean,
|
|
17
20
|
): Promise<void> {
|
|
18
21
|
const solcVersions = new Set(
|
|
19
|
-
compilerConfigs
|
|
22
|
+
compilerConfigs
|
|
23
|
+
.filter(isSolcSolidityCompilerConfig)
|
|
24
|
+
.filter((c) => !isSolcSolidityCompilerLocalBinary(c))
|
|
25
|
+
.map((c) => c.version),
|
|
20
26
|
);
|
|
21
27
|
|
|
22
28
|
if (solcVersions.size > 0) {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HARDHAT_PROJECT_INPUT_SOURCE_NAME_ROOT } from "./constants.js";
|
|
2
|
+
|
|
3
|
+
const PROJECT_INPUT_SOURCE_NAME_PREFIX = `${HARDHAT_PROJECT_INPUT_SOURCE_NAME_ROOT}/`;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Recovers the user-facing source name from a solc input source name by
|
|
7
|
+
* stripping the Hardhat project prefix.
|
|
8
|
+
*
|
|
9
|
+
* Project files have an input source name like `project/contracts/Foo.sol`,
|
|
10
|
+
* whereas the user writes paths — and config globs — against the
|
|
11
|
+
* project-relative `contracts/Foo.sol`. npm package input source names
|
|
12
|
+
* (`npm/<pkg>@<version>/...`) don't carry the project prefix and are returned
|
|
13
|
+
* unchanged.
|
|
14
|
+
*/
|
|
15
|
+
export function toUserSourceName(inputSourceName: string): string {
|
|
16
|
+
return inputSourceName.startsWith(PROJECT_INPUT_SOURCE_NAME_PREFIX)
|
|
17
|
+
? inputSourceName.slice(PROJECT_INPUT_SOURCE_NAME_PREFIX.length)
|
|
18
|
+
: inputSourceName;
|
|
19
|
+
}
|
|
@@ -7,25 +7,20 @@ import {
|
|
|
7
7
|
bytesToUtf8String,
|
|
8
8
|
} from "@nomicfoundation/hardhat-utils/bytes";
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { isPathSelected } from "../../../utils/glob.js";
|
|
11
|
+
import { toUserSourceName } from "../../solidity/source-names.js";
|
|
11
12
|
|
|
12
13
|
import {
|
|
13
14
|
buildUserDefinedValueTypeIndex,
|
|
14
15
|
extractStructsFromAst,
|
|
15
16
|
} from "./ast-walker.js";
|
|
16
17
|
import { canonicalizeStructs } from "./canonicalize.js";
|
|
17
|
-
import { isPathSelected } from "./glob.js";
|
|
18
18
|
|
|
19
19
|
export interface Eip712TypesConfig {
|
|
20
20
|
include: string[];
|
|
21
21
|
exclude: string[];
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
// When a transitive project file doesn't produce an artifact — and so is
|
|
25
|
-
// missing from `inputToUserSource` — stripping this prefix recovers the
|
|
26
|
-
// user-facing path that the user's include/exclude globs are written against.
|
|
27
|
-
const PROJECT_INPUT_SOURCE_NAME_PREFIX = `${HARDHAT_PROJECT_INPUT_SOURCE_NAME_ROOT}/`;
|
|
28
|
-
|
|
29
24
|
/**
|
|
30
25
|
* Walks every compiled source's AST, extracts every struct definition, and
|
|
31
26
|
* returns the flat list of canonical EIP-712 type strings expected by EDR's
|
|
@@ -89,15 +84,12 @@ export function collectEip712CanonicalTypes(
|
|
|
89
84
|
);
|
|
90
85
|
|
|
91
86
|
for (const [inputSourceName, source] of Object.entries(sources)) {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
)
|
|
98
|
-
? inputSourceName.slice(PROJECT_INPUT_SOURCE_NAME_PREFIX.length)
|
|
99
|
-
: inputSourceName;
|
|
100
|
-
}
|
|
87
|
+
// A transitive project file that doesn't produce an artifact is missing
|
|
88
|
+
// from `inputToUserSource`; recovering the user source name from the
|
|
89
|
+
// input source name covers that case.
|
|
90
|
+
const userSourceName =
|
|
91
|
+
inputToUserSource.get(inputSourceName) ??
|
|
92
|
+
toUserSourceName(inputSourceName);
|
|
101
93
|
|
|
102
94
|
// Collect every source so non-selected files can serve as dep targets;
|
|
103
95
|
// selection is enforced at emit time via `selectedNames`.
|
|
@@ -2,11 +2,12 @@ import type { HardhatPlugin } from "../../../types/plugins.js";
|
|
|
2
2
|
|
|
3
3
|
import { ArgumentType } from "hardhat/types/arguments";
|
|
4
4
|
|
|
5
|
+
import { definePlugin } from "../../../plugins.js";
|
|
5
6
|
import { task } from "../../core/config.js";
|
|
6
7
|
|
|
7
8
|
export type * from "./type-extensions.js";
|
|
8
9
|
|
|
9
|
-
const hardhatPlugin: HardhatPlugin = {
|
|
10
|
+
const hardhatPlugin: HardhatPlugin = definePlugin({
|
|
10
11
|
id: "builtin:solidity-tests",
|
|
11
12
|
hookHandlers: {
|
|
12
13
|
config: () => import("./hook-handlers/config.js"),
|
|
@@ -51,6 +52,6 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
51
52
|
import("../coverage/index.js"),
|
|
52
53
|
],
|
|
53
54
|
npmPackage: "hardhat",
|
|
54
|
-
};
|
|
55
|
+
});
|
|
55
56
|
|
|
56
57
|
export default hardhatPlugin;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { HardhatPlugin } from "../../../types/plugins.js";
|
|
2
2
|
|
|
3
|
+
import { definePlugin } from "../../../plugins.js";
|
|
3
4
|
import { task } from "../../core/config.js";
|
|
4
5
|
|
|
5
|
-
const hardhatPlugin: HardhatPlugin = {
|
|
6
|
+
const hardhatPlugin: HardhatPlugin = definePlugin({
|
|
6
7
|
id: "builtin:telemetry",
|
|
7
8
|
tasks: [
|
|
8
9
|
task("telemetry", "Display and modify telemetry settings")
|
|
@@ -18,6 +19,6 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
18
19
|
.build(),
|
|
19
20
|
],
|
|
20
21
|
npmPackage: "hardhat",
|
|
21
|
-
};
|
|
22
|
+
});
|
|
22
23
|
|
|
23
24
|
export default hardhatPlugin;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { HardhatPlugin } from "../../../types/plugins.js";
|
|
2
2
|
|
|
3
|
+
import { definePlugin } from "../../../plugins.js";
|
|
3
4
|
import { ArgumentType } from "../../../types/arguments.js";
|
|
4
5
|
import { task } from "../../core/config.js";
|
|
5
6
|
|
|
6
7
|
export type * from "./type-extensions.js";
|
|
7
8
|
|
|
8
|
-
const hardhatPlugin: HardhatPlugin = {
|
|
9
|
+
const hardhatPlugin: HardhatPlugin = definePlugin({
|
|
9
10
|
id: "builtin:test",
|
|
10
11
|
hookHandlers: {
|
|
11
12
|
config: () => import("./hook-handlers/config.js"),
|
|
@@ -37,6 +38,6 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
37
38
|
],
|
|
38
39
|
dependencies: () => [import("../solidity/index.js")],
|
|
39
40
|
npmPackage: "hardhat",
|
|
40
|
-
};
|
|
41
|
+
});
|
|
41
42
|
|
|
42
43
|
export default hardhatPlugin;
|
package/src/internal/cli/main.ts
CHANGED
|
@@ -40,6 +40,7 @@ import { parseArgumentValue } from "../core/arguments.js";
|
|
|
40
40
|
import { buildGlobalOptionDefinitions } from "../core/global-options.js";
|
|
41
41
|
import { resolveProjectRoot } from "../core/hre.js";
|
|
42
42
|
import { resolvePluginList } from "../core/plugins/resolve-plugin-list.js";
|
|
43
|
+
import { warnAboutUnusedLoadedPlugins } from "../core/plugins/unused-plugins-warning.js";
|
|
43
44
|
import { isArgumentRequired } from "../core/tasks/utils.js";
|
|
44
45
|
import { setGlobalHardhatRuntimeEnvironment } from "../global-hre-instance.js";
|
|
45
46
|
import { createHardhatRuntimeEnvironment } from "../hre-initialization.js";
|
|
@@ -60,6 +61,7 @@ export interface MainOptions {
|
|
|
60
61
|
registerTsx?: boolean;
|
|
61
62
|
rethrowErrors?: true;
|
|
62
63
|
allowNonlocalHardhatInstallation?: true;
|
|
64
|
+
warnAboutUnusedPlugins?: true;
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
export async function main(
|
|
@@ -234,6 +236,10 @@ export async function main(
|
|
|
234
236
|
{ resolvedPlugins, globalOptionDefinitions },
|
|
235
237
|
);
|
|
236
238
|
|
|
239
|
+
if (options.warnAboutUnusedPlugins) {
|
|
240
|
+
warnAboutUnusedLoadedPlugins(hre.config.plugins);
|
|
241
|
+
}
|
|
242
|
+
|
|
237
243
|
// This must be the first time we set it, otherwise we let it crash
|
|
238
244
|
setGlobalHardhatRuntimeEnvironment(hre);
|
|
239
245
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { HardhatPlugin } from "../../../types/plugins.js";
|
|
2
|
+
|
|
3
|
+
const loadedPlugins = new Map<string, HardhatPlugin>();
|
|
4
|
+
|
|
5
|
+
export function registerLoadedPlugin(plugin: HardhatPlugin): void {
|
|
6
|
+
loadedPlugins.set(plugin.id, plugin);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function getLoadedPlugins(): ReadonlyMap<string, HardhatPlugin> {
|
|
10
|
+
return loadedPlugins;
|
|
11
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { HardhatPlugin } from "../../../types/plugins.js";
|
|
2
|
+
|
|
3
|
+
import { styleText } from "node:util";
|
|
4
|
+
|
|
5
|
+
import { getLoadedPlugins } from "./loaded-plugins-registry.js";
|
|
6
|
+
|
|
7
|
+
export function warnAboutUnusedLoadedPlugins(
|
|
8
|
+
resolvedPlugins: HardhatPlugin[],
|
|
9
|
+
printError: (message: string) => void = (message) => console.error(message),
|
|
10
|
+
loadedPlugins: Iterable<HardhatPlugin> = getLoadedPlugins().values(),
|
|
11
|
+
): void {
|
|
12
|
+
const resolvedIds = new Set(resolvedPlugins.map((p) => p.id));
|
|
13
|
+
|
|
14
|
+
const unused: HardhatPlugin[] = [];
|
|
15
|
+
for (const plugin of loadedPlugins) {
|
|
16
|
+
if (!resolvedIds.has(plugin.id)) {
|
|
17
|
+
unused.push(plugin);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (unused.length === 0) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const lines: string[] = [
|
|
26
|
+
"",
|
|
27
|
+
styleText(["bold", "yellow"], "Warning:") +
|
|
28
|
+
" the following plugins were imported but are not present in the `plugins` array of your config:",
|
|
29
|
+
"",
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
for (const plugin of unused) {
|
|
33
|
+
const name =
|
|
34
|
+
plugin.npmPackage !== undefined && plugin.npmPackage !== null
|
|
35
|
+
? `${plugin.npmPackage} (id: ${plugin.id})`
|
|
36
|
+
: plugin.id;
|
|
37
|
+
lines.push(` - ${name}`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
lines.push(
|
|
41
|
+
"",
|
|
42
|
+
" Add them to the `plugins` array, or remove the unused plugin import(s) to silence this warning.",
|
|
43
|
+
"",
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
printError(lines.join("\n"));
|
|
47
|
+
}
|
|
@@ -10,32 +10,48 @@ import {
|
|
|
10
10
|
opSolidityTestRunnerFactory,
|
|
11
11
|
} from "@nomicfoundation/edr";
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// We cache the initialization *promise* (assigned synchronously, before any
|
|
14
|
+
// await) rather than the resolved context. This way concurrent callers share a
|
|
15
|
+
// single in-flight initialization and always receive a fully-registered
|
|
16
|
+
// context, instead of racing on a half-initialized one.
|
|
17
|
+
let _globalEdrContext: Promise<EdrContext> | undefined;
|
|
14
18
|
|
|
15
19
|
export async function getGlobalEdrContext(): Promise<EdrContext> {
|
|
16
20
|
if (_globalEdrContext === undefined) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
);
|
|
30
|
-
await _globalEdrContext.registerSolidityTestRunnerFactory(
|
|
31
|
-
L1_CHAIN_TYPE,
|
|
32
|
-
l1SolidityTestRunnerFactory(),
|
|
33
|
-
);
|
|
34
|
-
await _globalEdrContext.registerSolidityTestRunnerFactory(
|
|
35
|
-
OP_CHAIN_TYPE,
|
|
36
|
-
opSolidityTestRunnerFactory(),
|
|
37
|
-
);
|
|
21
|
+
const context = createGlobalEdrContext();
|
|
22
|
+
_globalEdrContext = context;
|
|
23
|
+
|
|
24
|
+
// If initialization fails, clear the cached promise so a later call can
|
|
25
|
+
// retry instead of permanently returning a rejected promise. The identity
|
|
26
|
+
// guard prevents a stale rejection from wiping a newer promise created by
|
|
27
|
+
// a retry.
|
|
28
|
+
context.catch(() => {
|
|
29
|
+
if (_globalEdrContext === context) {
|
|
30
|
+
_globalEdrContext = undefined;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
38
33
|
}
|
|
39
34
|
|
|
40
|
-
return _globalEdrContext;
|
|
35
|
+
return await _globalEdrContext;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async function createGlobalEdrContext(): Promise<EdrContext> {
|
|
39
|
+
const context = new EdrContext();
|
|
40
|
+
|
|
41
|
+
await context.registerProviderFactory(
|
|
42
|
+
GENERIC_CHAIN_TYPE,
|
|
43
|
+
genericChainProviderFactory(),
|
|
44
|
+
);
|
|
45
|
+
await context.registerProviderFactory(L1_CHAIN_TYPE, l1ProviderFactory());
|
|
46
|
+
await context.registerProviderFactory(OP_CHAIN_TYPE, opProviderFactory());
|
|
47
|
+
await context.registerSolidityTestRunnerFactory(
|
|
48
|
+
L1_CHAIN_TYPE,
|
|
49
|
+
l1SolidityTestRunnerFactory(),
|
|
50
|
+
);
|
|
51
|
+
await context.registerSolidityTestRunnerFactory(
|
|
52
|
+
OP_CHAIN_TYPE,
|
|
53
|
+
opSolidityTestRunnerFactory(),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
return context;
|
|
41
57
|
}
|
|
@@ -15,11 +15,11 @@ export function isPathSelected(
|
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
if (!
|
|
18
|
+
if (!matchesAnyGlob(path, include)) {
|
|
19
19
|
return false;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
if (exclude.length > 0 &&
|
|
22
|
+
if (exclude.length > 0 && matchesAnyGlob(path, exclude)) {
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
25
25
|
|
|
@@ -29,7 +29,7 @@ export function isPathSelected(
|
|
|
29
29
|
/**
|
|
30
30
|
* Returns true if `value` matches at least one of the given glob patterns.
|
|
31
31
|
*/
|
|
32
|
-
function
|
|
32
|
+
export function matchesAnyGlob(value: string, patterns: string[]): boolean {
|
|
33
33
|
for (const pattern of patterns) {
|
|
34
34
|
if (getCompiledGlob(pattern).test(value)) {
|
|
35
35
|
return true;
|
package/src/plugins.ts
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
export { HardhatPluginError } from "@nomicfoundation/hardhat-errors";
|
|
2
2
|
|
|
3
|
+
import type { HardhatPlugin } from "./types/plugins.js";
|
|
4
|
+
|
|
5
|
+
import { registerLoadedPlugin } from "./internal/core/plugins/loaded-plugins-registry.js";
|
|
3
6
|
import { throwUsingHardhat2PluginError } from "./internal/using-hardhat2-plugin-errors.js";
|
|
4
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Defines a Hardhat plugin.
|
|
10
|
+
*
|
|
11
|
+
* Plugin authors should use this helper as the default export of their
|
|
12
|
+
* plugin's `index` module. It registers the plugin's `id` in a process-wide
|
|
13
|
+
* registry of loaded plugins, which the Hardhat CLI uses to detect plugins
|
|
14
|
+
* that are imported but not included in the user's `plugins` array.
|
|
15
|
+
*
|
|
16
|
+
* @param plugin The plugin definition.
|
|
17
|
+
* @returns The same plugin definition, unchanged.
|
|
18
|
+
*/
|
|
19
|
+
export function definePlugin(plugin: HardhatPlugin): HardhatPlugin {
|
|
20
|
+
registerLoadedPlugin(plugin);
|
|
21
|
+
return plugin;
|
|
22
|
+
}
|
|
23
|
+
|
|
5
24
|
/**
|
|
6
25
|
* @deprecated This function is part of the Hardhat 2 plugin API.
|
|
7
26
|
*/
|
|
@@ -5,22 +5,22 @@
|
|
|
5
5
|
"description": "A TypeScript Hardhat project using Node Test Runner and Viem",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"hardhat": "workspace:^3.
|
|
9
|
-
"@nomicfoundation/hardhat-toolbox-viem": "workspace:^5.0.
|
|
10
|
-
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.
|
|
8
|
+
"hardhat": "workspace:^3.9.0",
|
|
9
|
+
"@nomicfoundation/hardhat-toolbox-viem": "workspace:^5.0.7",
|
|
10
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.7",
|
|
11
11
|
"@types/node": "^22.8.5",
|
|
12
12
|
"forge-std": "foundry-rs/forge-std#v1.9.4",
|
|
13
13
|
"typescript": "~6.0.3",
|
|
14
14
|
"viem": "^2.47.6"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@nomicfoundation/hardhat-ignition-viem": "workspace:^3.1.
|
|
18
|
-
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.
|
|
19
|
-
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.
|
|
20
|
-
"@nomicfoundation/hardhat-node-test-runner": "workspace:^3.0.
|
|
21
|
-
"@nomicfoundation/hardhat-viem": "workspace:^3.0.
|
|
22
|
-
"@nomicfoundation/hardhat-viem-assertions": "workspace:^3.1.
|
|
23
|
-
"@nomicfoundation/hardhat-verify": "workspace:^3.0.
|
|
24
|
-
"@nomicfoundation/ignition-core": "workspace:^3.1.
|
|
17
|
+
"@nomicfoundation/hardhat-ignition-viem": "workspace:^3.1.6",
|
|
18
|
+
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.12",
|
|
19
|
+
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.10",
|
|
20
|
+
"@nomicfoundation/hardhat-node-test-runner": "workspace:^3.0.17",
|
|
21
|
+
"@nomicfoundation/hardhat-viem": "workspace:^3.0.9",
|
|
22
|
+
"@nomicfoundation/hardhat-viem-assertions": "workspace:^3.1.1",
|
|
23
|
+
"@nomicfoundation/hardhat-verify": "workspace:^3.0.20",
|
|
24
|
+
"@nomicfoundation/ignition-core": "workspace:^3.1.7"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"description": "A TypeScript Hardhat project using Mocha and Ethers.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"hardhat": "workspace:^3.
|
|
9
|
-
"@nomicfoundation/hardhat-toolbox-mocha-ethers": "workspace:^3.0.
|
|
10
|
-
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.
|
|
11
|
-
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.
|
|
8
|
+
"hardhat": "workspace:^3.9.0",
|
|
9
|
+
"@nomicfoundation/hardhat-toolbox-mocha-ethers": "workspace:^3.0.7",
|
|
10
|
+
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.13",
|
|
11
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.7",
|
|
12
12
|
"@types/chai": "^5.2.3",
|
|
13
13
|
"@types/chai-as-promised": "^8.0.1",
|
|
14
14
|
"@types/mocha": ">=10.0.10",
|
|
@@ -20,15 +20,15 @@
|
|
|
20
20
|
"typescript": "~6.0.3"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.
|
|
24
|
-
"@nomicfoundation/hardhat-ethers-chai-matchers": "workspace:^3.0.
|
|
25
|
-
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.
|
|
26
|
-
"@nomicfoundation/hardhat-ignition-ethers": "workspace:^3.1.
|
|
27
|
-
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.
|
|
28
|
-
"@nomicfoundation/hardhat-mocha": "workspace:^3.0.
|
|
29
|
-
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.
|
|
30
|
-
"@nomicfoundation/hardhat-typechain": "workspace:^3.1.
|
|
31
|
-
"@nomicfoundation/hardhat-verify": "workspace:^3.0.
|
|
32
|
-
"@nomicfoundation/ignition-core": "workspace:^3.1.
|
|
23
|
+
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.13",
|
|
24
|
+
"@nomicfoundation/hardhat-ethers-chai-matchers": "workspace:^3.0.10",
|
|
25
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.7",
|
|
26
|
+
"@nomicfoundation/hardhat-ignition-ethers": "workspace:^3.1.6",
|
|
27
|
+
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.12",
|
|
28
|
+
"@nomicfoundation/hardhat-mocha": "workspace:^3.0.21",
|
|
29
|
+
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.10",
|
|
30
|
+
"@nomicfoundation/hardhat-typechain": "workspace:^3.1.1",
|
|
31
|
+
"@nomicfoundation/hardhat-verify": "workspace:^3.0.20",
|
|
32
|
+
"@nomicfoundation/ignition-core": "workspace:^3.1.7"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/builtin-plugins/solidity-test/eip712/glob.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,EAAE,MAAM,EAAE,GAChB,OAAO,CAcT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"glob.js","sourceRoot":"","sources":["../../../../../../src/internal/builtin-plugins/solidity-test/eip712/glob.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEpD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,IAAY,EACZ,OAAiB,EACjB,OAAiB;IAEjB,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;QACpD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CAAC,KAAa,EAAE,QAAkB;IACnD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,IAAI,eAAe,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACzC,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;GAIG;AACH,SAAS,YAAY,CAAC,OAAe;IACnC,OAAO,IAAI,MAAM,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,aAAa,CAAC,OAAe;IACpC,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,CAAC,GAAG,CAAC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