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

const _abi = [
  {
    inputs: [
      {
        internalType: "address",
        name: "_borrowerAddress",
        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: "checkBalances",
    outputs: [
      {
        internalType: "bool",
        name: "validated_",
        type: "bool",
      },
      {
        internalType: "bool[]",
        name: "checks_",
        type: "bool[]",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        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: "commitCollateral",
    outputs: [
      {
        internalType: "bool",
        name: "validation_",
        type: "bool",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        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: "commitCollateral",
    outputs: [
      {
        internalType: "bool",
        name: "validation_",
        type: "bool",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "committedCollateralValid",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "deployAndDeposit",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "deployAndDepositWasCalled",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "bool",
        name: "_validation",
        type: "bool",
      },
    ],
    name: "forceSetCommitCollateralValidation",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "collateralAssetAddress",
        type: "address",
      },
    ],
    name: "getCollateralAmount",
    outputs: [
      {
        internalType: "uint256",
        name: "_amount",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "getCollateralInfo",
    outputs: [
      {
        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: "collateral_",
        type: "tuple[]",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "getEscrow",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "lenderClaimCollateral",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_collateralRecipient",
        type: "address",
      },
    ],
    name: "lenderClaimCollateralWithRecipient",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_liquidatorAddress",
        type: "address",
      },
    ],
    name: "liquidateCollateral",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "revalidateCollateral",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
    ],
    name: "withdraw",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
] as const;

const _bytecode =
  "0x60806040526000805460ff1916600117905534801561001d57600080fd5b5061057c8061002d6000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063857919de11610097578063d1d7116011610066578063d1d711601461022e578063d6c20fa814610240578063e7ae746a14610275578063f0472c491461022e57600080fd5b8063857919de146101b55780638de16116146101c9578063934b5d13146101e9578063cd98536b1461020957600080fd5b80632e1a7d4d116100d35780632e1a7d4d1461013c5780633db051ea1461014f5780637d19e59614610170578063853c488d1461019c57600080fd5b80631532dc45146100fa5780631d0498481461012a5780632b201e301461013c575b600080fd5b610115610108366004610321565b505060005460ff16919050565b60405190151581526020015b60405180910390f35b60005461011590610100900460ff1681565b61014d61014a36600461036d565b50565b005b61014d61015d366004610386565b6000805460ff1916911515919091179055565b61018461017e36600461036d565b50600090565b6040516001600160a01b039091168152602001610121565b6101156101aa3660046103af565b505060005460ff1690565b6101156101c336600461036d565b50600190565b61014d6101d736600461036d565b506000805461ff001916610100179055565b6101fc6101f736600461036d565b610282565b60405161012191906103e7565b61022061021736600461048e565b6101f492915050565b604051908152602001610121565b61014d61023c36600461048e565b5050565b61026761024e3660046104ba565b5050604080516000815260208101909152600192909150565b6040516101219291906104f4565b6000546101159060ff1681565b604080516000808252602082019092526060916102ce565b60408051608081018252600080825260208083018290529282018190526060820152825260001990920191018161029a5790505b5092915050565b60008083601f8401126102e757600080fd5b50813567ffffffffffffffff8111156102ff57600080fd5b6020830191508360208260071b850101111561031a57600080fd5b9250929050565b60008060006040848603121561033657600080fd5b83359250602084013567ffffffffffffffff81111561035457600080fd5b610360868287016102d5565b9497909650939450505050565b60006020828403121561037f57600080fd5b5035919050565b60006020828403121561039857600080fd5b813580151581146103a857600080fd5b9392505050565b60008082840360a08112156103c357600080fd5b833592506080601f19820112156103d957600080fd5b506020830190509250929050565b60208082528251828201819052600091906040908185019086840185805b8381101561046457825180516003811061042d57634e487b7160e01b84526021600452602484fd5b8652808801518887015286810151878701526060908101516001600160a01b03169086015260809094019391860191600101610405565b509298975050505050505050565b80356001600160a01b038116811461048957600080fd5b919050565b600080604083850312156104a157600080fd5b823591506104b160208401610472565b90509250929050565b6000806000604084860312156104cf57600080fd5b6104d884610472565b9250602084013567ffffffffffffffff81111561035457600080fd5b60006040820184151583526020604081850152818551808452606086019150828701935060005b8181101561053957845115158352938301939183019160010161051b565b509097965050505050505056fea264697066735822122018e5833f7ab6414642b16dc1f4bf5d4c534b9ae46ccf877b5a76ce8175782d4f64736f6c634300080b0033";

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

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

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

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