Skip to content

Getting error while running my test in lesson 9 #6000

Answered by Nlferu
haaarshit asked this question in Q&A
Discussion options

You must be logged in to vote

@coderharsx1122

Ok I have figuered out what was the problem. First of all I highly recommend using ethers v5 instead of v6 as you do because of lack of understanding those are causing issues like yours...

In your 01-deploy-raffle.js as I said you are getting contract address wrong way, which causing you this issue (ethers v6 error) you need to get it like below:

vrfCoordinatorV2Address = await VRFCoordinatorV2Mock.getAddress()

instead of using some kind of runner or whatever.

If you fix it you will get another error, which stands InvalidConsumer() to fix that add below to your script in same 01-deploy-raffle.js file:

    if (developmenChain.includes(network.name)) {
        log(`Adding Co…

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@haaarshit
Comment options

@Nlferu
Comment options

@haaarshit
Comment options

@Nlferu
Comment options

Answer selected by haaarshit
@haaarshit
Comment options

@Nlferu
Comment options

@Nlferu
Comment options

@haaarshit
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
2 participants