Skip to content

lesson-7 TypeError: FundMe.s_priceFeed is not a function #2047

Answered by othaime-en
TimeKeyRoll asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @MasterofBlockchain Replace line 27 with const response = await FundMe.getPriceFeed()

You are trying to call s_priceFeed which is marked private in your contract hence it cannot be accessed outside the contract. Instead, use the getter function getPriceFeed() that you created at the bottom of the contract to retrieve s_priceFeed

Replies: 3 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
12 replies
@othaime-en
Comment options

@RomeDomeYome
Comment options

@othaime-en
Comment options

@RomeDomeYome
Comment options

@othaime-en
Comment options

Answer selected by TimeKeyRoll
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants