"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MetavaultTradeVault__factory = void 0;
const ethers_1 = require("ethers");
const _abi = [
    {
        inputs: [],
        stateMutability: 'nonpayable',
        type: 'constructor',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'account',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'tokenAmount',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'usdmAmount',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'feeBasisPoints',
                type: 'uint256',
            },
        ],
        name: 'BuyUSDM',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'bytes32',
                name: 'key',
                type: 'bytes32',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'size',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'collateral',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'averagePrice',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'entryFundingRate',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'reserveAmount',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'int256',
                name: 'realisedPnl',
                type: 'int256',
            },
        ],
        name: 'ClosePosition',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'feeUsd',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'feeTokens',
                type: 'uint256',
            },
        ],
        name: 'CollectMarginFees',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'feeUsd',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'feeTokens',
                type: 'uint256',
            },
        ],
        name: 'CollectSwapFees',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amount',
                type: 'uint256',
            },
        ],
        name: 'DecreaseGuaranteedUsd',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amount',
                type: 'uint256',
            },
        ],
        name: 'DecreasePoolAmount',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'bytes32',
                name: 'key',
                type: 'bytes32',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'account',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'collateralToken',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'indexToken',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'collateralDelta',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'sizeDelta',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'bool',
                name: 'isLong',
                type: 'bool',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'price',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'fee',
                type: 'uint256',
            },
        ],
        name: 'DecreasePosition',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amount',
                type: 'uint256',
            },
        ],
        name: 'DecreaseReservedAmount',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amount',
                type: 'uint256',
            },
        ],
        name: 'DecreaseUsdmAmount',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amount',
                type: 'uint256',
            },
        ],
        name: 'DirectPoolDeposit',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amount',
                type: 'uint256',
            },
        ],
        name: 'IncreaseGuaranteedUsd',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amount',
                type: 'uint256',
            },
        ],
        name: 'IncreasePoolAmount',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'bytes32',
                name: 'key',
                type: 'bytes32',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'account',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'collateralToken',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'indexToken',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'collateralDelta',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'sizeDelta',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'bool',
                name: 'isLong',
                type: 'bool',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'price',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'fee',
                type: 'uint256',
            },
        ],
        name: 'IncreasePosition',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amount',
                type: 'uint256',
            },
        ],
        name: 'IncreaseReservedAmount',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amount',
                type: 'uint256',
            },
        ],
        name: 'IncreaseUsdmAmount',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'bytes32',
                name: 'key',
                type: 'bytes32',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'account',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'collateralToken',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'indexToken',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'bool',
                name: 'isLong',
                type: 'bool',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'size',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'collateral',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'reserveAmount',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'int256',
                name: 'realisedPnl',
                type: 'int256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'markPrice',
                type: 'uint256',
            },
        ],
        name: 'LiquidatePosition',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'account',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'usdmAmount',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'tokenAmount',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'feeBasisPoints',
                type: 'uint256',
            },
        ],
        name: 'SellUSDM',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'account',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'tokenIn',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'address',
                name: 'tokenOut',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amountIn',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amountOut',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'amountOutAfterFees',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'feeBasisPoints',
                type: 'uint256',
            },
        ],
        name: 'Swap',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'address',
                name: 'token',
                type: 'address',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'fundingRate',
                type: 'uint256',
            },
        ],
        name: 'UpdateFundingRate',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'bytes32',
                name: 'key',
                type: 'bytes32',
            },
            {
                indexed: false,
                internalType: 'bool',
                name: 'hasProfit',
                type: 'bool',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'delta',
                type: 'uint256',
            },
        ],
        name: 'UpdatePnl',
        type: 'event',
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: 'bytes32',
                name: 'key',
                type: 'bytes32',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'size',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'collateral',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'averagePrice',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'entryFundingRate',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'reserveAmount',
                type: 'uint256',
            },
            {
                indexed: false,
                internalType: 'int256',
                name: 'realisedPnl',
                type: 'int256',
            },
            {
                indexed: false,
                internalType: 'uint256',
                name: 'markPrice',
                type: 'uint256',
            },
        ],
        name: 'UpdatePosition',
        type: 'event',
    },
    {
        inputs: [],
        name: 'BASIS_POINTS_DIVISOR',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'FUNDING_RATE_PRECISION',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'MAX_FEE_BASIS_POINTS',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'MAX_FUNDING_RATE_FACTOR',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'MAX_LIQUIDATION_FEE_USD',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'MIN_FUNDING_RATE_INTERVAL',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'MIN_LEVERAGE',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'PRICE_PRECISION',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'USDM_DECIMALS',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_router',
                type: 'address',
            },
        ],
        name: 'addRouter',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'uint256',
                name: '_amount',
                type: 'uint256',
            },
            {
                internalType: 'address',
                name: '_tokenDiv',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_tokenMul',
                type: 'address',
            },
        ],
        name: 'adjustForDecimals',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        name: 'allWhitelistedTokens',
        outputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'allWhitelistedTokensLength',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'approvedRouters',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'bufferAmounts',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_receiver',
                type: 'address',
            },
        ],
        name: 'buyUSDM',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
        ],
        name: 'clearTokenConfig',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'cumulativeFundingRates',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_account',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_collateralDelta',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_sizeDelta',
                type: 'uint256',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
            {
                internalType: 'address',
                name: '_receiver',
                type: 'address',
            },
        ],
        name: 'decreasePosition',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
        ],
        name: 'directPoolDeposit',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [],
        name: 'errorController',
        outputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        name: 'errors',
        outputs: [
            {
                internalType: 'string',
                name: '',
                type: 'string',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'feeReserves',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'fundingInterval',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'fundingRateFactor',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_size',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_averagePrice',
                type: 'uint256',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
            {
                internalType: 'uint256',
                name: '_lastIncreasedTime',
                type: 'uint256',
            },
        ],
        name: 'getDelta',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
        ],
        name: 'getEntryFundingRate',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_usdmDelta',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_feeBasisPoints',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_taxBasisPoints',
                type: 'uint256',
            },
            {
                internalType: 'bool',
                name: '_increment',
                type: 'bool',
            },
        ],
        name: 'getFeeBasisPoints',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_account',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
            {
                internalType: 'uint256',
                name: '_size',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_entryFundingRate',
                type: 'uint256',
            },
        ],
        name: 'getFundingFee',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
        ],
        name: 'getGlobalShortDelta',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
        ],
        name: 'getMaxPrice',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
        ],
        name: 'getMinPrice',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_size',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_averagePrice',
                type: 'uint256',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
            {
                internalType: 'uint256',
                name: '_nextPrice',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_sizeDelta',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_lastIncreasedTime',
                type: 'uint256',
            },
        ],
        name: 'getNextAveragePrice',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
        ],
        name: 'getNextFundingRate',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_nextPrice',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_sizeDelta',
                type: 'uint256',
            },
        ],
        name: 'getNextGlobalShortAveragePrice',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_account',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
        ],
        name: 'getPosition',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_account',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
        ],
        name: 'getPositionDelta',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_account',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
            {
                internalType: 'uint256',
                name: '_sizeDelta',
                type: 'uint256',
            },
        ],
        name: 'getPositionFee',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_account',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
        ],
        name: 'getPositionKey',
        outputs: [
            {
                internalType: 'bytes32',
                name: '',
                type: 'bytes32',
            },
        ],
        stateMutability: 'pure',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_account',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
        ],
        name: 'getPositionLeverage',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_usdmAmount',
                type: 'uint256',
            },
        ],
        name: 'getRedemptionAmount',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
        ],
        name: 'getRedemptionCollateral',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
        ],
        name: 'getRedemptionCollateralUsd',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
        ],
        name: 'getTargetUsdmAmount',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
        ],
        name: 'getUtilisation',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'globalShortAveragePrices',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'globalShortSizes',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'gov',
        outputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'guaranteedUsd',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'hasDynamicFees',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'inManagerMode',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'inPrivateLiquidationMode',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'includeAmmPrice',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_account',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_sizeDelta',
                type: 'uint256',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
        ],
        name: 'increasePosition',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_router',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_usdm',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_priceFeed',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_liquidationFeeUsd',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_fundingRateFactor',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_stableFundingRateFactor',
                type: 'uint256',
            },
        ],
        name: 'initialize',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [],
        name: 'isInitialized',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'isLeverageEnabled',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'isLiquidator',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'isManager',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'isSwapEnabled',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'lastFundingTimes',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_account',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
            {
                internalType: 'address',
                name: '_feeReceiver',
                type: 'address',
            },
        ],
        name: 'liquidatePosition',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [],
        name: 'liquidationFeeUsd',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'marginFeeBasisPoints',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'maxGasPrice',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'maxGlobalShortSizes',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'maxLeverage',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'maxUsdmAmounts',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'minProfitBasisPoints',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'minProfitTime',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'mintBurnFeeBasisPoints',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'poolAmounts',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'bytes32',
                name: '',
                type: 'bytes32',
            },
        ],
        name: 'positions',
        outputs: [
            {
                internalType: 'uint256',
                name: 'size',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: 'collateral',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: 'averagePrice',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: 'entryFundingRate',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: 'reserveAmount',
                type: 'uint256',
            },
            {
                internalType: 'int256',
                name: 'realisedPnl',
                type: 'int256',
            },
            {
                internalType: 'uint256',
                name: 'lastIncreasedTime',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'priceFeed',
        outputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_router',
                type: 'address',
            },
        ],
        name: 'removeRouter',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'reservedAmounts',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'router',
        outputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_receiver',
                type: 'address',
            },
        ],
        name: 'sellUSDM',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_amount',
                type: 'uint256',
            },
        ],
        name: 'setBufferAmount',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'uint256',
                name: '_errorCode',
                type: 'uint256',
            },
            {
                internalType: 'string',
                name: '_error',
                type: 'string',
            },
        ],
        name: 'setError',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_errorController',
                type: 'address',
            },
        ],
        name: 'setErrorController',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'uint256',
                name: '_taxBasisPoints',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_stableTaxBasisPoints',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_mintBurnFeeBasisPoints',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_swapFeeBasisPoints',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_stableSwapFeeBasisPoints',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_marginFeeBasisPoints',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_liquidationFeeUsd',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_minProfitTime',
                type: 'uint256',
            },
            {
                internalType: 'bool',
                name: '_hasDynamicFees',
                type: 'bool',
            },
        ],
        name: 'setFees',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'uint256',
                name: '_fundingInterval',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_fundingRateFactor',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_stableFundingRateFactor',
                type: 'uint256',
            },
        ],
        name: 'setFundingRate',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_gov',
                type: 'address',
            },
        ],
        name: 'setGov',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'bool',
                name: '_inManagerMode',
                type: 'bool',
            },
        ],
        name: 'setInManagerMode',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'bool',
                name: '_inPrivateLiquidationMode',
                type: 'bool',
            },
        ],
        name: 'setInPrivateLiquidationMode',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'bool',
                name: '_isLeverageEnabled',
                type: 'bool',
            },
        ],
        name: 'setIsLeverageEnabled',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'bool',
                name: '_isSwapEnabled',
                type: 'bool',
            },
        ],
        name: 'setIsSwapEnabled',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_liquidator',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isActive',
                type: 'bool',
            },
        ],
        name: 'setLiquidator',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_manager',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isManager',
                type: 'bool',
            },
        ],
        name: 'setManager',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'uint256',
                name: '_maxGasPrice',
                type: 'uint256',
            },
        ],
        name: 'setMaxGasPrice',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_amount',
                type: 'uint256',
            },
        ],
        name: 'setMaxGlobalShortSize',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'uint256',
                name: '_maxLeverage',
                type: 'uint256',
            },
        ],
        name: 'setMaxLeverage',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_priceFeed',
                type: 'address',
            },
        ],
        name: 'setPriceFeed',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_tokenDecimals',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_tokenWeight',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_minProfitBps',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_maxUsdmAmount',
                type: 'uint256',
            },
            {
                internalType: 'bool',
                name: '_isStable',
                type: 'bool',
            },
            {
                internalType: 'bool',
                name: '_isShortable',
                type: 'bool',
            },
        ],
        name: 'setTokenConfig',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_amount',
                type: 'uint256',
            },
        ],
        name: 'setUsdmAmount',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'contract IVaultUtils',
                name: '_vaultUtils',
                type: 'address',
            },
        ],
        name: 'setVaultUtils',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'shortableTokens',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'stableFundingRateFactor',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'stableSwapFeeBasisPoints',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'stableTaxBasisPoints',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'stableTokens',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_tokenIn',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_tokenOut',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_receiver',
                type: 'address',
            },
        ],
        name: 'swap',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [],
        name: 'swapFeeBasisPoints',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'taxBasisPoints',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'tokenBalances',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'tokenDecimals',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_tokenAmount',
                type: 'uint256',
            },
        ],
        name: 'tokenToUsdMin',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'tokenWeights',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'totalTokenWeights',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
        ],
        name: 'updateCumulativeFundingRate',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_newVault',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_amount',
                type: 'uint256',
            },
        ],
        name: 'upgradeVault',
        outputs: [],
        stateMutability: 'nonpayable',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_usdAmount',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '_price',
                type: 'uint256',
            },
        ],
        name: 'usdToToken',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_usdAmount',
                type: 'uint256',
            },
        ],
        name: 'usdToTokenMax',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'uint256',
                name: '_usdAmount',
                type: 'uint256',
            },
        ],
        name: 'usdToTokenMin',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'usdm',
        outputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'usdmAmounts',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'useSwapPricing',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_account',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_collateralToken',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_indexToken',
                type: 'address',
            },
            {
                internalType: 'bool',
                name: '_isLong',
                type: 'bool',
            },
            {
                internalType: 'bool',
                name: '_raise',
                type: 'bool',
            },
        ],
        name: 'validateLiquidation',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'vaultUtils',
        outputs: [
            {
                internalType: 'contract IVaultUtils',
                name: '',
                type: 'address',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [],
        name: 'whitelistedTokenCount',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '',
                type: 'address',
            },
        ],
        name: 'whitelistedTokens',
        outputs: [
            {
                internalType: 'bool',
                name: '',
                type: 'bool',
            },
        ],
        stateMutability: 'view',
        type: 'function',
    },
    {
        inputs: [
            {
                internalType: 'address',
                name: '_token',
                type: 'address',
            },
            {
                internalType: 'address',
                name: '_receiver',
                type: 'address',
            },
        ],
        name: 'withdrawFees',
        outputs: [
            {
                internalType: 'uint256',
                name: '',
                type: 'uint256',
            },
        ],
        stateMutability: 'nonpayable',
        type: 'function',
    },
];
class MetavaultTradeVault__factory {
    static createInterface() {
        return new ethers_1.utils.Interface(_abi);
    }
    static connect(address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    }
}
exports.MetavaultTradeVault__factory = MetavaultTradeVault__factory;
MetavaultTradeVault__factory.abi = _abi;
//# sourceMappingURL=MetavaultTradeVault__factory.js.map