/* 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 {
  TellerV2SolMock,
  TellerV2SolMockInterface,
} from "../../../contracts/mock/TellerV2SolMock";

const _abi = [
  {
    inputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    name: "__lenderVolumeFilled",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "__totalVolumeFilled",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    name: "bidDefaultDuration",
    outputs: [
      {
        internalType: "uint32",
        name: "",
        type: "uint32",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    name: "bidExpirationTime",
    outputs: [
      {
        internalType: "uint32",
        name: "",
        type: "uint32",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "bidId",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    name: "bidPaymentCycleType",
    outputs: [
      {
        internalType: "enum PaymentCycleType",
        name: "",
        type: "uint8",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    name: "bids",
    outputs: [
      {
        internalType: "address",
        name: "borrower",
        type: "address",
      },
      {
        internalType: "address",
        name: "receiver",
        type: "address",
      },
      {
        internalType: "address",
        name: "lender",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "marketplaceId",
        type: "uint256",
      },
      {
        internalType: "bytes32",
        name: "_metadataURI",
        type: "bytes32",
      },
      {
        components: [
          {
            internalType: "contract IERC20",
            name: "lendingToken",
            type: "address",
          },
          {
            internalType: "uint256",
            name: "principal",
            type: "uint256",
          },
          {
            components: [
              {
                internalType: "uint256",
                name: "principal",
                type: "uint256",
              },
              {
                internalType: "uint256",
                name: "interest",
                type: "uint256",
              },
            ],
            internalType: "struct Payment",
            name: "totalRepaid",
            type: "tuple",
          },
          {
            internalType: "uint32",
            name: "timestamp",
            type: "uint32",
          },
          {
            internalType: "uint32",
            name: "acceptedTimestamp",
            type: "uint32",
          },
          {
            internalType: "uint32",
            name: "lastRepaidTimestamp",
            type: "uint32",
          },
          {
            internalType: "uint32",
            name: "loanDuration",
            type: "uint32",
          },
        ],
        internalType: "struct LoanDetails",
        name: "loanDetails",
        type: "tuple",
      },
      {
        components: [
          {
            internalType: "uint256",
            name: "paymentCycleAmount",
            type: "uint256",
          },
          {
            internalType: "uint32",
            name: "paymentCycle",
            type: "uint32",
          },
          {
            internalType: "uint16",
            name: "APR",
            type: "uint16",
          },
        ],
        internalType: "struct Terms",
        name: "terms",
        type: "tuple",
      },
      {
        internalType: "enum BidState",
        name: "state",
        type: "uint8",
      },
      {
        internalType: "enum PaymentType",
        name: "paymentType",
        type: "uint8",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    name: "borrowerBids",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_timestamp",
        type: "uint256",
      },
    ],
    name: "calculateAmountDue",
    outputs: [
      {
        components: [
          {
            internalType: "uint256",
            name: "principal",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "interest",
            type: "uint256",
          },
        ],
        internalType: "struct Payment",
        name: "due",
        type: "tuple",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_timestamp",
        type: "uint256",
      },
    ],
    name: "calculateAmountOwed",
    outputs: [
      {
        components: [
          {
            internalType: "uint256",
            name: "principal",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "interest",
            type: "uint256",
          },
        ],
        internalType: "struct Payment",
        name: "due",
        type: "tuple",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "collateralManager",
    outputs: [
      {
        internalType: "contract ICollateralManager",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "escrowVault",
    outputs: [
      {
        internalType: "contract IEscrowVault",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "getBidState",
    outputs: [
      {
        internalType: "enum BidState",
        name: "",
        type: "uint8",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_borrower",
        type: "address",
      },
    ],
    name: "getBorrowerActiveLoanIds",
    outputs: [
      {
        internalType: "uint256[]",
        name: "",
        type: "uint256[]",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "getLoanBorrower",
    outputs: [
      {
        internalType: "address",
        name: "borrower_",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "getLoanDetails",
    outputs: [
      {
        components: [
          {
            internalType: "contract IERC20",
            name: "lendingToken",
            type: "address",
          },
          {
            internalType: "uint256",
            name: "principal",
            type: "uint256",
          },
          {
            components: [
              {
                internalType: "uint256",
                name: "principal",
                type: "uint256",
              },
              {
                internalType: "uint256",
                name: "interest",
                type: "uint256",
              },
            ],
            internalType: "struct Payment",
            name: "totalRepaid",
            type: "tuple",
          },
          {
            internalType: "uint32",
            name: "timestamp",
            type: "uint32",
          },
          {
            internalType: "uint32",
            name: "acceptedTimestamp",
            type: "uint32",
          },
          {
            internalType: "uint32",
            name: "lastRepaidTimestamp",
            type: "uint32",
          },
          {
            internalType: "uint32",
            name: "loanDuration",
            type: "uint32",
          },
        ],
        internalType: "struct LoanDetails",
        name: "",
        type: "tuple",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "getLoanLender",
    outputs: [
      {
        internalType: "address",
        name: "lender_",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "getLoanLendingToken",
    outputs: [
      {
        internalType: "address",
        name: "token_",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "getLoanMarketId",
    outputs: [
      {
        internalType: "uint256",
        name: "_marketId",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "getLoanSummary",
    outputs: [
      {
        internalType: "address",
        name: "borrower",
        type: "address",
      },
      {
        internalType: "address",
        name: "lender",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "marketId",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "principalTokenAddress",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "principalAmount",
        type: "uint256",
      },
      {
        internalType: "uint32",
        name: "acceptedTimestamp",
        type: "uint32",
      },
      {
        internalType: "uint32",
        name: "lastRepaidTimestamp",
        type: "uint32",
      },
      {
        internalType: "enum BidState",
        name: "bidState",
        type: "uint8",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getMarketRegistry",
    outputs: [
      {
        internalType: "contract IMarketRegistry",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "isLoanDefaulted",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "isLoanLiquidateable",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "isPaymentLate",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "lenderAcceptBid",
    outputs: [
      {
        internalType: "uint256",
        name: "amountToProtocol",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "amountToMarketplace",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "amountToBorrower",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "lenderCommitmentForwarder",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "lenderManager",
    outputs: [
      {
        internalType: "contract ILenderManager",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    name: "lenderVolumeFilled",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "marketRegistry",
    outputs: [
      {
        internalType: "contract IMarketRegistry",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "protocolFee",
    outputs: [
      {
        internalType: "uint16",
        name: "",
        type: "uint16",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_amount",
        type: "uint256",
      },
    ],
    name: "repayLoan",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "repayLoanFull",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "repayLoanMinimum",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "reputationManager",
    outputs: [
      {
        internalType: "contract IReputationManager",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        internalType: "uint32",
        name: "_timestamp",
        type: "uint32",
      },
    ],
    name: "setLastRepaidTimestamp",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_marketRegistry",
        type: "address",
      },
    ],
    name: "setMarketRegistry",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_lendingToken",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_marketId",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_principal",
        type: "uint256",
      },
      {
        internalType: "uint32",
        name: "_duration",
        type: "uint32",
      },
      {
        internalType: "uint16",
        name: "_APR",
        type: "uint16",
      },
      {
        internalType: "string",
        name: "",
        type: "string",
      },
      {
        internalType: "address",
        name: "_receiver",
        type: "address",
      },
    ],
    name: "submitBid",
    outputs: [
      {
        internalType: "uint256",
        name: "bidId_",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_lendingToken",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_marketplaceId",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_principal",
        type: "uint256",
      },
      {
        internalType: "uint32",
        name: "_duration",
        type: "uint32",
      },
      {
        internalType: "uint16",
        name: "_APR",
        type: "uint16",
      },
      {
        internalType: "string",
        name: "_metadataURI",
        type: "string",
      },
      {
        internalType: "address",
        name: "_receiver",
        type: "address",
      },
      {
        components: [
          {
            internalType: "enum CollateralType",
            name: "_collateralType",
            type: "uint8",
          },
          {
            internalType: "uint256",
            name: "_amount",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "_tokenId",
            type: "uint256",
          },
          {
            internalType: "address",
            name: "_collateralAddress",
            type: "address",
          },
        ],
        internalType: "struct Collateral[]",
        name: "_collateralInfo",
        type: "tuple[]",
      },
    ],
    name: "submitBid",
    outputs: [
      {
        internalType: "uint256",
        name: "bidId_",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    name: "totalVolumeFilled",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    name: "uris",
    outputs: [
      {
        internalType: "string",
        name: "",
        type: "string",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "version",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
] as const;

const _bytecode =
  " ";

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

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

export class TellerV2SolMock__factory extends ContractFactory {
  constructor(...args: TellerV2SolMockConstructorParams) {
    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<
      TellerV2SolMock & {
        deploymentTransaction(): ContractTransactionResponse;
      }
    >;
  }
  override connect(runner: ContractRunner | null): TellerV2SolMock__factory {
    return super.connect(runner) as TellerV2SolMock__factory;
  }

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