-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property '2' of undefined #21
Comments
I have the same problem... |
that happens because the tx.event doesn't have an args object with the public RPC json response, for me worked using infura mumbai endpoint and changing index.js endpoint to my infura's project endpoint |
Same problem here. I got a mumbai network endpoint from alchemy, but still get this error, using:
Any ideas how to fix it? |
Here is the event response for me:
It seems we need to retrieve the tokenId initially passed by the front-end user in order to list it on the marketplace:
As indicated by @CycloneOrg the arguments provided to the transaction are not returned in the event object I changed my network to an Infura Mumbai testnet endpoint like so: https://polygon-mumbai.infura.io/v3/INFURA_PROJECT_ID and I also set the rpcEndpoint in index.js so this but I still can't access this object. |
Any updates on a solution here? |
This is the right method to fix the problem. |
UPDATE, figured out that you need to do the following if you are getting this error. Restart your hardhat node, Redeploy your contracts (1:38:13 in the Youtube video), update your config.js with new contract addresses. In your Metamask on the connected account, go to settings>advanced>reset account to get the nonce back to 0. |
Facing same issue. |
I am getting this error. Some idea?
The text was updated successfully, but these errors were encountered: