hardhat-gas-reporter icon indicating copy to clipboard operation
hardhat-gas-reporter copied to clipboard

eth-gas-reporter with Hardhat multiple compiler versions

Open R-Santev opened this issue 1 year ago • 3 comments

Hello,

I have a Hardhat configuration with multiple compiler versions, but I can't see how the hardhat-gas-reporter handles it. It would be fantastic if you provide more information about that.

My compiler setup:

solidity: {
    compilers: [
      {
        version: '0.8.17',
        settings: {
          optimizer: {
            enabled: true,
            runs: 800,
          },
        },
      },
      {
        version: '0.5.4',
        settings: {
          optimizer: {
            enabled: true,
            runs: 200,
          },
        },
      },
    ],
  }

hardhat-gas-reporter output when I run all my tests (including contracts compiled with 0.8.17 and 0.5.4):

image

I tried to run only the tests for contracts compiled with 0.5.4 but the eth-gas-reporter output was the same: image

I expected at least in this situation to see a different result, but no.

I really appreciate any help you can provide.

R-Santev avatar Nov 10 '22 13:11 R-Santev