@basedone/core 0.1.8 → 0.1.10
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/index.d.mts +74 -7
- package/dist/index.d.ts +74 -7
- package/dist/index.js +1011 -154
- package/dist/index.mjs +46 -21
- package/dist/{meta-57AY44US.mjs → meta-FVJIMALT.mjs} +2 -4
- package/dist/{meta-RSZFFH63.mjs → meta-UOGUG3OW.mjs} +2 -4
- package/dist/{perpDexs-XSB4Y2BP.mjs → perpDexs-G7V2QIM6.mjs} +646 -114
- package/dist/{perpDexs-PBKWKKQU.mjs → perpDexs-GGL32HT4.mjs} +64 -6
- package/dist/{spotMeta-WQ4PXRNY.mjs → spotMeta-OD7S6HGW.mjs} +61 -5
- package/dist/{spotMeta-Y7G2GI7B.mjs → spotMeta-PCN4Z4R3.mjs} +195 -6
- package/index.ts +1 -0
- package/lib/cloid/cloid.ts +2 -0
- package/lib/fee.ts +10 -10
- package/lib/hip3/market-info.ts +36 -8
- package/lib/hip3/utils.ts +15 -2
- package/lib/meta/data/mainnet/meta.json +2 -4
- package/lib/meta/data/mainnet/perpDexs.json +64 -6
- package/lib/meta/data/mainnet/spotMeta.json +61 -5
- package/lib/meta/data/testnet/meta.json +2 -4
- package/lib/meta/data/testnet/perpDexs.json +646 -114
- package/lib/meta/data/testnet/spotMeta.json +195 -6
- package/lib/meta/metadata.ts +8 -1
- package/lib/meta/types.ts +36 -0
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ var perpDexs_default = [
|
|
|
8
8
|
fullName: "XYZ",
|
|
9
9
|
deployer: "0x88806a71d74ad0a510b350545c9ae490912f0888",
|
|
10
10
|
oracleUpdater: null,
|
|
11
|
-
feeRecipient: "
|
|
11
|
+
feeRecipient: "0x97f46f90c04efb91d0d740bd263e76683ca6f904",
|
|
12
12
|
assetToStreamingOiCap: [
|
|
13
13
|
[
|
|
14
14
|
"xyz:AAPL",
|
|
@@ -28,7 +28,7 @@ var perpDexs_default = [
|
|
|
28
28
|
],
|
|
29
29
|
[
|
|
30
30
|
"xyz:GOOGL",
|
|
31
|
-
"
|
|
31
|
+
"50000000.0"
|
|
32
32
|
],
|
|
33
33
|
[
|
|
34
34
|
"xyz:HOOD",
|
|
@@ -85,9 +85,13 @@ var perpDexs_default = [
|
|
|
85
85
|
oracleUpdater: "0x94757f8dcb4bf73b850195660e959d1105cfedd5",
|
|
86
86
|
feeRecipient: "0xe2872b5ae7dcbba40cc4510d08c8bbea95b42d43",
|
|
87
87
|
assetToStreamingOiCap: [
|
|
88
|
+
[
|
|
89
|
+
"flx:COIN",
|
|
90
|
+
"2000000.0"
|
|
91
|
+
],
|
|
88
92
|
[
|
|
89
93
|
"flx:CRCL",
|
|
90
|
-
"
|
|
94
|
+
"2000000.0"
|
|
91
95
|
],
|
|
92
96
|
[
|
|
93
97
|
"flx:TSLA",
|
|
@@ -145,6 +149,24 @@ var perpDexs_default = [
|
|
|
145
149
|
"0xae083732032a813f9142733cdf380e1bc9e518af",
|
|
146
150
|
"0xd0d4ef34424af3da883672b8cdeca751293655a5"
|
|
147
151
|
]
|
|
152
|
+
],
|
|
153
|
+
[
|
|
154
|
+
"setMarginModes",
|
|
155
|
+
[
|
|
156
|
+
"0xd0d4ef34424af3da883672b8cdeca751293655a5"
|
|
157
|
+
]
|
|
158
|
+
],
|
|
159
|
+
[
|
|
160
|
+
"setFeeScale",
|
|
161
|
+
[
|
|
162
|
+
"0xd0d4ef34424af3da883672b8cdeca751293655a5"
|
|
163
|
+
]
|
|
164
|
+
],
|
|
165
|
+
[
|
|
166
|
+
"setGrowthModes",
|
|
167
|
+
[
|
|
168
|
+
"0xd0d4ef34424af3da883672b8cdeca751293655a5"
|
|
169
|
+
]
|
|
148
170
|
]
|
|
149
171
|
],
|
|
150
172
|
deployerFeeScale: "1.0",
|
|
@@ -157,13 +179,17 @@ var perpDexs_default = [
|
|
|
157
179
|
oracleUpdater: null,
|
|
158
180
|
feeRecipient: "0x5afe865300895b96d20132a8d9fa8e7829334b52",
|
|
159
181
|
assetToStreamingOiCap: [
|
|
182
|
+
[
|
|
183
|
+
"vntl:ANTHROPIC",
|
|
184
|
+
"3000000.0"
|
|
185
|
+
],
|
|
160
186
|
[
|
|
161
187
|
"vntl:OPENAI",
|
|
162
|
-
"
|
|
188
|
+
"3000000.0"
|
|
163
189
|
],
|
|
164
190
|
[
|
|
165
191
|
"vntl:SPACEX",
|
|
166
|
-
"
|
|
192
|
+
"3000000.0"
|
|
167
193
|
]
|
|
168
194
|
],
|
|
169
195
|
subDeployers: [
|
|
@@ -188,12 +214,44 @@ var perpDexs_default = [
|
|
|
188
214
|
[
|
|
189
215
|
"setFundingMultipliers",
|
|
190
216
|
[
|
|
191
|
-
"0x6bdf4b47b638a8bb8ba630fbf867dc0f458d953e"
|
|
217
|
+
"0x6bdf4b47b638a8bb8ba630fbf867dc0f458d953e",
|
|
218
|
+
"0x9f82ce39734468c213f46834d0189222e1fadf5b"
|
|
192
219
|
]
|
|
193
220
|
]
|
|
194
221
|
],
|
|
195
222
|
deployerFeeScale: "1.0",
|
|
196
223
|
lastDeployerFeeScaleChangeTime: "1970-01-01T00:00:00"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: "hyna",
|
|
227
|
+
fullName: "HyENA",
|
|
228
|
+
deployer: "0x53e655101ea361537124ef814ad4e654b54d0637",
|
|
229
|
+
oracleUpdater: "0xaab93501e78f5105e265a1eafda10ce6530de17e",
|
|
230
|
+
feeRecipient: null,
|
|
231
|
+
assetToStreamingOiCap: [
|
|
232
|
+
[
|
|
233
|
+
"hyna:BTC",
|
|
234
|
+
"500000.0"
|
|
235
|
+
],
|
|
236
|
+
[
|
|
237
|
+
"hyna:ETH",
|
|
238
|
+
"500000.0"
|
|
239
|
+
],
|
|
240
|
+
[
|
|
241
|
+
"hyna:HYPE",
|
|
242
|
+
"500000.0"
|
|
243
|
+
]
|
|
244
|
+
],
|
|
245
|
+
subDeployers: [
|
|
246
|
+
[
|
|
247
|
+
"setOracle",
|
|
248
|
+
[
|
|
249
|
+
"0xaab93501e78f5105e265a1eafda10ce6530de17e"
|
|
250
|
+
]
|
|
251
|
+
]
|
|
252
|
+
],
|
|
253
|
+
deployerFeeScale: "1.0",
|
|
254
|
+
lastDeployerFeeScaleChangeTime: "2025-12-03T10:32:09.252520621"
|
|
197
255
|
}
|
|
198
256
|
];
|
|
199
257
|
export {
|
|
@@ -2143,6 +2143,42 @@ var universe = [
|
|
|
2143
2143
|
name: "@253",
|
|
2144
2144
|
index: 253,
|
|
2145
2145
|
isCanonical: false
|
|
2146
|
+
},
|
|
2147
|
+
{
|
|
2148
|
+
tokens: [
|
|
2149
|
+
124,
|
|
2150
|
+
360
|
|
2151
|
+
],
|
|
2152
|
+
name: "@254",
|
|
2153
|
+
index: 254,
|
|
2154
|
+
isCanonical: false
|
|
2155
|
+
},
|
|
2156
|
+
{
|
|
2157
|
+
tokens: [
|
|
2158
|
+
150,
|
|
2159
|
+
235
|
|
2160
|
+
],
|
|
2161
|
+
name: "@255",
|
|
2162
|
+
index: 255,
|
|
2163
|
+
isCanonical: false
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
tokens: [
|
|
2167
|
+
374,
|
|
2168
|
+
0
|
|
2169
|
+
],
|
|
2170
|
+
name: "@256",
|
|
2171
|
+
index: 256,
|
|
2172
|
+
isCanonical: false
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
tokens: [
|
|
2176
|
+
403,
|
|
2177
|
+
0
|
|
2178
|
+
],
|
|
2179
|
+
name: "@257",
|
|
2180
|
+
index: 257,
|
|
2181
|
+
isCanonical: false
|
|
2146
2182
|
}
|
|
2147
2183
|
];
|
|
2148
2184
|
var tokens = [
|
|
@@ -3574,9 +3610,12 @@ var tokens = [
|
|
|
3574
3610
|
index: 124,
|
|
3575
3611
|
tokenId: "0xbd31bd605c0a1b82c72aae3587f9061f",
|
|
3576
3612
|
isCanonical: false,
|
|
3577
|
-
evmContract:
|
|
3613
|
+
evmContract: {
|
|
3614
|
+
address: "0x000000000000780555bd0bca3791f89f9542c2d6",
|
|
3615
|
+
evm_extra_wei_decimals: 10
|
|
3616
|
+
},
|
|
3578
3617
|
fullName: "Kinetiq",
|
|
3579
|
-
deployerTradingFeeShare: "
|
|
3618
|
+
deployerTradingFeeShare: "1.0"
|
|
3580
3619
|
},
|
|
3581
3620
|
{
|
|
3582
3621
|
name: "BUSSY",
|
|
@@ -4068,7 +4107,7 @@ var tokens = [
|
|
|
4068
4107
|
evm_extra_wei_decimals: 10
|
|
4069
4108
|
},
|
|
4070
4109
|
fullName: null,
|
|
4071
|
-
deployerTradingFeeShare: "
|
|
4110
|
+
deployerTradingFeeShare: "1.0"
|
|
4072
4111
|
},
|
|
4073
4112
|
{
|
|
4074
4113
|
name: "ANIME",
|
|
@@ -6564,7 +6603,10 @@ var tokens = [
|
|
|
6564
6603
|
index: 374,
|
|
6565
6604
|
tokenId: "0x83a0bf54708a0236a49f7301677ffdc2",
|
|
6566
6605
|
isCanonical: false,
|
|
6567
|
-
evmContract:
|
|
6606
|
+
evmContract: {
|
|
6607
|
+
address: "0x4f96b683714377c38123631f2d17cdf18b3f46a7",
|
|
6608
|
+
evm_extra_wei_decimals: 10
|
|
6609
|
+
},
|
|
6568
6610
|
fullName: "SEDA",
|
|
6569
6611
|
deployerTradingFeeShare: "1.0"
|
|
6570
6612
|
},
|
|
@@ -6804,7 +6846,10 @@ var tokens = [
|
|
|
6804
6846
|
index: 395,
|
|
6805
6847
|
tokenId: "0xedfb8d993ee8cb935338601d8673dfcf",
|
|
6806
6848
|
isCanonical: false,
|
|
6807
|
-
evmContract:
|
|
6849
|
+
evmContract: {
|
|
6850
|
+
address: "0x3073f7aaa4db83f95e9fff17424f71d4751a3073",
|
|
6851
|
+
evm_extra_wei_decimals: 0
|
|
6852
|
+
},
|
|
6808
6853
|
fullName: null,
|
|
6809
6854
|
deployerTradingFeeShare: "1.0"
|
|
6810
6855
|
},
|
|
@@ -6884,6 +6929,17 @@ var tokens = [
|
|
|
6884
6929
|
evmContract: null,
|
|
6885
6930
|
fullName: "UltraSolid",
|
|
6886
6931
|
deployerTradingFeeShare: "1.0"
|
|
6932
|
+
},
|
|
6933
|
+
{
|
|
6934
|
+
name: "UMEGA",
|
|
6935
|
+
szDecimals: 1,
|
|
6936
|
+
weiDecimals: 6,
|
|
6937
|
+
index: 403,
|
|
6938
|
+
tokenId: "0xc99926509a189b40651055a15d3be621",
|
|
6939
|
+
isCanonical: false,
|
|
6940
|
+
evmContract: null,
|
|
6941
|
+
fullName: "Unit MegaETH",
|
|
6942
|
+
deployerTradingFeeShare: "1.0"
|
|
6887
6943
|
}
|
|
6888
6944
|
];
|
|
6889
6945
|
var spotMeta_default = {
|
|
@@ -10549,6 +10549,105 @@ var universe = [
|
|
|
10549
10549
|
name: "@1366",
|
|
10550
10550
|
index: 1366,
|
|
10551
10551
|
isCanonical: false
|
|
10552
|
+
},
|
|
10553
|
+
{
|
|
10554
|
+
tokens: [
|
|
10555
|
+
1487,
|
|
10556
|
+
0
|
|
10557
|
+
],
|
|
10558
|
+
name: "@1368",
|
|
10559
|
+
index: 1368,
|
|
10560
|
+
isCanonical: false
|
|
10561
|
+
},
|
|
10562
|
+
{
|
|
10563
|
+
tokens: [
|
|
10564
|
+
1485,
|
|
10565
|
+
0
|
|
10566
|
+
],
|
|
10567
|
+
name: "@1369",
|
|
10568
|
+
index: 1369,
|
|
10569
|
+
isCanonical: false
|
|
10570
|
+
},
|
|
10571
|
+
{
|
|
10572
|
+
tokens: [
|
|
10573
|
+
1490,
|
|
10574
|
+
0
|
|
10575
|
+
],
|
|
10576
|
+
name: "@1370",
|
|
10577
|
+
index: 1370,
|
|
10578
|
+
isCanonical: false
|
|
10579
|
+
},
|
|
10580
|
+
{
|
|
10581
|
+
tokens: [
|
|
10582
|
+
1481,
|
|
10583
|
+
0
|
|
10584
|
+
],
|
|
10585
|
+
name: "@1371",
|
|
10586
|
+
index: 1371,
|
|
10587
|
+
isCanonical: false
|
|
10588
|
+
},
|
|
10589
|
+
{
|
|
10590
|
+
tokens: [
|
|
10591
|
+
1484,
|
|
10592
|
+
0
|
|
10593
|
+
],
|
|
10594
|
+
name: "@1372",
|
|
10595
|
+
index: 1372,
|
|
10596
|
+
isCanonical: false
|
|
10597
|
+
},
|
|
10598
|
+
{
|
|
10599
|
+
tokens: [
|
|
10600
|
+
1477,
|
|
10601
|
+
1452
|
|
10602
|
+
],
|
|
10603
|
+
name: "@1373",
|
|
10604
|
+
index: 1373,
|
|
10605
|
+
isCanonical: false
|
|
10606
|
+
},
|
|
10607
|
+
{
|
|
10608
|
+
tokens: [
|
|
10609
|
+
1492,
|
|
10610
|
+
0
|
|
10611
|
+
],
|
|
10612
|
+
name: "@1374",
|
|
10613
|
+
index: 1374,
|
|
10614
|
+
isCanonical: false
|
|
10615
|
+
},
|
|
10616
|
+
{
|
|
10617
|
+
tokens: [
|
|
10618
|
+
1469,
|
|
10619
|
+
0
|
|
10620
|
+
],
|
|
10621
|
+
name: "@1375",
|
|
10622
|
+
index: 1375,
|
|
10623
|
+
isCanonical: false
|
|
10624
|
+
},
|
|
10625
|
+
{
|
|
10626
|
+
tokens: [
|
|
10627
|
+
1,
|
|
10628
|
+
1295
|
|
10629
|
+
],
|
|
10630
|
+
name: "@1376",
|
|
10631
|
+
index: 1376,
|
|
10632
|
+
isCanonical: true
|
|
10633
|
+
},
|
|
10634
|
+
{
|
|
10635
|
+
tokens: [
|
|
10636
|
+
1493,
|
|
10637
|
+
0
|
|
10638
|
+
],
|
|
10639
|
+
name: "@1377",
|
|
10640
|
+
index: 1377,
|
|
10641
|
+
isCanonical: false
|
|
10642
|
+
},
|
|
10643
|
+
{
|
|
10644
|
+
tokens: [
|
|
10645
|
+
1105,
|
|
10646
|
+
1493
|
|
10647
|
+
],
|
|
10648
|
+
name: "@1378",
|
|
10649
|
+
index: 1378,
|
|
10650
|
+
isCanonical: false
|
|
10552
10651
|
}
|
|
10553
10652
|
];
|
|
10554
10653
|
var tokens = [
|
|
@@ -27092,7 +27191,10 @@ aa aaa\\aaaaaa"aaaa'aaaaa{}`,
|
|
|
27092
27191
|
index: 1469,
|
|
27093
27192
|
tokenId: "0x8e670650571a3ce604ece184eaaf01c0",
|
|
27094
27193
|
isCanonical: false,
|
|
27095
|
-
evmContract:
|
|
27194
|
+
evmContract: {
|
|
27195
|
+
address: "0x03d7cd2d64de683e07f24fd857367d7492c85b22",
|
|
27196
|
+
evm_extra_wei_decimals: 10
|
|
27197
|
+
},
|
|
27096
27198
|
fullName: null,
|
|
27097
27199
|
deployerTradingFeeShare: "1.0"
|
|
27098
27200
|
},
|
|
@@ -27248,7 +27350,10 @@ aa aaa\\aaaaaa"aaaa'aaaaa{}`,
|
|
|
27248
27350
|
index: 1481,
|
|
27249
27351
|
tokenId: "0x21a4632b44112fe0593fccbe5400a701",
|
|
27250
27352
|
isCanonical: false,
|
|
27251
|
-
evmContract:
|
|
27353
|
+
evmContract: {
|
|
27354
|
+
address: "0xed40d1ab429ff92ad66935766fb0f7025125b520",
|
|
27355
|
+
evm_extra_wei_decimals: 4
|
|
27356
|
+
},
|
|
27252
27357
|
fullName: null,
|
|
27253
27358
|
deployerTradingFeeShare: "1.0"
|
|
27254
27359
|
},
|
|
@@ -27284,7 +27389,10 @@ aa aaa\\aaaaaa"aaaa'aaaaa{}`,
|
|
|
27284
27389
|
index: 1484,
|
|
27285
27390
|
tokenId: "0x57df584e21097424d758b228e842d2ef",
|
|
27286
27391
|
isCanonical: false,
|
|
27287
|
-
evmContract:
|
|
27392
|
+
evmContract: {
|
|
27393
|
+
address: "0xe04532bd84a7ee59599a90512a8fcc8484b546b5",
|
|
27394
|
+
evm_extra_wei_decimals: 10
|
|
27395
|
+
},
|
|
27288
27396
|
fullName: null,
|
|
27289
27397
|
deployerTradingFeeShare: "1.0"
|
|
27290
27398
|
},
|
|
@@ -27295,7 +27403,10 @@ aa aaa\\aaaaaa"aaaa'aaaaa{}`,
|
|
|
27295
27403
|
index: 1485,
|
|
27296
27404
|
tokenId: "0x797f444bb03c7be19234b94ca29f3410",
|
|
27297
27405
|
isCanonical: false,
|
|
27298
|
-
evmContract:
|
|
27406
|
+
evmContract: {
|
|
27407
|
+
address: "0x2af50e43e313cfab0e7f46ac95106991cd9baea8",
|
|
27408
|
+
evm_extra_wei_decimals: 10
|
|
27409
|
+
},
|
|
27299
27410
|
fullName: "STABLE",
|
|
27300
27411
|
deployerTradingFeeShare: "1.0"
|
|
27301
27412
|
},
|
|
@@ -27317,7 +27428,10 @@ aa aaa\\aaaaaa"aaaa'aaaaa{}`,
|
|
|
27317
27428
|
index: 1487,
|
|
27318
27429
|
tokenId: "0xd55b27dcaed90223bfc3c378b98526bb",
|
|
27319
27430
|
isCanonical: false,
|
|
27320
|
-
evmContract:
|
|
27431
|
+
evmContract: {
|
|
27432
|
+
address: "0xed3eb348853a670e3bb692dd5e654ad51c2f5128",
|
|
27433
|
+
evm_extra_wei_decimals: 10
|
|
27434
|
+
},
|
|
27321
27435
|
fullName: "MONARCH TEST 1",
|
|
27322
27436
|
deployerTradingFeeShare: "1.0"
|
|
27323
27437
|
},
|
|
@@ -27339,9 +27453,84 @@ aa aaa\\aaaaaa"aaaa'aaaaa{}`,
|
|
|
27339
27453
|
index: 1489,
|
|
27340
27454
|
tokenId: "0x398e2bab402c7f3c9e214d3862d02ada",
|
|
27341
27455
|
isCanonical: false,
|
|
27342
|
-
evmContract:
|
|
27456
|
+
evmContract: {
|
|
27457
|
+
address: "0x000000000000780555bd0bca3791f89f9542c2d6",
|
|
27458
|
+
evm_extra_wei_decimals: 10
|
|
27459
|
+
},
|
|
27343
27460
|
fullName: "They HYPE beta",
|
|
27344
27461
|
deployerTradingFeeShare: "1.0"
|
|
27462
|
+
},
|
|
27463
|
+
{
|
|
27464
|
+
name: "PP",
|
|
27465
|
+
szDecimals: 2,
|
|
27466
|
+
weiDecimals: 8,
|
|
27467
|
+
index: 1490,
|
|
27468
|
+
tokenId: "0xc7a956f1c1174545c713707d2ca67b76",
|
|
27469
|
+
isCanonical: false,
|
|
27470
|
+
evmContract: {
|
|
27471
|
+
address: "0x1fc9929be618ede69b1f71a69440165c885acadc",
|
|
27472
|
+
evm_extra_wei_decimals: 10
|
|
27473
|
+
},
|
|
27474
|
+
fullName: "smol pp",
|
|
27475
|
+
deployerTradingFeeShare: "1.0"
|
|
27476
|
+
},
|
|
27477
|
+
{
|
|
27478
|
+
name: "SLIM",
|
|
27479
|
+
szDecimals: 2,
|
|
27480
|
+
weiDecimals: 8,
|
|
27481
|
+
index: 1491,
|
|
27482
|
+
tokenId: "0x45754dd4d3bb5517fa92dbbe8ccb6392",
|
|
27483
|
+
isCanonical: false,
|
|
27484
|
+
evmContract: {
|
|
27485
|
+
address: "0x719d4dee0fbefebbfbc837b2347840684b891916",
|
|
27486
|
+
evm_extra_wei_decimals: 10
|
|
27487
|
+
},
|
|
27488
|
+
fullName: "The Real Slim Shady",
|
|
27489
|
+
deployerTradingFeeShare: "1.0"
|
|
27490
|
+
},
|
|
27491
|
+
{
|
|
27492
|
+
name: "USDZ",
|
|
27493
|
+
szDecimals: 2,
|
|
27494
|
+
weiDecimals: 8,
|
|
27495
|
+
index: 1492,
|
|
27496
|
+
tokenId: "0x7f8d334fed99e32ccc7d1ef50af5f246",
|
|
27497
|
+
isCanonical: false,
|
|
27498
|
+
evmContract: null,
|
|
27499
|
+
fullName: "Z Test Token",
|
|
27500
|
+
deployerTradingFeeShare: "1.0"
|
|
27501
|
+
},
|
|
27502
|
+
{
|
|
27503
|
+
name: "TUSDC",
|
|
27504
|
+
szDecimals: 2,
|
|
27505
|
+
weiDecimals: 8,
|
|
27506
|
+
index: 1493,
|
|
27507
|
+
tokenId: "0xa8469cf6df9c92f729a4bfa0f3643479",
|
|
27508
|
+
isCanonical: false,
|
|
27509
|
+
evmContract: null,
|
|
27510
|
+
fullName: "USDC Coin",
|
|
27511
|
+
deployerTradingFeeShare: "0.0"
|
|
27512
|
+
},
|
|
27513
|
+
{
|
|
27514
|
+
name: "MQVMJW",
|
|
27515
|
+
szDecimals: 1,
|
|
27516
|
+
weiDecimals: 9,
|
|
27517
|
+
index: 1494,
|
|
27518
|
+
tokenId: "0x202ec473e3100aac31d517c0a673ceaf",
|
|
27519
|
+
isCanonical: false,
|
|
27520
|
+
evmContract: null,
|
|
27521
|
+
fullName: "$WASH launchpad 2025-12-01T19:17:15.851Z",
|
|
27522
|
+
deployerTradingFeeShare: "1.0"
|
|
27523
|
+
},
|
|
27524
|
+
{
|
|
27525
|
+
name: "TSQEBL",
|
|
27526
|
+
szDecimals: 1,
|
|
27527
|
+
weiDecimals: 10,
|
|
27528
|
+
index: 1495,
|
|
27529
|
+
tokenId: "0x5d05f06a9590464cf3555a30d2d8ffd4",
|
|
27530
|
+
isCanonical: false,
|
|
27531
|
+
evmContract: null,
|
|
27532
|
+
fullName: "$WASH launchpad 2025-12-02T20:17:18.214Z",
|
|
27533
|
+
deployerTradingFeeShare: "1.0"
|
|
27345
27534
|
}
|
|
27346
27535
|
];
|
|
27347
27536
|
var spotMeta_default = {
|
package/index.ts
CHANGED
package/lib/cloid/cloid.ts
CHANGED
|
@@ -256,6 +256,7 @@ export const CloidClientCode = {
|
|
|
256
256
|
Desktop: 7,
|
|
257
257
|
API: 8,
|
|
258
258
|
Stream: 9,
|
|
259
|
+
Pal: 10,
|
|
259
260
|
} as const;
|
|
260
261
|
type ClientCodeType = keyof typeof CloidClientCode;
|
|
261
262
|
|
|
@@ -272,6 +273,7 @@ export const CloidClientCodeNameById: Record<number, ClientCodeType> = {
|
|
|
272
273
|
[CloidClientCode.Desktop]: "Desktop",
|
|
273
274
|
[CloidClientCode.API]: "API",
|
|
274
275
|
[CloidClientCode.Stream]: "Stream",
|
|
276
|
+
[CloidClientCode.Pal]: "Pal",
|
|
275
277
|
};
|
|
276
278
|
|
|
277
279
|
export function getClientCodeNameById(id: number): string {
|
package/lib/fee.ts
CHANGED
|
@@ -15,8 +15,8 @@ export const TARGET_APPROVED_MAX_BUILDER_FEE_PERCENT = `0.1%`;
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Get the amount of builder fee to approve for
|
|
18
|
-
* @param perpetualTradingFee - Perp fee in percentage
|
|
19
|
-
* @param spotTradingFee - Spot fee in percentage
|
|
18
|
+
* @param perpetualTradingFee - Perp fee in percentage (0.025 means 0.025% perp fee)
|
|
19
|
+
* @param spotTradingFee - Spot fee in percentage (0.01 means 0.01% spot fee)
|
|
20
20
|
* @param feeDiscount - Discount fee in percentage (0.9 means 90% discount)
|
|
21
21
|
* @returns {
|
|
22
22
|
* amount: number; - The amount of builder fee to approve in 1/10 of a basis point
|
|
@@ -75,19 +75,19 @@ export const getApprovalAmount = ({
|
|
|
75
75
|
.mul(discountMultiplier)
|
|
76
76
|
.toNumber();
|
|
77
77
|
|
|
78
|
-
// ensure perp fee is either 0 or between 0.
|
|
79
|
-
if (validatedPerpFeePct > 0 && validatedPerpFeePct < 0.
|
|
80
|
-
console.warn("Perp fee is less than 0.
|
|
81
|
-
validatedPerpFeePct = 0.
|
|
82
|
-
}
|
|
83
|
-
if (validatedPerpFeePct < 0) {
|
|
84
|
-
console.warn("Perp fee is less than 0, setting to 0");
|
|
85
|
-
validatedPerpFeePct = 0;
|
|
78
|
+
// ensure perp fee is either 0 or between 0.001%
|
|
79
|
+
if (validatedPerpFeePct > 0 && validatedPerpFeePct < 0.001) {
|
|
80
|
+
console.warn("Perp fee is less than 0.001%, setting to 0.001%");
|
|
81
|
+
validatedPerpFeePct = 0.001;
|
|
86
82
|
}
|
|
87
83
|
if (validatedPerpFeePct > 0.1) {
|
|
88
84
|
console.warn("Perp fee is greater than 0.1%, setting to 0.1%");
|
|
89
85
|
validatedPerpFeePct = 0.1;
|
|
90
86
|
}
|
|
87
|
+
if (validatedPerpFeePct < 0) {
|
|
88
|
+
console.warn("Perp fee is less than 0, setting to 0");
|
|
89
|
+
validatedPerpFeePct = 0;
|
|
90
|
+
}
|
|
91
91
|
|
|
92
92
|
let validatedSpotFeePct = spotTradingFee;
|
|
93
93
|
|
package/lib/hip3/market-info.ts
CHANGED
|
@@ -1,17 +1,45 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InfoClient, PerpsAssetCtx, MarginTables } from "@nktkas/hyperliquid";
|
|
2
2
|
|
|
3
|
-
export
|
|
4
|
-
collateralToken
|
|
5
|
-
|
|
3
|
+
export interface PerpsMeta {
|
|
4
|
+
collateralToken: number;
|
|
5
|
+
/** Trading universes available for perpetual trading. */
|
|
6
|
+
universe: PerpsUniverse[];
|
|
7
|
+
/** Margin requirement tables for different leverage tiers. */
|
|
8
|
+
marginTables: MarginTables;
|
|
9
|
+
}
|
|
10
|
+
/** Metadata and context for perpetual assets. */
|
|
11
|
+
export type PerpsMetaAndAssetCtxs = [
|
|
12
|
+
/** Metadata for assets. */
|
|
13
|
+
PerpsMeta,
|
|
14
|
+
/** Context for each perpetual asset. */
|
|
15
|
+
PerpsAssetCtx[],
|
|
16
|
+
];
|
|
17
|
+
/** Trading universe parameters for perpetual assets. */
|
|
18
|
+
export interface PerpsUniverse {
|
|
19
|
+
/** Minimum decimal places for order sizes. */
|
|
20
|
+
szDecimals: number;
|
|
21
|
+
/** Name of the universe. */
|
|
22
|
+
name: string;
|
|
23
|
+
/** Maximum allowed leverage. */
|
|
24
|
+
maxLeverage: number;
|
|
25
|
+
/** Unique identifier for the margin requirements table. */
|
|
26
|
+
marginTableId: number;
|
|
27
|
+
/** Indicates if only isolated margin trading is allowed. */
|
|
28
|
+
onlyIsolated?: true;
|
|
29
|
+
/** Indicates if the universe is delisted. */
|
|
30
|
+
isDelisted?: true;
|
|
31
|
+
/** Indicates if the universe is in growth mode, eligible for discounted fees */
|
|
32
|
+
growthMode?: true;
|
|
33
|
+
/** Margin mode for the universe. */
|
|
34
|
+
marginMode?: "strictIsolated" | "noCross";
|
|
35
|
+
}
|
|
6
36
|
|
|
7
|
-
export type AllPerpsMeta =
|
|
37
|
+
export type AllPerpsMeta = PerpsMeta[];
|
|
8
38
|
|
|
9
39
|
export async function getAllPerpsMeta(
|
|
10
40
|
infoClient: InfoClient,
|
|
11
41
|
): Promise<AllPerpsMeta> {
|
|
12
42
|
return infoClient.transport.request<AllPerpsMeta>("info", {
|
|
13
|
-
|
|
14
|
-
type: "allPerpMetas",
|
|
15
|
-
},
|
|
43
|
+
type: "allPerpMetas",
|
|
16
44
|
});
|
|
17
45
|
}
|
package/lib/hip3/utils.ts
CHANGED
|
@@ -99,7 +99,7 @@ export async function getHip3DexAbstraction(client: InfoClient, user: string) {
|
|
|
99
99
|
|
|
100
100
|
const dexToCollateralTokenSymbol = {
|
|
101
101
|
rrrrr: "USDEEE",
|
|
102
|
-
|
|
102
|
+
hyna: "USDE",
|
|
103
103
|
flx: "USDH",
|
|
104
104
|
vntl: "USDH",
|
|
105
105
|
};
|
|
@@ -150,7 +150,20 @@ export function getDisplayMarketSymbol(
|
|
|
150
150
|
showCollateralTokenSymbol: boolean = true,
|
|
151
151
|
collateralTokenSymbol?: string,
|
|
152
152
|
) {
|
|
153
|
-
if (!coin
|
|
153
|
+
if (!coin) return coin;
|
|
154
|
+
|
|
155
|
+
if (isSpotSymbol(coin)) {
|
|
156
|
+
if (coin.includes("/")) {
|
|
157
|
+
const [baseToken, quoteToken] = coin.split("/");
|
|
158
|
+
|
|
159
|
+
if (showCollateralTokenSymbol) {
|
|
160
|
+
return `${baseToken}/${collateralTokenSymbol ?? quoteToken}`;
|
|
161
|
+
} else {
|
|
162
|
+
return baseToken;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return coin;
|
|
166
|
+
}
|
|
154
167
|
|
|
155
168
|
if (isHip3Symbol(coin)) {
|
|
156
169
|
const [_, symbol] = coin.split(":");
|
|
@@ -1346,10 +1346,8 @@
|
|
|
1346
1346
|
{
|
|
1347
1347
|
"szDecimals": 0,
|
|
1348
1348
|
"name": "MON",
|
|
1349
|
-
"maxLeverage":
|
|
1350
|
-
"marginTableId":
|
|
1351
|
-
"onlyIsolated": true,
|
|
1352
|
-
"marginMode": "strictIsolated"
|
|
1349
|
+
"maxLeverage": 5,
|
|
1350
|
+
"marginTableId": 5
|
|
1353
1351
|
},
|
|
1354
1352
|
{
|
|
1355
1353
|
"szDecimals": 0,
|