From 6ebe1373d5bc0f004c0d27285395a538ba9acaeb Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Thu, 30 Jun 2022 15:04:13 +0530 Subject: [PATCH] update commands --- libs/remixd/src/services/slitherClient.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/libs/remixd/src/services/slitherClient.ts b/libs/remixd/src/services/slitherClient.ts index d26d7d4aa4..ced33423bf 100644 --- a/libs/remixd/src/services/slitherClient.ts +++ b/libs/remixd/src/services/slitherClient.ts @@ -27,21 +27,26 @@ export class SlitherClient extends PluginClient { install (): void { try { - console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: slither requires Python3.6+ (pip3) and solc, the Solidity compiler. They should be installed on your system`) - console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: solc-select will be installed along with Slither to manage setting different solc compiler versions.`) + const solcVersion = '0.8.15' + console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: requires Python3.6+ (pip3) to be installed on your system`) + console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: solc-select will be installed along with Slither to set different solc compiler versions.`) const options = { cwd: this.currentSharedFolder, shell: true } console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: checking pip3 availability ...`) const pip3OP = execSync('pip3 --version', options) console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: pip3 found: ${pip3OP.toString()}`) - console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: checking solc availability...`) - const solcOP = execSync('solc --version', options) - console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: solc found: ${solcOP.toString()}`) console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: installing slither...`) const slitherOP = execSync('pip3 install slither-analyzer', options) console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: slither installation output: ${slitherOP.toString()}`) console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: installing solc-select...`) const solcSelectOP = execSync('pip3 install solc-select', options) console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: solc-select installation output: ${solcSelectOP.toString()}`) + console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: installing solc ${solcVersion}...`) + const solcInstallOP = execSync(`solc-select install ${solcVersion}`, options) + console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: solc installation output: ${solcInstallOP.toString()}`) + console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: setting solc version to ${solcVersion}...`) + const solcUseOP = execSync(`solc-select use ${solcVersion}`, options) + console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: solc setting installation output: ${solcUseOP.toString()}`) + console.log('\x1b[32m%s\x1b[0m', `[Slither Installation]: Slither is ready to use!`) } catch (err) { console.log('\x1b[31m%s\x1b[0m', `[Slither Installation]: Error occured: ${err}`) }