@gitmyabi/eusd 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2799 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * ThrottleLib.Params struct type
7
+ */
8
+ export type ThrottleLib_Params = {
9
+ amtRate: bigint;
10
+ pctRate: bigint;
11
+ };
12
+ /**
13
+ * RTokenP1_json ABI
14
+ *
15
+ * This ABI is typed using viem's type system for full type safety.
16
+ */
17
+ export const RTokenP1_jsonAbi = [
18
+ {
19
+ "inputs": [],
20
+ "name": "UIntOutOfBounds",
21
+ "type": "error"
22
+ },
23
+ {
24
+ "anonymous": false,
25
+ "inputs": [
26
+ {
27
+ "indexed": false,
28
+ "internalType": "address",
29
+ "name": "previousAdmin",
30
+ "type": "address"
31
+ },
32
+ {
33
+ "indexed": false,
34
+ "internalType": "address",
35
+ "name": "newAdmin",
36
+ "type": "address"
37
+ }
38
+ ],
39
+ "name": "AdminChanged",
40
+ "type": "event"
41
+ },
42
+ {
43
+ "anonymous": false,
44
+ "inputs": [
45
+ {
46
+ "indexed": true,
47
+ "internalType": "address",
48
+ "name": "owner",
49
+ "type": "address"
50
+ },
51
+ {
52
+ "indexed": true,
53
+ "internalType": "address",
54
+ "name": "spender",
55
+ "type": "address"
56
+ },
57
+ {
58
+ "indexed": false,
59
+ "internalType": "uint256",
60
+ "name": "value",
61
+ "type": "uint256"
62
+ }
63
+ ],
64
+ "name": "Approval",
65
+ "type": "event"
66
+ },
67
+ {
68
+ "anonymous": false,
69
+ "inputs": [
70
+ {
71
+ "indexed": false,
72
+ "internalType": "uint192",
73
+ "name": "oldBasketsNeeded",
74
+ "type": "uint192"
75
+ },
76
+ {
77
+ "indexed": false,
78
+ "internalType": "uint192",
79
+ "name": "newBasketsNeeded",
80
+ "type": "uint192"
81
+ }
82
+ ],
83
+ "name": "BasketsNeededChanged",
84
+ "type": "event"
85
+ },
86
+ {
87
+ "anonymous": false,
88
+ "inputs": [
89
+ {
90
+ "indexed": true,
91
+ "internalType": "address",
92
+ "name": "beacon",
93
+ "type": "address"
94
+ }
95
+ ],
96
+ "name": "BeaconUpgraded",
97
+ "type": "event"
98
+ },
99
+ {
100
+ "anonymous": false,
101
+ "inputs": [],
102
+ "name": "EIP712DomainChanged",
103
+ "type": "event"
104
+ },
105
+ {
106
+ "anonymous": false,
107
+ "inputs": [
108
+ {
109
+ "indexed": false,
110
+ "internalType": "uint8",
111
+ "name": "version",
112
+ "type": "uint8"
113
+ }
114
+ ],
115
+ "name": "Initialized",
116
+ "type": "event"
117
+ },
118
+ {
119
+ "anonymous": false,
120
+ "inputs": [
121
+ {
122
+ "indexed": true,
123
+ "internalType": "address",
124
+ "name": "issuer",
125
+ "type": "address"
126
+ },
127
+ {
128
+ "indexed": true,
129
+ "internalType": "address",
130
+ "name": "recipient",
131
+ "type": "address"
132
+ },
133
+ {
134
+ "indexed": false,
135
+ "internalType": "uint256",
136
+ "name": "amount",
137
+ "type": "uint256"
138
+ },
139
+ {
140
+ "indexed": false,
141
+ "internalType": "uint192",
142
+ "name": "baskets",
143
+ "type": "uint192"
144
+ }
145
+ ],
146
+ "name": "Issuance",
147
+ "type": "event"
148
+ },
149
+ {
150
+ "anonymous": false,
151
+ "inputs": [
152
+ {
153
+ "components": [
154
+ {
155
+ "internalType": "uint256",
156
+ "name": "amtRate",
157
+ "type": "uint256"
158
+ },
159
+ {
160
+ "internalType": "uint192",
161
+ "name": "pctRate",
162
+ "type": "uint192"
163
+ }
164
+ ],
165
+ "indexed": false,
166
+ "internalType": "struct ThrottleLib.Params",
167
+ "name": "oldVal",
168
+ "type": "tuple"
169
+ },
170
+ {
171
+ "components": [
172
+ {
173
+ "internalType": "uint256",
174
+ "name": "amtRate",
175
+ "type": "uint256"
176
+ },
177
+ {
178
+ "internalType": "uint192",
179
+ "name": "pctRate",
180
+ "type": "uint192"
181
+ }
182
+ ],
183
+ "indexed": false,
184
+ "internalType": "struct ThrottleLib.Params",
185
+ "name": "newVal",
186
+ "type": "tuple"
187
+ }
188
+ ],
189
+ "name": "IssuanceThrottleSet",
190
+ "type": "event"
191
+ },
192
+ {
193
+ "anonymous": false,
194
+ "inputs": [
195
+ {
196
+ "indexed": true,
197
+ "internalType": "string",
198
+ "name": "oldVal",
199
+ "type": "string"
200
+ },
201
+ {
202
+ "indexed": false,
203
+ "internalType": "string",
204
+ "name": "newVal",
205
+ "type": "string"
206
+ }
207
+ ],
208
+ "name": "MandateSet",
209
+ "type": "event"
210
+ },
211
+ {
212
+ "anonymous": false,
213
+ "inputs": [
214
+ {
215
+ "indexed": false,
216
+ "internalType": "uint256",
217
+ "name": "amount",
218
+ "type": "uint256"
219
+ }
220
+ ],
221
+ "name": "Melted",
222
+ "type": "event"
223
+ },
224
+ {
225
+ "anonymous": false,
226
+ "inputs": [
227
+ {
228
+ "indexed": true,
229
+ "internalType": "address",
230
+ "name": "redeemer",
231
+ "type": "address"
232
+ },
233
+ {
234
+ "indexed": true,
235
+ "internalType": "address",
236
+ "name": "recipient",
237
+ "type": "address"
238
+ },
239
+ {
240
+ "indexed": false,
241
+ "internalType": "uint256",
242
+ "name": "amount",
243
+ "type": "uint256"
244
+ },
245
+ {
246
+ "indexed": false,
247
+ "internalType": "uint192",
248
+ "name": "baskets",
249
+ "type": "uint192"
250
+ }
251
+ ],
252
+ "name": "Redemption",
253
+ "type": "event"
254
+ },
255
+ {
256
+ "anonymous": false,
257
+ "inputs": [
258
+ {
259
+ "components": [
260
+ {
261
+ "internalType": "uint256",
262
+ "name": "amtRate",
263
+ "type": "uint256"
264
+ },
265
+ {
266
+ "internalType": "uint192",
267
+ "name": "pctRate",
268
+ "type": "uint192"
269
+ }
270
+ ],
271
+ "indexed": false,
272
+ "internalType": "struct ThrottleLib.Params",
273
+ "name": "oldVal",
274
+ "type": "tuple"
275
+ },
276
+ {
277
+ "components": [
278
+ {
279
+ "internalType": "uint256",
280
+ "name": "amtRate",
281
+ "type": "uint256"
282
+ },
283
+ {
284
+ "internalType": "uint192",
285
+ "name": "pctRate",
286
+ "type": "uint192"
287
+ }
288
+ ],
289
+ "indexed": false,
290
+ "internalType": "struct ThrottleLib.Params",
291
+ "name": "newVal",
292
+ "type": "tuple"
293
+ }
294
+ ],
295
+ "name": "RedemptionThrottleSet",
296
+ "type": "event"
297
+ },
298
+ {
299
+ "anonymous": false,
300
+ "inputs": [
301
+ {
302
+ "indexed": true,
303
+ "internalType": "address",
304
+ "name": "from",
305
+ "type": "address"
306
+ },
307
+ {
308
+ "indexed": true,
309
+ "internalType": "address",
310
+ "name": "to",
311
+ "type": "address"
312
+ },
313
+ {
314
+ "indexed": false,
315
+ "internalType": "uint256",
316
+ "name": "value",
317
+ "type": "uint256"
318
+ }
319
+ ],
320
+ "name": "Transfer",
321
+ "type": "event"
322
+ },
323
+ {
324
+ "anonymous": false,
325
+ "inputs": [
326
+ {
327
+ "indexed": true,
328
+ "internalType": "address",
329
+ "name": "implementation",
330
+ "type": "address"
331
+ }
332
+ ],
333
+ "name": "Upgraded",
334
+ "type": "event"
335
+ },
336
+ {
337
+ "inputs": [],
338
+ "name": "DOMAIN_SEPARATOR",
339
+ "outputs": [
340
+ {
341
+ "internalType": "bytes32",
342
+ "name": "",
343
+ "type": "bytes32"
344
+ }
345
+ ],
346
+ "stateMutability": "view",
347
+ "type": "function"
348
+ },
349
+ {
350
+ "inputs": [],
351
+ "name": "MAX_EXCHANGE_RATE",
352
+ "outputs": [
353
+ {
354
+ "internalType": "uint192",
355
+ "name": "",
356
+ "type": "uint192"
357
+ }
358
+ ],
359
+ "stateMutability": "view",
360
+ "type": "function"
361
+ },
362
+ {
363
+ "inputs": [],
364
+ "name": "MAX_THROTTLE_PCT_AMT",
365
+ "outputs": [
366
+ {
367
+ "internalType": "uint192",
368
+ "name": "",
369
+ "type": "uint192"
370
+ }
371
+ ],
372
+ "stateMutability": "view",
373
+ "type": "function"
374
+ },
375
+ {
376
+ "inputs": [],
377
+ "name": "MAX_THROTTLE_RATE_AMT",
378
+ "outputs": [
379
+ {
380
+ "internalType": "uint256",
381
+ "name": "",
382
+ "type": "uint256"
383
+ }
384
+ ],
385
+ "stateMutability": "view",
386
+ "type": "function"
387
+ },
388
+ {
389
+ "inputs": [],
390
+ "name": "MIN_EXCHANGE_RATE",
391
+ "outputs": [
392
+ {
393
+ "internalType": "uint192",
394
+ "name": "",
395
+ "type": "uint192"
396
+ }
397
+ ],
398
+ "stateMutability": "view",
399
+ "type": "function"
400
+ },
401
+ {
402
+ "inputs": [],
403
+ "name": "MIN_THROTTLE_DELTA",
404
+ "outputs": [
405
+ {
406
+ "internalType": "uint192",
407
+ "name": "",
408
+ "type": "uint192"
409
+ }
410
+ ],
411
+ "stateMutability": "view",
412
+ "type": "function"
413
+ },
414
+ {
415
+ "inputs": [],
416
+ "name": "MIN_THROTTLE_RATE_AMT",
417
+ "outputs": [
418
+ {
419
+ "internalType": "uint256",
420
+ "name": "",
421
+ "type": "uint256"
422
+ }
423
+ ],
424
+ "stateMutability": "view",
425
+ "type": "function"
426
+ },
427
+ {
428
+ "inputs": [
429
+ {
430
+ "internalType": "address",
431
+ "name": "owner",
432
+ "type": "address"
433
+ },
434
+ {
435
+ "internalType": "address",
436
+ "name": "spender",
437
+ "type": "address"
438
+ }
439
+ ],
440
+ "name": "allowance",
441
+ "outputs": [
442
+ {
443
+ "internalType": "uint256",
444
+ "name": "",
445
+ "type": "uint256"
446
+ }
447
+ ],
448
+ "stateMutability": "view",
449
+ "type": "function"
450
+ },
451
+ {
452
+ "inputs": [
453
+ {
454
+ "internalType": "address",
455
+ "name": "spender",
456
+ "type": "address"
457
+ },
458
+ {
459
+ "internalType": "uint256",
460
+ "name": "amount",
461
+ "type": "uint256"
462
+ }
463
+ ],
464
+ "name": "approve",
465
+ "outputs": [
466
+ {
467
+ "internalType": "bool",
468
+ "name": "",
469
+ "type": "bool"
470
+ }
471
+ ],
472
+ "stateMutability": "nonpayable",
473
+ "type": "function"
474
+ },
475
+ {
476
+ "inputs": [
477
+ {
478
+ "internalType": "address",
479
+ "name": "account",
480
+ "type": "address"
481
+ }
482
+ ],
483
+ "name": "balanceOf",
484
+ "outputs": [
485
+ {
486
+ "internalType": "uint256",
487
+ "name": "",
488
+ "type": "uint256"
489
+ }
490
+ ],
491
+ "stateMutability": "view",
492
+ "type": "function"
493
+ },
494
+ {
495
+ "inputs": [],
496
+ "name": "basketsNeeded",
497
+ "outputs": [
498
+ {
499
+ "internalType": "uint192",
500
+ "name": "",
501
+ "type": "uint192"
502
+ }
503
+ ],
504
+ "stateMutability": "view",
505
+ "type": "function"
506
+ },
507
+ {
508
+ "inputs": [],
509
+ "name": "decimals",
510
+ "outputs": [
511
+ {
512
+ "internalType": "uint8",
513
+ "name": "",
514
+ "type": "uint8"
515
+ }
516
+ ],
517
+ "stateMutability": "view",
518
+ "type": "function"
519
+ },
520
+ {
521
+ "inputs": [
522
+ {
523
+ "internalType": "address",
524
+ "name": "spender",
525
+ "type": "address"
526
+ },
527
+ {
528
+ "internalType": "uint256",
529
+ "name": "subtractedValue",
530
+ "type": "uint256"
531
+ }
532
+ ],
533
+ "name": "decreaseAllowance",
534
+ "outputs": [
535
+ {
536
+ "internalType": "bool",
537
+ "name": "",
538
+ "type": "bool"
539
+ }
540
+ ],
541
+ "stateMutability": "nonpayable",
542
+ "type": "function"
543
+ },
544
+ {
545
+ "inputs": [
546
+ {
547
+ "internalType": "uint256",
548
+ "name": "amount",
549
+ "type": "uint256"
550
+ }
551
+ ],
552
+ "name": "dissolve",
553
+ "outputs": [],
554
+ "stateMutability": "nonpayable",
555
+ "type": "function"
556
+ },
557
+ {
558
+ "inputs": [],
559
+ "name": "eip712Domain",
560
+ "outputs": [
561
+ {
562
+ "internalType": "bytes1",
563
+ "name": "fields",
564
+ "type": "bytes1"
565
+ },
566
+ {
567
+ "internalType": "string",
568
+ "name": "name",
569
+ "type": "string"
570
+ },
571
+ {
572
+ "internalType": "string",
573
+ "name": "version",
574
+ "type": "string"
575
+ },
576
+ {
577
+ "internalType": "uint256",
578
+ "name": "chainId",
579
+ "type": "uint256"
580
+ },
581
+ {
582
+ "internalType": "address",
583
+ "name": "verifyingContract",
584
+ "type": "address"
585
+ },
586
+ {
587
+ "internalType": "bytes32",
588
+ "name": "salt",
589
+ "type": "bytes32"
590
+ },
591
+ {
592
+ "internalType": "uint256[]",
593
+ "name": "extensions",
594
+ "type": "uint256[]"
595
+ }
596
+ ],
597
+ "stateMutability": "view",
598
+ "type": "function"
599
+ },
600
+ {
601
+ "inputs": [
602
+ {
603
+ "internalType": "address",
604
+ "name": "spender",
605
+ "type": "address"
606
+ },
607
+ {
608
+ "internalType": "uint256",
609
+ "name": "addedValue",
610
+ "type": "uint256"
611
+ }
612
+ ],
613
+ "name": "increaseAllowance",
614
+ "outputs": [
615
+ {
616
+ "internalType": "bool",
617
+ "name": "",
618
+ "type": "bool"
619
+ }
620
+ ],
621
+ "stateMutability": "nonpayable",
622
+ "type": "function"
623
+ },
624
+ {
625
+ "inputs": [
626
+ {
627
+ "internalType": "contract IMain",
628
+ "name": "main_",
629
+ "type": "address"
630
+ },
631
+ {
632
+ "internalType": "string",
633
+ "name": "name_",
634
+ "type": "string"
635
+ },
636
+ {
637
+ "internalType": "string",
638
+ "name": "symbol_",
639
+ "type": "string"
640
+ },
641
+ {
642
+ "internalType": "string",
643
+ "name": "mandate_",
644
+ "type": "string"
645
+ },
646
+ {
647
+ "components": [
648
+ {
649
+ "internalType": "uint256",
650
+ "name": "amtRate",
651
+ "type": "uint256"
652
+ },
653
+ {
654
+ "internalType": "uint192",
655
+ "name": "pctRate",
656
+ "type": "uint192"
657
+ }
658
+ ],
659
+ "internalType": "struct ThrottleLib.Params",
660
+ "name": "issuanceThrottleParams_",
661
+ "type": "tuple"
662
+ },
663
+ {
664
+ "components": [
665
+ {
666
+ "internalType": "uint256",
667
+ "name": "amtRate",
668
+ "type": "uint256"
669
+ },
670
+ {
671
+ "internalType": "uint192",
672
+ "name": "pctRate",
673
+ "type": "uint192"
674
+ }
675
+ ],
676
+ "internalType": "struct ThrottleLib.Params",
677
+ "name": "redemptionThrottleParams_",
678
+ "type": "tuple"
679
+ }
680
+ ],
681
+ "name": "init",
682
+ "outputs": [],
683
+ "stateMutability": "nonpayable",
684
+ "type": "function"
685
+ },
686
+ {
687
+ "inputs": [],
688
+ "name": "issuanceAvailable",
689
+ "outputs": [
690
+ {
691
+ "internalType": "uint256",
692
+ "name": "",
693
+ "type": "uint256"
694
+ }
695
+ ],
696
+ "stateMutability": "view",
697
+ "type": "function"
698
+ },
699
+ {
700
+ "inputs": [],
701
+ "name": "issuanceThrottleParams",
702
+ "outputs": [
703
+ {
704
+ "components": [
705
+ {
706
+ "internalType": "uint256",
707
+ "name": "amtRate",
708
+ "type": "uint256"
709
+ },
710
+ {
711
+ "internalType": "uint192",
712
+ "name": "pctRate",
713
+ "type": "uint192"
714
+ }
715
+ ],
716
+ "internalType": "struct ThrottleLib.Params",
717
+ "name": "",
718
+ "type": "tuple"
719
+ }
720
+ ],
721
+ "stateMutability": "view",
722
+ "type": "function"
723
+ },
724
+ {
725
+ "inputs": [
726
+ {
727
+ "internalType": "uint256",
728
+ "name": "amount",
729
+ "type": "uint256"
730
+ }
731
+ ],
732
+ "name": "issue",
733
+ "outputs": [],
734
+ "stateMutability": "nonpayable",
735
+ "type": "function"
736
+ },
737
+ {
738
+ "inputs": [
739
+ {
740
+ "internalType": "address",
741
+ "name": "recipient",
742
+ "type": "address"
743
+ },
744
+ {
745
+ "internalType": "uint256",
746
+ "name": "amount",
747
+ "type": "uint256"
748
+ }
749
+ ],
750
+ "name": "issueTo",
751
+ "outputs": [],
752
+ "stateMutability": "nonpayable",
753
+ "type": "function"
754
+ },
755
+ {
756
+ "inputs": [],
757
+ "name": "main",
758
+ "outputs": [
759
+ {
760
+ "internalType": "contract IMain",
761
+ "name": "",
762
+ "type": "address"
763
+ }
764
+ ],
765
+ "stateMutability": "view",
766
+ "type": "function"
767
+ },
768
+ {
769
+ "inputs": [],
770
+ "name": "mandate",
771
+ "outputs": [
772
+ {
773
+ "internalType": "string",
774
+ "name": "",
775
+ "type": "string"
776
+ }
777
+ ],
778
+ "stateMutability": "view",
779
+ "type": "function"
780
+ },
781
+ {
782
+ "inputs": [
783
+ {
784
+ "internalType": "uint256",
785
+ "name": "amtRToken",
786
+ "type": "uint256"
787
+ }
788
+ ],
789
+ "name": "melt",
790
+ "outputs": [],
791
+ "stateMutability": "nonpayable",
792
+ "type": "function"
793
+ },
794
+ {
795
+ "inputs": [
796
+ {
797
+ "internalType": "uint192",
798
+ "name": "baskets",
799
+ "type": "uint192"
800
+ }
801
+ ],
802
+ "name": "mint",
803
+ "outputs": [],
804
+ "stateMutability": "nonpayable",
805
+ "type": "function"
806
+ },
807
+ {
808
+ "inputs": [
809
+ {
810
+ "internalType": "contract IERC20",
811
+ "name": "erc20",
812
+ "type": "address"
813
+ }
814
+ ],
815
+ "name": "monetizeDonations",
816
+ "outputs": [],
817
+ "stateMutability": "nonpayable",
818
+ "type": "function"
819
+ },
820
+ {
821
+ "inputs": [],
822
+ "name": "name",
823
+ "outputs": [
824
+ {
825
+ "internalType": "string",
826
+ "name": "",
827
+ "type": "string"
828
+ }
829
+ ],
830
+ "stateMutability": "view",
831
+ "type": "function"
832
+ },
833
+ {
834
+ "inputs": [
835
+ {
836
+ "internalType": "address",
837
+ "name": "owner",
838
+ "type": "address"
839
+ }
840
+ ],
841
+ "name": "nonces",
842
+ "outputs": [
843
+ {
844
+ "internalType": "uint256",
845
+ "name": "",
846
+ "type": "uint256"
847
+ }
848
+ ],
849
+ "stateMutability": "view",
850
+ "type": "function"
851
+ },
852
+ {
853
+ "inputs": [
854
+ {
855
+ "internalType": "address",
856
+ "name": "owner",
857
+ "type": "address"
858
+ },
859
+ {
860
+ "internalType": "address",
861
+ "name": "spender",
862
+ "type": "address"
863
+ },
864
+ {
865
+ "internalType": "uint256",
866
+ "name": "value",
867
+ "type": "uint256"
868
+ },
869
+ {
870
+ "internalType": "uint256",
871
+ "name": "deadline",
872
+ "type": "uint256"
873
+ },
874
+ {
875
+ "internalType": "uint8",
876
+ "name": "v",
877
+ "type": "uint8"
878
+ },
879
+ {
880
+ "internalType": "bytes32",
881
+ "name": "r",
882
+ "type": "bytes32"
883
+ },
884
+ {
885
+ "internalType": "bytes32",
886
+ "name": "s",
887
+ "type": "bytes32"
888
+ }
889
+ ],
890
+ "name": "permit",
891
+ "outputs": [],
892
+ "stateMutability": "nonpayable",
893
+ "type": "function"
894
+ },
895
+ {
896
+ "inputs": [],
897
+ "name": "proxiableUUID",
898
+ "outputs": [
899
+ {
900
+ "internalType": "bytes32",
901
+ "name": "",
902
+ "type": "bytes32"
903
+ }
904
+ ],
905
+ "stateMutability": "view",
906
+ "type": "function"
907
+ },
908
+ {
909
+ "inputs": [
910
+ {
911
+ "internalType": "uint256",
912
+ "name": "amount",
913
+ "type": "uint256"
914
+ }
915
+ ],
916
+ "name": "redeem",
917
+ "outputs": [],
918
+ "stateMutability": "nonpayable",
919
+ "type": "function"
920
+ },
921
+ {
922
+ "inputs": [
923
+ {
924
+ "internalType": "address",
925
+ "name": "recipient",
926
+ "type": "address"
927
+ },
928
+ {
929
+ "internalType": "uint256",
930
+ "name": "amount",
931
+ "type": "uint256"
932
+ },
933
+ {
934
+ "internalType": "uint48[]",
935
+ "name": "basketNonces",
936
+ "type": "uint48[]"
937
+ },
938
+ {
939
+ "internalType": "uint192[]",
940
+ "name": "portions",
941
+ "type": "uint192[]"
942
+ },
943
+ {
944
+ "internalType": "address[]",
945
+ "name": "expectedERC20sOut",
946
+ "type": "address[]"
947
+ },
948
+ {
949
+ "internalType": "uint256[]",
950
+ "name": "minAmounts",
951
+ "type": "uint256[]"
952
+ }
953
+ ],
954
+ "name": "redeemCustom",
955
+ "outputs": [],
956
+ "stateMutability": "nonpayable",
957
+ "type": "function"
958
+ },
959
+ {
960
+ "inputs": [
961
+ {
962
+ "internalType": "address",
963
+ "name": "recipient",
964
+ "type": "address"
965
+ },
966
+ {
967
+ "internalType": "uint256",
968
+ "name": "amount",
969
+ "type": "uint256"
970
+ }
971
+ ],
972
+ "name": "redeemTo",
973
+ "outputs": [],
974
+ "stateMutability": "nonpayable",
975
+ "type": "function"
976
+ },
977
+ {
978
+ "inputs": [],
979
+ "name": "redemptionAvailable",
980
+ "outputs": [
981
+ {
982
+ "internalType": "uint256",
983
+ "name": "available",
984
+ "type": "uint256"
985
+ }
986
+ ],
987
+ "stateMutability": "view",
988
+ "type": "function"
989
+ },
990
+ {
991
+ "inputs": [],
992
+ "name": "redemptionThrottleParams",
993
+ "outputs": [
994
+ {
995
+ "components": [
996
+ {
997
+ "internalType": "uint256",
998
+ "name": "amtRate",
999
+ "type": "uint256"
1000
+ },
1001
+ {
1002
+ "internalType": "uint192",
1003
+ "name": "pctRate",
1004
+ "type": "uint192"
1005
+ }
1006
+ ],
1007
+ "internalType": "struct ThrottleLib.Params",
1008
+ "name": "",
1009
+ "type": "tuple"
1010
+ }
1011
+ ],
1012
+ "stateMutability": "view",
1013
+ "type": "function"
1014
+ },
1015
+ {
1016
+ "inputs": [
1017
+ {
1018
+ "internalType": "uint192",
1019
+ "name": "basketsNeeded_",
1020
+ "type": "uint192"
1021
+ }
1022
+ ],
1023
+ "name": "setBasketsNeeded",
1024
+ "outputs": [],
1025
+ "stateMutability": "nonpayable",
1026
+ "type": "function"
1027
+ },
1028
+ {
1029
+ "inputs": [
1030
+ {
1031
+ "components": [
1032
+ {
1033
+ "internalType": "uint256",
1034
+ "name": "amtRate",
1035
+ "type": "uint256"
1036
+ },
1037
+ {
1038
+ "internalType": "uint192",
1039
+ "name": "pctRate",
1040
+ "type": "uint192"
1041
+ }
1042
+ ],
1043
+ "internalType": "struct ThrottleLib.Params",
1044
+ "name": "params",
1045
+ "type": "tuple"
1046
+ }
1047
+ ],
1048
+ "name": "setIssuanceThrottleParams",
1049
+ "outputs": [],
1050
+ "stateMutability": "nonpayable",
1051
+ "type": "function"
1052
+ },
1053
+ {
1054
+ "inputs": [
1055
+ {
1056
+ "internalType": "string",
1057
+ "name": "mandate_",
1058
+ "type": "string"
1059
+ }
1060
+ ],
1061
+ "name": "setMandate",
1062
+ "outputs": [],
1063
+ "stateMutability": "nonpayable",
1064
+ "type": "function"
1065
+ },
1066
+ {
1067
+ "inputs": [
1068
+ {
1069
+ "components": [
1070
+ {
1071
+ "internalType": "uint256",
1072
+ "name": "amtRate",
1073
+ "type": "uint256"
1074
+ },
1075
+ {
1076
+ "internalType": "uint192",
1077
+ "name": "pctRate",
1078
+ "type": "uint192"
1079
+ }
1080
+ ],
1081
+ "internalType": "struct ThrottleLib.Params",
1082
+ "name": "params",
1083
+ "type": "tuple"
1084
+ }
1085
+ ],
1086
+ "name": "setRedemptionThrottleParams",
1087
+ "outputs": [],
1088
+ "stateMutability": "nonpayable",
1089
+ "type": "function"
1090
+ },
1091
+ {
1092
+ "inputs": [
1093
+ {
1094
+ "components": [
1095
+ {
1096
+ "internalType": "uint256",
1097
+ "name": "amtRate",
1098
+ "type": "uint256"
1099
+ },
1100
+ {
1101
+ "internalType": "uint192",
1102
+ "name": "pctRate",
1103
+ "type": "uint192"
1104
+ }
1105
+ ],
1106
+ "internalType": "struct ThrottleLib.Params",
1107
+ "name": "issuanceParams",
1108
+ "type": "tuple"
1109
+ },
1110
+ {
1111
+ "components": [
1112
+ {
1113
+ "internalType": "uint256",
1114
+ "name": "amtRate",
1115
+ "type": "uint256"
1116
+ },
1117
+ {
1118
+ "internalType": "uint192",
1119
+ "name": "pctRate",
1120
+ "type": "uint192"
1121
+ }
1122
+ ],
1123
+ "internalType": "struct ThrottleLib.Params",
1124
+ "name": "redemptionParams",
1125
+ "type": "tuple"
1126
+ }
1127
+ ],
1128
+ "name": "setThrottleParams",
1129
+ "outputs": [],
1130
+ "stateMutability": "nonpayable",
1131
+ "type": "function"
1132
+ },
1133
+ {
1134
+ "inputs": [],
1135
+ "name": "symbol",
1136
+ "outputs": [
1137
+ {
1138
+ "internalType": "string",
1139
+ "name": "",
1140
+ "type": "string"
1141
+ }
1142
+ ],
1143
+ "stateMutability": "view",
1144
+ "type": "function"
1145
+ },
1146
+ {
1147
+ "inputs": [],
1148
+ "name": "totalSupply",
1149
+ "outputs": [
1150
+ {
1151
+ "internalType": "uint256",
1152
+ "name": "",
1153
+ "type": "uint256"
1154
+ }
1155
+ ],
1156
+ "stateMutability": "view",
1157
+ "type": "function"
1158
+ },
1159
+ {
1160
+ "inputs": [
1161
+ {
1162
+ "internalType": "address",
1163
+ "name": "to",
1164
+ "type": "address"
1165
+ },
1166
+ {
1167
+ "internalType": "uint256",
1168
+ "name": "amount",
1169
+ "type": "uint256"
1170
+ }
1171
+ ],
1172
+ "name": "transfer",
1173
+ "outputs": [
1174
+ {
1175
+ "internalType": "bool",
1176
+ "name": "",
1177
+ "type": "bool"
1178
+ }
1179
+ ],
1180
+ "stateMutability": "nonpayable",
1181
+ "type": "function"
1182
+ },
1183
+ {
1184
+ "inputs": [
1185
+ {
1186
+ "internalType": "address",
1187
+ "name": "from",
1188
+ "type": "address"
1189
+ },
1190
+ {
1191
+ "internalType": "address",
1192
+ "name": "to",
1193
+ "type": "address"
1194
+ },
1195
+ {
1196
+ "internalType": "uint256",
1197
+ "name": "amount",
1198
+ "type": "uint256"
1199
+ }
1200
+ ],
1201
+ "name": "transferFrom",
1202
+ "outputs": [
1203
+ {
1204
+ "internalType": "bool",
1205
+ "name": "",
1206
+ "type": "bool"
1207
+ }
1208
+ ],
1209
+ "stateMutability": "nonpayable",
1210
+ "type": "function"
1211
+ },
1212
+ {
1213
+ "inputs": [
1214
+ {
1215
+ "internalType": "address",
1216
+ "name": "newImplementation",
1217
+ "type": "address"
1218
+ }
1219
+ ],
1220
+ "name": "upgradeTo",
1221
+ "outputs": [],
1222
+ "stateMutability": "nonpayable",
1223
+ "type": "function"
1224
+ },
1225
+ {
1226
+ "inputs": [
1227
+ {
1228
+ "internalType": "address",
1229
+ "name": "newImplementation",
1230
+ "type": "address"
1231
+ },
1232
+ {
1233
+ "internalType": "bytes",
1234
+ "name": "data",
1235
+ "type": "bytes"
1236
+ }
1237
+ ],
1238
+ "name": "upgradeToAndCall",
1239
+ "outputs": [],
1240
+ "stateMutability": "payable",
1241
+ "type": "function"
1242
+ },
1243
+ {
1244
+ "inputs": [],
1245
+ "name": "version",
1246
+ "outputs": [
1247
+ {
1248
+ "internalType": "string",
1249
+ "name": "",
1250
+ "type": "string"
1251
+ }
1252
+ ],
1253
+ "stateMutability": "pure",
1254
+ "type": "function"
1255
+ }
1256
+ ] as const satisfies Abi;
1257
+
1258
+ /**
1259
+ * Type-safe ABI for RTokenP1_json
1260
+ */
1261
+ export type RTokenP1_jsonAbi = typeof RTokenP1_jsonAbi;
1262
+
1263
+ /**
1264
+ * Contract instance type for RTokenP1_json
1265
+ */
1266
+ // Use any for contract type to avoid complex viem type issues
1267
+ // The runtime behavior is type-safe through viem's ABI typing
1268
+ export type RTokenP1_jsonContract = any;
1269
+
1270
+ /**
1271
+ * RTokenP1_json Contract Class
1272
+ *
1273
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1274
+ *
1275
+ * @example
1276
+ * ```typescript
1277
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1278
+ * import { mainnet } from 'viem/chains';
1279
+ * import { RTokenP1_json } from 'RTokenP1_json';
1280
+ *
1281
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1282
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1283
+ *
1284
+ * const contract = new RTokenP1_json('0x...', { publicClient, walletClient });
1285
+ *
1286
+ * // Read functions
1287
+ * const result = await contract.balanceOf('0x...');
1288
+ *
1289
+ * // Write functions
1290
+ * const hash = await contract.transfer('0x...', 1000n);
1291
+ *
1292
+ * // Simulate transactions (dry-run)
1293
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1294
+ * console.log('Gas estimate:', simulation.request.gas);
1295
+ *
1296
+ * // Watch events
1297
+ * const unwatch = contract.watch.Transfer((event) => {
1298
+ * console.log('Transfer event:', event);
1299
+ * });
1300
+ * ```
1301
+ */
1302
+ export class RTokenP1_json {
1303
+ private contract: RTokenP1_jsonContract;
1304
+ private contractAddress: Address;
1305
+ private publicClient: PublicClient;
1306
+
1307
+ constructor(
1308
+ address: Address,
1309
+ clients: {
1310
+ publicClient: PublicClient;
1311
+ walletClient?: WalletClient;
1312
+ }
1313
+ ) {
1314
+ this.contractAddress = address;
1315
+ this.publicClient = clients.publicClient;
1316
+ this.contract = getContract({
1317
+ address,
1318
+ abi: RTokenP1_jsonAbi,
1319
+ client: {
1320
+ public: clients.publicClient,
1321
+ wallet: clients.walletClient,
1322
+ },
1323
+ });
1324
+ }
1325
+
1326
+ /**
1327
+ * Get the contract address
1328
+ */
1329
+ get address(): Address {
1330
+ return this.contractAddress;
1331
+ }
1332
+
1333
+ /**
1334
+ * Get the underlying viem contract instance
1335
+ */
1336
+ getContract(): RTokenP1_jsonContract {
1337
+ return this.contract;
1338
+ }
1339
+
1340
+ /**
1341
+ * DOMAIN_SEPARATOR
1342
+ * view
1343
+ */
1344
+ async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
1345
+ return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
1346
+ }
1347
+
1348
+ /**
1349
+ * MAX_EXCHANGE_RATE
1350
+ * view
1351
+ */
1352
+ async MAX_EXCHANGE_RATE(): Promise<bigint> {
1353
+ return this.contract.read.MAX_EXCHANGE_RATE() as Promise<bigint>;
1354
+ }
1355
+
1356
+ /**
1357
+ * MAX_THROTTLE_PCT_AMT
1358
+ * view
1359
+ */
1360
+ async MAX_THROTTLE_PCT_AMT(): Promise<bigint> {
1361
+ return this.contract.read.MAX_THROTTLE_PCT_AMT() as Promise<bigint>;
1362
+ }
1363
+
1364
+ /**
1365
+ * MAX_THROTTLE_RATE_AMT
1366
+ * view
1367
+ */
1368
+ async MAX_THROTTLE_RATE_AMT(): Promise<bigint> {
1369
+ return this.contract.read.MAX_THROTTLE_RATE_AMT() as Promise<bigint>;
1370
+ }
1371
+
1372
+ /**
1373
+ * MIN_EXCHANGE_RATE
1374
+ * view
1375
+ */
1376
+ async MIN_EXCHANGE_RATE(): Promise<bigint> {
1377
+ return this.contract.read.MIN_EXCHANGE_RATE() as Promise<bigint>;
1378
+ }
1379
+
1380
+ /**
1381
+ * MIN_THROTTLE_DELTA
1382
+ * view
1383
+ */
1384
+ async MIN_THROTTLE_DELTA(): Promise<bigint> {
1385
+ return this.contract.read.MIN_THROTTLE_DELTA() as Promise<bigint>;
1386
+ }
1387
+
1388
+ /**
1389
+ * MIN_THROTTLE_RATE_AMT
1390
+ * view
1391
+ */
1392
+ async MIN_THROTTLE_RATE_AMT(): Promise<bigint> {
1393
+ return this.contract.read.MIN_THROTTLE_RATE_AMT() as Promise<bigint>;
1394
+ }
1395
+
1396
+ /**
1397
+ * allowance
1398
+ * view
1399
+ */
1400
+ async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
1401
+ return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
1402
+ }
1403
+
1404
+ /**
1405
+ * balanceOf
1406
+ * view
1407
+ */
1408
+ async balanceOf(account: `0x${string}`): Promise<bigint> {
1409
+ return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
1410
+ }
1411
+
1412
+ /**
1413
+ * basketsNeeded
1414
+ * view
1415
+ */
1416
+ async basketsNeeded(): Promise<bigint> {
1417
+ return this.contract.read.basketsNeeded() as Promise<bigint>;
1418
+ }
1419
+
1420
+ /**
1421
+ * decimals
1422
+ * view
1423
+ */
1424
+ async decimals(): Promise<bigint> {
1425
+ return this.contract.read.decimals() as Promise<bigint>;
1426
+ }
1427
+
1428
+ /**
1429
+ * eip712Domain
1430
+ * view
1431
+ */
1432
+ async eip712Domain(): Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]> {
1433
+ return this.contract.read.eip712Domain() as Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]>;
1434
+ }
1435
+
1436
+ /**
1437
+ * issuanceAvailable
1438
+ * view
1439
+ */
1440
+ async issuanceAvailable(): Promise<bigint> {
1441
+ return this.contract.read.issuanceAvailable() as Promise<bigint>;
1442
+ }
1443
+
1444
+ /**
1445
+ * issuanceThrottleParams
1446
+ * view
1447
+ */
1448
+ async issuanceThrottleParams(): Promise<ThrottleLib_Params> {
1449
+ return this.contract.read.issuanceThrottleParams() as Promise<ThrottleLib_Params>;
1450
+ }
1451
+
1452
+ /**
1453
+ * main
1454
+ * view
1455
+ */
1456
+ async main(): Promise<`0x${string}`> {
1457
+ return this.contract.read.main() as Promise<`0x${string}`>;
1458
+ }
1459
+
1460
+ /**
1461
+ * mandate
1462
+ * view
1463
+ */
1464
+ async mandate(): Promise<string> {
1465
+ return this.contract.read.mandate() as Promise<string>;
1466
+ }
1467
+
1468
+ /**
1469
+ * name
1470
+ * view
1471
+ */
1472
+ async name(): Promise<string> {
1473
+ return this.contract.read.name() as Promise<string>;
1474
+ }
1475
+
1476
+ /**
1477
+ * nonces
1478
+ * view
1479
+ */
1480
+ async nonces(owner: `0x${string}`): Promise<bigint> {
1481
+ return this.contract.read.nonces([owner] as const) as Promise<bigint>;
1482
+ }
1483
+
1484
+ /**
1485
+ * proxiableUUID
1486
+ * view
1487
+ */
1488
+ async proxiableUUID(): Promise<`0x${string}`> {
1489
+ return this.contract.read.proxiableUUID() as Promise<`0x${string}`>;
1490
+ }
1491
+
1492
+ /**
1493
+ * redemptionAvailable
1494
+ * view
1495
+ */
1496
+ async redemptionAvailable(): Promise<bigint> {
1497
+ return this.contract.read.redemptionAvailable() as Promise<bigint>;
1498
+ }
1499
+
1500
+ /**
1501
+ * redemptionThrottleParams
1502
+ * view
1503
+ */
1504
+ async redemptionThrottleParams(): Promise<ThrottleLib_Params> {
1505
+ return this.contract.read.redemptionThrottleParams() as Promise<ThrottleLib_Params>;
1506
+ }
1507
+
1508
+ /**
1509
+ * symbol
1510
+ * view
1511
+ */
1512
+ async symbol(): Promise<string> {
1513
+ return this.contract.read.symbol() as Promise<string>;
1514
+ }
1515
+
1516
+ /**
1517
+ * totalSupply
1518
+ * view
1519
+ */
1520
+ async totalSupply(): Promise<bigint> {
1521
+ return this.contract.read.totalSupply() as Promise<bigint>;
1522
+ }
1523
+
1524
+ /**
1525
+ * version
1526
+ * pure
1527
+ */
1528
+ async version(): Promise<string> {
1529
+ return this.contract.read.version() as Promise<string>;
1530
+ }
1531
+
1532
+ /**
1533
+ * approve
1534
+ * nonpayable
1535
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1536
+ */
1537
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
1538
+ accessList?: import('viem').AccessList;
1539
+ authorizationList?: import('viem').AuthorizationList;
1540
+ chain?: import('viem').Chain | null;
1541
+ dataSuffix?: `0x${string}`;
1542
+ gas?: bigint;
1543
+ gasPrice?: bigint;
1544
+ maxFeePerGas?: bigint;
1545
+ maxPriorityFeePerGas?: bigint;
1546
+ nonce?: number;
1547
+ value?: bigint;
1548
+ }): Promise<`0x${string}`> {
1549
+ if (!this.contract.write) {
1550
+ throw new Error('Wallet client is required for write operations');
1551
+ }
1552
+ return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
1553
+ }
1554
+
1555
+ /**
1556
+ * decreaseAllowance
1557
+ * nonpayable
1558
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1559
+ */
1560
+ async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
1561
+ accessList?: import('viem').AccessList;
1562
+ authorizationList?: import('viem').AuthorizationList;
1563
+ chain?: import('viem').Chain | null;
1564
+ dataSuffix?: `0x${string}`;
1565
+ gas?: bigint;
1566
+ gasPrice?: bigint;
1567
+ maxFeePerGas?: bigint;
1568
+ maxPriorityFeePerGas?: bigint;
1569
+ nonce?: number;
1570
+ value?: bigint;
1571
+ }): Promise<`0x${string}`> {
1572
+ if (!this.contract.write) {
1573
+ throw new Error('Wallet client is required for write operations');
1574
+ }
1575
+ return this.contract.write.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<`0x${string}`>;
1576
+ }
1577
+
1578
+ /**
1579
+ * dissolve
1580
+ * nonpayable
1581
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1582
+ */
1583
+ async dissolve(amount: bigint, options?: {
1584
+ accessList?: import('viem').AccessList;
1585
+ authorizationList?: import('viem').AuthorizationList;
1586
+ chain?: import('viem').Chain | null;
1587
+ dataSuffix?: `0x${string}`;
1588
+ gas?: bigint;
1589
+ gasPrice?: bigint;
1590
+ maxFeePerGas?: bigint;
1591
+ maxPriorityFeePerGas?: bigint;
1592
+ nonce?: number;
1593
+ value?: bigint;
1594
+ }): Promise<`0x${string}`> {
1595
+ if (!this.contract.write) {
1596
+ throw new Error('Wallet client is required for write operations');
1597
+ }
1598
+ return this.contract.write.dissolve([amount] as const, options) as Promise<`0x${string}`>;
1599
+ }
1600
+
1601
+ /**
1602
+ * increaseAllowance
1603
+ * nonpayable
1604
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1605
+ */
1606
+ async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
1607
+ accessList?: import('viem').AccessList;
1608
+ authorizationList?: import('viem').AuthorizationList;
1609
+ chain?: import('viem').Chain | null;
1610
+ dataSuffix?: `0x${string}`;
1611
+ gas?: bigint;
1612
+ gasPrice?: bigint;
1613
+ maxFeePerGas?: bigint;
1614
+ maxPriorityFeePerGas?: bigint;
1615
+ nonce?: number;
1616
+ value?: bigint;
1617
+ }): Promise<`0x${string}`> {
1618
+ if (!this.contract.write) {
1619
+ throw new Error('Wallet client is required for write operations');
1620
+ }
1621
+ return this.contract.write.increaseAllowance([spender, addedValue] as const, options) as Promise<`0x${string}`>;
1622
+ }
1623
+
1624
+ /**
1625
+ * init
1626
+ * nonpayable
1627
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1628
+ */
1629
+ async init(main_: `0x${string}`, name_: string, symbol_: string, mandate_: string, issuanceThrottleParams_: ThrottleLib_Params, redemptionThrottleParams_: ThrottleLib_Params, options?: {
1630
+ accessList?: import('viem').AccessList;
1631
+ authorizationList?: import('viem').AuthorizationList;
1632
+ chain?: import('viem').Chain | null;
1633
+ dataSuffix?: `0x${string}`;
1634
+ gas?: bigint;
1635
+ gasPrice?: bigint;
1636
+ maxFeePerGas?: bigint;
1637
+ maxPriorityFeePerGas?: bigint;
1638
+ nonce?: number;
1639
+ value?: bigint;
1640
+ }): Promise<`0x${string}`> {
1641
+ if (!this.contract.write) {
1642
+ throw new Error('Wallet client is required for write operations');
1643
+ }
1644
+ return this.contract.write.init([main_, name_, symbol_, mandate_, issuanceThrottleParams_, redemptionThrottleParams_] as const, options) as Promise<`0x${string}`>;
1645
+ }
1646
+
1647
+ /**
1648
+ * issue
1649
+ * nonpayable
1650
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1651
+ */
1652
+ async issue(amount: bigint, options?: {
1653
+ accessList?: import('viem').AccessList;
1654
+ authorizationList?: import('viem').AuthorizationList;
1655
+ chain?: import('viem').Chain | null;
1656
+ dataSuffix?: `0x${string}`;
1657
+ gas?: bigint;
1658
+ gasPrice?: bigint;
1659
+ maxFeePerGas?: bigint;
1660
+ maxPriorityFeePerGas?: bigint;
1661
+ nonce?: number;
1662
+ value?: bigint;
1663
+ }): Promise<`0x${string}`> {
1664
+ if (!this.contract.write) {
1665
+ throw new Error('Wallet client is required for write operations');
1666
+ }
1667
+ return this.contract.write.issue([amount] as const, options) as Promise<`0x${string}`>;
1668
+ }
1669
+
1670
+ /**
1671
+ * issueTo
1672
+ * nonpayable
1673
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1674
+ */
1675
+ async issueTo(recipient: `0x${string}`, amount: bigint, options?: {
1676
+ accessList?: import('viem').AccessList;
1677
+ authorizationList?: import('viem').AuthorizationList;
1678
+ chain?: import('viem').Chain | null;
1679
+ dataSuffix?: `0x${string}`;
1680
+ gas?: bigint;
1681
+ gasPrice?: bigint;
1682
+ maxFeePerGas?: bigint;
1683
+ maxPriorityFeePerGas?: bigint;
1684
+ nonce?: number;
1685
+ value?: bigint;
1686
+ }): Promise<`0x${string}`> {
1687
+ if (!this.contract.write) {
1688
+ throw new Error('Wallet client is required for write operations');
1689
+ }
1690
+ return this.contract.write.issueTo([recipient, amount] as const, options) as Promise<`0x${string}`>;
1691
+ }
1692
+
1693
+ /**
1694
+ * melt
1695
+ * nonpayable
1696
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1697
+ */
1698
+ async melt(amtRToken: bigint, options?: {
1699
+ accessList?: import('viem').AccessList;
1700
+ authorizationList?: import('viem').AuthorizationList;
1701
+ chain?: import('viem').Chain | null;
1702
+ dataSuffix?: `0x${string}`;
1703
+ gas?: bigint;
1704
+ gasPrice?: bigint;
1705
+ maxFeePerGas?: bigint;
1706
+ maxPriorityFeePerGas?: bigint;
1707
+ nonce?: number;
1708
+ value?: bigint;
1709
+ }): Promise<`0x${string}`> {
1710
+ if (!this.contract.write) {
1711
+ throw new Error('Wallet client is required for write operations');
1712
+ }
1713
+ return this.contract.write.melt([amtRToken] as const, options) as Promise<`0x${string}`>;
1714
+ }
1715
+
1716
+ /**
1717
+ * mint
1718
+ * nonpayable
1719
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1720
+ */
1721
+ async mint(baskets: bigint, options?: {
1722
+ accessList?: import('viem').AccessList;
1723
+ authorizationList?: import('viem').AuthorizationList;
1724
+ chain?: import('viem').Chain | null;
1725
+ dataSuffix?: `0x${string}`;
1726
+ gas?: bigint;
1727
+ gasPrice?: bigint;
1728
+ maxFeePerGas?: bigint;
1729
+ maxPriorityFeePerGas?: bigint;
1730
+ nonce?: number;
1731
+ value?: bigint;
1732
+ }): Promise<`0x${string}`> {
1733
+ if (!this.contract.write) {
1734
+ throw new Error('Wallet client is required for write operations');
1735
+ }
1736
+ return this.contract.write.mint([baskets] as const, options) as Promise<`0x${string}`>;
1737
+ }
1738
+
1739
+ /**
1740
+ * monetizeDonations
1741
+ * nonpayable
1742
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1743
+ */
1744
+ async monetizeDonations(erc20: `0x${string}`, options?: {
1745
+ accessList?: import('viem').AccessList;
1746
+ authorizationList?: import('viem').AuthorizationList;
1747
+ chain?: import('viem').Chain | null;
1748
+ dataSuffix?: `0x${string}`;
1749
+ gas?: bigint;
1750
+ gasPrice?: bigint;
1751
+ maxFeePerGas?: bigint;
1752
+ maxPriorityFeePerGas?: bigint;
1753
+ nonce?: number;
1754
+ value?: bigint;
1755
+ }): Promise<`0x${string}`> {
1756
+ if (!this.contract.write) {
1757
+ throw new Error('Wallet client is required for write operations');
1758
+ }
1759
+ return this.contract.write.monetizeDonations([erc20] as const, options) as Promise<`0x${string}`>;
1760
+ }
1761
+
1762
+ /**
1763
+ * permit
1764
+ * nonpayable
1765
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1766
+ */
1767
+ async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `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<`0x${string}`> {
1779
+ if (!this.contract.write) {
1780
+ throw new Error('Wallet client is required for write operations');
1781
+ }
1782
+ return this.contract.write.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<`0x${string}`>;
1783
+ }
1784
+
1785
+ /**
1786
+ * redeem
1787
+ * nonpayable
1788
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1789
+ */
1790
+ async redeem(amount: bigint, options?: {
1791
+ accessList?: import('viem').AccessList;
1792
+ authorizationList?: import('viem').AuthorizationList;
1793
+ chain?: import('viem').Chain | null;
1794
+ dataSuffix?: `0x${string}`;
1795
+ gas?: bigint;
1796
+ gasPrice?: bigint;
1797
+ maxFeePerGas?: bigint;
1798
+ maxPriorityFeePerGas?: bigint;
1799
+ nonce?: number;
1800
+ value?: bigint;
1801
+ }): Promise<`0x${string}`> {
1802
+ if (!this.contract.write) {
1803
+ throw new Error('Wallet client is required for write operations');
1804
+ }
1805
+ return this.contract.write.redeem([amount] as const, options) as Promise<`0x${string}`>;
1806
+ }
1807
+
1808
+ /**
1809
+ * redeemCustom
1810
+ * nonpayable
1811
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1812
+ */
1813
+ async redeemCustom(recipient: `0x${string}`, amount: bigint, basketNonces: bigint[], portions: bigint[], expectedERC20sOut: `0x${string}`[], minAmounts: bigint[], options?: {
1814
+ accessList?: import('viem').AccessList;
1815
+ authorizationList?: import('viem').AuthorizationList;
1816
+ chain?: import('viem').Chain | null;
1817
+ dataSuffix?: `0x${string}`;
1818
+ gas?: bigint;
1819
+ gasPrice?: bigint;
1820
+ maxFeePerGas?: bigint;
1821
+ maxPriorityFeePerGas?: bigint;
1822
+ nonce?: number;
1823
+ value?: bigint;
1824
+ }): Promise<`0x${string}`> {
1825
+ if (!this.contract.write) {
1826
+ throw new Error('Wallet client is required for write operations');
1827
+ }
1828
+ return this.contract.write.redeemCustom([recipient, amount, basketNonces, portions, expectedERC20sOut, minAmounts] as const, options) as Promise<`0x${string}`>;
1829
+ }
1830
+
1831
+ /**
1832
+ * redeemTo
1833
+ * nonpayable
1834
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1835
+ */
1836
+ async redeemTo(recipient: `0x${string}`, amount: bigint, options?: {
1837
+ accessList?: import('viem').AccessList;
1838
+ authorizationList?: import('viem').AuthorizationList;
1839
+ chain?: import('viem').Chain | null;
1840
+ dataSuffix?: `0x${string}`;
1841
+ gas?: bigint;
1842
+ gasPrice?: bigint;
1843
+ maxFeePerGas?: bigint;
1844
+ maxPriorityFeePerGas?: bigint;
1845
+ nonce?: number;
1846
+ value?: bigint;
1847
+ }): Promise<`0x${string}`> {
1848
+ if (!this.contract.write) {
1849
+ throw new Error('Wallet client is required for write operations');
1850
+ }
1851
+ return this.contract.write.redeemTo([recipient, amount] as const, options) as Promise<`0x${string}`>;
1852
+ }
1853
+
1854
+ /**
1855
+ * setBasketsNeeded
1856
+ * nonpayable
1857
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1858
+ */
1859
+ async setBasketsNeeded(basketsNeeded_: bigint, options?: {
1860
+ accessList?: import('viem').AccessList;
1861
+ authorizationList?: import('viem').AuthorizationList;
1862
+ chain?: import('viem').Chain | null;
1863
+ dataSuffix?: `0x${string}`;
1864
+ gas?: bigint;
1865
+ gasPrice?: bigint;
1866
+ maxFeePerGas?: bigint;
1867
+ maxPriorityFeePerGas?: bigint;
1868
+ nonce?: number;
1869
+ value?: bigint;
1870
+ }): Promise<`0x${string}`> {
1871
+ if (!this.contract.write) {
1872
+ throw new Error('Wallet client is required for write operations');
1873
+ }
1874
+ return this.contract.write.setBasketsNeeded([basketsNeeded_] as const, options) as Promise<`0x${string}`>;
1875
+ }
1876
+
1877
+ /**
1878
+ * setIssuanceThrottleParams
1879
+ * nonpayable
1880
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1881
+ */
1882
+ async setIssuanceThrottleParams(params: ThrottleLib_Params, options?: {
1883
+ accessList?: import('viem').AccessList;
1884
+ authorizationList?: import('viem').AuthorizationList;
1885
+ chain?: import('viem').Chain | null;
1886
+ dataSuffix?: `0x${string}`;
1887
+ gas?: bigint;
1888
+ gasPrice?: bigint;
1889
+ maxFeePerGas?: bigint;
1890
+ maxPriorityFeePerGas?: bigint;
1891
+ nonce?: number;
1892
+ value?: bigint;
1893
+ }): Promise<`0x${string}`> {
1894
+ if (!this.contract.write) {
1895
+ throw new Error('Wallet client is required for write operations');
1896
+ }
1897
+ return this.contract.write.setIssuanceThrottleParams([params] as const, options) as Promise<`0x${string}`>;
1898
+ }
1899
+
1900
+ /**
1901
+ * setMandate
1902
+ * nonpayable
1903
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1904
+ */
1905
+ async setMandate(mandate_: string, options?: {
1906
+ accessList?: import('viem').AccessList;
1907
+ authorizationList?: import('viem').AuthorizationList;
1908
+ chain?: import('viem').Chain | null;
1909
+ dataSuffix?: `0x${string}`;
1910
+ gas?: bigint;
1911
+ gasPrice?: bigint;
1912
+ maxFeePerGas?: bigint;
1913
+ maxPriorityFeePerGas?: bigint;
1914
+ nonce?: number;
1915
+ value?: bigint;
1916
+ }): Promise<`0x${string}`> {
1917
+ if (!this.contract.write) {
1918
+ throw new Error('Wallet client is required for write operations');
1919
+ }
1920
+ return this.contract.write.setMandate([mandate_] as const, options) as Promise<`0x${string}`>;
1921
+ }
1922
+
1923
+ /**
1924
+ * setRedemptionThrottleParams
1925
+ * nonpayable
1926
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1927
+ */
1928
+ async setRedemptionThrottleParams(params: ThrottleLib_Params, options?: {
1929
+ accessList?: import('viem').AccessList;
1930
+ authorizationList?: import('viem').AuthorizationList;
1931
+ chain?: import('viem').Chain | null;
1932
+ dataSuffix?: `0x${string}`;
1933
+ gas?: bigint;
1934
+ gasPrice?: bigint;
1935
+ maxFeePerGas?: bigint;
1936
+ maxPriorityFeePerGas?: bigint;
1937
+ nonce?: number;
1938
+ value?: bigint;
1939
+ }): Promise<`0x${string}`> {
1940
+ if (!this.contract.write) {
1941
+ throw new Error('Wallet client is required for write operations');
1942
+ }
1943
+ return this.contract.write.setRedemptionThrottleParams([params] as const, options) as Promise<`0x${string}`>;
1944
+ }
1945
+
1946
+ /**
1947
+ * setThrottleParams
1948
+ * nonpayable
1949
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1950
+ */
1951
+ async setThrottleParams(issuanceParams: ThrottleLib_Params, redemptionParams: ThrottleLib_Params, options?: {
1952
+ accessList?: import('viem').AccessList;
1953
+ authorizationList?: import('viem').AuthorizationList;
1954
+ chain?: import('viem').Chain | null;
1955
+ dataSuffix?: `0x${string}`;
1956
+ gas?: bigint;
1957
+ gasPrice?: bigint;
1958
+ maxFeePerGas?: bigint;
1959
+ maxPriorityFeePerGas?: bigint;
1960
+ nonce?: number;
1961
+ value?: bigint;
1962
+ }): Promise<`0x${string}`> {
1963
+ if (!this.contract.write) {
1964
+ throw new Error('Wallet client is required for write operations');
1965
+ }
1966
+ return this.contract.write.setThrottleParams([issuanceParams, redemptionParams] as const, options) as Promise<`0x${string}`>;
1967
+ }
1968
+
1969
+ /**
1970
+ * transfer
1971
+ * nonpayable
1972
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1973
+ */
1974
+ async transfer(to: `0x${string}`, amount: bigint, options?: {
1975
+ accessList?: import('viem').AccessList;
1976
+ authorizationList?: import('viem').AuthorizationList;
1977
+ chain?: import('viem').Chain | null;
1978
+ dataSuffix?: `0x${string}`;
1979
+ gas?: bigint;
1980
+ gasPrice?: bigint;
1981
+ maxFeePerGas?: bigint;
1982
+ maxPriorityFeePerGas?: bigint;
1983
+ nonce?: number;
1984
+ value?: bigint;
1985
+ }): Promise<`0x${string}`> {
1986
+ if (!this.contract.write) {
1987
+ throw new Error('Wallet client is required for write operations');
1988
+ }
1989
+ return this.contract.write.transfer([to, amount] as const, options) as Promise<`0x${string}`>;
1990
+ }
1991
+
1992
+ /**
1993
+ * transferFrom
1994
+ * nonpayable
1995
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1996
+ */
1997
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
1998
+ accessList?: import('viem').AccessList;
1999
+ authorizationList?: import('viem').AuthorizationList;
2000
+ chain?: import('viem').Chain | null;
2001
+ dataSuffix?: `0x${string}`;
2002
+ gas?: bigint;
2003
+ gasPrice?: bigint;
2004
+ maxFeePerGas?: bigint;
2005
+ maxPriorityFeePerGas?: bigint;
2006
+ nonce?: number;
2007
+ value?: bigint;
2008
+ }): Promise<`0x${string}`> {
2009
+ if (!this.contract.write) {
2010
+ throw new Error('Wallet client is required for write operations');
2011
+ }
2012
+ return this.contract.write.transferFrom([from, to, amount] as const, options) as Promise<`0x${string}`>;
2013
+ }
2014
+
2015
+ /**
2016
+ * upgradeTo
2017
+ * nonpayable
2018
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2019
+ */
2020
+ async upgradeTo(newImplementation: `0x${string}`, options?: {
2021
+ accessList?: import('viem').AccessList;
2022
+ authorizationList?: import('viem').AuthorizationList;
2023
+ chain?: import('viem').Chain | null;
2024
+ dataSuffix?: `0x${string}`;
2025
+ gas?: bigint;
2026
+ gasPrice?: bigint;
2027
+ maxFeePerGas?: bigint;
2028
+ maxPriorityFeePerGas?: bigint;
2029
+ nonce?: number;
2030
+ value?: bigint;
2031
+ }): Promise<`0x${string}`> {
2032
+ if (!this.contract.write) {
2033
+ throw new Error('Wallet client is required for write operations');
2034
+ }
2035
+ return this.contract.write.upgradeTo([newImplementation] as const, options) as Promise<`0x${string}`>;
2036
+ }
2037
+
2038
+ /**
2039
+ * upgradeToAndCall
2040
+ * payable
2041
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2042
+ */
2043
+ async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
2044
+ accessList?: import('viem').AccessList;
2045
+ authorizationList?: import('viem').AuthorizationList;
2046
+ chain?: import('viem').Chain | null;
2047
+ dataSuffix?: `0x${string}`;
2048
+ gas?: bigint;
2049
+ gasPrice?: bigint;
2050
+ maxFeePerGas?: bigint;
2051
+ maxPriorityFeePerGas?: bigint;
2052
+ nonce?: number;
2053
+ value?: bigint;
2054
+ }): Promise<`0x${string}`> {
2055
+ if (!this.contract.write) {
2056
+ throw new Error('Wallet client is required for write operations');
2057
+ }
2058
+ return this.contract.write.upgradeToAndCall([newImplementation, data] as const, options) as Promise<`0x${string}`>;
2059
+ }
2060
+
2061
+
2062
+
2063
+ /**
2064
+ * Simulate contract write operations (dry-run without sending transaction)
2065
+ *
2066
+ * @example
2067
+ * const result = await contract.simulate.transfer('0x...', 1000n);
2068
+ * console.log('Gas estimate:', result.request.gas);
2069
+ * console.log('Would succeed:', result.result);
2070
+ */
2071
+ get simulate() {
2072
+ const contract = this.contract;
2073
+ if (!contract.simulate) {
2074
+ throw new Error('Public client is required for simulation');
2075
+ }
2076
+ return {
2077
+ /**
2078
+ * Simulate approve
2079
+ * Returns gas estimate and result without sending transaction
2080
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2081
+ */
2082
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
2083
+ accessList?: import('viem').AccessList;
2084
+ authorizationList?: import('viem').AuthorizationList;
2085
+ chain?: import('viem').Chain | null;
2086
+ dataSuffix?: `0x${string}`;
2087
+ gas?: bigint;
2088
+ gasPrice?: bigint;
2089
+ maxFeePerGas?: bigint;
2090
+ maxPriorityFeePerGas?: bigint;
2091
+ nonce?: number;
2092
+ value?: bigint;
2093
+ }): Promise<boolean> {
2094
+ return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
2095
+ },
2096
+ /**
2097
+ * Simulate decreaseAllowance
2098
+ * Returns gas estimate and result without sending transaction
2099
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2100
+ */
2101
+ async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
2102
+ accessList?: import('viem').AccessList;
2103
+ authorizationList?: import('viem').AuthorizationList;
2104
+ chain?: import('viem').Chain | null;
2105
+ dataSuffix?: `0x${string}`;
2106
+ gas?: bigint;
2107
+ gasPrice?: bigint;
2108
+ maxFeePerGas?: bigint;
2109
+ maxPriorityFeePerGas?: bigint;
2110
+ nonce?: number;
2111
+ value?: bigint;
2112
+ }): Promise<boolean> {
2113
+ return contract.simulate.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<boolean>;
2114
+ },
2115
+ /**
2116
+ * Simulate dissolve
2117
+ * Returns gas estimate and result without sending transaction
2118
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2119
+ */
2120
+ async dissolve(amount: bigint, options?: {
2121
+ accessList?: import('viem').AccessList;
2122
+ authorizationList?: import('viem').AuthorizationList;
2123
+ chain?: import('viem').Chain | null;
2124
+ dataSuffix?: `0x${string}`;
2125
+ gas?: bigint;
2126
+ gasPrice?: bigint;
2127
+ maxFeePerGas?: bigint;
2128
+ maxPriorityFeePerGas?: bigint;
2129
+ nonce?: number;
2130
+ value?: bigint;
2131
+ }): Promise<void> {
2132
+ return contract.simulate.dissolve([amount] as const, options) as Promise<void>;
2133
+ },
2134
+ /**
2135
+ * Simulate increaseAllowance
2136
+ * Returns gas estimate and result without sending transaction
2137
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2138
+ */
2139
+ async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
2140
+ accessList?: import('viem').AccessList;
2141
+ authorizationList?: import('viem').AuthorizationList;
2142
+ chain?: import('viem').Chain | null;
2143
+ dataSuffix?: `0x${string}`;
2144
+ gas?: bigint;
2145
+ gasPrice?: bigint;
2146
+ maxFeePerGas?: bigint;
2147
+ maxPriorityFeePerGas?: bigint;
2148
+ nonce?: number;
2149
+ value?: bigint;
2150
+ }): Promise<boolean> {
2151
+ return contract.simulate.increaseAllowance([spender, addedValue] as const, options) as Promise<boolean>;
2152
+ },
2153
+ /**
2154
+ * Simulate init
2155
+ * Returns gas estimate and result without sending transaction
2156
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2157
+ */
2158
+ async init(main_: `0x${string}`, name_: string, symbol_: string, mandate_: string, issuanceThrottleParams_: ThrottleLib_Params, redemptionThrottleParams_: ThrottleLib_Params, options?: {
2159
+ accessList?: import('viem').AccessList;
2160
+ authorizationList?: import('viem').AuthorizationList;
2161
+ chain?: import('viem').Chain | null;
2162
+ dataSuffix?: `0x${string}`;
2163
+ gas?: bigint;
2164
+ gasPrice?: bigint;
2165
+ maxFeePerGas?: bigint;
2166
+ maxPriorityFeePerGas?: bigint;
2167
+ nonce?: number;
2168
+ value?: bigint;
2169
+ }): Promise<void> {
2170
+ return contract.simulate.init([main_, name_, symbol_, mandate_, issuanceThrottleParams_, redemptionThrottleParams_] as const, options) as Promise<void>;
2171
+ },
2172
+ /**
2173
+ * Simulate issue
2174
+ * Returns gas estimate and result without sending transaction
2175
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2176
+ */
2177
+ async issue(amount: bigint, options?: {
2178
+ accessList?: import('viem').AccessList;
2179
+ authorizationList?: import('viem').AuthorizationList;
2180
+ chain?: import('viem').Chain | null;
2181
+ dataSuffix?: `0x${string}`;
2182
+ gas?: bigint;
2183
+ gasPrice?: bigint;
2184
+ maxFeePerGas?: bigint;
2185
+ maxPriorityFeePerGas?: bigint;
2186
+ nonce?: number;
2187
+ value?: bigint;
2188
+ }): Promise<void> {
2189
+ return contract.simulate.issue([amount] as const, options) as Promise<void>;
2190
+ },
2191
+ /**
2192
+ * Simulate issueTo
2193
+ * Returns gas estimate and result without sending transaction
2194
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2195
+ */
2196
+ async issueTo(recipient: `0x${string}`, amount: bigint, options?: {
2197
+ accessList?: import('viem').AccessList;
2198
+ authorizationList?: import('viem').AuthorizationList;
2199
+ chain?: import('viem').Chain | null;
2200
+ dataSuffix?: `0x${string}`;
2201
+ gas?: bigint;
2202
+ gasPrice?: bigint;
2203
+ maxFeePerGas?: bigint;
2204
+ maxPriorityFeePerGas?: bigint;
2205
+ nonce?: number;
2206
+ value?: bigint;
2207
+ }): Promise<void> {
2208
+ return contract.simulate.issueTo([recipient, amount] as const, options) as Promise<void>;
2209
+ },
2210
+ /**
2211
+ * Simulate melt
2212
+ * Returns gas estimate and result without sending transaction
2213
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2214
+ */
2215
+ async melt(amtRToken: bigint, options?: {
2216
+ accessList?: import('viem').AccessList;
2217
+ authorizationList?: import('viem').AuthorizationList;
2218
+ chain?: import('viem').Chain | null;
2219
+ dataSuffix?: `0x${string}`;
2220
+ gas?: bigint;
2221
+ gasPrice?: bigint;
2222
+ maxFeePerGas?: bigint;
2223
+ maxPriorityFeePerGas?: bigint;
2224
+ nonce?: number;
2225
+ value?: bigint;
2226
+ }): Promise<void> {
2227
+ return contract.simulate.melt([amtRToken] as const, options) as Promise<void>;
2228
+ },
2229
+ /**
2230
+ * Simulate mint
2231
+ * Returns gas estimate and result without sending transaction
2232
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2233
+ */
2234
+ async mint(baskets: bigint, options?: {
2235
+ accessList?: import('viem').AccessList;
2236
+ authorizationList?: import('viem').AuthorizationList;
2237
+ chain?: import('viem').Chain | null;
2238
+ dataSuffix?: `0x${string}`;
2239
+ gas?: bigint;
2240
+ gasPrice?: bigint;
2241
+ maxFeePerGas?: bigint;
2242
+ maxPriorityFeePerGas?: bigint;
2243
+ nonce?: number;
2244
+ value?: bigint;
2245
+ }): Promise<void> {
2246
+ return contract.simulate.mint([baskets] as const, options) as Promise<void>;
2247
+ },
2248
+ /**
2249
+ * Simulate monetizeDonations
2250
+ * Returns gas estimate and result without sending transaction
2251
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2252
+ */
2253
+ async monetizeDonations(erc20: `0x${string}`, options?: {
2254
+ accessList?: import('viem').AccessList;
2255
+ authorizationList?: import('viem').AuthorizationList;
2256
+ chain?: import('viem').Chain | null;
2257
+ dataSuffix?: `0x${string}`;
2258
+ gas?: bigint;
2259
+ gasPrice?: bigint;
2260
+ maxFeePerGas?: bigint;
2261
+ maxPriorityFeePerGas?: bigint;
2262
+ nonce?: number;
2263
+ value?: bigint;
2264
+ }): Promise<void> {
2265
+ return contract.simulate.monetizeDonations([erc20] as const, options) as Promise<void>;
2266
+ },
2267
+ /**
2268
+ * Simulate permit
2269
+ * Returns gas estimate and result without sending transaction
2270
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2271
+ */
2272
+ async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
2273
+ accessList?: import('viem').AccessList;
2274
+ authorizationList?: import('viem').AuthorizationList;
2275
+ chain?: import('viem').Chain | null;
2276
+ dataSuffix?: `0x${string}`;
2277
+ gas?: bigint;
2278
+ gasPrice?: bigint;
2279
+ maxFeePerGas?: bigint;
2280
+ maxPriorityFeePerGas?: bigint;
2281
+ nonce?: number;
2282
+ value?: bigint;
2283
+ }): Promise<void> {
2284
+ return contract.simulate.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<void>;
2285
+ },
2286
+ /**
2287
+ * Simulate redeem
2288
+ * Returns gas estimate and result without sending transaction
2289
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2290
+ */
2291
+ async redeem(amount: bigint, options?: {
2292
+ accessList?: import('viem').AccessList;
2293
+ authorizationList?: import('viem').AuthorizationList;
2294
+ chain?: import('viem').Chain | null;
2295
+ dataSuffix?: `0x${string}`;
2296
+ gas?: bigint;
2297
+ gasPrice?: bigint;
2298
+ maxFeePerGas?: bigint;
2299
+ maxPriorityFeePerGas?: bigint;
2300
+ nonce?: number;
2301
+ value?: bigint;
2302
+ }): Promise<void> {
2303
+ return contract.simulate.redeem([amount] as const, options) as Promise<void>;
2304
+ },
2305
+ /**
2306
+ * Simulate redeemCustom
2307
+ * Returns gas estimate and result without sending transaction
2308
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2309
+ */
2310
+ async redeemCustom(recipient: `0x${string}`, amount: bigint, basketNonces: bigint[], portions: bigint[], expectedERC20sOut: `0x${string}`[], minAmounts: bigint[], options?: {
2311
+ accessList?: import('viem').AccessList;
2312
+ authorizationList?: import('viem').AuthorizationList;
2313
+ chain?: import('viem').Chain | null;
2314
+ dataSuffix?: `0x${string}`;
2315
+ gas?: bigint;
2316
+ gasPrice?: bigint;
2317
+ maxFeePerGas?: bigint;
2318
+ maxPriorityFeePerGas?: bigint;
2319
+ nonce?: number;
2320
+ value?: bigint;
2321
+ }): Promise<void> {
2322
+ return contract.simulate.redeemCustom([recipient, amount, basketNonces, portions, expectedERC20sOut, minAmounts] as const, options) as Promise<void>;
2323
+ },
2324
+ /**
2325
+ * Simulate redeemTo
2326
+ * Returns gas estimate and result without sending transaction
2327
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2328
+ */
2329
+ async redeemTo(recipient: `0x${string}`, amount: bigint, options?: {
2330
+ accessList?: import('viem').AccessList;
2331
+ authorizationList?: import('viem').AuthorizationList;
2332
+ chain?: import('viem').Chain | null;
2333
+ dataSuffix?: `0x${string}`;
2334
+ gas?: bigint;
2335
+ gasPrice?: bigint;
2336
+ maxFeePerGas?: bigint;
2337
+ maxPriorityFeePerGas?: bigint;
2338
+ nonce?: number;
2339
+ value?: bigint;
2340
+ }): Promise<void> {
2341
+ return contract.simulate.redeemTo([recipient, amount] as const, options) as Promise<void>;
2342
+ },
2343
+ /**
2344
+ * Simulate setBasketsNeeded
2345
+ * Returns gas estimate and result without sending transaction
2346
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2347
+ */
2348
+ async setBasketsNeeded(basketsNeeded_: bigint, options?: {
2349
+ accessList?: import('viem').AccessList;
2350
+ authorizationList?: import('viem').AuthorizationList;
2351
+ chain?: import('viem').Chain | null;
2352
+ dataSuffix?: `0x${string}`;
2353
+ gas?: bigint;
2354
+ gasPrice?: bigint;
2355
+ maxFeePerGas?: bigint;
2356
+ maxPriorityFeePerGas?: bigint;
2357
+ nonce?: number;
2358
+ value?: bigint;
2359
+ }): Promise<void> {
2360
+ return contract.simulate.setBasketsNeeded([basketsNeeded_] as const, options) as Promise<void>;
2361
+ },
2362
+ /**
2363
+ * Simulate setIssuanceThrottleParams
2364
+ * Returns gas estimate and result without sending transaction
2365
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2366
+ */
2367
+ async setIssuanceThrottleParams(params: ThrottleLib_Params, options?: {
2368
+ accessList?: import('viem').AccessList;
2369
+ authorizationList?: import('viem').AuthorizationList;
2370
+ chain?: import('viem').Chain | null;
2371
+ dataSuffix?: `0x${string}`;
2372
+ gas?: bigint;
2373
+ gasPrice?: bigint;
2374
+ maxFeePerGas?: bigint;
2375
+ maxPriorityFeePerGas?: bigint;
2376
+ nonce?: number;
2377
+ value?: bigint;
2378
+ }): Promise<void> {
2379
+ return contract.simulate.setIssuanceThrottleParams([params] as const, options) as Promise<void>;
2380
+ },
2381
+ /**
2382
+ * Simulate setMandate
2383
+ * Returns gas estimate and result without sending transaction
2384
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2385
+ */
2386
+ async setMandate(mandate_: string, options?: {
2387
+ accessList?: import('viem').AccessList;
2388
+ authorizationList?: import('viem').AuthorizationList;
2389
+ chain?: import('viem').Chain | null;
2390
+ dataSuffix?: `0x${string}`;
2391
+ gas?: bigint;
2392
+ gasPrice?: bigint;
2393
+ maxFeePerGas?: bigint;
2394
+ maxPriorityFeePerGas?: bigint;
2395
+ nonce?: number;
2396
+ value?: bigint;
2397
+ }): Promise<void> {
2398
+ return contract.simulate.setMandate([mandate_] as const, options) as Promise<void>;
2399
+ },
2400
+ /**
2401
+ * Simulate setRedemptionThrottleParams
2402
+ * Returns gas estimate and result without sending transaction
2403
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2404
+ */
2405
+ async setRedemptionThrottleParams(params: ThrottleLib_Params, options?: {
2406
+ accessList?: import('viem').AccessList;
2407
+ authorizationList?: import('viem').AuthorizationList;
2408
+ chain?: import('viem').Chain | null;
2409
+ dataSuffix?: `0x${string}`;
2410
+ gas?: bigint;
2411
+ gasPrice?: bigint;
2412
+ maxFeePerGas?: bigint;
2413
+ maxPriorityFeePerGas?: bigint;
2414
+ nonce?: number;
2415
+ value?: bigint;
2416
+ }): Promise<void> {
2417
+ return contract.simulate.setRedemptionThrottleParams([params] as const, options) as Promise<void>;
2418
+ },
2419
+ /**
2420
+ * Simulate setThrottleParams
2421
+ * Returns gas estimate and result without sending transaction
2422
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2423
+ */
2424
+ async setThrottleParams(issuanceParams: ThrottleLib_Params, redemptionParams: ThrottleLib_Params, options?: {
2425
+ accessList?: import('viem').AccessList;
2426
+ authorizationList?: import('viem').AuthorizationList;
2427
+ chain?: import('viem').Chain | null;
2428
+ dataSuffix?: `0x${string}`;
2429
+ gas?: bigint;
2430
+ gasPrice?: bigint;
2431
+ maxFeePerGas?: bigint;
2432
+ maxPriorityFeePerGas?: bigint;
2433
+ nonce?: number;
2434
+ value?: bigint;
2435
+ }): Promise<void> {
2436
+ return contract.simulate.setThrottleParams([issuanceParams, redemptionParams] as const, options) as Promise<void>;
2437
+ },
2438
+ /**
2439
+ * Simulate transfer
2440
+ * Returns gas estimate and result without sending transaction
2441
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2442
+ */
2443
+ async transfer(to: `0x${string}`, amount: bigint, options?: {
2444
+ accessList?: import('viem').AccessList;
2445
+ authorizationList?: import('viem').AuthorizationList;
2446
+ chain?: import('viem').Chain | null;
2447
+ dataSuffix?: `0x${string}`;
2448
+ gas?: bigint;
2449
+ gasPrice?: bigint;
2450
+ maxFeePerGas?: bigint;
2451
+ maxPriorityFeePerGas?: bigint;
2452
+ nonce?: number;
2453
+ value?: bigint;
2454
+ }): Promise<boolean> {
2455
+ return contract.simulate.transfer([to, amount] as const, options) as Promise<boolean>;
2456
+ },
2457
+ /**
2458
+ * Simulate transferFrom
2459
+ * Returns gas estimate and result without sending transaction
2460
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2461
+ */
2462
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
2463
+ accessList?: import('viem').AccessList;
2464
+ authorizationList?: import('viem').AuthorizationList;
2465
+ chain?: import('viem').Chain | null;
2466
+ dataSuffix?: `0x${string}`;
2467
+ gas?: bigint;
2468
+ gasPrice?: bigint;
2469
+ maxFeePerGas?: bigint;
2470
+ maxPriorityFeePerGas?: bigint;
2471
+ nonce?: number;
2472
+ value?: bigint;
2473
+ }): Promise<boolean> {
2474
+ return contract.simulate.transferFrom([from, to, amount] as const, options) as Promise<boolean>;
2475
+ },
2476
+ /**
2477
+ * Simulate upgradeTo
2478
+ * Returns gas estimate and result without sending transaction
2479
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2480
+ */
2481
+ async upgradeTo(newImplementation: `0x${string}`, options?: {
2482
+ accessList?: import('viem').AccessList;
2483
+ authorizationList?: import('viem').AuthorizationList;
2484
+ chain?: import('viem').Chain | null;
2485
+ dataSuffix?: `0x${string}`;
2486
+ gas?: bigint;
2487
+ gasPrice?: bigint;
2488
+ maxFeePerGas?: bigint;
2489
+ maxPriorityFeePerGas?: bigint;
2490
+ nonce?: number;
2491
+ value?: bigint;
2492
+ }): Promise<void> {
2493
+ return contract.simulate.upgradeTo([newImplementation] as const, options) as Promise<void>;
2494
+ },
2495
+ /**
2496
+ * Simulate upgradeToAndCall
2497
+ * Returns gas estimate and result without sending transaction
2498
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2499
+ */
2500
+ async upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
2501
+ accessList?: import('viem').AccessList;
2502
+ authorizationList?: import('viem').AuthorizationList;
2503
+ chain?: import('viem').Chain | null;
2504
+ dataSuffix?: `0x${string}`;
2505
+ gas?: bigint;
2506
+ gasPrice?: bigint;
2507
+ maxFeePerGas?: bigint;
2508
+ maxPriorityFeePerGas?: bigint;
2509
+ nonce?: number;
2510
+ value?: bigint;
2511
+ }): Promise<void> {
2512
+ return contract.simulate.upgradeToAndCall([newImplementation, data] as const, options) as Promise<void>;
2513
+ }
2514
+ };
2515
+ }
2516
+
2517
+ /**
2518
+ * Watch contract events
2519
+ *
2520
+ * @example
2521
+ * // Watch all Transfer events
2522
+ * const unwatch = contract.watch.Transfer((event) => {
2523
+ * console.log('Transfer:', event);
2524
+ * });
2525
+ *
2526
+ * // Stop watching
2527
+ * unwatch();
2528
+ */
2529
+ get watch() {
2530
+ return {
2531
+ /**
2532
+ * Watch AdminChanged events
2533
+ * @param callback Function to call when event is emitted
2534
+ * @param filter Optional filter for indexed parameters
2535
+ * @returns Unwatch function to stop listening
2536
+ */
2537
+ AdminChanged: (callback: (event: { previousAdmin: `0x${string}`; newAdmin: `0x${string}` }) => void) => {
2538
+ return this.publicClient.watchContractEvent({
2539
+ address: this.contractAddress,
2540
+ abi: RTokenP1_jsonAbi,
2541
+ eventName: 'AdminChanged',
2542
+
2543
+ onLogs: (logs: any[]) => {
2544
+ logs.forEach((log: any) => {
2545
+ callback(log.args as any);
2546
+ });
2547
+ },
2548
+ }) as () => void;
2549
+ },
2550
+ /**
2551
+ * Watch Approval events
2552
+ * @param callback Function to call when event is emitted
2553
+ * @param filter Optional filter for indexed parameters
2554
+ * @returns Unwatch function to stop listening
2555
+ */
2556
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
2557
+ return this.publicClient.watchContractEvent({
2558
+ address: this.contractAddress,
2559
+ abi: RTokenP1_jsonAbi,
2560
+ eventName: 'Approval',
2561
+ args: filter,
2562
+ onLogs: (logs: any[]) => {
2563
+ logs.forEach((log: any) => {
2564
+ callback(log.args as any);
2565
+ });
2566
+ },
2567
+ }) as () => void;
2568
+ },
2569
+ /**
2570
+ * Watch BasketsNeededChanged events
2571
+ * @param callback Function to call when event is emitted
2572
+ * @param filter Optional filter for indexed parameters
2573
+ * @returns Unwatch function to stop listening
2574
+ */
2575
+ BasketsNeededChanged: (callback: (event: { oldBasketsNeeded: bigint; newBasketsNeeded: bigint }) => void) => {
2576
+ return this.publicClient.watchContractEvent({
2577
+ address: this.contractAddress,
2578
+ abi: RTokenP1_jsonAbi,
2579
+ eventName: 'BasketsNeededChanged',
2580
+
2581
+ onLogs: (logs: any[]) => {
2582
+ logs.forEach((log: any) => {
2583
+ callback(log.args as any);
2584
+ });
2585
+ },
2586
+ }) as () => void;
2587
+ },
2588
+ /**
2589
+ * Watch BeaconUpgraded events
2590
+ * @param callback Function to call when event is emitted
2591
+ * @param filter Optional filter for indexed parameters
2592
+ * @returns Unwatch function to stop listening
2593
+ */
2594
+ BeaconUpgraded: (callback: (event: { beacon: `0x${string}` }) => void, filter?: { beacon: `0x${string}` }) => {
2595
+ return this.publicClient.watchContractEvent({
2596
+ address: this.contractAddress,
2597
+ abi: RTokenP1_jsonAbi,
2598
+ eventName: 'BeaconUpgraded',
2599
+ args: filter,
2600
+ onLogs: (logs: any[]) => {
2601
+ logs.forEach((log: any) => {
2602
+ callback(log.args as any);
2603
+ });
2604
+ },
2605
+ }) as () => void;
2606
+ },
2607
+ /**
2608
+ * Watch EIP712DomainChanged events
2609
+ * @param callback Function to call when event is emitted
2610
+ * @param filter Optional filter for indexed parameters
2611
+ * @returns Unwatch function to stop listening
2612
+ */
2613
+ EIP712DomainChanged: (callback: (event: { }) => void) => {
2614
+ return this.publicClient.watchContractEvent({
2615
+ address: this.contractAddress,
2616
+ abi: RTokenP1_jsonAbi,
2617
+ eventName: 'EIP712DomainChanged',
2618
+
2619
+ onLogs: (logs: any[]) => {
2620
+ logs.forEach((log: any) => {
2621
+ callback(log.args as any);
2622
+ });
2623
+ },
2624
+ }) as () => void;
2625
+ },
2626
+ /**
2627
+ * Watch Initialized events
2628
+ * @param callback Function to call when event is emitted
2629
+ * @param filter Optional filter for indexed parameters
2630
+ * @returns Unwatch function to stop listening
2631
+ */
2632
+ Initialized: (callback: (event: { version: bigint }) => void) => {
2633
+ return this.publicClient.watchContractEvent({
2634
+ address: this.contractAddress,
2635
+ abi: RTokenP1_jsonAbi,
2636
+ eventName: 'Initialized',
2637
+
2638
+ onLogs: (logs: any[]) => {
2639
+ logs.forEach((log: any) => {
2640
+ callback(log.args as any);
2641
+ });
2642
+ },
2643
+ }) as () => void;
2644
+ },
2645
+ /**
2646
+ * Watch Issuance events
2647
+ * @param callback Function to call when event is emitted
2648
+ * @param filter Optional filter for indexed parameters
2649
+ * @returns Unwatch function to stop listening
2650
+ */
2651
+ Issuance: (callback: (event: { issuer: `0x${string}`; recipient: `0x${string}`; amount: bigint; baskets: bigint }) => void, filter?: { issuer: `0x${string}`; recipient: `0x${string}` }) => {
2652
+ return this.publicClient.watchContractEvent({
2653
+ address: this.contractAddress,
2654
+ abi: RTokenP1_jsonAbi,
2655
+ eventName: 'Issuance',
2656
+ args: filter,
2657
+ onLogs: (logs: any[]) => {
2658
+ logs.forEach((log: any) => {
2659
+ callback(log.args as any);
2660
+ });
2661
+ },
2662
+ }) as () => void;
2663
+ },
2664
+ /**
2665
+ * Watch IssuanceThrottleSet events
2666
+ * @param callback Function to call when event is emitted
2667
+ * @param filter Optional filter for indexed parameters
2668
+ * @returns Unwatch function to stop listening
2669
+ */
2670
+ IssuanceThrottleSet: (callback: (event: { oldVal: ThrottleLib_Params; newVal: ThrottleLib_Params }) => void) => {
2671
+ return this.publicClient.watchContractEvent({
2672
+ address: this.contractAddress,
2673
+ abi: RTokenP1_jsonAbi,
2674
+ eventName: 'IssuanceThrottleSet',
2675
+
2676
+ onLogs: (logs: any[]) => {
2677
+ logs.forEach((log: any) => {
2678
+ callback(log.args as any);
2679
+ });
2680
+ },
2681
+ }) as () => void;
2682
+ },
2683
+ /**
2684
+ * Watch MandateSet events
2685
+ * @param callback Function to call when event is emitted
2686
+ * @param filter Optional filter for indexed parameters
2687
+ * @returns Unwatch function to stop listening
2688
+ */
2689
+ MandateSet: (callback: (event: { oldVal: string; newVal: string }) => void, filter?: { oldVal: string }) => {
2690
+ return this.publicClient.watchContractEvent({
2691
+ address: this.contractAddress,
2692
+ abi: RTokenP1_jsonAbi,
2693
+ eventName: 'MandateSet',
2694
+ args: filter,
2695
+ onLogs: (logs: any[]) => {
2696
+ logs.forEach((log: any) => {
2697
+ callback(log.args as any);
2698
+ });
2699
+ },
2700
+ }) as () => void;
2701
+ },
2702
+ /**
2703
+ * Watch Melted events
2704
+ * @param callback Function to call when event is emitted
2705
+ * @param filter Optional filter for indexed parameters
2706
+ * @returns Unwatch function to stop listening
2707
+ */
2708
+ Melted: (callback: (event: { amount: bigint }) => void) => {
2709
+ return this.publicClient.watchContractEvent({
2710
+ address: this.contractAddress,
2711
+ abi: RTokenP1_jsonAbi,
2712
+ eventName: 'Melted',
2713
+
2714
+ onLogs: (logs: any[]) => {
2715
+ logs.forEach((log: any) => {
2716
+ callback(log.args as any);
2717
+ });
2718
+ },
2719
+ }) as () => void;
2720
+ },
2721
+ /**
2722
+ * Watch Redemption events
2723
+ * @param callback Function to call when event is emitted
2724
+ * @param filter Optional filter for indexed parameters
2725
+ * @returns Unwatch function to stop listening
2726
+ */
2727
+ Redemption: (callback: (event: { redeemer: `0x${string}`; recipient: `0x${string}`; amount: bigint; baskets: bigint }) => void, filter?: { redeemer: `0x${string}`; recipient: `0x${string}` }) => {
2728
+ return this.publicClient.watchContractEvent({
2729
+ address: this.contractAddress,
2730
+ abi: RTokenP1_jsonAbi,
2731
+ eventName: 'Redemption',
2732
+ args: filter,
2733
+ onLogs: (logs: any[]) => {
2734
+ logs.forEach((log: any) => {
2735
+ callback(log.args as any);
2736
+ });
2737
+ },
2738
+ }) as () => void;
2739
+ },
2740
+ /**
2741
+ * Watch RedemptionThrottleSet events
2742
+ * @param callback Function to call when event is emitted
2743
+ * @param filter Optional filter for indexed parameters
2744
+ * @returns Unwatch function to stop listening
2745
+ */
2746
+ RedemptionThrottleSet: (callback: (event: { oldVal: ThrottleLib_Params; newVal: ThrottleLib_Params }) => void) => {
2747
+ return this.publicClient.watchContractEvent({
2748
+ address: this.contractAddress,
2749
+ abi: RTokenP1_jsonAbi,
2750
+ eventName: 'RedemptionThrottleSet',
2751
+
2752
+ onLogs: (logs: any[]) => {
2753
+ logs.forEach((log: any) => {
2754
+ callback(log.args as any);
2755
+ });
2756
+ },
2757
+ }) as () => void;
2758
+ },
2759
+ /**
2760
+ * Watch Transfer events
2761
+ * @param callback Function to call when event is emitted
2762
+ * @param filter Optional filter for indexed parameters
2763
+ * @returns Unwatch function to stop listening
2764
+ */
2765
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
2766
+ return this.publicClient.watchContractEvent({
2767
+ address: this.contractAddress,
2768
+ abi: RTokenP1_jsonAbi,
2769
+ eventName: 'Transfer',
2770
+ args: filter,
2771
+ onLogs: (logs: any[]) => {
2772
+ logs.forEach((log: any) => {
2773
+ callback(log.args as any);
2774
+ });
2775
+ },
2776
+ }) as () => void;
2777
+ },
2778
+ /**
2779
+ * Watch Upgraded events
2780
+ * @param callback Function to call when event is emitted
2781
+ * @param filter Optional filter for indexed parameters
2782
+ * @returns Unwatch function to stop listening
2783
+ */
2784
+ Upgraded: (callback: (event: { implementation: `0x${string}` }) => void, filter?: { implementation: `0x${string}` }) => {
2785
+ return this.publicClient.watchContractEvent({
2786
+ address: this.contractAddress,
2787
+ abi: RTokenP1_jsonAbi,
2788
+ eventName: 'Upgraded',
2789
+ args: filter,
2790
+ onLogs: (logs: any[]) => {
2791
+ logs.forEach((log: any) => {
2792
+ callback(log.args as any);
2793
+ });
2794
+ },
2795
+ }) as () => void;
2796
+ }
2797
+ };
2798
+ }
2799
+ }