hardhat 3.4.0 → 3.4.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 +15 -0
- package/dist/src/internal/builtin-plugins/artifacts/artifact-manager.js +1 -1
- package/dist/src/internal/builtin-plugins/artifacts/artifact-manager.js.map +1 -1
- package/dist/src/internal/builtin-plugins/artifacts/hook-handlers/hre.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/artifacts/hook-handlers/hre.js +10 -10
- package/dist/src/internal/builtin-plugins/artifacts/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/clean/index.js +1 -1
- package/dist/src/internal/builtin-plugins/clean/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/console/index.js +1 -1
- package/dist/src/internal/builtin-plugins/console/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/solidity.js +2 -2
- package/dist/src/internal/builtin-plugins/coverage/hook-handlers/solidity.js.map +1 -1
- package/dist/src/internal/builtin-plugins/flatten/index.js +1 -1
- 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 +2 -2
- package/dist/src/internal/builtin-plugins/gas-analytics/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.js +4 -4
- package/dist/src/internal/builtin-plugins/network-manager/edr/edr-provider.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/genesis-state.js +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/genesis-state.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.js +1 -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/hook-handlers/hre.js +4 -4
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/network.js +2 -2
- package/dist/src/internal/builtin-plugins/network-manager/hook-handlers/network.js.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/http-provider.d.ts.map +1 -1
- package/dist/src/internal/builtin-plugins/network-manager/http-provider.js +2 -2
- package/dist/src/internal/builtin-plugins/network-manager/http-provider.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 +7 -7
- package/dist/src/internal/builtin-plugins/network-manager/network-manager.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/helpers.js +1 -1
- package/dist/src/internal/builtin-plugins/node/helpers.js.map +1 -1
- package/dist/src/internal/builtin-plugins/node/index.js +1 -1
- package/dist/src/internal/builtin-plugins/node/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/run/index.js +1 -1
- 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.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js +13 -10
- package/dist/src/internal/builtin-plugins/solidity/build-system/build-system.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compilation-job.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.js +4 -4
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/index.js +2 -2
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/solcjs-runner.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/compiler/solcjs-runner.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/read-source-file.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/read-source-file.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.js +10 -10
- package/dist/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.js.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/hook-handlers/config.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/hook-handlers/config.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 +10 -10
- package/dist/src/internal/builtin-plugins/solidity/hook-handlers/hre.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/index.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/solidity-hooks.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity/solidity-hooks.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity/tasks/build.js +4 -4
- package/dist/src/internal/builtin-plugins/solidity/tasks/build.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/edr-artifacts.js +2 -2
- package/dist/src/internal/builtin-plugins/solidity-test/edr-artifacts.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/hook-handlers/config.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/hook-handlers/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/hook-handlers/test.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/hook-handlers/test.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/index.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/reporter.js +1 -1
- package/dist/src/internal/builtin-plugins/solidity-test/reporter.js.map +1 -1
- package/dist/src/internal/builtin-plugins/telemetry/index.js +1 -1
- package/dist/src/internal/builtin-plugins/telemetry/index.js.map +1 -1
- package/dist/src/internal/builtin-plugins/test/hook-handlers/config.js +1 -1
- package/dist/src/internal/builtin-plugins/test/hook-handlers/config.js.map +1 -1
- package/dist/src/internal/builtin-plugins/test/index.js +1 -1
- package/dist/src/internal/builtin-plugins/test/index.js.map +1 -1
- package/dist/src/internal/cli/init/init.js +1 -1
- package/dist/src/internal/cli/init/init.js.map +1 -1
- package/dist/src/internal/cli/main.d.ts.map +1 -1
- package/dist/src/internal/cli/main.js +4 -2
- package/dist/src/internal/cli/main.js.map +1 -1
- package/dist/src/internal/cli/node-version.d.ts.map +1 -1
- package/dist/src/internal/cli/node-version.js +3 -0
- package/dist/src/internal/cli/node-version.js.map +1 -1
- package/dist/src/internal/cli/telemetry/analytics/analytics.js +2 -2
- package/dist/src/internal/cli/telemetry/analytics/analytics.js.map +1 -1
- package/dist/src/internal/cli/telemetry/error-reporter/global-error-handlers.d.ts +6 -0
- package/dist/src/internal/cli/telemetry/error-reporter/global-error-handlers.d.ts.map +1 -0
- package/dist/src/internal/cli/telemetry/error-reporter/global-error-handlers.js +47 -0
- package/dist/src/internal/cli/telemetry/error-reporter/global-error-handlers.js.map +1 -0
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.d.ts +27 -0
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.d.ts.map +1 -0
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.js +40 -0
- package/dist/src/internal/cli/telemetry/error-reporter/reporter.js.map +1 -0
- package/dist/src/internal/cli/telemetry/sentry/anonymizer.js +1 -1
- package/dist/src/internal/cli/telemetry/sentry/anonymizer.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/init.d.ts +0 -8
- package/dist/src/internal/cli/telemetry/sentry/init.d.ts.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/init.js +1 -37
- package/dist/src/internal/cli/telemetry/sentry/init.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/reporter.d.ts +8 -2
- package/dist/src/internal/cli/telemetry/sentry/reporter.d.ts.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/reporter.js +18 -12
- package/dist/src/internal/cli/telemetry/sentry/reporter.js.map +1 -1
- package/dist/src/internal/cli/telemetry/sentry/transport.js +1 -1
- package/dist/src/internal/cli/telemetry/sentry/transport.js.map +1 -1
- package/dist/src/internal/cli/telemetry/telemetry-permissions.js +1 -1
- package/dist/src/internal/cli/telemetry/telemetry-permissions.js.map +1 -1
- package/dist/src/internal/config-loading.js +3 -3
- package/dist/src/internal/config-loading.js.map +1 -1
- package/dist/src/internal/core/configuration-variables.d.ts.map +1 -1
- package/dist/src/internal/core/configuration-variables.js +1 -1
- package/dist/src/internal/core/configuration-variables.js.map +1 -1
- package/dist/src/internal/core/hook-manager.js +3 -3
- package/dist/src/internal/core/hook-manager.js.map +1 -1
- package/dist/src/internal/core/hre.d.ts.map +1 -1
- package/dist/src/internal/core/hre.js +3 -3
- package/dist/src/internal/core/hre.js.map +1 -1
- package/dist/src/internal/core/plugins/resolve-plugin-list.js +1 -1
- package/dist/src/internal/core/plugins/resolve-plugin-list.js.map +1 -1
- package/dist/src/internal/core/tasks/resolved-task.js +4 -4
- package/dist/src/internal/core/tasks/resolved-task.js.map +1 -1
- package/dist/src/internal/core/user-interruptions.js +9 -9
- package/dist/src/internal/core/user-interruptions.js.map +1 -1
- package/dist/src/internal/hre-initialization.js +1 -1
- package/dist/src/internal/hre-initialization.js.map +1 -1
- package/package.json +4 -4
- package/src/internal/builtin-plugins/artifacts/artifact-manager.ts +1 -1
- package/src/internal/builtin-plugins/artifacts/hook-handlers/hre.ts +16 -10
- package/src/internal/builtin-plugins/clean/index.ts +1 -1
- package/src/internal/builtin-plugins/console/index.ts +1 -1
- package/src/internal/builtin-plugins/coverage/hook-handlers/solidity.ts +2 -2
- package/src/internal/builtin-plugins/flatten/index.ts +1 -1
- package/src/internal/builtin-plugins/gas-analytics/index.ts +4 -2
- package/src/internal/builtin-plugins/network-manager/edr/edr-provider.ts +4 -4
- package/src/internal/builtin-plugins/network-manager/edr/genesis-state.ts +1 -1
- package/src/internal/builtin-plugins/network-manager/edr/utils/convert-to-edr.ts +1 -1
- package/src/internal/builtin-plugins/network-manager/hook-handlers/hre.ts +4 -4
- package/src/internal/builtin-plugins/network-manager/hook-handlers/network.ts +2 -2
- package/src/internal/builtin-plugins/network-manager/http-provider.ts +6 -2
- package/src/internal/builtin-plugins/network-manager/network-manager.ts +11 -7
- package/src/internal/builtin-plugins/node/helpers.ts +1 -1
- package/src/internal/builtin-plugins/node/index.ts +1 -1
- package/src/internal/builtin-plugins/run/index.ts +1 -1
- package/src/internal/builtin-plugins/solidity/build-system/build-system.ts +21 -12
- package/src/internal/builtin-plugins/solidity/build-system/compilation-job.ts +1 -1
- package/src/internal/builtin-plugins/solidity/build-system/compiler/downloader.ts +4 -4
- package/src/internal/builtin-plugins/solidity/build-system/compiler/index.ts +2 -2
- package/src/internal/builtin-plugins/solidity/build-system/compiler/solcjs-runner.ts +1 -1
- package/src/internal/builtin-plugins/solidity/build-system/dependency-graph-building.ts +1 -1
- package/src/internal/builtin-plugins/solidity/build-system/read-source-file.ts +2 -2
- package/src/internal/builtin-plugins/solidity/build-system/resolver/dependency-resolver.ts +11 -11
- package/src/internal/builtin-plugins/solidity/build-system/resolver/remapped-npm-packages-graph.ts +1 -1
- package/src/internal/builtin-plugins/solidity/hook-handlers/config.ts +1 -1
- package/src/internal/builtin-plugins/solidity/hook-handlers/hre.ts +14 -10
- package/src/internal/builtin-plugins/solidity/index.ts +1 -1
- package/src/internal/builtin-plugins/solidity/solidity-hooks.ts +1 -1
- package/src/internal/builtin-plugins/solidity/tasks/build.ts +4 -4
- package/src/internal/builtin-plugins/solidity-test/edr-artifacts.ts +2 -2
- package/src/internal/builtin-plugins/solidity-test/hook-handlers/config.ts +1 -1
- package/src/internal/builtin-plugins/solidity-test/hook-handlers/test.ts +1 -1
- package/src/internal/builtin-plugins/solidity-test/index.ts +1 -1
- package/src/internal/builtin-plugins/solidity-test/reporter.ts +1 -1
- package/src/internal/builtin-plugins/telemetry/index.ts +1 -1
- package/src/internal/builtin-plugins/test/hook-handlers/config.ts +1 -1
- package/src/internal/builtin-plugins/test/index.ts +1 -1
- package/src/internal/cli/init/init.ts +1 -1
- package/src/internal/cli/main.ts +5 -3
- package/src/internal/cli/node-version.ts +3 -0
- package/src/internal/cli/telemetry/analytics/analytics.ts +2 -2
- package/src/internal/cli/telemetry/error-reporter/global-error-handlers.ts +64 -0
- package/src/internal/cli/telemetry/error-reporter/reporter.ts +49 -0
- package/src/internal/cli/telemetry/sentry/anonymizer.ts +1 -1
- package/src/internal/cli/telemetry/sentry/init.ts +2 -62
- package/src/internal/cli/telemetry/sentry/reporter.ts +27 -15
- package/src/internal/cli/telemetry/sentry/transport.ts +1 -1
- package/src/internal/cli/telemetry/telemetry-permissions.ts +1 -1
- package/src/internal/config-loading.ts +3 -3
- package/src/internal/core/configuration-variables.ts +19 -18
- package/src/internal/core/hook-manager.ts +3 -3
- package/src/internal/core/hre.ts +5 -3
- package/src/internal/core/plugins/resolve-plugin-list.ts +1 -1
- package/src/internal/core/tasks/resolved-task.ts +4 -4
- package/src/internal/core/user-interruptions.ts +9 -9
- package/src/internal/hre-initialization.ts +1 -1
- package/templates/hardhat-3/01-node-test-runner-viem/package.json +10 -10
- package/templates/hardhat-3/02-mocha-ethers/package.json +13 -13
- package/templates/hardhat-3/03-minimal/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-interruptions.js","sourceRoot":"","sources":["../../../../src/internal/core/user-interruptions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAA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AAC,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,MAAM,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;QAC3C,EAAE,CAAC,QAAQ,CACT,KAAK,CAAC,IAAI,CAAC,IAAI,WAAW,GAAG,CAAC,GAAG,IAAI,gBAAgB,IAAI,EACzD,CAAC,MAAM,EAAE,EAAE;YACT,OAAO,CAAC,MAAM,CAAC,CAAC;YAChB,EAAE,CAAC,KAAK,EAAE,CAAC;QACb,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -33,7 +33,7 @@ export async function createHardhatRuntimeEnvironment(config, userProvidedGlobal
|
|
|
33
33
|
]);
|
|
34
34
|
unsafeOptions.globalOptionDefinitions = globalOptionDefinitions;
|
|
35
35
|
}
|
|
36
|
-
return HardhatRuntimeEnvironmentImplementation.create(config, userProvidedGlobalOptions, resolvedProjectRoot, unsafeOptions);
|
|
36
|
+
return await HardhatRuntimeEnvironmentImplementation.create(config, userProvidedGlobalOptions, resolvedProjectRoot, unsafeOptions);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
39
|
* Gets the global Hardhat Runtime Environment, or creates it if it doesn't exist.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hre-initialization.js","sourceRoot":"","sources":["../../../src/internal/hre-initialization.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kCAAkC,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EACL,kBAAkB,EAClB,uCAAuC,GACxC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EACL,kCAAkC,EAClC,kCAAkC,GACnC,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,MAAyB,EACzB,4BAAoD,EAAE,EACtD,WAAoB,EACpB,gBAAwD,EAAE;IAE1D,MAAM,mBAAmB,GAAG,MAAM,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAElE,IAAI,aAAa,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QAChD,MAAM,OAAO,GAAG,CAAC,GAAG,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;QAE/D,MAAM,eAAe,GAAG,MAAM,iBAAiB,CAC7C,mBAAmB,EACnB,OAAO,CACR,CAAC;QAEF,aAAa,CAAC,eAAe,GAAG,eAAe,CAAC;IAClD,CAAC;IAED,IAAI,aAAa,CAAC,uBAAuB,KAAK,SAAS,EAAE,CAAC;QACxD,MAAM,6BAA6B,GAAG,4BAA4B,CAChE,aAAa,CAAC,eAAe,CAC9B,CAAC;QAEF,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC;YACtC,GAAG,kCAAkC;YACrC,GAAG,6BAA6B;SACjC,CAAC,CAAC;QAEH,aAAa,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;IAClE,CAAC;IAED,OAAO,uCAAuC,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"hre-initialization.js","sourceRoot":"","sources":["../../../src/internal/hre-initialization.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kCAAkC,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EACL,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EACL,kBAAkB,EAClB,uCAAuC,GACxC,MAAM,eAAe,CAAC;A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CAAC;IACpD,MAAM,WAAW,GAAG,MAAM,kBAAkB,CAAC,UAAU,CAAC,CAAC;IACzD,MAAM,UAAU,GAAG,MAAM,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAEtD,SAAS,GAAG,MAAM,+BAA+B,CAC/C,UAAU,EACV,EAAE,MAAM,EAAE,UAAU,EAAE,EACtB,WAAW,CACZ,CAAC;IAEF,kCAAkC,CAAC,SAAS,CAAC,CAAC;IAE9C,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hardhat",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
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://hardhat.org",
|
|
6
6
|
"repository": {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"README.md"
|
|
63
63
|
],
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@nomicfoundation/hardhat-node-test-reporter": "^3.0.
|
|
65
|
+
"@nomicfoundation/hardhat-node-test-reporter": "^3.0.5",
|
|
66
66
|
"@types/adm-zip": "^0.5.5",
|
|
67
67
|
"@types/debug": "^4.1.7",
|
|
68
68
|
"@types/node": "^22.0.0",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
"prettier": "3.2.5",
|
|
75
75
|
"rimraf": "^5.0.5",
|
|
76
76
|
"typescript": "~5.8.0",
|
|
77
|
-
"@nomicfoundation/hardhat-test-utils": "^2.0.
|
|
77
|
+
"@nomicfoundation/hardhat-test-utils": "^2.0.3"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
80
|
"@nomicfoundation/edr": "0.12.0-next.29",
|
|
81
81
|
"@nomicfoundation/hardhat-errors": "^3.0.11",
|
|
82
|
-
"@nomicfoundation/hardhat-utils": "^4.0.
|
|
82
|
+
"@nomicfoundation/hardhat-utils": "^4.0.4",
|
|
83
83
|
"@nomicfoundation/hardhat-vendored": "^3.0.2",
|
|
84
84
|
"@nomicfoundation/hardhat-zod-utils": "^3.0.4",
|
|
85
85
|
"@nomicfoundation/solidity-analyzer": "^0.1.1",
|
|
@@ -20,62 +20,68 @@ class LazyArtifactManager implements ArtifactManager {
|
|
|
20
20
|
contractNameOrFullyQualifiedName: ContractNameT,
|
|
21
21
|
): Promise<GetArtifactByName<ContractNameT>> {
|
|
22
22
|
const artifactManager = await this.#getArtifactManager();
|
|
23
|
-
return artifactManager.readArtifact(contractNameOrFullyQualifiedName);
|
|
23
|
+
return await artifactManager.readArtifact(contractNameOrFullyQualifiedName);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
public async getArtifactPath(
|
|
27
27
|
contractNameOrFullyQualifiedName: string,
|
|
28
28
|
): Promise<string> {
|
|
29
29
|
const artifactManager = await this.#getArtifactManager();
|
|
30
|
-
return artifactManager.getArtifactPath(
|
|
30
|
+
return await artifactManager.getArtifactPath(
|
|
31
|
+
contractNameOrFullyQualifiedName,
|
|
32
|
+
);
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
public async artifactExists(
|
|
34
36
|
contractNameOrFullyQualifiedName: string,
|
|
35
37
|
): Promise<boolean> {
|
|
36
38
|
const artifactManager = await this.#getArtifactManager();
|
|
37
|
-
return artifactManager.artifactExists(
|
|
39
|
+
return await artifactManager.artifactExists(
|
|
40
|
+
contractNameOrFullyQualifiedName,
|
|
41
|
+
);
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
public async getAllFullyQualifiedNames(): Promise<ReadonlySet<string>> {
|
|
41
45
|
const artifactManager = await this.#getArtifactManager();
|
|
42
|
-
return artifactManager.getAllFullyQualifiedNames();
|
|
46
|
+
return await artifactManager.getAllFullyQualifiedNames();
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
public async getAllArtifactPaths(): Promise<ReadonlySet<string>> {
|
|
46
50
|
const artifactManager = await this.#getArtifactManager();
|
|
47
|
-
return artifactManager.getAllArtifactPaths();
|
|
51
|
+
return await artifactManager.getAllArtifactPaths();
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
public async getBuildInfoId(
|
|
51
55
|
contractNameOrFullyQualifiedName: string,
|
|
52
56
|
): Promise<string | undefined> {
|
|
53
57
|
const artifactManager = await this.#getArtifactManager();
|
|
54
|
-
return artifactManager.getBuildInfoId(
|
|
58
|
+
return await artifactManager.getBuildInfoId(
|
|
59
|
+
contractNameOrFullyQualifiedName,
|
|
60
|
+
);
|
|
55
61
|
}
|
|
56
62
|
|
|
57
63
|
public async getAllBuildInfoIds(): Promise<ReadonlySet<string>> {
|
|
58
64
|
const artifactManager = await this.#getArtifactManager();
|
|
59
|
-
return artifactManager.getAllBuildInfoIds();
|
|
65
|
+
return await artifactManager.getAllBuildInfoIds();
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
public async getBuildInfoPath(
|
|
63
69
|
buildInfoId: string,
|
|
64
70
|
): Promise<string | undefined> {
|
|
65
71
|
const artifactManager = await this.#getArtifactManager();
|
|
66
|
-
return artifactManager.getBuildInfoPath(buildInfoId);
|
|
72
|
+
return await artifactManager.getBuildInfoPath(buildInfoId);
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
public async getBuildInfoOutputPath(
|
|
70
76
|
buildInfoId: string,
|
|
71
77
|
): Promise<string | undefined> {
|
|
72
78
|
const artifactManager = await this.#getArtifactManager();
|
|
73
|
-
return artifactManager.getBuildInfoOutputPath(buildInfoId);
|
|
79
|
+
return await artifactManager.getBuildInfoOutputPath(buildInfoId);
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
public async clearCache(): Promise<void> {
|
|
77
83
|
const artifactManager = await this.#getArtifactManager();
|
|
78
|
-
return artifactManager.clearCache();
|
|
84
|
+
return await artifactManager.clearCache();
|
|
79
85
|
}
|
|
80
86
|
|
|
81
87
|
async #getArtifactManager(): Promise<ArtifactManager> {
|
|
@@ -12,7 +12,7 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
12
12
|
name: "global",
|
|
13
13
|
description: "Clear the global cache",
|
|
14
14
|
})
|
|
15
|
-
.setAction(async () => import("./task-action.js"))
|
|
15
|
+
.setAction(async () => await import("./task-action.js"))
|
|
16
16
|
.build(),
|
|
17
17
|
],
|
|
18
18
|
npmPackage: "hardhat",
|
|
@@ -20,7 +20,7 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
20
20
|
description: "Commands to run when the console starts",
|
|
21
21
|
defaultValue: [],
|
|
22
22
|
})
|
|
23
|
-
.setAction(async () => import("./task-action.js"))
|
|
23
|
+
.setAction(async () => await import("./task-action.js"))
|
|
24
24
|
.build(),
|
|
25
25
|
],
|
|
26
26
|
dependencies: () => [import("../solidity/index.js")],
|
|
@@ -94,7 +94,7 @@ export default async (): Promise<Partial<SolidityHooks>> => ({
|
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
} else {
|
|
97
|
-
return next(context, sourceName, fsPath, fileContent, solcVersion);
|
|
97
|
+
return await next(context, sourceName, fsPath, fileContent, solcVersion);
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
preprocessSolcInputBeforeBuilding: async (context, solcInput, next) => {
|
|
@@ -121,6 +121,6 @@ export default async (): Promise<Partial<SolidityHooks>> => ({
|
|
|
121
121
|
solcInput.sources[COVERAGE_LIBRARY_PATH] = { content };
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
return next(context, solcInput);
|
|
124
|
+
return await next(context, solcInput);
|
|
125
125
|
},
|
|
126
126
|
});
|
|
@@ -14,7 +14,7 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
14
14
|
description: "An optional list of files to flatten",
|
|
15
15
|
type: ArgumentType.FILE,
|
|
16
16
|
})
|
|
17
|
-
.setAction(async () => import("./task-action.js"))
|
|
17
|
+
.setAction(async () => await import("./task-action.js"))
|
|
18
18
|
.build(),
|
|
19
19
|
],
|
|
20
20
|
};
|
|
@@ -22,7 +22,7 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
22
22
|
default: async (args, _hre, runSuper) => {
|
|
23
23
|
// We don't need to do anything here, as the test task will forward
|
|
24
24
|
// the arguments to its subtasks.
|
|
25
|
-
return runSuper(args);
|
|
25
|
+
return await runSuper(args);
|
|
26
26
|
},
|
|
27
27
|
}))
|
|
28
28
|
.build(),
|
|
@@ -35,7 +35,9 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
35
35
|
name: "snapshotCheck",
|
|
36
36
|
description: "Check the snapshots match the stored values",
|
|
37
37
|
})
|
|
38
|
-
.setAction(
|
|
38
|
+
.setAction(
|
|
39
|
+
async () => await import("./tasks/solidity-test/task-action.js"),
|
|
40
|
+
)
|
|
39
41
|
.build(),
|
|
40
42
|
],
|
|
41
43
|
globalOptions: [
|
|
@@ -36,7 +36,7 @@ import { numberToHexString } from "@nomicfoundation/hardhat-utils/hex";
|
|
|
36
36
|
import { deepEqual } from "@nomicfoundation/hardhat-utils/lang";
|
|
37
37
|
import debug from "debug";
|
|
38
38
|
|
|
39
|
-
import { sendErrorTelemetry } from "../../../cli/telemetry/
|
|
39
|
+
import { sendErrorTelemetry } from "../../../cli/telemetry/error-reporter/reporter.js";
|
|
40
40
|
import { EDR_NETWORK_REVERT_SNAPSHOT_EVENT } from "../../../constants.js";
|
|
41
41
|
import { hardhatChainTypeToEdrChainType } from "../../../edr/chain-type.js";
|
|
42
42
|
import { getGlobalEdrContext } from "../../../edr/context.js";
|
|
@@ -87,7 +87,7 @@ export const DEFAULT_EDR_NETWORK_HD_ACCOUNTS_CONFIG_PARAMS: EdrNetworkDefaultHDA
|
|
|
87
87
|
export async function isDefaultEdrNetworkHDAccountsConfig(
|
|
88
88
|
accounts: EdrNetworkHDAccountsConfig,
|
|
89
89
|
): Promise<boolean> {
|
|
90
|
-
return deepEqual(
|
|
90
|
+
return await deepEqual(
|
|
91
91
|
{
|
|
92
92
|
...accounts,
|
|
93
93
|
mnemonic: await accounts.mnemonic.get(),
|
|
@@ -325,7 +325,7 @@ export class EdrProvider extends BaseProvider {
|
|
|
325
325
|
typeof jsonRpcResponse.result === "string",
|
|
326
326
|
"Invalid client version response",
|
|
327
327
|
);
|
|
328
|
-
return clientVersion(jsonRpcResponse.result);
|
|
328
|
+
return await clientVersion(jsonRpcResponse.result);
|
|
329
329
|
} else {
|
|
330
330
|
return jsonRpcResponse.result;
|
|
331
331
|
}
|
|
@@ -496,7 +496,7 @@ export class EdrProvider extends BaseProvider {
|
|
|
496
496
|
throw new UnknownError(error.message, error);
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
-
return this.#handleEdrResponse(
|
|
499
|
+
return await this.#handleEdrResponse(
|
|
500
500
|
edrResponse,
|
|
501
501
|
request.method,
|
|
502
502
|
Array.isArray(request.params) ? request.params : undefined,
|
|
@@ -79,7 +79,7 @@ export async function getGenesisStateAndOwnedAccounts(
|
|
|
79
79
|
return cached;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
return genesisStateAndAccountsCacheMutex.exclusiveRun(async () => {
|
|
82
|
+
return await genesisStateAndAccountsCacheMutex.exclusiveRun(async () => {
|
|
83
83
|
// We need to check again inside the mutex callback in case another async
|
|
84
84
|
// operation initialized it while we were waiting to acquire the mutex
|
|
85
85
|
const cachedAfterWaiting = genesisStateAndAccountsCache
|
|
@@ -281,7 +281,7 @@ export async function hardhatAccountsToEdrOwnedAccounts(
|
|
|
281
281
|
balance: account.balance,
|
|
282
282
|
}));
|
|
283
283
|
|
|
284
|
-
return Promise.all(accountPromises);
|
|
284
|
+
return await Promise.all(accountPromises);
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
export async function normalizeEdrNetworkAccountsConfig(
|
|
@@ -17,7 +17,7 @@ export default async (): Promise<Partial<HardhatRuntimeEnvironmentHooks>> => ({
|
|
|
17
17
|
networkManager = await createNetworkManager(hre, context);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
return networkManager.create(networkConnectionParams);
|
|
20
|
+
return await networkManager.create(networkConnectionParams);
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
async connect(networkConnectionParams) {
|
|
@@ -25,7 +25,7 @@ export default async (): Promise<Partial<HardhatRuntimeEnvironmentHooks>> => ({
|
|
|
25
25
|
networkManager = await createNetworkManager(hre, context);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
return networkManager.connect(networkConnectionParams);
|
|
28
|
+
return await networkManager.connect(networkConnectionParams);
|
|
29
29
|
},
|
|
30
30
|
|
|
31
31
|
async getOrCreate(networkOrParams) {
|
|
@@ -33,7 +33,7 @@ export default async (): Promise<Partial<HardhatRuntimeEnvironmentHooks>> => ({
|
|
|
33
33
|
networkManager = await createNetworkManager(hre, context);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
return networkManager.getOrCreate(networkOrParams);
|
|
36
|
+
return await networkManager.getOrCreate(networkOrParams);
|
|
37
37
|
},
|
|
38
38
|
|
|
39
39
|
async createServer(...params) {
|
|
@@ -41,7 +41,7 @@ export default async (): Promise<Partial<HardhatRuntimeEnvironmentHooks>> => ({
|
|
|
41
41
|
networkManager = await createNetworkManager(hre, context);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
return networkManager.createServer(...params);
|
|
44
|
+
return await networkManager.createServer(...params);
|
|
45
45
|
},
|
|
46
46
|
};
|
|
47
47
|
|
|
@@ -78,7 +78,7 @@ export default async (): Promise<Partial<NetworkHooks>> => {
|
|
|
78
78
|
updatedRequest = newRequestOrResponse;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
return next(context, networkConnection, updatedRequest);
|
|
81
|
+
return await next(context, networkConnection, updatedRequest);
|
|
82
82
|
},
|
|
83
83
|
|
|
84
84
|
async closeConnection<ChainTypeT extends ChainType | string>(
|
|
@@ -93,7 +93,7 @@ export default async (): Promise<Partial<NetworkHooks>> => {
|
|
|
93
93
|
requestHandlersPerConnection.delete(networkConnection);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
return next(context, networkConnection);
|
|
96
|
+
return await next(context, networkConnection);
|
|
97
97
|
},
|
|
98
98
|
};
|
|
99
99
|
|
|
@@ -224,7 +224,11 @@ export class HttpProvider extends BaseProvider {
|
|
|
224
224
|
retryCount,
|
|
225
225
|
);
|
|
226
226
|
if (this.#shouldRetryRequest(retryAfterSeconds, retryCount)) {
|
|
227
|
-
return this.#retry(
|
|
227
|
+
return await this.#retry(
|
|
228
|
+
jsonRpcRequest,
|
|
229
|
+
retryAfterSeconds,
|
|
230
|
+
retryCount,
|
|
231
|
+
);
|
|
228
232
|
}
|
|
229
233
|
|
|
230
234
|
// eslint-disable-next-line no-restricted-syntax -- allow throwing ProviderError
|
|
@@ -269,7 +273,7 @@ export class HttpProvider extends BaseProvider {
|
|
|
269
273
|
retryCount: number,
|
|
270
274
|
) {
|
|
271
275
|
await sleep(retryAfterSeconds);
|
|
272
|
-
return this.#fetchJsonRpcResponse(request, retryCount + 1);
|
|
276
|
+
return await this.#fetchJsonRpcResponse(request, retryCount + 1);
|
|
273
277
|
}
|
|
274
278
|
}
|
|
275
279
|
|
|
@@ -116,7 +116,11 @@ export class NetworkManagerImplementation implements NetworkManager {
|
|
|
116
116
|
"newConnection",
|
|
117
117
|
[],
|
|
118
118
|
async (_context) =>
|
|
119
|
-
this.#initializeNetworkConnection(
|
|
119
|
+
await this.#initializeNetworkConnection(
|
|
120
|
+
networkName,
|
|
121
|
+
chainType,
|
|
122
|
+
override,
|
|
123
|
+
),
|
|
120
124
|
);
|
|
121
125
|
|
|
122
126
|
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
@@ -131,7 +135,7 @@ export class NetworkManagerImplementation implements NetworkManager {
|
|
|
131
135
|
): Promise<NetworkConnection<ChainTypeT>> {
|
|
132
136
|
this.#connectCalled = true;
|
|
133
137
|
|
|
134
|
-
return this.create(networkOrParams);
|
|
138
|
+
return await this.create(networkOrParams);
|
|
135
139
|
}
|
|
136
140
|
|
|
137
141
|
public async getOrCreate<
|
|
@@ -170,7 +174,7 @@ export class NetworkManagerImplementation implements NetworkManager {
|
|
|
170
174
|
return cached as NetworkConnection<ChainTypeT>;
|
|
171
175
|
}
|
|
172
176
|
|
|
173
|
-
return this.#getOrCreateMutex.exclusiveRun(async () => {
|
|
177
|
+
return await this.#getOrCreateMutex.exclusiveRun(async () => {
|
|
174
178
|
// Double-check after acquiring the mutex — another call may have
|
|
175
179
|
// populated the cache while we were waiting.
|
|
176
180
|
const cachedAfterWaiting = this.#getOrCreateCache
|
|
@@ -260,7 +264,7 @@ export class NetworkManagerImplementation implements NetworkManager {
|
|
|
260
264
|
"network",
|
|
261
265
|
"onRequest",
|
|
262
266
|
[networkConnection, request],
|
|
263
|
-
async (_context, _connection, req) => defaultBehavior(req),
|
|
267
|
+
async (_context, _connection, req) => await defaultBehavior(req),
|
|
264
268
|
);
|
|
265
269
|
|
|
266
270
|
if (resolvedNetworkConfig.type === "edr-simulated") {
|
|
@@ -351,7 +355,7 @@ export class NetworkManagerImplementation implements NetworkManager {
|
|
|
351
355
|
|
|
352
356
|
const includeCallTraces = verbosityToIncludeTraces(this.#verbosity);
|
|
353
357
|
|
|
354
|
-
return EdrProvider.create({
|
|
358
|
+
return await EdrProvider.create({
|
|
355
359
|
chainDescriptors: this.#chainDescriptors,
|
|
356
360
|
// The resolvedNetworkConfig can have its chainType set to `undefined`
|
|
357
361
|
// so we default to the default chain type here.
|
|
@@ -375,7 +379,7 @@ export class NetworkManagerImplementation implements NetworkManager {
|
|
|
375
379
|
});
|
|
376
380
|
}
|
|
377
381
|
|
|
378
|
-
return HttpProvider.create({
|
|
382
|
+
return await HttpProvider.create({
|
|
379
383
|
url: await resolvedNetworkConfig.url.getUrl(),
|
|
380
384
|
networkName: resolvedNetworkName,
|
|
381
385
|
extraHeaders: resolvedNetworkConfig.httpHeaders,
|
|
@@ -384,7 +388,7 @@ export class NetworkManagerImplementation implements NetworkManager {
|
|
|
384
388
|
});
|
|
385
389
|
};
|
|
386
390
|
|
|
387
|
-
return NetworkConnectionImplementation.create(
|
|
391
|
+
return await NetworkConnectionImplementation.create(
|
|
388
392
|
this.#nextConnectionId++,
|
|
389
393
|
resolvedNetworkName,
|
|
390
394
|
resolvedChainType,
|
|
@@ -16,7 +16,7 @@ import chalk from "chalk";
|
|
|
16
16
|
// micro-eth-signer is known to be slow to load, so we lazy load it
|
|
17
17
|
let microEthSigner: typeof MicroEthSignerT | undefined;
|
|
18
18
|
|
|
19
|
-
import { sendErrorTelemetry } from "../../cli/telemetry/
|
|
19
|
+
import { sendErrorTelemetry } from "../../cli/telemetry/error-reporter/reporter.js";
|
|
20
20
|
import { isDefaultEdrNetworkHDAccountsConfig } from "../network-manager/edr/edr-provider.js";
|
|
21
21
|
import { normalizeEdrNetworkAccountsConfig } from "../network-manager/edr/utils/convert-to-edr.js";
|
|
22
22
|
|
|
@@ -46,7 +46,7 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
46
46
|
type: ArgumentType.INT,
|
|
47
47
|
defaultValue: -1,
|
|
48
48
|
})
|
|
49
|
-
.setAction(async () => import("./task-action.js"))
|
|
49
|
+
.setAction(async () => await import("./task-action.js"))
|
|
50
50
|
.build(),
|
|
51
51
|
],
|
|
52
52
|
dependencies: () => [import("../network-manager/index.js")],
|
|
@@ -14,7 +14,7 @@ const hardhatPlugin: HardhatPlugin = {
|
|
|
14
14
|
name: "noCompile",
|
|
15
15
|
description: "Do not compile the project before running the script",
|
|
16
16
|
})
|
|
17
|
-
.setAction(async () => import("./task-action.js"))
|
|
17
|
+
.setAction(async () => await import("./task-action.js"))
|
|
18
18
|
.build(),
|
|
19
19
|
],
|
|
20
20
|
dependencies: () => [import("../solidity/index.js")],
|
|
@@ -210,7 +210,9 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
|
|
|
210
210
|
f.endsWith(".sol"),
|
|
211
211
|
),
|
|
212
212
|
...this.#options.soliditySourcesPaths.map(async (dir) => {
|
|
213
|
-
return getAllFilesMatching(dir, (f) =>
|
|
213
|
+
return await getAllFilesMatching(dir, (f) =>
|
|
214
|
+
f.endsWith(".t.sol"),
|
|
215
|
+
);
|
|
214
216
|
}),
|
|
215
217
|
])
|
|
216
218
|
).flat(1);
|
|
@@ -228,7 +230,9 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
|
|
|
228
230
|
f.endsWith(".sol"),
|
|
229
231
|
),
|
|
230
232
|
...this.#options.soliditySourcesPaths.map(async (dir) => {
|
|
231
|
-
return getAllFilesMatching(dir, (f) =>
|
|
233
|
+
return await getAllFilesMatching(dir, (f) =>
|
|
234
|
+
f.endsWith(".t.sol"),
|
|
235
|
+
);
|
|
232
236
|
}),
|
|
233
237
|
])
|
|
234
238
|
).flat(1);
|
|
@@ -253,12 +257,12 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
|
|
|
253
257
|
): Promise<CompilationJobCreationError | Map<string, FileBuildResult>> {
|
|
254
258
|
this.#ensureSplitCompilationModeIfTestsScope(options?.scope);
|
|
255
259
|
|
|
256
|
-
return this.#hooks.runHandlerChain(
|
|
260
|
+
return await this.#hooks.runHandlerChain(
|
|
257
261
|
"solidity",
|
|
258
262
|
"build",
|
|
259
263
|
[rootFilePaths, options],
|
|
260
264
|
async (_context, nextRootFilePaths, nextOptions) =>
|
|
261
|
-
this.#build(nextRootFilePaths, nextOptions),
|
|
265
|
+
await this.#build(nextRootFilePaths, nextOptions),
|
|
262
266
|
);
|
|
263
267
|
}
|
|
264
268
|
|
|
@@ -308,8 +312,9 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
|
|
|
308
312
|
// NOTE: We precompute the build ids in parallel here, which are cached
|
|
309
313
|
// internally in each compilation job
|
|
310
314
|
await Promise.all(
|
|
311
|
-
runnableCompilationJobs.map(
|
|
312
|
-
runnableCompilationJob
|
|
315
|
+
runnableCompilationJobs.map(
|
|
316
|
+
async (runnableCompilationJob) =>
|
|
317
|
+
await runnableCompilationJob.getBuildId(),
|
|
313
318
|
),
|
|
314
319
|
);
|
|
315
320
|
|
|
@@ -539,7 +544,7 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
|
|
|
539
544
|
"getCompiler",
|
|
540
545
|
[compilerConfig],
|
|
541
546
|
async (_context, cfg) =>
|
|
542
|
-
getSolcCompilerForConfig(cfg, buildProfile.preferWasm),
|
|
547
|
+
await getSolcCompilerForConfig(cfg, buildProfile.preferWasm),
|
|
543
548
|
);
|
|
544
549
|
longVersion = compiler.longVersion;
|
|
545
550
|
longVersionMap.set(compilerConfig.version, longVersion);
|
|
@@ -805,7 +810,7 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
|
|
|
805
810
|
"getCompiler",
|
|
806
811
|
[runnableCompilationJob.solcConfig],
|
|
807
812
|
async (_context, cfg) =>
|
|
808
|
-
getSolcCompilerForConfig(cfg, buildProfile.preferWasm),
|
|
813
|
+
await getSolcCompilerForConfig(cfg, buildProfile.preferWasm),
|
|
809
814
|
);
|
|
810
815
|
|
|
811
816
|
log(
|
|
@@ -824,7 +829,7 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
|
|
|
824
829
|
"invokeSolc",
|
|
825
830
|
[compiler, input, runnableCompilationJob.solcConfig],
|
|
826
831
|
async (_context, nextCompiler, nextSolcInput) => {
|
|
827
|
-
return nextCompiler.compile(nextSolcInput);
|
|
832
|
+
return await nextCompiler.compile(nextSolcInput);
|
|
828
833
|
},
|
|
829
834
|
);
|
|
830
835
|
|
|
@@ -1165,7 +1170,7 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
|
|
|
1165
1170
|
preferWasm: false,
|
|
1166
1171
|
});
|
|
1167
1172
|
|
|
1168
|
-
return compiler.compile(buildInfo.input);
|
|
1173
|
+
return await compiler.compile(buildInfo.input);
|
|
1169
1174
|
}
|
|
1170
1175
|
|
|
1171
1176
|
async #downloadConfiguredCompilers(quiet = false): Promise<void> {
|
|
@@ -1200,8 +1205,12 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
|
|
|
1200
1205
|
);
|
|
1201
1206
|
}
|
|
1202
1207
|
|
|
1208
|
+
#isFatalError(error: CompilerOutputError): boolean {
|
|
1209
|
+
return error.type !== "Warning" && error.severity === "error";
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1203
1212
|
#hasCompilationErrors(output: CompilerOutput): boolean {
|
|
1204
|
-
return output.errors?.some((
|
|
1213
|
+
return output.errors?.some((e) => this.#isFatalError(e)) ?? false;
|
|
1205
1214
|
}
|
|
1206
1215
|
|
|
1207
1216
|
/**
|
|
@@ -1314,7 +1323,7 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
|
|
|
1314
1323
|
console.log();
|
|
1315
1324
|
|
|
1316
1325
|
for (const error of filteredErrors) {
|
|
1317
|
-
if (error
|
|
1326
|
+
if (this.#isFatalError(error)) {
|
|
1318
1327
|
const errorMessage: string =
|
|
1319
1328
|
this.#getFormattedInternalCompilerErrorMessage(error) ??
|
|
1320
1329
|
error.formattedMessage ??
|
|
@@ -92,7 +92,7 @@ export class CompilationJobImplementation implements CompilationJob {
|
|
|
92
92
|
// instrument the project file content when coverage feature is enabled.
|
|
93
93
|
// We pass some additional data via the chain - i.e. the input source name and solc
|
|
94
94
|
// version - but we expect any handlers to pass them on as-is without modification.
|
|
95
|
-
return this.#hooks.runHandlerChain(
|
|
95
|
+
return await this.#hooks.runHandlerChain(
|
|
96
96
|
"solidity",
|
|
97
97
|
"preprocessProjectFileBeforeBuilding",
|
|
98
98
|
[file.inputSourceName, file.fsPath, file.content.text, solcVersion],
|
|
@@ -195,7 +195,7 @@ export class CompilerDownloaderImplementation implements CompilerDownloader {
|
|
|
195
195
|
|
|
196
196
|
const downloadPath = this.#getCompilerBinaryPathFromBuild(build);
|
|
197
197
|
|
|
198
|
-
return exists(downloadPath);
|
|
198
|
+
return await exists(downloadPath);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
public async downloadCompiler(version: string): Promise<boolean> {
|
|
@@ -208,7 +208,7 @@ export class CompilerDownloaderImplementation implements CompilerDownloader {
|
|
|
208
208
|
path.join(this.#compilersDir, `compiler-download-${version}`),
|
|
209
209
|
);
|
|
210
210
|
|
|
211
|
-
return mutex.use(async () => {
|
|
211
|
+
return await mutex.use(async () => {
|
|
212
212
|
const isCompilerDownloaded = await this.isCompilerDownloaded(version);
|
|
213
213
|
|
|
214
214
|
if (isCompilerDownloaded === true) {
|
|
@@ -240,7 +240,7 @@ export class CompilerDownloaderImplementation implements CompilerDownloader {
|
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
242
|
|
|
243
|
-
return this.#postProcessCompilerDownload(build, downloadPath);
|
|
243
|
+
return await this.#postProcessCompilerDownload(build, downloadPath);
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
|
|
@@ -295,7 +295,7 @@ export class CompilerDownloaderImplementation implements CompilerDownloader {
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
async #readCompilerList(listPath: string): Promise<CompilerList> {
|
|
298
|
-
return readJsonFile(listPath);
|
|
298
|
+
return await readJsonFile(listPath);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
#getCompilerDownloadPathFromBuild(build: CompilerBuild): string {
|
|
@@ -124,10 +124,10 @@ export async function getCompiler(
|
|
|
124
124
|
): Promise<Compiler> {
|
|
125
125
|
if (compilerPath !== undefined) {
|
|
126
126
|
// If a compiler path is provided, it means the user is using a custom compiler
|
|
127
|
-
return getCompilerFromPath(version, compilerPath);
|
|
127
|
+
return await getCompilerFromPath(version, compilerPath);
|
|
128
128
|
} else {
|
|
129
129
|
// Otherwise we get or download the compiler for the specific version
|
|
130
|
-
return getCompilerFromVersion(version, { preferWasm });
|
|
130
|
+
return await getCompilerFromVersion(version, { preferWasm });
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -6,7 +6,7 @@ async function readStream(
|
|
|
6
6
|
): Promise<string> {
|
|
7
7
|
stream.setEncoding(encoding);
|
|
8
8
|
|
|
9
|
-
return new Promise((resolve, reject) => {
|
|
9
|
+
return await new Promise((resolve, reject) => {
|
|
10
10
|
let data = "";
|
|
11
11
|
|
|
12
12
|
stream.on("data", (chunk) => (data += chunk.toString(encoding)));
|
|
@@ -33,7 +33,7 @@ export async function buildDependencyGraph(
|
|
|
33
33
|
"readNpmPackageRemappings",
|
|
34
34
|
[packageName, packageVersion, packagePath],
|
|
35
35
|
async (_context, name, version, path) =>
|
|
36
|
-
defaultBehavior(name, version, path),
|
|
36
|
+
await defaultBehavior(name, version, path),
|
|
37
37
|
);
|
|
38
38
|
|
|
39
39
|
const resolver = await ResolverImplementation.create(
|