import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers";
import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
export interface OpenleverageFactoryInterface extends utils.Interface {
    functions: {
        "acceptAdmin()": FunctionFragment;
        "activeTrades(address,uint16,bool)": FunctionFragment;
        "addressConfig()": FunctionFragment;
        "admin()": FunctionFragment;
        "allowedDepositTokens(address)": FunctionFragment;
        "calculateConfig()": FunctionFragment;
        "developer()": FunctionFragment;
        "implementation()": FunctionFragment;
        "markets(uint16)": FunctionFragment;
        "numPairs()": FunctionFragment;
        "pendingAdmin()": FunctionFragment;
        "setPendingAdmin(address)": FunctionFragment;
        "supportDexs(uint8)": FunctionFragment;
        "taxes(uint16,address,uint256)": FunctionFragment;
        "totalHelds(address)": FunctionFragment;
        "initialize(address,address,address[],address,address,uint8[])": FunctionFragment;
        "addMarket(address,address,uint16,bytes)": FunctionFragment;
        "marginTrade(uint16,bool,bool,uint256,uint256,uint256,bytes)": FunctionFragment;
        "closeTrade(uint16,bool,uint256,uint256,bytes)": FunctionFragment;
        "liquidate(address,uint16,bool,uint256,uint256,bytes)": FunctionFragment;
        "marginRatio(address,uint16,bool,bytes)": FunctionFragment;
        "shouldUpdatePrice(uint16,bytes)": FunctionFragment;
        "updatePrice(uint16,bytes)": FunctionFragment;
        "getMarketSupportDexs(uint16)": FunctionFragment;
        "setCalculateConfig(uint16,uint8,uint16,uint16,uint16,uint16,uint128,uint16,uint8,uint16)": FunctionFragment;
        "setAddressConfig(address,address)": FunctionFragment;
        "setMarketConfig(uint16,uint16,uint16,uint16,uint32[])": FunctionFragment;
        "moveInsurance(uint16,uint8,address,uint256)": FunctionFragment;
        "setSupportDex(uint8,bool)": FunctionFragment;
        "setTaxRate(uint16,address,uint256,uint24)": FunctionFragment;
    };
    getFunction(nameOrSignatureOrTopic: "acceptAdmin" | "activeTrades" | "addressConfig" | "admin" | "allowedDepositTokens" | "calculateConfig" | "developer" | "implementation" | "markets" | "numPairs" | "pendingAdmin" | "setPendingAdmin" | "supportDexs" | "taxes" | "totalHelds" | "initialize" | "addMarket" | "marginTrade" | "closeTrade" | "liquidate" | "marginRatio" | "shouldUpdatePrice" | "updatePrice" | "getMarketSupportDexs" | "setCalculateConfig" | "setAddressConfig" | "setMarketConfig" | "moveInsurance" | "setSupportDex" | "setTaxRate"): FunctionFragment;
    encodeFunctionData(functionFragment: "acceptAdmin", values?: undefined): string;
    encodeFunctionData(functionFragment: "activeTrades", values: [string, BigNumberish, boolean]): string;
    encodeFunctionData(functionFragment: "addressConfig", values?: undefined): string;
    encodeFunctionData(functionFragment: "admin", values?: undefined): string;
    encodeFunctionData(functionFragment: "allowedDepositTokens", values: [string]): string;
    encodeFunctionData(functionFragment: "calculateConfig", values?: undefined): string;
    encodeFunctionData(functionFragment: "developer", values?: undefined): string;
    encodeFunctionData(functionFragment: "implementation", values?: undefined): string;
    encodeFunctionData(functionFragment: "markets", values: [BigNumberish]): string;
    encodeFunctionData(functionFragment: "numPairs", values?: undefined): string;
    encodeFunctionData(functionFragment: "pendingAdmin", values?: undefined): string;
    encodeFunctionData(functionFragment: "setPendingAdmin", values: [string]): string;
    encodeFunctionData(functionFragment: "supportDexs", values: [BigNumberish]): string;
    encodeFunctionData(functionFragment: "taxes", values: [BigNumberish, string, BigNumberish]): string;
    encodeFunctionData(functionFragment: "totalHelds", values: [string]): string;
    encodeFunctionData(functionFragment: "initialize", values: [string, string, string[], string, string, BigNumberish[]]): string;
    encodeFunctionData(functionFragment: "addMarket", values: [string, string, BigNumberish, BytesLike]): string;
    encodeFunctionData(functionFragment: "marginTrade", values: [
        BigNumberish,
        boolean,
        boolean,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BytesLike
    ]): string;
    encodeFunctionData(functionFragment: "closeTrade", values: [BigNumberish, boolean, BigNumberish, BigNumberish, BytesLike]): string;
    encodeFunctionData(functionFragment: "liquidate", values: [
        string,
        BigNumberish,
        boolean,
        BigNumberish,
        BigNumberish,
        BytesLike
    ]): string;
    encodeFunctionData(functionFragment: "marginRatio", values: [string, BigNumberish, boolean, BytesLike]): string;
    encodeFunctionData(functionFragment: "shouldUpdatePrice", values: [BigNumberish, BytesLike]): string;
    encodeFunctionData(functionFragment: "updatePrice", values: [BigNumberish, BytesLike]): string;
    encodeFunctionData(functionFragment: "getMarketSupportDexs", values: [BigNumberish]): string;
    encodeFunctionData(functionFragment: "setCalculateConfig", values: [
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish
    ]): string;
    encodeFunctionData(functionFragment: "setAddressConfig", values: [string, string]): string;
    encodeFunctionData(functionFragment: "setMarketConfig", values: [
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish,
        BigNumberish[]
    ]): string;
    encodeFunctionData(functionFragment: "moveInsurance", values: [BigNumberish, BigNumberish, string, BigNumberish]): string;
    encodeFunctionData(functionFragment: "setSupportDex", values: [BigNumberish, boolean]): string;
    encodeFunctionData(functionFragment: "setTaxRate", values: [BigNumberish, string, BigNumberish, BigNumberish]): string;
    decodeFunctionResult(functionFragment: "acceptAdmin", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "activeTrades", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "addressConfig", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "allowedDepositTokens", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "calculateConfig", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "developer", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "implementation", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "markets", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "numPairs", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "pendingAdmin", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "setPendingAdmin", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "supportDexs", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "taxes", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "totalHelds", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "addMarket", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "marginTrade", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "closeTrade", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "liquidate", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "marginRatio", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "shouldUpdatePrice", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "updatePrice", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "getMarketSupportDexs", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "setCalculateConfig", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "setAddressConfig", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "setMarketConfig", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "moveInsurance", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "setSupportDex", data: BytesLike): Result;
    decodeFunctionResult(functionFragment: "setTaxRate", data: BytesLike): Result;
    events: {
        "ChangeAllowedDepositTokens(address[],bool)": EventFragment;
        "Liquidation(address,uint16,bool,bool,uint256,uint256,address,uint256,uint256,uint256,uint256,uint256,uint32)": EventFragment;
        "MarginTrade(address,uint16,bool,bool,uint256,uint256,uint256,uint256,uint256,uint32)": EventFragment;
        "NewAddressConfig(address,address)": EventFragment;
        "NewAdmin(address,address)": EventFragment;
        "NewCalculateConfig(uint16,uint8,uint16,uint16,uint16,uint16,uint128,uint16,uint8,uint16)": EventFragment;
        "NewMarketConfig(uint16,uint16,uint32,uint16,uint32[])": EventFragment;
        "NewPendingAdmin(address,address)": EventFragment;
        "TradeClosed(address,uint16,bool,bool,uint256,uint256,uint256,uint256,uint256,uint32)": EventFragment;
    };
    getEvent(nameOrSignatureOrTopic: "ChangeAllowedDepositTokens"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "Liquidation"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "MarginTrade"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "NewAddressConfig"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "NewCalculateConfig"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "NewMarketConfig"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment;
    getEvent(nameOrSignatureOrTopic: "TradeClosed"): EventFragment;
}
export interface ChangeAllowedDepositTokensEventObject {
    token: string[];
    allowed: boolean;
}
export declare type ChangeAllowedDepositTokensEvent = TypedEvent<[
    string[],
    boolean
], ChangeAllowedDepositTokensEventObject>;
export declare type ChangeAllowedDepositTokensEventFilter = TypedEventFilter<ChangeAllowedDepositTokensEvent>;
export interface LiquidationEventObject {
    owner: string;
    marketId: number;
    longToken: boolean;
    depositToken: boolean;
    liquidationAmount: BigNumber;
    outstandingAmount: BigNumber;
    liquidator: string;
    depositDecrease: BigNumber;
    depositReturn: BigNumber;
    fees: BigNumber;
    token0Price: BigNumber;
    penalty: BigNumber;
    dex: number;
}
export declare type LiquidationEvent = TypedEvent<[
    string,
    number,
    boolean,
    boolean,
    BigNumber,
    BigNumber,
    string,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    number
], LiquidationEventObject>;
export declare type LiquidationEventFilter = TypedEventFilter<LiquidationEvent>;
export interface MarginTradeEventObject {
    trader: string;
    marketId: number;
    longToken: boolean;
    depositToken: boolean;
    deposited: BigNumber;
    borrowed: BigNumber;
    held: BigNumber;
    fees: BigNumber;
    token0Price: BigNumber;
    dex: number;
}
export declare type MarginTradeEvent = TypedEvent<[
    string,
    number,
    boolean,
    boolean,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    number
], MarginTradeEventObject>;
export declare type MarginTradeEventFilter = TypedEventFilter<MarginTradeEvent>;
export interface NewAddressConfigEventObject {
    controller: string;
    dexAggregator: string;
}
export declare type NewAddressConfigEvent = TypedEvent<[
    string,
    string
], NewAddressConfigEventObject>;
export declare type NewAddressConfigEventFilter = TypedEventFilter<NewAddressConfigEvent>;
export interface NewAdminEventObject {
    oldAdmin: string;
    newAdmin: string;
}
export declare type NewAdminEvent = TypedEvent<[string, string], NewAdminEventObject>;
export declare type NewAdminEventFilter = TypedEventFilter<NewAdminEvent>;
export interface NewCalculateConfigEventObject {
    defaultFeesRate: number;
    insuranceRatio: number;
    defaultMarginLimit: number;
    priceDiffientRatio: number;
    updatePriceDiscount: number;
    feesDiscount: number;
    feesDiscountThreshold: BigNumber;
    penaltyRatio: number;
    maxLiquidationPriceDiffientRatio: number;
    twapDuration: number;
}
export declare type NewCalculateConfigEvent = TypedEvent<[
    number,
    number,
    number,
    number,
    number,
    number,
    BigNumber,
    number,
    number,
    number
], NewCalculateConfigEventObject>;
export declare type NewCalculateConfigEventFilter = TypedEventFilter<NewCalculateConfigEvent>;
export interface NewMarketConfigEventObject {
    marketId: number;
    feesRate: number;
    marginLimit: number;
    priceDiffientRatio: number;
    dexs: number[];
}
export declare type NewMarketConfigEvent = TypedEvent<[
    number,
    number,
    number,
    number,
    number[]
], NewMarketConfigEventObject>;
export declare type NewMarketConfigEventFilter = TypedEventFilter<NewMarketConfigEvent>;
export interface NewPendingAdminEventObject {
    oldPendingAdmin: string;
    newPendingAdmin: string;
}
export declare type NewPendingAdminEvent = TypedEvent<[
    string,
    string
], NewPendingAdminEventObject>;
export declare type NewPendingAdminEventFilter = TypedEventFilter<NewPendingAdminEvent>;
export interface TradeClosedEventObject {
    owner: string;
    marketId: number;
    longToken: boolean;
    depositToken: boolean;
    closeAmount: BigNumber;
    depositDecrease: BigNumber;
    depositReturn: BigNumber;
    fees: BigNumber;
    token0Price: BigNumber;
    dex: number;
}
export declare type TradeClosedEvent = TypedEvent<[
    string,
    number,
    boolean,
    boolean,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    number
], TradeClosedEventObject>;
export declare type TradeClosedEventFilter = TypedEventFilter<TradeClosedEvent>;
export interface OpenleverageFactory extends BaseContract {
    connect(signerOrProvider: Signer | Provider | string): this;
    attach(addressOrName: string): this;
    deployed(): Promise<this>;
    interface: OpenleverageFactoryInterface;
    queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
    listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
    listeners(eventName?: string): Array<Listener>;
    removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
    removeAllListeners(eventName?: string): this;
    off: OnEvent<this>;
    on: OnEvent<this>;
    once: OnEvent<this>;
    removeListener: OnEvent<this>;
    functions: {
        acceptAdmin(overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        activeTrades(arg0: string, arg1: BigNumberish, arg2: boolean, overrides?: CallOverrides): Promise<[
            BigNumber,
            BigNumber,
            boolean,
            BigNumber
        ] & {
            deposited: BigNumber;
            held: BigNumber;
            depositToken: boolean;
            lastBlockNum: BigNumber;
        }>;
        addressConfig(overrides?: CallOverrides): Promise<[
            string,
            string,
            string,
            string
        ] & {
            dexAggregator: string;
            controller: string;
            wETH: string;
            xOLE: string;
        }>;
        admin(overrides?: CallOverrides): Promise<[string]>;
        allowedDepositTokens(arg0: string, overrides?: CallOverrides): Promise<[boolean]>;
        calculateConfig(overrides?: CallOverrides): Promise<[
            number,
            number,
            number,
            number,
            number,
            number,
            BigNumber,
            number,
            number,
            number
        ] & {
            defaultFeesRate: number;
            insuranceRatio: number;
            defaultMarginLimit: number;
            priceDiffientRatio: number;
            updatePriceDiscount: number;
            feesDiscount: number;
            feesDiscountThreshold: BigNumber;
            penaltyRatio: number;
            maxLiquidationPriceDiffientRatio: number;
            twapDuration: number;
        }>;
        developer(overrides?: CallOverrides): Promise<[string]>;
        implementation(overrides?: CallOverrides): Promise<[string]>;
        markets(arg0: BigNumberish, overrides?: CallOverrides): Promise<[
            string,
            string,
            string,
            string,
            number,
            number,
            number,
            string,
            BigNumber,
            BigNumber
        ] & {
            pool0: string;
            pool1: string;
            token0: string;
            token1: string;
            marginLimit: number;
            feesRate: number;
            priceDiffientRatio: number;
            priceUpdater: string;
            pool0Insurance: BigNumber;
            pool1Insurance: BigNumber;
        }>;
        numPairs(overrides?: CallOverrides): Promise<[number]>;
        pendingAdmin(overrides?: CallOverrides): Promise<[string]>;
        setPendingAdmin(newPendingAdmin: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        supportDexs(arg0: BigNumberish, overrides?: CallOverrides): Promise<[boolean]>;
        taxes(arg0: BigNumberish, arg1: string, arg2: BigNumberish, overrides?: CallOverrides): Promise<[number]>;
        totalHelds(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>;
        initialize(_controller: string, _dexAggregator: string, depositTokens: string[], _wETH: string, _xOLE: string, _supportDexs: BigNumberish[], overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        addMarket(pool0: string, pool1: string, marginLimit: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        marginTrade(marketId: BigNumberish, longToken: boolean, depositToken: boolean, deposit: BigNumberish, borrow: BigNumberish, minBuyAmount: BigNumberish, dexData: BytesLike, overrides?: PayableOverrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        closeTrade(marketId: BigNumberish, longToken: boolean, closeHeld: BigNumberish, minOrMaxAmount: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        liquidate(owner: string, marketId: BigNumberish, longToken: boolean, minBuy: BigNumberish, maxSell: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        marginRatio(owner: string, marketId: BigNumberish, longToken: boolean, dexData: BytesLike, overrides?: CallOverrides): Promise<[
            BigNumber,
            BigNumber,
            BigNumber,
            number
        ] & {
            current: BigNumber;
            cAvg: BigNumber;
            hAvg: BigNumber;
            limit: number;
        }>;
        shouldUpdatePrice(marketId: BigNumberish, dexData: BytesLike, overrides?: CallOverrides): Promise<[boolean]>;
        updatePrice(marketId: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        getMarketSupportDexs(marketId: BigNumberish, overrides?: CallOverrides): Promise<[number[]]>;
        setCalculateConfig(defaultFeesRate: BigNumberish, insuranceRatio: BigNumberish, defaultMarginLimit: BigNumberish, priceDiffientRatio: BigNumberish, updatePriceDiscount: BigNumberish, feesDiscount: BigNumberish, feesDiscountThreshold: BigNumberish, penaltyRatio: BigNumberish, maxLiquidationPriceDiffientRatio: BigNumberish, twapDuration: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        setAddressConfig(controller: string, dexAggregator: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        setMarketConfig(marketId: BigNumberish, feesRate: BigNumberish, marginLimit: BigNumberish, priceDiffientRatio: BigNumberish, dexs: BigNumberish[], overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        moveInsurance(marketId: BigNumberish, poolIndex: BigNumberish, to: string, amount: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        setSupportDex(dex: BigNumberish, support: boolean, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
        setTaxRate(marketId: BigNumberish, token: string, index: BigNumberish, tax: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<ContractTransaction>;
    };
    acceptAdmin(overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    activeTrades(arg0: string, arg1: BigNumberish, arg2: boolean, overrides?: CallOverrides): Promise<[
        BigNumber,
        BigNumber,
        boolean,
        BigNumber
    ] & {
        deposited: BigNumber;
        held: BigNumber;
        depositToken: boolean;
        lastBlockNum: BigNumber;
    }>;
    addressConfig(overrides?: CallOverrides): Promise<[
        string,
        string,
        string,
        string
    ] & {
        dexAggregator: string;
        controller: string;
        wETH: string;
        xOLE: string;
    }>;
    admin(overrides?: CallOverrides): Promise<string>;
    allowedDepositTokens(arg0: string, overrides?: CallOverrides): Promise<boolean>;
    calculateConfig(overrides?: CallOverrides): Promise<[
        number,
        number,
        number,
        number,
        number,
        number,
        BigNumber,
        number,
        number,
        number
    ] & {
        defaultFeesRate: number;
        insuranceRatio: number;
        defaultMarginLimit: number;
        priceDiffientRatio: number;
        updatePriceDiscount: number;
        feesDiscount: number;
        feesDiscountThreshold: BigNumber;
        penaltyRatio: number;
        maxLiquidationPriceDiffientRatio: number;
        twapDuration: number;
    }>;
    developer(overrides?: CallOverrides): Promise<string>;
    implementation(overrides?: CallOverrides): Promise<string>;
    markets(arg0: BigNumberish, overrides?: CallOverrides): Promise<[
        string,
        string,
        string,
        string,
        number,
        number,
        number,
        string,
        BigNumber,
        BigNumber
    ] & {
        pool0: string;
        pool1: string;
        token0: string;
        token1: string;
        marginLimit: number;
        feesRate: number;
        priceDiffientRatio: number;
        priceUpdater: string;
        pool0Insurance: BigNumber;
        pool1Insurance: BigNumber;
    }>;
    numPairs(overrides?: CallOverrides): Promise<number>;
    pendingAdmin(overrides?: CallOverrides): Promise<string>;
    setPendingAdmin(newPendingAdmin: string, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    supportDexs(arg0: BigNumberish, overrides?: CallOverrides): Promise<boolean>;
    taxes(arg0: BigNumberish, arg1: string, arg2: BigNumberish, overrides?: CallOverrides): Promise<number>;
    totalHelds(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
    initialize(_controller: string, _dexAggregator: string, depositTokens: string[], _wETH: string, _xOLE: string, _supportDexs: BigNumberish[], overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    addMarket(pool0: string, pool1: string, marginLimit: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    marginTrade(marketId: BigNumberish, longToken: boolean, depositToken: boolean, deposit: BigNumberish, borrow: BigNumberish, minBuyAmount: BigNumberish, dexData: BytesLike, overrides?: PayableOverrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    closeTrade(marketId: BigNumberish, longToken: boolean, closeHeld: BigNumberish, minOrMaxAmount: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    liquidate(owner: string, marketId: BigNumberish, longToken: boolean, minBuy: BigNumberish, maxSell: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    marginRatio(owner: string, marketId: BigNumberish, longToken: boolean, dexData: BytesLike, overrides?: CallOverrides): Promise<[
        BigNumber,
        BigNumber,
        BigNumber,
        number
    ] & {
        current: BigNumber;
        cAvg: BigNumber;
        hAvg: BigNumber;
        limit: number;
    }>;
    shouldUpdatePrice(marketId: BigNumberish, dexData: BytesLike, overrides?: CallOverrides): Promise<boolean>;
    updatePrice(marketId: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    getMarketSupportDexs(marketId: BigNumberish, overrides?: CallOverrides): Promise<number[]>;
    setCalculateConfig(defaultFeesRate: BigNumberish, insuranceRatio: BigNumberish, defaultMarginLimit: BigNumberish, priceDiffientRatio: BigNumberish, updatePriceDiscount: BigNumberish, feesDiscount: BigNumberish, feesDiscountThreshold: BigNumberish, penaltyRatio: BigNumberish, maxLiquidationPriceDiffientRatio: BigNumberish, twapDuration: BigNumberish, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    setAddressConfig(controller: string, dexAggregator: string, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    setMarketConfig(marketId: BigNumberish, feesRate: BigNumberish, marginLimit: BigNumberish, priceDiffientRatio: BigNumberish, dexs: BigNumberish[], overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    moveInsurance(marketId: BigNumberish, poolIndex: BigNumberish, to: string, amount: BigNumberish, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    setSupportDex(dex: BigNumberish, support: boolean, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    setTaxRate(marketId: BigNumberish, token: string, index: BigNumberish, tax: BigNumberish, overrides?: Overrides & {
        from?: string | Promise<string>;
    }): Promise<ContractTransaction>;
    callStatic: {
        acceptAdmin(overrides?: CallOverrides): Promise<void>;
        activeTrades(arg0: string, arg1: BigNumberish, arg2: boolean, overrides?: CallOverrides): Promise<[
            BigNumber,
            BigNumber,
            boolean,
            BigNumber
        ] & {
            deposited: BigNumber;
            held: BigNumber;
            depositToken: boolean;
            lastBlockNum: BigNumber;
        }>;
        addressConfig(overrides?: CallOverrides): Promise<[
            string,
            string,
            string,
            string
        ] & {
            dexAggregator: string;
            controller: string;
            wETH: string;
            xOLE: string;
        }>;
        admin(overrides?: CallOverrides): Promise<string>;
        allowedDepositTokens(arg0: string, overrides?: CallOverrides): Promise<boolean>;
        calculateConfig(overrides?: CallOverrides): Promise<[
            number,
            number,
            number,
            number,
            number,
            number,
            BigNumber,
            number,
            number,
            number
        ] & {
            defaultFeesRate: number;
            insuranceRatio: number;
            defaultMarginLimit: number;
            priceDiffientRatio: number;
            updatePriceDiscount: number;
            feesDiscount: number;
            feesDiscountThreshold: BigNumber;
            penaltyRatio: number;
            maxLiquidationPriceDiffientRatio: number;
            twapDuration: number;
        }>;
        developer(overrides?: CallOverrides): Promise<string>;
        implementation(overrides?: CallOverrides): Promise<string>;
        markets(arg0: BigNumberish, overrides?: CallOverrides): Promise<[
            string,
            string,
            string,
            string,
            number,
            number,
            number,
            string,
            BigNumber,
            BigNumber
        ] & {
            pool0: string;
            pool1: string;
            token0: string;
            token1: string;
            marginLimit: number;
            feesRate: number;
            priceDiffientRatio: number;
            priceUpdater: string;
            pool0Insurance: BigNumber;
            pool1Insurance: BigNumber;
        }>;
        numPairs(overrides?: CallOverrides): Promise<number>;
        pendingAdmin(overrides?: CallOverrides): Promise<string>;
        setPendingAdmin(newPendingAdmin: string, overrides?: CallOverrides): Promise<void>;
        supportDexs(arg0: BigNumberish, overrides?: CallOverrides): Promise<boolean>;
        taxes(arg0: BigNumberish, arg1: string, arg2: BigNumberish, overrides?: CallOverrides): Promise<number>;
        totalHelds(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
        initialize(_controller: string, _dexAggregator: string, depositTokens: string[], _wETH: string, _xOLE: string, _supportDexs: BigNumberish[], overrides?: CallOverrides): Promise<void>;
        addMarket(pool0: string, pool1: string, marginLimit: BigNumberish, dexData: BytesLike, overrides?: CallOverrides): Promise<number>;
        marginTrade(marketId: BigNumberish, longToken: boolean, depositToken: boolean, deposit: BigNumberish, borrow: BigNumberish, minBuyAmount: BigNumberish, dexData: BytesLike, overrides?: CallOverrides): Promise<void>;
        closeTrade(marketId: BigNumberish, longToken: boolean, closeHeld: BigNumberish, minOrMaxAmount: BigNumberish, dexData: BytesLike, overrides?: CallOverrides): Promise<void>;
        liquidate(owner: string, marketId: BigNumberish, longToken: boolean, minBuy: BigNumberish, maxSell: BigNumberish, dexData: BytesLike, overrides?: CallOverrides): Promise<void>;
        marginRatio(owner: string, marketId: BigNumberish, longToken: boolean, dexData: BytesLike, overrides?: CallOverrides): Promise<[
            BigNumber,
            BigNumber,
            BigNumber,
            number
        ] & {
            current: BigNumber;
            cAvg: BigNumber;
            hAvg: BigNumber;
            limit: number;
        }>;
        shouldUpdatePrice(marketId: BigNumberish, dexData: BytesLike, overrides?: CallOverrides): Promise<boolean>;
        updatePrice(marketId: BigNumberish, dexData: BytesLike, overrides?: CallOverrides): Promise<void>;
        getMarketSupportDexs(marketId: BigNumberish, overrides?: CallOverrides): Promise<number[]>;
        setCalculateConfig(defaultFeesRate: BigNumberish, insuranceRatio: BigNumberish, defaultMarginLimit: BigNumberish, priceDiffientRatio: BigNumberish, updatePriceDiscount: BigNumberish, feesDiscount: BigNumberish, feesDiscountThreshold: BigNumberish, penaltyRatio: BigNumberish, maxLiquidationPriceDiffientRatio: BigNumberish, twapDuration: BigNumberish, overrides?: CallOverrides): Promise<void>;
        setAddressConfig(controller: string, dexAggregator: string, overrides?: CallOverrides): Promise<void>;
        setMarketConfig(marketId: BigNumberish, feesRate: BigNumberish, marginLimit: BigNumberish, priceDiffientRatio: BigNumberish, dexs: BigNumberish[], overrides?: CallOverrides): Promise<void>;
        moveInsurance(marketId: BigNumberish, poolIndex: BigNumberish, to: string, amount: BigNumberish, overrides?: CallOverrides): Promise<void>;
        setSupportDex(dex: BigNumberish, support: boolean, overrides?: CallOverrides): Promise<void>;
        setTaxRate(marketId: BigNumberish, token: string, index: BigNumberish, tax: BigNumberish, overrides?: CallOverrides): Promise<void>;
    };
    filters: {
        "ChangeAllowedDepositTokens(address[],bool)"(token?: null, allowed?: null): ChangeAllowedDepositTokensEventFilter;
        ChangeAllowedDepositTokens(token?: null, allowed?: null): ChangeAllowedDepositTokensEventFilter;
        "Liquidation(address,uint16,bool,bool,uint256,uint256,address,uint256,uint256,uint256,uint256,uint256,uint32)"(owner?: null, marketId?: null, longToken?: null, depositToken?: null, liquidationAmount?: null, outstandingAmount?: null, liquidator?: null, depositDecrease?: null, depositReturn?: null, fees?: null, token0Price?: null, penalty?: null, dex?: null): LiquidationEventFilter;
        Liquidation(owner?: null, marketId?: null, longToken?: null, depositToken?: null, liquidationAmount?: null, outstandingAmount?: null, liquidator?: null, depositDecrease?: null, depositReturn?: null, fees?: null, token0Price?: null, penalty?: null, dex?: null): LiquidationEventFilter;
        "MarginTrade(address,uint16,bool,bool,uint256,uint256,uint256,uint256,uint256,uint32)"(trader?: null, marketId?: null, longToken?: null, depositToken?: null, deposited?: null, borrowed?: null, held?: null, fees?: null, token0Price?: null, dex?: null): MarginTradeEventFilter;
        MarginTrade(trader?: null, marketId?: null, longToken?: null, depositToken?: null, deposited?: null, borrowed?: null, held?: null, fees?: null, token0Price?: null, dex?: null): MarginTradeEventFilter;
        "NewAddressConfig(address,address)"(controller?: null, dexAggregator?: null): NewAddressConfigEventFilter;
        NewAddressConfig(controller?: null, dexAggregator?: null): NewAddressConfigEventFilter;
        "NewAdmin(address,address)"(oldAdmin?: null, newAdmin?: null): NewAdminEventFilter;
        NewAdmin(oldAdmin?: null, newAdmin?: null): NewAdminEventFilter;
        "NewCalculateConfig(uint16,uint8,uint16,uint16,uint16,uint16,uint128,uint16,uint8,uint16)"(defaultFeesRate?: null, insuranceRatio?: null, defaultMarginLimit?: null, priceDiffientRatio?: null, updatePriceDiscount?: null, feesDiscount?: null, feesDiscountThreshold?: null, penaltyRatio?: null, maxLiquidationPriceDiffientRatio?: null, twapDuration?: null): NewCalculateConfigEventFilter;
        NewCalculateConfig(defaultFeesRate?: null, insuranceRatio?: null, defaultMarginLimit?: null, priceDiffientRatio?: null, updatePriceDiscount?: null, feesDiscount?: null, feesDiscountThreshold?: null, penaltyRatio?: null, maxLiquidationPriceDiffientRatio?: null, twapDuration?: null): NewCalculateConfigEventFilter;
        "NewMarketConfig(uint16,uint16,uint32,uint16,uint32[])"(marketId?: null, feesRate?: null, marginLimit?: null, priceDiffientRatio?: null, dexs?: null): NewMarketConfigEventFilter;
        NewMarketConfig(marketId?: null, feesRate?: null, marginLimit?: null, priceDiffientRatio?: null, dexs?: null): NewMarketConfigEventFilter;
        "NewPendingAdmin(address,address)"(oldPendingAdmin?: null, newPendingAdmin?: null): NewPendingAdminEventFilter;
        NewPendingAdmin(oldPendingAdmin?: null, newPendingAdmin?: null): NewPendingAdminEventFilter;
        "TradeClosed(address,uint16,bool,bool,uint256,uint256,uint256,uint256,uint256,uint32)"(owner?: null, marketId?: null, longToken?: null, depositToken?: null, closeAmount?: null, depositDecrease?: null, depositReturn?: null, fees?: null, token0Price?: null, dex?: null): TradeClosedEventFilter;
        TradeClosed(owner?: null, marketId?: null, longToken?: null, depositToken?: null, closeAmount?: null, depositDecrease?: null, depositReturn?: null, fees?: null, token0Price?: null, dex?: null): TradeClosedEventFilter;
    };
    estimateGas: {
        acceptAdmin(overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        activeTrades(arg0: string, arg1: BigNumberish, arg2: boolean, overrides?: CallOverrides): Promise<BigNumber>;
        addressConfig(overrides?: CallOverrides): Promise<BigNumber>;
        admin(overrides?: CallOverrides): Promise<BigNumber>;
        allowedDepositTokens(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
        calculateConfig(overrides?: CallOverrides): Promise<BigNumber>;
        developer(overrides?: CallOverrides): Promise<BigNumber>;
        implementation(overrides?: CallOverrides): Promise<BigNumber>;
        markets(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
        numPairs(overrides?: CallOverrides): Promise<BigNumber>;
        pendingAdmin(overrides?: CallOverrides): Promise<BigNumber>;
        setPendingAdmin(newPendingAdmin: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        supportDexs(arg0: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
        taxes(arg0: BigNumberish, arg1: string, arg2: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
        totalHelds(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
        initialize(_controller: string, _dexAggregator: string, depositTokens: string[], _wETH: string, _xOLE: string, _supportDexs: BigNumberish[], overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        addMarket(pool0: string, pool1: string, marginLimit: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        marginTrade(marketId: BigNumberish, longToken: boolean, depositToken: boolean, deposit: BigNumberish, borrow: BigNumberish, minBuyAmount: BigNumberish, dexData: BytesLike, overrides?: PayableOverrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        closeTrade(marketId: BigNumberish, longToken: boolean, closeHeld: BigNumberish, minOrMaxAmount: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        liquidate(owner: string, marketId: BigNumberish, longToken: boolean, minBuy: BigNumberish, maxSell: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        marginRatio(owner: string, marketId: BigNumberish, longToken: boolean, dexData: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
        shouldUpdatePrice(marketId: BigNumberish, dexData: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;
        updatePrice(marketId: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        getMarketSupportDexs(marketId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
        setCalculateConfig(defaultFeesRate: BigNumberish, insuranceRatio: BigNumberish, defaultMarginLimit: BigNumberish, priceDiffientRatio: BigNumberish, updatePriceDiscount: BigNumberish, feesDiscount: BigNumberish, feesDiscountThreshold: BigNumberish, penaltyRatio: BigNumberish, maxLiquidationPriceDiffientRatio: BigNumberish, twapDuration: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        setAddressConfig(controller: string, dexAggregator: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        setMarketConfig(marketId: BigNumberish, feesRate: BigNumberish, marginLimit: BigNumberish, priceDiffientRatio: BigNumberish, dexs: BigNumberish[], overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        moveInsurance(marketId: BigNumberish, poolIndex: BigNumberish, to: string, amount: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        setSupportDex(dex: BigNumberish, support: boolean, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
        setTaxRate(marketId: BigNumberish, token: string, index: BigNumberish, tax: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<BigNumber>;
    };
    populateTransaction: {
        acceptAdmin(overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        activeTrades(arg0: string, arg1: BigNumberish, arg2: boolean, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        addressConfig(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        admin(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        allowedDepositTokens(arg0: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        calculateConfig(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        developer(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        implementation(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        markets(arg0: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        numPairs(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        pendingAdmin(overrides?: CallOverrides): Promise<PopulatedTransaction>;
        setPendingAdmin(newPendingAdmin: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        supportDexs(arg0: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        taxes(arg0: BigNumberish, arg1: string, arg2: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        totalHelds(arg0: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        initialize(_controller: string, _dexAggregator: string, depositTokens: string[], _wETH: string, _xOLE: string, _supportDexs: BigNumberish[], overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        addMarket(pool0: string, pool1: string, marginLimit: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        marginTrade(marketId: BigNumberish, longToken: boolean, depositToken: boolean, deposit: BigNumberish, borrow: BigNumberish, minBuyAmount: BigNumberish, dexData: BytesLike, overrides?: PayableOverrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        closeTrade(marketId: BigNumberish, longToken: boolean, closeHeld: BigNumberish, minOrMaxAmount: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        liquidate(owner: string, marketId: BigNumberish, longToken: boolean, minBuy: BigNumberish, maxSell: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        marginRatio(owner: string, marketId: BigNumberish, longToken: boolean, dexData: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        shouldUpdatePrice(marketId: BigNumberish, dexData: BytesLike, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        updatePrice(marketId: BigNumberish, dexData: BytesLike, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        getMarketSupportDexs(marketId: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
        setCalculateConfig(defaultFeesRate: BigNumberish, insuranceRatio: BigNumberish, defaultMarginLimit: BigNumberish, priceDiffientRatio: BigNumberish, updatePriceDiscount: BigNumberish, feesDiscount: BigNumberish, feesDiscountThreshold: BigNumberish, penaltyRatio: BigNumberish, maxLiquidationPriceDiffientRatio: BigNumberish, twapDuration: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        setAddressConfig(controller: string, dexAggregator: string, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        setMarketConfig(marketId: BigNumberish, feesRate: BigNumberish, marginLimit: BigNumberish, priceDiffientRatio: BigNumberish, dexs: BigNumberish[], overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        moveInsurance(marketId: BigNumberish, poolIndex: BigNumberish, to: string, amount: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        setSupportDex(dex: BigNumberish, support: boolean, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
        setTaxRate(marketId: BigNumberish, token: string, index: BigNumberish, tax: BigNumberish, overrides?: Overrides & {
            from?: string | Promise<string>;
        }): Promise<PopulatedTransaction>;
    };
}
