@gitmyabi-stg/steakusdc 0.0.1

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,4894 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * MarketParams struct type
7
+ */
8
+ export type MarketParams = {
9
+ loanToken: `0x${string}`;
10
+ collateralToken: `0x${string}`;
11
+ oracle: `0x${string}`;
12
+ irm: `0x${string}`;
13
+ lltv: bigint;
14
+ };
15
+
16
+ /**
17
+ * MarketAllocation struct type
18
+ */
19
+ export type MarketAllocation = {
20
+ marketParams: MarketParams;
21
+ assets: bigint;
22
+ };
23
+ /**
24
+ * MetaMorpho ABI
25
+ *
26
+ * This ABI is typed using viem's type system for full type safety.
27
+ */
28
+ export const MetaMorphoAbi = [
29
+ {
30
+ "inputs": [
31
+ {
32
+ "internalType": "address",
33
+ "name": "owner",
34
+ "type": "address"
35
+ },
36
+ {
37
+ "internalType": "address",
38
+ "name": "morpho",
39
+ "type": "address"
40
+ },
41
+ {
42
+ "internalType": "uint256",
43
+ "name": "initialTimelock",
44
+ "type": "uint256"
45
+ },
46
+ {
47
+ "internalType": "address",
48
+ "name": "_asset",
49
+ "type": "address"
50
+ },
51
+ {
52
+ "internalType": "string",
53
+ "name": "_name",
54
+ "type": "string"
55
+ },
56
+ {
57
+ "internalType": "string",
58
+ "name": "_symbol",
59
+ "type": "string"
60
+ }
61
+ ],
62
+ "stateMutability": "nonpayable",
63
+ "type": "constructor"
64
+ },
65
+ {
66
+ "inputs": [],
67
+ "name": "AboveMaxTimelock",
68
+ "type": "error"
69
+ },
70
+ {
71
+ "inputs": [
72
+ {
73
+ "internalType": "address",
74
+ "name": "target",
75
+ "type": "address"
76
+ }
77
+ ],
78
+ "name": "AddressEmptyCode",
79
+ "type": "error"
80
+ },
81
+ {
82
+ "inputs": [
83
+ {
84
+ "internalType": "address",
85
+ "name": "account",
86
+ "type": "address"
87
+ }
88
+ ],
89
+ "name": "AddressInsufficientBalance",
90
+ "type": "error"
91
+ },
92
+ {
93
+ "inputs": [],
94
+ "name": "AllCapsReached",
95
+ "type": "error"
96
+ },
97
+ {
98
+ "inputs": [],
99
+ "name": "AlreadyPending",
100
+ "type": "error"
101
+ },
102
+ {
103
+ "inputs": [],
104
+ "name": "AlreadySet",
105
+ "type": "error"
106
+ },
107
+ {
108
+ "inputs": [],
109
+ "name": "BelowMinTimelock",
110
+ "type": "error"
111
+ },
112
+ {
113
+ "inputs": [
114
+ {
115
+ "internalType": "Id",
116
+ "name": "id",
117
+ "type": "bytes32"
118
+ }
119
+ ],
120
+ "name": "DuplicateMarket",
121
+ "type": "error"
122
+ },
123
+ {
124
+ "inputs": [],
125
+ "name": "ECDSAInvalidSignature",
126
+ "type": "error"
127
+ },
128
+ {
129
+ "inputs": [
130
+ {
131
+ "internalType": "uint256",
132
+ "name": "length",
133
+ "type": "uint256"
134
+ }
135
+ ],
136
+ "name": "ECDSAInvalidSignatureLength",
137
+ "type": "error"
138
+ },
139
+ {
140
+ "inputs": [
141
+ {
142
+ "internalType": "bytes32",
143
+ "name": "s",
144
+ "type": "bytes32"
145
+ }
146
+ ],
147
+ "name": "ECDSAInvalidSignatureS",
148
+ "type": "error"
149
+ },
150
+ {
151
+ "inputs": [
152
+ {
153
+ "internalType": "address",
154
+ "name": "spender",
155
+ "type": "address"
156
+ },
157
+ {
158
+ "internalType": "uint256",
159
+ "name": "allowance",
160
+ "type": "uint256"
161
+ },
162
+ {
163
+ "internalType": "uint256",
164
+ "name": "needed",
165
+ "type": "uint256"
166
+ }
167
+ ],
168
+ "name": "ERC20InsufficientAllowance",
169
+ "type": "error"
170
+ },
171
+ {
172
+ "inputs": [
173
+ {
174
+ "internalType": "address",
175
+ "name": "sender",
176
+ "type": "address"
177
+ },
178
+ {
179
+ "internalType": "uint256",
180
+ "name": "balance",
181
+ "type": "uint256"
182
+ },
183
+ {
184
+ "internalType": "uint256",
185
+ "name": "needed",
186
+ "type": "uint256"
187
+ }
188
+ ],
189
+ "name": "ERC20InsufficientBalance",
190
+ "type": "error"
191
+ },
192
+ {
193
+ "inputs": [
194
+ {
195
+ "internalType": "address",
196
+ "name": "approver",
197
+ "type": "address"
198
+ }
199
+ ],
200
+ "name": "ERC20InvalidApprover",
201
+ "type": "error"
202
+ },
203
+ {
204
+ "inputs": [
205
+ {
206
+ "internalType": "address",
207
+ "name": "receiver",
208
+ "type": "address"
209
+ }
210
+ ],
211
+ "name": "ERC20InvalidReceiver",
212
+ "type": "error"
213
+ },
214
+ {
215
+ "inputs": [
216
+ {
217
+ "internalType": "address",
218
+ "name": "sender",
219
+ "type": "address"
220
+ }
221
+ ],
222
+ "name": "ERC20InvalidSender",
223
+ "type": "error"
224
+ },
225
+ {
226
+ "inputs": [
227
+ {
228
+ "internalType": "address",
229
+ "name": "spender",
230
+ "type": "address"
231
+ }
232
+ ],
233
+ "name": "ERC20InvalidSpender",
234
+ "type": "error"
235
+ },
236
+ {
237
+ "inputs": [
238
+ {
239
+ "internalType": "uint256",
240
+ "name": "deadline",
241
+ "type": "uint256"
242
+ }
243
+ ],
244
+ "name": "ERC2612ExpiredSignature",
245
+ "type": "error"
246
+ },
247
+ {
248
+ "inputs": [
249
+ {
250
+ "internalType": "address",
251
+ "name": "signer",
252
+ "type": "address"
253
+ },
254
+ {
255
+ "internalType": "address",
256
+ "name": "owner",
257
+ "type": "address"
258
+ }
259
+ ],
260
+ "name": "ERC2612InvalidSigner",
261
+ "type": "error"
262
+ },
263
+ {
264
+ "inputs": [
265
+ {
266
+ "internalType": "address",
267
+ "name": "receiver",
268
+ "type": "address"
269
+ },
270
+ {
271
+ "internalType": "uint256",
272
+ "name": "assets",
273
+ "type": "uint256"
274
+ },
275
+ {
276
+ "internalType": "uint256",
277
+ "name": "max",
278
+ "type": "uint256"
279
+ }
280
+ ],
281
+ "name": "ERC4626ExceededMaxDeposit",
282
+ "type": "error"
283
+ },
284
+ {
285
+ "inputs": [
286
+ {
287
+ "internalType": "address",
288
+ "name": "receiver",
289
+ "type": "address"
290
+ },
291
+ {
292
+ "internalType": "uint256",
293
+ "name": "shares",
294
+ "type": "uint256"
295
+ },
296
+ {
297
+ "internalType": "uint256",
298
+ "name": "max",
299
+ "type": "uint256"
300
+ }
301
+ ],
302
+ "name": "ERC4626ExceededMaxMint",
303
+ "type": "error"
304
+ },
305
+ {
306
+ "inputs": [
307
+ {
308
+ "internalType": "address",
309
+ "name": "owner",
310
+ "type": "address"
311
+ },
312
+ {
313
+ "internalType": "uint256",
314
+ "name": "shares",
315
+ "type": "uint256"
316
+ },
317
+ {
318
+ "internalType": "uint256",
319
+ "name": "max",
320
+ "type": "uint256"
321
+ }
322
+ ],
323
+ "name": "ERC4626ExceededMaxRedeem",
324
+ "type": "error"
325
+ },
326
+ {
327
+ "inputs": [
328
+ {
329
+ "internalType": "address",
330
+ "name": "owner",
331
+ "type": "address"
332
+ },
333
+ {
334
+ "internalType": "uint256",
335
+ "name": "assets",
336
+ "type": "uint256"
337
+ },
338
+ {
339
+ "internalType": "uint256",
340
+ "name": "max",
341
+ "type": "uint256"
342
+ }
343
+ ],
344
+ "name": "ERC4626ExceededMaxWithdraw",
345
+ "type": "error"
346
+ },
347
+ {
348
+ "inputs": [],
349
+ "name": "FailedInnerCall",
350
+ "type": "error"
351
+ },
352
+ {
353
+ "inputs": [
354
+ {
355
+ "internalType": "Id",
356
+ "name": "id",
357
+ "type": "bytes32"
358
+ }
359
+ ],
360
+ "name": "InconsistentAsset",
361
+ "type": "error"
362
+ },
363
+ {
364
+ "inputs": [],
365
+ "name": "InconsistentReallocation",
366
+ "type": "error"
367
+ },
368
+ {
369
+ "inputs": [
370
+ {
371
+ "internalType": "address",
372
+ "name": "account",
373
+ "type": "address"
374
+ },
375
+ {
376
+ "internalType": "uint256",
377
+ "name": "currentNonce",
378
+ "type": "uint256"
379
+ }
380
+ ],
381
+ "name": "InvalidAccountNonce",
382
+ "type": "error"
383
+ },
384
+ {
385
+ "inputs": [
386
+ {
387
+ "internalType": "Id",
388
+ "name": "id",
389
+ "type": "bytes32"
390
+ }
391
+ ],
392
+ "name": "InvalidMarketRemovalNonZeroCap",
393
+ "type": "error"
394
+ },
395
+ {
396
+ "inputs": [
397
+ {
398
+ "internalType": "Id",
399
+ "name": "id",
400
+ "type": "bytes32"
401
+ }
402
+ ],
403
+ "name": "InvalidMarketRemovalNonZeroSupply",
404
+ "type": "error"
405
+ },
406
+ {
407
+ "inputs": [
408
+ {
409
+ "internalType": "Id",
410
+ "name": "id",
411
+ "type": "bytes32"
412
+ }
413
+ ],
414
+ "name": "InvalidMarketRemovalTimelockNotElapsed",
415
+ "type": "error"
416
+ },
417
+ {
418
+ "inputs": [],
419
+ "name": "InvalidShortString",
420
+ "type": "error"
421
+ },
422
+ {
423
+ "inputs": [],
424
+ "name": "MarketNotCreated",
425
+ "type": "error"
426
+ },
427
+ {
428
+ "inputs": [
429
+ {
430
+ "internalType": "Id",
431
+ "name": "id",
432
+ "type": "bytes32"
433
+ }
434
+ ],
435
+ "name": "MarketNotEnabled",
436
+ "type": "error"
437
+ },
438
+ {
439
+ "inputs": [],
440
+ "name": "MathOverflowedMulDiv",
441
+ "type": "error"
442
+ },
443
+ {
444
+ "inputs": [],
445
+ "name": "MaxFeeExceeded",
446
+ "type": "error"
447
+ },
448
+ {
449
+ "inputs": [],
450
+ "name": "MaxQueueLengthExceeded",
451
+ "type": "error"
452
+ },
453
+ {
454
+ "inputs": [],
455
+ "name": "NoPendingValue",
456
+ "type": "error"
457
+ },
458
+ {
459
+ "inputs": [],
460
+ "name": "NonZeroCap",
461
+ "type": "error"
462
+ },
463
+ {
464
+ "inputs": [],
465
+ "name": "NotAllocatorRole",
466
+ "type": "error"
467
+ },
468
+ {
469
+ "inputs": [],
470
+ "name": "NotCuratorNorGuardianRole",
471
+ "type": "error"
472
+ },
473
+ {
474
+ "inputs": [],
475
+ "name": "NotCuratorRole",
476
+ "type": "error"
477
+ },
478
+ {
479
+ "inputs": [],
480
+ "name": "NotEnoughLiquidity",
481
+ "type": "error"
482
+ },
483
+ {
484
+ "inputs": [],
485
+ "name": "NotGuardianRole",
486
+ "type": "error"
487
+ },
488
+ {
489
+ "inputs": [
490
+ {
491
+ "internalType": "address",
492
+ "name": "owner",
493
+ "type": "address"
494
+ }
495
+ ],
496
+ "name": "OwnableInvalidOwner",
497
+ "type": "error"
498
+ },
499
+ {
500
+ "inputs": [
501
+ {
502
+ "internalType": "address",
503
+ "name": "account",
504
+ "type": "address"
505
+ }
506
+ ],
507
+ "name": "OwnableUnauthorizedAccount",
508
+ "type": "error"
509
+ },
510
+ {
511
+ "inputs": [
512
+ {
513
+ "internalType": "Id",
514
+ "name": "id",
515
+ "type": "bytes32"
516
+ }
517
+ ],
518
+ "name": "PendingCap",
519
+ "type": "error"
520
+ },
521
+ {
522
+ "inputs": [],
523
+ "name": "PendingRemoval",
524
+ "type": "error"
525
+ },
526
+ {
527
+ "inputs": [
528
+ {
529
+ "internalType": "uint8",
530
+ "name": "bits",
531
+ "type": "uint8"
532
+ },
533
+ {
534
+ "internalType": "uint256",
535
+ "name": "value",
536
+ "type": "uint256"
537
+ }
538
+ ],
539
+ "name": "SafeCastOverflowedUintDowncast",
540
+ "type": "error"
541
+ },
542
+ {
543
+ "inputs": [
544
+ {
545
+ "internalType": "address",
546
+ "name": "token",
547
+ "type": "address"
548
+ }
549
+ ],
550
+ "name": "SafeERC20FailedOperation",
551
+ "type": "error"
552
+ },
553
+ {
554
+ "inputs": [
555
+ {
556
+ "internalType": "string",
557
+ "name": "str",
558
+ "type": "string"
559
+ }
560
+ ],
561
+ "name": "StringTooLong",
562
+ "type": "error"
563
+ },
564
+ {
565
+ "inputs": [
566
+ {
567
+ "internalType": "Id",
568
+ "name": "id",
569
+ "type": "bytes32"
570
+ }
571
+ ],
572
+ "name": "SupplyCapExceeded",
573
+ "type": "error"
574
+ },
575
+ {
576
+ "inputs": [],
577
+ "name": "TimelockNotElapsed",
578
+ "type": "error"
579
+ },
580
+ {
581
+ "inputs": [
582
+ {
583
+ "internalType": "Id",
584
+ "name": "id",
585
+ "type": "bytes32"
586
+ }
587
+ ],
588
+ "name": "UnauthorizedMarket",
589
+ "type": "error"
590
+ },
591
+ {
592
+ "inputs": [],
593
+ "name": "ZeroAddress",
594
+ "type": "error"
595
+ },
596
+ {
597
+ "inputs": [],
598
+ "name": "ZeroFeeRecipient",
599
+ "type": "error"
600
+ },
601
+ {
602
+ "anonymous": false,
603
+ "inputs": [
604
+ {
605
+ "indexed": false,
606
+ "internalType": "uint256",
607
+ "name": "newTotalAssets",
608
+ "type": "uint256"
609
+ },
610
+ {
611
+ "indexed": false,
612
+ "internalType": "uint256",
613
+ "name": "feeShares",
614
+ "type": "uint256"
615
+ }
616
+ ],
617
+ "name": "AccrueInterest",
618
+ "type": "event"
619
+ },
620
+ {
621
+ "anonymous": false,
622
+ "inputs": [
623
+ {
624
+ "indexed": true,
625
+ "internalType": "address",
626
+ "name": "owner",
627
+ "type": "address"
628
+ },
629
+ {
630
+ "indexed": true,
631
+ "internalType": "address",
632
+ "name": "spender",
633
+ "type": "address"
634
+ },
635
+ {
636
+ "indexed": false,
637
+ "internalType": "uint256",
638
+ "name": "value",
639
+ "type": "uint256"
640
+ }
641
+ ],
642
+ "name": "Approval",
643
+ "type": "event"
644
+ },
645
+ {
646
+ "anonymous": false,
647
+ "inputs": [
648
+ {
649
+ "indexed": true,
650
+ "internalType": "address",
651
+ "name": "sender",
652
+ "type": "address"
653
+ },
654
+ {
655
+ "indexed": true,
656
+ "internalType": "address",
657
+ "name": "owner",
658
+ "type": "address"
659
+ },
660
+ {
661
+ "indexed": false,
662
+ "internalType": "uint256",
663
+ "name": "assets",
664
+ "type": "uint256"
665
+ },
666
+ {
667
+ "indexed": false,
668
+ "internalType": "uint256",
669
+ "name": "shares",
670
+ "type": "uint256"
671
+ }
672
+ ],
673
+ "name": "Deposit",
674
+ "type": "event"
675
+ },
676
+ {
677
+ "anonymous": false,
678
+ "inputs": [],
679
+ "name": "EIP712DomainChanged",
680
+ "type": "event"
681
+ },
682
+ {
683
+ "anonymous": false,
684
+ "inputs": [
685
+ {
686
+ "indexed": true,
687
+ "internalType": "address",
688
+ "name": "previousOwner",
689
+ "type": "address"
690
+ },
691
+ {
692
+ "indexed": true,
693
+ "internalType": "address",
694
+ "name": "newOwner",
695
+ "type": "address"
696
+ }
697
+ ],
698
+ "name": "OwnershipTransferStarted",
699
+ "type": "event"
700
+ },
701
+ {
702
+ "anonymous": false,
703
+ "inputs": [
704
+ {
705
+ "indexed": true,
706
+ "internalType": "address",
707
+ "name": "previousOwner",
708
+ "type": "address"
709
+ },
710
+ {
711
+ "indexed": true,
712
+ "internalType": "address",
713
+ "name": "newOwner",
714
+ "type": "address"
715
+ }
716
+ ],
717
+ "name": "OwnershipTransferred",
718
+ "type": "event"
719
+ },
720
+ {
721
+ "anonymous": false,
722
+ "inputs": [
723
+ {
724
+ "indexed": true,
725
+ "internalType": "address",
726
+ "name": "caller",
727
+ "type": "address"
728
+ },
729
+ {
730
+ "indexed": true,
731
+ "internalType": "Id",
732
+ "name": "id",
733
+ "type": "bytes32"
734
+ },
735
+ {
736
+ "indexed": false,
737
+ "internalType": "uint256",
738
+ "name": "suppliedAssets",
739
+ "type": "uint256"
740
+ },
741
+ {
742
+ "indexed": false,
743
+ "internalType": "uint256",
744
+ "name": "suppliedShares",
745
+ "type": "uint256"
746
+ }
747
+ ],
748
+ "name": "ReallocateSupply",
749
+ "type": "event"
750
+ },
751
+ {
752
+ "anonymous": false,
753
+ "inputs": [
754
+ {
755
+ "indexed": true,
756
+ "internalType": "address",
757
+ "name": "caller",
758
+ "type": "address"
759
+ },
760
+ {
761
+ "indexed": true,
762
+ "internalType": "Id",
763
+ "name": "id",
764
+ "type": "bytes32"
765
+ },
766
+ {
767
+ "indexed": false,
768
+ "internalType": "uint256",
769
+ "name": "withdrawnAssets",
770
+ "type": "uint256"
771
+ },
772
+ {
773
+ "indexed": false,
774
+ "internalType": "uint256",
775
+ "name": "withdrawnShares",
776
+ "type": "uint256"
777
+ }
778
+ ],
779
+ "name": "ReallocateWithdraw",
780
+ "type": "event"
781
+ },
782
+ {
783
+ "anonymous": false,
784
+ "inputs": [
785
+ {
786
+ "indexed": true,
787
+ "internalType": "address",
788
+ "name": "caller",
789
+ "type": "address"
790
+ },
791
+ {
792
+ "indexed": true,
793
+ "internalType": "Id",
794
+ "name": "id",
795
+ "type": "bytes32"
796
+ }
797
+ ],
798
+ "name": "RevokePendingCap",
799
+ "type": "event"
800
+ },
801
+ {
802
+ "anonymous": false,
803
+ "inputs": [
804
+ {
805
+ "indexed": true,
806
+ "internalType": "address",
807
+ "name": "caller",
808
+ "type": "address"
809
+ }
810
+ ],
811
+ "name": "RevokePendingGuardian",
812
+ "type": "event"
813
+ },
814
+ {
815
+ "anonymous": false,
816
+ "inputs": [
817
+ {
818
+ "indexed": true,
819
+ "internalType": "address",
820
+ "name": "caller",
821
+ "type": "address"
822
+ },
823
+ {
824
+ "indexed": true,
825
+ "internalType": "Id",
826
+ "name": "id",
827
+ "type": "bytes32"
828
+ }
829
+ ],
830
+ "name": "RevokePendingMarketRemoval",
831
+ "type": "event"
832
+ },
833
+ {
834
+ "anonymous": false,
835
+ "inputs": [
836
+ {
837
+ "indexed": true,
838
+ "internalType": "address",
839
+ "name": "caller",
840
+ "type": "address"
841
+ }
842
+ ],
843
+ "name": "RevokePendingTimelock",
844
+ "type": "event"
845
+ },
846
+ {
847
+ "anonymous": false,
848
+ "inputs": [
849
+ {
850
+ "indexed": true,
851
+ "internalType": "address",
852
+ "name": "caller",
853
+ "type": "address"
854
+ },
855
+ {
856
+ "indexed": true,
857
+ "internalType": "Id",
858
+ "name": "id",
859
+ "type": "bytes32"
860
+ },
861
+ {
862
+ "indexed": false,
863
+ "internalType": "uint256",
864
+ "name": "cap",
865
+ "type": "uint256"
866
+ }
867
+ ],
868
+ "name": "SetCap",
869
+ "type": "event"
870
+ },
871
+ {
872
+ "anonymous": false,
873
+ "inputs": [
874
+ {
875
+ "indexed": true,
876
+ "internalType": "address",
877
+ "name": "newCurator",
878
+ "type": "address"
879
+ }
880
+ ],
881
+ "name": "SetCurator",
882
+ "type": "event"
883
+ },
884
+ {
885
+ "anonymous": false,
886
+ "inputs": [
887
+ {
888
+ "indexed": true,
889
+ "internalType": "address",
890
+ "name": "caller",
891
+ "type": "address"
892
+ },
893
+ {
894
+ "indexed": false,
895
+ "internalType": "uint256",
896
+ "name": "newFee",
897
+ "type": "uint256"
898
+ }
899
+ ],
900
+ "name": "SetFee",
901
+ "type": "event"
902
+ },
903
+ {
904
+ "anonymous": false,
905
+ "inputs": [
906
+ {
907
+ "indexed": true,
908
+ "internalType": "address",
909
+ "name": "newFeeRecipient",
910
+ "type": "address"
911
+ }
912
+ ],
913
+ "name": "SetFeeRecipient",
914
+ "type": "event"
915
+ },
916
+ {
917
+ "anonymous": false,
918
+ "inputs": [
919
+ {
920
+ "indexed": true,
921
+ "internalType": "address",
922
+ "name": "caller",
923
+ "type": "address"
924
+ },
925
+ {
926
+ "indexed": true,
927
+ "internalType": "address",
928
+ "name": "guardian",
929
+ "type": "address"
930
+ }
931
+ ],
932
+ "name": "SetGuardian",
933
+ "type": "event"
934
+ },
935
+ {
936
+ "anonymous": false,
937
+ "inputs": [
938
+ {
939
+ "indexed": true,
940
+ "internalType": "address",
941
+ "name": "allocator",
942
+ "type": "address"
943
+ },
944
+ {
945
+ "indexed": false,
946
+ "internalType": "bool",
947
+ "name": "isAllocator",
948
+ "type": "bool"
949
+ }
950
+ ],
951
+ "name": "SetIsAllocator",
952
+ "type": "event"
953
+ },
954
+ {
955
+ "anonymous": false,
956
+ "inputs": [
957
+ {
958
+ "indexed": true,
959
+ "internalType": "address",
960
+ "name": "newSkimRecipient",
961
+ "type": "address"
962
+ }
963
+ ],
964
+ "name": "SetSkimRecipient",
965
+ "type": "event"
966
+ },
967
+ {
968
+ "anonymous": false,
969
+ "inputs": [
970
+ {
971
+ "indexed": true,
972
+ "internalType": "address",
973
+ "name": "caller",
974
+ "type": "address"
975
+ },
976
+ {
977
+ "indexed": false,
978
+ "internalType": "Id[]",
979
+ "name": "newSupplyQueue",
980
+ "type": "bytes32[]"
981
+ }
982
+ ],
983
+ "name": "SetSupplyQueue",
984
+ "type": "event"
985
+ },
986
+ {
987
+ "anonymous": false,
988
+ "inputs": [
989
+ {
990
+ "indexed": true,
991
+ "internalType": "address",
992
+ "name": "caller",
993
+ "type": "address"
994
+ },
995
+ {
996
+ "indexed": false,
997
+ "internalType": "uint256",
998
+ "name": "newTimelock",
999
+ "type": "uint256"
1000
+ }
1001
+ ],
1002
+ "name": "SetTimelock",
1003
+ "type": "event"
1004
+ },
1005
+ {
1006
+ "anonymous": false,
1007
+ "inputs": [
1008
+ {
1009
+ "indexed": true,
1010
+ "internalType": "address",
1011
+ "name": "caller",
1012
+ "type": "address"
1013
+ },
1014
+ {
1015
+ "indexed": false,
1016
+ "internalType": "Id[]",
1017
+ "name": "newWithdrawQueue",
1018
+ "type": "bytes32[]"
1019
+ }
1020
+ ],
1021
+ "name": "SetWithdrawQueue",
1022
+ "type": "event"
1023
+ },
1024
+ {
1025
+ "anonymous": false,
1026
+ "inputs": [
1027
+ {
1028
+ "indexed": true,
1029
+ "internalType": "address",
1030
+ "name": "caller",
1031
+ "type": "address"
1032
+ },
1033
+ {
1034
+ "indexed": true,
1035
+ "internalType": "address",
1036
+ "name": "token",
1037
+ "type": "address"
1038
+ },
1039
+ {
1040
+ "indexed": false,
1041
+ "internalType": "uint256",
1042
+ "name": "amount",
1043
+ "type": "uint256"
1044
+ }
1045
+ ],
1046
+ "name": "Skim",
1047
+ "type": "event"
1048
+ },
1049
+ {
1050
+ "anonymous": false,
1051
+ "inputs": [
1052
+ {
1053
+ "indexed": true,
1054
+ "internalType": "address",
1055
+ "name": "caller",
1056
+ "type": "address"
1057
+ },
1058
+ {
1059
+ "indexed": true,
1060
+ "internalType": "Id",
1061
+ "name": "id",
1062
+ "type": "bytes32"
1063
+ },
1064
+ {
1065
+ "indexed": false,
1066
+ "internalType": "uint256",
1067
+ "name": "cap",
1068
+ "type": "uint256"
1069
+ }
1070
+ ],
1071
+ "name": "SubmitCap",
1072
+ "type": "event"
1073
+ },
1074
+ {
1075
+ "anonymous": false,
1076
+ "inputs": [
1077
+ {
1078
+ "indexed": true,
1079
+ "internalType": "address",
1080
+ "name": "newGuardian",
1081
+ "type": "address"
1082
+ }
1083
+ ],
1084
+ "name": "SubmitGuardian",
1085
+ "type": "event"
1086
+ },
1087
+ {
1088
+ "anonymous": false,
1089
+ "inputs": [
1090
+ {
1091
+ "indexed": true,
1092
+ "internalType": "address",
1093
+ "name": "caller",
1094
+ "type": "address"
1095
+ },
1096
+ {
1097
+ "indexed": true,
1098
+ "internalType": "Id",
1099
+ "name": "id",
1100
+ "type": "bytes32"
1101
+ }
1102
+ ],
1103
+ "name": "SubmitMarketRemoval",
1104
+ "type": "event"
1105
+ },
1106
+ {
1107
+ "anonymous": false,
1108
+ "inputs": [
1109
+ {
1110
+ "indexed": false,
1111
+ "internalType": "uint256",
1112
+ "name": "newTimelock",
1113
+ "type": "uint256"
1114
+ }
1115
+ ],
1116
+ "name": "SubmitTimelock",
1117
+ "type": "event"
1118
+ },
1119
+ {
1120
+ "anonymous": false,
1121
+ "inputs": [
1122
+ {
1123
+ "indexed": true,
1124
+ "internalType": "address",
1125
+ "name": "from",
1126
+ "type": "address"
1127
+ },
1128
+ {
1129
+ "indexed": true,
1130
+ "internalType": "address",
1131
+ "name": "to",
1132
+ "type": "address"
1133
+ },
1134
+ {
1135
+ "indexed": false,
1136
+ "internalType": "uint256",
1137
+ "name": "value",
1138
+ "type": "uint256"
1139
+ }
1140
+ ],
1141
+ "name": "Transfer",
1142
+ "type": "event"
1143
+ },
1144
+ {
1145
+ "anonymous": false,
1146
+ "inputs": [
1147
+ {
1148
+ "indexed": false,
1149
+ "internalType": "uint256",
1150
+ "name": "updatedTotalAssets",
1151
+ "type": "uint256"
1152
+ }
1153
+ ],
1154
+ "name": "UpdateLastTotalAssets",
1155
+ "type": "event"
1156
+ },
1157
+ {
1158
+ "anonymous": false,
1159
+ "inputs": [
1160
+ {
1161
+ "indexed": true,
1162
+ "internalType": "address",
1163
+ "name": "sender",
1164
+ "type": "address"
1165
+ },
1166
+ {
1167
+ "indexed": true,
1168
+ "internalType": "address",
1169
+ "name": "receiver",
1170
+ "type": "address"
1171
+ },
1172
+ {
1173
+ "indexed": true,
1174
+ "internalType": "address",
1175
+ "name": "owner",
1176
+ "type": "address"
1177
+ },
1178
+ {
1179
+ "indexed": false,
1180
+ "internalType": "uint256",
1181
+ "name": "assets",
1182
+ "type": "uint256"
1183
+ },
1184
+ {
1185
+ "indexed": false,
1186
+ "internalType": "uint256",
1187
+ "name": "shares",
1188
+ "type": "uint256"
1189
+ }
1190
+ ],
1191
+ "name": "Withdraw",
1192
+ "type": "event"
1193
+ },
1194
+ {
1195
+ "inputs": [],
1196
+ "name": "DECIMALS_OFFSET",
1197
+ "outputs": [
1198
+ {
1199
+ "internalType": "uint8",
1200
+ "name": "",
1201
+ "type": "uint8"
1202
+ }
1203
+ ],
1204
+ "stateMutability": "view",
1205
+ "type": "function"
1206
+ },
1207
+ {
1208
+ "inputs": [],
1209
+ "name": "DOMAIN_SEPARATOR",
1210
+ "outputs": [
1211
+ {
1212
+ "internalType": "bytes32",
1213
+ "name": "",
1214
+ "type": "bytes32"
1215
+ }
1216
+ ],
1217
+ "stateMutability": "view",
1218
+ "type": "function"
1219
+ },
1220
+ {
1221
+ "inputs": [],
1222
+ "name": "MORPHO",
1223
+ "outputs": [
1224
+ {
1225
+ "internalType": "contract IMorpho",
1226
+ "name": "",
1227
+ "type": "address"
1228
+ }
1229
+ ],
1230
+ "stateMutability": "view",
1231
+ "type": "function"
1232
+ },
1233
+ {
1234
+ "inputs": [
1235
+ {
1236
+ "components": [
1237
+ {
1238
+ "internalType": "address",
1239
+ "name": "loanToken",
1240
+ "type": "address"
1241
+ },
1242
+ {
1243
+ "internalType": "address",
1244
+ "name": "collateralToken",
1245
+ "type": "address"
1246
+ },
1247
+ {
1248
+ "internalType": "address",
1249
+ "name": "oracle",
1250
+ "type": "address"
1251
+ },
1252
+ {
1253
+ "internalType": "address",
1254
+ "name": "irm",
1255
+ "type": "address"
1256
+ },
1257
+ {
1258
+ "internalType": "uint256",
1259
+ "name": "lltv",
1260
+ "type": "uint256"
1261
+ }
1262
+ ],
1263
+ "internalType": "struct MarketParams",
1264
+ "name": "marketParams",
1265
+ "type": "tuple"
1266
+ }
1267
+ ],
1268
+ "name": "acceptCap",
1269
+ "outputs": [],
1270
+ "stateMutability": "nonpayable",
1271
+ "type": "function"
1272
+ },
1273
+ {
1274
+ "inputs": [],
1275
+ "name": "acceptGuardian",
1276
+ "outputs": [],
1277
+ "stateMutability": "nonpayable",
1278
+ "type": "function"
1279
+ },
1280
+ {
1281
+ "inputs": [],
1282
+ "name": "acceptOwnership",
1283
+ "outputs": [],
1284
+ "stateMutability": "nonpayable",
1285
+ "type": "function"
1286
+ },
1287
+ {
1288
+ "inputs": [],
1289
+ "name": "acceptTimelock",
1290
+ "outputs": [],
1291
+ "stateMutability": "nonpayable",
1292
+ "type": "function"
1293
+ },
1294
+ {
1295
+ "inputs": [
1296
+ {
1297
+ "internalType": "address",
1298
+ "name": "owner",
1299
+ "type": "address"
1300
+ },
1301
+ {
1302
+ "internalType": "address",
1303
+ "name": "spender",
1304
+ "type": "address"
1305
+ }
1306
+ ],
1307
+ "name": "allowance",
1308
+ "outputs": [
1309
+ {
1310
+ "internalType": "uint256",
1311
+ "name": "",
1312
+ "type": "uint256"
1313
+ }
1314
+ ],
1315
+ "stateMutability": "view",
1316
+ "type": "function"
1317
+ },
1318
+ {
1319
+ "inputs": [
1320
+ {
1321
+ "internalType": "address",
1322
+ "name": "spender",
1323
+ "type": "address"
1324
+ },
1325
+ {
1326
+ "internalType": "uint256",
1327
+ "name": "value",
1328
+ "type": "uint256"
1329
+ }
1330
+ ],
1331
+ "name": "approve",
1332
+ "outputs": [
1333
+ {
1334
+ "internalType": "bool",
1335
+ "name": "",
1336
+ "type": "bool"
1337
+ }
1338
+ ],
1339
+ "stateMutability": "nonpayable",
1340
+ "type": "function"
1341
+ },
1342
+ {
1343
+ "inputs": [],
1344
+ "name": "asset",
1345
+ "outputs": [
1346
+ {
1347
+ "internalType": "address",
1348
+ "name": "",
1349
+ "type": "address"
1350
+ }
1351
+ ],
1352
+ "stateMutability": "view",
1353
+ "type": "function"
1354
+ },
1355
+ {
1356
+ "inputs": [
1357
+ {
1358
+ "internalType": "address",
1359
+ "name": "account",
1360
+ "type": "address"
1361
+ }
1362
+ ],
1363
+ "name": "balanceOf",
1364
+ "outputs": [
1365
+ {
1366
+ "internalType": "uint256",
1367
+ "name": "",
1368
+ "type": "uint256"
1369
+ }
1370
+ ],
1371
+ "stateMutability": "view",
1372
+ "type": "function"
1373
+ },
1374
+ {
1375
+ "inputs": [
1376
+ {
1377
+ "internalType": "Id",
1378
+ "name": "",
1379
+ "type": "bytes32"
1380
+ }
1381
+ ],
1382
+ "name": "config",
1383
+ "outputs": [
1384
+ {
1385
+ "internalType": "uint184",
1386
+ "name": "cap",
1387
+ "type": "uint184"
1388
+ },
1389
+ {
1390
+ "internalType": "bool",
1391
+ "name": "enabled",
1392
+ "type": "bool"
1393
+ },
1394
+ {
1395
+ "internalType": "uint64",
1396
+ "name": "removableAt",
1397
+ "type": "uint64"
1398
+ }
1399
+ ],
1400
+ "stateMutability": "view",
1401
+ "type": "function"
1402
+ },
1403
+ {
1404
+ "inputs": [
1405
+ {
1406
+ "internalType": "uint256",
1407
+ "name": "shares",
1408
+ "type": "uint256"
1409
+ }
1410
+ ],
1411
+ "name": "convertToAssets",
1412
+ "outputs": [
1413
+ {
1414
+ "internalType": "uint256",
1415
+ "name": "",
1416
+ "type": "uint256"
1417
+ }
1418
+ ],
1419
+ "stateMutability": "view",
1420
+ "type": "function"
1421
+ },
1422
+ {
1423
+ "inputs": [
1424
+ {
1425
+ "internalType": "uint256",
1426
+ "name": "assets",
1427
+ "type": "uint256"
1428
+ }
1429
+ ],
1430
+ "name": "convertToShares",
1431
+ "outputs": [
1432
+ {
1433
+ "internalType": "uint256",
1434
+ "name": "",
1435
+ "type": "uint256"
1436
+ }
1437
+ ],
1438
+ "stateMutability": "view",
1439
+ "type": "function"
1440
+ },
1441
+ {
1442
+ "inputs": [],
1443
+ "name": "curator",
1444
+ "outputs": [
1445
+ {
1446
+ "internalType": "address",
1447
+ "name": "",
1448
+ "type": "address"
1449
+ }
1450
+ ],
1451
+ "stateMutability": "view",
1452
+ "type": "function"
1453
+ },
1454
+ {
1455
+ "inputs": [],
1456
+ "name": "decimals",
1457
+ "outputs": [
1458
+ {
1459
+ "internalType": "uint8",
1460
+ "name": "",
1461
+ "type": "uint8"
1462
+ }
1463
+ ],
1464
+ "stateMutability": "view",
1465
+ "type": "function"
1466
+ },
1467
+ {
1468
+ "inputs": [
1469
+ {
1470
+ "internalType": "uint256",
1471
+ "name": "assets",
1472
+ "type": "uint256"
1473
+ },
1474
+ {
1475
+ "internalType": "address",
1476
+ "name": "receiver",
1477
+ "type": "address"
1478
+ }
1479
+ ],
1480
+ "name": "deposit",
1481
+ "outputs": [
1482
+ {
1483
+ "internalType": "uint256",
1484
+ "name": "shares",
1485
+ "type": "uint256"
1486
+ }
1487
+ ],
1488
+ "stateMutability": "nonpayable",
1489
+ "type": "function"
1490
+ },
1491
+ {
1492
+ "inputs": [],
1493
+ "name": "eip712Domain",
1494
+ "outputs": [
1495
+ {
1496
+ "internalType": "bytes1",
1497
+ "name": "fields",
1498
+ "type": "bytes1"
1499
+ },
1500
+ {
1501
+ "internalType": "string",
1502
+ "name": "name",
1503
+ "type": "string"
1504
+ },
1505
+ {
1506
+ "internalType": "string",
1507
+ "name": "version",
1508
+ "type": "string"
1509
+ },
1510
+ {
1511
+ "internalType": "uint256",
1512
+ "name": "chainId",
1513
+ "type": "uint256"
1514
+ },
1515
+ {
1516
+ "internalType": "address",
1517
+ "name": "verifyingContract",
1518
+ "type": "address"
1519
+ },
1520
+ {
1521
+ "internalType": "bytes32",
1522
+ "name": "salt",
1523
+ "type": "bytes32"
1524
+ },
1525
+ {
1526
+ "internalType": "uint256[]",
1527
+ "name": "extensions",
1528
+ "type": "uint256[]"
1529
+ }
1530
+ ],
1531
+ "stateMutability": "view",
1532
+ "type": "function"
1533
+ },
1534
+ {
1535
+ "inputs": [],
1536
+ "name": "fee",
1537
+ "outputs": [
1538
+ {
1539
+ "internalType": "uint96",
1540
+ "name": "",
1541
+ "type": "uint96"
1542
+ }
1543
+ ],
1544
+ "stateMutability": "view",
1545
+ "type": "function"
1546
+ },
1547
+ {
1548
+ "inputs": [],
1549
+ "name": "feeRecipient",
1550
+ "outputs": [
1551
+ {
1552
+ "internalType": "address",
1553
+ "name": "",
1554
+ "type": "address"
1555
+ }
1556
+ ],
1557
+ "stateMutability": "view",
1558
+ "type": "function"
1559
+ },
1560
+ {
1561
+ "inputs": [],
1562
+ "name": "guardian",
1563
+ "outputs": [
1564
+ {
1565
+ "internalType": "address",
1566
+ "name": "",
1567
+ "type": "address"
1568
+ }
1569
+ ],
1570
+ "stateMutability": "view",
1571
+ "type": "function"
1572
+ },
1573
+ {
1574
+ "inputs": [
1575
+ {
1576
+ "internalType": "address",
1577
+ "name": "",
1578
+ "type": "address"
1579
+ }
1580
+ ],
1581
+ "name": "isAllocator",
1582
+ "outputs": [
1583
+ {
1584
+ "internalType": "bool",
1585
+ "name": "",
1586
+ "type": "bool"
1587
+ }
1588
+ ],
1589
+ "stateMutability": "view",
1590
+ "type": "function"
1591
+ },
1592
+ {
1593
+ "inputs": [],
1594
+ "name": "lastTotalAssets",
1595
+ "outputs": [
1596
+ {
1597
+ "internalType": "uint256",
1598
+ "name": "",
1599
+ "type": "uint256"
1600
+ }
1601
+ ],
1602
+ "stateMutability": "view",
1603
+ "type": "function"
1604
+ },
1605
+ {
1606
+ "inputs": [
1607
+ {
1608
+ "internalType": "address",
1609
+ "name": "",
1610
+ "type": "address"
1611
+ }
1612
+ ],
1613
+ "name": "maxDeposit",
1614
+ "outputs": [
1615
+ {
1616
+ "internalType": "uint256",
1617
+ "name": "",
1618
+ "type": "uint256"
1619
+ }
1620
+ ],
1621
+ "stateMutability": "view",
1622
+ "type": "function"
1623
+ },
1624
+ {
1625
+ "inputs": [
1626
+ {
1627
+ "internalType": "address",
1628
+ "name": "",
1629
+ "type": "address"
1630
+ }
1631
+ ],
1632
+ "name": "maxMint",
1633
+ "outputs": [
1634
+ {
1635
+ "internalType": "uint256",
1636
+ "name": "",
1637
+ "type": "uint256"
1638
+ }
1639
+ ],
1640
+ "stateMutability": "view",
1641
+ "type": "function"
1642
+ },
1643
+ {
1644
+ "inputs": [
1645
+ {
1646
+ "internalType": "address",
1647
+ "name": "owner",
1648
+ "type": "address"
1649
+ }
1650
+ ],
1651
+ "name": "maxRedeem",
1652
+ "outputs": [
1653
+ {
1654
+ "internalType": "uint256",
1655
+ "name": "",
1656
+ "type": "uint256"
1657
+ }
1658
+ ],
1659
+ "stateMutability": "view",
1660
+ "type": "function"
1661
+ },
1662
+ {
1663
+ "inputs": [
1664
+ {
1665
+ "internalType": "address",
1666
+ "name": "owner",
1667
+ "type": "address"
1668
+ }
1669
+ ],
1670
+ "name": "maxWithdraw",
1671
+ "outputs": [
1672
+ {
1673
+ "internalType": "uint256",
1674
+ "name": "assets",
1675
+ "type": "uint256"
1676
+ }
1677
+ ],
1678
+ "stateMutability": "view",
1679
+ "type": "function"
1680
+ },
1681
+ {
1682
+ "inputs": [
1683
+ {
1684
+ "internalType": "uint256",
1685
+ "name": "shares",
1686
+ "type": "uint256"
1687
+ },
1688
+ {
1689
+ "internalType": "address",
1690
+ "name": "receiver",
1691
+ "type": "address"
1692
+ }
1693
+ ],
1694
+ "name": "mint",
1695
+ "outputs": [
1696
+ {
1697
+ "internalType": "uint256",
1698
+ "name": "assets",
1699
+ "type": "uint256"
1700
+ }
1701
+ ],
1702
+ "stateMutability": "nonpayable",
1703
+ "type": "function"
1704
+ },
1705
+ {
1706
+ "inputs": [
1707
+ {
1708
+ "internalType": "bytes[]",
1709
+ "name": "data",
1710
+ "type": "bytes[]"
1711
+ }
1712
+ ],
1713
+ "name": "multicall",
1714
+ "outputs": [
1715
+ {
1716
+ "internalType": "bytes[]",
1717
+ "name": "results",
1718
+ "type": "bytes[]"
1719
+ }
1720
+ ],
1721
+ "stateMutability": "nonpayable",
1722
+ "type": "function"
1723
+ },
1724
+ {
1725
+ "inputs": [],
1726
+ "name": "name",
1727
+ "outputs": [
1728
+ {
1729
+ "internalType": "string",
1730
+ "name": "",
1731
+ "type": "string"
1732
+ }
1733
+ ],
1734
+ "stateMutability": "view",
1735
+ "type": "function"
1736
+ },
1737
+ {
1738
+ "inputs": [
1739
+ {
1740
+ "internalType": "address",
1741
+ "name": "owner",
1742
+ "type": "address"
1743
+ }
1744
+ ],
1745
+ "name": "nonces",
1746
+ "outputs": [
1747
+ {
1748
+ "internalType": "uint256",
1749
+ "name": "",
1750
+ "type": "uint256"
1751
+ }
1752
+ ],
1753
+ "stateMutability": "view",
1754
+ "type": "function"
1755
+ },
1756
+ {
1757
+ "inputs": [],
1758
+ "name": "owner",
1759
+ "outputs": [
1760
+ {
1761
+ "internalType": "address",
1762
+ "name": "",
1763
+ "type": "address"
1764
+ }
1765
+ ],
1766
+ "stateMutability": "view",
1767
+ "type": "function"
1768
+ },
1769
+ {
1770
+ "inputs": [
1771
+ {
1772
+ "internalType": "Id",
1773
+ "name": "",
1774
+ "type": "bytes32"
1775
+ }
1776
+ ],
1777
+ "name": "pendingCap",
1778
+ "outputs": [
1779
+ {
1780
+ "internalType": "uint192",
1781
+ "name": "value",
1782
+ "type": "uint192"
1783
+ },
1784
+ {
1785
+ "internalType": "uint64",
1786
+ "name": "validAt",
1787
+ "type": "uint64"
1788
+ }
1789
+ ],
1790
+ "stateMutability": "view",
1791
+ "type": "function"
1792
+ },
1793
+ {
1794
+ "inputs": [],
1795
+ "name": "pendingGuardian",
1796
+ "outputs": [
1797
+ {
1798
+ "internalType": "address",
1799
+ "name": "value",
1800
+ "type": "address"
1801
+ },
1802
+ {
1803
+ "internalType": "uint64",
1804
+ "name": "validAt",
1805
+ "type": "uint64"
1806
+ }
1807
+ ],
1808
+ "stateMutability": "view",
1809
+ "type": "function"
1810
+ },
1811
+ {
1812
+ "inputs": [],
1813
+ "name": "pendingOwner",
1814
+ "outputs": [
1815
+ {
1816
+ "internalType": "address",
1817
+ "name": "",
1818
+ "type": "address"
1819
+ }
1820
+ ],
1821
+ "stateMutability": "view",
1822
+ "type": "function"
1823
+ },
1824
+ {
1825
+ "inputs": [],
1826
+ "name": "pendingTimelock",
1827
+ "outputs": [
1828
+ {
1829
+ "internalType": "uint192",
1830
+ "name": "value",
1831
+ "type": "uint192"
1832
+ },
1833
+ {
1834
+ "internalType": "uint64",
1835
+ "name": "validAt",
1836
+ "type": "uint64"
1837
+ }
1838
+ ],
1839
+ "stateMutability": "view",
1840
+ "type": "function"
1841
+ },
1842
+ {
1843
+ "inputs": [
1844
+ {
1845
+ "internalType": "address",
1846
+ "name": "owner",
1847
+ "type": "address"
1848
+ },
1849
+ {
1850
+ "internalType": "address",
1851
+ "name": "spender",
1852
+ "type": "address"
1853
+ },
1854
+ {
1855
+ "internalType": "uint256",
1856
+ "name": "value",
1857
+ "type": "uint256"
1858
+ },
1859
+ {
1860
+ "internalType": "uint256",
1861
+ "name": "deadline",
1862
+ "type": "uint256"
1863
+ },
1864
+ {
1865
+ "internalType": "uint8",
1866
+ "name": "v",
1867
+ "type": "uint8"
1868
+ },
1869
+ {
1870
+ "internalType": "bytes32",
1871
+ "name": "r",
1872
+ "type": "bytes32"
1873
+ },
1874
+ {
1875
+ "internalType": "bytes32",
1876
+ "name": "s",
1877
+ "type": "bytes32"
1878
+ }
1879
+ ],
1880
+ "name": "permit",
1881
+ "outputs": [],
1882
+ "stateMutability": "nonpayable",
1883
+ "type": "function"
1884
+ },
1885
+ {
1886
+ "inputs": [
1887
+ {
1888
+ "internalType": "uint256",
1889
+ "name": "assets",
1890
+ "type": "uint256"
1891
+ }
1892
+ ],
1893
+ "name": "previewDeposit",
1894
+ "outputs": [
1895
+ {
1896
+ "internalType": "uint256",
1897
+ "name": "",
1898
+ "type": "uint256"
1899
+ }
1900
+ ],
1901
+ "stateMutability": "view",
1902
+ "type": "function"
1903
+ },
1904
+ {
1905
+ "inputs": [
1906
+ {
1907
+ "internalType": "uint256",
1908
+ "name": "shares",
1909
+ "type": "uint256"
1910
+ }
1911
+ ],
1912
+ "name": "previewMint",
1913
+ "outputs": [
1914
+ {
1915
+ "internalType": "uint256",
1916
+ "name": "",
1917
+ "type": "uint256"
1918
+ }
1919
+ ],
1920
+ "stateMutability": "view",
1921
+ "type": "function"
1922
+ },
1923
+ {
1924
+ "inputs": [
1925
+ {
1926
+ "internalType": "uint256",
1927
+ "name": "shares",
1928
+ "type": "uint256"
1929
+ }
1930
+ ],
1931
+ "name": "previewRedeem",
1932
+ "outputs": [
1933
+ {
1934
+ "internalType": "uint256",
1935
+ "name": "",
1936
+ "type": "uint256"
1937
+ }
1938
+ ],
1939
+ "stateMutability": "view",
1940
+ "type": "function"
1941
+ },
1942
+ {
1943
+ "inputs": [
1944
+ {
1945
+ "internalType": "uint256",
1946
+ "name": "assets",
1947
+ "type": "uint256"
1948
+ }
1949
+ ],
1950
+ "name": "previewWithdraw",
1951
+ "outputs": [
1952
+ {
1953
+ "internalType": "uint256",
1954
+ "name": "",
1955
+ "type": "uint256"
1956
+ }
1957
+ ],
1958
+ "stateMutability": "view",
1959
+ "type": "function"
1960
+ },
1961
+ {
1962
+ "inputs": [
1963
+ {
1964
+ "components": [
1965
+ {
1966
+ "components": [
1967
+ {
1968
+ "internalType": "address",
1969
+ "name": "loanToken",
1970
+ "type": "address"
1971
+ },
1972
+ {
1973
+ "internalType": "address",
1974
+ "name": "collateralToken",
1975
+ "type": "address"
1976
+ },
1977
+ {
1978
+ "internalType": "address",
1979
+ "name": "oracle",
1980
+ "type": "address"
1981
+ },
1982
+ {
1983
+ "internalType": "address",
1984
+ "name": "irm",
1985
+ "type": "address"
1986
+ },
1987
+ {
1988
+ "internalType": "uint256",
1989
+ "name": "lltv",
1990
+ "type": "uint256"
1991
+ }
1992
+ ],
1993
+ "internalType": "struct MarketParams",
1994
+ "name": "marketParams",
1995
+ "type": "tuple"
1996
+ },
1997
+ {
1998
+ "internalType": "uint256",
1999
+ "name": "assets",
2000
+ "type": "uint256"
2001
+ }
2002
+ ],
2003
+ "internalType": "struct MarketAllocation[]",
2004
+ "name": "allocations",
2005
+ "type": "tuple[]"
2006
+ }
2007
+ ],
2008
+ "name": "reallocate",
2009
+ "outputs": [],
2010
+ "stateMutability": "nonpayable",
2011
+ "type": "function"
2012
+ },
2013
+ {
2014
+ "inputs": [
2015
+ {
2016
+ "internalType": "uint256",
2017
+ "name": "shares",
2018
+ "type": "uint256"
2019
+ },
2020
+ {
2021
+ "internalType": "address",
2022
+ "name": "receiver",
2023
+ "type": "address"
2024
+ },
2025
+ {
2026
+ "internalType": "address",
2027
+ "name": "owner",
2028
+ "type": "address"
2029
+ }
2030
+ ],
2031
+ "name": "redeem",
2032
+ "outputs": [
2033
+ {
2034
+ "internalType": "uint256",
2035
+ "name": "assets",
2036
+ "type": "uint256"
2037
+ }
2038
+ ],
2039
+ "stateMutability": "nonpayable",
2040
+ "type": "function"
2041
+ },
2042
+ {
2043
+ "inputs": [],
2044
+ "name": "renounceOwnership",
2045
+ "outputs": [],
2046
+ "stateMutability": "nonpayable",
2047
+ "type": "function"
2048
+ },
2049
+ {
2050
+ "inputs": [
2051
+ {
2052
+ "internalType": "Id",
2053
+ "name": "id",
2054
+ "type": "bytes32"
2055
+ }
2056
+ ],
2057
+ "name": "revokePendingCap",
2058
+ "outputs": [],
2059
+ "stateMutability": "nonpayable",
2060
+ "type": "function"
2061
+ },
2062
+ {
2063
+ "inputs": [],
2064
+ "name": "revokePendingGuardian",
2065
+ "outputs": [],
2066
+ "stateMutability": "nonpayable",
2067
+ "type": "function"
2068
+ },
2069
+ {
2070
+ "inputs": [
2071
+ {
2072
+ "internalType": "Id",
2073
+ "name": "id",
2074
+ "type": "bytes32"
2075
+ }
2076
+ ],
2077
+ "name": "revokePendingMarketRemoval",
2078
+ "outputs": [],
2079
+ "stateMutability": "nonpayable",
2080
+ "type": "function"
2081
+ },
2082
+ {
2083
+ "inputs": [],
2084
+ "name": "revokePendingTimelock",
2085
+ "outputs": [],
2086
+ "stateMutability": "nonpayable",
2087
+ "type": "function"
2088
+ },
2089
+ {
2090
+ "inputs": [
2091
+ {
2092
+ "internalType": "address",
2093
+ "name": "newCurator",
2094
+ "type": "address"
2095
+ }
2096
+ ],
2097
+ "name": "setCurator",
2098
+ "outputs": [],
2099
+ "stateMutability": "nonpayable",
2100
+ "type": "function"
2101
+ },
2102
+ {
2103
+ "inputs": [
2104
+ {
2105
+ "internalType": "uint256",
2106
+ "name": "newFee",
2107
+ "type": "uint256"
2108
+ }
2109
+ ],
2110
+ "name": "setFee",
2111
+ "outputs": [],
2112
+ "stateMutability": "nonpayable",
2113
+ "type": "function"
2114
+ },
2115
+ {
2116
+ "inputs": [
2117
+ {
2118
+ "internalType": "address",
2119
+ "name": "newFeeRecipient",
2120
+ "type": "address"
2121
+ }
2122
+ ],
2123
+ "name": "setFeeRecipient",
2124
+ "outputs": [],
2125
+ "stateMutability": "nonpayable",
2126
+ "type": "function"
2127
+ },
2128
+ {
2129
+ "inputs": [
2130
+ {
2131
+ "internalType": "address",
2132
+ "name": "newAllocator",
2133
+ "type": "address"
2134
+ },
2135
+ {
2136
+ "internalType": "bool",
2137
+ "name": "newIsAllocator",
2138
+ "type": "bool"
2139
+ }
2140
+ ],
2141
+ "name": "setIsAllocator",
2142
+ "outputs": [],
2143
+ "stateMutability": "nonpayable",
2144
+ "type": "function"
2145
+ },
2146
+ {
2147
+ "inputs": [
2148
+ {
2149
+ "internalType": "address",
2150
+ "name": "newSkimRecipient",
2151
+ "type": "address"
2152
+ }
2153
+ ],
2154
+ "name": "setSkimRecipient",
2155
+ "outputs": [],
2156
+ "stateMutability": "nonpayable",
2157
+ "type": "function"
2158
+ },
2159
+ {
2160
+ "inputs": [
2161
+ {
2162
+ "internalType": "Id[]",
2163
+ "name": "newSupplyQueue",
2164
+ "type": "bytes32[]"
2165
+ }
2166
+ ],
2167
+ "name": "setSupplyQueue",
2168
+ "outputs": [],
2169
+ "stateMutability": "nonpayable",
2170
+ "type": "function"
2171
+ },
2172
+ {
2173
+ "inputs": [
2174
+ {
2175
+ "internalType": "address",
2176
+ "name": "token",
2177
+ "type": "address"
2178
+ }
2179
+ ],
2180
+ "name": "skim",
2181
+ "outputs": [],
2182
+ "stateMutability": "nonpayable",
2183
+ "type": "function"
2184
+ },
2185
+ {
2186
+ "inputs": [],
2187
+ "name": "skimRecipient",
2188
+ "outputs": [
2189
+ {
2190
+ "internalType": "address",
2191
+ "name": "",
2192
+ "type": "address"
2193
+ }
2194
+ ],
2195
+ "stateMutability": "view",
2196
+ "type": "function"
2197
+ },
2198
+ {
2199
+ "inputs": [
2200
+ {
2201
+ "components": [
2202
+ {
2203
+ "internalType": "address",
2204
+ "name": "loanToken",
2205
+ "type": "address"
2206
+ },
2207
+ {
2208
+ "internalType": "address",
2209
+ "name": "collateralToken",
2210
+ "type": "address"
2211
+ },
2212
+ {
2213
+ "internalType": "address",
2214
+ "name": "oracle",
2215
+ "type": "address"
2216
+ },
2217
+ {
2218
+ "internalType": "address",
2219
+ "name": "irm",
2220
+ "type": "address"
2221
+ },
2222
+ {
2223
+ "internalType": "uint256",
2224
+ "name": "lltv",
2225
+ "type": "uint256"
2226
+ }
2227
+ ],
2228
+ "internalType": "struct MarketParams",
2229
+ "name": "marketParams",
2230
+ "type": "tuple"
2231
+ },
2232
+ {
2233
+ "internalType": "uint256",
2234
+ "name": "newSupplyCap",
2235
+ "type": "uint256"
2236
+ }
2237
+ ],
2238
+ "name": "submitCap",
2239
+ "outputs": [],
2240
+ "stateMutability": "nonpayable",
2241
+ "type": "function"
2242
+ },
2243
+ {
2244
+ "inputs": [
2245
+ {
2246
+ "internalType": "address",
2247
+ "name": "newGuardian",
2248
+ "type": "address"
2249
+ }
2250
+ ],
2251
+ "name": "submitGuardian",
2252
+ "outputs": [],
2253
+ "stateMutability": "nonpayable",
2254
+ "type": "function"
2255
+ },
2256
+ {
2257
+ "inputs": [
2258
+ {
2259
+ "components": [
2260
+ {
2261
+ "internalType": "address",
2262
+ "name": "loanToken",
2263
+ "type": "address"
2264
+ },
2265
+ {
2266
+ "internalType": "address",
2267
+ "name": "collateralToken",
2268
+ "type": "address"
2269
+ },
2270
+ {
2271
+ "internalType": "address",
2272
+ "name": "oracle",
2273
+ "type": "address"
2274
+ },
2275
+ {
2276
+ "internalType": "address",
2277
+ "name": "irm",
2278
+ "type": "address"
2279
+ },
2280
+ {
2281
+ "internalType": "uint256",
2282
+ "name": "lltv",
2283
+ "type": "uint256"
2284
+ }
2285
+ ],
2286
+ "internalType": "struct MarketParams",
2287
+ "name": "marketParams",
2288
+ "type": "tuple"
2289
+ }
2290
+ ],
2291
+ "name": "submitMarketRemoval",
2292
+ "outputs": [],
2293
+ "stateMutability": "nonpayable",
2294
+ "type": "function"
2295
+ },
2296
+ {
2297
+ "inputs": [
2298
+ {
2299
+ "internalType": "uint256",
2300
+ "name": "newTimelock",
2301
+ "type": "uint256"
2302
+ }
2303
+ ],
2304
+ "name": "submitTimelock",
2305
+ "outputs": [],
2306
+ "stateMutability": "nonpayable",
2307
+ "type": "function"
2308
+ },
2309
+ {
2310
+ "inputs": [
2311
+ {
2312
+ "internalType": "uint256",
2313
+ "name": "",
2314
+ "type": "uint256"
2315
+ }
2316
+ ],
2317
+ "name": "supplyQueue",
2318
+ "outputs": [
2319
+ {
2320
+ "internalType": "Id",
2321
+ "name": "",
2322
+ "type": "bytes32"
2323
+ }
2324
+ ],
2325
+ "stateMutability": "view",
2326
+ "type": "function"
2327
+ },
2328
+ {
2329
+ "inputs": [],
2330
+ "name": "supplyQueueLength",
2331
+ "outputs": [
2332
+ {
2333
+ "internalType": "uint256",
2334
+ "name": "",
2335
+ "type": "uint256"
2336
+ }
2337
+ ],
2338
+ "stateMutability": "view",
2339
+ "type": "function"
2340
+ },
2341
+ {
2342
+ "inputs": [],
2343
+ "name": "symbol",
2344
+ "outputs": [
2345
+ {
2346
+ "internalType": "string",
2347
+ "name": "",
2348
+ "type": "string"
2349
+ }
2350
+ ],
2351
+ "stateMutability": "view",
2352
+ "type": "function"
2353
+ },
2354
+ {
2355
+ "inputs": [],
2356
+ "name": "timelock",
2357
+ "outputs": [
2358
+ {
2359
+ "internalType": "uint256",
2360
+ "name": "",
2361
+ "type": "uint256"
2362
+ }
2363
+ ],
2364
+ "stateMutability": "view",
2365
+ "type": "function"
2366
+ },
2367
+ {
2368
+ "inputs": [],
2369
+ "name": "totalAssets",
2370
+ "outputs": [
2371
+ {
2372
+ "internalType": "uint256",
2373
+ "name": "assets",
2374
+ "type": "uint256"
2375
+ }
2376
+ ],
2377
+ "stateMutability": "view",
2378
+ "type": "function"
2379
+ },
2380
+ {
2381
+ "inputs": [],
2382
+ "name": "totalSupply",
2383
+ "outputs": [
2384
+ {
2385
+ "internalType": "uint256",
2386
+ "name": "",
2387
+ "type": "uint256"
2388
+ }
2389
+ ],
2390
+ "stateMutability": "view",
2391
+ "type": "function"
2392
+ },
2393
+ {
2394
+ "inputs": [
2395
+ {
2396
+ "internalType": "address",
2397
+ "name": "to",
2398
+ "type": "address"
2399
+ },
2400
+ {
2401
+ "internalType": "uint256",
2402
+ "name": "value",
2403
+ "type": "uint256"
2404
+ }
2405
+ ],
2406
+ "name": "transfer",
2407
+ "outputs": [
2408
+ {
2409
+ "internalType": "bool",
2410
+ "name": "",
2411
+ "type": "bool"
2412
+ }
2413
+ ],
2414
+ "stateMutability": "nonpayable",
2415
+ "type": "function"
2416
+ },
2417
+ {
2418
+ "inputs": [
2419
+ {
2420
+ "internalType": "address",
2421
+ "name": "from",
2422
+ "type": "address"
2423
+ },
2424
+ {
2425
+ "internalType": "address",
2426
+ "name": "to",
2427
+ "type": "address"
2428
+ },
2429
+ {
2430
+ "internalType": "uint256",
2431
+ "name": "value",
2432
+ "type": "uint256"
2433
+ }
2434
+ ],
2435
+ "name": "transferFrom",
2436
+ "outputs": [
2437
+ {
2438
+ "internalType": "bool",
2439
+ "name": "",
2440
+ "type": "bool"
2441
+ }
2442
+ ],
2443
+ "stateMutability": "nonpayable",
2444
+ "type": "function"
2445
+ },
2446
+ {
2447
+ "inputs": [
2448
+ {
2449
+ "internalType": "address",
2450
+ "name": "newOwner",
2451
+ "type": "address"
2452
+ }
2453
+ ],
2454
+ "name": "transferOwnership",
2455
+ "outputs": [],
2456
+ "stateMutability": "nonpayable",
2457
+ "type": "function"
2458
+ },
2459
+ {
2460
+ "inputs": [
2461
+ {
2462
+ "internalType": "uint256[]",
2463
+ "name": "indexes",
2464
+ "type": "uint256[]"
2465
+ }
2466
+ ],
2467
+ "name": "updateWithdrawQueue",
2468
+ "outputs": [],
2469
+ "stateMutability": "nonpayable",
2470
+ "type": "function"
2471
+ },
2472
+ {
2473
+ "inputs": [
2474
+ {
2475
+ "internalType": "uint256",
2476
+ "name": "assets",
2477
+ "type": "uint256"
2478
+ },
2479
+ {
2480
+ "internalType": "address",
2481
+ "name": "receiver",
2482
+ "type": "address"
2483
+ },
2484
+ {
2485
+ "internalType": "address",
2486
+ "name": "owner",
2487
+ "type": "address"
2488
+ }
2489
+ ],
2490
+ "name": "withdraw",
2491
+ "outputs": [
2492
+ {
2493
+ "internalType": "uint256",
2494
+ "name": "shares",
2495
+ "type": "uint256"
2496
+ }
2497
+ ],
2498
+ "stateMutability": "nonpayable",
2499
+ "type": "function"
2500
+ },
2501
+ {
2502
+ "inputs": [
2503
+ {
2504
+ "internalType": "uint256",
2505
+ "name": "",
2506
+ "type": "uint256"
2507
+ }
2508
+ ],
2509
+ "name": "withdrawQueue",
2510
+ "outputs": [
2511
+ {
2512
+ "internalType": "Id",
2513
+ "name": "",
2514
+ "type": "bytes32"
2515
+ }
2516
+ ],
2517
+ "stateMutability": "view",
2518
+ "type": "function"
2519
+ },
2520
+ {
2521
+ "inputs": [],
2522
+ "name": "withdrawQueueLength",
2523
+ "outputs": [
2524
+ {
2525
+ "internalType": "uint256",
2526
+ "name": "",
2527
+ "type": "uint256"
2528
+ }
2529
+ ],
2530
+ "stateMutability": "view",
2531
+ "type": "function"
2532
+ }
2533
+ ] as const satisfies Abi;
2534
+
2535
+ /**
2536
+ * Type-safe ABI for MetaMorpho
2537
+ */
2538
+ export type MetaMorphoAbi = typeof MetaMorphoAbi;
2539
+
2540
+ /**
2541
+ * Contract instance type for MetaMorpho
2542
+ */
2543
+ // Use any for contract type to avoid complex viem type issues
2544
+ // The runtime behavior is type-safe through viem's ABI typing
2545
+ export type MetaMorphoContract = any;
2546
+
2547
+ /**
2548
+ * MetaMorpho Contract Class
2549
+ *
2550
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
2551
+ *
2552
+ * @example
2553
+ * ```typescript
2554
+ * import { createPublicClient, createWalletClient, http } from 'viem';
2555
+ * import { mainnet } from 'viem/chains';
2556
+ * import { MetaMorpho } from 'MetaMorpho';
2557
+ *
2558
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
2559
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
2560
+ *
2561
+ * const contract = new MetaMorpho('0x...', { publicClient, walletClient });
2562
+ *
2563
+ * // Read functions
2564
+ * const result = await contract.balanceOf('0x...');
2565
+ *
2566
+ * // Write functions
2567
+ * const hash = await contract.transfer('0x...', 1000n);
2568
+ *
2569
+ * // Simulate transactions (dry-run)
2570
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
2571
+ * console.log('Gas estimate:', simulation.request.gas);
2572
+ *
2573
+ * // Watch events
2574
+ * const unwatch = contract.watch.Transfer((event) => {
2575
+ * console.log('Transfer event:', event);
2576
+ * });
2577
+ * ```
2578
+ */
2579
+ export class MetaMorpho {
2580
+ private contract: MetaMorphoContract;
2581
+ private contractAddress: Address;
2582
+ private publicClient: PublicClient;
2583
+
2584
+ constructor(
2585
+ address: Address,
2586
+ clients: {
2587
+ publicClient: PublicClient;
2588
+ walletClient?: WalletClient;
2589
+ }
2590
+ ) {
2591
+ this.contractAddress = address;
2592
+ this.publicClient = clients.publicClient;
2593
+ this.contract = getContract({
2594
+ address,
2595
+ abi: MetaMorphoAbi,
2596
+ client: {
2597
+ public: clients.publicClient,
2598
+ wallet: clients.walletClient,
2599
+ },
2600
+ });
2601
+ }
2602
+
2603
+ /**
2604
+ * Get the contract address
2605
+ */
2606
+ get address(): Address {
2607
+ return this.contractAddress;
2608
+ }
2609
+
2610
+ /**
2611
+ * Get the underlying viem contract instance.
2612
+ */
2613
+ getContract(): MetaMorphoContract {
2614
+ return this.contract;
2615
+ }
2616
+
2617
+ /**
2618
+ * DECIMALS_OFFSET
2619
+ * view
2620
+ */
2621
+ async DECIMALS_OFFSET(): Promise<bigint> {
2622
+ return this.contract.read.DECIMALS_OFFSET() as Promise<bigint>;
2623
+ }
2624
+
2625
+ /**
2626
+ * DOMAIN_SEPARATOR
2627
+ * view
2628
+ */
2629
+ async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
2630
+ return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
2631
+ }
2632
+
2633
+ /**
2634
+ * MORPHO
2635
+ * view
2636
+ */
2637
+ async MORPHO(): Promise<`0x${string}`> {
2638
+ return this.contract.read.MORPHO() as Promise<`0x${string}`>;
2639
+ }
2640
+
2641
+ /**
2642
+ * allowance
2643
+ * view
2644
+ */
2645
+ async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
2646
+ return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
2647
+ }
2648
+
2649
+ /**
2650
+ * asset
2651
+ * view
2652
+ */
2653
+ async asset(): Promise<`0x${string}`> {
2654
+ return this.contract.read.asset() as Promise<`0x${string}`>;
2655
+ }
2656
+
2657
+ /**
2658
+ * balanceOf
2659
+ * view
2660
+ */
2661
+ async balanceOf(account: `0x${string}`): Promise<bigint> {
2662
+ return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
2663
+ }
2664
+
2665
+ /**
2666
+ * config
2667
+ * view
2668
+ */
2669
+ async config(arg0: `0x${string}`): Promise<[bigint, boolean, bigint]> {
2670
+ return this.contract.read.config([arg0] as const) as Promise<[bigint, boolean, bigint]>;
2671
+ }
2672
+
2673
+ /**
2674
+ * convertToAssets
2675
+ * view
2676
+ */
2677
+ async convertToAssets(shares: bigint): Promise<bigint> {
2678
+ return this.contract.read.convertToAssets([shares] as const) as Promise<bigint>;
2679
+ }
2680
+
2681
+ /**
2682
+ * convertToShares
2683
+ * view
2684
+ */
2685
+ async convertToShares(assets: bigint): Promise<bigint> {
2686
+ return this.contract.read.convertToShares([assets] as const) as Promise<bigint>;
2687
+ }
2688
+
2689
+ /**
2690
+ * curator
2691
+ * view
2692
+ */
2693
+ async curator(): Promise<`0x${string}`> {
2694
+ return this.contract.read.curator() as Promise<`0x${string}`>;
2695
+ }
2696
+
2697
+ /**
2698
+ * decimals
2699
+ * view
2700
+ */
2701
+ async decimals(): Promise<bigint> {
2702
+ return this.contract.read.decimals() as Promise<bigint>;
2703
+ }
2704
+
2705
+ /**
2706
+ * eip712Domain
2707
+ * view
2708
+ */
2709
+ async eip712Domain(): Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]> {
2710
+ return this.contract.read.eip712Domain() as Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]>;
2711
+ }
2712
+
2713
+ /**
2714
+ * fee
2715
+ * view
2716
+ */
2717
+ async fee(): Promise<bigint> {
2718
+ return this.contract.read.fee() as Promise<bigint>;
2719
+ }
2720
+
2721
+ /**
2722
+ * feeRecipient
2723
+ * view
2724
+ */
2725
+ async feeRecipient(): Promise<`0x${string}`> {
2726
+ return this.contract.read.feeRecipient() as Promise<`0x${string}`>;
2727
+ }
2728
+
2729
+ /**
2730
+ * guardian
2731
+ * view
2732
+ */
2733
+ async guardian(): Promise<`0x${string}`> {
2734
+ return this.contract.read.guardian() as Promise<`0x${string}`>;
2735
+ }
2736
+
2737
+ /**
2738
+ * isAllocator
2739
+ * view
2740
+ */
2741
+ async isAllocator(arg0: `0x${string}`): Promise<boolean> {
2742
+ return this.contract.read.isAllocator([arg0] as const) as Promise<boolean>;
2743
+ }
2744
+
2745
+ /**
2746
+ * lastTotalAssets
2747
+ * view
2748
+ */
2749
+ async lastTotalAssets(): Promise<bigint> {
2750
+ return this.contract.read.lastTotalAssets() as Promise<bigint>;
2751
+ }
2752
+
2753
+ /**
2754
+ * maxDeposit
2755
+ * view
2756
+ */
2757
+ async maxDeposit(arg0: `0x${string}`): Promise<bigint> {
2758
+ return this.contract.read.maxDeposit([arg0] as const) as Promise<bigint>;
2759
+ }
2760
+
2761
+ /**
2762
+ * maxMint
2763
+ * view
2764
+ */
2765
+ async maxMint(arg0: `0x${string}`): Promise<bigint> {
2766
+ return this.contract.read.maxMint([arg0] as const) as Promise<bigint>;
2767
+ }
2768
+
2769
+ /**
2770
+ * maxRedeem
2771
+ * view
2772
+ */
2773
+ async maxRedeem(owner: `0x${string}`): Promise<bigint> {
2774
+ return this.contract.read.maxRedeem([owner] as const) as Promise<bigint>;
2775
+ }
2776
+
2777
+ /**
2778
+ * maxWithdraw
2779
+ * view
2780
+ */
2781
+ async maxWithdraw(owner: `0x${string}`): Promise<bigint> {
2782
+ return this.contract.read.maxWithdraw([owner] as const) as Promise<bigint>;
2783
+ }
2784
+
2785
+ /**
2786
+ * name
2787
+ * view
2788
+ */
2789
+ async name(): Promise<string> {
2790
+ return this.contract.read.name() as Promise<string>;
2791
+ }
2792
+
2793
+ /**
2794
+ * nonces
2795
+ * view
2796
+ */
2797
+ async nonces(owner: `0x${string}`): Promise<bigint> {
2798
+ return this.contract.read.nonces([owner] as const) as Promise<bigint>;
2799
+ }
2800
+
2801
+ /**
2802
+ * owner
2803
+ * view
2804
+ */
2805
+ async owner(): Promise<`0x${string}`> {
2806
+ return this.contract.read.owner() as Promise<`0x${string}`>;
2807
+ }
2808
+
2809
+ /**
2810
+ * pendingCap
2811
+ * view
2812
+ */
2813
+ async pendingCap(arg0: `0x${string}`): Promise<[bigint, bigint]> {
2814
+ return this.contract.read.pendingCap([arg0] as const) as Promise<[bigint, bigint]>;
2815
+ }
2816
+
2817
+ /**
2818
+ * pendingGuardian
2819
+ * view
2820
+ */
2821
+ async pendingGuardian(): Promise<[`0x${string}`, bigint]> {
2822
+ return this.contract.read.pendingGuardian() as Promise<[`0x${string}`, bigint]>;
2823
+ }
2824
+
2825
+ /**
2826
+ * pendingOwner
2827
+ * view
2828
+ */
2829
+ async pendingOwner(): Promise<`0x${string}`> {
2830
+ return this.contract.read.pendingOwner() as Promise<`0x${string}`>;
2831
+ }
2832
+
2833
+ /**
2834
+ * pendingTimelock
2835
+ * view
2836
+ */
2837
+ async pendingTimelock(): Promise<[bigint, bigint]> {
2838
+ return this.contract.read.pendingTimelock() as Promise<[bigint, bigint]>;
2839
+ }
2840
+
2841
+ /**
2842
+ * previewDeposit
2843
+ * view
2844
+ */
2845
+ async previewDeposit(assets: bigint): Promise<bigint> {
2846
+ return this.contract.read.previewDeposit([assets] as const) as Promise<bigint>;
2847
+ }
2848
+
2849
+ /**
2850
+ * previewMint
2851
+ * view
2852
+ */
2853
+ async previewMint(shares: bigint): Promise<bigint> {
2854
+ return this.contract.read.previewMint([shares] as const) as Promise<bigint>;
2855
+ }
2856
+
2857
+ /**
2858
+ * previewRedeem
2859
+ * view
2860
+ */
2861
+ async previewRedeem(shares: bigint): Promise<bigint> {
2862
+ return this.contract.read.previewRedeem([shares] as const) as Promise<bigint>;
2863
+ }
2864
+
2865
+ /**
2866
+ * previewWithdraw
2867
+ * view
2868
+ */
2869
+ async previewWithdraw(assets: bigint): Promise<bigint> {
2870
+ return this.contract.read.previewWithdraw([assets] as const) as Promise<bigint>;
2871
+ }
2872
+
2873
+ /**
2874
+ * skimRecipient
2875
+ * view
2876
+ */
2877
+ async skimRecipient(): Promise<`0x${string}`> {
2878
+ return this.contract.read.skimRecipient() as Promise<`0x${string}`>;
2879
+ }
2880
+
2881
+ /**
2882
+ * supplyQueue
2883
+ * view
2884
+ */
2885
+ async supplyQueue(arg0: bigint): Promise<`0x${string}`> {
2886
+ return this.contract.read.supplyQueue([arg0] as const) as Promise<`0x${string}`>;
2887
+ }
2888
+
2889
+ /**
2890
+ * supplyQueueLength
2891
+ * view
2892
+ */
2893
+ async supplyQueueLength(): Promise<bigint> {
2894
+ return this.contract.read.supplyQueueLength() as Promise<bigint>;
2895
+ }
2896
+
2897
+ /**
2898
+ * symbol
2899
+ * view
2900
+ */
2901
+ async symbol(): Promise<string> {
2902
+ return this.contract.read.symbol() as Promise<string>;
2903
+ }
2904
+
2905
+ /**
2906
+ * timelock
2907
+ * view
2908
+ */
2909
+ async timelock(): Promise<bigint> {
2910
+ return this.contract.read.timelock() as Promise<bigint>;
2911
+ }
2912
+
2913
+ /**
2914
+ * totalAssets
2915
+ * view
2916
+ */
2917
+ async totalAssets(): Promise<bigint> {
2918
+ return this.contract.read.totalAssets() as Promise<bigint>;
2919
+ }
2920
+
2921
+ /**
2922
+ * totalSupply
2923
+ * view
2924
+ */
2925
+ async totalSupply(): Promise<bigint> {
2926
+ return this.contract.read.totalSupply() as Promise<bigint>;
2927
+ }
2928
+
2929
+ /**
2930
+ * withdrawQueue
2931
+ * view
2932
+ */
2933
+ async withdrawQueue(arg0: bigint): Promise<`0x${string}`> {
2934
+ return this.contract.read.withdrawQueue([arg0] as const) as Promise<`0x${string}`>;
2935
+ }
2936
+
2937
+ /**
2938
+ * withdrawQueueLength
2939
+ * view
2940
+ */
2941
+ async withdrawQueueLength(): Promise<bigint> {
2942
+ return this.contract.read.withdrawQueueLength() as Promise<bigint>;
2943
+ }
2944
+
2945
+ /**
2946
+ * acceptCap
2947
+ * nonpayable
2948
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2949
+ */
2950
+ async acceptCap(marketParams: MarketParams, options?: {
2951
+ accessList?: import('viem').AccessList;
2952
+ authorizationList?: import('viem').AuthorizationList;
2953
+ chain?: import('viem').Chain | null;
2954
+ dataSuffix?: `0x${string}`;
2955
+ gas?: bigint;
2956
+ gasPrice?: bigint;
2957
+ maxFeePerGas?: bigint;
2958
+ maxPriorityFeePerGas?: bigint;
2959
+ nonce?: number;
2960
+ value?: bigint;
2961
+ }): Promise<`0x${string}`> {
2962
+ if (!this.contract.write) {
2963
+ throw new Error('Wallet client is required for write operations');
2964
+ }
2965
+ return this.contract.write.acceptCap([marketParams] as const, options) as Promise<`0x${string}`>;
2966
+ }
2967
+
2968
+ /**
2969
+ * acceptGuardian
2970
+ * nonpayable
2971
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2972
+ */
2973
+ async acceptGuardian(options?: {
2974
+ accessList?: import('viem').AccessList;
2975
+ authorizationList?: import('viem').AuthorizationList;
2976
+ chain?: import('viem').Chain | null;
2977
+ dataSuffix?: `0x${string}`;
2978
+ gas?: bigint;
2979
+ gasPrice?: bigint;
2980
+ maxFeePerGas?: bigint;
2981
+ maxPriorityFeePerGas?: bigint;
2982
+ nonce?: number;
2983
+ value?: bigint;
2984
+ }): Promise<`0x${string}`> {
2985
+ if (!this.contract.write) {
2986
+ throw new Error('Wallet client is required for write operations');
2987
+ }
2988
+ return this.contract.write.acceptGuardian(options) as Promise<`0x${string}`>;
2989
+ }
2990
+
2991
+ /**
2992
+ * acceptOwnership
2993
+ * nonpayable
2994
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2995
+ */
2996
+ async acceptOwnership(options?: {
2997
+ accessList?: import('viem').AccessList;
2998
+ authorizationList?: import('viem').AuthorizationList;
2999
+ chain?: import('viem').Chain | null;
3000
+ dataSuffix?: `0x${string}`;
3001
+ gas?: bigint;
3002
+ gasPrice?: bigint;
3003
+ maxFeePerGas?: bigint;
3004
+ maxPriorityFeePerGas?: bigint;
3005
+ nonce?: number;
3006
+ value?: bigint;
3007
+ }): Promise<`0x${string}`> {
3008
+ if (!this.contract.write) {
3009
+ throw new Error('Wallet client is required for write operations');
3010
+ }
3011
+ return this.contract.write.acceptOwnership(options) as Promise<`0x${string}`>;
3012
+ }
3013
+
3014
+ /**
3015
+ * acceptTimelock
3016
+ * nonpayable
3017
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3018
+ */
3019
+ async acceptTimelock(options?: {
3020
+ accessList?: import('viem').AccessList;
3021
+ authorizationList?: import('viem').AuthorizationList;
3022
+ chain?: import('viem').Chain | null;
3023
+ dataSuffix?: `0x${string}`;
3024
+ gas?: bigint;
3025
+ gasPrice?: bigint;
3026
+ maxFeePerGas?: bigint;
3027
+ maxPriorityFeePerGas?: bigint;
3028
+ nonce?: number;
3029
+ value?: bigint;
3030
+ }): Promise<`0x${string}`> {
3031
+ if (!this.contract.write) {
3032
+ throw new Error('Wallet client is required for write operations');
3033
+ }
3034
+ return this.contract.write.acceptTimelock(options) as Promise<`0x${string}`>;
3035
+ }
3036
+
3037
+ /**
3038
+ * approve
3039
+ * nonpayable
3040
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3041
+ */
3042
+ async approve(spender: `0x${string}`, value: bigint, options?: {
3043
+ accessList?: import('viem').AccessList;
3044
+ authorizationList?: import('viem').AuthorizationList;
3045
+ chain?: import('viem').Chain | null;
3046
+ dataSuffix?: `0x${string}`;
3047
+ gas?: bigint;
3048
+ gasPrice?: bigint;
3049
+ maxFeePerGas?: bigint;
3050
+ maxPriorityFeePerGas?: bigint;
3051
+ nonce?: number;
3052
+ value?: bigint;
3053
+ }): Promise<`0x${string}`> {
3054
+ if (!this.contract.write) {
3055
+ throw new Error('Wallet client is required for write operations');
3056
+ }
3057
+ return this.contract.write.approve([spender, value] as const, options) as Promise<`0x${string}`>;
3058
+ }
3059
+
3060
+ /**
3061
+ * deposit
3062
+ * nonpayable
3063
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3064
+ */
3065
+ async deposit(assets: bigint, receiver: `0x${string}`, options?: {
3066
+ accessList?: import('viem').AccessList;
3067
+ authorizationList?: import('viem').AuthorizationList;
3068
+ chain?: import('viem').Chain | null;
3069
+ dataSuffix?: `0x${string}`;
3070
+ gas?: bigint;
3071
+ gasPrice?: bigint;
3072
+ maxFeePerGas?: bigint;
3073
+ maxPriorityFeePerGas?: bigint;
3074
+ nonce?: number;
3075
+ value?: bigint;
3076
+ }): Promise<`0x${string}`> {
3077
+ if (!this.contract.write) {
3078
+ throw new Error('Wallet client is required for write operations');
3079
+ }
3080
+ return this.contract.write.deposit([assets, receiver] as const, options) as Promise<`0x${string}`>;
3081
+ }
3082
+
3083
+ /**
3084
+ * mint
3085
+ * nonpayable
3086
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3087
+ */
3088
+ async mint(shares: bigint, receiver: `0x${string}`, options?: {
3089
+ accessList?: import('viem').AccessList;
3090
+ authorizationList?: import('viem').AuthorizationList;
3091
+ chain?: import('viem').Chain | null;
3092
+ dataSuffix?: `0x${string}`;
3093
+ gas?: bigint;
3094
+ gasPrice?: bigint;
3095
+ maxFeePerGas?: bigint;
3096
+ maxPriorityFeePerGas?: bigint;
3097
+ nonce?: number;
3098
+ value?: bigint;
3099
+ }): Promise<`0x${string}`> {
3100
+ if (!this.contract.write) {
3101
+ throw new Error('Wallet client is required for write operations');
3102
+ }
3103
+ return this.contract.write.mint([shares, receiver] as const, options) as Promise<`0x${string}`>;
3104
+ }
3105
+
3106
+ /**
3107
+ * multicall
3108
+ * nonpayable
3109
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3110
+ */
3111
+ async multicall(data: `0x${string}`[], options?: {
3112
+ accessList?: import('viem').AccessList;
3113
+ authorizationList?: import('viem').AuthorizationList;
3114
+ chain?: import('viem').Chain | null;
3115
+ dataSuffix?: `0x${string}`;
3116
+ gas?: bigint;
3117
+ gasPrice?: bigint;
3118
+ maxFeePerGas?: bigint;
3119
+ maxPriorityFeePerGas?: bigint;
3120
+ nonce?: number;
3121
+ value?: bigint;
3122
+ }): Promise<`0x${string}`> {
3123
+ if (!this.contract.write) {
3124
+ throw new Error('Wallet client is required for write operations');
3125
+ }
3126
+ return this.contract.write.multicall([data] as const, options) as Promise<`0x${string}`>;
3127
+ }
3128
+
3129
+ /**
3130
+ * permit
3131
+ * nonpayable
3132
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3133
+ */
3134
+ async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
3135
+ accessList?: import('viem').AccessList;
3136
+ authorizationList?: import('viem').AuthorizationList;
3137
+ chain?: import('viem').Chain | null;
3138
+ dataSuffix?: `0x${string}`;
3139
+ gas?: bigint;
3140
+ gasPrice?: bigint;
3141
+ maxFeePerGas?: bigint;
3142
+ maxPriorityFeePerGas?: bigint;
3143
+ nonce?: number;
3144
+ value?: bigint;
3145
+ }): Promise<`0x${string}`> {
3146
+ if (!this.contract.write) {
3147
+ throw new Error('Wallet client is required for write operations');
3148
+ }
3149
+ return this.contract.write.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<`0x${string}`>;
3150
+ }
3151
+
3152
+ /**
3153
+ * reallocate
3154
+ * nonpayable
3155
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3156
+ */
3157
+ async reallocate(allocations: MarketAllocation[], options?: {
3158
+ accessList?: import('viem').AccessList;
3159
+ authorizationList?: import('viem').AuthorizationList;
3160
+ chain?: import('viem').Chain | null;
3161
+ dataSuffix?: `0x${string}`;
3162
+ gas?: bigint;
3163
+ gasPrice?: bigint;
3164
+ maxFeePerGas?: bigint;
3165
+ maxPriorityFeePerGas?: bigint;
3166
+ nonce?: number;
3167
+ value?: bigint;
3168
+ }): Promise<`0x${string}`> {
3169
+ if (!this.contract.write) {
3170
+ throw new Error('Wallet client is required for write operations');
3171
+ }
3172
+ return this.contract.write.reallocate([allocations] as const, options) as Promise<`0x${string}`>;
3173
+ }
3174
+
3175
+ /**
3176
+ * redeem
3177
+ * nonpayable
3178
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3179
+ */
3180
+ async redeem(shares: bigint, receiver: `0x${string}`, owner: `0x${string}`, options?: {
3181
+ accessList?: import('viem').AccessList;
3182
+ authorizationList?: import('viem').AuthorizationList;
3183
+ chain?: import('viem').Chain | null;
3184
+ dataSuffix?: `0x${string}`;
3185
+ gas?: bigint;
3186
+ gasPrice?: bigint;
3187
+ maxFeePerGas?: bigint;
3188
+ maxPriorityFeePerGas?: bigint;
3189
+ nonce?: number;
3190
+ value?: bigint;
3191
+ }): Promise<`0x${string}`> {
3192
+ if (!this.contract.write) {
3193
+ throw new Error('Wallet client is required for write operations');
3194
+ }
3195
+ return this.contract.write.redeem([shares, receiver, owner] as const, options) as Promise<`0x${string}`>;
3196
+ }
3197
+
3198
+ /**
3199
+ * renounceOwnership
3200
+ * nonpayable
3201
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3202
+ */
3203
+ async renounceOwnership(options?: {
3204
+ accessList?: import('viem').AccessList;
3205
+ authorizationList?: import('viem').AuthorizationList;
3206
+ chain?: import('viem').Chain | null;
3207
+ dataSuffix?: `0x${string}`;
3208
+ gas?: bigint;
3209
+ gasPrice?: bigint;
3210
+ maxFeePerGas?: bigint;
3211
+ maxPriorityFeePerGas?: bigint;
3212
+ nonce?: number;
3213
+ value?: bigint;
3214
+ }): Promise<`0x${string}`> {
3215
+ if (!this.contract.write) {
3216
+ throw new Error('Wallet client is required for write operations');
3217
+ }
3218
+ return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
3219
+ }
3220
+
3221
+ /**
3222
+ * revokePendingCap
3223
+ * nonpayable
3224
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3225
+ */
3226
+ async revokePendingCap(id: `0x${string}`, options?: {
3227
+ accessList?: import('viem').AccessList;
3228
+ authorizationList?: import('viem').AuthorizationList;
3229
+ chain?: import('viem').Chain | null;
3230
+ dataSuffix?: `0x${string}`;
3231
+ gas?: bigint;
3232
+ gasPrice?: bigint;
3233
+ maxFeePerGas?: bigint;
3234
+ maxPriorityFeePerGas?: bigint;
3235
+ nonce?: number;
3236
+ value?: bigint;
3237
+ }): Promise<`0x${string}`> {
3238
+ if (!this.contract.write) {
3239
+ throw new Error('Wallet client is required for write operations');
3240
+ }
3241
+ return this.contract.write.revokePendingCap([id] as const, options) as Promise<`0x${string}`>;
3242
+ }
3243
+
3244
+ /**
3245
+ * revokePendingGuardian
3246
+ * nonpayable
3247
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3248
+ */
3249
+ async revokePendingGuardian(options?: {
3250
+ accessList?: import('viem').AccessList;
3251
+ authorizationList?: import('viem').AuthorizationList;
3252
+ chain?: import('viem').Chain | null;
3253
+ dataSuffix?: `0x${string}`;
3254
+ gas?: bigint;
3255
+ gasPrice?: bigint;
3256
+ maxFeePerGas?: bigint;
3257
+ maxPriorityFeePerGas?: bigint;
3258
+ nonce?: number;
3259
+ value?: bigint;
3260
+ }): Promise<`0x${string}`> {
3261
+ if (!this.contract.write) {
3262
+ throw new Error('Wallet client is required for write operations');
3263
+ }
3264
+ return this.contract.write.revokePendingGuardian(options) as Promise<`0x${string}`>;
3265
+ }
3266
+
3267
+ /**
3268
+ * revokePendingMarketRemoval
3269
+ * nonpayable
3270
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3271
+ */
3272
+ async revokePendingMarketRemoval(id: `0x${string}`, options?: {
3273
+ accessList?: import('viem').AccessList;
3274
+ authorizationList?: import('viem').AuthorizationList;
3275
+ chain?: import('viem').Chain | null;
3276
+ dataSuffix?: `0x${string}`;
3277
+ gas?: bigint;
3278
+ gasPrice?: bigint;
3279
+ maxFeePerGas?: bigint;
3280
+ maxPriorityFeePerGas?: bigint;
3281
+ nonce?: number;
3282
+ value?: bigint;
3283
+ }): Promise<`0x${string}`> {
3284
+ if (!this.contract.write) {
3285
+ throw new Error('Wallet client is required for write operations');
3286
+ }
3287
+ return this.contract.write.revokePendingMarketRemoval([id] as const, options) as Promise<`0x${string}`>;
3288
+ }
3289
+
3290
+ /**
3291
+ * revokePendingTimelock
3292
+ * nonpayable
3293
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3294
+ */
3295
+ async revokePendingTimelock(options?: {
3296
+ accessList?: import('viem').AccessList;
3297
+ authorizationList?: import('viem').AuthorizationList;
3298
+ chain?: import('viem').Chain | null;
3299
+ dataSuffix?: `0x${string}`;
3300
+ gas?: bigint;
3301
+ gasPrice?: bigint;
3302
+ maxFeePerGas?: bigint;
3303
+ maxPriorityFeePerGas?: bigint;
3304
+ nonce?: number;
3305
+ value?: bigint;
3306
+ }): Promise<`0x${string}`> {
3307
+ if (!this.contract.write) {
3308
+ throw new Error('Wallet client is required for write operations');
3309
+ }
3310
+ return this.contract.write.revokePendingTimelock(options) as Promise<`0x${string}`>;
3311
+ }
3312
+
3313
+ /**
3314
+ * setCurator
3315
+ * nonpayable
3316
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3317
+ */
3318
+ async setCurator(newCurator: `0x${string}`, options?: {
3319
+ accessList?: import('viem').AccessList;
3320
+ authorizationList?: import('viem').AuthorizationList;
3321
+ chain?: import('viem').Chain | null;
3322
+ dataSuffix?: `0x${string}`;
3323
+ gas?: bigint;
3324
+ gasPrice?: bigint;
3325
+ maxFeePerGas?: bigint;
3326
+ maxPriorityFeePerGas?: bigint;
3327
+ nonce?: number;
3328
+ value?: bigint;
3329
+ }): Promise<`0x${string}`> {
3330
+ if (!this.contract.write) {
3331
+ throw new Error('Wallet client is required for write operations');
3332
+ }
3333
+ return this.contract.write.setCurator([newCurator] as const, options) as Promise<`0x${string}`>;
3334
+ }
3335
+
3336
+ /**
3337
+ * setFee
3338
+ * nonpayable
3339
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3340
+ */
3341
+ async setFee(newFee: bigint, options?: {
3342
+ accessList?: import('viem').AccessList;
3343
+ authorizationList?: import('viem').AuthorizationList;
3344
+ chain?: import('viem').Chain | null;
3345
+ dataSuffix?: `0x${string}`;
3346
+ gas?: bigint;
3347
+ gasPrice?: bigint;
3348
+ maxFeePerGas?: bigint;
3349
+ maxPriorityFeePerGas?: bigint;
3350
+ nonce?: number;
3351
+ value?: bigint;
3352
+ }): Promise<`0x${string}`> {
3353
+ if (!this.contract.write) {
3354
+ throw new Error('Wallet client is required for write operations');
3355
+ }
3356
+ return this.contract.write.setFee([newFee] as const, options) as Promise<`0x${string}`>;
3357
+ }
3358
+
3359
+ /**
3360
+ * setFeeRecipient
3361
+ * nonpayable
3362
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3363
+ */
3364
+ async setFeeRecipient(newFeeRecipient: `0x${string}`, options?: {
3365
+ accessList?: import('viem').AccessList;
3366
+ authorizationList?: import('viem').AuthorizationList;
3367
+ chain?: import('viem').Chain | null;
3368
+ dataSuffix?: `0x${string}`;
3369
+ gas?: bigint;
3370
+ gasPrice?: bigint;
3371
+ maxFeePerGas?: bigint;
3372
+ maxPriorityFeePerGas?: bigint;
3373
+ nonce?: number;
3374
+ value?: bigint;
3375
+ }): Promise<`0x${string}`> {
3376
+ if (!this.contract.write) {
3377
+ throw new Error('Wallet client is required for write operations');
3378
+ }
3379
+ return this.contract.write.setFeeRecipient([newFeeRecipient] as const, options) as Promise<`0x${string}`>;
3380
+ }
3381
+
3382
+ /**
3383
+ * setIsAllocator
3384
+ * nonpayable
3385
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3386
+ */
3387
+ async setIsAllocator(newAllocator: `0x${string}`, newIsAllocator: boolean, options?: {
3388
+ accessList?: import('viem').AccessList;
3389
+ authorizationList?: import('viem').AuthorizationList;
3390
+ chain?: import('viem').Chain | null;
3391
+ dataSuffix?: `0x${string}`;
3392
+ gas?: bigint;
3393
+ gasPrice?: bigint;
3394
+ maxFeePerGas?: bigint;
3395
+ maxPriorityFeePerGas?: bigint;
3396
+ nonce?: number;
3397
+ value?: bigint;
3398
+ }): Promise<`0x${string}`> {
3399
+ if (!this.contract.write) {
3400
+ throw new Error('Wallet client is required for write operations');
3401
+ }
3402
+ return this.contract.write.setIsAllocator([newAllocator, newIsAllocator] as const, options) as Promise<`0x${string}`>;
3403
+ }
3404
+
3405
+ /**
3406
+ * setSkimRecipient
3407
+ * nonpayable
3408
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3409
+ */
3410
+ async setSkimRecipient(newSkimRecipient: `0x${string}`, options?: {
3411
+ accessList?: import('viem').AccessList;
3412
+ authorizationList?: import('viem').AuthorizationList;
3413
+ chain?: import('viem').Chain | null;
3414
+ dataSuffix?: `0x${string}`;
3415
+ gas?: bigint;
3416
+ gasPrice?: bigint;
3417
+ maxFeePerGas?: bigint;
3418
+ maxPriorityFeePerGas?: bigint;
3419
+ nonce?: number;
3420
+ value?: bigint;
3421
+ }): Promise<`0x${string}`> {
3422
+ if (!this.contract.write) {
3423
+ throw new Error('Wallet client is required for write operations');
3424
+ }
3425
+ return this.contract.write.setSkimRecipient([newSkimRecipient] as const, options) as Promise<`0x${string}`>;
3426
+ }
3427
+
3428
+ /**
3429
+ * setSupplyQueue
3430
+ * nonpayable
3431
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3432
+ */
3433
+ async setSupplyQueue(newSupplyQueue: `0x${string}`[], options?: {
3434
+ accessList?: import('viem').AccessList;
3435
+ authorizationList?: import('viem').AuthorizationList;
3436
+ chain?: import('viem').Chain | null;
3437
+ dataSuffix?: `0x${string}`;
3438
+ gas?: bigint;
3439
+ gasPrice?: bigint;
3440
+ maxFeePerGas?: bigint;
3441
+ maxPriorityFeePerGas?: bigint;
3442
+ nonce?: number;
3443
+ value?: bigint;
3444
+ }): Promise<`0x${string}`> {
3445
+ if (!this.contract.write) {
3446
+ throw new Error('Wallet client is required for write operations');
3447
+ }
3448
+ return this.contract.write.setSupplyQueue([newSupplyQueue] as const, options) as Promise<`0x${string}`>;
3449
+ }
3450
+
3451
+ /**
3452
+ * skim
3453
+ * nonpayable
3454
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3455
+ */
3456
+ async skim(token: `0x${string}`, options?: {
3457
+ accessList?: import('viem').AccessList;
3458
+ authorizationList?: import('viem').AuthorizationList;
3459
+ chain?: import('viem').Chain | null;
3460
+ dataSuffix?: `0x${string}`;
3461
+ gas?: bigint;
3462
+ gasPrice?: bigint;
3463
+ maxFeePerGas?: bigint;
3464
+ maxPriorityFeePerGas?: bigint;
3465
+ nonce?: number;
3466
+ value?: bigint;
3467
+ }): Promise<`0x${string}`> {
3468
+ if (!this.contract.write) {
3469
+ throw new Error('Wallet client is required for write operations');
3470
+ }
3471
+ return this.contract.write.skim([token] as const, options) as Promise<`0x${string}`>;
3472
+ }
3473
+
3474
+ /**
3475
+ * submitCap
3476
+ * nonpayable
3477
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3478
+ */
3479
+ async submitCap(marketParams: MarketParams, newSupplyCap: bigint, options?: {
3480
+ accessList?: import('viem').AccessList;
3481
+ authorizationList?: import('viem').AuthorizationList;
3482
+ chain?: import('viem').Chain | null;
3483
+ dataSuffix?: `0x${string}`;
3484
+ gas?: bigint;
3485
+ gasPrice?: bigint;
3486
+ maxFeePerGas?: bigint;
3487
+ maxPriorityFeePerGas?: bigint;
3488
+ nonce?: number;
3489
+ value?: bigint;
3490
+ }): Promise<`0x${string}`> {
3491
+ if (!this.contract.write) {
3492
+ throw new Error('Wallet client is required for write operations');
3493
+ }
3494
+ return this.contract.write.submitCap([marketParams, newSupplyCap] as const, options) as Promise<`0x${string}`>;
3495
+ }
3496
+
3497
+ /**
3498
+ * submitGuardian
3499
+ * nonpayable
3500
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3501
+ */
3502
+ async submitGuardian(newGuardian: `0x${string}`, options?: {
3503
+ accessList?: import('viem').AccessList;
3504
+ authorizationList?: import('viem').AuthorizationList;
3505
+ chain?: import('viem').Chain | null;
3506
+ dataSuffix?: `0x${string}`;
3507
+ gas?: bigint;
3508
+ gasPrice?: bigint;
3509
+ maxFeePerGas?: bigint;
3510
+ maxPriorityFeePerGas?: bigint;
3511
+ nonce?: number;
3512
+ value?: bigint;
3513
+ }): Promise<`0x${string}`> {
3514
+ if (!this.contract.write) {
3515
+ throw new Error('Wallet client is required for write operations');
3516
+ }
3517
+ return this.contract.write.submitGuardian([newGuardian] as const, options) as Promise<`0x${string}`>;
3518
+ }
3519
+
3520
+ /**
3521
+ * submitMarketRemoval
3522
+ * nonpayable
3523
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3524
+ */
3525
+ async submitMarketRemoval(marketParams: MarketParams, options?: {
3526
+ accessList?: import('viem').AccessList;
3527
+ authorizationList?: import('viem').AuthorizationList;
3528
+ chain?: import('viem').Chain | null;
3529
+ dataSuffix?: `0x${string}`;
3530
+ gas?: bigint;
3531
+ gasPrice?: bigint;
3532
+ maxFeePerGas?: bigint;
3533
+ maxPriorityFeePerGas?: bigint;
3534
+ nonce?: number;
3535
+ value?: bigint;
3536
+ }): Promise<`0x${string}`> {
3537
+ if (!this.contract.write) {
3538
+ throw new Error('Wallet client is required for write operations');
3539
+ }
3540
+ return this.contract.write.submitMarketRemoval([marketParams] as const, options) as Promise<`0x${string}`>;
3541
+ }
3542
+
3543
+ /**
3544
+ * submitTimelock
3545
+ * nonpayable
3546
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3547
+ */
3548
+ async submitTimelock(newTimelock: bigint, options?: {
3549
+ accessList?: import('viem').AccessList;
3550
+ authorizationList?: import('viem').AuthorizationList;
3551
+ chain?: import('viem').Chain | null;
3552
+ dataSuffix?: `0x${string}`;
3553
+ gas?: bigint;
3554
+ gasPrice?: bigint;
3555
+ maxFeePerGas?: bigint;
3556
+ maxPriorityFeePerGas?: bigint;
3557
+ nonce?: number;
3558
+ value?: bigint;
3559
+ }): Promise<`0x${string}`> {
3560
+ if (!this.contract.write) {
3561
+ throw new Error('Wallet client is required for write operations');
3562
+ }
3563
+ return this.contract.write.submitTimelock([newTimelock] as const, options) as Promise<`0x${string}`>;
3564
+ }
3565
+
3566
+ /**
3567
+ * transfer
3568
+ * nonpayable
3569
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3570
+ */
3571
+ async transfer(to: `0x${string}`, value: bigint, options?: {
3572
+ accessList?: import('viem').AccessList;
3573
+ authorizationList?: import('viem').AuthorizationList;
3574
+ chain?: import('viem').Chain | null;
3575
+ dataSuffix?: `0x${string}`;
3576
+ gas?: bigint;
3577
+ gasPrice?: bigint;
3578
+ maxFeePerGas?: bigint;
3579
+ maxPriorityFeePerGas?: bigint;
3580
+ nonce?: number;
3581
+ value?: bigint;
3582
+ }): Promise<`0x${string}`> {
3583
+ if (!this.contract.write) {
3584
+ throw new Error('Wallet client is required for write operations');
3585
+ }
3586
+ return this.contract.write.transfer([to, value] as const, options) as Promise<`0x${string}`>;
3587
+ }
3588
+
3589
+ /**
3590
+ * transferFrom
3591
+ * nonpayable
3592
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3593
+ */
3594
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
3595
+ accessList?: import('viem').AccessList;
3596
+ authorizationList?: import('viem').AuthorizationList;
3597
+ chain?: import('viem').Chain | null;
3598
+ dataSuffix?: `0x${string}`;
3599
+ gas?: bigint;
3600
+ gasPrice?: bigint;
3601
+ maxFeePerGas?: bigint;
3602
+ maxPriorityFeePerGas?: bigint;
3603
+ nonce?: number;
3604
+ value?: bigint;
3605
+ }): Promise<`0x${string}`> {
3606
+ if (!this.contract.write) {
3607
+ throw new Error('Wallet client is required for write operations');
3608
+ }
3609
+ return this.contract.write.transferFrom([from, to, value] as const, options) as Promise<`0x${string}`>;
3610
+ }
3611
+
3612
+ /**
3613
+ * transferOwnership
3614
+ * nonpayable
3615
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3616
+ */
3617
+ async transferOwnership(newOwner: `0x${string}`, options?: {
3618
+ accessList?: import('viem').AccessList;
3619
+ authorizationList?: import('viem').AuthorizationList;
3620
+ chain?: import('viem').Chain | null;
3621
+ dataSuffix?: `0x${string}`;
3622
+ gas?: bigint;
3623
+ gasPrice?: bigint;
3624
+ maxFeePerGas?: bigint;
3625
+ maxPriorityFeePerGas?: bigint;
3626
+ nonce?: number;
3627
+ value?: bigint;
3628
+ }): Promise<`0x${string}`> {
3629
+ if (!this.contract.write) {
3630
+ throw new Error('Wallet client is required for write operations');
3631
+ }
3632
+ return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
3633
+ }
3634
+
3635
+ /**
3636
+ * updateWithdrawQueue
3637
+ * nonpayable
3638
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3639
+ */
3640
+ async updateWithdrawQueue(indexes: bigint[], options?: {
3641
+ accessList?: import('viem').AccessList;
3642
+ authorizationList?: import('viem').AuthorizationList;
3643
+ chain?: import('viem').Chain | null;
3644
+ dataSuffix?: `0x${string}`;
3645
+ gas?: bigint;
3646
+ gasPrice?: bigint;
3647
+ maxFeePerGas?: bigint;
3648
+ maxPriorityFeePerGas?: bigint;
3649
+ nonce?: number;
3650
+ value?: bigint;
3651
+ }): Promise<`0x${string}`> {
3652
+ if (!this.contract.write) {
3653
+ throw new Error('Wallet client is required for write operations');
3654
+ }
3655
+ return this.contract.write.updateWithdrawQueue([indexes] as const, options) as Promise<`0x${string}`>;
3656
+ }
3657
+
3658
+ /**
3659
+ * withdraw
3660
+ * nonpayable
3661
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3662
+ */
3663
+ async withdraw(assets: bigint, receiver: `0x${string}`, owner: `0x${string}`, options?: {
3664
+ accessList?: import('viem').AccessList;
3665
+ authorizationList?: import('viem').AuthorizationList;
3666
+ chain?: import('viem').Chain | null;
3667
+ dataSuffix?: `0x${string}`;
3668
+ gas?: bigint;
3669
+ gasPrice?: bigint;
3670
+ maxFeePerGas?: bigint;
3671
+ maxPriorityFeePerGas?: bigint;
3672
+ nonce?: number;
3673
+ value?: bigint;
3674
+ }): Promise<`0x${string}`> {
3675
+ if (!this.contract.write) {
3676
+ throw new Error('Wallet client is required for write operations');
3677
+ }
3678
+ return this.contract.write.withdraw([assets, receiver, owner] as const, options) as Promise<`0x${string}`>;
3679
+ }
3680
+
3681
+
3682
+
3683
+ /**
3684
+ * Simulate contract write operations (dry-run without sending transaction)
3685
+ *
3686
+ * @example
3687
+ * const result = await contract.simulate.transfer('0x...', 1000n);
3688
+ * console.log('Gas estimate:', result.request.gas);
3689
+ * console.log('Would succeed:', result.result);
3690
+ */
3691
+ get simulate() {
3692
+ const contract = this.contract;
3693
+ if (!contract.simulate) {
3694
+ throw new Error('Public client is required for simulation');
3695
+ }
3696
+ return {
3697
+ /**
3698
+ * Simulate acceptCap
3699
+ * Returns gas estimate and result without sending transaction
3700
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3701
+ */
3702
+ async acceptCap(marketParams: MarketParams, options?: {
3703
+ accessList?: import('viem').AccessList;
3704
+ authorizationList?: import('viem').AuthorizationList;
3705
+ chain?: import('viem').Chain | null;
3706
+ dataSuffix?: `0x${string}`;
3707
+ gas?: bigint;
3708
+ gasPrice?: bigint;
3709
+ maxFeePerGas?: bigint;
3710
+ maxPriorityFeePerGas?: bigint;
3711
+ nonce?: number;
3712
+ value?: bigint;
3713
+ }): Promise<void> {
3714
+ return contract.simulate.acceptCap([marketParams] as const, options) as Promise<void>;
3715
+ },
3716
+ /**
3717
+ * Simulate acceptGuardian
3718
+ * Returns gas estimate and result without sending transaction
3719
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3720
+ */
3721
+ async acceptGuardian(options?: {
3722
+ accessList?: import('viem').AccessList;
3723
+ authorizationList?: import('viem').AuthorizationList;
3724
+ chain?: import('viem').Chain | null;
3725
+ dataSuffix?: `0x${string}`;
3726
+ gas?: bigint;
3727
+ gasPrice?: bigint;
3728
+ maxFeePerGas?: bigint;
3729
+ maxPriorityFeePerGas?: bigint;
3730
+ nonce?: number;
3731
+ value?: bigint;
3732
+ }): Promise<void> {
3733
+ return contract.simulate.acceptGuardian(options) as Promise<void>;
3734
+ },
3735
+ /**
3736
+ * Simulate acceptOwnership
3737
+ * Returns gas estimate and result without sending transaction
3738
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3739
+ */
3740
+ async acceptOwnership(options?: {
3741
+ accessList?: import('viem').AccessList;
3742
+ authorizationList?: import('viem').AuthorizationList;
3743
+ chain?: import('viem').Chain | null;
3744
+ dataSuffix?: `0x${string}`;
3745
+ gas?: bigint;
3746
+ gasPrice?: bigint;
3747
+ maxFeePerGas?: bigint;
3748
+ maxPriorityFeePerGas?: bigint;
3749
+ nonce?: number;
3750
+ value?: bigint;
3751
+ }): Promise<void> {
3752
+ return contract.simulate.acceptOwnership(options) as Promise<void>;
3753
+ },
3754
+ /**
3755
+ * Simulate acceptTimelock
3756
+ * Returns gas estimate and result without sending transaction
3757
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3758
+ */
3759
+ async acceptTimelock(options?: {
3760
+ accessList?: import('viem').AccessList;
3761
+ authorizationList?: import('viem').AuthorizationList;
3762
+ chain?: import('viem').Chain | null;
3763
+ dataSuffix?: `0x${string}`;
3764
+ gas?: bigint;
3765
+ gasPrice?: bigint;
3766
+ maxFeePerGas?: bigint;
3767
+ maxPriorityFeePerGas?: bigint;
3768
+ nonce?: number;
3769
+ value?: bigint;
3770
+ }): Promise<void> {
3771
+ return contract.simulate.acceptTimelock(options) as Promise<void>;
3772
+ },
3773
+ /**
3774
+ * Simulate approve
3775
+ * Returns gas estimate and result without sending transaction
3776
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3777
+ */
3778
+ async approve(spender: `0x${string}`, value: bigint, options?: {
3779
+ accessList?: import('viem').AccessList;
3780
+ authorizationList?: import('viem').AuthorizationList;
3781
+ chain?: import('viem').Chain | null;
3782
+ dataSuffix?: `0x${string}`;
3783
+ gas?: bigint;
3784
+ gasPrice?: bigint;
3785
+ maxFeePerGas?: bigint;
3786
+ maxPriorityFeePerGas?: bigint;
3787
+ nonce?: number;
3788
+ value?: bigint;
3789
+ }): Promise<boolean> {
3790
+ return contract.simulate.approve([spender, value] as const, options) as Promise<boolean>;
3791
+ },
3792
+ /**
3793
+ * Simulate deposit
3794
+ * Returns gas estimate and result without sending transaction
3795
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3796
+ */
3797
+ async deposit(assets: bigint, receiver: `0x${string}`, options?: {
3798
+ accessList?: import('viem').AccessList;
3799
+ authorizationList?: import('viem').AuthorizationList;
3800
+ chain?: import('viem').Chain | null;
3801
+ dataSuffix?: `0x${string}`;
3802
+ gas?: bigint;
3803
+ gasPrice?: bigint;
3804
+ maxFeePerGas?: bigint;
3805
+ maxPriorityFeePerGas?: bigint;
3806
+ nonce?: number;
3807
+ value?: bigint;
3808
+ }): Promise<bigint> {
3809
+ return contract.simulate.deposit([assets, receiver] as const, options) as Promise<bigint>;
3810
+ },
3811
+ /**
3812
+ * Simulate mint
3813
+ * Returns gas estimate and result without sending transaction
3814
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3815
+ */
3816
+ async mint(shares: bigint, receiver: `0x${string}`, options?: {
3817
+ accessList?: import('viem').AccessList;
3818
+ authorizationList?: import('viem').AuthorizationList;
3819
+ chain?: import('viem').Chain | null;
3820
+ dataSuffix?: `0x${string}`;
3821
+ gas?: bigint;
3822
+ gasPrice?: bigint;
3823
+ maxFeePerGas?: bigint;
3824
+ maxPriorityFeePerGas?: bigint;
3825
+ nonce?: number;
3826
+ value?: bigint;
3827
+ }): Promise<bigint> {
3828
+ return contract.simulate.mint([shares, receiver] as const, options) as Promise<bigint>;
3829
+ },
3830
+ /**
3831
+ * Simulate multicall
3832
+ * Returns gas estimate and result without sending transaction
3833
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3834
+ */
3835
+ async multicall(data: `0x${string}`[], options?: {
3836
+ accessList?: import('viem').AccessList;
3837
+ authorizationList?: import('viem').AuthorizationList;
3838
+ chain?: import('viem').Chain | null;
3839
+ dataSuffix?: `0x${string}`;
3840
+ gas?: bigint;
3841
+ gasPrice?: bigint;
3842
+ maxFeePerGas?: bigint;
3843
+ maxPriorityFeePerGas?: bigint;
3844
+ nonce?: number;
3845
+ value?: bigint;
3846
+ }): Promise<`0x${string}`[]> {
3847
+ return contract.simulate.multicall([data] as const, options) as Promise<`0x${string}`[]>;
3848
+ },
3849
+ /**
3850
+ * Simulate permit
3851
+ * Returns gas estimate and result without sending transaction
3852
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3853
+ */
3854
+ async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
3855
+ accessList?: import('viem').AccessList;
3856
+ authorizationList?: import('viem').AuthorizationList;
3857
+ chain?: import('viem').Chain | null;
3858
+ dataSuffix?: `0x${string}`;
3859
+ gas?: bigint;
3860
+ gasPrice?: bigint;
3861
+ maxFeePerGas?: bigint;
3862
+ maxPriorityFeePerGas?: bigint;
3863
+ nonce?: number;
3864
+ value?: bigint;
3865
+ }): Promise<void> {
3866
+ return contract.simulate.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<void>;
3867
+ },
3868
+ /**
3869
+ * Simulate reallocate
3870
+ * Returns gas estimate and result without sending transaction
3871
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3872
+ */
3873
+ async reallocate(allocations: MarketAllocation[], options?: {
3874
+ accessList?: import('viem').AccessList;
3875
+ authorizationList?: import('viem').AuthorizationList;
3876
+ chain?: import('viem').Chain | null;
3877
+ dataSuffix?: `0x${string}`;
3878
+ gas?: bigint;
3879
+ gasPrice?: bigint;
3880
+ maxFeePerGas?: bigint;
3881
+ maxPriorityFeePerGas?: bigint;
3882
+ nonce?: number;
3883
+ value?: bigint;
3884
+ }): Promise<void> {
3885
+ return contract.simulate.reallocate([allocations] as const, options) as Promise<void>;
3886
+ },
3887
+ /**
3888
+ * Simulate redeem
3889
+ * Returns gas estimate and result without sending transaction
3890
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3891
+ */
3892
+ async redeem(shares: bigint, receiver: `0x${string}`, owner: `0x${string}`, options?: {
3893
+ accessList?: import('viem').AccessList;
3894
+ authorizationList?: import('viem').AuthorizationList;
3895
+ chain?: import('viem').Chain | null;
3896
+ dataSuffix?: `0x${string}`;
3897
+ gas?: bigint;
3898
+ gasPrice?: bigint;
3899
+ maxFeePerGas?: bigint;
3900
+ maxPriorityFeePerGas?: bigint;
3901
+ nonce?: number;
3902
+ value?: bigint;
3903
+ }): Promise<bigint> {
3904
+ return contract.simulate.redeem([shares, receiver, owner] as const, options) as Promise<bigint>;
3905
+ },
3906
+ /**
3907
+ * Simulate renounceOwnership
3908
+ * Returns gas estimate and result without sending transaction
3909
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3910
+ */
3911
+ async renounceOwnership(options?: {
3912
+ accessList?: import('viem').AccessList;
3913
+ authorizationList?: import('viem').AuthorizationList;
3914
+ chain?: import('viem').Chain | null;
3915
+ dataSuffix?: `0x${string}`;
3916
+ gas?: bigint;
3917
+ gasPrice?: bigint;
3918
+ maxFeePerGas?: bigint;
3919
+ maxPriorityFeePerGas?: bigint;
3920
+ nonce?: number;
3921
+ value?: bigint;
3922
+ }): Promise<void> {
3923
+ return contract.simulate.renounceOwnership(options) as Promise<void>;
3924
+ },
3925
+ /**
3926
+ * Simulate revokePendingCap
3927
+ * Returns gas estimate and result without sending transaction
3928
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3929
+ */
3930
+ async revokePendingCap(id: `0x${string}`, options?: {
3931
+ accessList?: import('viem').AccessList;
3932
+ authorizationList?: import('viem').AuthorizationList;
3933
+ chain?: import('viem').Chain | null;
3934
+ dataSuffix?: `0x${string}`;
3935
+ gas?: bigint;
3936
+ gasPrice?: bigint;
3937
+ maxFeePerGas?: bigint;
3938
+ maxPriorityFeePerGas?: bigint;
3939
+ nonce?: number;
3940
+ value?: bigint;
3941
+ }): Promise<void> {
3942
+ return contract.simulate.revokePendingCap([id] as const, options) as Promise<void>;
3943
+ },
3944
+ /**
3945
+ * Simulate revokePendingGuardian
3946
+ * Returns gas estimate and result without sending transaction
3947
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3948
+ */
3949
+ async revokePendingGuardian(options?: {
3950
+ accessList?: import('viem').AccessList;
3951
+ authorizationList?: import('viem').AuthorizationList;
3952
+ chain?: import('viem').Chain | null;
3953
+ dataSuffix?: `0x${string}`;
3954
+ gas?: bigint;
3955
+ gasPrice?: bigint;
3956
+ maxFeePerGas?: bigint;
3957
+ maxPriorityFeePerGas?: bigint;
3958
+ nonce?: number;
3959
+ value?: bigint;
3960
+ }): Promise<void> {
3961
+ return contract.simulate.revokePendingGuardian(options) as Promise<void>;
3962
+ },
3963
+ /**
3964
+ * Simulate revokePendingMarketRemoval
3965
+ * Returns gas estimate and result without sending transaction
3966
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3967
+ */
3968
+ async revokePendingMarketRemoval(id: `0x${string}`, options?: {
3969
+ accessList?: import('viem').AccessList;
3970
+ authorizationList?: import('viem').AuthorizationList;
3971
+ chain?: import('viem').Chain | null;
3972
+ dataSuffix?: `0x${string}`;
3973
+ gas?: bigint;
3974
+ gasPrice?: bigint;
3975
+ maxFeePerGas?: bigint;
3976
+ maxPriorityFeePerGas?: bigint;
3977
+ nonce?: number;
3978
+ value?: bigint;
3979
+ }): Promise<void> {
3980
+ return contract.simulate.revokePendingMarketRemoval([id] as const, options) as Promise<void>;
3981
+ },
3982
+ /**
3983
+ * Simulate revokePendingTimelock
3984
+ * Returns gas estimate and result without sending transaction
3985
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3986
+ */
3987
+ async revokePendingTimelock(options?: {
3988
+ accessList?: import('viem').AccessList;
3989
+ authorizationList?: import('viem').AuthorizationList;
3990
+ chain?: import('viem').Chain | null;
3991
+ dataSuffix?: `0x${string}`;
3992
+ gas?: bigint;
3993
+ gasPrice?: bigint;
3994
+ maxFeePerGas?: bigint;
3995
+ maxPriorityFeePerGas?: bigint;
3996
+ nonce?: number;
3997
+ value?: bigint;
3998
+ }): Promise<void> {
3999
+ return contract.simulate.revokePendingTimelock(options) as Promise<void>;
4000
+ },
4001
+ /**
4002
+ * Simulate setCurator
4003
+ * Returns gas estimate and result without sending transaction
4004
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4005
+ */
4006
+ async setCurator(newCurator: `0x${string}`, options?: {
4007
+ accessList?: import('viem').AccessList;
4008
+ authorizationList?: import('viem').AuthorizationList;
4009
+ chain?: import('viem').Chain | null;
4010
+ dataSuffix?: `0x${string}`;
4011
+ gas?: bigint;
4012
+ gasPrice?: bigint;
4013
+ maxFeePerGas?: bigint;
4014
+ maxPriorityFeePerGas?: bigint;
4015
+ nonce?: number;
4016
+ value?: bigint;
4017
+ }): Promise<void> {
4018
+ return contract.simulate.setCurator([newCurator] as const, options) as Promise<void>;
4019
+ },
4020
+ /**
4021
+ * Simulate setFee
4022
+ * Returns gas estimate and result without sending transaction
4023
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4024
+ */
4025
+ async setFee(newFee: bigint, options?: {
4026
+ accessList?: import('viem').AccessList;
4027
+ authorizationList?: import('viem').AuthorizationList;
4028
+ chain?: import('viem').Chain | null;
4029
+ dataSuffix?: `0x${string}`;
4030
+ gas?: bigint;
4031
+ gasPrice?: bigint;
4032
+ maxFeePerGas?: bigint;
4033
+ maxPriorityFeePerGas?: bigint;
4034
+ nonce?: number;
4035
+ value?: bigint;
4036
+ }): Promise<void> {
4037
+ return contract.simulate.setFee([newFee] as const, options) as Promise<void>;
4038
+ },
4039
+ /**
4040
+ * Simulate setFeeRecipient
4041
+ * Returns gas estimate and result without sending transaction
4042
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4043
+ */
4044
+ async setFeeRecipient(newFeeRecipient: `0x${string}`, options?: {
4045
+ accessList?: import('viem').AccessList;
4046
+ authorizationList?: import('viem').AuthorizationList;
4047
+ chain?: import('viem').Chain | null;
4048
+ dataSuffix?: `0x${string}`;
4049
+ gas?: bigint;
4050
+ gasPrice?: bigint;
4051
+ maxFeePerGas?: bigint;
4052
+ maxPriorityFeePerGas?: bigint;
4053
+ nonce?: number;
4054
+ value?: bigint;
4055
+ }): Promise<void> {
4056
+ return contract.simulate.setFeeRecipient([newFeeRecipient] as const, options) as Promise<void>;
4057
+ },
4058
+ /**
4059
+ * Simulate setIsAllocator
4060
+ * Returns gas estimate and result without sending transaction
4061
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4062
+ */
4063
+ async setIsAllocator(newAllocator: `0x${string}`, newIsAllocator: boolean, options?: {
4064
+ accessList?: import('viem').AccessList;
4065
+ authorizationList?: import('viem').AuthorizationList;
4066
+ chain?: import('viem').Chain | null;
4067
+ dataSuffix?: `0x${string}`;
4068
+ gas?: bigint;
4069
+ gasPrice?: bigint;
4070
+ maxFeePerGas?: bigint;
4071
+ maxPriorityFeePerGas?: bigint;
4072
+ nonce?: number;
4073
+ value?: bigint;
4074
+ }): Promise<void> {
4075
+ return contract.simulate.setIsAllocator([newAllocator, newIsAllocator] as const, options) as Promise<void>;
4076
+ },
4077
+ /**
4078
+ * Simulate setSkimRecipient
4079
+ * Returns gas estimate and result without sending transaction
4080
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4081
+ */
4082
+ async setSkimRecipient(newSkimRecipient: `0x${string}`, options?: {
4083
+ accessList?: import('viem').AccessList;
4084
+ authorizationList?: import('viem').AuthorizationList;
4085
+ chain?: import('viem').Chain | null;
4086
+ dataSuffix?: `0x${string}`;
4087
+ gas?: bigint;
4088
+ gasPrice?: bigint;
4089
+ maxFeePerGas?: bigint;
4090
+ maxPriorityFeePerGas?: bigint;
4091
+ nonce?: number;
4092
+ value?: bigint;
4093
+ }): Promise<void> {
4094
+ return contract.simulate.setSkimRecipient([newSkimRecipient] as const, options) as Promise<void>;
4095
+ },
4096
+ /**
4097
+ * Simulate setSupplyQueue
4098
+ * Returns gas estimate and result without sending transaction
4099
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4100
+ */
4101
+ async setSupplyQueue(newSupplyQueue: `0x${string}`[], options?: {
4102
+ accessList?: import('viem').AccessList;
4103
+ authorizationList?: import('viem').AuthorizationList;
4104
+ chain?: import('viem').Chain | null;
4105
+ dataSuffix?: `0x${string}`;
4106
+ gas?: bigint;
4107
+ gasPrice?: bigint;
4108
+ maxFeePerGas?: bigint;
4109
+ maxPriorityFeePerGas?: bigint;
4110
+ nonce?: number;
4111
+ value?: bigint;
4112
+ }): Promise<void> {
4113
+ return contract.simulate.setSupplyQueue([newSupplyQueue] as const, options) as Promise<void>;
4114
+ },
4115
+ /**
4116
+ * Simulate skim
4117
+ * Returns gas estimate and result without sending transaction
4118
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4119
+ */
4120
+ async skim(token: `0x${string}`, options?: {
4121
+ accessList?: import('viem').AccessList;
4122
+ authorizationList?: import('viem').AuthorizationList;
4123
+ chain?: import('viem').Chain | null;
4124
+ dataSuffix?: `0x${string}`;
4125
+ gas?: bigint;
4126
+ gasPrice?: bigint;
4127
+ maxFeePerGas?: bigint;
4128
+ maxPriorityFeePerGas?: bigint;
4129
+ nonce?: number;
4130
+ value?: bigint;
4131
+ }): Promise<void> {
4132
+ return contract.simulate.skim([token] as const, options) as Promise<void>;
4133
+ },
4134
+ /**
4135
+ * Simulate submitCap
4136
+ * Returns gas estimate and result without sending transaction
4137
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4138
+ */
4139
+ async submitCap(marketParams: MarketParams, newSupplyCap: bigint, options?: {
4140
+ accessList?: import('viem').AccessList;
4141
+ authorizationList?: import('viem').AuthorizationList;
4142
+ chain?: import('viem').Chain | null;
4143
+ dataSuffix?: `0x${string}`;
4144
+ gas?: bigint;
4145
+ gasPrice?: bigint;
4146
+ maxFeePerGas?: bigint;
4147
+ maxPriorityFeePerGas?: bigint;
4148
+ nonce?: number;
4149
+ value?: bigint;
4150
+ }): Promise<void> {
4151
+ return contract.simulate.submitCap([marketParams, newSupplyCap] as const, options) as Promise<void>;
4152
+ },
4153
+ /**
4154
+ * Simulate submitGuardian
4155
+ * Returns gas estimate and result without sending transaction
4156
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4157
+ */
4158
+ async submitGuardian(newGuardian: `0x${string}`, options?: {
4159
+ accessList?: import('viem').AccessList;
4160
+ authorizationList?: import('viem').AuthorizationList;
4161
+ chain?: import('viem').Chain | null;
4162
+ dataSuffix?: `0x${string}`;
4163
+ gas?: bigint;
4164
+ gasPrice?: bigint;
4165
+ maxFeePerGas?: bigint;
4166
+ maxPriorityFeePerGas?: bigint;
4167
+ nonce?: number;
4168
+ value?: bigint;
4169
+ }): Promise<void> {
4170
+ return contract.simulate.submitGuardian([newGuardian] as const, options) as Promise<void>;
4171
+ },
4172
+ /**
4173
+ * Simulate submitMarketRemoval
4174
+ * Returns gas estimate and result without sending transaction
4175
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4176
+ */
4177
+ async submitMarketRemoval(marketParams: MarketParams, options?: {
4178
+ accessList?: import('viem').AccessList;
4179
+ authorizationList?: import('viem').AuthorizationList;
4180
+ chain?: import('viem').Chain | null;
4181
+ dataSuffix?: `0x${string}`;
4182
+ gas?: bigint;
4183
+ gasPrice?: bigint;
4184
+ maxFeePerGas?: bigint;
4185
+ maxPriorityFeePerGas?: bigint;
4186
+ nonce?: number;
4187
+ value?: bigint;
4188
+ }): Promise<void> {
4189
+ return contract.simulate.submitMarketRemoval([marketParams] as const, options) as Promise<void>;
4190
+ },
4191
+ /**
4192
+ * Simulate submitTimelock
4193
+ * Returns gas estimate and result without sending transaction
4194
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4195
+ */
4196
+ async submitTimelock(newTimelock: bigint, options?: {
4197
+ accessList?: import('viem').AccessList;
4198
+ authorizationList?: import('viem').AuthorizationList;
4199
+ chain?: import('viem').Chain | null;
4200
+ dataSuffix?: `0x${string}`;
4201
+ gas?: bigint;
4202
+ gasPrice?: bigint;
4203
+ maxFeePerGas?: bigint;
4204
+ maxPriorityFeePerGas?: bigint;
4205
+ nonce?: number;
4206
+ value?: bigint;
4207
+ }): Promise<void> {
4208
+ return contract.simulate.submitTimelock([newTimelock] as const, options) as Promise<void>;
4209
+ },
4210
+ /**
4211
+ * Simulate transfer
4212
+ * Returns gas estimate and result without sending transaction
4213
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4214
+ */
4215
+ async transfer(to: `0x${string}`, value: bigint, options?: {
4216
+ accessList?: import('viem').AccessList;
4217
+ authorizationList?: import('viem').AuthorizationList;
4218
+ chain?: import('viem').Chain | null;
4219
+ dataSuffix?: `0x${string}`;
4220
+ gas?: bigint;
4221
+ gasPrice?: bigint;
4222
+ maxFeePerGas?: bigint;
4223
+ maxPriorityFeePerGas?: bigint;
4224
+ nonce?: number;
4225
+ value?: bigint;
4226
+ }): Promise<boolean> {
4227
+ return contract.simulate.transfer([to, value] as const, options) as Promise<boolean>;
4228
+ },
4229
+ /**
4230
+ * Simulate transferFrom
4231
+ * Returns gas estimate and result without sending transaction
4232
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4233
+ */
4234
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
4235
+ accessList?: import('viem').AccessList;
4236
+ authorizationList?: import('viem').AuthorizationList;
4237
+ chain?: import('viem').Chain | null;
4238
+ dataSuffix?: `0x${string}`;
4239
+ gas?: bigint;
4240
+ gasPrice?: bigint;
4241
+ maxFeePerGas?: bigint;
4242
+ maxPriorityFeePerGas?: bigint;
4243
+ nonce?: number;
4244
+ value?: bigint;
4245
+ }): Promise<boolean> {
4246
+ return contract.simulate.transferFrom([from, to, value] as const, options) as Promise<boolean>;
4247
+ },
4248
+ /**
4249
+ * Simulate transferOwnership
4250
+ * Returns gas estimate and result without sending transaction
4251
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4252
+ */
4253
+ async transferOwnership(newOwner: `0x${string}`, options?: {
4254
+ accessList?: import('viem').AccessList;
4255
+ authorizationList?: import('viem').AuthorizationList;
4256
+ chain?: import('viem').Chain | null;
4257
+ dataSuffix?: `0x${string}`;
4258
+ gas?: bigint;
4259
+ gasPrice?: bigint;
4260
+ maxFeePerGas?: bigint;
4261
+ maxPriorityFeePerGas?: bigint;
4262
+ nonce?: number;
4263
+ value?: bigint;
4264
+ }): Promise<void> {
4265
+ return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
4266
+ },
4267
+ /**
4268
+ * Simulate updateWithdrawQueue
4269
+ * Returns gas estimate and result without sending transaction
4270
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4271
+ */
4272
+ async updateWithdrawQueue(indexes: bigint[], options?: {
4273
+ accessList?: import('viem').AccessList;
4274
+ authorizationList?: import('viem').AuthorizationList;
4275
+ chain?: import('viem').Chain | null;
4276
+ dataSuffix?: `0x${string}`;
4277
+ gas?: bigint;
4278
+ gasPrice?: bigint;
4279
+ maxFeePerGas?: bigint;
4280
+ maxPriorityFeePerGas?: bigint;
4281
+ nonce?: number;
4282
+ value?: bigint;
4283
+ }): Promise<void> {
4284
+ return contract.simulate.updateWithdrawQueue([indexes] as const, options) as Promise<void>;
4285
+ },
4286
+ /**
4287
+ * Simulate withdraw
4288
+ * Returns gas estimate and result without sending transaction
4289
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
4290
+ */
4291
+ async withdraw(assets: bigint, receiver: `0x${string}`, owner: `0x${string}`, options?: {
4292
+ accessList?: import('viem').AccessList;
4293
+ authorizationList?: import('viem').AuthorizationList;
4294
+ chain?: import('viem').Chain | null;
4295
+ dataSuffix?: `0x${string}`;
4296
+ gas?: bigint;
4297
+ gasPrice?: bigint;
4298
+ maxFeePerGas?: bigint;
4299
+ maxPriorityFeePerGas?: bigint;
4300
+ nonce?: number;
4301
+ value?: bigint;
4302
+ }): Promise<bigint> {
4303
+ return contract.simulate.withdraw([assets, receiver, owner] as const, options) as Promise<bigint>;
4304
+ }
4305
+ };
4306
+ }
4307
+
4308
+ /**
4309
+ * Watch contract events
4310
+ *
4311
+ * @example
4312
+ * // Watch all Transfer events
4313
+ * const unwatch = contract.watch.Transfer((event) => {
4314
+ * console.log('Transfer:', event);
4315
+ * });
4316
+ *
4317
+ * // Stop watching
4318
+ * unwatch();
4319
+ */
4320
+ get watch() {
4321
+ return {
4322
+ /**
4323
+ * Watch AccrueInterest events
4324
+ * @param callback Function to call when event is emitted
4325
+ * @param filter Optional filter for indexed parameters
4326
+ * @returns Unwatch function to stop listening
4327
+ */
4328
+ AccrueInterest: (callback: (event: { newTotalAssets: bigint; feeShares: bigint }) => void) => {
4329
+ return this.publicClient.watchContractEvent({
4330
+ address: this.contractAddress,
4331
+ abi: MetaMorphoAbi,
4332
+ eventName: 'AccrueInterest',
4333
+
4334
+ onLogs: (logs: any[]) => {
4335
+ logs.forEach((log: any) => {
4336
+ callback(log.args as any);
4337
+ });
4338
+ },
4339
+ }) as () => void;
4340
+ },
4341
+ /**
4342
+ * Watch Approval events
4343
+ * @param callback Function to call when event is emitted
4344
+ * @param filter Optional filter for indexed parameters
4345
+ * @returns Unwatch function to stop listening
4346
+ */
4347
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null; spender?: `0x${string}` | `0x${string}`[] | null }) => {
4348
+ return this.publicClient.watchContractEvent({
4349
+ address: this.contractAddress,
4350
+ abi: MetaMorphoAbi,
4351
+ eventName: 'Approval',
4352
+ args: filter as any,
4353
+ onLogs: (logs: any[]) => {
4354
+ logs.forEach((log: any) => {
4355
+ callback(log.args as any);
4356
+ });
4357
+ },
4358
+ }) as () => void;
4359
+ },
4360
+ /**
4361
+ * Watch Deposit events
4362
+ * @param callback Function to call when event is emitted
4363
+ * @param filter Optional filter for indexed parameters
4364
+ * @returns Unwatch function to stop listening
4365
+ */
4366
+ Deposit: (callback: (event: { sender: `0x${string}`; owner: `0x${string}`; assets: bigint; shares: bigint }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null; owner?: `0x${string}` | `0x${string}`[] | null }) => {
4367
+ return this.publicClient.watchContractEvent({
4368
+ address: this.contractAddress,
4369
+ abi: MetaMorphoAbi,
4370
+ eventName: 'Deposit',
4371
+ args: filter as any,
4372
+ onLogs: (logs: any[]) => {
4373
+ logs.forEach((log: any) => {
4374
+ callback(log.args as any);
4375
+ });
4376
+ },
4377
+ }) as () => void;
4378
+ },
4379
+ /**
4380
+ * Watch EIP712DomainChanged events
4381
+ * @param callback Function to call when event is emitted
4382
+ * @param filter Optional filter for indexed parameters
4383
+ * @returns Unwatch function to stop listening
4384
+ */
4385
+ EIP712DomainChanged: (callback: (event: { }) => void) => {
4386
+ return this.publicClient.watchContractEvent({
4387
+ address: this.contractAddress,
4388
+ abi: MetaMorphoAbi,
4389
+ eventName: 'EIP712DomainChanged',
4390
+
4391
+ onLogs: (logs: any[]) => {
4392
+ logs.forEach((log: any) => {
4393
+ callback(log.args as any);
4394
+ });
4395
+ },
4396
+ }) as () => void;
4397
+ },
4398
+ /**
4399
+ * Watch OwnershipTransferStarted events
4400
+ * @param callback Function to call when event is emitted
4401
+ * @param filter Optional filter for indexed parameters
4402
+ * @returns Unwatch function to stop listening
4403
+ */
4404
+ OwnershipTransferStarted: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner?: `0x${string}` | `0x${string}`[] | null; newOwner?: `0x${string}` | `0x${string}`[] | null }) => {
4405
+ return this.publicClient.watchContractEvent({
4406
+ address: this.contractAddress,
4407
+ abi: MetaMorphoAbi,
4408
+ eventName: 'OwnershipTransferStarted',
4409
+ args: filter as any,
4410
+ onLogs: (logs: any[]) => {
4411
+ logs.forEach((log: any) => {
4412
+ callback(log.args as any);
4413
+ });
4414
+ },
4415
+ }) as () => void;
4416
+ },
4417
+ /**
4418
+ * Watch OwnershipTransferred events
4419
+ * @param callback Function to call when event is emitted
4420
+ * @param filter Optional filter for indexed parameters
4421
+ * @returns Unwatch function to stop listening
4422
+ */
4423
+ OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner?: `0x${string}` | `0x${string}`[] | null; newOwner?: `0x${string}` | `0x${string}`[] | null }) => {
4424
+ return this.publicClient.watchContractEvent({
4425
+ address: this.contractAddress,
4426
+ abi: MetaMorphoAbi,
4427
+ eventName: 'OwnershipTransferred',
4428
+ args: filter as any,
4429
+ onLogs: (logs: any[]) => {
4430
+ logs.forEach((log: any) => {
4431
+ callback(log.args as any);
4432
+ });
4433
+ },
4434
+ }) as () => void;
4435
+ },
4436
+ /**
4437
+ * Watch ReallocateSupply events
4438
+ * @param callback Function to call when event is emitted
4439
+ * @param filter Optional filter for indexed parameters
4440
+ * @returns Unwatch function to stop listening
4441
+ */
4442
+ ReallocateSupply: (callback: (event: { caller: `0x${string}`; id: `0x${string}`; suppliedAssets: bigint; suppliedShares: bigint }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null; id?: `0x${string}` | `0x${string}`[] | null }) => {
4443
+ return this.publicClient.watchContractEvent({
4444
+ address: this.contractAddress,
4445
+ abi: MetaMorphoAbi,
4446
+ eventName: 'ReallocateSupply',
4447
+ args: filter as any,
4448
+ onLogs: (logs: any[]) => {
4449
+ logs.forEach((log: any) => {
4450
+ callback(log.args as any);
4451
+ });
4452
+ },
4453
+ }) as () => void;
4454
+ },
4455
+ /**
4456
+ * Watch ReallocateWithdraw events
4457
+ * @param callback Function to call when event is emitted
4458
+ * @param filter Optional filter for indexed parameters
4459
+ * @returns Unwatch function to stop listening
4460
+ */
4461
+ ReallocateWithdraw: (callback: (event: { caller: `0x${string}`; id: `0x${string}`; withdrawnAssets: bigint; withdrawnShares: bigint }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null; id?: `0x${string}` | `0x${string}`[] | null }) => {
4462
+ return this.publicClient.watchContractEvent({
4463
+ address: this.contractAddress,
4464
+ abi: MetaMorphoAbi,
4465
+ eventName: 'ReallocateWithdraw',
4466
+ args: filter as any,
4467
+ onLogs: (logs: any[]) => {
4468
+ logs.forEach((log: any) => {
4469
+ callback(log.args as any);
4470
+ });
4471
+ },
4472
+ }) as () => void;
4473
+ },
4474
+ /**
4475
+ * Watch RevokePendingCap events
4476
+ * @param callback Function to call when event is emitted
4477
+ * @param filter Optional filter for indexed parameters
4478
+ * @returns Unwatch function to stop listening
4479
+ */
4480
+ RevokePendingCap: (callback: (event: { caller: `0x${string}`; id: `0x${string}` }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null; id?: `0x${string}` | `0x${string}`[] | null }) => {
4481
+ return this.publicClient.watchContractEvent({
4482
+ address: this.contractAddress,
4483
+ abi: MetaMorphoAbi,
4484
+ eventName: 'RevokePendingCap',
4485
+ args: filter as any,
4486
+ onLogs: (logs: any[]) => {
4487
+ logs.forEach((log: any) => {
4488
+ callback(log.args as any);
4489
+ });
4490
+ },
4491
+ }) as () => void;
4492
+ },
4493
+ /**
4494
+ * Watch RevokePendingGuardian events
4495
+ * @param callback Function to call when event is emitted
4496
+ * @param filter Optional filter for indexed parameters
4497
+ * @returns Unwatch function to stop listening
4498
+ */
4499
+ RevokePendingGuardian: (callback: (event: { caller: `0x${string}` }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null }) => {
4500
+ return this.publicClient.watchContractEvent({
4501
+ address: this.contractAddress,
4502
+ abi: MetaMorphoAbi,
4503
+ eventName: 'RevokePendingGuardian',
4504
+ args: filter as any,
4505
+ onLogs: (logs: any[]) => {
4506
+ logs.forEach((log: any) => {
4507
+ callback(log.args as any);
4508
+ });
4509
+ },
4510
+ }) as () => void;
4511
+ },
4512
+ /**
4513
+ * Watch RevokePendingMarketRemoval events
4514
+ * @param callback Function to call when event is emitted
4515
+ * @param filter Optional filter for indexed parameters
4516
+ * @returns Unwatch function to stop listening
4517
+ */
4518
+ RevokePendingMarketRemoval: (callback: (event: { caller: `0x${string}`; id: `0x${string}` }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null; id?: `0x${string}` | `0x${string}`[] | null }) => {
4519
+ return this.publicClient.watchContractEvent({
4520
+ address: this.contractAddress,
4521
+ abi: MetaMorphoAbi,
4522
+ eventName: 'RevokePendingMarketRemoval',
4523
+ args: filter as any,
4524
+ onLogs: (logs: any[]) => {
4525
+ logs.forEach((log: any) => {
4526
+ callback(log.args as any);
4527
+ });
4528
+ },
4529
+ }) as () => void;
4530
+ },
4531
+ /**
4532
+ * Watch RevokePendingTimelock events
4533
+ * @param callback Function to call when event is emitted
4534
+ * @param filter Optional filter for indexed parameters
4535
+ * @returns Unwatch function to stop listening
4536
+ */
4537
+ RevokePendingTimelock: (callback: (event: { caller: `0x${string}` }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null }) => {
4538
+ return this.publicClient.watchContractEvent({
4539
+ address: this.contractAddress,
4540
+ abi: MetaMorphoAbi,
4541
+ eventName: 'RevokePendingTimelock',
4542
+ args: filter as any,
4543
+ onLogs: (logs: any[]) => {
4544
+ logs.forEach((log: any) => {
4545
+ callback(log.args as any);
4546
+ });
4547
+ },
4548
+ }) as () => void;
4549
+ },
4550
+ /**
4551
+ * Watch SetCap events
4552
+ * @param callback Function to call when event is emitted
4553
+ * @param filter Optional filter for indexed parameters
4554
+ * @returns Unwatch function to stop listening
4555
+ */
4556
+ SetCap: (callback: (event: { caller: `0x${string}`; id: `0x${string}`; cap: bigint }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null; id?: `0x${string}` | `0x${string}`[] | null }) => {
4557
+ return this.publicClient.watchContractEvent({
4558
+ address: this.contractAddress,
4559
+ abi: MetaMorphoAbi,
4560
+ eventName: 'SetCap',
4561
+ args: filter as any,
4562
+ onLogs: (logs: any[]) => {
4563
+ logs.forEach((log: any) => {
4564
+ callback(log.args as any);
4565
+ });
4566
+ },
4567
+ }) as () => void;
4568
+ },
4569
+ /**
4570
+ * Watch SetCurator events
4571
+ * @param callback Function to call when event is emitted
4572
+ * @param filter Optional filter for indexed parameters
4573
+ * @returns Unwatch function to stop listening
4574
+ */
4575
+ SetCurator: (callback: (event: { newCurator: `0x${string}` }) => void, filter?: { newCurator?: `0x${string}` | `0x${string}`[] | null }) => {
4576
+ return this.publicClient.watchContractEvent({
4577
+ address: this.contractAddress,
4578
+ abi: MetaMorphoAbi,
4579
+ eventName: 'SetCurator',
4580
+ args: filter as any,
4581
+ onLogs: (logs: any[]) => {
4582
+ logs.forEach((log: any) => {
4583
+ callback(log.args as any);
4584
+ });
4585
+ },
4586
+ }) as () => void;
4587
+ },
4588
+ /**
4589
+ * Watch SetFee events
4590
+ * @param callback Function to call when event is emitted
4591
+ * @param filter Optional filter for indexed parameters
4592
+ * @returns Unwatch function to stop listening
4593
+ */
4594
+ SetFee: (callback: (event: { caller: `0x${string}`; newFee: bigint }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null }) => {
4595
+ return this.publicClient.watchContractEvent({
4596
+ address: this.contractAddress,
4597
+ abi: MetaMorphoAbi,
4598
+ eventName: 'SetFee',
4599
+ args: filter as any,
4600
+ onLogs: (logs: any[]) => {
4601
+ logs.forEach((log: any) => {
4602
+ callback(log.args as any);
4603
+ });
4604
+ },
4605
+ }) as () => void;
4606
+ },
4607
+ /**
4608
+ * Watch SetFeeRecipient events
4609
+ * @param callback Function to call when event is emitted
4610
+ * @param filter Optional filter for indexed parameters
4611
+ * @returns Unwatch function to stop listening
4612
+ */
4613
+ SetFeeRecipient: (callback: (event: { newFeeRecipient: `0x${string}` }) => void, filter?: { newFeeRecipient?: `0x${string}` | `0x${string}`[] | null }) => {
4614
+ return this.publicClient.watchContractEvent({
4615
+ address: this.contractAddress,
4616
+ abi: MetaMorphoAbi,
4617
+ eventName: 'SetFeeRecipient',
4618
+ args: filter as any,
4619
+ onLogs: (logs: any[]) => {
4620
+ logs.forEach((log: any) => {
4621
+ callback(log.args as any);
4622
+ });
4623
+ },
4624
+ }) as () => void;
4625
+ },
4626
+ /**
4627
+ * Watch SetGuardian events
4628
+ * @param callback Function to call when event is emitted
4629
+ * @param filter Optional filter for indexed parameters
4630
+ * @returns Unwatch function to stop listening
4631
+ */
4632
+ SetGuardian: (callback: (event: { caller: `0x${string}`; guardian: `0x${string}` }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null; guardian?: `0x${string}` | `0x${string}`[] | null }) => {
4633
+ return this.publicClient.watchContractEvent({
4634
+ address: this.contractAddress,
4635
+ abi: MetaMorphoAbi,
4636
+ eventName: 'SetGuardian',
4637
+ args: filter as any,
4638
+ onLogs: (logs: any[]) => {
4639
+ logs.forEach((log: any) => {
4640
+ callback(log.args as any);
4641
+ });
4642
+ },
4643
+ }) as () => void;
4644
+ },
4645
+ /**
4646
+ * Watch SetIsAllocator events
4647
+ * @param callback Function to call when event is emitted
4648
+ * @param filter Optional filter for indexed parameters
4649
+ * @returns Unwatch function to stop listening
4650
+ */
4651
+ SetIsAllocator: (callback: (event: { allocator: `0x${string}`; isAllocator: boolean }) => void, filter?: { allocator?: `0x${string}` | `0x${string}`[] | null }) => {
4652
+ return this.publicClient.watchContractEvent({
4653
+ address: this.contractAddress,
4654
+ abi: MetaMorphoAbi,
4655
+ eventName: 'SetIsAllocator',
4656
+ args: filter as any,
4657
+ onLogs: (logs: any[]) => {
4658
+ logs.forEach((log: any) => {
4659
+ callback(log.args as any);
4660
+ });
4661
+ },
4662
+ }) as () => void;
4663
+ },
4664
+ /**
4665
+ * Watch SetSkimRecipient events
4666
+ * @param callback Function to call when event is emitted
4667
+ * @param filter Optional filter for indexed parameters
4668
+ * @returns Unwatch function to stop listening
4669
+ */
4670
+ SetSkimRecipient: (callback: (event: { newSkimRecipient: `0x${string}` }) => void, filter?: { newSkimRecipient?: `0x${string}` | `0x${string}`[] | null }) => {
4671
+ return this.publicClient.watchContractEvent({
4672
+ address: this.contractAddress,
4673
+ abi: MetaMorphoAbi,
4674
+ eventName: 'SetSkimRecipient',
4675
+ args: filter as any,
4676
+ onLogs: (logs: any[]) => {
4677
+ logs.forEach((log: any) => {
4678
+ callback(log.args as any);
4679
+ });
4680
+ },
4681
+ }) as () => void;
4682
+ },
4683
+ /**
4684
+ * Watch SetSupplyQueue events
4685
+ * @param callback Function to call when event is emitted
4686
+ * @param filter Optional filter for indexed parameters
4687
+ * @returns Unwatch function to stop listening
4688
+ */
4689
+ SetSupplyQueue: (callback: (event: { caller: `0x${string}`; newSupplyQueue: `0x${string}`[] }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null }) => {
4690
+ return this.publicClient.watchContractEvent({
4691
+ address: this.contractAddress,
4692
+ abi: MetaMorphoAbi,
4693
+ eventName: 'SetSupplyQueue',
4694
+ args: filter as any,
4695
+ onLogs: (logs: any[]) => {
4696
+ logs.forEach((log: any) => {
4697
+ callback(log.args as any);
4698
+ });
4699
+ },
4700
+ }) as () => void;
4701
+ },
4702
+ /**
4703
+ * Watch SetTimelock events
4704
+ * @param callback Function to call when event is emitted
4705
+ * @param filter Optional filter for indexed parameters
4706
+ * @returns Unwatch function to stop listening
4707
+ */
4708
+ SetTimelock: (callback: (event: { caller: `0x${string}`; newTimelock: bigint }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null }) => {
4709
+ return this.publicClient.watchContractEvent({
4710
+ address: this.contractAddress,
4711
+ abi: MetaMorphoAbi,
4712
+ eventName: 'SetTimelock',
4713
+ args: filter as any,
4714
+ onLogs: (logs: any[]) => {
4715
+ logs.forEach((log: any) => {
4716
+ callback(log.args as any);
4717
+ });
4718
+ },
4719
+ }) as () => void;
4720
+ },
4721
+ /**
4722
+ * Watch SetWithdrawQueue events
4723
+ * @param callback Function to call when event is emitted
4724
+ * @param filter Optional filter for indexed parameters
4725
+ * @returns Unwatch function to stop listening
4726
+ */
4727
+ SetWithdrawQueue: (callback: (event: { caller: `0x${string}`; newWithdrawQueue: `0x${string}`[] }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null }) => {
4728
+ return this.publicClient.watchContractEvent({
4729
+ address: this.contractAddress,
4730
+ abi: MetaMorphoAbi,
4731
+ eventName: 'SetWithdrawQueue',
4732
+ args: filter as any,
4733
+ onLogs: (logs: any[]) => {
4734
+ logs.forEach((log: any) => {
4735
+ callback(log.args as any);
4736
+ });
4737
+ },
4738
+ }) as () => void;
4739
+ },
4740
+ /**
4741
+ * Watch Skim events
4742
+ * @param callback Function to call when event is emitted
4743
+ * @param filter Optional filter for indexed parameters
4744
+ * @returns Unwatch function to stop listening
4745
+ */
4746
+ Skim: (callback: (event: { caller: `0x${string}`; token: `0x${string}`; amount: bigint }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null; token?: `0x${string}` | `0x${string}`[] | null }) => {
4747
+ return this.publicClient.watchContractEvent({
4748
+ address: this.contractAddress,
4749
+ abi: MetaMorphoAbi,
4750
+ eventName: 'Skim',
4751
+ args: filter as any,
4752
+ onLogs: (logs: any[]) => {
4753
+ logs.forEach((log: any) => {
4754
+ callback(log.args as any);
4755
+ });
4756
+ },
4757
+ }) as () => void;
4758
+ },
4759
+ /**
4760
+ * Watch SubmitCap events
4761
+ * @param callback Function to call when event is emitted
4762
+ * @param filter Optional filter for indexed parameters
4763
+ * @returns Unwatch function to stop listening
4764
+ */
4765
+ SubmitCap: (callback: (event: { caller: `0x${string}`; id: `0x${string}`; cap: bigint }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null; id?: `0x${string}` | `0x${string}`[] | null }) => {
4766
+ return this.publicClient.watchContractEvent({
4767
+ address: this.contractAddress,
4768
+ abi: MetaMorphoAbi,
4769
+ eventName: 'SubmitCap',
4770
+ args: filter as any,
4771
+ onLogs: (logs: any[]) => {
4772
+ logs.forEach((log: any) => {
4773
+ callback(log.args as any);
4774
+ });
4775
+ },
4776
+ }) as () => void;
4777
+ },
4778
+ /**
4779
+ * Watch SubmitGuardian events
4780
+ * @param callback Function to call when event is emitted
4781
+ * @param filter Optional filter for indexed parameters
4782
+ * @returns Unwatch function to stop listening
4783
+ */
4784
+ SubmitGuardian: (callback: (event: { newGuardian: `0x${string}` }) => void, filter?: { newGuardian?: `0x${string}` | `0x${string}`[] | null }) => {
4785
+ return this.publicClient.watchContractEvent({
4786
+ address: this.contractAddress,
4787
+ abi: MetaMorphoAbi,
4788
+ eventName: 'SubmitGuardian',
4789
+ args: filter as any,
4790
+ onLogs: (logs: any[]) => {
4791
+ logs.forEach((log: any) => {
4792
+ callback(log.args as any);
4793
+ });
4794
+ },
4795
+ }) as () => void;
4796
+ },
4797
+ /**
4798
+ * Watch SubmitMarketRemoval events
4799
+ * @param callback Function to call when event is emitted
4800
+ * @param filter Optional filter for indexed parameters
4801
+ * @returns Unwatch function to stop listening
4802
+ */
4803
+ SubmitMarketRemoval: (callback: (event: { caller: `0x${string}`; id: `0x${string}` }) => void, filter?: { caller?: `0x${string}` | `0x${string}`[] | null; id?: `0x${string}` | `0x${string}`[] | null }) => {
4804
+ return this.publicClient.watchContractEvent({
4805
+ address: this.contractAddress,
4806
+ abi: MetaMorphoAbi,
4807
+ eventName: 'SubmitMarketRemoval',
4808
+ args: filter as any,
4809
+ onLogs: (logs: any[]) => {
4810
+ logs.forEach((log: any) => {
4811
+ callback(log.args as any);
4812
+ });
4813
+ },
4814
+ }) as () => void;
4815
+ },
4816
+ /**
4817
+ * Watch SubmitTimelock events
4818
+ * @param callback Function to call when event is emitted
4819
+ * @param filter Optional filter for indexed parameters
4820
+ * @returns Unwatch function to stop listening
4821
+ */
4822
+ SubmitTimelock: (callback: (event: { newTimelock: bigint }) => void) => {
4823
+ return this.publicClient.watchContractEvent({
4824
+ address: this.contractAddress,
4825
+ abi: MetaMorphoAbi,
4826
+ eventName: 'SubmitTimelock',
4827
+
4828
+ onLogs: (logs: any[]) => {
4829
+ logs.forEach((log: any) => {
4830
+ callback(log.args as any);
4831
+ });
4832
+ },
4833
+ }) as () => void;
4834
+ },
4835
+ /**
4836
+ * Watch Transfer events
4837
+ * @param callback Function to call when event is emitted
4838
+ * @param filter Optional filter for indexed parameters
4839
+ * @returns Unwatch function to stop listening
4840
+ */
4841
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
4842
+ return this.publicClient.watchContractEvent({
4843
+ address: this.contractAddress,
4844
+ abi: MetaMorphoAbi,
4845
+ eventName: 'Transfer',
4846
+ args: filter as any,
4847
+ onLogs: (logs: any[]) => {
4848
+ logs.forEach((log: any) => {
4849
+ callback(log.args as any);
4850
+ });
4851
+ },
4852
+ }) as () => void;
4853
+ },
4854
+ /**
4855
+ * Watch UpdateLastTotalAssets events
4856
+ * @param callback Function to call when event is emitted
4857
+ * @param filter Optional filter for indexed parameters
4858
+ * @returns Unwatch function to stop listening
4859
+ */
4860
+ UpdateLastTotalAssets: (callback: (event: { updatedTotalAssets: bigint }) => void) => {
4861
+ return this.publicClient.watchContractEvent({
4862
+ address: this.contractAddress,
4863
+ abi: MetaMorphoAbi,
4864
+ eventName: 'UpdateLastTotalAssets',
4865
+
4866
+ onLogs: (logs: any[]) => {
4867
+ logs.forEach((log: any) => {
4868
+ callback(log.args as any);
4869
+ });
4870
+ },
4871
+ }) as () => void;
4872
+ },
4873
+ /**
4874
+ * Watch Withdraw events
4875
+ * @param callback Function to call when event is emitted
4876
+ * @param filter Optional filter for indexed parameters
4877
+ * @returns Unwatch function to stop listening
4878
+ */
4879
+ Withdraw: (callback: (event: { sender: `0x${string}`; receiver: `0x${string}`; owner: `0x${string}`; assets: bigint; shares: bigint }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null; receiver?: `0x${string}` | `0x${string}`[] | null; owner?: `0x${string}` | `0x${string}`[] | null }) => {
4880
+ return this.publicClient.watchContractEvent({
4881
+ address: this.contractAddress,
4882
+ abi: MetaMorphoAbi,
4883
+ eventName: 'Withdraw',
4884
+ args: filter as any,
4885
+ onLogs: (logs: any[]) => {
4886
+ logs.forEach((log: any) => {
4887
+ callback(log.args as any);
4888
+ });
4889
+ },
4890
+ }) as () => void;
4891
+ }
4892
+ };
4893
+ }
4894
+ }