Skip to content
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

Add extendConfig logic for hardhat-viem plugin #883

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

cgewecke
Copy link
Member

@cgewecke cgewecke commented Apr 5, 2024

#874, #819

PR adds logic to support the hardhat-viem plugin. If you run the env variable set as below it will configure the hardhat network correctly in the extendConfig hook and skip provider redefinition at the task level.

SOLIDITY_COVERAGE=true npx hardhat coverage

This approach is necessary because there's no way to know from within extendConfig whether the coverage task is actually being run and therefore no safe way to redefine the network settings.

If viem is defined in the hardhat environment and the network has not been set with the correct defaults, an error is thrown:

Screen Shot 2024-04-05 at 1 41 43 PM

@codecov-commenter
Copy link

codecov-commenter commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.61%. Comparing base (011ee40) to head (ac4a0b3).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #883      +/-   ##
==========================================
+ Coverage   96.45%   96.61%   +0.15%     
==========================================
  Files          19       19              
  Lines        1045     1062      +17     
==========================================
+ Hits         1008     1026      +18     
+ Misses         37       36       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cgewecke cgewecke merged commit 09a7c83 into master Apr 5, 2024
3 checks passed
@cgewecke cgewecke deleted the add-extend-config-support branch April 5, 2024 21:42
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.

2 participants