Skip to content

Commit 942b0a7

Browse files
committed
Address PR feedback
1 parent d411b70 commit 942b0a7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.changeset/nine-lies-press.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
"@nomicfoundation/hardhat-verify": patch
32
"@nomicfoundation/hardhat-utils": patch
43
"hardhat": patch
54
---

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
336336
let solcLongVersion = solcVersionToLongVersion.get(solcConfig.version);
337337

338338
if (solcLongVersion === undefined) {
339-
const compiler = await getCompiler(solcConfig.version, false);
339+
const compiler = await getCompiler(solcConfig.version, {
340+
preferWasm: false,
341+
});
340342
solcLongVersion = compiler.longVersion;
341343
solcVersionToLongVersion.set(solcConfig.version, solcLongVersion);
342344
}
@@ -496,8 +498,7 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
496498
return { compilationJobsPerFile, indexedIndividualJobs };
497499
}
498500

499-
#getBuildProfile(_buildProfileName?: string) {
500-
const buildProfileName = _buildProfileName ?? DEFAULT_BUILD_PROFILE;
501+
#getBuildProfile(buildProfileName: string = DEFAULT_BUILD_PROFILE) {
501502
const buildProfile =
502503
this.#options.solidityConfig.profiles[buildProfileName];
503504

@@ -531,7 +532,7 @@ export class SolidityBuildSystemImplementation implements SolidityBuildSystem {
531532

532533
const compiler = await getCompiler(
533534
runnableCompilationJob.solcConfig.version,
534-
buildProfile.preferWasm,
535+
{ preferWasm: buildProfile.preferWasm },
535536
);
536537

537538
log(

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ export async function downloadConfiguredCompilers(
7979

8080
export async function getCompiler(
8181
version: string,
82-
preferWasm: boolean,
82+
{ preferWasm }: { preferWasm: boolean },
8383
): Promise<Compiler> {
84-
if (preferWasm === false) {
84+
if (!preferWasm) {
8585
const platform = CompilerDownloaderImplementation.getCompilerPlatform();
8686
const compilerDownloader = new CompilerDownloaderImplementation(
8787
platform,

0 commit comments

Comments
 (0)