@gitmyabi/sy-susde 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.
@@ -0,0 +1,2199 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * PendleSUSDESY_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const PendleSUSDESY_jsonAbi = [
10
+ {
11
+ "inputs": [
12
+ {
13
+ "internalType": "address",
14
+ "name": "_susde",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "internalType": "uint256",
19
+ "name": "_initialSupplyCap",
20
+ "type": "uint256"
21
+ }
22
+ ],
23
+ "stateMutability": "nonpayable",
24
+ "type": "constructor"
25
+ },
26
+ {
27
+ "inputs": [],
28
+ "name": "InvalidShortString",
29
+ "type": "error"
30
+ },
31
+ {
32
+ "inputs": [
33
+ {
34
+ "internalType": "uint256",
35
+ "name": "actualSharesOut",
36
+ "type": "uint256"
37
+ },
38
+ {
39
+ "internalType": "uint256",
40
+ "name": "requiredSharesOut",
41
+ "type": "uint256"
42
+ }
43
+ ],
44
+ "name": "SYInsufficientSharesOut",
45
+ "type": "error"
46
+ },
47
+ {
48
+ "inputs": [
49
+ {
50
+ "internalType": "uint256",
51
+ "name": "actualTokenOut",
52
+ "type": "uint256"
53
+ },
54
+ {
55
+ "internalType": "uint256",
56
+ "name": "requiredTokenOut",
57
+ "type": "uint256"
58
+ }
59
+ ],
60
+ "name": "SYInsufficientTokenOut",
61
+ "type": "error"
62
+ },
63
+ {
64
+ "inputs": [
65
+ {
66
+ "internalType": "address",
67
+ "name": "token",
68
+ "type": "address"
69
+ }
70
+ ],
71
+ "name": "SYInvalidTokenIn",
72
+ "type": "error"
73
+ },
74
+ {
75
+ "inputs": [
76
+ {
77
+ "internalType": "address",
78
+ "name": "token",
79
+ "type": "address"
80
+ }
81
+ ],
82
+ "name": "SYInvalidTokenOut",
83
+ "type": "error"
84
+ },
85
+ {
86
+ "inputs": [],
87
+ "name": "SYZeroDeposit",
88
+ "type": "error"
89
+ },
90
+ {
91
+ "inputs": [],
92
+ "name": "SYZeroRedeem",
93
+ "type": "error"
94
+ },
95
+ {
96
+ "inputs": [
97
+ {
98
+ "internalType": "string",
99
+ "name": "str",
100
+ "type": "string"
101
+ }
102
+ ],
103
+ "name": "StringTooLong",
104
+ "type": "error"
105
+ },
106
+ {
107
+ "inputs": [
108
+ {
109
+ "internalType": "uint256",
110
+ "name": "totalSupply",
111
+ "type": "uint256"
112
+ },
113
+ {
114
+ "internalType": "uint256",
115
+ "name": "supplyCap",
116
+ "type": "uint256"
117
+ }
118
+ ],
119
+ "name": "SupplyCapExceeded",
120
+ "type": "error"
121
+ },
122
+ {
123
+ "anonymous": false,
124
+ "inputs": [
125
+ {
126
+ "indexed": true,
127
+ "internalType": "address",
128
+ "name": "owner",
129
+ "type": "address"
130
+ },
131
+ {
132
+ "indexed": true,
133
+ "internalType": "address",
134
+ "name": "spender",
135
+ "type": "address"
136
+ },
137
+ {
138
+ "indexed": false,
139
+ "internalType": "uint256",
140
+ "name": "value",
141
+ "type": "uint256"
142
+ }
143
+ ],
144
+ "name": "Approval",
145
+ "type": "event"
146
+ },
147
+ {
148
+ "anonymous": false,
149
+ "inputs": [
150
+ {
151
+ "indexed": true,
152
+ "internalType": "address",
153
+ "name": "user",
154
+ "type": "address"
155
+ },
156
+ {
157
+ "indexed": false,
158
+ "internalType": "address[]",
159
+ "name": "rewardTokens",
160
+ "type": "address[]"
161
+ },
162
+ {
163
+ "indexed": false,
164
+ "internalType": "uint256[]",
165
+ "name": "rewardAmounts",
166
+ "type": "uint256[]"
167
+ }
168
+ ],
169
+ "name": "ClaimRewards",
170
+ "type": "event"
171
+ },
172
+ {
173
+ "anonymous": false,
174
+ "inputs": [
175
+ {
176
+ "indexed": true,
177
+ "internalType": "address",
178
+ "name": "caller",
179
+ "type": "address"
180
+ },
181
+ {
182
+ "indexed": true,
183
+ "internalType": "address",
184
+ "name": "receiver",
185
+ "type": "address"
186
+ },
187
+ {
188
+ "indexed": true,
189
+ "internalType": "address",
190
+ "name": "tokenIn",
191
+ "type": "address"
192
+ },
193
+ {
194
+ "indexed": false,
195
+ "internalType": "uint256",
196
+ "name": "amountDeposited",
197
+ "type": "uint256"
198
+ },
199
+ {
200
+ "indexed": false,
201
+ "internalType": "uint256",
202
+ "name": "amountSyOut",
203
+ "type": "uint256"
204
+ }
205
+ ],
206
+ "name": "Deposit",
207
+ "type": "event"
208
+ },
209
+ {
210
+ "anonymous": false,
211
+ "inputs": [],
212
+ "name": "EIP712DomainChanged",
213
+ "type": "event"
214
+ },
215
+ {
216
+ "anonymous": false,
217
+ "inputs": [
218
+ {
219
+ "indexed": false,
220
+ "internalType": "uint8",
221
+ "name": "version",
222
+ "type": "uint8"
223
+ }
224
+ ],
225
+ "name": "Initialized",
226
+ "type": "event"
227
+ },
228
+ {
229
+ "anonymous": false,
230
+ "inputs": [
231
+ {
232
+ "indexed": true,
233
+ "internalType": "address",
234
+ "name": "previousOwner",
235
+ "type": "address"
236
+ },
237
+ {
238
+ "indexed": true,
239
+ "internalType": "address",
240
+ "name": "newOwner",
241
+ "type": "address"
242
+ }
243
+ ],
244
+ "name": "OwnershipTransferred",
245
+ "type": "event"
246
+ },
247
+ {
248
+ "anonymous": false,
249
+ "inputs": [
250
+ {
251
+ "indexed": false,
252
+ "internalType": "address",
253
+ "name": "account",
254
+ "type": "address"
255
+ }
256
+ ],
257
+ "name": "Paused",
258
+ "type": "event"
259
+ },
260
+ {
261
+ "anonymous": false,
262
+ "inputs": [
263
+ {
264
+ "indexed": true,
265
+ "internalType": "address",
266
+ "name": "caller",
267
+ "type": "address"
268
+ },
269
+ {
270
+ "indexed": true,
271
+ "internalType": "address",
272
+ "name": "receiver",
273
+ "type": "address"
274
+ },
275
+ {
276
+ "indexed": true,
277
+ "internalType": "address",
278
+ "name": "tokenOut",
279
+ "type": "address"
280
+ },
281
+ {
282
+ "indexed": false,
283
+ "internalType": "uint256",
284
+ "name": "amountSyToRedeem",
285
+ "type": "uint256"
286
+ },
287
+ {
288
+ "indexed": false,
289
+ "internalType": "uint256",
290
+ "name": "amountTokenOut",
291
+ "type": "uint256"
292
+ }
293
+ ],
294
+ "name": "Redeem",
295
+ "type": "event"
296
+ },
297
+ {
298
+ "anonymous": false,
299
+ "inputs": [
300
+ {
301
+ "indexed": false,
302
+ "internalType": "uint256",
303
+ "name": "newSupplyCap",
304
+ "type": "uint256"
305
+ }
306
+ ],
307
+ "name": "SupplyCapUpdated",
308
+ "type": "event"
309
+ },
310
+ {
311
+ "anonymous": false,
312
+ "inputs": [
313
+ {
314
+ "indexed": true,
315
+ "internalType": "address",
316
+ "name": "from",
317
+ "type": "address"
318
+ },
319
+ {
320
+ "indexed": true,
321
+ "internalType": "address",
322
+ "name": "to",
323
+ "type": "address"
324
+ },
325
+ {
326
+ "indexed": false,
327
+ "internalType": "uint256",
328
+ "name": "value",
329
+ "type": "uint256"
330
+ }
331
+ ],
332
+ "name": "Transfer",
333
+ "type": "event"
334
+ },
335
+ {
336
+ "anonymous": false,
337
+ "inputs": [
338
+ {
339
+ "indexed": false,
340
+ "internalType": "address",
341
+ "name": "account",
342
+ "type": "address"
343
+ }
344
+ ],
345
+ "name": "Unpaused",
346
+ "type": "event"
347
+ },
348
+ {
349
+ "inputs": [],
350
+ "name": "DOMAIN_SEPARATOR",
351
+ "outputs": [
352
+ {
353
+ "internalType": "bytes32",
354
+ "name": "",
355
+ "type": "bytes32"
356
+ }
357
+ ],
358
+ "stateMutability": "view",
359
+ "type": "function"
360
+ },
361
+ {
362
+ "inputs": [
363
+ {
364
+ "internalType": "address",
365
+ "name": "",
366
+ "type": "address"
367
+ }
368
+ ],
369
+ "name": "accruedRewards",
370
+ "outputs": [
371
+ {
372
+ "internalType": "uint256[]",
373
+ "name": "rewardAmounts",
374
+ "type": "uint256[]"
375
+ }
376
+ ],
377
+ "stateMutability": "view",
378
+ "type": "function"
379
+ },
380
+ {
381
+ "inputs": [
382
+ {
383
+ "internalType": "address",
384
+ "name": "owner",
385
+ "type": "address"
386
+ },
387
+ {
388
+ "internalType": "address",
389
+ "name": "spender",
390
+ "type": "address"
391
+ }
392
+ ],
393
+ "name": "allowance",
394
+ "outputs": [
395
+ {
396
+ "internalType": "uint256",
397
+ "name": "",
398
+ "type": "uint256"
399
+ }
400
+ ],
401
+ "stateMutability": "view",
402
+ "type": "function"
403
+ },
404
+ {
405
+ "inputs": [
406
+ {
407
+ "internalType": "address",
408
+ "name": "spender",
409
+ "type": "address"
410
+ },
411
+ {
412
+ "internalType": "uint256",
413
+ "name": "amount",
414
+ "type": "uint256"
415
+ }
416
+ ],
417
+ "name": "approve",
418
+ "outputs": [
419
+ {
420
+ "internalType": "bool",
421
+ "name": "",
422
+ "type": "bool"
423
+ }
424
+ ],
425
+ "stateMutability": "nonpayable",
426
+ "type": "function"
427
+ },
428
+ {
429
+ "inputs": [],
430
+ "name": "asset",
431
+ "outputs": [
432
+ {
433
+ "internalType": "address",
434
+ "name": "",
435
+ "type": "address"
436
+ }
437
+ ],
438
+ "stateMutability": "view",
439
+ "type": "function"
440
+ },
441
+ {
442
+ "inputs": [],
443
+ "name": "assetInfo",
444
+ "outputs": [
445
+ {
446
+ "internalType": "enum IStandardizedYield.AssetType",
447
+ "name": "assetType",
448
+ "type": "uint8"
449
+ },
450
+ {
451
+ "internalType": "address",
452
+ "name": "assetAddress",
453
+ "type": "address"
454
+ },
455
+ {
456
+ "internalType": "uint8",
457
+ "name": "assetDecimals",
458
+ "type": "uint8"
459
+ }
460
+ ],
461
+ "stateMutability": "view",
462
+ "type": "function"
463
+ },
464
+ {
465
+ "inputs": [
466
+ {
467
+ "internalType": "address",
468
+ "name": "account",
469
+ "type": "address"
470
+ }
471
+ ],
472
+ "name": "balanceOf",
473
+ "outputs": [
474
+ {
475
+ "internalType": "uint256",
476
+ "name": "",
477
+ "type": "uint256"
478
+ }
479
+ ],
480
+ "stateMutability": "view",
481
+ "type": "function"
482
+ },
483
+ {
484
+ "inputs": [],
485
+ "name": "claimOwnership",
486
+ "outputs": [],
487
+ "stateMutability": "nonpayable",
488
+ "type": "function"
489
+ },
490
+ {
491
+ "inputs": [
492
+ {
493
+ "internalType": "address",
494
+ "name": "",
495
+ "type": "address"
496
+ }
497
+ ],
498
+ "name": "claimRewards",
499
+ "outputs": [
500
+ {
501
+ "internalType": "uint256[]",
502
+ "name": "rewardAmounts",
503
+ "type": "uint256[]"
504
+ }
505
+ ],
506
+ "stateMutability": "nonpayable",
507
+ "type": "function"
508
+ },
509
+ {
510
+ "inputs": [],
511
+ "name": "decimals",
512
+ "outputs": [
513
+ {
514
+ "internalType": "uint8",
515
+ "name": "",
516
+ "type": "uint8"
517
+ }
518
+ ],
519
+ "stateMutability": "view",
520
+ "type": "function"
521
+ },
522
+ {
523
+ "inputs": [
524
+ {
525
+ "internalType": "address",
526
+ "name": "receiver",
527
+ "type": "address"
528
+ },
529
+ {
530
+ "internalType": "address",
531
+ "name": "tokenIn",
532
+ "type": "address"
533
+ },
534
+ {
535
+ "internalType": "uint256",
536
+ "name": "amountTokenToDeposit",
537
+ "type": "uint256"
538
+ },
539
+ {
540
+ "internalType": "uint256",
541
+ "name": "minSharesOut",
542
+ "type": "uint256"
543
+ }
544
+ ],
545
+ "name": "deposit",
546
+ "outputs": [
547
+ {
548
+ "internalType": "uint256",
549
+ "name": "amountSharesOut",
550
+ "type": "uint256"
551
+ }
552
+ ],
553
+ "stateMutability": "payable",
554
+ "type": "function"
555
+ },
556
+ {
557
+ "inputs": [],
558
+ "name": "eip712Domain",
559
+ "outputs": [
560
+ {
561
+ "internalType": "bytes1",
562
+ "name": "fields",
563
+ "type": "bytes1"
564
+ },
565
+ {
566
+ "internalType": "string",
567
+ "name": "name",
568
+ "type": "string"
569
+ },
570
+ {
571
+ "internalType": "string",
572
+ "name": "version",
573
+ "type": "string"
574
+ },
575
+ {
576
+ "internalType": "uint256",
577
+ "name": "chainId",
578
+ "type": "uint256"
579
+ },
580
+ {
581
+ "internalType": "address",
582
+ "name": "verifyingContract",
583
+ "type": "address"
584
+ },
585
+ {
586
+ "internalType": "bytes32",
587
+ "name": "salt",
588
+ "type": "bytes32"
589
+ },
590
+ {
591
+ "internalType": "uint256[]",
592
+ "name": "extensions",
593
+ "type": "uint256[]"
594
+ }
595
+ ],
596
+ "stateMutability": "view",
597
+ "type": "function"
598
+ },
599
+ {
600
+ "inputs": [],
601
+ "name": "exchangeRate",
602
+ "outputs": [
603
+ {
604
+ "internalType": "uint256",
605
+ "name": "",
606
+ "type": "uint256"
607
+ }
608
+ ],
609
+ "stateMutability": "view",
610
+ "type": "function"
611
+ },
612
+ {
613
+ "inputs": [],
614
+ "name": "getAbsoluteSupplyCap",
615
+ "outputs": [
616
+ {
617
+ "internalType": "uint256",
618
+ "name": "",
619
+ "type": "uint256"
620
+ }
621
+ ],
622
+ "stateMutability": "view",
623
+ "type": "function"
624
+ },
625
+ {
626
+ "inputs": [],
627
+ "name": "getAbsoluteTotalSupply",
628
+ "outputs": [
629
+ {
630
+ "internalType": "uint256",
631
+ "name": "",
632
+ "type": "uint256"
633
+ }
634
+ ],
635
+ "stateMutability": "view",
636
+ "type": "function"
637
+ },
638
+ {
639
+ "inputs": [],
640
+ "name": "getRewardTokens",
641
+ "outputs": [
642
+ {
643
+ "internalType": "address[]",
644
+ "name": "rewardTokens",
645
+ "type": "address[]"
646
+ }
647
+ ],
648
+ "stateMutability": "view",
649
+ "type": "function"
650
+ },
651
+ {
652
+ "inputs": [],
653
+ "name": "getTokensIn",
654
+ "outputs": [
655
+ {
656
+ "internalType": "address[]",
657
+ "name": "res",
658
+ "type": "address[]"
659
+ }
660
+ ],
661
+ "stateMutability": "view",
662
+ "type": "function"
663
+ },
664
+ {
665
+ "inputs": [],
666
+ "name": "getTokensOut",
667
+ "outputs": [
668
+ {
669
+ "internalType": "address[]",
670
+ "name": "res",
671
+ "type": "address[]"
672
+ }
673
+ ],
674
+ "stateMutability": "view",
675
+ "type": "function"
676
+ },
677
+ {
678
+ "inputs": [
679
+ {
680
+ "internalType": "address",
681
+ "name": "token",
682
+ "type": "address"
683
+ }
684
+ ],
685
+ "name": "isValidTokenIn",
686
+ "outputs": [
687
+ {
688
+ "internalType": "bool",
689
+ "name": "",
690
+ "type": "bool"
691
+ }
692
+ ],
693
+ "stateMutability": "view",
694
+ "type": "function"
695
+ },
696
+ {
697
+ "inputs": [
698
+ {
699
+ "internalType": "address",
700
+ "name": "token",
701
+ "type": "address"
702
+ }
703
+ ],
704
+ "name": "isValidTokenOut",
705
+ "outputs": [
706
+ {
707
+ "internalType": "bool",
708
+ "name": "",
709
+ "type": "bool"
710
+ }
711
+ ],
712
+ "stateMutability": "view",
713
+ "type": "function"
714
+ },
715
+ {
716
+ "inputs": [],
717
+ "name": "name",
718
+ "outputs": [
719
+ {
720
+ "internalType": "string",
721
+ "name": "",
722
+ "type": "string"
723
+ }
724
+ ],
725
+ "stateMutability": "view",
726
+ "type": "function"
727
+ },
728
+ {
729
+ "inputs": [
730
+ {
731
+ "internalType": "address",
732
+ "name": "owner",
733
+ "type": "address"
734
+ }
735
+ ],
736
+ "name": "nonces",
737
+ "outputs": [
738
+ {
739
+ "internalType": "uint256",
740
+ "name": "",
741
+ "type": "uint256"
742
+ }
743
+ ],
744
+ "stateMutability": "view",
745
+ "type": "function"
746
+ },
747
+ {
748
+ "inputs": [],
749
+ "name": "owner",
750
+ "outputs": [
751
+ {
752
+ "internalType": "address",
753
+ "name": "",
754
+ "type": "address"
755
+ }
756
+ ],
757
+ "stateMutability": "view",
758
+ "type": "function"
759
+ },
760
+ {
761
+ "inputs": [],
762
+ "name": "pause",
763
+ "outputs": [],
764
+ "stateMutability": "nonpayable",
765
+ "type": "function"
766
+ },
767
+ {
768
+ "inputs": [],
769
+ "name": "paused",
770
+ "outputs": [
771
+ {
772
+ "internalType": "bool",
773
+ "name": "",
774
+ "type": "bool"
775
+ }
776
+ ],
777
+ "stateMutability": "view",
778
+ "type": "function"
779
+ },
780
+ {
781
+ "inputs": [],
782
+ "name": "pendingOwner",
783
+ "outputs": [
784
+ {
785
+ "internalType": "address",
786
+ "name": "",
787
+ "type": "address"
788
+ }
789
+ ],
790
+ "stateMutability": "view",
791
+ "type": "function"
792
+ },
793
+ {
794
+ "inputs": [
795
+ {
796
+ "internalType": "address",
797
+ "name": "owner",
798
+ "type": "address"
799
+ },
800
+ {
801
+ "internalType": "address",
802
+ "name": "spender",
803
+ "type": "address"
804
+ },
805
+ {
806
+ "internalType": "uint256",
807
+ "name": "value",
808
+ "type": "uint256"
809
+ },
810
+ {
811
+ "internalType": "uint256",
812
+ "name": "deadline",
813
+ "type": "uint256"
814
+ },
815
+ {
816
+ "internalType": "uint8",
817
+ "name": "v",
818
+ "type": "uint8"
819
+ },
820
+ {
821
+ "internalType": "bytes32",
822
+ "name": "r",
823
+ "type": "bytes32"
824
+ },
825
+ {
826
+ "internalType": "bytes32",
827
+ "name": "s",
828
+ "type": "bytes32"
829
+ }
830
+ ],
831
+ "name": "permit",
832
+ "outputs": [],
833
+ "stateMutability": "nonpayable",
834
+ "type": "function"
835
+ },
836
+ {
837
+ "inputs": [
838
+ {
839
+ "internalType": "address",
840
+ "name": "tokenIn",
841
+ "type": "address"
842
+ },
843
+ {
844
+ "internalType": "uint256",
845
+ "name": "amountTokenToDeposit",
846
+ "type": "uint256"
847
+ }
848
+ ],
849
+ "name": "previewDeposit",
850
+ "outputs": [
851
+ {
852
+ "internalType": "uint256",
853
+ "name": "amountSharesOut",
854
+ "type": "uint256"
855
+ }
856
+ ],
857
+ "stateMutability": "view",
858
+ "type": "function"
859
+ },
860
+ {
861
+ "inputs": [
862
+ {
863
+ "internalType": "address",
864
+ "name": "tokenOut",
865
+ "type": "address"
866
+ },
867
+ {
868
+ "internalType": "uint256",
869
+ "name": "amountSharesToRedeem",
870
+ "type": "uint256"
871
+ }
872
+ ],
873
+ "name": "previewRedeem",
874
+ "outputs": [
875
+ {
876
+ "internalType": "uint256",
877
+ "name": "amountTokenOut",
878
+ "type": "uint256"
879
+ }
880
+ ],
881
+ "stateMutability": "view",
882
+ "type": "function"
883
+ },
884
+ {
885
+ "inputs": [
886
+ {
887
+ "internalType": "address",
888
+ "name": "receiver",
889
+ "type": "address"
890
+ },
891
+ {
892
+ "internalType": "uint256",
893
+ "name": "amountSharesToRedeem",
894
+ "type": "uint256"
895
+ },
896
+ {
897
+ "internalType": "address",
898
+ "name": "tokenOut",
899
+ "type": "address"
900
+ },
901
+ {
902
+ "internalType": "uint256",
903
+ "name": "minTokenOut",
904
+ "type": "uint256"
905
+ },
906
+ {
907
+ "internalType": "bool",
908
+ "name": "burnFromInternalBalance",
909
+ "type": "bool"
910
+ }
911
+ ],
912
+ "name": "redeem",
913
+ "outputs": [
914
+ {
915
+ "internalType": "uint256",
916
+ "name": "amountTokenOut",
917
+ "type": "uint256"
918
+ }
919
+ ],
920
+ "stateMutability": "nonpayable",
921
+ "type": "function"
922
+ },
923
+ {
924
+ "inputs": [],
925
+ "name": "rewardIndexesCurrent",
926
+ "outputs": [
927
+ {
928
+ "internalType": "uint256[]",
929
+ "name": "indexes",
930
+ "type": "uint256[]"
931
+ }
932
+ ],
933
+ "stateMutability": "nonpayable",
934
+ "type": "function"
935
+ },
936
+ {
937
+ "inputs": [],
938
+ "name": "rewardIndexesStored",
939
+ "outputs": [
940
+ {
941
+ "internalType": "uint256[]",
942
+ "name": "indexes",
943
+ "type": "uint256[]"
944
+ }
945
+ ],
946
+ "stateMutability": "view",
947
+ "type": "function"
948
+ },
949
+ {
950
+ "inputs": [],
951
+ "name": "supplyCap",
952
+ "outputs": [
953
+ {
954
+ "internalType": "uint256",
955
+ "name": "",
956
+ "type": "uint256"
957
+ }
958
+ ],
959
+ "stateMutability": "view",
960
+ "type": "function"
961
+ },
962
+ {
963
+ "inputs": [],
964
+ "name": "symbol",
965
+ "outputs": [
966
+ {
967
+ "internalType": "string",
968
+ "name": "",
969
+ "type": "string"
970
+ }
971
+ ],
972
+ "stateMutability": "view",
973
+ "type": "function"
974
+ },
975
+ {
976
+ "inputs": [],
977
+ "name": "totalSupply",
978
+ "outputs": [
979
+ {
980
+ "internalType": "uint256",
981
+ "name": "",
982
+ "type": "uint256"
983
+ }
984
+ ],
985
+ "stateMutability": "view",
986
+ "type": "function"
987
+ },
988
+ {
989
+ "inputs": [
990
+ {
991
+ "internalType": "address",
992
+ "name": "to",
993
+ "type": "address"
994
+ },
995
+ {
996
+ "internalType": "uint256",
997
+ "name": "amount",
998
+ "type": "uint256"
999
+ }
1000
+ ],
1001
+ "name": "transfer",
1002
+ "outputs": [
1003
+ {
1004
+ "internalType": "bool",
1005
+ "name": "",
1006
+ "type": "bool"
1007
+ }
1008
+ ],
1009
+ "stateMutability": "nonpayable",
1010
+ "type": "function"
1011
+ },
1012
+ {
1013
+ "inputs": [
1014
+ {
1015
+ "internalType": "address",
1016
+ "name": "from",
1017
+ "type": "address"
1018
+ },
1019
+ {
1020
+ "internalType": "address",
1021
+ "name": "to",
1022
+ "type": "address"
1023
+ },
1024
+ {
1025
+ "internalType": "uint256",
1026
+ "name": "amount",
1027
+ "type": "uint256"
1028
+ }
1029
+ ],
1030
+ "name": "transferFrom",
1031
+ "outputs": [
1032
+ {
1033
+ "internalType": "bool",
1034
+ "name": "",
1035
+ "type": "bool"
1036
+ }
1037
+ ],
1038
+ "stateMutability": "nonpayable",
1039
+ "type": "function"
1040
+ },
1041
+ {
1042
+ "inputs": [
1043
+ {
1044
+ "internalType": "address",
1045
+ "name": "newOwner",
1046
+ "type": "address"
1047
+ },
1048
+ {
1049
+ "internalType": "bool",
1050
+ "name": "direct",
1051
+ "type": "bool"
1052
+ },
1053
+ {
1054
+ "internalType": "bool",
1055
+ "name": "renounce",
1056
+ "type": "bool"
1057
+ }
1058
+ ],
1059
+ "name": "transferOwnership",
1060
+ "outputs": [],
1061
+ "stateMutability": "nonpayable",
1062
+ "type": "function"
1063
+ },
1064
+ {
1065
+ "inputs": [],
1066
+ "name": "unpause",
1067
+ "outputs": [],
1068
+ "stateMutability": "nonpayable",
1069
+ "type": "function"
1070
+ },
1071
+ {
1072
+ "inputs": [
1073
+ {
1074
+ "internalType": "uint256",
1075
+ "name": "newSupplyCap",
1076
+ "type": "uint256"
1077
+ }
1078
+ ],
1079
+ "name": "updateSupplyCap",
1080
+ "outputs": [],
1081
+ "stateMutability": "nonpayable",
1082
+ "type": "function"
1083
+ },
1084
+ {
1085
+ "inputs": [],
1086
+ "name": "yieldToken",
1087
+ "outputs": [
1088
+ {
1089
+ "internalType": "address",
1090
+ "name": "",
1091
+ "type": "address"
1092
+ }
1093
+ ],
1094
+ "stateMutability": "view",
1095
+ "type": "function"
1096
+ },
1097
+ {
1098
+ "stateMutability": "payable",
1099
+ "type": "receive"
1100
+ }
1101
+ ] as const satisfies Abi;
1102
+
1103
+ /**
1104
+ * Type-safe ABI for PendleSUSDESY_json
1105
+ */
1106
+ export type PendleSUSDESY_jsonAbi = typeof PendleSUSDESY_jsonAbi;
1107
+
1108
+ /**
1109
+ * Contract instance type for PendleSUSDESY_json
1110
+ */
1111
+ // Use any for contract type to avoid complex viem type issues
1112
+ // The runtime behavior is type-safe through viem's ABI typing
1113
+ export type PendleSUSDESY_jsonContract = any;
1114
+
1115
+ /**
1116
+ * PendleSUSDESY_json Contract Class
1117
+ *
1118
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1119
+ *
1120
+ * @example
1121
+ * ```typescript
1122
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1123
+ * import { mainnet } from 'viem/chains';
1124
+ * import { PendleSUSDESY_json } from 'PendleSUSDESY_json';
1125
+ *
1126
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1127
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1128
+ *
1129
+ * const contract = new PendleSUSDESY_json('0x...', { publicClient, walletClient });
1130
+ *
1131
+ * // Read functions
1132
+ * const result = await contract.balanceOf('0x...');
1133
+ *
1134
+ * // Write functions
1135
+ * const hash = await contract.transfer('0x...', 1000n);
1136
+ *
1137
+ * // Simulate transactions (dry-run)
1138
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1139
+ * console.log('Gas estimate:', simulation.request.gas);
1140
+ *
1141
+ * // Watch events
1142
+ * const unwatch = contract.watch.Transfer((event) => {
1143
+ * console.log('Transfer event:', event);
1144
+ * });
1145
+ * ```
1146
+ */
1147
+ export class PendleSUSDESY_json {
1148
+ private contract: PendleSUSDESY_jsonContract;
1149
+ private contractAddress: Address;
1150
+ private publicClient: PublicClient;
1151
+
1152
+ constructor(
1153
+ address: Address,
1154
+ clients: {
1155
+ publicClient: PublicClient;
1156
+ walletClient?: WalletClient;
1157
+ }
1158
+ ) {
1159
+ this.contractAddress = address;
1160
+ this.publicClient = clients.publicClient;
1161
+ this.contract = getContract({
1162
+ address,
1163
+ abi: PendleSUSDESY_jsonAbi,
1164
+ client: {
1165
+ public: clients.publicClient,
1166
+ wallet: clients.walletClient,
1167
+ },
1168
+ });
1169
+ }
1170
+
1171
+ /**
1172
+ * Get the contract address
1173
+ */
1174
+ get address(): Address {
1175
+ return this.contractAddress;
1176
+ }
1177
+
1178
+ /**
1179
+ * Get the underlying viem contract instance
1180
+ */
1181
+ getContract(): PendleSUSDESY_jsonContract {
1182
+ return this.contract;
1183
+ }
1184
+
1185
+ /**
1186
+ * DOMAIN_SEPARATOR
1187
+ * view
1188
+ */
1189
+ async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
1190
+ return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
1191
+ }
1192
+
1193
+ /**
1194
+ * accruedRewards
1195
+ * view
1196
+ */
1197
+ async accruedRewards(arg0: `0x${string}`): Promise<bigint[]> {
1198
+ return this.contract.read.accruedRewards([arg0] as const) as Promise<bigint[]>;
1199
+ }
1200
+
1201
+ /**
1202
+ * allowance
1203
+ * view
1204
+ */
1205
+ async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
1206
+ return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
1207
+ }
1208
+
1209
+ /**
1210
+ * asset
1211
+ * view
1212
+ */
1213
+ async asset(): Promise<`0x${string}`> {
1214
+ return this.contract.read.asset() as Promise<`0x${string}`>;
1215
+ }
1216
+
1217
+ /**
1218
+ * assetInfo
1219
+ * view
1220
+ */
1221
+ async assetInfo(): Promise<[bigint, `0x${string}`, bigint]> {
1222
+ return this.contract.read.assetInfo() as Promise<[bigint, `0x${string}`, bigint]>;
1223
+ }
1224
+
1225
+ /**
1226
+ * balanceOf
1227
+ * view
1228
+ */
1229
+ async balanceOf(account: `0x${string}`): Promise<bigint> {
1230
+ return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
1231
+ }
1232
+
1233
+ /**
1234
+ * decimals
1235
+ * view
1236
+ */
1237
+ async decimals(): Promise<bigint> {
1238
+ return this.contract.read.decimals() as Promise<bigint>;
1239
+ }
1240
+
1241
+ /**
1242
+ * eip712Domain
1243
+ * view
1244
+ */
1245
+ async eip712Domain(): Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]> {
1246
+ return this.contract.read.eip712Domain() as Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]>;
1247
+ }
1248
+
1249
+ /**
1250
+ * exchangeRate
1251
+ * view
1252
+ */
1253
+ async exchangeRate(): Promise<bigint> {
1254
+ return this.contract.read.exchangeRate() as Promise<bigint>;
1255
+ }
1256
+
1257
+ /**
1258
+ * getAbsoluteSupplyCap
1259
+ * view
1260
+ */
1261
+ async getAbsoluteSupplyCap(): Promise<bigint> {
1262
+ return this.contract.read.getAbsoluteSupplyCap() as Promise<bigint>;
1263
+ }
1264
+
1265
+ /**
1266
+ * getAbsoluteTotalSupply
1267
+ * view
1268
+ */
1269
+ async getAbsoluteTotalSupply(): Promise<bigint> {
1270
+ return this.contract.read.getAbsoluteTotalSupply() as Promise<bigint>;
1271
+ }
1272
+
1273
+ /**
1274
+ * getRewardTokens
1275
+ * view
1276
+ */
1277
+ async getRewardTokens(): Promise<`0x${string}`[]> {
1278
+ return this.contract.read.getRewardTokens() as Promise<`0x${string}`[]>;
1279
+ }
1280
+
1281
+ /**
1282
+ * getTokensIn
1283
+ * view
1284
+ */
1285
+ async getTokensIn(): Promise<`0x${string}`[]> {
1286
+ return this.contract.read.getTokensIn() as Promise<`0x${string}`[]>;
1287
+ }
1288
+
1289
+ /**
1290
+ * getTokensOut
1291
+ * view
1292
+ */
1293
+ async getTokensOut(): Promise<`0x${string}`[]> {
1294
+ return this.contract.read.getTokensOut() as Promise<`0x${string}`[]>;
1295
+ }
1296
+
1297
+ /**
1298
+ * isValidTokenIn
1299
+ * view
1300
+ */
1301
+ async isValidTokenIn(token: `0x${string}`): Promise<boolean> {
1302
+ return this.contract.read.isValidTokenIn([token] as const) as Promise<boolean>;
1303
+ }
1304
+
1305
+ /**
1306
+ * isValidTokenOut
1307
+ * view
1308
+ */
1309
+ async isValidTokenOut(token: `0x${string}`): Promise<boolean> {
1310
+ return this.contract.read.isValidTokenOut([token] as const) as Promise<boolean>;
1311
+ }
1312
+
1313
+ /**
1314
+ * name
1315
+ * view
1316
+ */
1317
+ async name(): Promise<string> {
1318
+ return this.contract.read.name() as Promise<string>;
1319
+ }
1320
+
1321
+ /**
1322
+ * nonces
1323
+ * view
1324
+ */
1325
+ async nonces(owner: `0x${string}`): Promise<bigint> {
1326
+ return this.contract.read.nonces([owner] as const) as Promise<bigint>;
1327
+ }
1328
+
1329
+ /**
1330
+ * owner
1331
+ * view
1332
+ */
1333
+ async owner(): Promise<`0x${string}`> {
1334
+ return this.contract.read.owner() as Promise<`0x${string}`>;
1335
+ }
1336
+
1337
+ /**
1338
+ * paused
1339
+ * view
1340
+ */
1341
+ async paused(): Promise<boolean> {
1342
+ return this.contract.read.paused() as Promise<boolean>;
1343
+ }
1344
+
1345
+ /**
1346
+ * pendingOwner
1347
+ * view
1348
+ */
1349
+ async pendingOwner(): Promise<`0x${string}`> {
1350
+ return this.contract.read.pendingOwner() as Promise<`0x${string}`>;
1351
+ }
1352
+
1353
+ /**
1354
+ * previewDeposit
1355
+ * view
1356
+ */
1357
+ async previewDeposit(tokenIn: `0x${string}`, amountTokenToDeposit: bigint): Promise<bigint> {
1358
+ return this.contract.read.previewDeposit([tokenIn, amountTokenToDeposit] as const) as Promise<bigint>;
1359
+ }
1360
+
1361
+ /**
1362
+ * previewRedeem
1363
+ * view
1364
+ */
1365
+ async previewRedeem(tokenOut: `0x${string}`, amountSharesToRedeem: bigint): Promise<bigint> {
1366
+ return this.contract.read.previewRedeem([tokenOut, amountSharesToRedeem] as const) as Promise<bigint>;
1367
+ }
1368
+
1369
+ /**
1370
+ * rewardIndexesStored
1371
+ * view
1372
+ */
1373
+ async rewardIndexesStored(): Promise<bigint[]> {
1374
+ return this.contract.read.rewardIndexesStored() as Promise<bigint[]>;
1375
+ }
1376
+
1377
+ /**
1378
+ * supplyCap
1379
+ * view
1380
+ */
1381
+ async supplyCap(): Promise<bigint> {
1382
+ return this.contract.read.supplyCap() as Promise<bigint>;
1383
+ }
1384
+
1385
+ /**
1386
+ * symbol
1387
+ * view
1388
+ */
1389
+ async symbol(): Promise<string> {
1390
+ return this.contract.read.symbol() as Promise<string>;
1391
+ }
1392
+
1393
+ /**
1394
+ * totalSupply
1395
+ * view
1396
+ */
1397
+ async totalSupply(): Promise<bigint> {
1398
+ return this.contract.read.totalSupply() as Promise<bigint>;
1399
+ }
1400
+
1401
+ /**
1402
+ * yieldToken
1403
+ * view
1404
+ */
1405
+ async yieldToken(): Promise<`0x${string}`> {
1406
+ return this.contract.read.yieldToken() as Promise<`0x${string}`>;
1407
+ }
1408
+
1409
+ /**
1410
+ * approve
1411
+ * nonpayable
1412
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1413
+ */
1414
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
1415
+ accessList?: import('viem').AccessList;
1416
+ authorizationList?: import('viem').AuthorizationList;
1417
+ chain?: import('viem').Chain | null;
1418
+ dataSuffix?: `0x${string}`;
1419
+ gas?: bigint;
1420
+ gasPrice?: bigint;
1421
+ maxFeePerGas?: bigint;
1422
+ maxPriorityFeePerGas?: bigint;
1423
+ nonce?: number;
1424
+ value?: bigint;
1425
+ }): Promise<`0x${string}`> {
1426
+ if (!this.contract.write) {
1427
+ throw new Error('Wallet client is required for write operations');
1428
+ }
1429
+ return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
1430
+ }
1431
+
1432
+ /**
1433
+ * claimOwnership
1434
+ * nonpayable
1435
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1436
+ */
1437
+ async claimOwnership(options?: {
1438
+ accessList?: import('viem').AccessList;
1439
+ authorizationList?: import('viem').AuthorizationList;
1440
+ chain?: import('viem').Chain | null;
1441
+ dataSuffix?: `0x${string}`;
1442
+ gas?: bigint;
1443
+ gasPrice?: bigint;
1444
+ maxFeePerGas?: bigint;
1445
+ maxPriorityFeePerGas?: bigint;
1446
+ nonce?: number;
1447
+ value?: bigint;
1448
+ }): Promise<`0x${string}`> {
1449
+ if (!this.contract.write) {
1450
+ throw new Error('Wallet client is required for write operations');
1451
+ }
1452
+ return this.contract.write.claimOwnership(options) as Promise<`0x${string}`>;
1453
+ }
1454
+
1455
+ /**
1456
+ * claimRewards
1457
+ * nonpayable
1458
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1459
+ */
1460
+ async claimRewards(arg0: `0x${string}`, options?: {
1461
+ accessList?: import('viem').AccessList;
1462
+ authorizationList?: import('viem').AuthorizationList;
1463
+ chain?: import('viem').Chain | null;
1464
+ dataSuffix?: `0x${string}`;
1465
+ gas?: bigint;
1466
+ gasPrice?: bigint;
1467
+ maxFeePerGas?: bigint;
1468
+ maxPriorityFeePerGas?: bigint;
1469
+ nonce?: number;
1470
+ value?: bigint;
1471
+ }): Promise<`0x${string}`> {
1472
+ if (!this.contract.write) {
1473
+ throw new Error('Wallet client is required for write operations');
1474
+ }
1475
+ return this.contract.write.claimRewards([arg0] as const, options) as Promise<`0x${string}`>;
1476
+ }
1477
+
1478
+ /**
1479
+ * deposit
1480
+ * payable
1481
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1482
+ */
1483
+ async deposit(receiver: `0x${string}`, tokenIn: `0x${string}`, amountTokenToDeposit: bigint, minSharesOut: bigint, options?: {
1484
+ accessList?: import('viem').AccessList;
1485
+ authorizationList?: import('viem').AuthorizationList;
1486
+ chain?: import('viem').Chain | null;
1487
+ dataSuffix?: `0x${string}`;
1488
+ gas?: bigint;
1489
+ gasPrice?: bigint;
1490
+ maxFeePerGas?: bigint;
1491
+ maxPriorityFeePerGas?: bigint;
1492
+ nonce?: number;
1493
+ value?: bigint;
1494
+ }): Promise<`0x${string}`> {
1495
+ if (!this.contract.write) {
1496
+ throw new Error('Wallet client is required for write operations');
1497
+ }
1498
+ return this.contract.write.deposit([receiver, tokenIn, amountTokenToDeposit, minSharesOut] as const, options) as Promise<`0x${string}`>;
1499
+ }
1500
+
1501
+ /**
1502
+ * pause
1503
+ * nonpayable
1504
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1505
+ */
1506
+ async pause(options?: {
1507
+ accessList?: import('viem').AccessList;
1508
+ authorizationList?: import('viem').AuthorizationList;
1509
+ chain?: import('viem').Chain | null;
1510
+ dataSuffix?: `0x${string}`;
1511
+ gas?: bigint;
1512
+ gasPrice?: bigint;
1513
+ maxFeePerGas?: bigint;
1514
+ maxPriorityFeePerGas?: bigint;
1515
+ nonce?: number;
1516
+ value?: bigint;
1517
+ }): Promise<`0x${string}`> {
1518
+ if (!this.contract.write) {
1519
+ throw new Error('Wallet client is required for write operations');
1520
+ }
1521
+ return this.contract.write.pause(options) as Promise<`0x${string}`>;
1522
+ }
1523
+
1524
+ /**
1525
+ * permit
1526
+ * nonpayable
1527
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1528
+ */
1529
+ async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
1530
+ accessList?: import('viem').AccessList;
1531
+ authorizationList?: import('viem').AuthorizationList;
1532
+ chain?: import('viem').Chain | null;
1533
+ dataSuffix?: `0x${string}`;
1534
+ gas?: bigint;
1535
+ gasPrice?: bigint;
1536
+ maxFeePerGas?: bigint;
1537
+ maxPriorityFeePerGas?: bigint;
1538
+ nonce?: number;
1539
+ value?: bigint;
1540
+ }): Promise<`0x${string}`> {
1541
+ if (!this.contract.write) {
1542
+ throw new Error('Wallet client is required for write operations');
1543
+ }
1544
+ return this.contract.write.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<`0x${string}`>;
1545
+ }
1546
+
1547
+ /**
1548
+ * redeem
1549
+ * nonpayable
1550
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1551
+ */
1552
+ async redeem(receiver: `0x${string}`, amountSharesToRedeem: bigint, tokenOut: `0x${string}`, minTokenOut: bigint, burnFromInternalBalance: boolean, options?: {
1553
+ accessList?: import('viem').AccessList;
1554
+ authorizationList?: import('viem').AuthorizationList;
1555
+ chain?: import('viem').Chain | null;
1556
+ dataSuffix?: `0x${string}`;
1557
+ gas?: bigint;
1558
+ gasPrice?: bigint;
1559
+ maxFeePerGas?: bigint;
1560
+ maxPriorityFeePerGas?: bigint;
1561
+ nonce?: number;
1562
+ value?: bigint;
1563
+ }): Promise<`0x${string}`> {
1564
+ if (!this.contract.write) {
1565
+ throw new Error('Wallet client is required for write operations');
1566
+ }
1567
+ return this.contract.write.redeem([receiver, amountSharesToRedeem, tokenOut, minTokenOut, burnFromInternalBalance] as const, options) as Promise<`0x${string}`>;
1568
+ }
1569
+
1570
+ /**
1571
+ * rewardIndexesCurrent
1572
+ * nonpayable
1573
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1574
+ */
1575
+ async rewardIndexesCurrent(options?: {
1576
+ accessList?: import('viem').AccessList;
1577
+ authorizationList?: import('viem').AuthorizationList;
1578
+ chain?: import('viem').Chain | null;
1579
+ dataSuffix?: `0x${string}`;
1580
+ gas?: bigint;
1581
+ gasPrice?: bigint;
1582
+ maxFeePerGas?: bigint;
1583
+ maxPriorityFeePerGas?: bigint;
1584
+ nonce?: number;
1585
+ value?: bigint;
1586
+ }): Promise<`0x${string}`> {
1587
+ if (!this.contract.write) {
1588
+ throw new Error('Wallet client is required for write operations');
1589
+ }
1590
+ return this.contract.write.rewardIndexesCurrent(options) as Promise<`0x${string}`>;
1591
+ }
1592
+
1593
+ /**
1594
+ * transfer
1595
+ * nonpayable
1596
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1597
+ */
1598
+ async transfer(to: `0x${string}`, amount: bigint, options?: {
1599
+ accessList?: import('viem').AccessList;
1600
+ authorizationList?: import('viem').AuthorizationList;
1601
+ chain?: import('viem').Chain | null;
1602
+ dataSuffix?: `0x${string}`;
1603
+ gas?: bigint;
1604
+ gasPrice?: bigint;
1605
+ maxFeePerGas?: bigint;
1606
+ maxPriorityFeePerGas?: bigint;
1607
+ nonce?: number;
1608
+ value?: bigint;
1609
+ }): Promise<`0x${string}`> {
1610
+ if (!this.contract.write) {
1611
+ throw new Error('Wallet client is required for write operations');
1612
+ }
1613
+ return this.contract.write.transfer([to, amount] as const, options) as Promise<`0x${string}`>;
1614
+ }
1615
+
1616
+ /**
1617
+ * transferFrom
1618
+ * nonpayable
1619
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1620
+ */
1621
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
1622
+ accessList?: import('viem').AccessList;
1623
+ authorizationList?: import('viem').AuthorizationList;
1624
+ chain?: import('viem').Chain | null;
1625
+ dataSuffix?: `0x${string}`;
1626
+ gas?: bigint;
1627
+ gasPrice?: bigint;
1628
+ maxFeePerGas?: bigint;
1629
+ maxPriorityFeePerGas?: bigint;
1630
+ nonce?: number;
1631
+ value?: bigint;
1632
+ }): Promise<`0x${string}`> {
1633
+ if (!this.contract.write) {
1634
+ throw new Error('Wallet client is required for write operations');
1635
+ }
1636
+ return this.contract.write.transferFrom([from, to, amount] as const, options) as Promise<`0x${string}`>;
1637
+ }
1638
+
1639
+ /**
1640
+ * transferOwnership
1641
+ * nonpayable
1642
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1643
+ */
1644
+ async transferOwnership(newOwner: `0x${string}`, direct: boolean, renounce: boolean, options?: {
1645
+ accessList?: import('viem').AccessList;
1646
+ authorizationList?: import('viem').AuthorizationList;
1647
+ chain?: import('viem').Chain | null;
1648
+ dataSuffix?: `0x${string}`;
1649
+ gas?: bigint;
1650
+ gasPrice?: bigint;
1651
+ maxFeePerGas?: bigint;
1652
+ maxPriorityFeePerGas?: bigint;
1653
+ nonce?: number;
1654
+ value?: bigint;
1655
+ }): Promise<`0x${string}`> {
1656
+ if (!this.contract.write) {
1657
+ throw new Error('Wallet client is required for write operations');
1658
+ }
1659
+ return this.contract.write.transferOwnership([newOwner, direct, renounce] as const, options) as Promise<`0x${string}`>;
1660
+ }
1661
+
1662
+ /**
1663
+ * unpause
1664
+ * nonpayable
1665
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1666
+ */
1667
+ async unpause(options?: {
1668
+ accessList?: import('viem').AccessList;
1669
+ authorizationList?: import('viem').AuthorizationList;
1670
+ chain?: import('viem').Chain | null;
1671
+ dataSuffix?: `0x${string}`;
1672
+ gas?: bigint;
1673
+ gasPrice?: bigint;
1674
+ maxFeePerGas?: bigint;
1675
+ maxPriorityFeePerGas?: bigint;
1676
+ nonce?: number;
1677
+ value?: bigint;
1678
+ }): Promise<`0x${string}`> {
1679
+ if (!this.contract.write) {
1680
+ throw new Error('Wallet client is required for write operations');
1681
+ }
1682
+ return this.contract.write.unpause(options) as Promise<`0x${string}`>;
1683
+ }
1684
+
1685
+ /**
1686
+ * updateSupplyCap
1687
+ * nonpayable
1688
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1689
+ */
1690
+ async updateSupplyCap(newSupplyCap: bigint, options?: {
1691
+ accessList?: import('viem').AccessList;
1692
+ authorizationList?: import('viem').AuthorizationList;
1693
+ chain?: import('viem').Chain | null;
1694
+ dataSuffix?: `0x${string}`;
1695
+ gas?: bigint;
1696
+ gasPrice?: bigint;
1697
+ maxFeePerGas?: bigint;
1698
+ maxPriorityFeePerGas?: bigint;
1699
+ nonce?: number;
1700
+ value?: bigint;
1701
+ }): Promise<`0x${string}`> {
1702
+ if (!this.contract.write) {
1703
+ throw new Error('Wallet client is required for write operations');
1704
+ }
1705
+ return this.contract.write.updateSupplyCap([newSupplyCap] as const, options) as Promise<`0x${string}`>;
1706
+ }
1707
+
1708
+
1709
+
1710
+ /**
1711
+ * Simulate contract write operations (dry-run without sending transaction)
1712
+ *
1713
+ * @example
1714
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1715
+ * console.log('Gas estimate:', result.request.gas);
1716
+ * console.log('Would succeed:', result.result);
1717
+ */
1718
+ get simulate() {
1719
+ const contract = this.contract;
1720
+ if (!contract.simulate) {
1721
+ throw new Error('Public client is required for simulation');
1722
+ }
1723
+ return {
1724
+ /**
1725
+ * Simulate approve
1726
+ * Returns gas estimate and result without sending transaction
1727
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1728
+ */
1729
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
1730
+ accessList?: import('viem').AccessList;
1731
+ authorizationList?: import('viem').AuthorizationList;
1732
+ chain?: import('viem').Chain | null;
1733
+ dataSuffix?: `0x${string}`;
1734
+ gas?: bigint;
1735
+ gasPrice?: bigint;
1736
+ maxFeePerGas?: bigint;
1737
+ maxPriorityFeePerGas?: bigint;
1738
+ nonce?: number;
1739
+ value?: bigint;
1740
+ }): Promise<boolean> {
1741
+ return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
1742
+ },
1743
+ /**
1744
+ * Simulate claimOwnership
1745
+ * Returns gas estimate and result without sending transaction
1746
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1747
+ */
1748
+ async claimOwnership(options?: {
1749
+ accessList?: import('viem').AccessList;
1750
+ authorizationList?: import('viem').AuthorizationList;
1751
+ chain?: import('viem').Chain | null;
1752
+ dataSuffix?: `0x${string}`;
1753
+ gas?: bigint;
1754
+ gasPrice?: bigint;
1755
+ maxFeePerGas?: bigint;
1756
+ maxPriorityFeePerGas?: bigint;
1757
+ nonce?: number;
1758
+ value?: bigint;
1759
+ }): Promise<void> {
1760
+ return contract.simulate.claimOwnership(options) as Promise<void>;
1761
+ },
1762
+ /**
1763
+ * Simulate claimRewards
1764
+ * Returns gas estimate and result without sending transaction
1765
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1766
+ */
1767
+ async claimRewards(arg0: `0x${string}`, options?: {
1768
+ accessList?: import('viem').AccessList;
1769
+ authorizationList?: import('viem').AuthorizationList;
1770
+ chain?: import('viem').Chain | null;
1771
+ dataSuffix?: `0x${string}`;
1772
+ gas?: bigint;
1773
+ gasPrice?: bigint;
1774
+ maxFeePerGas?: bigint;
1775
+ maxPriorityFeePerGas?: bigint;
1776
+ nonce?: number;
1777
+ value?: bigint;
1778
+ }): Promise<bigint[]> {
1779
+ return contract.simulate.claimRewards([arg0] as const, options) as Promise<bigint[]>;
1780
+ },
1781
+ /**
1782
+ * Simulate deposit
1783
+ * Returns gas estimate and result without sending transaction
1784
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1785
+ */
1786
+ async deposit(receiver: `0x${string}`, tokenIn: `0x${string}`, amountTokenToDeposit: bigint, minSharesOut: bigint, options?: {
1787
+ accessList?: import('viem').AccessList;
1788
+ authorizationList?: import('viem').AuthorizationList;
1789
+ chain?: import('viem').Chain | null;
1790
+ dataSuffix?: `0x${string}`;
1791
+ gas?: bigint;
1792
+ gasPrice?: bigint;
1793
+ maxFeePerGas?: bigint;
1794
+ maxPriorityFeePerGas?: bigint;
1795
+ nonce?: number;
1796
+ value?: bigint;
1797
+ }): Promise<bigint> {
1798
+ return contract.simulate.deposit([receiver, tokenIn, amountTokenToDeposit, minSharesOut] as const, options) as Promise<bigint>;
1799
+ },
1800
+ /**
1801
+ * Simulate pause
1802
+ * Returns gas estimate and result without sending transaction
1803
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1804
+ */
1805
+ async pause(options?: {
1806
+ accessList?: import('viem').AccessList;
1807
+ authorizationList?: import('viem').AuthorizationList;
1808
+ chain?: import('viem').Chain | null;
1809
+ dataSuffix?: `0x${string}`;
1810
+ gas?: bigint;
1811
+ gasPrice?: bigint;
1812
+ maxFeePerGas?: bigint;
1813
+ maxPriorityFeePerGas?: bigint;
1814
+ nonce?: number;
1815
+ value?: bigint;
1816
+ }): Promise<void> {
1817
+ return contract.simulate.pause(options) as Promise<void>;
1818
+ },
1819
+ /**
1820
+ * Simulate permit
1821
+ * Returns gas estimate and result without sending transaction
1822
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1823
+ */
1824
+ async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
1825
+ accessList?: import('viem').AccessList;
1826
+ authorizationList?: import('viem').AuthorizationList;
1827
+ chain?: import('viem').Chain | null;
1828
+ dataSuffix?: `0x${string}`;
1829
+ gas?: bigint;
1830
+ gasPrice?: bigint;
1831
+ maxFeePerGas?: bigint;
1832
+ maxPriorityFeePerGas?: bigint;
1833
+ nonce?: number;
1834
+ value?: bigint;
1835
+ }): Promise<void> {
1836
+ return contract.simulate.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<void>;
1837
+ },
1838
+ /**
1839
+ * Simulate redeem
1840
+ * Returns gas estimate and result without sending transaction
1841
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1842
+ */
1843
+ async redeem(receiver: `0x${string}`, amountSharesToRedeem: bigint, tokenOut: `0x${string}`, minTokenOut: bigint, burnFromInternalBalance: boolean, options?: {
1844
+ accessList?: import('viem').AccessList;
1845
+ authorizationList?: import('viem').AuthorizationList;
1846
+ chain?: import('viem').Chain | null;
1847
+ dataSuffix?: `0x${string}`;
1848
+ gas?: bigint;
1849
+ gasPrice?: bigint;
1850
+ maxFeePerGas?: bigint;
1851
+ maxPriorityFeePerGas?: bigint;
1852
+ nonce?: number;
1853
+ value?: bigint;
1854
+ }): Promise<bigint> {
1855
+ return contract.simulate.redeem([receiver, amountSharesToRedeem, tokenOut, minTokenOut, burnFromInternalBalance] as const, options) as Promise<bigint>;
1856
+ },
1857
+ /**
1858
+ * Simulate rewardIndexesCurrent
1859
+ * Returns gas estimate and result without sending transaction
1860
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1861
+ */
1862
+ async rewardIndexesCurrent(options?: {
1863
+ accessList?: import('viem').AccessList;
1864
+ authorizationList?: import('viem').AuthorizationList;
1865
+ chain?: import('viem').Chain | null;
1866
+ dataSuffix?: `0x${string}`;
1867
+ gas?: bigint;
1868
+ gasPrice?: bigint;
1869
+ maxFeePerGas?: bigint;
1870
+ maxPriorityFeePerGas?: bigint;
1871
+ nonce?: number;
1872
+ value?: bigint;
1873
+ }): Promise<bigint[]> {
1874
+ return contract.simulate.rewardIndexesCurrent(options) as Promise<bigint[]>;
1875
+ },
1876
+ /**
1877
+ * Simulate transfer
1878
+ * Returns gas estimate and result without sending transaction
1879
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1880
+ */
1881
+ async transfer(to: `0x${string}`, amount: bigint, options?: {
1882
+ accessList?: import('viem').AccessList;
1883
+ authorizationList?: import('viem').AuthorizationList;
1884
+ chain?: import('viem').Chain | null;
1885
+ dataSuffix?: `0x${string}`;
1886
+ gas?: bigint;
1887
+ gasPrice?: bigint;
1888
+ maxFeePerGas?: bigint;
1889
+ maxPriorityFeePerGas?: bigint;
1890
+ nonce?: number;
1891
+ value?: bigint;
1892
+ }): Promise<boolean> {
1893
+ return contract.simulate.transfer([to, amount] as const, options) as Promise<boolean>;
1894
+ },
1895
+ /**
1896
+ * Simulate transferFrom
1897
+ * Returns gas estimate and result without sending transaction
1898
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1899
+ */
1900
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
1901
+ accessList?: import('viem').AccessList;
1902
+ authorizationList?: import('viem').AuthorizationList;
1903
+ chain?: import('viem').Chain | null;
1904
+ dataSuffix?: `0x${string}`;
1905
+ gas?: bigint;
1906
+ gasPrice?: bigint;
1907
+ maxFeePerGas?: bigint;
1908
+ maxPriorityFeePerGas?: bigint;
1909
+ nonce?: number;
1910
+ value?: bigint;
1911
+ }): Promise<boolean> {
1912
+ return contract.simulate.transferFrom([from, to, amount] as const, options) as Promise<boolean>;
1913
+ },
1914
+ /**
1915
+ * Simulate transferOwnership
1916
+ * Returns gas estimate and result without sending transaction
1917
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1918
+ */
1919
+ async transferOwnership(newOwner: `0x${string}`, direct: boolean, renounce: boolean, options?: {
1920
+ accessList?: import('viem').AccessList;
1921
+ authorizationList?: import('viem').AuthorizationList;
1922
+ chain?: import('viem').Chain | null;
1923
+ dataSuffix?: `0x${string}`;
1924
+ gas?: bigint;
1925
+ gasPrice?: bigint;
1926
+ maxFeePerGas?: bigint;
1927
+ maxPriorityFeePerGas?: bigint;
1928
+ nonce?: number;
1929
+ value?: bigint;
1930
+ }): Promise<void> {
1931
+ return contract.simulate.transferOwnership([newOwner, direct, renounce] as const, options) as Promise<void>;
1932
+ },
1933
+ /**
1934
+ * Simulate unpause
1935
+ * Returns gas estimate and result without sending transaction
1936
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1937
+ */
1938
+ async unpause(options?: {
1939
+ accessList?: import('viem').AccessList;
1940
+ authorizationList?: import('viem').AuthorizationList;
1941
+ chain?: import('viem').Chain | null;
1942
+ dataSuffix?: `0x${string}`;
1943
+ gas?: bigint;
1944
+ gasPrice?: bigint;
1945
+ maxFeePerGas?: bigint;
1946
+ maxPriorityFeePerGas?: bigint;
1947
+ nonce?: number;
1948
+ value?: bigint;
1949
+ }): Promise<void> {
1950
+ return contract.simulate.unpause(options) as Promise<void>;
1951
+ },
1952
+ /**
1953
+ * Simulate updateSupplyCap
1954
+ * Returns gas estimate and result without sending transaction
1955
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1956
+ */
1957
+ async updateSupplyCap(newSupplyCap: bigint, options?: {
1958
+ accessList?: import('viem').AccessList;
1959
+ authorizationList?: import('viem').AuthorizationList;
1960
+ chain?: import('viem').Chain | null;
1961
+ dataSuffix?: `0x${string}`;
1962
+ gas?: bigint;
1963
+ gasPrice?: bigint;
1964
+ maxFeePerGas?: bigint;
1965
+ maxPriorityFeePerGas?: bigint;
1966
+ nonce?: number;
1967
+ value?: bigint;
1968
+ }): Promise<void> {
1969
+ return contract.simulate.updateSupplyCap([newSupplyCap] as const, options) as Promise<void>;
1970
+ }
1971
+ };
1972
+ }
1973
+
1974
+ /**
1975
+ * Watch contract events
1976
+ *
1977
+ * @example
1978
+ * // Watch all Transfer events
1979
+ * const unwatch = contract.watch.Transfer((event) => {
1980
+ * console.log('Transfer:', event);
1981
+ * });
1982
+ *
1983
+ * // Stop watching
1984
+ * unwatch();
1985
+ */
1986
+ get watch() {
1987
+ return {
1988
+ /**
1989
+ * Watch Approval events
1990
+ * @param callback Function to call when event is emitted
1991
+ * @param filter Optional filter for indexed parameters
1992
+ * @returns Unwatch function to stop listening
1993
+ */
1994
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
1995
+ return this.publicClient.watchContractEvent({
1996
+ address: this.contractAddress,
1997
+ abi: PendleSUSDESY_jsonAbi,
1998
+ eventName: 'Approval',
1999
+ args: filter,
2000
+ onLogs: (logs: any[]) => {
2001
+ logs.forEach((log: any) => {
2002
+ callback(log.args as any);
2003
+ });
2004
+ },
2005
+ }) as () => void;
2006
+ },
2007
+ /**
2008
+ * Watch ClaimRewards events
2009
+ * @param callback Function to call when event is emitted
2010
+ * @param filter Optional filter for indexed parameters
2011
+ * @returns Unwatch function to stop listening
2012
+ */
2013
+ ClaimRewards: (callback: (event: { user: `0x${string}`; rewardTokens: `0x${string}`[]; rewardAmounts: bigint[] }) => void, filter?: { user: `0x${string}` }) => {
2014
+ return this.publicClient.watchContractEvent({
2015
+ address: this.contractAddress,
2016
+ abi: PendleSUSDESY_jsonAbi,
2017
+ eventName: 'ClaimRewards',
2018
+ args: filter,
2019
+ onLogs: (logs: any[]) => {
2020
+ logs.forEach((log: any) => {
2021
+ callback(log.args as any);
2022
+ });
2023
+ },
2024
+ }) as () => void;
2025
+ },
2026
+ /**
2027
+ * Watch Deposit events
2028
+ * @param callback Function to call when event is emitted
2029
+ * @param filter Optional filter for indexed parameters
2030
+ * @returns Unwatch function to stop listening
2031
+ */
2032
+ Deposit: (callback: (event: { caller: `0x${string}`; receiver: `0x${string}`; tokenIn: `0x${string}`; amountDeposited: bigint; amountSyOut: bigint }) => void, filter?: { caller: `0x${string}`; receiver: `0x${string}`; tokenIn: `0x${string}` }) => {
2033
+ return this.publicClient.watchContractEvent({
2034
+ address: this.contractAddress,
2035
+ abi: PendleSUSDESY_jsonAbi,
2036
+ eventName: 'Deposit',
2037
+ args: filter,
2038
+ onLogs: (logs: any[]) => {
2039
+ logs.forEach((log: any) => {
2040
+ callback(log.args as any);
2041
+ });
2042
+ },
2043
+ }) as () => void;
2044
+ },
2045
+ /**
2046
+ * Watch EIP712DomainChanged events
2047
+ * @param callback Function to call when event is emitted
2048
+ * @param filter Optional filter for indexed parameters
2049
+ * @returns Unwatch function to stop listening
2050
+ */
2051
+ EIP712DomainChanged: (callback: (event: { }) => void) => {
2052
+ return this.publicClient.watchContractEvent({
2053
+ address: this.contractAddress,
2054
+ abi: PendleSUSDESY_jsonAbi,
2055
+ eventName: 'EIP712DomainChanged',
2056
+
2057
+ onLogs: (logs: any[]) => {
2058
+ logs.forEach((log: any) => {
2059
+ callback(log.args as any);
2060
+ });
2061
+ },
2062
+ }) as () => void;
2063
+ },
2064
+ /**
2065
+ * Watch Initialized events
2066
+ * @param callback Function to call when event is emitted
2067
+ * @param filter Optional filter for indexed parameters
2068
+ * @returns Unwatch function to stop listening
2069
+ */
2070
+ Initialized: (callback: (event: { version: bigint }) => void) => {
2071
+ return this.publicClient.watchContractEvent({
2072
+ address: this.contractAddress,
2073
+ abi: PendleSUSDESY_jsonAbi,
2074
+ eventName: 'Initialized',
2075
+
2076
+ onLogs: (logs: any[]) => {
2077
+ logs.forEach((log: any) => {
2078
+ callback(log.args as any);
2079
+ });
2080
+ },
2081
+ }) as () => void;
2082
+ },
2083
+ /**
2084
+ * Watch OwnershipTransferred events
2085
+ * @param callback Function to call when event is emitted
2086
+ * @param filter Optional filter for indexed parameters
2087
+ * @returns Unwatch function to stop listening
2088
+ */
2089
+ OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
2090
+ return this.publicClient.watchContractEvent({
2091
+ address: this.contractAddress,
2092
+ abi: PendleSUSDESY_jsonAbi,
2093
+ eventName: 'OwnershipTransferred',
2094
+ args: filter,
2095
+ onLogs: (logs: any[]) => {
2096
+ logs.forEach((log: any) => {
2097
+ callback(log.args as any);
2098
+ });
2099
+ },
2100
+ }) as () => void;
2101
+ },
2102
+ /**
2103
+ * Watch Paused events
2104
+ * @param callback Function to call when event is emitted
2105
+ * @param filter Optional filter for indexed parameters
2106
+ * @returns Unwatch function to stop listening
2107
+ */
2108
+ Paused: (callback: (event: { account: `0x${string}` }) => void) => {
2109
+ return this.publicClient.watchContractEvent({
2110
+ address: this.contractAddress,
2111
+ abi: PendleSUSDESY_jsonAbi,
2112
+ eventName: 'Paused',
2113
+
2114
+ onLogs: (logs: any[]) => {
2115
+ logs.forEach((log: any) => {
2116
+ callback(log.args as any);
2117
+ });
2118
+ },
2119
+ }) as () => void;
2120
+ },
2121
+ /**
2122
+ * Watch Redeem events
2123
+ * @param callback Function to call when event is emitted
2124
+ * @param filter Optional filter for indexed parameters
2125
+ * @returns Unwatch function to stop listening
2126
+ */
2127
+ Redeem: (callback: (event: { caller: `0x${string}`; receiver: `0x${string}`; tokenOut: `0x${string}`; amountSyToRedeem: bigint; amountTokenOut: bigint }) => void, filter?: { caller: `0x${string}`; receiver: `0x${string}`; tokenOut: `0x${string}` }) => {
2128
+ return this.publicClient.watchContractEvent({
2129
+ address: this.contractAddress,
2130
+ abi: PendleSUSDESY_jsonAbi,
2131
+ eventName: 'Redeem',
2132
+ args: filter,
2133
+ onLogs: (logs: any[]) => {
2134
+ logs.forEach((log: any) => {
2135
+ callback(log.args as any);
2136
+ });
2137
+ },
2138
+ }) as () => void;
2139
+ },
2140
+ /**
2141
+ * Watch SupplyCapUpdated events
2142
+ * @param callback Function to call when event is emitted
2143
+ * @param filter Optional filter for indexed parameters
2144
+ * @returns Unwatch function to stop listening
2145
+ */
2146
+ SupplyCapUpdated: (callback: (event: { newSupplyCap: bigint }) => void) => {
2147
+ return this.publicClient.watchContractEvent({
2148
+ address: this.contractAddress,
2149
+ abi: PendleSUSDESY_jsonAbi,
2150
+ eventName: 'SupplyCapUpdated',
2151
+
2152
+ onLogs: (logs: any[]) => {
2153
+ logs.forEach((log: any) => {
2154
+ callback(log.args as any);
2155
+ });
2156
+ },
2157
+ }) as () => void;
2158
+ },
2159
+ /**
2160
+ * Watch Transfer events
2161
+ * @param callback Function to call when event is emitted
2162
+ * @param filter Optional filter for indexed parameters
2163
+ * @returns Unwatch function to stop listening
2164
+ */
2165
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
2166
+ return this.publicClient.watchContractEvent({
2167
+ address: this.contractAddress,
2168
+ abi: PendleSUSDESY_jsonAbi,
2169
+ eventName: 'Transfer',
2170
+ args: filter,
2171
+ onLogs: (logs: any[]) => {
2172
+ logs.forEach((log: any) => {
2173
+ callback(log.args as any);
2174
+ });
2175
+ },
2176
+ }) as () => void;
2177
+ },
2178
+ /**
2179
+ * Watch Unpaused events
2180
+ * @param callback Function to call when event is emitted
2181
+ * @param filter Optional filter for indexed parameters
2182
+ * @returns Unwatch function to stop listening
2183
+ */
2184
+ Unpaused: (callback: (event: { account: `0x${string}` }) => void) => {
2185
+ return this.publicClient.watchContractEvent({
2186
+ address: this.contractAddress,
2187
+ abi: PendleSUSDESY_jsonAbi,
2188
+ eventName: 'Unpaused',
2189
+
2190
+ onLogs: (logs: any[]) => {
2191
+ logs.forEach((log: any) => {
2192
+ callback(log.args as any);
2193
+ });
2194
+ },
2195
+ }) as () => void;
2196
+ }
2197
+ };
2198
+ }
2199
+ }