Skip to content

Commit 57d1075

Browse files
committed
Address new PR comments — introduce mapped types and deprecate old ones
1 parent 1aab861 commit 57d1075

File tree

7 files changed

+589
-323
lines changed

7 files changed

+589
-323
lines changed

.changeset/cold-deer-buy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
"hardhat": patch
33
---
44

5-
Introduce multi-compiler abstraction with SolidityCompilerConfig base interface
5+
Introduce multi-compiler abstraction that allows plugins to define new Solidity compiler types ([#8008](https://github.com/NomicFoundation/hardhat/pull/8008)).

.changeset/tall-seals-report.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@nomicfoundation/hardhat-errors": patch
3+
"hardhat": patch
4+
---
5+
6+
Introduce the `ConfigHooks#validateResolvedConfig` hook and the `HardhatConfigValidationError` type to be able to run global validations on the resolved config ([#8008](https://github.com/NomicFoundation/hardhat/pull/8008)).

v-next/hardhat/src/internal/builtin-plugins/solidity/build-system/build-system.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { DependencyGraphImplementation } from "./dependency-graph.js";
33
import type { Artifact } from "../../../../types/artifacts.js";
44
import type {
55
SolidityCompilerConfig,
6-
SolcConfig,
6+
SolcSolidityCompilerConfig,
77
SolidityConfig,
88
} from "../../../../types/config.js";
99
import type { HookManager } from "../../../../types/hooks.js";
@@ -83,11 +83,11 @@ import { shouldSuppressWarning } from "./warning-suppression.js";
8383
const log = debug("hardhat:core:solidity:build-system");
8484

8585
/**
86-
* Returns true if the given compiler config is a SolcConfig.
86+
* Returns true if the given compiler config is a SolcSolidityCompilerConfig.
8787
*/
88-
export function isSolcConfig(
88+
export function isSolcSolidityCompilerConfig(
8989
config: SolidityCompilerConfig,
90-
): config is SolcConfig {
90+
): config is SolcSolidityCompilerConfig {
9191
return config.type === undefined || config.type === "solc";
9292
}
9393

@@ -99,7 +99,7 @@ function resolvePreferWasm(
9999
compilerConfig: SolidityCompilerConfig,
100100
buildProfilePreferWasm: boolean,
101101
): boolean {
102-
if (isSolcConfig(compilerConfig)) {
102+
if (isSolcSolidityCompilerConfig(compilerConfig)) {
103103
return compilerConfig.preferWasm ?? buildProfilePreferWasm;
104104
}
105105
return false;

0 commit comments

Comments
 (0)