/* 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 FutureLimitInterface 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,bool,uint256,uint256,uint256,uint256,uint256)": FunctionFragment;
    "decreaseOrderExecable(address,uint256)": FunctionFragment;
    "decreaseOrderExists(address,uint256)": FunctionFragment;
    "decreaseOrderIndexes(address)": FunctionFragment;
    "decreaseOrders(address,uint256)": FunctionFragment;
    "execDecreaseOrder(address,uint256,address,address)": FunctionFragment;
    "execIncreaseOrder(address,uint256,address)": FunctionFragment;
    "future()": FunctionFragment;
    "getDecreaseOrder(address,uint256)": FunctionFragment;
    "getDecreaseOrderCollateralToken(address,uint256)": FunctionFragment;
    "getIncreaseOrder(address,uint256)": FunctionFragment;
    "getIncreaseOrderCollateralToken(address,uint256)": FunctionFragment;
    "increaseOrderExecable(address,uint256)": FunctionFragment;
    "increaseOrderExists(address,uint256)": FunctionFragment;
    "increaseOrderIndexes(address)": FunctionFragment;
    "increaseOrders(address,uint256)": FunctionFragment;
    "minExecFee()": FunctionFragment;
    "owner()": FunctionFragment;
    "renounceOwnership()": FunctionFragment;
    "setMinExecFee(uint256)": FunctionFragment;
    "setSystemRouter(address,bool)": FunctionFragment;
    "systemRouters(address)": FunctionFragment;
    "tokenBalances(address)": FunctionFragment;
    "transferOwnership(address)": 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,
      boolean,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "decreaseOrderExecable",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "decreaseOrderExists",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "decreaseOrderIndexes",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "decreaseOrders",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "execDecreaseOrder",
    values: [string, BigNumberish, string, string]
  ): string;
  encodeFunctionData(
    functionFragment: "execIncreaseOrder",
    values: [string, BigNumberish, string]
  ): string;
  encodeFunctionData(functionFragment: "future", values?: undefined): 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: "increaseOrderExists",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "increaseOrderIndexes",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "increaseOrders",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "minExecFee",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "owner", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "renounceOwnership",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "setMinExecFee",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "setSystemRouter",
    values: [string, boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "systemRouters",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "tokenBalances",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "transferOwnership",
    values: [string]
  ): 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: "decreaseOrderExists",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "decreaseOrderIndexes",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "decreaseOrders",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "execDecreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "execIncreaseOrder",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "future", 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: "increaseOrderExists",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "increaseOrderIndexes",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "increaseOrders",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "minExecFee", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "renounceOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setMinExecFee",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setSystemRouter",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "systemRouters",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "tokenBalances",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "transferOwnership",
    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: {
    "CancelDecreaseOrder(address,uint256)": EventFragment;
    "CancelIncreaseOrder(address,uint256)": EventFragment;
    "CreateDecreaseOrder(address,uint256)": EventFragment;
    "CreateIncreaseOrder(address,uint256)": EventFragment;
    "EditDecreaseOrder(address,uint256)": EventFragment;
    "EditIncreaseOrder(address,uint256)": EventFragment;
    "ExecDecreaseOrder(address,uint256)": EventFragment;
    "ExecIncreaseOrder(address,uint256)": EventFragment;
    "OwnershipTransferred(address,address)": EventFragment;
    "SetMinExecFee(uint256)": EventFragment;
    "SetSystemRouter(address,bool)": EventFragment;
    "UpdateDecreaseOrder(address,address,address,bool,uint256,uint256,uint256,uint256,uint256,uint8,uint8,uint8,uint256,bool)": EventFragment;
    "UpdateIncreaseOrder(address,address,address,bool,uint256,uint256,uint256,uint256,uint256,uint8,uint8,uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "CancelDecreaseOrder"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "CancelIncreaseOrder"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "CreateDecreaseOrder"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "CreateIncreaseOrder"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "EditDecreaseOrder"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "EditIncreaseOrder"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ExecDecreaseOrder"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ExecIncreaseOrder"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetMinExecFee"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetSystemRouter"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "UpdateDecreaseOrder"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "UpdateIncreaseOrder"): EventFragment;
}

export type CancelDecreaseOrderEvent = TypedEvent<
  [string, BigNumber] & { account: string; orderIndex: BigNumber }
>;

export type CancelIncreaseOrderEvent = TypedEvent<
  [string, BigNumber] & { account: string; orderIndex: BigNumber }
>;

export type CreateDecreaseOrderEvent = TypedEvent<
  [string, BigNumber] & { account: string; orderIndex: BigNumber }
>;

export type CreateIncreaseOrderEvent = TypedEvent<
  [string, BigNumber] & { account: string; orderIndex: BigNumber }
>;

export type EditDecreaseOrderEvent = TypedEvent<
  [string, BigNumber] & { account: string; orderIndex: BigNumber }
>;

export type EditIncreaseOrderEvent = TypedEvent<
  [string, BigNumber] & { account: string; orderIndex: BigNumber }
>;

export type ExecDecreaseOrderEvent = TypedEvent<
  [string, BigNumber] & { account: string; orderIndex: BigNumber }
>;

export type ExecIncreaseOrderEvent = TypedEvent<
  [string, BigNumber] & { account: string; orderIndex: BigNumber }
>;

export type OwnershipTransferredEvent = TypedEvent<
  [string, string] & { previousOwner: string; newOwner: string }
>;

export type SetMinExecFeeEvent = TypedEvent<
  [BigNumber] & { _minExecFee: BigNumber }
>;

export type SetSystemRouterEvent = TypedEvent<
  [string, boolean] & { router: string; enable: boolean }
>;

export type UpdateDecreaseOrderEvent = TypedEvent<
  [
    string,
    string,
    string,
    boolean,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    number,
    number,
    number,
    BigNumber,
    boolean
  ] & {
    collateralToken: string;
    indexToken: string;
    account: string;
    isLong: boolean;
    notionalDelta: BigNumber;
    minSizeDelta: BigNumber;
    maxSizeDelta: BigNumber;
    execFee: BigNumber;
    orderIndex: BigNumber;
    operation: number;
    execStatus: number;
    execType: number;
    sizeDelta: BigNumber;
    isActive: boolean;
  }
>;

export type UpdateIncreaseOrderEvent = TypedEvent<
  [
    string,
    string,
    string,
    boolean,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    number,
    number,
    BigNumber
  ] & {
    collateralToken: string;
    indexToken: string;
    account: string;
    isLong: boolean;
    marginDelta: BigNumber;
    notionalDelta: BigNumber;
    sizeDelta: BigNumber;
    execFee: BigNumber;
    orderIndex: BigNumber;
    operation: number;
    execStatus: number;
    increaseOrder: BigNumber;
  }
>;

export class FutureLimit 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: FutureLimitInterface;

  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,
      _sizeDelta: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    createIncreaseOrder(
      _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]>;

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

    decreaseOrderIndexes(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    decreaseOrders(
      arg0: string,
      arg1: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        boolean,
        BigNumber
      ] & {
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        notionalDelta: BigNumber;
        minSizeDelta: BigNumber;
        maxSizeDelta: BigNumber;
        execFee: BigNumber;
        sizeDelta: BigNumber;
        isActive: boolean;
        increaseOrder: BigNumber;
      }
    >;

    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>;

    future(overrides?: CallOverrides): Promise<[string]>;

    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,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber
      ] & {
        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]>;

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

    increaseOrderIndexes(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    increaseOrders(
      arg0: string,
      arg1: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        number
      ] & {
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        marginDelta: BigNumber;
        notionalDelta: BigNumber;
        sizeDelta: BigNumber;
        execFee: BigNumber;
        decreaseOrder: BigNumber;
        orderType: number;
      }
    >;

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

    owner(overrides?: CallOverrides): Promise<[string]>;

    renounceOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    setMinExecFee(
      _minExecFee: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    setSystemRouter(
      router: string,
      enable: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    systemRouters(arg0: string, overrides?: CallOverrides): Promise<[boolean]>;

    tokenBalances(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    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,
    _sizeDelta: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  createIncreaseOrder(
    _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>;

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

  decreaseOrderIndexes(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  decreaseOrders(
    arg0: string,
    arg1: BigNumberish,
    overrides?: CallOverrides
  ): Promise<
    [
      string,
      string,
      string,
      boolean,
      BigNumber,
      BigNumber,
      BigNumber,
      BigNumber,
      BigNumber,
      boolean,
      BigNumber
    ] & {
      collateralToken: string;
      indexToken: string;
      account: string;
      isLong: boolean;
      notionalDelta: BigNumber;
      minSizeDelta: BigNumber;
      maxSizeDelta: BigNumber;
      execFee: BigNumber;
      sizeDelta: BigNumber;
      isActive: boolean;
      increaseOrder: BigNumber;
    }
  >;

  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>;

  future(overrides?: CallOverrides): Promise<string>;

  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,
      boolean,
      BigNumber,
      BigNumber,
      BigNumber,
      BigNumber
    ] & {
      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>;

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

  increaseOrderIndexes(
    arg0: string,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  increaseOrders(
    arg0: string,
    arg1: BigNumberish,
    overrides?: CallOverrides
  ): Promise<
    [
      string,
      string,
      string,
      boolean,
      BigNumber,
      BigNumber,
      BigNumber,
      BigNumber,
      BigNumber,
      number
    ] & {
      collateralToken: string;
      indexToken: string;
      account: string;
      isLong: boolean;
      marginDelta: BigNumber;
      notionalDelta: BigNumber;
      sizeDelta: BigNumber;
      execFee: BigNumber;
      decreaseOrder: BigNumber;
      orderType: number;
    }
  >;

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

  owner(overrides?: CallOverrides): Promise<string>;

  renounceOwnership(
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  setMinExecFee(
    _minExecFee: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  setSystemRouter(
    router: string,
    enable: boolean,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  systemRouters(arg0: string, overrides?: CallOverrides): Promise<boolean>;

  tokenBalances(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

  transferOwnership(
    newOwner: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  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,
      _sizeDelta: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    createIncreaseOrder(
      _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>;

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

    decreaseOrderIndexes(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    decreaseOrders(
      arg0: string,
      arg1: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        boolean,
        BigNumber
      ] & {
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        notionalDelta: BigNumber;
        minSizeDelta: BigNumber;
        maxSizeDelta: BigNumber;
        execFee: BigNumber;
        sizeDelta: BigNumber;
        isActive: boolean;
        increaseOrder: BigNumber;
      }
    >;

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

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

    future(overrides?: CallOverrides): Promise<string>;

    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,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber
      ] & {
        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>;

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

    increaseOrderIndexes(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    increaseOrders(
      arg0: string,
      arg1: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        number
      ] & {
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        marginDelta: BigNumber;
        notionalDelta: BigNumber;
        sizeDelta: BigNumber;
        execFee: BigNumber;
        decreaseOrder: BigNumber;
        orderType: number;
      }
    >;

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

    owner(overrides?: CallOverrides): Promise<string>;

    renounceOwnership(overrides?: CallOverrides): Promise<void>;

    setMinExecFee(
      _minExecFee: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    setSystemRouter(
      router: string,
      enable: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    systemRouters(arg0: string, overrides?: CallOverrides): Promise<boolean>;

    tokenBalances(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

    transferOwnership(
      newOwner: string,
      overrides?: CallOverrides
    ): Promise<void>;

    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: {
    "CancelDecreaseOrder(address,uint256)"(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    CancelDecreaseOrder(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    "CancelIncreaseOrder(address,uint256)"(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    CancelIncreaseOrder(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    "CreateDecreaseOrder(address,uint256)"(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    CreateDecreaseOrder(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    "CreateIncreaseOrder(address,uint256)"(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    CreateIncreaseOrder(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    "EditDecreaseOrder(address,uint256)"(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    EditDecreaseOrder(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    "EditIncreaseOrder(address,uint256)"(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    EditIncreaseOrder(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    "ExecDecreaseOrder(address,uint256)"(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    ExecDecreaseOrder(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    "ExecIncreaseOrder(address,uint256)"(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    ExecIncreaseOrder(
      account?: null,
      orderIndex?: null
    ): TypedEventFilter<
      [string, BigNumber],
      { account: string; orderIndex: BigNumber }
    >;

    "OwnershipTransferred(address,address)"(
      previousOwner?: string | null,
      newOwner?: string | null
    ): TypedEventFilter<
      [string, string],
      { previousOwner: string; newOwner: string }
    >;

    OwnershipTransferred(
      previousOwner?: string | null,
      newOwner?: string | null
    ): TypedEventFilter<
      [string, string],
      { previousOwner: string; newOwner: string }
    >;

    "SetMinExecFee(uint256)"(
      _minExecFee?: null
    ): TypedEventFilter<[BigNumber], { _minExecFee: BigNumber }>;

    SetMinExecFee(
      _minExecFee?: null
    ): TypedEventFilter<[BigNumber], { _minExecFee: BigNumber }>;

    "SetSystemRouter(address,bool)"(
      router?: null,
      enable?: null
    ): TypedEventFilter<[string, boolean], { router: string; enable: boolean }>;

    SetSystemRouter(
      router?: null,
      enable?: null
    ): TypedEventFilter<[string, boolean], { router: string; enable: boolean }>;

    "UpdateDecreaseOrder(address,address,address,bool,uint256,uint256,uint256,uint256,uint256,uint8,uint8,uint8,uint256,bool)"(
      collateralToken?: null,
      indexToken?: null,
      account?: string | null,
      isLong?: null,
      notionalDelta?: null,
      minSizeDelta?: null,
      maxSizeDelta?: null,
      execFee?: null,
      orderIndex?: null,
      operation?: null,
      execStatus?: null,
      execType?: null,
      sizeDelta?: null,
      isActive?: null
    ): TypedEventFilter<
      [
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        number,
        number,
        number,
        BigNumber,
        boolean
      ],
      {
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        notionalDelta: BigNumber;
        minSizeDelta: BigNumber;
        maxSizeDelta: BigNumber;
        execFee: BigNumber;
        orderIndex: BigNumber;
        operation: number;
        execStatus: number;
        execType: number;
        sizeDelta: BigNumber;
        isActive: boolean;
      }
    >;

    UpdateDecreaseOrder(
      collateralToken?: null,
      indexToken?: null,
      account?: string | null,
      isLong?: null,
      notionalDelta?: null,
      minSizeDelta?: null,
      maxSizeDelta?: null,
      execFee?: null,
      orderIndex?: null,
      operation?: null,
      execStatus?: null,
      execType?: null,
      sizeDelta?: null,
      isActive?: null
    ): TypedEventFilter<
      [
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        number,
        number,
        number,
        BigNumber,
        boolean
      ],
      {
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        notionalDelta: BigNumber;
        minSizeDelta: BigNumber;
        maxSizeDelta: BigNumber;
        execFee: BigNumber;
        orderIndex: BigNumber;
        operation: number;
        execStatus: number;
        execType: number;
        sizeDelta: BigNumber;
        isActive: boolean;
      }
    >;

    "UpdateIncreaseOrder(address,address,address,bool,uint256,uint256,uint256,uint256,uint256,uint8,uint8,uint256)"(
      collateralToken?: null,
      indexToken?: null,
      account?: string | null,
      isLong?: null,
      marginDelta?: null,
      notionalDelta?: null,
      sizeDelta?: null,
      execFee?: null,
      orderIndex?: null,
      operation?: null,
      execStatus?: null,
      increaseOrder?: null
    ): TypedEventFilter<
      [
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        number,
        number,
        BigNumber
      ],
      {
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        marginDelta: BigNumber;
        notionalDelta: BigNumber;
        sizeDelta: BigNumber;
        execFee: BigNumber;
        orderIndex: BigNumber;
        operation: number;
        execStatus: number;
        increaseOrder: BigNumber;
      }
    >;

    UpdateIncreaseOrder(
      collateralToken?: null,
      indexToken?: null,
      account?: string | null,
      isLong?: null,
      marginDelta?: null,
      notionalDelta?: null,
      sizeDelta?: null,
      execFee?: null,
      orderIndex?: null,
      operation?: null,
      execStatus?: null,
      increaseOrder?: null
    ): TypedEventFilter<
      [
        string,
        string,
        string,
        boolean,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        BigNumber,
        number,
        number,
        BigNumber
      ],
      {
        collateralToken: string;
        indexToken: string;
        account: string;
        isLong: boolean;
        marginDelta: BigNumber;
        notionalDelta: BigNumber;
        sizeDelta: BigNumber;
        execFee: BigNumber;
        orderIndex: BigNumber;
        operation: number;
        execStatus: number;
        increaseOrder: BigNumber;
      }
    >;
  };

  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,
      _sizeDelta: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    createIncreaseOrder(
      _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>;

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

    decreaseOrderIndexes(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    decreaseOrders(
      arg0: string,
      arg1: 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>;

    future(overrides?: CallOverrides): 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>;

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

    increaseOrderIndexes(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    increaseOrders(
      arg0: string,
      arg1: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

    renounceOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    setMinExecFee(
      _minExecFee: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    setSystemRouter(
      router: string,
      enable: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    systemRouters(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

    tokenBalances(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;

    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): 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,
      _sizeDelta: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    createIncreaseOrder(
      _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>;

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

    decreaseOrderIndexes(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    decreaseOrders(
      arg0: string,
      arg1: 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>;

    future(overrides?: CallOverrides): 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>;

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

    increaseOrderIndexes(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    increaseOrders(
      arg0: string,
      arg1: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

    renounceOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    setMinExecFee(
      _minExecFee: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    setSystemRouter(
      router: string,
      enable: boolean,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    systemRouters(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    tokenBalances(
      arg0: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    transferOwnership(
      newOwner: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): 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>;
  };
}
