From ad4f60764361881f1406c16baed1f8b0d2e14c9b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 9 Mar 2018 15:31:19 +0100 Subject: Move compiler URL to constants --- packages/deployer/src/compiler.ts | 2 +- packages/deployer/src/utils/constants.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/deployer') diff --git a/packages/deployer/src/compiler.ts b/packages/deployer/src/compiler.ts index b7919e254..080188f91 100644 --- a/packages/deployer/src/compiler.ts +++ b/packages/deployer/src/compiler.ts @@ -196,7 +196,7 @@ export class Compiler { solcjs = fs.readFileSync(compilerBinFilename).toString(); } else { utils.consoleLog(`Downloading ${fullSolcVersion}...`); - const url = `https://ethereum.github.io/solc-bin/bin/${fullSolcVersion}`; + const url = `${constants.BASE_COMPILER_URL}${fullSolcVersion}`; const response = await fetch(url); if (response.status !== 200) { throw new Error(`Failed to load ${fullSolcVersion}`); diff --git a/packages/deployer/src/utils/constants.ts b/packages/deployer/src/utils/constants.ts index 85923448f..6f9dfb994 100644 --- a/packages/deployer/src/utils/constants.ts +++ b/packages/deployer/src/utils/constants.ts @@ -1,3 +1,4 @@ export const constants = { SOLIDITY_FILE_EXTENSION: '.sol', + BASE_COMPILER_URL: 'https://ethereum.github.io/solc-bin/bin/', }; -- cgit v1.2.3