@dhedge/v2-sdk 1.9.8 → 1.9.9

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,570 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "components": [
6
+ {
7
+ "internalType": "bytes32",
8
+ "name": "moduleKey",
9
+ "type": "bytes32"
10
+ },
11
+ {
12
+ "internalType": "address",
13
+ "name": "moduleAddress",
14
+ "type": "address"
15
+ }
16
+ ],
17
+ "internalType": "struct FlatcoinStructs.AuthorizedModule",
18
+ "name": "_module",
19
+ "type": "tuple"
20
+ }
21
+ ],
22
+ "name": "addAuthorizedModule",
23
+ "outputs": [],
24
+ "stateMutability": "nonpayable",
25
+ "type": "function"
26
+ },
27
+ {
28
+ "inputs": [
29
+ {
30
+ "components": [
31
+ {
32
+ "internalType": "bytes32",
33
+ "name": "moduleKey",
34
+ "type": "bytes32"
35
+ },
36
+ {
37
+ "internalType": "address",
38
+ "name": "moduleAddress",
39
+ "type": "address"
40
+ }
41
+ ],
42
+ "internalType": "struct FlatcoinStructs.AuthorizedModule[]",
43
+ "name": "_modules",
44
+ "type": "tuple[]"
45
+ }
46
+ ],
47
+ "name": "addAuthorizedModules",
48
+ "outputs": [],
49
+ "stateMutability": "nonpayable",
50
+ "type": "function"
51
+ },
52
+ {
53
+ "inputs": [
54
+ {
55
+ "internalType": "uint256",
56
+ "name": "depositAmount",
57
+ "type": "uint256"
58
+ }
59
+ ],
60
+ "name": "checkCollateralCap",
61
+ "outputs": [],
62
+ "stateMutability": "view",
63
+ "type": "function"
64
+ },
65
+ {
66
+ "inputs": [
67
+ {
68
+ "internalType": "uint256",
69
+ "name": "additionalSkew",
70
+ "type": "uint256"
71
+ }
72
+ ],
73
+ "name": "checkSkewMax",
74
+ "outputs": [],
75
+ "stateMutability": "view",
76
+ "type": "function"
77
+ },
78
+ {
79
+ "inputs": [],
80
+ "name": "collateral",
81
+ "outputs": [
82
+ {
83
+ "internalType": "contract IERC20Upgradeable",
84
+ "name": "collateral",
85
+ "type": "address"
86
+ }
87
+ ],
88
+ "stateMutability": "view",
89
+ "type": "function"
90
+ },
91
+ {
92
+ "inputs": [],
93
+ "name": "cumulativeFundingRate",
94
+ "outputs": [
95
+ {
96
+ "internalType": "int256",
97
+ "name": "cumulativeFundingRate",
98
+ "type": "int256"
99
+ }
100
+ ],
101
+ "stateMutability": "view",
102
+ "type": "function"
103
+ },
104
+ {
105
+ "inputs": [
106
+ {
107
+ "internalType": "uint256",
108
+ "name": "_tokenId",
109
+ "type": "uint256"
110
+ }
111
+ ],
112
+ "name": "deletePosition",
113
+ "outputs": [],
114
+ "stateMutability": "nonpayable",
115
+ "type": "function"
116
+ },
117
+ {
118
+ "inputs": [],
119
+ "name": "getCurrentFundingRate",
120
+ "outputs": [
121
+ {
122
+ "internalType": "int256",
123
+ "name": "fundingRate",
124
+ "type": "int256"
125
+ }
126
+ ],
127
+ "stateMutability": "view",
128
+ "type": "function"
129
+ },
130
+ {
131
+ "inputs": [],
132
+ "name": "getCurrentSkew",
133
+ "outputs": [
134
+ {
135
+ "internalType": "int256",
136
+ "name": "skew",
137
+ "type": "int256"
138
+ }
139
+ ],
140
+ "stateMutability": "view",
141
+ "type": "function"
142
+ },
143
+ {
144
+ "inputs": [],
145
+ "name": "getGlobalPositions",
146
+ "outputs": [
147
+ {
148
+ "components": [
149
+ {
150
+ "internalType": "uint256",
151
+ "name": "marginDepositedTotal",
152
+ "type": "uint256"
153
+ },
154
+ {
155
+ "internalType": "uint256",
156
+ "name": "lastPrice",
157
+ "type": "uint256"
158
+ },
159
+ {
160
+ "internalType": "uint256",
161
+ "name": "sizeOpenedTotal",
162
+ "type": "uint256"
163
+ }
164
+ ],
165
+ "internalType": "struct FlatcoinStructs.GlobalPositions",
166
+ "name": "_globalPositions",
167
+ "type": "tuple"
168
+ }
169
+ ],
170
+ "stateMutability": "view",
171
+ "type": "function"
172
+ },
173
+ {
174
+ "inputs": [
175
+ {
176
+ "internalType": "uint256",
177
+ "name": "_tokenId",
178
+ "type": "uint256"
179
+ }
180
+ ],
181
+ "name": "getPosition",
182
+ "outputs": [
183
+ {
184
+ "components": [
185
+ {
186
+ "internalType": "uint256",
187
+ "name": "lastPrice",
188
+ "type": "uint256"
189
+ },
190
+ {
191
+ "internalType": "uint256",
192
+ "name": "marginDeposited",
193
+ "type": "uint256"
194
+ },
195
+ {
196
+ "internalType": "uint256",
197
+ "name": "additionalSize",
198
+ "type": "uint256"
199
+ },
200
+ {
201
+ "internalType": "int256",
202
+ "name": "entryCumulativeFunding",
203
+ "type": "int256"
204
+ }
205
+ ],
206
+ "internalType": "struct FlatcoinStructs.Position",
207
+ "name": "position",
208
+ "type": "tuple"
209
+ }
210
+ ],
211
+ "stateMutability": "view",
212
+ "type": "function"
213
+ },
214
+ {
215
+ "inputs": [],
216
+ "name": "getVaultSummary",
217
+ "outputs": [
218
+ {
219
+ "components": [
220
+ {
221
+ "internalType": "int256",
222
+ "name": "marketSkew",
223
+ "type": "int256"
224
+ },
225
+ {
226
+ "internalType": "int256",
227
+ "name": "cumulativeFundingRate",
228
+ "type": "int256"
229
+ },
230
+ {
231
+ "internalType": "int256",
232
+ "name": "lastRecomputedFundingRate",
233
+ "type": "int256"
234
+ },
235
+ {
236
+ "internalType": "uint64",
237
+ "name": "lastRecomputedFundingTimestamp",
238
+ "type": "uint64"
239
+ },
240
+ {
241
+ "internalType": "uint256",
242
+ "name": "stableCollateralTotal",
243
+ "type": "uint256"
244
+ },
245
+ {
246
+ "components": [
247
+ {
248
+ "internalType": "uint256",
249
+ "name": "marginDepositedTotal",
250
+ "type": "uint256"
251
+ },
252
+ {
253
+ "internalType": "uint256",
254
+ "name": "lastPrice",
255
+ "type": "uint256"
256
+ },
257
+ {
258
+ "internalType": "uint256",
259
+ "name": "sizeOpenedTotal",
260
+ "type": "uint256"
261
+ }
262
+ ],
263
+ "internalType": "struct FlatcoinStructs.GlobalPositions",
264
+ "name": "globalPositions",
265
+ "type": "tuple"
266
+ }
267
+ ],
268
+ "internalType": "struct FlatcoinStructs.VaultSummary",
269
+ "name": "_vaultSummary",
270
+ "type": "tuple"
271
+ }
272
+ ],
273
+ "stateMutability": "view",
274
+ "type": "function"
275
+ },
276
+ {
277
+ "inputs": [
278
+ {
279
+ "internalType": "address",
280
+ "name": "_address",
281
+ "type": "address"
282
+ }
283
+ ],
284
+ "name": "isAuthorizedModule",
285
+ "outputs": [
286
+ {
287
+ "internalType": "bool",
288
+ "name": "status",
289
+ "type": "bool"
290
+ }
291
+ ],
292
+ "stateMutability": "view",
293
+ "type": "function"
294
+ },
295
+ {
296
+ "inputs": [
297
+ {
298
+ "internalType": "bytes32",
299
+ "name": "moduleKey",
300
+ "type": "bytes32"
301
+ }
302
+ ],
303
+ "name": "isModulePaused",
304
+ "outputs": [
305
+ {
306
+ "internalType": "bool",
307
+ "name": "paused",
308
+ "type": "bool"
309
+ }
310
+ ],
311
+ "stateMutability": "view",
312
+ "type": "function"
313
+ },
314
+ {
315
+ "inputs": [],
316
+ "name": "lastRecomputedFundingRate",
317
+ "outputs": [
318
+ {
319
+ "internalType": "int256",
320
+ "name": "lastRecomputedFundingRate",
321
+ "type": "int256"
322
+ }
323
+ ],
324
+ "stateMutability": "view",
325
+ "type": "function"
326
+ },
327
+ {
328
+ "inputs": [],
329
+ "name": "lastRecomputedFundingTimestamp",
330
+ "outputs": [
331
+ {
332
+ "internalType": "uint64",
333
+ "name": "lastRecomputedFundingTimestamp",
334
+ "type": "uint64"
335
+ }
336
+ ],
337
+ "stateMutability": "view",
338
+ "type": "function"
339
+ },
340
+ {
341
+ "inputs": [],
342
+ "name": "maxExecutabilityAge",
343
+ "outputs": [
344
+ {
345
+ "internalType": "uint64",
346
+ "name": "maxExecutabilityAge",
347
+ "type": "uint64"
348
+ }
349
+ ],
350
+ "stateMutability": "view",
351
+ "type": "function"
352
+ },
353
+ {
354
+ "inputs": [],
355
+ "name": "maxFundingVelocity",
356
+ "outputs": [
357
+ {
358
+ "internalType": "uint256",
359
+ "name": "maxFundingVelocity",
360
+ "type": "uint256"
361
+ }
362
+ ],
363
+ "stateMutability": "view",
364
+ "type": "function"
365
+ },
366
+ {
367
+ "inputs": [],
368
+ "name": "maxVelocitySkew",
369
+ "outputs": [
370
+ {
371
+ "internalType": "uint256",
372
+ "name": "maxVelocitySkew",
373
+ "type": "uint256"
374
+ }
375
+ ],
376
+ "stateMutability": "view",
377
+ "type": "function"
378
+ },
379
+ {
380
+ "inputs": [],
381
+ "name": "minExecutabilityAge",
382
+ "outputs": [
383
+ {
384
+ "internalType": "uint64",
385
+ "name": "minExecutabilityAge",
386
+ "type": "uint64"
387
+ }
388
+ ],
389
+ "stateMutability": "view",
390
+ "type": "function"
391
+ },
392
+ {
393
+ "inputs": [
394
+ {
395
+ "internalType": "bytes32",
396
+ "name": "_moduleKey",
397
+ "type": "bytes32"
398
+ }
399
+ ],
400
+ "name": "moduleAddress",
401
+ "outputs": [
402
+ {
403
+ "internalType": "address",
404
+ "name": "moduleAddress",
405
+ "type": "address"
406
+ }
407
+ ],
408
+ "stateMutability": "view",
409
+ "type": "function"
410
+ },
411
+ {
412
+ "inputs": [
413
+ {
414
+ "internalType": "bytes32",
415
+ "name": "_moduleKey",
416
+ "type": "bytes32"
417
+ }
418
+ ],
419
+ "name": "removeAuthorizedModule",
420
+ "outputs": [],
421
+ "stateMutability": "nonpayable",
422
+ "type": "function"
423
+ },
424
+ {
425
+ "inputs": [
426
+ {
427
+ "internalType": "address",
428
+ "name": "to",
429
+ "type": "address"
430
+ },
431
+ {
432
+ "internalType": "uint256",
433
+ "name": "amount",
434
+ "type": "uint256"
435
+ }
436
+ ],
437
+ "name": "sendCollateral",
438
+ "outputs": [],
439
+ "stateMutability": "nonpayable",
440
+ "type": "function"
441
+ },
442
+ {
443
+ "inputs": [
444
+ {
445
+ "components": [
446
+ {
447
+ "internalType": "uint256",
448
+ "name": "lastPrice",
449
+ "type": "uint256"
450
+ },
451
+ {
452
+ "internalType": "uint256",
453
+ "name": "marginDeposited",
454
+ "type": "uint256"
455
+ },
456
+ {
457
+ "internalType": "uint256",
458
+ "name": "additionalSize",
459
+ "type": "uint256"
460
+ },
461
+ {
462
+ "internalType": "int256",
463
+ "name": "entryCumulativeFunding",
464
+ "type": "int256"
465
+ }
466
+ ],
467
+ "internalType": "struct FlatcoinStructs.Position",
468
+ "name": "_position",
469
+ "type": "tuple"
470
+ },
471
+ {
472
+ "internalType": "uint256",
473
+ "name": "_tokenId",
474
+ "type": "uint256"
475
+ }
476
+ ],
477
+ "name": "setPosition",
478
+ "outputs": [],
479
+ "stateMutability": "nonpayable",
480
+ "type": "function"
481
+ },
482
+ {
483
+ "inputs": [],
484
+ "name": "settleFundingFees",
485
+ "outputs": [
486
+ {
487
+ "internalType": "int256",
488
+ "name": "fundingFees",
489
+ "type": "int256"
490
+ }
491
+ ],
492
+ "stateMutability": "nonpayable",
493
+ "type": "function"
494
+ },
495
+ {
496
+ "inputs": [],
497
+ "name": "skewFractionMax",
498
+ "outputs": [
499
+ {
500
+ "internalType": "uint256",
501
+ "name": "skewFractionMax",
502
+ "type": "uint256"
503
+ }
504
+ ],
505
+ "stateMutability": "view",
506
+ "type": "function"
507
+ },
508
+ {
509
+ "inputs": [],
510
+ "name": "stableCollateralCap",
511
+ "outputs": [
512
+ {
513
+ "internalType": "uint256",
514
+ "name": "collateralCap",
515
+ "type": "uint256"
516
+ }
517
+ ],
518
+ "stateMutability": "view",
519
+ "type": "function"
520
+ },
521
+ {
522
+ "inputs": [],
523
+ "name": "stableCollateralTotal",
524
+ "outputs": [
525
+ {
526
+ "internalType": "uint256",
527
+ "name": "totalAmount",
528
+ "type": "uint256"
529
+ }
530
+ ],
531
+ "stateMutability": "view",
532
+ "type": "function"
533
+ },
534
+ {
535
+ "inputs": [
536
+ {
537
+ "internalType": "uint256",
538
+ "name": "price",
539
+ "type": "uint256"
540
+ },
541
+ {
542
+ "internalType": "int256",
543
+ "name": "marginDelta",
544
+ "type": "int256"
545
+ },
546
+ {
547
+ "internalType": "int256",
548
+ "name": "additionalSizeDelta",
549
+ "type": "int256"
550
+ }
551
+ ],
552
+ "name": "updateGlobalPositionData",
553
+ "outputs": [],
554
+ "stateMutability": "nonpayable",
555
+ "type": "function"
556
+ },
557
+ {
558
+ "inputs": [
559
+ {
560
+ "internalType": "int256",
561
+ "name": "_stableCollateralAdjustment",
562
+ "type": "int256"
563
+ }
564
+ ],
565
+ "name": "updateStableCollateralTotal",
566
+ "outputs": [],
567
+ "stateMutability": "nonpayable",
568
+ "type": "function"
569
+ }
570
+ ]