@d8x/perpetuals-sdk 2.5.13 → 2.5.15
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 +93 -16
- package/dist/cjs/abi/PerpetualManagerProxy.json +1 -1
- package/dist/cjs/constants.d.ts +1 -0
- package/dist/cjs/constants.js +2 -1
- package/dist/cjs/constants.js.map +1 -1
- package/dist/cjs/contracts/IPerpetualManager.d.ts +20 -13
- package/dist/cjs/contracts/PerpetualManagerProxy.d.ts +3 -3
- package/dist/cjs/contracts/factories/IPerpetualManager__factory.d.ts +74 -13
- package/dist/cjs/contracts/factories/IPerpetualManager__factory.js +93 -16
- package/dist/cjs/contracts/factories/IPerpetualManager__factory.js.map +1 -1
- package/dist/cjs/contracts/factories/PerpetualManagerProxy__factory.d.ts +1 -1
- package/dist/cjs/contracts/factories/PerpetualManagerProxy__factory.js +1 -1
- package/dist/cjs/marketData.js +5 -2
- package/dist/cjs/marketData.js.map +1 -1
- package/dist/cjs/nodeSDKTypes.d.ts +1 -0
- package/dist/cjs/nodeSDKTypes.js.map +1 -1
- package/dist/cjs/perpetualDataHandler.d.ts +23 -0
- package/dist/cjs/perpetualDataHandler.js +56 -2
- package/dist/cjs/perpetualDataHandler.js.map +1 -1
- package/dist/cjs/priceFeeds.js +1 -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 +93 -16
- package/dist/esm/abi/PerpetualManagerProxy.json +1 -1
- package/dist/esm/constants.d.ts +1 -0
- package/dist/esm/constants.js +1 -0
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/contracts/IPerpetualManager.d.ts +20 -13
- package/dist/esm/contracts/PerpetualManagerProxy.d.ts +3 -3
- package/dist/esm/contracts/factories/IPerpetualManager__factory.d.ts +74 -13
- package/dist/esm/contracts/factories/IPerpetualManager__factory.js +93 -16
- package/dist/esm/contracts/factories/IPerpetualManager__factory.js.map +1 -1
- package/dist/esm/contracts/factories/PerpetualManagerProxy__factory.d.ts +1 -1
- package/dist/esm/contracts/factories/PerpetualManagerProxy__factory.js +1 -1
- package/dist/esm/marketData.js +5 -2
- package/dist/esm/marketData.js.map +1 -1
- package/dist/esm/nodeSDKTypes.d.ts +1 -0
- package/dist/esm/nodeSDKTypes.js.map +1 -1
- package/dist/esm/perpetualDataHandler.d.ts +23 -0
- package/dist/esm/perpetualDataHandler.js +56 -2
- package/dist/esm/perpetualDataHandler.js.map +1 -1
- package/dist/esm/priceFeeds.js +1 -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 +5589 -5512
- package/src/abi/PerpetualManagerProxy.json +1597 -1597
- package/src/constants.ts +2 -0
- package/src/contracts/IPerpetualManager.ts +29 -22
- package/src/contracts/PerpetualManagerProxy.ts +3 -3
- package/src/contracts/factories/IPerpetualManager__factory.ts +93 -16
- package/src/contracts/factories/PerpetualManagerProxy__factory.ts +1 -1
- package/src/marketData.ts +5 -3
- package/src/nodeSDKTypes.ts +1 -0
- package/src/perpetualDataHandler.ts +60 -3
- package/src/priceFeeds.ts +1 -1
- package/src/version.ts +1 -1
|
@@ -3178,7 +3178,7 @@
|
|
|
3178
3178
|
},
|
|
3179
3179
|
{
|
|
3180
3180
|
"internalType": "int128",
|
|
3181
|
-
"name": "
|
|
3181
|
+
"name": "fParams",
|
|
3182
3182
|
"type": "int128"
|
|
3183
3183
|
},
|
|
3184
3184
|
{
|
|
@@ -3359,6 +3359,11 @@
|
|
|
3359
3359
|
"internalType": "int128",
|
|
3360
3360
|
"name": "perpFlags",
|
|
3361
3361
|
"type": "int128"
|
|
3362
|
+
},
|
|
3363
|
+
{
|
|
3364
|
+
"internalType": "int128",
|
|
3365
|
+
"name": "fAMMTargetDD",
|
|
3366
|
+
"type": "int128"
|
|
3362
3367
|
}
|
|
3363
3368
|
],
|
|
3364
3369
|
"internalType": "struct IPerpetualInfo.PerpetualStaticInfo[]",
|
|
@@ -3443,7 +3448,7 @@
|
|
|
3443
3448
|
},
|
|
3444
3449
|
{
|
|
3445
3450
|
"internalType": "uint16",
|
|
3446
|
-
"name": "
|
|
3451
|
+
"name": "minimalSpreadBps",
|
|
3447
3452
|
"type": "uint16"
|
|
3448
3453
|
},
|
|
3449
3454
|
{
|
|
@@ -3570,7 +3575,7 @@
|
|
|
3570
3575
|
},
|
|
3571
3576
|
{
|
|
3572
3577
|
"internalType": "int128",
|
|
3573
|
-
"name": "
|
|
3578
|
+
"name": "fParams",
|
|
3574
3579
|
"type": "int128"
|
|
3575
3580
|
},
|
|
3576
3581
|
{
|
|
@@ -5074,6 +5079,91 @@
|
|
|
5074
5079
|
"stateMutability": "pure",
|
|
5075
5080
|
"type": "function"
|
|
5076
5081
|
},
|
|
5082
|
+
{
|
|
5083
|
+
"inputs": [
|
|
5084
|
+
{
|
|
5085
|
+
"components": [
|
|
5086
|
+
{
|
|
5087
|
+
"internalType": "uint16",
|
|
5088
|
+
"name": "leverageTDR",
|
|
5089
|
+
"type": "uint16"
|
|
5090
|
+
},
|
|
5091
|
+
{
|
|
5092
|
+
"internalType": "uint16",
|
|
5093
|
+
"name": "brokerFeeTbps",
|
|
5094
|
+
"type": "uint16"
|
|
5095
|
+
},
|
|
5096
|
+
{
|
|
5097
|
+
"internalType": "uint24",
|
|
5098
|
+
"name": "iPerpetualId",
|
|
5099
|
+
"type": "uint24"
|
|
5100
|
+
},
|
|
5101
|
+
{
|
|
5102
|
+
"internalType": "address",
|
|
5103
|
+
"name": "traderAddr",
|
|
5104
|
+
"type": "address"
|
|
5105
|
+
},
|
|
5106
|
+
{
|
|
5107
|
+
"internalType": "uint32",
|
|
5108
|
+
"name": "executionTimestamp",
|
|
5109
|
+
"type": "uint32"
|
|
5110
|
+
},
|
|
5111
|
+
{
|
|
5112
|
+
"internalType": "address",
|
|
5113
|
+
"name": "brokerAddr",
|
|
5114
|
+
"type": "address"
|
|
5115
|
+
},
|
|
5116
|
+
{
|
|
5117
|
+
"internalType": "uint32",
|
|
5118
|
+
"name": "submittedTimestamp",
|
|
5119
|
+
"type": "uint32"
|
|
5120
|
+
},
|
|
5121
|
+
{
|
|
5122
|
+
"internalType": "uint32",
|
|
5123
|
+
"name": "flags",
|
|
5124
|
+
"type": "uint32"
|
|
5125
|
+
},
|
|
5126
|
+
{
|
|
5127
|
+
"internalType": "uint32",
|
|
5128
|
+
"name": "iDeadline",
|
|
5129
|
+
"type": "uint32"
|
|
5130
|
+
},
|
|
5131
|
+
{
|
|
5132
|
+
"internalType": "address",
|
|
5133
|
+
"name": "executorAddr",
|
|
5134
|
+
"type": "address"
|
|
5135
|
+
},
|
|
5136
|
+
{
|
|
5137
|
+
"internalType": "int128",
|
|
5138
|
+
"name": "fAmount",
|
|
5139
|
+
"type": "int128"
|
|
5140
|
+
},
|
|
5141
|
+
{
|
|
5142
|
+
"internalType": "int128",
|
|
5143
|
+
"name": "fLimitPrice",
|
|
5144
|
+
"type": "int128"
|
|
5145
|
+
},
|
|
5146
|
+
{
|
|
5147
|
+
"internalType": "int128",
|
|
5148
|
+
"name": "fTriggerPrice",
|
|
5149
|
+
"type": "int128"
|
|
5150
|
+
},
|
|
5151
|
+
{
|
|
5152
|
+
"internalType": "bytes",
|
|
5153
|
+
"name": "brokerSignature",
|
|
5154
|
+
"type": "bytes"
|
|
5155
|
+
}
|
|
5156
|
+
],
|
|
5157
|
+
"internalType": "struct IPerpetualOrder.Order",
|
|
5158
|
+
"name": "_order",
|
|
5159
|
+
"type": "tuple"
|
|
5160
|
+
}
|
|
5161
|
+
],
|
|
5162
|
+
"name": "testTradeEvent",
|
|
5163
|
+
"outputs": [],
|
|
5164
|
+
"stateMutability": "nonpayable",
|
|
5165
|
+
"type": "function"
|
|
5166
|
+
},
|
|
5077
5167
|
{
|
|
5078
5168
|
"inputs": [
|
|
5079
5169
|
{
|
|
@@ -5281,19 +5371,6 @@
|
|
|
5281
5371
|
"stateMutability": "nonpayable",
|
|
5282
5372
|
"type": "function"
|
|
5283
5373
|
},
|
|
5284
|
-
{
|
|
5285
|
-
"inputs": [
|
|
5286
|
-
{
|
|
5287
|
-
"internalType": "uint8",
|
|
5288
|
-
"name": "_iPoolIndex",
|
|
5289
|
-
"type": "uint8"
|
|
5290
|
-
}
|
|
5291
|
-
],
|
|
5292
|
-
"name": "updateDefaultFundTargetSizeRandom",
|
|
5293
|
-
"outputs": [],
|
|
5294
|
-
"stateMutability": "nonpayable",
|
|
5295
|
-
"type": "function"
|
|
5296
|
-
},
|
|
5297
5374
|
{
|
|
5298
5375
|
"inputs": [
|
|
5299
5376
|
{
|
package/dist/cjs/constants.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare const MASK_STOP_ORDER: bigint;
|
|
|
26
26
|
export declare const MASK_KEEP_POS_LEVERAGE: bigint;
|
|
27
27
|
export declare const MASK_PREDICTION_MARKET = 2n;
|
|
28
28
|
export declare const MASK_LOW_LIQUIDITY_MARKET = 4n;
|
|
29
|
+
export declare const MASK_TRADFI_MARKET = 8n;
|
|
29
30
|
export declare const ORDER_TYPE_LIMIT = "LIMIT";
|
|
30
31
|
export declare const ORDER_TYPE_MARKET = "MARKET";
|
|
31
32
|
export declare const ORDER_TYPE_STOP_MARKET = "STOP_MARKET";
|
package/dist/cjs/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_CONFIG = exports.DEFAULT_CONFIG_TESTNET_NAME = exports.DEFAULT_CONFIG_MAINNET_NAME = exports.OrderStatus = exports.CollaterlCCY = exports.CLOSED_SIDE = exports.SELL_SIDE = exports.BUY_SIDE = exports.ORDER_TYPE_STOP_LIMIT = exports.ORDER_TYPE_STOP_MARKET = exports.ORDER_TYPE_MARKET = exports.ORDER_TYPE_LIMIT = exports.MASK_LOW_LIQUIDITY_MARKET = exports.MASK_PREDICTION_MARKET = exports.MASK_KEEP_POS_LEVERAGE = exports.MASK_STOP_ORDER = exports.MASK_MARKET_ORDER = exports.MASK_LIMIT_ORDER = exports.MASK_CLOSE_ONLY = exports.ORDER_MAX_DURATION_SEC = exports.DECIMALS = exports.MAX_UINT_256 = exports.MAX_64x64 = exports.ONE_64x64 = exports.MULTICALL_ADDRESS = exports.ZERO_ORDER_ID = exports.ZERO_ADDRESS = exports.PERP_STATE_STR = exports.COLLATERAL_CURRENCY_QUANTO = exports.COLLATERAL_CURRENCY_BASE = exports.COLLATERAL_CURRENCY_QUOTE = exports.SYMBOL_LIST = exports.MULTICALL3_ABI = exports.SHARE_TOKEN_ABI = exports.LOB_ABI = exports.LOB_FACTORY_ABI = exports.PROXY_ABI = exports.MOCK_TOKEN_SWAP_ABI = exports.ERC20_ABI = void 0;
|
|
3
|
+
exports.DEFAULT_CONFIG = exports.DEFAULT_CONFIG_TESTNET_NAME = exports.DEFAULT_CONFIG_MAINNET_NAME = exports.OrderStatus = exports.CollaterlCCY = exports.CLOSED_SIDE = exports.SELL_SIDE = exports.BUY_SIDE = exports.ORDER_TYPE_STOP_LIMIT = exports.ORDER_TYPE_STOP_MARKET = exports.ORDER_TYPE_MARKET = exports.ORDER_TYPE_LIMIT = exports.MASK_TRADFI_MARKET = exports.MASK_LOW_LIQUIDITY_MARKET = exports.MASK_PREDICTION_MARKET = exports.MASK_KEEP_POS_LEVERAGE = exports.MASK_STOP_ORDER = exports.MASK_MARKET_ORDER = exports.MASK_LIMIT_ORDER = exports.MASK_CLOSE_ONLY = exports.ORDER_MAX_DURATION_SEC = exports.DECIMALS = exports.MAX_UINT_256 = exports.MAX_64x64 = exports.ONE_64x64 = exports.MULTICALL_ADDRESS = exports.ZERO_ORDER_ID = exports.ZERO_ADDRESS = exports.PERP_STATE_STR = exports.COLLATERAL_CURRENCY_QUANTO = exports.COLLATERAL_CURRENCY_BASE = exports.COLLATERAL_CURRENCY_QUOTE = exports.SYMBOL_LIST = exports.MULTICALL3_ABI = exports.SHARE_TOKEN_ABI = exports.LOB_ABI = exports.LOB_FACTORY_ABI = exports.PROXY_ABI = exports.MOCK_TOKEN_SWAP_ABI = exports.ERC20_ABI = void 0;
|
|
4
4
|
const ethers_1 = require("ethers");
|
|
5
5
|
exports.ERC20_ABI = require("./abi/ERC20.json");
|
|
6
6
|
exports.MOCK_TOKEN_SWAP_ABI = require("./abi/MockTokenSwap.json");
|
|
@@ -30,6 +30,7 @@ exports.MASK_STOP_ORDER = BigInt("0x20000000");
|
|
|
30
30
|
exports.MASK_KEEP_POS_LEVERAGE = BigInt("0x08000000");
|
|
31
31
|
exports.MASK_PREDICTION_MARKET = 2n;
|
|
32
32
|
exports.MASK_LOW_LIQUIDITY_MARKET = 4n;
|
|
33
|
+
exports.MASK_TRADFI_MARKET = 8n;
|
|
33
34
|
exports.ORDER_TYPE_LIMIT = "LIMIT";
|
|
34
35
|
exports.ORDER_TYPE_MARKET = "MARKET";
|
|
35
36
|
exports.ORDER_TYPE_STOP_MARKET = "STOP_MARKET";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";;;AAAA,mCAA+C;AAGlC,QAAA,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACxC,QAAA,mBAAmB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;AAC1D,QAAA,SAAS,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;AACjE,+EAA+E;AAClE,QAAA,eAAe,GAAG,OAAO,CAAC,kCAAkC,CAAC,CAAC;AAC9D,QAAA,OAAO,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAC/C,QAAA,eAAe,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AACnD,QAAA,cAAc,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;AAElD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C;IAC5B,MAAM,CAAC,MAAM,GAAG,eAAO,CAAC;IACxB,MAAM,CAAC,aAAa,GAAG,uBAAe,CAAC;IACvC,MAAM,CAAC,aAAa,GAAG,uBAAe,CAAC;AACzC,CAAC,CAAC,CAAC;AACU,QAAA,cAAc,GAAG,cAAc,CAAC"}
|
|
@@ -218,7 +218,7 @@ export declare namespace PerpStorage {
|
|
|
218
218
|
fMinimalAMMExposureEMA: BigNumberish;
|
|
219
219
|
fSettlementS3PriceData: BigNumberish;
|
|
220
220
|
fSettlementS2PriceData: BigNumberish;
|
|
221
|
-
|
|
221
|
+
fParams: BigNumberish;
|
|
222
222
|
fMarkPriceEMALambda: BigNumberish;
|
|
223
223
|
fFundingRateClamp: BigNumberish;
|
|
224
224
|
fMaximalTradeSizeBumpUp: BigNumberish;
|
|
@@ -264,7 +264,7 @@ export declare namespace PerpStorage {
|
|
|
264
264
|
fMinimalAMMExposureEMA: bigint,
|
|
265
265
|
fSettlementS3PriceData: bigint,
|
|
266
266
|
fSettlementS2PriceData: bigint,
|
|
267
|
-
|
|
267
|
+
fParams: bigint,
|
|
268
268
|
fMarkPriceEMALambda: bigint,
|
|
269
269
|
fFundingRateClamp: bigint,
|
|
270
270
|
fMaximalTradeSizeBumpUp: bigint,
|
|
@@ -309,7 +309,7 @@ export declare namespace PerpStorage {
|
|
|
309
309
|
fMinimalAMMExposureEMA: bigint;
|
|
310
310
|
fSettlementS3PriceData: bigint;
|
|
311
311
|
fSettlementS2PriceData: bigint;
|
|
312
|
-
|
|
312
|
+
fParams: bigint;
|
|
313
313
|
fMarkPriceEMALambda: bigint;
|
|
314
314
|
fFundingRateClamp: bigint;
|
|
315
315
|
fMaximalTradeSizeBumpUp: bigint;
|
|
@@ -351,6 +351,7 @@ export declare namespace IPerpetualInfo {
|
|
|
351
351
|
priceIds: BytesLike[];
|
|
352
352
|
isPyth: boolean[];
|
|
353
353
|
perpFlags: BigNumberish;
|
|
354
|
+
fAMMTargetDD: BigNumberish;
|
|
354
355
|
};
|
|
355
356
|
type PerpetualStaticInfoStructOutput = [
|
|
356
357
|
id: bigint,
|
|
@@ -367,7 +368,8 @@ export declare namespace IPerpetualInfo {
|
|
|
367
368
|
fReferralRebateCC: bigint,
|
|
368
369
|
priceIds: string[],
|
|
369
370
|
isPyth: boolean[],
|
|
370
|
-
perpFlags: bigint
|
|
371
|
+
perpFlags: bigint,
|
|
372
|
+
fAMMTargetDD: bigint
|
|
371
373
|
] & {
|
|
372
374
|
id: bigint;
|
|
373
375
|
limitOrderBookAddr: string;
|
|
@@ -384,10 +386,11 @@ export declare namespace IPerpetualInfo {
|
|
|
384
386
|
priceIds: string[];
|
|
385
387
|
isPyth: boolean[];
|
|
386
388
|
perpFlags: bigint;
|
|
389
|
+
fAMMTargetDD: bigint;
|
|
387
390
|
};
|
|
388
391
|
}
|
|
389
392
|
export interface IPerpetualManagerInterface extends Interface {
|
|
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" | "
|
|
393
|
+
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" | "testTradeEvent" | "togglePerpEmergencyState" | "tradeViaOrderBook" | "transferBrokerLots" | "transferBrokerOwnership" | "transferEarningsToTreasury" | "transferValueToTreasury" | "updateAMMTargetFundSize" | "updateDefaultFundTargetSize" | "updateFundingAndPricesAfter" | "updateFundingAndPricesBefore" | "updatePriceFeeds" | "updateVolumeEMAOnNewTrade" | "validateStopPrice" | "withdraw" | "withdrawAll" | "withdrawDepositFromMarginAccount" | "withdrawFromDefaultFund" | "withdrawLiquidity"): FunctionFragment;
|
|
391
394
|
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
395
|
encodeFunctionData(functionFragment: "activatePerpetual", values: [BigNumberish]): string;
|
|
393
396
|
encodeFunctionData(functionFragment: "addLiquidity", values: [BigNumberish, BigNumberish]): string;
|
|
@@ -620,6 +623,7 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
620
623
|
encodeFunctionData(functionFragment: "settleNextTraderInPool", values: [BigNumberish]): string;
|
|
621
624
|
encodeFunctionData(functionFragment: "settleTraders", values: [BigNumberish, BigNumberish]): string;
|
|
622
625
|
encodeFunctionData(functionFragment: "splitProtocolFee", values: [BigNumberish]): string;
|
|
626
|
+
encodeFunctionData(functionFragment: "testTradeEvent", values: [IPerpetualOrder.OrderStruct]): string;
|
|
623
627
|
encodeFunctionData(functionFragment: "togglePerpEmergencyState", values: [BigNumberish]): string;
|
|
624
628
|
encodeFunctionData(functionFragment: "tradeViaOrderBook", values: [IPerpetualOrder.OrderStruct, AddressLike]): string;
|
|
625
629
|
encodeFunctionData(functionFragment: "transferBrokerLots", values: [BigNumberish, AddressLike, BigNumberish]): string;
|
|
@@ -628,7 +632,6 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
628
632
|
encodeFunctionData(functionFragment: "transferValueToTreasury", values?: undefined): string;
|
|
629
633
|
encodeFunctionData(functionFragment: "updateAMMTargetFundSize", values: [BigNumberish]): string;
|
|
630
634
|
encodeFunctionData(functionFragment: "updateDefaultFundTargetSize", values: [BigNumberish]): string;
|
|
631
|
-
encodeFunctionData(functionFragment: "updateDefaultFundTargetSizeRandom", values: [BigNumberish]): string;
|
|
632
635
|
encodeFunctionData(functionFragment: "updateFundingAndPricesAfter", values: [BigNumberish]): string;
|
|
633
636
|
encodeFunctionData(functionFragment: "updateFundingAndPricesBefore", values: [BigNumberish, boolean]): string;
|
|
634
637
|
encodeFunctionData(functionFragment: "updatePriceFeeds", values: [BigNumberish, BytesLike[], BigNumberish[], BigNumberish]): string;
|
|
@@ -763,6 +766,7 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
763
766
|
decodeFunctionResult(functionFragment: "settleNextTraderInPool", data: BytesLike): Result;
|
|
764
767
|
decodeFunctionResult(functionFragment: "settleTraders", data: BytesLike): Result;
|
|
765
768
|
decodeFunctionResult(functionFragment: "splitProtocolFee", data: BytesLike): Result;
|
|
769
|
+
decodeFunctionResult(functionFragment: "testTradeEvent", data: BytesLike): Result;
|
|
766
770
|
decodeFunctionResult(functionFragment: "togglePerpEmergencyState", data: BytesLike): Result;
|
|
767
771
|
decodeFunctionResult(functionFragment: "tradeViaOrderBook", data: BytesLike): Result;
|
|
768
772
|
decodeFunctionResult(functionFragment: "transferBrokerLots", data: BytesLike): Result;
|
|
@@ -771,7 +775,6 @@ export interface IPerpetualManagerInterface extends Interface {
|
|
|
771
775
|
decodeFunctionResult(functionFragment: "transferValueToTreasury", data: BytesLike): Result;
|
|
772
776
|
decodeFunctionResult(functionFragment: "updateAMMTargetFundSize", data: BytesLike): Result;
|
|
773
777
|
decodeFunctionResult(functionFragment: "updateDefaultFundTargetSize", data: BytesLike): Result;
|
|
774
|
-
decodeFunctionResult(functionFragment: "updateDefaultFundTargetSizeRandom", data: BytesLike): Result;
|
|
775
778
|
decodeFunctionResult(functionFragment: "updateFundingAndPricesAfter", data: BytesLike): Result;
|
|
776
779
|
decodeFunctionResult(functionFragment: "updateFundingAndPricesBefore", data: BytesLike): Result;
|
|
777
780
|
decodeFunctionResult(functionFragment: "updatePriceFeeds", data: BytesLike): Result;
|
|
@@ -2280,6 +2283,11 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
2280
2283
|
], [
|
|
2281
2284
|
[bigint, bigint]
|
|
2282
2285
|
], "view">;
|
|
2286
|
+
testTradeEvent: TypedContractMethod<[
|
|
2287
|
+
_order: IPerpetualOrder.OrderStruct
|
|
2288
|
+
], [
|
|
2289
|
+
void
|
|
2290
|
+
], "nonpayable">;
|
|
2283
2291
|
togglePerpEmergencyState: TypedContractMethod<[
|
|
2284
2292
|
_perpetualId: BigNumberish
|
|
2285
2293
|
], [
|
|
@@ -2321,11 +2329,6 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
2321
2329
|
], [
|
|
2322
2330
|
void
|
|
2323
2331
|
], "nonpayable">;
|
|
2324
|
-
updateDefaultFundTargetSizeRandom: TypedContractMethod<[
|
|
2325
|
-
_iPoolIndex: BigNumberish
|
|
2326
|
-
], [
|
|
2327
|
-
void
|
|
2328
|
-
], "nonpayable">;
|
|
2329
2332
|
updateFundingAndPricesAfter: TypedContractMethod<[
|
|
2330
2333
|
_iPerpetualId: BigNumberish
|
|
2331
2334
|
], [
|
|
@@ -2994,6 +2997,11 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
2994
2997
|
bigint
|
|
2995
2998
|
], "nonpayable">;
|
|
2996
2999
|
getFunction(nameOrSignature: "splitProtocolFee"): TypedContractMethod<[fee: BigNumberish], [[bigint, bigint]], "view">;
|
|
3000
|
+
getFunction(nameOrSignature: "testTradeEvent"): TypedContractMethod<[
|
|
3001
|
+
_order: IPerpetualOrder.OrderStruct
|
|
3002
|
+
], [
|
|
3003
|
+
void
|
|
3004
|
+
], "nonpayable">;
|
|
2997
3005
|
getFunction(nameOrSignature: "togglePerpEmergencyState"): TypedContractMethod<[_perpetualId: BigNumberish], [void], "nonpayable">;
|
|
2998
3006
|
getFunction(nameOrSignature: "tradeViaOrderBook"): TypedContractMethod<[
|
|
2999
3007
|
_order: IPerpetualOrder.OrderStruct,
|
|
@@ -3023,7 +3031,6 @@ export interface IPerpetualManager extends BaseContract {
|
|
|
3023
3031
|
getFunction(nameOrSignature: "transferValueToTreasury"): TypedContractMethod<[], [boolean], "nonpayable">;
|
|
3024
3032
|
getFunction(nameOrSignature: "updateAMMTargetFundSize"): TypedContractMethod<[_iPerpetualId: BigNumberish], [void], "nonpayable">;
|
|
3025
3033
|
getFunction(nameOrSignature: "updateDefaultFundTargetSize"): TypedContractMethod<[_iPerpetualId: BigNumberish], [void], "nonpayable">;
|
|
3026
|
-
getFunction(nameOrSignature: "updateDefaultFundTargetSizeRandom"): TypedContractMethod<[_iPoolIndex: BigNumberish], [void], "nonpayable">;
|
|
3027
3034
|
getFunction(nameOrSignature: "updateFundingAndPricesAfter"): TypedContractMethod<[_iPerpetualId: BigNumberish], [void], "nonpayable">;
|
|
3028
3035
|
getFunction(nameOrSignature: "updateFundingAndPricesBefore"): TypedContractMethod<[
|
|
3029
3036
|
_iPerpetualId: BigNumberish,
|
|
@@ -943,19 +943,19 @@ export declare namespace UpdateMarkPriceEvent {
|
|
|
943
943
|
perpetualId: BigNumberish,
|
|
944
944
|
fMidPricePremium: BigNumberish,
|
|
945
945
|
fMarkPricePremium: BigNumberish,
|
|
946
|
-
|
|
946
|
+
fMarkIndexPrice: BigNumberish
|
|
947
947
|
];
|
|
948
948
|
type OutputTuple = [
|
|
949
949
|
perpetualId: bigint,
|
|
950
950
|
fMidPricePremium: bigint,
|
|
951
951
|
fMarkPricePremium: bigint,
|
|
952
|
-
|
|
952
|
+
fMarkIndexPrice: bigint
|
|
953
953
|
];
|
|
954
954
|
interface OutputObject {
|
|
955
955
|
perpetualId: bigint;
|
|
956
956
|
fMidPricePremium: bigint;
|
|
957
957
|
fMarkPricePremium: bigint;
|
|
958
|
-
|
|
958
|
+
fMarkIndexPrice: bigint;
|
|
959
959
|
}
|
|
960
960
|
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
961
961
|
type Filter = TypedDeferredTopicFilter<Event>;
|
|
@@ -2483,7 +2483,7 @@ export declare class IPerpetualManager__factory {
|
|
|
2483
2483
|
readonly type: "int128";
|
|
2484
2484
|
}, {
|
|
2485
2485
|
readonly internalType: "int128";
|
|
2486
|
-
readonly name: "
|
|
2486
|
+
readonly name: "fParams";
|
|
2487
2487
|
readonly type: "int128";
|
|
2488
2488
|
}, {
|
|
2489
2489
|
readonly internalType: "int32";
|
|
@@ -2624,6 +2624,10 @@ export declare class IPerpetualManager__factory {
|
|
|
2624
2624
|
readonly internalType: "int128";
|
|
2625
2625
|
readonly name: "perpFlags";
|
|
2626
2626
|
readonly type: "int128";
|
|
2627
|
+
}, {
|
|
2628
|
+
readonly internalType: "int128";
|
|
2629
|
+
readonly name: "fAMMTargetDD";
|
|
2630
|
+
readonly type: "int128";
|
|
2627
2631
|
}];
|
|
2628
2632
|
readonly internalType: "struct IPerpetualInfo.PerpetualStaticInfo[]";
|
|
2629
2633
|
readonly name: "";
|
|
@@ -2689,7 +2693,7 @@ export declare class IPerpetualManager__factory {
|
|
|
2689
2693
|
readonly type: "uint16";
|
|
2690
2694
|
}, {
|
|
2691
2695
|
readonly internalType: "uint16";
|
|
2692
|
-
readonly name: "
|
|
2696
|
+
readonly name: "minimalSpreadBps";
|
|
2693
2697
|
readonly type: "uint16";
|
|
2694
2698
|
}, {
|
|
2695
2699
|
readonly internalType: "bytes4";
|
|
@@ -2790,7 +2794,7 @@ export declare class IPerpetualManager__factory {
|
|
|
2790
2794
|
readonly type: "int128";
|
|
2791
2795
|
}, {
|
|
2792
2796
|
readonly internalType: "int128";
|
|
2793
|
-
readonly name: "
|
|
2797
|
+
readonly name: "fParams";
|
|
2794
2798
|
readonly type: "int128";
|
|
2795
2799
|
}, {
|
|
2796
2800
|
readonly internalType: "int32";
|
|
@@ -3944,6 +3948,73 @@ export declare class IPerpetualManager__factory {
|
|
|
3944
3948
|
}];
|
|
3945
3949
|
readonly stateMutability: "pure";
|
|
3946
3950
|
readonly type: "function";
|
|
3951
|
+
}, {
|
|
3952
|
+
readonly inputs: readonly [{
|
|
3953
|
+
readonly components: readonly [{
|
|
3954
|
+
readonly internalType: "uint16";
|
|
3955
|
+
readonly name: "leverageTDR";
|
|
3956
|
+
readonly type: "uint16";
|
|
3957
|
+
}, {
|
|
3958
|
+
readonly internalType: "uint16";
|
|
3959
|
+
readonly name: "brokerFeeTbps";
|
|
3960
|
+
readonly type: "uint16";
|
|
3961
|
+
}, {
|
|
3962
|
+
readonly internalType: "uint24";
|
|
3963
|
+
readonly name: "iPerpetualId";
|
|
3964
|
+
readonly type: "uint24";
|
|
3965
|
+
}, {
|
|
3966
|
+
readonly internalType: "address";
|
|
3967
|
+
readonly name: "traderAddr";
|
|
3968
|
+
readonly type: "address";
|
|
3969
|
+
}, {
|
|
3970
|
+
readonly internalType: "uint32";
|
|
3971
|
+
readonly name: "executionTimestamp";
|
|
3972
|
+
readonly type: "uint32";
|
|
3973
|
+
}, {
|
|
3974
|
+
readonly internalType: "address";
|
|
3975
|
+
readonly name: "brokerAddr";
|
|
3976
|
+
readonly type: "address";
|
|
3977
|
+
}, {
|
|
3978
|
+
readonly internalType: "uint32";
|
|
3979
|
+
readonly name: "submittedTimestamp";
|
|
3980
|
+
readonly type: "uint32";
|
|
3981
|
+
}, {
|
|
3982
|
+
readonly internalType: "uint32";
|
|
3983
|
+
readonly name: "flags";
|
|
3984
|
+
readonly type: "uint32";
|
|
3985
|
+
}, {
|
|
3986
|
+
readonly internalType: "uint32";
|
|
3987
|
+
readonly name: "iDeadline";
|
|
3988
|
+
readonly type: "uint32";
|
|
3989
|
+
}, {
|
|
3990
|
+
readonly internalType: "address";
|
|
3991
|
+
readonly name: "executorAddr";
|
|
3992
|
+
readonly type: "address";
|
|
3993
|
+
}, {
|
|
3994
|
+
readonly internalType: "int128";
|
|
3995
|
+
readonly name: "fAmount";
|
|
3996
|
+
readonly type: "int128";
|
|
3997
|
+
}, {
|
|
3998
|
+
readonly internalType: "int128";
|
|
3999
|
+
readonly name: "fLimitPrice";
|
|
4000
|
+
readonly type: "int128";
|
|
4001
|
+
}, {
|
|
4002
|
+
readonly internalType: "int128";
|
|
4003
|
+
readonly name: "fTriggerPrice";
|
|
4004
|
+
readonly type: "int128";
|
|
4005
|
+
}, {
|
|
4006
|
+
readonly internalType: "bytes";
|
|
4007
|
+
readonly name: "brokerSignature";
|
|
4008
|
+
readonly type: "bytes";
|
|
4009
|
+
}];
|
|
4010
|
+
readonly internalType: "struct IPerpetualOrder.Order";
|
|
4011
|
+
readonly name: "_order";
|
|
4012
|
+
readonly type: "tuple";
|
|
4013
|
+
}];
|
|
4014
|
+
readonly name: "testTradeEvent";
|
|
4015
|
+
readonly outputs: readonly [];
|
|
4016
|
+
readonly stateMutability: "nonpayable";
|
|
4017
|
+
readonly type: "function";
|
|
3947
4018
|
}, {
|
|
3948
4019
|
readonly inputs: readonly [{
|
|
3949
4020
|
readonly internalType: "uint24";
|
|
@@ -4105,16 +4176,6 @@ export declare class IPerpetualManager__factory {
|
|
|
4105
4176
|
readonly outputs: readonly [];
|
|
4106
4177
|
readonly stateMutability: "nonpayable";
|
|
4107
4178
|
readonly type: "function";
|
|
4108
|
-
}, {
|
|
4109
|
-
readonly inputs: readonly [{
|
|
4110
|
-
readonly internalType: "uint8";
|
|
4111
|
-
readonly name: "_iPoolIndex";
|
|
4112
|
-
readonly type: "uint8";
|
|
4113
|
-
}];
|
|
4114
|
-
readonly name: "updateDefaultFundTargetSizeRandom";
|
|
4115
|
-
readonly outputs: readonly [];
|
|
4116
|
-
readonly stateMutability: "nonpayable";
|
|
4117
|
-
readonly type: "function";
|
|
4118
4179
|
}, {
|
|
4119
4180
|
readonly inputs: readonly [{
|
|
4120
4181
|
readonly internalType: "uint24";
|
|
@@ -3185,7 +3185,7 @@ const _abi = [
|
|
|
3185
3185
|
},
|
|
3186
3186
|
{
|
|
3187
3187
|
internalType: "int128",
|
|
3188
|
-
name: "
|
|
3188
|
+
name: "fParams",
|
|
3189
3189
|
type: "int128",
|
|
3190
3190
|
},
|
|
3191
3191
|
{
|
|
@@ -3367,6 +3367,11 @@ const _abi = [
|
|
|
3367
3367
|
name: "perpFlags",
|
|
3368
3368
|
type: "int128",
|
|
3369
3369
|
},
|
|
3370
|
+
{
|
|
3371
|
+
internalType: "int128",
|
|
3372
|
+
name: "fAMMTargetDD",
|
|
3373
|
+
type: "int128",
|
|
3374
|
+
},
|
|
3370
3375
|
],
|
|
3371
3376
|
internalType: "struct IPerpetualInfo.PerpetualStaticInfo[]",
|
|
3372
3377
|
name: "",
|
|
@@ -3450,7 +3455,7 @@ const _abi = [
|
|
|
3450
3455
|
},
|
|
3451
3456
|
{
|
|
3452
3457
|
internalType: "uint16",
|
|
3453
|
-
name: "
|
|
3458
|
+
name: "minimalSpreadBps",
|
|
3454
3459
|
type: "uint16",
|
|
3455
3460
|
},
|
|
3456
3461
|
{
|
|
@@ -3577,7 +3582,7 @@ const _abi = [
|
|
|
3577
3582
|
},
|
|
3578
3583
|
{
|
|
3579
3584
|
internalType: "int128",
|
|
3580
|
-
name: "
|
|
3585
|
+
name: "fParams",
|
|
3581
3586
|
type: "int128",
|
|
3582
3587
|
},
|
|
3583
3588
|
{
|
|
@@ -5081,6 +5086,91 @@ const _abi = [
|
|
|
5081
5086
|
stateMutability: "pure",
|
|
5082
5087
|
type: "function",
|
|
5083
5088
|
},
|
|
5089
|
+
{
|
|
5090
|
+
inputs: [
|
|
5091
|
+
{
|
|
5092
|
+
components: [
|
|
5093
|
+
{
|
|
5094
|
+
internalType: "uint16",
|
|
5095
|
+
name: "leverageTDR",
|
|
5096
|
+
type: "uint16",
|
|
5097
|
+
},
|
|
5098
|
+
{
|
|
5099
|
+
internalType: "uint16",
|
|
5100
|
+
name: "brokerFeeTbps",
|
|
5101
|
+
type: "uint16",
|
|
5102
|
+
},
|
|
5103
|
+
{
|
|
5104
|
+
internalType: "uint24",
|
|
5105
|
+
name: "iPerpetualId",
|
|
5106
|
+
type: "uint24",
|
|
5107
|
+
},
|
|
5108
|
+
{
|
|
5109
|
+
internalType: "address",
|
|
5110
|
+
name: "traderAddr",
|
|
5111
|
+
type: "address",
|
|
5112
|
+
},
|
|
5113
|
+
{
|
|
5114
|
+
internalType: "uint32",
|
|
5115
|
+
name: "executionTimestamp",
|
|
5116
|
+
type: "uint32",
|
|
5117
|
+
},
|
|
5118
|
+
{
|
|
5119
|
+
internalType: "address",
|
|
5120
|
+
name: "brokerAddr",
|
|
5121
|
+
type: "address",
|
|
5122
|
+
},
|
|
5123
|
+
{
|
|
5124
|
+
internalType: "uint32",
|
|
5125
|
+
name: "submittedTimestamp",
|
|
5126
|
+
type: "uint32",
|
|
5127
|
+
},
|
|
5128
|
+
{
|
|
5129
|
+
internalType: "uint32",
|
|
5130
|
+
name: "flags",
|
|
5131
|
+
type: "uint32",
|
|
5132
|
+
},
|
|
5133
|
+
{
|
|
5134
|
+
internalType: "uint32",
|
|
5135
|
+
name: "iDeadline",
|
|
5136
|
+
type: "uint32",
|
|
5137
|
+
},
|
|
5138
|
+
{
|
|
5139
|
+
internalType: "address",
|
|
5140
|
+
name: "executorAddr",
|
|
5141
|
+
type: "address",
|
|
5142
|
+
},
|
|
5143
|
+
{
|
|
5144
|
+
internalType: "int128",
|
|
5145
|
+
name: "fAmount",
|
|
5146
|
+
type: "int128",
|
|
5147
|
+
},
|
|
5148
|
+
{
|
|
5149
|
+
internalType: "int128",
|
|
5150
|
+
name: "fLimitPrice",
|
|
5151
|
+
type: "int128",
|
|
5152
|
+
},
|
|
5153
|
+
{
|
|
5154
|
+
internalType: "int128",
|
|
5155
|
+
name: "fTriggerPrice",
|
|
5156
|
+
type: "int128",
|
|
5157
|
+
},
|
|
5158
|
+
{
|
|
5159
|
+
internalType: "bytes",
|
|
5160
|
+
name: "brokerSignature",
|
|
5161
|
+
type: "bytes",
|
|
5162
|
+
},
|
|
5163
|
+
],
|
|
5164
|
+
internalType: "struct IPerpetualOrder.Order",
|
|
5165
|
+
name: "_order",
|
|
5166
|
+
type: "tuple",
|
|
5167
|
+
},
|
|
5168
|
+
],
|
|
5169
|
+
name: "testTradeEvent",
|
|
5170
|
+
outputs: [],
|
|
5171
|
+
stateMutability: "nonpayable",
|
|
5172
|
+
type: "function",
|
|
5173
|
+
},
|
|
5084
5174
|
{
|
|
5085
5175
|
inputs: [
|
|
5086
5176
|
{
|
|
@@ -5288,19 +5378,6 @@ const _abi = [
|
|
|
5288
5378
|
stateMutability: "nonpayable",
|
|
5289
5379
|
type: "function",
|
|
5290
5380
|
},
|
|
5291
|
-
{
|
|
5292
|
-
inputs: [
|
|
5293
|
-
{
|
|
5294
|
-
internalType: "uint8",
|
|
5295
|
-
name: "_iPoolIndex",
|
|
5296
|
-
type: "uint8",
|
|
5297
|
-
},
|
|
5298
|
-
],
|
|
5299
|
-
name: "updateDefaultFundTargetSizeRandom",
|
|
5300
|
-
outputs: [],
|
|
5301
|
-
stateMutability: "nonpayable",
|
|
5302
|
-
type: "function",
|
|
5303
|
-
},
|
|
5304
5381
|
{
|
|
5305
5382
|
inputs: [
|
|
5306
5383
|
{
|