Skip to content

Commit 6c883c3

Browse files
committed
feat: add default outputSelection to all build profiles
1 parent cee9e9d commit 6c883c3

File tree

1 file changed

+20
-2
lines changed
  • v-next/hardhat/src/internal/builtin-plugins/solidity

1 file changed

+20
-2
lines changed

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

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import type {
1111
} from "../../../types/config.js";
1212
import type { HardhatUserConfigValidationError } from "../../../types/hooks.js";
1313

14-
import { isObject } from "@nomicfoundation/hardhat-utils/lang";
14+
import { deepMerge, isObject } from "@nomicfoundation/hardhat-utils/lang";
1515
import { resolveFromRoot } from "@nomicfoundation/hardhat-utils/path";
1616
import {
1717
conditionalUnionType,
@@ -303,8 +303,26 @@ function resolveBuildProfileConfig(
303303
}
304304

305305
function resolveSolcConfig(solcConfig: SolcUserConfig): SolcConfig {
306+
const DEFAULT_SOLC_CONFIG_SETTINGS: SolcConfig["settings"] = {
307+
outputSelection: {
308+
"*": {
309+
"": ["ast"],
310+
"*": [
311+
"abi",
312+
"evm.bytecode",
313+
"evm.deployedBytecode",
314+
"evm.methodIdentifiers",
315+
"metadata",
316+
],
317+
},
318+
},
319+
};
320+
306321
return {
307322
version: solcConfig.version,
308-
settings: solcConfig.settings ?? {},
323+
settings: deepMerge(
324+
DEFAULT_SOLC_CONFIG_SETTINGS,
325+
solcConfig.settings ?? {},
326+
),
309327
};
310328
}

0 commit comments

Comments
 (0)