import '@nomiclabs/hardhat-ethers' import '@nomiclabs/hardhat-etherscan' import 'hardhat-deploy' import 'hardhat-gas-reporter' import 'solidity-coverage' import '@typechain/hardhat' import 'hardhat-storage-layout' import { config as dotenvConfig } from 'dotenv' import { resolve } from 'path' const dotenvConfigPath: string = process.env.DOTENV_CONFIG_PATH || './.env' dotenvConfig({ path: resolve(__dirname, dotenvConfigPath) }) const accounts = { mnemonic: 'test test test test test test test test test test test test', } const config = { solidity: { overrides: {}, compilers: [ { version: '0.8.19', settings: { optimizer: { enabled: true, runs: 200, details: { yul: false } }, outputSelection: { '*': { '*': ['storageLayout'], }, }, }, } ], }, networks: { mainnet: { url: 'https://eth.llamarpc.com', accounts, gas: 'auto', gasPrice: 'auto', gasMultiplier: 1.3, timeout: 100000 }, localhost: { url: 'http://127.0.0.1:8545', accounts, gas: 'auto', gasPrice: 'auto', gasMultiplier: 1.3, timeout: 100000 }, hardhat: { forking: { enabled: true, blockNumber: 17468516, url: 'https://eth.llamarpc.com', }, accounts, gas: 'auto', gasPrice: 'auto', gasMultiplier: 1.3, chainId: 1337, mining: { auto: true, interval: 2000 } }, bsc: { url: 'https://rpc.ankr.com/bsc', accounts, chainId: 56, gas: 'auto', gasPrice: 'auto', gasMultiplier: 1.3, timeout: 100000 }, chapel: { url: 'https://bsctestapi.terminet.io/rpc', accounts, chainId: 97, gas: 'auto', gasPrice: 'auto', gasMultiplier: 1.3, timeout: 100000 }, goerli: { url: `https://goerli.infura.io/v3/${process.env.INFURA_API_KEY}`, accounts, chainId: 5, gas: 'auto', gasPrice: 'auto', gasMultiplier: 1.3, timeout: 100000 }, polygon: { url: 'https://rpc-mainnet.matic.network', accounts, gas: 'auto', gasPrice: 'auto', gasMultiplier: 1.3, timeout: 100000 }, mumbai: { url: 'https://rpc.ankr.com/polygon_mumbai', accounts, gas: 'auto', gasPrice: 'auto', gasMultiplier: 1.3, timeout: 100000 } }, etherscan: { apiKey: { mainnet: process.env.APIKEY_MAINNET!, bsc: process.env.APIKEY_BSC!, polygon: process.env.APIKEY_POLYGON!, goerli: process.env.APIKEY_GOERLI!, bscTestnet: process.env.APIKEY_CHAPEL!, polygonMumbai: process.env.APIKEY_MUMBAI! } }, paths: { deploy: 'deploy', artifacts: 'artifacts', cache: 'cache', sources: 'contracts', tests: 'test' }, gasReporter: { currency: 'USD', gasPrice: 100, enabled: process.env.REPORT_GAS ? true : false, coinmarketcap: process.env.COINMARKETCAP_API_KEY, maxMethodDiff: 10, }, typechain: { outDir: 'types', target: 'ethers-v5', }, mocha: { timeout: 0, } } export default config