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

export declare namespace IPaymentsEscrow {
  export type EscrowAccountStruct = {
    balance: PromiseOrValue<BigNumberish>;
    tokensThawing: PromiseOrValue<BigNumberish>;
    thawEndTimestamp: PromiseOrValue<BigNumberish>;
  };

  export type EscrowAccountStructOutput = [BigNumber, BigNumber, BigNumber] & {
    balance: BigNumber;
    tokensThawing: BigNumber;
    thawEndTimestamp: BigNumber;
  };
}

export interface IPaymentsEscrowToolshedInterface extends utils.Interface {
  functions: {
    "MAX_WAIT_PERIOD()": FunctionFragment;
    "WITHDRAW_ESCROW_THAWING_PERIOD()": FunctionFragment;
    "cancelThaw(address,address)": FunctionFragment;
    "collect(uint8,address,address,uint256,address,uint256,address)": FunctionFragment;
    "deposit(address,address,uint256)": FunctionFragment;
    "depositTo(address,address,address,uint256)": FunctionFragment;
    "escrowAccounts(address,address,address)": FunctionFragment;
    "getBalance(address,address,address)": FunctionFragment;
    "initialize()": FunctionFragment;
    "thaw(address,address,uint256)": FunctionFragment;
    "withdraw(address,address)": FunctionFragment;
  };

