File tree Expand file tree Collapse file tree 1 file changed +22
-6
lines changed
v-next/hardhat/src/internal/builtin-plugins/solidity Expand file tree Collapse file tree 1 file changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -341,12 +341,28 @@ function resolveSolcConfig(
341
341
} ;
342
342
}
343
343
344
- function copyFromDefault <
345
- T extends SingleVersionSolidityUserConfig | MultiVersionSolidityUserConfig ,
346
- > ( defaultSolidityConfig : T ) : T {
344
+ function copyFromDefault (
345
+ defaultSolidityConfig :
346
+ | SingleVersionSolidityUserConfig
347
+ | MultiVersionSolidityUserConfig ,
348
+ ) : SingleVersionSolidityUserConfig | MultiVersionSolidityUserConfig {
349
+ if ( "version" in defaultSolidityConfig ) {
350
+ return {
351
+ version : defaultSolidityConfig . version ,
352
+ } ;
353
+ }
354
+
347
355
return {
348
- ...defaultSolidityConfig ,
349
- isolated : undefined ,
350
- preferWasm : undefined ,
356
+ compilers : defaultSolidityConfig . compilers . map ( ( c ) => ( {
357
+ version : c . version ,
358
+ } ) ) ,
359
+ overrides : Object . fromEntries (
360
+ Object . entries ( defaultSolidityConfig . overrides ?? { } ) . map (
361
+ ( [ userSourceName , override ] ) => [
362
+ userSourceName ,
363
+ { version : override . version } ,
364
+ ] ,
365
+ ) ,
366
+ ) ,
351
367
} ;
352
368
}
You can’t perform that action at this time.
0 commit comments