Skip to content

L7: Hardhat-Fund-me: No contract deployed with name FundMe error #5000

Discussion options

You must be logged in to vote

Hi @Mayank-Pandey1
You can consider doing some changes in your FundMe.test.js file that I have mentioned below in the comments.

describe("FundMe", function() {
          let fundMe
          let deployer
          let mockV3Aggregator
          beforeEach(async function() {
              deployer = (await getNamedAccounts()).deployer

              await deployments.fixture(["all"])        // Please dont forget the await here

              fundMe = await ethers.getContract("FundMe", deployer)

              mockV3Aggregator = await ethers.getContract(      // you have placed this Line inside the constructor
                  "MockV3Aggregator",
                  deployer
              )

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Mayank-Pandey1
Comment options

Answer selected by Mayank-Pandey1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants