-
Hi, I have got a error about this. Here this my code: const {
networkConfig,
developmentChains,
} = require("../helper-hardhat-config");
//hre is hardhat runtime environment
module.exports = async (getNamedAccounts, deployments) => {
const { deploy, log } = deployments;
const { deployer } = await getNamedAccounts();
const chainId = network.config.getChainId;
let ethUsdPriceFeedAddress;
if (developmentChains.includes(network.name)) {
const ethUsdAggregator = await deployments.get("MockV3Aggregator");
ethUsdPriceFeedAddress = ethUsdAggregator.address;
} else {
ethUsdPriceFeedAddress = networkConfig[chainId]["ethUsdPriceFeed"];
}
log("----------------------------------------------------");
log("Deploying FundMe and waiting for confirmations...");
// how to make when we change links
//when going for localhost or hardhat network we want to use a mock
const fundMe = await deploy("FundMe", {
from: deployer,
args: [
/*address*/
ethUsdPriceFeedAddress,
], // put price feed address
log: true,
});
log("-------------------------------------------------------");
};
module.exports.tag = ["all", "fundme"]; and here is the error:
Please help me, Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
Tang-hw
Sep 7, 2024
Replies: 1 comment
-
I got it : I'm missing braces before: module.exports = async (getNamedAccounts, deployments) => { replace module.exports = async ({ getNamedAccounts, deployments }) => { |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Tang-hw
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got it : I'm missing braces
before:
replace