@gainsnetwork/sdk 0.2.60-rc1 → 0.2.61-rc1
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/lib/constants.d.ts +11 -0
- package/lib/constants.js +12 -1
- package/lib/contracts/types/generated/GNSMultiCollatDiamond.d.ts +47 -311
- package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.d.ts +36 -45
- package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.js +47 -669
- package/lib/contracts/utils/pairs.js +11 -0
- package/lib/trade/liquidation.d.ts +1 -2
- package/lib/trade/liquidation.js +4 -6
- package/lib/trade/spread.d.ts +2 -3
- package/lib/trade/spread.js +9 -17
- package/lib/trade/types.d.ts +12 -5
- package/lib/trade/types.js +11 -0
- package/package.json +1 -1
|
@@ -1375,14 +1375,6 @@ const _abi = [
|
|
|
1375
1375
|
type: "function",
|
|
1376
1376
|
signature: "0xc85ac748",
|
|
1377
1377
|
},
|
|
1378
|
-
{
|
|
1379
|
-
inputs: [],
|
|
1380
|
-
name: "initializeReferralFeeChange",
|
|
1381
|
-
outputs: [],
|
|
1382
|
-
stateMutability: "nonpayable",
|
|
1383
|
-
type: "function",
|
|
1384
|
-
signature: "0xe4d0c552",
|
|
1385
|
-
},
|
|
1386
1378
|
{
|
|
1387
1379
|
inputs: [
|
|
1388
1380
|
{
|
|
@@ -1575,11 +1567,6 @@ const _abi = [
|
|
|
1575
1567
|
},
|
|
1576
1568
|
{
|
|
1577
1569
|
inputs: [
|
|
1578
|
-
{
|
|
1579
|
-
internalType: "address",
|
|
1580
|
-
name: "_trader",
|
|
1581
|
-
type: "address",
|
|
1582
|
-
},
|
|
1583
1570
|
{
|
|
1584
1571
|
internalType: "uint256",
|
|
1585
1572
|
name: "_pairIndex",
|
|
@@ -1596,32 +1583,7 @@ const _abi = [
|
|
|
1596
1583
|
],
|
|
1597
1584
|
stateMutability: "view",
|
|
1598
1585
|
type: "function",
|
|
1599
|
-
signature: "
|
|
1600
|
-
},
|
|
1601
|
-
{
|
|
1602
|
-
inputs: [
|
|
1603
|
-
{
|
|
1604
|
-
internalType: "address[]",
|
|
1605
|
-
name: "_trader",
|
|
1606
|
-
type: "address[]",
|
|
1607
|
-
},
|
|
1608
|
-
{
|
|
1609
|
-
internalType: "uint256[]",
|
|
1610
|
-
name: "_pairIndex",
|
|
1611
|
-
type: "uint256[]",
|
|
1612
|
-
},
|
|
1613
|
-
],
|
|
1614
|
-
name: "pairSpreadPArray",
|
|
1615
|
-
outputs: [
|
|
1616
|
-
{
|
|
1617
|
-
internalType: "uint256[]",
|
|
1618
|
-
name: "",
|
|
1619
|
-
type: "uint256[]",
|
|
1620
|
-
},
|
|
1621
|
-
],
|
|
1622
|
-
stateMutability: "view",
|
|
1623
|
-
type: "function",
|
|
1624
|
-
signature: "0x842a91d6",
|
|
1586
|
+
signature: "0xa1d54e9b",
|
|
1625
1587
|
},
|
|
1626
1588
|
{
|
|
1627
1589
|
inputs: [
|
|
@@ -2128,46 +2090,6 @@ const _abi = [
|
|
|
2128
2090
|
type: "event",
|
|
2129
2091
|
signature: "0x80495287b7fdd5e00b7c8c1eb065c5b63474d11ffb062cc82c13da77dda8424d",
|
|
2130
2092
|
},
|
|
2131
|
-
{
|
|
2132
|
-
anonymous: false,
|
|
2133
|
-
inputs: [
|
|
2134
|
-
{
|
|
2135
|
-
indexed: true,
|
|
2136
|
-
internalType: "address",
|
|
2137
|
-
name: "ally",
|
|
2138
|
-
type: "address",
|
|
2139
|
-
},
|
|
2140
|
-
{
|
|
2141
|
-
indexed: false,
|
|
2142
|
-
internalType: "uint24",
|
|
2143
|
-
name: "allyFeeP",
|
|
2144
|
-
type: "uint24",
|
|
2145
|
-
},
|
|
2146
|
-
],
|
|
2147
|
-
name: "OverrodeAllyFeeP",
|
|
2148
|
-
type: "event",
|
|
2149
|
-
signature: "0xb5c3fde8238e94bb4bbaa413be4d5b14d90e9a399db8d4f405d791ccd383ec9d",
|
|
2150
|
-
},
|
|
2151
|
-
{
|
|
2152
|
-
anonymous: false,
|
|
2153
|
-
inputs: [
|
|
2154
|
-
{
|
|
2155
|
-
indexed: true,
|
|
2156
|
-
internalType: "address",
|
|
2157
|
-
name: "referrer",
|
|
2158
|
-
type: "address",
|
|
2159
|
-
},
|
|
2160
|
-
{
|
|
2161
|
-
indexed: false,
|
|
2162
|
-
internalType: "uint24",
|
|
2163
|
-
name: "referralFeeP",
|
|
2164
|
-
type: "uint24",
|
|
2165
|
-
},
|
|
2166
|
-
],
|
|
2167
|
-
name: "OverrodeReferralFeeP",
|
|
2168
|
-
type: "event",
|
|
2169
|
-
signature: "0x69b632ab0d5becac42ff599f05530699f7bafe35d60010b9f45122e921eb7496",
|
|
2170
|
-
},
|
|
2171
2093
|
{
|
|
2172
2094
|
anonymous: false,
|
|
2173
2095
|
inputs: [
|
|
@@ -2433,43 +2355,6 @@ const _abi = [
|
|
|
2433
2355
|
type: "function",
|
|
2434
2356
|
signature: "0x92e67406",
|
|
2435
2357
|
},
|
|
2436
|
-
{
|
|
2437
|
-
inputs: [
|
|
2438
|
-
{
|
|
2439
|
-
internalType: "address",
|
|
2440
|
-
name: "_address",
|
|
2441
|
-
type: "address",
|
|
2442
|
-
},
|
|
2443
|
-
],
|
|
2444
|
-
name: "getReferralSettingsOverrides",
|
|
2445
|
-
outputs: [
|
|
2446
|
-
{
|
|
2447
|
-
components: [
|
|
2448
|
-
{
|
|
2449
|
-
internalType: "uint24",
|
|
2450
|
-
name: "referralFeeOverrideP",
|
|
2451
|
-
type: "uint24",
|
|
2452
|
-
},
|
|
2453
|
-
{
|
|
2454
|
-
internalType: "uint24",
|
|
2455
|
-
name: "allyFeeOverrideP",
|
|
2456
|
-
type: "uint24",
|
|
2457
|
-
},
|
|
2458
|
-
{
|
|
2459
|
-
internalType: "uint208",
|
|
2460
|
-
name: "__placeholder",
|
|
2461
|
-
type: "uint208",
|
|
2462
|
-
},
|
|
2463
|
-
],
|
|
2464
|
-
internalType: "struct IReferrals.ReferralSettingsOverrides",
|
|
2465
|
-
name: "",
|
|
2466
|
-
type: "tuple",
|
|
2467
|
-
},
|
|
2468
|
-
],
|
|
2469
|
-
stateMutability: "view",
|
|
2470
|
-
type: "function",
|
|
2471
|
-
signature: "0xa1ed4611",
|
|
2472
|
-
},
|
|
2473
2358
|
{
|
|
2474
2359
|
inputs: [],
|
|
2475
2360
|
name: "getReferralsAllyFeeP",
|
|
@@ -2693,44 +2578,6 @@ const _abi = [
|
|
|
2693
2578
|
type: "function",
|
|
2694
2579
|
signature: "0x38fb18c7",
|
|
2695
2580
|
},
|
|
2696
|
-
{
|
|
2697
|
-
inputs: [
|
|
2698
|
-
{
|
|
2699
|
-
internalType: "address[]",
|
|
2700
|
-
name: "_allies",
|
|
2701
|
-
type: "address[]",
|
|
2702
|
-
},
|
|
2703
|
-
{
|
|
2704
|
-
internalType: "uint24[]",
|
|
2705
|
-
name: "_allyFeeP",
|
|
2706
|
-
type: "uint24[]",
|
|
2707
|
-
},
|
|
2708
|
-
],
|
|
2709
|
-
name: "overrideAllyFeeP",
|
|
2710
|
-
outputs: [],
|
|
2711
|
-
stateMutability: "nonpayable",
|
|
2712
|
-
type: "function",
|
|
2713
|
-
signature: "0x9397053b",
|
|
2714
|
-
},
|
|
2715
|
-
{
|
|
2716
|
-
inputs: [
|
|
2717
|
-
{
|
|
2718
|
-
internalType: "address[]",
|
|
2719
|
-
name: "_referrers",
|
|
2720
|
-
type: "address[]",
|
|
2721
|
-
},
|
|
2722
|
-
{
|
|
2723
|
-
internalType: "uint24[]",
|
|
2724
|
-
name: "_referralFeeP",
|
|
2725
|
-
type: "uint24[]",
|
|
2726
|
-
},
|
|
2727
|
-
],
|
|
2728
|
-
name: "overrideReferralFeeP",
|
|
2729
|
-
outputs: [],
|
|
2730
|
-
stateMutability: "nonpayable",
|
|
2731
|
-
type: "function",
|
|
2732
|
-
signature: "0xdaeb463b",
|
|
2733
|
-
},
|
|
2734
2581
|
{
|
|
2735
2582
|
inputs: [
|
|
2736
2583
|
{
|
|
@@ -3866,38 +3713,6 @@ const _abi = [
|
|
|
3866
3713
|
type: "event",
|
|
3867
3714
|
signature: "0xb97e27f523fc23750f9d24f12010b9c513c301db9022d0ce8e27a50d9f426383",
|
|
3868
3715
|
},
|
|
3869
|
-
{
|
|
3870
|
-
anonymous: false,
|
|
3871
|
-
inputs: [
|
|
3872
|
-
{
|
|
3873
|
-
indexed: true,
|
|
3874
|
-
internalType: "address",
|
|
3875
|
-
name: "trader",
|
|
3876
|
-
type: "address",
|
|
3877
|
-
},
|
|
3878
|
-
{
|
|
3879
|
-
indexed: true,
|
|
3880
|
-
internalType: "uint16",
|
|
3881
|
-
name: "pairIndex",
|
|
3882
|
-
type: "uint16",
|
|
3883
|
-
},
|
|
3884
|
-
{
|
|
3885
|
-
indexed: false,
|
|
3886
|
-
internalType: "uint16",
|
|
3887
|
-
name: "cumulVolPriceImpactMultiplier",
|
|
3888
|
-
type: "uint16",
|
|
3889
|
-
},
|
|
3890
|
-
{
|
|
3891
|
-
indexed: false,
|
|
3892
|
-
internalType: "uint16",
|
|
3893
|
-
name: "fixedSpreadP",
|
|
3894
|
-
type: "uint16",
|
|
3895
|
-
},
|
|
3896
|
-
],
|
|
3897
|
-
name: "UserPriceImpactUpdated",
|
|
3898
|
-
type: "event",
|
|
3899
|
-
signature: "0x8f9f4768797359d22361c80641b41261863e9ad2f362291570d7386478f4135b",
|
|
3900
|
-
},
|
|
3901
3716
|
{
|
|
3902
3717
|
inputs: [
|
|
3903
3718
|
{
|
|
@@ -4287,48 +4102,6 @@ const _abi = [
|
|
|
4287
4102
|
type: "function",
|
|
4288
4103
|
signature: "0xae0d3a07",
|
|
4289
4104
|
},
|
|
4290
|
-
{
|
|
4291
|
-
inputs: [
|
|
4292
|
-
{
|
|
4293
|
-
internalType: "address",
|
|
4294
|
-
name: "_trader",
|
|
4295
|
-
type: "address",
|
|
4296
|
-
},
|
|
4297
|
-
{
|
|
4298
|
-
internalType: "uint256",
|
|
4299
|
-
name: "_pairIndex",
|
|
4300
|
-
type: "uint256",
|
|
4301
|
-
},
|
|
4302
|
-
],
|
|
4303
|
-
name: "getUserPriceImpact",
|
|
4304
|
-
outputs: [
|
|
4305
|
-
{
|
|
4306
|
-
components: [
|
|
4307
|
-
{
|
|
4308
|
-
internalType: "uint16",
|
|
4309
|
-
name: "cumulVolPriceImpactMultiplier",
|
|
4310
|
-
type: "uint16",
|
|
4311
|
-
},
|
|
4312
|
-
{
|
|
4313
|
-
internalType: "uint16",
|
|
4314
|
-
name: "fixedSpreadP",
|
|
4315
|
-
type: "uint16",
|
|
4316
|
-
},
|
|
4317
|
-
{
|
|
4318
|
-
internalType: "uint224",
|
|
4319
|
-
name: "__placeholder",
|
|
4320
|
-
type: "uint224",
|
|
4321
|
-
},
|
|
4322
|
-
],
|
|
4323
|
-
internalType: "struct IPriceImpact.UserPriceImpact",
|
|
4324
|
-
name: "",
|
|
4325
|
-
type: "tuple",
|
|
4326
|
-
},
|
|
4327
|
-
],
|
|
4328
|
-
stateMutability: "view",
|
|
4329
|
-
type: "function",
|
|
4330
|
-
signature: "0x5a1449ab",
|
|
4331
|
-
},
|
|
4332
4105
|
{
|
|
4333
4106
|
inputs: [
|
|
4334
4107
|
{
|
|
@@ -4571,35 +4344,6 @@ const _abi = [
|
|
|
4571
4344
|
type: "function",
|
|
4572
4345
|
signature: "0xef0243dc",
|
|
4573
4346
|
},
|
|
4574
|
-
{
|
|
4575
|
-
inputs: [
|
|
4576
|
-
{
|
|
4577
|
-
internalType: "address[]",
|
|
4578
|
-
name: "_traders",
|
|
4579
|
-
type: "address[]",
|
|
4580
|
-
},
|
|
4581
|
-
{
|
|
4582
|
-
internalType: "uint16[]",
|
|
4583
|
-
name: "_pairIndices",
|
|
4584
|
-
type: "uint16[]",
|
|
4585
|
-
},
|
|
4586
|
-
{
|
|
4587
|
-
internalType: "uint16[]",
|
|
4588
|
-
name: "_cumulVolPriceImpactMultipliers",
|
|
4589
|
-
type: "uint16[]",
|
|
4590
|
-
},
|
|
4591
|
-
{
|
|
4592
|
-
internalType: "uint16[]",
|
|
4593
|
-
name: "_fixedSpreadPs",
|
|
4594
|
-
type: "uint16[]",
|
|
4595
|
-
},
|
|
4596
|
-
],
|
|
4597
|
-
name: "setUserPriceImpact",
|
|
4598
|
-
outputs: [],
|
|
4599
|
-
stateMutability: "nonpayable",
|
|
4600
|
-
type: "function",
|
|
4601
|
-
signature: "0x9a8c610e",
|
|
4602
|
-
},
|
|
4603
4347
|
{
|
|
4604
4348
|
inputs: [],
|
|
4605
4349
|
name: "CollateralAlreadyActive",
|
|
@@ -6335,20 +6079,6 @@ const _abi = [
|
|
|
6335
6079
|
type: "function",
|
|
6336
6080
|
signature: "0x6a0aff41",
|
|
6337
6081
|
},
|
|
6338
|
-
{
|
|
6339
|
-
inputs: [],
|
|
6340
|
-
name: "getGnsCollateralIndex",
|
|
6341
|
-
outputs: [
|
|
6342
|
-
{
|
|
6343
|
-
internalType: "uint8",
|
|
6344
|
-
name: "",
|
|
6345
|
-
type: "uint8",
|
|
6346
|
-
},
|
|
6347
|
-
],
|
|
6348
|
-
stateMutability: "view",
|
|
6349
|
-
type: "function",
|
|
6350
|
-
signature: "0x78a70ec6",
|
|
6351
|
-
},
|
|
6352
6082
|
{
|
|
6353
6083
|
inputs: [
|
|
6354
6084
|
{
|
|
@@ -7185,26 +6915,6 @@ const _abi = [
|
|
|
7185
6915
|
type: "function",
|
|
7186
6916
|
signature: "0x4d140218",
|
|
7187
6917
|
},
|
|
7188
|
-
{
|
|
7189
|
-
inputs: [
|
|
7190
|
-
{
|
|
7191
|
-
internalType: "uint8",
|
|
7192
|
-
name: "_index",
|
|
7193
|
-
type: "uint8",
|
|
7194
|
-
},
|
|
7195
|
-
],
|
|
7196
|
-
name: "isCollateralGns",
|
|
7197
|
-
outputs: [
|
|
7198
|
-
{
|
|
7199
|
-
internalType: "bool",
|
|
7200
|
-
name: "",
|
|
7201
|
-
type: "bool",
|
|
7202
|
-
},
|
|
7203
|
-
],
|
|
7204
|
-
stateMutability: "view",
|
|
7205
|
-
type: "function",
|
|
7206
|
-
signature: "0x8db9390d",
|
|
7207
|
-
},
|
|
7208
6918
|
{
|
|
7209
6919
|
inputs: [
|
|
7210
6920
|
{
|
|
@@ -9713,11 +9423,6 @@ const _abi = [
|
|
|
9713
9423
|
type: "function",
|
|
9714
9424
|
signature: "0xf401f2bb",
|
|
9715
9425
|
},
|
|
9716
|
-
{
|
|
9717
|
-
inputs: [],
|
|
9718
|
-
name: "PendingOrderNotOpen",
|
|
9719
|
-
type: "error",
|
|
9720
|
-
},
|
|
9721
9426
|
{
|
|
9722
9427
|
anonymous: false,
|
|
9723
9428
|
inputs: [
|
|
@@ -13306,40 +13011,12 @@ const _abi = [
|
|
|
13306
13011
|
inputs: [
|
|
13307
13012
|
{
|
|
13308
13013
|
indexed: false,
|
|
13309
|
-
internalType: "
|
|
13310
|
-
name: "
|
|
13311
|
-
type: "
|
|
13014
|
+
internalType: "uint8",
|
|
13015
|
+
name: "value",
|
|
13016
|
+
type: "uint8",
|
|
13312
13017
|
},
|
|
13313
13018
|
],
|
|
13314
|
-
name: "
|
|
13315
|
-
type: "event",
|
|
13316
|
-
signature: "0xa043df067b559e4e84d85e6607cd6524f12547f7d22dcb2bbcdc03c74886688c",
|
|
13317
|
-
},
|
|
13318
|
-
{
|
|
13319
|
-
anonymous: false,
|
|
13320
|
-
inputs: [
|
|
13321
|
-
{
|
|
13322
|
-
indexed: false,
|
|
13323
|
-
internalType: "uint24",
|
|
13324
|
-
name: "maxMarketDeviationP",
|
|
13325
|
-
type: "uint24",
|
|
13326
|
-
},
|
|
13327
|
-
],
|
|
13328
|
-
name: "MaxMarketDeviationPUpdated",
|
|
13329
|
-
type: "event",
|
|
13330
|
-
signature: "0x93bd5e01958edd4eb2e0dfd8da8773f075b8f8ae0ef6823bc12703cc2e546df0",
|
|
13331
|
-
},
|
|
13332
|
-
{
|
|
13333
|
-
anonymous: false,
|
|
13334
|
-
inputs: [
|
|
13335
|
-
{
|
|
13336
|
-
indexed: false,
|
|
13337
|
-
internalType: "uint8",
|
|
13338
|
-
name: "value",
|
|
13339
|
-
type: "uint8",
|
|
13340
|
-
},
|
|
13341
|
-
],
|
|
13342
|
-
name: "MinAnswersUpdated",
|
|
13019
|
+
name: "MinAnswersUpdated",
|
|
13343
13020
|
type: "event",
|
|
13344
13021
|
signature: "0x6bc925491f55f56cb08a3ff41035fb0fdeae0cecc94f8e32e9b8ba2ad17fa7f9",
|
|
13345
13022
|
},
|
|
@@ -13460,78 +13137,10 @@ const _abi = [
|
|
|
13460
13137
|
name: "usedInMedian",
|
|
13461
13138
|
type: "bool",
|
|
13462
13139
|
},
|
|
13463
|
-
{
|
|
13464
|
-
indexed: false,
|
|
13465
|
-
internalType: "bool",
|
|
13466
|
-
name: "minAnswersReached",
|
|
13467
|
-
type: "bool",
|
|
13468
|
-
},
|
|
13469
|
-
{
|
|
13470
|
-
indexed: false,
|
|
13471
|
-
internalType: "bool",
|
|
13472
|
-
name: "minFilteredAnswersReached",
|
|
13473
|
-
type: "bool",
|
|
13474
|
-
},
|
|
13475
|
-
{
|
|
13476
|
-
components: [
|
|
13477
|
-
{
|
|
13478
|
-
internalType: "uint64",
|
|
13479
|
-
name: "open",
|
|
13480
|
-
type: "uint64",
|
|
13481
|
-
},
|
|
13482
|
-
{
|
|
13483
|
-
internalType: "uint64",
|
|
13484
|
-
name: "high",
|
|
13485
|
-
type: "uint64",
|
|
13486
|
-
},
|
|
13487
|
-
{
|
|
13488
|
-
internalType: "uint64",
|
|
13489
|
-
name: "low",
|
|
13490
|
-
type: "uint64",
|
|
13491
|
-
},
|
|
13492
|
-
{
|
|
13493
|
-
internalType: "uint64",
|
|
13494
|
-
name: "ts",
|
|
13495
|
-
type: "uint64",
|
|
13496
|
-
},
|
|
13497
|
-
],
|
|
13498
|
-
indexed: false,
|
|
13499
|
-
internalType: "struct IPriceAggregator.OrderAnswer[]",
|
|
13500
|
-
name: "unfilteredAnswers",
|
|
13501
|
-
type: "tuple[]",
|
|
13502
|
-
},
|
|
13503
|
-
{
|
|
13504
|
-
components: [
|
|
13505
|
-
{
|
|
13506
|
-
internalType: "uint64",
|
|
13507
|
-
name: "open",
|
|
13508
|
-
type: "uint64",
|
|
13509
|
-
},
|
|
13510
|
-
{
|
|
13511
|
-
internalType: "uint64",
|
|
13512
|
-
name: "high",
|
|
13513
|
-
type: "uint64",
|
|
13514
|
-
},
|
|
13515
|
-
{
|
|
13516
|
-
internalType: "uint64",
|
|
13517
|
-
name: "low",
|
|
13518
|
-
type: "uint64",
|
|
13519
|
-
},
|
|
13520
|
-
{
|
|
13521
|
-
internalType: "uint64",
|
|
13522
|
-
name: "ts",
|
|
13523
|
-
type: "uint64",
|
|
13524
|
-
},
|
|
13525
|
-
],
|
|
13526
|
-
indexed: false,
|
|
13527
|
-
internalType: "struct IPriceAggregator.OrderAnswer[]",
|
|
13528
|
-
name: "filteredAnswers",
|
|
13529
|
-
type: "tuple[]",
|
|
13530
|
-
},
|
|
13531
13140
|
],
|
|
13532
13141
|
name: "PriceReceived",
|
|
13533
13142
|
type: "event",
|
|
13534
|
-
signature: "
|
|
13143
|
+
signature: "0x1d01fcc0e82c93f463da710266800aff752bf7da2435090b30616276602eb75a",
|
|
13535
13144
|
},
|
|
13536
13145
|
{
|
|
13537
13146
|
anonymous: false,
|
|
@@ -13550,78 +13159,6 @@ const _abi = [
|
|
|
13550
13159
|
},
|
|
13551
13160
|
{
|
|
13552
13161
|
components: [
|
|
13553
|
-
{
|
|
13554
|
-
components: [
|
|
13555
|
-
{
|
|
13556
|
-
internalType: "address",
|
|
13557
|
-
name: "user",
|
|
13558
|
-
type: "address",
|
|
13559
|
-
},
|
|
13560
|
-
{
|
|
13561
|
-
internalType: "uint32",
|
|
13562
|
-
name: "index",
|
|
13563
|
-
type: "uint32",
|
|
13564
|
-
},
|
|
13565
|
-
{
|
|
13566
|
-
internalType: "uint16",
|
|
13567
|
-
name: "pairIndex",
|
|
13568
|
-
type: "uint16",
|
|
13569
|
-
},
|
|
13570
|
-
{
|
|
13571
|
-
internalType: "uint24",
|
|
13572
|
-
name: "leverage",
|
|
13573
|
-
type: "uint24",
|
|
13574
|
-
},
|
|
13575
|
-
{
|
|
13576
|
-
internalType: "bool",
|
|
13577
|
-
name: "long",
|
|
13578
|
-
type: "bool",
|
|
13579
|
-
},
|
|
13580
|
-
{
|
|
13581
|
-
internalType: "bool",
|
|
13582
|
-
name: "isOpen",
|
|
13583
|
-
type: "bool",
|
|
13584
|
-
},
|
|
13585
|
-
{
|
|
13586
|
-
internalType: "uint8",
|
|
13587
|
-
name: "collateralIndex",
|
|
13588
|
-
type: "uint8",
|
|
13589
|
-
},
|
|
13590
|
-
{
|
|
13591
|
-
internalType: "enum ITradingStorage.TradeType",
|
|
13592
|
-
name: "tradeType",
|
|
13593
|
-
type: "uint8",
|
|
13594
|
-
},
|
|
13595
|
-
{
|
|
13596
|
-
internalType: "uint120",
|
|
13597
|
-
name: "collateralAmount",
|
|
13598
|
-
type: "uint120",
|
|
13599
|
-
},
|
|
13600
|
-
{
|
|
13601
|
-
internalType: "uint64",
|
|
13602
|
-
name: "openPrice",
|
|
13603
|
-
type: "uint64",
|
|
13604
|
-
},
|
|
13605
|
-
{
|
|
13606
|
-
internalType: "uint64",
|
|
13607
|
-
name: "tp",
|
|
13608
|
-
type: "uint64",
|
|
13609
|
-
},
|
|
13610
|
-
{
|
|
13611
|
-
internalType: "uint64",
|
|
13612
|
-
name: "sl",
|
|
13613
|
-
type: "uint64",
|
|
13614
|
-
},
|
|
13615
|
-
{
|
|
13616
|
-
internalType: "uint192",
|
|
13617
|
-
name: "__placeholder",
|
|
13618
|
-
type: "uint192",
|
|
13619
|
-
},
|
|
13620
|
-
],
|
|
13621
|
-
internalType: "struct ITradingStorage.Trade",
|
|
13622
|
-
name: "trade",
|
|
13623
|
-
type: "tuple",
|
|
13624
|
-
},
|
|
13625
13162
|
{
|
|
13626
13163
|
internalType: "address",
|
|
13627
13164
|
name: "user",
|
|
@@ -13632,32 +13169,36 @@ const _abi = [
|
|
|
13632
13169
|
name: "index",
|
|
13633
13170
|
type: "uint32",
|
|
13634
13171
|
},
|
|
13172
|
+
],
|
|
13173
|
+
indexed: false,
|
|
13174
|
+
internalType: "struct ITradingStorage.Id",
|
|
13175
|
+
name: "tradeId",
|
|
13176
|
+
type: "tuple",
|
|
13177
|
+
},
|
|
13178
|
+
{
|
|
13179
|
+
components: [
|
|
13635
13180
|
{
|
|
13636
|
-
internalType: "
|
|
13637
|
-
name: "
|
|
13638
|
-
type: "
|
|
13639
|
-
},
|
|
13640
|
-
{
|
|
13641
|
-
internalType: "enum ITradingStorage.PendingOrderType",
|
|
13642
|
-
name: "orderType",
|
|
13643
|
-
type: "uint8",
|
|
13181
|
+
internalType: "address",
|
|
13182
|
+
name: "user",
|
|
13183
|
+
type: "address",
|
|
13644
13184
|
},
|
|
13645
13185
|
{
|
|
13646
13186
|
internalType: "uint32",
|
|
13647
|
-
name: "
|
|
13187
|
+
name: "index",
|
|
13648
13188
|
type: "uint32",
|
|
13649
13189
|
},
|
|
13650
|
-
{
|
|
13651
|
-
internalType: "uint16",
|
|
13652
|
-
name: "maxSlippageP",
|
|
13653
|
-
type: "uint16",
|
|
13654
|
-
},
|
|
13655
13190
|
],
|
|
13656
13191
|
indexed: false,
|
|
13657
|
-
internalType: "struct ITradingStorage.
|
|
13658
|
-
name: "
|
|
13192
|
+
internalType: "struct ITradingStorage.Id",
|
|
13193
|
+
name: "pendingOrderId",
|
|
13659
13194
|
type: "tuple",
|
|
13660
13195
|
},
|
|
13196
|
+
{
|
|
13197
|
+
indexed: false,
|
|
13198
|
+
internalType: "enum ITradingStorage.PendingOrderType",
|
|
13199
|
+
name: "orderType",
|
|
13200
|
+
type: "uint8",
|
|
13201
|
+
},
|
|
13661
13202
|
{
|
|
13662
13203
|
indexed: false,
|
|
13663
13204
|
internalType: "uint256",
|
|
@@ -13691,7 +13232,7 @@ const _abi = [
|
|
|
13691
13232
|
],
|
|
13692
13233
|
name: "PriceRequested",
|
|
13693
13234
|
type: "event",
|
|
13694
|
-
signature: "
|
|
13235
|
+
signature: "0x59fd16e7bbed6457d473d57a799cffde3ff43e27a3a87479a5a431b4801f754f",
|
|
13695
13236
|
},
|
|
13696
13237
|
{
|
|
13697
13238
|
anonymous: false,
|
|
@@ -14098,34 +13639,6 @@ const _abi = [
|
|
|
14098
13639
|
type: "function",
|
|
14099
13640
|
signature: "0x8e667ac8",
|
|
14100
13641
|
},
|
|
14101
|
-
{
|
|
14102
|
-
inputs: [],
|
|
14103
|
-
name: "getMaxLookbackDeviationP",
|
|
14104
|
-
outputs: [
|
|
14105
|
-
{
|
|
14106
|
-
internalType: "uint24",
|
|
14107
|
-
name: "",
|
|
14108
|
-
type: "uint24",
|
|
14109
|
-
},
|
|
14110
|
-
],
|
|
14111
|
-
stateMutability: "view",
|
|
14112
|
-
type: "function",
|
|
14113
|
-
signature: "0xda381eb3",
|
|
14114
|
-
},
|
|
14115
|
-
{
|
|
14116
|
-
inputs: [],
|
|
14117
|
-
name: "getMaxMarketDeviationP",
|
|
14118
|
-
outputs: [
|
|
14119
|
-
{
|
|
14120
|
-
internalType: "uint24",
|
|
14121
|
-
name: "",
|
|
14122
|
-
type: "uint24",
|
|
14123
|
-
},
|
|
14124
|
-
],
|
|
14125
|
-
stateMutability: "view",
|
|
14126
|
-
type: "function",
|
|
14127
|
-
signature: "0x8550092e",
|
|
14128
|
-
},
|
|
14129
13642
|
{
|
|
14130
13643
|
inputs: [],
|
|
14131
13644
|
name: "getMinAnswers",
|
|
@@ -14208,78 +13721,6 @@ const _abi = [
|
|
|
14208
13721
|
},
|
|
14209
13722
|
{
|
|
14210
13723
|
components: [
|
|
14211
|
-
{
|
|
14212
|
-
components: [
|
|
14213
|
-
{
|
|
14214
|
-
internalType: "address",
|
|
14215
|
-
name: "user",
|
|
14216
|
-
type: "address",
|
|
14217
|
-
},
|
|
14218
|
-
{
|
|
14219
|
-
internalType: "uint32",
|
|
14220
|
-
name: "index",
|
|
14221
|
-
type: "uint32",
|
|
14222
|
-
},
|
|
14223
|
-
{
|
|
14224
|
-
internalType: "uint16",
|
|
14225
|
-
name: "pairIndex",
|
|
14226
|
-
type: "uint16",
|
|
14227
|
-
},
|
|
14228
|
-
{
|
|
14229
|
-
internalType: "uint24",
|
|
14230
|
-
name: "leverage",
|
|
14231
|
-
type: "uint24",
|
|
14232
|
-
},
|
|
14233
|
-
{
|
|
14234
|
-
internalType: "bool",
|
|
14235
|
-
name: "long",
|
|
14236
|
-
type: "bool",
|
|
14237
|
-
},
|
|
14238
|
-
{
|
|
14239
|
-
internalType: "bool",
|
|
14240
|
-
name: "isOpen",
|
|
14241
|
-
type: "bool",
|
|
14242
|
-
},
|
|
14243
|
-
{
|
|
14244
|
-
internalType: "uint8",
|
|
14245
|
-
name: "collateralIndex",
|
|
14246
|
-
type: "uint8",
|
|
14247
|
-
},
|
|
14248
|
-
{
|
|
14249
|
-
internalType: "enum ITradingStorage.TradeType",
|
|
14250
|
-
name: "tradeType",
|
|
14251
|
-
type: "uint8",
|
|
14252
|
-
},
|
|
14253
|
-
{
|
|
14254
|
-
internalType: "uint120",
|
|
14255
|
-
name: "collateralAmount",
|
|
14256
|
-
type: "uint120",
|
|
14257
|
-
},
|
|
14258
|
-
{
|
|
14259
|
-
internalType: "uint64",
|
|
14260
|
-
name: "openPrice",
|
|
14261
|
-
type: "uint64",
|
|
14262
|
-
},
|
|
14263
|
-
{
|
|
14264
|
-
internalType: "uint64",
|
|
14265
|
-
name: "tp",
|
|
14266
|
-
type: "uint64",
|
|
14267
|
-
},
|
|
14268
|
-
{
|
|
14269
|
-
internalType: "uint64",
|
|
14270
|
-
name: "sl",
|
|
14271
|
-
type: "uint64",
|
|
14272
|
-
},
|
|
14273
|
-
{
|
|
14274
|
-
internalType: "uint192",
|
|
14275
|
-
name: "__placeholder",
|
|
14276
|
-
type: "uint192",
|
|
14277
|
-
},
|
|
14278
|
-
],
|
|
14279
|
-
internalType: "struct ITradingStorage.Trade",
|
|
14280
|
-
name: "trade",
|
|
14281
|
-
type: "tuple",
|
|
14282
|
-
},
|
|
14283
13724
|
{
|
|
14284
13725
|
internalType: "address",
|
|
14285
13726
|
name: "user",
|
|
@@ -14290,31 +13731,33 @@ const _abi = [
|
|
|
14290
13731
|
name: "index",
|
|
14291
13732
|
type: "uint32",
|
|
14292
13733
|
},
|
|
13734
|
+
],
|
|
13735
|
+
internalType: "struct ITradingStorage.Id",
|
|
13736
|
+
name: "_tradeId",
|
|
13737
|
+
type: "tuple",
|
|
13738
|
+
},
|
|
13739
|
+
{
|
|
13740
|
+
components: [
|
|
14293
13741
|
{
|
|
14294
|
-
internalType: "
|
|
14295
|
-
name: "
|
|
14296
|
-
type: "
|
|
14297
|
-
},
|
|
14298
|
-
{
|
|
14299
|
-
internalType: "enum ITradingStorage.PendingOrderType",
|
|
14300
|
-
name: "orderType",
|
|
14301
|
-
type: "uint8",
|
|
13742
|
+
internalType: "address",
|
|
13743
|
+
name: "user",
|
|
13744
|
+
type: "address",
|
|
14302
13745
|
},
|
|
14303
13746
|
{
|
|
14304
13747
|
internalType: "uint32",
|
|
14305
|
-
name: "
|
|
13748
|
+
name: "index",
|
|
14306
13749
|
type: "uint32",
|
|
14307
13750
|
},
|
|
14308
|
-
{
|
|
14309
|
-
internalType: "uint16",
|
|
14310
|
-
name: "maxSlippageP",
|
|
14311
|
-
type: "uint16",
|
|
14312
|
-
},
|
|
14313
13751
|
],
|
|
14314
|
-
internalType: "struct ITradingStorage.
|
|
14315
|
-
name: "
|
|
13752
|
+
internalType: "struct ITradingStorage.Id",
|
|
13753
|
+
name: "_orderId",
|
|
14316
13754
|
type: "tuple",
|
|
14317
13755
|
},
|
|
13756
|
+
{
|
|
13757
|
+
internalType: "enum ITradingStorage.PendingOrderType",
|
|
13758
|
+
name: "_orderType",
|
|
13759
|
+
type: "uint8",
|
|
13760
|
+
},
|
|
14318
13761
|
{
|
|
14319
13762
|
internalType: "uint256",
|
|
14320
13763
|
name: "_positionSizeCollateral",
|
|
@@ -14327,28 +13770,10 @@ const _abi = [
|
|
|
14327
13770
|
},
|
|
14328
13771
|
],
|
|
14329
13772
|
name: "getPrice",
|
|
14330
|
-
outputs: [
|
|
14331
|
-
{
|
|
14332
|
-
components: [
|
|
14333
|
-
{
|
|
14334
|
-
internalType: "address",
|
|
14335
|
-
name: "user",
|
|
14336
|
-
type: "address",
|
|
14337
|
-
},
|
|
14338
|
-
{
|
|
14339
|
-
internalType: "uint32",
|
|
14340
|
-
name: "index",
|
|
14341
|
-
type: "uint32",
|
|
14342
|
-
},
|
|
14343
|
-
],
|
|
14344
|
-
internalType: "struct ITradingStorage.Id",
|
|
14345
|
-
name: "",
|
|
14346
|
-
type: "tuple",
|
|
14347
|
-
},
|
|
14348
|
-
],
|
|
13773
|
+
outputs: [],
|
|
14349
13774
|
stateMutability: "nonpayable",
|
|
14350
13775
|
type: "function",
|
|
14351
|
-
signature: "
|
|
13776
|
+
signature: "0x7e156b8c",
|
|
14352
13777
|
},
|
|
14353
13778
|
{
|
|
14354
13779
|
inputs: [
|
|
@@ -14523,25 +13948,6 @@ const _abi = [
|
|
|
14523
13948
|
type: "function",
|
|
14524
13949
|
signature: "0xc386f31b",
|
|
14525
13950
|
},
|
|
14526
|
-
{
|
|
14527
|
-
inputs: [
|
|
14528
|
-
{
|
|
14529
|
-
internalType: "uint24",
|
|
14530
|
-
name: "_maxMarketDeviationP",
|
|
14531
|
-
type: "uint24",
|
|
14532
|
-
},
|
|
14533
|
-
{
|
|
14534
|
-
internalType: "uint24",
|
|
14535
|
-
name: "_maxLookbackDeviationP",
|
|
14536
|
-
type: "uint24",
|
|
14537
|
-
},
|
|
14538
|
-
],
|
|
14539
|
-
name: "initializeMaxDeviationsP",
|
|
14540
|
-
outputs: [],
|
|
14541
|
-
stateMutability: "nonpayable",
|
|
14542
|
-
type: "function",
|
|
14543
|
-
signature: "0x94db9ef7",
|
|
14544
|
-
},
|
|
14545
13951
|
{
|
|
14546
13952
|
inputs: [
|
|
14547
13953
|
{
|
|
@@ -14683,34 +14089,6 @@ const _abi = [
|
|
|
14683
14089
|
type: "function",
|
|
14684
14090
|
signature: "0x85f276b8",
|
|
14685
14091
|
},
|
|
14686
|
-
{
|
|
14687
|
-
inputs: [
|
|
14688
|
-
{
|
|
14689
|
-
internalType: "uint24",
|
|
14690
|
-
name: "_maxLookbackDeviationP",
|
|
14691
|
-
type: "uint24",
|
|
14692
|
-
},
|
|
14693
|
-
],
|
|
14694
|
-
name: "setMaxLookbackDeviationP",
|
|
14695
|
-
outputs: [],
|
|
14696
|
-
stateMutability: "nonpayable",
|
|
14697
|
-
type: "function",
|
|
14698
|
-
signature: "0xd2029399",
|
|
14699
|
-
},
|
|
14700
|
-
{
|
|
14701
|
-
inputs: [
|
|
14702
|
-
{
|
|
14703
|
-
internalType: "uint24",
|
|
14704
|
-
name: "_maxMarketDeviationP",
|
|
14705
|
-
type: "uint24",
|
|
14706
|
-
},
|
|
14707
|
-
],
|
|
14708
|
-
name: "setMaxMarketDeviationP",
|
|
14709
|
-
outputs: [],
|
|
14710
|
-
stateMutability: "nonpayable",
|
|
14711
|
-
type: "function",
|
|
14712
|
-
signature: "0xaa564b10",
|
|
14713
|
-
},
|
|
14714
14092
|
{
|
|
14715
14093
|
inputs: [
|
|
14716
14094
|
{
|