/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BigNumber,
  BigNumberish,
  BytesLike,
  CallOverrides,
  ContractTransaction,
  Overrides,
  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 IL2GNSInterface extends utils.Interface {
  functions: {
    "finishSubgraphTransferFromL1(uint256,bytes32,bytes32,bytes32)": FunctionFragment;
    "getAliasedL2SubgraphID(uint256)": FunctionFragment;
    "getUnaliasedL1SubgraphID(uint256)": FunctionFragment;
    "onTokenTransfer(address,uint256,bytes)": FunctionFragment;
  };

  getFunction(
    nameOrSignatureOrTopic:
      | "finishSubgraphTransferFromL1"
      | "getAliasedL2SubgraphID"
      | "getUnaliasedL1SubgraphID"
      | "onTokenTransfer",
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "finishSubgraphTransferFromL1",
    values: [
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BytesLike>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "getAliasedL2SubgraphID",
    values: [PromiseOrValue<BigNumberish>],
  ): string;
  encodeFunctionData(
    functionFragment: "getUnaliasedL1SubgraphID",
    values: [PromiseOrValue<BigNumberish>],
  ): string;
  encodeFunctionData(
    functionFragment: "onTokenTransfer",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BytesLike>,
    ],
  ): string;

  decodeFunctionResult(
    functionFragment: "finishSubgraphTransferFromL1",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "getAliasedL2SubgraphID",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "getUnaliasedL1SubgraphID",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "onTokenTransfer",
    data: BytesLike,
  ): Result;

  events: {};
}

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

  interface: IL2GNSInterface;

  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: {
    finishSubgraphTransferFromL1(
      l2SubgraphID: PromiseOrValue<BigNumberish>,
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      subgraphMetadata: PromiseOrValue<BytesLike>,
      versionMetadata: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    getAliasedL2SubgraphID(
      l1SubgraphID: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<[BigNumber]>;

    getUnaliasedL1SubgraphID(
      l2SubgraphID: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<[BigNumber]>;

    onTokenTransfer(
      from: PromiseOrValue<string>,
      amount: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;
  };

  finishSubgraphTransferFromL1(
    l2SubgraphID: PromiseOrValue<BigNumberish>,
    subgraphDeploymentID: PromiseOrValue<BytesLike>,
    subgraphMetadata: PromiseOrValue<BytesLike>,
    versionMetadata: PromiseOrValue<BytesLike>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  getAliasedL2SubgraphID(
    l1SubgraphID: PromiseOrValue<BigNumberish>,
    overrides?: CallOverrides,
  ): Promise<BigNumber>;

  getUnaliasedL1SubgraphID(
    l2SubgraphID: PromiseOrValue<BigNumberish>,
    overrides?: CallOverrides,
  ): Promise<BigNumber>;

  onTokenTransfer(
    from: PromiseOrValue<string>,
    amount: PromiseOrValue<BigNumberish>,
    data: PromiseOrValue<BytesLike>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  callStatic: {
    finishSubgraphTransferFromL1(
      l2SubgraphID: PromiseOrValue<BigNumberish>,
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      subgraphMetadata: PromiseOrValue<BytesLike>,
      versionMetadata: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<void>;

    getAliasedL2SubgraphID(
      l1SubgraphID: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    getUnaliasedL1SubgraphID(
      l2SubgraphID: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    onTokenTransfer(
      from: PromiseOrValue<string>,
      amount: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<void>;
  };

  filters: {};

  estimateGas: {
    finishSubgraphTransferFromL1(
      l2SubgraphID: PromiseOrValue<BigNumberish>,
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      subgraphMetadata: PromiseOrValue<BytesLike>,
      versionMetadata: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    getAliasedL2SubgraphID(
      l1SubgraphID: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    getUnaliasedL1SubgraphID(
      l2SubgraphID: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    onTokenTransfer(
      from: PromiseOrValue<string>,
      amount: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    finishSubgraphTransferFromL1(
      l2SubgraphID: PromiseOrValue<BigNumberish>,
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      subgraphMetadata: PromiseOrValue<BytesLike>,
      versionMetadata: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    getAliasedL2SubgraphID(
      l1SubgraphID: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    getUnaliasedL1SubgraphID(
      l2SubgraphID: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    onTokenTransfer(
      from: PromiseOrValue<string>,
      amount: PromiseOrValue<BigNumberish>,
      data: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;
  };
}
