How to use the solc/package.json.version function in solc

To help you get started, we’ve selected a few solc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nomiclabs / buidler / test / helpers / compiler.ts View on Github external
export function getLocalCompilerVersion(): string {
  return require("solc/package.json").version;
}
github nomiclabs / buidler / packages / buidler-core / src / internal / core / config / default-config.ts View on Github external
privateKey:
        "0x28d1bfbbafe9d1d4f5a11c3c16ab6bf9084de48d99fbac4058bdfa3c80b2908e",
      balance: "10000000000000000000000"
    },
    {
      privateKey:
        "0x28d1bfbbafe9d1d4f5a11c3c16ab6bf9084de48d99fbac4058bdfa3c80b2908f",
      balance: "10000000000000000000000"
    }
  ]
};

const defaultConfig: BuidlerConfig = {
  defaultNetwork: BUIDLEREVM_NETWORK_NAME,
  solc: {
    version: require("solc/package.json").version,
    optimizer: {
      enabled: false,
      runs: 200
    }
  },
  networks: {
    [BUIDLEREVM_NETWORK_NAME]: DEFAULT_BUIDLER_NETWORK_CONFIG,
    localhost: {
      url: "http://127.0.0.1:8545"
    }
  },
  analytics: {
    enabled: true
  },
  mocha: {
    timeout: 20000
github nomiclabs / buidler / packages / buidler-core / src / internal / solidity / compiler / index.ts View on Github external
private static _getLocalSolcVersion(): string {
    return require("solc/package.json").version;
  }