@kehtus/proportion-sdk 0.1.1 → 0.1.3

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.
Files changed (90) hide show
  1. package/LICENSE +21 -0
  2. package/dist/abi/factory.d.ts +1 -0
  3. package/dist/abi/factory.d.ts.map +1 -0
  4. package/dist/abi/factory.js +1 -0
  5. package/dist/abi/factory.js.map +1 -0
  6. package/dist/abi/forwarder.d.ts +1 -0
  7. package/dist/abi/forwarder.d.ts.map +1 -0
  8. package/dist/abi/forwarder.js +1 -0
  9. package/dist/abi/forwarder.js.map +1 -0
  10. package/dist/abi/fundedAccount.d.ts +1 -0
  11. package/dist/abi/fundedAccount.d.ts.map +1 -0
  12. package/dist/abi/fundedAccount.js +1 -0
  13. package/dist/abi/fundedAccount.js.map +1 -0
  14. package/dist/abi/mainVault.d.ts +198 -16
  15. package/dist/abi/mainVault.d.ts.map +1 -0
  16. package/dist/abi/mainVault.js +253 -19
  17. package/dist/abi/mainVault.js.map +1 -0
  18. package/dist/account.d.ts +3 -2
  19. package/dist/account.d.ts.map +1 -0
  20. package/dist/account.js +46 -43
  21. package/dist/account.js.map +1 -0
  22. package/dist/base.d.ts +9 -0
  23. package/dist/base.d.ts.map +1 -0
  24. package/dist/base.js +19 -0
  25. package/dist/base.js.map +1 -0
  26. package/dist/constants.d.ts +5 -4
  27. package/dist/constants.d.ts.map +1 -0
  28. package/dist/constants.js +5 -4
  29. package/dist/constants.js.map +1 -0
  30. package/dist/factory.d.ts +1 -0
  31. package/dist/factory.d.ts.map +1 -0
  32. package/dist/factory.js +56 -10
  33. package/dist/factory.js.map +1 -0
  34. package/dist/index.d.ts +1 -0
  35. package/dist/index.d.ts.map +1 -0
  36. package/dist/index.js +1 -0
  37. package/dist/index.js.map +1 -0
  38. package/dist/indexer.d.ts +8 -3
  39. package/dist/indexer.d.ts.map +1 -0
  40. package/dist/indexer.js +81 -136
  41. package/dist/indexer.js.map +1 -0
  42. package/dist/sdk.d.ts +1 -0
  43. package/dist/sdk.d.ts.map +1 -0
  44. package/dist/sdk.js +1 -0
  45. package/dist/sdk.js.map +1 -0
  46. package/dist/types.d.ts +5 -0
  47. package/dist/types.d.ts.map +1 -0
  48. package/dist/types.js +1 -0
  49. package/dist/types.js.map +1 -0
  50. package/dist/utils.d.ts +8 -0
  51. package/dist/utils.d.ts.map +1 -0
  52. package/dist/utils.js +10 -0
  53. package/dist/utils.js.map +1 -0
  54. package/dist/vault.d.ts +7 -4
  55. package/dist/vault.d.ts.map +1 -0
  56. package/dist/vault.js +76 -51
  57. package/dist/vault.js.map +1 -0
  58. package/package.json +12 -1
  59. package/SDK_IMPROVEMENT_PLAN.md +0 -197
  60. package/arch.md +0 -455
  61. package/dist/__tests__/account.test.d.ts +0 -1
  62. package/dist/__tests__/account.test.js +0 -36
  63. package/dist/__tests__/indexer.test.d.ts +0 -1
  64. package/dist/__tests__/indexer.test.js +0 -230
  65. package/dist/__tests__/lifecycle.test.d.ts +0 -1
  66. package/dist/__tests__/lifecycle.test.js +0 -186
  67. package/dist/__tests__/reads.test.d.ts +0 -1
  68. package/dist/__tests__/reads.test.js +0 -184
  69. package/dist/__tests__/utils.test.d.ts +0 -1
  70. package/dist/__tests__/utils.test.js +0 -185
  71. package/src/__tests__/account.test.ts +0 -40
  72. package/src/__tests__/indexer.test.ts +0 -255
  73. package/src/__tests__/lifecycle.test.ts +0 -231
  74. package/src/__tests__/reads.test.ts +0 -208
  75. package/src/__tests__/utils.test.ts +0 -245
  76. package/src/abi/factory.ts +0 -417
  77. package/src/abi/forwarder.ts +0 -373
  78. package/src/abi/fundedAccount.ts +0 -1296
  79. package/src/abi/mainVault.ts +0 -1852
  80. package/src/account.ts +0 -325
  81. package/src/constants.ts +0 -51
  82. package/src/factory.ts +0 -157
  83. package/src/index.ts +0 -16
  84. package/src/indexer.ts +0 -636
  85. package/src/sdk.ts +0 -93
  86. package/src/types.ts +0 -421
  87. package/src/utils.ts +0 -143
  88. package/src/vault.ts +0 -479
  89. package/tsconfig.json +0 -19
  90. package/vitest.config.ts +0 -8
@@ -1,1296 +0,0 @@
1
- export const fundedAccountAbi = [
2
- {
3
- "inputs": [],
4
- "stateMutability": "nonpayable",
5
- "type": "constructor"
6
- },
7
- {
8
- "inputs": [],
9
- "name": "ReentrancyGuardReentrantCall",
10
- "type": "error"
11
- },
12
- {
13
- "inputs": [
14
- {
15
- "internalType": "address",
16
- "name": "token",
17
- "type": "address"
18
- }
19
- ],
20
- "name": "SafeERC20FailedOperation",
21
- "type": "error"
22
- },
23
- {
24
- "anonymous": false,
25
- "inputs": [
26
- {
27
- "indexed": true,
28
- "internalType": "address",
29
- "name": "owner",
30
- "type": "address"
31
- },
32
- {
33
- "indexed": false,
34
- "internalType": "uint256",
35
- "name": "returnedAmount",
36
- "type": "uint256"
37
- }
38
- ],
39
- "name": "AccountClosed",
40
- "type": "event"
41
- },
42
- {
43
- "anonymous": false,
44
- "inputs": [
45
- {
46
- "indexed": true,
47
- "internalType": "address",
48
- "name": "owner",
49
- "type": "address"
50
- },
51
- {
52
- "indexed": true,
53
- "internalType": "address",
54
- "name": "closedBy",
55
- "type": "address"
56
- }
57
- ],
58
- "name": "AdminCloseRequested",
59
- "type": "event"
60
- },
61
- {
62
- "anonymous": false,
63
- "inputs": [
64
- {
65
- "indexed": true,
66
- "internalType": "address",
67
- "name": "wallet",
68
- "type": "address"
69
- }
70
- ],
71
- "name": "ApiWalletSet",
72
- "type": "event"
73
- },
74
- {
75
- "anonymous": false,
76
- "inputs": [
77
- {
78
- "indexed": false,
79
- "internalType": "uint64",
80
- "name": "amount",
81
- "type": "uint64"
82
- }
83
- ],
84
- "name": "BridgedToEvm",
85
- "type": "event"
86
- },
87
- {
88
- "anonymous": false,
89
- "inputs": [
90
- {
91
- "indexed": true,
92
- "internalType": "uint256",
93
- "name": "dayNumber",
94
- "type": "uint256"
95
- },
96
- {
97
- "indexed": false,
98
- "internalType": "int64",
99
- "name": "accountValue",
100
- "type": "int64"
101
- },
102
- {
103
- "indexed": false,
104
- "internalType": "int64",
105
- "name": "previousValue",
106
- "type": "int64"
107
- },
108
- {
109
- "indexed": false,
110
- "internalType": "bool",
111
- "name": "profitable",
112
- "type": "bool"
113
- },
114
- {
115
- "indexed": false,
116
- "internalType": "uint8",
117
- "name": "profitableDaysCount",
118
- "type": "uint8"
119
- }
120
- ],
121
- "name": "CheckpointCreated",
122
- "type": "event"
123
- },
124
- {
125
- "anonymous": false,
126
- "inputs": [
127
- {
128
- "indexed": false,
129
- "internalType": "uint256",
130
- "name": "pendingSubFee",
131
- "type": "uint256"
132
- },
133
- {
134
- "indexed": false,
135
- "internalType": "uint256",
136
- "name": "pendingWithdrawalProfit",
137
- "type": "uint256"
138
- }
139
- ],
140
- "name": "CloseBreakdown",
141
- "type": "event"
142
- },
143
- {
144
- "anonymous": false,
145
- "inputs": [
146
- {
147
- "indexed": true,
148
- "internalType": "address",
149
- "name": "owner",
150
- "type": "address"
151
- }
152
- ],
153
- "name": "CloseRequested",
154
- "type": "event"
155
- },
156
- {
157
- "anonymous": false,
158
- "inputs": [
159
- {
160
- "indexed": true,
161
- "internalType": "address",
162
- "name": "owner",
163
- "type": "address"
164
- },
165
- {
166
- "indexed": false,
167
- "internalType": "int64",
168
- "name": "accountValue",
169
- "type": "int64"
170
- },
171
- {
172
- "indexed": false,
173
- "internalType": "uint256",
174
- "name": "dailyFloor",
175
- "type": "uint256"
176
- }
177
- ],
178
- "name": "DailyDrawdownBreached",
179
- "type": "event"
180
- },
181
- {
182
- "anonymous": false,
183
- "inputs": [
184
- {
185
- "indexed": false,
186
- "internalType": "uint256",
187
- "name": "oldHWM",
188
- "type": "uint256"
189
- },
190
- {
191
- "indexed": false,
192
- "internalType": "uint256",
193
- "name": "newHWM",
194
- "type": "uint256"
195
- }
196
- ],
197
- "name": "HighWaterMarkUpdated",
198
- "type": "event"
199
- },
200
- {
201
- "anonymous": false,
202
- "inputs": [
203
- {
204
- "indexed": false,
205
- "internalType": "uint256",
206
- "name": "amount",
207
- "type": "uint256"
208
- }
209
- ],
210
- "name": "Initialized",
211
- "type": "event"
212
- },
213
- {
214
- "anonymous": false,
215
- "inputs": [
216
- {
217
- "indexed": true,
218
- "internalType": "address",
219
- "name": "owner",
220
- "type": "address"
221
- },
222
- {
223
- "indexed": false,
224
- "internalType": "uint32",
225
- "name": "perpIndex",
226
- "type": "uint32"
227
- },
228
- {
229
- "indexed": false,
230
- "internalType": "uint32",
231
- "name": "leverage",
232
- "type": "uint32"
233
- }
234
- ],
235
- "name": "PositionLeverageBreached",
236
- "type": "event"
237
- },
238
- {
239
- "anonymous": false,
240
- "inputs": [
241
- {
242
- "indexed": false,
243
- "internalType": "uint256",
244
- "name": "amount",
245
- "type": "uint256"
246
- }
247
- ],
248
- "name": "StuckFundsRescued",
249
- "type": "event"
250
- },
251
- {
252
- "anonymous": false,
253
- "inputs": [
254
- {
255
- "indexed": true,
256
- "internalType": "address",
257
- "name": "owner",
258
- "type": "address"
259
- }
260
- ],
261
- "name": "SubscriptionCancelled",
262
- "type": "event"
263
- },
264
- {
265
- "anonymous": false,
266
- "inputs": [
267
- {
268
- "indexed": true,
269
- "internalType": "address",
270
- "name": "owner",
271
- "type": "address"
272
- }
273
- ],
274
- "name": "SubscriptionExpired",
275
- "type": "event"
276
- },
277
- {
278
- "anonymous": false,
279
- "inputs": [
280
- {
281
- "indexed": false,
282
- "internalType": "uint256",
283
- "name": "amount",
284
- "type": "uint256"
285
- }
286
- ],
287
- "name": "SubscriptionFeeClaimed",
288
- "type": "event"
289
- },
290
- {
291
- "anonymous": false,
292
- "inputs": [
293
- {
294
- "indexed": false,
295
- "internalType": "uint256",
296
- "name": "amount",
297
- "type": "uint256"
298
- },
299
- {
300
- "indexed": false,
301
- "internalType": "uint256",
302
- "name": "paidUntil",
303
- "type": "uint256"
304
- }
305
- ],
306
- "name": "SubscriptionPaid",
307
- "type": "event"
308
- },
309
- {
310
- "anonymous": false,
311
- "inputs": [
312
- {
313
- "indexed": true,
314
- "internalType": "address",
315
- "name": "owner",
316
- "type": "address"
317
- },
318
- {
319
- "indexed": false,
320
- "internalType": "uint256",
321
- "name": "fee",
322
- "type": "uint256"
323
- },
324
- {
325
- "indexed": false,
326
- "internalType": "bool",
327
- "name": "insufficientBalance",
328
- "type": "bool"
329
- }
330
- ],
331
- "name": "SubscriptionPaymentFailed",
332
- "type": "event"
333
- },
334
- {
335
- "anonymous": false,
336
- "inputs": [
337
- {
338
- "indexed": true,
339
- "internalType": "address",
340
- "name": "owner",
341
- "type": "address"
342
- },
343
- {
344
- "indexed": false,
345
- "internalType": "int64",
346
- "name": "accountValue",
347
- "type": "int64"
348
- },
349
- {
350
- "indexed": false,
351
- "internalType": "uint256",
352
- "name": "floor",
353
- "type": "uint256"
354
- }
355
- ],
356
- "name": "TrailingDrawdownBreached",
357
- "type": "event"
358
- },
359
- {
360
- "anonymous": false,
361
- "inputs": [
362
- {
363
- "indexed": true,
364
- "internalType": "address",
365
- "name": "owner",
366
- "type": "address"
367
- },
368
- {
369
- "indexed": false,
370
- "internalType": "uint32",
371
- "name": "perpIndex",
372
- "type": "uint32"
373
- }
374
- ],
375
- "name": "UnauthorizedAssetDetected",
376
- "type": "event"
377
- },
378
- {
379
- "anonymous": false,
380
- "inputs": [
381
- {
382
- "indexed": false,
383
- "internalType": "uint256",
384
- "name": "amount",
385
- "type": "uint256"
386
- }
387
- ],
388
- "name": "VaultReturnInitiated",
389
- "type": "event"
390
- },
391
- {
392
- "anonymous": false,
393
- "inputs": [
394
- {
395
- "indexed": true,
396
- "internalType": "address",
397
- "name": "owner",
398
- "type": "address"
399
- },
400
- {
401
- "indexed": false,
402
- "internalType": "uint256",
403
- "name": "ownerAmount",
404
- "type": "uint256"
405
- },
406
- {
407
- "indexed": false,
408
- "internalType": "uint256",
409
- "name": "vaultAmount",
410
- "type": "uint256"
411
- }
412
- ],
413
- "name": "WithdrawalClaimed",
414
- "type": "event"
415
- },
416
- {
417
- "anonymous": false,
418
- "inputs": [
419
- {
420
- "indexed": true,
421
- "internalType": "address",
422
- "name": "owner",
423
- "type": "address"
424
- }
425
- ],
426
- "name": "WithdrawalEligible",
427
- "type": "event"
428
- },
429
- {
430
- "anonymous": false,
431
- "inputs": [
432
- {
433
- "indexed": true,
434
- "internalType": "address",
435
- "name": "owner",
436
- "type": "address"
437
- },
438
- {
439
- "indexed": false,
440
- "internalType": "uint256",
441
- "name": "profit",
442
- "type": "uint256"
443
- },
444
- {
445
- "indexed": false,
446
- "internalType": "uint256",
447
- "name": "ownerAmount",
448
- "type": "uint256"
449
- },
450
- {
451
- "indexed": false,
452
- "internalType": "uint256",
453
- "name": "vaultAmount",
454
- "type": "uint256"
455
- },
456
- {
457
- "indexed": false,
458
- "internalType": "uint256",
459
- "name": "protocolAmount",
460
- "type": "uint256"
461
- }
462
- ],
463
- "name": "WithdrawalRequested",
464
- "type": "event"
465
- },
466
- {
467
- "inputs": [],
468
- "name": "BPS_DENOMINATOR",
469
- "outputs": [
470
- {
471
- "internalType": "uint256",
472
- "name": "",
473
- "type": "uint256"
474
- }
475
- ],
476
- "stateMutability": "view",
477
- "type": "function"
478
- },
479
- {
480
- "inputs": [],
481
- "name": "BRIDGE_DELAY",
482
- "outputs": [
483
- {
484
- "internalType": "uint256",
485
- "name": "",
486
- "type": "uint256"
487
- }
488
- ],
489
- "stateMutability": "view",
490
- "type": "function"
491
- },
492
- {
493
- "inputs": [],
494
- "name": "CHECKPOINT_INTERVAL",
495
- "outputs": [
496
- {
497
- "internalType": "uint256",
498
- "name": "",
499
- "type": "uint256"
500
- }
501
- ],
502
- "stateMutability": "view",
503
- "type": "function"
504
- },
505
- {
506
- "inputs": [],
507
- "name": "CLOSING_TIMEOUT",
508
- "outputs": [
509
- {
510
- "internalType": "uint256",
511
- "name": "",
512
- "type": "uint256"
513
- }
514
- ],
515
- "stateMutability": "view",
516
- "type": "function"
517
- },
518
- {
519
- "inputs": [],
520
- "name": "CORE_WRITER",
521
- "outputs": [
522
- {
523
- "internalType": "contract ICoreWriter",
524
- "name": "",
525
- "type": "address"
526
- }
527
- ],
528
- "stateMutability": "view",
529
- "type": "function"
530
- },
531
- {
532
- "inputs": [],
533
- "name": "DAILY_DD_DISCOUNT_BPS",
534
- "outputs": [
535
- {
536
- "internalType": "uint16",
537
- "name": "",
538
- "type": "uint16"
539
- }
540
- ],
541
- "stateMutability": "view",
542
- "type": "function"
543
- },
544
- {
545
- "inputs": [],
546
- "name": "MAX_LEVERAGE",
547
- "outputs": [
548
- {
549
- "internalType": "uint256",
550
- "name": "",
551
- "type": "uint256"
552
- }
553
- ],
554
- "stateMutability": "view",
555
- "type": "function"
556
- },
557
- {
558
- "inputs": [],
559
- "name": "MIN_PROFIT_BPS",
560
- "outputs": [
561
- {
562
- "internalType": "uint256",
563
- "name": "",
564
- "type": "uint256"
565
- }
566
- ],
567
- "stateMutability": "view",
568
- "type": "function"
569
- },
570
- {
571
- "inputs": [],
572
- "name": "OWNER_PROFIT_BPS",
573
- "outputs": [
574
- {
575
- "internalType": "uint256",
576
- "name": "",
577
- "type": "uint256"
578
- }
579
- ],
580
- "stateMutability": "view",
581
- "type": "function"
582
- },
583
- {
584
- "inputs": [],
585
- "name": "PERP_DEX_COUNT",
586
- "outputs": [
587
- {
588
- "internalType": "uint32",
589
- "name": "",
590
- "type": "uint32"
591
- }
592
- ],
593
- "stateMutability": "view",
594
- "type": "function"
595
- },
596
- {
597
- "inputs": [],
598
- "name": "PROFITABLE_DAYS_REQUIRED",
599
- "outputs": [
600
- {
601
- "internalType": "uint8",
602
- "name": "",
603
- "type": "uint8"
604
- }
605
- ],
606
- "stateMutability": "view",
607
- "type": "function"
608
- },
609
- {
610
- "inputs": [],
611
- "name": "PROTOCOL_PROFIT_BPS",
612
- "outputs": [
613
- {
614
- "internalType": "uint256",
615
- "name": "",
616
- "type": "uint256"
617
- }
618
- ],
619
- "stateMutability": "view",
620
- "type": "function"
621
- },
622
- {
623
- "inputs": [],
624
- "name": "SUBSCRIPTION_PERIOD",
625
- "outputs": [
626
- {
627
- "internalType": "uint256",
628
- "name": "",
629
- "type": "uint256"
630
- }
631
- ],
632
- "stateMutability": "view",
633
- "type": "function"
634
- },
635
- {
636
- "inputs": [],
637
- "name": "SUBSCRIPTION_PROTOCOL_BPS",
638
- "outputs": [
639
- {
640
- "internalType": "uint256",
641
- "name": "",
642
- "type": "uint256"
643
- }
644
- ],
645
- "stateMutability": "view",
646
- "type": "function"
647
- },
648
- {
649
- "inputs": [],
650
- "name": "TRADING_DAYS_REQUIRED",
651
- "outputs": [
652
- {
653
- "internalType": "uint8",
654
- "name": "",
655
- "type": "uint8"
656
- }
657
- ],
658
- "stateMutability": "view",
659
- "type": "function"
660
- },
661
- {
662
- "inputs": [],
663
- "name": "accountSize",
664
- "outputs": [
665
- {
666
- "internalType": "uint96",
667
- "name": "",
668
- "type": "uint96"
669
- }
670
- ],
671
- "stateMutability": "view",
672
- "type": "function"
673
- },
674
- {
675
- "inputs": [],
676
- "name": "activatedAt",
677
- "outputs": [
678
- {
679
- "internalType": "uint256",
680
- "name": "",
681
- "type": "uint256"
682
- }
683
- ],
684
- "stateMutability": "view",
685
- "type": "function"
686
- },
687
- {
688
- "inputs": [],
689
- "name": "apiWallet",
690
- "outputs": [
691
- {
692
- "internalType": "address",
693
- "name": "",
694
- "type": "address"
695
- }
696
- ],
697
- "stateMutability": "view",
698
- "type": "function"
699
- },
700
- {
701
- "inputs": [],
702
- "name": "bridgeToEvm",
703
- "outputs": [],
704
- "stateMutability": "nonpayable",
705
- "type": "function"
706
- },
707
- {
708
- "inputs": [],
709
- "name": "builder",
710
- "outputs": [
711
- {
712
- "internalType": "address",
713
- "name": "",
714
- "type": "address"
715
- }
716
- ],
717
- "stateMutability": "view",
718
- "type": "function"
719
- },
720
- {
721
- "inputs": [],
722
- "name": "canWithdrawProfit",
723
- "outputs": [
724
- {
725
- "internalType": "bool",
726
- "name": "",
727
- "type": "bool"
728
- }
729
- ],
730
- "stateMutability": "view",
731
- "type": "function"
732
- },
733
- {
734
- "inputs": [],
735
- "name": "cancelSubscription",
736
- "outputs": [],
737
- "stateMutability": "nonpayable",
738
- "type": "function"
739
- },
740
- {
741
- "inputs": [],
742
- "name": "checkpoint",
743
- "outputs": [],
744
- "stateMutability": "nonpayable",
745
- "type": "function"
746
- },
747
- {
748
- "inputs": [],
749
- "name": "checkpointIndex",
750
- "outputs": [
751
- {
752
- "internalType": "uint8",
753
- "name": "",
754
- "type": "uint8"
755
- }
756
- ],
757
- "stateMutability": "view",
758
- "type": "function"
759
- },
760
- {
761
- "inputs": [
762
- {
763
- "internalType": "uint256",
764
- "name": "",
765
- "type": "uint256"
766
- }
767
- ],
768
- "name": "checkpoints",
769
- "outputs": [
770
- {
771
- "internalType": "int64",
772
- "name": "accountValue",
773
- "type": "int64"
774
- },
775
- {
776
- "internalType": "uint48",
777
- "name": "timestamp",
778
- "type": "uint48"
779
- },
780
- {
781
- "internalType": "bool",
782
- "name": "profitable",
783
- "type": "bool"
784
- }
785
- ],
786
- "stateMutability": "view",
787
- "type": "function"
788
- },
789
- {
790
- "inputs": [],
791
- "name": "claimSubscriptionFee",
792
- "outputs": [],
793
- "stateMutability": "nonpayable",
794
- "type": "function"
795
- },
796
- {
797
- "inputs": [],
798
- "name": "claimWithdrawal",
799
- "outputs": [],
800
- "stateMutability": "nonpayable",
801
- "type": "function"
802
- },
803
- {
804
- "inputs": [],
805
- "name": "closeAndReturn",
806
- "outputs": [],
807
- "stateMutability": "nonpayable",
808
- "type": "function"
809
- },
810
- {
811
- "inputs": [],
812
- "name": "closedWithPendingProfit",
813
- "outputs": [
814
- {
815
- "internalType": "uint256",
816
- "name": "",
817
- "type": "uint256"
818
- }
819
- ],
820
- "stateMutability": "view",
821
- "type": "function"
822
- },
823
- {
824
- "inputs": [],
825
- "name": "closingInitiatedAt",
826
- "outputs": [
827
- {
828
- "internalType": "uint48",
829
- "name": "",
830
- "type": "uint48"
831
- }
832
- ],
833
- "stateMutability": "view",
834
- "type": "function"
835
- },
836
- {
837
- "inputs": [],
838
- "name": "dailyDrawdownEnabled",
839
- "outputs": [
840
- {
841
- "internalType": "bool",
842
- "name": "",
843
- "type": "bool"
844
- }
845
- ],
846
- "stateMutability": "view",
847
- "type": "function"
848
- },
849
- {
850
- "inputs": [],
851
- "name": "dayStartValue",
852
- "outputs": [
853
- {
854
- "internalType": "uint256",
855
- "name": "",
856
- "type": "uint256"
857
- }
858
- ],
859
- "stateMutability": "view",
860
- "type": "function"
861
- },
862
- {
863
- "inputs": [],
864
- "name": "drawdownBps",
865
- "outputs": [
866
- {
867
- "internalType": "uint16",
868
- "name": "",
869
- "type": "uint16"
870
- }
871
- ],
872
- "stateMutability": "view",
873
- "type": "function"
874
- },
875
- {
876
- "inputs": [],
877
- "name": "finalizeReturn",
878
- "outputs": [],
879
- "stateMutability": "nonpayable",
880
- "type": "function"
881
- },
882
- {
883
- "inputs": [],
884
- "name": "forwarder",
885
- "outputs": [
886
- {
887
- "internalType": "address",
888
- "name": "",
889
- "type": "address"
890
- }
891
- ],
892
- "stateMutability": "view",
893
- "type": "function"
894
- },
895
- {
896
- "inputs": [],
897
- "name": "getAllCheckpoints",
898
- "outputs": [
899
- {
900
- "components": [
901
- {
902
- "internalType": "int64",
903
- "name": "accountValue",
904
- "type": "int64"
905
- },
906
- {
907
- "internalType": "uint48",
908
- "name": "timestamp",
909
- "type": "uint48"
910
- },
911
- {
912
- "internalType": "bool",
913
- "name": "profitable",
914
- "type": "bool"
915
- }
916
- ],
917
- "internalType": "struct FundedAccount.Checkpoint[7]",
918
- "name": "",
919
- "type": "tuple[7]"
920
- }
921
- ],
922
- "stateMutability": "view",
923
- "type": "function"
924
- },
925
- {
926
- "inputs": [],
927
- "name": "getDailyFloor",
928
- "outputs": [
929
- {
930
- "internalType": "uint256",
931
- "name": "",
932
- "type": "uint256"
933
- }
934
- ],
935
- "stateMutability": "view",
936
- "type": "function"
937
- },
938
- {
939
- "inputs": [],
940
- "name": "getSubscriptionFee",
941
- "outputs": [
942
- {
943
- "internalType": "uint256",
944
- "name": "",
945
- "type": "uint256"
946
- }
947
- ],
948
- "stateMutability": "view",
949
- "type": "function"
950
- },
951
- {
952
- "inputs": [],
953
- "name": "getTrailingFloor",
954
- "outputs": [
955
- {
956
- "internalType": "uint256",
957
- "name": "",
958
- "type": "uint256"
959
- }
960
- ],
961
- "stateMutability": "view",
962
- "type": "function"
963
- },
964
- {
965
- "inputs": [],
966
- "name": "highWaterMark",
967
- "outputs": [
968
- {
969
- "internalType": "uint256",
970
- "name": "",
971
- "type": "uint256"
972
- }
973
- ],
974
- "stateMutability": "view",
975
- "type": "function"
976
- },
977
- {
978
- "inputs": [
979
- {
980
- "internalType": "address",
981
- "name": "_usdc",
982
- "type": "address"
983
- },
984
- {
985
- "internalType": "address",
986
- "name": "_owner",
987
- "type": "address"
988
- },
989
- {
990
- "internalType": "address",
991
- "name": "_vault",
992
- "type": "address"
993
- },
994
- {
995
- "internalType": "address",
996
- "name": "_builder",
997
- "type": "address"
998
- },
999
- {
1000
- "internalType": "address",
1001
- "name": "_forwarder",
1002
- "type": "address"
1003
- },
1004
- {
1005
- "internalType": "uint96",
1006
- "name": "_accountSize",
1007
- "type": "uint96"
1008
- },
1009
- {
1010
- "internalType": "uint16",
1011
- "name": "_drawdownBps",
1012
- "type": "uint16"
1013
- },
1014
- {
1015
- "internalType": "bool",
1016
- "name": "_dailyDrawdownEnabled",
1017
- "type": "bool"
1018
- },
1019
- {
1020
- "internalType": "uint16",
1021
- "name": "_subscriptionFeeMultiplier",
1022
- "type": "uint16"
1023
- }
1024
- ],
1025
- "name": "init",
1026
- "outputs": [],
1027
- "stateMutability": "nonpayable",
1028
- "type": "function"
1029
- },
1030
- {
1031
- "inputs": [],
1032
- "name": "initialize",
1033
- "outputs": [],
1034
- "stateMutability": "nonpayable",
1035
- "type": "function"
1036
- },
1037
- {
1038
- "inputs": [],
1039
- "name": "initiateClose",
1040
- "outputs": [],
1041
- "stateMutability": "nonpayable",
1042
- "type": "function"
1043
- },
1044
- {
1045
- "inputs": [
1046
- {
1047
- "internalType": "uint32",
1048
- "name": "perpIndex",
1049
- "type": "uint32"
1050
- }
1051
- ],
1052
- "name": "initiateClose",
1053
- "outputs": [],
1054
- "stateMutability": "nonpayable",
1055
- "type": "function"
1056
- },
1057
- {
1058
- "inputs": [],
1059
- "name": "initiateCloseAdmin",
1060
- "outputs": [],
1061
- "stateMutability": "nonpayable",
1062
- "type": "function"
1063
- },
1064
- {
1065
- "inputs": [],
1066
- "name": "isSubscriptionActive",
1067
- "outputs": [
1068
- {
1069
- "internalType": "bool",
1070
- "name": "",
1071
- "type": "bool"
1072
- }
1073
- ],
1074
- "stateMutability": "view",
1075
- "type": "function"
1076
- },
1077
- {
1078
- "inputs": [
1079
- {
1080
- "internalType": "address",
1081
- "name": "_forwarder",
1082
- "type": "address"
1083
- }
1084
- ],
1085
- "name": "isTrustedForwarder",
1086
- "outputs": [
1087
- {
1088
- "internalType": "bool",
1089
- "name": "",
1090
- "type": "bool"
1091
- }
1092
- ],
1093
- "stateMutability": "view",
1094
- "type": "function"
1095
- },
1096
- {
1097
- "inputs": [],
1098
- "name": "lastCheckpointDay",
1099
- "outputs": [
1100
- {
1101
- "internalType": "uint256",
1102
- "name": "",
1103
- "type": "uint256"
1104
- }
1105
- ],
1106
- "stateMutability": "view",
1107
- "type": "function"
1108
- },
1109
- {
1110
- "inputs": [],
1111
- "name": "owner",
1112
- "outputs": [
1113
- {
1114
- "internalType": "address",
1115
- "name": "",
1116
- "type": "address"
1117
- }
1118
- ],
1119
- "stateMutability": "view",
1120
- "type": "function"
1121
- },
1122
- {
1123
- "inputs": [],
1124
- "name": "pendingSubscriptionFee",
1125
- "outputs": [
1126
- {
1127
- "internalType": "uint256",
1128
- "name": "",
1129
- "type": "uint256"
1130
- }
1131
- ],
1132
- "stateMutability": "view",
1133
- "type": "function"
1134
- },
1135
- {
1136
- "inputs": [],
1137
- "name": "pendingWithdrawal",
1138
- "outputs": [
1139
- {
1140
- "internalType": "uint256",
1141
- "name": "profit",
1142
- "type": "uint256"
1143
- }
1144
- ],
1145
- "stateMutability": "view",
1146
- "type": "function"
1147
- },
1148
- {
1149
- "inputs": [],
1150
- "name": "profitableDaysCount",
1151
- "outputs": [
1152
- {
1153
- "internalType": "uint8",
1154
- "name": "",
1155
- "type": "uint8"
1156
- }
1157
- ],
1158
- "stateMutability": "view",
1159
- "type": "function"
1160
- },
1161
- {
1162
- "inputs": [],
1163
- "name": "requestWithdrawProfit",
1164
- "outputs": [],
1165
- "stateMutability": "nonpayable",
1166
- "type": "function"
1167
- },
1168
- {
1169
- "inputs": [],
1170
- "name": "rescueStuckFunds",
1171
- "outputs": [],
1172
- "stateMutability": "nonpayable",
1173
- "type": "function"
1174
- },
1175
- {
1176
- "inputs": [],
1177
- "name": "returnInitiatedAt",
1178
- "outputs": [
1179
- {
1180
- "internalType": "uint48",
1181
- "name": "",
1182
- "type": "uint48"
1183
- }
1184
- ],
1185
- "stateMutability": "view",
1186
- "type": "function"
1187
- },
1188
- {
1189
- "inputs": [
1190
- {
1191
- "internalType": "address",
1192
- "name": "_wallet",
1193
- "type": "address"
1194
- }
1195
- ],
1196
- "name": "setApiWallet",
1197
- "outputs": [],
1198
- "stateMutability": "nonpayable",
1199
- "type": "function"
1200
- },
1201
- {
1202
- "inputs": [],
1203
- "name": "state",
1204
- "outputs": [
1205
- {
1206
- "internalType": "enum FundedAccount.State",
1207
- "name": "",
1208
- "type": "uint8"
1209
- }
1210
- ],
1211
- "stateMutability": "view",
1212
- "type": "function"
1213
- },
1214
- {
1215
- "inputs": [],
1216
- "name": "subscriptionCancelled",
1217
- "outputs": [
1218
- {
1219
- "internalType": "bool",
1220
- "name": "",
1221
- "type": "bool"
1222
- }
1223
- ],
1224
- "stateMutability": "view",
1225
- "type": "function"
1226
- },
1227
- {
1228
- "inputs": [],
1229
- "name": "subscriptionFeeMultiplier",
1230
- "outputs": [
1231
- {
1232
- "internalType": "uint16",
1233
- "name": "",
1234
- "type": "uint16"
1235
- }
1236
- ],
1237
- "stateMutability": "view",
1238
- "type": "function"
1239
- },
1240
- {
1241
- "inputs": [],
1242
- "name": "subscriptionPaidUntil",
1243
- "outputs": [
1244
- {
1245
- "internalType": "uint256",
1246
- "name": "",
1247
- "type": "uint256"
1248
- }
1249
- ],
1250
- "stateMutability": "view",
1251
- "type": "function"
1252
- },
1253
- {
1254
- "inputs": [],
1255
- "name": "totalCheckpoints",
1256
- "outputs": [
1257
- {
1258
- "internalType": "uint8",
1259
- "name": "",
1260
- "type": "uint8"
1261
- }
1262
- ],
1263
- "stateMutability": "view",
1264
- "type": "function"
1265
- },
1266
- {
1267
- "inputs": [],
1268
- "name": "usdc",
1269
- "outputs": [
1270
- {
1271
- "internalType": "contract IERC20",
1272
- "name": "",
1273
- "type": "address"
1274
- }
1275
- ],
1276
- "stateMutability": "view",
1277
- "type": "function"
1278
- },
1279
- {
1280
- "inputs": [],
1281
- "name": "vault",
1282
- "outputs": [
1283
- {
1284
- "internalType": "address",
1285
- "name": "",
1286
- "type": "address"
1287
- }
1288
- ],
1289
- "stateMutability": "view",
1290
- "type": "function"
1291
- },
1292
- {
1293
- "stateMutability": "payable",
1294
- "type": "receive"
1295
- }
1296
- ] as const;