/* 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 type CollateralStruct = {
  _collateralType: BigNumberish;
  _amount: BigNumberish;
  _tokenId: BigNumberish;
  _collateralAddress: AddressLike;
};

export type CollateralStructOutput = [
  _collateralType: bigint,
  _amount: bigint,
  _tokenId: bigint,
  _collateralAddress: string
] & {
  _collateralType: bigint;
  _amount: bigint;
  _tokenId: bigint;
  _collateralAddress: string;
};

export interface CollateralManagerMockInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "checkBalances"
      | "commitCollateral(uint256,(uint8,uint256,uint256,address)[])"
      | "commitCollateral(uint256,(uint8,uint256,uint256,address))"
      | "committedCollateralValid"
      | "deployAndDeposit"
      | "deployAndDepositWasCalled"
      | "forceSetCommitCollateralValidation"
      | "getCollateralAmount"
      | "getCollateralInfo"
      | "getEscrow"
      | "lenderClaimCollateral"
      | "liquidateCollateral"
      | "revalidateCollateral"
      | "withdraw"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "checkBalances",
    values: [AddressLike, CollateralStruct[]]
  ): string;
  encodeFunctionData(
    functionFragment: "commitCollateral(uint256,(uint8,uint256,uint256,address)[])",
    values: [BigNumberish, CollateralStruct[]]
  ): string;
  encodeFunctionData(
    functionFragment: "commitCollateral(uint256,(uint8,uint256,uint256,address))",
    values: [BigNumberish, CollateralStruct]
  ): string;
  encodeFunctionData(
    functionFragment: "committedCollateralValid",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "deployAndDeposit",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "deployAndDepositWasCalled",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "forceSetCommitCollateralValidation",
    values: [boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "getCollateralAmount",
    values: [BigNumberish, AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "getCollateralInfo",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getEscrow",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "lenderClaimCollateral",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "liquidateCollateral",
    values: [BigNumberish, AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "revalidateCollateral",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "withdraw",
    values: [BigNumberish]
  ): string;

  decodeFunctionResult(
    functionFragment: "checkBalances",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "commitCollateral(uint256,(uint8,uint256,uint256,address)[])",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "commitCollateral(uint256,(uint8,uint256,uint256,address))",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "committedCollateralValid",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "deployAndDeposit",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "deployAndDepositWasCalled",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "forceSetCommitCollateralValidation",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getCollateralAmount",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getCollateralInfo",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getEscrow", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "lenderClaimCollateral",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "liquidateCollateral",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "revalidateCollateral",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
}

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

  interface: CollateralManagerMockInterface;

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

  checkBalances: TypedContractMethod<
    [_borrowerAddress: AddressLike, _collateralInfo: CollateralStruct[]],
    [[boolean, boolean[]] & { validated_: boolean; checks_: boolean[] }],
    "nonpayable"
  >;

  "commitCollateral(uint256,(uint8,uint256,uint256,address)[])": TypedContractMethod<
    [_bidId: BigNumberish, _collateralInfo: CollateralStruct[]],
    [boolean],
    "nonpayable"
  >;

  "commitCollateral(uint256,(uint8,uint256,uint256,address))": TypedContractMethod<
    [_bidId: BigNumberish, _collateralInfo: CollateralStruct],
    [boolean],
    "nonpayable"
  >;

  committedCollateralValid: TypedContractMethod<[], [boolean], "view">;

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

  deployAndDepositWasCalled: TypedContractMethod<[], [boolean], "view">;

  forceSetCommitCollateralValidation: TypedContractMethod<
    [_validation: boolean],
    [void],
    "nonpayable"
  >;

  getCollateralAmount: TypedContractMethod<
    [_bidId: BigNumberish, collateralAssetAddress: AddressLike],
    [bigint],
    "view"
  >;

  getCollateralInfo: TypedContractMethod<
    [_bidId: BigNumberish],
    [CollateralStructOutput[]],
    "view"
  >;

  getEscrow: TypedContractMethod<[_bidId: BigNumberish], [string], "view">;

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

  liquidateCollateral: TypedContractMethod<
    [_bidId: BigNumberish, _liquidatorAddress: AddressLike],
    [void],
    "nonpayable"
  >;

  revalidateCollateral: TypedContractMethod<
    [_bidId: BigNumberish],
    [boolean],
    "nonpayable"
  >;

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

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

  getFunction(
    nameOrSignature: "checkBalances"
  ): TypedContractMethod<
    [_borrowerAddress: AddressLike, _collateralInfo: CollateralStruct[]],
    [[boolean, boolean[]] & { validated_: boolean; checks_: boolean[] }],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "commitCollateral(uint256,(uint8,uint256,uint256,address)[])"
  ): TypedContractMethod<
    [_bidId: BigNumberish, _collateralInfo: CollateralStruct[]],
    [boolean],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "commitCollateral(uint256,(uint8,uint256,uint256,address))"
  ): TypedContractMethod<
    [_bidId: BigNumberish, _collateralInfo: CollateralStruct],
    [boolean],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "committedCollateralValid"
  ): TypedContractMethod<[], [boolean], "view">;
  getFunction(
    nameOrSignature: "deployAndDeposit"
  ): TypedContractMethod<[_bidId: BigNumberish], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "deployAndDepositWasCalled"
  ): TypedContractMethod<[], [boolean], "view">;
  getFunction(
    nameOrSignature: "forceSetCommitCollateralValidation"
  ): TypedContractMethod<[_validation: boolean], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "getCollateralAmount"
  ): TypedContractMethod<
    [_bidId: BigNumberish, collateralAssetAddress: AddressLike],
    [bigint],
    "view"
  >;
  getFunction(
    nameOrSignature: "getCollateralInfo"
  ): TypedContractMethod<
    [_bidId: BigNumberish],
    [CollateralStructOutput[]],
    "view"
  >;
  getFunction(
    nameOrSignature: "getEscrow"
  ): TypedContractMethod<[_bidId: BigNumberish], [string], "view">;
  getFunction(
    nameOrSignature: "lenderClaimCollateral"
  ): TypedContractMethod<[_bidId: BigNumberish], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "liquidateCollateral"
  ): TypedContractMethod<
    [_bidId: BigNumberish, _liquidatorAddress: AddressLike],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "revalidateCollateral"
  ): TypedContractMethod<[_bidId: BigNumberish], [boolean], "nonpayable">;
  getFunction(
    nameOrSignature: "withdraw"
  ): TypedContractMethod<[_bidId: BigNumberish], [void], "nonpayable">;

  filters: {};
}
