Skip to content

Error in lesson 9 when trying to deploy the Raffle #6223

Answered by kotysky
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

I think your problem is here:

 subscriptionId = transactionReceipt.events[0].args.subId;

and you are using Ethers 6,
if you want use that code,I guess you need downgrade de Ethers 6 to 5, but if you want use Ethers 6, like me, please, try the code below. It works for me.

const filter = vrfCoordinatorV2Mock.filters.SubscriptionCreated
const events = await vrfCoordinatorV2Mock.queryFilter(filter, -1)
const event = events[0]
const args = event.args
subscriptionId = args.subId

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ghost
Comment options

@kayceem
Comment options

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