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

export interface ITokenGatewayInterface extends utils.Interface {
  functions: {
    "calculateL2TokenAddress(address)": FunctionFragment;
    "finalizeInboundTransfer(address,address,address,uint256,bytes)": FunctionFragment;
    "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": FunctionFragment;
  };

  getFunction(
    nameOrSignatureOrTopic:
      | "calculateL2TokenAddress"
      | "finalizeInboundTransfer"
      | "outboundTransfer",
  ): FunctionFragment;

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

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

  events: {};
}

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

  interface: ITokenGatewayInterface;

  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: {
    calculateL2TokenAddress(
      l1ERC20: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[string]>;

    finalizeInboundTransfer(
      token: PromiseOrValue<string>,
      from: PromiseOrValue<string>,
      to: PromiseOrValue<string>,
      amount: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    outboundTransfer(
      token: PromiseOrValue<string>,
      to: PromiseOrValue<string>,
      amunt: PromiseOrValue<BigNumberish>,
      maxas: PromiseOrValue<BigNumberish>,
      gasPiceBid: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;
  };

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

  finalizeInboundTransfer(
    token: PromiseOrValue<string>,
    from: PromiseOrValue<string>,
    to: PromiseOrValue<string>,
    amount: PromiseOrValue<BigNumberish>,
    data: PromiseOrValue<BytesLike>,
    overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  outboundTransfer(
    token: PromiseOrValue<string>,
    to: PromiseOrValue<string>,
    amunt: PromiseOrValue<BigNumberish>,
    maxas: PromiseOrValue<BigNumberish>,
    gasPiceBid: PromiseOrValue<BigNumberish>,
    data: PromiseOrValue<BytesLike>,
    overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

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

    finalizeInboundTransfer(
      token: PromiseOrValue<string>,
      from: PromiseOrValue<string>,
      to: PromiseOrValue<string>,
      amount: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<void>;

    outboundTransfer(
      token: PromiseOrValue<string>,
      to: PromiseOrValue<string>,
      amunt: PromiseOrValue<BigNumberish>,
      maxas: PromiseOrValue<BigNumberish>,
      gasPiceBid: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<string>;
  };

  filters: {};

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

    finalizeInboundTransfer(
      token: PromiseOrValue<string>,
      from: PromiseOrValue<string>,
      to: PromiseOrValue<string>,
      amount: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    outboundTransfer(
      token: PromiseOrValue<string>,
      to: PromiseOrValue<string>,
      amunt: PromiseOrValue<BigNumberish>,
      maxas: PromiseOrValue<BigNumberish>,
      gasPiceBid: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;
  };

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

    finalizeInboundTransfer(
      token: PromiseOrValue<string>,
      from: PromiseOrValue<string>,
      to: PromiseOrValue<string>,
      amount: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    outboundTransfer(
      token: PromiseOrValue<string>,
      to: PromiseOrValue<string>,
      amunt: PromiseOrValue<BigNumberish>,
      maxas: PromiseOrValue<BigNumberish>,
      gasPiceBid: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;
  };
}
