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

/* tslint:disable */

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

export interface IMessagingComposerInterface extends utils.Interface {
  functions: {
    "composeQueue(address,address,bytes32,uint16)": FunctionFragment;
    "lzCompose(address,address,bytes32,uint16,bytes,bytes)": FunctionFragment;
    "sendCompose(address,bytes32,uint16,bytes)": FunctionFragment;
  };

  getFunction(
    nameOrSignatureOrTopic: "composeQueue" | "lzCompose" | "sendCompose"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "composeQueue",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<string>,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BigNumberish>
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "lzCompose",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<string>,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BytesLike>
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "sendCompose",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BytesLike>
    ]
  ): string;

  decodeFunctionResult(
    functionFragment: "composeQueue",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "lzCompose", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "sendCompose",
    data: BytesLike
  ): Result;

  events: {
    "ComposeDelivered(address,address,bytes32,uint16)": EventFragment;
    "ComposeSent(address,address,bytes32,uint16,bytes)": EventFragment;
    "LzComposeAlert(address,address,address,bytes32,uint16,uint256,uint256,bytes,bytes,bytes)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "ComposeDelivered"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ComposeSent"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LzComposeAlert"): EventFragment;
}

export interface ComposeDeliveredEventObject {
  from: string;
  to: string;
  guid: string;
  index: number;
}
export type ComposeDeliveredEvent = TypedEvent<
  [string, string, string, number],
  ComposeDeliveredEventObject
>;

export type ComposeDeliveredEventFilter =
  TypedEventFilter<ComposeDeliveredEvent>;

export interface ComposeSentEventObject {
  from: string;
  to: string;
  guid: string;
  index: number;
  message: string;
}
export type ComposeSentEvent = TypedEvent<
  [string, string, string, number, string],
  ComposeSentEventObject
>;

export type ComposeSentEventFilter = TypedEventFilter<ComposeSentEvent>;

export interface LzComposeAlertEventObject {
  from: string;
  to: string;
  executor: string;
  guid: string;
  index: number;
  gas: BigNumber;
  value: BigNumber;
  message: string;
  extraData: string;
  reason: string;
}
export type LzComposeAlertEvent = TypedEvent<
  [
    string,
    string,
    string,
    string,
    number,
    BigNumber,
    BigNumber,
    string,
    string,
    string
  ],
  LzComposeAlertEventObject
>;

export type LzComposeAlertEventFilter = TypedEventFilter<LzComposeAlertEvent>;

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

  interface: IMessagingComposerInterface;

  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: {
    composeQueue(
      _from: PromiseOrValue<string>,
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides
    ): Promise<[string] & { messageHash: string }>;

    lzCompose(
      _from: PromiseOrValue<string>,
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      _message: PromiseOrValue<BytesLike>,
      _extraData: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
    ): Promise<ContractTransaction>;

    sendCompose(
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      _message: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> }
    ): Promise<ContractTransaction>;
  };

  composeQueue(
    _from: PromiseOrValue<string>,
    _to: PromiseOrValue<string>,
    _guid: PromiseOrValue<BytesLike>,
    _index: PromiseOrValue<BigNumberish>,
    overrides?: CallOverrides
  ): Promise<string>;

  lzCompose(
    _from: PromiseOrValue<string>,
    _to: PromiseOrValue<string>,
    _guid: PromiseOrValue<BytesLike>,
    _index: PromiseOrValue<BigNumberish>,
    _message: PromiseOrValue<BytesLike>,
    _extraData: PromiseOrValue<BytesLike>,
    overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
  ): Promise<ContractTransaction>;

  sendCompose(
    _to: PromiseOrValue<string>,
    _guid: PromiseOrValue<BytesLike>,
    _index: PromiseOrValue<BigNumberish>,
    _message: PromiseOrValue<BytesLike>,
    overrides?: Overrides & { from?: PromiseOrValue<string> }
  ): Promise<ContractTransaction>;

  callStatic: {
    composeQueue(
      _from: PromiseOrValue<string>,
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides
    ): Promise<string>;

    lzCompose(
      _from: PromiseOrValue<string>,
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      _message: PromiseOrValue<BytesLike>,
      _extraData: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides
    ): Promise<void>;

    sendCompose(
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      _message: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides
    ): Promise<void>;
  };

  filters: {
    "ComposeDelivered(address,address,bytes32,uint16)"(
      from?: null,
      to?: null,
      guid?: null,
      index?: null
    ): ComposeDeliveredEventFilter;
    ComposeDelivered(
      from?: null,
      to?: null,
      guid?: null,
      index?: null
    ): ComposeDeliveredEventFilter;

    "ComposeSent(address,address,bytes32,uint16,bytes)"(
      from?: null,
      to?: null,
      guid?: null,
      index?: null,
      message?: null
    ): ComposeSentEventFilter;
    ComposeSent(
      from?: null,
      to?: null,
      guid?: null,
      index?: null,
      message?: null
    ): ComposeSentEventFilter;

    "LzComposeAlert(address,address,address,bytes32,uint16,uint256,uint256,bytes,bytes,bytes)"(
      from?: PromiseOrValue<string> | null,
      to?: PromiseOrValue<string> | null,
      executor?: PromiseOrValue<string> | null,
      guid?: null,
      index?: null,
      gas?: null,
      value?: null,
      message?: null,
      extraData?: null,
      reason?: null
    ): LzComposeAlertEventFilter;
    LzComposeAlert(
      from?: PromiseOrValue<string> | null,
      to?: PromiseOrValue<string> | null,
      executor?: PromiseOrValue<string> | null,
      guid?: null,
      index?: null,
      gas?: null,
      value?: null,
      message?: null,
      extraData?: null,
      reason?: null
    ): LzComposeAlertEventFilter;
  };

  estimateGas: {
    composeQueue(
      _from: PromiseOrValue<string>,
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    lzCompose(
      _from: PromiseOrValue<string>,
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      _message: PromiseOrValue<BytesLike>,
      _extraData: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
    ): Promise<BigNumber>;

    sendCompose(
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      _message: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> }
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    composeQueue(
      _from: PromiseOrValue<string>,
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    lzCompose(
      _from: PromiseOrValue<string>,
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      _message: PromiseOrValue<BytesLike>,
      _extraData: PromiseOrValue<BytesLike>,
      overrides?: PayableOverrides & { from?: PromiseOrValue<string> }
    ): Promise<PopulatedTransaction>;

    sendCompose(
      _to: PromiseOrValue<string>,
      _guid: PromiseOrValue<BytesLike>,
      _index: PromiseOrValue<BigNumberish>,
      _message: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> }
    ): Promise<PopulatedTransaction>;
  };
}
