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

export declare namespace SponsoredOFTInterface {
  export type SignedQuoteParamsStruct = {
    srcEid: BigNumberish;
    dstEid: BigNumberish;
    destinationHandler: BytesLike;
    amountLD: BigNumberish;
    nonce: BytesLike;
    deadline: BigNumberish;
    maxBpsToSponsor: BigNumberish;
    maxUserSlippageBps: BigNumberish;
    finalRecipient: BytesLike;
    finalToken: BytesLike;
    destinationDex: BigNumberish;
    lzReceiveGasLimit: BigNumberish;
    lzComposeGasLimit: BigNumberish;
    maxOftFeeBps: BigNumberish;
    accountCreationMode: BigNumberish;
    executionMode: BigNumberish;
    actionData: BytesLike;
  };

  export type SignedQuoteParamsStructOutput = [
    number,
    number,
    string,
    BigNumber,
    string,
    BigNumber,
    BigNumber,
    BigNumber,
    string,
    string,
    number,
    BigNumber,
    BigNumber,
    BigNumber,
    number,
    number,
    string
  ] & {
    srcEid: number;
    dstEid: number;
    destinationHandler: string;
    amountLD: BigNumber;
    nonce: string;
    deadline: BigNumber;
    maxBpsToSponsor: BigNumber;
    maxUserSlippageBps: BigNumber;
    finalRecipient: string;
    finalToken: string;
    destinationDex: number;
    lzReceiveGasLimit: BigNumber;
    lzComposeGasLimit: BigNumber;
    maxOftFeeBps: BigNumber;
    accountCreationMode: number;
    executionMode: number;
    actionData: string;
  };

  export type UnsignedQuoteParamsStruct = { refundRecipient: string };

  export type UnsignedQuoteParamsStructOutput = [string] & {
    refundRecipient: string;
  };

  export type QuoteStruct = {
    signedParams: SponsoredOFTInterface.SignedQuoteParamsStruct;
    unsignedParams: SponsoredOFTInterface.UnsignedQuoteParamsStruct;
  };

  export type QuoteStructOutput = [
    SponsoredOFTInterface.SignedQuoteParamsStructOutput,
    SponsoredOFTInterface.UnsignedQuoteParamsStructOutput
  ] & {
    signedParams: SponsoredOFTInterface.SignedQuoteParamsStructOutput;
    unsignedParams: SponsoredOFTInterface.UnsignedQuoteParamsStructOutput;
  };
}

export interface SponsoredOFTSrcPeripheryInterface extends utils.Interface {
  functions: {
    "EMPTY_OFT_COMMAND()": FunctionFragment;
    "OFT_MESSENGER()": FunctionFragment;
    "SRC_EID()": FunctionFragment;
    "TOKEN()": FunctionFragment;
    "decimalConversionRate()": FunctionFragment;
    "deposit(((uint32,uint32,bytes32,uint256,bytes32,uint256,uint256,uint256,bytes32,bytes32,uint32,uint256,uint256,uint256,uint8,uint8,bytes),(address)),bytes)": FunctionFragment;
    "owner()": FunctionFragment;
    "renounceOwnership()": FunctionFragment;
    "setSigner(address)": FunctionFragment;
    "signer()": FunctionFragment;
    "transferOwnership(address)": FunctionFragment;
    "usedNonces(bytes32)": FunctionFragment;
  };

  getFunction(
    nameOrSignatureOrTopic:
      | "EMPTY_OFT_COMMAND"
      | "OFT_MESSENGER"
      | "SRC_EID"
      | "TOKEN"
      | "decimalConversionRate"
      | "deposit"
      | "owner"
      | "renounceOwnership"
      | "setSigner"
      | "signer"
      | "transferOwnership"
      | "usedNonces"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "EMPTY_OFT_COMMAND",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "OFT_MESSENGER",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "SRC_EID", values?: undefined): string;
  encodeFunctionData(functionFragment: "TOKEN", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "decimalConversionRate",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "deposit",
    values: [SponsoredOFTInterface.QuoteStruct, BytesLike]
  ): string;
  encodeFunctionData(functionFragment: "owner", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "renounceOwnership",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "setSigner", values: [string]): string;
  encodeFunctionData(functionFragment: "signer", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "transferOwnership",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "usedNonces",
    values: [BytesLike]
  ): string;

