Type alias WatchContractEventParameters<TAbi, TEventName, TStrict>

WatchContractEventParameters<TAbi, TEventName, TStrict>: {
    abi: TAbi;
    address?: Address | Address[];
    args?: GetEventArgs<TAbi, TEventName>;
    eventName?: InferEventName<TAbi, TEventName>;
    onError?: ((error) => void);
    onLogs: WatchContractEventOnLogsFn<TAbi, TEventName, TStrict>;
    strict?: TStrict;
} & (GetTransportConfig<Transport>["type"] extends "webSocket"
    ? {
        batch?: never;
        poll?: false;
        pollingInterval?: never;
    } | PollOptions & {
        poll?: true;
    }
    : PollOptions & {
        poll?: true;
    })

Type Parameters

  • TAbi extends Abi | readonly unknown[] = readonly unknown[]

  • TEventName extends string = string

  • TStrict extends boolean | undefined = undefined

Type declaration

  • abi: TAbi

    Contract ABI.

  • Optional address?: Address | Address[]

    The address of the contract.

  • Optional args?: GetEventArgs<TAbi, TEventName>
  • Optional eventName?: InferEventName<TAbi, TEventName>

    Contract event.

  • Optional onError?: ((error) => void)

    The callback to call when an error occurred when trying to get for a new block.

      • (error): void
      • The callback to call when an error occurred when trying to get for a new block.

        Parameters

        Returns void

  • onLogs: WatchContractEventOnLogsFn<TAbi, TEventName, TStrict>

    The callback to call when new event logs are received.

  • Optional strict?: TStrict

    Whether or not the logs must match the indexed/non-indexed arguments on event.

    Default

    false
    

Generated using TypeDoc