Skip to content

Lesson 9 - TypeError: Cannot read properties of undefined (reading 'connect') #2393

Answered by RoboCrypter
SpeedBird789 asked this question in Q&A
Discussion options

You must be logged in to vote

@SpeedBird789 : Got it :

Change these line from this :

            raffle = raffleContract.connect(accounts[i]); // Returns a new instance of the Raffle contract connected to player
            await raffle.enterRaffle({ value: raffleEntranceFee });

To this :

           raffleContract = raffle.connect(accounts[i]) // Returns a new instance of the Raffle contract connected to player
           await raffleContract.enterRaffle({ value: raffleEntranceFee })

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

@RoboCrypter
Comment options

@RoboCrypter
Comment options

@SpeedBird789
Comment options

@RoboCrypter
Comment options

Comment options

You must be logged in to vote
4 replies
@RoboCrypter
Comment options

@RoboCrypter
Comment options

@RoboCrypter
Comment options

@SpeedBird789
Comment options

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