/* Autogenerated file. Do not edit manually. */

/* tslint:disable */

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

export type OriginStruct = {
  srcEid: PromiseOrValue<BigNumberish>;
  sender: PromiseOrValue<BytesLike>;
  nonce: PromiseOrValue<BigNumberish>;
};

export type OriginStructOutput = [number, string, BigNumber] & {
  srcEid: number;
  sender: string;
  nonce: BigNumber;
};

export interface ILayerZeroReceiverInterface extends utils.Interface {
  functions: {
    "allowInitializePath((uint32,bytes32,uint64))": FunctionFragment;
    "lzReceive((uint32,bytes32,uint64),bytes32,bytes,address,bytes)": FunctionFragment;
    "nextNonce(uint32,bytes32)": FunctionFragment;
  };

  getFunction(
    nameOrSignatureOrTopic: "allowInitializePath" | "lzReceive" | "nextNonce"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "allowInitializePath",
    values: [OriginStruct]
  ): string;
  encodeFunctionData(
    functionFragment: "lzReceive",
    values: [
      OriginStruct,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<string>,
      PromiseOrValue<BytesLike>
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "nextNonce",
    values: [PromiseOrValue<BigNumberish>, PromiseOrValue<BytesLike>]
  ): string;

  decodeFunctionResult(
    functionFragment: "allowInitializePath",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "lzReceive", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "nextNonce", data: BytesLike): Result;

  events: {};
}

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

  interface: ILayerZeroReceiverInterface;

  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: {
    allowInitializePath(
      _origin: OriginStruct,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    lzReceive(
      _origin: OriginStruct,
      _guid: PromiseOrValue<BytesLike>,
      _message: PromiseOrValue<BytesLike>,
      _executor: PromiseOrValue<string>,
      _extraData: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
    ): Promise<ContractTransaction>;

    nextNonce(
      _eid: PromiseOrValue<BigNumberish>,
      _sender: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;
  };

  allowInitializePath(
    _origin: OriginStruct,
    overrides?: CallOverrides
  ): Promise<boolean>;

  lzReceive(
    _origin: OriginStruct,
    _guid: PromiseOrValue<BytesLike>,
    _message: PromiseOrValue<BytesLike>,
    _executor: PromiseOrValue<string>,
    _extraData: PromiseOrValue<BytesLike>,
    overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
  ): Promise<ContractTransaction>;

  nextNonce(
    _eid: PromiseOrValue<BigNumberish>,
    _sender: PromiseOrValue<BytesLike>,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  callStatic: {
    allowInitializePath(
      _origin: OriginStruct,
      overrides?: CallOverrides
    ): Promise<boolean>;

    lzReceive(
      _origin: OriginStruct,
      _guid: PromiseOrValue<BytesLike>,
      _message: PromiseOrValue<BytesLike>,
      _executor: PromiseOrValue<string>,
      _extraData: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides
    ): Promise<void>;

    nextNonce(
      _eid: PromiseOrValue<BigNumberish>,
      _sender: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  filters: {};

  estimateGas: {
    allowInitializePath(
      _origin: OriginStruct,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    lzReceive(
      _origin: OriginStruct,
      _guid: PromiseOrValue<BytesLike>,
      _message: PromiseOrValue<BytesLike>,
      _executor: PromiseOrValue<string>,
      _extraData: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
    ): Promise<BigNumber>;

    nextNonce(
      _eid: PromiseOrValue<BigNumberish>,
      _sender: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    allowInitializePath(
      _origin: OriginStruct,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    lzReceive(
      _origin: OriginStruct,
      _guid: PromiseOrValue<BytesLike>,
      _message: PromiseOrValue<BytesLike>,
      _executor: PromiseOrValue<string>,
      _extraData: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
    ): Promise<PopulatedTransaction>;

    nextNonce(
      _eid: PromiseOrValue<BigNumberish>,
      _sender: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;
  };
}
