/* 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 IEpochManagerInterface extends ethers.utils.Interface {
  functions: {
    "blockHash(uint256)": FunctionFragment;
    "blockNum()": FunctionFragment;
    "currentEpoch()": FunctionFragment;
    "currentEpochBlock()": FunctionFragment;
    "currentEpochBlockSinceStart()": FunctionFragment;
    "epochsSince(uint256)": FunctionFragment;
    "epochsSinceUpdate()": FunctionFragment;
    "isCurrentEpochRun()": FunctionFragment;
    "runEpoch()": FunctionFragment;
    "setEpochLength(uint256)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "blockHash",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "blockNum", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "currentEpoch",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "currentEpochBlock",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "currentEpochBlockSinceStart",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "epochsSince",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "epochsSinceUpdate",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "isCurrentEpochRun",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "runEpoch", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "setEpochLength",
    values: [BigNumberish]
  ): string;

  decodeFunctionResult(functionFragment: "blockHash", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "blockNum", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "currentEpoch",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "currentEpochBlock",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "currentEpochBlockSinceStart",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "epochsSince",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "epochsSinceUpdate",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "isCurrentEpochRun",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "runEpoch", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "setEpochLength",
    data: BytesLike
  ): Result;

  events: {};
}

export class IEpochManager 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: IEpochManagerInterface;

  functions: {
    blockHash(
      _block: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[string]>;

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

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

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

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

    epochsSince(
      _epoch: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

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

    isCurrentEpochRun(overrides?: CallOverrides): Promise<[boolean]>;

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

    setEpochLength(
      _epochLength: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;
  };

  blockHash(_block: BigNumberish, overrides?: CallOverrides): Promise<string>;

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

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

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

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

  epochsSince(
    _epoch: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

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

  isCurrentEpochRun(overrides?: CallOverrides): Promise<boolean>;

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

  setEpochLength(
    _epochLength: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  callStatic: {
    blockHash(_block: BigNumberish, overrides?: CallOverrides): Promise<string>;

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

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

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

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

    epochsSince(
      _epoch: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

    isCurrentEpochRun(overrides?: CallOverrides): Promise<boolean>;

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

    setEpochLength(
      _epochLength: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;
  };

  filters: {};

  estimateGas: {
    blockHash(
      _block: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

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

    epochsSince(
      _epoch: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

    setEpochLength(
      _epochLength: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    blockHash(
      _block: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

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

    epochsSince(
      _epoch: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

    setEpochLength(
      _epochLength: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;
  };
}
