diff --git a/hardhat.config.ts b/hardhat.config.ts index 26d3256..31b9ed5 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -1,42 +1,10 @@ import 'dotenv/config'; import '@nomicfoundation/hardhat-toolbox'; -import { removeConsoleLog } from 'hardhat-preprocessor'; import 'hardhat-deploy'; -import { HardhatUserConfig, MultiSolcUserConfig, NetworksUserConfig } from 'hardhat/types'; -import * as env from './utils/env'; +import { HardhatUserConfig } from 'hardhat/types'; import 'tsconfig-paths/register'; -const networks: NetworksUserConfig = - env.isHardhatCompile() || env.isHardhatClean() || env.isTesting() - ? {} - : { - hardhat: { - forking: { - enabled: process.env.FORK ? true : false, - url: env.getNodeUrl('ethereum'), - }, - }, - kovan: { - url: env.getNodeUrl('kovan'), - accounts: env.getAccounts('kovan'), - }, - ethereum: { - url: env.getNodeUrl('ethereum'), - accounts: env.getAccounts('ethereum'), - }, - }; - const config: HardhatUserConfig = { - defaultNetwork: 'hardhat', - namedAccounts: { - deployer: { - default: 0, - }, - }, - mocha: { - timeout: process.env.MOCHA_TIMEOUT || 300000, - }, - networks, solidity: { compilers: [ { @@ -50,18 +18,7 @@ const config: HardhatUserConfig = { }, ], }, - gasReporter: { - currency: process.env.COINMARKETCAP_DEFAULT_CURRENCY, - coinmarketcap: process.env.COINMARKETCAP_API_KEY, - showMethodSig: true, - onlyCalledMethods: false, - }, - preprocess: { - eachLine: removeConsoleLog((hre) => hre.network.name !== 'hardhat'), - }, - etherscan: { - apiKey: env.getEtherscanAPIKeys(['ethereum']), - }, + defaultNetwork: 'hardhat', typechain: { outDir: 'typechained', target: 'ethers-v5', @@ -71,17 +28,4 @@ const config: HardhatUserConfig = { }, }; -if (env.isTesting()) { - (config.solidity as MultiSolcUserConfig).compilers = (config.solidity as MultiSolcUserConfig).compilers.map((compiler) => { - return { - ...compiler, - outputSelection: { - '*': { - '*': ['storageLayout'], - }, - }, - }; - }); -} - export default config;