@d8x/perpetuals-sdk 0.2.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/abi/central-park/IPerpetualManager.json +142 -12
- package/dist/cjs/abi/testnet/IPerpetualManager.json +667 -109
- package/dist/cjs/abi/zkevmTestnet/IPerpetualManager.json +667 -109
- package/dist/cjs/config/defaultConfig.json +0 -11
- package/dist/cjs/marketData.d.ts +20 -1
- package/dist/cjs/marketData.js +198 -103
- package/dist/cjs/marketData.js.map +1 -1
- package/dist/cjs/nodeSDKTypes.d.ts +3 -1
- package/dist/cjs/nodeSDKTypes.js +1 -1
- package/dist/cjs/nodeSDKTypes.js.map +1 -1
- package/dist/cjs/perpetualDataHandler.d.ts +23 -8
- package/dist/cjs/perpetualDataHandler.js +174 -186
- package/dist/cjs/perpetualDataHandler.js.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/abi/central-park/IPerpetualManager.json +142 -12
- package/dist/esm/abi/testnet/IPerpetualManager.json +667 -109
- package/dist/esm/abi/zkevmTestnet/IPerpetualManager.json +667 -109
- package/dist/esm/config/defaultConfig.json +0 -11
- package/dist/esm/marketData.d.ts +20 -1
- package/dist/esm/marketData.js +198 -103
- package/dist/esm/marketData.js.map +1 -1
- package/dist/esm/nodeSDKTypes.d.ts +3 -1
- package/dist/esm/nodeSDKTypes.js +1 -1
- package/dist/esm/nodeSDKTypes.js.map +1 -1
- package/dist/esm/perpetualDataHandler.d.ts +23 -8
- package/dist/esm/perpetualDataHandler.js +174 -186
- package/dist/esm/perpetualDataHandler.js.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/doc/d8x-perpetuals-sdk.md +93 -45
- package/doc/marketData.md +53 -20
- package/package.json +32 -32
|
@@ -2926,6 +2926,127 @@
|
|
|
2926
2926
|
"stateMutability": "view",
|
|
2927
2927
|
"type": "function"
|
|
2928
2928
|
},
|
|
2929
|
+
{
|
|
2930
|
+
"inputs": [
|
|
2931
|
+
{
|
|
2932
|
+
"internalType": "uint8",
|
|
2933
|
+
"name": "_poolIdFrom",
|
|
2934
|
+
"type": "uint8"
|
|
2935
|
+
},
|
|
2936
|
+
{
|
|
2937
|
+
"internalType": "uint8",
|
|
2938
|
+
"name": "_poolIdTo",
|
|
2939
|
+
"type": "uint8"
|
|
2940
|
+
}
|
|
2941
|
+
],
|
|
2942
|
+
"name": "getLiquidityPools",
|
|
2943
|
+
"outputs": [
|
|
2944
|
+
{
|
|
2945
|
+
"components": [
|
|
2946
|
+
{
|
|
2947
|
+
"internalType": "bool",
|
|
2948
|
+
"name": "isRunning",
|
|
2949
|
+
"type": "bool"
|
|
2950
|
+
},
|
|
2951
|
+
{
|
|
2952
|
+
"internalType": "uint8",
|
|
2953
|
+
"name": "iPerpetualCount",
|
|
2954
|
+
"type": "uint8"
|
|
2955
|
+
},
|
|
2956
|
+
{
|
|
2957
|
+
"internalType": "uint8",
|
|
2958
|
+
"name": "id",
|
|
2959
|
+
"type": "uint8"
|
|
2960
|
+
},
|
|
2961
|
+
{
|
|
2962
|
+
"internalType": "uint16",
|
|
2963
|
+
"name": "iTargetPoolSizeUpdateTime",
|
|
2964
|
+
"type": "uint16"
|
|
2965
|
+
},
|
|
2966
|
+
{
|
|
2967
|
+
"internalType": "address",
|
|
2968
|
+
"name": "marginTokenAddress",
|
|
2969
|
+
"type": "address"
|
|
2970
|
+
},
|
|
2971
|
+
{
|
|
2972
|
+
"internalType": "int128",
|
|
2973
|
+
"name": "fFundAllocationNormalizationCC",
|
|
2974
|
+
"type": "int128"
|
|
2975
|
+
},
|
|
2976
|
+
{
|
|
2977
|
+
"internalType": "int128",
|
|
2978
|
+
"name": "fDefaultFundCashCC",
|
|
2979
|
+
"type": "int128"
|
|
2980
|
+
},
|
|
2981
|
+
{
|
|
2982
|
+
"internalType": "uint64",
|
|
2983
|
+
"name": "prevAnchor",
|
|
2984
|
+
"type": "uint64"
|
|
2985
|
+
},
|
|
2986
|
+
{
|
|
2987
|
+
"internalType": "int32",
|
|
2988
|
+
"name": "fRedemptionRate",
|
|
2989
|
+
"type": "int32"
|
|
2990
|
+
},
|
|
2991
|
+
{
|
|
2992
|
+
"internalType": "address",
|
|
2993
|
+
"name": "shareTokenAddress",
|
|
2994
|
+
"type": "address"
|
|
2995
|
+
},
|
|
2996
|
+
{
|
|
2997
|
+
"internalType": "int128",
|
|
2998
|
+
"name": "fPnLparticipantsCashCC",
|
|
2999
|
+
"type": "int128"
|
|
3000
|
+
},
|
|
3001
|
+
{
|
|
3002
|
+
"internalType": "int128",
|
|
3003
|
+
"name": "fAMMFundCashCC",
|
|
3004
|
+
"type": "int128"
|
|
3005
|
+
},
|
|
3006
|
+
{
|
|
3007
|
+
"internalType": "int128",
|
|
3008
|
+
"name": "fTargetAMMFundSize",
|
|
3009
|
+
"type": "int128"
|
|
3010
|
+
},
|
|
3011
|
+
{
|
|
3012
|
+
"internalType": "int128",
|
|
3013
|
+
"name": "fTargetDFSize",
|
|
3014
|
+
"type": "int128"
|
|
3015
|
+
},
|
|
3016
|
+
{
|
|
3017
|
+
"internalType": "int128",
|
|
3018
|
+
"name": "fMaxTransferPerConvergencePeriod",
|
|
3019
|
+
"type": "int128"
|
|
3020
|
+
},
|
|
3021
|
+
{
|
|
3022
|
+
"internalType": "int128",
|
|
3023
|
+
"name": "fBrokerCollateralLotSize",
|
|
3024
|
+
"type": "int128"
|
|
3025
|
+
},
|
|
3026
|
+
{
|
|
3027
|
+
"internalType": "uint128",
|
|
3028
|
+
"name": "prevTokenAmount",
|
|
3029
|
+
"type": "uint128"
|
|
3030
|
+
},
|
|
3031
|
+
{
|
|
3032
|
+
"internalType": "uint128",
|
|
3033
|
+
"name": "nextTokenAmount",
|
|
3034
|
+
"type": "uint128"
|
|
3035
|
+
},
|
|
3036
|
+
{
|
|
3037
|
+
"internalType": "uint128",
|
|
3038
|
+
"name": "totalSupplyShareToken",
|
|
3039
|
+
"type": "uint128"
|
|
3040
|
+
}
|
|
3041
|
+
],
|
|
3042
|
+
"internalType": "struct PerpStorage.LiquidityPoolData[]",
|
|
3043
|
+
"name": "",
|
|
3044
|
+
"type": "tuple[]"
|
|
3045
|
+
}
|
|
3046
|
+
],
|
|
3047
|
+
"stateMutability": "view",
|
|
3048
|
+
"type": "function"
|
|
3049
|
+
},
|
|
2929
3050
|
{
|
|
2930
3051
|
"inputs": [
|
|
2931
3052
|
{
|
|
@@ -2959,32 +3080,408 @@
|
|
|
2959
3080
|
"type": "int128"
|
|
2960
3081
|
},
|
|
2961
3082
|
{
|
|
2962
|
-
"internalType": "int128",
|
|
2963
|
-
"name": "fUnitAccumulatedFundingStart",
|
|
2964
|
-
"type": "int128"
|
|
3083
|
+
"internalType": "int128",
|
|
3084
|
+
"name": "fUnitAccumulatedFundingStart",
|
|
3085
|
+
"type": "int128"
|
|
3086
|
+
},
|
|
3087
|
+
{
|
|
3088
|
+
"internalType": "uint64",
|
|
3089
|
+
"name": "iLastOpenTimestamp",
|
|
3090
|
+
"type": "uint64"
|
|
3091
|
+
},
|
|
3092
|
+
{
|
|
3093
|
+
"internalType": "uint16",
|
|
3094
|
+
"name": "feeTbps",
|
|
3095
|
+
"type": "uint16"
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
"internalType": "uint16",
|
|
3099
|
+
"name": "brokerFeeTbps",
|
|
3100
|
+
"type": "uint16"
|
|
3101
|
+
},
|
|
3102
|
+
{
|
|
3103
|
+
"internalType": "bytes16",
|
|
3104
|
+
"name": "positionId",
|
|
3105
|
+
"type": "bytes16"
|
|
3106
|
+
}
|
|
3107
|
+
],
|
|
3108
|
+
"internalType": "struct PerpStorage.MarginAccount",
|
|
3109
|
+
"name": "",
|
|
3110
|
+
"type": "tuple"
|
|
3111
|
+
}
|
|
3112
|
+
],
|
|
3113
|
+
"stateMutability": "view",
|
|
3114
|
+
"type": "function"
|
|
3115
|
+
},
|
|
3116
|
+
{
|
|
3117
|
+
"inputs": [
|
|
3118
|
+
{
|
|
3119
|
+
"internalType": "uint24",
|
|
3120
|
+
"name": "_perpetualId",
|
|
3121
|
+
"type": "uint24"
|
|
3122
|
+
},
|
|
3123
|
+
{
|
|
3124
|
+
"internalType": "int128",
|
|
3125
|
+
"name": "_fCurrentTraderPos",
|
|
3126
|
+
"type": "int128"
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
"internalType": "bool",
|
|
3130
|
+
"name": "_isBuy",
|
|
3131
|
+
"type": "bool"
|
|
3132
|
+
}
|
|
3133
|
+
],
|
|
3134
|
+
"name": "getMaxSignedOpenTradeSizeForPos",
|
|
3135
|
+
"outputs": [
|
|
3136
|
+
{
|
|
3137
|
+
"internalType": "int128",
|
|
3138
|
+
"name": "",
|
|
3139
|
+
"type": "int128"
|
|
3140
|
+
}
|
|
3141
|
+
],
|
|
3142
|
+
"stateMutability": "view",
|
|
3143
|
+
"type": "function"
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
"inputs": [],
|
|
3147
|
+
"name": "getOracleFactory",
|
|
3148
|
+
"outputs": [
|
|
3149
|
+
{
|
|
3150
|
+
"internalType": "address",
|
|
3151
|
+
"name": "",
|
|
3152
|
+
"type": "address"
|
|
3153
|
+
}
|
|
3154
|
+
],
|
|
3155
|
+
"stateMutability": "view",
|
|
3156
|
+
"type": "function"
|
|
3157
|
+
},
|
|
3158
|
+
{
|
|
3159
|
+
"inputs": [
|
|
3160
|
+
{
|
|
3161
|
+
"internalType": "bytes4[2]",
|
|
3162
|
+
"name": "_baseQuote",
|
|
3163
|
+
"type": "bytes4[2]"
|
|
3164
|
+
}
|
|
3165
|
+
],
|
|
3166
|
+
"name": "getOraclePrice",
|
|
3167
|
+
"outputs": [
|
|
3168
|
+
{
|
|
3169
|
+
"internalType": "int128",
|
|
3170
|
+
"name": "fPrice",
|
|
3171
|
+
"type": "int128"
|
|
3172
|
+
}
|
|
3173
|
+
],
|
|
3174
|
+
"stateMutability": "view",
|
|
3175
|
+
"type": "function"
|
|
3176
|
+
},
|
|
3177
|
+
{
|
|
3178
|
+
"inputs": [
|
|
3179
|
+
{
|
|
3180
|
+
"internalType": "uint24",
|
|
3181
|
+
"name": "_perpetualId",
|
|
3182
|
+
"type": "uint24"
|
|
3183
|
+
}
|
|
3184
|
+
],
|
|
3185
|
+
"name": "getOrderBookAddress",
|
|
3186
|
+
"outputs": [
|
|
3187
|
+
{
|
|
3188
|
+
"internalType": "address",
|
|
3189
|
+
"name": "",
|
|
3190
|
+
"type": "address"
|
|
3191
|
+
}
|
|
3192
|
+
],
|
|
3193
|
+
"stateMutability": "view",
|
|
3194
|
+
"type": "function"
|
|
3195
|
+
},
|
|
3196
|
+
{
|
|
3197
|
+
"inputs": [],
|
|
3198
|
+
"name": "getOrderBookFactoryAddress",
|
|
3199
|
+
"outputs": [
|
|
3200
|
+
{
|
|
3201
|
+
"internalType": "address",
|
|
3202
|
+
"name": "",
|
|
3203
|
+
"type": "address"
|
|
3204
|
+
}
|
|
3205
|
+
],
|
|
3206
|
+
"stateMutability": "view",
|
|
3207
|
+
"type": "function"
|
|
3208
|
+
},
|
|
3209
|
+
{
|
|
3210
|
+
"inputs": [
|
|
3211
|
+
{
|
|
3212
|
+
"internalType": "uint24",
|
|
3213
|
+
"name": "_perpetualId",
|
|
3214
|
+
"type": "uint24"
|
|
3215
|
+
}
|
|
3216
|
+
],
|
|
3217
|
+
"name": "getPerpetual",
|
|
3218
|
+
"outputs": [
|
|
3219
|
+
{
|
|
3220
|
+
"components": [
|
|
3221
|
+
{
|
|
3222
|
+
"internalType": "uint8",
|
|
3223
|
+
"name": "poolId",
|
|
3224
|
+
"type": "uint8"
|
|
3225
|
+
},
|
|
3226
|
+
{
|
|
3227
|
+
"internalType": "uint24",
|
|
3228
|
+
"name": "id",
|
|
3229
|
+
"type": "uint24"
|
|
3230
|
+
},
|
|
3231
|
+
{
|
|
3232
|
+
"internalType": "int32",
|
|
3233
|
+
"name": "fInitialMarginRate",
|
|
3234
|
+
"type": "int32"
|
|
3235
|
+
},
|
|
3236
|
+
{
|
|
3237
|
+
"internalType": "int32",
|
|
3238
|
+
"name": "fMaintenanceMarginRate",
|
|
3239
|
+
"type": "int32"
|
|
3240
|
+
},
|
|
3241
|
+
{
|
|
3242
|
+
"internalType": "int32",
|
|
3243
|
+
"name": "fSigma2",
|
|
3244
|
+
"type": "int32"
|
|
3245
|
+
},
|
|
3246
|
+
{
|
|
3247
|
+
"internalType": "uint64",
|
|
3248
|
+
"name": "iLastFundingTime",
|
|
3249
|
+
"type": "uint64"
|
|
3250
|
+
},
|
|
3251
|
+
{
|
|
3252
|
+
"internalType": "uint64",
|
|
3253
|
+
"name": "iLastSettlementPriceUpdateTimestamp",
|
|
3254
|
+
"type": "uint64"
|
|
3255
|
+
},
|
|
3256
|
+
{
|
|
3257
|
+
"internalType": "enum PerpStorage.PerpetualState",
|
|
3258
|
+
"name": "state",
|
|
3259
|
+
"type": "uint8"
|
|
3260
|
+
},
|
|
3261
|
+
{
|
|
3262
|
+
"internalType": "enum AMMPerpLogic.CollateralCurrency",
|
|
3263
|
+
"name": "eCollateralCurrency",
|
|
3264
|
+
"type": "uint8"
|
|
3265
|
+
},
|
|
3266
|
+
{
|
|
3267
|
+
"internalType": "uint16",
|
|
3268
|
+
"name": "minimalSpreadTbps",
|
|
3269
|
+
"type": "uint16"
|
|
3270
|
+
},
|
|
3271
|
+
{
|
|
3272
|
+
"internalType": "uint16",
|
|
3273
|
+
"name": "incentiveSpreadTbps",
|
|
3274
|
+
"type": "uint16"
|
|
3275
|
+
},
|
|
3276
|
+
{
|
|
3277
|
+
"internalType": "uint16",
|
|
3278
|
+
"name": "jumpSpreadTbps",
|
|
3279
|
+
"type": "uint16"
|
|
3280
|
+
},
|
|
3281
|
+
{
|
|
3282
|
+
"internalType": "uint16",
|
|
3283
|
+
"name": "liquidationPenaltyRateTbps",
|
|
3284
|
+
"type": "uint16"
|
|
3285
|
+
},
|
|
3286
|
+
{
|
|
3287
|
+
"internalType": "int32",
|
|
3288
|
+
"name": "fSigma3",
|
|
3289
|
+
"type": "int32"
|
|
3290
|
+
},
|
|
3291
|
+
{
|
|
3292
|
+
"internalType": "bytes4",
|
|
3293
|
+
"name": "S2BaseCCY",
|
|
3294
|
+
"type": "bytes4"
|
|
3295
|
+
},
|
|
3296
|
+
{
|
|
3297
|
+
"internalType": "bytes4",
|
|
3298
|
+
"name": "S2QuoteCCY",
|
|
3299
|
+
"type": "bytes4"
|
|
3300
|
+
},
|
|
3301
|
+
{
|
|
3302
|
+
"internalType": "bytes4",
|
|
3303
|
+
"name": "S3BaseCCY",
|
|
3304
|
+
"type": "bytes4"
|
|
3305
|
+
},
|
|
3306
|
+
{
|
|
3307
|
+
"internalType": "bytes4",
|
|
3308
|
+
"name": "S3QuoteCCY",
|
|
3309
|
+
"type": "bytes4"
|
|
3310
|
+
},
|
|
3311
|
+
{
|
|
3312
|
+
"components": [
|
|
3313
|
+
{
|
|
3314
|
+
"internalType": "int128",
|
|
3315
|
+
"name": "fPrice",
|
|
3316
|
+
"type": "int128"
|
|
3317
|
+
},
|
|
3318
|
+
{
|
|
3319
|
+
"internalType": "uint64",
|
|
3320
|
+
"name": "time",
|
|
3321
|
+
"type": "uint64"
|
|
3322
|
+
}
|
|
3323
|
+
],
|
|
3324
|
+
"internalType": "struct PerpStorage.OraclePriceData",
|
|
3325
|
+
"name": "currentMarkPremiumRate",
|
|
3326
|
+
"type": "tuple"
|
|
3327
|
+
},
|
|
3328
|
+
{
|
|
3329
|
+
"internalType": "int128[2]",
|
|
3330
|
+
"name": "fDFLambda",
|
|
3331
|
+
"type": "int128[2]"
|
|
3332
|
+
},
|
|
3333
|
+
{
|
|
3334
|
+
"internalType": "int128[2]",
|
|
3335
|
+
"name": "fCurrentAMMExposureEMA",
|
|
3336
|
+
"type": "int128[2]"
|
|
3337
|
+
},
|
|
3338
|
+
{
|
|
3339
|
+
"internalType": "int128[2]",
|
|
3340
|
+
"name": "fAMMTargetDD",
|
|
3341
|
+
"type": "int128[2]"
|
|
3342
|
+
},
|
|
3343
|
+
{
|
|
3344
|
+
"internalType": "int128[2]",
|
|
3345
|
+
"name": "fStressReturnS2",
|
|
3346
|
+
"type": "int128[2]"
|
|
3347
|
+
},
|
|
3348
|
+
{
|
|
3349
|
+
"internalType": "int128[2]",
|
|
3350
|
+
"name": "fStressReturnS3",
|
|
3351
|
+
"type": "int128[2]"
|
|
3352
|
+
},
|
|
3353
|
+
{
|
|
3354
|
+
"internalType": "int128",
|
|
3355
|
+
"name": "premiumRatesEMA",
|
|
3356
|
+
"type": "int128"
|
|
3357
|
+
},
|
|
3358
|
+
{
|
|
3359
|
+
"internalType": "int128",
|
|
3360
|
+
"name": "fTargetDFSize",
|
|
3361
|
+
"type": "int128"
|
|
3362
|
+
},
|
|
3363
|
+
{
|
|
3364
|
+
"internalType": "int128",
|
|
3365
|
+
"name": "fFundAllocationWeightCC",
|
|
3366
|
+
"type": "int128"
|
|
3367
|
+
},
|
|
3368
|
+
{
|
|
3369
|
+
"internalType": "int128",
|
|
3370
|
+
"name": "fOpenInterest",
|
|
3371
|
+
"type": "int128"
|
|
3372
|
+
},
|
|
3373
|
+
{
|
|
3374
|
+
"internalType": "int128",
|
|
3375
|
+
"name": "fTargetAMMFundSize",
|
|
3376
|
+
"type": "int128"
|
|
3377
|
+
},
|
|
3378
|
+
{
|
|
3379
|
+
"internalType": "int128",
|
|
3380
|
+
"name": "fCurrentTraderExposureEMA",
|
|
3381
|
+
"type": "int128"
|
|
3382
|
+
},
|
|
3383
|
+
{
|
|
3384
|
+
"internalType": "int128",
|
|
3385
|
+
"name": "fCurrentFundingRate",
|
|
3386
|
+
"type": "int128"
|
|
3387
|
+
},
|
|
3388
|
+
{
|
|
3389
|
+
"internalType": "int128",
|
|
3390
|
+
"name": "fUnitAccumulatedFunding",
|
|
3391
|
+
"type": "int128"
|
|
3392
|
+
},
|
|
3393
|
+
{
|
|
3394
|
+
"internalType": "int128",
|
|
3395
|
+
"name": "fLotSizeBC",
|
|
3396
|
+
"type": "int128"
|
|
3397
|
+
},
|
|
3398
|
+
{
|
|
3399
|
+
"internalType": "int128",
|
|
3400
|
+
"name": "fkStar",
|
|
3401
|
+
"type": "int128"
|
|
3402
|
+
},
|
|
3403
|
+
{
|
|
3404
|
+
"internalType": "int128",
|
|
3405
|
+
"name": "fAMMFundCashCC",
|
|
3406
|
+
"type": "int128"
|
|
3407
|
+
},
|
|
3408
|
+
{
|
|
3409
|
+
"internalType": "int128",
|
|
3410
|
+
"name": "fAMMMinSizeCC",
|
|
3411
|
+
"type": "int128"
|
|
3412
|
+
},
|
|
3413
|
+
{
|
|
3414
|
+
"internalType": "int128",
|
|
3415
|
+
"name": "fMinimalTraderExposureEMA",
|
|
3416
|
+
"type": "int128"
|
|
3417
|
+
},
|
|
3418
|
+
{
|
|
3419
|
+
"internalType": "int128",
|
|
3420
|
+
"name": "fMinimalAMMExposureEMA",
|
|
3421
|
+
"type": "int128"
|
|
3422
|
+
},
|
|
3423
|
+
{
|
|
3424
|
+
"internalType": "int128",
|
|
3425
|
+
"name": "fTotalMarginBalance",
|
|
3426
|
+
"type": "int128"
|
|
3427
|
+
},
|
|
3428
|
+
{
|
|
3429
|
+
"internalType": "int128",
|
|
3430
|
+
"name": "fSettlementS3PriceData",
|
|
3431
|
+
"type": "int128"
|
|
3432
|
+
},
|
|
3433
|
+
{
|
|
3434
|
+
"internalType": "int128",
|
|
3435
|
+
"name": "fReferralRebateCC",
|
|
3436
|
+
"type": "int128"
|
|
3437
|
+
},
|
|
3438
|
+
{
|
|
3439
|
+
"internalType": "int128",
|
|
3440
|
+
"name": "fSettlementS2PriceData",
|
|
3441
|
+
"type": "int128"
|
|
3442
|
+
},
|
|
3443
|
+
{
|
|
3444
|
+
"internalType": "uint64",
|
|
3445
|
+
"name": "iLastPriceJumpTimestamp",
|
|
3446
|
+
"type": "uint64"
|
|
3447
|
+
},
|
|
3448
|
+
{
|
|
3449
|
+
"internalType": "uint64",
|
|
3450
|
+
"name": "iLastDefaultFundTransfer",
|
|
3451
|
+
"type": "uint64"
|
|
2965
3452
|
},
|
|
2966
3453
|
{
|
|
2967
3454
|
"internalType": "uint64",
|
|
2968
|
-
"name": "
|
|
3455
|
+
"name": "iLastTargetPoolSizeTime",
|
|
2969
3456
|
"type": "uint64"
|
|
2970
3457
|
},
|
|
2971
3458
|
{
|
|
2972
|
-
"internalType": "
|
|
2973
|
-
"name": "
|
|
2974
|
-
"type": "
|
|
3459
|
+
"internalType": "int32",
|
|
3460
|
+
"name": "fMarkPriceEMALambda",
|
|
3461
|
+
"type": "int32"
|
|
2975
3462
|
},
|
|
2976
3463
|
{
|
|
2977
|
-
"internalType": "
|
|
2978
|
-
"name": "
|
|
2979
|
-
"type": "
|
|
3464
|
+
"internalType": "int32",
|
|
3465
|
+
"name": "fFundingRateClamp",
|
|
3466
|
+
"type": "int32"
|
|
2980
3467
|
},
|
|
2981
3468
|
{
|
|
2982
|
-
"internalType": "
|
|
2983
|
-
"name": "
|
|
2984
|
-
"type": "
|
|
3469
|
+
"internalType": "int32",
|
|
3470
|
+
"name": "fMaximalTradeSizeBumpUp",
|
|
3471
|
+
"type": "int32"
|
|
3472
|
+
},
|
|
3473
|
+
{
|
|
3474
|
+
"internalType": "int32",
|
|
3475
|
+
"name": "fRho23",
|
|
3476
|
+
"type": "int32"
|
|
3477
|
+
},
|
|
3478
|
+
{
|
|
3479
|
+
"internalType": "int32",
|
|
3480
|
+
"name": "fDFCoverNRate",
|
|
3481
|
+
"type": "int32"
|
|
2985
3482
|
}
|
|
2986
3483
|
],
|
|
2987
|
-
"internalType": "struct PerpStorage.
|
|
3484
|
+
"internalType": "struct PerpStorage.PerpetualData",
|
|
2988
3485
|
"name": "",
|
|
2989
3486
|
"type": "tuple"
|
|
2990
3487
|
}
|
|
@@ -2995,40 +3492,17 @@
|
|
|
2995
3492
|
{
|
|
2996
3493
|
"inputs": [
|
|
2997
3494
|
{
|
|
2998
|
-
"internalType": "
|
|
2999
|
-
"name": "
|
|
3000
|
-
"type": "
|
|
3001
|
-
},
|
|
3002
|
-
{
|
|
3003
|
-
"internalType": "int128",
|
|
3004
|
-
"name": "_fCurrentTraderPos",
|
|
3005
|
-
"type": "int128"
|
|
3006
|
-
},
|
|
3007
|
-
{
|
|
3008
|
-
"internalType": "bool",
|
|
3009
|
-
"name": "_isBuy",
|
|
3010
|
-
"type": "bool"
|
|
3011
|
-
}
|
|
3012
|
-
],
|
|
3013
|
-
"name": "getMaxSignedOpenTradeSizeForPos",
|
|
3014
|
-
"outputs": [
|
|
3015
|
-
{
|
|
3016
|
-
"internalType": "int128",
|
|
3017
|
-
"name": "",
|
|
3018
|
-
"type": "int128"
|
|
3495
|
+
"internalType": "uint8",
|
|
3496
|
+
"name": "_poolId",
|
|
3497
|
+
"type": "uint8"
|
|
3019
3498
|
}
|
|
3020
3499
|
],
|
|
3021
|
-
"
|
|
3022
|
-
"type": "function"
|
|
3023
|
-
},
|
|
3024
|
-
{
|
|
3025
|
-
"inputs": [],
|
|
3026
|
-
"name": "getOracleFactory",
|
|
3500
|
+
"name": "getPerpetualCountInPool",
|
|
3027
3501
|
"outputs": [
|
|
3028
3502
|
{
|
|
3029
|
-
"internalType": "
|
|
3503
|
+
"internalType": "uint8",
|
|
3030
3504
|
"name": "",
|
|
3031
|
-
"type": "
|
|
3505
|
+
"type": "uint8"
|
|
3032
3506
|
}
|
|
3033
3507
|
],
|
|
3034
3508
|
"stateMutability": "view",
|
|
@@ -3037,17 +3511,22 @@
|
|
|
3037
3511
|
{
|
|
3038
3512
|
"inputs": [
|
|
3039
3513
|
{
|
|
3040
|
-
"internalType": "
|
|
3041
|
-
"name": "
|
|
3042
|
-
"type": "
|
|
3514
|
+
"internalType": "uint8",
|
|
3515
|
+
"name": "_poolId",
|
|
3516
|
+
"type": "uint8"
|
|
3517
|
+
},
|
|
3518
|
+
{
|
|
3519
|
+
"internalType": "uint8",
|
|
3520
|
+
"name": "_perpetualIndex",
|
|
3521
|
+
"type": "uint8"
|
|
3043
3522
|
}
|
|
3044
3523
|
],
|
|
3045
|
-
"name": "
|
|
3524
|
+
"name": "getPerpetualId",
|
|
3046
3525
|
"outputs": [
|
|
3047
3526
|
{
|
|
3048
|
-
"internalType": "
|
|
3049
|
-
"name": "
|
|
3050
|
-
"type": "
|
|
3527
|
+
"internalType": "uint24",
|
|
3528
|
+
"name": "",
|
|
3529
|
+
"type": "uint24"
|
|
3051
3530
|
}
|
|
3052
3531
|
],
|
|
3053
3532
|
"stateMutability": "view",
|
|
@@ -3056,30 +3535,89 @@
|
|
|
3056
3535
|
{
|
|
3057
3536
|
"inputs": [
|
|
3058
3537
|
{
|
|
3059
|
-
"internalType": "uint24",
|
|
3060
|
-
"name": "
|
|
3061
|
-
"type": "uint24"
|
|
3062
|
-
}
|
|
3063
|
-
],
|
|
3064
|
-
"name": "getOrderBookAddress",
|
|
3065
|
-
"outputs": [
|
|
3066
|
-
{
|
|
3067
|
-
"internalType": "address",
|
|
3068
|
-
"name": "",
|
|
3069
|
-
"type": "address"
|
|
3538
|
+
"internalType": "uint24[]",
|
|
3539
|
+
"name": "perpetualIds",
|
|
3540
|
+
"type": "uint24[]"
|
|
3070
3541
|
}
|
|
3071
3542
|
],
|
|
3072
|
-
"
|
|
3073
|
-
"type": "function"
|
|
3074
|
-
},
|
|
3075
|
-
{
|
|
3076
|
-
"inputs": [],
|
|
3077
|
-
"name": "getOrderBookFactoryAddress",
|
|
3543
|
+
"name": "getPerpetualStaticInfo",
|
|
3078
3544
|
"outputs": [
|
|
3079
3545
|
{
|
|
3080
|
-
"
|
|
3546
|
+
"components": [
|
|
3547
|
+
{
|
|
3548
|
+
"internalType": "uint24",
|
|
3549
|
+
"name": "id",
|
|
3550
|
+
"type": "uint24"
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
"internalType": "address",
|
|
3554
|
+
"name": "limitOrderBookAddr",
|
|
3555
|
+
"type": "address"
|
|
3556
|
+
},
|
|
3557
|
+
{
|
|
3558
|
+
"internalType": "int128",
|
|
3559
|
+
"name": "fInitialMarginRate",
|
|
3560
|
+
"type": "int128"
|
|
3561
|
+
},
|
|
3562
|
+
{
|
|
3563
|
+
"internalType": "int128",
|
|
3564
|
+
"name": "fMaintenanceMarginRate",
|
|
3565
|
+
"type": "int128"
|
|
3566
|
+
},
|
|
3567
|
+
{
|
|
3568
|
+
"internalType": "uint8",
|
|
3569
|
+
"name": "perpetualState",
|
|
3570
|
+
"type": "uint8"
|
|
3571
|
+
},
|
|
3572
|
+
{
|
|
3573
|
+
"internalType": "enum AMMPerpLogic.CollateralCurrency",
|
|
3574
|
+
"name": "collCurrencyType",
|
|
3575
|
+
"type": "uint8"
|
|
3576
|
+
},
|
|
3577
|
+
{
|
|
3578
|
+
"internalType": "bytes4",
|
|
3579
|
+
"name": "S2BaseCCY",
|
|
3580
|
+
"type": "bytes4"
|
|
3581
|
+
},
|
|
3582
|
+
{
|
|
3583
|
+
"internalType": "bytes4",
|
|
3584
|
+
"name": "S2QuoteCCY",
|
|
3585
|
+
"type": "bytes4"
|
|
3586
|
+
},
|
|
3587
|
+
{
|
|
3588
|
+
"internalType": "bytes4",
|
|
3589
|
+
"name": "S3BaseCCY",
|
|
3590
|
+
"type": "bytes4"
|
|
3591
|
+
},
|
|
3592
|
+
{
|
|
3593
|
+
"internalType": "bytes4",
|
|
3594
|
+
"name": "S3QuoteCCY",
|
|
3595
|
+
"type": "bytes4"
|
|
3596
|
+
},
|
|
3597
|
+
{
|
|
3598
|
+
"internalType": "int128",
|
|
3599
|
+
"name": "fLotSizeBC",
|
|
3600
|
+
"type": "int128"
|
|
3601
|
+
},
|
|
3602
|
+
{
|
|
3603
|
+
"internalType": "int128",
|
|
3604
|
+
"name": "fReferralRebateCC",
|
|
3605
|
+
"type": "int128"
|
|
3606
|
+
},
|
|
3607
|
+
{
|
|
3608
|
+
"internalType": "bytes32[]",
|
|
3609
|
+
"name": "priceIds",
|
|
3610
|
+
"type": "bytes32[]"
|
|
3611
|
+
},
|
|
3612
|
+
{
|
|
3613
|
+
"internalType": "bool[]",
|
|
3614
|
+
"name": "isPyth",
|
|
3615
|
+
"type": "bool[]"
|
|
3616
|
+
}
|
|
3617
|
+
],
|
|
3618
|
+
"internalType": "struct IPerpetualGetter.PerpetualStaticInfo[]",
|
|
3081
3619
|
"name": "",
|
|
3082
|
-
"type": "
|
|
3620
|
+
"type": "tuple[]"
|
|
3083
3621
|
}
|
|
3084
3622
|
],
|
|
3085
3623
|
"stateMutability": "view",
|
|
@@ -3088,12 +3626,12 @@
|
|
|
3088
3626
|
{
|
|
3089
3627
|
"inputs": [
|
|
3090
3628
|
{
|
|
3091
|
-
"internalType": "uint24",
|
|
3092
|
-
"name": "
|
|
3093
|
-
"type": "uint24"
|
|
3629
|
+
"internalType": "uint24[]",
|
|
3630
|
+
"name": "perpetualIds",
|
|
3631
|
+
"type": "uint24[]"
|
|
3094
3632
|
}
|
|
3095
3633
|
],
|
|
3096
|
-
"name": "
|
|
3634
|
+
"name": "getPerpetuals",
|
|
3097
3635
|
"outputs": [
|
|
3098
3636
|
{
|
|
3099
3637
|
"components": [
|
|
@@ -3360,23 +3898,17 @@
|
|
|
3360
3898
|
"type": "int32"
|
|
3361
3899
|
}
|
|
3362
3900
|
],
|
|
3363
|
-
"internalType": "struct PerpStorage.PerpetualData",
|
|
3901
|
+
"internalType": "struct PerpStorage.PerpetualData[]",
|
|
3364
3902
|
"name": "",
|
|
3365
|
-
"type": "tuple"
|
|
3903
|
+
"type": "tuple[]"
|
|
3366
3904
|
}
|
|
3367
3905
|
],
|
|
3368
3906
|
"stateMutability": "view",
|
|
3369
3907
|
"type": "function"
|
|
3370
3908
|
},
|
|
3371
3909
|
{
|
|
3372
|
-
"inputs": [
|
|
3373
|
-
|
|
3374
|
-
"internalType": "uint8",
|
|
3375
|
-
"name": "_poolId",
|
|
3376
|
-
"type": "uint8"
|
|
3377
|
-
}
|
|
3378
|
-
],
|
|
3379
|
-
"name": "getPerpetualCountInPool",
|
|
3910
|
+
"inputs": [],
|
|
3911
|
+
"name": "getPoolCount",
|
|
3380
3912
|
"outputs": [
|
|
3381
3913
|
{
|
|
3382
3914
|
"internalType": "uint8",
|
|
@@ -3389,31 +3921,13 @@
|
|
|
3389
3921
|
},
|
|
3390
3922
|
{
|
|
3391
3923
|
"inputs": [
|
|
3392
|
-
{
|
|
3393
|
-
"internalType": "uint8",
|
|
3394
|
-
"name": "_poolId",
|
|
3395
|
-
"type": "uint8"
|
|
3396
|
-
},
|
|
3397
|
-
{
|
|
3398
|
-
"internalType": "uint8",
|
|
3399
|
-
"name": "_perpetualIndex",
|
|
3400
|
-
"type": "uint8"
|
|
3401
|
-
}
|
|
3402
|
-
],
|
|
3403
|
-
"name": "getPerpetualId",
|
|
3404
|
-
"outputs": [
|
|
3405
3924
|
{
|
|
3406
3925
|
"internalType": "uint24",
|
|
3407
|
-
"name": "",
|
|
3926
|
+
"name": "_perpetualId",
|
|
3408
3927
|
"type": "uint24"
|
|
3409
3928
|
}
|
|
3410
3929
|
],
|
|
3411
|
-
"
|
|
3412
|
-
"type": "function"
|
|
3413
|
-
},
|
|
3414
|
-
{
|
|
3415
|
-
"inputs": [],
|
|
3416
|
-
"name": "getPoolCount",
|
|
3930
|
+
"name": "getPoolIdByPerpetualId",
|
|
3417
3931
|
"outputs": [
|
|
3418
3932
|
{
|
|
3419
3933
|
"internalType": "uint8",
|
|
@@ -3427,17 +3941,37 @@
|
|
|
3427
3941
|
{
|
|
3428
3942
|
"inputs": [
|
|
3429
3943
|
{
|
|
3430
|
-
"internalType": "
|
|
3431
|
-
"name": "
|
|
3432
|
-
"type": "
|
|
3944
|
+
"internalType": "uint8",
|
|
3945
|
+
"name": "_poolFromIdx",
|
|
3946
|
+
"type": "uint8"
|
|
3947
|
+
},
|
|
3948
|
+
{
|
|
3949
|
+
"internalType": "uint8",
|
|
3950
|
+
"name": "_poolToIdx",
|
|
3951
|
+
"type": "uint8"
|
|
3433
3952
|
}
|
|
3434
3953
|
],
|
|
3435
|
-
"name": "
|
|
3954
|
+
"name": "getPoolStaticInfo",
|
|
3436
3955
|
"outputs": [
|
|
3437
3956
|
{
|
|
3438
|
-
"internalType": "
|
|
3957
|
+
"internalType": "uint24[][]",
|
|
3439
3958
|
"name": "",
|
|
3440
|
-
"type": "
|
|
3959
|
+
"type": "uint24[][]"
|
|
3960
|
+
},
|
|
3961
|
+
{
|
|
3962
|
+
"internalType": "address[]",
|
|
3963
|
+
"name": "",
|
|
3964
|
+
"type": "address[]"
|
|
3965
|
+
},
|
|
3966
|
+
{
|
|
3967
|
+
"internalType": "address[]",
|
|
3968
|
+
"name": "",
|
|
3969
|
+
"type": "address[]"
|
|
3970
|
+
},
|
|
3971
|
+
{
|
|
3972
|
+
"internalType": "address",
|
|
3973
|
+
"name": "_oracleFactoryAddress",
|
|
3974
|
+
"type": "address"
|
|
3441
3975
|
}
|
|
3442
3976
|
],
|
|
3443
3977
|
"stateMutability": "view",
|
|
@@ -4069,6 +4603,30 @@
|
|
|
4069
4603
|
"stateMutability": "view",
|
|
4070
4604
|
"type": "function"
|
|
4071
4605
|
},
|
|
4606
|
+
{
|
|
4607
|
+
"inputs": [
|
|
4608
|
+
{
|
|
4609
|
+
"internalType": "uint24[]",
|
|
4610
|
+
"name": "perpetualIds",
|
|
4611
|
+
"type": "uint24[]"
|
|
4612
|
+
},
|
|
4613
|
+
{
|
|
4614
|
+
"internalType": "int128[]",
|
|
4615
|
+
"name": "idxPriceDataPairs",
|
|
4616
|
+
"type": "int128[]"
|
|
4617
|
+
}
|
|
4618
|
+
],
|
|
4619
|
+
"name": "queryMidPrices",
|
|
4620
|
+
"outputs": [
|
|
4621
|
+
{
|
|
4622
|
+
"internalType": "int128[]",
|
|
4623
|
+
"name": "",
|
|
4624
|
+
"type": "int128[]"
|
|
4625
|
+
}
|
|
4626
|
+
],
|
|
4627
|
+
"stateMutability": "view",
|
|
4628
|
+
"type": "function"
|
|
4629
|
+
},
|
|
4072
4630
|
{
|
|
4073
4631
|
"inputs": [
|
|
4074
4632
|
{
|