/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */

import { Contract, Signer, utils } from "ethers";
import { Provider } from "@ethersproject/providers";
import type {
  IVariableBorrow,
  IVariableBorrowInterface,
} from "../IVariableBorrow";

const _abi = [
  {
    inputs: [
      {
        internalType: "address",
        name: "asset",
        type: "address",
      },
    ],
    name: "assets",
    outputs: [
      {
        components: [
          {
            internalType: "uint256",
            name: "debt",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "protocolRevenueAmount",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "protocolRevenueAmountExtract",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "r0",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "relativeInterest",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "updatedAt",
            type: "uint256",
          },
          {
            internalType: "uint16",
            name: "interestRate",
            type: "uint16",
          },
          {
            internalType: "uint16",
            name: "base",
            type: "uint16",
          },
          {
            internalType: "uint16",
            name: "optimal",
            type: "uint16",
          },
          {
            internalType: "uint16",
            name: "slope1",
            type: "uint16",
          },
          {
            internalType: "uint16",
            name: "slope2",
            type: "uint16",
          },
          {
            internalType: "uint8",
            name: "borrowCredit",
            type: "uint8",
          },
          {
            internalType: "uint8",
            name: "collateralCredit",
            type: "uint8",
          },
          {
            internalType: "uint8",
            name: "penaltyRate",
            type: "uint8",
          },
        ],
        internalType: "struct IVariableBorrow.Asset",
        name: "",
        type: "tuple",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_asset",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "amount",
        type: "uint256",
      },
      {
        components: [
          {
            internalType: "address",
            name: "token",
            type: "address",
          },
          {
            internalType: "uint256",
            name: "amount",
            type: "uint256",
          },
        ],
        internalType: "struct IVariableBorrow.Collateral[]",
        name: "collaterals",
        type: "tuple[]",
      },
      {
        internalType: "address",
        name: "to",
        type: "address",
      },
    ],
    name: "borrow",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_asset",
        type: "address",
      },
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "delaySeconds",
        type: "uint256",
      },
    ],
    name: "getAccountDebt",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_asset",
        type: "address",
      },
    ],
    name: "getDebt",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_asset",
        type: "address",
      },
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
    ],
    name: "getPositionsView",
    outputs: [
      {
        internalType: "uint256",
        name: "debt",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "r0",
        type: "uint256",
      },
      {
        internalType: "address[]",
        name: "collateralTokens",
        type: "address[]",
      },
      {
        internalType: "uint256[]",
        name: "collateralAmounts",
        type: "uint256[]",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_asset",
        type: "address",
      },
      {
        internalType: "address",
        name: "account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "amount",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "to",
        type: "address",
      },
    ],
    name: "liquidate",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "oracle",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_asset",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "amountMax",
        type: "uint256",
      },
      {
        components: [
          {
            internalType: "address",
            name: "token",
            type: "address",
          },
          {
            internalType: "uint256",
            name: "amount",
            type: "uint256",
          },
        ],
        internalType: "struct IVariableBorrow.Collateral[]",
        name: "collaterals",
        type: "tuple[]",
      },
      {
        internalType: "address",
        name: "to",
        type: "address",
      },
    ],
    name: "repay",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "swap",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
];

export class IVariableBorrow__factory {
  static readonly abi = _abi;
  static createInterface(): IVariableBorrowInterface {
    return new utils.Interface(_abi) as IVariableBorrowInterface;
  }
  static connect(
    address: string,
    signerOrProvider: Signer | Provider
  ): IVariableBorrow {
    return new Contract(address, _abi, signerOrProvider) as IVariableBorrow;
  }
}
