/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BigNumberish,
  BytesLike,
  FunctionFragment,
  Result,
  Interface,
  AddressLike,
  ContractRunner,
  ContractMethod,
  Listener,
} from "ethers";
import type {
  TypedContractEvent,
  TypedDeferredTopicFilter,
  TypedEventLog,
  TypedListener,
  TypedContractMethod,
} from "../../../../../common";

export interface ITokenGatewayInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "calculateL2TokenAddress"
      | "finalizeInboundTransfer"
      | "outboundTransfer",
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "calculateL2TokenAddress",
    values: [AddressLike],
  ): string;
  encodeFunctionData(
    functionFragment: "finalizeInboundTransfer",
    values: [AddressLike, AddressLike, AddressLike, BigNumberish, BytesLike],
  ): string;
  encodeFunctionData(
    functionFragment: "outboundTransfer",
    values: [
      AddressLike,
      AddressLike,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BytesLike,
    ],
  ): string;

  decodeFunctionResult(
    functionFragment: "calculateL2TokenAddress",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "finalizeInboundTransfer",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "outboundTransfer",
    data: BytesLike,
  ): Result;
}

export interface ITokenGateway extends BaseContract {
  connect(runner?: ContractRunner | null): ITokenGateway;
  waitForDeployment(): Promise<this>;

  interface: ITokenGatewayInterface;

  queryFilter<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined,
  ): Promise<Array<TypedEventLog<TCEvent>>>;
  queryFilter<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined,
  ): Promise<Array<TypedEventLog<TCEvent>>>;

  on<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>,
  ): Promise<this>;
  on<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>,
  ): Promise<this>;

  once<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>,
  ): Promise<this>;
  once<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>,
  ): Promise<this>;

  listeners<TCEvent extends TypedContractEvent>(
    event: TCEvent,
  ): Promise<Array<TypedListener<TCEvent>>>;
  listeners(eventName?: string): Promise<Array<Listener>>;
  removeAllListeners<TCEvent extends TypedContractEvent>(
    event?: TCEvent,
  ): Promise<this>;

  calculateL2TokenAddress: TypedContractMethod<
    [l1ERC20: AddressLike],
    [string],
    "view"
  >;

  finalizeInboundTransfer: TypedContractMethod<
    [
      token: AddressLike,
      from: AddressLike,
      to: AddressLike,
      amount: BigNumberish,
      data: BytesLike,
    ],
    [void],
    "payable"
  >;

  outboundTransfer: TypedContractMethod<
    [
      token: AddressLike,
      to: AddressLike,
      amunt: BigNumberish,
      maxas: BigNumberish,
      gasPiceBid: BigNumberish,
      data: BytesLike,
    ],
    [string],
    "payable"
  >;

  getFunction<T extends ContractMethod = ContractMethod>(
    key: string | FunctionFragment,
  ): T;

  getFunction(
    nameOrSignature: "calculateL2TokenAddress",
  ): TypedContractMethod<[l1ERC20: AddressLike], [string], "view">;
  getFunction(
    nameOrSignature: "finalizeInboundTransfer",
  ): TypedContractMethod<
    [
      token: AddressLike,
      from: AddressLike,
      to: AddressLike,
      amount: BigNumberish,
      data: BytesLike,
    ],
    [void],
    "payable"
  >;
  getFunction(
    nameOrSignature: "outboundTransfer",
  ): TypedContractMethod<
    [
      token: AddressLike,
      to: AddressLike,
      amunt: BigNumberish,
      maxas: BigNumberish,
      gasPiceBid: BigNumberish,
      data: BytesLike,
    ],
    [string],
    "payable"
  >;

  filters: {};
}
