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

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  Contract,
  ContractTransaction,
  Overrides,
  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 CMCWithdrawInterface extends ethers.utils.Interface {
  functions: {
    "exit(address,address,address)": FunctionFragment;
    "getAlice()": FunctionFragment;
    "getBob()": FunctionFragment;
    "getExitableAmount(address,address)": FunctionFragment;
    "getTotalTransferred(address)": FunctionFragment;
    "getWithdrawalTransactionRecord(tuple)": FunctionFragment;
    "lock()": FunctionFragment;
    "setup(address,address)": FunctionFragment;
    "withdraw(tuple,bytes,bytes)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "exit",
    values: [string, string, string]
  ): string;
  encodeFunctionData(functionFragment: "getAlice", values?: undefined): string;
  encodeFunctionData(functionFragment: "getBob", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "getExitableAmount",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "getTotalTransferred",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "getWithdrawalTransactionRecord",
    values: [
      {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      }
    ]
  ): string;
  encodeFunctionData(functionFragment: "lock", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "setup",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "withdraw",
    values: [
      {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      BytesLike,
      BytesLike
    ]
  ): string;

  decodeFunctionResult(functionFragment: "exit", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "getAlice", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "getBob", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getExitableAmount",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getTotalTransferred",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getWithdrawalTransactionRecord",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "lock", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "setup", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;

  events: {};
}

export class CMCWithdraw 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: CMCWithdrawInterface;

  functions: {
    exit(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "exit(address,address,address)"(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

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

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

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

    getExitableAmount(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    "getExitableAmount(address,address)"(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    getTotalTransferred(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

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

    getWithdrawalTransactionRecord(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    "getWithdrawalTransactionRecord((address,address,address,uint256,uint256,address,bytes))"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<[boolean]>;

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

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

    setup(
      _alice: string,
      _bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

    withdraw(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "withdraw((address,address,address,uint256,uint256,address,bytes),bytes,bytes)"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;
  };

  exit(
    assetId: string,
    owner: string,
    recipient: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "exit(address,address,address)"(
    assetId: string,
    owner: string,
    recipient: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

  "getAlice()"(overrides?: CallOverrides): Promise<string>;

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

  "getBob()"(overrides?: CallOverrides): Promise<string>;

  getExitableAmount(
    assetId: string,
    owner: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "getExitableAmount(address,address)"(
    assetId: string,
    owner: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getTotalTransferred(
    assetId: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  "getTotalTransferred(address)"(
    assetId: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  getWithdrawalTransactionRecord(
    wd: {
      channelAddress: string;
      assetId: string;
      recipient: string;
      amount: BigNumberish;
      nonce: BigNumberish;
      callTo: string;
      callData: BytesLike;
    },
    overrides?: CallOverrides
  ): Promise<boolean>;

  "getWithdrawalTransactionRecord((address,address,address,uint256,uint256,address,bytes))"(
    wd: {
      channelAddress: string;
      assetId: string;
      recipient: string;
      amount: BigNumberish;
      nonce: BigNumberish;
      callTo: string;
      callData: BytesLike;
    },
    overrides?: CallOverrides
  ): Promise<boolean>;

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

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

  setup(
    _alice: string,
    _bob: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

  withdraw(
    wd: {
      channelAddress: string;
      assetId: string;
      recipient: string;
      amount: BigNumberish;
      nonce: BigNumberish;
      callTo: string;
      callData: BytesLike;
    },
    aliceSignature: BytesLike,
    bobSignature: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "withdraw((address,address,address,uint256,uint256,address,bytes),bytes,bytes)"(
    wd: {
      channelAddress: string;
      assetId: string;
      recipient: string;
      amount: BigNumberish;
      nonce: BigNumberish;
      callTo: string;
      callData: BytesLike;
    },
    aliceSignature: BytesLike,
    bobSignature: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  callStatic: {
    exit(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: CallOverrides
    ): Promise<void>;

    "exit(address,address,address)"(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: CallOverrides
    ): Promise<void>;

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

    "getAlice()"(overrides?: CallOverrides): Promise<string>;

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

    "getBob()"(overrides?: CallOverrides): Promise<string>;

    getExitableAmount(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getExitableAmount(address,address)"(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getTotalTransferred(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getTotalTransferred(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getWithdrawalTransactionRecord(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<boolean>;

    "getWithdrawalTransactionRecord((address,address,address,uint256,uint256,address,bytes))"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<boolean>;

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

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

    setup(
      _alice: string,
      _bob: string,
      overrides?: CallOverrides
    ): Promise<void>;

    "setup(address,address)"(
      _alice: string,
      _bob: string,
      overrides?: CallOverrides
    ): Promise<void>;

    withdraw(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    "withdraw((address,address,address,uint256,uint256,address,bytes),bytes,bytes)"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;
  };

  filters: {};

  estimateGas: {
    exit(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "exit(address,address,address)"(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

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

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

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

    getExitableAmount(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getExitableAmount(address,address)"(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getTotalTransferred(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getTotalTransferred(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getWithdrawalTransactionRecord(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getWithdrawalTransactionRecord((address,address,address,uint256,uint256,address,bytes))"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

    setup(
      _alice: string,
      _bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

    withdraw(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "withdraw((address,address,address,uint256,uint256,address,bytes),bytes,bytes)"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    exit(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "exit(address,address,address)"(
      assetId: string,
      owner: string,
      recipient: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

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

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

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

    getExitableAmount(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getExitableAmount(address,address)"(
      assetId: string,
      owner: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getTotalTransferred(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getTotalTransferred(address)"(
      assetId: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getWithdrawalTransactionRecord(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getWithdrawalTransactionRecord((address,address,address,uint256,uint256,address,bytes))"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

    setup(
      _alice: string,
      _bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

    withdraw(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "withdraw((address,address,address,uint256,uint256,address,bytes),bytes,bytes)"(
      wd: {
        channelAddress: string;
        assetId: string;
        recipient: string;
        amount: BigNumberish;
        nonce: BigNumberish;
        callTo: string;
        callData: BytesLike;
      },
      aliceSignature: BytesLike,
      bobSignature: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;
  };
}
