Closed Crawlling closed 1 year ago
ethers.getContract() is just not being found as function of ethers for me. I am trying to use ethers.getContractAt as here, but it is just not deploying the FundMe.
fundMe = await ethers.getContractAt("FundMe", deployer);
mockV3Aggregator at least seems to be working. But I am super stuck with fundMe
mockV3Aggregator = await ethers.getContractAt(
"MockV3Aggregator",
deployer
);
When trying to do the test I get the following error:
1) FundMe
constructor
sets the aggregator address correctly:
Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="priceFeed()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
My deployings seem to work fine though. But for the testing it is just not deploying.
Hope @PatrickAlphaC gets to see this :D
Hi all! Thanks for pinging me. Could you please do the following:
Thank you!
Hi,I encountered a problem in the test Here is my code.
const { deployments, ethers, getNamedAccounts } = require("hardhat") const { assert } = require("chai")
describe("FundMe", async function () { let fundme let deployer let MockV3Aggregator
})
Here is error: FundMe constructor 1) "before each" hook for "set the aggregator addresses correctly"
0 passing (574ms) 1 failing
1) FundMe "before each" hook for "set the aggregator addresses correctly": Error: No Contract deployed with name FundMe at Object.getContract (node_modules/@nomiclabs/hardhat-ethers/src/internal/helpers.ts:447:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at Context. (test/unit/FundMe.test.js:12:18)
I already change ethers version to 5,the error from “JsonRpc。。。” to this.
Thank u for your time.