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

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

const _abi = [
  {
    anonymous: false,
    inputs: [
      {
        indexed: false,
        internalType: "uint256",
        name: "requirement",
        type: "uint256",
      },
    ],
    name: "CollateralizationRequirementUpdated",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "uint64",
        name: "period",
        type: "uint64",
      },
      {
        indexed: false,
        internalType: "uint64",
        name: "periods",
        type: "uint64",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "newDebt",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "rewardCount",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "cumulativeDebt",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "debtExchangeRate",
        type: "uint256",
      },
    ],
    name: "InterestAccrued",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: false,
        internalType: "uint256",
        name: "percentage",
        type: "uint256",
      },
    ],
    name: "InterestPortionToLendersUpdated",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "account",
        type: "address",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "hueCount",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "lendTokenCount",
        type: "uint256",
      },
    ],
    name: "Lend",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: false,
        internalType: "uint256",
        name: "size",
        type: "uint256",
      },
    ],
    name: "MinPositionSizeUpdated",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "uint64",
        name: "positionID",
        type: "uint64",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "debtIncrease",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "debtDecrease",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "collateralIncrease",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "collateralDecrease",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "newDebt",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "newCollateral",
        type: "uint256",
      },
    ],
    name: "PositionAdjusted",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "creator",
        type: "address",
      },
      {
        indexed: true,
        internalType: "uint64",
        name: "positionID",
        type: "uint64",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "initialDebt",
        type: "uint256",
      },
    ],
    name: "PositionCreated",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "uint256",
        name: "positionID",
        type: "uint256",
      },
      {
        indexed: true,
        internalType: "uint64",
        name: "period",
        type: "uint64",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "debtAfter",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "tcpRewards",
        type: "uint256",
      },
    ],
    name: "PositionUpdated",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "account",
        type: "address",
      },
      {
        indexed: true,
        internalType: "bool",
        name: "isKickback",
        type: "bool",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "tcpRewards",
        type: "uint256",
      },
    ],
    name: "RewardsDistributed",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: false,
        internalType: "uint32",
        name: "duration",
        type: "uint32",
      },
    ],
    name: "TwapDurationUpdated",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "account",
        type: "address",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "hueCount",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "lendTokenCount",
        type: "uint256",
      },
    ],
    name: "Unlend",
    type: "event",
  },
  {
    inputs: [],
    name: "accrueInterest",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "collateralizationRequirement",
    outputs: [
      {
        internalType: "uint256",
        name: "ratio",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "lastPeriodGlobalInterestAccrued",
    outputs: [
      {
        internalType: "uint64",
        name: "period",
        type: "uint64",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "stop",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint64",
        name: "positionID",
        type: "uint64",
      },
    ],
    name: "systemGetUpdatedPosition",
    outputs: [
      {
        components: [
          {
            internalType: "uint256",
            name: "startCumulativeDebt",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "collateral",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "debt",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "startDebtExchangeRate",
            type: "uint256",
          },
          {
            internalType: "uint256",
            name: "startTCPRewards",
            type: "uint256",
          },
          {
            internalType: "uint64",
            name: "lastTimeUpdated",
            type: "uint64",
          },
          {
            internalType: "uint64",
            name: "lastBlockPositionIncreased",
            type: "uint64",
          },
          {
            internalType: "int24",
            name: "tick",
            type: "int24",
          },
          {
            internalType: "bool",
            name: "tickSet",
            type: "bool",
          },
          {
            internalType: "uint64",
            name: "tickIndex",
            type: "uint64",
          },
          {
            internalType: "uint32",
            name: "ui",
            type: "uint32",
          },
          {
            internalType: "address",
            name: "kickbackDestination",
            type: "address",
          },
          {
            internalType: "uint64",
            name: "kickbackPortion",
            type: "uint64",
          },
        ],
        internalType: "struct IAccounting.DebtPosition",
        name: "position",
        type: "tuple",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
];

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