/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
  BaseContract,
  BigNumber,
  BigNumberish,
  BytesLike,
  CallOverrides,
  ContractTransaction,
  Overrides,
  PopulatedTransaction,
  Signer,
  utils,
} from "ethers";
import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
import { Listener, Provider } from "@ethersproject/providers";
import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";

export interface PaymentSplitterUpgradeableInterface extends utils.Interface {
  contractName: "PaymentSplitterUpgradeable";
  functions: {
    "distribute(address)": FunctionFragment;
    "payee(uint256)": FunctionFragment;
    "payeeCount()": FunctionFragment;
    "release(address)": FunctionFragment;
    "released(address,address)": FunctionFragment;
    "shares(address)": FunctionFragment;
    "thirdwebFees()": FunctionFragment;
    "totalReleased(address)": FunctionFragment;
    "totalShares()": FunctionFragment;
  };

  encodeFunctionData(functionFragment: "distribute", values: [string]): string;
  encodeFunctionData(functionFragment: "payee", values: [BigNumberish]): string;
  encodeFunctionData(
    functionFragment: "payeeCount",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "release", values: [string]): string;
  encodeFunctionData(
    functionFragment: "released",
    values: [string, string]
  ): string;
  encodeFunctionData(functionFragment: "shares", values: [string]): string;
  encodeFunctionData(
    functionFragment: "thirdwebFees",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "totalReleased",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "totalShares",
    values?: undefined
  ): string;

  decodeFunctionResult(functionFragment: "distribute", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "payee", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "payeeCount", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "release", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "released", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "shares", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "thirdwebFees",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "totalReleased",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "totalShares",
    data: BytesLike
  ): Result;

  events: {
    "ERC20PaymentReleased(address,address,uint256)": EventFragment;
    "PayeeAdded(address,uint256)": EventFragment;
    "PaymentReceived(address,uint256)": EventFragment;
    "PaymentReleased(address,uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "ERC20PaymentReleased"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "PayeeAdded"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "PaymentReceived"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "PaymentReleased"): EventFragment;
}

export type ERC20PaymentReleasedEvent = TypedEvent<
  [string, string, BigNumber],
  { token: string; to: string; amount: BigNumber }
>;

export type ERC20PaymentReleasedEventFilter =
  TypedEventFilter<ERC20PaymentReleasedEvent>;

export type PayeeAddedEvent = TypedEvent<
  [string, BigNumber],
  { account: string; shares: BigNumber }
>;

export type PayeeAddedEventFilter = TypedEventFilter<PayeeAddedEvent>;

export type PaymentReceivedEvent = TypedEvent<
  [string, BigNumber],
  { from: string; amount: BigNumber }
>;

export type PaymentReceivedEventFilter = TypedEventFilter<PaymentReceivedEvent>;

export type PaymentReleasedEvent = TypedEvent<
  [string, BigNumber],
  { to: string; amount: BigNumber }
>;

export type PaymentReleasedEventFilter = TypedEventFilter<PaymentReleasedEvent>;

export interface PaymentSplitterUpgradeable extends BaseContract {
  contractName: "PaymentSplitterUpgradeable";
  connect(signerOrProvider: Signer | Provider | string): this;
  attach(addressOrName: string): this;
  deployed(): Promise<this>;

  interface: PaymentSplitterUpgradeableInterface;

