hardhat 3.4.5 → 3.5.1
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 +54 -0
- package/dist/src/config.d.ts +0 -1
- package/dist/src/config.d.ts.map +1 -1
- package/dist/src/config.js.map +1 -1
- package/dist/src/hre.d.ts +0 -1
- package/dist/src/hre.d.ts.map +1 -1
- package/dist/src/hre.js.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/builtin-global-options.d.ts.map +1 -1
- package/dist/src/internal/builtin-global-options.js +1 -1
- package/dist/src/internal/builtin-global-options.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.d.ts +21 -0
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.js +49 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.js.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.d.ts +2 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.js +12 -2
- package/dist/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/config-resolution.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/config-resolution.js +9 -2
- package/dist/src/internal/builtin-plugins/network-manager/config-resolution.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-constants.d.ts +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-constants.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-constants.js +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-constants.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.js +25 -5
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.d.ts +16 -0
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.js +28 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.js +2 -6
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/type-extensions/config.d.ts +5 -3
- package/dist/src/internal/builtin-plugins/network-manager/type-extensions/config.d.ts.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 +3 -1
- package/dist/src/internal/builtin-plugins/network-manager/type-validation.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/utils/apply-coverage-network-overrides.d.ts +18 -0
- package/dist/src/internal/builtin-plugins/network-manager/utils/apply-coverage-network-overrides.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/network-manager/utils/apply-coverage-network-overrides.js +27 -0
- package/dist/src/internal/builtin-plugins/network-manager/utils/apply-coverage-network-overrides.js.map +1 -0
- package/dist/src/internal/builtin-plugins/node/json-rpc/handler.js +6 -5
- package/dist/src/internal/builtin-plugins/node/json-rpc/handler.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.d.ts +1 -4
- 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 +1 -11
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/warning-suppression.d.ts +6 -10
- 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 +54 -43
- package/dist/src/internal/builtin-plugins/solidity/build-system/warning-suppression.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/constants.d.ts +10 -0
- package/dist/src/internal/builtin-plugins/solidity/constants.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/constants.js +10 -0
- package/dist/src/internal/builtin-plugins/solidity/constants.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/hook-handlers/hre.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/hook-handlers/hre.js +2 -1
- package/dist/src/internal/builtin-plugins/solidity/hook-handlers/hre.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 +1 -0
- package/dist/src/internal/builtin-plugins/solidity/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/tasks/compile.d.ts +9 -0
- package/dist/src/internal/builtin-plugins/solidity/tasks/compile.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity/tasks/compile.js +10 -0
- package/dist/src/internal/builtin-plugins/solidity/tasks/compile.js.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/config.d.ts +4 -3
- package/dist/src/internal/builtin-plugins/solidity-test/config.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/config.js +55 -8
- package/dist/src/internal/builtin-plugins/solidity-test/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/ast-walker.d.ts +58 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/ast-walker.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/ast-walker.js +226 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/ast-walker.js.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/canonicalize.d.ts +29 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/canonicalize.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/canonicalize.js +244 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/canonicalize.js.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/glob.d.ts +7 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/glob.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/glob.js +204 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/glob.js.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/index.d.ts +21 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/index.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/index.js +77 -0
- package/dist/src/internal/builtin-plugins/solidity-test/eip712/index.js.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.d.ts +4 -3
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.js +20 -3
- package/dist/src/internal/builtin-plugins/solidity-test/helpers.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.js +5 -1
- package/dist/src/internal/builtin-plugins/solidity-test/task-action.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/test-profiles.d.ts +2 -0
- package/dist/src/internal/builtin-plugins/solidity-test/test-profiles.d.ts.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/test-profiles.js +2 -0
- package/dist/src/internal/builtin-plugins/solidity-test/test-profiles.js.map +1 -0
- package/dist/src/internal/builtin-plugins/solidity-test/type-extensions.d.ts +91 -32
- package/dist/src/internal/builtin-plugins/solidity-test/type-extensions.d.ts.map +1 -1
- package/dist/src/internal/cli/error-handler.d.ts +11 -2
- package/dist/src/internal/cli/error-handler.d.ts.map +1 -1
- package/dist/src/internal/cli/error-handler.js +72 -46
- package/dist/src/internal/cli/error-handler.js.map +1 -1
- package/dist/src/internal/cli/init/init.d.ts +31 -6
- package/dist/src/internal/cli/init/init.d.ts.map +1 -1
- package/dist/src/internal/cli/init/init.js +126 -13
- package/dist/src/internal/cli/init/init.js.map +1 -1
- package/dist/src/internal/cli/init/package-manager.d.ts +7 -1
- package/dist/src/internal/cli/init/package-manager.d.ts.map +1 -1
- package/dist/src/internal/cli/init/package-manager.js +14 -2
- package/dist/src/internal/cli/init/package-manager.js.map +1 -1
- package/dist/src/internal/cli/main.d.ts.map +1 -1
- package/dist/src/internal/cli/main.js +42 -2
- package/dist/src/internal/cli/main.js.map +1 -1
- package/dist/src/internal/cli/telemetry/error-classification/classifier.d.ts +2 -1
- package/dist/src/internal/cli/telemetry/error-classification/classifier.d.ts.map +1 -1
- package/dist/src/internal/cli/telemetry/error-classification/classifier.js +2 -1
- package/dist/src/internal/cli/telemetry/error-classification/classifier.js.map +1 -1
- package/dist/src/internal/using-hardhat2-plugin-errors.d.ts.map +1 -1
- package/dist/src/internal/using-hardhat2-plugin-errors.js +8 -11
- package/dist/src/internal/using-hardhat2-plugin-errors.js.map +1 -1
- package/dist/src/types/arguments.d.ts +1 -0
- package/dist/src/types/arguments.d.ts.map +1 -1
- package/dist/src/types/arguments.js +1 -0
- package/dist/src/types/arguments.js.map +1 -1
- package/dist/src/types/artifacts.d.ts +1 -0
- package/dist/src/types/artifacts.d.ts.map +1 -1
- package/dist/src/types/artifacts.js +1 -1
- package/dist/src/types/artifacts.js.map +1 -1
- package/dist/src/types/builtin-plugin-type-extensions.d.ts +2 -0
- package/dist/src/types/builtin-plugin-type-extensions.d.ts.map +1 -0
- package/dist/src/types/builtin-plugin-type-extensions.js +2 -0
- package/dist/src/types/builtin-plugin-type-extensions.js.map +1 -0
- package/dist/src/types/config.d.ts +1 -0
- package/dist/src/types/config.d.ts.map +1 -1
- package/dist/src/types/config.js +1 -1
- package/dist/src/types/config.js.map +1 -1
- package/dist/src/types/global-options.d.ts +1 -0
- package/dist/src/types/global-options.d.ts.map +1 -1
- package/dist/src/types/global-options.js +1 -1
- package/dist/src/types/global-options.js.map +1 -1
- package/dist/src/types/hooks.d.ts +1 -0
- package/dist/src/types/hooks.d.ts.map +1 -1
- package/dist/src/types/hooks.js +1 -1
- package/dist/src/types/hooks.js.map +1 -1
- package/dist/src/types/hre.d.ts +1 -0
- package/dist/src/types/hre.d.ts.map +1 -1
- package/dist/src/types/hre.js +1 -1
- package/dist/src/types/hre.js.map +1 -1
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/index.js +1 -0
- package/dist/src/types/index.js.map +1 -1
- package/dist/src/types/network.d.ts +1 -0
- package/dist/src/types/network.d.ts.map +1 -1
- package/dist/src/types/network.js +1 -1
- package/dist/src/types/network.js.map +1 -1
- package/dist/src/types/plugins.d.ts +1 -1
- package/dist/src/types/plugins.d.ts.map +1 -1
- package/dist/src/types/plugins.js +1 -1
- package/dist/src/types/plugins.js.map +1 -1
- package/dist/src/types/providers.d.ts +1 -0
- package/dist/src/types/providers.d.ts.map +1 -1
- package/dist/src/types/providers.js +1 -1
- package/dist/src/types/providers.js.map +1 -1
- package/dist/src/types/solidity.d.ts +1 -0
- package/dist/src/types/solidity.d.ts.map +1 -1
- package/dist/src/types/solidity.js +1 -0
- package/dist/src/types/solidity.js.map +1 -1
- package/dist/src/types/tasks.d.ts +1 -0
- package/dist/src/types/tasks.d.ts.map +1 -1
- package/dist/src/types/tasks.js +1 -0
- package/dist/src/types/tasks.js.map +1 -1
- package/dist/src/types/test.d.ts +1 -0
- package/dist/src/types/test.d.ts.map +1 -1
- package/dist/src/types/test.js +1 -1
- package/dist/src/types/test.js.map +1 -1
- package/dist/src/types/user-interruptions.d.ts +1 -0
- package/dist/src/types/user-interruptions.d.ts.map +1 -1
- package/dist/src/types/user-interruptions.js +1 -1
- package/dist/src/types/user-interruptions.js.map +1 -1
- package/package.json +12 -11
- package/src/config.ts +0 -2
- package/src/hre.ts +0 -3
- package/src/index.ts +0 -3
- package/src/internal/builtin-global-options.ts +2 -1
- package/src/internal/builtin-plugins/gas-analytics/snapshot-cheatcodes.ts +90 -1
- package/src/internal/builtin-plugins/gas-analytics/tasks/solidity-test/task-action.ts +24 -2
- package/src/internal/builtin-plugins/network-manager/config-resolution.ts +11 -3
- package/src/internal/builtin-plugins/network-manager/edr/edr-constants.ts +2 -0
- package/src/internal/builtin-plugins/network-manager/edr/edr-provider.ts +38 -8
- package/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.ts +43 -1
- package/src/internal/builtin-plugins/network-manager/network-manager.ts +5 -6
- package/src/internal/builtin-plugins/network-manager/type-extensions/config.ts +5 -3
- package/src/internal/builtin-plugins/network-manager/type-validation.ts +7 -1
- package/src/internal/builtin-plugins/network-manager/utils/apply-coverage-network-overrides.ts +32 -0
- package/src/internal/builtin-plugins/node/json-rpc/handler.ts +7 -5
- package/src/internal/builtin-plugins/solidity/build-system/build-system.ts +2 -15
- package/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.ts +1 -2
- package/src/internal/builtin-plugins/solidity/build-system/warning-suppression.ts +81 -59
- package/src/internal/builtin-plugins/solidity/constants.ts +11 -0
- package/src/internal/builtin-plugins/solidity/hook-handlers/hre.ts +2 -1
- package/src/internal/builtin-plugins/solidity/index.ts +1 -0
- package/src/internal/builtin-plugins/solidity/tasks/compile.ts +12 -0
- package/src/internal/builtin-plugins/solidity-test/config.ts +85 -12
- package/src/internal/builtin-plugins/solidity-test/eip712/ast-walker.ts +324 -0
- package/src/internal/builtin-plugins/solidity-test/eip712/canonicalize.ts +317 -0
- package/src/internal/builtin-plugins/solidity-test/eip712/glob.ts +225 -0
- package/src/internal/builtin-plugins/solidity-test/eip712/index.ts +120 -0
- package/src/internal/builtin-plugins/solidity-test/helpers.ts +28 -4
- package/src/internal/builtin-plugins/solidity-test/task-action.ts +12 -1
- package/src/internal/builtin-plugins/solidity-test/test-profiles.ts +1 -0
- package/src/internal/builtin-plugins/solidity-test/type-extensions.ts +100 -33
- package/src/internal/cli/error-handler.ts +103 -72
- package/src/internal/cli/init/init.ts +203 -16
- package/src/internal/cli/init/package-manager.ts +18 -1
- package/src/internal/cli/main.ts +65 -2
- package/src/internal/cli/telemetry/error-classification/classifier.ts +2 -1
- package/src/internal/using-hardhat2-plugin-errors.ts +8 -11
- package/src/types/arguments.ts +2 -0
- package/src/types/artifacts.ts +2 -0
- package/src/types/builtin-plugin-type-extensions.ts +15 -0
- package/src/types/config.ts +2 -0
- package/src/types/global-options.ts +2 -0
- package/src/types/hooks.ts +2 -0
- package/src/types/hre.ts +2 -0
- package/src/types/index.ts +2 -0
- package/src/types/network.ts +2 -0
- package/src/types/plugins.ts +1 -2
- package/src/types/providers.ts +2 -0
- package/src/types/solidity.ts +2 -0
- package/src/types/tasks.ts +2 -0
- package/src/types/test.ts +2 -0
- package/src/types/user-interruptions.ts +2 -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 +4 -7
- package/templates/hardhat-3/02-mocha-ethers/package.json +13 -13
- package/templates/hardhat-3/02-mocha-ethers/tsconfig.json +4 -7
- package/templates/hardhat-3/03-minimal/package.json +2 -2
- package/templates/hardhat-3/03-minimal/tsconfig.json +4 -7
|
@@ -13,21 +13,18 @@ export class UsingHardhat2PluginError extends CustomError {
|
|
|
13
13
|
if (callerPath !== undefined) {
|
|
14
14
|
message = `You are trying to use a Hardhat 2 plugin in a Hardhat 3 project.
|
|
15
15
|
|
|
16
|
-
This file is part of a Hardhat 2 plugin calling an API that was removed in Hardhat 3: ${styleText("bold", callerPath)}
|
|
17
|
-
|
|
18
|
-
Please read https://hardhat.org/migrate-from-hardhat2 to learn how to migrate your project to Hardhat 3.
|
|
19
|
-
`;
|
|
16
|
+
This file is part of a Hardhat 2 plugin calling an API that was removed in Hardhat 3: ${styleText("bold", callerPath)}`;
|
|
20
17
|
} else {
|
|
21
|
-
message = `You are trying to use a Hardhat 2 plugin in a Hardhat 3 project
|
|
22
|
-
|
|
23
|
-
Check the stack trace below to identify which plugin is causing this.
|
|
24
|
-
|
|
25
|
-
Please read https://hardhat.org/migrate-from-hardhat2 to learn how to migrate your project to Hardhat 3.
|
|
26
|
-
`;
|
|
18
|
+
message = `You are trying to use a Hardhat 2 plugin in a Hardhat 3 project.`;
|
|
27
19
|
}
|
|
28
20
|
|
|
29
21
|
super(message);
|
|
30
|
-
|
|
22
|
+
// Use a non-enumerable property so that `console.error(error)` does not
|
|
23
|
+
// print `{ callerRelativePath: '…' }` after the stack trace.
|
|
24
|
+
Object.defineProperty(this, "callerRelativePath", {
|
|
25
|
+
value: callerPath,
|
|
26
|
+
enumerable: false,
|
|
27
|
+
});
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
30
|
|
package/src/types/arguments.ts
CHANGED
package/src/types/artifacts.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { SolidityBuildInfo } from "./solidity/solidity-artifacts.js";
|
|
2
2
|
import type { NonNeverKeys } from "./utils.js";
|
|
3
3
|
|
|
4
|
+
import "./builtin-plugin-type-extensions.js";
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* A map of bare contract names and fully qualified contract names to their
|
|
6
8
|
* artifacts that will be completed by Hardhat's build system using module
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// This is an internal file that needs to be imported by every top-level type
|
|
2
|
+
// file, so that they load the builtin plugin type extensions.
|
|
3
|
+
//
|
|
4
|
+
// The trade-off here is that we end up with one unnecessary runtime import of
|
|
5
|
+
// an empty file (this one) if a `src/types/*` file is imported without the
|
|
6
|
+
// `type` annotation (e.g. the CLI's indirectly importing task-related enums),
|
|
7
|
+
// in exchange for better DX.
|
|
8
|
+
//
|
|
9
|
+
// The reason we can't just use the `export type *` from the other files instead
|
|
10
|
+
// is that in some cases that leads to a circular export of types that TS can't
|
|
11
|
+
// handle.
|
|
12
|
+
//
|
|
13
|
+
// The reason we can't use `import type` is that those get erased during
|
|
14
|
+
// compilation.
|
|
15
|
+
export type * from "../internal/builtin-plugins/index.js";
|
package/src/types/config.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { GlobalOptionDefinition } from "./arguments.js";
|
|
2
2
|
|
|
3
|
+
import "./builtin-plugin-type-extensions.js";
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* The values of each global option for a certain instance of the Hardhat
|
|
5
7
|
* Runtime Environment are defined here. This interface can be extended through
|
package/src/types/hooks.ts
CHANGED
|
@@ -14,6 +14,8 @@ import type {
|
|
|
14
14
|
Return,
|
|
15
15
|
} from "./utils.js";
|
|
16
16
|
|
|
17
|
+
import "./builtin-plugin-type-extensions.js";
|
|
18
|
+
|
|
17
19
|
// We add the HookManager to the HRE with a module augmentation to avoid
|
|
18
20
|
// introducing a circular dependency that would look like this:
|
|
19
21
|
// hre.ts -> hooks.ts -> hre.ts
|
package/src/types/hre.ts
CHANGED
|
@@ -2,6 +2,8 @@ import type { GlobalOptions } from "./global-options.js";
|
|
|
2
2
|
import type { UserInterruptionManager } from "./user-interruptions.js";
|
|
3
3
|
import type { HardhatConfig, HardhatUserConfig } from "../types/config.js";
|
|
4
4
|
|
|
5
|
+
import "./builtin-plugin-type-extensions.js";
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* The Hardhat Runtime Environment (HRE) is an object that exposes
|
|
7
9
|
* all the functionality available through Hardhat.
|
package/src/types/index.ts
CHANGED
package/src/types/network.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { NetworkConfig, NetworkConfigOverride } from "./config.js";
|
|
2
2
|
import type { EthereumProvider } from "./providers.js";
|
|
3
3
|
|
|
4
|
+
import "./builtin-plugin-type-extensions.js";
|
|
5
|
+
|
|
4
6
|
/**
|
|
5
7
|
* Represents the possible chain types for the network. The options are:
|
|
6
8
|
* - `GenericNetworkType`: Represents the most generic type of network.
|
package/src/types/plugins.ts
CHANGED
|
@@ -2,8 +2,7 @@ import type { GlobalOptionDefinition } from "./arguments.js";
|
|
|
2
2
|
import type { HardhatHooks } from "./hooks.js";
|
|
3
3
|
import type { TaskDefinition } from "./tasks.js";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
export type * from "../internal/builtin-plugins/index.js";
|
|
5
|
+
import "./builtin-plugin-type-extensions.js";
|
|
7
6
|
|
|
8
7
|
// We add the plugins to the config types with a module augmentation to avoid
|
|
9
8
|
// introducing a circular dependency that would look like this:
|
package/src/types/providers.ts
CHANGED
package/src/types/solidity.ts
CHANGED
package/src/types/tasks.ts
CHANGED
|
@@ -8,6 +8,8 @@ import type { HardhatRuntimeEnvironment } from "./hre.js";
|
|
|
8
8
|
/* eslint-disable-next-line @typescript-eslint/no-unused-vars -- used in JSDoc {@link} */
|
|
9
9
|
import type { Result } from "./utils.js";
|
|
10
10
|
|
|
11
|
+
import "./builtin-plugin-type-extensions.js";
|
|
12
|
+
|
|
11
13
|
// We add the TaskManager to the HRE with a module augmentation to avoid
|
|
12
14
|
// introducing a circular dependency that would look like this:
|
|
13
15
|
// hre.ts -> tasks.ts -> hre.ts
|
package/src/types/test.ts
CHANGED
|
@@ -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.5.1",
|
|
9
|
+
"@nomicfoundation/hardhat-toolbox-viem": "workspace:^5.0.6",
|
|
10
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.6",
|
|
11
11
|
"@types/node": "^22.8.5",
|
|
12
12
|
"forge-std": "foundry-rs/forge-std#v1.9.4",
|
|
13
|
-
"typescript": "~
|
|
13
|
+
"typescript": "~6.0.3",
|
|
14
14
|
"viem": "^2.47.6"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@nomicfoundation/hardhat-ignition-viem": "workspace:^3.1.5",
|
|
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.0.
|
|
23
|
-
"@nomicfoundation/hardhat-verify": "workspace:^3.0.
|
|
24
|
-
"@nomicfoundation/ignition-core": "workspace:^3.1.
|
|
18
|
+
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.10",
|
|
19
|
+
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.9",
|
|
20
|
+
"@nomicfoundation/hardhat-node-test-runner": "workspace:^3.0.16",
|
|
21
|
+
"@nomicfoundation/hardhat-viem": "workspace:^3.0.8",
|
|
22
|
+
"@nomicfoundation/hardhat-viem-assertions": "workspace:^3.0.13",
|
|
23
|
+
"@nomicfoundation/hardhat-verify": "workspace:^3.0.18",
|
|
24
|
+
"@nomicfoundation/ignition-core": "workspace:^3.1.6"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
/* Based on https://github.com/tsconfig/bases/blob/501da2bcd640cf95c95805783e1012b992338f28/bases/node22.json */
|
|
2
1
|
{
|
|
3
2
|
"compilerOptions": {
|
|
4
3
|
"lib": ["es2023"],
|
|
5
|
-
"module": "
|
|
6
|
-
"target": "
|
|
7
|
-
"strict": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
4
|
+
"module": "node20",
|
|
5
|
+
"target": "es2023",
|
|
9
6
|
"skipLibCheck": true,
|
|
10
|
-
"
|
|
11
|
-
"
|
|
7
|
+
"outDir": "dist",
|
|
8
|
+
"types": ["node"]
|
|
12
9
|
}
|
|
13
10
|
}
|
|
@@ -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.5.1",
|
|
9
|
+
"@nomicfoundation/hardhat-toolbox-mocha-ethers": "workspace:^3.0.6",
|
|
10
|
+
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.12",
|
|
11
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.6",
|
|
12
12
|
"@types/chai": "^5.2.3",
|
|
13
13
|
"@types/chai-as-promised": "^8.0.1",
|
|
14
14
|
"@types/mocha": ">=10.0.10",
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
"ethers": "^6.14.0",
|
|
18
18
|
"forge-std": "foundry-rs/forge-std#v1.9.4",
|
|
19
19
|
"mocha": "^11.0.0",
|
|
20
|
-
"typescript": "~
|
|
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.
|
|
23
|
+
"@nomicfoundation/hardhat-ethers": "workspace:^4.0.12",
|
|
24
|
+
"@nomicfoundation/hardhat-ethers-chai-matchers": "workspace:^3.0.9",
|
|
25
|
+
"@nomicfoundation/hardhat-ignition": "workspace:^3.1.6",
|
|
26
26
|
"@nomicfoundation/hardhat-ignition-ethers": "workspace:^3.1.5",
|
|
27
|
-
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.
|
|
28
|
-
"@nomicfoundation/hardhat-mocha": "workspace:^3.0.
|
|
29
|
-
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.
|
|
27
|
+
"@nomicfoundation/hardhat-keystore": "workspace:^3.0.10",
|
|
28
|
+
"@nomicfoundation/hardhat-mocha": "workspace:^3.0.20",
|
|
29
|
+
"@nomicfoundation/hardhat-network-helpers": "workspace:^3.0.9",
|
|
30
30
|
"@nomicfoundation/hardhat-typechain": "workspace:^3.0.9",
|
|
31
|
-
"@nomicfoundation/hardhat-verify": "workspace:^3.0.
|
|
32
|
-
"@nomicfoundation/ignition-core": "workspace:^3.1.
|
|
31
|
+
"@nomicfoundation/hardhat-verify": "workspace:^3.0.18",
|
|
32
|
+
"@nomicfoundation/ignition-core": "workspace:^3.1.6"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
/* Based on https://github.com/tsconfig/bases/blob/501da2bcd640cf95c95805783e1012b992338f28/bases/node22.json */
|
|
2
1
|
{
|
|
3
2
|
"compilerOptions": {
|
|
4
3
|
"lib": ["es2023"],
|
|
5
|
-
"module": "
|
|
6
|
-
"target": "
|
|
7
|
-
"strict": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
4
|
+
"module": "node20",
|
|
5
|
+
"target": "es2023",
|
|
9
6
|
"skipLibCheck": true,
|
|
10
|
-
"
|
|
11
|
-
"
|
|
7
|
+
"outDir": "dist",
|
|
8
|
+
"types": ["node", "mocha"]
|
|
12
9
|
}
|
|
13
10
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
/* Based on https://github.com/tsconfig/bases/blob/501da2bcd640cf95c95805783e1012b992338f28/bases/node22.json */
|
|
2
1
|
{
|
|
3
2
|
"compilerOptions": {
|
|
4
3
|
"lib": ["es2023"],
|
|
5
|
-
"module": "
|
|
6
|
-
"target": "
|
|
7
|
-
"strict": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
4
|
+
"module": "node20",
|
|
5
|
+
"target": "es2023",
|
|
9
6
|
"skipLibCheck": true,
|
|
10
|
-
"
|
|
11
|
-
"
|
|
7
|
+
"outDir": "dist",
|
|
8
|
+
"types": ["node"]
|
|
12
9
|
}
|
|
13
10
|
}
|