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

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

const _abi = [
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
      {
        internalType: "address payable",
        name: "_execFeeTo",
        type: "address",
      },
    ],
    name: "cancelDecreaseOrder",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_to",
        type: "address",
      },
      {
        internalType: "address payable",
        name: "_execFeeTo",
        type: "address",
      },
    ],
    name: "cancelIncreaseOrder",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_collateralToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "_indexToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "bool",
        name: "_isLong",
        type: "bool",
      },
      {
        internalType: "uint256",
        name: "_notionalDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_minSizeDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_maxSizeDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_execFee",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "createDecreaseOrder",
        type: "uint256",
      },
    ],
    name: "createDecreaseOrder",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_inToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "_collateralToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "_indexToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "bool",
        name: "_isLong",
        type: "bool",
      },
      {
        internalType: "uint256",
        name: "_notionalDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_sizeDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_marginAmountIn",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_execFee",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_decreaseOrder",
        type: "uint256",
      },
    ],
    name: "createIncreaseOrder",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "orderIndex",
        type: "uint256",
      },
    ],
    name: "decreaseOrderExecable",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_marginTo",
        type: "address",
      },
      {
        internalType: "address payable",
        name: "_execFeeTo",
        type: "address",
      },
    ],
    name: "execDecreaseOrder",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
      {
        internalType: "address payable",
        name: "_execFeeTo",
        type: "address",
      },
    ],
    name: "execIncreaseOrder",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
    ],
    name: "getDecreaseOrder",
    outputs: [
      {
        internalType: "address",
        name: "collateralToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "indexToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "account",
        type: "address",
      },
      {
        internalType: "bool",
        name: "isLong",
        type: "bool",
      },
      {
        internalType: "uint256",
        name: "notionalDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "minSizeDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "maxSizeDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "execFee",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
    ],
    name: "getDecreaseOrderCollateralToken",
    outputs: [
      {
        internalType: "address",
        name: "collateralToken",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
    ],
    name: "getIncreaseOrder",
    outputs: [
      {
        internalType: "address",
        name: "inToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "collateralToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "indexToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "account",
        type: "address",
      },
      {
        internalType: "bool",
        name: "isLong",
        type: "bool",
      },
      {
        internalType: "uint256",
        name: "marginDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "notionalDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "sizeDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "execFee",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
    ],
    name: "getIncreaseOrderCollateralToken",
    outputs: [
      {
        internalType: "address",
        name: "collateralToken",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "orderIndex",
        type: "uint256",
      },
    ],
    name: "increaseOrderExecable",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "minExecFee",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_notionalDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_minSizeDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_maxSizeDelta",
        type: "uint256",
      },
    ],
    name: "updateDecreaseOrder",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_notionalDelta",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_sizeDelta",
        type: "uint256",
      },
    ],
    name: "updateIncreaseOrder",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_collateralToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "_indexToken",
        type: "address",
      },
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "bool",
        name: "_isLong",
        type: "bool",
      },
      {
        internalType: "uint256",
        name: "_notionalDelta",
        type: "uint256",
      },
      {
        internalType: "bool",
        name: "_raise",
        type: "bool",
      },
    ],
    name: "validDecreaseOrderNotional",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
      {
        internalType: "bool",
        name: "_raise",
        type: "bool",
      },
    ],
    name: "validateDecreaseOrderPrice",
    outputs: [
      {
        internalType: "bool",
        name: "takeProfitValid",
        type: "bool",
      },
      {
        internalType: "bool",
        name: "stopLossValid",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_account",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_orderIndex",
        type: "uint256",
      },
      {
        internalType: "bool",
        name: "_raise",
        type: "bool",
      },
    ],
    name: "validateIncreaseOrderPrice",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
];

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