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

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

interface ISemaphoreGroupsInterface extends ethers.utils.Interface {
  functions: {
    "getDepth(uint256)": FunctionFragment;
    "getLatestNeighborEdges(uint256)": FunctionFragment;
    "getMaxEdges(uint256)": FunctionFragment;
    "getNumberOfLeaves(uint256)": FunctionFragment;
    "getRoot(uint256)": FunctionFragment;
    "verifyRoots(uint256,bytes)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "getDepth",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getLatestNeighborEdges",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getMaxEdges",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getNumberOfLeaves",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getRoot",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "verifyRoots",
    values: [BigNumberish, BytesLike]
  ): string;

  decodeFunctionResult(functionFragment: "getDepth", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getLatestNeighborEdges",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getMaxEdges",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getNumberOfLeaves",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getRoot", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "verifyRoots",
    data: BytesLike
  ): Result;

  events: {
    "GroupCreated(uint256,uint8)": EventFragment;
    "MemberAdded(uint256,uint256,uint256)": EventFragment;
    "MemberRemoved(uint256,uint256,uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "GroupCreated"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "MemberAdded"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "MemberRemoved"): EventFragment;
}

export type GroupCreatedEvent = TypedEvent<
  [BigNumber, number] & { groupId: BigNumber; depth: number }
>;

export type MemberAddedEvent = TypedEvent<
  [BigNumber, BigNumber, BigNumber] & {
    groupId: BigNumber;
    identityCommitment: BigNumber;
    root: BigNumber;
  }
>;

export type MemberRemovedEvent = TypedEvent<
  [BigNumber, BigNumber, BigNumber] & {
    groupId: BigNumber;
    identityCommitment: BigNumber;
    root: BigNumber;
  }
>;

export class ISemaphoreGroups 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: ISemaphoreGroupsInterface;

  functions: {
    getDepth(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[number]>;

    getLatestNeighborEdges(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [
        ([BigNumber, BigNumber, BigNumber, string] & {
          chainID: BigNumber;
          root: BigNumber;
          latestLeafIndex: BigNumber;
          srcResourceID: string;
        })[]
      ]
    >;

    getMaxEdges(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[number]>;

    getNumberOfLeaves(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    getRoot(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    verifyRoots(
      groupId: BigNumberish,
      roots: BytesLike,
      overrides?: CallOverrides
    ): Promise<[boolean]>;
  };

  getDepth(groupId: BigNumberish, overrides?: CallOverrides): Promise<number>;

  getLatestNeighborEdges(
    groupId: BigNumberish,
    overrides?: CallOverrides
  ): Promise<
    ([BigNumber, BigNumber, BigNumber, string] & {
      chainID: BigNumber;
      root: BigNumber;
      latestLeafIndex: BigNumber;
      srcResourceID: string;
    })[]
  >;

  getMaxEdges(
    groupId: BigNumberish,
    overrides?: CallOverrides
  ): Promise<number>;

  getNumberOfLeaves(
    groupId: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getRoot(groupId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;

  verifyRoots(
    groupId: BigNumberish,
    roots: BytesLike,
    overrides?: CallOverrides
  ): Promise<boolean>;

  callStatic: {
    getDepth(groupId: BigNumberish, overrides?: CallOverrides): Promise<number>;

    getLatestNeighborEdges(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      ([BigNumber, BigNumber, BigNumber, string] & {
        chainID: BigNumber;
        root: BigNumber;
        latestLeafIndex: BigNumber;
        srcResourceID: string;
      })[]
    >;

    getMaxEdges(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<number>;

    getNumberOfLeaves(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getRoot(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    verifyRoots(
      groupId: BigNumberish,
      roots: BytesLike,
      overrides?: CallOverrides
    ): Promise<boolean>;
  };

  filters: {
    "GroupCreated(uint256,uint8)"(
      groupId?: BigNumberish | null,
      depth?: null
    ): TypedEventFilter<
      [BigNumber, number],
      { groupId: BigNumber; depth: number }
    >;

    GroupCreated(
      groupId?: BigNumberish | null,
      depth?: null
    ): TypedEventFilter<
      [BigNumber, number],
      { groupId: BigNumber; depth: number }
    >;

    "MemberAdded(uint256,uint256,uint256)"(
      groupId?: BigNumberish | null,
      identityCommitment?: null,
      root?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber],
      { groupId: BigNumber; identityCommitment: BigNumber; root: BigNumber }
    >;

    MemberAdded(
      groupId?: BigNumberish | null,
      identityCommitment?: null,
      root?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber],
      { groupId: BigNumber; identityCommitment: BigNumber; root: BigNumber }
    >;

    "MemberRemoved(uint256,uint256,uint256)"(
      groupId?: BigNumberish | null,
      identityCommitment?: null,
      root?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber],
      { groupId: BigNumber; identityCommitment: BigNumber; root: BigNumber }
    >;

    MemberRemoved(
      groupId?: BigNumberish | null,
      identityCommitment?: null,
      root?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber, BigNumber],
      { groupId: BigNumber; identityCommitment: BigNumber; root: BigNumber }
    >;
  };

  estimateGas: {
    getDepth(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getLatestNeighborEdges(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getMaxEdges(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getNumberOfLeaves(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getRoot(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    verifyRoots(
      groupId: BigNumberish,
      roots: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    getDepth(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getLatestNeighborEdges(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getMaxEdges(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getNumberOfLeaves(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getRoot(
      groupId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    verifyRoots(
      groupId: BigNumberish,
      roots: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;
  };
}
