@hashpower/collateral-abi 1.0.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.
@@ -0,0 +1,588 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "stateMutability": "nonpayable",
5
+ "type": "constructor"
6
+ },
7
+ {
8
+ "inputs": [
9
+ {
10
+ "internalType": "address",
11
+ "name": "target",
12
+ "type": "address"
13
+ }
14
+ ],
15
+ "name": "AddressEmptyCode",
16
+ "type": "error"
17
+ },
18
+ {
19
+ "inputs": [
20
+ {
21
+ "internalType": "address",
22
+ "name": "implementation",
23
+ "type": "address"
24
+ }
25
+ ],
26
+ "name": "ERC1967InvalidImplementation",
27
+ "type": "error"
28
+ },
29
+ {
30
+ "inputs": [],
31
+ "name": "ERC1967NonPayable",
32
+ "type": "error"
33
+ },
34
+ {
35
+ "inputs": [],
36
+ "name": "FailedCall",
37
+ "type": "error"
38
+ },
39
+ {
40
+ "inputs": [],
41
+ "name": "InvalidInitialization",
42
+ "type": "error"
43
+ },
44
+ {
45
+ "inputs": [],
46
+ "name": "NotInitializing",
47
+ "type": "error"
48
+ },
49
+ {
50
+ "inputs": [
51
+ {
52
+ "internalType": "address",
53
+ "name": "owner",
54
+ "type": "address"
55
+ }
56
+ ],
57
+ "name": "OwnableInvalidOwner",
58
+ "type": "error"
59
+ },
60
+ {
61
+ "inputs": [
62
+ {
63
+ "internalType": "address",
64
+ "name": "account",
65
+ "type": "address"
66
+ }
67
+ ],
68
+ "name": "OwnableUnauthorizedAccount",
69
+ "type": "error"
70
+ },
71
+ {
72
+ "inputs": [],
73
+ "name": "UUPSUnauthorizedCallContext",
74
+ "type": "error"
75
+ },
76
+ {
77
+ "inputs": [
78
+ {
79
+ "internalType": "bytes32",
80
+ "name": "slot",
81
+ "type": "bytes32"
82
+ }
83
+ ],
84
+ "name": "UUPSUnsupportedProxiableUUID",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "inputs": [],
89
+ "name": "ZeroAddress",
90
+ "type": "error"
91
+ },
92
+ {
93
+ "anonymous": false,
94
+ "inputs": [
95
+ {
96
+ "indexed": false,
97
+ "internalType": "address",
98
+ "name": "futures",
99
+ "type": "address"
100
+ }
101
+ ],
102
+ "name": "FuturesUpdated",
103
+ "type": "event"
104
+ },
105
+ {
106
+ "anonymous": false,
107
+ "inputs": [
108
+ {
109
+ "indexed": false,
110
+ "internalType": "uint64",
111
+ "name": "version",
112
+ "type": "uint64"
113
+ }
114
+ ],
115
+ "name": "Initialized",
116
+ "type": "event"
117
+ },
118
+ {
119
+ "anonymous": false,
120
+ "inputs": [
121
+ {
122
+ "indexed": false,
123
+ "internalType": "address",
124
+ "name": "optionsEngine",
125
+ "type": "address"
126
+ }
127
+ ],
128
+ "name": "OptionsEngineUpdated",
129
+ "type": "event"
130
+ },
131
+ {
132
+ "anonymous": false,
133
+ "inputs": [
134
+ {
135
+ "indexed": true,
136
+ "internalType": "address",
137
+ "name": "previousOwner",
138
+ "type": "address"
139
+ },
140
+ {
141
+ "indexed": true,
142
+ "internalType": "address",
143
+ "name": "newOwner",
144
+ "type": "address"
145
+ }
146
+ ],
147
+ "name": "OwnershipTransferred",
148
+ "type": "event"
149
+ },
150
+ {
151
+ "anonymous": false,
152
+ "inputs": [
153
+ {
154
+ "indexed": false,
155
+ "internalType": "address",
156
+ "name": "perpsDex",
157
+ "type": "address"
158
+ }
159
+ ],
160
+ "name": "PerpsDexUpdated",
161
+ "type": "event"
162
+ },
163
+ {
164
+ "anonymous": false,
165
+ "inputs": [
166
+ {
167
+ "indexed": false,
168
+ "internalType": "uint256",
169
+ "name": "imSpot",
170
+ "type": "uint256"
171
+ },
172
+ {
173
+ "indexed": false,
174
+ "internalType": "uint256",
175
+ "name": "mmSpot",
176
+ "type": "uint256"
177
+ },
178
+ {
179
+ "indexed": false,
180
+ "internalType": "uint256",
181
+ "name": "imVol",
182
+ "type": "uint256"
183
+ },
184
+ {
185
+ "indexed": false,
186
+ "internalType": "uint256",
187
+ "name": "mmVol",
188
+ "type": "uint256"
189
+ }
190
+ ],
191
+ "name": "ShocksUpdated",
192
+ "type": "event"
193
+ },
194
+ {
195
+ "anonymous": false,
196
+ "inputs": [
197
+ {
198
+ "indexed": true,
199
+ "internalType": "address",
200
+ "name": "implementation",
201
+ "type": "address"
202
+ }
203
+ ],
204
+ "name": "Upgraded",
205
+ "type": "event"
206
+ },
207
+ {
208
+ "anonymous": false,
209
+ "inputs": [
210
+ {
211
+ "indexed": false,
212
+ "internalType": "address",
213
+ "name": "vault",
214
+ "type": "address"
215
+ }
216
+ ],
217
+ "name": "VaultUpdated",
218
+ "type": "event"
219
+ },
220
+ {
221
+ "inputs": [],
222
+ "name": "UPGRADE_INTERFACE_VERSION",
223
+ "outputs": [
224
+ {
225
+ "internalType": "string",
226
+ "name": "",
227
+ "type": "string"
228
+ }
229
+ ],
230
+ "stateMutability": "view",
231
+ "type": "function"
232
+ },
233
+ {
234
+ "inputs": [],
235
+ "name": "VERSION",
236
+ "outputs": [
237
+ {
238
+ "internalType": "string",
239
+ "name": "",
240
+ "type": "string"
241
+ }
242
+ ],
243
+ "stateMutability": "view",
244
+ "type": "function"
245
+ },
246
+ {
247
+ "inputs": [
248
+ {
249
+ "internalType": "address",
250
+ "name": "user",
251
+ "type": "address"
252
+ },
253
+ {
254
+ "internalType": "uint256",
255
+ "name": "additionalIM",
256
+ "type": "uint256"
257
+ }
258
+ ],
259
+ "name": "canPlaceOrder",
260
+ "outputs": [
261
+ {
262
+ "internalType": "bool",
263
+ "name": "",
264
+ "type": "bool"
265
+ }
266
+ ],
267
+ "stateMutability": "view",
268
+ "type": "function"
269
+ },
270
+ {
271
+ "inputs": [
272
+ {
273
+ "internalType": "address",
274
+ "name": "user",
275
+ "type": "address"
276
+ }
277
+ ],
278
+ "name": "computePortfolioIM",
279
+ "outputs": [
280
+ {
281
+ "internalType": "uint256",
282
+ "name": "",
283
+ "type": "uint256"
284
+ }
285
+ ],
286
+ "stateMutability": "view",
287
+ "type": "function"
288
+ },
289
+ {
290
+ "inputs": [
291
+ {
292
+ "internalType": "address",
293
+ "name": "user",
294
+ "type": "address"
295
+ }
296
+ ],
297
+ "name": "computePortfolioMM",
298
+ "outputs": [
299
+ {
300
+ "internalType": "uint256",
301
+ "name": "",
302
+ "type": "uint256"
303
+ }
304
+ ],
305
+ "stateMutability": "view",
306
+ "type": "function"
307
+ },
308
+ {
309
+ "inputs": [],
310
+ "name": "futures",
311
+ "outputs": [
312
+ {
313
+ "internalType": "contract IFutures",
314
+ "name": "",
315
+ "type": "address"
316
+ }
317
+ ],
318
+ "stateMutability": "view",
319
+ "type": "function"
320
+ },
321
+ {
322
+ "inputs": [],
323
+ "name": "imSpotShock",
324
+ "outputs": [
325
+ {
326
+ "internalType": "uint256",
327
+ "name": "",
328
+ "type": "uint256"
329
+ }
330
+ ],
331
+ "stateMutability": "view",
332
+ "type": "function"
333
+ },
334
+ {
335
+ "inputs": [],
336
+ "name": "imVolShock",
337
+ "outputs": [
338
+ {
339
+ "internalType": "uint256",
340
+ "name": "",
341
+ "type": "uint256"
342
+ }
343
+ ],
344
+ "stateMutability": "view",
345
+ "type": "function"
346
+ },
347
+ {
348
+ "inputs": [
349
+ {
350
+ "internalType": "address",
351
+ "name": "_vault",
352
+ "type": "address"
353
+ }
354
+ ],
355
+ "name": "initialize",
356
+ "outputs": [],
357
+ "stateMutability": "nonpayable",
358
+ "type": "function"
359
+ },
360
+ {
361
+ "inputs": [
362
+ {
363
+ "internalType": "address",
364
+ "name": "user",
365
+ "type": "address"
366
+ }
367
+ ],
368
+ "name": "isHealthy",
369
+ "outputs": [
370
+ {
371
+ "internalType": "bool",
372
+ "name": "",
373
+ "type": "bool"
374
+ }
375
+ ],
376
+ "stateMutability": "view",
377
+ "type": "function"
378
+ },
379
+ {
380
+ "inputs": [],
381
+ "name": "mmSpotShock",
382
+ "outputs": [
383
+ {
384
+ "internalType": "uint256",
385
+ "name": "",
386
+ "type": "uint256"
387
+ }
388
+ ],
389
+ "stateMutability": "view",
390
+ "type": "function"
391
+ },
392
+ {
393
+ "inputs": [],
394
+ "name": "mmVolShock",
395
+ "outputs": [
396
+ {
397
+ "internalType": "uint256",
398
+ "name": "",
399
+ "type": "uint256"
400
+ }
401
+ ],
402
+ "stateMutability": "view",
403
+ "type": "function"
404
+ },
405
+ {
406
+ "inputs": [],
407
+ "name": "optionsEngine",
408
+ "outputs": [
409
+ {
410
+ "internalType": "contract IOptionsEnginePortfolioView",
411
+ "name": "",
412
+ "type": "address"
413
+ }
414
+ ],
415
+ "stateMutability": "view",
416
+ "type": "function"
417
+ },
418
+ {
419
+ "inputs": [],
420
+ "name": "owner",
421
+ "outputs": [
422
+ {
423
+ "internalType": "address",
424
+ "name": "",
425
+ "type": "address"
426
+ }
427
+ ],
428
+ "stateMutability": "view",
429
+ "type": "function"
430
+ },
431
+ {
432
+ "inputs": [],
433
+ "name": "perpsDex",
434
+ "outputs": [
435
+ {
436
+ "internalType": "contract IHashPowerPerpsDEX",
437
+ "name": "",
438
+ "type": "address"
439
+ }
440
+ ],
441
+ "stateMutability": "view",
442
+ "type": "function"
443
+ },
444
+ {
445
+ "inputs": [],
446
+ "name": "proxiableUUID",
447
+ "outputs": [
448
+ {
449
+ "internalType": "bytes32",
450
+ "name": "",
451
+ "type": "bytes32"
452
+ }
453
+ ],
454
+ "stateMutability": "view",
455
+ "type": "function"
456
+ },
457
+ {
458
+ "inputs": [],
459
+ "name": "renounceOwnership",
460
+ "outputs": [],
461
+ "stateMutability": "nonpayable",
462
+ "type": "function"
463
+ },
464
+ {
465
+ "inputs": [
466
+ {
467
+ "internalType": "address",
468
+ "name": "_futuresEngine",
469
+ "type": "address"
470
+ }
471
+ ],
472
+ "name": "setFutures",
473
+ "outputs": [],
474
+ "stateMutability": "nonpayable",
475
+ "type": "function"
476
+ },
477
+ {
478
+ "inputs": [
479
+ {
480
+ "internalType": "address",
481
+ "name": "_optionsEngine",
482
+ "type": "address"
483
+ }
484
+ ],
485
+ "name": "setOptions",
486
+ "outputs": [],
487
+ "stateMutability": "nonpayable",
488
+ "type": "function"
489
+ },
490
+ {
491
+ "inputs": [
492
+ {
493
+ "internalType": "address",
494
+ "name": "_perpsEngine",
495
+ "type": "address"
496
+ }
497
+ ],
498
+ "name": "setPerps",
499
+ "outputs": [],
500
+ "stateMutability": "nonpayable",
501
+ "type": "function"
502
+ },
503
+ {
504
+ "inputs": [
505
+ {
506
+ "internalType": "uint256",
507
+ "name": "_imSpotShock",
508
+ "type": "uint256"
509
+ },
510
+ {
511
+ "internalType": "uint256",
512
+ "name": "_mmSpotShock",
513
+ "type": "uint256"
514
+ },
515
+ {
516
+ "internalType": "uint256",
517
+ "name": "_imVolShock",
518
+ "type": "uint256"
519
+ },
520
+ {
521
+ "internalType": "uint256",
522
+ "name": "_mmVolShock",
523
+ "type": "uint256"
524
+ }
525
+ ],
526
+ "name": "setShocks",
527
+ "outputs": [],
528
+ "stateMutability": "nonpayable",
529
+ "type": "function"
530
+ },
531
+ {
532
+ "inputs": [
533
+ {
534
+ "internalType": "address",
535
+ "name": "_vault",
536
+ "type": "address"
537
+ }
538
+ ],
539
+ "name": "setVault",
540
+ "outputs": [],
541
+ "stateMutability": "nonpayable",
542
+ "type": "function"
543
+ },
544
+ {
545
+ "inputs": [
546
+ {
547
+ "internalType": "address",
548
+ "name": "newOwner",
549
+ "type": "address"
550
+ }
551
+ ],
552
+ "name": "transferOwnership",
553
+ "outputs": [],
554
+ "stateMutability": "nonpayable",
555
+ "type": "function"
556
+ },
557
+ {
558
+ "inputs": [
559
+ {
560
+ "internalType": "address",
561
+ "name": "newImplementation",
562
+ "type": "address"
563
+ },
564
+ {
565
+ "internalType": "bytes",
566
+ "name": "data",
567
+ "type": "bytes"
568
+ }
569
+ ],
570
+ "name": "upgradeToAndCall",
571
+ "outputs": [],
572
+ "stateMutability": "payable",
573
+ "type": "function"
574
+ },
575
+ {
576
+ "inputs": [],
577
+ "name": "vault",
578
+ "outputs": [
579
+ {
580
+ "internalType": "contract ICollateralVault",
581
+ "name": "",
582
+ "type": "address"
583
+ }
584
+ ],
585
+ "stateMutability": "view",
586
+ "type": "function"
587
+ }
588
+ ]
package/package.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "@hashpower/collateral-abi",
3
+ "version": "1.0.0",
4
+ "description": "ABIs and deployment addresses for the Hashpower unified collateral system (CollateralVault, PortfolioMarginEngine, Points) on Base",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Lumerin-protocol/collateral-margin.git",
10
+ "directory": "collateral-abi"
11
+ },
12
+ "keywords": ["hashpower", "collateral", "margin", "vault", "abi", "base", "viem"],
13
+ "files": ["dist", "json", "deployments.json", "README.md"],
14
+ "main": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "import": "./dist/index.js"
20
+ },
21
+ "./deployments.json": "./deployments.json",
22
+ "./json/*.json": "./json/*.json"
23
+ },
24
+ "scripts": {
25
+ "build": "node scripts/build.mjs && tsc -p tsconfig.json",
26
+ "clean": "rm -rf src dist json",
27
+ "prepublishOnly": "pnpm build"
28
+ },
29
+ "devDependencies": {
30
+ "typescript": "^5.3.3"
31
+ },
32
+ "engines": {
33
+ "node": ">=22"
34
+ },
35
+ "packageManager": "pnpm@10.28.1",
36
+ "publishConfig": {
37
+ "access": "public"
38
+ }
39
+ }