Hot answers tagged

2 votes

How to correctly pack Log data in Go

OK I think I've figured it out. The Pack/Unpack methods on the Arguments type are asymmetric: Pack will pack all arguments whereas Unpack will filter out indexed arguments first. So the correct way to ...
Ryan Collingham's user avatar
1 vote
Accepted

Ethersjs: check that a transaction method in contract emitted an event

If you're using ethers.js ^= v6, the issue is no surprise. You'd need to access the logs property of the transaction receipt for reading the events that were emitted during the transaction execution. ...
Mila A's user avatar
  • 703
1 vote

How to get the hash of the Fulfill Random Words transaction (callback) that gets mined after calling the Chainlink's VRF?

You can find it if you navigate to the History (Recent fulfillments) tab of your VRF subscription at https://vrf.chain.link. Also, you can monitor the VRFCoordinatorV2 contract itself for ...
Andrej's user avatar
  • 419
1 vote
Accepted

How to get which tokens have been transferred by a transaction using ethers or Web3?

const { ethers } = require("ethers"); const txHash = "0xabcdef123456..."; const provider = new ethers.providers.JsonRpcProvider("YOUR_INFURA_ENDPOINT"); (async () => ...
Sohail Ghafoor's user avatar
1 vote

Listening to events in unit test using Viem

what I did in the end import ERC20ABI from "@openzeppelin/contracts/build/contracts/ERC20.json"; // [...] it('perform a complex multi-contract operation', async function () { // Load the ...
codekoriko's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible