Replies: 2 comments 2 replies
-
If you query the node afterwards for the logs, do they exist? Or if you try after a few seconds to get the transaction receipt by its hash? Can you also use |
Beta Was this translation helpful? Give feedback.
2 replies
-
const tx = await contract.someFunction(param1, param2...);
const receipt = await tx.wait();
const filter = contract.filters.EventNameHere;
const events = await contract.queryFilter(filter, -1);
const args = events[0].args; ethers v6 |
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
-
Ethers version
6.8.1
Hello guys, i am not sure why i cant see the logs events using
await tx.wait()
, here is the situation :[ works ] hardhat
npx hardhat test
, the logs here has values and are not empty[ not works ] backend
npx hardhat node --network local
, this runs inhttp://127.0.0.1:8545/
await tx.wailt()
i cant get logs events, i mean i can, but are emptymaybe i am doing something wrong, based in my understanding i have the next code :
Solidity code
[ Code ] Trying to get the logs
[ output ] result transaction
[ output ] logs transaction
When i see the
console.log('logs transaction => ', (receipt as any).logs);
output i see the next :What i am doing wrong ? , i have here some few hours trying to understand why i can see the output in the hardhat test but not in my backend
Thanks for read ❤️
Beta Was this translation helpful? Give feedback.
All reactions