/* 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 L2TokenGatewayMockInterface extends ethers.utils.Interface {
  functions: {
    "calculateL2TokenAddress(address)": FunctionFragment;
    "finalizeInboundTransfer(address,address,address,uint256,bytes)": FunctionFragment;
    "getOutboundCalldata(address,address,address,uint256,bytes)": FunctionFragment;
    "l1Token()": FunctionFragment;
    "l2Token()": FunctionFragment;
    "nextId()": FunctionFragment;
    "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": FunctionFragment;
    "owner()": FunctionFragment;
    "renounceOwnership()": FunctionFragment;
    "transferOwnership(address)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "calculateL2TokenAddress",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "finalizeInboundTransfer",
    values: [string, string, string, BigNumberish, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "getOutboundCalldata",
    values: [string, string, string, BigNumberish, BytesLike]
  ): string;
  encodeFunctionData(functionFragment: "l1Token", values?: undefined): string;
  encodeFunctionData(functionFragment: "l2Token", values?: undefined): string;
  encodeFunctionData(functionFragment: "nextId", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "outboundTransfer",
    values: [
      string,
      string,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BytesLike
    ]
  ): string;
  encodeFunctionData(functionFragment: "owner", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "renounceOwnership",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "transferOwnership",
    values: [string]
  ): string;

  decodeFunctionResult(
    functionFragment: "calculateL2TokenAddress",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "finalizeInboundTransfer",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getOutboundCalldata",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "l1Token", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "l2Token", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "nextId", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "outboundTransfer",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "renounceOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "transferOwnership",
    data: BytesLike
  ): Result;

  events: {
    "DepositFinalized(address,address,address,uint256)": EventFragment;
    "FakeTxToL1(address,bytes)": EventFragment;
    "OwnershipTransferred(address,address)": EventFragment;
    "WithdrawalInitiated(address,address,address,uint256,uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "DepositFinalized"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "FakeTxToL1"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "WithdrawalInitiated"): EventFragment;
}

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

export type FakeTxToL1Event = TypedEvent<
  [string, string] & { from: string; outboundCalldata: string }
>;

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

export type WithdrawalInitiatedEvent = TypedEvent<
  [string, string, string, BigNumber, BigNumber] & {
    l1Token: string;
    from: string;
    to: string;
    sequenceNumber: BigNumber;
    amount: BigNumber;
  }
>;

export class L2TokenGatewayMock 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: L2TokenGatewayMockInterface;

  functions: {
    calculateL2TokenAddress(
      l1ERC20: string,
      overrides?: CallOverrides
    ): Promise<[string]>;

    finalizeInboundTransfer(
      _l1Token: string,
      _from: string,
      _to: string,
      _amount: BigNumberish,
      _data: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    getOutboundCalldata(
      _l1Token: string,
      _from: string,
      _to: string,
      _amount: BigNumberish,
      _data: BytesLike,
      overrides?: CallOverrides
    ): Promise<[string]>;

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

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

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

    outboundTransfer(
      _l1Token: string,
      _to: string,
      _amount: BigNumberish,
      arg3: BigNumberish,
      arg4: BigNumberish,
      _data: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

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

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

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

  calculateL2TokenAddress(
    l1ERC20: string,
    overrides?: CallOverrides
  ): Promise<string>;

  finalizeInboundTransfer(
    _l1Token: string,
    _from: string,
    _to: string,
    _amount: BigNumberish,
    _data: BytesLike,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  getOutboundCalldata(
    _l1Token: string,
    _from: string,
    _to: string,
    _amount: BigNumberish,
    _data: BytesLike,
    overrides?: CallOverrides
  ): Promise<string>;

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

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

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

  outboundTransfer(
    _l1Token: string,
    _to: string,
    _amount: BigNumberish,
    arg3: BigNumberish,
    arg4: BigNumberish,
    _data: BytesLike,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

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

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

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

  callStatic: {
    calculateL2TokenAddress(
      l1ERC20: string,
      overrides?: CallOverrides
    ): Promise<string>;

    finalizeInboundTransfer(
      _l1Token: string,
      _from: string,
      _to: string,
      _amount: BigNumberish,
      _data: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    getOutboundCalldata(
      _l1Token: string,
      _from: string,
      _to: string,
      _amount: BigNumberish,
      _data: BytesLike,
      overrides?: CallOverrides
    ): Promise<string>;

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

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

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

    outboundTransfer(
      _l1Token: string,
      _to: string,
      _amount: BigNumberish,
      arg3: BigNumberish,
      arg4: BigNumberish,
      _data: BytesLike,
      overrides?: CallOverrides
    ): Promise<string>;

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

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

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

  filters: {
    "DepositFinalized(address,address,address,uint256)"(
      token?: null,
      from?: string | null,
      to?: string | null,
      amount?: null
    ): TypedEventFilter<
      [string, string, string, BigNumber],
      { token: string; from: string; to: string; amount: BigNumber }
    >;

    DepositFinalized(
      token?: null,
      from?: string | null,
      to?: string | null,
      amount?: null
    ): TypedEventFilter<
      [string, string, string, BigNumber],
      { token: string; from: string; to: string; amount: BigNumber }
    >;

    "FakeTxToL1(address,bytes)"(
      from?: null,
      outboundCalldata?: null
    ): TypedEventFilter<
      [string, string],
      { from: string; outboundCalldata: string }
    >;

    FakeTxToL1(
      from?: null,
      outboundCalldata?: null
    ): TypedEventFilter<
      [string, string],
      { from: string; outboundCalldata: string }
    >;

    "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 }
    >;

    "WithdrawalInitiated(address,address,address,uint256,uint256)"(
      l1Token?: null,
      from?: string | null,
      to?: string | null,
      sequenceNumber?: BigNumberish | null,
      amount?: null
    ): TypedEventFilter<
      [string, string, string, BigNumber, BigNumber],
      {
        l1Token: string;
        from: string;
        to: string;
        sequenceNumber: BigNumber;
        amount: BigNumber;
      }
    >;

    WithdrawalInitiated(
      l1Token?: null,
      from?: string | null,
      to?: string | null,
      sequenceNumber?: BigNumberish | null,
      amount?: null
    ): TypedEventFilter<
      [string, string, string, BigNumber, BigNumber],
      {
        l1Token: string;
        from: string;
        to: string;
        sequenceNumber: BigNumber;
        amount: BigNumber;
      }
    >;
  };

  estimateGas: {
    calculateL2TokenAddress(
      l1ERC20: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    finalizeInboundTransfer(
      _l1Token: string,
      _from: string,
      _to: string,
      _amount: BigNumberish,
      _data: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    getOutboundCalldata(
      _l1Token: string,
      _from: string,
      _to: string,
      _amount: BigNumberish,
      _data: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

    outboundTransfer(
      _l1Token: string,
      _to: string,
      _amount: BigNumberish,
      arg3: BigNumberish,
      arg4: BigNumberish,
      _data: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

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

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

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

  populateTransaction: {
    calculateL2TokenAddress(
      l1ERC20: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    finalizeInboundTransfer(
      _l1Token: string,
      _from: string,
      _to: string,
      _amount: BigNumberish,
      _data: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    getOutboundCalldata(
      _l1Token: string,
      _from: string,
      _to: string,
      _amount: BigNumberish,
      _data: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

    outboundTransfer(
      _l1Token: string,
      _to: string,
      _amount: BigNumberish,
      arg3: BigNumberish,
      arg4: BigNumberish,
      _data: BytesLike,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

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

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

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