Closed canpoyrazoglu closed 9 months ago
I faced this too
Same here
yes the same problem I was facing, the report was getting report but I enabled to true and it worked.
If you're using the hardhat toolbox you have to read the hardhat.config.ts that installs with the project. They have set it up to run with an environment variable.
if (gasReporterConfig?.enabled === undefined) {
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
configAsAny.gasReporter.enabled = process.env.REPORT_GAS ? true : false;
}
Eventhough it says the default value of
enabled
in config is true, gas reporting wasn't working for me when I did tests with the following Hardhat config:When I explicitly added the gas reporter and set enabled to true, gas reporting worked:
I think the readme is misleading about being enabled by default.