@reyaxyz/sdk 0.1.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.
Files changed (93) hide show
  1. package/LICENSE.md +1 -0
  2. package/README.md +10 -0
  3. package/dist/abis/AccountModule.json +1079 -0
  4. package/dist/abis/ExecutionModule.json +758 -0
  5. package/dist/index.js +18 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/services/encode.js +37 -0
  8. package/dist/services/encode.js.map +1 -0
  9. package/dist/services/executeTransaction.js +110 -0
  10. package/dist/services/executeTransaction.js.map +1 -0
  11. package/dist/services/lp/encode.js +29 -0
  12. package/dist/services/lp/encode.js.map +1 -0
  13. package/dist/services/lp/lp.js +70 -0
  14. package/dist/services/lp/lp.js.map +1 -0
  15. package/dist/services/lp/types.js +3 -0
  16. package/dist/services/lp/types.js.map +1 -0
  17. package/dist/services/margin-accounts/account.js +56 -0
  18. package/dist/services/margin-accounts/account.js.map +1 -0
  19. package/dist/services/margin-accounts/deposit.js +56 -0
  20. package/dist/services/margin-accounts/deposit.js.map +1 -0
  21. package/dist/services/margin-accounts/encode.js +43 -0
  22. package/dist/services/margin-accounts/encode.js.map +1 -0
  23. package/dist/services/margin-accounts/types.js +3 -0
  24. package/dist/services/margin-accounts/types.js.map +1 -0
  25. package/dist/services/margin-accounts/withdraw.js +56 -0
  26. package/dist/services/margin-accounts/withdraw.js.map +1 -0
  27. package/dist/services/orders/encode.js +25 -0
  28. package/dist/services/orders/encode.js.map +1 -0
  29. package/dist/services/orders/order.js +56 -0
  30. package/dist/services/orders/order.js.map +1 -0
  31. package/dist/services/orders/types.js +3 -0
  32. package/dist/services/orders/types.js.map +1 -0
  33. package/dist/types/index.d.ts +2 -0
  34. package/dist/types/index.d.ts.map +1 -0
  35. package/dist/types/services/encode.d.ts +6 -0
  36. package/dist/types/services/encode.d.ts.map +1 -0
  37. package/dist/types/services/executeTransaction.d.ts +12 -0
  38. package/dist/types/services/executeTransaction.d.ts.map +1 -0
  39. package/dist/types/services/lp/encode.d.ts +4 -0
  40. package/dist/types/services/lp/encode.d.ts.map +1 -0
  41. package/dist/types/services/lp/lp.d.ts +4 -0
  42. package/dist/types/services/lp/lp.d.ts.map +1 -0
  43. package/dist/types/services/lp/types.d.ts +17 -0
  44. package/dist/types/services/lp/types.d.ts.map +1 -0
  45. package/dist/types/services/margin-accounts/account.d.ts +3 -0
  46. package/dist/types/services/margin-accounts/account.d.ts.map +1 -0
  47. package/dist/types/services/margin-accounts/deposit.d.ts +3 -0
  48. package/dist/types/services/margin-accounts/deposit.d.ts.map +1 -0
  49. package/dist/types/services/margin-accounts/encode.d.ts +5 -0
  50. package/dist/types/services/margin-accounts/encode.d.ts.map +1 -0
  51. package/dist/types/services/margin-accounts/types.d.ts +25 -0
  52. package/dist/types/services/margin-accounts/types.d.ts.map +1 -0
  53. package/dist/types/services/margin-accounts/withdraw.d.ts +3 -0
  54. package/dist/types/services/margin-accounts/withdraw.d.ts.map +1 -0
  55. package/dist/types/services/orders/encode.d.ts +3 -0
  56. package/dist/types/services/orders/encode.d.ts.map +1 -0
  57. package/dist/types/services/orders/order.d.ts +3 -0
  58. package/dist/types/services/orders/order.d.ts.map +1 -0
  59. package/dist/types/services/orders/types.d.ts +12 -0
  60. package/dist/types/services/orders/types.d.ts.map +1 -0
  61. package/dist/types/utils/action.d.ts +27 -0
  62. package/dist/types/utils/action.d.ts.map +1 -0
  63. package/dist/types/utils/routerCommands.d.ts +21 -0
  64. package/dist/types/utils/routerCommands.d.ts.map +1 -0
  65. package/dist/types/utils/txHelpers.d.ts +2 -0
  66. package/dist/types/utils/txHelpers.d.ts.map +1 -0
  67. package/dist/utils/action.js +22 -0
  68. package/dist/utils/action.js.map +1 -0
  69. package/dist/utils/routerCommands.js +41 -0
  70. package/dist/utils/routerCommands.js.map +1 -0
  71. package/dist/utils/txHelpers.js +8 -0
  72. package/dist/utils/txHelpers.js.map +1 -0
  73. package/package.json +36 -0
  74. package/src/abis/AccountModule.json +1079 -0
  75. package/src/abis/CoreProxy.json +206 -0
  76. package/src/abis/ExecutionModule.json +758 -0
  77. package/src/index.ts +1 -0
  78. package/src/services/encode.ts +72 -0
  79. package/src/services/executeTransaction.ts +54 -0
  80. package/src/services/lp/encode.ts +36 -0
  81. package/src/services/lp/lp.ts +47 -0
  82. package/src/services/lp/types.ts +18 -0
  83. package/src/services/margin-accounts/account.ts +21 -0
  84. package/src/services/margin-accounts/deposit.ts +23 -0
  85. package/src/services/margin-accounts/encode.ts +56 -0
  86. package/src/services/margin-accounts/types.ts +27 -0
  87. package/src/services/margin-accounts/withdraw.ts +23 -0
  88. package/src/services/orders/encode.ts +29 -0
  89. package/src/services/orders/order.ts +24 -0
  90. package/src/services/orders/types.ts +12 -0
  91. package/src/utils/action.ts +41 -0
  92. package/src/utils/routerCommands.ts +58 -0
  93. package/src/utils/txHelpers.ts +3 -0
