File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/ethereum-contracts Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {config as dotenvConfig} from "dotenv";
1313import { NetworkUserConfig } from "hardhat/types" ;
1414import "solidity-docgen" ;
1515import { relative } from "path" ;
16+ import { execSync } from 'child_process' ;
1617
1718try {
1819 dotenvConfig ( ) ;
@@ -28,14 +29,19 @@ subtask(TASK_COMPILE_SOLIDITY_GET_SOLC_BUILD).setAction(
2829 async ( args , hre , runSuper ) => {
2930 console . log ( "subtask TASK_COMPILE_SOLIDITY_GET_SOLC_BUILD" ) ;
3031 if ( process . env . SOLC !== undefined ) {
32+ const versionOutput = execSync ( `${ process . env . SOLC } --version` , { encoding : 'utf8' } ) . trim ( ) ;
33+ const longVersion = versionOutput . match ( / V e r s i o n : ( .+ ) / ) ?. [ 1 ] || `${ args . solcVersion } +commit.unknown.Linux.g++` ;
3134 console . log (
3235 "Using Solidity compiler set in SOLC:" ,
33- process . env . SOLC
36+ process . env . SOLC ,
37+ ", longVersion:" ,
38+ longVersion
3439 ) ;
3540 return {
3641 compilerPath : process . env . SOLC ,
3742 isSolcJs : false , // false for native compiler
3843 version : args . solcVersion ,
44+ longVersion,
3945 } ;
4046 } else {
4147 // fall back to the default
You can’t perform that action at this time.
0 commit comments