Skip to content

Lesson 7: TypeError: Cannot read property 'ethUsdPriceFeed' of undefined #333

Answered by DorianDaSilva
su-adam asked this question in Q&A
Discussion options

You must be logged in to vote

@su-adam If you are talking about deploy-mocks.js, below are a few observations comparing your script with mine.

From here it seems you have several issues:

| const { getNamedAccounts, deployments, network } = require("hardhat")
You don't need: getNamedAccounts, deployments

| const args = [ethUsdPriceFeedAddress];
missing before const fundMe, this define the args parameter in const fundMe
| args: args instead of args: [ethUsdPriceFeedAddress]

| log(`FundMe deployed at ${fundMe.address}`)
Not sure why you have this line

Also, have you imported the right networkConfig data for your networks in helper-hardhat-config.js?
| pricefeed
| chainId

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
1 reply
@su-adam
Comment options

Answer selected by su-adam
Comment options

You must be logged in to vote
4 replies
@su-adam
Comment options

@coinfeigm
Comment options

@su-adam
Comment options

@su-adam
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants