@varla/sdk 2.4.0 → 2.6.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 (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +47 -0
  3. package/dist/abi/full/PolymarketNegRiskMergeAdapter.d.ts +248 -0
  4. package/dist/abi/full/PolymarketNegRiskMergeAdapter.d.ts.map +1 -0
  5. package/dist/abi/full/PolymarketNegRiskMergeAdapter.js +326 -0
  6. package/dist/abi/full/PolymarketNegRiskMergeAdapter.js.map +1 -0
  7. package/dist/abi/full/VarlaMergeLiquidator.d.ts +39 -0
  8. package/dist/abi/full/VarlaMergeLiquidator.d.ts.map +1 -1
  9. package/dist/abi/full/VarlaMergeLiquidator.js +50 -0
  10. package/dist/abi/full/VarlaMergeLiquidator.js.map +1 -1
  11. package/dist/abi/full/VarlaStaking.d.ts +640 -0
  12. package/dist/abi/full/VarlaStaking.d.ts.map +1 -0
  13. package/dist/abi/full/VarlaStaking.js +842 -0
  14. package/dist/abi/full/VarlaStaking.js.map +1 -0
  15. package/dist/abi/index.d.ts +2 -0
  16. package/dist/abi/index.d.ts.map +1 -1
  17. package/dist/abi/index.js +2 -0
  18. package/dist/abi/index.js.map +1 -1
  19. package/dist/addresses/polygon.d.ts.map +1 -1
  20. package/dist/addresses/polygon.js +2 -1
  21. package/dist/addresses/polygon.js.map +1 -1
  22. package/dist/contracts.d.ts +3 -1
  23. package/dist/contracts.d.ts.map +1 -1
  24. package/dist/contracts.js +16 -0
  25. package/dist/contracts.js.map +1 -1
  26. package/dist/generated.d.ts +960 -35
  27. package/dist/generated.d.ts.map +1 -1
  28. package/dist/generated.js +2 -0
  29. package/dist/generated.js.map +1 -1
  30. package/dist/types.d.ts +2 -0
  31. package/dist/types.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/src/abi/full/PolymarketNegRiskMergeAdapter.ts +330 -0
  34. package/src/abi/full/VarlaMergeLiquidator.ts +50 -0
  35. package/src/abi/full/VarlaStaking.ts +846 -0
  36. package/src/abi/index.ts +2 -0
  37. package/src/addresses/polygon.json +3 -2
  38. package/src/addresses/polygon.ts +2 -1
  39. package/src/contracts.ts +22 -0
  40. package/src/generated.ts +2 -0
  41. package/src/types.ts +2 -0
@@ -0,0 +1,842 @@
1
+ export const VARLASTAKING_ABI = [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "internalType": "address",
6
+ "name": "authority",
7
+ "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "vrla_",
12
+ "type": "address"
13
+ }
14
+ ],
15
+ "stateMutability": "nonpayable",
16
+ "type": "constructor"
17
+ },
18
+ {
19
+ "inputs": [
20
+ {
21
+ "internalType": "address",
22
+ "name": "authority",
23
+ "type": "address"
24
+ }
25
+ ],
26
+ "name": "AccessManagedInvalidAuthority",
27
+ "type": "error"
28
+ },
29
+ {
30
+ "inputs": [
31
+ {
32
+ "internalType": "address",
33
+ "name": "caller",
34
+ "type": "address"
35
+ },
36
+ {
37
+ "internalType": "uint32",
38
+ "name": "delay",
39
+ "type": "uint32"
40
+ }
41
+ ],
42
+ "name": "AccessManagedRequiredDelay",
43
+ "type": "error"
44
+ },
45
+ {
46
+ "inputs": [
47
+ {
48
+ "internalType": "address",
49
+ "name": "caller",
50
+ "type": "address"
51
+ }
52
+ ],
53
+ "name": "AccessManagedUnauthorized",
54
+ "type": "error"
55
+ },
56
+ {
57
+ "inputs": [],
58
+ "name": "ArrayLengthMismatch",
59
+ "type": "error"
60
+ },
61
+ {
62
+ "inputs": [
63
+ {
64
+ "internalType": "uint256",
65
+ "name": "value",
66
+ "type": "uint256"
67
+ }
68
+ ],
69
+ "name": "BelowMinStake",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [
74
+ {
75
+ "internalType": "uint256",
76
+ "name": "unlockAt",
77
+ "type": "uint256"
78
+ }
79
+ ],
80
+ "name": "CooldownNotElapsed",
81
+ "type": "error"
82
+ },
83
+ {
84
+ "inputs": [
85
+ {
86
+ "internalType": "uint256",
87
+ "name": "have",
88
+ "type": "uint256"
89
+ },
90
+ {
91
+ "internalType": "uint256",
92
+ "name": "need",
93
+ "type": "uint256"
94
+ }
95
+ ],
96
+ "name": "InsufficientActiveStake",
97
+ "type": "error"
98
+ },
99
+ {
100
+ "inputs": [
101
+ {
102
+ "internalType": "uint256",
103
+ "name": "have",
104
+ "type": "uint256"
105
+ },
106
+ {
107
+ "internalType": "uint256",
108
+ "name": "need",
109
+ "type": "uint256"
110
+ }
111
+ ],
112
+ "name": "InsufficientPendingUnstake",
113
+ "type": "error"
114
+ },
115
+ {
116
+ "inputs": [
117
+ {
118
+ "internalType": "uint256",
119
+ "name": "bps",
120
+ "type": "uint256"
121
+ }
122
+ ],
123
+ "name": "InvalidBps",
124
+ "type": "error"
125
+ },
126
+ {
127
+ "inputs": [
128
+ {
129
+ "internalType": "uint256",
130
+ "name": "value",
131
+ "type": "uint256"
132
+ }
133
+ ],
134
+ "name": "InvalidUnstakeCooldown",
135
+ "type": "error"
136
+ },
137
+ {
138
+ "inputs": [
139
+ {
140
+ "internalType": "address",
141
+ "name": "token",
142
+ "type": "address"
143
+ }
144
+ ],
145
+ "name": "SafeERC20FailedOperation",
146
+ "type": "error"
147
+ },
148
+ {
149
+ "inputs": [],
150
+ "name": "ZeroAmount",
151
+ "type": "error"
152
+ },
153
+ {
154
+ "anonymous": false,
155
+ "inputs": [
156
+ {
157
+ "indexed": false,
158
+ "internalType": "address",
159
+ "name": "authority",
160
+ "type": "address"
161
+ }
162
+ ],
163
+ "name": "AuthorityUpdated",
164
+ "type": "event"
165
+ },
166
+ {
167
+ "anonymous": false,
168
+ "inputs": [
169
+ {
170
+ "indexed": false,
171
+ "internalType": "uint256",
172
+ "name": "count",
173
+ "type": "uint256"
174
+ }
175
+ ],
176
+ "name": "RebateTiersUpdated",
177
+ "type": "event"
178
+ },
179
+ {
180
+ "anonymous": false,
181
+ "inputs": [
182
+ {
183
+ "indexed": true,
184
+ "internalType": "address",
185
+ "name": "user",
186
+ "type": "address"
187
+ },
188
+ {
189
+ "indexed": true,
190
+ "internalType": "address",
191
+ "name": "token",
192
+ "type": "address"
193
+ },
194
+ {
195
+ "indexed": false,
196
+ "internalType": "uint256",
197
+ "name": "amount",
198
+ "type": "uint256"
199
+ },
200
+ {
201
+ "indexed": true,
202
+ "internalType": "address",
203
+ "name": "to",
204
+ "type": "address"
205
+ }
206
+ ],
207
+ "name": "RewardClaimed",
208
+ "type": "event"
209
+ },
210
+ {
211
+ "anonymous": false,
212
+ "inputs": [
213
+ {
214
+ "indexed": true,
215
+ "internalType": "address",
216
+ "name": "token",
217
+ "type": "address"
218
+ },
219
+ {
220
+ "indexed": false,
221
+ "internalType": "uint256",
222
+ "name": "amount",
223
+ "type": "uint256"
224
+ }
225
+ ],
226
+ "name": "RewardNotified",
227
+ "type": "event"
228
+ },
229
+ {
230
+ "anonymous": false,
231
+ "inputs": [
232
+ {
233
+ "indexed": true,
234
+ "internalType": "address",
235
+ "name": "user",
236
+ "type": "address"
237
+ },
238
+ {
239
+ "indexed": false,
240
+ "internalType": "uint256",
241
+ "name": "amount",
242
+ "type": "uint256"
243
+ }
244
+ ],
245
+ "name": "Staked",
246
+ "type": "event"
247
+ },
248
+ {
249
+ "anonymous": false,
250
+ "inputs": [
251
+ {
252
+ "indexed": false,
253
+ "internalType": "uint256",
254
+ "name": "oldCooldown",
255
+ "type": "uint256"
256
+ },
257
+ {
258
+ "indexed": false,
259
+ "internalType": "uint256",
260
+ "name": "newCooldown",
261
+ "type": "uint256"
262
+ }
263
+ ],
264
+ "name": "UnstakeCooldownUpdated",
265
+ "type": "event"
266
+ },
267
+ {
268
+ "anonymous": false,
269
+ "inputs": [
270
+ {
271
+ "indexed": true,
272
+ "internalType": "address",
273
+ "name": "user",
274
+ "type": "address"
275
+ },
276
+ {
277
+ "indexed": false,
278
+ "internalType": "uint256",
279
+ "name": "amount",
280
+ "type": "uint256"
281
+ },
282
+ {
283
+ "indexed": true,
284
+ "internalType": "address",
285
+ "name": "to",
286
+ "type": "address"
287
+ }
288
+ ],
289
+ "name": "UnstakeExecuted",
290
+ "type": "event"
291
+ },
292
+ {
293
+ "anonymous": false,
294
+ "inputs": [
295
+ {
296
+ "indexed": true,
297
+ "internalType": "address",
298
+ "name": "user",
299
+ "type": "address"
300
+ },
301
+ {
302
+ "indexed": false,
303
+ "internalType": "uint256",
304
+ "name": "amount",
305
+ "type": "uint256"
306
+ },
307
+ {
308
+ "indexed": false,
309
+ "internalType": "uint256",
310
+ "name": "unlockAt",
311
+ "type": "uint256"
312
+ }
313
+ ],
314
+ "name": "UnstakeRequested",
315
+ "type": "event"
316
+ },
317
+ {
318
+ "inputs": [],
319
+ "name": "BPS",
320
+ "outputs": [
321
+ {
322
+ "internalType": "uint256",
323
+ "name": "",
324
+ "type": "uint256"
325
+ }
326
+ ],
327
+ "stateMutability": "view",
328
+ "type": "function"
329
+ },
330
+ {
331
+ "inputs": [],
332
+ "name": "DEFAULT_UNSTAKE_COOLDOWN",
333
+ "outputs": [
334
+ {
335
+ "internalType": "uint256",
336
+ "name": "",
337
+ "type": "uint256"
338
+ }
339
+ ],
340
+ "stateMutability": "view",
341
+ "type": "function"
342
+ },
343
+ {
344
+ "inputs": [],
345
+ "name": "MAX_UNSTAKE_COOLDOWN",
346
+ "outputs": [
347
+ {
348
+ "internalType": "uint256",
349
+ "name": "",
350
+ "type": "uint256"
351
+ }
352
+ ],
353
+ "stateMutability": "view",
354
+ "type": "function"
355
+ },
356
+ {
357
+ "inputs": [],
358
+ "name": "MIN_STAKE",
359
+ "outputs": [
360
+ {
361
+ "internalType": "uint256",
362
+ "name": "",
363
+ "type": "uint256"
364
+ }
365
+ ],
366
+ "stateMutability": "view",
367
+ "type": "function"
368
+ },
369
+ {
370
+ "inputs": [],
371
+ "name": "UNSTAKE_COOLDOWN",
372
+ "outputs": [
373
+ {
374
+ "internalType": "uint256",
375
+ "name": "",
376
+ "type": "uint256"
377
+ }
378
+ ],
379
+ "stateMutability": "view",
380
+ "type": "function"
381
+ },
382
+ {
383
+ "inputs": [
384
+ {
385
+ "internalType": "address",
386
+ "name": "",
387
+ "type": "address"
388
+ }
389
+ ],
390
+ "name": "activeStake",
391
+ "outputs": [
392
+ {
393
+ "internalType": "uint256",
394
+ "name": "",
395
+ "type": "uint256"
396
+ }
397
+ ],
398
+ "stateMutability": "view",
399
+ "type": "function"
400
+ },
401
+ {
402
+ "inputs": [],
403
+ "name": "authority",
404
+ "outputs": [
405
+ {
406
+ "internalType": "address",
407
+ "name": "",
408
+ "type": "address"
409
+ }
410
+ ],
411
+ "stateMutability": "view",
412
+ "type": "function"
413
+ },
414
+ {
415
+ "inputs": [
416
+ {
417
+ "internalType": "address",
418
+ "name": "token",
419
+ "type": "address"
420
+ },
421
+ {
422
+ "internalType": "address",
423
+ "name": "to",
424
+ "type": "address"
425
+ }
426
+ ],
427
+ "name": "claim",
428
+ "outputs": [
429
+ {
430
+ "internalType": "uint256",
431
+ "name": "claimed",
432
+ "type": "uint256"
433
+ }
434
+ ],
435
+ "stateMutability": "nonpayable",
436
+ "type": "function"
437
+ },
438
+ {
439
+ "inputs": [
440
+ {
441
+ "internalType": "uint256",
442
+ "name": "amount",
443
+ "type": "uint256"
444
+ },
445
+ {
446
+ "internalType": "address",
447
+ "name": "to",
448
+ "type": "address"
449
+ }
450
+ ],
451
+ "name": "executeUnstake",
452
+ "outputs": [],
453
+ "stateMutability": "nonpayable",
454
+ "type": "function"
455
+ },
456
+ {
457
+ "inputs": [],
458
+ "name": "isConsumingScheduledOp",
459
+ "outputs": [
460
+ {
461
+ "internalType": "bytes4",
462
+ "name": "",
463
+ "type": "bytes4"
464
+ }
465
+ ],
466
+ "stateMutability": "view",
467
+ "type": "function"
468
+ },
469
+ {
470
+ "inputs": [
471
+ {
472
+ "internalType": "address",
473
+ "name": "",
474
+ "type": "address"
475
+ }
476
+ ],
477
+ "name": "isRewardToken",
478
+ "outputs": [
479
+ {
480
+ "internalType": "bool",
481
+ "name": "",
482
+ "type": "bool"
483
+ }
484
+ ],
485
+ "stateMutability": "view",
486
+ "type": "function"
487
+ },
488
+ {
489
+ "inputs": [
490
+ {
491
+ "internalType": "address",
492
+ "name": "user",
493
+ "type": "address"
494
+ }
495
+ ],
496
+ "name": "liquidationFeeRebateBps",
497
+ "outputs": [
498
+ {
499
+ "internalType": "uint256",
500
+ "name": "",
501
+ "type": "uint256"
502
+ }
503
+ ],
504
+ "stateMutability": "view",
505
+ "type": "function"
506
+ },
507
+ {
508
+ "inputs": [
509
+ {
510
+ "internalType": "address",
511
+ "name": "token",
512
+ "type": "address"
513
+ },
514
+ {
515
+ "internalType": "uint256",
516
+ "name": "amount",
517
+ "type": "uint256"
518
+ }
519
+ ],
520
+ "name": "notifyRewardAmount",
521
+ "outputs": [],
522
+ "stateMutability": "nonpayable",
523
+ "type": "function"
524
+ },
525
+ {
526
+ "inputs": [
527
+ {
528
+ "internalType": "address",
529
+ "name": "",
530
+ "type": "address"
531
+ }
532
+ ],
533
+ "name": "pendingUnstake",
534
+ "outputs": [
535
+ {
536
+ "internalType": "uint256",
537
+ "name": "",
538
+ "type": "uint256"
539
+ }
540
+ ],
541
+ "stateMutability": "view",
542
+ "type": "function"
543
+ },
544
+ {
545
+ "inputs": [
546
+ {
547
+ "internalType": "uint256",
548
+ "name": "",
549
+ "type": "uint256"
550
+ }
551
+ ],
552
+ "name": "rebateBps",
553
+ "outputs": [
554
+ {
555
+ "internalType": "uint256",
556
+ "name": "",
557
+ "type": "uint256"
558
+ }
559
+ ],
560
+ "stateMutability": "view",
561
+ "type": "function"
562
+ },
563
+ {
564
+ "inputs": [
565
+ {
566
+ "internalType": "uint256",
567
+ "name": "",
568
+ "type": "uint256"
569
+ }
570
+ ],
571
+ "name": "rebateThresholds",
572
+ "outputs": [
573
+ {
574
+ "internalType": "uint256",
575
+ "name": "",
576
+ "type": "uint256"
577
+ }
578
+ ],
579
+ "stateMutability": "view",
580
+ "type": "function"
581
+ },
582
+ {
583
+ "inputs": [],
584
+ "name": "rebateTiersLength",
585
+ "outputs": [
586
+ {
587
+ "internalType": "uint256",
588
+ "name": "",
589
+ "type": "uint256"
590
+ }
591
+ ],
592
+ "stateMutability": "view",
593
+ "type": "function"
594
+ },
595
+ {
596
+ "inputs": [
597
+ {
598
+ "internalType": "uint256",
599
+ "name": "amount",
600
+ "type": "uint256"
601
+ }
602
+ ],
603
+ "name": "requestUnstake",
604
+ "outputs": [],
605
+ "stateMutability": "nonpayable",
606
+ "type": "function"
607
+ },
608
+ {
609
+ "inputs": [
610
+ {
611
+ "internalType": "address",
612
+ "name": "",
613
+ "type": "address"
614
+ }
615
+ ],
616
+ "name": "rewardPerTokenStored",
617
+ "outputs": [
618
+ {
619
+ "internalType": "uint256",
620
+ "name": "",
621
+ "type": "uint256"
622
+ }
623
+ ],
624
+ "stateMutability": "view",
625
+ "type": "function"
626
+ },
627
+ {
628
+ "inputs": [
629
+ {
630
+ "internalType": "uint256",
631
+ "name": "",
632
+ "type": "uint256"
633
+ }
634
+ ],
635
+ "name": "rewardTokens",
636
+ "outputs": [
637
+ {
638
+ "internalType": "address",
639
+ "name": "",
640
+ "type": "address"
641
+ }
642
+ ],
643
+ "stateMutability": "view",
644
+ "type": "function"
645
+ },
646
+ {
647
+ "inputs": [],
648
+ "name": "rewardTokensLength",
649
+ "outputs": [
650
+ {
651
+ "internalType": "uint256",
652
+ "name": "",
653
+ "type": "uint256"
654
+ }
655
+ ],
656
+ "stateMutability": "view",
657
+ "type": "function"
658
+ },
659
+ {
660
+ "inputs": [
661
+ {
662
+ "internalType": "address",
663
+ "name": "",
664
+ "type": "address"
665
+ },
666
+ {
667
+ "internalType": "address",
668
+ "name": "",
669
+ "type": "address"
670
+ }
671
+ ],
672
+ "name": "rewards",
673
+ "outputs": [
674
+ {
675
+ "internalType": "uint256",
676
+ "name": "",
677
+ "type": "uint256"
678
+ }
679
+ ],
680
+ "stateMutability": "view",
681
+ "type": "function"
682
+ },
683
+ {
684
+ "inputs": [
685
+ {
686
+ "internalType": "address",
687
+ "name": "newAuthority",
688
+ "type": "address"
689
+ }
690
+ ],
691
+ "name": "setAuthority",
692
+ "outputs": [],
693
+ "stateMutability": "nonpayable",
694
+ "type": "function"
695
+ },
696
+ {
697
+ "inputs": [
698
+ {
699
+ "internalType": "uint256[]",
700
+ "name": "thresholds",
701
+ "type": "uint256[]"
702
+ },
703
+ {
704
+ "internalType": "uint256[]",
705
+ "name": "bps",
706
+ "type": "uint256[]"
707
+ }
708
+ ],
709
+ "name": "setRebateTiers",
710
+ "outputs": [],
711
+ "stateMutability": "nonpayable",
712
+ "type": "function"
713
+ },
714
+ {
715
+ "inputs": [
716
+ {
717
+ "internalType": "uint256",
718
+ "name": "newCooldown",
719
+ "type": "uint256"
720
+ }
721
+ ],
722
+ "name": "setUnstakeCooldown",
723
+ "outputs": [],
724
+ "stateMutability": "nonpayable",
725
+ "type": "function"
726
+ },
727
+ {
728
+ "inputs": [
729
+ {
730
+ "internalType": "uint256",
731
+ "name": "amount",
732
+ "type": "uint256"
733
+ }
734
+ ],
735
+ "name": "stake",
736
+ "outputs": [],
737
+ "stateMutability": "nonpayable",
738
+ "type": "function"
739
+ },
740
+ {
741
+ "inputs": [],
742
+ "name": "totalActiveStake",
743
+ "outputs": [
744
+ {
745
+ "internalType": "uint256",
746
+ "name": "",
747
+ "type": "uint256"
748
+ }
749
+ ],
750
+ "stateMutability": "view",
751
+ "type": "function"
752
+ },
753
+ {
754
+ "inputs": [
755
+ {
756
+ "internalType": "address",
757
+ "name": "",
758
+ "type": "address"
759
+ }
760
+ ],
761
+ "name": "unallocatedRewards",
762
+ "outputs": [
763
+ {
764
+ "internalType": "uint256",
765
+ "name": "",
766
+ "type": "uint256"
767
+ }
768
+ ],
769
+ "stateMutability": "view",
770
+ "type": "function"
771
+ },
772
+ {
773
+ "inputs": [],
774
+ "name": "unstakeCooldown",
775
+ "outputs": [
776
+ {
777
+ "internalType": "uint256",
778
+ "name": "",
779
+ "type": "uint256"
780
+ }
781
+ ],
782
+ "stateMutability": "view",
783
+ "type": "function"
784
+ },
785
+ {
786
+ "inputs": [
787
+ {
788
+ "internalType": "address",
789
+ "name": "",
790
+ "type": "address"
791
+ }
792
+ ],
793
+ "name": "unstakeUnlockAt",
794
+ "outputs": [
795
+ {
796
+ "internalType": "uint256",
797
+ "name": "",
798
+ "type": "uint256"
799
+ }
800
+ ],
801
+ "stateMutability": "view",
802
+ "type": "function"
803
+ },
804
+ {
805
+ "inputs": [
806
+ {
807
+ "internalType": "address",
808
+ "name": "",
809
+ "type": "address"
810
+ },
811
+ {
812
+ "internalType": "address",
813
+ "name": "",
814
+ "type": "address"
815
+ }
816
+ ],
817
+ "name": "userRewardPerTokenPaid",
818
+ "outputs": [
819
+ {
820
+ "internalType": "uint256",
821
+ "name": "",
822
+ "type": "uint256"
823
+ }
824
+ ],
825
+ "stateMutability": "view",
826
+ "type": "function"
827
+ },
828
+ {
829
+ "inputs": [],
830
+ "name": "vrla",
831
+ "outputs": [
832
+ {
833
+ "internalType": "contract IERC20",
834
+ "name": "",
835
+ "type": "address"
836
+ }
837
+ ],
838
+ "stateMutability": "view",
839
+ "type": "function"
840
+ }
841
+ ];
842
+ //# sourceMappingURL=VarlaStaking.js.map