Skip to content

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

Answered by alfaqi
Night-Prime asked this question in Q&A
Discussion options

You must be logged in to vote

Did you add Consumer while deploying the contract?, like this:
await vrfCoordinatorV2Mock.addConsumer(subscriptionId, raffle.address)
see here https://github.com/PatrickAlphaC/hardhat-smartcontract-lottery-fcc/blob/main/deploy/01-deploy-raffle.js

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@Night-Prime
Comment options

@alymurtazamemon
Comment options

@Night-Prime
Comment options

Answer selected by Night-Prime
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
4 participants