When I run this command yarn hardhat deploy --tags fundme I'm getting this MockV3Aggregator error.
Error: ERROR processing /Users/mohameduzair/blockChain/JSweb3_2/fundMe_hardhat/deploy/01-deploy-fundMe.js:
Error: No deployment found for: MockV3Aggregator at Object.get (/Users/mohameduzair/blockChain/JSweb3_2/fundMe_hardhat/node_modules/hardhat-deploy/src/DeploymentsManager.ts:162:17)
```module.exports = async ({ getNamedAccounts, deployments }) => {
const { deploy, log } = deployments
const { deployer } = await getNamedAccounts()
const chainId = network.config.chainId
let ethUsdPriceFeedAddress
if (developmentChains.includes(network.name)) {
// if (chainId === 31337) {
const ethUsdAggregator = await deployments.get("MockV3Aggregator")
ethUsdPriceFeedAddress = ethUsdAggregator.address
} else {
ethUsdPriceFeedAddress = networkConfig[chainId]["ethUsdPriceFeed"]
}
const fundMe = await deploy("FundMe", {
from: deployer,
args: [ethUsdPriceFeedAddress],
log: true,
})
log(`FundMe deployed at ${fundMe.address}`)
log(`-------------------------!!!--------------------------`)
}
module.exports.tags = ["all", "fundme"]
```
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
// pragma solidity >=0.6.6 <0.8.7;
import "@chainlink/contracts/src/v0.6/tests/MockV3Aggregator.sol";
I', new to the Blockchain technologies. I'm following a tutorial on Youtube. I've tried my best. still can not fix this. What should I do now? Thank you
After spending 5 hours, I fixed the bug. It was an extra {curly brace} in my code and a deployment error.
If you are following Patrick's tutorial and getting this error then you are probably missing network.name in either of deploy files. Instead of network.name you have typed only network