Skip to content

Lesson 7: Error when running script fund.js - fund is not a function #5830

Closed Answered by avaradkar22
avaradkar22 asked this question in Q&A
Discussion options

You must be logged in to vote

Was finally able to solve it by making the following change in the fund.js script:

const fundMe = await ethers.getContract("FundMe", deployer);
const fundMeAddress = await fundMe.getAddress();
console.log(Got contract FundMe at ${fundMeAddress});

Also upgraded ethers to version 6.6.2

Thank you @Naman1729 and @pallab-nandi for your help

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Naman1729
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by avaradkar22
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