Lesson 9: Error: invalid address (argument="address", value=undefined, code=INVALID_ARGUMENT, version=address/5.7.0) (argument="vrfCoordinatorV2", value=undefined, code=INVALID_ARGUMENT, version=abi/5.7.0) #6143
-
Hi! I'm following lesson 9. And when I try to deploy my contract, it shows error like this:"Error: invalid address (argument="address", value=undefined, code=INVALID_ARGUMENT, version=address/5.7.0) (argument="vrfCoordinatorV2", value=undefined, code=INVALID_ARGUMENT, version=abi/5.7.0)". I have tried a lot and even change my code to the example code, the error still exists. This is my repo link: https://github.com/Charlotte528/hardhat-raffle(If you can't open the link, please try to copy and paste it in your browser. I don't know why if I directly click the link, it shows page not found.) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hello @Charlotte528 you are using ethers v6 and that is causing you problems as whole course is made on ethers v5. To get address in ethers v6 you should use .getAddress() function instead of .address property. Or the best solution to follow with course is to downgrade ethers to v5 |
Beta Was this translation helpful? Give feedback.
Hello @Charlotte528
you are using ethers v6 and that is causing you problems as whole course is made on ethers v5. To get address in ethers v6 you should use .getAddress() function instead of .address property. Or the best solution to follow with course is to downgrade ethers to v5