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

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  Contract,
  ContractTransaction,
  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 StableMathInterface extends ethers.utils.Interface {
  functions: {
    "_calcInGivenOut(uint256,uint256[],uint256,uint256,uint256)": FunctionFragment;
    "_calcOutGivenIn(uint256,uint256[],uint256,uint256,uint256)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "_calcInGivenOut",
    values: [
      BigNumberish,
      BigNumberish[],
      BigNumberish,
      BigNumberish,
      BigNumberish
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "_calcOutGivenIn",
    values: [
      BigNumberish,
      BigNumberish[],
      BigNumberish,
      BigNumberish,
      BigNumberish
    ]
  ): string;

  decodeFunctionResult(
    functionFragment: "_calcInGivenOut",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "_calcOutGivenIn",
    data: BytesLike
  ): Result;

  events: {};
}

export class StableMath extends Contract {
  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: StableMathInterface;

  functions: {
    _calcInGivenOut(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountOut: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    "_calcInGivenOut(uint256,uint256[],uint256,uint256,uint256)"(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountOut: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    _calcOutGivenIn(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountIn: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    "_calcOutGivenIn(uint256,uint256[],uint256,uint256,uint256)"(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountIn: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;
  };

  _calcInGivenOut(
    amplificationParameter: BigNumberish,
    balances: BigNumberish[],
    tokenIndexIn: BigNumberish,
    tokenIndexOut: BigNumberish,
    tokenAmountOut: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "_calcInGivenOut(uint256,uint256[],uint256,uint256,uint256)"(
    amplificationParameter: BigNumberish,
    balances: BigNumberish[],
    tokenIndexIn: BigNumberish,
    tokenIndexOut: BigNumberish,
    tokenAmountOut: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  _calcOutGivenIn(
    amplificationParameter: BigNumberish,
    balances: BigNumberish[],
    tokenIndexIn: BigNumberish,
    tokenIndexOut: BigNumberish,
    tokenAmountIn: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "_calcOutGivenIn(uint256,uint256[],uint256,uint256,uint256)"(
    amplificationParameter: BigNumberish,
    balances: BigNumberish[],
    tokenIndexIn: BigNumberish,
    tokenIndexOut: BigNumberish,
    tokenAmountIn: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  callStatic: {
    _calcInGivenOut(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountOut: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "_calcInGivenOut(uint256,uint256[],uint256,uint256,uint256)"(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountOut: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    _calcOutGivenIn(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountIn: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "_calcOutGivenIn(uint256,uint256[],uint256,uint256,uint256)"(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountIn: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  filters: {};

  estimateGas: {
    _calcInGivenOut(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountOut: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "_calcInGivenOut(uint256,uint256[],uint256,uint256,uint256)"(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountOut: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    _calcOutGivenIn(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountIn: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "_calcOutGivenIn(uint256,uint256[],uint256,uint256,uint256)"(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountIn: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    _calcInGivenOut(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountOut: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "_calcInGivenOut(uint256,uint256[],uint256,uint256,uint256)"(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountOut: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    _calcOutGivenIn(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountIn: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "_calcOutGivenIn(uint256,uint256[],uint256,uint256,uint256)"(
      amplificationParameter: BigNumberish,
      balances: BigNumberish[],
      tokenIndexIn: BigNumberish,
      tokenIndexOut: BigNumberish,
      tokenAmountIn: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;
  };
}
