/* 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 {
  TellerV0Storage,
  TellerV0StorageInterface,
} from "../../contracts/TellerV0Storage";

const _abi = [
  {
    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 ERC20",
            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 TellerV0Storage.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 TellerV0Storage.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 TellerV0Storage.Terms",
        name: "terms",
        type: "tuple",
      },
      {
        internalType: "enum TellerV0Storage.BidState",
        name: "state",
        type: "uint8",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
] as const;

const _bytecode =
  "0x608060405234801561001057600080fd5b506102a4806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80634423c5f114610030575b600080fd5b61013161003e36600461014e565b6000602081815291815260409081902080546001820154600283015460038401546004850154865160e08101885260058701546001600160a01b0390811682526006880154828b01528851808a018a52600789015481526008890154818c0152828a0152600988015463ffffffff80821660608086019190915264010000000080840483166080870152680100000000000000008404831660a0870152600160601b909304821660c08601528b519081018c52600a8b01548152600b8b01549182169c81019c909c520461ffff16988a0198909852600c9096015494871697938716969092169490939192909160ff1688565b604051610145989796959493929190610189565b60405180910390f35b60006020828403121561016057600080fd5b5035919050565b6007811061018557634e487b7160e01b600052602160045260246000fd5b9052565b60006102208201905060018060a01b03808b168352808a16602084015280891660408401528760608401528660808401528086511660a084015250602085015160c08301526040850151805160e084015260208101516101008401525063ffffffff606086015116610120830152608085015161020f61014084018263ffffffff169052565b5060a085015163ffffffff90811661016084015260c0860151811661018084015284516101a08401526020850151166101c0830152604084015161ffff166101e0830152610261610200830184610167565b999850505050505050505056fea26469706673582212209903c3bef6901cc50b132cc802e06cc49a256e36fbab352692dcc7da70a312c864736f6c634300080b0033";

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

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

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

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