2 years ago
#58121

TiagoS
Why contract event data is undefined on a testnet but not in a local node?
I've created the following Solidity contract that emits an event:
And in my front-end JS code I'm using ethers.js and reading the data from the event with event.args[2]
(line 76):
When I use a Hardhat local node the event.args[2]
has what I'm expecting.
However event.args
is undefined when I use the contract deployed on a Polygon Mumbai testnet node with Alchemy.com.
I appreciate any help or guidance with this error I'm facing, let me know if I should share any other info. Cheers.
blockchain
ethereum
solidity
ethers.js
0 Answers
Your Answer