Closed jtremback closed 3 years ago
Hi @jtremback. Thanks for reporting!
I think the problem might originate in this PR: https://github.com/nomiclabs/hardhat/pull/1024 which fixes a bug with the Ethers provider.
If that's the case, a possible solution is to duplicate the proxy provider logic there in hardhat-gas-reporter's provider wrapper, here
Hmmm very interesting. Thanks!
It looks like the chain state is reset at some point when running tests without calling this method. So I think I can do without this functionality for now and probably won't make the recommended changes at this point.
Ok cool - I'm going to re-open at HH gas reporter.
Using the "hardhat_reset" request seems to break eth-gas-reporter. I have defined this function:
And i call it like this:
await resetChain();
on the first line of each test case. I am using Hardhat, with hardhat-waffle, and chai assertions.When I comment out the call to hardhat_reset, full gas reporting works. Also, if I restart the evm by hand (ending and restarting the evm process in the terminal), the first time I run the tests again, even with hardhat_reset, gas reporting works. This gives me the hunch that there may be some kind of race condition in the setup.