Skip to content

Conversation

@outdoteth
Copy link
Contributor

@outdoteth outdoteth commented Jul 27, 2021

Fixes #624, fixes #640, and fixes wighawag/hardhat-deploy#132

There is another PR opened here for the same issue #643 but the owner has not responded to the any comments for 6 days now so I thought I would address the issues in his PR and fix it myself.

By changing it so that the network config object is only modified instead of replaced we can ensure other existing plugins which have also modified the network config will have their changes persisted instead of being overwritten.

Object.assign also keeps the original reference of the object, so that if any other variables in other plugins are referencing the network object, their references will remain valid (this was the issue in the other PR^^ which needed fixing).


I also added a fix for the "Berlin network error" by bumping the hardhat version (which uses Berlin as the default now):

Screenshot 2021-07-27 at 19 30 42

@outdoteth outdoteth changed the title Remove network replacement and modify instead Remove replacement of network config and modify it instead Jul 27, 2021
@outdoteth
Copy link
Contributor Author

cc @wighawag

@outdoteth outdoteth changed the title Remove replacement of network config and modify it instead Fix hardhat-deploy compatibility Jul 27, 2021
@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2021

Codecov Report

Merging #647 (9e05c0b) into master (f0aa876) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #647   +/-   ##
=======================================
  Coverage   98.68%   98.68%           
=======================================
  Files          22       22           
  Lines         986      986           
=======================================
  Hits          973      973           
  Misses         13       13           
Impacted Files Coverage Δ
plugins/resources/nomiclabs.utils.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f0aa876...9e05c0b. Read the comment docs.

@outdoteth outdoteth force-pushed the fix-network-modification branch 2 times, most recently from f3c7394 to 81ce0a6 Compare July 27, 2021 18:41
@outdoteth outdoteth force-pushed the fix-network-modification branch from 0ad71ee to 2894cee Compare July 27, 2021 18:50
@wighawag
Copy link

Looks good
@cgewecke any plan to get this merged somehow ?

Copy link
Member

@cgewecke cgewecke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you.

@cgewecke cgewecke merged commit bc19ef9 into sc-forks:master Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

can not use with 'hardhat-deploy' hardhat-deploy doesn't work with solidity-coverage solidity-coverage hardhat plugin override the network object

4 participants