-
The error(s) I'm getting
When I click on the error, i'm taken to this line in 01-deploy-fund-me.js ethUsdPriceFeedAddress = networkConfig[chainId]["ethUsdPriceFeed"] Here is the entire 01-deploy-fund-me.js code const { network, getNamedAccounts, deployments } = require("hardhat")
const { networkConfig, developmentChains } = require("../helper-hardhat-config")
const chainId = network.config.chainId
// module.exports.deafult = deployFunc
ethUsdPriceFeedAddress = networkConfig[chainId]["ethUsdPriceFeed"]
module.exports = async ({ getNamedAccounts, deployment }) => {
const { deploy, log } = deployments
const { deployer } = await getNamedAccounts()
const chainId = network.config.chainId
const fundme = await deploy("FundMe", {
from: deployer,
args: [ethUsdPriceFeedAddress], //priceFeed address
log: true,
})
} AND here is 00-deploy-mock.js code const { network, getNamedAccounts, deployments } = require("hardhat")
const {
developmentChains,
DECIMALS,
INITIAL_ANSWER,
} = require("../helper-hardhat-config")
module.exports = async ({ getNamedAccounts, deployment }) => {
const { deploy, log } = deployments
const { deployer } = await getNamedAccounts()
const chainId = network.config.chainId
if (developmentChains.includes(network.name)) {
log("Local network detected! Deploying mocks...")
await deploy("MockV3Aggregator", {
contract: "MockV3Aggregator",
from: deployer,
log: true,
args: (DECIMALS, INITIAL_ANSWER),
})
log("Mocks Deployed!")
log("--------------------------------------------------------------")
}
}
module.exports.tags = ["all", "mocks"] Thank You. |
Beta Was this translation helpful? Give feedback.
Answered by
krakxn
Jul 16, 2022
Replies: 1 comment 8 replies
-
Show helper-hardhat-config.js |
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Show helper-hardhat-config.js