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

interface FriendtechSharesV1Interface extends ethers.utils.Interface {
  functions: {
    "buyShares(address,uint256)": FunctionFragment;
    "getBuyPrice(address,uint256)": FunctionFragment;
    "getBuyPriceAfterFee(address,uint256)": FunctionFragment;
    "getPrice(uint256,uint256)": FunctionFragment;
    "getSellPrice(address,uint256)": FunctionFragment;
    "getSellPriceAfterFee(address,uint256)": FunctionFragment;
    "owner()": FunctionFragment;
    "protocolFeeDestination()": FunctionFragment;
    "protocolFeePercent()": FunctionFragment;
    "renounceOwnership()": FunctionFragment;
    "sellShares(address,uint256)": FunctionFragment;
    "setFeeDestination(address)": FunctionFragment;
    "setProtocolFeePercent(uint256)": FunctionFragment;
    "setSubjectFeePercent(uint256)": FunctionFragment;
    "sharesBalance(address,address)": FunctionFragment;
    "sharesSupply(address)": FunctionFragment;
    "subjectFeePercent()": FunctionFragment;
    "transferOwnership(address)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "buyShares",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getBuyPrice",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getBuyPriceAfterFee",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getPrice",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getSellPrice",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getSellPriceAfterFee",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "owner", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "protocolFeeDestination",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "protocolFeePercent",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "renounceOwnership",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "sellShares",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "setFeeDestination",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "setProtocolFeePercent",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "setSubjectFeePercent",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "sharesBalance",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "sharesSupply",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "subjectFeePercent",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "transferOwnership",
    values: [string]
  ): string;

  decodeFunctionResult(functionFragment: "buyShares", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getBuyPrice",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getBuyPriceAfterFee",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getPrice", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getSellPrice",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getSellPriceAfterFee",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "protocolFeeDestination",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "protocolFeePercent",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "renounceOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "sellShares", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "setFeeDestination",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setProtocolFeePercent",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setSubjectFeePercent",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "sharesBalance",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "sharesSupply",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "subjectFeePercent",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "transferOwnership",
    data: BytesLike
  ): Result;

  events: {
    "OwnershipTransferred(address,address)": EventFragment;
    "Trade(address,address,bool,uint256,uint256,uint256,uint256,uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "Trade"): EventFragment;
}

export type OwnershipTransferredEvent = TypedEvent<
  [string, string] & { previousOwner: string; newOwner: string }
>;

export type TradeEvent = TypedEvent<
  [
    string,
    string,
    boolean,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber
  ] & {
    trader: string;
    subject: string;
    isBuy: boolean;
    shareAmount: BigNumber;
    ethAmount: BigNumber;
    protocolEthAmount: BigNumber;
    subjectEthAmount: BigNumber;
    supply: BigNumber;
  }
>;

export class FriendtechSharesV1 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: FriendtechSharesV1Interface;

  functions: {
    buyShares(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

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

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

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

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

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

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

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

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

    sellShares(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

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

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

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

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

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

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

  buyShares(
    sharesSubject: string,
    amount: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  getBuyPrice(
    sharesSubject: string,
    amount: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getBuyPriceAfterFee(
    sharesSubject: string,
    amount: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getPrice(
    supply: BigNumberish,
    amount: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getSellPrice(
    sharesSubject: string,
    amount: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getSellPriceAfterFee(
    sharesSubject: string,
    amount: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

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

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

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

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

  sellShares(
    sharesSubject: string,
    amount: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

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

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

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

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

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

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

  callStatic: {
    buyShares(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    getBuyPrice(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getBuyPriceAfterFee(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getPrice(
      supply: BigNumberish,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getSellPrice(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getSellPriceAfterFee(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

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

    sellShares(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    setFeeDestination(
      _feeDestination: string,
      overrides?: CallOverrides
    ): Promise<void>;

    setProtocolFeePercent(
      _feePercent: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    setSubjectFeePercent(
      _feePercent: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

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

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

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

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

  filters: {
    "OwnershipTransferred(address,address)"(
      previousOwner?: string | null,
      newOwner?: string | null
    ): TypedEventFilter<
      [string, string],
      { previousOwner: string; newOwner: string }
    >;

    OwnershipTransferred(
      previousOwner?: string | null,
      newOwner?: string | null
    ): TypedEventFilter<
      [string, string],
      { previousOwner: string; newOwner: string }
    >;

    "Trade(address,address,bool,uint256,uint256,uint256,uint256,uint256)"(
      trader?: null,
      subject?: null,
      isBuy?: null,
      shareAmount?: null,
      ethAmount?: null,
      protocolEthAmount?: null,
      subjectEthAmount?: null,
      supply?: null
    ): TypedEventFilter<
      [
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber
      ],
      {
        trader: string;
        subject: string;
        isBuy: boolean;
        shareAmount: BigNumber;
        ethAmount: BigNumber;
        protocolEthAmount: BigNumber;
        subjectEthAmount: BigNumber;
        supply: BigNumber;
      }
    >;

    Trade(
      trader?: null,
      subject?: null,
      isBuy?: null,
      shareAmount?: null,
      ethAmount?: null,
      protocolEthAmount?: null,
      subjectEthAmount?: null,
      supply?: null
    ): TypedEventFilter<
      [
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber
      ],
      {
        trader: string;
        subject: string;
        isBuy: boolean;
        shareAmount: BigNumber;
        ethAmount: BigNumber;
        protocolEthAmount: BigNumber;
        subjectEthAmount: BigNumber;
        supply: BigNumber;
      }
    >;
  };

  estimateGas: {
    buyShares(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    getBuyPrice(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getBuyPriceAfterFee(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getPrice(
      supply: BigNumberish,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getSellPrice(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getSellPriceAfterFee(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

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

    sellShares(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

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

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

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

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

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

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

  populateTransaction: {
    buyShares(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    getBuyPrice(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getBuyPriceAfterFee(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getPrice(
      supply: BigNumberish,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getSellPrice(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getSellPriceAfterFee(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

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

    sellShares(
      sharesSubject: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

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

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

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

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

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

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