useAllContractEvents() function
This feature is currently in beta and may change based on feedback that we receive.
Use this to query (and subscribe) to all events on a contract.
Signature:
export declare function useAllContractEvents(
contract: RequiredParam<ReturnType<typeof useContract>["contract"]>,
options?: {
queryFilter?: EventQueryFilter;
subscribe?: boolean;
},
): import("@tanstack/react-query").UseQueryResult<ContractEvent[], unknown>;
Parameters
Parameter | Type | Description |
---|---|---|
contract | RequiredParam<ReturnType<typeof useContract>["contract"]> | the contract instance of the contract to call a function on |
options | { queryFilter?: EventQueryFilter; subscribe?: boolean; } | (Optional) options incldues the filters () for the query as well as if you want to subscribe to real-time updates (default: true) |
Returns:
import("@tanstack/react-query").UseQueryResult<ContractEvent[], unknown>
a response object that includes the contract events