Closed muhammetaliakbay closed 5 months ago
A PR (https://github.com/cgewecke/hardhat-gas-reporter/pull/156) introducing a patch for adding viem
support is ready to be reviewed.
@muhammetaliakbay Has written a nice patch for this problem which is published at the viem tag. You can install it with
npm install --save-dev hardhat-gas-reporter@viem
⚠️ Important: for the plugin to work correctly, it must be listed before the hardhat-viem
plugin in hardhat.config.ts
There is ongoing work to make this part of the normally published package in #167 but it will not be released until v2.0 (probably end of February at the earliest).
This is fixed in the latest version (2.0). Thanks again for your work on this.
EGRDataCollectionProvider
doesn't recordeth_sendTransaction
requests whichviem
uses.TASK_TEST_RUN_MOCHA_TESTS
sub task is too late asviem
reads and freezes the provider instance on the module load.These two problems are causing the gas reporter miss some TX calls made via
viem
.