-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
solidity-coverage hardhat plugin override the network object #624
Comments
Yes definitely, will fix. |
@wighawag From your perspective, is the correct way to do this to merge with the existing properties on e.g env.network = Object.assign({
name: networkName,
config: networkConfig,
provider: provider,
isHardhatEVM: isHardhatEVM
}, env.network) Or is this not enough? What modifications are you making on your end? |
Yes that would work. I am adding extra field to the network object that deploy scripts can then used to perform different things depending on their values: {tags, live, saveDeployments}. But there was actually a bigger issue for hardhat-deploy. This is I think a general problem with hardhat plugin api where it is not clear for plugin at what point they get called in relation to other plugins, hence why I created : NomicFoundation/hardhat#1374 I fixed it in hardhat-deploy by storing a lazyObject to the provider. This allow solidity-coverage to replace it and hadhat-deploy to get the modified version when it is actually needed |
This line override the hre.network object :
solidity-coverage/plugins/resources/nomiclabs.utils.js
Lines 136 to 141 in 3c0f3a5
This conflict with plugins that add field to the network object. (an example of such plugin is
hardhat-deploy
)solidity-coverage should keep existing configuration.
The text was updated successfully, but these errors were encountered: