Skip to content

Lesson 9: TypeError: no matching function (argument="key", value="address", code=INVALID_ARGUMENT, version=6.6.6) #5946

Answered by alfaqi
affanmustafa asked this question in Q&A
Discussion options

You must be logged in to vote

You have two ways to fix this issue.
one way is change any address to target or await .. getAddress()
like this, in 01-delpoy-raffle.js file change
from

        vrfCoordinatorV2Address = vrfCoordinatorV2Mock.address;

to

        vrfCoordinatorV2Address = vrfCoordinatorV2Mock.target;

or

        vrfCoordinatorV2Address = await vrfCoordinatorV2Mock.getAddress();

this means you will use ethersV6.
OR
the other way is, downgrade the ethers version to ^5
change these lines in package.json file

    "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers",
    "ethers": "^6.6.6",

to

    "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@^0.3.0-beta.13",
    "ethers": "^5.7.2",

then run yarn or y…

Replies: 3 comments 9 replies

Comment options

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

@alfaqi
Comment options

Answer selected by affanmustafa
Comment options

You must be logged in to vote
7 replies
@alfaqi
Comment options

@Astronaut828
Comment options

@alfaqi
Comment options

@Astronaut828
Comment options

@alfaqi
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
3 participants