/* 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 IMerkleSystemInterface extends ethers.utils.Interface {
  functions: {
    "getHasher()": FunctionFragment;
    "getLastRoot()": FunctionFragment;
    "getLevels()": FunctionFragment;
    "getNextIndex()": FunctionFragment;
    "getZeroHash(uint32)": FunctionFragment;
    "isKnownRoot(uint256)": FunctionFragment;
  };

  encodeFunctionData(functionFragment: "getHasher", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "getLastRoot",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "getLevels", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "getNextIndex",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getZeroHash",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "isKnownRoot",
    values: [BigNumberish]
  ): string;

  decodeFunctionResult(functionFragment: "getHasher", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getLastRoot",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getLevels", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getNextIndex",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getZeroHash",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "isKnownRoot",
    data: BytesLike
  ): Result;

  events: {};
}

export class IMerkleSystem 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: IMerkleSystemInterface;

  functions: {
    getHasher(overrides?: CallOverrides): Promise<[string]>;

    getLastRoot(overrides?: CallOverrides): Promise<[BigNumber]>;

    getLevels(overrides?: CallOverrides): Promise<[number]>;

    getNextIndex(overrides?: CallOverrides): Promise<[number]>;

    getZeroHash(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    isKnownRoot(
      root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[boolean]>;
  };

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

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

  getLevels(overrides?: CallOverrides): Promise<number>;

  getNextIndex(overrides?: CallOverrides): Promise<number>;

  getZeroHash(
    index: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  isKnownRoot(root: BigNumberish, overrides?: CallOverrides): Promise<boolean>;

  callStatic: {
    getHasher(overrides?: CallOverrides): Promise<string>;

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

    getLevels(overrides?: CallOverrides): Promise<number>;

    getNextIndex(overrides?: CallOverrides): Promise<number>;

    getZeroHash(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    isKnownRoot(
      root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<boolean>;
  };

  filters: {};

  estimateGas: {
    getHasher(overrides?: CallOverrides): Promise<BigNumber>;

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

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

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

    getZeroHash(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    isKnownRoot(
      root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    getHasher(overrides?: CallOverrides): Promise<PopulatedTransaction>;

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

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

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

    getZeroHash(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    isKnownRoot(
      root: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;
  };
}
