Skip to content

Lesson 7 Error: Invalid address, processing while deploying on Rinkeby with hardhat #217

Answered by SantanuDK
LordReya asked this question in Q&A
Discussion options

You must be logged in to vote
let ethUsdPriceFeedAddress  // you declared ethUsdPriceFeedAddress  with let keyword
    if (developmentChains.includes(network.name)) {
        const ethUsdAggregator = await deployments.get("MockV3Aggregator")
        ethUsdPriceFeedAddress = ethUsdAggregator.address
    } else {
const ethUsdPriceFeedAddress = networkConfig[chainId]["ethUsdPriceFeed"] //and here also you are trying to declare with const keyword
    }

here your are trying to declare a same variable with two different keywords which is already been declared i think that might be the problem.

Replies: 4 comments 13 replies

Comment options

You must be logged in to vote
6 replies
@javierdash
Comment options

@LordReya
Comment options

@javierdash
Comment options

@LordReya
Comment options

@LordReya
Comment options

Comment options

You must be logged in to vote
1 reply
@LordReya
Comment options

Comment options

You must be logged in to vote
3 replies
@LordReya
Comment options

@PatrickAlphaC
Comment options

@Starmand6
Comment options

Answer selected by LordReya
Comment options

You must be logged in to vote
3 replies
@LordReya
Comment options

@IbrahimGhasia
Comment options

@RowinVanAmsterdam
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants