Lesson 10: contractAddresses[chainId][0] returns 0 #5743
Unanswered
software-dev2010
asked this question in
Q&A
Replies: 1 comment
-
Because you are assigning the value directly, |
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I'm at lesson 10 and in the LotteryEntrance.js is this line of code that will set the value 0 for the raffleAddress:
const raffleAddress = chainId in contractAddresses ? contractAddresses[chainId][0] : null;
And this is the contractAddresses.json:
{"31337":"0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"}
For me, this
contractAddresses[chainId][0]
returns 0, and thiscontractAddresses[chainId]
will return the 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9.I don't understand how is it possible to work for you? Thank you!
Beta Was this translation helpful? Give feedback.
All reactions