@varla/sdk 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.
Files changed (61) hide show
  1. package/dist/abi/full/OpinionCtfExecutionEngineAdapter.d.ts +240 -0
  2. package/dist/abi/full/OpinionCtfExecutionEngineAdapter.d.ts.map +1 -0
  3. package/dist/abi/full/OpinionCtfExecutionEngineAdapter.js +315 -0
  4. package/dist/abi/full/PolymarketCtfAdapter.d.ts +234 -0
  5. package/dist/abi/full/PolymarketCtfAdapter.d.ts.map +1 -0
  6. package/dist/abi/full/PolymarketCtfAdapter.js +307 -0
  7. package/dist/abi/full/VarlaAccessManager.d.ts +896 -0
  8. package/dist/abi/full/VarlaAccessManager.d.ts.map +1 -0
  9. package/dist/abi/full/VarlaAccessManager.js +1166 -0
  10. package/dist/abi/full/VarlaConvertLiquidator.d.ts +603 -0
  11. package/dist/abi/full/VarlaConvertLiquidator.d.ts.map +1 -0
  12. package/dist/abi/full/VarlaConvertLiquidator.js +784 -0
  13. package/dist/abi/full/VarlaCore.d.ts +1671 -0
  14. package/dist/abi/full/VarlaCore.d.ts.map +1 -0
  15. package/dist/abi/full/VarlaCore.js +2176 -0
  16. package/dist/abi/full/VarlaInterestRateStrategy.d.ts +337 -0
  17. package/dist/abi/full/VarlaInterestRateStrategy.d.ts.map +1 -0
  18. package/dist/abi/full/VarlaInterestRateStrategy.js +437 -0
  19. package/dist/abi/full/VarlaLiquidator.d.ts +669 -0
  20. package/dist/abi/full/VarlaLiquidator.d.ts.map +1 -0
  21. package/dist/abi/full/VarlaLiquidator.js +864 -0
  22. package/dist/abi/full/VarlaMergeLiquidator.d.ts +575 -0
  23. package/dist/abi/full/VarlaMergeLiquidator.d.ts.map +1 -0
  24. package/dist/abi/full/VarlaMergeLiquidator.js +747 -0
  25. package/dist/abi/full/VarlaOracle.d.ts +1278 -0
  26. package/dist/abi/full/VarlaOracle.d.ts.map +1 -0
  27. package/dist/abi/full/VarlaOracle.js +1673 -0
  28. package/dist/abi/full/VarlaPool.d.ts +1242 -0
  29. package/dist/abi/full/VarlaPool.d.ts.map +1 -0
  30. package/dist/abi/full/VarlaPool.js +1621 -0
  31. package/dist/abi/full/VarlaProxyAdmin.d.ts +227 -0
  32. package/dist/abi/full/VarlaProxyAdmin.d.ts.map +1 -0
  33. package/dist/abi/full/VarlaProxyAdmin.js +296 -0
  34. package/dist/abi/index.d.ts +13 -0
  35. package/dist/abi/index.d.ts.map +1 -0
  36. package/dist/abi/index.js +14 -0
  37. package/dist/abi/subsets/VarlaOracle.registry.d.ts +532 -0
  38. package/dist/abi/subsets/VarlaOracle.registry.d.ts.map +1 -0
  39. package/dist/abi/subsets/VarlaOracle.registry.js +695 -0
  40. package/dist/abi.d.ts +2 -0
  41. package/dist/abi.d.ts.map +1 -0
  42. package/dist/abi.js +2 -0
  43. package/dist/addresses/bsc.d.ts +3 -0
  44. package/dist/addresses/bsc.d.ts.map +1 -0
  45. package/dist/addresses/bsc.js +10 -0
  46. package/dist/addresses/index.d.ts +3 -0
  47. package/dist/addresses/index.d.ts.map +1 -0
  48. package/dist/addresses/index.js +4 -0
  49. package/dist/addresses/polygon.d.ts +3 -0
  50. package/dist/addresses/polygon.d.ts.map +1 -0
  51. package/dist/addresses/polygon.js +10 -0
  52. package/dist/addresses.d.ts +2 -0
  53. package/dist/addresses.d.ts.map +1 -0
  54. package/dist/addresses.js +2 -0
  55. package/dist/index.d.ts +2 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +2 -0
  58. package/dist/types.d.ts +20 -0
  59. package/dist/types.d.ts.map +1 -0
  60. package/dist/types.js +1 -0
  61. package/package.json +42 -0
