/* 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 type { TypedEventFilter, TypedEvent, TypedListener } from "./common";

interface StakingMockInterface extends ethers.utils.Interface {
  functions: {
    "minimumIndexerStake()": FunctionFragment;
    "stake(uint256)": FunctionFragment;
    "stakeTo(address,uint256)": FunctionFragment;
    "stakes(address)": FunctionFragment;
    "thawingPeriod()": FunctionFragment;
    "token()": FunctionFragment;
    "unstake(uint256)": FunctionFragment;
    "withdraw()": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "minimumIndexerStake",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "stake", values: [BigNumberish]): string;
  encodeFunctionData(
    functionFragment: "stakeTo",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "stakes", values: [string]): string;
  encodeFunctionData(
    functionFragment: "thawingPeriod",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "token", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "unstake",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "withdraw", values?: undefined): string;

  decodeFunctionResult(
    functionFragment: "minimumIndexerStake",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "stake", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "stakeTo", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "stakes", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "thawingPeriod",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "token", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "unstake", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;

  events: {
    "StakeDeposited(address,uint256)": EventFragment;
    "StakeLocked(address,uint256,uint256)": EventFragment;
    "StakeWithdrawn(address,uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "StakeDeposited"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "StakeLocked"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "StakeWithdrawn"): EventFragment;
}

export type StakeDepositedEvent = TypedEvent<
  [string, BigNumber] & { indexer: string; tokens: BigNumber }
>;

export type StakeLockedEvent = TypedEvent<
  [string, BigNumber, BigNumber] & {
    indexer: string;
    tokens: BigNumber;
    until: BigNumber;
  }
>;

export type StakeWithdrawnEvent = TypedEvent<
  [string, BigNumber] & { indexer: string; tokens: BigNumber }
>;

export class StakingMock 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: StakingMockInterface;

  functions: {
    minimumIndexerStake(overrides?: CallOverrides): Promise<[BigNumber]>;

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

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

    stakes(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber, BigNumber] & {
        tokensStaked: BigNumber;
        tokensAllocated: BigNumber;
        tokensLocked: BigNumber;
        tokensLockedUntil: BigNumber;
      }
    >;

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

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

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

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

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

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

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

  stakes(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<
    [BigNumber, BigNumber, BigNumber, BigNumber] & {
      tokensStaked: BigNumber;
      tokensAllocated: BigNumber;
      tokensLocked: BigNumber;
      tokensLockedUntil: BigNumber;
    }
  >;

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

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

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

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

  callStatic: {
    minimumIndexerStake(overrides?: CallOverrides): Promise<BigNumber>;

    stake(_tokens: BigNumberish, overrides?: CallOverrides): Promise<void>;

    stakeTo(
      _indexer: string,
      _tokens: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    stakes(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<
      [BigNumber, BigNumber, BigNumber, BigNumber] & {
        tokensStaked: BigNumber;
        tokensAllocated: BigNumber;
        tokensLocked: BigNumber;
        tokensLockedUntil: BigNumber;
      }
    >;

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

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

    unstake(_tokens: BigNumberish, overrides?: CallOverrides): Promise<void>;

    withdraw(overrides?: CallOverrides): Promise<void>;
  };

  filters: {
    "StakeDeposited(address,uint256)"(
      indexer?: string | null,
      tokens?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { indexer: string; tokens: BigNumber }
    >;

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

    "StakeLocked(address,uint256,uint256)"(
      indexer?: string | null,
      tokens?: null,
      until?: null
    ): TypedEventFilter<
      [string, BigNumber, BigNumber],
      { indexer: string; tokens: BigNumber; until: BigNumber }
    >;

    StakeLocked(
      indexer?: string | null,
      tokens?: null,
      until?: null
    ): TypedEventFilter<
      [string, BigNumber, BigNumber],
      { indexer: string; tokens: BigNumber; until: BigNumber }
    >;

    "StakeWithdrawn(address,uint256)"(
      indexer?: string | null,
      tokens?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { indexer: string; tokens: BigNumber }
    >;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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