Skip to content

LESSON 7 : Error: invalid address (argument="address", value=undefined, code=INVALID_ARGUMENT, version=address/5.7.0) (argument="priceFeedAddress", value=undefined, code=INVALID_ARGUMENT, version=abi/5.7.0) #4890

Answered by 0xpolarzero
jatin-choubey asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jatin-choubey. Could you try adding quotes around the addresses in networkConfig, for ethUsdPriceFeed and ethUsdPrice?

As the little dots suggest it, it is not a correct way to write an address in JavaScript. In Solidity, the address type allows you to write addresses like this, but in JavaScript it should be written as strings.

const networkConfig = {
  5: {
    name: 'goerli',
    ethUsdPriceFeed: '0xd4a...8e'
  },
  137: {
    // Same here
  }
}

Let me know if it solves the issue!

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@jatin-choubey
Comment options

@0xpolarzero
Comment options

@jatin-choubey
Comment options

@0xpolarzero
Comment options

@jatin-choubey
Comment options

Answer selected by jatin-choubey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants