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

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  Contract,
  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 IChannelFactoryInterface extends ethers.utils.Interface {
  functions: {
    "createChannel(address,address)": FunctionFragment;
    "createChannelAndDepositAlice(address,address,address,uint256)": FunctionFragment;
    "getChainId()": FunctionFragment;
    "getChannelAddress(address,address)": FunctionFragment;
    "getMastercopy()": FunctionFragment;
    "getProxyCreationCode()": FunctionFragment;
    "getStoredChainId()": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "createChannel",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "createChannelAndDepositAlice",
    values: [string, string, string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getChainId",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getChannelAddress",
    values: [string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "getMastercopy",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getProxyCreationCode",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getStoredChainId",
    values?: undefined
  ): string;

  decodeFunctionResult(
    functionFragment: "createChannel",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "createChannelAndDepositAlice",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getChannelAddress",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getMastercopy",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getProxyCreationCode",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getStoredChainId",
    data: BytesLike
  ): Result;

  events: {
    "ChannelCreation(address)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "ChannelCreation"): EventFragment;
}

export class IChannelFactory 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: IChannelFactoryInterface;

  functions: {
    createChannel(
      alice: string,
      bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

    createChannelAndDepositAlice(
      alice: string,
      bob: string,
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    "createChannelAndDepositAlice(address,address,address,uint256)"(
      alice: string,
      bob: string,
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

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

    getChannelAddress(
      alice: string,
      bob: string,
      overrides?: CallOverrides
    ): Promise<[string]>;

    "getChannelAddress(address,address)"(
      alice: string,
      bob: string,
      overrides?: CallOverrides
    ): Promise<[string]>;

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

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

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

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

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

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

  createChannel(
    alice: string,
    bob: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

  createChannelAndDepositAlice(
    alice: string,
    bob: string,
    assetId: string,
    amount: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  "createChannelAndDepositAlice(address,address,address,uint256)"(
    alice: string,
    bob: string,
    assetId: string,
    amount: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

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

  getChannelAddress(
    alice: string,
    bob: string,
    overrides?: CallOverrides
  ): Promise<string>;

  "getChannelAddress(address,address)"(
    alice: string,
    bob: string,
    overrides?: CallOverrides
  ): Promise<string>;

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

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

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

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

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

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

  callStatic: {
    createChannel(
      alice: string,
      bob: string,
      overrides?: CallOverrides
    ): Promise<string>;

    "createChannel(address,address)"(
      alice: string,
      bob: string,
      overrides?: CallOverrides
    ): Promise<string>;

    createChannelAndDepositAlice(
      alice: string,
      bob: string,
      assetId: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<string>;

    "createChannelAndDepositAlice(address,address,address,uint256)"(
      alice: string,
      bob: string,
      assetId: string,
      amount: BigNumberish,
      overrides?: CallOverrides
    ): Promise<string>;

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

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

    getChannelAddress(
      alice: string,
      bob: string,
      overrides?: CallOverrides
    ): Promise<string>;

    "getChannelAddress(address,address)"(
      alice: string,
      bob: string,
      overrides?: CallOverrides
    ): Promise<string>;

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

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

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

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

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

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

  filters: {
    ChannelCreation(
      channel: null
    ): TypedEventFilter<[string], { channel: string }>;
  };

  estimateGas: {
    createChannel(
      alice: string,
      bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

    createChannelAndDepositAlice(
      alice: string,
      bob: string,
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    "createChannelAndDepositAlice(address,address,address,uint256)"(
      alice: string,
      bob: string,
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

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

    getChannelAddress(
      alice: string,
      bob: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    "getChannelAddress(address,address)"(
      alice: string,
      bob: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

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

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

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

  populateTransaction: {
    createChannel(
      alice: string,
      bob: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

    createChannelAndDepositAlice(
      alice: string,
      bob: string,
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    "createChannelAndDepositAlice(address,address,address,uint256)"(
      alice: string,
      bob: string,
      assetId: string,
      amount: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

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

    getChannelAddress(
      alice: string,
      bob: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    "getChannelAddress(address,address)"(
      alice: string,
      bob: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

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

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

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