/* 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 interface ISmartCommitmentInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "acceptFundsForAcceptBid"
      | "getCollateralTokenAddress"
      | "getCollateralTokenType"
      | "getMarketId"
      | "getMaxLoanDuration"
      | "getMinInterestRate"
      | "getPrincipalAmountAvailableToBorrow"
      | "getPrincipalTokenAddress"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "acceptFundsForAcceptBid",
    values: [
      AddressLike,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      AddressLike,
      BigNumberish,
      BigNumberish,
      BigNumberish
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "getCollateralTokenAddress",
    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;

  decodeFunctionResult(
    functionFragment: "acceptFundsForAcceptBid",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getCollateralTokenAddress",
    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;
}

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

  interface: ISmartCommitmentInterface;

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

  getCollateralTokenAddress: TypedContractMethod<[], [string], "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">;

  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: "getCollateralTokenAddress"
  ): TypedContractMethod<[], [string], "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">;

  filters: {};
}