@@ -0,0 +1,747 @@
1
+ export const VARLAMERGELIQUIDATOR_ABI = [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "_core",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "_treasury",
12
+ "type": "address"
13
+ },
14
+ {
15
+ "internalType": "address",
16
+ "name": "_authority",
17
+ "type": "address"
18
+ }
19
+ ],
20
+ "stateMutability": "nonpayable",
21
+ "type": "constructor"
22
+ },
23
+ {
24
+ "inputs": [
25
+ {
26
+ "internalType": "address",
27
+ "name": "authority",
28
+ "type": "address"
29
+ }
30
+ ],
31
+ "name": "AccessManagedInvalidAuthority",
32
+ "type": "error"
33
+ },
34
+ {
35
+ "inputs": [
36
+ {
37
+ "internalType": "address",
38
+ "name": "caller",
39
+ "type": "address"
40
+ },
41
+ {
42
+ "internalType": "uint32",
43
+ "name": "delay",
44
+ "type": "uint32"
45
+ }
46
+ ],
47
+ "name": "AccessManagedRequiredDelay",
48
+ "type": "error"
49
+ },
50
+ {
51
+ "inputs": [
52
+ {
53
+ "internalType": "address",
54
+ "name": "caller",
55
+ "type": "address"
56
+ }
57
+ ],
58
+ "name": "AccessManagedUnauthorized",
59
+ "type": "error"
60
+ },
61
+ {
62
+ "inputs": [
63
+ {
64
+ "internalType": "uint256",
65
+ "name": "seizedPositionId",
66
+ "type": "uint256"
67
+ }
68
+ ],
69
+ "name": "ConditionIdNotConfigured",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [
74
+ {
75
+ "internalType": "uint256",
76
+ "name": "collateralReceived",
77
+ "type": "uint256"
78
+ },
79
+ {
80
+ "internalType": "uint256",
81
+ "name": "required",
82
+ "type": "uint256"
83
+ }
84
+ ],
85
+ "name": "InsufficientMergeCollateral",
86
+ "type": "error"
87
+ },
88
+ {
89
+ "inputs": [],
90
+ "name": "InsufficientOppositeTokens",
91
+ "type": "error"
92
+ },
93
+ {
94
+ "inputs": [],
95
+ "name": "InvalidDebtToCover",
96
+ "type": "error"
97
+ },
98
+ {
99
+ "inputs": [
100
+ {
101
+ "internalType": "uint256",
102
+ "name": "seizedPositionId",
103
+ "type": "uint256"
104
+ },
105
+ {
106
+ "internalType": "uint256",
107
+ "name": "oppositePositionId",
108
+ "type": "uint256"
109
+ }
110
+ ],
111
+ "name": "InvalidOppositePair",
112
+ "type": "error"
113
+ },
114
+ {
115
+ "inputs": [],
116
+ "name": "LiquidationBlockedByOracleGuards",
117
+ "type": "error"
118
+ },
119
+ {
120
+ "inputs": [],
121
+ "name": "MarketAdapterNotSet",
122
+ "type": "error"
123
+ },
124
+ {
125
+ "inputs": [],
126
+ "name": "MustNotLeaveDust",
127
+ "type": "error"
128
+ },
129
+ {
130
+ "inputs": [],
131
+ "name": "NoCollateralToSeize",
132
+ "type": "error"
133
+ },
134
+ {
135
+ "inputs": [
136
+ {
137
+ "internalType": "uint256",
138
+ "name": "healthFactor",
139
+ "type": "uint256"
140
+ }
141
+ ],
142
+ "name": "NotLiquidatable",
143
+ "type": "error"
144
+ },
145
+ {
146
+ "inputs": [
147
+ {
148
+ "internalType": "uint256",
149
+ "name": "seizedPositionId",
150
+ "type": "uint256"
151
+ }
152
+ ],
153
+ "name": "OppositePositionIdNotConfigured",
154
+ "type": "error"
155
+ },
156
+ {
157
+ "inputs": [
158
+ {
159
+ "internalType": "uint256",
160
+ "name": "positionId",
161
+ "type": "uint256"
162
+ }
163
+ ],
164
+ "name": "OraclePriceUnavailable",
165
+ "type": "error"
166
+ },
167
+ {
168
+ "inputs": [
169
+ {
170
+ "internalType": "uint256",
171
+ "name": "positionId",
172
+ "type": "uint256"
173
+ }
174
+ ],
175
+ "name": "OracleZeroPrice",
176
+ "type": "error"
177
+ },
178
+ {
179
+ "inputs": [],
180
+ "name": "ReentrancyGuardReentrantCall",
181
+ "type": "error"
182
+ },
183
+ {
184
+ "inputs": [
185
+ {
186
+ "internalType": "address",
187
+ "name": "token",
188
+ "type": "address"
189
+ }
190
+ ],
191
+ "name": "SafeERC20FailedOperation",
192
+ "type": "error"
193
+ },
194
+ {
195
+ "inputs": [],
196
+ "name": "SelfLiquidation",
197
+ "type": "error"
198
+ },
199
+ {
200
+ "inputs": [],
201
+ "name": "ZeroAddress",
202
+ "type": "error"
203
+ },
204
+ {
205
+ "anonymous": false,
206
+ "inputs": [
207
+ {
208
+ "indexed": false,
209
+ "internalType": "address",
210
+ "name": "authority",
211
+ "type": "address"
212
+ }
213
+ ],
214
+ "name": "AuthorityUpdated",
215
+ "type": "event"
216
+ },
217
+ {
218
+ "anonymous": false,
219
+ "inputs": [
220
+ {
221
+ "indexed": true,
222
+ "internalType": "address",
223
+ "name": "liquidator",
224
+ "type": "address"
225
+ },
226
+ {
227
+ "indexed": true,
228
+ "internalType": "address",
229
+ "name": "user",
230
+ "type": "address"
231
+ },
232
+ {
233
+ "indexed": true,
234
+ "internalType": "uint256",
235
+ "name": "positionId",
236
+ "type": "uint256"
237
+ },
238
+ {
239
+ "indexed": false,
240
+ "internalType": "uint256",
241
+ "name": "debtRepaid",
242
+ "type": "uint256"
243
+ },
244
+ {
245
+ "indexed": false,
246
+ "internalType": "uint256",
247
+ "name": "collateralSeized",
248
+ "type": "uint256"
249
+ },
250
+ {
251
+ "indexed": false,
252
+ "internalType": "uint256",
253
+ "name": "bonusAmount",
254
+ "type": "uint256"
255
+ },
256
+ {
257
+ "indexed": false,
258
+ "internalType": "uint256",
259
+ "name": "protocolFee",
260
+ "type": "uint256"
261
+ },
262
+ {
263
+ "indexed": false,
264
+ "internalType": "bool",
265
+ "name": "usedMerge",
266
+ "type": "bool"
267
+ }
268
+ ],
269
+ "name": "Liquidation",
270
+ "type": "event"
271
+ },
272
+ {
273
+ "anonymous": false,
274
+ "inputs": [
275
+ {
276
+ "indexed": true,
277
+ "internalType": "address",
278
+ "name": "oldAdapter",
279
+ "type": "address"
280
+ },
281
+ {
282
+ "indexed": true,
283
+ "internalType": "address",
284
+ "name": "newAdapter",
285
+ "type": "address"
286
+ }
287
+ ],
288
+ "name": "MarketAdapterUpdated",
289
+ "type": "event"
290
+ },
291
+ {
292
+ "anonymous": false,
293
+ "inputs": [
294
+ {
295
+ "indexed": true,
296
+ "internalType": "address",
297
+ "name": "oldTreasury",
298
+ "type": "address"
299
+ },
300
+ {
301
+ "indexed": true,
302
+ "internalType": "address",
303
+ "name": "newTreasury",
304
+ "type": "address"
305
+ }
306
+ ],
307
+ "name": "TreasuryUpdated",
308
+ "type": "event"
309
+ },
310
+ {
311
+ "inputs": [],
312
+ "name": "BPS",
313
+ "outputs": [
314
+ {
315
+ "internalType": "uint256",
316
+ "name": "",
317
+ "type": "uint256"
318
+ }
319
+ ],
320
+ "stateMutability": "view",
321
+ "type": "function"
322
+ },
323
+ {
324
+ "inputs": [],
325
+ "name": "HEALTH_FACTOR_LIQUIDATION_THRESHOLD",
326
+ "outputs": [
327
+ {
328
+ "internalType": "uint256",
329
+ "name": "",
330
+ "type": "uint256"
331
+ }
332
+ ],
333
+ "stateMutability": "view",
334
+ "type": "function"
335
+ },
336
+ {
337
+ "inputs": [],
338
+ "name": "PRECISION",
339
+ "outputs": [
340
+ {
341
+ "internalType": "uint256",
342
+ "name": "",
343
+ "type": "uint256"
344
+ }
345
+ ],
346
+ "stateMutability": "view",
347
+ "type": "function"
348
+ },
349
+ {
350
+ "inputs": [],
351
+ "name": "authority",
352
+ "outputs": [
353
+ {
354
+ "internalType": "address",
355
+ "name": "",
356
+ "type": "address"
357
+ }
358
+ ],
359
+ "stateMutability": "view",
360
+ "type": "function"
361
+ },
362
+ {
363
+ "inputs": [
364
+ {
365
+ "internalType": "uint256",
366
+ "name": "healthFactor",
367
+ "type": "uint256"
368
+ }
369
+ ],
370
+ "name": "calculateLiquidationBonus",
371
+ "outputs": [
372
+ {
373
+ "internalType": "uint256",
374
+ "name": "",
375
+ "type": "uint256"
376
+ }
377
+ ],
378
+ "stateMutability": "view",
379
+ "type": "function"
380
+ },
381
+ {
382
+ "inputs": [
383
+ {
384
+ "internalType": "address",
385
+ "name": "user",
386
+ "type": "address"
387
+ }
388
+ ],
389
+ "name": "canLiquidate",
390
+ "outputs": [
391
+ {
392
+ "internalType": "bool",
393
+ "name": "canLiquidate_",
394
+ "type": "bool"
395
+ },
396
+ {
397
+ "internalType": "uint256",
398
+ "name": "healthFactor",
399
+ "type": "uint256"
400
+ },
401
+ {
402
+ "internalType": "uint256",
403
+ "name": "currentBonus",
404
+ "type": "uint256"
405
+ }
406
+ ],
407
+ "stateMutability": "view",
408
+ "type": "function"
409
+ },
410
+ {
411
+ "inputs": [],
412
+ "name": "collateralToken",
413
+ "outputs": [
414
+ {
415
+ "internalType": "contract IERC20",
416
+ "name": "",
417
+ "type": "address"
418
+ }
419
+ ],
420
+ "stateMutability": "view",
421
+ "type": "function"
422
+ },
423
+ {
424
+ "inputs": [],
425
+ "name": "core",
426
+ "outputs": [
427
+ {
428
+ "internalType": "contract IVarlaCore",
429
+ "name": "",
430
+ "type": "address"
431
+ }
432
+ ],
433
+ "stateMutability": "view",
434
+ "type": "function"
435
+ },
436
+ {
437
+ "inputs": [],
438
+ "name": "isConsumingScheduledOp",
439
+ "outputs": [
440
+ {
441
+ "internalType": "bytes4",
442
+ "name": "",
443
+ "type": "bytes4"
444
+ }
445
+ ],
446
+ "stateMutability": "view",
447
+ "type": "function"
448
+ },
449
+ {
450
+ "inputs": [
451
+ {
452
+ "internalType": "address",
453
+ "name": "user",
454
+ "type": "address"
455
+ },
456
+ {
457
+ "internalType": "uint256",
458
+ "name": "seizedPositionId",
459
+ "type": "uint256"
460
+ },
461
+ {
462
+ "internalType": "uint256",
463
+ "name": "debtToCover",
464
+ "type": "uint256"
465
+ }
466
+ ],
467
+ "name": "liquidateWithMerge",
468
+ "outputs": [],
469
+ "stateMutability": "nonpayable",
470
+ "type": "function"
471
+ },
472
+ {
473
+ "inputs": [],
474
+ "name": "marketAdapter",
475
+ "outputs": [
476
+ {
477
+ "internalType": "contract IMarketAdapter",
478
+ "name": "",
479
+ "type": "address"
480
+ }
481
+ ],
482
+ "stateMutability": "view",
483
+ "type": "function"
484
+ },
485
+ {
486
+ "inputs": [
487
+ {
488
+ "internalType": "address",
489
+ "name": "",
490
+ "type": "address"
491
+ },
492
+ {
493
+ "internalType": "address",
494
+ "name": "",
495
+ "type": "address"
496
+ },
497
+ {
498
+ "internalType": "uint256[]",
499
+ "name": "",
500
+ "type": "uint256[]"
501
+ },
502
+ {
503
+ "internalType": "uint256[]",
504
+ "name": "",
505
+ "type": "uint256[]"
506
+ },
507
+ {
508
+ "internalType": "bytes",
509
+ "name": "",
510
+ "type": "bytes"
511
+ }
512
+ ],
513
+ "name": "onERC1155BatchReceived",
514
+ "outputs": [
515
+ {
516
+ "internalType": "bytes4",
517
+ "name": "",
518
+ "type": "bytes4"
519
+ }
520
+ ],
521
+ "stateMutability": "nonpayable",
522
+ "type": "function"
523
+ },
524
+ {
525
+ "inputs": [
526
+ {
527
+ "internalType": "address",
528
+ "name": "",
529
+ "type": "address"
530
+ },
531
+ {
532
+ "internalType": "address",
533
+ "name": "",
534
+ "type": "address"
535
+ },
536
+ {
537
+ "internalType": "uint256",
538
+ "name": "",
539
+ "type": "uint256"
540
+ },
541
+ {
542
+ "internalType": "uint256",
543
+ "name": "",
544
+ "type": "uint256"
545
+ },
546
+ {
547
+ "internalType": "bytes",
548
+ "name": "",
549
+ "type": "bytes"
550
+ }
551
+ ],
552
+ "name": "onERC1155Received",
553
+ "outputs": [
554
+ {
555
+ "internalType": "bytes4",
556
+ "name": "",
557
+ "type": "bytes4"
558
+ }
559
+ ],
560
+ "stateMutability": "nonpayable",
561
+ "type": "function"
562
+ },
563
+ {
564
+ "inputs": [],
565
+ "name": "positionsToken",
566
+ "outputs": [
567
+ {
568
+ "internalType": "contract ICTF",
569
+ "name": "",
570
+ "type": "address"
571
+ }
572
+ ],
573
+ "stateMutability": "view",
574
+ "type": "function"
575
+ },
576
+ {
577
+ "inputs": [
578
+ {
579
+ "internalType": "address",
580
+ "name": "user",
581
+ "type": "address"
582
+ },
583
+ {
584
+ "internalType": "uint256",
585
+ "name": "positionId",
586
+ "type": "uint256"
587
+ },
588
+ {
589
+ "internalType": "uint256",
590
+ "name": "debtToCover",
591
+ "type": "uint256"
592
+ }
593
+ ],
594
+ "name": "previewLiquidation",
595
+ "outputs": [
596
+ {
597
+ "internalType": "uint256",
598
+ "name": "debtToLiquidate",
599
+ "type": "uint256"
600
+ },
601
+ {
602
+ "internalType": "uint256",
603
+ "name": "collateralToSeize",
604
+ "type": "uint256"
605
+ },
606
+ {
607
+ "internalType": "uint256",
608
+ "name": "bonusAmount",
609
+ "type": "uint256"
610
+ },
611
+ {
612
+ "internalType": "uint256",
613
+ "name": "protocolFeeAmount",
614
+ "type": "uint256"
615
+ },
616
+ {
617
+ "internalType": "uint256",
618
+ "name": "liquidatorProfitMerge",
619
+ "type": "uint256"
620
+ }
621
+ ],
622
+ "stateMutability": "view",
623
+ "type": "function"
624
+ },
625
+ {
626
+ "inputs": [
627
+ {
628
+ "internalType": "address",
629
+ "name": "token",
630
+ "type": "address"
631
+ },
632
+ {
633
+ "internalType": "address",
634
+ "name": "to",
635
+ "type": "address"
636
+ },
637
+ {
638
+ "internalType": "uint256",
639
+ "name": "id",
640
+ "type": "uint256"
641
+ },
642
+ {
643
+ "internalType": "uint256",
644
+ "name": "amount",
645
+ "type": "uint256"
646
+ }
647
+ ],
648
+ "name": "rescueERC1155",
649
+ "outputs": [],
650
+ "stateMutability": "nonpayable",
651
+ "type": "function"
652
+ },
653
+ {
654
+ "inputs": [
655
+ {
656
+ "internalType": "address",
657
+ "name": "token",
658
+ "type": "address"
659
+ },
660
+ {
661
+ "internalType": "address",
662
+ "name": "to",
663
+ "type": "address"
664
+ },
665
+ {
666
+ "internalType": "uint256",
667
+ "name": "amount",
668
+ "type": "uint256"
669
+ }
670
+ ],
671
+ "name": "rescueERC20",
672
+ "outputs": [],
673
+ "stateMutability": "nonpayable",
674
+ "type": "function"
675
+ },
676
+ {
677
+ "inputs": [
678
+ {
679
+ "internalType": "address",
680
+ "name": "newAuthority",
681
+ "type": "address"
682
+ }
683
+ ],
684
+ "name": "setAuthority",
685
+ "outputs": [],
686
+ "stateMutability": "nonpayable",
687
+ "type": "function"
688
+ },
689
+ {
690
+ "inputs": [
691
+ {
692
+ "internalType": "address",
693
+ "name": "_adapter",
694
+ "type": "address"
695
+ }
696
+ ],
697
+ "name": "setMarketAdapter",
698
+ "outputs": [],
699
+ "stateMutability": "nonpayable",
700
+ "type": "function"
701
+ },
702
+ {
703
+ "inputs": [
704
+ {
705
+ "internalType": "address",
706
+ "name": "_treasury",
707
+ "type": "address"
708
+ }
709
+ ],
710
+ "name": "setTreasury",
711
+ "outputs": [],
712
+ "stateMutability": "nonpayable",
713
+ "type": "function"
714
+ },
715
+ {
716
+ "inputs": [
717
+ {
718
+ "internalType": "bytes4",
719
+ "name": "interfaceId",
720
+ "type": "bytes4"
721
+ }
722
+ ],
723
+ "name": "supportsInterface",
724
+ "outputs": [
725
+ {
726
+ "internalType": "bool",
727
+ "name": "",
728
+ "type": "bool"
729
+ }
730
+ ],
731
+ "stateMutability": "view",
732
+ "type": "function"
733
+ },
734
+ {
735
+ "inputs": [],
736
+ "name": "treasury",
737
+ "outputs": [
738
+ {
739
+ "internalType": "address",
740
+ "name": "",
741
+ "type": "address"
742
+ }
743
+ ],
744
+ "stateMutability": "view",
745
+ "type": "function"
746
+ }
747
+ ];