Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

enabled but does not report anything #246

Closed
nazariyv opened this issue Apr 2, 2021 · 9 comments
Closed

enabled but does not report anything #246

nazariyv opened this issue Apr 2, 2021 · 9 comments

Comments

@nazariyv
Copy link

nazariyv commented Apr 2, 2021

gas-reporter

what might be the cause of this? thank you

@cgewecke
Copy link
Owner

cgewecke commented Apr 2, 2021

@nazariyv It's impossible to know without reproduction steps. Can you create an example repo which results in the same output and open it on github?

@cgewecke
Copy link
Owner

cgewecke commented Apr 2, 2021

@nazariyv Have you used Paul Bergs solidity-template for your project?

If so, it has a bug in the gasReporter config that results in no data being produced.

This line in the config, where excludeContracts has an empty string should be commented out (or given a non-empty string if you want to skip something.)

@nazariyv
Copy link
Author

nazariyv commented Apr 2, 2021

I have used this:

https://github.com/wighawag/template-ethereum-contracts

This is my config:

  paths: {
    sources: 'src',
  },
  gasReporter: {
    currency: 'USD',
    gasPrice: 200,
    coinmarketcap: process.env.COINMARKETCAP_API_KEY,
    maxMethodDiff: 10,
  }

@cgewecke
Copy link
Owner

cgewecke commented Apr 2, 2021

@nazariyv When I clone that template, install and run yarn gas, per the instructions I see:

Screen Shot 2021-04-02 at 2 17 19 PM

@jfrank-summit
Copy link

I am also having this issue after adding gas-reporter to an existing project. were you able to get it resolved @nazariyv ?

@Magicking
Copy link

Magicking commented Sep 24, 2021

Having the same problem here, using the specified template above, after a bit of investigation, it seems that the EGRDataCollectionProvider provider is not called upon request, the main difference with the used example is the usage of certain proxies, in the process of writing a minimal test case

@cgewecke
Copy link
Owner

Closing, please just ping if this is still an issue.

@Magicking
Copy link

Sorry I have not updated here, got busy elsewhere, long story short, wrote 3 different tests cases that I can't share unfortunately but I did not manage to find the minimum, my best guess as of today is an incomparability between hardhat community plugins!

@cgewecke
Copy link
Owner

@Magicking Oh interesting. Are you using @openzeppelin/hardhat-upgrades by chance?

There is a similar looking issue to this one recently opened at hardhat-gas-reporter 86 (cause is still unknown there too unfortunately)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants