@d8x/perpetuals-sdk 0.0.18 → 0.0.20
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/abi/IPerpetualManager.json +391 -395
- package/abi/LimitOrderBook.json +180 -180
- package/abi/LimitOrderBookFactory.json +19 -0
- package/config/defaultConfig.json +3 -3
- package/config/oldConfig.json +3 -3
- package/dist/accountTrade.d.ts +22 -4
- package/dist/accountTrade.js +51 -25
- package/dist/brokerTool.js +2 -2
- package/dist/liquidatorTool.js +6 -0
- package/dist/liquidityProviderTool.d.ts +1 -1
- package/dist/liquidityProviderTool.js +10 -14
- package/dist/nodeSDKTypes.d.ts +7 -1
- package/dist/orderReferrerTool.js +1 -1
- package/dist/perpetualDataHandler.js +2 -0
- package/package.json +1 -1
- package/src/accountTrade.ts +59 -29
- package/src/brokerTool.ts +4 -4
- package/src/liquidatorTool.ts +6 -0
- package/src/liquidityProviderTool.ts +13 -16
- package/src/nodeSDKTypes.ts +8 -1
- package/src/orderReferrerTool.ts +1 -1
- package/src/perpetualDataHandler.ts +2 -0
|
@@ -206,12 +206,6 @@
|
|
|
206
206
|
"name": "id",
|
|
207
207
|
"type": "uint8"
|
|
208
208
|
},
|
|
209
|
-
{
|
|
210
|
-
"indexed": false,
|
|
211
|
-
"internalType": "address",
|
|
212
|
-
"name": "treasuryAddress",
|
|
213
|
-
"type": "address"
|
|
214
|
-
},
|
|
215
209
|
{
|
|
216
210
|
"indexed": false,
|
|
217
211
|
"internalType": "address",
|
|
@@ -412,19 +406,13 @@
|
|
|
412
406
|
"anonymous": false,
|
|
413
407
|
"inputs": [
|
|
414
408
|
{
|
|
415
|
-
"indexed":
|
|
409
|
+
"indexed": false,
|
|
416
410
|
"internalType": "uint8",
|
|
417
|
-
"name": "
|
|
411
|
+
"name": "delay",
|
|
418
412
|
"type": "uint8"
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
"indexed": false,
|
|
422
|
-
"internalType": "int128",
|
|
423
|
-
"name": "brokerCollateralLotSize",
|
|
424
|
-
"type": "int128"
|
|
425
413
|
}
|
|
426
414
|
],
|
|
427
|
-
"name": "
|
|
415
|
+
"name": "SetBlockDelay",
|
|
428
416
|
"type": "event"
|
|
429
417
|
},
|
|
430
418
|
{
|
|
@@ -528,44 +516,6 @@
|
|
|
528
516
|
"name": "SetEmergencyState",
|
|
529
517
|
"type": "event"
|
|
530
518
|
},
|
|
531
|
-
{
|
|
532
|
-
"anonymous": false,
|
|
533
|
-
"inputs": [
|
|
534
|
-
{
|
|
535
|
-
"indexed": true,
|
|
536
|
-
"internalType": "uint8",
|
|
537
|
-
"name": "poolId",
|
|
538
|
-
"type": "uint8"
|
|
539
|
-
},
|
|
540
|
-
{
|
|
541
|
-
"indexed": false,
|
|
542
|
-
"internalType": "uint16",
|
|
543
|
-
"name": "fundTransferConvergenceHours",
|
|
544
|
-
"type": "uint16"
|
|
545
|
-
}
|
|
546
|
-
],
|
|
547
|
-
"name": "SetFundTransferConvergenceHours",
|
|
548
|
-
"type": "event"
|
|
549
|
-
},
|
|
550
|
-
{
|
|
551
|
-
"anonymous": false,
|
|
552
|
-
"inputs": [
|
|
553
|
-
{
|
|
554
|
-
"indexed": true,
|
|
555
|
-
"internalType": "uint8",
|
|
556
|
-
"name": "poolId",
|
|
557
|
-
"type": "uint8"
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
"indexed": false,
|
|
561
|
-
"internalType": "int128",
|
|
562
|
-
"name": "maxTransferPerConvergencePeriod",
|
|
563
|
-
"type": "int128"
|
|
564
|
-
}
|
|
565
|
-
],
|
|
566
|
-
"name": "SetMaxTransferPerConvergencePeriod",
|
|
567
|
-
"type": "event"
|
|
568
|
-
},
|
|
569
519
|
{
|
|
570
520
|
"anonymous": false,
|
|
571
521
|
"inputs": [
|
|
@@ -715,12 +665,18 @@
|
|
|
715
665
|
},
|
|
716
666
|
{
|
|
717
667
|
"indexed": false,
|
|
718
|
-
"internalType": "
|
|
719
|
-
"name": "
|
|
720
|
-
"type": "
|
|
668
|
+
"internalType": "string",
|
|
669
|
+
"name": "name",
|
|
670
|
+
"type": "string"
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
"indexed": false,
|
|
674
|
+
"internalType": "int128",
|
|
675
|
+
"name": "value",
|
|
676
|
+
"type": "int128"
|
|
721
677
|
}
|
|
722
678
|
],
|
|
723
|
-
"name": "
|
|
679
|
+
"name": "SetPoolParameter",
|
|
724
680
|
"type": "event"
|
|
725
681
|
},
|
|
726
682
|
{
|
|
@@ -928,14 +884,19 @@
|
|
|
928
884
|
"type": "int128"
|
|
929
885
|
},
|
|
930
886
|
{
|
|
931
|
-
"internalType": "
|
|
887
|
+
"internalType": "uint64",
|
|
932
888
|
"name": "iDeadline",
|
|
933
|
-
"type": "
|
|
889
|
+
"type": "uint64"
|
|
934
890
|
},
|
|
935
891
|
{
|
|
936
|
-
"internalType": "
|
|
892
|
+
"internalType": "uint64",
|
|
937
893
|
"name": "createdTimestamp",
|
|
938
|
-
"type": "
|
|
894
|
+
"type": "uint64"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"internalType": "uint64",
|
|
898
|
+
"name": "submittedBlock",
|
|
899
|
+
"type": "uint64"
|
|
939
900
|
}
|
|
940
901
|
],
|
|
941
902
|
"indexed": false,
|
|
@@ -965,6 +926,31 @@
|
|
|
965
926
|
"name": "Trade",
|
|
966
927
|
"type": "event"
|
|
967
928
|
},
|
|
929
|
+
{
|
|
930
|
+
"anonymous": false,
|
|
931
|
+
"inputs": [
|
|
932
|
+
{
|
|
933
|
+
"indexed": false,
|
|
934
|
+
"internalType": "string",
|
|
935
|
+
"name": "name",
|
|
936
|
+
"type": "string"
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"indexed": false,
|
|
940
|
+
"internalType": "address",
|
|
941
|
+
"name": "oldOBFactory",
|
|
942
|
+
"type": "address"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"indexed": false,
|
|
946
|
+
"internalType": "address",
|
|
947
|
+
"name": "newOBFactory",
|
|
948
|
+
"type": "address"
|
|
949
|
+
}
|
|
950
|
+
],
|
|
951
|
+
"name": "TransferAddressTo",
|
|
952
|
+
"type": "event"
|
|
953
|
+
},
|
|
968
954
|
{
|
|
969
955
|
"anonymous": false,
|
|
970
956
|
"inputs": [
|
|
@@ -1046,31 +1032,6 @@
|
|
|
1046
1032
|
"name": "TransferFeeToReferrer",
|
|
1047
1033
|
"type": "event"
|
|
1048
1034
|
},
|
|
1049
|
-
{
|
|
1050
|
-
"anonymous": false,
|
|
1051
|
-
"inputs": [
|
|
1052
|
-
{
|
|
1053
|
-
"indexed": true,
|
|
1054
|
-
"internalType": "uint64",
|
|
1055
|
-
"name": "poolId",
|
|
1056
|
-
"type": "uint64"
|
|
1057
|
-
},
|
|
1058
|
-
{
|
|
1059
|
-
"indexed": false,
|
|
1060
|
-
"internalType": "address",
|
|
1061
|
-
"name": "oldTreasury",
|
|
1062
|
-
"type": "address"
|
|
1063
|
-
},
|
|
1064
|
-
{
|
|
1065
|
-
"indexed": false,
|
|
1066
|
-
"internalType": "address",
|
|
1067
|
-
"name": "newTreasury",
|
|
1068
|
-
"type": "address"
|
|
1069
|
-
}
|
|
1070
|
-
],
|
|
1071
|
-
"name": "TransferTreasuryTo",
|
|
1072
|
-
"type": "event"
|
|
1073
|
-
},
|
|
1074
1035
|
{
|
|
1075
1036
|
"anonymous": false,
|
|
1076
1037
|
"inputs": [
|
|
@@ -1427,9 +1388,9 @@
|
|
|
1427
1388
|
"type": "uint8"
|
|
1428
1389
|
},
|
|
1429
1390
|
{
|
|
1430
|
-
"internalType": "
|
|
1431
|
-
"name": "
|
|
1432
|
-
"type": "
|
|
1391
|
+
"internalType": "uint256",
|
|
1392
|
+
"name": "_tokenAmount",
|
|
1393
|
+
"type": "uint256"
|
|
1433
1394
|
}
|
|
1434
1395
|
],
|
|
1435
1396
|
"name": "addLiquidity",
|
|
@@ -1638,7 +1599,7 @@
|
|
|
1638
1599
|
},
|
|
1639
1600
|
{
|
|
1640
1601
|
"internalType": "int128",
|
|
1641
|
-
"name": "
|
|
1602
|
+
"name": "_fBidAskSpread",
|
|
1642
1603
|
"type": "int128"
|
|
1643
1604
|
},
|
|
1644
1605
|
{
|
|
@@ -1816,14 +1777,19 @@
|
|
|
1816
1777
|
"type": "int128"
|
|
1817
1778
|
},
|
|
1818
1779
|
{
|
|
1819
|
-
"internalType": "
|
|
1780
|
+
"internalType": "uint64",
|
|
1820
1781
|
"name": "iDeadline",
|
|
1821
|
-
"type": "
|
|
1782
|
+
"type": "uint64"
|
|
1822
1783
|
},
|
|
1823
1784
|
{
|
|
1824
|
-
"internalType": "
|
|
1785
|
+
"internalType": "uint64",
|
|
1825
1786
|
"name": "createdTimestamp",
|
|
1826
|
-
"type": "
|
|
1787
|
+
"type": "uint64"
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
"internalType": "uint64",
|
|
1791
|
+
"name": "submittedBlock",
|
|
1792
|
+
"type": "uint64"
|
|
1827
1793
|
}
|
|
1828
1794
|
],
|
|
1829
1795
|
"internalType": "struct IPerpetualOrder.Order",
|
|
@@ -1831,12 +1797,12 @@
|
|
|
1831
1797
|
"type": "tuple"
|
|
1832
1798
|
},
|
|
1833
1799
|
{
|
|
1834
|
-
"internalType": "
|
|
1835
|
-
"name": "
|
|
1836
|
-
"type": "
|
|
1800
|
+
"internalType": "uint16",
|
|
1801
|
+
"name": "_feeTbps",
|
|
1802
|
+
"type": "uint16"
|
|
1837
1803
|
}
|
|
1838
1804
|
],
|
|
1839
|
-
"name": "
|
|
1805
|
+
"name": "chargePostingFee",
|
|
1840
1806
|
"outputs": [],
|
|
1841
1807
|
"stateMutability": "nonpayable",
|
|
1842
1808
|
"type": "function"
|
|
@@ -1845,7 +1811,7 @@
|
|
|
1845
1811
|
"inputs": [
|
|
1846
1812
|
{
|
|
1847
1813
|
"internalType": "uint24",
|
|
1848
|
-
"name": "
|
|
1814
|
+
"name": "_perpetualId",
|
|
1849
1815
|
"type": "uint24"
|
|
1850
1816
|
}
|
|
1851
1817
|
],
|
|
@@ -1862,11 +1828,6 @@
|
|
|
1862
1828
|
},
|
|
1863
1829
|
{
|
|
1864
1830
|
"inputs": [
|
|
1865
|
-
{
|
|
1866
|
-
"internalType": "address",
|
|
1867
|
-
"name": "_treasuryAddress",
|
|
1868
|
-
"type": "address"
|
|
1869
|
-
},
|
|
1870
1831
|
{
|
|
1871
1832
|
"internalType": "address",
|
|
1872
1833
|
"name": "_marginTokenAddress",
|
|
@@ -2053,14 +2014,19 @@
|
|
|
2053
2014
|
"type": "int128"
|
|
2054
2015
|
},
|
|
2055
2016
|
{
|
|
2056
|
-
"internalType": "
|
|
2017
|
+
"internalType": "uint64",
|
|
2057
2018
|
"name": "iDeadline",
|
|
2058
|
-
"type": "
|
|
2019
|
+
"type": "uint64"
|
|
2059
2020
|
},
|
|
2060
2021
|
{
|
|
2061
|
-
"internalType": "
|
|
2022
|
+
"internalType": "uint64",
|
|
2062
2023
|
"name": "createdTimestamp",
|
|
2063
|
-
"type": "
|
|
2024
|
+
"type": "uint64"
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
"internalType": "uint64",
|
|
2028
|
+
"name": "submittedBlock",
|
|
2029
|
+
"type": "uint64"
|
|
2064
2030
|
}
|
|
2065
2031
|
],
|
|
2066
2032
|
"internalType": "struct IPerpetualOrder.Order",
|
|
@@ -2157,14 +2123,19 @@
|
|
|
2157
2123
|
"type": "int128"
|
|
2158
2124
|
},
|
|
2159
2125
|
{
|
|
2160
|
-
"internalType": "
|
|
2126
|
+
"internalType": "uint64",
|
|
2161
2127
|
"name": "iDeadline",
|
|
2162
|
-
"type": "
|
|
2128
|
+
"type": "uint64"
|
|
2163
2129
|
},
|
|
2164
2130
|
{
|
|
2165
|
-
"internalType": "
|
|
2131
|
+
"internalType": "uint64",
|
|
2166
2132
|
"name": "createdTimestamp",
|
|
2167
|
-
"type": "
|
|
2133
|
+
"type": "uint64"
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
"internalType": "uint64",
|
|
2137
|
+
"name": "submittedBlock",
|
|
2138
|
+
"type": "uint64"
|
|
2168
2139
|
}
|
|
2169
2140
|
],
|
|
2170
2141
|
"internalType": "struct IPerpetualOrder.Order",
|
|
@@ -2243,14 +2214,19 @@
|
|
|
2243
2214
|
"type": "int128"
|
|
2244
2215
|
},
|
|
2245
2216
|
{
|
|
2246
|
-
"internalType": "
|
|
2217
|
+
"internalType": "uint64",
|
|
2247
2218
|
"name": "iDeadline",
|
|
2248
|
-
"type": "
|
|
2219
|
+
"type": "uint64"
|
|
2249
2220
|
},
|
|
2250
2221
|
{
|
|
2251
|
-
"internalType": "
|
|
2222
|
+
"internalType": "uint64",
|
|
2252
2223
|
"name": "createdTimestamp",
|
|
2253
|
-
"type": "
|
|
2224
|
+
"type": "uint64"
|
|
2225
|
+
},
|
|
2226
|
+
{
|
|
2227
|
+
"internalType": "uint64",
|
|
2228
|
+
"name": "submittedBlock",
|
|
2229
|
+
"type": "uint64"
|
|
2254
2230
|
}
|
|
2255
2231
|
],
|
|
2256
2232
|
"internalType": "struct IPerpetualOrder.Order",
|
|
@@ -2332,6 +2308,24 @@
|
|
|
2332
2308
|
"stateMutability": "pure",
|
|
2333
2309
|
"type": "function"
|
|
2334
2310
|
},
|
|
2311
|
+
{
|
|
2312
|
+
"inputs": [
|
|
2313
|
+
{
|
|
2314
|
+
"internalType": "uint24",
|
|
2315
|
+
"name": "_perpetualId",
|
|
2316
|
+
"type": "uint24"
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
"internalType": "bytes32",
|
|
2320
|
+
"name": "_digest",
|
|
2321
|
+
"type": "bytes32"
|
|
2322
|
+
}
|
|
2323
|
+
],
|
|
2324
|
+
"name": "executeCancelOrder",
|
|
2325
|
+
"outputs": [],
|
|
2326
|
+
"stateMutability": "nonpayable",
|
|
2327
|
+
"type": "function"
|
|
2328
|
+
},
|
|
2335
2329
|
{
|
|
2336
2330
|
"inputs": [
|
|
2337
2331
|
{
|
|
@@ -2393,7 +2387,7 @@
|
|
|
2393
2387
|
"inputs": [
|
|
2394
2388
|
{
|
|
2395
2389
|
"internalType": "uint24",
|
|
2396
|
-
"name": "
|
|
2390
|
+
"name": "_perpetualId",
|
|
2397
2391
|
"type": "uint24"
|
|
2398
2392
|
}
|
|
2399
2393
|
],
|
|
@@ -2412,7 +2406,7 @@
|
|
|
2412
2406
|
"inputs": [
|
|
2413
2407
|
{
|
|
2414
2408
|
"internalType": "uint24",
|
|
2415
|
-
"name": "
|
|
2409
|
+
"name": "_perpetualId",
|
|
2416
2410
|
"type": "uint24"
|
|
2417
2411
|
}
|
|
2418
2412
|
],
|
|
@@ -2420,7 +2414,7 @@
|
|
|
2420
2414
|
"outputs": [
|
|
2421
2415
|
{
|
|
2422
2416
|
"internalType": "address[]",
|
|
2423
|
-
"name": "
|
|
2417
|
+
"name": "",
|
|
2424
2418
|
"type": "address[]"
|
|
2425
2419
|
}
|
|
2426
2420
|
],
|
|
@@ -2431,7 +2425,7 @@
|
|
|
2431
2425
|
"inputs": [
|
|
2432
2426
|
{
|
|
2433
2427
|
"internalType": "uint24",
|
|
2434
|
-
"name": "
|
|
2428
|
+
"name": "_perpetualId",
|
|
2435
2429
|
"type": "uint24"
|
|
2436
2430
|
},
|
|
2437
2431
|
{
|
|
@@ -2449,7 +2443,7 @@
|
|
|
2449
2443
|
"outputs": [
|
|
2450
2444
|
{
|
|
2451
2445
|
"internalType": "address[]",
|
|
2452
|
-
"name": "
|
|
2446
|
+
"name": "",
|
|
2453
2447
|
"type": "address[]"
|
|
2454
2448
|
}
|
|
2455
2449
|
],
|
|
@@ -2465,7 +2459,7 @@
|
|
|
2465
2459
|
},
|
|
2466
2460
|
{
|
|
2467
2461
|
"internalType": "address",
|
|
2468
|
-
"name": "
|
|
2462
|
+
"name": "_brokerAddr",
|
|
2469
2463
|
"type": "address"
|
|
2470
2464
|
}
|
|
2471
2465
|
],
|
|
@@ -2729,7 +2723,7 @@
|
|
|
2729
2723
|
"inputs": [
|
|
2730
2724
|
{
|
|
2731
2725
|
"internalType": "uint8",
|
|
2732
|
-
"name": "
|
|
2726
|
+
"name": "_poolId",
|
|
2733
2727
|
"type": "uint8"
|
|
2734
2728
|
}
|
|
2735
2729
|
],
|
|
@@ -2767,11 +2761,6 @@
|
|
|
2767
2761
|
"name": "iFundTransferConvergenceHours",
|
|
2768
2762
|
"type": "uint16"
|
|
2769
2763
|
},
|
|
2770
|
-
{
|
|
2771
|
-
"internalType": "address",
|
|
2772
|
-
"name": "treasuryAddress",
|
|
2773
|
-
"type": "address"
|
|
2774
|
-
},
|
|
2775
2764
|
{
|
|
2776
2765
|
"internalType": "address",
|
|
2777
2766
|
"name": "marginTokenAddress",
|
|
@@ -2850,7 +2839,7 @@
|
|
|
2850
2839
|
},
|
|
2851
2840
|
{
|
|
2852
2841
|
"internalType": "address",
|
|
2853
|
-
"name": "
|
|
2842
|
+
"name": "_traderAddress",
|
|
2854
2843
|
"type": "address"
|
|
2855
2844
|
}
|
|
2856
2845
|
],
|
|
@@ -2878,6 +2867,11 @@
|
|
|
2878
2867
|
"name": "fUnitAccumulatedFundingStart",
|
|
2879
2868
|
"type": "int128"
|
|
2880
2869
|
},
|
|
2870
|
+
{
|
|
2871
|
+
"internalType": "uint64",
|
|
2872
|
+
"name": "iLastOpenBlock",
|
|
2873
|
+
"type": "uint64"
|
|
2874
|
+
},
|
|
2881
2875
|
{
|
|
2882
2876
|
"internalType": "uint16",
|
|
2883
2877
|
"name": "feeTbps",
|
|
@@ -2902,25 +2896,6 @@
|
|
|
2902
2896
|
"stateMutability": "view",
|
|
2903
2897
|
"type": "function"
|
|
2904
2898
|
},
|
|
2905
|
-
{
|
|
2906
|
-
"inputs": [
|
|
2907
|
-
{
|
|
2908
|
-
"internalType": "uint24",
|
|
2909
|
-
"name": "_perpetualId",
|
|
2910
|
-
"type": "uint24"
|
|
2911
|
-
}
|
|
2912
|
-
],
|
|
2913
|
-
"name": "getMaxPosition",
|
|
2914
|
-
"outputs": [
|
|
2915
|
-
{
|
|
2916
|
-
"internalType": "int128",
|
|
2917
|
-
"name": "",
|
|
2918
|
-
"type": "int128"
|
|
2919
|
-
}
|
|
2920
|
-
],
|
|
2921
|
-
"stateMutability": "view",
|
|
2922
|
-
"type": "function"
|
|
2923
|
-
},
|
|
2924
2899
|
{
|
|
2925
2900
|
"inputs": [
|
|
2926
2901
|
{
|
|
@@ -2986,89 +2961,60 @@
|
|
|
2986
2961
|
"inputs": [
|
|
2987
2962
|
{
|
|
2988
2963
|
"internalType": "uint24",
|
|
2989
|
-
"name": "
|
|
2964
|
+
"name": "_perpetualId",
|
|
2990
2965
|
"type": "uint24"
|
|
2991
|
-
}
|
|
2966
|
+
}
|
|
2967
|
+
],
|
|
2968
|
+
"name": "getOrderBookAddress",
|
|
2969
|
+
"outputs": [
|
|
2970
|
+
{
|
|
2971
|
+
"internalType": "address",
|
|
2972
|
+
"name": "",
|
|
2973
|
+
"type": "address"
|
|
2974
|
+
}
|
|
2975
|
+
],
|
|
2976
|
+
"stateMutability": "view",
|
|
2977
|
+
"type": "function"
|
|
2978
|
+
},
|
|
2979
|
+
{
|
|
2980
|
+
"inputs": [],
|
|
2981
|
+
"name": "getOrderBookFactoryAddress",
|
|
2982
|
+
"outputs": [
|
|
2992
2983
|
{
|
|
2993
2984
|
"internalType": "address",
|
|
2994
|
-
"name": "
|
|
2985
|
+
"name": "",
|
|
2995
2986
|
"type": "address"
|
|
2996
2987
|
}
|
|
2997
2988
|
],
|
|
2998
|
-
"
|
|
2989
|
+
"stateMutability": "view",
|
|
2990
|
+
"type": "function"
|
|
2991
|
+
},
|
|
2992
|
+
{
|
|
2993
|
+
"inputs": [
|
|
2994
|
+
{
|
|
2995
|
+
"internalType": "uint24",
|
|
2996
|
+
"name": "_perpetualId",
|
|
2997
|
+
"type": "uint24"
|
|
2998
|
+
}
|
|
2999
|
+
],
|
|
3000
|
+
"name": "getPerpetual",
|
|
2999
3001
|
"outputs": [
|
|
3000
3002
|
{
|
|
3001
3003
|
"components": [
|
|
3002
3004
|
{
|
|
3003
|
-
"internalType": "
|
|
3004
|
-
"name": "
|
|
3005
|
-
"type": "
|
|
3005
|
+
"internalType": "uint8",
|
|
3006
|
+
"name": "poolId",
|
|
3007
|
+
"type": "uint8"
|
|
3006
3008
|
},
|
|
3007
3009
|
{
|
|
3008
|
-
"internalType": "
|
|
3009
|
-
"name": "
|
|
3010
|
-
"type": "
|
|
3010
|
+
"internalType": "uint24",
|
|
3011
|
+
"name": "id",
|
|
3012
|
+
"type": "uint24"
|
|
3011
3013
|
},
|
|
3012
3014
|
{
|
|
3013
|
-
"internalType": "
|
|
3014
|
-
"name": "
|
|
3015
|
-
"type": "
|
|
3016
|
-
},
|
|
3017
|
-
{
|
|
3018
|
-
"internalType": "int128",
|
|
3019
|
-
"name": "fUnitAccumulatedFundingStart",
|
|
3020
|
-
"type": "int128"
|
|
3021
|
-
},
|
|
3022
|
-
{
|
|
3023
|
-
"internalType": "uint16",
|
|
3024
|
-
"name": "feeTbps",
|
|
3025
|
-
"type": "uint16"
|
|
3026
|
-
},
|
|
3027
|
-
{
|
|
3028
|
-
"internalType": "uint16",
|
|
3029
|
-
"name": "brokerFeeTbps",
|
|
3030
|
-
"type": "uint16"
|
|
3031
|
-
},
|
|
3032
|
-
{
|
|
3033
|
-
"internalType": "bytes16",
|
|
3034
|
-
"name": "positionId",
|
|
3035
|
-
"type": "bytes16"
|
|
3036
|
-
}
|
|
3037
|
-
],
|
|
3038
|
-
"internalType": "struct PerpStorage.MarginAccount",
|
|
3039
|
-
"name": "",
|
|
3040
|
-
"type": "tuple"
|
|
3041
|
-
}
|
|
3042
|
-
],
|
|
3043
|
-
"stateMutability": "view",
|
|
3044
|
-
"type": "function"
|
|
3045
|
-
},
|
|
3046
|
-
{
|
|
3047
|
-
"inputs": [
|
|
3048
|
-
{
|
|
3049
|
-
"internalType": "uint24",
|
|
3050
|
-
"name": "_perpetualId",
|
|
3051
|
-
"type": "uint24"
|
|
3052
|
-
}
|
|
3053
|
-
],
|
|
3054
|
-
"name": "getPerpetual",
|
|
3055
|
-
"outputs": [
|
|
3056
|
-
{
|
|
3057
|
-
"components": [
|
|
3058
|
-
{
|
|
3059
|
-
"internalType": "uint8",
|
|
3060
|
-
"name": "poolId",
|
|
3061
|
-
"type": "uint8"
|
|
3062
|
-
},
|
|
3063
|
-
{
|
|
3064
|
-
"internalType": "uint24",
|
|
3065
|
-
"name": "id",
|
|
3066
|
-
"type": "uint24"
|
|
3067
|
-
},
|
|
3068
|
-
{
|
|
3069
|
-
"internalType": "int32",
|
|
3070
|
-
"name": "fSigma3",
|
|
3071
|
-
"type": "int32"
|
|
3015
|
+
"internalType": "int32",
|
|
3016
|
+
"name": "fSigma3",
|
|
3017
|
+
"type": "int32"
|
|
3072
3018
|
},
|
|
3073
3019
|
{
|
|
3074
3020
|
"internalType": "int32",
|
|
@@ -3082,7 +3028,7 @@
|
|
|
3082
3028
|
},
|
|
3083
3029
|
{
|
|
3084
3030
|
"internalType": "uint64",
|
|
3085
|
-
"name": "
|
|
3031
|
+
"name": "iLastSettlementPriceUpdateBlock",
|
|
3086
3032
|
"type": "uint64"
|
|
3087
3033
|
},
|
|
3088
3034
|
{
|
|
@@ -3281,9 +3227,19 @@
|
|
|
3281
3227
|
"type": "int32"
|
|
3282
3228
|
},
|
|
3283
3229
|
{
|
|
3284
|
-
"internalType": "
|
|
3285
|
-
"name": "
|
|
3286
|
-
"type": "
|
|
3230
|
+
"internalType": "uint16",
|
|
3231
|
+
"name": "minimalSpreadTbps",
|
|
3232
|
+
"type": "uint16"
|
|
3233
|
+
},
|
|
3234
|
+
{
|
|
3235
|
+
"internalType": "uint16",
|
|
3236
|
+
"name": "jumpSpreadTbps",
|
|
3237
|
+
"type": "uint16"
|
|
3238
|
+
},
|
|
3239
|
+
{
|
|
3240
|
+
"internalType": "uint64",
|
|
3241
|
+
"name": "iLastPriceJumpBlock",
|
|
3242
|
+
"type": "uint64"
|
|
3287
3243
|
},
|
|
3288
3244
|
{
|
|
3289
3245
|
"internalType": "uint64",
|
|
@@ -3595,17 +3551,17 @@
|
|
|
3595
3551
|
"type": "uint8"
|
|
3596
3552
|
},
|
|
3597
3553
|
{
|
|
3598
|
-
"internalType": "
|
|
3599
|
-
"name": "
|
|
3600
|
-
"type": "
|
|
3554
|
+
"internalType": "uint256",
|
|
3555
|
+
"name": "_shareAmount",
|
|
3556
|
+
"type": "uint256"
|
|
3601
3557
|
}
|
|
3602
3558
|
],
|
|
3603
3559
|
"name": "getTokenAmountToReturn",
|
|
3604
3560
|
"outputs": [
|
|
3605
3561
|
{
|
|
3606
|
-
"internalType": "
|
|
3562
|
+
"internalType": "uint256",
|
|
3607
3563
|
"name": "",
|
|
3608
|
-
"type": "
|
|
3564
|
+
"type": "uint256"
|
|
3609
3565
|
}
|
|
3610
3566
|
],
|
|
3611
3567
|
"stateMutability": "view",
|
|
@@ -3615,12 +3571,12 @@
|
|
|
3615
3571
|
"inputs": [
|
|
3616
3572
|
{
|
|
3617
3573
|
"internalType": "uint24",
|
|
3618
|
-
"name": "
|
|
3574
|
+
"name": "_perpetualId",
|
|
3619
3575
|
"type": "uint24"
|
|
3620
3576
|
},
|
|
3621
3577
|
{
|
|
3622
3578
|
"internalType": "address",
|
|
3623
|
-
"name": "
|
|
3579
|
+
"name": "_traderAddress",
|
|
3624
3580
|
"type": "address"
|
|
3625
3581
|
}
|
|
3626
3582
|
],
|
|
@@ -3635,11 +3591,24 @@
|
|
|
3635
3591
|
"stateMutability": "view",
|
|
3636
3592
|
"type": "function"
|
|
3637
3593
|
},
|
|
3594
|
+
{
|
|
3595
|
+
"inputs": [],
|
|
3596
|
+
"name": "getTreasuryAddress",
|
|
3597
|
+
"outputs": [
|
|
3598
|
+
{
|
|
3599
|
+
"internalType": "address",
|
|
3600
|
+
"name": "",
|
|
3601
|
+
"type": "address"
|
|
3602
|
+
}
|
|
3603
|
+
],
|
|
3604
|
+
"stateMutability": "view",
|
|
3605
|
+
"type": "function"
|
|
3606
|
+
},
|
|
3638
3607
|
{
|
|
3639
3608
|
"inputs": [
|
|
3640
3609
|
{
|
|
3641
3610
|
"internalType": "uint24",
|
|
3642
|
-
"name": "
|
|
3611
|
+
"name": "_perpetualId",
|
|
3643
3612
|
"type": "uint24"
|
|
3644
3613
|
},
|
|
3645
3614
|
{
|
|
@@ -3659,6 +3628,30 @@
|
|
|
3659
3628
|
"stateMutability": "nonpayable",
|
|
3660
3629
|
"type": "function"
|
|
3661
3630
|
},
|
|
3631
|
+
{
|
|
3632
|
+
"inputs": [
|
|
3633
|
+
{
|
|
3634
|
+
"internalType": "uint256",
|
|
3635
|
+
"name": "_numBlockSinceLastOpen",
|
|
3636
|
+
"type": "uint256"
|
|
3637
|
+
},
|
|
3638
|
+
{
|
|
3639
|
+
"internalType": "int128",
|
|
3640
|
+
"name": "_fLambda",
|
|
3641
|
+
"type": "int128"
|
|
3642
|
+
}
|
|
3643
|
+
],
|
|
3644
|
+
"name": "holdingPeriodPenalty",
|
|
3645
|
+
"outputs": [
|
|
3646
|
+
{
|
|
3647
|
+
"internalType": "uint16",
|
|
3648
|
+
"name": "",
|
|
3649
|
+
"type": "uint16"
|
|
3650
|
+
}
|
|
3651
|
+
],
|
|
3652
|
+
"stateMutability": "pure",
|
|
3653
|
+
"type": "function"
|
|
3654
|
+
},
|
|
3662
3655
|
{
|
|
3663
3656
|
"inputs": [
|
|
3664
3657
|
{
|
|
@@ -3686,7 +3679,7 @@
|
|
|
3686
3679
|
},
|
|
3687
3680
|
{
|
|
3688
3681
|
"internalType": "address",
|
|
3689
|
-
"name": "
|
|
3682
|
+
"name": "_traderAddress",
|
|
3690
3683
|
"type": "address"
|
|
3691
3684
|
}
|
|
3692
3685
|
],
|
|
@@ -3743,12 +3736,12 @@
|
|
|
3743
3736
|
"inputs": [
|
|
3744
3737
|
{
|
|
3745
3738
|
"internalType": "uint24",
|
|
3746
|
-
"name": "
|
|
3739
|
+
"name": "_perpetualId",
|
|
3747
3740
|
"type": "uint24"
|
|
3748
3741
|
},
|
|
3749
3742
|
{
|
|
3750
3743
|
"internalType": "address",
|
|
3751
|
-
"name": "
|
|
3744
|
+
"name": "_traderAddress",
|
|
3752
3745
|
"type": "address"
|
|
3753
3746
|
}
|
|
3754
3747
|
],
|
|
@@ -3857,14 +3850,19 @@
|
|
|
3857
3850
|
"type": "int128"
|
|
3858
3851
|
},
|
|
3859
3852
|
{
|
|
3860
|
-
"internalType": "
|
|
3853
|
+
"internalType": "uint64",
|
|
3861
3854
|
"name": "iDeadline",
|
|
3862
|
-
"type": "
|
|
3855
|
+
"type": "uint64"
|
|
3863
3856
|
},
|
|
3864
3857
|
{
|
|
3865
|
-
"internalType": "
|
|
3858
|
+
"internalType": "uint64",
|
|
3866
3859
|
"name": "createdTimestamp",
|
|
3867
|
-
"type": "
|
|
3860
|
+
"type": "uint64"
|
|
3861
|
+
},
|
|
3862
|
+
{
|
|
3863
|
+
"internalType": "uint64",
|
|
3864
|
+
"name": "submittedBlock",
|
|
3865
|
+
"type": "uint64"
|
|
3868
3866
|
}
|
|
3869
3867
|
],
|
|
3870
3868
|
"internalType": "struct IPerpetualOrder.Order",
|
|
@@ -3954,6 +3952,96 @@
|
|
|
3954
3952
|
"stateMutability": "nonpayable",
|
|
3955
3953
|
"type": "function"
|
|
3956
3954
|
},
|
|
3955
|
+
{
|
|
3956
|
+
"inputs": [
|
|
3957
|
+
{
|
|
3958
|
+
"components": [
|
|
3959
|
+
{
|
|
3960
|
+
"internalType": "uint32",
|
|
3961
|
+
"name": "flags",
|
|
3962
|
+
"type": "uint32"
|
|
3963
|
+
},
|
|
3964
|
+
{
|
|
3965
|
+
"internalType": "uint24",
|
|
3966
|
+
"name": "iPerpetualId",
|
|
3967
|
+
"type": "uint24"
|
|
3968
|
+
},
|
|
3969
|
+
{
|
|
3970
|
+
"internalType": "uint16",
|
|
3971
|
+
"name": "brokerFeeTbps",
|
|
3972
|
+
"type": "uint16"
|
|
3973
|
+
},
|
|
3974
|
+
{
|
|
3975
|
+
"internalType": "address",
|
|
3976
|
+
"name": "traderAddr",
|
|
3977
|
+
"type": "address"
|
|
3978
|
+
},
|
|
3979
|
+
{
|
|
3980
|
+
"internalType": "address",
|
|
3981
|
+
"name": "brokerAddr",
|
|
3982
|
+
"type": "address"
|
|
3983
|
+
},
|
|
3984
|
+
{
|
|
3985
|
+
"internalType": "address",
|
|
3986
|
+
"name": "referrerAddr",
|
|
3987
|
+
"type": "address"
|
|
3988
|
+
},
|
|
3989
|
+
{
|
|
3990
|
+
"internalType": "bytes",
|
|
3991
|
+
"name": "brokerSignature",
|
|
3992
|
+
"type": "bytes"
|
|
3993
|
+
},
|
|
3994
|
+
{
|
|
3995
|
+
"internalType": "int128",
|
|
3996
|
+
"name": "fAmount",
|
|
3997
|
+
"type": "int128"
|
|
3998
|
+
},
|
|
3999
|
+
{
|
|
4000
|
+
"internalType": "int128",
|
|
4001
|
+
"name": "fLimitPrice",
|
|
4002
|
+
"type": "int128"
|
|
4003
|
+
},
|
|
4004
|
+
{
|
|
4005
|
+
"internalType": "int128",
|
|
4006
|
+
"name": "fTriggerPrice",
|
|
4007
|
+
"type": "int128"
|
|
4008
|
+
},
|
|
4009
|
+
{
|
|
4010
|
+
"internalType": "int128",
|
|
4011
|
+
"name": "fLeverage",
|
|
4012
|
+
"type": "int128"
|
|
4013
|
+
},
|
|
4014
|
+
{
|
|
4015
|
+
"internalType": "uint64",
|
|
4016
|
+
"name": "iDeadline",
|
|
4017
|
+
"type": "uint64"
|
|
4018
|
+
},
|
|
4019
|
+
{
|
|
4020
|
+
"internalType": "uint64",
|
|
4021
|
+
"name": "createdTimestamp",
|
|
4022
|
+
"type": "uint64"
|
|
4023
|
+
},
|
|
4024
|
+
{
|
|
4025
|
+
"internalType": "uint64",
|
|
4026
|
+
"name": "submittedBlock",
|
|
4027
|
+
"type": "uint64"
|
|
4028
|
+
}
|
|
4029
|
+
],
|
|
4030
|
+
"internalType": "struct IPerpetualOrder.Order",
|
|
4031
|
+
"name": "_order",
|
|
4032
|
+
"type": "tuple"
|
|
4033
|
+
},
|
|
4034
|
+
{
|
|
4035
|
+
"internalType": "uint16",
|
|
4036
|
+
"name": "_feeTbps",
|
|
4037
|
+
"type": "uint16"
|
|
4038
|
+
}
|
|
4039
|
+
],
|
|
4040
|
+
"name": "rebatePostingFee",
|
|
4041
|
+
"outputs": [],
|
|
4042
|
+
"stateMutability": "nonpayable",
|
|
4043
|
+
"type": "function"
|
|
4044
|
+
},
|
|
3957
4045
|
{
|
|
3958
4046
|
"inputs": [
|
|
3959
4047
|
{
|
|
@@ -4034,9 +4122,9 @@
|
|
|
4034
4122
|
"type": "uint8"
|
|
4035
4123
|
},
|
|
4036
4124
|
{
|
|
4037
|
-
"internalType": "
|
|
4038
|
-
"name": "
|
|
4039
|
-
"type": "
|
|
4125
|
+
"internalType": "uint256",
|
|
4126
|
+
"name": "_shareAmount",
|
|
4127
|
+
"type": "uint256"
|
|
4040
4128
|
}
|
|
4041
4129
|
],
|
|
4042
4130
|
"name": "removeLiquidity",
|
|
@@ -4074,16 +4162,11 @@
|
|
|
4074
4162
|
"inputs": [
|
|
4075
4163
|
{
|
|
4076
4164
|
"internalType": "uint8",
|
|
4077
|
-
"name": "
|
|
4165
|
+
"name": "_delay",
|
|
4078
4166
|
"type": "uint8"
|
|
4079
|
-
},
|
|
4080
|
-
{
|
|
4081
|
-
"internalType": "int128",
|
|
4082
|
-
"name": "_fBrokerCollateralLotSize",
|
|
4083
|
-
"type": "int128"
|
|
4084
4167
|
}
|
|
4085
4168
|
],
|
|
4086
|
-
"name": "
|
|
4169
|
+
"name": "setBlockDelay",
|
|
4087
4170
|
"outputs": [],
|
|
4088
4171
|
"stateMutability": "nonpayable",
|
|
4089
4172
|
"type": "function"
|
|
@@ -4155,24 +4238,6 @@
|
|
|
4155
4238
|
"stateMutability": "nonpayable",
|
|
4156
4239
|
"type": "function"
|
|
4157
4240
|
},
|
|
4158
|
-
{
|
|
4159
|
-
"inputs": [
|
|
4160
|
-
{
|
|
4161
|
-
"internalType": "uint8",
|
|
4162
|
-
"name": "_poolId",
|
|
4163
|
-
"type": "uint8"
|
|
4164
|
-
},
|
|
4165
|
-
{
|
|
4166
|
-
"internalType": "uint16",
|
|
4167
|
-
"name": "_iFundTransferConvergenceHours",
|
|
4168
|
-
"type": "uint16"
|
|
4169
|
-
}
|
|
4170
|
-
],
|
|
4171
|
-
"name": "setFundTransferConvergenceHours",
|
|
4172
|
-
"outputs": [],
|
|
4173
|
-
"stateMutability": "nonpayable",
|
|
4174
|
-
"type": "function"
|
|
4175
|
-
},
|
|
4176
4241
|
{
|
|
4177
4242
|
"inputs": [
|
|
4178
4243
|
{
|
|
@@ -4200,16 +4265,11 @@
|
|
|
4200
4265
|
"inputs": [
|
|
4201
4266
|
{
|
|
4202
4267
|
"internalType": "uint24",
|
|
4203
|
-
"name": "
|
|
4268
|
+
"name": "_iPerpetualId",
|
|
4204
4269
|
"type": "uint24"
|
|
4205
|
-
},
|
|
4206
|
-
{
|
|
4207
|
-
"internalType": "int128",
|
|
4208
|
-
"name": "_value",
|
|
4209
|
-
"type": "int128"
|
|
4210
4270
|
}
|
|
4211
4271
|
],
|
|
4212
|
-
"name": "
|
|
4272
|
+
"name": "setNormalState",
|
|
4213
4273
|
"outputs": [],
|
|
4214
4274
|
"stateMutability": "nonpayable",
|
|
4215
4275
|
"type": "function"
|
|
@@ -4217,17 +4277,12 @@
|
|
|
4217
4277
|
{
|
|
4218
4278
|
"inputs": [
|
|
4219
4279
|
{
|
|
4220
|
-
"internalType": "
|
|
4221
|
-
"name": "
|
|
4222
|
-
"type": "
|
|
4223
|
-
},
|
|
4224
|
-
{
|
|
4225
|
-
"internalType": "int128",
|
|
4226
|
-
"name": "_fMaxTransferPerConvergencePeriod",
|
|
4227
|
-
"type": "int128"
|
|
4280
|
+
"internalType": "address",
|
|
4281
|
+
"name": "_oracleFactory",
|
|
4282
|
+
"type": "address"
|
|
4228
4283
|
}
|
|
4229
4284
|
],
|
|
4230
|
-
"name": "
|
|
4285
|
+
"name": "setOracleFactory",
|
|
4231
4286
|
"outputs": [],
|
|
4232
4287
|
"stateMutability": "nonpayable",
|
|
4233
4288
|
"type": "function"
|
|
@@ -4238,40 +4293,27 @@
|
|
|
4238
4293
|
"internalType": "uint24",
|
|
4239
4294
|
"name": "_iPerpetualId",
|
|
4240
4295
|
"type": "uint24"
|
|
4241
|
-
}
|
|
4242
|
-
],
|
|
4243
|
-
"name": "setNormalState",
|
|
4244
|
-
"outputs": [],
|
|
4245
|
-
"stateMutability": "nonpayable",
|
|
4246
|
-
"type": "function"
|
|
4247
|
-
},
|
|
4248
|
-
{
|
|
4249
|
-
"inputs": [
|
|
4296
|
+
},
|
|
4250
4297
|
{
|
|
4251
4298
|
"internalType": "address",
|
|
4252
|
-
"name": "
|
|
4299
|
+
"name": "_oracleAddr",
|
|
4253
4300
|
"type": "address"
|
|
4254
4301
|
}
|
|
4255
4302
|
],
|
|
4256
|
-
"name": "
|
|
4303
|
+
"name": "setOracleForPerpetual",
|
|
4257
4304
|
"outputs": [],
|
|
4258
4305
|
"stateMutability": "nonpayable",
|
|
4259
4306
|
"type": "function"
|
|
4260
4307
|
},
|
|
4261
4308
|
{
|
|
4262
4309
|
"inputs": [
|
|
4263
|
-
{
|
|
4264
|
-
"internalType": "uint24",
|
|
4265
|
-
"name": "_iPerpetualId",
|
|
4266
|
-
"type": "uint24"
|
|
4267
|
-
},
|
|
4268
4310
|
{
|
|
4269
4311
|
"internalType": "address",
|
|
4270
|
-
"name": "
|
|
4312
|
+
"name": "_orderBookFactory",
|
|
4271
4313
|
"type": "address"
|
|
4272
4314
|
}
|
|
4273
4315
|
],
|
|
4274
|
-
"name": "
|
|
4316
|
+
"name": "setOrderBookFactory",
|
|
4275
4317
|
"outputs": [],
|
|
4276
4318
|
"stateMutability": "nonpayable",
|
|
4277
4319
|
"type": "function"
|
|
@@ -4412,12 +4454,17 @@
|
|
|
4412
4454
|
"type": "uint8"
|
|
4413
4455
|
},
|
|
4414
4456
|
{
|
|
4415
|
-
"internalType": "
|
|
4416
|
-
"name": "
|
|
4417
|
-
"type": "
|
|
4457
|
+
"internalType": "string",
|
|
4458
|
+
"name": "_name",
|
|
4459
|
+
"type": "string"
|
|
4460
|
+
},
|
|
4461
|
+
{
|
|
4462
|
+
"internalType": "int128",
|
|
4463
|
+
"name": "_value",
|
|
4464
|
+
"type": "int128"
|
|
4418
4465
|
}
|
|
4419
4466
|
],
|
|
4420
|
-
"name": "
|
|
4467
|
+
"name": "setPoolParam",
|
|
4421
4468
|
"outputs": [],
|
|
4422
4469
|
"stateMutability": "nonpayable",
|
|
4423
4470
|
"type": "function"
|
|
@@ -4460,11 +4507,6 @@
|
|
|
4460
4507
|
},
|
|
4461
4508
|
{
|
|
4462
4509
|
"inputs": [
|
|
4463
|
-
{
|
|
4464
|
-
"internalType": "uint8",
|
|
4465
|
-
"name": "_liqPoolID",
|
|
4466
|
-
"type": "uint8"
|
|
4467
|
-
},
|
|
4468
4510
|
{
|
|
4469
4511
|
"internalType": "address",
|
|
4470
4512
|
"name": "_treasury",
|
|
@@ -4610,107 +4652,27 @@
|
|
|
4610
4652
|
"type": "int128"
|
|
4611
4653
|
},
|
|
4612
4654
|
{
|
|
4613
|
-
"internalType": "
|
|
4655
|
+
"internalType": "uint64",
|
|
4614
4656
|
"name": "iDeadline",
|
|
4615
|
-
"type": "
|
|
4657
|
+
"type": "uint64"
|
|
4616
4658
|
},
|
|
4617
4659
|
{
|
|
4618
|
-
"internalType": "
|
|
4660
|
+
"internalType": "uint64",
|
|
4619
4661
|
"name": "createdTimestamp",
|
|
4620
|
-
"type": "
|
|
4621
|
-
}
|
|
4622
|
-
],
|
|
4623
|
-
"internalType": "struct IPerpetualOrder.Order",
|
|
4624
|
-
"name": "_order",
|
|
4625
|
-
"type": "tuple"
|
|
4626
|
-
}
|
|
4627
|
-
],
|
|
4628
|
-
"name": "trade",
|
|
4629
|
-
"outputs": [],
|
|
4630
|
-
"stateMutability": "nonpayable",
|
|
4631
|
-
"type": "function"
|
|
4632
|
-
},
|
|
4633
|
-
{
|
|
4634
|
-
"inputs": [
|
|
4635
|
-
{
|
|
4636
|
-
"components": [
|
|
4637
|
-
{
|
|
4638
|
-
"internalType": "uint32",
|
|
4639
|
-
"name": "flags",
|
|
4640
|
-
"type": "uint32"
|
|
4641
|
-
},
|
|
4642
|
-
{
|
|
4643
|
-
"internalType": "uint24",
|
|
4644
|
-
"name": "iPerpetualId",
|
|
4645
|
-
"type": "uint24"
|
|
4646
|
-
},
|
|
4647
|
-
{
|
|
4648
|
-
"internalType": "uint16",
|
|
4649
|
-
"name": "brokerFeeTbps",
|
|
4650
|
-
"type": "uint16"
|
|
4651
|
-
},
|
|
4652
|
-
{
|
|
4653
|
-
"internalType": "address",
|
|
4654
|
-
"name": "traderAddr",
|
|
4655
|
-
"type": "address"
|
|
4656
|
-
},
|
|
4657
|
-
{
|
|
4658
|
-
"internalType": "address",
|
|
4659
|
-
"name": "brokerAddr",
|
|
4660
|
-
"type": "address"
|
|
4661
|
-
},
|
|
4662
|
-
{
|
|
4663
|
-
"internalType": "address",
|
|
4664
|
-
"name": "referrerAddr",
|
|
4665
|
-
"type": "address"
|
|
4666
|
-
},
|
|
4667
|
-
{
|
|
4668
|
-
"internalType": "bytes",
|
|
4669
|
-
"name": "brokerSignature",
|
|
4670
|
-
"type": "bytes"
|
|
4671
|
-
},
|
|
4672
|
-
{
|
|
4673
|
-
"internalType": "int128",
|
|
4674
|
-
"name": "fAmount",
|
|
4675
|
-
"type": "int128"
|
|
4676
|
-
},
|
|
4677
|
-
{
|
|
4678
|
-
"internalType": "int128",
|
|
4679
|
-
"name": "fLimitPrice",
|
|
4680
|
-
"type": "int128"
|
|
4681
|
-
},
|
|
4682
|
-
{
|
|
4683
|
-
"internalType": "int128",
|
|
4684
|
-
"name": "fTriggerPrice",
|
|
4685
|
-
"type": "int128"
|
|
4686
|
-
},
|
|
4687
|
-
{
|
|
4688
|
-
"internalType": "int128",
|
|
4689
|
-
"name": "fLeverage",
|
|
4690
|
-
"type": "int128"
|
|
4691
|
-
},
|
|
4692
|
-
{
|
|
4693
|
-
"internalType": "uint256",
|
|
4694
|
-
"name": "iDeadline",
|
|
4695
|
-
"type": "uint256"
|
|
4662
|
+
"type": "uint64"
|
|
4696
4663
|
},
|
|
4697
4664
|
{
|
|
4698
|
-
"internalType": "
|
|
4699
|
-
"name": "
|
|
4700
|
-
"type": "
|
|
4665
|
+
"internalType": "uint64",
|
|
4666
|
+
"name": "submittedBlock",
|
|
4667
|
+
"type": "uint64"
|
|
4701
4668
|
}
|
|
4702
4669
|
],
|
|
4703
4670
|
"internalType": "struct IPerpetualOrder.Order",
|
|
4704
4671
|
"name": "_order",
|
|
4705
4672
|
"type": "tuple"
|
|
4706
|
-
},
|
|
4707
|
-
{
|
|
4708
|
-
"internalType": "bytes",
|
|
4709
|
-
"name": "signature",
|
|
4710
|
-
"type": "bytes"
|
|
4711
4673
|
}
|
|
4712
4674
|
],
|
|
4713
|
-
"name": "
|
|
4675
|
+
"name": "tradeViaOrderBook",
|
|
4714
4676
|
"outputs": [],
|
|
4715
4677
|
"stateMutability": "nonpayable",
|
|
4716
4678
|
"type": "function"
|
|
@@ -4905,6 +4867,40 @@
|
|
|
4905
4867
|
"stateMutability": "pure",
|
|
4906
4868
|
"type": "function"
|
|
4907
4869
|
},
|
|
4870
|
+
{
|
|
4871
|
+
"inputs": [
|
|
4872
|
+
{
|
|
4873
|
+
"internalType": "uint16",
|
|
4874
|
+
"name": "_jumpTbps",
|
|
4875
|
+
"type": "uint16"
|
|
4876
|
+
},
|
|
4877
|
+
{
|
|
4878
|
+
"internalType": "uint16",
|
|
4879
|
+
"name": "_MinimalSpreadTbps",
|
|
4880
|
+
"type": "uint16"
|
|
4881
|
+
},
|
|
4882
|
+
{
|
|
4883
|
+
"internalType": "uint256",
|
|
4884
|
+
"name": "_numBlockSinceJump",
|
|
4885
|
+
"type": "uint256"
|
|
4886
|
+
},
|
|
4887
|
+
{
|
|
4888
|
+
"internalType": "int128",
|
|
4889
|
+
"name": "_fLambda",
|
|
4890
|
+
"type": "int128"
|
|
4891
|
+
}
|
|
4892
|
+
],
|
|
4893
|
+
"name": "volatilitySpread",
|
|
4894
|
+
"outputs": [
|
|
4895
|
+
{
|
|
4896
|
+
"internalType": "int128",
|
|
4897
|
+
"name": "",
|
|
4898
|
+
"type": "int128"
|
|
4899
|
+
}
|
|
4900
|
+
],
|
|
4901
|
+
"stateMutability": "pure",
|
|
4902
|
+
"type": "function"
|
|
4903
|
+
},
|
|
4908
4904
|
{
|
|
4909
4905
|
"inputs": [
|
|
4910
4906
|
{
|