@gmx-io/sdk 2.3.2 → 2.6.0-next.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/build/cjs/scripts/generate-synthetics-abis.js +17 -2
- package/build/cjs/src/abis/CustomErrors.js +98 -0
- package/build/cjs/src/abis/CustomErrorsV2_2_1.js +5565 -0
- package/build/cjs/src/abis/ExchangeRouterV2_2_1.js +1462 -0
- package/build/cjs/src/abis/GelatoRelayRouterV2_2_1.js +1945 -0
- package/build/cjs/src/abis/GlvReaderV2_2_1.js +1681 -0
- package/build/cjs/src/abis/MultichainClaimsRouterV2_2_1.js +1281 -0
- package/build/cjs/src/abis/MultichainGlvRouterV2_2_1.js +1176 -0
- package/build/cjs/src/abis/MultichainGmRouterV2_2_1.js +1480 -0
- package/build/cjs/src/abis/MultichainOrderRouterV2_2_1.js +2065 -0
- package/build/cjs/src/abis/MultichainSubaccountRouterV2_2_1.js +2160 -0
- package/build/cjs/src/abis/MultichainTransferRouterV2_2_1.js +1033 -0
- package/build/cjs/src/abis/RelayParamsV2_2_1.js +56 -0
- package/build/cjs/src/abis/RewardRouterV3.js +675 -0
- package/build/cjs/src/abis/SubaccountGelatoRelayRouterV2_2_1.js +2502 -0
- package/build/cjs/src/abis/SyntheticsReaderV2_2_1.js +5279 -0
- package/build/cjs/src/abis/__tests__/fixtures/arbitrumSepoliaReaders.json +8 -0
- package/build/cjs/src/abis/__tests__/getAbi.spec.js +84 -0
- package/build/cjs/src/abis/getAbi.js +42 -0
- package/build/cjs/src/abis/index.js +4 -1
- package/build/cjs/src/clients/v1/modules/orders/orders.js +5 -3
- package/build/cjs/src/clients/v1/modules/orders/transactions/createIncreaseOrderTxn.js +3 -1
- package/build/cjs/src/clients/v1/modules/orders/transactions/updateOrderTxn.js +21 -25
- package/build/cjs/src/clients/v1/modules/orders/utils.js +6 -7
- package/build/cjs/src/clients/v1/modules/trades/trades.js +4 -3
- package/build/cjs/src/clients/v1/multicall.js +2 -1
- package/build/cjs/src/clients/v2/__tests__/decrease.spec.js +0 -2
- package/build/cjs/src/clients/v2/__tests__/editCancel.spec.js +0 -3
- package/build/cjs/src/clients/v2/__tests__/globalCleanup.js +0 -1
- package/build/cjs/src/clients/v2/__tests__/increase.spec.js +0 -2
- package/build/cjs/src/clients/v2/__tests__/subaccountLifecycle.spec.js +0 -1
- package/build/cjs/src/clients/v2/__tests__/testUtil.js +0 -1
- package/build/cjs/src/configs/__tests__/markets.spec.js +8 -1
- package/build/cjs/src/configs/chains.js +16 -1
- package/build/cjs/src/configs/contracts.js +27 -18
- package/build/cjs/src/configs/dataStore.js +13 -3
- package/build/cjs/src/configs/markets.js +12 -7
- package/build/cjs/src/configs/tokens.js +12 -7
- package/build/cjs/src/utils/__tests__/address.spec.js +50 -0
- package/build/cjs/src/utils/__tests__/numbers.spec.js +24 -0
- package/build/cjs/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +41 -4
- package/build/cjs/src/utils/__tests__/orderTransactions/updateOrder.spec.js +4 -0
- package/build/cjs/src/utils/__tests__/parseError.spec.js +61 -0
- package/build/cjs/src/utils/__tests__/referrals.spec.js +36 -4
- package/build/cjs/src/utils/address/index.js +17 -0
- package/build/cjs/src/utils/address/utils.js +32 -0
- package/build/cjs/src/utils/errors/parseError.js +10 -0
- package/build/cjs/src/utils/errors/transactionsErrors.js +23 -0
- package/build/cjs/src/utils/express/utils/batchOrderUtils.js +14 -9
- package/build/cjs/src/utils/express/utils/bridgeOutUtils.js +52 -17
- package/build/cjs/src/utils/express/utils/referralUtils.js +38 -25
- package/build/cjs/src/utils/express/utils/relayParamsUtils.js +11 -3
- package/build/cjs/src/utils/markets/__tests__/multicall.spec.js +27 -0
- package/build/cjs/src/utils/markets/multicall.js +5 -7
- package/build/cjs/src/utils/multichain/api.js +17 -8
- package/build/cjs/src/utils/numbers/utils.js +7 -1
- package/build/cjs/src/utils/orderTransactions/api.js +3 -4
- package/build/cjs/src/utils/orderTransactions/utils.js +8 -7
- package/build/cjs/src/utils/orders/utils.js +8 -1
- package/build/cjs/src/utils/paxos/__tests__/api.spec.js +23 -3
- package/build/cjs/src/utils/paxos/api.js +6 -0
- package/build/cjs/src/utils/referrals/utils.js +24 -15
- package/build/cjs/src/utils/subaccount/getEmptySubaccountApproval.js +2 -0
- package/build/cjs/src/utils/subaccount/getSubaccountApprovalTypedData.js +37 -15
- package/build/cjs/src/utils/subaccount/hashSubaccountApproval.js +32 -18
- package/build/cjs/src/utils/subaccount/index.js +4 -1
- package/build/cjs/src/utils/subaccount/sdkClient.js +1 -1
- package/build/cjs/src/utils/subaccount/state.js +10 -1
- package/build/cjs/src/utils/swap/preparedSwapData.js +6 -4
- package/build/cjs/src/utils/swap/swapPath.js +1 -1
- package/build/cjs/src/utils/trade/__tests__/decreaseMarginCheck.spec.js +224 -0
- package/build/cjs/src/utils/trade/__tests__/getMaxWithdrawAmount.spec.js +128 -9
- package/build/cjs/src/utils/trade/decrease.js +198 -33
- package/build/cjs/src/utils/trade/decreaseMarginCheck.js +157 -0
- package/build/cjs/src/utils/trade/increaseMarginCheck.js +27 -15
- package/build/cjs/src/utils/trade/index.js +1 -0
- package/build/cjs/src/utils/tradeHistory/utils.js +6 -6
- package/build/esm/scripts/generate-synthetics-abis.js +17 -2
- package/build/esm/src/abis/CustomErrors.js +98 -0
- package/build/esm/src/abis/CustomErrorsV2_2_1.js +5563 -0
- package/build/esm/src/abis/ExchangeRouterV2_2_1.js +1460 -0
- package/build/esm/src/abis/GelatoRelayRouterV2_2_1.js +1943 -0
- package/build/esm/src/abis/GlvReaderV2_2_1.js +1679 -0
- package/build/esm/src/abis/MultichainClaimsRouterV2_2_1.js +1279 -0
- package/build/esm/src/abis/MultichainGlvRouterV2_2_1.js +1174 -0
- package/build/esm/src/abis/MultichainGmRouterV2_2_1.js +1478 -0
- package/build/esm/src/abis/MultichainOrderRouterV2_2_1.js +2063 -0
- package/build/esm/src/abis/MultichainSubaccountRouterV2_2_1.js +2158 -0
- package/build/esm/src/abis/MultichainTransferRouterV2_2_1.js +1031 -0
- package/build/esm/src/abis/RelayParamsV2_2_1.js +54 -0
- package/build/esm/src/abis/RewardRouterV3.js +673 -0
- package/build/esm/src/abis/SubaccountGelatoRelayRouterV2_2_1.js +2500 -0
- package/build/esm/src/abis/SyntheticsReaderV2_2_1.js +5277 -0
- package/build/esm/src/abis/__tests__/fixtures/arbitrumSepoliaReaders.json +8 -0
- package/build/esm/src/abis/__tests__/getAbi.spec.js +79 -0
- package/build/esm/src/abis/getAbi.js +35 -0
- package/build/esm/src/abis/index.js +4 -1
- package/build/esm/src/clients/v1/modules/orders/orders.js +5 -3
- package/build/esm/src/clients/v1/modules/orders/transactions/createIncreaseOrderTxn.js +3 -1
- package/build/esm/src/clients/v1/modules/orders/transactions/updateOrderTxn.js +21 -25
- package/build/esm/src/clients/v1/modules/orders/utils.js +6 -7
- package/build/esm/src/clients/v1/modules/trades/trades.js +4 -3
- package/build/esm/src/clients/v1/multicall.js +2 -1
- package/build/esm/src/clients/v2/__tests__/decrease.spec.js +0 -2
- package/build/esm/src/clients/v2/__tests__/editCancel.spec.js +0 -3
- package/build/esm/src/clients/v2/__tests__/globalCleanup.js +0 -1
- package/build/esm/src/clients/v2/__tests__/increase.spec.js +0 -2
- package/build/esm/src/clients/v2/__tests__/subaccountLifecycle.spec.js +0 -1
- package/build/esm/src/clients/v2/__tests__/testUtil.js +0 -1
- package/build/esm/src/configs/__tests__/markets.spec.js +9 -2
- package/build/esm/src/configs/chains.js +14 -0
- package/build/esm/src/configs/contracts.js +25 -17
- package/build/esm/src/configs/dataStore.js +8 -0
- package/build/esm/src/configs/markets.js +13 -8
- package/build/esm/src/configs/tokens.js +13 -8
- package/build/esm/src/utils/__tests__/address.spec.js +48 -0
- package/build/esm/src/utils/__tests__/numbers.spec.js +25 -1
- package/build/esm/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +43 -6
- package/build/esm/src/utils/__tests__/orderTransactions/updateOrder.spec.js +5 -1
- package/build/esm/src/utils/__tests__/parseError.spec.js +62 -1
- package/build/esm/src/utils/__tests__/referrals.spec.js +37 -5
- package/build/esm/src/utils/address/index.js +1 -0
- package/build/esm/src/utils/address/utils.js +25 -0
- package/build/esm/src/utils/errors/parseError.js +11 -1
- package/build/esm/src/utils/errors/transactionsErrors.js +23 -0
- package/build/esm/src/utils/express/utils/batchOrderUtils.js +14 -9
- package/build/esm/src/utils/express/utils/bridgeOutUtils.js +53 -18
- package/build/esm/src/utils/express/utils/referralUtils.js +37 -25
- package/build/esm/src/utils/express/utils/relayParamsUtils.js +10 -5
- package/build/esm/src/utils/markets/__tests__/multicall.spec.js +25 -0
- package/build/esm/src/utils/markets/multicall.js +5 -7
- package/build/esm/src/utils/multichain/api.js +15 -7
- package/build/esm/src/utils/numbers/utils.js +5 -0
- package/build/esm/src/utils/orderTransactions/api.js +3 -4
- package/build/esm/src/utils/orderTransactions/utils.js +9 -8
- package/build/esm/src/utils/orders/utils.js +6 -0
- package/build/esm/src/utils/paxos/__tests__/api.spec.js +23 -3
- package/build/esm/src/utils/paxos/api.js +6 -0
- package/build/esm/src/utils/referrals/utils.js +23 -15
- package/build/esm/src/utils/subaccount/getEmptySubaccountApproval.js +2 -0
- package/build/esm/src/utils/subaccount/getSubaccountApprovalTypedData.js +36 -14
- package/build/esm/src/utils/subaccount/hashSubaccountApproval.js +32 -18
- package/build/esm/src/utils/subaccount/index.js +2 -2
- package/build/esm/src/utils/subaccount/sdkClient.js +2 -2
- package/build/esm/src/utils/subaccount/state.js +8 -0
- package/build/esm/src/utils/swap/preparedSwapData.js +6 -4
- package/build/esm/src/utils/swap/swapPath.js +2 -2
- package/build/esm/src/utils/trade/__tests__/decreaseMarginCheck.spec.js +222 -0
- package/build/esm/src/utils/trade/__tests__/getMaxWithdrawAmount.spec.js +129 -10
- package/build/esm/src/utils/trade/decrease.js +195 -32
- package/build/esm/src/utils/trade/decreaseMarginCheck.js +152 -0
- package/build/esm/src/utils/trade/increaseMarginCheck.js +25 -14
- package/build/esm/src/utils/trade/index.js +1 -0
- package/build/esm/src/utils/tradeHistory/utils.js +6 -6
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/scripts/generate-synthetics-abis.d.ts +6 -0
- package/build/types/src/abis/CustomErrors.d.ts +160 -0
- package/build/types/src/abis/CustomErrorsV2_2_1.d.ts +4174 -0
- package/build/types/src/abis/ExchangeRouterV2_2_1.d.ts +1128 -0
- package/build/types/src/abis/GelatoRelayRouterV2_2_1.d.ts +1508 -0
- package/build/types/src/abis/GlvReaderV2_2_1.d.ts +1293 -0
- package/build/types/src/abis/MultichainClaimsRouterV2_2_1.d.ts +985 -0
- package/build/types/src/abis/MultichainGlvRouterV2_2_1.d.ts +906 -0
- package/build/types/src/abis/MultichainGmRouterV2_2_1.d.ts +1142 -0
- package/build/types/src/abis/MultichainOrderRouterV2_2_1.d.ts +1601 -0
- package/build/types/src/abis/MultichainSubaccountRouterV2_2_1.d.ts +1678 -0
- package/build/types/src/abis/MultichainTransferRouterV2_2_1.d.ts +793 -0
- package/build/types/src/abis/RelayParamsV2_2_1.d.ts +118 -0
- package/build/types/src/abis/RewardRouterV3.d.ts +1129 -0
- package/build/types/src/abis/SubaccountGelatoRelayRouterV2_2_1.d.ts +1946 -0
- package/build/types/src/abis/SyntheticsReaderV2_2_1.d.ts +4075 -0
- package/build/types/src/abis/__tests__/getAbi.spec.d.ts +1 -0
- package/build/types/src/abis/getAbi.d.ts +17051 -0
- package/build/types/src/abis/index.d.ts +6700 -4744
- package/build/types/src/clients/v1/modules/orders/transactions/createIncreaseOrderTxn.d.ts +2 -1
- package/build/types/src/clients/v1/modules/orders/transactions/updateOrderTxn.d.ts +8 -3
- package/build/types/src/configs/chains.d.ts +6 -2
- package/build/types/src/configs/contracts.d.ts +6 -0
- package/build/types/src/configs/dataStore.d.ts +4 -0
- package/build/types/src/configs/markets.d.ts +4 -4
- package/build/types/src/utils/__tests__/address.spec.d.ts +1 -0
- package/build/types/src/utils/address/index.d.ts +1 -0
- package/build/types/src/utils/address/utils.d.ts +11 -0
- package/build/types/src/utils/errors/transactionsErrors.d.ts +18 -1
- package/build/types/src/utils/express/types.d.ts +1 -0
- package/build/types/src/utils/express/utils/batchOrderUtils.d.ts +4 -3
- package/build/types/src/utils/express/utils/bridgeOutUtils.d.ts +8 -2
- package/build/types/src/utils/express/utils/referralUtils.d.ts +21 -0
- package/build/types/src/utils/markets/__tests__/multicall.spec.d.ts +1 -0
- package/build/types/src/utils/multichain/api.d.ts +8 -0
- package/build/types/src/utils/numbers/utils.d.ts +1 -0
- package/build/types/src/utils/orderTransactions/api.d.ts +1 -3
- package/build/types/src/utils/orderTransactions/utils.d.ts +5 -2
- package/build/types/src/utils/orders/utils.d.ts +1 -0
- package/build/types/src/utils/paxos/types.d.ts +2 -0
- package/build/types/src/utils/referrals/utils.d.ts +7 -1
- package/build/types/src/utils/subaccount/api.d.ts +1 -0
- package/build/types/src/utils/subaccount/getSubaccountApprovalTypedData.d.ts +4 -0
- package/build/types/src/utils/subaccount/hashSubaccountApproval.d.ts +2 -1
- package/build/types/src/utils/subaccount/index.d.ts +2 -2
- package/build/types/src/utils/subaccount/state.d.ts +2 -1
- package/build/types/src/utils/subaccount/types.d.ts +3 -1
- package/build/types/src/utils/trade/__tests__/decreaseMarginCheck.spec.d.ts +1 -0
- package/build/types/src/utils/trade/decrease.d.ts +18 -0
- package/build/types/src/utils/trade/decreaseMarginCheck.d.ts +52 -0
- package/build/types/src/utils/trade/increaseMarginCheck.d.ts +11 -1
- package/build/types/src/utils/trade/index.d.ts +1 -0
- package/build/types/src/utils/trade/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,4075 @@
|
|
|
1
|
+
declare const _default: readonly [{
|
|
2
|
+
readonly inputs: readonly [{
|
|
3
|
+
readonly internalType: "contract DataStore";
|
|
4
|
+
readonly name: "dataStore";
|
|
5
|
+
readonly type: "address";
|
|
6
|
+
}, {
|
|
7
|
+
readonly internalType: "address";
|
|
8
|
+
readonly name: "account";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
}, {
|
|
11
|
+
readonly internalType: "uint256";
|
|
12
|
+
readonly name: "start";
|
|
13
|
+
readonly type: "uint256";
|
|
14
|
+
}, {
|
|
15
|
+
readonly internalType: "uint256";
|
|
16
|
+
readonly name: "end";
|
|
17
|
+
readonly type: "uint256";
|
|
18
|
+
}];
|
|
19
|
+
readonly name: "getAccountOrders";
|
|
20
|
+
readonly outputs: readonly [{
|
|
21
|
+
readonly components: readonly [{
|
|
22
|
+
readonly internalType: "bytes32";
|
|
23
|
+
readonly name: "orderKey";
|
|
24
|
+
readonly type: "bytes32";
|
|
25
|
+
}, {
|
|
26
|
+
readonly components: readonly [{
|
|
27
|
+
readonly components: readonly [{
|
|
28
|
+
readonly internalType: "address";
|
|
29
|
+
readonly name: "account";
|
|
30
|
+
readonly type: "address";
|
|
31
|
+
}, {
|
|
32
|
+
readonly internalType: "address";
|
|
33
|
+
readonly name: "receiver";
|
|
34
|
+
readonly type: "address";
|
|
35
|
+
}, {
|
|
36
|
+
readonly internalType: "address";
|
|
37
|
+
readonly name: "cancellationReceiver";
|
|
38
|
+
readonly type: "address";
|
|
39
|
+
}, {
|
|
40
|
+
readonly internalType: "address";
|
|
41
|
+
readonly name: "callbackContract";
|
|
42
|
+
readonly type: "address";
|
|
43
|
+
}, {
|
|
44
|
+
readonly internalType: "address";
|
|
45
|
+
readonly name: "uiFeeReceiver";
|
|
46
|
+
readonly type: "address";
|
|
47
|
+
}, {
|
|
48
|
+
readonly internalType: "address";
|
|
49
|
+
readonly name: "market";
|
|
50
|
+
readonly type: "address";
|
|
51
|
+
}, {
|
|
52
|
+
readonly internalType: "address";
|
|
53
|
+
readonly name: "initialCollateralToken";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
}, {
|
|
56
|
+
readonly internalType: "address[]";
|
|
57
|
+
readonly name: "swapPath";
|
|
58
|
+
readonly type: "address[]";
|
|
59
|
+
}];
|
|
60
|
+
readonly internalType: "struct Order.Addresses";
|
|
61
|
+
readonly name: "addresses";
|
|
62
|
+
readonly type: "tuple";
|
|
63
|
+
}, {
|
|
64
|
+
readonly components: readonly [{
|
|
65
|
+
readonly internalType: "enum Order.OrderType";
|
|
66
|
+
readonly name: "orderType";
|
|
67
|
+
readonly type: "uint8";
|
|
68
|
+
}, {
|
|
69
|
+
readonly internalType: "enum Order.DecreasePositionSwapType";
|
|
70
|
+
readonly name: "decreasePositionSwapType";
|
|
71
|
+
readonly type: "uint8";
|
|
72
|
+
}, {
|
|
73
|
+
readonly internalType: "uint256";
|
|
74
|
+
readonly name: "sizeDeltaUsd";
|
|
75
|
+
readonly type: "uint256";
|
|
76
|
+
}, {
|
|
77
|
+
readonly internalType: "uint256";
|
|
78
|
+
readonly name: "initialCollateralDeltaAmount";
|
|
79
|
+
readonly type: "uint256";
|
|
80
|
+
}, {
|
|
81
|
+
readonly internalType: "uint256";
|
|
82
|
+
readonly name: "triggerPrice";
|
|
83
|
+
readonly type: "uint256";
|
|
84
|
+
}, {
|
|
85
|
+
readonly internalType: "uint256";
|
|
86
|
+
readonly name: "acceptablePrice";
|
|
87
|
+
readonly type: "uint256";
|
|
88
|
+
}, {
|
|
89
|
+
readonly internalType: "uint256";
|
|
90
|
+
readonly name: "executionFee";
|
|
91
|
+
readonly type: "uint256";
|
|
92
|
+
}, {
|
|
93
|
+
readonly internalType: "uint256";
|
|
94
|
+
readonly name: "callbackGasLimit";
|
|
95
|
+
readonly type: "uint256";
|
|
96
|
+
}, {
|
|
97
|
+
readonly internalType: "uint256";
|
|
98
|
+
readonly name: "minOutputAmount";
|
|
99
|
+
readonly type: "uint256";
|
|
100
|
+
}, {
|
|
101
|
+
readonly internalType: "uint256";
|
|
102
|
+
readonly name: "uiFeeFactor";
|
|
103
|
+
readonly type: "uint256";
|
|
104
|
+
}, {
|
|
105
|
+
readonly internalType: "uint256";
|
|
106
|
+
readonly name: "updatedAtTime";
|
|
107
|
+
readonly type: "uint256";
|
|
108
|
+
}, {
|
|
109
|
+
readonly internalType: "uint256";
|
|
110
|
+
readonly name: "validFromTime";
|
|
111
|
+
readonly type: "uint256";
|
|
112
|
+
}, {
|
|
113
|
+
readonly internalType: "uint256";
|
|
114
|
+
readonly name: "srcChainId";
|
|
115
|
+
readonly type: "uint256";
|
|
116
|
+
}];
|
|
117
|
+
readonly internalType: "struct Order.Numbers";
|
|
118
|
+
readonly name: "numbers";
|
|
119
|
+
readonly type: "tuple";
|
|
120
|
+
}, {
|
|
121
|
+
readonly components: readonly [{
|
|
122
|
+
readonly internalType: "bool";
|
|
123
|
+
readonly name: "isLong";
|
|
124
|
+
readonly type: "bool";
|
|
125
|
+
}, {
|
|
126
|
+
readonly internalType: "bool";
|
|
127
|
+
readonly name: "shouldUnwrapNativeToken";
|
|
128
|
+
readonly type: "bool";
|
|
129
|
+
}, {
|
|
130
|
+
readonly internalType: "bool";
|
|
131
|
+
readonly name: "isFrozen";
|
|
132
|
+
readonly type: "bool";
|
|
133
|
+
}, {
|
|
134
|
+
readonly internalType: "bool";
|
|
135
|
+
readonly name: "autoCancel";
|
|
136
|
+
readonly type: "bool";
|
|
137
|
+
}];
|
|
138
|
+
readonly internalType: "struct Order.Flags";
|
|
139
|
+
readonly name: "flags";
|
|
140
|
+
readonly type: "tuple";
|
|
141
|
+
}, {
|
|
142
|
+
readonly internalType: "bytes32[]";
|
|
143
|
+
readonly name: "_dataList";
|
|
144
|
+
readonly type: "bytes32[]";
|
|
145
|
+
}];
|
|
146
|
+
readonly internalType: "struct Order.Props";
|
|
147
|
+
readonly name: "order";
|
|
148
|
+
readonly type: "tuple";
|
|
149
|
+
}];
|
|
150
|
+
readonly internalType: "struct ReaderUtils.OrderInfo[]";
|
|
151
|
+
readonly name: "";
|
|
152
|
+
readonly type: "tuple[]";
|
|
153
|
+
}];
|
|
154
|
+
readonly stateMutability: "view";
|
|
155
|
+
readonly type: "function";
|
|
156
|
+
}, {
|
|
157
|
+
readonly inputs: readonly [{
|
|
158
|
+
readonly internalType: "contract DataStore";
|
|
159
|
+
readonly name: "dataStore";
|
|
160
|
+
readonly type: "address";
|
|
161
|
+
}, {
|
|
162
|
+
readonly internalType: "contract IReferralStorage";
|
|
163
|
+
readonly name: "referralStorage";
|
|
164
|
+
readonly type: "address";
|
|
165
|
+
}, {
|
|
166
|
+
readonly internalType: "address";
|
|
167
|
+
readonly name: "account";
|
|
168
|
+
readonly type: "address";
|
|
169
|
+
}, {
|
|
170
|
+
readonly internalType: "address[]";
|
|
171
|
+
readonly name: "markets";
|
|
172
|
+
readonly type: "address[]";
|
|
173
|
+
}, {
|
|
174
|
+
readonly components: readonly [{
|
|
175
|
+
readonly components: readonly [{
|
|
176
|
+
readonly internalType: "uint256";
|
|
177
|
+
readonly name: "min";
|
|
178
|
+
readonly type: "uint256";
|
|
179
|
+
}, {
|
|
180
|
+
readonly internalType: "uint256";
|
|
181
|
+
readonly name: "max";
|
|
182
|
+
readonly type: "uint256";
|
|
183
|
+
}];
|
|
184
|
+
readonly internalType: "struct Price.Props";
|
|
185
|
+
readonly name: "indexTokenPrice";
|
|
186
|
+
readonly type: "tuple";
|
|
187
|
+
}, {
|
|
188
|
+
readonly components: readonly [{
|
|
189
|
+
readonly internalType: "uint256";
|
|
190
|
+
readonly name: "min";
|
|
191
|
+
readonly type: "uint256";
|
|
192
|
+
}, {
|
|
193
|
+
readonly internalType: "uint256";
|
|
194
|
+
readonly name: "max";
|
|
195
|
+
readonly type: "uint256";
|
|
196
|
+
}];
|
|
197
|
+
readonly internalType: "struct Price.Props";
|
|
198
|
+
readonly name: "longTokenPrice";
|
|
199
|
+
readonly type: "tuple";
|
|
200
|
+
}, {
|
|
201
|
+
readonly components: readonly [{
|
|
202
|
+
readonly internalType: "uint256";
|
|
203
|
+
readonly name: "min";
|
|
204
|
+
readonly type: "uint256";
|
|
205
|
+
}, {
|
|
206
|
+
readonly internalType: "uint256";
|
|
207
|
+
readonly name: "max";
|
|
208
|
+
readonly type: "uint256";
|
|
209
|
+
}];
|
|
210
|
+
readonly internalType: "struct Price.Props";
|
|
211
|
+
readonly name: "shortTokenPrice";
|
|
212
|
+
readonly type: "tuple";
|
|
213
|
+
}];
|
|
214
|
+
readonly internalType: "struct MarketUtils.MarketPrices[]";
|
|
215
|
+
readonly name: "marketPrices";
|
|
216
|
+
readonly type: "tuple[]";
|
|
217
|
+
}, {
|
|
218
|
+
readonly internalType: "address";
|
|
219
|
+
readonly name: "uiFeeReceiver";
|
|
220
|
+
readonly type: "address";
|
|
221
|
+
}, {
|
|
222
|
+
readonly internalType: "uint256";
|
|
223
|
+
readonly name: "start";
|
|
224
|
+
readonly type: "uint256";
|
|
225
|
+
}, {
|
|
226
|
+
readonly internalType: "uint256";
|
|
227
|
+
readonly name: "end";
|
|
228
|
+
readonly type: "uint256";
|
|
229
|
+
}];
|
|
230
|
+
readonly name: "getAccountPositionInfoList";
|
|
231
|
+
readonly outputs: readonly [{
|
|
232
|
+
readonly components: readonly [{
|
|
233
|
+
readonly internalType: "bytes32";
|
|
234
|
+
readonly name: "positionKey";
|
|
235
|
+
readonly type: "bytes32";
|
|
236
|
+
}, {
|
|
237
|
+
readonly components: readonly [{
|
|
238
|
+
readonly components: readonly [{
|
|
239
|
+
readonly internalType: "address";
|
|
240
|
+
readonly name: "account";
|
|
241
|
+
readonly type: "address";
|
|
242
|
+
}, {
|
|
243
|
+
readonly internalType: "address";
|
|
244
|
+
readonly name: "market";
|
|
245
|
+
readonly type: "address";
|
|
246
|
+
}, {
|
|
247
|
+
readonly internalType: "address";
|
|
248
|
+
readonly name: "collateralToken";
|
|
249
|
+
readonly type: "address";
|
|
250
|
+
}];
|
|
251
|
+
readonly internalType: "struct Position.Addresses";
|
|
252
|
+
readonly name: "addresses";
|
|
253
|
+
readonly type: "tuple";
|
|
254
|
+
}, {
|
|
255
|
+
readonly components: readonly [{
|
|
256
|
+
readonly internalType: "uint256";
|
|
257
|
+
readonly name: "sizeInUsd";
|
|
258
|
+
readonly type: "uint256";
|
|
259
|
+
}, {
|
|
260
|
+
readonly internalType: "uint256";
|
|
261
|
+
readonly name: "sizeInTokens";
|
|
262
|
+
readonly type: "uint256";
|
|
263
|
+
}, {
|
|
264
|
+
readonly internalType: "uint256";
|
|
265
|
+
readonly name: "collateralAmount";
|
|
266
|
+
readonly type: "uint256";
|
|
267
|
+
}, {
|
|
268
|
+
readonly internalType: "int256";
|
|
269
|
+
readonly name: "pendingImpactAmount";
|
|
270
|
+
readonly type: "int256";
|
|
271
|
+
}, {
|
|
272
|
+
readonly internalType: "int256";
|
|
273
|
+
readonly name: "realizedUncappedPnlUsd";
|
|
274
|
+
readonly type: "int256";
|
|
275
|
+
}, {
|
|
276
|
+
readonly internalType: "int256";
|
|
277
|
+
readonly name: "realizedPnlUsd";
|
|
278
|
+
readonly type: "int256";
|
|
279
|
+
}, {
|
|
280
|
+
readonly internalType: "uint256";
|
|
281
|
+
readonly name: "cappedPnlPoolTokenAmount";
|
|
282
|
+
readonly type: "uint256";
|
|
283
|
+
}, {
|
|
284
|
+
readonly internalType: "uint256";
|
|
285
|
+
readonly name: "borrowingFactor";
|
|
286
|
+
readonly type: "uint256";
|
|
287
|
+
}, {
|
|
288
|
+
readonly internalType: "uint256";
|
|
289
|
+
readonly name: "fundingFeeAmountPerSize";
|
|
290
|
+
readonly type: "uint256";
|
|
291
|
+
}, {
|
|
292
|
+
readonly internalType: "uint256";
|
|
293
|
+
readonly name: "longTokenClaimableFundingAmountPerSize";
|
|
294
|
+
readonly type: "uint256";
|
|
295
|
+
}, {
|
|
296
|
+
readonly internalType: "uint256";
|
|
297
|
+
readonly name: "shortTokenClaimableFundingAmountPerSize";
|
|
298
|
+
readonly type: "uint256";
|
|
299
|
+
}, {
|
|
300
|
+
readonly internalType: "uint256";
|
|
301
|
+
readonly name: "increasedAtTime";
|
|
302
|
+
readonly type: "uint256";
|
|
303
|
+
}, {
|
|
304
|
+
readonly internalType: "uint256";
|
|
305
|
+
readonly name: "decreasedAtTime";
|
|
306
|
+
readonly type: "uint256";
|
|
307
|
+
}, {
|
|
308
|
+
readonly internalType: "int256";
|
|
309
|
+
readonly name: "cappedPnlReferencePoolPnlUsd";
|
|
310
|
+
readonly type: "int256";
|
|
311
|
+
}, {
|
|
312
|
+
readonly internalType: "uint256";
|
|
313
|
+
readonly name: "cappedPnlAllowancePerPrice";
|
|
314
|
+
readonly type: "uint256";
|
|
315
|
+
}];
|
|
316
|
+
readonly internalType: "struct Position.Numbers";
|
|
317
|
+
readonly name: "numbers";
|
|
318
|
+
readonly type: "tuple";
|
|
319
|
+
}, {
|
|
320
|
+
readonly components: readonly [{
|
|
321
|
+
readonly internalType: "bool";
|
|
322
|
+
readonly name: "isLong";
|
|
323
|
+
readonly type: "bool";
|
|
324
|
+
}];
|
|
325
|
+
readonly internalType: "struct Position.Flags";
|
|
326
|
+
readonly name: "flags";
|
|
327
|
+
readonly type: "tuple";
|
|
328
|
+
}];
|
|
329
|
+
readonly internalType: "struct Position.Props";
|
|
330
|
+
readonly name: "position";
|
|
331
|
+
readonly type: "tuple";
|
|
332
|
+
}, {
|
|
333
|
+
readonly components: readonly [{
|
|
334
|
+
readonly components: readonly [{
|
|
335
|
+
readonly internalType: "bytes32";
|
|
336
|
+
readonly name: "referralCode";
|
|
337
|
+
readonly type: "bytes32";
|
|
338
|
+
}, {
|
|
339
|
+
readonly internalType: "address";
|
|
340
|
+
readonly name: "affiliate";
|
|
341
|
+
readonly type: "address";
|
|
342
|
+
}, {
|
|
343
|
+
readonly internalType: "address";
|
|
344
|
+
readonly name: "trader";
|
|
345
|
+
readonly type: "address";
|
|
346
|
+
}, {
|
|
347
|
+
readonly internalType: "uint256";
|
|
348
|
+
readonly name: "totalRebateFactor";
|
|
349
|
+
readonly type: "uint256";
|
|
350
|
+
}, {
|
|
351
|
+
readonly internalType: "uint256";
|
|
352
|
+
readonly name: "affiliateRewardFactor";
|
|
353
|
+
readonly type: "uint256";
|
|
354
|
+
}, {
|
|
355
|
+
readonly internalType: "uint256";
|
|
356
|
+
readonly name: "adjustedAffiliateRewardFactor";
|
|
357
|
+
readonly type: "uint256";
|
|
358
|
+
}, {
|
|
359
|
+
readonly internalType: "uint256";
|
|
360
|
+
readonly name: "traderDiscountFactor";
|
|
361
|
+
readonly type: "uint256";
|
|
362
|
+
}, {
|
|
363
|
+
readonly internalType: "uint256";
|
|
364
|
+
readonly name: "totalRebateAmount";
|
|
365
|
+
readonly type: "uint256";
|
|
366
|
+
}, {
|
|
367
|
+
readonly internalType: "uint256";
|
|
368
|
+
readonly name: "traderDiscountAmount";
|
|
369
|
+
readonly type: "uint256";
|
|
370
|
+
}, {
|
|
371
|
+
readonly internalType: "uint256";
|
|
372
|
+
readonly name: "affiliateRewardAmount";
|
|
373
|
+
readonly type: "uint256";
|
|
374
|
+
}];
|
|
375
|
+
readonly internalType: "struct PositionPricingUtils.PositionReferralFees";
|
|
376
|
+
readonly name: "referral";
|
|
377
|
+
readonly type: "tuple";
|
|
378
|
+
}, {
|
|
379
|
+
readonly components: readonly [{
|
|
380
|
+
readonly internalType: "uint256";
|
|
381
|
+
readonly name: "traderTier";
|
|
382
|
+
readonly type: "uint256";
|
|
383
|
+
}, {
|
|
384
|
+
readonly internalType: "uint256";
|
|
385
|
+
readonly name: "traderDiscountFactor";
|
|
386
|
+
readonly type: "uint256";
|
|
387
|
+
}, {
|
|
388
|
+
readonly internalType: "uint256";
|
|
389
|
+
readonly name: "traderDiscountAmount";
|
|
390
|
+
readonly type: "uint256";
|
|
391
|
+
}];
|
|
392
|
+
readonly internalType: "struct PositionPricingUtils.PositionProFees";
|
|
393
|
+
readonly name: "pro";
|
|
394
|
+
readonly type: "tuple";
|
|
395
|
+
}, {
|
|
396
|
+
readonly components: readonly [{
|
|
397
|
+
readonly internalType: "uint256";
|
|
398
|
+
readonly name: "fundingFeeAmount";
|
|
399
|
+
readonly type: "uint256";
|
|
400
|
+
}, {
|
|
401
|
+
readonly internalType: "uint256";
|
|
402
|
+
readonly name: "claimableLongTokenAmount";
|
|
403
|
+
readonly type: "uint256";
|
|
404
|
+
}, {
|
|
405
|
+
readonly internalType: "uint256";
|
|
406
|
+
readonly name: "claimableShortTokenAmount";
|
|
407
|
+
readonly type: "uint256";
|
|
408
|
+
}, {
|
|
409
|
+
readonly internalType: "uint256";
|
|
410
|
+
readonly name: "latestFundingFeeAmountPerSize";
|
|
411
|
+
readonly type: "uint256";
|
|
412
|
+
}, {
|
|
413
|
+
readonly internalType: "uint256";
|
|
414
|
+
readonly name: "latestLongTokenClaimableFundingAmountPerSize";
|
|
415
|
+
readonly type: "uint256";
|
|
416
|
+
}, {
|
|
417
|
+
readonly internalType: "uint256";
|
|
418
|
+
readonly name: "latestShortTokenClaimableFundingAmountPerSize";
|
|
419
|
+
readonly type: "uint256";
|
|
420
|
+
}];
|
|
421
|
+
readonly internalType: "struct PositionPricingUtils.PositionFundingFees";
|
|
422
|
+
readonly name: "funding";
|
|
423
|
+
readonly type: "tuple";
|
|
424
|
+
}, {
|
|
425
|
+
readonly components: readonly [{
|
|
426
|
+
readonly internalType: "uint256";
|
|
427
|
+
readonly name: "borrowingFeeUsd";
|
|
428
|
+
readonly type: "uint256";
|
|
429
|
+
}, {
|
|
430
|
+
readonly internalType: "uint256";
|
|
431
|
+
readonly name: "borrowingFeeAmount";
|
|
432
|
+
readonly type: "uint256";
|
|
433
|
+
}, {
|
|
434
|
+
readonly internalType: "uint256";
|
|
435
|
+
readonly name: "borrowingFeeReceiverFactor";
|
|
436
|
+
readonly type: "uint256";
|
|
437
|
+
}, {
|
|
438
|
+
readonly internalType: "uint256";
|
|
439
|
+
readonly name: "borrowingFeeAmountForFeeReceiver";
|
|
440
|
+
readonly type: "uint256";
|
|
441
|
+
}];
|
|
442
|
+
readonly internalType: "struct PositionPricingUtils.PositionBorrowingFees";
|
|
443
|
+
readonly name: "borrowing";
|
|
444
|
+
readonly type: "tuple";
|
|
445
|
+
}, {
|
|
446
|
+
readonly components: readonly [{
|
|
447
|
+
readonly internalType: "address";
|
|
448
|
+
readonly name: "uiFeeReceiver";
|
|
449
|
+
readonly type: "address";
|
|
450
|
+
}, {
|
|
451
|
+
readonly internalType: "uint256";
|
|
452
|
+
readonly name: "uiFeeReceiverFactor";
|
|
453
|
+
readonly type: "uint256";
|
|
454
|
+
}, {
|
|
455
|
+
readonly internalType: "uint256";
|
|
456
|
+
readonly name: "uiFeeAmount";
|
|
457
|
+
readonly type: "uint256";
|
|
458
|
+
}];
|
|
459
|
+
readonly internalType: "struct PositionPricingUtils.PositionUiFees";
|
|
460
|
+
readonly name: "ui";
|
|
461
|
+
readonly type: "tuple";
|
|
462
|
+
}, {
|
|
463
|
+
readonly components: readonly [{
|
|
464
|
+
readonly internalType: "uint256";
|
|
465
|
+
readonly name: "liquidationFeeUsd";
|
|
466
|
+
readonly type: "uint256";
|
|
467
|
+
}, {
|
|
468
|
+
readonly internalType: "uint256";
|
|
469
|
+
readonly name: "liquidationFeeAmount";
|
|
470
|
+
readonly type: "uint256";
|
|
471
|
+
}, {
|
|
472
|
+
readonly internalType: "uint256";
|
|
473
|
+
readonly name: "liquidationFeeReceiverFactor";
|
|
474
|
+
readonly type: "uint256";
|
|
475
|
+
}, {
|
|
476
|
+
readonly internalType: "uint256";
|
|
477
|
+
readonly name: "liquidationFeeAmountForFeeReceiver";
|
|
478
|
+
readonly type: "uint256";
|
|
479
|
+
}];
|
|
480
|
+
readonly internalType: "struct PositionPricingUtils.PositionLiquidationFees";
|
|
481
|
+
readonly name: "liquidation";
|
|
482
|
+
readonly type: "tuple";
|
|
483
|
+
}, {
|
|
484
|
+
readonly components: readonly [{
|
|
485
|
+
readonly internalType: "uint256";
|
|
486
|
+
readonly name: "min";
|
|
487
|
+
readonly type: "uint256";
|
|
488
|
+
}, {
|
|
489
|
+
readonly internalType: "uint256";
|
|
490
|
+
readonly name: "max";
|
|
491
|
+
readonly type: "uint256";
|
|
492
|
+
}];
|
|
493
|
+
readonly internalType: "struct Price.Props";
|
|
494
|
+
readonly name: "collateralTokenPrice";
|
|
495
|
+
readonly type: "tuple";
|
|
496
|
+
}, {
|
|
497
|
+
readonly internalType: "uint256";
|
|
498
|
+
readonly name: "positionFeeFactor";
|
|
499
|
+
readonly type: "uint256";
|
|
500
|
+
}, {
|
|
501
|
+
readonly internalType: "uint256";
|
|
502
|
+
readonly name: "protocolFeeAmount";
|
|
503
|
+
readonly type: "uint256";
|
|
504
|
+
}, {
|
|
505
|
+
readonly internalType: "uint256";
|
|
506
|
+
readonly name: "positionFeeReceiverFactor";
|
|
507
|
+
readonly type: "uint256";
|
|
508
|
+
}, {
|
|
509
|
+
readonly internalType: "uint256";
|
|
510
|
+
readonly name: "feeReceiverAmount";
|
|
511
|
+
readonly type: "uint256";
|
|
512
|
+
}, {
|
|
513
|
+
readonly internalType: "uint256";
|
|
514
|
+
readonly name: "feeAmountForPool";
|
|
515
|
+
readonly type: "uint256";
|
|
516
|
+
}, {
|
|
517
|
+
readonly internalType: "uint256";
|
|
518
|
+
readonly name: "positionFeeAmountForPool";
|
|
519
|
+
readonly type: "uint256";
|
|
520
|
+
}, {
|
|
521
|
+
readonly internalType: "uint256";
|
|
522
|
+
readonly name: "positionFeeAmount";
|
|
523
|
+
readonly type: "uint256";
|
|
524
|
+
}, {
|
|
525
|
+
readonly internalType: "uint256";
|
|
526
|
+
readonly name: "totalCostAmountExcludingFunding";
|
|
527
|
+
readonly type: "uint256";
|
|
528
|
+
}, {
|
|
529
|
+
readonly internalType: "uint256";
|
|
530
|
+
readonly name: "totalCostAmount";
|
|
531
|
+
readonly type: "uint256";
|
|
532
|
+
}, {
|
|
533
|
+
readonly internalType: "uint256";
|
|
534
|
+
readonly name: "totalDiscountAmount";
|
|
535
|
+
readonly type: "uint256";
|
|
536
|
+
}, {
|
|
537
|
+
readonly internalType: "bool";
|
|
538
|
+
readonly name: "balanceWasImproved";
|
|
539
|
+
readonly type: "bool";
|
|
540
|
+
}];
|
|
541
|
+
readonly internalType: "struct PositionPricingUtils.PositionFees";
|
|
542
|
+
readonly name: "fees";
|
|
543
|
+
readonly type: "tuple";
|
|
544
|
+
}, {
|
|
545
|
+
readonly components: readonly [{
|
|
546
|
+
readonly internalType: "int256";
|
|
547
|
+
readonly name: "priceImpactUsd";
|
|
548
|
+
readonly type: "int256";
|
|
549
|
+
}, {
|
|
550
|
+
readonly internalType: "uint256";
|
|
551
|
+
readonly name: "executionPrice";
|
|
552
|
+
readonly type: "uint256";
|
|
553
|
+
}, {
|
|
554
|
+
readonly internalType: "bool";
|
|
555
|
+
readonly name: "balanceWasImproved";
|
|
556
|
+
readonly type: "bool";
|
|
557
|
+
}, {
|
|
558
|
+
readonly internalType: "int256";
|
|
559
|
+
readonly name: "proportionalPendingImpactUsd";
|
|
560
|
+
readonly type: "int256";
|
|
561
|
+
}, {
|
|
562
|
+
readonly internalType: "int256";
|
|
563
|
+
readonly name: "totalImpactUsd";
|
|
564
|
+
readonly type: "int256";
|
|
565
|
+
}, {
|
|
566
|
+
readonly internalType: "uint256";
|
|
567
|
+
readonly name: "priceImpactDiffUsd";
|
|
568
|
+
readonly type: "uint256";
|
|
569
|
+
}];
|
|
570
|
+
readonly internalType: "struct ReaderPricingUtils.ExecutionPriceResult";
|
|
571
|
+
readonly name: "executionPriceResult";
|
|
572
|
+
readonly type: "tuple";
|
|
573
|
+
}, {
|
|
574
|
+
readonly internalType: "int256";
|
|
575
|
+
readonly name: "basePnlUsd";
|
|
576
|
+
readonly type: "int256";
|
|
577
|
+
}, {
|
|
578
|
+
readonly internalType: "int256";
|
|
579
|
+
readonly name: "uncappedBasePnlUsd";
|
|
580
|
+
readonly type: "int256";
|
|
581
|
+
}, {
|
|
582
|
+
readonly internalType: "int256";
|
|
583
|
+
readonly name: "pnlAfterPriceImpactUsd";
|
|
584
|
+
readonly type: "int256";
|
|
585
|
+
}, {
|
|
586
|
+
readonly internalType: "int256";
|
|
587
|
+
readonly name: "positionValueInUsd";
|
|
588
|
+
readonly type: "int256";
|
|
589
|
+
}];
|
|
590
|
+
readonly internalType: "struct ReaderPositionUtils.PositionInfo[]";
|
|
591
|
+
readonly name: "";
|
|
592
|
+
readonly type: "tuple[]";
|
|
593
|
+
}];
|
|
594
|
+
readonly stateMutability: "view";
|
|
595
|
+
readonly type: "function";
|
|
596
|
+
}, {
|
|
597
|
+
readonly inputs: readonly [{
|
|
598
|
+
readonly internalType: "contract DataStore";
|
|
599
|
+
readonly name: "dataStore";
|
|
600
|
+
readonly type: "address";
|
|
601
|
+
}, {
|
|
602
|
+
readonly internalType: "address";
|
|
603
|
+
readonly name: "account";
|
|
604
|
+
readonly type: "address";
|
|
605
|
+
}, {
|
|
606
|
+
readonly internalType: "uint256";
|
|
607
|
+
readonly name: "start";
|
|
608
|
+
readonly type: "uint256";
|
|
609
|
+
}, {
|
|
610
|
+
readonly internalType: "uint256";
|
|
611
|
+
readonly name: "end";
|
|
612
|
+
readonly type: "uint256";
|
|
613
|
+
}];
|
|
614
|
+
readonly name: "getAccountPositions";
|
|
615
|
+
readonly outputs: readonly [{
|
|
616
|
+
readonly components: readonly [{
|
|
617
|
+
readonly components: readonly [{
|
|
618
|
+
readonly internalType: "address";
|
|
619
|
+
readonly name: "account";
|
|
620
|
+
readonly type: "address";
|
|
621
|
+
}, {
|
|
622
|
+
readonly internalType: "address";
|
|
623
|
+
readonly name: "market";
|
|
624
|
+
readonly type: "address";
|
|
625
|
+
}, {
|
|
626
|
+
readonly internalType: "address";
|
|
627
|
+
readonly name: "collateralToken";
|
|
628
|
+
readonly type: "address";
|
|
629
|
+
}];
|
|
630
|
+
readonly internalType: "struct Position.Addresses";
|
|
631
|
+
readonly name: "addresses";
|
|
632
|
+
readonly type: "tuple";
|
|
633
|
+
}, {
|
|
634
|
+
readonly components: readonly [{
|
|
635
|
+
readonly internalType: "uint256";
|
|
636
|
+
readonly name: "sizeInUsd";
|
|
637
|
+
readonly type: "uint256";
|
|
638
|
+
}, {
|
|
639
|
+
readonly internalType: "uint256";
|
|
640
|
+
readonly name: "sizeInTokens";
|
|
641
|
+
readonly type: "uint256";
|
|
642
|
+
}, {
|
|
643
|
+
readonly internalType: "uint256";
|
|
644
|
+
readonly name: "collateralAmount";
|
|
645
|
+
readonly type: "uint256";
|
|
646
|
+
}, {
|
|
647
|
+
readonly internalType: "int256";
|
|
648
|
+
readonly name: "pendingImpactAmount";
|
|
649
|
+
readonly type: "int256";
|
|
650
|
+
}, {
|
|
651
|
+
readonly internalType: "int256";
|
|
652
|
+
readonly name: "realizedUncappedPnlUsd";
|
|
653
|
+
readonly type: "int256";
|
|
654
|
+
}, {
|
|
655
|
+
readonly internalType: "int256";
|
|
656
|
+
readonly name: "realizedPnlUsd";
|
|
657
|
+
readonly type: "int256";
|
|
658
|
+
}, {
|
|
659
|
+
readonly internalType: "uint256";
|
|
660
|
+
readonly name: "cappedPnlPoolTokenAmount";
|
|
661
|
+
readonly type: "uint256";
|
|
662
|
+
}, {
|
|
663
|
+
readonly internalType: "uint256";
|
|
664
|
+
readonly name: "borrowingFactor";
|
|
665
|
+
readonly type: "uint256";
|
|
666
|
+
}, {
|
|
667
|
+
readonly internalType: "uint256";
|
|
668
|
+
readonly name: "fundingFeeAmountPerSize";
|
|
669
|
+
readonly type: "uint256";
|
|
670
|
+
}, {
|
|
671
|
+
readonly internalType: "uint256";
|
|
672
|
+
readonly name: "longTokenClaimableFundingAmountPerSize";
|
|
673
|
+
readonly type: "uint256";
|
|
674
|
+
}, {
|
|
675
|
+
readonly internalType: "uint256";
|
|
676
|
+
readonly name: "shortTokenClaimableFundingAmountPerSize";
|
|
677
|
+
readonly type: "uint256";
|
|
678
|
+
}, {
|
|
679
|
+
readonly internalType: "uint256";
|
|
680
|
+
readonly name: "increasedAtTime";
|
|
681
|
+
readonly type: "uint256";
|
|
682
|
+
}, {
|
|
683
|
+
readonly internalType: "uint256";
|
|
684
|
+
readonly name: "decreasedAtTime";
|
|
685
|
+
readonly type: "uint256";
|
|
686
|
+
}, {
|
|
687
|
+
readonly internalType: "int256";
|
|
688
|
+
readonly name: "cappedPnlReferencePoolPnlUsd";
|
|
689
|
+
readonly type: "int256";
|
|
690
|
+
}, {
|
|
691
|
+
readonly internalType: "uint256";
|
|
692
|
+
readonly name: "cappedPnlAllowancePerPrice";
|
|
693
|
+
readonly type: "uint256";
|
|
694
|
+
}];
|
|
695
|
+
readonly internalType: "struct Position.Numbers";
|
|
696
|
+
readonly name: "numbers";
|
|
697
|
+
readonly type: "tuple";
|
|
698
|
+
}, {
|
|
699
|
+
readonly components: readonly [{
|
|
700
|
+
readonly internalType: "bool";
|
|
701
|
+
readonly name: "isLong";
|
|
702
|
+
readonly type: "bool";
|
|
703
|
+
}];
|
|
704
|
+
readonly internalType: "struct Position.Flags";
|
|
705
|
+
readonly name: "flags";
|
|
706
|
+
readonly type: "tuple";
|
|
707
|
+
}];
|
|
708
|
+
readonly internalType: "struct Position.Props[]";
|
|
709
|
+
readonly name: "";
|
|
710
|
+
readonly type: "tuple[]";
|
|
711
|
+
}];
|
|
712
|
+
readonly stateMutability: "view";
|
|
713
|
+
readonly type: "function";
|
|
714
|
+
}, {
|
|
715
|
+
readonly inputs: readonly [{
|
|
716
|
+
readonly internalType: "contract DataStore";
|
|
717
|
+
readonly name: "dataStore";
|
|
718
|
+
readonly type: "address";
|
|
719
|
+
}, {
|
|
720
|
+
readonly internalType: "address";
|
|
721
|
+
readonly name: "market";
|
|
722
|
+
readonly type: "address";
|
|
723
|
+
}, {
|
|
724
|
+
readonly internalType: "bool";
|
|
725
|
+
readonly name: "isLong";
|
|
726
|
+
readonly type: "bool";
|
|
727
|
+
}, {
|
|
728
|
+
readonly components: readonly [{
|
|
729
|
+
readonly components: readonly [{
|
|
730
|
+
readonly internalType: "uint256";
|
|
731
|
+
readonly name: "min";
|
|
732
|
+
readonly type: "uint256";
|
|
733
|
+
}, {
|
|
734
|
+
readonly internalType: "uint256";
|
|
735
|
+
readonly name: "max";
|
|
736
|
+
readonly type: "uint256";
|
|
737
|
+
}];
|
|
738
|
+
readonly internalType: "struct Price.Props";
|
|
739
|
+
readonly name: "indexTokenPrice";
|
|
740
|
+
readonly type: "tuple";
|
|
741
|
+
}, {
|
|
742
|
+
readonly components: readonly [{
|
|
743
|
+
readonly internalType: "uint256";
|
|
744
|
+
readonly name: "min";
|
|
745
|
+
readonly type: "uint256";
|
|
746
|
+
}, {
|
|
747
|
+
readonly internalType: "uint256";
|
|
748
|
+
readonly name: "max";
|
|
749
|
+
readonly type: "uint256";
|
|
750
|
+
}];
|
|
751
|
+
readonly internalType: "struct Price.Props";
|
|
752
|
+
readonly name: "longTokenPrice";
|
|
753
|
+
readonly type: "tuple";
|
|
754
|
+
}, {
|
|
755
|
+
readonly components: readonly [{
|
|
756
|
+
readonly internalType: "uint256";
|
|
757
|
+
readonly name: "min";
|
|
758
|
+
readonly type: "uint256";
|
|
759
|
+
}, {
|
|
760
|
+
readonly internalType: "uint256";
|
|
761
|
+
readonly name: "max";
|
|
762
|
+
readonly type: "uint256";
|
|
763
|
+
}];
|
|
764
|
+
readonly internalType: "struct Price.Props";
|
|
765
|
+
readonly name: "shortTokenPrice";
|
|
766
|
+
readonly type: "tuple";
|
|
767
|
+
}];
|
|
768
|
+
readonly internalType: "struct MarketUtils.MarketPrices";
|
|
769
|
+
readonly name: "prices";
|
|
770
|
+
readonly type: "tuple";
|
|
771
|
+
}];
|
|
772
|
+
readonly name: "getAdlState";
|
|
773
|
+
readonly outputs: readonly [{
|
|
774
|
+
readonly internalType: "uint256";
|
|
775
|
+
readonly name: "";
|
|
776
|
+
readonly type: "uint256";
|
|
777
|
+
}, {
|
|
778
|
+
readonly internalType: "bool";
|
|
779
|
+
readonly name: "";
|
|
780
|
+
readonly type: "bool";
|
|
781
|
+
}, {
|
|
782
|
+
readonly internalType: "int256";
|
|
783
|
+
readonly name: "";
|
|
784
|
+
readonly type: "int256";
|
|
785
|
+
}, {
|
|
786
|
+
readonly internalType: "uint256";
|
|
787
|
+
readonly name: "";
|
|
788
|
+
readonly type: "uint256";
|
|
789
|
+
}];
|
|
790
|
+
readonly stateMutability: "view";
|
|
791
|
+
readonly type: "function";
|
|
792
|
+
}, {
|
|
793
|
+
readonly inputs: readonly [{
|
|
794
|
+
readonly internalType: "contract DataStore";
|
|
795
|
+
readonly name: "dataStore";
|
|
796
|
+
readonly type: "address";
|
|
797
|
+
}, {
|
|
798
|
+
readonly internalType: "bytes32";
|
|
799
|
+
readonly name: "key";
|
|
800
|
+
readonly type: "bytes32";
|
|
801
|
+
}];
|
|
802
|
+
readonly name: "getDeposit";
|
|
803
|
+
readonly outputs: readonly [{
|
|
804
|
+
readonly components: readonly [{
|
|
805
|
+
readonly components: readonly [{
|
|
806
|
+
readonly internalType: "address";
|
|
807
|
+
readonly name: "account";
|
|
808
|
+
readonly type: "address";
|
|
809
|
+
}, {
|
|
810
|
+
readonly internalType: "address";
|
|
811
|
+
readonly name: "receiver";
|
|
812
|
+
readonly type: "address";
|
|
813
|
+
}, {
|
|
814
|
+
readonly internalType: "address";
|
|
815
|
+
readonly name: "callbackContract";
|
|
816
|
+
readonly type: "address";
|
|
817
|
+
}, {
|
|
818
|
+
readonly internalType: "address";
|
|
819
|
+
readonly name: "uiFeeReceiver";
|
|
820
|
+
readonly type: "address";
|
|
821
|
+
}, {
|
|
822
|
+
readonly internalType: "address";
|
|
823
|
+
readonly name: "market";
|
|
824
|
+
readonly type: "address";
|
|
825
|
+
}, {
|
|
826
|
+
readonly internalType: "address";
|
|
827
|
+
readonly name: "initialLongToken";
|
|
828
|
+
readonly type: "address";
|
|
829
|
+
}, {
|
|
830
|
+
readonly internalType: "address";
|
|
831
|
+
readonly name: "initialShortToken";
|
|
832
|
+
readonly type: "address";
|
|
833
|
+
}, {
|
|
834
|
+
readonly internalType: "address[]";
|
|
835
|
+
readonly name: "longTokenSwapPath";
|
|
836
|
+
readonly type: "address[]";
|
|
837
|
+
}, {
|
|
838
|
+
readonly internalType: "address[]";
|
|
839
|
+
readonly name: "shortTokenSwapPath";
|
|
840
|
+
readonly type: "address[]";
|
|
841
|
+
}];
|
|
842
|
+
readonly internalType: "struct Deposit.Addresses";
|
|
843
|
+
readonly name: "addresses";
|
|
844
|
+
readonly type: "tuple";
|
|
845
|
+
}, {
|
|
846
|
+
readonly components: readonly [{
|
|
847
|
+
readonly internalType: "uint256";
|
|
848
|
+
readonly name: "initialLongTokenAmount";
|
|
849
|
+
readonly type: "uint256";
|
|
850
|
+
}, {
|
|
851
|
+
readonly internalType: "uint256";
|
|
852
|
+
readonly name: "initialShortTokenAmount";
|
|
853
|
+
readonly type: "uint256";
|
|
854
|
+
}, {
|
|
855
|
+
readonly internalType: "uint256";
|
|
856
|
+
readonly name: "minMarketTokens";
|
|
857
|
+
readonly type: "uint256";
|
|
858
|
+
}, {
|
|
859
|
+
readonly internalType: "uint256";
|
|
860
|
+
readonly name: "uiFeeFactor";
|
|
861
|
+
readonly type: "uint256";
|
|
862
|
+
}, {
|
|
863
|
+
readonly internalType: "uint256";
|
|
864
|
+
readonly name: "updatedAtTime";
|
|
865
|
+
readonly type: "uint256";
|
|
866
|
+
}, {
|
|
867
|
+
readonly internalType: "uint256";
|
|
868
|
+
readonly name: "executionFee";
|
|
869
|
+
readonly type: "uint256";
|
|
870
|
+
}, {
|
|
871
|
+
readonly internalType: "uint256";
|
|
872
|
+
readonly name: "callbackGasLimit";
|
|
873
|
+
readonly type: "uint256";
|
|
874
|
+
}, {
|
|
875
|
+
readonly internalType: "uint256";
|
|
876
|
+
readonly name: "srcChainId";
|
|
877
|
+
readonly type: "uint256";
|
|
878
|
+
}];
|
|
879
|
+
readonly internalType: "struct Deposit.Numbers";
|
|
880
|
+
readonly name: "numbers";
|
|
881
|
+
readonly type: "tuple";
|
|
882
|
+
}, {
|
|
883
|
+
readonly components: readonly [{
|
|
884
|
+
readonly internalType: "bool";
|
|
885
|
+
readonly name: "shouldUnwrapNativeToken";
|
|
886
|
+
readonly type: "bool";
|
|
887
|
+
}];
|
|
888
|
+
readonly internalType: "struct Deposit.Flags";
|
|
889
|
+
readonly name: "flags";
|
|
890
|
+
readonly type: "tuple";
|
|
891
|
+
}, {
|
|
892
|
+
readonly internalType: "bytes32[]";
|
|
893
|
+
readonly name: "_dataList";
|
|
894
|
+
readonly type: "bytes32[]";
|
|
895
|
+
}];
|
|
896
|
+
readonly internalType: "struct Deposit.Props";
|
|
897
|
+
readonly name: "";
|
|
898
|
+
readonly type: "tuple";
|
|
899
|
+
}];
|
|
900
|
+
readonly stateMutability: "view";
|
|
901
|
+
readonly type: "function";
|
|
902
|
+
}, {
|
|
903
|
+
readonly inputs: readonly [{
|
|
904
|
+
readonly internalType: "contract DataStore";
|
|
905
|
+
readonly name: "dataStore";
|
|
906
|
+
readonly type: "address";
|
|
907
|
+
}, {
|
|
908
|
+
readonly components: readonly [{
|
|
909
|
+
readonly internalType: "address";
|
|
910
|
+
readonly name: "marketToken";
|
|
911
|
+
readonly type: "address";
|
|
912
|
+
}, {
|
|
913
|
+
readonly internalType: "address";
|
|
914
|
+
readonly name: "indexToken";
|
|
915
|
+
readonly type: "address";
|
|
916
|
+
}, {
|
|
917
|
+
readonly internalType: "address";
|
|
918
|
+
readonly name: "longToken";
|
|
919
|
+
readonly type: "address";
|
|
920
|
+
}, {
|
|
921
|
+
readonly internalType: "address";
|
|
922
|
+
readonly name: "shortToken";
|
|
923
|
+
readonly type: "address";
|
|
924
|
+
}];
|
|
925
|
+
readonly internalType: "struct Market.Props";
|
|
926
|
+
readonly name: "market";
|
|
927
|
+
readonly type: "tuple";
|
|
928
|
+
}, {
|
|
929
|
+
readonly components: readonly [{
|
|
930
|
+
readonly components: readonly [{
|
|
931
|
+
readonly internalType: "uint256";
|
|
932
|
+
readonly name: "min";
|
|
933
|
+
readonly type: "uint256";
|
|
934
|
+
}, {
|
|
935
|
+
readonly internalType: "uint256";
|
|
936
|
+
readonly name: "max";
|
|
937
|
+
readonly type: "uint256";
|
|
938
|
+
}];
|
|
939
|
+
readonly internalType: "struct Price.Props";
|
|
940
|
+
readonly name: "indexTokenPrice";
|
|
941
|
+
readonly type: "tuple";
|
|
942
|
+
}, {
|
|
943
|
+
readonly components: readonly [{
|
|
944
|
+
readonly internalType: "uint256";
|
|
945
|
+
readonly name: "min";
|
|
946
|
+
readonly type: "uint256";
|
|
947
|
+
}, {
|
|
948
|
+
readonly internalType: "uint256";
|
|
949
|
+
readonly name: "max";
|
|
950
|
+
readonly type: "uint256";
|
|
951
|
+
}];
|
|
952
|
+
readonly internalType: "struct Price.Props";
|
|
953
|
+
readonly name: "longTokenPrice";
|
|
954
|
+
readonly type: "tuple";
|
|
955
|
+
}, {
|
|
956
|
+
readonly components: readonly [{
|
|
957
|
+
readonly internalType: "uint256";
|
|
958
|
+
readonly name: "min";
|
|
959
|
+
readonly type: "uint256";
|
|
960
|
+
}, {
|
|
961
|
+
readonly internalType: "uint256";
|
|
962
|
+
readonly name: "max";
|
|
963
|
+
readonly type: "uint256";
|
|
964
|
+
}];
|
|
965
|
+
readonly internalType: "struct Price.Props";
|
|
966
|
+
readonly name: "shortTokenPrice";
|
|
967
|
+
readonly type: "tuple";
|
|
968
|
+
}];
|
|
969
|
+
readonly internalType: "struct MarketUtils.MarketPrices";
|
|
970
|
+
readonly name: "prices";
|
|
971
|
+
readonly type: "tuple";
|
|
972
|
+
}, {
|
|
973
|
+
readonly internalType: "uint256";
|
|
974
|
+
readonly name: "longTokenAmount";
|
|
975
|
+
readonly type: "uint256";
|
|
976
|
+
}, {
|
|
977
|
+
readonly internalType: "uint256";
|
|
978
|
+
readonly name: "shortTokenAmount";
|
|
979
|
+
readonly type: "uint256";
|
|
980
|
+
}, {
|
|
981
|
+
readonly internalType: "address";
|
|
982
|
+
readonly name: "uiFeeReceiver";
|
|
983
|
+
readonly type: "address";
|
|
984
|
+
}, {
|
|
985
|
+
readonly internalType: "enum ISwapPricingUtils.SwapPricingType";
|
|
986
|
+
readonly name: "swapPricingType";
|
|
987
|
+
readonly type: "uint8";
|
|
988
|
+
}, {
|
|
989
|
+
readonly internalType: "bool";
|
|
990
|
+
readonly name: "includeVirtualInventoryImpact";
|
|
991
|
+
readonly type: "bool";
|
|
992
|
+
}];
|
|
993
|
+
readonly name: "getDepositAmountOut";
|
|
994
|
+
readonly outputs: readonly [{
|
|
995
|
+
readonly internalType: "uint256";
|
|
996
|
+
readonly name: "";
|
|
997
|
+
readonly type: "uint256";
|
|
998
|
+
}];
|
|
999
|
+
readonly stateMutability: "view";
|
|
1000
|
+
readonly type: "function";
|
|
1001
|
+
}, {
|
|
1002
|
+
readonly inputs: readonly [{
|
|
1003
|
+
readonly internalType: "contract DataStore";
|
|
1004
|
+
readonly name: "dataStore";
|
|
1005
|
+
readonly type: "address";
|
|
1006
|
+
}, {
|
|
1007
|
+
readonly internalType: "address";
|
|
1008
|
+
readonly name: "marketKey";
|
|
1009
|
+
readonly type: "address";
|
|
1010
|
+
}, {
|
|
1011
|
+
readonly components: readonly [{
|
|
1012
|
+
readonly components: readonly [{
|
|
1013
|
+
readonly internalType: "uint256";
|
|
1014
|
+
readonly name: "min";
|
|
1015
|
+
readonly type: "uint256";
|
|
1016
|
+
}, {
|
|
1017
|
+
readonly internalType: "uint256";
|
|
1018
|
+
readonly name: "max";
|
|
1019
|
+
readonly type: "uint256";
|
|
1020
|
+
}];
|
|
1021
|
+
readonly internalType: "struct Price.Props";
|
|
1022
|
+
readonly name: "indexTokenPrice";
|
|
1023
|
+
readonly type: "tuple";
|
|
1024
|
+
}, {
|
|
1025
|
+
readonly components: readonly [{
|
|
1026
|
+
readonly internalType: "uint256";
|
|
1027
|
+
readonly name: "min";
|
|
1028
|
+
readonly type: "uint256";
|
|
1029
|
+
}, {
|
|
1030
|
+
readonly internalType: "uint256";
|
|
1031
|
+
readonly name: "max";
|
|
1032
|
+
readonly type: "uint256";
|
|
1033
|
+
}];
|
|
1034
|
+
readonly internalType: "struct Price.Props";
|
|
1035
|
+
readonly name: "longTokenPrice";
|
|
1036
|
+
readonly type: "tuple";
|
|
1037
|
+
}, {
|
|
1038
|
+
readonly components: readonly [{
|
|
1039
|
+
readonly internalType: "uint256";
|
|
1040
|
+
readonly name: "min";
|
|
1041
|
+
readonly type: "uint256";
|
|
1042
|
+
}, {
|
|
1043
|
+
readonly internalType: "uint256";
|
|
1044
|
+
readonly name: "max";
|
|
1045
|
+
readonly type: "uint256";
|
|
1046
|
+
}];
|
|
1047
|
+
readonly internalType: "struct Price.Props";
|
|
1048
|
+
readonly name: "shortTokenPrice";
|
|
1049
|
+
readonly type: "tuple";
|
|
1050
|
+
}];
|
|
1051
|
+
readonly internalType: "struct MarketUtils.MarketPrices";
|
|
1052
|
+
readonly name: "prices";
|
|
1053
|
+
readonly type: "tuple";
|
|
1054
|
+
}, {
|
|
1055
|
+
readonly internalType: "uint256";
|
|
1056
|
+
readonly name: "positionSizeInUsd";
|
|
1057
|
+
readonly type: "uint256";
|
|
1058
|
+
}, {
|
|
1059
|
+
readonly internalType: "uint256";
|
|
1060
|
+
readonly name: "positionSizeInTokens";
|
|
1061
|
+
readonly type: "uint256";
|
|
1062
|
+
}, {
|
|
1063
|
+
readonly internalType: "int256";
|
|
1064
|
+
readonly name: "sizeDeltaUsd";
|
|
1065
|
+
readonly type: "int256";
|
|
1066
|
+
}, {
|
|
1067
|
+
readonly internalType: "int256";
|
|
1068
|
+
readonly name: "pendingImpactAmount";
|
|
1069
|
+
readonly type: "int256";
|
|
1070
|
+
}, {
|
|
1071
|
+
readonly internalType: "bool";
|
|
1072
|
+
readonly name: "isLong";
|
|
1073
|
+
readonly type: "bool";
|
|
1074
|
+
}];
|
|
1075
|
+
readonly name: "getExecutionPrice";
|
|
1076
|
+
readonly outputs: readonly [{
|
|
1077
|
+
readonly components: readonly [{
|
|
1078
|
+
readonly internalType: "int256";
|
|
1079
|
+
readonly name: "priceImpactUsd";
|
|
1080
|
+
readonly type: "int256";
|
|
1081
|
+
}, {
|
|
1082
|
+
readonly internalType: "uint256";
|
|
1083
|
+
readonly name: "executionPrice";
|
|
1084
|
+
readonly type: "uint256";
|
|
1085
|
+
}, {
|
|
1086
|
+
readonly internalType: "bool";
|
|
1087
|
+
readonly name: "balanceWasImproved";
|
|
1088
|
+
readonly type: "bool";
|
|
1089
|
+
}, {
|
|
1090
|
+
readonly internalType: "int256";
|
|
1091
|
+
readonly name: "proportionalPendingImpactUsd";
|
|
1092
|
+
readonly type: "int256";
|
|
1093
|
+
}, {
|
|
1094
|
+
readonly internalType: "int256";
|
|
1095
|
+
readonly name: "totalImpactUsd";
|
|
1096
|
+
readonly type: "int256";
|
|
1097
|
+
}, {
|
|
1098
|
+
readonly internalType: "uint256";
|
|
1099
|
+
readonly name: "priceImpactDiffUsd";
|
|
1100
|
+
readonly type: "uint256";
|
|
1101
|
+
}];
|
|
1102
|
+
readonly internalType: "struct ReaderPricingUtils.ExecutionPriceResult";
|
|
1103
|
+
readonly name: "";
|
|
1104
|
+
readonly type: "tuple";
|
|
1105
|
+
}];
|
|
1106
|
+
readonly stateMutability: "view";
|
|
1107
|
+
readonly type: "function";
|
|
1108
|
+
}, {
|
|
1109
|
+
readonly inputs: readonly [{
|
|
1110
|
+
readonly internalType: "contract DataStore";
|
|
1111
|
+
readonly name: "dataStore";
|
|
1112
|
+
readonly type: "address";
|
|
1113
|
+
}, {
|
|
1114
|
+
readonly internalType: "address";
|
|
1115
|
+
readonly name: "key";
|
|
1116
|
+
readonly type: "address";
|
|
1117
|
+
}];
|
|
1118
|
+
readonly name: "getMarket";
|
|
1119
|
+
readonly outputs: readonly [{
|
|
1120
|
+
readonly components: readonly [{
|
|
1121
|
+
readonly internalType: "address";
|
|
1122
|
+
readonly name: "marketToken";
|
|
1123
|
+
readonly type: "address";
|
|
1124
|
+
}, {
|
|
1125
|
+
readonly internalType: "address";
|
|
1126
|
+
readonly name: "indexToken";
|
|
1127
|
+
readonly type: "address";
|
|
1128
|
+
}, {
|
|
1129
|
+
readonly internalType: "address";
|
|
1130
|
+
readonly name: "longToken";
|
|
1131
|
+
readonly type: "address";
|
|
1132
|
+
}, {
|
|
1133
|
+
readonly internalType: "address";
|
|
1134
|
+
readonly name: "shortToken";
|
|
1135
|
+
readonly type: "address";
|
|
1136
|
+
}];
|
|
1137
|
+
readonly internalType: "struct Market.Props";
|
|
1138
|
+
readonly name: "";
|
|
1139
|
+
readonly type: "tuple";
|
|
1140
|
+
}];
|
|
1141
|
+
readonly stateMutability: "view";
|
|
1142
|
+
readonly type: "function";
|
|
1143
|
+
}, {
|
|
1144
|
+
readonly inputs: readonly [{
|
|
1145
|
+
readonly internalType: "contract DataStore";
|
|
1146
|
+
readonly name: "dataStore";
|
|
1147
|
+
readonly type: "address";
|
|
1148
|
+
}, {
|
|
1149
|
+
readonly internalType: "bytes32";
|
|
1150
|
+
readonly name: "salt";
|
|
1151
|
+
readonly type: "bytes32";
|
|
1152
|
+
}];
|
|
1153
|
+
readonly name: "getMarketBySalt";
|
|
1154
|
+
readonly outputs: readonly [{
|
|
1155
|
+
readonly components: readonly [{
|
|
1156
|
+
readonly internalType: "address";
|
|
1157
|
+
readonly name: "marketToken";
|
|
1158
|
+
readonly type: "address";
|
|
1159
|
+
}, {
|
|
1160
|
+
readonly internalType: "address";
|
|
1161
|
+
readonly name: "indexToken";
|
|
1162
|
+
readonly type: "address";
|
|
1163
|
+
}, {
|
|
1164
|
+
readonly internalType: "address";
|
|
1165
|
+
readonly name: "longToken";
|
|
1166
|
+
readonly type: "address";
|
|
1167
|
+
}, {
|
|
1168
|
+
readonly internalType: "address";
|
|
1169
|
+
readonly name: "shortToken";
|
|
1170
|
+
readonly type: "address";
|
|
1171
|
+
}];
|
|
1172
|
+
readonly internalType: "struct Market.Props";
|
|
1173
|
+
readonly name: "";
|
|
1174
|
+
readonly type: "tuple";
|
|
1175
|
+
}];
|
|
1176
|
+
readonly stateMutability: "view";
|
|
1177
|
+
readonly type: "function";
|
|
1178
|
+
}, {
|
|
1179
|
+
readonly inputs: readonly [{
|
|
1180
|
+
readonly internalType: "contract DataStore";
|
|
1181
|
+
readonly name: "dataStore";
|
|
1182
|
+
readonly type: "address";
|
|
1183
|
+
}, {
|
|
1184
|
+
readonly components: readonly [{
|
|
1185
|
+
readonly components: readonly [{
|
|
1186
|
+
readonly internalType: "uint256";
|
|
1187
|
+
readonly name: "min";
|
|
1188
|
+
readonly type: "uint256";
|
|
1189
|
+
}, {
|
|
1190
|
+
readonly internalType: "uint256";
|
|
1191
|
+
readonly name: "max";
|
|
1192
|
+
readonly type: "uint256";
|
|
1193
|
+
}];
|
|
1194
|
+
readonly internalType: "struct Price.Props";
|
|
1195
|
+
readonly name: "indexTokenPrice";
|
|
1196
|
+
readonly type: "tuple";
|
|
1197
|
+
}, {
|
|
1198
|
+
readonly components: readonly [{
|
|
1199
|
+
readonly internalType: "uint256";
|
|
1200
|
+
readonly name: "min";
|
|
1201
|
+
readonly type: "uint256";
|
|
1202
|
+
}, {
|
|
1203
|
+
readonly internalType: "uint256";
|
|
1204
|
+
readonly name: "max";
|
|
1205
|
+
readonly type: "uint256";
|
|
1206
|
+
}];
|
|
1207
|
+
readonly internalType: "struct Price.Props";
|
|
1208
|
+
readonly name: "longTokenPrice";
|
|
1209
|
+
readonly type: "tuple";
|
|
1210
|
+
}, {
|
|
1211
|
+
readonly components: readonly [{
|
|
1212
|
+
readonly internalType: "uint256";
|
|
1213
|
+
readonly name: "min";
|
|
1214
|
+
readonly type: "uint256";
|
|
1215
|
+
}, {
|
|
1216
|
+
readonly internalType: "uint256";
|
|
1217
|
+
readonly name: "max";
|
|
1218
|
+
readonly type: "uint256";
|
|
1219
|
+
}];
|
|
1220
|
+
readonly internalType: "struct Price.Props";
|
|
1221
|
+
readonly name: "shortTokenPrice";
|
|
1222
|
+
readonly type: "tuple";
|
|
1223
|
+
}];
|
|
1224
|
+
readonly internalType: "struct MarketUtils.MarketPrices";
|
|
1225
|
+
readonly name: "prices";
|
|
1226
|
+
readonly type: "tuple";
|
|
1227
|
+
}, {
|
|
1228
|
+
readonly internalType: "address";
|
|
1229
|
+
readonly name: "marketKey";
|
|
1230
|
+
readonly type: "address";
|
|
1231
|
+
}];
|
|
1232
|
+
readonly name: "getMarketInfo";
|
|
1233
|
+
readonly outputs: readonly [{
|
|
1234
|
+
readonly components: readonly [{
|
|
1235
|
+
readonly components: readonly [{
|
|
1236
|
+
readonly internalType: "address";
|
|
1237
|
+
readonly name: "marketToken";
|
|
1238
|
+
readonly type: "address";
|
|
1239
|
+
}, {
|
|
1240
|
+
readonly internalType: "address";
|
|
1241
|
+
readonly name: "indexToken";
|
|
1242
|
+
readonly type: "address";
|
|
1243
|
+
}, {
|
|
1244
|
+
readonly internalType: "address";
|
|
1245
|
+
readonly name: "longToken";
|
|
1246
|
+
readonly type: "address";
|
|
1247
|
+
}, {
|
|
1248
|
+
readonly internalType: "address";
|
|
1249
|
+
readonly name: "shortToken";
|
|
1250
|
+
readonly type: "address";
|
|
1251
|
+
}];
|
|
1252
|
+
readonly internalType: "struct Market.Props";
|
|
1253
|
+
readonly name: "market";
|
|
1254
|
+
readonly type: "tuple";
|
|
1255
|
+
}, {
|
|
1256
|
+
readonly internalType: "uint256";
|
|
1257
|
+
readonly name: "borrowingFactorPerSecondForLongs";
|
|
1258
|
+
readonly type: "uint256";
|
|
1259
|
+
}, {
|
|
1260
|
+
readonly internalType: "uint256";
|
|
1261
|
+
readonly name: "borrowingFactorPerSecondForShorts";
|
|
1262
|
+
readonly type: "uint256";
|
|
1263
|
+
}, {
|
|
1264
|
+
readonly internalType: "bool";
|
|
1265
|
+
readonly name: "borrowingFactorForLongsAvailable";
|
|
1266
|
+
readonly type: "bool";
|
|
1267
|
+
}, {
|
|
1268
|
+
readonly internalType: "bool";
|
|
1269
|
+
readonly name: "borrowingFactorForShortsAvailable";
|
|
1270
|
+
readonly type: "bool";
|
|
1271
|
+
}, {
|
|
1272
|
+
readonly components: readonly [{
|
|
1273
|
+
readonly components: readonly [{
|
|
1274
|
+
readonly components: readonly [{
|
|
1275
|
+
readonly internalType: "uint256";
|
|
1276
|
+
readonly name: "longToken";
|
|
1277
|
+
readonly type: "uint256";
|
|
1278
|
+
}, {
|
|
1279
|
+
readonly internalType: "uint256";
|
|
1280
|
+
readonly name: "shortToken";
|
|
1281
|
+
readonly type: "uint256";
|
|
1282
|
+
}];
|
|
1283
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1284
|
+
readonly name: "long";
|
|
1285
|
+
readonly type: "tuple";
|
|
1286
|
+
}, {
|
|
1287
|
+
readonly components: readonly [{
|
|
1288
|
+
readonly internalType: "uint256";
|
|
1289
|
+
readonly name: "longToken";
|
|
1290
|
+
readonly type: "uint256";
|
|
1291
|
+
}, {
|
|
1292
|
+
readonly internalType: "uint256";
|
|
1293
|
+
readonly name: "shortToken";
|
|
1294
|
+
readonly type: "uint256";
|
|
1295
|
+
}];
|
|
1296
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1297
|
+
readonly name: "short";
|
|
1298
|
+
readonly type: "tuple";
|
|
1299
|
+
}];
|
|
1300
|
+
readonly internalType: "struct MarketUtils.PositionType";
|
|
1301
|
+
readonly name: "fundingFeeAmountPerSize";
|
|
1302
|
+
readonly type: "tuple";
|
|
1303
|
+
}, {
|
|
1304
|
+
readonly components: readonly [{
|
|
1305
|
+
readonly components: readonly [{
|
|
1306
|
+
readonly internalType: "uint256";
|
|
1307
|
+
readonly name: "longToken";
|
|
1308
|
+
readonly type: "uint256";
|
|
1309
|
+
}, {
|
|
1310
|
+
readonly internalType: "uint256";
|
|
1311
|
+
readonly name: "shortToken";
|
|
1312
|
+
readonly type: "uint256";
|
|
1313
|
+
}];
|
|
1314
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1315
|
+
readonly name: "long";
|
|
1316
|
+
readonly type: "tuple";
|
|
1317
|
+
}, {
|
|
1318
|
+
readonly components: readonly [{
|
|
1319
|
+
readonly internalType: "uint256";
|
|
1320
|
+
readonly name: "longToken";
|
|
1321
|
+
readonly type: "uint256";
|
|
1322
|
+
}, {
|
|
1323
|
+
readonly internalType: "uint256";
|
|
1324
|
+
readonly name: "shortToken";
|
|
1325
|
+
readonly type: "uint256";
|
|
1326
|
+
}];
|
|
1327
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1328
|
+
readonly name: "short";
|
|
1329
|
+
readonly type: "tuple";
|
|
1330
|
+
}];
|
|
1331
|
+
readonly internalType: "struct MarketUtils.PositionType";
|
|
1332
|
+
readonly name: "claimableFundingAmountPerSize";
|
|
1333
|
+
readonly type: "tuple";
|
|
1334
|
+
}];
|
|
1335
|
+
readonly internalType: "struct ReaderUtils.BaseFundingValues";
|
|
1336
|
+
readonly name: "baseFunding";
|
|
1337
|
+
readonly type: "tuple";
|
|
1338
|
+
}, {
|
|
1339
|
+
readonly components: readonly [{
|
|
1340
|
+
readonly internalType: "bool";
|
|
1341
|
+
readonly name: "longsPayShorts";
|
|
1342
|
+
readonly type: "bool";
|
|
1343
|
+
}, {
|
|
1344
|
+
readonly internalType: "uint256";
|
|
1345
|
+
readonly name: "fundingFactorPerSecond";
|
|
1346
|
+
readonly type: "uint256";
|
|
1347
|
+
}, {
|
|
1348
|
+
readonly internalType: "int256";
|
|
1349
|
+
readonly name: "nextSavedFundingFactorPerSecond";
|
|
1350
|
+
readonly type: "int256";
|
|
1351
|
+
}, {
|
|
1352
|
+
readonly components: readonly [{
|
|
1353
|
+
readonly components: readonly [{
|
|
1354
|
+
readonly internalType: "uint256";
|
|
1355
|
+
readonly name: "longToken";
|
|
1356
|
+
readonly type: "uint256";
|
|
1357
|
+
}, {
|
|
1358
|
+
readonly internalType: "uint256";
|
|
1359
|
+
readonly name: "shortToken";
|
|
1360
|
+
readonly type: "uint256";
|
|
1361
|
+
}];
|
|
1362
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1363
|
+
readonly name: "long";
|
|
1364
|
+
readonly type: "tuple";
|
|
1365
|
+
}, {
|
|
1366
|
+
readonly components: readonly [{
|
|
1367
|
+
readonly internalType: "uint256";
|
|
1368
|
+
readonly name: "longToken";
|
|
1369
|
+
readonly type: "uint256";
|
|
1370
|
+
}, {
|
|
1371
|
+
readonly internalType: "uint256";
|
|
1372
|
+
readonly name: "shortToken";
|
|
1373
|
+
readonly type: "uint256";
|
|
1374
|
+
}];
|
|
1375
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1376
|
+
readonly name: "short";
|
|
1377
|
+
readonly type: "tuple";
|
|
1378
|
+
}];
|
|
1379
|
+
readonly internalType: "struct MarketUtils.PositionType";
|
|
1380
|
+
readonly name: "fundingFeeAmountPerSizeDelta";
|
|
1381
|
+
readonly type: "tuple";
|
|
1382
|
+
}, {
|
|
1383
|
+
readonly components: readonly [{
|
|
1384
|
+
readonly components: readonly [{
|
|
1385
|
+
readonly internalType: "uint256";
|
|
1386
|
+
readonly name: "longToken";
|
|
1387
|
+
readonly type: "uint256";
|
|
1388
|
+
}, {
|
|
1389
|
+
readonly internalType: "uint256";
|
|
1390
|
+
readonly name: "shortToken";
|
|
1391
|
+
readonly type: "uint256";
|
|
1392
|
+
}];
|
|
1393
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1394
|
+
readonly name: "long";
|
|
1395
|
+
readonly type: "tuple";
|
|
1396
|
+
}, {
|
|
1397
|
+
readonly components: readonly [{
|
|
1398
|
+
readonly internalType: "uint256";
|
|
1399
|
+
readonly name: "longToken";
|
|
1400
|
+
readonly type: "uint256";
|
|
1401
|
+
}, {
|
|
1402
|
+
readonly internalType: "uint256";
|
|
1403
|
+
readonly name: "shortToken";
|
|
1404
|
+
readonly type: "uint256";
|
|
1405
|
+
}];
|
|
1406
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1407
|
+
readonly name: "short";
|
|
1408
|
+
readonly type: "tuple";
|
|
1409
|
+
}];
|
|
1410
|
+
readonly internalType: "struct MarketUtils.PositionType";
|
|
1411
|
+
readonly name: "claimableFundingAmountPerSizeDelta";
|
|
1412
|
+
readonly type: "tuple";
|
|
1413
|
+
}];
|
|
1414
|
+
readonly internalType: "struct MarketUtils.GetNextFundingAmountPerSizeResult";
|
|
1415
|
+
readonly name: "nextFunding";
|
|
1416
|
+
readonly type: "tuple";
|
|
1417
|
+
}, {
|
|
1418
|
+
readonly components: readonly [{
|
|
1419
|
+
readonly internalType: "uint256";
|
|
1420
|
+
readonly name: "virtualPoolAmountForLongToken";
|
|
1421
|
+
readonly type: "uint256";
|
|
1422
|
+
}, {
|
|
1423
|
+
readonly internalType: "uint256";
|
|
1424
|
+
readonly name: "virtualPoolAmountForShortToken";
|
|
1425
|
+
readonly type: "uint256";
|
|
1426
|
+
}, {
|
|
1427
|
+
readonly internalType: "int256";
|
|
1428
|
+
readonly name: "virtualInventoryForPositions";
|
|
1429
|
+
readonly type: "int256";
|
|
1430
|
+
}];
|
|
1431
|
+
readonly internalType: "struct ReaderUtils.VirtualInventory";
|
|
1432
|
+
readonly name: "virtualInventory";
|
|
1433
|
+
readonly type: "tuple";
|
|
1434
|
+
}, {
|
|
1435
|
+
readonly internalType: "bool";
|
|
1436
|
+
readonly name: "isDisabled";
|
|
1437
|
+
readonly type: "bool";
|
|
1438
|
+
}];
|
|
1439
|
+
readonly internalType: "struct ReaderUtils.MarketInfo";
|
|
1440
|
+
readonly name: "";
|
|
1441
|
+
readonly type: "tuple";
|
|
1442
|
+
}];
|
|
1443
|
+
readonly stateMutability: "view";
|
|
1444
|
+
readonly type: "function";
|
|
1445
|
+
}, {
|
|
1446
|
+
readonly inputs: readonly [{
|
|
1447
|
+
readonly internalType: "contract DataStore";
|
|
1448
|
+
readonly name: "dataStore";
|
|
1449
|
+
readonly type: "address";
|
|
1450
|
+
}, {
|
|
1451
|
+
readonly components: readonly [{
|
|
1452
|
+
readonly components: readonly [{
|
|
1453
|
+
readonly internalType: "uint256";
|
|
1454
|
+
readonly name: "min";
|
|
1455
|
+
readonly type: "uint256";
|
|
1456
|
+
}, {
|
|
1457
|
+
readonly internalType: "uint256";
|
|
1458
|
+
readonly name: "max";
|
|
1459
|
+
readonly type: "uint256";
|
|
1460
|
+
}];
|
|
1461
|
+
readonly internalType: "struct Price.Props";
|
|
1462
|
+
readonly name: "indexTokenPrice";
|
|
1463
|
+
readonly type: "tuple";
|
|
1464
|
+
}, {
|
|
1465
|
+
readonly components: readonly [{
|
|
1466
|
+
readonly internalType: "uint256";
|
|
1467
|
+
readonly name: "min";
|
|
1468
|
+
readonly type: "uint256";
|
|
1469
|
+
}, {
|
|
1470
|
+
readonly internalType: "uint256";
|
|
1471
|
+
readonly name: "max";
|
|
1472
|
+
readonly type: "uint256";
|
|
1473
|
+
}];
|
|
1474
|
+
readonly internalType: "struct Price.Props";
|
|
1475
|
+
readonly name: "longTokenPrice";
|
|
1476
|
+
readonly type: "tuple";
|
|
1477
|
+
}, {
|
|
1478
|
+
readonly components: readonly [{
|
|
1479
|
+
readonly internalType: "uint256";
|
|
1480
|
+
readonly name: "min";
|
|
1481
|
+
readonly type: "uint256";
|
|
1482
|
+
}, {
|
|
1483
|
+
readonly internalType: "uint256";
|
|
1484
|
+
readonly name: "max";
|
|
1485
|
+
readonly type: "uint256";
|
|
1486
|
+
}];
|
|
1487
|
+
readonly internalType: "struct Price.Props";
|
|
1488
|
+
readonly name: "shortTokenPrice";
|
|
1489
|
+
readonly type: "tuple";
|
|
1490
|
+
}];
|
|
1491
|
+
readonly internalType: "struct MarketUtils.MarketPrices[]";
|
|
1492
|
+
readonly name: "marketPricesList";
|
|
1493
|
+
readonly type: "tuple[]";
|
|
1494
|
+
}, {
|
|
1495
|
+
readonly internalType: "uint256";
|
|
1496
|
+
readonly name: "start";
|
|
1497
|
+
readonly type: "uint256";
|
|
1498
|
+
}, {
|
|
1499
|
+
readonly internalType: "uint256";
|
|
1500
|
+
readonly name: "end";
|
|
1501
|
+
readonly type: "uint256";
|
|
1502
|
+
}];
|
|
1503
|
+
readonly name: "getMarketInfoList";
|
|
1504
|
+
readonly outputs: readonly [{
|
|
1505
|
+
readonly components: readonly [{
|
|
1506
|
+
readonly components: readonly [{
|
|
1507
|
+
readonly internalType: "address";
|
|
1508
|
+
readonly name: "marketToken";
|
|
1509
|
+
readonly type: "address";
|
|
1510
|
+
}, {
|
|
1511
|
+
readonly internalType: "address";
|
|
1512
|
+
readonly name: "indexToken";
|
|
1513
|
+
readonly type: "address";
|
|
1514
|
+
}, {
|
|
1515
|
+
readonly internalType: "address";
|
|
1516
|
+
readonly name: "longToken";
|
|
1517
|
+
readonly type: "address";
|
|
1518
|
+
}, {
|
|
1519
|
+
readonly internalType: "address";
|
|
1520
|
+
readonly name: "shortToken";
|
|
1521
|
+
readonly type: "address";
|
|
1522
|
+
}];
|
|
1523
|
+
readonly internalType: "struct Market.Props";
|
|
1524
|
+
readonly name: "market";
|
|
1525
|
+
readonly type: "tuple";
|
|
1526
|
+
}, {
|
|
1527
|
+
readonly internalType: "uint256";
|
|
1528
|
+
readonly name: "borrowingFactorPerSecondForLongs";
|
|
1529
|
+
readonly type: "uint256";
|
|
1530
|
+
}, {
|
|
1531
|
+
readonly internalType: "uint256";
|
|
1532
|
+
readonly name: "borrowingFactorPerSecondForShorts";
|
|
1533
|
+
readonly type: "uint256";
|
|
1534
|
+
}, {
|
|
1535
|
+
readonly internalType: "bool";
|
|
1536
|
+
readonly name: "borrowingFactorForLongsAvailable";
|
|
1537
|
+
readonly type: "bool";
|
|
1538
|
+
}, {
|
|
1539
|
+
readonly internalType: "bool";
|
|
1540
|
+
readonly name: "borrowingFactorForShortsAvailable";
|
|
1541
|
+
readonly type: "bool";
|
|
1542
|
+
}, {
|
|
1543
|
+
readonly components: readonly [{
|
|
1544
|
+
readonly components: readonly [{
|
|
1545
|
+
readonly components: readonly [{
|
|
1546
|
+
readonly internalType: "uint256";
|
|
1547
|
+
readonly name: "longToken";
|
|
1548
|
+
readonly type: "uint256";
|
|
1549
|
+
}, {
|
|
1550
|
+
readonly internalType: "uint256";
|
|
1551
|
+
readonly name: "shortToken";
|
|
1552
|
+
readonly type: "uint256";
|
|
1553
|
+
}];
|
|
1554
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1555
|
+
readonly name: "long";
|
|
1556
|
+
readonly type: "tuple";
|
|
1557
|
+
}, {
|
|
1558
|
+
readonly components: readonly [{
|
|
1559
|
+
readonly internalType: "uint256";
|
|
1560
|
+
readonly name: "longToken";
|
|
1561
|
+
readonly type: "uint256";
|
|
1562
|
+
}, {
|
|
1563
|
+
readonly internalType: "uint256";
|
|
1564
|
+
readonly name: "shortToken";
|
|
1565
|
+
readonly type: "uint256";
|
|
1566
|
+
}];
|
|
1567
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1568
|
+
readonly name: "short";
|
|
1569
|
+
readonly type: "tuple";
|
|
1570
|
+
}];
|
|
1571
|
+
readonly internalType: "struct MarketUtils.PositionType";
|
|
1572
|
+
readonly name: "fundingFeeAmountPerSize";
|
|
1573
|
+
readonly type: "tuple";
|
|
1574
|
+
}, {
|
|
1575
|
+
readonly components: readonly [{
|
|
1576
|
+
readonly components: readonly [{
|
|
1577
|
+
readonly internalType: "uint256";
|
|
1578
|
+
readonly name: "longToken";
|
|
1579
|
+
readonly type: "uint256";
|
|
1580
|
+
}, {
|
|
1581
|
+
readonly internalType: "uint256";
|
|
1582
|
+
readonly name: "shortToken";
|
|
1583
|
+
readonly type: "uint256";
|
|
1584
|
+
}];
|
|
1585
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1586
|
+
readonly name: "long";
|
|
1587
|
+
readonly type: "tuple";
|
|
1588
|
+
}, {
|
|
1589
|
+
readonly components: readonly [{
|
|
1590
|
+
readonly internalType: "uint256";
|
|
1591
|
+
readonly name: "longToken";
|
|
1592
|
+
readonly type: "uint256";
|
|
1593
|
+
}, {
|
|
1594
|
+
readonly internalType: "uint256";
|
|
1595
|
+
readonly name: "shortToken";
|
|
1596
|
+
readonly type: "uint256";
|
|
1597
|
+
}];
|
|
1598
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1599
|
+
readonly name: "short";
|
|
1600
|
+
readonly type: "tuple";
|
|
1601
|
+
}];
|
|
1602
|
+
readonly internalType: "struct MarketUtils.PositionType";
|
|
1603
|
+
readonly name: "claimableFundingAmountPerSize";
|
|
1604
|
+
readonly type: "tuple";
|
|
1605
|
+
}];
|
|
1606
|
+
readonly internalType: "struct ReaderUtils.BaseFundingValues";
|
|
1607
|
+
readonly name: "baseFunding";
|
|
1608
|
+
readonly type: "tuple";
|
|
1609
|
+
}, {
|
|
1610
|
+
readonly components: readonly [{
|
|
1611
|
+
readonly internalType: "bool";
|
|
1612
|
+
readonly name: "longsPayShorts";
|
|
1613
|
+
readonly type: "bool";
|
|
1614
|
+
}, {
|
|
1615
|
+
readonly internalType: "uint256";
|
|
1616
|
+
readonly name: "fundingFactorPerSecond";
|
|
1617
|
+
readonly type: "uint256";
|
|
1618
|
+
}, {
|
|
1619
|
+
readonly internalType: "int256";
|
|
1620
|
+
readonly name: "nextSavedFundingFactorPerSecond";
|
|
1621
|
+
readonly type: "int256";
|
|
1622
|
+
}, {
|
|
1623
|
+
readonly components: readonly [{
|
|
1624
|
+
readonly components: readonly [{
|
|
1625
|
+
readonly internalType: "uint256";
|
|
1626
|
+
readonly name: "longToken";
|
|
1627
|
+
readonly type: "uint256";
|
|
1628
|
+
}, {
|
|
1629
|
+
readonly internalType: "uint256";
|
|
1630
|
+
readonly name: "shortToken";
|
|
1631
|
+
readonly type: "uint256";
|
|
1632
|
+
}];
|
|
1633
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1634
|
+
readonly name: "long";
|
|
1635
|
+
readonly type: "tuple";
|
|
1636
|
+
}, {
|
|
1637
|
+
readonly components: readonly [{
|
|
1638
|
+
readonly internalType: "uint256";
|
|
1639
|
+
readonly name: "longToken";
|
|
1640
|
+
readonly type: "uint256";
|
|
1641
|
+
}, {
|
|
1642
|
+
readonly internalType: "uint256";
|
|
1643
|
+
readonly name: "shortToken";
|
|
1644
|
+
readonly type: "uint256";
|
|
1645
|
+
}];
|
|
1646
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1647
|
+
readonly name: "short";
|
|
1648
|
+
readonly type: "tuple";
|
|
1649
|
+
}];
|
|
1650
|
+
readonly internalType: "struct MarketUtils.PositionType";
|
|
1651
|
+
readonly name: "fundingFeeAmountPerSizeDelta";
|
|
1652
|
+
readonly type: "tuple";
|
|
1653
|
+
}, {
|
|
1654
|
+
readonly components: readonly [{
|
|
1655
|
+
readonly components: readonly [{
|
|
1656
|
+
readonly internalType: "uint256";
|
|
1657
|
+
readonly name: "longToken";
|
|
1658
|
+
readonly type: "uint256";
|
|
1659
|
+
}, {
|
|
1660
|
+
readonly internalType: "uint256";
|
|
1661
|
+
readonly name: "shortToken";
|
|
1662
|
+
readonly type: "uint256";
|
|
1663
|
+
}];
|
|
1664
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1665
|
+
readonly name: "long";
|
|
1666
|
+
readonly type: "tuple";
|
|
1667
|
+
}, {
|
|
1668
|
+
readonly components: readonly [{
|
|
1669
|
+
readonly internalType: "uint256";
|
|
1670
|
+
readonly name: "longToken";
|
|
1671
|
+
readonly type: "uint256";
|
|
1672
|
+
}, {
|
|
1673
|
+
readonly internalType: "uint256";
|
|
1674
|
+
readonly name: "shortToken";
|
|
1675
|
+
readonly type: "uint256";
|
|
1676
|
+
}];
|
|
1677
|
+
readonly internalType: "struct MarketUtils.CollateralType";
|
|
1678
|
+
readonly name: "short";
|
|
1679
|
+
readonly type: "tuple";
|
|
1680
|
+
}];
|
|
1681
|
+
readonly internalType: "struct MarketUtils.PositionType";
|
|
1682
|
+
readonly name: "claimableFundingAmountPerSizeDelta";
|
|
1683
|
+
readonly type: "tuple";
|
|
1684
|
+
}];
|
|
1685
|
+
readonly internalType: "struct MarketUtils.GetNextFundingAmountPerSizeResult";
|
|
1686
|
+
readonly name: "nextFunding";
|
|
1687
|
+
readonly type: "tuple";
|
|
1688
|
+
}, {
|
|
1689
|
+
readonly components: readonly [{
|
|
1690
|
+
readonly internalType: "uint256";
|
|
1691
|
+
readonly name: "virtualPoolAmountForLongToken";
|
|
1692
|
+
readonly type: "uint256";
|
|
1693
|
+
}, {
|
|
1694
|
+
readonly internalType: "uint256";
|
|
1695
|
+
readonly name: "virtualPoolAmountForShortToken";
|
|
1696
|
+
readonly type: "uint256";
|
|
1697
|
+
}, {
|
|
1698
|
+
readonly internalType: "int256";
|
|
1699
|
+
readonly name: "virtualInventoryForPositions";
|
|
1700
|
+
readonly type: "int256";
|
|
1701
|
+
}];
|
|
1702
|
+
readonly internalType: "struct ReaderUtils.VirtualInventory";
|
|
1703
|
+
readonly name: "virtualInventory";
|
|
1704
|
+
readonly type: "tuple";
|
|
1705
|
+
}, {
|
|
1706
|
+
readonly internalType: "bool";
|
|
1707
|
+
readonly name: "isDisabled";
|
|
1708
|
+
readonly type: "bool";
|
|
1709
|
+
}];
|
|
1710
|
+
readonly internalType: "struct ReaderUtils.MarketInfo[]";
|
|
1711
|
+
readonly name: "";
|
|
1712
|
+
readonly type: "tuple[]";
|
|
1713
|
+
}];
|
|
1714
|
+
readonly stateMutability: "view";
|
|
1715
|
+
readonly type: "function";
|
|
1716
|
+
}, {
|
|
1717
|
+
readonly inputs: readonly [{
|
|
1718
|
+
readonly internalType: "contract DataStore";
|
|
1719
|
+
readonly name: "dataStore";
|
|
1720
|
+
readonly type: "address";
|
|
1721
|
+
}, {
|
|
1722
|
+
readonly components: readonly [{
|
|
1723
|
+
readonly internalType: "address";
|
|
1724
|
+
readonly name: "marketToken";
|
|
1725
|
+
readonly type: "address";
|
|
1726
|
+
}, {
|
|
1727
|
+
readonly internalType: "address";
|
|
1728
|
+
readonly name: "indexToken";
|
|
1729
|
+
readonly type: "address";
|
|
1730
|
+
}, {
|
|
1731
|
+
readonly internalType: "address";
|
|
1732
|
+
readonly name: "longToken";
|
|
1733
|
+
readonly type: "address";
|
|
1734
|
+
}, {
|
|
1735
|
+
readonly internalType: "address";
|
|
1736
|
+
readonly name: "shortToken";
|
|
1737
|
+
readonly type: "address";
|
|
1738
|
+
}];
|
|
1739
|
+
readonly internalType: "struct Market.Props";
|
|
1740
|
+
readonly name: "market";
|
|
1741
|
+
readonly type: "tuple";
|
|
1742
|
+
}, {
|
|
1743
|
+
readonly components: readonly [{
|
|
1744
|
+
readonly internalType: "uint256";
|
|
1745
|
+
readonly name: "min";
|
|
1746
|
+
readonly type: "uint256";
|
|
1747
|
+
}, {
|
|
1748
|
+
readonly internalType: "uint256";
|
|
1749
|
+
readonly name: "max";
|
|
1750
|
+
readonly type: "uint256";
|
|
1751
|
+
}];
|
|
1752
|
+
readonly internalType: "struct Price.Props";
|
|
1753
|
+
readonly name: "indexTokenPrice";
|
|
1754
|
+
readonly type: "tuple";
|
|
1755
|
+
}, {
|
|
1756
|
+
readonly components: readonly [{
|
|
1757
|
+
readonly internalType: "uint256";
|
|
1758
|
+
readonly name: "min";
|
|
1759
|
+
readonly type: "uint256";
|
|
1760
|
+
}, {
|
|
1761
|
+
readonly internalType: "uint256";
|
|
1762
|
+
readonly name: "max";
|
|
1763
|
+
readonly type: "uint256";
|
|
1764
|
+
}];
|
|
1765
|
+
readonly internalType: "struct Price.Props";
|
|
1766
|
+
readonly name: "longTokenPrice";
|
|
1767
|
+
readonly type: "tuple";
|
|
1768
|
+
}, {
|
|
1769
|
+
readonly components: readonly [{
|
|
1770
|
+
readonly internalType: "uint256";
|
|
1771
|
+
readonly name: "min";
|
|
1772
|
+
readonly type: "uint256";
|
|
1773
|
+
}, {
|
|
1774
|
+
readonly internalType: "uint256";
|
|
1775
|
+
readonly name: "max";
|
|
1776
|
+
readonly type: "uint256";
|
|
1777
|
+
}];
|
|
1778
|
+
readonly internalType: "struct Price.Props";
|
|
1779
|
+
readonly name: "shortTokenPrice";
|
|
1780
|
+
readonly type: "tuple";
|
|
1781
|
+
}, {
|
|
1782
|
+
readonly internalType: "bytes32";
|
|
1783
|
+
readonly name: "pnlFactorType";
|
|
1784
|
+
readonly type: "bytes32";
|
|
1785
|
+
}, {
|
|
1786
|
+
readonly internalType: "bool";
|
|
1787
|
+
readonly name: "maximize";
|
|
1788
|
+
readonly type: "bool";
|
|
1789
|
+
}];
|
|
1790
|
+
readonly name: "getMarketTokenPrice";
|
|
1791
|
+
readonly outputs: readonly [{
|
|
1792
|
+
readonly internalType: "int256";
|
|
1793
|
+
readonly name: "";
|
|
1794
|
+
readonly type: "int256";
|
|
1795
|
+
}, {
|
|
1796
|
+
readonly components: readonly [{
|
|
1797
|
+
readonly internalType: "int256";
|
|
1798
|
+
readonly name: "poolValue";
|
|
1799
|
+
readonly type: "int256";
|
|
1800
|
+
}, {
|
|
1801
|
+
readonly internalType: "int256";
|
|
1802
|
+
readonly name: "longPnl";
|
|
1803
|
+
readonly type: "int256";
|
|
1804
|
+
}, {
|
|
1805
|
+
readonly internalType: "int256";
|
|
1806
|
+
readonly name: "shortPnl";
|
|
1807
|
+
readonly type: "int256";
|
|
1808
|
+
}, {
|
|
1809
|
+
readonly internalType: "int256";
|
|
1810
|
+
readonly name: "netPnl";
|
|
1811
|
+
readonly type: "int256";
|
|
1812
|
+
}, {
|
|
1813
|
+
readonly internalType: "uint256";
|
|
1814
|
+
readonly name: "longTokenAmount";
|
|
1815
|
+
readonly type: "uint256";
|
|
1816
|
+
}, {
|
|
1817
|
+
readonly internalType: "uint256";
|
|
1818
|
+
readonly name: "shortTokenAmount";
|
|
1819
|
+
readonly type: "uint256";
|
|
1820
|
+
}, {
|
|
1821
|
+
readonly internalType: "uint256";
|
|
1822
|
+
readonly name: "longTokenUsd";
|
|
1823
|
+
readonly type: "uint256";
|
|
1824
|
+
}, {
|
|
1825
|
+
readonly internalType: "uint256";
|
|
1826
|
+
readonly name: "shortTokenUsd";
|
|
1827
|
+
readonly type: "uint256";
|
|
1828
|
+
}, {
|
|
1829
|
+
readonly internalType: "uint256";
|
|
1830
|
+
readonly name: "totalBorrowingFees";
|
|
1831
|
+
readonly type: "uint256";
|
|
1832
|
+
}, {
|
|
1833
|
+
readonly internalType: "uint256";
|
|
1834
|
+
readonly name: "borrowingFeePoolFactor";
|
|
1835
|
+
readonly type: "uint256";
|
|
1836
|
+
}, {
|
|
1837
|
+
readonly internalType: "uint256";
|
|
1838
|
+
readonly name: "impactPoolAmount";
|
|
1839
|
+
readonly type: "uint256";
|
|
1840
|
+
}, {
|
|
1841
|
+
readonly internalType: "uint256";
|
|
1842
|
+
readonly name: "lentImpactPoolAmount";
|
|
1843
|
+
readonly type: "uint256";
|
|
1844
|
+
}];
|
|
1845
|
+
readonly internalType: "struct MarketPoolValueInfo.Props";
|
|
1846
|
+
readonly name: "";
|
|
1847
|
+
readonly type: "tuple";
|
|
1848
|
+
}];
|
|
1849
|
+
readonly stateMutability: "view";
|
|
1850
|
+
readonly type: "function";
|
|
1851
|
+
}, {
|
|
1852
|
+
readonly inputs: readonly [{
|
|
1853
|
+
readonly internalType: "contract DataStore";
|
|
1854
|
+
readonly name: "dataStore";
|
|
1855
|
+
readonly type: "address";
|
|
1856
|
+
}, {
|
|
1857
|
+
readonly components: readonly [{
|
|
1858
|
+
readonly internalType: "address";
|
|
1859
|
+
readonly name: "marketToken";
|
|
1860
|
+
readonly type: "address";
|
|
1861
|
+
}, {
|
|
1862
|
+
readonly internalType: "address";
|
|
1863
|
+
readonly name: "indexToken";
|
|
1864
|
+
readonly type: "address";
|
|
1865
|
+
}, {
|
|
1866
|
+
readonly internalType: "address";
|
|
1867
|
+
readonly name: "longToken";
|
|
1868
|
+
readonly type: "address";
|
|
1869
|
+
}, {
|
|
1870
|
+
readonly internalType: "address";
|
|
1871
|
+
readonly name: "shortToken";
|
|
1872
|
+
readonly type: "address";
|
|
1873
|
+
}];
|
|
1874
|
+
readonly internalType: "struct Market.Props";
|
|
1875
|
+
readonly name: "market";
|
|
1876
|
+
readonly type: "tuple";
|
|
1877
|
+
}, {
|
|
1878
|
+
readonly components: readonly [{
|
|
1879
|
+
readonly internalType: "uint256";
|
|
1880
|
+
readonly name: "min";
|
|
1881
|
+
readonly type: "uint256";
|
|
1882
|
+
}, {
|
|
1883
|
+
readonly internalType: "uint256";
|
|
1884
|
+
readonly name: "max";
|
|
1885
|
+
readonly type: "uint256";
|
|
1886
|
+
}];
|
|
1887
|
+
readonly internalType: "struct Price.Props";
|
|
1888
|
+
readonly name: "indexTokenPrice";
|
|
1889
|
+
readonly type: "tuple";
|
|
1890
|
+
}, {
|
|
1891
|
+
readonly components: readonly [{
|
|
1892
|
+
readonly internalType: "uint256";
|
|
1893
|
+
readonly name: "min";
|
|
1894
|
+
readonly type: "uint256";
|
|
1895
|
+
}, {
|
|
1896
|
+
readonly internalType: "uint256";
|
|
1897
|
+
readonly name: "max";
|
|
1898
|
+
readonly type: "uint256";
|
|
1899
|
+
}];
|
|
1900
|
+
readonly internalType: "struct Price.Props";
|
|
1901
|
+
readonly name: "longTokenPrice";
|
|
1902
|
+
readonly type: "tuple";
|
|
1903
|
+
}, {
|
|
1904
|
+
readonly components: readonly [{
|
|
1905
|
+
readonly internalType: "uint256";
|
|
1906
|
+
readonly name: "min";
|
|
1907
|
+
readonly type: "uint256";
|
|
1908
|
+
}, {
|
|
1909
|
+
readonly internalType: "uint256";
|
|
1910
|
+
readonly name: "max";
|
|
1911
|
+
readonly type: "uint256";
|
|
1912
|
+
}];
|
|
1913
|
+
readonly internalType: "struct Price.Props";
|
|
1914
|
+
readonly name: "shortTokenPrice";
|
|
1915
|
+
readonly type: "tuple";
|
|
1916
|
+
}, {
|
|
1917
|
+
readonly internalType: "bytes32";
|
|
1918
|
+
readonly name: "pnlFactorType";
|
|
1919
|
+
readonly type: "bytes32";
|
|
1920
|
+
}, {
|
|
1921
|
+
readonly internalType: "bool";
|
|
1922
|
+
readonly name: "maximize";
|
|
1923
|
+
readonly type: "bool";
|
|
1924
|
+
}];
|
|
1925
|
+
readonly name: "getMarketTokenPriceForDeposit";
|
|
1926
|
+
readonly outputs: readonly [{
|
|
1927
|
+
readonly internalType: "int256";
|
|
1928
|
+
readonly name: "";
|
|
1929
|
+
readonly type: "int256";
|
|
1930
|
+
}, {
|
|
1931
|
+
readonly components: readonly [{
|
|
1932
|
+
readonly internalType: "int256";
|
|
1933
|
+
readonly name: "poolValue";
|
|
1934
|
+
readonly type: "int256";
|
|
1935
|
+
}, {
|
|
1936
|
+
readonly internalType: "int256";
|
|
1937
|
+
readonly name: "longPnl";
|
|
1938
|
+
readonly type: "int256";
|
|
1939
|
+
}, {
|
|
1940
|
+
readonly internalType: "int256";
|
|
1941
|
+
readonly name: "shortPnl";
|
|
1942
|
+
readonly type: "int256";
|
|
1943
|
+
}, {
|
|
1944
|
+
readonly internalType: "int256";
|
|
1945
|
+
readonly name: "netPnl";
|
|
1946
|
+
readonly type: "int256";
|
|
1947
|
+
}, {
|
|
1948
|
+
readonly internalType: "uint256";
|
|
1949
|
+
readonly name: "longTokenAmount";
|
|
1950
|
+
readonly type: "uint256";
|
|
1951
|
+
}, {
|
|
1952
|
+
readonly internalType: "uint256";
|
|
1953
|
+
readonly name: "shortTokenAmount";
|
|
1954
|
+
readonly type: "uint256";
|
|
1955
|
+
}, {
|
|
1956
|
+
readonly internalType: "uint256";
|
|
1957
|
+
readonly name: "longTokenUsd";
|
|
1958
|
+
readonly type: "uint256";
|
|
1959
|
+
}, {
|
|
1960
|
+
readonly internalType: "uint256";
|
|
1961
|
+
readonly name: "shortTokenUsd";
|
|
1962
|
+
readonly type: "uint256";
|
|
1963
|
+
}, {
|
|
1964
|
+
readonly internalType: "uint256";
|
|
1965
|
+
readonly name: "totalBorrowingFees";
|
|
1966
|
+
readonly type: "uint256";
|
|
1967
|
+
}, {
|
|
1968
|
+
readonly internalType: "uint256";
|
|
1969
|
+
readonly name: "borrowingFeePoolFactor";
|
|
1970
|
+
readonly type: "uint256";
|
|
1971
|
+
}, {
|
|
1972
|
+
readonly internalType: "uint256";
|
|
1973
|
+
readonly name: "impactPoolAmount";
|
|
1974
|
+
readonly type: "uint256";
|
|
1975
|
+
}, {
|
|
1976
|
+
readonly internalType: "uint256";
|
|
1977
|
+
readonly name: "lentImpactPoolAmount";
|
|
1978
|
+
readonly type: "uint256";
|
|
1979
|
+
}];
|
|
1980
|
+
readonly internalType: "struct MarketPoolValueInfo.Props";
|
|
1981
|
+
readonly name: "";
|
|
1982
|
+
readonly type: "tuple";
|
|
1983
|
+
}];
|
|
1984
|
+
readonly stateMutability: "view";
|
|
1985
|
+
readonly type: "function";
|
|
1986
|
+
}, {
|
|
1987
|
+
readonly inputs: readonly [{
|
|
1988
|
+
readonly internalType: "contract DataStore";
|
|
1989
|
+
readonly name: "dataStore";
|
|
1990
|
+
readonly type: "address";
|
|
1991
|
+
}, {
|
|
1992
|
+
readonly internalType: "uint256";
|
|
1993
|
+
readonly name: "start";
|
|
1994
|
+
readonly type: "uint256";
|
|
1995
|
+
}, {
|
|
1996
|
+
readonly internalType: "uint256";
|
|
1997
|
+
readonly name: "end";
|
|
1998
|
+
readonly type: "uint256";
|
|
1999
|
+
}];
|
|
2000
|
+
readonly name: "getMarkets";
|
|
2001
|
+
readonly outputs: readonly [{
|
|
2002
|
+
readonly components: readonly [{
|
|
2003
|
+
readonly internalType: "address";
|
|
2004
|
+
readonly name: "marketToken";
|
|
2005
|
+
readonly type: "address";
|
|
2006
|
+
}, {
|
|
2007
|
+
readonly internalType: "address";
|
|
2008
|
+
readonly name: "indexToken";
|
|
2009
|
+
readonly type: "address";
|
|
2010
|
+
}, {
|
|
2011
|
+
readonly internalType: "address";
|
|
2012
|
+
readonly name: "longToken";
|
|
2013
|
+
readonly type: "address";
|
|
2014
|
+
}, {
|
|
2015
|
+
readonly internalType: "address";
|
|
2016
|
+
readonly name: "shortToken";
|
|
2017
|
+
readonly type: "address";
|
|
2018
|
+
}];
|
|
2019
|
+
readonly internalType: "struct Market.Props[]";
|
|
2020
|
+
readonly name: "";
|
|
2021
|
+
readonly type: "tuple[]";
|
|
2022
|
+
}];
|
|
2023
|
+
readonly stateMutability: "view";
|
|
2024
|
+
readonly type: "function";
|
|
2025
|
+
}, {
|
|
2026
|
+
readonly inputs: readonly [{
|
|
2027
|
+
readonly internalType: "contract DataStore";
|
|
2028
|
+
readonly name: "dataStore";
|
|
2029
|
+
readonly type: "address";
|
|
2030
|
+
}, {
|
|
2031
|
+
readonly components: readonly [{
|
|
2032
|
+
readonly internalType: "address";
|
|
2033
|
+
readonly name: "marketToken";
|
|
2034
|
+
readonly type: "address";
|
|
2035
|
+
}, {
|
|
2036
|
+
readonly internalType: "address";
|
|
2037
|
+
readonly name: "indexToken";
|
|
2038
|
+
readonly type: "address";
|
|
2039
|
+
}, {
|
|
2040
|
+
readonly internalType: "address";
|
|
2041
|
+
readonly name: "longToken";
|
|
2042
|
+
readonly type: "address";
|
|
2043
|
+
}, {
|
|
2044
|
+
readonly internalType: "address";
|
|
2045
|
+
readonly name: "shortToken";
|
|
2046
|
+
readonly type: "address";
|
|
2047
|
+
}];
|
|
2048
|
+
readonly internalType: "struct Market.Props";
|
|
2049
|
+
readonly name: "market";
|
|
2050
|
+
readonly type: "tuple";
|
|
2051
|
+
}, {
|
|
2052
|
+
readonly components: readonly [{
|
|
2053
|
+
readonly internalType: "uint256";
|
|
2054
|
+
readonly name: "min";
|
|
2055
|
+
readonly type: "uint256";
|
|
2056
|
+
}, {
|
|
2057
|
+
readonly internalType: "uint256";
|
|
2058
|
+
readonly name: "max";
|
|
2059
|
+
readonly type: "uint256";
|
|
2060
|
+
}];
|
|
2061
|
+
readonly internalType: "struct Price.Props";
|
|
2062
|
+
readonly name: "indexTokenPrice";
|
|
2063
|
+
readonly type: "tuple";
|
|
2064
|
+
}, {
|
|
2065
|
+
readonly internalType: "bool";
|
|
2066
|
+
readonly name: "maximize";
|
|
2067
|
+
readonly type: "bool";
|
|
2068
|
+
}];
|
|
2069
|
+
readonly name: "getNetPnl";
|
|
2070
|
+
readonly outputs: readonly [{
|
|
2071
|
+
readonly internalType: "int256";
|
|
2072
|
+
readonly name: "";
|
|
2073
|
+
readonly type: "int256";
|
|
2074
|
+
}];
|
|
2075
|
+
readonly stateMutability: "view";
|
|
2076
|
+
readonly type: "function";
|
|
2077
|
+
}, {
|
|
2078
|
+
readonly inputs: readonly [{
|
|
2079
|
+
readonly internalType: "contract DataStore";
|
|
2080
|
+
readonly name: "dataStore";
|
|
2081
|
+
readonly type: "address";
|
|
2082
|
+
}, {
|
|
2083
|
+
readonly components: readonly [{
|
|
2084
|
+
readonly internalType: "address";
|
|
2085
|
+
readonly name: "marketToken";
|
|
2086
|
+
readonly type: "address";
|
|
2087
|
+
}, {
|
|
2088
|
+
readonly internalType: "address";
|
|
2089
|
+
readonly name: "indexToken";
|
|
2090
|
+
readonly type: "address";
|
|
2091
|
+
}, {
|
|
2092
|
+
readonly internalType: "address";
|
|
2093
|
+
readonly name: "longToken";
|
|
2094
|
+
readonly type: "address";
|
|
2095
|
+
}, {
|
|
2096
|
+
readonly internalType: "address";
|
|
2097
|
+
readonly name: "shortToken";
|
|
2098
|
+
readonly type: "address";
|
|
2099
|
+
}];
|
|
2100
|
+
readonly internalType: "struct Market.Props";
|
|
2101
|
+
readonly name: "market";
|
|
2102
|
+
readonly type: "tuple";
|
|
2103
|
+
}, {
|
|
2104
|
+
readonly components: readonly [{
|
|
2105
|
+
readonly internalType: "uint256";
|
|
2106
|
+
readonly name: "min";
|
|
2107
|
+
readonly type: "uint256";
|
|
2108
|
+
}, {
|
|
2109
|
+
readonly internalType: "uint256";
|
|
2110
|
+
readonly name: "max";
|
|
2111
|
+
readonly type: "uint256";
|
|
2112
|
+
}];
|
|
2113
|
+
readonly internalType: "struct Price.Props";
|
|
2114
|
+
readonly name: "indexTokenPrice";
|
|
2115
|
+
readonly type: "tuple";
|
|
2116
|
+
}, {
|
|
2117
|
+
readonly internalType: "bool";
|
|
2118
|
+
readonly name: "isLong";
|
|
2119
|
+
readonly type: "bool";
|
|
2120
|
+
}, {
|
|
2121
|
+
readonly internalType: "bool";
|
|
2122
|
+
readonly name: "maximize";
|
|
2123
|
+
readonly type: "bool";
|
|
2124
|
+
}];
|
|
2125
|
+
readonly name: "getOpenInterestWithPnl";
|
|
2126
|
+
readonly outputs: readonly [{
|
|
2127
|
+
readonly internalType: "int256";
|
|
2128
|
+
readonly name: "";
|
|
2129
|
+
readonly type: "int256";
|
|
2130
|
+
}];
|
|
2131
|
+
readonly stateMutability: "view";
|
|
2132
|
+
readonly type: "function";
|
|
2133
|
+
}, {
|
|
2134
|
+
readonly inputs: readonly [{
|
|
2135
|
+
readonly internalType: "contract DataStore";
|
|
2136
|
+
readonly name: "dataStore";
|
|
2137
|
+
readonly type: "address";
|
|
2138
|
+
}, {
|
|
2139
|
+
readonly internalType: "bytes32";
|
|
2140
|
+
readonly name: "key";
|
|
2141
|
+
readonly type: "bytes32";
|
|
2142
|
+
}];
|
|
2143
|
+
readonly name: "getOrder";
|
|
2144
|
+
readonly outputs: readonly [{
|
|
2145
|
+
readonly components: readonly [{
|
|
2146
|
+
readonly components: readonly [{
|
|
2147
|
+
readonly internalType: "address";
|
|
2148
|
+
readonly name: "account";
|
|
2149
|
+
readonly type: "address";
|
|
2150
|
+
}, {
|
|
2151
|
+
readonly internalType: "address";
|
|
2152
|
+
readonly name: "receiver";
|
|
2153
|
+
readonly type: "address";
|
|
2154
|
+
}, {
|
|
2155
|
+
readonly internalType: "address";
|
|
2156
|
+
readonly name: "cancellationReceiver";
|
|
2157
|
+
readonly type: "address";
|
|
2158
|
+
}, {
|
|
2159
|
+
readonly internalType: "address";
|
|
2160
|
+
readonly name: "callbackContract";
|
|
2161
|
+
readonly type: "address";
|
|
2162
|
+
}, {
|
|
2163
|
+
readonly internalType: "address";
|
|
2164
|
+
readonly name: "uiFeeReceiver";
|
|
2165
|
+
readonly type: "address";
|
|
2166
|
+
}, {
|
|
2167
|
+
readonly internalType: "address";
|
|
2168
|
+
readonly name: "market";
|
|
2169
|
+
readonly type: "address";
|
|
2170
|
+
}, {
|
|
2171
|
+
readonly internalType: "address";
|
|
2172
|
+
readonly name: "initialCollateralToken";
|
|
2173
|
+
readonly type: "address";
|
|
2174
|
+
}, {
|
|
2175
|
+
readonly internalType: "address[]";
|
|
2176
|
+
readonly name: "swapPath";
|
|
2177
|
+
readonly type: "address[]";
|
|
2178
|
+
}];
|
|
2179
|
+
readonly internalType: "struct Order.Addresses";
|
|
2180
|
+
readonly name: "addresses";
|
|
2181
|
+
readonly type: "tuple";
|
|
2182
|
+
}, {
|
|
2183
|
+
readonly components: readonly [{
|
|
2184
|
+
readonly internalType: "enum Order.OrderType";
|
|
2185
|
+
readonly name: "orderType";
|
|
2186
|
+
readonly type: "uint8";
|
|
2187
|
+
}, {
|
|
2188
|
+
readonly internalType: "enum Order.DecreasePositionSwapType";
|
|
2189
|
+
readonly name: "decreasePositionSwapType";
|
|
2190
|
+
readonly type: "uint8";
|
|
2191
|
+
}, {
|
|
2192
|
+
readonly internalType: "uint256";
|
|
2193
|
+
readonly name: "sizeDeltaUsd";
|
|
2194
|
+
readonly type: "uint256";
|
|
2195
|
+
}, {
|
|
2196
|
+
readonly internalType: "uint256";
|
|
2197
|
+
readonly name: "initialCollateralDeltaAmount";
|
|
2198
|
+
readonly type: "uint256";
|
|
2199
|
+
}, {
|
|
2200
|
+
readonly internalType: "uint256";
|
|
2201
|
+
readonly name: "triggerPrice";
|
|
2202
|
+
readonly type: "uint256";
|
|
2203
|
+
}, {
|
|
2204
|
+
readonly internalType: "uint256";
|
|
2205
|
+
readonly name: "acceptablePrice";
|
|
2206
|
+
readonly type: "uint256";
|
|
2207
|
+
}, {
|
|
2208
|
+
readonly internalType: "uint256";
|
|
2209
|
+
readonly name: "executionFee";
|
|
2210
|
+
readonly type: "uint256";
|
|
2211
|
+
}, {
|
|
2212
|
+
readonly internalType: "uint256";
|
|
2213
|
+
readonly name: "callbackGasLimit";
|
|
2214
|
+
readonly type: "uint256";
|
|
2215
|
+
}, {
|
|
2216
|
+
readonly internalType: "uint256";
|
|
2217
|
+
readonly name: "minOutputAmount";
|
|
2218
|
+
readonly type: "uint256";
|
|
2219
|
+
}, {
|
|
2220
|
+
readonly internalType: "uint256";
|
|
2221
|
+
readonly name: "uiFeeFactor";
|
|
2222
|
+
readonly type: "uint256";
|
|
2223
|
+
}, {
|
|
2224
|
+
readonly internalType: "uint256";
|
|
2225
|
+
readonly name: "updatedAtTime";
|
|
2226
|
+
readonly type: "uint256";
|
|
2227
|
+
}, {
|
|
2228
|
+
readonly internalType: "uint256";
|
|
2229
|
+
readonly name: "validFromTime";
|
|
2230
|
+
readonly type: "uint256";
|
|
2231
|
+
}, {
|
|
2232
|
+
readonly internalType: "uint256";
|
|
2233
|
+
readonly name: "srcChainId";
|
|
2234
|
+
readonly type: "uint256";
|
|
2235
|
+
}];
|
|
2236
|
+
readonly internalType: "struct Order.Numbers";
|
|
2237
|
+
readonly name: "numbers";
|
|
2238
|
+
readonly type: "tuple";
|
|
2239
|
+
}, {
|
|
2240
|
+
readonly components: readonly [{
|
|
2241
|
+
readonly internalType: "bool";
|
|
2242
|
+
readonly name: "isLong";
|
|
2243
|
+
readonly type: "bool";
|
|
2244
|
+
}, {
|
|
2245
|
+
readonly internalType: "bool";
|
|
2246
|
+
readonly name: "shouldUnwrapNativeToken";
|
|
2247
|
+
readonly type: "bool";
|
|
2248
|
+
}, {
|
|
2249
|
+
readonly internalType: "bool";
|
|
2250
|
+
readonly name: "isFrozen";
|
|
2251
|
+
readonly type: "bool";
|
|
2252
|
+
}, {
|
|
2253
|
+
readonly internalType: "bool";
|
|
2254
|
+
readonly name: "autoCancel";
|
|
2255
|
+
readonly type: "bool";
|
|
2256
|
+
}];
|
|
2257
|
+
readonly internalType: "struct Order.Flags";
|
|
2258
|
+
readonly name: "flags";
|
|
2259
|
+
readonly type: "tuple";
|
|
2260
|
+
}, {
|
|
2261
|
+
readonly internalType: "bytes32[]";
|
|
2262
|
+
readonly name: "_dataList";
|
|
2263
|
+
readonly type: "bytes32[]";
|
|
2264
|
+
}];
|
|
2265
|
+
readonly internalType: "struct Order.Props";
|
|
2266
|
+
readonly name: "";
|
|
2267
|
+
readonly type: "tuple";
|
|
2268
|
+
}];
|
|
2269
|
+
readonly stateMutability: "view";
|
|
2270
|
+
readonly type: "function";
|
|
2271
|
+
}, {
|
|
2272
|
+
readonly inputs: readonly [{
|
|
2273
|
+
readonly internalType: "contract DataStore";
|
|
2274
|
+
readonly name: "dataStore";
|
|
2275
|
+
readonly type: "address";
|
|
2276
|
+
}, {
|
|
2277
|
+
readonly internalType: "address";
|
|
2278
|
+
readonly name: "market";
|
|
2279
|
+
readonly type: "address";
|
|
2280
|
+
}];
|
|
2281
|
+
readonly name: "getPendingPositionImpactPoolDistributionAmount";
|
|
2282
|
+
readonly outputs: readonly [{
|
|
2283
|
+
readonly internalType: "uint256";
|
|
2284
|
+
readonly name: "";
|
|
2285
|
+
readonly type: "uint256";
|
|
2286
|
+
}, {
|
|
2287
|
+
readonly internalType: "uint256";
|
|
2288
|
+
readonly name: "";
|
|
2289
|
+
readonly type: "uint256";
|
|
2290
|
+
}];
|
|
2291
|
+
readonly stateMutability: "view";
|
|
2292
|
+
readonly type: "function";
|
|
2293
|
+
}, {
|
|
2294
|
+
readonly inputs: readonly [{
|
|
2295
|
+
readonly internalType: "contract DataStore";
|
|
2296
|
+
readonly name: "dataStore";
|
|
2297
|
+
readonly type: "address";
|
|
2298
|
+
}, {
|
|
2299
|
+
readonly components: readonly [{
|
|
2300
|
+
readonly internalType: "address";
|
|
2301
|
+
readonly name: "marketToken";
|
|
2302
|
+
readonly type: "address";
|
|
2303
|
+
}, {
|
|
2304
|
+
readonly internalType: "address";
|
|
2305
|
+
readonly name: "indexToken";
|
|
2306
|
+
readonly type: "address";
|
|
2307
|
+
}, {
|
|
2308
|
+
readonly internalType: "address";
|
|
2309
|
+
readonly name: "longToken";
|
|
2310
|
+
readonly type: "address";
|
|
2311
|
+
}, {
|
|
2312
|
+
readonly internalType: "address";
|
|
2313
|
+
readonly name: "shortToken";
|
|
2314
|
+
readonly type: "address";
|
|
2315
|
+
}];
|
|
2316
|
+
readonly internalType: "struct Market.Props";
|
|
2317
|
+
readonly name: "market";
|
|
2318
|
+
readonly type: "tuple";
|
|
2319
|
+
}, {
|
|
2320
|
+
readonly components: readonly [{
|
|
2321
|
+
readonly internalType: "uint256";
|
|
2322
|
+
readonly name: "min";
|
|
2323
|
+
readonly type: "uint256";
|
|
2324
|
+
}, {
|
|
2325
|
+
readonly internalType: "uint256";
|
|
2326
|
+
readonly name: "max";
|
|
2327
|
+
readonly type: "uint256";
|
|
2328
|
+
}];
|
|
2329
|
+
readonly internalType: "struct Price.Props";
|
|
2330
|
+
readonly name: "indexTokenPrice";
|
|
2331
|
+
readonly type: "tuple";
|
|
2332
|
+
}, {
|
|
2333
|
+
readonly internalType: "bool";
|
|
2334
|
+
readonly name: "isLong";
|
|
2335
|
+
readonly type: "bool";
|
|
2336
|
+
}, {
|
|
2337
|
+
readonly internalType: "bool";
|
|
2338
|
+
readonly name: "maximize";
|
|
2339
|
+
readonly type: "bool";
|
|
2340
|
+
}];
|
|
2341
|
+
readonly name: "getPnl";
|
|
2342
|
+
readonly outputs: readonly [{
|
|
2343
|
+
readonly internalType: "int256";
|
|
2344
|
+
readonly name: "";
|
|
2345
|
+
readonly type: "int256";
|
|
2346
|
+
}];
|
|
2347
|
+
readonly stateMutability: "view";
|
|
2348
|
+
readonly type: "function";
|
|
2349
|
+
}, {
|
|
2350
|
+
readonly inputs: readonly [{
|
|
2351
|
+
readonly internalType: "contract DataStore";
|
|
2352
|
+
readonly name: "dataStore";
|
|
2353
|
+
readonly type: "address";
|
|
2354
|
+
}, {
|
|
2355
|
+
readonly internalType: "address";
|
|
2356
|
+
readonly name: "marketAddress";
|
|
2357
|
+
readonly type: "address";
|
|
2358
|
+
}, {
|
|
2359
|
+
readonly components: readonly [{
|
|
2360
|
+
readonly components: readonly [{
|
|
2361
|
+
readonly internalType: "uint256";
|
|
2362
|
+
readonly name: "min";
|
|
2363
|
+
readonly type: "uint256";
|
|
2364
|
+
}, {
|
|
2365
|
+
readonly internalType: "uint256";
|
|
2366
|
+
readonly name: "max";
|
|
2367
|
+
readonly type: "uint256";
|
|
2368
|
+
}];
|
|
2369
|
+
readonly internalType: "struct Price.Props";
|
|
2370
|
+
readonly name: "indexTokenPrice";
|
|
2371
|
+
readonly type: "tuple";
|
|
2372
|
+
}, {
|
|
2373
|
+
readonly components: readonly [{
|
|
2374
|
+
readonly internalType: "uint256";
|
|
2375
|
+
readonly name: "min";
|
|
2376
|
+
readonly type: "uint256";
|
|
2377
|
+
}, {
|
|
2378
|
+
readonly internalType: "uint256";
|
|
2379
|
+
readonly name: "max";
|
|
2380
|
+
readonly type: "uint256";
|
|
2381
|
+
}];
|
|
2382
|
+
readonly internalType: "struct Price.Props";
|
|
2383
|
+
readonly name: "longTokenPrice";
|
|
2384
|
+
readonly type: "tuple";
|
|
2385
|
+
}, {
|
|
2386
|
+
readonly components: readonly [{
|
|
2387
|
+
readonly internalType: "uint256";
|
|
2388
|
+
readonly name: "min";
|
|
2389
|
+
readonly type: "uint256";
|
|
2390
|
+
}, {
|
|
2391
|
+
readonly internalType: "uint256";
|
|
2392
|
+
readonly name: "max";
|
|
2393
|
+
readonly type: "uint256";
|
|
2394
|
+
}];
|
|
2395
|
+
readonly internalType: "struct Price.Props";
|
|
2396
|
+
readonly name: "shortTokenPrice";
|
|
2397
|
+
readonly type: "tuple";
|
|
2398
|
+
}];
|
|
2399
|
+
readonly internalType: "struct MarketUtils.MarketPrices";
|
|
2400
|
+
readonly name: "prices";
|
|
2401
|
+
readonly type: "tuple";
|
|
2402
|
+
}, {
|
|
2403
|
+
readonly internalType: "bool";
|
|
2404
|
+
readonly name: "isLong";
|
|
2405
|
+
readonly type: "bool";
|
|
2406
|
+
}, {
|
|
2407
|
+
readonly internalType: "bool";
|
|
2408
|
+
readonly name: "maximize";
|
|
2409
|
+
readonly type: "bool";
|
|
2410
|
+
}];
|
|
2411
|
+
readonly name: "getPnlToPoolFactor";
|
|
2412
|
+
readonly outputs: readonly [{
|
|
2413
|
+
readonly internalType: "int256";
|
|
2414
|
+
readonly name: "";
|
|
2415
|
+
readonly type: "int256";
|
|
2416
|
+
}];
|
|
2417
|
+
readonly stateMutability: "view";
|
|
2418
|
+
readonly type: "function";
|
|
2419
|
+
}, {
|
|
2420
|
+
readonly inputs: readonly [{
|
|
2421
|
+
readonly internalType: "contract DataStore";
|
|
2422
|
+
readonly name: "dataStore";
|
|
2423
|
+
readonly type: "address";
|
|
2424
|
+
}, {
|
|
2425
|
+
readonly internalType: "bytes32";
|
|
2426
|
+
readonly name: "key";
|
|
2427
|
+
readonly type: "bytes32";
|
|
2428
|
+
}];
|
|
2429
|
+
readonly name: "getPosition";
|
|
2430
|
+
readonly outputs: readonly [{
|
|
2431
|
+
readonly components: readonly [{
|
|
2432
|
+
readonly components: readonly [{
|
|
2433
|
+
readonly internalType: "address";
|
|
2434
|
+
readonly name: "account";
|
|
2435
|
+
readonly type: "address";
|
|
2436
|
+
}, {
|
|
2437
|
+
readonly internalType: "address";
|
|
2438
|
+
readonly name: "market";
|
|
2439
|
+
readonly type: "address";
|
|
2440
|
+
}, {
|
|
2441
|
+
readonly internalType: "address";
|
|
2442
|
+
readonly name: "collateralToken";
|
|
2443
|
+
readonly type: "address";
|
|
2444
|
+
}];
|
|
2445
|
+
readonly internalType: "struct Position.Addresses";
|
|
2446
|
+
readonly name: "addresses";
|
|
2447
|
+
readonly type: "tuple";
|
|
2448
|
+
}, {
|
|
2449
|
+
readonly components: readonly [{
|
|
2450
|
+
readonly internalType: "uint256";
|
|
2451
|
+
readonly name: "sizeInUsd";
|
|
2452
|
+
readonly type: "uint256";
|
|
2453
|
+
}, {
|
|
2454
|
+
readonly internalType: "uint256";
|
|
2455
|
+
readonly name: "sizeInTokens";
|
|
2456
|
+
readonly type: "uint256";
|
|
2457
|
+
}, {
|
|
2458
|
+
readonly internalType: "uint256";
|
|
2459
|
+
readonly name: "collateralAmount";
|
|
2460
|
+
readonly type: "uint256";
|
|
2461
|
+
}, {
|
|
2462
|
+
readonly internalType: "int256";
|
|
2463
|
+
readonly name: "pendingImpactAmount";
|
|
2464
|
+
readonly type: "int256";
|
|
2465
|
+
}, {
|
|
2466
|
+
readonly internalType: "int256";
|
|
2467
|
+
readonly name: "realizedUncappedPnlUsd";
|
|
2468
|
+
readonly type: "int256";
|
|
2469
|
+
}, {
|
|
2470
|
+
readonly internalType: "int256";
|
|
2471
|
+
readonly name: "realizedPnlUsd";
|
|
2472
|
+
readonly type: "int256";
|
|
2473
|
+
}, {
|
|
2474
|
+
readonly internalType: "uint256";
|
|
2475
|
+
readonly name: "cappedPnlPoolTokenAmount";
|
|
2476
|
+
readonly type: "uint256";
|
|
2477
|
+
}, {
|
|
2478
|
+
readonly internalType: "uint256";
|
|
2479
|
+
readonly name: "borrowingFactor";
|
|
2480
|
+
readonly type: "uint256";
|
|
2481
|
+
}, {
|
|
2482
|
+
readonly internalType: "uint256";
|
|
2483
|
+
readonly name: "fundingFeeAmountPerSize";
|
|
2484
|
+
readonly type: "uint256";
|
|
2485
|
+
}, {
|
|
2486
|
+
readonly internalType: "uint256";
|
|
2487
|
+
readonly name: "longTokenClaimableFundingAmountPerSize";
|
|
2488
|
+
readonly type: "uint256";
|
|
2489
|
+
}, {
|
|
2490
|
+
readonly internalType: "uint256";
|
|
2491
|
+
readonly name: "shortTokenClaimableFundingAmountPerSize";
|
|
2492
|
+
readonly type: "uint256";
|
|
2493
|
+
}, {
|
|
2494
|
+
readonly internalType: "uint256";
|
|
2495
|
+
readonly name: "increasedAtTime";
|
|
2496
|
+
readonly type: "uint256";
|
|
2497
|
+
}, {
|
|
2498
|
+
readonly internalType: "uint256";
|
|
2499
|
+
readonly name: "decreasedAtTime";
|
|
2500
|
+
readonly type: "uint256";
|
|
2501
|
+
}, {
|
|
2502
|
+
readonly internalType: "int256";
|
|
2503
|
+
readonly name: "cappedPnlReferencePoolPnlUsd";
|
|
2504
|
+
readonly type: "int256";
|
|
2505
|
+
}, {
|
|
2506
|
+
readonly internalType: "uint256";
|
|
2507
|
+
readonly name: "cappedPnlAllowancePerPrice";
|
|
2508
|
+
readonly type: "uint256";
|
|
2509
|
+
}];
|
|
2510
|
+
readonly internalType: "struct Position.Numbers";
|
|
2511
|
+
readonly name: "numbers";
|
|
2512
|
+
readonly type: "tuple";
|
|
2513
|
+
}, {
|
|
2514
|
+
readonly components: readonly [{
|
|
2515
|
+
readonly internalType: "bool";
|
|
2516
|
+
readonly name: "isLong";
|
|
2517
|
+
readonly type: "bool";
|
|
2518
|
+
}];
|
|
2519
|
+
readonly internalType: "struct Position.Flags";
|
|
2520
|
+
readonly name: "flags";
|
|
2521
|
+
readonly type: "tuple";
|
|
2522
|
+
}];
|
|
2523
|
+
readonly internalType: "struct Position.Props";
|
|
2524
|
+
readonly name: "";
|
|
2525
|
+
readonly type: "tuple";
|
|
2526
|
+
}];
|
|
2527
|
+
readonly stateMutability: "view";
|
|
2528
|
+
readonly type: "function";
|
|
2529
|
+
}, {
|
|
2530
|
+
readonly inputs: readonly [{
|
|
2531
|
+
readonly internalType: "contract DataStore";
|
|
2532
|
+
readonly name: "dataStore";
|
|
2533
|
+
readonly type: "address";
|
|
2534
|
+
}, {
|
|
2535
|
+
readonly internalType: "contract IReferralStorage";
|
|
2536
|
+
readonly name: "referralStorage";
|
|
2537
|
+
readonly type: "address";
|
|
2538
|
+
}, {
|
|
2539
|
+
readonly internalType: "bytes32";
|
|
2540
|
+
readonly name: "positionKey";
|
|
2541
|
+
readonly type: "bytes32";
|
|
2542
|
+
}, {
|
|
2543
|
+
readonly components: readonly [{
|
|
2544
|
+
readonly components: readonly [{
|
|
2545
|
+
readonly internalType: "uint256";
|
|
2546
|
+
readonly name: "min";
|
|
2547
|
+
readonly type: "uint256";
|
|
2548
|
+
}, {
|
|
2549
|
+
readonly internalType: "uint256";
|
|
2550
|
+
readonly name: "max";
|
|
2551
|
+
readonly type: "uint256";
|
|
2552
|
+
}];
|
|
2553
|
+
readonly internalType: "struct Price.Props";
|
|
2554
|
+
readonly name: "indexTokenPrice";
|
|
2555
|
+
readonly type: "tuple";
|
|
2556
|
+
}, {
|
|
2557
|
+
readonly components: readonly [{
|
|
2558
|
+
readonly internalType: "uint256";
|
|
2559
|
+
readonly name: "min";
|
|
2560
|
+
readonly type: "uint256";
|
|
2561
|
+
}, {
|
|
2562
|
+
readonly internalType: "uint256";
|
|
2563
|
+
readonly name: "max";
|
|
2564
|
+
readonly type: "uint256";
|
|
2565
|
+
}];
|
|
2566
|
+
readonly internalType: "struct Price.Props";
|
|
2567
|
+
readonly name: "longTokenPrice";
|
|
2568
|
+
readonly type: "tuple";
|
|
2569
|
+
}, {
|
|
2570
|
+
readonly components: readonly [{
|
|
2571
|
+
readonly internalType: "uint256";
|
|
2572
|
+
readonly name: "min";
|
|
2573
|
+
readonly type: "uint256";
|
|
2574
|
+
}, {
|
|
2575
|
+
readonly internalType: "uint256";
|
|
2576
|
+
readonly name: "max";
|
|
2577
|
+
readonly type: "uint256";
|
|
2578
|
+
}];
|
|
2579
|
+
readonly internalType: "struct Price.Props";
|
|
2580
|
+
readonly name: "shortTokenPrice";
|
|
2581
|
+
readonly type: "tuple";
|
|
2582
|
+
}];
|
|
2583
|
+
readonly internalType: "struct MarketUtils.MarketPrices";
|
|
2584
|
+
readonly name: "prices";
|
|
2585
|
+
readonly type: "tuple";
|
|
2586
|
+
}, {
|
|
2587
|
+
readonly internalType: "uint256";
|
|
2588
|
+
readonly name: "sizeDeltaUsd";
|
|
2589
|
+
readonly type: "uint256";
|
|
2590
|
+
}, {
|
|
2591
|
+
readonly internalType: "address";
|
|
2592
|
+
readonly name: "uiFeeReceiver";
|
|
2593
|
+
readonly type: "address";
|
|
2594
|
+
}, {
|
|
2595
|
+
readonly internalType: "bool";
|
|
2596
|
+
readonly name: "usePositionSizeAsSizeDeltaUsd";
|
|
2597
|
+
readonly type: "bool";
|
|
2598
|
+
}];
|
|
2599
|
+
readonly name: "getPositionInfo";
|
|
2600
|
+
readonly outputs: readonly [{
|
|
2601
|
+
readonly components: readonly [{
|
|
2602
|
+
readonly internalType: "bytes32";
|
|
2603
|
+
readonly name: "positionKey";
|
|
2604
|
+
readonly type: "bytes32";
|
|
2605
|
+
}, {
|
|
2606
|
+
readonly components: readonly [{
|
|
2607
|
+
readonly components: readonly [{
|
|
2608
|
+
readonly internalType: "address";
|
|
2609
|
+
readonly name: "account";
|
|
2610
|
+
readonly type: "address";
|
|
2611
|
+
}, {
|
|
2612
|
+
readonly internalType: "address";
|
|
2613
|
+
readonly name: "market";
|
|
2614
|
+
readonly type: "address";
|
|
2615
|
+
}, {
|
|
2616
|
+
readonly internalType: "address";
|
|
2617
|
+
readonly name: "collateralToken";
|
|
2618
|
+
readonly type: "address";
|
|
2619
|
+
}];
|
|
2620
|
+
readonly internalType: "struct Position.Addresses";
|
|
2621
|
+
readonly name: "addresses";
|
|
2622
|
+
readonly type: "tuple";
|
|
2623
|
+
}, {
|
|
2624
|
+
readonly components: readonly [{
|
|
2625
|
+
readonly internalType: "uint256";
|
|
2626
|
+
readonly name: "sizeInUsd";
|
|
2627
|
+
readonly type: "uint256";
|
|
2628
|
+
}, {
|
|
2629
|
+
readonly internalType: "uint256";
|
|
2630
|
+
readonly name: "sizeInTokens";
|
|
2631
|
+
readonly type: "uint256";
|
|
2632
|
+
}, {
|
|
2633
|
+
readonly internalType: "uint256";
|
|
2634
|
+
readonly name: "collateralAmount";
|
|
2635
|
+
readonly type: "uint256";
|
|
2636
|
+
}, {
|
|
2637
|
+
readonly internalType: "int256";
|
|
2638
|
+
readonly name: "pendingImpactAmount";
|
|
2639
|
+
readonly type: "int256";
|
|
2640
|
+
}, {
|
|
2641
|
+
readonly internalType: "int256";
|
|
2642
|
+
readonly name: "realizedUncappedPnlUsd";
|
|
2643
|
+
readonly type: "int256";
|
|
2644
|
+
}, {
|
|
2645
|
+
readonly internalType: "int256";
|
|
2646
|
+
readonly name: "realizedPnlUsd";
|
|
2647
|
+
readonly type: "int256";
|
|
2648
|
+
}, {
|
|
2649
|
+
readonly internalType: "uint256";
|
|
2650
|
+
readonly name: "cappedPnlPoolTokenAmount";
|
|
2651
|
+
readonly type: "uint256";
|
|
2652
|
+
}, {
|
|
2653
|
+
readonly internalType: "uint256";
|
|
2654
|
+
readonly name: "borrowingFactor";
|
|
2655
|
+
readonly type: "uint256";
|
|
2656
|
+
}, {
|
|
2657
|
+
readonly internalType: "uint256";
|
|
2658
|
+
readonly name: "fundingFeeAmountPerSize";
|
|
2659
|
+
readonly type: "uint256";
|
|
2660
|
+
}, {
|
|
2661
|
+
readonly internalType: "uint256";
|
|
2662
|
+
readonly name: "longTokenClaimableFundingAmountPerSize";
|
|
2663
|
+
readonly type: "uint256";
|
|
2664
|
+
}, {
|
|
2665
|
+
readonly internalType: "uint256";
|
|
2666
|
+
readonly name: "shortTokenClaimableFundingAmountPerSize";
|
|
2667
|
+
readonly type: "uint256";
|
|
2668
|
+
}, {
|
|
2669
|
+
readonly internalType: "uint256";
|
|
2670
|
+
readonly name: "increasedAtTime";
|
|
2671
|
+
readonly type: "uint256";
|
|
2672
|
+
}, {
|
|
2673
|
+
readonly internalType: "uint256";
|
|
2674
|
+
readonly name: "decreasedAtTime";
|
|
2675
|
+
readonly type: "uint256";
|
|
2676
|
+
}, {
|
|
2677
|
+
readonly internalType: "int256";
|
|
2678
|
+
readonly name: "cappedPnlReferencePoolPnlUsd";
|
|
2679
|
+
readonly type: "int256";
|
|
2680
|
+
}, {
|
|
2681
|
+
readonly internalType: "uint256";
|
|
2682
|
+
readonly name: "cappedPnlAllowancePerPrice";
|
|
2683
|
+
readonly type: "uint256";
|
|
2684
|
+
}];
|
|
2685
|
+
readonly internalType: "struct Position.Numbers";
|
|
2686
|
+
readonly name: "numbers";
|
|
2687
|
+
readonly type: "tuple";
|
|
2688
|
+
}, {
|
|
2689
|
+
readonly components: readonly [{
|
|
2690
|
+
readonly internalType: "bool";
|
|
2691
|
+
readonly name: "isLong";
|
|
2692
|
+
readonly type: "bool";
|
|
2693
|
+
}];
|
|
2694
|
+
readonly internalType: "struct Position.Flags";
|
|
2695
|
+
readonly name: "flags";
|
|
2696
|
+
readonly type: "tuple";
|
|
2697
|
+
}];
|
|
2698
|
+
readonly internalType: "struct Position.Props";
|
|
2699
|
+
readonly name: "position";
|
|
2700
|
+
readonly type: "tuple";
|
|
2701
|
+
}, {
|
|
2702
|
+
readonly components: readonly [{
|
|
2703
|
+
readonly components: readonly [{
|
|
2704
|
+
readonly internalType: "bytes32";
|
|
2705
|
+
readonly name: "referralCode";
|
|
2706
|
+
readonly type: "bytes32";
|
|
2707
|
+
}, {
|
|
2708
|
+
readonly internalType: "address";
|
|
2709
|
+
readonly name: "affiliate";
|
|
2710
|
+
readonly type: "address";
|
|
2711
|
+
}, {
|
|
2712
|
+
readonly internalType: "address";
|
|
2713
|
+
readonly name: "trader";
|
|
2714
|
+
readonly type: "address";
|
|
2715
|
+
}, {
|
|
2716
|
+
readonly internalType: "uint256";
|
|
2717
|
+
readonly name: "totalRebateFactor";
|
|
2718
|
+
readonly type: "uint256";
|
|
2719
|
+
}, {
|
|
2720
|
+
readonly internalType: "uint256";
|
|
2721
|
+
readonly name: "affiliateRewardFactor";
|
|
2722
|
+
readonly type: "uint256";
|
|
2723
|
+
}, {
|
|
2724
|
+
readonly internalType: "uint256";
|
|
2725
|
+
readonly name: "adjustedAffiliateRewardFactor";
|
|
2726
|
+
readonly type: "uint256";
|
|
2727
|
+
}, {
|
|
2728
|
+
readonly internalType: "uint256";
|
|
2729
|
+
readonly name: "traderDiscountFactor";
|
|
2730
|
+
readonly type: "uint256";
|
|
2731
|
+
}, {
|
|
2732
|
+
readonly internalType: "uint256";
|
|
2733
|
+
readonly name: "totalRebateAmount";
|
|
2734
|
+
readonly type: "uint256";
|
|
2735
|
+
}, {
|
|
2736
|
+
readonly internalType: "uint256";
|
|
2737
|
+
readonly name: "traderDiscountAmount";
|
|
2738
|
+
readonly type: "uint256";
|
|
2739
|
+
}, {
|
|
2740
|
+
readonly internalType: "uint256";
|
|
2741
|
+
readonly name: "affiliateRewardAmount";
|
|
2742
|
+
readonly type: "uint256";
|
|
2743
|
+
}];
|
|
2744
|
+
readonly internalType: "struct PositionPricingUtils.PositionReferralFees";
|
|
2745
|
+
readonly name: "referral";
|
|
2746
|
+
readonly type: "tuple";
|
|
2747
|
+
}, {
|
|
2748
|
+
readonly components: readonly [{
|
|
2749
|
+
readonly internalType: "uint256";
|
|
2750
|
+
readonly name: "traderTier";
|
|
2751
|
+
readonly type: "uint256";
|
|
2752
|
+
}, {
|
|
2753
|
+
readonly internalType: "uint256";
|
|
2754
|
+
readonly name: "traderDiscountFactor";
|
|
2755
|
+
readonly type: "uint256";
|
|
2756
|
+
}, {
|
|
2757
|
+
readonly internalType: "uint256";
|
|
2758
|
+
readonly name: "traderDiscountAmount";
|
|
2759
|
+
readonly type: "uint256";
|
|
2760
|
+
}];
|
|
2761
|
+
readonly internalType: "struct PositionPricingUtils.PositionProFees";
|
|
2762
|
+
readonly name: "pro";
|
|
2763
|
+
readonly type: "tuple";
|
|
2764
|
+
}, {
|
|
2765
|
+
readonly components: readonly [{
|
|
2766
|
+
readonly internalType: "uint256";
|
|
2767
|
+
readonly name: "fundingFeeAmount";
|
|
2768
|
+
readonly type: "uint256";
|
|
2769
|
+
}, {
|
|
2770
|
+
readonly internalType: "uint256";
|
|
2771
|
+
readonly name: "claimableLongTokenAmount";
|
|
2772
|
+
readonly type: "uint256";
|
|
2773
|
+
}, {
|
|
2774
|
+
readonly internalType: "uint256";
|
|
2775
|
+
readonly name: "claimableShortTokenAmount";
|
|
2776
|
+
readonly type: "uint256";
|
|
2777
|
+
}, {
|
|
2778
|
+
readonly internalType: "uint256";
|
|
2779
|
+
readonly name: "latestFundingFeeAmountPerSize";
|
|
2780
|
+
readonly type: "uint256";
|
|
2781
|
+
}, {
|
|
2782
|
+
readonly internalType: "uint256";
|
|
2783
|
+
readonly name: "latestLongTokenClaimableFundingAmountPerSize";
|
|
2784
|
+
readonly type: "uint256";
|
|
2785
|
+
}, {
|
|
2786
|
+
readonly internalType: "uint256";
|
|
2787
|
+
readonly name: "latestShortTokenClaimableFundingAmountPerSize";
|
|
2788
|
+
readonly type: "uint256";
|
|
2789
|
+
}];
|
|
2790
|
+
readonly internalType: "struct PositionPricingUtils.PositionFundingFees";
|
|
2791
|
+
readonly name: "funding";
|
|
2792
|
+
readonly type: "tuple";
|
|
2793
|
+
}, {
|
|
2794
|
+
readonly components: readonly [{
|
|
2795
|
+
readonly internalType: "uint256";
|
|
2796
|
+
readonly name: "borrowingFeeUsd";
|
|
2797
|
+
readonly type: "uint256";
|
|
2798
|
+
}, {
|
|
2799
|
+
readonly internalType: "uint256";
|
|
2800
|
+
readonly name: "borrowingFeeAmount";
|
|
2801
|
+
readonly type: "uint256";
|
|
2802
|
+
}, {
|
|
2803
|
+
readonly internalType: "uint256";
|
|
2804
|
+
readonly name: "borrowingFeeReceiverFactor";
|
|
2805
|
+
readonly type: "uint256";
|
|
2806
|
+
}, {
|
|
2807
|
+
readonly internalType: "uint256";
|
|
2808
|
+
readonly name: "borrowingFeeAmountForFeeReceiver";
|
|
2809
|
+
readonly type: "uint256";
|
|
2810
|
+
}];
|
|
2811
|
+
readonly internalType: "struct PositionPricingUtils.PositionBorrowingFees";
|
|
2812
|
+
readonly name: "borrowing";
|
|
2813
|
+
readonly type: "tuple";
|
|
2814
|
+
}, {
|
|
2815
|
+
readonly components: readonly [{
|
|
2816
|
+
readonly internalType: "address";
|
|
2817
|
+
readonly name: "uiFeeReceiver";
|
|
2818
|
+
readonly type: "address";
|
|
2819
|
+
}, {
|
|
2820
|
+
readonly internalType: "uint256";
|
|
2821
|
+
readonly name: "uiFeeReceiverFactor";
|
|
2822
|
+
readonly type: "uint256";
|
|
2823
|
+
}, {
|
|
2824
|
+
readonly internalType: "uint256";
|
|
2825
|
+
readonly name: "uiFeeAmount";
|
|
2826
|
+
readonly type: "uint256";
|
|
2827
|
+
}];
|
|
2828
|
+
readonly internalType: "struct PositionPricingUtils.PositionUiFees";
|
|
2829
|
+
readonly name: "ui";
|
|
2830
|
+
readonly type: "tuple";
|
|
2831
|
+
}, {
|
|
2832
|
+
readonly components: readonly [{
|
|
2833
|
+
readonly internalType: "uint256";
|
|
2834
|
+
readonly name: "liquidationFeeUsd";
|
|
2835
|
+
readonly type: "uint256";
|
|
2836
|
+
}, {
|
|
2837
|
+
readonly internalType: "uint256";
|
|
2838
|
+
readonly name: "liquidationFeeAmount";
|
|
2839
|
+
readonly type: "uint256";
|
|
2840
|
+
}, {
|
|
2841
|
+
readonly internalType: "uint256";
|
|
2842
|
+
readonly name: "liquidationFeeReceiverFactor";
|
|
2843
|
+
readonly type: "uint256";
|
|
2844
|
+
}, {
|
|
2845
|
+
readonly internalType: "uint256";
|
|
2846
|
+
readonly name: "liquidationFeeAmountForFeeReceiver";
|
|
2847
|
+
readonly type: "uint256";
|
|
2848
|
+
}];
|
|
2849
|
+
readonly internalType: "struct PositionPricingUtils.PositionLiquidationFees";
|
|
2850
|
+
readonly name: "liquidation";
|
|
2851
|
+
readonly type: "tuple";
|
|
2852
|
+
}, {
|
|
2853
|
+
readonly components: readonly [{
|
|
2854
|
+
readonly internalType: "uint256";
|
|
2855
|
+
readonly name: "min";
|
|
2856
|
+
readonly type: "uint256";
|
|
2857
|
+
}, {
|
|
2858
|
+
readonly internalType: "uint256";
|
|
2859
|
+
readonly name: "max";
|
|
2860
|
+
readonly type: "uint256";
|
|
2861
|
+
}];
|
|
2862
|
+
readonly internalType: "struct Price.Props";
|
|
2863
|
+
readonly name: "collateralTokenPrice";
|
|
2864
|
+
readonly type: "tuple";
|
|
2865
|
+
}, {
|
|
2866
|
+
readonly internalType: "uint256";
|
|
2867
|
+
readonly name: "positionFeeFactor";
|
|
2868
|
+
readonly type: "uint256";
|
|
2869
|
+
}, {
|
|
2870
|
+
readonly internalType: "uint256";
|
|
2871
|
+
readonly name: "protocolFeeAmount";
|
|
2872
|
+
readonly type: "uint256";
|
|
2873
|
+
}, {
|
|
2874
|
+
readonly internalType: "uint256";
|
|
2875
|
+
readonly name: "positionFeeReceiverFactor";
|
|
2876
|
+
readonly type: "uint256";
|
|
2877
|
+
}, {
|
|
2878
|
+
readonly internalType: "uint256";
|
|
2879
|
+
readonly name: "feeReceiverAmount";
|
|
2880
|
+
readonly type: "uint256";
|
|
2881
|
+
}, {
|
|
2882
|
+
readonly internalType: "uint256";
|
|
2883
|
+
readonly name: "feeAmountForPool";
|
|
2884
|
+
readonly type: "uint256";
|
|
2885
|
+
}, {
|
|
2886
|
+
readonly internalType: "uint256";
|
|
2887
|
+
readonly name: "positionFeeAmountForPool";
|
|
2888
|
+
readonly type: "uint256";
|
|
2889
|
+
}, {
|
|
2890
|
+
readonly internalType: "uint256";
|
|
2891
|
+
readonly name: "positionFeeAmount";
|
|
2892
|
+
readonly type: "uint256";
|
|
2893
|
+
}, {
|
|
2894
|
+
readonly internalType: "uint256";
|
|
2895
|
+
readonly name: "totalCostAmountExcludingFunding";
|
|
2896
|
+
readonly type: "uint256";
|
|
2897
|
+
}, {
|
|
2898
|
+
readonly internalType: "uint256";
|
|
2899
|
+
readonly name: "totalCostAmount";
|
|
2900
|
+
readonly type: "uint256";
|
|
2901
|
+
}, {
|
|
2902
|
+
readonly internalType: "uint256";
|
|
2903
|
+
readonly name: "totalDiscountAmount";
|
|
2904
|
+
readonly type: "uint256";
|
|
2905
|
+
}, {
|
|
2906
|
+
readonly internalType: "bool";
|
|
2907
|
+
readonly name: "balanceWasImproved";
|
|
2908
|
+
readonly type: "bool";
|
|
2909
|
+
}];
|
|
2910
|
+
readonly internalType: "struct PositionPricingUtils.PositionFees";
|
|
2911
|
+
readonly name: "fees";
|
|
2912
|
+
readonly type: "tuple";
|
|
2913
|
+
}, {
|
|
2914
|
+
readonly components: readonly [{
|
|
2915
|
+
readonly internalType: "int256";
|
|
2916
|
+
readonly name: "priceImpactUsd";
|
|
2917
|
+
readonly type: "int256";
|
|
2918
|
+
}, {
|
|
2919
|
+
readonly internalType: "uint256";
|
|
2920
|
+
readonly name: "executionPrice";
|
|
2921
|
+
readonly type: "uint256";
|
|
2922
|
+
}, {
|
|
2923
|
+
readonly internalType: "bool";
|
|
2924
|
+
readonly name: "balanceWasImproved";
|
|
2925
|
+
readonly type: "bool";
|
|
2926
|
+
}, {
|
|
2927
|
+
readonly internalType: "int256";
|
|
2928
|
+
readonly name: "proportionalPendingImpactUsd";
|
|
2929
|
+
readonly type: "int256";
|
|
2930
|
+
}, {
|
|
2931
|
+
readonly internalType: "int256";
|
|
2932
|
+
readonly name: "totalImpactUsd";
|
|
2933
|
+
readonly type: "int256";
|
|
2934
|
+
}, {
|
|
2935
|
+
readonly internalType: "uint256";
|
|
2936
|
+
readonly name: "priceImpactDiffUsd";
|
|
2937
|
+
readonly type: "uint256";
|
|
2938
|
+
}];
|
|
2939
|
+
readonly internalType: "struct ReaderPricingUtils.ExecutionPriceResult";
|
|
2940
|
+
readonly name: "executionPriceResult";
|
|
2941
|
+
readonly type: "tuple";
|
|
2942
|
+
}, {
|
|
2943
|
+
readonly internalType: "int256";
|
|
2944
|
+
readonly name: "basePnlUsd";
|
|
2945
|
+
readonly type: "int256";
|
|
2946
|
+
}, {
|
|
2947
|
+
readonly internalType: "int256";
|
|
2948
|
+
readonly name: "uncappedBasePnlUsd";
|
|
2949
|
+
readonly type: "int256";
|
|
2950
|
+
}, {
|
|
2951
|
+
readonly internalType: "int256";
|
|
2952
|
+
readonly name: "pnlAfterPriceImpactUsd";
|
|
2953
|
+
readonly type: "int256";
|
|
2954
|
+
}, {
|
|
2955
|
+
readonly internalType: "int256";
|
|
2956
|
+
readonly name: "positionValueInUsd";
|
|
2957
|
+
readonly type: "int256";
|
|
2958
|
+
}];
|
|
2959
|
+
readonly internalType: "struct ReaderPositionUtils.PositionInfo";
|
|
2960
|
+
readonly name: "";
|
|
2961
|
+
readonly type: "tuple";
|
|
2962
|
+
}];
|
|
2963
|
+
readonly stateMutability: "view";
|
|
2964
|
+
readonly type: "function";
|
|
2965
|
+
}, {
|
|
2966
|
+
readonly inputs: readonly [{
|
|
2967
|
+
readonly internalType: "contract DataStore";
|
|
2968
|
+
readonly name: "dataStore";
|
|
2969
|
+
readonly type: "address";
|
|
2970
|
+
}, {
|
|
2971
|
+
readonly internalType: "contract IReferralStorage";
|
|
2972
|
+
readonly name: "referralStorage";
|
|
2973
|
+
readonly type: "address";
|
|
2974
|
+
}, {
|
|
2975
|
+
readonly internalType: "bytes32[]";
|
|
2976
|
+
readonly name: "positionKeys";
|
|
2977
|
+
readonly type: "bytes32[]";
|
|
2978
|
+
}, {
|
|
2979
|
+
readonly components: readonly [{
|
|
2980
|
+
readonly components: readonly [{
|
|
2981
|
+
readonly internalType: "uint256";
|
|
2982
|
+
readonly name: "min";
|
|
2983
|
+
readonly type: "uint256";
|
|
2984
|
+
}, {
|
|
2985
|
+
readonly internalType: "uint256";
|
|
2986
|
+
readonly name: "max";
|
|
2987
|
+
readonly type: "uint256";
|
|
2988
|
+
}];
|
|
2989
|
+
readonly internalType: "struct Price.Props";
|
|
2990
|
+
readonly name: "indexTokenPrice";
|
|
2991
|
+
readonly type: "tuple";
|
|
2992
|
+
}, {
|
|
2993
|
+
readonly components: readonly [{
|
|
2994
|
+
readonly internalType: "uint256";
|
|
2995
|
+
readonly name: "min";
|
|
2996
|
+
readonly type: "uint256";
|
|
2997
|
+
}, {
|
|
2998
|
+
readonly internalType: "uint256";
|
|
2999
|
+
readonly name: "max";
|
|
3000
|
+
readonly type: "uint256";
|
|
3001
|
+
}];
|
|
3002
|
+
readonly internalType: "struct Price.Props";
|
|
3003
|
+
readonly name: "longTokenPrice";
|
|
3004
|
+
readonly type: "tuple";
|
|
3005
|
+
}, {
|
|
3006
|
+
readonly components: readonly [{
|
|
3007
|
+
readonly internalType: "uint256";
|
|
3008
|
+
readonly name: "min";
|
|
3009
|
+
readonly type: "uint256";
|
|
3010
|
+
}, {
|
|
3011
|
+
readonly internalType: "uint256";
|
|
3012
|
+
readonly name: "max";
|
|
3013
|
+
readonly type: "uint256";
|
|
3014
|
+
}];
|
|
3015
|
+
readonly internalType: "struct Price.Props";
|
|
3016
|
+
readonly name: "shortTokenPrice";
|
|
3017
|
+
readonly type: "tuple";
|
|
3018
|
+
}];
|
|
3019
|
+
readonly internalType: "struct MarketUtils.MarketPrices[]";
|
|
3020
|
+
readonly name: "prices";
|
|
3021
|
+
readonly type: "tuple[]";
|
|
3022
|
+
}, {
|
|
3023
|
+
readonly internalType: "address";
|
|
3024
|
+
readonly name: "uiFeeReceiver";
|
|
3025
|
+
readonly type: "address";
|
|
3026
|
+
}];
|
|
3027
|
+
readonly name: "getPositionInfoList";
|
|
3028
|
+
readonly outputs: readonly [{
|
|
3029
|
+
readonly components: readonly [{
|
|
3030
|
+
readonly internalType: "bytes32";
|
|
3031
|
+
readonly name: "positionKey";
|
|
3032
|
+
readonly type: "bytes32";
|
|
3033
|
+
}, {
|
|
3034
|
+
readonly components: readonly [{
|
|
3035
|
+
readonly components: readonly [{
|
|
3036
|
+
readonly internalType: "address";
|
|
3037
|
+
readonly name: "account";
|
|
3038
|
+
readonly type: "address";
|
|
3039
|
+
}, {
|
|
3040
|
+
readonly internalType: "address";
|
|
3041
|
+
readonly name: "market";
|
|
3042
|
+
readonly type: "address";
|
|
3043
|
+
}, {
|
|
3044
|
+
readonly internalType: "address";
|
|
3045
|
+
readonly name: "collateralToken";
|
|
3046
|
+
readonly type: "address";
|
|
3047
|
+
}];
|
|
3048
|
+
readonly internalType: "struct Position.Addresses";
|
|
3049
|
+
readonly name: "addresses";
|
|
3050
|
+
readonly type: "tuple";
|
|
3051
|
+
}, {
|
|
3052
|
+
readonly components: readonly [{
|
|
3053
|
+
readonly internalType: "uint256";
|
|
3054
|
+
readonly name: "sizeInUsd";
|
|
3055
|
+
readonly type: "uint256";
|
|
3056
|
+
}, {
|
|
3057
|
+
readonly internalType: "uint256";
|
|
3058
|
+
readonly name: "sizeInTokens";
|
|
3059
|
+
readonly type: "uint256";
|
|
3060
|
+
}, {
|
|
3061
|
+
readonly internalType: "uint256";
|
|
3062
|
+
readonly name: "collateralAmount";
|
|
3063
|
+
readonly type: "uint256";
|
|
3064
|
+
}, {
|
|
3065
|
+
readonly internalType: "int256";
|
|
3066
|
+
readonly name: "pendingImpactAmount";
|
|
3067
|
+
readonly type: "int256";
|
|
3068
|
+
}, {
|
|
3069
|
+
readonly internalType: "int256";
|
|
3070
|
+
readonly name: "realizedUncappedPnlUsd";
|
|
3071
|
+
readonly type: "int256";
|
|
3072
|
+
}, {
|
|
3073
|
+
readonly internalType: "int256";
|
|
3074
|
+
readonly name: "realizedPnlUsd";
|
|
3075
|
+
readonly type: "int256";
|
|
3076
|
+
}, {
|
|
3077
|
+
readonly internalType: "uint256";
|
|
3078
|
+
readonly name: "cappedPnlPoolTokenAmount";
|
|
3079
|
+
readonly type: "uint256";
|
|
3080
|
+
}, {
|
|
3081
|
+
readonly internalType: "uint256";
|
|
3082
|
+
readonly name: "borrowingFactor";
|
|
3083
|
+
readonly type: "uint256";
|
|
3084
|
+
}, {
|
|
3085
|
+
readonly internalType: "uint256";
|
|
3086
|
+
readonly name: "fundingFeeAmountPerSize";
|
|
3087
|
+
readonly type: "uint256";
|
|
3088
|
+
}, {
|
|
3089
|
+
readonly internalType: "uint256";
|
|
3090
|
+
readonly name: "longTokenClaimableFundingAmountPerSize";
|
|
3091
|
+
readonly type: "uint256";
|
|
3092
|
+
}, {
|
|
3093
|
+
readonly internalType: "uint256";
|
|
3094
|
+
readonly name: "shortTokenClaimableFundingAmountPerSize";
|
|
3095
|
+
readonly type: "uint256";
|
|
3096
|
+
}, {
|
|
3097
|
+
readonly internalType: "uint256";
|
|
3098
|
+
readonly name: "increasedAtTime";
|
|
3099
|
+
readonly type: "uint256";
|
|
3100
|
+
}, {
|
|
3101
|
+
readonly internalType: "uint256";
|
|
3102
|
+
readonly name: "decreasedAtTime";
|
|
3103
|
+
readonly type: "uint256";
|
|
3104
|
+
}, {
|
|
3105
|
+
readonly internalType: "int256";
|
|
3106
|
+
readonly name: "cappedPnlReferencePoolPnlUsd";
|
|
3107
|
+
readonly type: "int256";
|
|
3108
|
+
}, {
|
|
3109
|
+
readonly internalType: "uint256";
|
|
3110
|
+
readonly name: "cappedPnlAllowancePerPrice";
|
|
3111
|
+
readonly type: "uint256";
|
|
3112
|
+
}];
|
|
3113
|
+
readonly internalType: "struct Position.Numbers";
|
|
3114
|
+
readonly name: "numbers";
|
|
3115
|
+
readonly type: "tuple";
|
|
3116
|
+
}, {
|
|
3117
|
+
readonly components: readonly [{
|
|
3118
|
+
readonly internalType: "bool";
|
|
3119
|
+
readonly name: "isLong";
|
|
3120
|
+
readonly type: "bool";
|
|
3121
|
+
}];
|
|
3122
|
+
readonly internalType: "struct Position.Flags";
|
|
3123
|
+
readonly name: "flags";
|
|
3124
|
+
readonly type: "tuple";
|
|
3125
|
+
}];
|
|
3126
|
+
readonly internalType: "struct Position.Props";
|
|
3127
|
+
readonly name: "position";
|
|
3128
|
+
readonly type: "tuple";
|
|
3129
|
+
}, {
|
|
3130
|
+
readonly components: readonly [{
|
|
3131
|
+
readonly components: readonly [{
|
|
3132
|
+
readonly internalType: "bytes32";
|
|
3133
|
+
readonly name: "referralCode";
|
|
3134
|
+
readonly type: "bytes32";
|
|
3135
|
+
}, {
|
|
3136
|
+
readonly internalType: "address";
|
|
3137
|
+
readonly name: "affiliate";
|
|
3138
|
+
readonly type: "address";
|
|
3139
|
+
}, {
|
|
3140
|
+
readonly internalType: "address";
|
|
3141
|
+
readonly name: "trader";
|
|
3142
|
+
readonly type: "address";
|
|
3143
|
+
}, {
|
|
3144
|
+
readonly internalType: "uint256";
|
|
3145
|
+
readonly name: "totalRebateFactor";
|
|
3146
|
+
readonly type: "uint256";
|
|
3147
|
+
}, {
|
|
3148
|
+
readonly internalType: "uint256";
|
|
3149
|
+
readonly name: "affiliateRewardFactor";
|
|
3150
|
+
readonly type: "uint256";
|
|
3151
|
+
}, {
|
|
3152
|
+
readonly internalType: "uint256";
|
|
3153
|
+
readonly name: "adjustedAffiliateRewardFactor";
|
|
3154
|
+
readonly type: "uint256";
|
|
3155
|
+
}, {
|
|
3156
|
+
readonly internalType: "uint256";
|
|
3157
|
+
readonly name: "traderDiscountFactor";
|
|
3158
|
+
readonly type: "uint256";
|
|
3159
|
+
}, {
|
|
3160
|
+
readonly internalType: "uint256";
|
|
3161
|
+
readonly name: "totalRebateAmount";
|
|
3162
|
+
readonly type: "uint256";
|
|
3163
|
+
}, {
|
|
3164
|
+
readonly internalType: "uint256";
|
|
3165
|
+
readonly name: "traderDiscountAmount";
|
|
3166
|
+
readonly type: "uint256";
|
|
3167
|
+
}, {
|
|
3168
|
+
readonly internalType: "uint256";
|
|
3169
|
+
readonly name: "affiliateRewardAmount";
|
|
3170
|
+
readonly type: "uint256";
|
|
3171
|
+
}];
|
|
3172
|
+
readonly internalType: "struct PositionPricingUtils.PositionReferralFees";
|
|
3173
|
+
readonly name: "referral";
|
|
3174
|
+
readonly type: "tuple";
|
|
3175
|
+
}, {
|
|
3176
|
+
readonly components: readonly [{
|
|
3177
|
+
readonly internalType: "uint256";
|
|
3178
|
+
readonly name: "traderTier";
|
|
3179
|
+
readonly type: "uint256";
|
|
3180
|
+
}, {
|
|
3181
|
+
readonly internalType: "uint256";
|
|
3182
|
+
readonly name: "traderDiscountFactor";
|
|
3183
|
+
readonly type: "uint256";
|
|
3184
|
+
}, {
|
|
3185
|
+
readonly internalType: "uint256";
|
|
3186
|
+
readonly name: "traderDiscountAmount";
|
|
3187
|
+
readonly type: "uint256";
|
|
3188
|
+
}];
|
|
3189
|
+
readonly internalType: "struct PositionPricingUtils.PositionProFees";
|
|
3190
|
+
readonly name: "pro";
|
|
3191
|
+
readonly type: "tuple";
|
|
3192
|
+
}, {
|
|
3193
|
+
readonly components: readonly [{
|
|
3194
|
+
readonly internalType: "uint256";
|
|
3195
|
+
readonly name: "fundingFeeAmount";
|
|
3196
|
+
readonly type: "uint256";
|
|
3197
|
+
}, {
|
|
3198
|
+
readonly internalType: "uint256";
|
|
3199
|
+
readonly name: "claimableLongTokenAmount";
|
|
3200
|
+
readonly type: "uint256";
|
|
3201
|
+
}, {
|
|
3202
|
+
readonly internalType: "uint256";
|
|
3203
|
+
readonly name: "claimableShortTokenAmount";
|
|
3204
|
+
readonly type: "uint256";
|
|
3205
|
+
}, {
|
|
3206
|
+
readonly internalType: "uint256";
|
|
3207
|
+
readonly name: "latestFundingFeeAmountPerSize";
|
|
3208
|
+
readonly type: "uint256";
|
|
3209
|
+
}, {
|
|
3210
|
+
readonly internalType: "uint256";
|
|
3211
|
+
readonly name: "latestLongTokenClaimableFundingAmountPerSize";
|
|
3212
|
+
readonly type: "uint256";
|
|
3213
|
+
}, {
|
|
3214
|
+
readonly internalType: "uint256";
|
|
3215
|
+
readonly name: "latestShortTokenClaimableFundingAmountPerSize";
|
|
3216
|
+
readonly type: "uint256";
|
|
3217
|
+
}];
|
|
3218
|
+
readonly internalType: "struct PositionPricingUtils.PositionFundingFees";
|
|
3219
|
+
readonly name: "funding";
|
|
3220
|
+
readonly type: "tuple";
|
|
3221
|
+
}, {
|
|
3222
|
+
readonly components: readonly [{
|
|
3223
|
+
readonly internalType: "uint256";
|
|
3224
|
+
readonly name: "borrowingFeeUsd";
|
|
3225
|
+
readonly type: "uint256";
|
|
3226
|
+
}, {
|
|
3227
|
+
readonly internalType: "uint256";
|
|
3228
|
+
readonly name: "borrowingFeeAmount";
|
|
3229
|
+
readonly type: "uint256";
|
|
3230
|
+
}, {
|
|
3231
|
+
readonly internalType: "uint256";
|
|
3232
|
+
readonly name: "borrowingFeeReceiverFactor";
|
|
3233
|
+
readonly type: "uint256";
|
|
3234
|
+
}, {
|
|
3235
|
+
readonly internalType: "uint256";
|
|
3236
|
+
readonly name: "borrowingFeeAmountForFeeReceiver";
|
|
3237
|
+
readonly type: "uint256";
|
|
3238
|
+
}];
|
|
3239
|
+
readonly internalType: "struct PositionPricingUtils.PositionBorrowingFees";
|
|
3240
|
+
readonly name: "borrowing";
|
|
3241
|
+
readonly type: "tuple";
|
|
3242
|
+
}, {
|
|
3243
|
+
readonly components: readonly [{
|
|
3244
|
+
readonly internalType: "address";
|
|
3245
|
+
readonly name: "uiFeeReceiver";
|
|
3246
|
+
readonly type: "address";
|
|
3247
|
+
}, {
|
|
3248
|
+
readonly internalType: "uint256";
|
|
3249
|
+
readonly name: "uiFeeReceiverFactor";
|
|
3250
|
+
readonly type: "uint256";
|
|
3251
|
+
}, {
|
|
3252
|
+
readonly internalType: "uint256";
|
|
3253
|
+
readonly name: "uiFeeAmount";
|
|
3254
|
+
readonly type: "uint256";
|
|
3255
|
+
}];
|
|
3256
|
+
readonly internalType: "struct PositionPricingUtils.PositionUiFees";
|
|
3257
|
+
readonly name: "ui";
|
|
3258
|
+
readonly type: "tuple";
|
|
3259
|
+
}, {
|
|
3260
|
+
readonly components: readonly [{
|
|
3261
|
+
readonly internalType: "uint256";
|
|
3262
|
+
readonly name: "liquidationFeeUsd";
|
|
3263
|
+
readonly type: "uint256";
|
|
3264
|
+
}, {
|
|
3265
|
+
readonly internalType: "uint256";
|
|
3266
|
+
readonly name: "liquidationFeeAmount";
|
|
3267
|
+
readonly type: "uint256";
|
|
3268
|
+
}, {
|
|
3269
|
+
readonly internalType: "uint256";
|
|
3270
|
+
readonly name: "liquidationFeeReceiverFactor";
|
|
3271
|
+
readonly type: "uint256";
|
|
3272
|
+
}, {
|
|
3273
|
+
readonly internalType: "uint256";
|
|
3274
|
+
readonly name: "liquidationFeeAmountForFeeReceiver";
|
|
3275
|
+
readonly type: "uint256";
|
|
3276
|
+
}];
|
|
3277
|
+
readonly internalType: "struct PositionPricingUtils.PositionLiquidationFees";
|
|
3278
|
+
readonly name: "liquidation";
|
|
3279
|
+
readonly type: "tuple";
|
|
3280
|
+
}, {
|
|
3281
|
+
readonly components: readonly [{
|
|
3282
|
+
readonly internalType: "uint256";
|
|
3283
|
+
readonly name: "min";
|
|
3284
|
+
readonly type: "uint256";
|
|
3285
|
+
}, {
|
|
3286
|
+
readonly internalType: "uint256";
|
|
3287
|
+
readonly name: "max";
|
|
3288
|
+
readonly type: "uint256";
|
|
3289
|
+
}];
|
|
3290
|
+
readonly internalType: "struct Price.Props";
|
|
3291
|
+
readonly name: "collateralTokenPrice";
|
|
3292
|
+
readonly type: "tuple";
|
|
3293
|
+
}, {
|
|
3294
|
+
readonly internalType: "uint256";
|
|
3295
|
+
readonly name: "positionFeeFactor";
|
|
3296
|
+
readonly type: "uint256";
|
|
3297
|
+
}, {
|
|
3298
|
+
readonly internalType: "uint256";
|
|
3299
|
+
readonly name: "protocolFeeAmount";
|
|
3300
|
+
readonly type: "uint256";
|
|
3301
|
+
}, {
|
|
3302
|
+
readonly internalType: "uint256";
|
|
3303
|
+
readonly name: "positionFeeReceiverFactor";
|
|
3304
|
+
readonly type: "uint256";
|
|
3305
|
+
}, {
|
|
3306
|
+
readonly internalType: "uint256";
|
|
3307
|
+
readonly name: "feeReceiverAmount";
|
|
3308
|
+
readonly type: "uint256";
|
|
3309
|
+
}, {
|
|
3310
|
+
readonly internalType: "uint256";
|
|
3311
|
+
readonly name: "feeAmountForPool";
|
|
3312
|
+
readonly type: "uint256";
|
|
3313
|
+
}, {
|
|
3314
|
+
readonly internalType: "uint256";
|
|
3315
|
+
readonly name: "positionFeeAmountForPool";
|
|
3316
|
+
readonly type: "uint256";
|
|
3317
|
+
}, {
|
|
3318
|
+
readonly internalType: "uint256";
|
|
3319
|
+
readonly name: "positionFeeAmount";
|
|
3320
|
+
readonly type: "uint256";
|
|
3321
|
+
}, {
|
|
3322
|
+
readonly internalType: "uint256";
|
|
3323
|
+
readonly name: "totalCostAmountExcludingFunding";
|
|
3324
|
+
readonly type: "uint256";
|
|
3325
|
+
}, {
|
|
3326
|
+
readonly internalType: "uint256";
|
|
3327
|
+
readonly name: "totalCostAmount";
|
|
3328
|
+
readonly type: "uint256";
|
|
3329
|
+
}, {
|
|
3330
|
+
readonly internalType: "uint256";
|
|
3331
|
+
readonly name: "totalDiscountAmount";
|
|
3332
|
+
readonly type: "uint256";
|
|
3333
|
+
}, {
|
|
3334
|
+
readonly internalType: "bool";
|
|
3335
|
+
readonly name: "balanceWasImproved";
|
|
3336
|
+
readonly type: "bool";
|
|
3337
|
+
}];
|
|
3338
|
+
readonly internalType: "struct PositionPricingUtils.PositionFees";
|
|
3339
|
+
readonly name: "fees";
|
|
3340
|
+
readonly type: "tuple";
|
|
3341
|
+
}, {
|
|
3342
|
+
readonly components: readonly [{
|
|
3343
|
+
readonly internalType: "int256";
|
|
3344
|
+
readonly name: "priceImpactUsd";
|
|
3345
|
+
readonly type: "int256";
|
|
3346
|
+
}, {
|
|
3347
|
+
readonly internalType: "uint256";
|
|
3348
|
+
readonly name: "executionPrice";
|
|
3349
|
+
readonly type: "uint256";
|
|
3350
|
+
}, {
|
|
3351
|
+
readonly internalType: "bool";
|
|
3352
|
+
readonly name: "balanceWasImproved";
|
|
3353
|
+
readonly type: "bool";
|
|
3354
|
+
}, {
|
|
3355
|
+
readonly internalType: "int256";
|
|
3356
|
+
readonly name: "proportionalPendingImpactUsd";
|
|
3357
|
+
readonly type: "int256";
|
|
3358
|
+
}, {
|
|
3359
|
+
readonly internalType: "int256";
|
|
3360
|
+
readonly name: "totalImpactUsd";
|
|
3361
|
+
readonly type: "int256";
|
|
3362
|
+
}, {
|
|
3363
|
+
readonly internalType: "uint256";
|
|
3364
|
+
readonly name: "priceImpactDiffUsd";
|
|
3365
|
+
readonly type: "uint256";
|
|
3366
|
+
}];
|
|
3367
|
+
readonly internalType: "struct ReaderPricingUtils.ExecutionPriceResult";
|
|
3368
|
+
readonly name: "executionPriceResult";
|
|
3369
|
+
readonly type: "tuple";
|
|
3370
|
+
}, {
|
|
3371
|
+
readonly internalType: "int256";
|
|
3372
|
+
readonly name: "basePnlUsd";
|
|
3373
|
+
readonly type: "int256";
|
|
3374
|
+
}, {
|
|
3375
|
+
readonly internalType: "int256";
|
|
3376
|
+
readonly name: "uncappedBasePnlUsd";
|
|
3377
|
+
readonly type: "int256";
|
|
3378
|
+
}, {
|
|
3379
|
+
readonly internalType: "int256";
|
|
3380
|
+
readonly name: "pnlAfterPriceImpactUsd";
|
|
3381
|
+
readonly type: "int256";
|
|
3382
|
+
}, {
|
|
3383
|
+
readonly internalType: "int256";
|
|
3384
|
+
readonly name: "positionValueInUsd";
|
|
3385
|
+
readonly type: "int256";
|
|
3386
|
+
}];
|
|
3387
|
+
readonly internalType: "struct ReaderPositionUtils.PositionInfo[]";
|
|
3388
|
+
readonly name: "";
|
|
3389
|
+
readonly type: "tuple[]";
|
|
3390
|
+
}];
|
|
3391
|
+
readonly stateMutability: "view";
|
|
3392
|
+
readonly type: "function";
|
|
3393
|
+
}, {
|
|
3394
|
+
readonly inputs: readonly [{
|
|
3395
|
+
readonly internalType: "contract DataStore";
|
|
3396
|
+
readonly name: "dataStore";
|
|
3397
|
+
readonly type: "address";
|
|
3398
|
+
}, {
|
|
3399
|
+
readonly components: readonly [{
|
|
3400
|
+
readonly internalType: "address";
|
|
3401
|
+
readonly name: "marketToken";
|
|
3402
|
+
readonly type: "address";
|
|
3403
|
+
}, {
|
|
3404
|
+
readonly internalType: "address";
|
|
3405
|
+
readonly name: "indexToken";
|
|
3406
|
+
readonly type: "address";
|
|
3407
|
+
}, {
|
|
3408
|
+
readonly internalType: "address";
|
|
3409
|
+
readonly name: "longToken";
|
|
3410
|
+
readonly type: "address";
|
|
3411
|
+
}, {
|
|
3412
|
+
readonly internalType: "address";
|
|
3413
|
+
readonly name: "shortToken";
|
|
3414
|
+
readonly type: "address";
|
|
3415
|
+
}];
|
|
3416
|
+
readonly internalType: "struct Market.Props";
|
|
3417
|
+
readonly name: "market";
|
|
3418
|
+
readonly type: "tuple";
|
|
3419
|
+
}, {
|
|
3420
|
+
readonly components: readonly [{
|
|
3421
|
+
readonly components: readonly [{
|
|
3422
|
+
readonly internalType: "uint256";
|
|
3423
|
+
readonly name: "min";
|
|
3424
|
+
readonly type: "uint256";
|
|
3425
|
+
}, {
|
|
3426
|
+
readonly internalType: "uint256";
|
|
3427
|
+
readonly name: "max";
|
|
3428
|
+
readonly type: "uint256";
|
|
3429
|
+
}];
|
|
3430
|
+
readonly internalType: "struct Price.Props";
|
|
3431
|
+
readonly name: "indexTokenPrice";
|
|
3432
|
+
readonly type: "tuple";
|
|
3433
|
+
}, {
|
|
3434
|
+
readonly components: readonly [{
|
|
3435
|
+
readonly internalType: "uint256";
|
|
3436
|
+
readonly name: "min";
|
|
3437
|
+
readonly type: "uint256";
|
|
3438
|
+
}, {
|
|
3439
|
+
readonly internalType: "uint256";
|
|
3440
|
+
readonly name: "max";
|
|
3441
|
+
readonly type: "uint256";
|
|
3442
|
+
}];
|
|
3443
|
+
readonly internalType: "struct Price.Props";
|
|
3444
|
+
readonly name: "longTokenPrice";
|
|
3445
|
+
readonly type: "tuple";
|
|
3446
|
+
}, {
|
|
3447
|
+
readonly components: readonly [{
|
|
3448
|
+
readonly internalType: "uint256";
|
|
3449
|
+
readonly name: "min";
|
|
3450
|
+
readonly type: "uint256";
|
|
3451
|
+
}, {
|
|
3452
|
+
readonly internalType: "uint256";
|
|
3453
|
+
readonly name: "max";
|
|
3454
|
+
readonly type: "uint256";
|
|
3455
|
+
}];
|
|
3456
|
+
readonly internalType: "struct Price.Props";
|
|
3457
|
+
readonly name: "shortTokenPrice";
|
|
3458
|
+
readonly type: "tuple";
|
|
3459
|
+
}];
|
|
3460
|
+
readonly internalType: "struct MarketUtils.MarketPrices";
|
|
3461
|
+
readonly name: "prices";
|
|
3462
|
+
readonly type: "tuple";
|
|
3463
|
+
}, {
|
|
3464
|
+
readonly internalType: "bytes32";
|
|
3465
|
+
readonly name: "positionKey";
|
|
3466
|
+
readonly type: "bytes32";
|
|
3467
|
+
}, {
|
|
3468
|
+
readonly internalType: "uint256";
|
|
3469
|
+
readonly name: "sizeDeltaUsd";
|
|
3470
|
+
readonly type: "uint256";
|
|
3471
|
+
}];
|
|
3472
|
+
readonly name: "getPositionPnlUsd";
|
|
3473
|
+
readonly outputs: readonly [{
|
|
3474
|
+
readonly internalType: "int256";
|
|
3475
|
+
readonly name: "";
|
|
3476
|
+
readonly type: "int256";
|
|
3477
|
+
}, {
|
|
3478
|
+
readonly internalType: "int256";
|
|
3479
|
+
readonly name: "";
|
|
3480
|
+
readonly type: "int256";
|
|
3481
|
+
}, {
|
|
3482
|
+
readonly internalType: "uint256";
|
|
3483
|
+
readonly name: "";
|
|
3484
|
+
readonly type: "uint256";
|
|
3485
|
+
}];
|
|
3486
|
+
readonly stateMutability: "view";
|
|
3487
|
+
readonly type: "function";
|
|
3488
|
+
}, {
|
|
3489
|
+
readonly inputs: readonly [{
|
|
3490
|
+
readonly internalType: "contract DataStore";
|
|
3491
|
+
readonly name: "dataStore";
|
|
3492
|
+
readonly type: "address";
|
|
3493
|
+
}, {
|
|
3494
|
+
readonly internalType: "bytes32";
|
|
3495
|
+
readonly name: "key";
|
|
3496
|
+
readonly type: "bytes32";
|
|
3497
|
+
}];
|
|
3498
|
+
readonly name: "getShift";
|
|
3499
|
+
readonly outputs: readonly [{
|
|
3500
|
+
readonly components: readonly [{
|
|
3501
|
+
readonly components: readonly [{
|
|
3502
|
+
readonly internalType: "address";
|
|
3503
|
+
readonly name: "account";
|
|
3504
|
+
readonly type: "address";
|
|
3505
|
+
}, {
|
|
3506
|
+
readonly internalType: "address";
|
|
3507
|
+
readonly name: "receiver";
|
|
3508
|
+
readonly type: "address";
|
|
3509
|
+
}, {
|
|
3510
|
+
readonly internalType: "address";
|
|
3511
|
+
readonly name: "callbackContract";
|
|
3512
|
+
readonly type: "address";
|
|
3513
|
+
}, {
|
|
3514
|
+
readonly internalType: "address";
|
|
3515
|
+
readonly name: "uiFeeReceiver";
|
|
3516
|
+
readonly type: "address";
|
|
3517
|
+
}, {
|
|
3518
|
+
readonly internalType: "address";
|
|
3519
|
+
readonly name: "fromMarket";
|
|
3520
|
+
readonly type: "address";
|
|
3521
|
+
}, {
|
|
3522
|
+
readonly internalType: "address";
|
|
3523
|
+
readonly name: "toMarket";
|
|
3524
|
+
readonly type: "address";
|
|
3525
|
+
}];
|
|
3526
|
+
readonly internalType: "struct Shift.Addresses";
|
|
3527
|
+
readonly name: "addresses";
|
|
3528
|
+
readonly type: "tuple";
|
|
3529
|
+
}, {
|
|
3530
|
+
readonly components: readonly [{
|
|
3531
|
+
readonly internalType: "uint256";
|
|
3532
|
+
readonly name: "marketTokenAmount";
|
|
3533
|
+
readonly type: "uint256";
|
|
3534
|
+
}, {
|
|
3535
|
+
readonly internalType: "uint256";
|
|
3536
|
+
readonly name: "minMarketTokens";
|
|
3537
|
+
readonly type: "uint256";
|
|
3538
|
+
}, {
|
|
3539
|
+
readonly internalType: "uint256";
|
|
3540
|
+
readonly name: "uiFeeFactor";
|
|
3541
|
+
readonly type: "uint256";
|
|
3542
|
+
}, {
|
|
3543
|
+
readonly internalType: "uint256";
|
|
3544
|
+
readonly name: "updatedAtTime";
|
|
3545
|
+
readonly type: "uint256";
|
|
3546
|
+
}, {
|
|
3547
|
+
readonly internalType: "uint256";
|
|
3548
|
+
readonly name: "executionFee";
|
|
3549
|
+
readonly type: "uint256";
|
|
3550
|
+
}, {
|
|
3551
|
+
readonly internalType: "uint256";
|
|
3552
|
+
readonly name: "callbackGasLimit";
|
|
3553
|
+
readonly type: "uint256";
|
|
3554
|
+
}, {
|
|
3555
|
+
readonly internalType: "uint256";
|
|
3556
|
+
readonly name: "srcChainId";
|
|
3557
|
+
readonly type: "uint256";
|
|
3558
|
+
}];
|
|
3559
|
+
readonly internalType: "struct Shift.Numbers";
|
|
3560
|
+
readonly name: "numbers";
|
|
3561
|
+
readonly type: "tuple";
|
|
3562
|
+
}, {
|
|
3563
|
+
readonly internalType: "bytes32[]";
|
|
3564
|
+
readonly name: "_dataList";
|
|
3565
|
+
readonly type: "bytes32[]";
|
|
3566
|
+
}];
|
|
3567
|
+
readonly internalType: "struct Shift.Props";
|
|
3568
|
+
readonly name: "";
|
|
3569
|
+
readonly type: "tuple";
|
|
3570
|
+
}];
|
|
3571
|
+
readonly stateMutability: "view";
|
|
3572
|
+
readonly type: "function";
|
|
3573
|
+
}, {
|
|
3574
|
+
readonly inputs: readonly [{
|
|
3575
|
+
readonly internalType: "contract DataStore";
|
|
3576
|
+
readonly name: "dataStore";
|
|
3577
|
+
readonly type: "address";
|
|
3578
|
+
}, {
|
|
3579
|
+
readonly components: readonly [{
|
|
3580
|
+
readonly internalType: "address";
|
|
3581
|
+
readonly name: "marketToken";
|
|
3582
|
+
readonly type: "address";
|
|
3583
|
+
}, {
|
|
3584
|
+
readonly internalType: "address";
|
|
3585
|
+
readonly name: "indexToken";
|
|
3586
|
+
readonly type: "address";
|
|
3587
|
+
}, {
|
|
3588
|
+
readonly internalType: "address";
|
|
3589
|
+
readonly name: "longToken";
|
|
3590
|
+
readonly type: "address";
|
|
3591
|
+
}, {
|
|
3592
|
+
readonly internalType: "address";
|
|
3593
|
+
readonly name: "shortToken";
|
|
3594
|
+
readonly type: "address";
|
|
3595
|
+
}];
|
|
3596
|
+
readonly internalType: "struct Market.Props";
|
|
3597
|
+
readonly name: "market";
|
|
3598
|
+
readonly type: "tuple";
|
|
3599
|
+
}, {
|
|
3600
|
+
readonly components: readonly [{
|
|
3601
|
+
readonly components: readonly [{
|
|
3602
|
+
readonly internalType: "uint256";
|
|
3603
|
+
readonly name: "min";
|
|
3604
|
+
readonly type: "uint256";
|
|
3605
|
+
}, {
|
|
3606
|
+
readonly internalType: "uint256";
|
|
3607
|
+
readonly name: "max";
|
|
3608
|
+
readonly type: "uint256";
|
|
3609
|
+
}];
|
|
3610
|
+
readonly internalType: "struct Price.Props";
|
|
3611
|
+
readonly name: "indexTokenPrice";
|
|
3612
|
+
readonly type: "tuple";
|
|
3613
|
+
}, {
|
|
3614
|
+
readonly components: readonly [{
|
|
3615
|
+
readonly internalType: "uint256";
|
|
3616
|
+
readonly name: "min";
|
|
3617
|
+
readonly type: "uint256";
|
|
3618
|
+
}, {
|
|
3619
|
+
readonly internalType: "uint256";
|
|
3620
|
+
readonly name: "max";
|
|
3621
|
+
readonly type: "uint256";
|
|
3622
|
+
}];
|
|
3623
|
+
readonly internalType: "struct Price.Props";
|
|
3624
|
+
readonly name: "longTokenPrice";
|
|
3625
|
+
readonly type: "tuple";
|
|
3626
|
+
}, {
|
|
3627
|
+
readonly components: readonly [{
|
|
3628
|
+
readonly internalType: "uint256";
|
|
3629
|
+
readonly name: "min";
|
|
3630
|
+
readonly type: "uint256";
|
|
3631
|
+
}, {
|
|
3632
|
+
readonly internalType: "uint256";
|
|
3633
|
+
readonly name: "max";
|
|
3634
|
+
readonly type: "uint256";
|
|
3635
|
+
}];
|
|
3636
|
+
readonly internalType: "struct Price.Props";
|
|
3637
|
+
readonly name: "shortTokenPrice";
|
|
3638
|
+
readonly type: "tuple";
|
|
3639
|
+
}];
|
|
3640
|
+
readonly internalType: "struct MarketUtils.MarketPrices";
|
|
3641
|
+
readonly name: "prices";
|
|
3642
|
+
readonly type: "tuple";
|
|
3643
|
+
}, {
|
|
3644
|
+
readonly internalType: "address";
|
|
3645
|
+
readonly name: "tokenIn";
|
|
3646
|
+
readonly type: "address";
|
|
3647
|
+
}, {
|
|
3648
|
+
readonly internalType: "uint256";
|
|
3649
|
+
readonly name: "amountIn";
|
|
3650
|
+
readonly type: "uint256";
|
|
3651
|
+
}, {
|
|
3652
|
+
readonly internalType: "address";
|
|
3653
|
+
readonly name: "uiFeeReceiver";
|
|
3654
|
+
readonly type: "address";
|
|
3655
|
+
}];
|
|
3656
|
+
readonly name: "getSwapAmountOut";
|
|
3657
|
+
readonly outputs: readonly [{
|
|
3658
|
+
readonly internalType: "uint256";
|
|
3659
|
+
readonly name: "";
|
|
3660
|
+
readonly type: "uint256";
|
|
3661
|
+
}, {
|
|
3662
|
+
readonly internalType: "int256";
|
|
3663
|
+
readonly name: "";
|
|
3664
|
+
readonly type: "int256";
|
|
3665
|
+
}, {
|
|
3666
|
+
readonly components: readonly [{
|
|
3667
|
+
readonly internalType: "uint256";
|
|
3668
|
+
readonly name: "feeReceiverAmount";
|
|
3669
|
+
readonly type: "uint256";
|
|
3670
|
+
}, {
|
|
3671
|
+
readonly internalType: "uint256";
|
|
3672
|
+
readonly name: "feeAmountForPool";
|
|
3673
|
+
readonly type: "uint256";
|
|
3674
|
+
}, {
|
|
3675
|
+
readonly internalType: "uint256";
|
|
3676
|
+
readonly name: "amountAfterFees";
|
|
3677
|
+
readonly type: "uint256";
|
|
3678
|
+
}, {
|
|
3679
|
+
readonly internalType: "address";
|
|
3680
|
+
readonly name: "uiFeeReceiver";
|
|
3681
|
+
readonly type: "address";
|
|
3682
|
+
}, {
|
|
3683
|
+
readonly internalType: "uint256";
|
|
3684
|
+
readonly name: "uiFeeReceiverFactor";
|
|
3685
|
+
readonly type: "uint256";
|
|
3686
|
+
}, {
|
|
3687
|
+
readonly internalType: "uint256";
|
|
3688
|
+
readonly name: "uiFeeAmount";
|
|
3689
|
+
readonly type: "uint256";
|
|
3690
|
+
}];
|
|
3691
|
+
readonly internalType: "struct SwapPricingUtils.SwapFees";
|
|
3692
|
+
readonly name: "fees";
|
|
3693
|
+
readonly type: "tuple";
|
|
3694
|
+
}];
|
|
3695
|
+
readonly stateMutability: "view";
|
|
3696
|
+
readonly type: "function";
|
|
3697
|
+
}, {
|
|
3698
|
+
readonly inputs: readonly [{
|
|
3699
|
+
readonly internalType: "contract DataStore";
|
|
3700
|
+
readonly name: "dataStore";
|
|
3701
|
+
readonly type: "address";
|
|
3702
|
+
}, {
|
|
3703
|
+
readonly internalType: "address";
|
|
3704
|
+
readonly name: "marketKey";
|
|
3705
|
+
readonly type: "address";
|
|
3706
|
+
}, {
|
|
3707
|
+
readonly internalType: "address";
|
|
3708
|
+
readonly name: "tokenIn";
|
|
3709
|
+
readonly type: "address";
|
|
3710
|
+
}, {
|
|
3711
|
+
readonly internalType: "address";
|
|
3712
|
+
readonly name: "tokenOut";
|
|
3713
|
+
readonly type: "address";
|
|
3714
|
+
}, {
|
|
3715
|
+
readonly internalType: "uint256";
|
|
3716
|
+
readonly name: "amountIn";
|
|
3717
|
+
readonly type: "uint256";
|
|
3718
|
+
}, {
|
|
3719
|
+
readonly components: readonly [{
|
|
3720
|
+
readonly internalType: "uint256";
|
|
3721
|
+
readonly name: "min";
|
|
3722
|
+
readonly type: "uint256";
|
|
3723
|
+
}, {
|
|
3724
|
+
readonly internalType: "uint256";
|
|
3725
|
+
readonly name: "max";
|
|
3726
|
+
readonly type: "uint256";
|
|
3727
|
+
}];
|
|
3728
|
+
readonly internalType: "struct Price.Props";
|
|
3729
|
+
readonly name: "tokenInPrice";
|
|
3730
|
+
readonly type: "tuple";
|
|
3731
|
+
}, {
|
|
3732
|
+
readonly components: readonly [{
|
|
3733
|
+
readonly internalType: "uint256";
|
|
3734
|
+
readonly name: "min";
|
|
3735
|
+
readonly type: "uint256";
|
|
3736
|
+
}, {
|
|
3737
|
+
readonly internalType: "uint256";
|
|
3738
|
+
readonly name: "max";
|
|
3739
|
+
readonly type: "uint256";
|
|
3740
|
+
}];
|
|
3741
|
+
readonly internalType: "struct Price.Props";
|
|
3742
|
+
readonly name: "tokenOutPrice";
|
|
3743
|
+
readonly type: "tuple";
|
|
3744
|
+
}];
|
|
3745
|
+
readonly name: "getSwapPriceImpact";
|
|
3746
|
+
readonly outputs: readonly [{
|
|
3747
|
+
readonly internalType: "int256";
|
|
3748
|
+
readonly name: "";
|
|
3749
|
+
readonly type: "int256";
|
|
3750
|
+
}, {
|
|
3751
|
+
readonly internalType: "int256";
|
|
3752
|
+
readonly name: "";
|
|
3753
|
+
readonly type: "int256";
|
|
3754
|
+
}, {
|
|
3755
|
+
readonly internalType: "int256";
|
|
3756
|
+
readonly name: "";
|
|
3757
|
+
readonly type: "int256";
|
|
3758
|
+
}];
|
|
3759
|
+
readonly stateMutability: "view";
|
|
3760
|
+
readonly type: "function";
|
|
3761
|
+
}, {
|
|
3762
|
+
readonly inputs: readonly [{
|
|
3763
|
+
readonly internalType: "contract DataStore";
|
|
3764
|
+
readonly name: "dataStore";
|
|
3765
|
+
readonly type: "address";
|
|
3766
|
+
}, {
|
|
3767
|
+
readonly internalType: "bytes32";
|
|
3768
|
+
readonly name: "key";
|
|
3769
|
+
readonly type: "bytes32";
|
|
3770
|
+
}];
|
|
3771
|
+
readonly name: "getWithdrawal";
|
|
3772
|
+
readonly outputs: readonly [{
|
|
3773
|
+
readonly components: readonly [{
|
|
3774
|
+
readonly components: readonly [{
|
|
3775
|
+
readonly internalType: "address";
|
|
3776
|
+
readonly name: "account";
|
|
3777
|
+
readonly type: "address";
|
|
3778
|
+
}, {
|
|
3779
|
+
readonly internalType: "address";
|
|
3780
|
+
readonly name: "receiver";
|
|
3781
|
+
readonly type: "address";
|
|
3782
|
+
}, {
|
|
3783
|
+
readonly internalType: "address";
|
|
3784
|
+
readonly name: "callbackContract";
|
|
3785
|
+
readonly type: "address";
|
|
3786
|
+
}, {
|
|
3787
|
+
readonly internalType: "address";
|
|
3788
|
+
readonly name: "uiFeeReceiver";
|
|
3789
|
+
readonly type: "address";
|
|
3790
|
+
}, {
|
|
3791
|
+
readonly internalType: "address";
|
|
3792
|
+
readonly name: "market";
|
|
3793
|
+
readonly type: "address";
|
|
3794
|
+
}, {
|
|
3795
|
+
readonly internalType: "address[]";
|
|
3796
|
+
readonly name: "longTokenSwapPath";
|
|
3797
|
+
readonly type: "address[]";
|
|
3798
|
+
}, {
|
|
3799
|
+
readonly internalType: "address[]";
|
|
3800
|
+
readonly name: "shortTokenSwapPath";
|
|
3801
|
+
readonly type: "address[]";
|
|
3802
|
+
}];
|
|
3803
|
+
readonly internalType: "struct Withdrawal.Addresses";
|
|
3804
|
+
readonly name: "addresses";
|
|
3805
|
+
readonly type: "tuple";
|
|
3806
|
+
}, {
|
|
3807
|
+
readonly components: readonly [{
|
|
3808
|
+
readonly internalType: "uint256";
|
|
3809
|
+
readonly name: "marketTokenAmount";
|
|
3810
|
+
readonly type: "uint256";
|
|
3811
|
+
}, {
|
|
3812
|
+
readonly internalType: "uint256";
|
|
3813
|
+
readonly name: "minLongTokenAmount";
|
|
3814
|
+
readonly type: "uint256";
|
|
3815
|
+
}, {
|
|
3816
|
+
readonly internalType: "uint256";
|
|
3817
|
+
readonly name: "minShortTokenAmount";
|
|
3818
|
+
readonly type: "uint256";
|
|
3819
|
+
}, {
|
|
3820
|
+
readonly internalType: "uint256";
|
|
3821
|
+
readonly name: "uiFeeFactor";
|
|
3822
|
+
readonly type: "uint256";
|
|
3823
|
+
}, {
|
|
3824
|
+
readonly internalType: "uint256";
|
|
3825
|
+
readonly name: "updatedAtTime";
|
|
3826
|
+
readonly type: "uint256";
|
|
3827
|
+
}, {
|
|
3828
|
+
readonly internalType: "uint256";
|
|
3829
|
+
readonly name: "executionFee";
|
|
3830
|
+
readonly type: "uint256";
|
|
3831
|
+
}, {
|
|
3832
|
+
readonly internalType: "uint256";
|
|
3833
|
+
readonly name: "callbackGasLimit";
|
|
3834
|
+
readonly type: "uint256";
|
|
3835
|
+
}, {
|
|
3836
|
+
readonly internalType: "uint256";
|
|
3837
|
+
readonly name: "srcChainId";
|
|
3838
|
+
readonly type: "uint256";
|
|
3839
|
+
}];
|
|
3840
|
+
readonly internalType: "struct Withdrawal.Numbers";
|
|
3841
|
+
readonly name: "numbers";
|
|
3842
|
+
readonly type: "tuple";
|
|
3843
|
+
}, {
|
|
3844
|
+
readonly components: readonly [{
|
|
3845
|
+
readonly internalType: "bool";
|
|
3846
|
+
readonly name: "shouldUnwrapNativeToken";
|
|
3847
|
+
readonly type: "bool";
|
|
3848
|
+
}];
|
|
3849
|
+
readonly internalType: "struct Withdrawal.Flags";
|
|
3850
|
+
readonly name: "flags";
|
|
3851
|
+
readonly type: "tuple";
|
|
3852
|
+
}, {
|
|
3853
|
+
readonly internalType: "bytes32[]";
|
|
3854
|
+
readonly name: "_dataList";
|
|
3855
|
+
readonly type: "bytes32[]";
|
|
3856
|
+
}];
|
|
3857
|
+
readonly internalType: "struct Withdrawal.Props";
|
|
3858
|
+
readonly name: "";
|
|
3859
|
+
readonly type: "tuple";
|
|
3860
|
+
}];
|
|
3861
|
+
readonly stateMutability: "view";
|
|
3862
|
+
readonly type: "function";
|
|
3863
|
+
}, {
|
|
3864
|
+
readonly inputs: readonly [{
|
|
3865
|
+
readonly internalType: "contract DataStore";
|
|
3866
|
+
readonly name: "dataStore";
|
|
3867
|
+
readonly type: "address";
|
|
3868
|
+
}, {
|
|
3869
|
+
readonly components: readonly [{
|
|
3870
|
+
readonly internalType: "address";
|
|
3871
|
+
readonly name: "marketToken";
|
|
3872
|
+
readonly type: "address";
|
|
3873
|
+
}, {
|
|
3874
|
+
readonly internalType: "address";
|
|
3875
|
+
readonly name: "indexToken";
|
|
3876
|
+
readonly type: "address";
|
|
3877
|
+
}, {
|
|
3878
|
+
readonly internalType: "address";
|
|
3879
|
+
readonly name: "longToken";
|
|
3880
|
+
readonly type: "address";
|
|
3881
|
+
}, {
|
|
3882
|
+
readonly internalType: "address";
|
|
3883
|
+
readonly name: "shortToken";
|
|
3884
|
+
readonly type: "address";
|
|
3885
|
+
}];
|
|
3886
|
+
readonly internalType: "struct Market.Props";
|
|
3887
|
+
readonly name: "market";
|
|
3888
|
+
readonly type: "tuple";
|
|
3889
|
+
}, {
|
|
3890
|
+
readonly components: readonly [{
|
|
3891
|
+
readonly components: readonly [{
|
|
3892
|
+
readonly internalType: "uint256";
|
|
3893
|
+
readonly name: "min";
|
|
3894
|
+
readonly type: "uint256";
|
|
3895
|
+
}, {
|
|
3896
|
+
readonly internalType: "uint256";
|
|
3897
|
+
readonly name: "max";
|
|
3898
|
+
readonly type: "uint256";
|
|
3899
|
+
}];
|
|
3900
|
+
readonly internalType: "struct Price.Props";
|
|
3901
|
+
readonly name: "indexTokenPrice";
|
|
3902
|
+
readonly type: "tuple";
|
|
3903
|
+
}, {
|
|
3904
|
+
readonly components: readonly [{
|
|
3905
|
+
readonly internalType: "uint256";
|
|
3906
|
+
readonly name: "min";
|
|
3907
|
+
readonly type: "uint256";
|
|
3908
|
+
}, {
|
|
3909
|
+
readonly internalType: "uint256";
|
|
3910
|
+
readonly name: "max";
|
|
3911
|
+
readonly type: "uint256";
|
|
3912
|
+
}];
|
|
3913
|
+
readonly internalType: "struct Price.Props";
|
|
3914
|
+
readonly name: "longTokenPrice";
|
|
3915
|
+
readonly type: "tuple";
|
|
3916
|
+
}, {
|
|
3917
|
+
readonly components: readonly [{
|
|
3918
|
+
readonly internalType: "uint256";
|
|
3919
|
+
readonly name: "min";
|
|
3920
|
+
readonly type: "uint256";
|
|
3921
|
+
}, {
|
|
3922
|
+
readonly internalType: "uint256";
|
|
3923
|
+
readonly name: "max";
|
|
3924
|
+
readonly type: "uint256";
|
|
3925
|
+
}];
|
|
3926
|
+
readonly internalType: "struct Price.Props";
|
|
3927
|
+
readonly name: "shortTokenPrice";
|
|
3928
|
+
readonly type: "tuple";
|
|
3929
|
+
}];
|
|
3930
|
+
readonly internalType: "struct MarketUtils.MarketPrices";
|
|
3931
|
+
readonly name: "prices";
|
|
3932
|
+
readonly type: "tuple";
|
|
3933
|
+
}, {
|
|
3934
|
+
readonly internalType: "uint256";
|
|
3935
|
+
readonly name: "marketTokenAmount";
|
|
3936
|
+
readonly type: "uint256";
|
|
3937
|
+
}, {
|
|
3938
|
+
readonly internalType: "address";
|
|
3939
|
+
readonly name: "uiFeeReceiver";
|
|
3940
|
+
readonly type: "address";
|
|
3941
|
+
}, {
|
|
3942
|
+
readonly internalType: "enum ISwapPricingUtils.SwapPricingType";
|
|
3943
|
+
readonly name: "swapPricingType";
|
|
3944
|
+
readonly type: "uint8";
|
|
3945
|
+
}];
|
|
3946
|
+
readonly name: "getWithdrawalAmountOut";
|
|
3947
|
+
readonly outputs: readonly [{
|
|
3948
|
+
readonly internalType: "uint256";
|
|
3949
|
+
readonly name: "";
|
|
3950
|
+
readonly type: "uint256";
|
|
3951
|
+
}, {
|
|
3952
|
+
readonly internalType: "uint256";
|
|
3953
|
+
readonly name: "";
|
|
3954
|
+
readonly type: "uint256";
|
|
3955
|
+
}];
|
|
3956
|
+
readonly stateMutability: "view";
|
|
3957
|
+
readonly type: "function";
|
|
3958
|
+
}, {
|
|
3959
|
+
readonly inputs: readonly [{
|
|
3960
|
+
readonly internalType: "contract DataStore";
|
|
3961
|
+
readonly name: "dataStore";
|
|
3962
|
+
readonly type: "address";
|
|
3963
|
+
}, {
|
|
3964
|
+
readonly internalType: "contract IReferralStorage";
|
|
3965
|
+
readonly name: "referralStorage";
|
|
3966
|
+
readonly type: "address";
|
|
3967
|
+
}, {
|
|
3968
|
+
readonly internalType: "bytes32";
|
|
3969
|
+
readonly name: "positionKey";
|
|
3970
|
+
readonly type: "bytes32";
|
|
3971
|
+
}, {
|
|
3972
|
+
readonly components: readonly [{
|
|
3973
|
+
readonly internalType: "address";
|
|
3974
|
+
readonly name: "marketToken";
|
|
3975
|
+
readonly type: "address";
|
|
3976
|
+
}, {
|
|
3977
|
+
readonly internalType: "address";
|
|
3978
|
+
readonly name: "indexToken";
|
|
3979
|
+
readonly type: "address";
|
|
3980
|
+
}, {
|
|
3981
|
+
readonly internalType: "address";
|
|
3982
|
+
readonly name: "longToken";
|
|
3983
|
+
readonly type: "address";
|
|
3984
|
+
}, {
|
|
3985
|
+
readonly internalType: "address";
|
|
3986
|
+
readonly name: "shortToken";
|
|
3987
|
+
readonly type: "address";
|
|
3988
|
+
}];
|
|
3989
|
+
readonly internalType: "struct Market.Props";
|
|
3990
|
+
readonly name: "market";
|
|
3991
|
+
readonly type: "tuple";
|
|
3992
|
+
}, {
|
|
3993
|
+
readonly components: readonly [{
|
|
3994
|
+
readonly components: readonly [{
|
|
3995
|
+
readonly internalType: "uint256";
|
|
3996
|
+
readonly name: "min";
|
|
3997
|
+
readonly type: "uint256";
|
|
3998
|
+
}, {
|
|
3999
|
+
readonly internalType: "uint256";
|
|
4000
|
+
readonly name: "max";
|
|
4001
|
+
readonly type: "uint256";
|
|
4002
|
+
}];
|
|
4003
|
+
readonly internalType: "struct Price.Props";
|
|
4004
|
+
readonly name: "indexTokenPrice";
|
|
4005
|
+
readonly type: "tuple";
|
|
4006
|
+
}, {
|
|
4007
|
+
readonly components: readonly [{
|
|
4008
|
+
readonly internalType: "uint256";
|
|
4009
|
+
readonly name: "min";
|
|
4010
|
+
readonly type: "uint256";
|
|
4011
|
+
}, {
|
|
4012
|
+
readonly internalType: "uint256";
|
|
4013
|
+
readonly name: "max";
|
|
4014
|
+
readonly type: "uint256";
|
|
4015
|
+
}];
|
|
4016
|
+
readonly internalType: "struct Price.Props";
|
|
4017
|
+
readonly name: "longTokenPrice";
|
|
4018
|
+
readonly type: "tuple";
|
|
4019
|
+
}, {
|
|
4020
|
+
readonly components: readonly [{
|
|
4021
|
+
readonly internalType: "uint256";
|
|
4022
|
+
readonly name: "min";
|
|
4023
|
+
readonly type: "uint256";
|
|
4024
|
+
}, {
|
|
4025
|
+
readonly internalType: "uint256";
|
|
4026
|
+
readonly name: "max";
|
|
4027
|
+
readonly type: "uint256";
|
|
4028
|
+
}];
|
|
4029
|
+
readonly internalType: "struct Price.Props";
|
|
4030
|
+
readonly name: "shortTokenPrice";
|
|
4031
|
+
readonly type: "tuple";
|
|
4032
|
+
}];
|
|
4033
|
+
readonly internalType: "struct MarketUtils.MarketPrices";
|
|
4034
|
+
readonly name: "prices";
|
|
4035
|
+
readonly type: "tuple";
|
|
4036
|
+
}, {
|
|
4037
|
+
readonly internalType: "bool";
|
|
4038
|
+
readonly name: "shouldValidateMinCollateralUsd";
|
|
4039
|
+
readonly type: "bool";
|
|
4040
|
+
}, {
|
|
4041
|
+
readonly internalType: "bool";
|
|
4042
|
+
readonly name: "forLiquidation";
|
|
4043
|
+
readonly type: "bool";
|
|
4044
|
+
}];
|
|
4045
|
+
readonly name: "isPositionLiquidatable";
|
|
4046
|
+
readonly outputs: readonly [{
|
|
4047
|
+
readonly internalType: "bool";
|
|
4048
|
+
readonly name: "";
|
|
4049
|
+
readonly type: "bool";
|
|
4050
|
+
}, {
|
|
4051
|
+
readonly internalType: "string";
|
|
4052
|
+
readonly name: "";
|
|
4053
|
+
readonly type: "string";
|
|
4054
|
+
}, {
|
|
4055
|
+
readonly components: readonly [{
|
|
4056
|
+
readonly internalType: "int256";
|
|
4057
|
+
readonly name: "remainingCollateralUsd";
|
|
4058
|
+
readonly type: "int256";
|
|
4059
|
+
}, {
|
|
4060
|
+
readonly internalType: "int256";
|
|
4061
|
+
readonly name: "minCollateralUsd";
|
|
4062
|
+
readonly type: "int256";
|
|
4063
|
+
}, {
|
|
4064
|
+
readonly internalType: "int256";
|
|
4065
|
+
readonly name: "minCollateralUsdForLeverage";
|
|
4066
|
+
readonly type: "int256";
|
|
4067
|
+
}];
|
|
4068
|
+
readonly internalType: "struct PositionUtils.IsPositionLiquidatableInfo";
|
|
4069
|
+
readonly name: "";
|
|
4070
|
+
readonly type: "tuple";
|
|
4071
|
+
}];
|
|
4072
|
+
readonly stateMutability: "view";
|
|
4073
|
+
readonly type: "function";
|
|
4074
|
+
}];
|
|
4075
|
+
export default _default;
|