@gitmyabi/gnosissafe 1.0.0

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