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

Hardcoded custom exchange rate?

Open simondlr opened this issue 3 years ago • 4 comments

Hey. Unsure if this had been requested before (tried searching to no avail), but instead of using coinmarketcap API (and having to pay for calls), a simple feature request would be to be able to set this manually in the config?

eg, exchangeRate, or currencyPrice?

simondlr avatar May 27 '21 16:05 simondlr

Yes, good idea!

Coinmarketcap's free tier is 10K requests a month... are you burning through these?

If so, another possibility could be to fall back on coinpaprika, an apparently un-gated, similar service

Related: hardhat-gas-reporter 65

cgewecke avatar May 27 '21 17:05 cgewecke

Coinmarketcap's free tier is 10K requests a month... are you burning through these?

Not atm. Recently started using it again. Should be okay for normal day-to-day development (333/day OR 10k/month).

Issue https://github.com/cgewecke/hardhat-gas-reporter/issues/65 from @denhampreen also speaks to another reason why hardcoded prices might be useful: wanting to see costs at different prices. eg, "if ETH goes back to $4k, how much would it cost in USD?"

simondlr avatar May 27 '21 17:05 simondlr

I just figured the same thing and wondered why it was not possible to set a price. Where in the package does it query the api? I couldnt find it in the code.

marceljay avatar Jul 10 '21 12:07 marceljay

So I ran into same issue and was about to go through process to do a PR for it ... but while looking at the code ... you can now pass in an ethPrice in the config.

So it seems this has been resolved, and this issue just hasn't been closed yet. Also would be nice if this was in the list of config options in the README.

jsbarrett avatar Jan 24 '22 20:01 jsbarrett