  queryFilter<TEvent extends TypedEvent>(
    event: TypedEventFilter<TEvent>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TEvent>>;

  listeners<TEvent extends TypedEvent>(
    eventFilter?: TypedEventFilter<TEvent>
  ): Array<TypedListener<TEvent>>;
  listeners(eventName?: string): Array<Listener>;
  removeAllListeners<TEvent extends TypedEvent>(
    eventFilter: TypedEventFilter<TEvent>
  ): this;
  removeAllListeners(eventName?: string): this;
  off: OnEvent<this>;
  on: OnEvent<this>;
  once: OnEvent<this>;
  removeListener: OnEvent<this>;

  functions: {
    "distribute(address)"(
      token: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

    payee(index: BigNumberish, overrides?: CallOverrides): Promise<[string]>;

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

    "release(address)"(
      account: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "release(address,address)"(
      token: string,
      account: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "released(address,address)"(
      token: string,
      account: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    "released(address)"(
      account: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    shares(account: string, overrides?: CallOverrides): Promise<[BigNumber]>;

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

    "totalReleased(address)"(
      token: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

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

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

  "distribute(address)"(
    token: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

  payee(index: BigNumberish, overrides?: CallOverrides): Promise<string>;

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

  "release(address)"(
    account: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "release(address,address)"(
    token: string,
    account: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "released(address,address)"(
    token: string,
    account: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "released(address)"(
    account: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  shares(account: string, overrides?: CallOverrides): Promise<BigNumber>;

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

  "totalReleased(address)"(
    token: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "totalReleased()"(overrides?: CallOverrides): Promise<BigNumber>;

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

  callStatic: {
    "distribute(address)"(
      token: string,
      overrides?: CallOverrides
    ): Promise<void>;

    "distribute()"(overrides?: CallOverrides): Promise<void>;

    payee(index: BigNumberish, overrides?: CallOverrides): Promise<string>;

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

    "release(address)"(
      account: string,
      overrides?: CallOverrides
    ): Promise<void>;

    "release(address,address)"(
      token: string,
      account: string,
      overrides?: CallOverrides
    ): Promise<void>;

    "released(address,address)"(
      token: string,
      account: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "released(address)"(
      account: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    shares(account: string, overrides?: CallOverrides): Promise<BigNumber>;

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

    "totalReleased(address)"(
      token: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "totalReleased()"(overrides?: CallOverrides): Promise<BigNumber>;

    totalShares(overrides?: CallOverrides): Promise<BigNumber>;
  };

  filters: {
    "ERC20PaymentReleased(address,address,uint256)"(
      token?: string | null,
      to?: null,
      amount?: null
    ): ERC20PaymentReleasedEventFilter;
    ERC20PaymentReleased(
      token?: string | null,
      to?: null,
      amount?: null
    ): ERC20PaymentReleasedEventFilter;

    "PayeeAdded(address,uint256)"(
      account?: null,
      shares?: null
    ): PayeeAddedEventFilter;
    PayeeAdded(account?: null, shares?: null): PayeeAddedEventFilter;

    "PaymentReceived(address,uint256)"(
      from?: null,
      amount?: null
    ): PaymentReceivedEventFilter;
    PaymentReceived(from?: null, amount?: null): PaymentReceivedEventFilter;

    "PaymentReleased(address,uint256)"(
      to?: null,
      amount?: null
    ): PaymentReleasedEventFilter;
    PaymentReleased(to?: null, amount?: null): PaymentReleasedEventFilter;
  };

  estimateGas: {
    "distribute(address)"(
      token: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

    payee(index: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;

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

    "release(address)"(
      account: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "release(address,address)"(
      token: string,
      account: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "released(address,address)"(
      token: string,
      account: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "released(address)"(
      account: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    shares(account: string, overrides?: CallOverrides): Promise<BigNumber>;

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

    "totalReleased(address)"(
      token: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "totalReleased()"(overrides?: CallOverrides): Promise<BigNumber>;

    totalShares(overrides?: CallOverrides): Promise<BigNumber>;
  };

  populateTransaction: {
    "distribute(address)"(
      token: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

    payee(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

    "release(address)"(
      account: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "release(address,address)"(
      token: string,
      account: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "released(address,address)"(
      token: string,
      account: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "released(address)"(
      account: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    shares(
      account: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

    "totalReleased(address)"(
      token: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "totalReleased()"(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    totalShares(overrides?: CallOverrides): Promise<PopulatedTransaction>;
  };
}
