A function that fetches event info from a transaction hash.
Note: Only indexed params can be filtered. Read more here.
npm i events-from-hash wagmi @ethersproject/abi
event Transfer(address indexed src, address indexed dst, uint val)
const events = await getEventsFromHash({
name: 'Transfer',
args: ['0xca...'], // The source wallet address
hash: '0x...', // The transaction hash
addressOrName: '0x...', // The contract's address
contractInterface: contractAbi,
})