Stop overwriting forking config in extendConfig (#893)

master
cgewecke 3 months ago committed by GitHub
parent fcf858f54a
commit df1df120d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 7
      plugins/hardhat.plugin.js

@ -24,16 +24,11 @@ const ui = new PluginUI();
// Workaround for hardhat-viem-plugin and other provider redefinition conflicts // Workaround for hardhat-viem-plugin and other provider redefinition conflicts
extendConfig((config, userConfig) => { extendConfig((config, userConfig) => {
if (Boolean(process.env.SOLIDITY_COVERAGE)) { if (Boolean(process.env.SOLIDITY_COVERAGE)) {
const { cloneDeep } = require("lodash");
const { configureHardhatEVMGas } = require('./resources/nomiclabs.utils'); const { configureHardhatEVMGas } = require('./resources/nomiclabs.utils');
const API = require('./../lib/api'); const API = require('./../lib/api');
const api = new API({}); const api = new API({});
let hardhatNetworkForCoverage = {}; const hardhatNetworkForCoverage = {};
if (userConfig.networks && userConfig.networks.hardhat) {
hardhatNetworkForCoverage = cloneDeep(userConfig.networks.hardhat);
};
configureHardhatEVMGas(hardhatNetworkForCoverage, api); configureHardhatEVMGas(hardhatNetworkForCoverage, api);
config.networks.hardhat = Object.assign(config.networks.hardhat, hardhatNetworkForCoverage); config.networks.hardhat = Object.assign(config.networks.hardhat, hardhatNetworkForCoverage);
} }

Loading…
Cancel
Save