Replies: 1 comment 6 replies
-
Hello @Antony-Holovchenko You are just using getContract function incorrectly, so your FundMe contract is not defined as it should be. // If you are getting contracts like below you should give the `address` parameter also
/** @dev Incorrect use:*/
FundMe = await ethers.getContractAt("FundMe", deployer)
mockV3Aggregator = await ethers.getContractAt("MockV3Aggregator", deployer)
/** @dev Correct use:*/
FundMe = await ethers.getContractAt("FundMe", deployedContractAddress, deployer)
mockV3Aggregator = await ethers.getContractAt("MockV3Aggregator", deployedContractAddress, deployer) Or you can just use below (calling getContract instead of getContractAt): FundMe = await ethers.getContract("FundMe", deployer)
mockV3Aggregator = await ethers.getContract("MockV3Aggregator", deployer) |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello community, I got stuck on Lesson 7 when I was trying to execute the "Constructor" test. My contracts("FundMe" and "Price Converter") are successfully deployed, but when I write the first test and try to execute it I receive this error below:
Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION
] (method="getPriceFeed()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
Also, I would like to the code for my tests and contracts below:
So I am asking for help from the community as I have no idea what is wrong with the code. Hope someone knows how to fix this :)
Beta Was this translation helpful? Give feedback.
All reactions