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

export declare namespace IUniswapPricingLibrary {
  export type PoolRouteConfigStruct = {
    pool: AddressLike;
    zeroForOne: boolean;
    twapInterval: BigNumberish;
    token0Decimals: BigNumberish;
    token1Decimals: BigNumberish;
  };

  export type PoolRouteConfigStructOutput = [
    pool: string,
    zeroForOne: boolean,
    twapInterval: bigint,
    token0Decimals: bigint,
    token1Decimals: bigint
  ] & {
    pool: string;
    zeroForOne: boolean;
    twapInterval: bigint;
    token0Decimals: bigint;
    token1Decimals: bigint;
  };
}

export interface UniswapPricingLibraryV2Interface extends Interface {
  getFunction(
    nameOrSignature:
      | "getUniswapPriceRatioForPool"
      | "getUniswapPriceRatioForPoolRoutes"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "getUniswapPriceRatioForPool",
    values: [IUniswapPricingLibrary.PoolRouteConfigStruct]
  ): string;
  encodeFunctionData(
    functionFragment: "getUniswapPriceRatioForPoolRoutes",
    values: [IUniswapPricingLibrary.PoolRouteConfigStruct[]]
  ): string;

  decodeFunctionResult(
    functionFragment: "getUniswapPriceRatioForPool",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getUniswapPriceRatioForPoolRoutes",
    data: BytesLike
  ): Result;
}

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

  interface: UniswapPricingLibraryV2Interface;

  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>;

  getUniswapPriceRatioForPool: TypedContractMethod<
    [_poolRouteConfig: IUniswapPricingLibrary.PoolRouteConfigStruct],
    [bigint],
    "view"
  >;

  getUniswapPriceRatioForPoolRoutes: TypedContractMethod<
    [poolRoutes: IUniswapPricingLibrary.PoolRouteConfigStruct[]],
    [bigint],
    "view"
  >;

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

  getFunction(
    nameOrSignature: "getUniswapPriceRatioForPool"
  ): TypedContractMethod<
    [_poolRouteConfig: IUniswapPricingLibrary.PoolRouteConfigStruct],
    [bigint],
    "view"
  >;
  getFunction(
    nameOrSignature: "getUniswapPriceRatioForPoolRoutes"
  ): TypedContractMethod<
    [poolRoutes: IUniswapPricingLibrary.PoolRouteConfigStruct[]],
    [bigint],
    "view"
  >;

  filters: {};
}
