/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  BaseContract,
  ContractTransaction,
  Overrides,
  CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";

interface ServiceRegistryInterface extends ethers.utils.Interface {
  functions: {
    "acceptProxy(address)": FunctionFragment;
    "acceptProxyAndCall(address,bytes)": FunctionFragment;
    "controller()": FunctionFragment;
    "initialize(address)": FunctionFragment;
    "isRegistered(address)": FunctionFragment;
    "register(string,string)": FunctionFragment;
    "registerFor(address,string,string)": FunctionFragment;
    "services(address)": FunctionFragment;
    "setController(address)": FunctionFragment;
    "syncAllContracts()": FunctionFragment;
    "unregister()": FunctionFragment;
    "unregisterFor(address)": FunctionFragment;
  };

  encodeFunctionData(functionFragment: "acceptProxy", values: [string]): string;
  encodeFunctionData(
    functionFragment: "acceptProxyAndCall",
    values: [string, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "controller",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "initialize", values: [string]): string;
  encodeFunctionData(
    functionFragment: "isRegistered",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "register",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "registerFor",
    values: [string, string, string]
  ): string;
  encodeFunctionData(functionFragment: "services", values: [string]): string;
  encodeFunctionData(
    functionFragment: "setController",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "syncAllContracts",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "unregister",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "unregisterFor",
    values: [string]
  ): string;

  decodeFunctionResult(
    functionFragment: "acceptProxy",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "acceptProxyAndCall",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "controller", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "isRegistered",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "register", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "registerFor",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "services", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "setController",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "syncAllContracts",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "unregister", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "unregisterFor",
    data: BytesLike
  ): Result;

  events: {
    "ContractSynced(bytes32,address)": EventFragment;
    "ParameterUpdated(string)": EventFragment;
    "ServiceRegistered(address,string,string)": EventFragment;
    "ServiceUnregistered(address)": EventFragment;
    "SetController(address)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "ContractSynced"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ParameterUpdated"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ServiceRegistered"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ServiceUnregistered"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetController"): EventFragment;
}

export class ServiceRegistry extends BaseContract {
  connect(signerOrProvider: Signer | Provider | string): this;
  attach(addressOrName: string): this;
  deployed(): Promise<this>;

  listeners<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
  ): Array<TypedListener<EventArgsArray, EventArgsObject>>;
  off<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  on<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  once<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
  ): this;

  listeners(eventName?: string): Array<Listener>;
  off(eventName: string, listener: Listener): this;
  on(eventName: string, listener: Listener): this;
  once(eventName: string, listener: Listener): this;
  removeListener(eventName: string, listener: Listener): this;
  removeAllListeners(eventName?: string): this;

  queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
    event: TypedEventFilter<EventArgsArray, EventArgsObject>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;

  interface: ServiceRegistryInterface;

  functions: {
    acceptProxy(
      _proxy: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    acceptProxyAndCall(
      _proxy: string,
      _data: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    controller(overrides?: CallOverrides): Promise<[string]>;

    initialize(
      _controller: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    isRegistered(
      _indexer: string,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    register(
      _url: string,
      _geohash: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    registerFor(
      _indexer: string,
      _url: string,
      _geohash: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    services(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<[string, string] & { url: string; geohash: string }>;

    setController(
      _controller: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    syncAllContracts(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    unregister(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    unregisterFor(
      _indexer: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;
  };

  acceptProxy(
    _proxy: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  acceptProxyAndCall(
    _proxy: string,
    _data: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  controller(overrides?: CallOverrides): Promise<string>;

  initialize(
    _controller: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  isRegistered(_indexer: string, overrides?: CallOverrides): Promise<boolean>;

  register(
    _url: string,
    _geohash: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  registerFor(
    _indexer: string,
    _url: string,
    _geohash: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  services(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<[string, string] & { url: string; geohash: string }>;

  setController(
    _controller: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  syncAllContracts(
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  unregister(
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  unregisterFor(
    _indexer: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  callStatic: {
    acceptProxy(_proxy: string, overrides?: CallOverrides): Promise<void>;

    acceptProxyAndCall(
      _proxy: string,
      _data: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    controller(overrides?: CallOverrides): Promise<string>;

    initialize(_controller: string, overrides?: CallOverrides): Promise<void>;

    isRegistered(_indexer: string, overrides?: CallOverrides): Promise<boolean>;

    register(
      _url: string,
      _geohash: string,
      overrides?: CallOverrides
    ): Promise<void>;

    registerFor(
      _indexer: string,
      _url: string,
      _geohash: string,
      overrides?: CallOverrides
    ): Promise<void>;

    services(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<[string, string] & { url: string; geohash: string }>;

    setController(
      _controller: string,
      overrides?: CallOverrides
    ): Promise<void>;

    syncAllContracts(overrides?: CallOverrides): Promise<void>;

    unregister(overrides?: CallOverrides): Promise<void>;

    unregisterFor(_indexer: string, overrides?: CallOverrides): Promise<void>;
  };

  filters: {
    ContractSynced(
      nameHash?: BytesLike | null,
      contractAddress?: null
    ): TypedEventFilter<
      [string, string],
      { nameHash: string; contractAddress: string }
    >;

    ParameterUpdated(
      param?: null
    ): TypedEventFilter<[string], { param: string }>;

    ServiceRegistered(
      indexer?: string | null,
      url?: null,
      geohash?: null
    ): TypedEventFilter<
      [string, string, string],
      { indexer: string; url: string; geohash: string }
    >;

    ServiceUnregistered(
      indexer?: string | null
    ): TypedEventFilter<[string], { indexer: string }>;

    SetController(
      controller?: null
    ): TypedEventFilter<[string], { controller: string }>;
  };

  estimateGas: {
    acceptProxy(
      _proxy: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    acceptProxyAndCall(
      _proxy: string,
      _data: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    controller(overrides?: CallOverrides): Promise<BigNumber>;

    initialize(
      _controller: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    isRegistered(
      _indexer: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    register(
      _url: string,
      _geohash: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    registerFor(
      _indexer: string,
      _url: string,
      _geohash: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    services(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

    setController(
      _controller: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    syncAllContracts(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    unregister(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    unregisterFor(
      _indexer: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    acceptProxy(
      _proxy: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    acceptProxyAndCall(
      _proxy: string,
      _data: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    controller(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    initialize(
      _controller: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    isRegistered(
      _indexer: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    register(
      _url: string,
      _geohash: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    registerFor(
      _indexer: string,
      _url: string,
      _geohash: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    services(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    setController(
      _controller: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    syncAllContracts(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    unregister(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    unregisterFor(
      _indexer: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;
  };
}
