Lesson 10 getEntranceFee undefined #2389
-
I'm getting undefined in the console when I run this. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 14 replies
-
@SidharthK2 Hey! This could be due to ABI not exported to fronted side correctly! You can also copy the ABI code manually from the contract code. Go to: artifacts/contracts/CONTRACT-NAME/CONTRACT-NAME.json. Copy the ABI array (start from |
Beta Was this translation helpful? Give feedback.
-
@SidharthK2 : In your updateUI function in your use effect do this :
Then console.log it. Let me know if it works! |
Beta Was this translation helpful? Give feedback.
-
I had to change the chain id for hardhat local network from 1337 to 31337 in my metamask |
Beta Was this translation helpful? Give feedback.
-
I could not fix this error for a long time and figured out that there was no need to It was adding a stringified version of json in my |
Beta Was this translation helpful? Give feedback.
I had to change the chain id for hardhat local network from 1337 to 31337 in my metamask