Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix network clone in extendConfig
  • Loading branch information
cgewecke committed Apr 5, 2024
commit ac4a0b34f6998a867777c5ca549897908c3f80c1
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"global-modules": "^2.0.0",
"globby": "^10.0.1",
"jsonschema": "^1.2.4",
"lodash": "^4.17.15",
"lodash": "^4.17.21",
"mocha": "^10.2.0",
"node-emoji": "^1.10.0",
"pify": "^4.0.1",
Expand Down
3 changes: 2 additions & 1 deletion plugins/hardhat.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ const ui = new PluginUI();
// Workaround for hardhat-viem-plugin and other provider redefinition conflicts
extendConfig((config, userConfig) => {
if (Boolean(process.env.SOLIDITY_COVERAGE)) {
const { cloneDeep } = require("lodash");
const { configureHardhatEVMGas } = require('./resources/nomiclabs.utils');
const API = require('./../lib/api');
const api = new API({});

let hardhatNetworkForCoverage = {};
if (userConfig.networks && userConfig.networks.hardhat) {
hardhatNetworkForCoverage = structuredClone(userConfig.networks.hardhat);
hardhatNetworkForCoverage = cloneDeep(userConfig.networks.hardhat);
};

configureHardhatEVMGas(hardhatNetworkForCoverage, api);
Expand Down
10 changes: 5 additions & 5 deletions test/sources/projects/viem/hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ require(__dirname + "/../plugins/nomiclabs.plugin");
require("@nomicfoundation/hardhat-viem");

module.exports = {
networks: {
hardhat: {
gasPrice: 50_000_000_000
}
},
solidity: {
version: "0.8.17",
networks: {
hardhat: {
gasPrice: 50_000_000_000
}
},
settings: {
optimizer: {
enabled: true
Expand Down