@gitmyabi/gnosissafe 1.0.163 → 1.0.165

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