hardhat.config.ts 1.1 KB
Newer Older
1 2 3 4
import { HardhatUserConfig } from 'hardhat/types'

// Hardhat plugins
import '@nomiclabs/hardhat-ethers'
5
import '@nomiclabs/hardhat-waffle'
6
import 'hardhat-gas-reporter'
7
import './tasks/check-block-hashes'
8
import { envConfig } from './test/shared/utils'
9 10

const enableGasReport = !!process.env.ENABLE_GAS_REPORT
11 12

const config: HardhatUserConfig = {
13 14
  networks: {
    optimism: {
15
      url: process.env.L2_URL || 'http://localhost:8545',
16 17 18
    },
  },
  mocha: {
19 20
    timeout: envConfig.MOCHA_TIMEOUT,
    bail: envConfig.MOCHA_BAIL,
21
  },
22
  solidity: {
23 24 25 26
    compilers: [
      {
        version: '0.7.6',
        settings: {},
27
      },
28 29 30 31 32 33 34 35 36 37 38 39
      {
        version: '0.8.9',
        settings: {
          optimizer: { enabled: true, runs: 200 },
          metadata: {
            bytecodeHash: 'none',
          },
          outputSelection: {
            '*': {
              '*': ['storageLayout'],
            },
          },
40 41
        },
      },
42
    ],
43
  },
44 45 46 47 48 49
  gasReporter: {
    enabled: enableGasReport,
    currency: 'USD',
    gasPrice: 100,
    outputFile: process.env.CI ? 'gas-report.txt' : undefined,
  },
50 51 52
}

export default config