Closed Bolee95 closed 6 months ago
Hi! eth-gas-reporter
is being deprecated in favor of hardhat-gas-reporter
.
In the latest version at Hardhat, waffle should work as expected using the hardhat-waffle plugin
https://github.com/cgewecke/hardhat-gas-reporter/releases/tag/v2.0.0
Hi everyone,
I'm working on a project using the Truffle framework for development, Ganache as a local network and Waffle for testing. The reason I don't use native testing for Truffle is that I find creating mocks easily a really convenient tool, and with Waffle, it doesn't require creating new contracts with almost copied logic as the original one.
I was trying to get gas usage of the methods called during unit testing using eth-gas-reporter, but I cannot generate a report with methods gas usage. However, I do get contacts deployment gas usage.
Something that I think is causing this is that I do not use artefacts generated during
truffle deploy
command. I use files with generated ABI and bytecode, as I couldn't use artefacts in combination with Waffle, which operates with Ethers.js in the background.This is a report generated after running tests:
Does this ring any bell? Do I need to somehow configure the reporter differently? As you can see, the reporter is running during tests, so that's not an issue.
Would be really grateful if anyone got an answer. If you need more information, please ping me, I will provide it.