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

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  BaseContract,
  ContractTransaction,
  Overrides,
  PayableOverrides,
  CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import type { TypedEventFilter, TypedEvent, TypedListener } from "./common";

interface IFutureLimitInterface extends ethers.utils.Interface {
  functions: {
    "cancelDecreaseOrder(address,uint256,address)": FunctionFragment;
    "cancelIncreaseOrder(address,uint256,address,address)": FunctionFragment;
    "createDecreaseOrder(address,address,address,bool,uint256,uint256,uint256,uint256,uint256)": FunctionFragment;
    "createIncreaseOrder(address,address,address,address,bool,uint256,uint256,uint256,uint256,uint256)": FunctionFragment;
    "decreaseOrderExecable(address,uint256)": FunctionFragment;
    "execDecreaseOrder(address,uint256,address,address)": FunctionFragment;
    "execIncreaseOrder(address,uint256,address)": FunctionFragment;
    "getDecreaseOrder(address,uint256)": FunctionFragment;
    "getDecreaseOrderCollateralToken(address,uint256)": FunctionFragment;
    "getIncreaseOrder(address,uint256)": FunctionFragment;
    "getIncreaseOrderCollateralToken(address,uint256)": FunctionFragment;
    "increaseOrderExecable(address,uint256)": FunctionFragment;
    "minExecFee()": FunctionFragment;
    "updateDecreaseOrder(address,uint256,uint256,uint256,uint256)": FunctionFragment;
    "updateIncreaseOrder(address,uint256,uint256,uint256)": FunctionFragment;
    "validDecreaseOrderNotional(address,address,address,bool,uint256,bool)": FunctionFragment;
    "validateDecreaseOrderPrice(address,uint256,bool)": FunctionFragment;
    "validateIncreaseOrderPrice(address,uint256,bool)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "cancelDecreaseOrder",
    values: [string, BigNumberish, string]
  ): string;
  encodeFunctionData(
    functionFragment: "cancelIncreaseOrder",
    values: [string, BigNumberish, string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "createDecreaseOrder",
    values: [
      string,
      string,
      string,
      boolean,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "createIncreaseOrder",
    values: [
      string,
      string,
      string,
      string,
      boolean,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "decreaseOrderExecable",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "execDecreaseOrder",
    values: [string, BigNumberish, string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "execIncreaseOrder",
    values: [string, BigNumberish, string]
  ): string;
  encodeFunctionData(
    functionFragment: "getDecreaseOrder",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getDecreaseOrderCollateralToken",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getIncreaseOrder",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getIncreaseOrderCollateralToken",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "increaseOrderExecable",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "minExecFee",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "updateDecreaseOrder",
    values: [string, BigNumberish, BigNumberish, BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "updateIncreaseOrder",
    values: [string, BigNumberish, BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "validDecreaseOrderNotional",
    values: [string, string, string, boolean, BigNumberish, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "validateDecreaseOrderPrice",
    values: [string, BigNumberish, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "validateIncreaseOrderPrice",
    values: [string, BigNumberish, boolean]
  ): string;

  decodeFunctionResult(
    functionFragment: "cancelDecreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "cancelIncreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "createDecreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "createIncreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "decreaseOrderExecable",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "execDecreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "execIncreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getDecreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getDecreaseOrderCollateralToken",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getIncreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getIncreaseOrderCollateralToken",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "increaseOrderExecable",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "minExecFee", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "updateDecreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "updateIncreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "validDecreaseOrderNotional",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "validateDecreaseOrderPrice",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "validateIncreaseOrderPrice",
    data: BytesLike
  ): Result;

  events: {};
}

export class IFutureLimit extends BaseContract {
  connect(signerOrProvider: Signer | Provider | string): this;
  attach(addressOrName: string): this;
  deployed(): Promise<this>;

  listeners<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
  ): Array<TypedListener<EventArgsArray, EventArgsObject>>;
  off<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  on<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  once<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
  ): this;

  listeners(eventName?: string): Array<Listener>;
  off(eventName: string, listener: Listener): this;
  on(eventName: string, listener: Listener): this;
  once(eventName: string, listener: Listener): this;
  removeListener(eventName: string, listener: Listener): this;
  removeAllListeners(eventName?: string): this;

  queryFilter<EventArgsArray extends Array<any>, EventArgsObject>(
    event: TypedEventFilter<EventArgsArray, EventArgsObject>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEvent<EventArgsArray & EventArgsObject>>>;

  interface: IFutureLimitInterface;

  functions: {
    cancelDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    cancelIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _to: string,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    createDecreaseOrder(
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _minSizeDelta: BigNumberish,
      _maxSizeDelta: BigNumberish,
      _execFee: BigNumberish,
      createDecreaseOrder: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    createIncreaseOrder(
      _inToken: string,
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _sizeDelta: BigNumberish,
      _marginAmountIn: BigNumberish,
      _execFee: BigNumberish,
      _decreaseOrder: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    decreaseOrderExecable(
      account: string,
      orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    execDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _marginTo: string,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    execIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    getDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber
      ] & {
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        notionalDelta: BigNumber;
        minSizeDelta: BigNumber;
        maxSizeDelta: BigNumber;
        execFee: BigNumber;
      }
    >;

    getDecreaseOrderCollateralToken(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[string] & { collateralToken: string }>;

    getIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [
        string,
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber
      ] & {
        inToken: string;
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        marginDelta: BigNumber;
        notionalDelta: BigNumber;
        sizeDelta: BigNumber;
        execFee: BigNumber;
      }
    >;

    getIncreaseOrderCollateralToken(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[string] & { collateralToken: string }>;

    increaseOrderExecable(
      account: string,
      orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    minExecFee(overrides?: CallOverrides): Promise<[BigNumber]>;

    updateDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _notionalDelta: BigNumberish,
      _minSizeDelta: BigNumberish,
      _maxSizeDelta: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    updateIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _notionalDelta: BigNumberish,
      _sizeDelta: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    validDecreaseOrderNotional(
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    validateDecreaseOrderPrice(
      _account: string,
      _orderIndex: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<
      [boolean, boolean] & { takeProfitValid: boolean; stopLossValid: boolean }
    >;

    validateIncreaseOrderPrice(
      _account: string,
      _orderIndex: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<[boolean]>;
  };

  cancelDecreaseOrder(
    _account: string,
    _orderIndex: BigNumberish,
    _execFeeTo: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  cancelIncreaseOrder(
    _account: string,
    _orderIndex: BigNumberish,
    _to: string,
    _execFeeTo: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  createDecreaseOrder(
    _collateralToken: string,
    _indexToken: string,
    _account: string,
    _isLong: boolean,
    _notionalDelta: BigNumberish,
    _minSizeDelta: BigNumberish,
    _maxSizeDelta: BigNumberish,
    _execFee: BigNumberish,
    createDecreaseOrder: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  createIncreaseOrder(
    _inToken: string,
    _collateralToken: string,
    _indexToken: string,
    _account: string,
    _isLong: boolean,
    _notionalDelta: BigNumberish,
    _sizeDelta: BigNumberish,
    _marginAmountIn: BigNumberish,
    _execFee: BigNumberish,
    _decreaseOrder: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  decreaseOrderExecable(
    account: string,
    orderIndex: BigNumberish,
    overrides?: CallOverrides
  ): Promise<boolean>;

  execDecreaseOrder(
    _account: string,
    _orderIndex: BigNumberish,
    _marginTo: string,
    _execFeeTo: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  execIncreaseOrder(
    _account: string,
    _orderIndex: BigNumberish,
    _execFeeTo: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  getDecreaseOrder(
    _account: string,
    _orderIndex: BigNumberish,
    overrides?: CallOverrides
  ): Promise<
    [
      string,
      string,
      string,
      boolean,
      BigNumber,
      BigNumber,
      BigNumber,
      BigNumber
    ] & {
      collateralToken: string;
      indexToken: string;
      account: string;
      isLong: boolean;
      notionalDelta: BigNumber;
      minSizeDelta: BigNumber;
      maxSizeDelta: BigNumber;
      execFee: BigNumber;
    }
  >;

  getDecreaseOrderCollateralToken(
    _account: string,
    _orderIndex: BigNumberish,
    overrides?: CallOverrides
  ): Promise<string>;

  getIncreaseOrder(
    _account: string,
    _orderIndex: BigNumberish,
    overrides?: CallOverrides
  ): Promise<
    [
      string,
      string,
      string,
      string,
      boolean,
      BigNumber,
      BigNumber,
      BigNumber,
      BigNumber
    ] & {
      inToken: string;
      collateralToken: string;
      indexToken: string;
      account: string;
      isLong: boolean;
      marginDelta: BigNumber;
      notionalDelta: BigNumber;
      sizeDelta: BigNumber;
      execFee: BigNumber;
    }
  >;

  getIncreaseOrderCollateralToken(
    _account: string,
    _orderIndex: BigNumberish,
    overrides?: CallOverrides
  ): Promise<string>;

  increaseOrderExecable(
    account: string,
    orderIndex: BigNumberish,
    overrides?: CallOverrides
  ): Promise<boolean>;

  minExecFee(overrides?: CallOverrides): Promise<BigNumber>;

  updateDecreaseOrder(
    _account: string,
    _orderIndex: BigNumberish,
    _notionalDelta: BigNumberish,
    _minSizeDelta: BigNumberish,
    _maxSizeDelta: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  updateIncreaseOrder(
    _account: string,
    _orderIndex: BigNumberish,
    _notionalDelta: BigNumberish,
    _sizeDelta: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  validDecreaseOrderNotional(
    _collateralToken: string,
    _indexToken: string,
    _account: string,
    _isLong: boolean,
    _notionalDelta: BigNumberish,
    _raise: boolean,
    overrides?: CallOverrides
  ): Promise<boolean>;

  validateDecreaseOrderPrice(
    _account: string,
    _orderIndex: BigNumberish,
    _raise: boolean,
    overrides?: CallOverrides
  ): Promise<
    [boolean, boolean] & { takeProfitValid: boolean; stopLossValid: boolean }
  >;

  validateIncreaseOrderPrice(
    _account: string,
    _orderIndex: BigNumberish,
    _raise: boolean,
    overrides?: CallOverrides
  ): Promise<boolean>;

  callStatic: {
    cancelDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _execFeeTo: string,
      overrides?: CallOverrides
    ): Promise<void>;

    cancelIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _to: string,
      _execFeeTo: string,
      overrides?: CallOverrides
    ): Promise<void>;

    createDecreaseOrder(
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _minSizeDelta: BigNumberish,
      _maxSizeDelta: BigNumberish,
      _execFee: BigNumberish,
      createDecreaseOrder: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    createIncreaseOrder(
      _inToken: string,
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _sizeDelta: BigNumberish,
      _marginAmountIn: BigNumberish,
      _execFee: BigNumberish,
      _decreaseOrder: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    decreaseOrderExecable(
      account: string,
      orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<boolean>;

    execDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _marginTo: string,
      _execFeeTo: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    execIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _execFeeTo: string,
      overrides?: CallOverrides
    ): Promise<void>;

    getDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber
      ] & {
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        notionalDelta: BigNumber;
        minSizeDelta: BigNumber;
        maxSizeDelta: BigNumber;
        execFee: BigNumber;
      }
    >;

    getDecreaseOrderCollateralToken(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<string>;

    getIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [
        string,
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber
      ] & {
        inToken: string;
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        marginDelta: BigNumber;
        notionalDelta: BigNumber;
        sizeDelta: BigNumber;
        execFee: BigNumber;
      }
    >;

    getIncreaseOrderCollateralToken(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<string>;

    increaseOrderExecable(
      account: string,
      orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<boolean>;

    minExecFee(overrides?: CallOverrides): Promise<BigNumber>;

    updateDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _notionalDelta: BigNumberish,
      _minSizeDelta: BigNumberish,
      _maxSizeDelta: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    updateIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _notionalDelta: BigNumberish,
      _sizeDelta: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    validDecreaseOrderNotional(
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<boolean>;

    validateDecreaseOrderPrice(
      _account: string,
      _orderIndex: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<
      [boolean, boolean] & { takeProfitValid: boolean; stopLossValid: boolean }
    >;

    validateIncreaseOrderPrice(
      _account: string,
      _orderIndex: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<boolean>;
  };

  filters: {};

  estimateGas: {
    cancelDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    cancelIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _to: string,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    createDecreaseOrder(
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _minSizeDelta: BigNumberish,
      _maxSizeDelta: BigNumberish,
      _execFee: BigNumberish,
      createDecreaseOrder: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    createIncreaseOrder(
      _inToken: string,
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _sizeDelta: BigNumberish,
      _marginAmountIn: BigNumberish,
      _execFee: BigNumberish,
      _decreaseOrder: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    decreaseOrderExecable(
      account: string,
      orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    execDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _marginTo: string,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    execIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    getDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getDecreaseOrderCollateralToken(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    getIncreaseOrderCollateralToken(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    increaseOrderExecable(
      account: string,
      orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    minExecFee(overrides?: CallOverrides): Promise<BigNumber>;

    updateDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _notionalDelta: BigNumberish,
      _minSizeDelta: BigNumberish,
      _maxSizeDelta: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    updateIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _notionalDelta: BigNumberish,
      _sizeDelta: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    validDecreaseOrderNotional(
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    validateDecreaseOrderPrice(
      _account: string,
      _orderIndex: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    validateIncreaseOrderPrice(
      _account: string,
      _orderIndex: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    cancelDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    cancelIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _to: string,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    createDecreaseOrder(
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _minSizeDelta: BigNumberish,
      _maxSizeDelta: BigNumberish,
      _execFee: BigNumberish,
      createDecreaseOrder: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    createIncreaseOrder(
      _inToken: string,
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _sizeDelta: BigNumberish,
      _marginAmountIn: BigNumberish,
      _execFee: BigNumberish,
      _decreaseOrder: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    decreaseOrderExecable(
      account: string,
      orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    execDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _marginTo: string,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    execIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _execFeeTo: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    getDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getDecreaseOrderCollateralToken(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    getIncreaseOrderCollateralToken(
      _account: string,
      _orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    increaseOrderExecable(
      account: string,
      orderIndex: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    minExecFee(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    updateDecreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _notionalDelta: BigNumberish,
      _minSizeDelta: BigNumberish,
      _maxSizeDelta: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    updateIncreaseOrder(
      _account: string,
      _orderIndex: BigNumberish,
      _notionalDelta: BigNumberish,
      _sizeDelta: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    validDecreaseOrderNotional(
      _collateralToken: string,
      _indexToken: string,
      _account: string,
      _isLong: boolean,
      _notionalDelta: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    validateDecreaseOrderPrice(
      _account: string,
      _orderIndex: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    validateIncreaseOrderPrice(
      _account: string,
      _orderIndex: BigNumberish,
      _raise: boolean,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;
  };
}
