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

const _abi = [
  {
    inputs: [
      {
        internalType: "address",
        name: "_tellerV2",
        type: "address",
      },
      {
        internalType: "address",
        name: "_smartCommitmentForwarder",
        type: "address",
      },
      {
        internalType: "address",
        name: "_uniswapV3Factory",
        type: "address",
      },
    ],
    stateMutability: "nonpayable",
    type: "constructor",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_borrower",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_principalAmount",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_collateralAmount",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_collateralTokenAddress",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_collateralTokenId",
        type: "uint256",
      },
      {
        internalType: "uint32",
        name: "_loanDuration",
        type: "uint32",
      },
      {
        internalType: "uint16",
        name: "_interestRate",
        type: "uint16",
      },
    ],
    name: "acceptFundsForAcceptBid",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_amount",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_sharesRecipient",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_minAmountOut",
        type: "uint256",
      },
    ],
    name: "addPrincipalToCommitmentGroup",
    outputs: [
      {
        internalType: "uint256",
        name: "sharesAmount_",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_amountPoolSharesTokens",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_recipient",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_minAmountOut",
        type: "uint256",
      },
    ],
    name: "burnSharesToWithdrawEarnings",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "getCollateralTokenAddress",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getCollateralTokenId",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getCollateralTokenType",
    outputs: [
      {
        internalType: "enum CommitmentCollateralType",
        name: "",
        type: "uint8",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getMarketId",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getMaxLoanDuration",
    outputs: [
      {
        internalType: "uint32",
        name: "",
        type: "uint32",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_delta",
        type: "uint256",
      },
    ],
    name: "getMinInterestRate",
    outputs: [
      {
        internalType: "uint16",
        name: "",
        type: "uint16",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getPrincipalAmountAvailableToBorrow",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getPrincipalTokenAddress",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_principalAmount",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_maxPrincipalPerCollateralAmount",
        type: "uint256",
      },
    ],
    name: "getRequiredCollateral",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getTokenDifferenceFromLiquidations",
    outputs: [
      {
        internalType: "int256",
        name: "",
        type: "int256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        components: [
          {
            internalType: "address",
            name: "principalTokenAddress",
            type: "address",
          },
          {
            internalType: "address",
            name: "collateralTokenAddress",
            type: "address",
          },
          {
            internalType: "uint256",
            name: "marketId",
            type: "uint256",
          },
          {
            internalType: "uint32",
            name: "maxLoanDuration",
            type: "uint32",
          },
          {
            internalType: "uint16",
            name: "interestRateLowerBound",
            type: "uint16",
          },
          {
            internalType: "uint16",
            name: "interestRateUpperBound",
            type: "uint16",
          },
          {
            internalType: "uint16",
            name: "liquidityThresholdPercent",
            type: "uint16",
          },
          {
            internalType: "uint16",
            name: "collateralRatio",
            type: "uint16",
          },
        ],
        internalType: "struct ILenderCommitmentGroup.CommitmentGroupConfig",
        name: "_commitmentGroupConfig",
        type: "tuple",
      },
      {
        components: [
          {
            internalType: "address",
            name: "pool",
            type: "address",
          },
          {
            internalType: "bool",
            name: "zeroForOne",
            type: "bool",
          },
          {
            internalType: "uint32",
            name: "twapInterval",
            type: "uint32",
          },
          {
            internalType: "uint256",
            name: "token0Decimals",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "token1Decimals",
            type: "uint256",
          },
        ],
        internalType: "struct IUniswapPricingLibrary.PoolRouteConfig[]",
        name: "_poolOracleRoutes",
        type: "tuple[]",
      },
    ],
    name: "initialize",
    outputs: [
      {
        internalType: "address",
        name: "poolSharesToken",
        type: "address",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_bidId",
        type: "uint256",
      },
      {
        internalType: "int256",
        name: "_tokenAmountDifference",
        type: "int256",
      },
    ],
    name: "liquidateDefaultedLoanWithIncentive",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_amountPoolSharesTokens",
        type: "uint256",
      },
    ],
    name: "prepareSharesForBurn",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
] as const;

