Skip to content

Lesson 6: Hardhat Gas Reporter-Price data missing from report #2808

Answered by alymurtazamemon
zjy-1998 asked this question in Q&A
Discussion options

You must be logged in to vote

@zjy-1998 console.log this COINMARKETCAP_API_KEY in the hardhat file and make sure it is not undefined there, and if it is not undefined then try to specify here like this;

gasReporter: {
    enabled: true,
    outputFile: "gas-report.txt",
    noColors: true,
    coinmarketcap: process.env.COINMARKETCAP_API_KEY,
    currency: "USD",
    token: "MATIC",
},

If still, you don't see the price then try it the next day or after some time, because sometimes etherscan and coinmarketcap do these fetching issues.

Replies: 3 comments 16 replies

Comment options

You must be logged in to vote
6 replies
@alymurtazamemon
Comment options

@zjy-1998
Comment options

@alymurtazamemon
Comment options

@alymurtazamemon
Comment options

@zjy-1998
Comment options

Answer selected by zjy-1998
Comment options

You must be logged in to vote
6 replies
@krakxn
Comment options

@zjy-1998
Comment options

@krakxn
Comment options

@zjy-1998
Comment options

@krakxn
Comment options

Comment options

You must be logged in to vote
4 replies
@wang-junxi
Comment options

@wang-junxi
Comment options

@leleleocc
Comment options

@leleleocc
Comment options

# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
6 participants