Type alias WatchEventParameters<TAbiEvent, TAbiEvents, TStrict, _EventName>

WatchEventParameters<TAbiEvent, TAbiEvents, TStrict, _EventName>: {
    address?: Address | Address[];
    onError?: ((error) => void);
    onLogs: WatchEventOnLogsFn<TAbiEvent, TAbiEvents, TStrict, _EventName>;
} & (GetTransportConfig<Transport>["type"] extends "webSocket"
    ? {
        batch?: never;
        poll?: false;
        pollingInterval?: never;
    } | PollOptions & {
        poll?: true;
    }
    : PollOptions & {
        poll?: true;
    }) & ({
    args?: MaybeExtractEventArgsFromAbi<TAbiEvents, _EventName>;
    event: TAbiEvent;
    events?: never;
    strict?: TStrict;
} | {
    args?: never;
    event?: never;
    events?: TAbiEvents;
    strict?: TStrict;
} | {
    args?: never;
    event?: never;
    events?: never;
    strict?: never;
})

Type Parameters

  • TAbiEvent extends AbiEvent | undefined = undefined

  • TAbiEvents extends readonly AbiEvent[] | readonly unknown[] | undefined = TAbiEvent extends AbiEvent
        ? [TAbiEvent]
        : undefined

  • TStrict extends boolean | undefined = undefined

  • _EventName extends string | undefined = MaybeAbiEventName<TAbiEvent>

Type declaration

  • Optional address?: Address | Address[]

    The address of the contract.

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

        Parameters

        Returns void

  • onLogs: WatchEventOnLogsFn<TAbiEvent, TAbiEvents, TStrict, _EventName>

    The callback to call when new event logs are received.

Generated using TypeDoc