/* 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 GSRManagerInterface extends ethers.utils.Interface {
  functions: {
    "acceptOwnership()": FunctionFragment;
    "balances(address)": FunctionFragment;
    "calcReturn(address)": FunctionFragment;
    "calcUpdatedRate()": FunctionFragment;
    "cumulativeInterestRate()": FunctionFragment;
    "drip()": FunctionFragment;
    "exit(uint256)": FunctionFragment;
    "governor()": FunctionFragment;
    "join(uint256)": FunctionFragment;
    "lastDripTime()": FunctionFragment;
    "pendingGovernor()": FunctionFragment;
    "reserves()": FunctionFragment;
    "savingsRate()": FunctionFragment;
    "setRate(uint256)": FunctionFragment;
    "token()": FunctionFragment;
    "transferOwnership(address)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "acceptOwnership",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "balances", values: [string]): string;
  encodeFunctionData(functionFragment: "calcReturn", values: [string]): string;
  encodeFunctionData(
    functionFragment: "calcUpdatedRate",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "cumulativeInterestRate",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "drip", values?: undefined): string;
  encodeFunctionData(functionFragment: "exit", values: [BigNumberish]): string;
  encodeFunctionData(functionFragment: "governor", values?: undefined): string;
  encodeFunctionData(functionFragment: "join", values: [BigNumberish]): string;
  encodeFunctionData(
    functionFragment: "lastDripTime",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "pendingGovernor",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "reserves", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "savingsRate",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "setRate",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "token", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "transferOwnership",
    values: [string]
  ): string;

  decodeFunctionResult(
    functionFragment: "acceptOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "balances", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "calcReturn", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "calcUpdatedRate",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "cumulativeInterestRate",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "drip", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "governor", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "join", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "lastDripTime",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "pendingGovernor",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "reserves", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "savingsRate",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "setRate", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "token", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "transferOwnership",
    data: BytesLike
  ): Result;

  events: {
    "Drip(uint256,uint256)": EventFragment;
    "Exit(address,uint256,uint256)": EventFragment;
    "Join(address,uint256,uint256)": EventFragment;
    "NewOwnership(address,address)": EventFragment;
    "NewPendingOwnership(address,address)": EventFragment;
    "SetRate(uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "Drip"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "Exit"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "Join"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "NewOwnership"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "NewPendingOwnership"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetRate"): EventFragment;
}

export class GSRManager 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: GSRManagerInterface;

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

    balances(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>;

    calcReturn(
      _account: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber] & { totalBalance: BigNumber }>;

    calcUpdatedRate(
      overrides?: CallOverrides
    ): Promise<[BigNumber] & { updatedRate: BigNumber }>;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  calcReturn(_account: string, overrides?: CallOverrides): Promise<BigNumber>;

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

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

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

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

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

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

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

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

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

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

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

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

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

  callStatic: {
    acceptOwnership(overrides?: CallOverrides): Promise<void>;

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

    calcReturn(_account: string, overrides?: CallOverrides): Promise<BigNumber>;

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

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

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

    exit(_amount: BigNumberish, overrides?: CallOverrides): Promise<void>;

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

    join(_amount: BigNumberish, overrides?: CallOverrides): Promise<void>;

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

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

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

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

    setRate(_newRate: BigNumberish, overrides?: CallOverrides): Promise<void>;

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

    transferOwnership(
      _newGovernor: string,
      overrides?: CallOverrides
    ): Promise<void>;
  };

  filters: {
    Drip(
      cumulativeInterestRate?: null,
      lastDripTime?: null
    ): TypedEventFilter<
      [BigNumber, BigNumber],
      { cumulativeInterestRate: BigNumber; lastDripTime: BigNumber }
    >;

    Exit(
      account?: string | null,
      gsrBalance?: null,
      gdai?: null
    ): TypedEventFilter<
      [string, BigNumber, BigNumber],
      { account: string; gsrBalance: BigNumber; gdai: BigNumber }
    >;

    Join(
      account?: string | null,
      gdai?: null,
      gsrBalance?: null
    ): TypedEventFilter<
      [string, BigNumber, BigNumber],
      { account: string; gdai: BigNumber; gsrBalance: BigNumber }
    >;

    NewOwnership(
      from?: string | null,
      to?: string | null
    ): TypedEventFilter<[string, string], { from: string; to: string }>;

    NewPendingOwnership(
      from?: string | null,
      to?: string | null
    ): TypedEventFilter<[string, string], { from: string; to: string }>;

    SetRate(
      newRate?: null
    ): TypedEventFilter<[BigNumber], { newRate: BigNumber }>;
  };

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

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

    calcReturn(_account: string, overrides?: CallOverrides): Promise<BigNumber>;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    calcReturn(
      _account: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

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

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

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

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

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

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

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

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

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

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