Hello I am running into this error when trying to test the contructor function .
It seems that the program is unable to read the result variable from fundMe.priceFeed()
I am at 11:18:51 of the course. Here is the ERROR:
Error: could not decode result data (value="0x", info={ "method": "getPriceFeed", "signature": "getPriceFeed()" }, code=BAD_DATA, version=6.6.0)
at makeError (node_modules/ethers/src.ts/utils/errors.ts:677:21)
at assert (node_modules/ethers/src.ts/utils/errors.ts:694:25)
at Interface.decodeFunctionResult (node_modules/ethers/src.ts/abi/interface.ts:916:15)
at staticCallResult (node_modules/ethers/src.ts/contract/contract.ts:324:35)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at staticCall (node_modules/ethers/src.ts/contract/contract.ts:281:24)
at Proxy.getPriceFeed (node_modules/ethers/src.ts/contract/contract.ts:329:41)
at Context.<anonymous> (test/unit/FundMe.test.js:27:30)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
AggregatorV3Interface public priceFeed;
constructor(address priceFeedAddress) {
i_owner = msg.sender;
priceFeed = AggregatorV3Interface(priceFeedAddress);
//priceFeedAddress is now variable depending on what chain we're on
}
function getPriceFeed() public view returns (AggregatorV3Interface) {
return priceFeed;
}
Any help would be extremly appreciated! Let me know if you need me to provide you anything else
I have found the issues to be with the versions of my dependencies if someone runs into to the same error as me i advice them to go to the discussions tabs you will find the answers there
Hello I am running into this error when trying to test the contructor function . It seems that the program is unable to read the result variable from fundMe.priceFeed() I am at 11:18:51 of the course. Here is the ERROR:
Here is the code that i am running for my test
I think that the error comes from the lines :
or/and
The FundMe contract code:
Any help would be extremly appreciated! Let me know if you need me to provide you anything else