/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BigNumberish,
  BytesLike,
  FunctionFragment,
  Result,
  Interface,
  EventFragment,
  AddressLike,
  ContractRunner,
  ContractMethod,
  Listener,
} from "ethers";
import type {
  TypedContractEvent,
  TypedDeferredTopicFilter,
  TypedEventLog,
  TypedLogDescription,
  TypedListener,
  TypedContractMethod,
} from "../common";

export declare namespace PoolAddress {
  export type PoolKeyStruct = {
    deployer: AddressLike;
    token0: AddressLike;
    token1: AddressLike;
  };

  export type PoolKeyStructOutput = [
    deployer: string,
    token0: string,
    token1: string
  ] & { deployer: string; token0: string; token1: string };
}

export interface LimitOrderManagerInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "ALGEBRA_BASE_PLUGIN_MANAGER"
      | "afterSwap"
      | "algebraMintCallback"
      | "basePluginFactory"
      | "epochInfos"
      | "epochNext"
      | "epochs"
      | "factory"
      | "getEpoch"
      | "getEpochLiquidity"
      | "initialized"
      | "kill"
      | "place"
      | "poolDeployer"
      | "setTickSpacing"
      | "tickLowerLasts"
      | "tickSpacings"
      | "wNativeToken"
      | "withdraw"
  ): FunctionFragment;

  getEvent(
    nameOrSignatureOrTopic:
      | "Fill"
      | "Kill"
      | "LimitOrderTickSpacing"
      | "Place"
      | "Withdraw"
  ): EventFragment;

  encodeFunctionData(
    functionFragment: "ALGEBRA_BASE_PLUGIN_MANAGER",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "afterSwap",
    values: [AddressLike, boolean, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "algebraMintCallback",
    values: [BigNumberish, BigNumberish, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "basePluginFactory",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "epochInfos",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "epochNext", values?: undefined): string;
  encodeFunctionData(functionFragment: "epochs", values: [BytesLike]): string;
  encodeFunctionData(functionFragment: "factory", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "getEpoch",
    values: [AddressLike, BigNumberish, BigNumberish, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "getEpochLiquidity",
    values: [BigNumberish, AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "initialized",
    values: [AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "kill",
    values: [
      PoolAddress.PoolKeyStruct,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      boolean,
      AddressLike
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "place",
    values: [PoolAddress.PoolKeyStruct, BigNumberish, boolean, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "poolDeployer",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "setTickSpacing",
    values: [AddressLike, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "tickLowerLasts",
    values: [AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "tickSpacings",
    values: [AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "wNativeToken",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "withdraw",
    values: [BigNumberish, AddressLike]
  ): string;

  decodeFunctionResult(
    functionFragment: "ALGEBRA_BASE_PLUGIN_MANAGER",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "afterSwap", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "algebraMintCallback",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "basePluginFactory",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "epochInfos", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "epochNext", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "epochs", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "factory", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "getEpoch", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getEpochLiquidity",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "initialized",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "kill", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "place", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "poolDeployer",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setTickSpacing",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "tickLowerLasts",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "tickSpacings",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "wNativeToken",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
}

export namespace FillEvent {
  export type InputTuple = [
    epoch: BigNumberish,
    tickLower: BigNumberish,
    zeroForOne: boolean
  ];
  export type OutputTuple = [
    epoch: bigint,
    tickLower: bigint,
    zeroForOne: boolean
  ];
  export interface OutputObject {
    epoch: bigint;
    tickLower: bigint;
    zeroForOne: boolean;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace KillEvent {
  export type InputTuple = [
    owner: AddressLike,
    epoch: BigNumberish,
    tickLower: BigNumberish,
    zeroForOne: boolean,
    liquidity: BigNumberish
  ];
  export type OutputTuple = [
    owner: string,
    epoch: bigint,
    tickLower: bigint,
    zeroForOne: boolean,
    liquidity: bigint
  ];
  export interface OutputObject {
    owner: string;
    epoch: bigint;
    tickLower: bigint;
    zeroForOne: boolean;
    liquidity: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace LimitOrderTickSpacingEvent {
  export type InputTuple = [pool: AddressLike, tickSpacing: BigNumberish];
  export type OutputTuple = [pool: string, tickSpacing: bigint];
  export interface OutputObject {
    pool: string;
    tickSpacing: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace PlaceEvent {
  export type InputTuple = [
    owner: AddressLike,
    epoch: BigNumberish,
    pool: AddressLike,
    tickLower: BigNumberish,
    tickUpper: BigNumberish,
    zeroForOne: boolean,
    liquidity: BigNumberish
  ];
  export type OutputTuple = [
    owner: string,
    epoch: bigint,
    pool: string,
    tickLower: bigint,
    tickUpper: bigint,
    zeroForOne: boolean,
    liquidity: bigint
  ];
  export interface OutputObject {
    owner: string;
    epoch: bigint;
    pool: string;
    tickLower: bigint;
    tickUpper: bigint;
    zeroForOne: boolean;
    liquidity: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace WithdrawEvent {
  export type InputTuple = [
    owner: AddressLike,
    epoch: BigNumberish,
    liquidity: BigNumberish
  ];
  export type OutputTuple = [owner: string, epoch: bigint, liquidity: bigint];
  export interface OutputObject {
    owner: string;
    epoch: bigint;
    liquidity: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export interface LimitOrderManager extends BaseContract {
  connect(runner?: ContractRunner | null): LimitOrderManager;
  waitForDeployment(): Promise<this>;

  interface: LimitOrderManagerInterface;

  queryFilter<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEventLog<TCEvent>>>;
  queryFilter<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEventLog<TCEvent>>>;

  on<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>
  ): Promise<this>;
  on<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>
  ): Promise<this>;

  once<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>
  ): Promise<this>;
  once<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>
  ): Promise<this>;

  listeners<TCEvent extends TypedContractEvent>(
    event: TCEvent
  ): Promise<Array<TypedListener<TCEvent>>>;
  listeners(eventName?: string): Promise<Array<Listener>>;
  removeAllListeners<TCEvent extends TypedContractEvent>(
    event?: TCEvent
  ): Promise<this>;

  ALGEBRA_BASE_PLUGIN_MANAGER: TypedContractMethod<[], [string], "view">;

  afterSwap: TypedContractMethod<
    [pool: AddressLike, zeroToOne: boolean, tick: BigNumberish],
    [void],
    "nonpayable"
  >;

  algebraMintCallback: TypedContractMethod<
    [amount0Owed: BigNumberish, amount1Owed: BigNumberish, data: BytesLike],
    [void],
    "nonpayable"
  >;

  basePluginFactory: TypedContractMethod<[], [string], "view">;

  epochInfos: TypedContractMethod<
    [arg0: BigNumberish],
    [
      [
        boolean,
        bigint,
        bigint,
        bigint,
        string,
        string,
        string,
        bigint,
        bigint
      ] & {
        filled: boolean;
        tickLower: bigint;
        tickUpper: bigint;
        liquidityTotal: bigint;
        token0: string;
        token1: string;
        deployer: string;
        token0Total: bigint;
        token1Total: bigint;
      }
    ],
    "view"
  >;

  epochNext: TypedContractMethod<[], [bigint], "view">;

  epochs: TypedContractMethod<[arg0: BytesLike], [bigint], "view">;

  factory: TypedContractMethod<[], [string], "view">;

  getEpoch: TypedContractMethod<
    [
      pool: AddressLike,
      tickLower: BigNumberish,
      tickUpper: BigNumberish,
      zeroForOne: boolean
    ],
    [bigint],
    "view"
  >;

  getEpochLiquidity: TypedContractMethod<
    [epoch: BigNumberish, owner: AddressLike],
    [bigint],
    "view"
  >;

  initialized: TypedContractMethod<[arg0: AddressLike], [boolean], "view">;

  kill: TypedContractMethod<
    [
      poolKey: PoolAddress.PoolKeyStruct,
      tickLower: BigNumberish,
      tickUpper: BigNumberish,
      liquidity: BigNumberish,
      zeroForOne: boolean,
      to: AddressLike
    ],
    [[bigint, bigint] & { amount0: bigint; amount1: bigint }],
    "nonpayable"
  >;

  place: TypedContractMethod<
    [
      poolKey: PoolAddress.PoolKeyStruct,
      tickLower: BigNumberish,
      zeroForOne: boolean,
      liquidity: BigNumberish
    ],
    [void],
    "payable"
  >;

  poolDeployer: TypedContractMethod<[], [string], "view">;

  setTickSpacing: TypedContractMethod<
    [pool: AddressLike, tickSpacing: BigNumberish],
    [void],
    "nonpayable"
  >;

  tickLowerLasts: TypedContractMethod<[arg0: AddressLike], [bigint], "view">;

  tickSpacings: TypedContractMethod<[arg0: AddressLike], [bigint], "view">;

  wNativeToken: TypedContractMethod<[], [string], "view">;

  withdraw: TypedContractMethod<
    [epoch: BigNumberish, to: AddressLike],
    [[bigint, bigint] & { amount0: bigint; amount1: bigint }],
    "nonpayable"
  >;

  getFunction<T extends ContractMethod = ContractMethod>(
    key: string | FunctionFragment
  ): T;

  getFunction(
    nameOrSignature: "ALGEBRA_BASE_PLUGIN_MANAGER"
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "afterSwap"
  ): TypedContractMethod<
    [pool: AddressLike, zeroToOne: boolean, tick: BigNumberish],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "algebraMintCallback"
  ): TypedContractMethod<
    [amount0Owed: BigNumberish, amount1Owed: BigNumberish, data: BytesLike],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "basePluginFactory"
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "epochInfos"
  ): TypedContractMethod<
    [arg0: BigNumberish],
    [
      [
        boolean,
        bigint,
        bigint,
        bigint,
        string,
        string,
        string,
        bigint,
        bigint
      ] & {
        filled: boolean;
        tickLower: bigint;
        tickUpper: bigint;
        liquidityTotal: bigint;
        token0: string;
        token1: string;
        deployer: string;
        token0Total: bigint;
        token1Total: bigint;
      }
    ],
    "view"
  >;
  getFunction(
    nameOrSignature: "epochNext"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "epochs"
  ): TypedContractMethod<[arg0: BytesLike], [bigint], "view">;
  getFunction(
    nameOrSignature: "factory"
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "getEpoch"
  ): TypedContractMethod<
    [
      pool: AddressLike,
      tickLower: BigNumberish,
      tickUpper: BigNumberish,
      zeroForOne: boolean
    ],
    [bigint],
    "view"
  >;
  getFunction(
    nameOrSignature: "getEpochLiquidity"
  ): TypedContractMethod<
    [epoch: BigNumberish, owner: AddressLike],
    [bigint],
    "view"
  >;
  getFunction(
    nameOrSignature: "initialized"
  ): TypedContractMethod<[arg0: AddressLike], [boolean], "view">;
  getFunction(
    nameOrSignature: "kill"
  ): TypedContractMethod<
    [
      poolKey: PoolAddress.PoolKeyStruct,
      tickLower: BigNumberish,
      tickUpper: BigNumberish,
      liquidity: BigNumberish,
      zeroForOne: boolean,
      to: AddressLike
    ],
    [[bigint, bigint] & { amount0: bigint; amount1: bigint }],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "place"
  ): TypedContractMethod<
    [
      poolKey: PoolAddress.PoolKeyStruct,
      tickLower: BigNumberish,
      zeroForOne: boolean,
      liquidity: BigNumberish
    ],
    [void],
    "payable"
  >;
  getFunction(
    nameOrSignature: "poolDeployer"
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "setTickSpacing"
  ): TypedContractMethod<
    [pool: AddressLike, tickSpacing: BigNumberish],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "tickLowerLasts"
  ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">;
  getFunction(
    nameOrSignature: "tickSpacings"
  ): TypedContractMethod<[arg0: AddressLike], [bigint], "view">;
  getFunction(
    nameOrSignature: "wNativeToken"
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "withdraw"
  ): TypedContractMethod<
    [epoch: BigNumberish, to: AddressLike],
    [[bigint, bigint] & { amount0: bigint; amount1: bigint }],
    "nonpayable"
  >;

  getEvent(
    key: "Fill"
  ): TypedContractEvent<
    FillEvent.InputTuple,
    FillEvent.OutputTuple,
    FillEvent.OutputObject
  >;
  getEvent(
    key: "Kill"
  ): TypedContractEvent<
    KillEvent.InputTuple,
    KillEvent.OutputTuple,
    KillEvent.OutputObject
  >;
  getEvent(
    key: "LimitOrderTickSpacing"
  ): TypedContractEvent<
    LimitOrderTickSpacingEvent.InputTuple,
    LimitOrderTickSpacingEvent.OutputTuple,
    LimitOrderTickSpacingEvent.OutputObject
  >;
  getEvent(
    key: "Place"
  ): TypedContractEvent<
    PlaceEvent.InputTuple,
    PlaceEvent.OutputTuple,
    PlaceEvent.OutputObject
  >;
  getEvent(
    key: "Withdraw"
  ): TypedContractEvent<
    WithdrawEvent.InputTuple,
    WithdrawEvent.OutputTuple,
    WithdrawEvent.OutputObject
  >;

  filters: {
    "Fill(uint232,int24,bool)": TypedContractEvent<
      FillEvent.InputTuple,
      FillEvent.OutputTuple,
      FillEvent.OutputObject
    >;
    Fill: TypedContractEvent<
      FillEvent.InputTuple,
      FillEvent.OutputTuple,
      FillEvent.OutputObject
    >;

    "Kill(address,uint232,int24,bool,uint128)": TypedContractEvent<
      KillEvent.InputTuple,
      KillEvent.OutputTuple,
      KillEvent.OutputObject
    >;
    Kill: TypedContractEvent<
      KillEvent.InputTuple,
      KillEvent.OutputTuple,
      KillEvent.OutputObject
    >;

    "LimitOrderTickSpacing(address,int24)": TypedContractEvent<
      LimitOrderTickSpacingEvent.InputTuple,
      LimitOrderTickSpacingEvent.OutputTuple,
      LimitOrderTickSpacingEvent.OutputObject
    >;
    LimitOrderTickSpacing: TypedContractEvent<
      LimitOrderTickSpacingEvent.InputTuple,
      LimitOrderTickSpacingEvent.OutputTuple,
      LimitOrderTickSpacingEvent.OutputObject
    >;

    "Place(address,uint232,address,int24,int24,bool,uint128)": TypedContractEvent<
      PlaceEvent.InputTuple,
      PlaceEvent.OutputTuple,
      PlaceEvent.OutputObject
    >;
    Place: TypedContractEvent<
      PlaceEvent.InputTuple,
      PlaceEvent.OutputTuple,
      PlaceEvent.OutputObject
    >;

    "Withdraw(address,uint232,uint128)": TypedContractEvent<
      WithdrawEvent.InputTuple,
      WithdrawEvent.OutputTuple,
      WithdrawEvent.OutputObject
    >;
    Withdraw: TypedContractEvent<
      WithdrawEvent.InputTuple,
      WithdrawEvent.OutputTuple,
      WithdrawEvent.OutputObject
    >;
  };
}