@@ -0,0 +1,1079 @@
1
+ {
2
+ "abi": [
3
+ {
4
+ "type": "function",
5
+ "name": "activateFirstMarketForAccount",
6
+ "inputs": [
7
+ {
8
+ "name": "accountId",
9
+ "type": "uint128",
10
+ "internalType": "uint128"
11
+ },
12
+ {
13
+ "name": "marketId",
14
+ "type": "uint128",
15
+ "internalType": "uint128"
16
+ }
17
+ ],
18
+ "outputs": [],
19
+ "stateMutability": "nonpayable"
20
+ },
21
+ {
22
+ "type": "function",
23
+ "name": "announceBackstopLpWithdraw",
24
+ "inputs": [
25
+ {
26
+ "name": "accountId",
27
+ "type": "uint128",
28
+ "internalType": "uint128"
29
+ }
30
+ ],
31
+ "outputs": [],
32
+ "stateMutability": "nonpayable"
33
+ },
34
+ {
35
+ "type": "function",
36
+ "name": "createAccount",
37
+ "inputs": [
38
+ {
39
+ "name": "accountOwner",
40
+ "type": "address",
41
+ "internalType": "address"
42
+ }
43
+ ],
44
+ "outputs": [
45
+ {
46
+ "name": "accountId",
47
+ "type": "uint128",
48
+ "internalType": "uint128"
49
+ }
50
+ ],
51
+ "stateMutability": "nonpayable"
52
+ },
53
+ {
54
+ "type": "function",
55
+ "name": "getAccountBlockExposuresByMarket",
56
+ "inputs": [
57
+ {
58
+ "name": "accountId",
59
+ "type": "uint128",
60
+ "internalType": "uint128"
61
+ },
62
+ {
63
+ "name": "marketId",
64
+ "type": "uint128",
65
+ "internalType": "uint128"
66
+ }
67
+ ],
68
+ "outputs": [
69
+ {
70
+ "name": "",
71
+ "type": "int256[]",
72
+ "internalType": "int256[]"
73
+ }
74
+ ],
75
+ "stateMutability": "view"
76
+ },
77
+ {
78
+ "type": "function",
79
+ "name": "getAccountOwner",
80
+ "inputs": [
81
+ {
82
+ "name": "accountId",
83
+ "type": "uint128",
84
+ "internalType": "uint128"
85
+ }
86
+ ],
87
+ "outputs": [
88
+ {
89
+ "name": "",
90
+ "type": "address",
91
+ "internalType": "address"
92
+ }
93
+ ],
94
+ "stateMutability": "view"
95
+ },
96
+ {
97
+ "type": "function",
98
+ "name": "getAccountPermissions",
99
+ "inputs": [
100
+ {
101
+ "name": "accountId",
102
+ "type": "uint128",
103
+ "internalType": "uint128"
104
+ }
105
+ ],
106
+ "outputs": [
107
+ {
108
+ "name": "accountPerms",
109
+ "type": "tuple[]",
110
+ "internalType": "struct AccountPermissions[]",
111
+ "components": [
112
+ {
113
+ "name": "user",
114
+ "type": "address",
115
+ "internalType": "address"
116
+ },
117
+ {
118
+ "name": "permissions",
119
+ "type": "bytes32[]",
120
+ "internalType": "bytes32[]"
121
+ }
122
+ ]
123
+ }
124
+ ],
125
+ "stateMutability": "view"
126
+ },
127
+ {
128
+ "type": "function",
129
+ "name": "getActiveMarketsPerQuoteCollateral",
130
+ "inputs": [
131
+ {
132
+ "name": "accountId",
133
+ "type": "uint128",
134
+ "internalType": "uint128"
135
+ },
136
+ {
137
+ "name": "quoteCollateral",
138
+ "type": "address",
139
+ "internalType": "address"
140
+ }
141
+ ],
142
+ "outputs": [
143
+ {
144
+ "name": "",
145
+ "type": "uint128[]",
146
+ "internalType": "uint128[]"
147
+ }
148
+ ],
149
+ "stateMutability": "view"
150
+ },
151
+ {
152
+ "type": "function",
153
+ "name": "getCollateralInfo",
154
+ "inputs": [
155
+ {
156
+ "name": "accountId",
157
+ "type": "uint128",
158
+ "internalType": "uint128"
159
+ },
160
+ {
161
+ "name": "collateral",
162
+ "type": "address",
163
+ "internalType": "address"
164
+ }
165
+ ],
166
+ "outputs": [
167
+ {
168
+ "name": "",
169
+ "type": "tuple",
170
+ "internalType": "struct CollateralInfo",
171
+ "components": [
172
+ {
173
+ "name": "netDeposits",
174
+ "type": "int256",
175
+ "internalType": "int256"
176
+ },
177
+ {
178
+ "name": "marginBalance",
179
+ "type": "int256",
180
+ "internalType": "int256"
181
+ },
182
+ {
183
+ "name": "realBalance",
184
+ "type": "int256",
185
+ "internalType": "int256"
186
+ }
187
+ ]
188
+ }
189
+ ],
190
+ "stateMutability": "view"
191
+ },
192
+ {
193
+ "type": "function",
194
+ "name": "getCollateralPoolIdOfAccount",
195
+ "inputs": [
196
+ {
197
+ "name": "accountId",
198
+ "type": "uint128",
199
+ "internalType": "uint128"
200
+ }
201
+ ],
202
+ "outputs": [
203
+ {
204
+ "name": "",
205
+ "type": "uint128",
206
+ "internalType": "uint128"
207
+ }
208
+ ],
209
+ "stateMutability": "view"
210
+ },
211
+ {
212
+ "type": "function",
213
+ "name": "getCustomImMultiplier",
214
+ "inputs": [
215
+ {
216
+ "name": "accountId",
217
+ "type": "uint128",
218
+ "internalType": "uint128"
219
+ }
220
+ ],
221
+ "outputs": [
222
+ {
223
+ "name": "",
224
+ "type": "uint256",
225
+ "internalType": "UD60x18"
226
+ }
227
+ ],
228
+ "stateMutability": "nonpayable"
229
+ },
230
+ {
231
+ "type": "function",
232
+ "name": "getLastCreatedAccountId",
233
+ "inputs": [],
234
+ "outputs": [
235
+ {
236
+ "name": "",
237
+ "type": "uint128",
238
+ "internalType": "uint128"
239
+ }
240
+ ],
241
+ "stateMutability": "view"
242
+ },
243
+ {
244
+ "type": "function",
245
+ "name": "getNodeMarginInfo",
246
+ "inputs": [
247
+ {
248
+ "name": "accountId",
249
+ "type": "uint128",
250
+ "internalType": "uint128"
251
+ },
252
+ {
253
+ "name": "collateral",
254
+ "type": "address",
255
+ "internalType": "address"
256
+ }
257
+ ],
258
+ "outputs": [
259
+ {
260
+ "name": "",
261
+ "type": "tuple",
262
+ "internalType": "struct MarginInfo",
263
+ "components": [
264
+ {
265
+ "name": "collateral",
266
+ "type": "address",
267
+ "internalType": "address"
268
+ },
269
+ {
270
+ "name": "marginBalance",
271
+ "type": "int256",
272
+ "internalType": "int256"
273
+ },
274
+ {
275
+ "name": "realBalance",
276
+ "type": "int256",
277
+ "internalType": "int256"
278
+ },
279
+ {
280
+ "name": "initialDelta",
281
+ "type": "int256",
282
+ "internalType": "int256"
283
+ },
284
+ {
285
+ "name": "maintenanceDelta",
286
+ "type": "int256",
287
+ "internalType": "int256"
288
+ },
289
+ {
290
+ "name": "liquidationDelta",
291
+ "type": "int256",
292
+ "internalType": "int256"
293
+ },
294
+ {
295
+ "name": "dutchDelta",
296
+ "type": "int256",
297
+ "internalType": "int256"
298
+ },
299
+ {
300
+ "name": "adlDelta",
301
+ "type": "int256",
302
+ "internalType": "int256"
303
+ },
304
+ {
305
+ "name": "initialBufferDelta",
306
+ "type": "int256",
307
+ "internalType": "int256"
308
+ },
309
+ {
310
+ "name": "liquidationMarginRequirement",
311
+ "type": "uint256",
312
+ "internalType": "uint256"
313
+ }
314
+ ]
315
+ }
316
+ ],
317
+ "stateMutability": "view"
318
+ },
319
+ {
320
+ "type": "function",
321
+ "name": "getTokenMarginInfo",
322
+ "inputs": [
323
+ {
324
+ "name": "accountId",
325
+ "type": "uint128",
326
+ "internalType": "uint128"
327
+ },
328
+ {
329
+ "name": "collateral",
330
+ "type": "address",
331
+ "internalType": "address"
332
+ }
333
+ ],
334
+ "outputs": [
335
+ {
336
+ "name": "",
337
+ "type": "tuple",
338
+ "internalType": "struct MarginInfo",
339
+ "components": [
340
+ {
341
+ "name": "collateral",
342
+ "type": "address",
343
+ "internalType": "address"
344
+ },
345
+ {
346
+ "name": "marginBalance",
347
+ "type": "int256",
348
+ "internalType": "int256"
349
+ },
350
+ {
351
+ "name": "realBalance",
352
+ "type": "int256",
353
+ "internalType": "int256"
354
+ },
355
+ {
356
+ "name": "initialDelta",
357
+ "type": "int256",
358
+ "internalType": "int256"
359
+ },
360
+ {
361
+ "name": "maintenanceDelta",
362
+ "type": "int256",
363
+ "internalType": "int256"
364
+ },
365
+ {
366
+ "name": "liquidationDelta",
367
+ "type": "int256",
368
+ "internalType": "int256"
369
+ },
370
+ {
371
+ "name": "dutchDelta",
372
+ "type": "int256",
373
+ "internalType": "int256"
374
+ },
375
+ {
376
+ "name": "adlDelta",
377
+ "type": "int256",
378
+ "internalType": "int256"
379
+ },
380
+ {
381
+ "name": "initialBufferDelta",
382
+ "type": "int256",
383
+ "internalType": "int256"
384
+ },
385
+ {
386
+ "name": "liquidationMarginRequirement",
387
+ "type": "uint256",
388
+ "internalType": "uint256"
389
+ }
390
+ ]
391
+ }
392
+ ],
393
+ "stateMutability": "view"
394
+ },
395
+ {
396
+ "type": "function",
397
+ "name": "getUsdNodeMarginInfo",
398
+ "inputs": [
399
+ {
400
+ "name": "accountId",
401
+ "type": "uint128",
402
+ "internalType": "uint128"
403
+ }
404
+ ],
405
+ "outputs": [
406
+ {
407
+ "name": "",
408
+ "type": "tuple",
409
+ "internalType": "struct MarginInfo",
410
+ "components": [
411
+ {
412
+ "name": "collateral",
413
+ "type": "address",
414
+ "internalType": "address"
415
+ },
416
+ {
417
+ "name": "marginBalance",
418
+ "type": "int256",
419
+ "internalType": "int256"
420
+ },
421
+ {
422
+ "name": "realBalance",
423
+ "type": "int256",
424
+ "internalType": "int256"
425
+ },
426
+ {
427
+ "name": "initialDelta",
428
+ "type": "int256",
429
+ "internalType": "int256"
430
+ },
431
+ {
432
+ "name": "maintenanceDelta",
433
+ "type": "int256",
434
+ "internalType": "int256"
435
+ },
436
+ {
437
+ "name": "liquidationDelta",
438
+ "type": "int256",
439
+ "internalType": "int256"
440
+ },
441
+ {
442
+ "name": "dutchDelta",
443
+ "type": "int256",
444
+ "internalType": "int256"
445
+ },
446
+ {
447
+ "name": "adlDelta",
448
+ "type": "int256",
449
+ "internalType": "int256"
450
+ },
451
+ {
452
+ "name": "initialBufferDelta",
453
+ "type": "int256",
454
+ "internalType": "int256"
455
+ },
456
+ {
457
+ "name": "liquidationMarginRequirement",
458
+ "type": "uint256",
459
+ "internalType": "uint256"
460
+ }
461
+ ]
462
+ }
463
+ ],
464
+ "stateMutability": "view"
465
+ },
466
+ {
467
+ "type": "function",
468
+ "name": "grantAccountPermission",
469
+ "inputs": [
470
+ {
471
+ "name": "accountId",
472
+ "type": "uint128",
473
+ "internalType": "uint128"
474
+ },
475
+ {
476
+ "name": "permission",
477
+ "type": "bytes32",
478
+ "internalType": "bytes32"
479
+ },
480
+ {
481
+ "name": "user",
482
+ "type": "address",
483
+ "internalType": "address"
484
+ }
485
+ ],
486
+ "outputs": [],
487
+ "stateMutability": "nonpayable"
488
+ },
489
+ {
490
+ "type": "function",
491
+ "name": "hasAccountPermission",
492
+ "inputs": [
493
+ {
494
+ "name": "accountId",
495
+ "type": "uint128",
496
+ "internalType": "uint128"
497
+ },
498
+ {
499
+ "name": "permission",
500
+ "type": "bytes32",
501
+ "internalType": "bytes32"
502
+ },
503
+ {
504
+ "name": "user",
505
+ "type": "address",
506
+ "internalType": "address"
507
+ }
508
+ ],
509
+ "outputs": [
510
+ {
511
+ "name": "",
512
+ "type": "bool",
513
+ "internalType": "bool"
514
+ }
515
+ ],
516
+ "stateMutability": "view"
517
+ },
518
+ {
519
+ "type": "function",
520
+ "name": "isAuthorizedForAccount",
521
+ "inputs": [
522
+ {
523
+ "name": "accountId",
524
+ "type": "uint128",
525
+ "internalType": "uint128"
526
+ },
527
+ {
528
+ "name": "permission",
529
+ "type": "bytes32",
530
+ "internalType": "bytes32"
531
+ },
532
+ {
533
+ "name": "target",
534
+ "type": "address",
535
+ "internalType": "address"
536
+ }
537
+ ],
538
+ "outputs": [
539
+ {
540
+ "name": "",
541
+ "type": "bool",
542
+ "internalType": "bool"
543
+ }
544
+ ],
545
+ "stateMutability": "view"
546
+ },
547
+ {
548
+ "type": "function",
549
+ "name": "notifyAccountTransfer",
550
+ "inputs": [
551
+ {
552
+ "name": "from",
553
+ "type": "address",
554
+ "internalType": "address"
555
+ },
556
+ {
557
+ "name": "to",
558
+ "type": "address",
559
+ "internalType": "address"
560
+ },
561
+ {
562
+ "name": "accountId",
563
+ "type": "uint128",
564
+ "internalType": "uint128"
565
+ }
566
+ ],
567
+ "outputs": [],
568
+ "stateMutability": "nonpayable"
569
+ },
570
+ {
571
+ "type": "function",
572
+ "name": "renounceAccountPermission",
573
+ "inputs": [
574
+ {
575
+ "name": "accountId",
576
+ "type": "uint128",
577
+ "internalType": "uint128"
578
+ },
579
+ {
580
+ "name": "permission",
581
+ "type": "bytes32",
582
+ "internalType": "bytes32"
583
+ }
584
+ ],
585
+ "outputs": [],
586
+ "stateMutability": "nonpayable"
587
+ },
588
+ {
589
+ "type": "function",
590
+ "name": "revokeAccountPermission",
591
+ "inputs": [
592
+ {
593
+ "name": "accountId",
594
+ "type": "uint128",
595
+ "internalType": "uint128"
596
+ },
597
+ {
598
+ "name": "permission",
599
+ "type": "bytes32",
600
+ "internalType": "bytes32"
601
+ },
602
+ {
603
+ "name": "user",
604
+ "type": "address",
605
+ "internalType": "address"
606
+ }
607
+ ],
608
+ "outputs": [],
609
+ "stateMutability": "nonpayable"
610
+ },
611
+ {
612
+ "type": "function",
613
+ "name": "setCustomImMultiplier",
614
+ "inputs": [
615
+ {
616
+ "name": "accountId",
617
+ "type": "uint128",
618
+ "internalType": "uint128"
619
+ },
620
+ {
621
+ "name": "imMultiplier",
622
+ "type": "uint256",
623
+ "internalType": "UD60x18"
624
+ }
625
+ ],
626
+ "outputs": [],
627
+ "stateMutability": "nonpayable"
628
+ },
629
+ {
630
+ "type": "error",
631
+ "name": "AccountIsNotBackstopLp",
632
+ "inputs": [
633
+ {
634
+ "name": "accountId",
635
+ "type": "uint128",
636
+ "internalType": "uint128"
637
+ },
638
+ {
639
+ "name": "backstopLpAccountId",
640
+ "type": "uint128",
641
+ "internalType": "uint128"
642
+ },
643
+ {
644
+ "name": "blockTimestamp",
645
+ "type": "uint256",
646
+ "internalType": "uint256"
647
+ }
648
+ ]
649
+ },
650
+ {
651
+ "type": "error",
652
+ "name": "AccountNotFound",
653
+ "inputs": [
654
+ {
655
+ "name": "accountId",
656
+ "type": "uint128",
657
+ "internalType": "uint128"
658
+ }
659
+ ]
660
+ },
661
+ {
662
+ "type": "error",
663
+ "name": "AccountPermissionDenied",
664
+ "inputs": [
665
+ {
666
+ "name": "accountId",
667
+ "type": "uint128",
668
+ "internalType": "uint128"
669
+ },
670
+ {
671
+ "name": "target",
672
+ "type": "address",
673
+ "internalType": "address"
674
+ }
675
+ ]
676
+ },
677
+ {
678
+ "type": "error",
679
+ "name": "AccountPermissionNotGranted",
680
+ "inputs": [
681
+ {
682
+ "name": "accountId",
683
+ "type": "uint128",
684
+ "internalType": "uint128"
685
+ },
686
+ {
687
+ "name": "permission",
688
+ "type": "bytes32",
689
+ "internalType": "bytes32"
690
+ },
691
+ {
692
+ "name": "user",
693
+ "type": "address",
694
+ "internalType": "address"
695
+ }
696
+ ]
697
+ },
698
+ {
699
+ "type": "error",
700
+ "name": "ActiveAccount",
701
+ "inputs": [
702
+ {
703
+ "name": "accountId",
704
+ "type": "uint128",
705
+ "internalType": "uint128"
706
+ }
707
+ ]
708
+ },
709
+ {
710
+ "type": "error",
711
+ "name": "BackstopLpCooldownPeriodAlreadyActive",
712
+ "inputs": [
713
+ {
714
+ "name": "backstopLpAccountId",
715
+ "type": "uint256",
716
+ "internalType": "uint256"
717
+ },
718
+ {
719
+ "name": "withdrawPeriodStartTimestamp",
720
+ "type": "uint256",
721
+ "internalType": "uint256"
722
+ },
723
+ {
724
+ "name": "blockTimestamp",
725
+ "type": "uint256",
726
+ "internalType": "uint256"
727
+ }
728
+ ]
729
+ },
730
+ {
731
+ "type": "error",
732
+ "name": "BackstopLpWithdrawPeriodAlreadyActive",
733
+ "inputs": [
734
+ {
735
+ "name": "backstopLpAccountId",
736
+ "type": "uint256",
737
+ "internalType": "uint256"
738
+ },
739
+ {
740
+ "name": "blockTimestamp",
741
+ "type": "uint256",
742
+ "internalType": "uint256"
743
+ }
744
+ ]
745
+ },
746
+ {
747
+ "type": "error",
748
+ "name": "CannotScheduleActiveTimer",
749
+ "inputs": [
750
+ {
751
+ "name": "id",
752
+ "type": "bytes32",
753
+ "internalType": "bytes32"
754
+ },
755
+ {
756
+ "name": "blockTimestamp",
757
+ "type": "uint256",
758
+ "internalType": "uint256"
759
+ }
760
+ ]
761
+ },
762
+ {
763
+ "type": "error",
764
+ "name": "CollateralCapExceeded",
765
+ "inputs": [
766
+ {
767
+ "name": "collateralPoolId",
768
+ "type": "uint128",
769
+ "internalType": "uint128"
770
+ },
771
+ {
772
+ "name": "collateral",
773
+ "type": "address",
774
+ "internalType": "address"
775
+ },
776
+ {
777
+ "name": "collateralCap",
778
+ "type": "uint256",
779
+ "internalType": "uint256"
780
+ },
781
+ {
782
+ "name": "poolBalance",
783
+ "type": "uint256",
784
+ "internalType": "uint256"
785
+ }
786
+ ]
787
+ },
788
+ {
789
+ "type": "error",
790
+ "name": "CollateralIsNotQuote",
791
+ "inputs": [
792
+ {
793
+ "name": "collateralPoolId",
794
+ "type": "uint128",
795
+ "internalType": "uint128"
796
+ },
797
+ {
798
+ "name": "collateral",
799
+ "type": "address",
800
+ "internalType": "address"
801
+ }
802
+ ]
803
+ },
804
+ {
805
+ "type": "error",
806
+ "name": "CollateralNotConfigured",
807
+ "inputs": [
808
+ {
809
+ "name": "collateralPoolId",
810
+ "type": "uint128",
811
+ "internalType": "uint128"
812
+ },
813
+ {
814
+ "name": "collateral",
815
+ "type": "address",
816
+ "internalType": "address"
817
+ }
818
+ ]
819
+ },
820
+ {
821
+ "type": "error",
822
+ "name": "CollateralPoolNotFound",
823
+ "inputs": [
824
+ {
825
+ "name": "id",
826
+ "type": "uint128",
827
+ "internalType": "uint128"
828
+ }
829
+ ]
830
+ },
831
+ {
832
+ "type": "error",
833
+ "name": "ExpiredTimerSchedule",
834
+ "inputs": [
835
+ {
836
+ "name": "id",
837
+ "type": "bytes32",
838
+ "internalType": "bytes32"
839
+ },
840
+ {
841
+ "name": "startTimestamp",
842
+ "type": "uint256",
843
+ "internalType": "uint256"
844
+ },
845
+ {
846
+ "name": "blockTimestamp",
847
+ "type": "uint256",
848
+ "internalType": "uint256"
849
+ }
850
+ ]
851
+ },
852
+ {
853
+ "type": "error",
854
+ "name": "FeatureUnavailable",
855
+ "inputs": [
856
+ {
857
+ "name": "which",
858
+ "type": "bytes32",
859
+ "internalType": "bytes32"
860
+ }
861
+ ]
862
+ },
863
+ {
864
+ "type": "error",
865
+ "name": "GlobalCollateralNotFound",
866
+ "inputs": [
867
+ {
868
+ "name": "collateral",
869
+ "type": "address",
870
+ "internalType": "address"
871
+ }
872
+ ]
873
+ },
874
+ {
875
+ "type": "error",
876
+ "name": "GlobalWithdrawLimitReached",
877
+ "inputs": [
878
+ {
879
+ "name": "collateral",
880
+ "type": "address",
881
+ "internalType": "address"
882
+ }
883
+ ]
884
+ },
885
+ {
886
+ "type": "error",
887
+ "name": "InvalidAccountPermission",
888
+ "inputs": [
889
+ {
890
+ "name": "permission",
891
+ "type": "bytes32",
892
+ "internalType": "bytes32"
893
+ }
894
+ ]
895
+ },
896
+ {
897
+ "type": "error",
898
+ "name": "InvalidFilledExposures",
899
+ "inputs": [
900
+ {
901
+ "name": "filledExposures",
902
+ "type": "tuple[]",
903
+ "internalType": "struct FilledExposure[]",
904
+ "components": [
905
+ {
906
+ "name": "riskMatrixIndex",
907
+ "type": "uint256",
908
+ "internalType": "uint256"
909
+ },
910
+ {
911
+ "name": "exposure",
912
+ "type": "int256",
913
+ "internalType": "int256"
914
+ }
915
+ ]
916
+ }
917
+ ]
918
+ },
919
+ {
920
+ "type": "error",
921
+ "name": "MarketNotFound",
922
+ "inputs": [
923
+ {
924
+ "name": "marketId",
925
+ "type": "uint128",
926
+ "internalType": "uint128"
927
+ }
928
+ ]
929
+ },
930
+ {
931
+ "type": "error",
932
+ "name": "OnlyAccessPassOwner",
933
+ "inputs": [
934
+ {
935
+ "name": "accountOwner",
936
+ "type": "address",
937
+ "internalType": "address"
938
+ }
939
+ ]
940
+ },
941
+ {
942
+ "type": "error",
943
+ "name": "OnlyAccountTokenProxy",
944
+ "inputs": [
945
+ {
946
+ "name": "origin",
947
+ "type": "address",
948
+ "internalType": "address"
949
+ }
950
+ ]
951
+ },
952
+ {
953
+ "type": "error",
954
+ "name": "OverflowInt256ToUint256",
955
+ "inputs": []
956
+ },
957
+ {
958
+ "type": "error",
959
+ "name": "OverflowUint256ToInt256",
960
+ "inputs": []
961
+ },
962
+ {
963
+ "type": "error",
964
+ "name": "OverflowUint256ToUint128",
965
+ "inputs": []
966
+ },
967
+ {
968
+ "type": "error",
969
+ "name": "PRBMath_MulDiv18_Overflow",
970
+ "inputs": [
971
+ {
972
+ "name": "x",
973
+ "type": "uint256",
974
+ "internalType": "uint256"
975
+ },
976
+ {
977
+ "name": "y",
978
+ "type": "uint256",
979
+ "internalType": "uint256"
980
+ }
981
+ ]
982
+ },
983
+ {
984
+ "type": "error",
985
+ "name": "PRBMath_MulDiv_Overflow",
986
+ "inputs": [
987
+ {
988
+ "name": "x",
989
+ "type": "uint256",
990
+ "internalType": "uint256"
991
+ },
992
+ {
993
+ "name": "y",
994
+ "type": "uint256",
995
+ "internalType": "uint256"
996
+ },
997
+ {
998
+ "name": "denominator",
999
+ "type": "uint256",
1000
+ "internalType": "uint256"
1001
+ }
1002
+ ]
1003
+ },
1004
+ {
1005
+ "type": "error",
1006
+ "name": "PRBMath_SD59x18_IntoUD60x18_Underflow",
1007
+ "inputs": [
1008
+ {
1009
+ "name": "x",
1010
+ "type": "int256",
1011
+ "internalType": "SD59x18"
1012
+ }
1013
+ ]
1014
+ },
1015
+ {
1016
+ "type": "error",
1017
+ "name": "PRBMath_SD59x18_Mul_InputTooSmall",
1018
+ "inputs": []
1019
+ },
1020
+ {
1021
+ "type": "error",
1022
+ "name": "PRBMath_SD59x18_Mul_Overflow",
1023
+ "inputs": [
1024
+ {
1025
+ "name": "x",
1026
+ "type": "int256",
1027
+ "internalType": "SD59x18"
1028
+ },
1029
+ {
1030
+ "name": "y",
1031
+ "type": "int256",
1032
+ "internalType": "SD59x18"
1033
+ }
1034
+ ]
1035
+ },
1036
+ {
1037
+ "type": "error",
1038
+ "name": "PRBMath_UD60x18_Sqrt_Overflow",
1039
+ "inputs": [
1040
+ {
1041
+ "name": "x",
1042
+ "type": "uint256",
1043
+ "internalType": "UD60x18"
1044
+ }
1045
+ ]
1046
+ },
1047
+ {
1048
+ "type": "error",
1049
+ "name": "PositionOutOfBounds",
1050
+ "inputs": []
1051
+ },
1052
+ {
1053
+ "type": "error",
1054
+ "name": "ValueAlreadyInSet",
1055
+ "inputs": []
1056
+ },
1057
+ {
1058
+ "type": "error",
1059
+ "name": "ValueNotInSet",
1060
+ "inputs": []
1061
+ },
1062
+ {
1063
+ "type": "error",
1064
+ "name": "collateralWithdrawLimitReached",
1065
+ "inputs": [
1066
+ {
1067
+ "name": "collateral",
1068
+ "type": "address",
1069
+ "internalType": "address"
1070
+ },
1071
+ {
1072
+ "name": "windowStartTimestamp",
1073
+ "type": "uint32",
1074
+ "internalType": "uint32"
1075
+ }
1076
+ ]
1077
+ }
1078
+ ]
1079
+ }