  decodeFunctionResult(
    functionFragment: "EMPTY_OFT_COMMAND",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "OFT_MESSENGER",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "SRC_EID", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "TOKEN", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "decimalConversionRate",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "renounceOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "setSigner", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "signer", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "transferOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "usedNonces", data: BytesLike): Result;

  events: {
    "OwnershipTransferred(address,address)": EventFragment;
    "SponsoredOFTDirectExecution(bytes32,address,bytes32,bytes32,uint256,uint256,uint256,bytes32,bytes)": EventFragment;
    "SponsoredOFTSend(bytes32,address,bytes32,bytes32,uint256,uint256,uint256,bytes32,bytes)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
  getEvent(
    nameOrSignatureOrTopic: "SponsoredOFTDirectExecution"
  ): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SponsoredOFTSend"): EventFragment;
}

export interface OwnershipTransferredEventObject {
  previousOwner: string;
  newOwner: string;
}
export type OwnershipTransferredEvent = TypedEvent<
  [string, string],
  OwnershipTransferredEventObject
>;

export type OwnershipTransferredEventFilter =
  TypedEventFilter<OwnershipTransferredEvent>;

export interface SponsoredOFTDirectExecutionEventObject {
  quoteNonce: string;
  originSender: string;
  finalRecipient: string;
  destinationHandler: string;
  quoteDeadline: BigNumber;
  maxBpsToSponsor: BigNumber;
  maxUserSlippageBps: BigNumber;
  finalToken: string;
  sig: string;
}
export type SponsoredOFTDirectExecutionEvent = TypedEvent<
  [
    string,
    string,
    string,
    string,
    BigNumber,
    BigNumber,
    BigNumber,
    string,
    string
  ],
  SponsoredOFTDirectExecutionEventObject
>;

export type SponsoredOFTDirectExecutionEventFilter =
  TypedEventFilter<SponsoredOFTDirectExecutionEvent>;

export interface SponsoredOFTSendEventObject {
  quoteNonce: string;
  originSender: string;
  finalRecipient: string;
  destinationHandler: string;
  quoteDeadline: BigNumber;
  maxBpsToSponsor: BigNumber;
  maxUserSlippageBps: BigNumber;
  finalToken: string;
  sig: string;
}
export type SponsoredOFTSendEvent = TypedEvent<
  [
    string,
    string,
    string,
    string,
    BigNumber,
    BigNumber,
    BigNumber,
    string,
    string
  ],
  SponsoredOFTSendEventObject
>;

export type SponsoredOFTSendEventFilter =
  TypedEventFilter<SponsoredOFTSendEvent>;

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

  interface: SponsoredOFTSrcPeripheryInterface;

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

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

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

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

    decimalConversionRate(overrides?: CallOverrides): Promise<[BigNumber]>;

    deposit(
      quote: SponsoredOFTInterface.QuoteStruct,
      signature: BytesLike,
      overrides?: PayableOverrides & { from?: string }
    ): Promise<ContractTransaction>;

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

    renounceOwnership(
      overrides?: Overrides & { from?: string }
    ): Promise<ContractTransaction>;

    setSigner(
      _newSigner: string,
      overrides?: Overrides & { from?: string }
    ): Promise<ContractTransaction>;

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

    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string }
    ): Promise<ContractTransaction>;

    usedNonces(nonce: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
  };

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

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

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

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

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

  deposit(
    quote: SponsoredOFTInterface.QuoteStruct,
    signature: BytesLike,
    overrides?: PayableOverrides & { from?: string }
  ): Promise<ContractTransaction>;

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

  renounceOwnership(
    overrides?: Overrides & { from?: string }
  ): Promise<ContractTransaction>;

  setSigner(
    _newSigner: string,
    overrides?: Overrides & { from?: string }
  ): Promise<ContractTransaction>;

  transferOwnership(
    newOwner: string,
    overrides?: Overrides & { from?: string }
  ): Promise<ContractTransaction>;

  usedNonces(nonce: BytesLike, overrides?: CallOverrides): Promise<boolean>;

  callStatic: {
    EMPTY_OFT_COMMAND(overrides?: CallOverrides): Promise<string>;

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

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

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

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

    deposit(
      quote: SponsoredOFTInterface.QuoteStruct,
      signature: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

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

    renounceOwnership(overrides?: CallOverrides): Promise<void>;

    setSigner(_newSigner: string, overrides?: CallOverrides): Promise<void>;

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

    transferOwnership(
      newOwner: string,
      overrides?: CallOverrides
    ): Promise<void>;

    usedNonces(nonce: BytesLike, overrides?: CallOverrides): Promise<boolean>;
  };

  filters: {
    "OwnershipTransferred(address,address)"(
      previousOwner?: string | null,
      newOwner?: string | null
    ): OwnershipTransferredEventFilter;
    OwnershipTransferred(
      previousOwner?: string | null,
      newOwner?: string | null
    ): OwnershipTransferredEventFilter;

    "SponsoredOFTDirectExecution(bytes32,address,bytes32,bytes32,uint256,uint256,uint256,bytes32,bytes)"(
      quoteNonce?: BytesLike | null,
      originSender?: string | null,
      finalRecipient?: BytesLike | null,
      destinationHandler?: null,
      quoteDeadline?: null,
      maxBpsToSponsor?: null,
      maxUserSlippageBps?: null,
      finalToken?: null,
      sig?: null
    ): SponsoredOFTDirectExecutionEventFilter;
    SponsoredOFTDirectExecution(
      quoteNonce?: BytesLike | null,
      originSender?: string | null,
      finalRecipient?: BytesLike | null,
      destinationHandler?: null,
      quoteDeadline?: null,
      maxBpsToSponsor?: null,
      maxUserSlippageBps?: null,
      finalToken?: null,
      sig?: null
    ): SponsoredOFTDirectExecutionEventFilter;

    "SponsoredOFTSend(bytes32,address,bytes32,bytes32,uint256,uint256,uint256,bytes32,bytes)"(
      quoteNonce?: BytesLike | null,
      originSender?: string | null,
      finalRecipient?: BytesLike | null,
      destinationHandler?: null,
      quoteDeadline?: null,
      maxBpsToSponsor?: null,
      maxUserSlippageBps?: null,
      finalToken?: null,
      sig?: null
    ): SponsoredOFTSendEventFilter;
    SponsoredOFTSend(
      quoteNonce?: BytesLike | null,
      originSender?: string | null,
      finalRecipient?: BytesLike | null,
      destinationHandler?: null,
      quoteDeadline?: null,
      maxBpsToSponsor?: null,
      maxUserSlippageBps?: null,
      finalToken?: null,
      sig?: null
    ): SponsoredOFTSendEventFilter;
  };

  estimateGas: {
    EMPTY_OFT_COMMAND(overrides?: CallOverrides): Promise<BigNumber>;

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

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

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

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

    deposit(
      quote: SponsoredOFTInterface.QuoteStruct,
      signature: BytesLike,
      overrides?: PayableOverrides & { from?: string }
    ): Promise<BigNumber>;

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

    renounceOwnership(
      overrides?: Overrides & { from?: string }
    ): Promise<BigNumber>;

    setSigner(
      _newSigner: string,
      overrides?: Overrides & { from?: string }
    ): Promise<BigNumber>;

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

    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string }
    ): Promise<BigNumber>;

    usedNonces(nonce: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
  };

  populateTransaction: {
    EMPTY_OFT_COMMAND(overrides?: CallOverrides): Promise<PopulatedTransaction>;

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

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

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

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

    deposit(
      quote: SponsoredOFTInterface.QuoteStruct,
      signature: BytesLike,
      overrides?: PayableOverrides & { from?: string }
    ): Promise<PopulatedTransaction>;

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

    renounceOwnership(
      overrides?: Overrides & { from?: string }
    ): Promise<PopulatedTransaction>;

    setSigner(
      _newSigner: string,
      overrides?: Overrides & { from?: string }
    ): Promise<PopulatedTransaction>;

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

    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string }
    ): Promise<PopulatedTransaction>;

    usedNonces(
      nonce: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;
  };
}
