FundMe hardhat deploy -> Error: invalid bytecode (argument="bytecode", value="0..... #201
Answered
by
PatrickAlphaC
balajeeB01
asked this question in
Q&A
-
const { network } = require("hardhat")
const { networkConfig, devlopementChains } = require("../helper-hardhat-config")
module.exports = async ({ getNamedAccounts, deployments }) => {
const { deploy, log } = deployments
const { deployer } = await getNamedAccounts()
const chainId = network.config.chainId
let ethUsdPriceFeedAddress
if (devlopementChains.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...")
const fundMe = await deploy("FundMe", {
from: deployer,
args: [ethUsdPriceFeedAddress],
log: true,
// we need to wait if on a live network so we can verify properly
// waitConfirmations: network.config.blockConfirmations || 1,
})
log("----------------------------------------------------")
}
module.exports.tags = ["all", "fundme"] I'm getting below error on deploy of FundMe. Please help me resolving this , I'm stuck not able to find any working solution
|
Beta Was this translation helpful? Give feedback.
Answered by
PatrickAlphaC
Jun 8, 2022
Replies: 2 comments 9 replies
-
If you look at that loooooong error on the first line of your error, you'll seee:
So it's likely something is wrong with either you constructor, or your
console.log(ethUsdPriceFeedAddress) Before you run your deploy function? |
Beta Was this translation helpful? Give feedback.
9 replies
Answer selected by
balajeeB01
-
@balajeerocks thx!!!!!!!! It worked for me |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you look at that loooooong error on the first line of your error, you'll seee: