Skip to content

Lesson 09: Error: VM Exception while processing transaction: reverted with custom error 'InvalidConsumer()' #4440

Answered by notmhyr
tibuddh asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, in your 01-deploy-raffle.js file add this line of code under your raffle variable, should look like this:

 const raffle = await deploy("Raffle", {
    from: deployer,
    args: args,
    log: true,
    waitConfirmations: waitBlockConfirmations,
    })
  await vrfCoordinatorV2Mock.addConsumer(subscriptionId, raffle.address);

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@tibuddh
Comment options

@notmhyr
Comment options

@francas
Comment options

@Ayodeji63
Comment options

@AmitKochar1
Comment options

Answer selected by tibuddh
Comment options

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

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants