/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
  Contract,
  ContractFactory,
  ContractTransactionResponse,
  Interface,
} from "ethers";
import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers";
import type { NonPayableOverrides } from "../../../common";
import type {
  LenderCommitmentForwarderMock,
  LenderCommitmentForwarderMockInterface,
} from "../../../contracts/mock/LenderCommitmentForwarderMock";

const _abi = [
  {
    inputs: [],
    stateMutability: "nonpayable",
    type: "constructor",
  },
  {
    inputs: [],
    name: "acceptBidWasCalled",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_commitmentId",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_principalAmount",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_collateralAmount",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_collateralTokenId",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_collateralTokenAddress",
        type: "address",
      },
      {
        internalType: "address",
        name: "_recipient",
        type: "address",
      },
      {
        internalType: "uint16",
        name: "_interestRate",
        type: "uint16",
      },
      {
        internalType: "uint32",
        name: "_loanDuration",
        type: "uint32",
      },
    ],
    name: "acceptCommitmentWithRecipient",
    outputs: [
      {
        internalType: "uint256",
        name: "bidId",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_commitmentId",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_principalAmount",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_collateralAmount",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_collateralTokenId",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_collateralTokenAddress",
        type: "address",
      },
      {
        internalType: "address",
        name: "_recipient",
        type: "address",
      },
      {
        internalType: "uint16",
        name: "_interestRate",
        type: "uint16",
      },
      {
        internalType: "uint32",
        name: "_loanDuration",
        type: "uint32",
      },
      {
        internalType: "bytes32[]",
        name: "_merkleProof",
        type: "bytes32[]",
      },
    ],
    name: "acceptCommitmentWithRecipientAndProof",
    outputs: [
      {
        internalType: "uint256",
        name: "bidId",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "acceptCommitmentWithRecipientAndProofWasCalled",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "acceptCommitmentWithRecipientWasCalled",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    name: "commitmentPrincipalAccepted",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    name: "commitments",
    outputs: [
      {
        internalType: "uint256",
        name: "maxPrincipal",
        type: "uint256",
      },
      {
        internalType: "uint32",
        name: "expiration",
        type: "uint32",
      },
      {
        internalType: "uint32",
        name: "maxDuration",
        type: "uint32",
      },
      {
        internalType: "uint16",
        name: "minInterestRate",
        type: "uint16",
      },
      {
        internalType: "address",
        name: "collateralTokenAddress",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "collateralTokenId",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "maxPrincipalPerCollateralAmount",
        type: "uint256",
      },
      {
        internalType:
          "enum ILenderCommitmentForwarder.CommitmentCollateralType",
        name: "collateralTokenType",
        type: "uint8",
      },
      {
        internalType: "address",
        name: "lender",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "marketId",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "principalTokenAddress",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        components: [
          {
            internalType: "uint256",
            name: "maxPrincipal",
            type: "uint256",
          },
          {
            internalType: "uint32",
            name: "expiration",
            type: "uint32",
          },
          {
            internalType: "uint32",
            name: "maxDuration",
            type: "uint32",
          },
          {
            internalType: "uint16",
            name: "minInterestRate",
            type: "uint16",
          },
          {
            internalType: "address",
            name: "collateralTokenAddress",
            type: "address",
          },
          {
            internalType: "uint256",
            name: "collateralTokenId",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "maxPrincipalPerCollateralAmount",
            type: "uint256",
          },
          {
            internalType:
              "enum ILenderCommitmentForwarder.CommitmentCollateralType",
            name: "collateralTokenType",
            type: "uint8",
          },
          {
            internalType: "address",
            name: "lender",
            type: "address",
          },
          {
            internalType: "uint256",
            name: "marketId",
            type: "uint256",
          },
          {
            internalType: "address",
            name: "principalTokenAddress",
            type: "address",
          },
        ],
        internalType: "struct ILenderCommitmentForwarder.Commitment",
        name: "_commitment",
        type: "tuple",
      },
      {
        internalType: "address[]",
        name: "_borrowerAddressList",
        type: "address[]",
      },
    ],
    name: "createCommitment",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_commitmentId",
        type: "uint256",
      },
    ],
    name: "getCommitmentAcceptedPrincipal",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_commitmentId",
        type: "uint256",
      },
    ],
    name: "getCommitmentLender",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_commitmentId",
        type: "uint256",
      },
    ],
    name: "getCommitmentMarketId",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_commitmentId",
        type: "uint256",
      },
    ],
    name: "getCommitmentMaxPrincipal",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_commitmentId",
        type: "uint256",
      },
      {
        components: [
          {
            internalType: "uint256",
            name: "maxPrincipal",
            type: "uint256",
          },
          {
            internalType: "uint32",
            name: "expiration",
            type: "uint32",
          },
          {
            internalType: "uint32",
            name: "maxDuration",
            type: "uint32",
          },
          {
            internalType: "uint16",
            name: "minInterestRate",
            type: "uint16",
          },
          {
            internalType: "address",
            name: "collateralTokenAddress",
            type: "address",
          },
          {
            internalType: "uint256",
            name: "collateralTokenId",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "maxPrincipalPerCollateralAmount",
            type: "uint256",
          },
          {
            internalType:
              "enum ILenderCommitmentForwarder.CommitmentCollateralType",
            name: "collateralTokenType",
            type: "uint8",
          },
          {
            internalType: "address",
            name: "lender",
            type: "address",
          },
          {
            internalType: "uint256",
            name: "marketId",
            type: "uint256",
          },
          {
            internalType: "address",
            name: "principalTokenAddress",
            type: "address",
          },
        ],
        internalType: "struct ILenderCommitmentForwarder.Commitment",
        name: "_commitment",
        type: "tuple",
      },
    ],
    name: "setCommitment",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "submitBidWasCalled",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "submitBidWithCollateralWasCalled",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
] as const;

const _bytecode =
  " ";

type LenderCommitmentForwarderMockConstructorParams =
  | [signer?: Signer]
  | ConstructorParameters<typeof ContractFactory>;

const isSuperArgs = (
  xs: LenderCommitmentForwarderMockConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;

export class LenderCommitmentForwarderMock__factory extends ContractFactory {
  constructor(...args: LenderCommitmentForwarderMockConstructorParams) {
    if (isSuperArgs(args)) {
      super(...args);
    } else {
      super(_abi, _bytecode, args[0]);
    }
  }

  override getDeployTransaction(
    overrides?: NonPayableOverrides & { from?: string }
  ): Promise<ContractDeployTransaction> {
    return super.getDeployTransaction(overrides || {});
  }
  override deploy(overrides?: NonPayableOverrides & { from?: string }) {
    return super.deploy(overrides || {}) as Promise<
      LenderCommitmentForwarderMock & {
        deploymentTransaction(): ContractTransactionResponse;
      }
    >;
  }
  override connect(
    runner: ContractRunner | null
  ): LenderCommitmentForwarderMock__factory {
    return super.connect(runner) as LenderCommitmentForwarderMock__factory;
  }

  static readonly bytecode = _bytecode;
  static readonly abi = _abi;
  static createInterface(): LenderCommitmentForwarderMockInterface {
    return new Interface(_abi) as LenderCommitmentForwarderMockInterface;
  }
  static connect(
    address: string,
    runner?: ContractRunner | null
  ): LenderCommitmentForwarderMock {
    return new Contract(
      address,
      _abi,
      runner
    ) as unknown as LenderCommitmentForwarderMock;
  }
}
