-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Run gas report and coverage in e2e #4961
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi @schaable, @ChristopherDedominici Just leaving a few notes b/c I looked at this recently. The gas reporter is also broken for viem but that problem will be resolved in the next major version which is adding necessary logic and migrating to the new I'm not certain but for coverage I think the issue might come from a conflict caused by:
Coverage needs to initialize the VM to certain values - would like to do this in an extendConfig((config: HardhatConfig, userConfig: Readonly<HardhatUserConfig>, [...here...]) |
Update: The gas reporter issues with viem are fixed in the latest release there: https://github.com/cgewecke/hardhat-gas-reporter/releases/tag/v2.0.0 The problems with solidity-coverage will require some kind of fix here I think....or possibly both places. Just lmk. |
Another note...I think if the viem plugin followed the same strategy as the ethers plugin and passed See... hardhat/packages/hardhat-ethers/src/internal/index.ts Lines 31 to 50 in ef367a4
|
Another update... In the latest version of solidity-coverage (v0.8.12) there is a work-around for viem. Coverage will configure the provider via
If coverage detects |
The e2e workflow should fail with this change. For some reason,
npx hardhat coverage
doesn't work with the viem-based sample project. As part of this PR, we should fix that.