Facing Error in Lesson 7 : Error Processing deploy scripts using hardhat-deploy ... #5717
-
I am facing the following error when i run npx hardhat deploy , saying Error processing .... invalid address ... I am adding my code snippets below ! Thanks for you help !
// function deployOnlyFunds() {
// console.log("Only Funds");
// }
const { network } = require("hardhat");
const { networkConfig, devChainsAndNotToBeDeployedOnTestNet } = require("../helper/helper-hardhat-config")
// hardhat runtime env
module.exports = async ({ getNamedAccounts, deployments }) => {
const { deploy, log, get } = deployments;
const { deployer } = await getNamedAccounts();
const chainId = network.config.chainId;
let ethUSDPriceAddress;
if (devChainsAndNotToBeDeployedOnTestNet.includes(network.name)) {
const ethUSDAggregator = get("MockV3Aggregator");
ethUSDPriceAddress = ethUSDAggregator.address;
}
else {
ethUSDPriceAddress = networkConfig[chainId]["ethUSDPriceFeed"]
}
const onlyFunds = await deploy("FundMe", {
from: deployer,
args: [ethUSDPriceAddress],
log: true
})
log(" ====================================== ")
}
module.exports.tags = ["all", "onlyFunds"] |
Beta Was this translation helpful? Give feedback.
Answered by
Prayag2003
Jun 20, 2023
Replies: 1 comment
-
The issued has been solved , i missed |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Prayag2003
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The issued has been solved , i missed
await
in const ethUSDAggregator = get("MockV3Aggregator")