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

Hardcoded custom exchange rate? #247

Open
simondlr opened this issue May 27, 2021 · 4 comments
Open

Hardcoded custom exchange rate? #247

simondlr opened this issue May 27, 2021 · 4 comments

Comments

@simondlr
Copy link

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?

@cgewecke
Copy link
Owner

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

@simondlr
Copy link
Author

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 cgewecke/hardhat-gas-reporter#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?"

@marceljay
Copy link

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.

@jsbarrett
Copy link

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.

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