Skip to content

Lesson 5 : TypeError: Cannot read properties of undefined (reading 'wait') #5962

Answered by IBzmani
wwwbaraccuda asked this question in Q&A
Discussion options

You must be logged in to vote

I experienced same issue. I realized that it was because I am using "ethers": "^6.7.0" and not the "ethers": "^5.5.3" which was used in the course. There are some slight syntax changes here and there in version ^6.
Here's what you can do in this case:

Instead of

 const deploymentReceipt = await contract.deployTransaction.wait(1);

do this

 const deploymentReceipt = await contract.deploymentTransaction().wait(1);

It seems deployTransaction was changed to deploymentTransaction in version 6.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

Comment options

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

Answer selected by wwwbaraccuda
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