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

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  BaseContract,
  ContractTransaction,
  Overrides,
  PayableOverrides,
  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 SimpleDexInterface extends ethers.utils.Interface {
  functions: {
    "liquidity(address)": FunctionFragment;
    "purpose()": FunctionFragment;
    "totalLiquidity()": FunctionFragment;
    "init(uint256)": FunctionFragment;
    "price(uint256,uint256,uint256)": FunctionFragment;
    "ethToToken()": FunctionFragment;
    "tokenToEth(uint256)": FunctionFragment;
    "deposit()": FunctionFragment;
    "withdraw(uint256)": FunctionFragment;
    "swapNGo(address,uint16,bytes32,uint256,uint32)": FunctionFragment;
  };

  encodeFunctionData(functionFragment: "liquidity", values: [string]): string;
  encodeFunctionData(functionFragment: "purpose", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "totalLiquidity",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "init", values: [BigNumberish]): string;
  encodeFunctionData(
    functionFragment: "price",
    values: [BigNumberish, BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "ethToToken",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "tokenToEth",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "deposit", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "withdraw",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "swapNGo",
    values: [string, BigNumberish, BytesLike, BigNumberish, BigNumberish]
  ): string;

  decodeFunctionResult(functionFragment: "liquidity", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "purpose", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "totalLiquidity",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "init", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "price", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "ethToToken", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "tokenToEth", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "swapNGo", data: BytesLike): Result;

  events: {};
}

export class SimpleDex 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: SimpleDexInterface;

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

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

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

    init(
      tokens: BigNumberish,
      overrides?: PayableOverrides & {from?: string | Promise<string>}
    ): Promise<ContractTransaction>;

    price(
      input_amount: BigNumberish,
      input_reserve: BigNumberish,
      output_reserve: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

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

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

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

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

    swapNGo(
      _address: string,
      targetChain: BigNumberish,
      targetAddress: BytesLike,
      fee: BigNumberish,
      nonce: BigNumberish,
      overrides?: PayableOverrides & {from?: string | Promise<string>}
    ): Promise<ContractTransaction>;
  };

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

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

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

  init(
    tokens: BigNumberish,
    overrides?: PayableOverrides & {from?: string | Promise<string>}
  ): Promise<ContractTransaction>;

  price(
    input_amount: BigNumberish,
    input_reserve: BigNumberish,
    output_reserve: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

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

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

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

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

  swapNGo(
    _address: string,
    targetChain: BigNumberish,
    targetAddress: BytesLike,
    fee: BigNumberish,
    nonce: BigNumberish,
    overrides?: PayableOverrides & {from?: string | Promise<string>}
  ): Promise<ContractTransaction>;

  callStatic: {
    liquidity(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

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

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

    init(tokens: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;

    price(
      input_amount: BigNumberish,
      input_reserve: BigNumberish,
      output_reserve: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

    tokenToEth(
      tokens: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

    withdraw(
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber, BigNumber]>;

    swapNGo(
      _address: string,
      targetChain: BigNumberish,
      targetAddress: BytesLike,
      fee: BigNumberish,
      nonce: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  filters: {};

  estimateGas: {
    liquidity(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

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

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

    init(
      tokens: BigNumberish,
      overrides?: PayableOverrides & {from?: string | Promise<string>}
    ): Promise<BigNumber>;

    price(
      input_amount: BigNumberish,
      input_reserve: BigNumberish,
      output_reserve: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

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

    swapNGo(
      _address: string,
      targetChain: BigNumberish,
      targetAddress: BytesLike,
      fee: BigNumberish,
      nonce: BigNumberish,
      overrides?: PayableOverrides & {from?: string | Promise<string>}
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    liquidity(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

    init(
      tokens: BigNumberish,
      overrides?: PayableOverrides & {from?: string | Promise<string>}
    ): Promise<PopulatedTransaction>;

    price(
      input_amount: BigNumberish,
      input_reserve: BigNumberish,
      output_reserve: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

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

    swapNGo(
      _address: string,
      targetChain: BigNumberish,
      targetAddress: BytesLike,
      fee: BigNumberish,
      nonce: BigNumberish,
      overrides?: PayableOverrides & {from?: string | Promise<string>}
    ): Promise<PopulatedTransaction>;
  };
}
