Skip to content

LESSON 9 => TypeError: Cannot read properties of undefined (reading '0') #5779

Answered by alymurtazamemon
harry2855 asked this question in Q&A
Discussion options

You must be logged in to vote

@harry2855 No this is not an ethers issue, instead the mock contract response was not emitting the event of subscript created. But we can by pass it because we know it is the first subscript so we can do this

- subscriptionId = transactionReceipt.events[0].args.subId
+ subscriptionId = 1

And also address is know renamed to target vrfCoordinatorV2Address = vrfCoordinatorV2Mock.target;

Replies: 2 comments 19 replies

Comment options

You must be logged in to vote
15 replies
@alymurtazamemon
Comment options

@harry2855
Comment options

@harry2855
Comment options

@alymurtazamemon
Comment options

Answer selected by harry2855
@harry2855
Comment options

@MohammadRokib
Comment options

@ezescigo
Comment options

@jeevansiddu
Comment options

Comment options

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

@MohammadRokib
Comment options

@Ahmedborwin
Comment options

@yuyangezheng
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