/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BytesLike,
  FunctionFragment,
  Result,
  Interface,
  AddressLike,
  ContractRunner,
  ContractMethod,
  Listener,
} from "ethers";
import type {
  TypedContractEvent,
  TypedDeferredTopicFilter,
  TypedEventLog,
  TypedListener,
  TypedContractMethod,
} from "../../../../common";

export interface IServiceRegistryInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "isRegistered"
      | "register"
      | "registerFor"
      | "unregister"
      | "unregisterFor"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "isRegistered",
    values: [AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "register",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "registerFor",
    values: [AddressLike, string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "unregister",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "unregisterFor",
    values: [AddressLike]
  ): string;

  decodeFunctionResult(
    functionFragment: "isRegistered",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "register", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "registerFor",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "unregister", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "unregisterFor",
    data: BytesLike
  ): Result;
}

export interface IServiceRegistry extends BaseContract {
  connect(runner?: ContractRunner | null): IServiceRegistry;
  waitForDeployment(): Promise<this>;

  interface: IServiceRegistryInterface;

  queryFilter<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEventLog<TCEvent>>>;
  queryFilter<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEventLog<TCEvent>>>;

  on<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>
  ): Promise<this>;
  on<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>
  ): Promise<this>;

  once<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>
  ): Promise<this>;
  once<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>
  ): Promise<this>;

  listeners<TCEvent extends TypedContractEvent>(
    event: TCEvent
  ): Promise<Array<TypedListener<TCEvent>>>;
  listeners(eventName?: string): Promise<Array<Listener>>;
  removeAllListeners<TCEvent extends TypedContractEvent>(
    event?: TCEvent
  ): Promise<this>;

  isRegistered: TypedContractMethod<[_indexer: AddressLike], [boolean], "view">;

  register: TypedContractMethod<
    [_url: string, _geohash: string],
    [void],
    "nonpayable"
  >;

  registerFor: TypedContractMethod<
    [_indexer: AddressLike, _url: string, _geohash: string],
    [void],
    "nonpayable"
  >;

  unregister: TypedContractMethod<[], [void], "nonpayable">;

  unregisterFor: TypedContractMethod<
    [_indexer: AddressLike],
    [void],
    "nonpayable"
  >;

  getFunction<T extends ContractMethod = ContractMethod>(
    key: string | FunctionFragment
  ): T;

  getFunction(
    nameOrSignature: "isRegistered"
  ): TypedContractMethod<[_indexer: AddressLike], [boolean], "view">;
  getFunction(
    nameOrSignature: "register"
  ): TypedContractMethod<
    [_url: string, _geohash: string],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "registerFor"
  ): TypedContractMethod<
    [_indexer: AddressLike, _url: string, _geohash: string],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "unregister"
  ): TypedContractMethod<[], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "unregisterFor"
  ): TypedContractMethod<[_indexer: AddressLike], [void], "nonpayable">;

  filters: {};
}
