Closed web3dopamine closed 8 months ago
In my case, even when using the flag, it does not report anything at all. All is see is the header of the table.
using hardhat 2.18.2 hardhat-gas-reporter 1.0.9 node 16.17.1 solidity 0.8.21
·----------------------------------------|---------------------------|-------------|-----------------------------· | Solc version: 0.8.20 · Optimizer enabled: true · Runs: 200 · Block limit: 30000000 gas │ ·········································|···························|·············|······························ | Methods │ ···················|·····················|·············|·············|·············|···············|·············· | Contract · Method · Min · Max · Avg · # calls · jpy (avg) │ ···················|·····················|·············|·············|·············|···············|·············· | MockERC1155NFT · burn · - · - · 26033 · 1 · - │ ···················|·····················|·············|·············|·············|···············|·············· | MockERC1155NFT · burnBatch · 32316 · 32336 · 32326 · 3 · - │ ···················|·····················|·············|·············|·············|···············|·············· | MockERC1155NFT · mint · - · - · 53347 · 7 · - │ ···················|·····················|·············|·············|·············|···············|·············· | MockERC1155NFT · mintBatch · 79847 · 79871 · 79859 · 9 · - │ ···················|·····················|·············|·············|·············|···············|·············· | MockERC1155NFT · safeTransferFrom · 57103 · 57115 · 57107 · 3 · - │
Hey ! I have same error
my project's library versions "ethers": "6.1.0", "hardhat": "2.18.3", "hardhat-gas-reporter": "^1.0.9",
↑ It solved!!
I tried running
hardhat-gas-reporter
in hardhat default template it doesn't work withnpx hardhat test
, we have to use flagREPORT_GAS=true
then only it will run contract which has test script written.NFT.sol contract report is not generated (at all) in none of the cases.
tried on node version 16 & 17