  getFunction(
    nameOrSignatureOrTopic:
      | "MAX_WAIT_PERIOD"
      | "WITHDRAW_ESCROW_THAWING_PERIOD"
      | "cancelThaw"
      | "collect"
      | "deposit"
      | "depositTo"
      | "escrowAccounts"
      | "getBalance"
      | "initialize"
      | "thaw"
      | "withdraw",
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "MAX_WAIT_PERIOD",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "WITHDRAW_ESCROW_THAWING_PERIOD",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "cancelThaw",
    values: [PromiseOrValue<string>, PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "collect",
    values: [
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<string>,
      PromiseOrValue<string>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<string>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<string>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "deposit",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<string>,
      PromiseOrValue<BigNumberish>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "depositTo",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<string>,
      PromiseOrValue<string>,
      PromiseOrValue<BigNumberish>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "escrowAccounts",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<string>,
      PromiseOrValue<string>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "getBalance",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<string>,
      PromiseOrValue<string>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "initialize",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "thaw",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<string>,
      PromiseOrValue<BigNumberish>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "withdraw",
    values: [PromiseOrValue<string>, PromiseOrValue<string>],
  ): string;

  decodeFunctionResult(
    functionFragment: "MAX_WAIT_PERIOD",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "WITHDRAW_ESCROW_THAWING_PERIOD",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(functionFragment: "cancelThaw", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "collect", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "depositTo", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "escrowAccounts",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(functionFragment: "getBalance", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "thaw", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;

  events: {
    "CancelThaw(address,address,address,uint256,uint256)": EventFragment;
    "Deposit(address,address,address,uint256)": EventFragment;
    "EscrowCollected(uint8,address,address,address,uint256,address)": EventFragment;
    "Thaw(address,address,address,uint256,uint256)": EventFragment;
    "Withdraw(address,address,address,uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "CancelThaw"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "Deposit"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "EscrowCollected"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "Thaw"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "Withdraw"): EventFragment;
}

export interface CancelThawEventObject {
  payer: string;
  collector: string;
  receiver: string;
  tokensThawing: BigNumber;
  thawEndTimestamp: BigNumber;
}
export type CancelThawEvent = TypedEvent<
  [string, string, string, BigNumber, BigNumber],
  CancelThawEventObject
>;

export type CancelThawEventFilter = TypedEventFilter<CancelThawEvent>;

export interface DepositEventObject {
  payer: string;
  collector: string;
  receiver: string;
  tokens: BigNumber;
}
export type DepositEvent = TypedEvent<
  [string, string, string, BigNumber],
  DepositEventObject
>;

export type DepositEventFilter = TypedEventFilter<DepositEvent>;

export interface EscrowCollectedEventObject {
  paymentType: number;
  payer: string;
  collector: string;
  receiver: string;
  tokens: BigNumber;
  receiverDestination: string;
}
export type EscrowCollectedEvent = TypedEvent<
  [number, string, string, string, BigNumber, string],
  EscrowCollectedEventObject
>;

export type EscrowCollectedEventFilter = TypedEventFilter<EscrowCollectedEvent>;

export interface ThawEventObject {
  payer: string;
  collector: string;
  receiver: string;
  tokens: BigNumber;
  thawEndTimestamp: BigNumber;
}
export type ThawEvent = TypedEvent<
  [string, string, string, BigNumber, BigNumber],
  ThawEventObject
>;

export type ThawEventFilter = TypedEventFilter<ThawEvent>;

export interface WithdrawEventObject {
  payer: string;
  collector: string;
  receiver: string;
  tokens: BigNumber;
}
export type WithdrawEvent = TypedEvent<
  [string, string, string, BigNumber],
  WithdrawEventObject
>;

export type WithdrawEventFilter = TypedEventFilter<WithdrawEvent>;

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

  interface: IPaymentsEscrowToolshedInterface;

  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: {
    MAX_WAIT_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>;

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

    cancelThaw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    collect(
      paymentType: PromiseOrValue<BigNumberish>,
      payer: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      dataService: PromiseOrValue<string>,
      dataServiceCut: PromiseOrValue<BigNumberish>,
      receiverDestination: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    deposit(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    depositTo(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    escrowAccounts(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[IPaymentsEscrow.EscrowAccountStructOutput]>;

    getBalance(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[BigNumber]>;

    initialize(
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    thaw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    withdraw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;
  };

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

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

  cancelThaw(
    collector: PromiseOrValue<string>,
    receiver: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  collect(
    paymentType: PromiseOrValue<BigNumberish>,
    payer: PromiseOrValue<string>,
    receiver: PromiseOrValue<string>,
    tokens: PromiseOrValue<BigNumberish>,
    dataService: PromiseOrValue<string>,
    dataServiceCut: PromiseOrValue<BigNumberish>,
    receiverDestination: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  deposit(
    collector: PromiseOrValue<string>,
    receiver: PromiseOrValue<string>,
    tokens: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  depositTo(
    payer: PromiseOrValue<string>,
    collector: PromiseOrValue<string>,
    receiver: PromiseOrValue<string>,
    tokens: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  escrowAccounts(
    payer: PromiseOrValue<string>,
    collector: PromiseOrValue<string>,
    receiver: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<IPaymentsEscrow.EscrowAccountStructOutput>;

  getBalance(
    payer: PromiseOrValue<string>,
    collector: PromiseOrValue<string>,
    receiver: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<BigNumber>;

  initialize(
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  thaw(
    collector: PromiseOrValue<string>,
    receiver: PromiseOrValue<string>,
    tokens: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  withdraw(
    collector: PromiseOrValue<string>,
    receiver: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  callStatic: {
    MAX_WAIT_PERIOD(overrides?: CallOverrides): Promise<BigNumber>;

    WITHDRAW_ESCROW_THAWING_PERIOD(
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    cancelThaw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<void>;

    collect(
      paymentType: PromiseOrValue<BigNumberish>,
      payer: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      dataService: PromiseOrValue<string>,
      dataServiceCut: PromiseOrValue<BigNumberish>,
      receiverDestination: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<void>;

    deposit(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    depositTo(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    escrowAccounts(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<IPaymentsEscrow.EscrowAccountStructOutput>;

    getBalance(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

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

    thaw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    withdraw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<void>;
  };

  filters: {
    "CancelThaw(address,address,address,uint256,uint256)"(
      payer?: PromiseOrValue<string> | null,
      collector?: PromiseOrValue<string> | null,
      receiver?: PromiseOrValue<string> | null,
      tokensThawing?: null,
      thawEndTimestamp?: null,
    ): CancelThawEventFilter;
    CancelThaw(
      payer?: PromiseOrValue<string> | null,
      collector?: PromiseOrValue<string> | null,
      receiver?: PromiseOrValue<string> | null,
      tokensThawing?: null,
      thawEndTimestamp?: null,
    ): CancelThawEventFilter;

    "Deposit(address,address,address,uint256)"(
      payer?: PromiseOrValue<string> | null,
      collector?: PromiseOrValue<string> | null,
      receiver?: PromiseOrValue<string> | null,
      tokens?: null,
    ): DepositEventFilter;
    Deposit(
      payer?: PromiseOrValue<string> | null,
      collector?: PromiseOrValue<string> | null,
      receiver?: PromiseOrValue<string> | null,
      tokens?: null,
    ): DepositEventFilter;

    "EscrowCollected(uint8,address,address,address,uint256,address)"(
      paymentType?: PromiseOrValue<BigNumberish> | null,
      payer?: PromiseOrValue<string> | null,
      collector?: PromiseOrValue<string> | null,
      receiver?: null,
      tokens?: null,
      receiverDestination?: null,
    ): EscrowCollectedEventFilter;
    EscrowCollected(
      paymentType?: PromiseOrValue<BigNumberish> | null,
      payer?: PromiseOrValue<string> | null,
      collector?: PromiseOrValue<string> | null,
      receiver?: null,
      tokens?: null,
      receiverDestination?: null,
    ): EscrowCollectedEventFilter;

    "Thaw(address,address,address,uint256,uint256)"(
      payer?: PromiseOrValue<string> | null,
      collector?: PromiseOrValue<string> | null,
      receiver?: PromiseOrValue<string> | null,
      tokens?: null,
      thawEndTimestamp?: null,
    ): ThawEventFilter;
    Thaw(
      payer?: PromiseOrValue<string> | null,
      collector?: PromiseOrValue<string> | null,
      receiver?: PromiseOrValue<string> | null,
      tokens?: null,
      thawEndTimestamp?: null,
    ): ThawEventFilter;

    "Withdraw(address,address,address,uint256)"(
      payer?: PromiseOrValue<string> | null,
      collector?: PromiseOrValue<string> | null,
      receiver?: PromiseOrValue<string> | null,
      tokens?: null,
    ): WithdrawEventFilter;
    Withdraw(
      payer?: PromiseOrValue<string> | null,
      collector?: PromiseOrValue<string> | null,
      receiver?: PromiseOrValue<string> | null,
      tokens?: null,
    ): WithdrawEventFilter;
  };

  estimateGas: {
    MAX_WAIT_PERIOD(overrides?: CallOverrides): Promise<BigNumber>;

    WITHDRAW_ESCROW_THAWING_PERIOD(
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    cancelThaw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    collect(
      paymentType: PromiseOrValue<BigNumberish>,
      payer: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      dataService: PromiseOrValue<string>,
      dataServiceCut: PromiseOrValue<BigNumberish>,
      receiverDestination: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    deposit(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    depositTo(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    escrowAccounts(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    getBalance(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    initialize(
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    thaw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    withdraw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    MAX_WAIT_PERIOD(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    WITHDRAW_ESCROW_THAWING_PERIOD(
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    cancelThaw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    collect(
      paymentType: PromiseOrValue<BigNumberish>,
      payer: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      dataService: PromiseOrValue<string>,
      dataServiceCut: PromiseOrValue<BigNumberish>,
      receiverDestination: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    deposit(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    depositTo(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    escrowAccounts(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    getBalance(
      payer: PromiseOrValue<string>,
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    initialize(
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    thaw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    withdraw(
      collector: PromiseOrValue<string>,
      receiver: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;
  };
}
