Watches contract events and returns the logs.
import { useContractEvents } from "thirdweb/react";import { tokensClaimedEvent } from "thirdweb/extensions/erc721"; const account = useActiveAccount();const contractEvents = useContractEvents({ contract, events: [tokensClaimedEvent({ claimer: account?.address })],});
function useContractEvents( options: UseContractEventsOptions<abi, abiEvents>,): UseQueryResult<ParseEventLogsResult<abiEvents, true>, Error>;
The UseContractEventsOptions | options for watching contract events.
let options: UseContractEventsOptions<abi, abiEvents>;
let returnType: UseQueryResult< ParseEventLogsResult<abiEvents, true>, Error>;
The contract events of the watched contract events.