@d8x/perpetuals-sdk 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/abi/IPerpetualManager.json +61 -10
- package/dist/cjs/contracts/IPerpetualManager.d.ts +38 -13
- package/dist/cjs/contracts/factories/IPerpetualManager__factory.d.ts +46 -8
- package/dist/cjs/contracts/factories/IPerpetualManager__factory.js +61 -10
- package/dist/cjs/contracts/factories/IPerpetualManager__factory.js.map +1 -1
- package/dist/cjs/priceFeeds.js +6 -1
- package/dist/cjs/priceFeeds.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/abi/IPerpetualManager.json +61 -10
- package/dist/esm/contracts/IPerpetualManager.d.ts +38 -13
- package/dist/esm/contracts/factories/IPerpetualManager__factory.d.ts +46 -8
- package/dist/esm/contracts/factories/IPerpetualManager__factory.js +61 -10
- package/dist/esm/contracts/factories/IPerpetualManager__factory.js.map +1 -1
- package/dist/esm/priceFeeds.js +6 -1
- package/dist/esm/priceFeeds.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
- package/src/abi/IPerpetualManager.json +61 -10
- package/src/contracts/IPerpetualManager.ts +63 -12
- package/src/contracts/factories/IPerpetualManager__factory.ts +61 -10
- package/src/priceFeeds.ts +6 -1
- package/src/version.ts +1 -1
|
@@ -1401,6 +1401,30 @@
|
|
|
1401
1401
|
"stateMutability": "view",
|
|
1402
1402
|
"type": "function"
|
|
1403
1403
|
},
|
|
1404
|
+
{
|
|
1405
|
+
"inputs": [
|
|
1406
|
+
{
|
|
1407
|
+
"internalType": "uint8",
|
|
1408
|
+
"name": "_id",
|
|
1409
|
+
"type": "uint8"
|
|
1410
|
+
},
|
|
1411
|
+
{
|
|
1412
|
+
"internalType": "uint256",
|
|
1413
|
+
"name": "_bulkSize",
|
|
1414
|
+
"type": "uint256"
|
|
1415
|
+
}
|
|
1416
|
+
],
|
|
1417
|
+
"name": "clearTradersInPool",
|
|
1418
|
+
"outputs": [
|
|
1419
|
+
{
|
|
1420
|
+
"internalType": "bool",
|
|
1421
|
+
"name": "",
|
|
1422
|
+
"type": "bool"
|
|
1423
|
+
}
|
|
1424
|
+
],
|
|
1425
|
+
"stateMutability": "nonpayable",
|
|
1426
|
+
"type": "function"
|
|
1427
|
+
},
|
|
1404
1428
|
{
|
|
1405
1429
|
"inputs": [
|
|
1406
1430
|
{
|
|
@@ -4265,16 +4289,6 @@
|
|
|
4265
4289
|
"name": "_fm",
|
|
4266
4290
|
"type": "int128"
|
|
4267
4291
|
},
|
|
4268
|
-
{
|
|
4269
|
-
"internalType": "int128",
|
|
4270
|
-
"name": "_fTotLong",
|
|
4271
|
-
"type": "int128"
|
|
4272
|
-
},
|
|
4273
|
-
{
|
|
4274
|
-
"internalType": "int128",
|
|
4275
|
-
"name": "_fTotShort",
|
|
4276
|
-
"type": "int128"
|
|
4277
|
-
},
|
|
4278
4292
|
{
|
|
4279
4293
|
"internalType": "int128",
|
|
4280
4294
|
"name": "_fTradeAmt",
|
|
@@ -4545,6 +4559,19 @@
|
|
|
4545
4559
|
"stateMutability": "nonpayable",
|
|
4546
4560
|
"type": "function"
|
|
4547
4561
|
},
|
|
4562
|
+
{
|
|
4563
|
+
"inputs": [
|
|
4564
|
+
{
|
|
4565
|
+
"internalType": "uint24",
|
|
4566
|
+
"name": "_iPerpetualId",
|
|
4567
|
+
"type": "uint24"
|
|
4568
|
+
}
|
|
4569
|
+
],
|
|
4570
|
+
"name": "resetMarkPremium",
|
|
4571
|
+
"outputs": [],
|
|
4572
|
+
"stateMutability": "nonpayable",
|
|
4573
|
+
"type": "function"
|
|
4574
|
+
},
|
|
4548
4575
|
{
|
|
4549
4576
|
"inputs": [
|
|
4550
4577
|
{
|
|
@@ -4999,6 +5026,30 @@
|
|
|
4999
5026
|
"stateMutability": "nonpayable",
|
|
5000
5027
|
"type": "function"
|
|
5001
5028
|
},
|
|
5029
|
+
{
|
|
5030
|
+
"inputs": [
|
|
5031
|
+
{
|
|
5032
|
+
"internalType": "uint24",
|
|
5033
|
+
"name": "_perpetualID",
|
|
5034
|
+
"type": "uint24"
|
|
5035
|
+
},
|
|
5036
|
+
{
|
|
5037
|
+
"internalType": "uint256",
|
|
5038
|
+
"name": "_bulkSize",
|
|
5039
|
+
"type": "uint256"
|
|
5040
|
+
}
|
|
5041
|
+
],
|
|
5042
|
+
"name": "settleTraders",
|
|
5043
|
+
"outputs": [
|
|
5044
|
+
{
|
|
5045
|
+
"internalType": "uint256",
|
|
5046
|
+
"name": "_settled",
|
|
5047
|
+
"type": "uint256"
|
|
5048
|
+
}
|
|
5049
|
+
],
|
|
5050
|
+
"stateMutability": "nonpayable",
|
|
5051
|
+
"type": "function"
|
|
5052
|
+
},
|
|
5002
5053
|
{
|
|
5003
5054
|
"inputs": [
|
|
5004
5055
|
{
|
|
@@ -387,7 +387,7 @@ export declare namespace IPerpetualInfo {
|
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
389
|
export interface IPerpetualManagerInterface extends Interface {
|
|
390
|
-
getFunction(nameOrSignature: "activatePerpetual" | "addLiquidity" | "adjustSettlementPrice" | "calculateDefaultFundSize" | "calculatePerpetualPrice" | "calculateRiskNeutralPD" | "countActivePerpAccounts" | "createLiquidityPool" | "createPerpetual" | "deactivatePerp" | "decodeUint16Float" | "decreasePoolCash" | "deposit" | "depositBrokerLots" | "depositMarginForOpeningTrade" | "depositToDefaultFund" | "determineExchangeFee" | "distributeFees" | "distributeFeesLiquidation" | "entropy" | "executeCancelOrder" | "executeLiquidityWithdrawal" | "executeTrade" | "getAMMPerpLogic" | "getAMMState" | "getActivePerpAccounts" | "getActivePerpAccountsByChunks" | "getBrokerDesignation" | "getBrokerInducedFee" | "getCollateralTokenAmountForPricing" | "getCurrentBrokerVolume" | "getCurrentTraderVolume" | "getDepositAmountForLvgPosition" | "getExchangeFeePrdMkts" | "getFeeForBrokerDesignation" | "getFeeForBrokerStake" | "getFeeForBrokerVolume" | "getFeeForTraderStake" | "getFeeForTraderVolume" | "getLastPerpetualBaseToUSDConversion" | "getLiquidatableAccounts" | "getLiquidityPool" | "getLiquidityPools" | "getMarginAccount" | "getMarginAccounts" | "getMaxSignedOpenTradeSizeForPos" | "getNextLiquidatableTrader" | "getOracleFactory" | "getOraclePrice" | "getOracleUpdateTime" | "getOrderBookAddress" | "getOrderBookFactoryAddress" | "getPerpetual" | "getPerpetualCountInPool" | "getPerpetualId" | "getPerpetualStaticInfo" | "getPerpetuals" | "getPoolCount" | "getPoolIdByPerpetualId" | "getPoolStaticInfo" | "getPriceInfo" | "getSettleableAccounts" | "getShareTokenFactory" | "getShareTokenPriceD18" | "getTargetCollateralM1" | "getTargetCollateralM2" | "getTargetCollateralM3" | "getTokenAmountToReturn" | "getTraderState" | "getTreasuryAddress" | "getWithdrawRequests" | "increasePoolCash" | "isActiveAccount" | "isDelegate" | "isMarketClosed" | "isOrderCanceled" | "isOrderExecuted" | "isPerpMarketClosed" | "liquidateByAMM" | "pauseLiquidityProvision" | "prdMktsLvgFee" | "preTrade" | "priceImpact" | "queryExchangeFee" | "queryMidPrices" | "queryPerpetualPrice" | "rebalance" | "reduceMarginCollateral" | "runLiquidityPool" | "setAMMPerpLogic" | "setBlockDelay" | "setBrokerTiers" | "setBrokerVolumeTiers" | "setDelegate" | "setEmergencyState" | "setFeesForDesignation" | "setInitialVolumeForFee" | "setNormalState" | "setOracleFactory" | "setOracleFactoryForPerpetual" | "setOrderBookFactory" | "setPerpetualBaseParams" | "setPerpetualOracles" | "setPerpetualParam" | "setPerpetualParamPair" | "setPerpetualPoolFactory" | "setPerpetualRiskParams" | "setPoolParam" | "setTraderTiers" | "setTraderVolumeTiers" | "setTreasury" | "setUtilityTokenAddr" | "settle" | "settleNextTraderInPool" | "splitProtocolFee" | "togglePerpEmergencyState" | "tradeViaOrderBook" | "transferBrokerLots" | "transferBrokerOwnership" | "transferEarningsToTreasury" | "transferValueToTreasury" | "updateAMMTargetFundSize" | "updateDefaultFundTargetSize" | "updateDefaultFundTargetSizeRandom" | "updateFundingAndPricesAfter" | "updateFundingAndPricesBefore" | "updatePriceFeeds" | "updateVolumeEMAOnNewTrade" | "validateStopPrice" | "withdraw" | "withdrawAll" | "withdrawDepositFromMarginAccount" | "withdrawFromDefaultFund" | "withdrawLiquidity"): FunctionFragment;
|
|
390
|
+
getFunction(nameOrSignature: "activatePerpetual" | "addLiquidity" | "adjustSettlementPrice" | "calculateDefaultFundSize" | "calculatePerpetualPrice" | "calculateRiskNeutralPD" | "clearTradersInPool" | "countActivePerpAccounts" | "createLiquidityPool" | "createPerpetual" | "deactivatePerp" | "decodeUint16Float" | "decreasePoolCash" | "deposit" | "depositBrokerLots" | "depositMarginForOpeningTrade" | "depositToDefaultFund" | "determineExchangeFee" | "distributeFees" | "distributeFeesLiquidation" | "entropy" | "executeCancelOrder" | "executeLiquidityWithdrawal" | "executeTrade" | "getAMMPerpLogic" | "getAMMState" | "getActivePerpAccounts" | "getActivePerpAccountsByChunks" | "getBrokerDesignation" | "getBrokerInducedFee" | "getCollateralTokenAmountForPricing" | "getCurrentBrokerVolume" | "getCurrentTraderVolume" | "getDepositAmountForLvgPosition" | "getExchangeFeePrdMkts" | "getFeeForBrokerDesignation" | "getFeeForBrokerStake" | "getFeeForBrokerVolume" | "getFeeForTraderStake" | "getFeeForTraderVolume" | "getLastPerpetualBaseToUSDConversion" | "getLiquidatableAccounts" | "getLiquidityPool" | "getLiquidityPools" | "getMarginAccount" | "getMarginAccounts" | "getMaxSignedOpenTradeSizeForPos" | "getNextLiquidatableTrader" | "getOracleFactory" | "getOraclePrice" | "getOracleUpdateTime" | "getOrderBookAddress" | "getOrderBookFactoryAddress" | "getPerpetual" | "getPerpetualCountInPool" | "getPerpetualId" | "getPerpetualStaticInfo" | "getPerpetuals" | "getPoolCount" | "getPoolIdByPerpetualId" | "getPoolStaticInfo" | "getPriceInfo" | "getSettleableAccounts" | "getShareTokenFactory" | "getShareTokenPriceD18" | "getTargetCollateralM1" | "getTargetCollateralM2" | "getTargetCollateralM3" | "getTokenAmountToReturn" | "getTraderState" | "getTreasuryAddress" | "getWithdrawRequests" | "increasePoolCash" | "isActiveAccount" | "isDelegate" | "isMarketClosed" | "isOrderCanceled" | "isOrderExecuted" | "isPerpMarketClosed" | "liquidateByAMM" | "pauseLiquidityProvision" | "prdMktsLvgFee" | "preTrade" | "priceImpact" | "queryExchangeFee" | "queryMidPrices" | "queryPerpetualPrice" | "rebalance" | "reduceMarginCollateral" | "resetMarkPremium" | "runLiquidityPool" | "setAMMPerpLogic" | "setBlockDelay" | "setBrokerTiers" | "setBrokerVolumeTiers" | "setDelegate" | "setEmergencyState" | "setFeesForDesignation" | "setInitialVolumeForFee" | "setNormalState" | "setOracleFactory" | "setOracleFactoryForPerpetual" | "setOrderBookFactory" | "setPerpetualBaseParams" | "setPerpetualOracles" | "setPerpetualParam" | "setPerpetualParamPair" | "setPerpetualPoolFactory" | "setPerpetualRiskParams" | "setPoolParam" | "setTraderTiers" | "setTraderVolumeTiers" | "setTreasury" | "setUtilityTokenAddr" | "settle" | "settleNextTraderInPool" | "settleTraders" | "splitProtocolFee" | "togglePerpEmergencyState" | "tradeViaOrderBook" | "transferBrokerLots" | "transferBrokerOwnership" | "transferEarningsToTreasury" | "transferValueToTreasury" | "updateAMMTargetFundSize" | "updateDefaultFundTargetSize" | "updateDefaultFundTargetSizeRandom" | "updateFundingAndPricesAfter" | "updateFundingAndPricesBefore" | "updatePriceFeeds" | "updateVolumeEMAOnNewTrade" | "validateStopPrice" | "withdraw" | "withdrawAll" | "withdrawDepositFromMarginAccount" | "withdrawFromDefaultFund" | "withdrawLiquidity"): FunctionFragment;
|
|
391
391
|
getEvent(nameOrSignatureOrTopic: "BrokerLotsTransferred" | "BrokerVolumeTransferred" | "Clear" | "DistributeFees" | "Liquidate" | "LiquidityAdded" | "LiquidityPoolCreated" | "LiquidityProvisionPaused" | "LiquidityRemoved" | "LiquidityWithdrawalInitiated" | "PerpetualCreated" | "PerpetualLimitOrderCancelled" | "RunLiquidityPool" | "SetBlockDelay" | "SetBrokerDesignations" | "SetBrokerTiers" | "SetBrokerVolumeTiers" | "SetClearedState" | "SetDelegate" | "SetEmergencyState" | "SetNormalState" | "SetOracles" | "SetParameter" | "SetParameterPair" | "SetPerpetualBaseParameters" | "SetPerpetualRiskParameters" | "SetPoolParameter" | "SetTraderTiers" | "SetTraderVolumeTiers" | "SetUtilityToken" | "Settle" | "SettleState" | "SettlementComplete" | "TokensDeposited" | "TokensWithdrawn" | "Trade" | "TransferAddressTo" | "UpdateBrokerAddedCash" | "UpdateFundingRate" | "UpdateMarginAccount" | "UpdateMarkPrice"): EventFragment;
|
|
392
392
|
encodeFunctionData(functionFragment: "activatePerpetual", values: [BigNumberish]): string;
|
|
393
393
|
encodeFunctionData(functionFragment: "addLiquidity", values: [BigNumberish, BigNumberish]): string;
|
|
@@ -426,6 +426,7 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
426
426
|
BigNumberish,
|
|
427
427
|
boolean
|
|
428
428
|
]): string;
|
|
429
|
+
encodeFunctionData(functionFragment: "clearTradersInPool", values: [BigNumberish, BigNumberish]): string;
|
|
429
430
|
encodeFunctionData(functionFragment: "countActivePerpAccounts", values: [BigNumberish]): string;
|
|
430
431
|
encodeFunctionData(functionFragment: "createLiquidityPool", values: [AddressLike, BigNumberish, BigNumberish, BigNumberish]): string;
|
|
431
432
|
encodeFunctionData(functionFragment: "createPerpetual", values: [
|
|
@@ -563,14 +564,7 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
563
564
|
BigNumberish[]
|
|
564
565
|
]): string;
|
|
565
566
|
encodeFunctionData(functionFragment: "pauseLiquidityProvision", values: [BigNumberish, boolean]): string;
|
|
566
|
-
encodeFunctionData(functionFragment: "prdMktsLvgFee", values: [
|
|
567
|
-
BigNumberish,
|
|
568
|
-
BigNumberish,
|
|
569
|
-
BigNumberish,
|
|
570
|
-
BigNumberish,
|
|
571
|
-
BigNumberish,
|
|
572
|
-
BigNumberish
|
|
573
|
-
]): string;
|
|
567
|
+
encodeFunctionData(functionFragment: "prdMktsLvgFee", values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish]): string;
|
|
574
568
|
encodeFunctionData(functionFragment: "preTrade", values: [IPerpetualOrder.OrderStruct]): string;
|
|
575
569
|
encodeFunctionData(functionFragment: "priceImpact", values: [BigNumberish, BigNumberish]): string;
|
|
576
570
|
encodeFunctionData(functionFragment: "queryExchangeFee", values: [BigNumberish, AddressLike, AddressLike]): string;
|
|
@@ -587,6 +581,7 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
587
581
|
]): string;
|
|
588
582
|
encodeFunctionData(functionFragment: "rebalance", values: [BigNumberish]): string;
|
|
589
583
|
encodeFunctionData(functionFragment: "reduceMarginCollateral", values: [BigNumberish, AddressLike, BigNumberish]): string;
|
|
584
|
+
encodeFunctionData(functionFragment: "resetMarkPremium", values: [BigNumberish]): string;
|
|
590
585
|
encodeFunctionData(functionFragment: "runLiquidityPool", values: [BigNumberish]): string;
|
|
591
586
|
encodeFunctionData(functionFragment: "setAMMPerpLogic", values: [AddressLike]): string;
|
|
592
587
|
encodeFunctionData(functionFragment: "setBlockDelay", values: [BigNumberish]): string;
|
|
@@ -623,6 +618,7 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
623
618
|
encodeFunctionData(functionFragment: "setUtilityTokenAddr", values: [AddressLike]): string;
|
|
624
619
|
encodeFunctionData(functionFragment: "settle", values: [BigNumberish, AddressLike]): string;
|
|
625
620
|
encodeFunctionData(functionFragment: "settleNextTraderInPool", values: [BigNumberish]): string;
|
|
621
|
+
encodeFunctionData(functionFragment: "settleTraders", values: [BigNumberish, BigNumberish]): string;
|
|
626
622
|
encodeFunctionData(functionFragment: "splitProtocolFee", values: [BigNumberish]): string;
|
|
627
623
|
encodeFunctionData(functionFragment: "togglePerpEmergencyState", values: [BigNumberish]): string;
|
|
628
624
|
encodeFunctionData(functionFragment: "tradeViaOrderBook", values: [IPerpetualOrder.OrderStruct, AddressLike]): string;
|
|
@@ -655,6 +651,7 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
655
651
|
decodeFunctionResult(functionFragment: "calculateDefaultFundSize", data: BytesLike): Result;
|
|
656
652
|
decodeFunctionResult(functionFragment: "calculatePerpetualPrice", data: BytesLike): Result;
|
|
657
653
|
decodeFunctionResult(functionFragment: "calculateRiskNeutralPD", data: BytesLike): Result;
|
|
654
|
+
decodeFunctionResult(functionFragment: "clearTradersInPool", data: BytesLike): Result;
|
|
658
655
|
decodeFunctionResult(functionFragment: "countActivePerpAccounts", data: BytesLike): Result;
|
|
659
656
|
decodeFunctionResult(functionFragment: "createLiquidityPool", data: BytesLike): Result;
|
|
660
657
|
decodeFunctionResult(functionFragment: "createPerpetual", data: BytesLike): Result;
|
|
@@ -737,6 +734,7 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
737
734
|
decodeFunctionResult(functionFragment: "queryPerpetualPrice", data: BytesLike): Result;
|
|
738
735
|
decodeFunctionResult(functionFragment: "rebalance", data: BytesLike): Result;
|
|
739
736
|
decodeFunctionResult(functionFragment: "reduceMarginCollateral", data: BytesLike): Result;
|
|
737
|
+
decodeFunctionResult(functionFragment: "resetMarkPremium", data: BytesLike): Result;
|
|
740
738
|
decodeFunctionResult(functionFragment: "runLiquidityPool", data: BytesLike): Result;
|
|
741
739
|
decodeFunctionResult(functionFragment: "setAMMPerpLogic", data: BytesLike): Result;
|
|
742
740
|
decodeFunctionResult(functionFragment: "setBlockDelay", data: BytesLike): Result;
|
|
@@ -763,6 +761,7 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
763
761
|
decodeFunctionResult(functionFragment: "setUtilityTokenAddr", data: BytesLike): Result;
|
|
764
762
|
decodeFunctionResult(functionFragment: "settle", data: BytesLike): Result;
|
|
765
763
|
decodeFunctionResult(functionFragment: "settleNextTraderInPool", data: BytesLike): Result;
|
|
764
|
+
decodeFunctionResult(functionFragment: "settleTraders", data: BytesLike): Result;
|
|
766
765
|
decodeFunctionResult(functionFragment: "splitProtocolFee", data: BytesLike): Result;
|
|
767
766
|
decodeFunctionResult(functionFragment: "togglePerpEmergencyState", data: BytesLike): Result;
|
|
768
767
|
decodeFunctionResult(functionFragment: "tradeViaOrderBook", data: BytesLike): Result;
|
|
@@ -1621,6 +1620,12 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
1621
1620
|
], [
|
|
1622
1621
|
[bigint, bigint]
|
|
1623
1622
|
], "view">;
|
|
1623
|
+
clearTradersInPool: TypedContractMethod<[
|
|
1624
|
+
_id: BigNumberish,
|
|
1625
|
+
_bulkSize: BigNumberish
|
|
1626
|
+
], [
|
|
1627
|
+
boolean
|
|
1628
|
+
], "nonpayable">;
|
|
1624
1629
|
countActivePerpAccounts: TypedContractMethod<[
|
|
1625
1630
|
_perpetualId: BigNumberish
|
|
1626
1631
|
], [
|
|
@@ -2051,8 +2056,6 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
2051
2056
|
prdMktsLvgFee: TypedContractMethod<[
|
|
2052
2057
|
_fPx: BigNumberish,
|
|
2053
2058
|
_fm: BigNumberish,
|
|
2054
|
-
_fTotLong: BigNumberish,
|
|
2055
|
-
_fTotShort: BigNumberish,
|
|
2056
2059
|
_fTradeAmt: BigNumberish,
|
|
2057
2060
|
_fMgnRate: BigNumberish
|
|
2058
2061
|
], [
|
|
@@ -2103,6 +2106,11 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
2103
2106
|
], [
|
|
2104
2107
|
void
|
|
2105
2108
|
], "nonpayable">;
|
|
2109
|
+
resetMarkPremium: TypedContractMethod<[
|
|
2110
|
+
_iPerpetualId: BigNumberish
|
|
2111
|
+
], [
|
|
2112
|
+
void
|
|
2113
|
+
], "nonpayable">;
|
|
2106
2114
|
runLiquidityPool: TypedContractMethod<[
|
|
2107
2115
|
_liqPoolID: BigNumberish
|
|
2108
2116
|
], [
|
|
@@ -2261,6 +2269,12 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
2261
2269
|
], [
|
|
2262
2270
|
boolean
|
|
2263
2271
|
], "nonpayable">;
|
|
2272
|
+
settleTraders: TypedContractMethod<[
|
|
2273
|
+
_perpetualID: BigNumberish,
|
|
2274
|
+
_bulkSize: BigNumberish
|
|
2275
|
+
], [
|
|
2276
|
+
bigint
|
|
2277
|
+
], "nonpayable">;
|
|
2264
2278
|
splitProtocolFee: TypedContractMethod<[
|
|
2265
2279
|
fee: BigNumberish
|
|
2266
2280
|
], [
|
|
@@ -2424,6 +2438,12 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
2424
2438
|
], [
|
|
2425
2439
|
[bigint, bigint]
|
|
2426
2440
|
], "view">;
|
|
2441
|
+
getFunction(nameOrSignature: "clearTradersInPool"): TypedContractMethod<[
|
|
2442
|
+
_id: BigNumberish,
|
|
2443
|
+
_bulkSize: BigNumberish
|
|
2444
|
+
], [
|
|
2445
|
+
boolean
|
|
2446
|
+
], "nonpayable">;
|
|
2427
2447
|
getFunction(nameOrSignature: "countActivePerpAccounts"): TypedContractMethod<[_perpetualId: BigNumberish], [bigint], "view">;
|
|
2428
2448
|
getFunction(nameOrSignature: "createLiquidityPool"): TypedContractMethod<[
|
|
2429
2449
|
_marginTokenAddress: AddressLike,
|
|
@@ -2798,8 +2818,6 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
2798
2818
|
getFunction(nameOrSignature: "prdMktsLvgFee"): TypedContractMethod<[
|
|
2799
2819
|
_fPx: BigNumberish,
|
|
2800
2820
|
_fm: BigNumberish,
|
|
2801
|
-
_fTotLong: BigNumberish,
|
|
2802
|
-
_fTotShort: BigNumberish,
|
|
2803
2821
|
_fTradeAmt: BigNumberish,
|
|
2804
2822
|
_fMgnRate: BigNumberish
|
|
2805
2823
|
], [
|
|
@@ -2846,6 +2864,7 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
2846
2864
|
], [
|
|
2847
2865
|
void
|
|
2848
2866
|
], "nonpayable">;
|
|
2867
|
+
getFunction(nameOrSignature: "resetMarkPremium"): TypedContractMethod<[_iPerpetualId: BigNumberish], [void], "nonpayable">;
|
|
2849
2868
|
getFunction(nameOrSignature: "runLiquidityPool"): TypedContractMethod<[_liqPoolID: BigNumberish], [void], "nonpayable">;
|
|
2850
2869
|
getFunction(nameOrSignature: "setAMMPerpLogic"): TypedContractMethod<[_AMMPerpLogic: AddressLike], [void], "nonpayable">;
|
|
2851
2870
|
getFunction(nameOrSignature: "setBlockDelay"): TypedContractMethod<[_delay: BigNumberish], [void], "nonpayable">;
|
|
@@ -2968,6 +2987,12 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
2968
2987
|
void
|
|
2969
2988
|
], "nonpayable">;
|
|
2970
2989
|
getFunction(nameOrSignature: "settleNextTraderInPool"): TypedContractMethod<[_id: BigNumberish], [boolean], "nonpayable">;
|
|
2990
|
+
getFunction(nameOrSignature: "settleTraders"): TypedContractMethod<[
|
|
2991
|
+
_perpetualID: BigNumberish,
|
|
2992
|
+
_bulkSize: BigNumberish
|
|
2993
|
+
], [
|
|
2994
|
+
bigint
|
|
2995
|
+
], "nonpayable">;
|
|
2971
2996
|
getFunction(nameOrSignature: "splitProtocolFee"): TypedContractMethod<[fee: BigNumberish], [[bigint, bigint]], "view">;
|
|
2972
2997
|
getFunction(nameOrSignature: "togglePerpEmergencyState"): TypedContractMethod<[_perpetualId: BigNumberish], [void], "nonpayable">;
|
|
2973
2998
|
getFunction(nameOrSignature: "tradeViaOrderBook"): TypedContractMethod<[
|
|
@@ -1115,6 +1115,24 @@ export declare class IPerpetualManager__factory {
|
|
|
1115
1115
|
}];
|
|
1116
1116
|
readonly stateMutability: "view";
|
|
1117
1117
|
readonly type: "function";
|
|
1118
|
+
}, {
|
|
1119
|
+
readonly inputs: readonly [{
|
|
1120
|
+
readonly internalType: "uint8";
|
|
1121
|
+
readonly name: "_id";
|
|
1122
|
+
readonly type: "uint8";
|
|
1123
|
+
}, {
|
|
1124
|
+
readonly internalType: "uint256";
|
|
1125
|
+
readonly name: "_bulkSize";
|
|
1126
|
+
readonly type: "uint256";
|
|
1127
|
+
}];
|
|
1128
|
+
readonly name: "clearTradersInPool";
|
|
1129
|
+
readonly outputs: readonly [{
|
|
1130
|
+
readonly internalType: "bool";
|
|
1131
|
+
readonly name: "";
|
|
1132
|
+
readonly type: "bool";
|
|
1133
|
+
}];
|
|
1134
|
+
readonly stateMutability: "nonpayable";
|
|
1135
|
+
readonly type: "function";
|
|
1118
1136
|
}, {
|
|
1119
1137
|
readonly inputs: readonly [{
|
|
1120
1138
|
readonly internalType: "uint24";
|
|
@@ -3320,14 +3338,6 @@ export declare class IPerpetualManager__factory {
|
|
|
3320
3338
|
readonly internalType: "int128";
|
|
3321
3339
|
readonly name: "_fm";
|
|
3322
3340
|
readonly type: "int128";
|
|
3323
|
-
}, {
|
|
3324
|
-
readonly internalType: "int128";
|
|
3325
|
-
readonly name: "_fTotLong";
|
|
3326
|
-
readonly type: "int128";
|
|
3327
|
-
}, {
|
|
3328
|
-
readonly internalType: "int128";
|
|
3329
|
-
readonly name: "_fTotShort";
|
|
3330
|
-
readonly type: "int128";
|
|
3331
3341
|
}, {
|
|
3332
3342
|
readonly internalType: "int128";
|
|
3333
3343
|
readonly name: "_fTradeAmt";
|
|
@@ -3536,6 +3546,16 @@ export declare class IPerpetualManager__factory {
|
|
|
3536
3546
|
readonly outputs: readonly [];
|
|
3537
3547
|
readonly stateMutability: "nonpayable";
|
|
3538
3548
|
readonly type: "function";
|
|
3549
|
+
}, {
|
|
3550
|
+
readonly inputs: readonly [{
|
|
3551
|
+
readonly internalType: "uint24";
|
|
3552
|
+
readonly name: "_iPerpetualId";
|
|
3553
|
+
readonly type: "uint24";
|
|
3554
|
+
}];
|
|
3555
|
+
readonly name: "resetMarkPremium";
|
|
3556
|
+
readonly outputs: readonly [];
|
|
3557
|
+
readonly stateMutability: "nonpayable";
|
|
3558
|
+
readonly type: "function";
|
|
3539
3559
|
}, {
|
|
3540
3560
|
readonly inputs: readonly [{
|
|
3541
3561
|
readonly internalType: "uint8";
|
|
@@ -3888,6 +3908,24 @@ export declare class IPerpetualManager__factory {
|
|
|
3888
3908
|
}];
|
|
3889
3909
|
readonly stateMutability: "nonpayable";
|
|
3890
3910
|
readonly type: "function";
|
|
3911
|
+
}, {
|
|
3912
|
+
readonly inputs: readonly [{
|
|
3913
|
+
readonly internalType: "uint24";
|
|
3914
|
+
readonly name: "_perpetualID";
|
|
3915
|
+
readonly type: "uint24";
|
|
3916
|
+
}, {
|
|
3917
|
+
readonly internalType: "uint256";
|
|
3918
|
+
readonly name: "_bulkSize";
|
|
3919
|
+
readonly type: "uint256";
|
|
3920
|
+
}];
|
|
3921
|
+
readonly name: "settleTraders";
|
|
3922
|
+
readonly outputs: readonly [{
|
|
3923
|
+
readonly internalType: "uint256";
|
|
3924
|
+
readonly name: "_settled";
|
|
3925
|
+
readonly type: "uint256";
|
|
3926
|
+
}];
|
|
3927
|
+
readonly stateMutability: "nonpayable";
|
|
3928
|
+
readonly type: "function";
|
|
3891
3929
|
}, {
|
|
3892
3930
|
readonly inputs: readonly [{
|
|
3893
3931
|
readonly internalType: "uint16";
|
|
@@ -1408,6 +1408,30 @@ const _abi = [
|
|
|
1408
1408
|
stateMutability: "view",
|
|
1409
1409
|
type: "function",
|
|
1410
1410
|
},
|
|
1411
|
+
{
|
|
1412
|
+
inputs: [
|
|
1413
|
+
{
|
|
1414
|
+
internalType: "uint8",
|
|
1415
|
+
name: "_id",
|
|
1416
|
+
type: "uint8",
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
internalType: "uint256",
|
|
1420
|
+
name: "_bulkSize",
|
|
1421
|
+
type: "uint256",
|
|
1422
|
+
},
|
|
1423
|
+
],
|
|
1424
|
+
name: "clearTradersInPool",
|
|
1425
|
+
outputs: [
|
|
1426
|
+
{
|
|
1427
|
+
internalType: "bool",
|
|
1428
|
+
name: "",
|
|
1429
|
+
type: "bool",
|
|
1430
|
+
},
|
|
1431
|
+
],
|
|
1432
|
+
stateMutability: "nonpayable",
|
|
1433
|
+
type: "function",
|
|
1434
|
+
},
|
|
1411
1435
|
{
|
|
1412
1436
|
inputs: [
|
|
1413
1437
|
{
|
|
@@ -4272,16 +4296,6 @@ const _abi = [
|
|
|
4272
4296
|
name: "_fm",
|
|
4273
4297
|
type: "int128",
|
|
4274
4298
|
},
|
|
4275
|
-
{
|
|
4276
|
-
internalType: "int128",
|
|
4277
|
-
name: "_fTotLong",
|
|
4278
|
-
type: "int128",
|
|
4279
|
-
},
|
|
4280
|
-
{
|
|
4281
|
-
internalType: "int128",
|
|
4282
|
-
name: "_fTotShort",
|
|
4283
|
-
type: "int128",
|
|
4284
|
-
},
|
|
4285
4299
|
{
|
|
4286
4300
|
internalType: "int128",
|
|
4287
4301
|
name: "_fTradeAmt",
|
|
@@ -4552,6 +4566,19 @@ const _abi = [
|
|
|
4552
4566
|
stateMutability: "nonpayable",
|
|
4553
4567
|
type: "function",
|
|
4554
4568
|
},
|
|
4569
|
+
{
|
|
4570
|
+
inputs: [
|
|
4571
|
+
{
|
|
4572
|
+
internalType: "uint24",
|
|
4573
|
+
name: "_iPerpetualId",
|
|
4574
|
+
type: "uint24",
|
|
4575
|
+
},
|
|
4576
|
+
],
|
|
4577
|
+
name: "resetMarkPremium",
|
|
4578
|
+
outputs: [],
|
|
4579
|
+
stateMutability: "nonpayable",
|
|
4580
|
+
type: "function",
|
|
4581
|
+
},
|
|
4555
4582
|
{
|
|
4556
4583
|
inputs: [
|
|
4557
4584
|
{
|
|
@@ -5006,6 +5033,30 @@ const _abi = [
|
|
|
5006
5033
|
stateMutability: "nonpayable",
|
|
5007
5034
|
type: "function",
|
|
5008
5035
|
},
|
|
5036
|
+
{
|
|
5037
|
+
inputs: [
|
|
5038
|
+
{
|
|
5039
|
+
internalType: "uint24",
|
|
5040
|
+
name: "_perpetualID",
|
|
5041
|
+
type: "uint24",
|
|
5042
|
+
},
|
|
5043
|
+
{
|
|
5044
|
+
internalType: "uint256",
|
|
5045
|
+
name: "_bulkSize",
|
|
5046
|
+
type: "uint256",
|
|
5047
|
+
},
|
|
5048
|
+
],
|
|
5049
|
+
name: "settleTraders",
|
|
5050
|
+
outputs: [
|
|
5051
|
+
{
|
|
5052
|
+
internalType: "uint256",
|
|
5053
|
+
name: "_settled",
|
|
5054
|
+
type: "uint256",
|
|
5055
|
+
},
|
|
5056
|
+
],
|
|
5057
|
+
stateMutability: "nonpayable",
|
|
5058
|
+
type: "function",
|
|
5059
|
+
},
|
|
5009
5060
|
{
|
|
5010
5061
|
inputs: [
|
|
5011
5062
|
{
|