Lesson: 07 Error: invalid address or ENS name (argument="name", value=undefined, code=INVALID_ARGUMENT, version=contracts/5.7.0) #4859
-
this is my code describe("FundMe", function () {
}); FundMe.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "./PriceConverter.sol"; contract FundMe {
} I am having this error |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The Error suggests that there is a problem with an argument that is being passed to a function, and specifically that the "name" argument is undefined or otherwise invalid. console.log(await fundMe.priceFeed()); This should help you determine whether the problem is with the deployment or the test code. |
Beta Was this translation helpful? Give feedback.
The Error suggests that there is a problem with an argument that is being passed to a function, and specifically that the "name" argument is undefined or otherwise invalid.
You should make sure that you are passing a valid address for the priceFeedAddress parameter when you deploy the FundMe contract. You can check the address that was actually passed in by printing the value of priceFeed in your tests, like so:
This should help you determine whether the problem is with the deployment or the test code.
Also, cross-check the code from the GitHub Repo