/* 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 ILenderCommitmentGroup_V2 {
  export type CommitmentGroupConfigStruct = {
    principalTokenAddress: AddressLike;
    collateralTokenAddress: AddressLike;
    marketId: BigNumberish;
    maxLoanDuration: BigNumberish;
    interestRateLowerBound: BigNumberish;
    interestRateUpperBound: BigNumberish;
    liquidityThresholdPercent: BigNumberish;
    collateralRatio: BigNumberish;
  };

  export type CommitmentGroupConfigStructOutput = [
    principalTokenAddress: string,
    collateralTokenAddress: string,
    marketId: bigint,
    maxLoanDuration: bigint,
    interestRateLowerBound: bigint,
    interestRateUpperBound: bigint,
    liquidityThresholdPercent: bigint,
    collateralRatio: bigint
  ] & {
    principalTokenAddress: string;
    collateralTokenAddress: string;
    marketId: bigint;
    maxLoanDuration: bigint;
    interestRateLowerBound: bigint;
    interestRateUpperBound: bigint;
    liquidityThresholdPercent: bigint;
    collateralRatio: bigint;
  };
}

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 ILenderCommitmentGroup_V2Interface extends Interface {
  getFunction(
    nameOrSignature:
      | "getTokenDifferenceFromLiquidations"
      | "initialize"
      | "liquidateDefaultedLoanWithIncentive"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "getTokenDifferenceFromLiquidations",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "initialize",
    values: [
      ILenderCommitmentGroup_V2.CommitmentGroupConfigStruct,
      IUniswapPricingLibrary.PoolRouteConfigStruct[]
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "liquidateDefaultedLoanWithIncentive",
    values: [BigNumberish, BigNumberish]
  ): string;

  decodeFunctionResult(
    functionFragment: "getTokenDifferenceFromLiquidations",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "liquidateDefaultedLoanWithIncentive",
    data: BytesLike
  ): Result;
}

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

  interface: ILenderCommitmentGroup_V2Interface;

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

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

  initialize: TypedContractMethod<
    [
      _commitmentGroupConfig: ILenderCommitmentGroup_V2.CommitmentGroupConfigStruct,
      _poolOracleRoutes: IUniswapPricingLibrary.PoolRouteConfigStruct[]
    ],
    [void],
    "nonpayable"
  >;

  liquidateDefaultedLoanWithIncentive: TypedContractMethod<
    [_bidId: BigNumberish, _tokenAmountDifference: BigNumberish],
    [void],
    "nonpayable"
  >;

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

  getFunction(
    nameOrSignature: "getTokenDifferenceFromLiquidations"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "initialize"
  ): TypedContractMethod<
    [
      _commitmentGroupConfig: ILenderCommitmentGroup_V2.CommitmentGroupConfigStruct,
      _poolOracleRoutes: IUniswapPricingLibrary.PoolRouteConfigStruct[]
    ],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "liquidateDefaultedLoanWithIncentive"
  ): TypedContractMethod<
    [_bidId: BigNumberish, _tokenAmountDifference: BigNumberish],
    [void],
    "nonpayable"
  >;

  filters: {};
}