const _bytecode =
  "0x608060405234801561001057600080fd5b506040516104b83803806104b883398101604081905261002f91610053565b505050610096565b80516001600160a01b038116811461004e57600080fd5b919050565b60008060006060848603121561006857600080fd5b61007184610037565b925061007f60208501610037565b915061008d60408501610037565b90509250925092565b610413806100a56000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c806376f28daf11610097578063b7a7f86a11610066578063b7a7f86a146101eb578063c84f95dd146101f9578063d2c76fd814610164578063e532b5e5146101eb57600080fd5b806376f28daf1461017a5780637701a84c1461018e578063a1873998146101a6578063a5c2f9c4146101ca57600080fd5b8063541fdb71116100d3578063541fdb7114610164578063568ef470146101645780635932f4ff1461016b5780636d483fe61461015d57600080fd5b80631d42a60e146101055780632322ac3614610139578063280e32fb1461015d5780634b1dd53b14610164575b600080fd5b61011c610113366004610208565b60009392505050565b6040516001600160a01b0390911681526020015b60405180910390f35b61014f610147366004610298565b600092915050565b604051908152602001610130565b600061011c565b600061014f565b60405160008152602001610130565b61018c610188366004610298565b5050565b005b61018c61019c3660046102d6565b5050505050505050565b6101ba6101b4366004610367565b50600090565b6040519015158152602001610130565b6101d86101b4366004610367565b60405161ffff9091168152602001610130565b61014f610113366004610380565b600060405161013091906103b5565b600080600083850361012081121561021f57600080fd5b6101008082121561022f57600080fd5b859450840135905067ffffffffffffffff8082111561024d57600080fd5b818601915086601f83011261026157600080fd5b81358181111561027057600080fd5b87602060a08302850101111561028557600080fd5b6020830194508093505050509250925092565b600080604083850312156102ab57600080fd5b50508035926020909101359150565b80356001600160a01b03811681146102d157600080fd5b919050565b600080600080600080600080610100898b0312156102f357600080fd5b6102fc896102ba565b975060208901359650604089013595506060890135945061031f60808a016102ba565b935060a0890135925060c089013563ffffffff8116811461033f57600080fd5b915060e089013561ffff8116811461035657600080fd5b809150509295985092959890939650565b60006020828403121561037957600080fd5b5035919050565b60008060006060848603121561039557600080fd5b833592506103a5602085016102ba565b9150604084013590509250925092565b60208101600883106103d757634e487b7160e01b600052602160045260246000fd5b9190529056fea26469706673582212202258cabc25f279fd472aee3cede5e75e968fffc7a865886f388c41482c1eaab264736f6c634300080b0033";

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

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

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

  override getDeployTransaction(
    _tellerV2: AddressLike,
    _smartCommitmentForwarder: AddressLike,
    _uniswapV3Factory: AddressLike,
    overrides?: NonPayableOverrides & { from?: string }
  ): Promise<ContractDeployTransaction> {
    return super.getDeployTransaction(
      _tellerV2,
      _smartCommitmentForwarder,
      _uniswapV3Factory,
      overrides || {}
    );
  }
  override deploy(
    _tellerV2: AddressLike,
    _smartCommitmentForwarder: AddressLike,
    _uniswapV3Factory: AddressLike,
    overrides?: NonPayableOverrides & { from?: string }
  ) {
    return super.deploy(
      _tellerV2,
      _smartCommitmentForwarder,
      _uniswapV3Factory,
      overrides || {}
    ) as Promise<
      LenderCommitmentGroup_SmartMock & {
        deploymentTransaction(): ContractTransactionResponse;
      }
    >;
  }
  override connect(
    runner: ContractRunner | null
  ): LenderCommitmentGroup_SmartMock__factory {
    return super.connect(runner) as LenderCommitmentGroup_SmartMock__factory;
  }

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