/* 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 {
  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 LenderCommitmentGroup_SmartMockInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "acceptFundsForAcceptBid"
      | "addPrincipalToCommitmentGroup"
      | "burnSharesToWithdrawEarnings"
      | "getCollateralTokenAddress"
      | "getCollateralTokenId"
      | "getCollateralTokenType"
      | "getMarketId"
      | "getMaxLoanDuration"
      | "getMinInterestRate"
      | "getPrincipalAmountAvailableToBorrow"
      | "getPrincipalTokenAddress"
      | "getRequiredCollateral"
      | "getTokenDifferenceFromLiquidations"
      | "initialize"
      | "liquidateDefaultedLoanWithIncentive"
      | "prepareSharesForBurn"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "acceptFundsForAcceptBid",
    values: [
      AddressLike,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      AddressLike,
      BigNumberish,
      BigNumberish,
      BigNumberish
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "addPrincipalToCommitmentGroup",
    values: [BigNumberish, AddressLike, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "burnSharesToWithdrawEarnings",
    values: [BigNumberish, AddressLike, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getCollateralTokenAddress",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getCollateralTokenId",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getCollateralTokenType",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getMarketId",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getMaxLoanDuration",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getMinInterestRate",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getPrincipalAmountAvailableToBorrow",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getPrincipalTokenAddress",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getRequiredCollateral",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getTokenDifferenceFromLiquidations",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "initialize",
    values: [
      ILenderCommitmentGroup.CommitmentGroupConfigStruct,
      IUniswapPricingLibrary.PoolRouteConfigStruct[]
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "liquidateDefaultedLoanWithIncentive",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "prepareSharesForBurn",
    values: [BigNumberish]
  ): string;

  decodeFunctionResult(
    functionFragment: "acceptFundsForAcceptBid",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "addPrincipalToCommitmentGroup",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "burnSharesToWithdrawEarnings",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getCollateralTokenAddress",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getCollateralTokenId",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getCollateralTokenType",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getMarketId",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getMaxLoanDuration",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getMinInterestRate",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getPrincipalAmountAvailableToBorrow",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getPrincipalTokenAddress",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getRequiredCollateral",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getTokenDifferenceFromLiquidations",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "liquidateDefaultedLoanWithIncentive",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "prepareSharesForBurn",
    data: BytesLike
  ): Result;
}

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

  interface: LenderCommitmentGroup_SmartMockInterface;

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

  acceptFundsForAcceptBid: TypedContractMethod<
    [
      _borrower: AddressLike,
      _bidId: BigNumberish,
      _principalAmount: BigNumberish,
      _collateralAmount: BigNumberish,
      _collateralTokenAddress: AddressLike,
      _collateralTokenId: BigNumberish,
      _loanDuration: BigNumberish,
      _interestRate: BigNumberish
    ],
    [void],
    "nonpayable"
  >;

  addPrincipalToCommitmentGroup: TypedContractMethod<
    [
      _amount: BigNumberish,
      _sharesRecipient: AddressLike,
      _minAmountOut: BigNumberish
    ],
    [bigint],
    "nonpayable"
  >;

  burnSharesToWithdrawEarnings: TypedContractMethod<
    [
      _amountPoolSharesTokens: BigNumberish,
      _recipient: AddressLike,
      _minAmountOut: BigNumberish
    ],
    [bigint],
    "nonpayable"
  >;

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

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

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

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

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

  getMinInterestRate: TypedContractMethod<
    [_delta: BigNumberish],
    [bigint],
    "view"
  >;

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

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

  getRequiredCollateral: TypedContractMethod<
    [
      _principalAmount: BigNumberish,
      _maxPrincipalPerCollateralAmount: BigNumberish
    ],
    [bigint],
    "view"
  >;

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

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

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

  prepareSharesForBurn: TypedContractMethod<
    [_amountPoolSharesTokens: BigNumberish],
    [boolean],
    "nonpayable"
  >;

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

  getFunction(
    nameOrSignature: "acceptFundsForAcceptBid"
  ): TypedContractMethod<
    [
      _borrower: AddressLike,
      _bidId: BigNumberish,
      _principalAmount: BigNumberish,
      _collateralAmount: BigNumberish,
      _collateralTokenAddress: AddressLike,
      _collateralTokenId: BigNumberish,
      _loanDuration: BigNumberish,
      _interestRate: BigNumberish
    ],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "addPrincipalToCommitmentGroup"
  ): TypedContractMethod<
    [
      _amount: BigNumberish,
      _sharesRecipient: AddressLike,
      _minAmountOut: BigNumberish
    ],
    [bigint],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "burnSharesToWithdrawEarnings"
  ): TypedContractMethod<
    [
      _amountPoolSharesTokens: BigNumberish,
      _recipient: AddressLike,
      _minAmountOut: BigNumberish
    ],
    [bigint],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "getCollateralTokenAddress"
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "getCollateralTokenId"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "getCollateralTokenType"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "getMarketId"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "getMaxLoanDuration"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "getMinInterestRate"
  ): TypedContractMethod<[_delta: BigNumberish], [bigint], "view">;
  getFunction(
    nameOrSignature: "getPrincipalAmountAvailableToBorrow"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "getPrincipalTokenAddress"
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "getRequiredCollateral"
  ): TypedContractMethod<
    [
      _principalAmount: BigNumberish,
      _maxPrincipalPerCollateralAmount: BigNumberish
    ],
    [bigint],
    "view"
  >;
  getFunction(
    nameOrSignature: "getTokenDifferenceFromLiquidations"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "initialize"
  ): TypedContractMethod<
    [
      _commitmentGroupConfig: ILenderCommitmentGroup.CommitmentGroupConfigStruct,
      _poolOracleRoutes: IUniswapPricingLibrary.PoolRouteConfigStruct[]
    ],
    [string],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "liquidateDefaultedLoanWithIncentive"
  ): TypedContractMethod<
    [_bidId: BigNumberish, _tokenAmountDifference: BigNumberish],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "prepareSharesForBurn"
  ): TypedContractMethod<
    [_amountPoolSharesTokens: BigNumberish],
    [boolean],
    "nonpayable"
  >;

  filters: {};
}
