Closed kartik01112004 closed 5 months ago
for hardhat version above 2.15.0 install these dependencies and it must work fine then
yarn add --dev hardhat @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers
for hardhat version above 2.15.0 install these dependencies and it must work fine then
yarn add --dev hardhat @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers
TypeError: fundMe.getPriceFeed is not a function
error continuous to exists
I think, firstly you are using, getContractAt() function rather than getContract, the difference could be:
getContract:
getContract takes two arguments name of the contract and the signer, whereas the getContractAt function takes:
getContractAt: (
nameOrAbi: string | any[],
address: string | ethers.Addressable,
signer?: ethers.Signer
) => Promise
address also, and address is generated after we deploy the contract, secondly, i also tried this: yarn add --dev hardhat @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers ethers
but this doesn't worked for me too.
When I use getContract I get error as it's not a function....
New error AssertionError: expected '0x5FbDB2315678afecb367f032d93F642f641…' to equal undefined
When I use getContract I get error as it's not a function.... Me too
So in order to complete this section of course i have just downgraded all of the dependencies to of the patric's in the course .. i dont think its a god way to go forward but i couldnt seem to arrange all dependencies in a way that they all work and the code work as intended and not give random errors with no relation what so ever ...
I am getting
TypeError: (0 , ethers_1.getAddress) is not a function
when i runyarn hardhat test
on the first part of unit testinghere is
FundMe.tets.js
here is
01-deploy-fund-me.js
here is
FundM.sol
here is
packge.json
here is
hardhat.config.js
the error comes when i write the 1st it block... i have tried my best to resolve this error by using repo and by using stackexchange and stackoverflow ..
can anyone assist me??