/* 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,
} from "./common";

export type SendParamStruct = {
  dstEid: BigNumberish;
  to: BytesLike;
  amountLD: BigNumberish;
  minAmountLD: BigNumberish;
  extraOptions: BytesLike;
  composeMsg: BytesLike;
  oftCmd: BytesLike;
};

export type SendParamStructOutput = [
  number,
  string,
  BigNumber,
  BigNumber,
  string,
  string,
  string
] & {
  dstEid: number;
  to: string;
  amountLD: BigNumber;
  minAmountLD: BigNumber;
  extraOptions: string;
  composeMsg: string;
  oftCmd: string;
};

export type MessagingFeeStruct = {
  nativeFee: BigNumberish;
  lzTokenFee: BigNumberish;
};

export type MessagingFeeStructOutput = [BigNumber, BigNumber] & {
  nativeFee: BigNumber;
  lzTokenFee: BigNumber;
};

export type MessagingReceiptStruct = {
  guid: BytesLike;
  nonce: BigNumberish;
  fee: MessagingFeeStruct;
};

export type MessagingReceiptStructOutput = [
  string,
  BigNumber,
  MessagingFeeStructOutput
] & { guid: string; nonce: BigNumber; fee: MessagingFeeStructOutput };

export type OFTReceiptStruct = {
  amountSentLD: BigNumberish;
  amountReceivedLD: BigNumberish;
};

export type OFTReceiptStructOutput = [BigNumber, BigNumber] & {
  amountSentLD: BigNumber;
  amountReceivedLD: BigNumber;
};

export interface IOFTInterface extends utils.Interface {
  functions: {
    "quoteSend((uint32,bytes32,uint256,uint256,bytes,bytes,bytes),bool)": FunctionFragment;
    "send((uint32,bytes32,uint256,uint256,bytes,bytes,bytes),(uint256,uint256),address)": FunctionFragment;
    "sharedDecimals()": FunctionFragment;
    "token()": FunctionFragment;
  };

  getFunction(
    nameOrSignatureOrTopic: "quoteSend" | "send" | "sharedDecimals" | "token"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "quoteSend",
    values: [SendParamStruct, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "send",
    values: [SendParamStruct, MessagingFeeStruct, string]
  ): string;
  encodeFunctionData(
    functionFragment: "sharedDecimals",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "token", values?: undefined): string;

  decodeFunctionResult(functionFragment: "quoteSend", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "send", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "sharedDecimals",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "token", data: BytesLike): Result;

  events: {};
}

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

  interface: IOFTInterface;

  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: {
    quoteSend(
      _sendParam: SendParamStruct,
      _payInLzToken: boolean,
      overrides?: CallOverrides
    ): Promise<[MessagingFeeStructOutput]>;

    send(
      _sendParam: SendParamStruct,
      _fee: MessagingFeeStruct,
      _refundAddress: string,
      overrides?: PayableOverrides & { from?: string }
    ): Promise<ContractTransaction>;

    sharedDecimals(overrides?: CallOverrides): Promise<[number]>;

    token(overrides?: CallOverrides): Promise<[string]>;
  };

  quoteSend(
    _sendParam: SendParamStruct,
    _payInLzToken: boolean,
    overrides?: CallOverrides
  ): Promise<MessagingFeeStructOutput>;

  send(
    _sendParam: SendParamStruct,
    _fee: MessagingFeeStruct,
    _refundAddress: string,
    overrides?: PayableOverrides & { from?: string }
  ): Promise<ContractTransaction>;

  sharedDecimals(overrides?: CallOverrides): Promise<number>;

  token(overrides?: CallOverrides): Promise<string>;

  callStatic: {
    quoteSend(
      _sendParam: SendParamStruct,
      _payInLzToken: boolean,
      overrides?: CallOverrides
    ): Promise<MessagingFeeStructOutput>;

    send(
      _sendParam: SendParamStruct,
      _fee: MessagingFeeStruct,
      _refundAddress: string,
      overrides?: CallOverrides
    ): Promise<[MessagingReceiptStructOutput, OFTReceiptStructOutput]>;

    sharedDecimals(overrides?: CallOverrides): Promise<number>;

    token(overrides?: CallOverrides): Promise<string>;
  };

  filters: {};

  estimateGas: {
    quoteSend(
      _sendParam: SendParamStruct,
      _payInLzToken: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    send(
      _sendParam: SendParamStruct,
      _fee: MessagingFeeStruct,
      _refundAddress: string,
      overrides?: PayableOverrides & { from?: string }
    ): Promise<BigNumber>;

    sharedDecimals(overrides?: CallOverrides): Promise<BigNumber>;

    token(overrides?: CallOverrides): Promise<BigNumber>;
  };

  populateTransaction: {
    quoteSend(
      _sendParam: SendParamStruct,
      _payInLzToken: boolean,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    send(
      _sendParam: SendParamStruct,
      _fee: MessagingFeeStruct,
      _refundAddress: string,
      overrides?: PayableOverrides & { from?: string }
    ): Promise<PopulatedTransaction>;

    sharedDecimals(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    token(overrides?: CallOverrides): Promise<PopulatedTransaction>;
  };
}
